File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/vendor.tar
autoload.php 0000644 00000001354 15153526733 0007102 0 ustar 00 <?php
// autoload.php @generated by Composer
if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
throw new RuntimeException($err);
}
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitea83457257a54dc833bf8ffd41c209c3::getLoader();
composer/ClassLoader.php 0000644 00000037772 15153526733 0011332 0 ustar 00 <?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Autoload;
/**
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \Composer\Autoload\ClassLoader();
*
* // register classes with namespaces
* $loader->add('Symfony\Component', __DIR__.'/component');
* $loader->add('Symfony', __DIR__.'/framework');
*
* // activate the autoloader
* $loader->register();
*
* // to enable searching the include path (eg. for PEAR packages)
* $loader->setUseIncludePath(true);
*
* In this example, if you try to use a class in the Symfony\Component
* namespace or one of its children (Symfony\Component\Console for instance),
* the autoloader will first look for the class under the component/
* directory, and it will then fallback to the framework/ directory if not
* found before giving up.
*
* This class is loosely based on the Symfony UniversalClassLoader.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
/** @var \Closure(string):void */
private static $includeFile;
/** @var string|null */
private $vendorDir;
// PSR-4
/**
* @var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array<string, list<string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* List of PSR-0 prefixes
*
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
*
* @var array<string, array<string, list<string>>>
*/
private $prefixesPsr0 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false;
/**
* @var array<string, string>
*/
private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false;
/**
* @var array<string, bool>
*/
private $missingClasses = array();
/** @var string|null */
private $apcuPrefix;
/**
* @var array<string, self>
*/
private static $registeredLoaders = array();
/**
* @param string|null $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}
/**
* @return array<string, list<string>>
*/
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();
}
/**
* @return array<string, list<string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
/**
* @return list<string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
/**
* @return list<string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
/**
* @return array<string, string> Array of classname => path
*/
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array<string, string> $classMap Class to filename map
*
* @return void
*/
public function addClassMap(array $classMap)
{
if ($this->classMap) {
$this->classMap = array_merge($this->classMap, $classMap);
} else {
$this->classMap = $classMap;
}
}
/**
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param list<string>|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
$paths = (array) $paths;
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
$paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
$paths
);
}
return;
}
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
$paths
);
}
}
/**
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param list<string>|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
$paths = (array) $paths;
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
$paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
$paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
$paths
);
}
}
/**
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param list<string>|string $paths The PSR-0 base directories
*
* @return void
*/
public function set($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr0 = (array) $paths;
} else {
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
}
}
/**
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param list<string>|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function setPsr4($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
/**
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*
* @return void
*/
public function setUseIncludePath($useIncludePath)
{
$this->useIncludePath = $useIncludePath;
}
/**
* Can be used to check if the autoloader uses the include path to check
* for classes.
*
* @return bool
*/
public function getUseIncludePath()
{
return $this->useIncludePath;
}
/**
* Turns off searching the prefix and fallback directories for classes
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*
* @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
$this->classMapAuthoritative = $classMapAuthoritative;
}
/**
* Should class lookup fail if not found in the current class map?
*
* @return bool
*/
public function isClassMapAuthoritative()
{
return $this->classMapAuthoritative;
}
/**
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*
* @return void
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}
/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
return;
}
if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}
/**
* Unregisters this instance as an autoloader.
*
* @return void
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
$includeFile = self::$includeFile;
$includeFile($file);
return true;
}
return null;
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
$file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM
if (false === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}
if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
}
return $file;
}
/**
* Returns the currently registered loaders keyed by their corresponding vendor directories.
*
* @return array<string, self>
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
}
}
}
// PSR-4 fallback dirs
foreach ($this->fallbackDirsPsr4 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
return $file;
}
}
// PSR-0 lookup
if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
} else {
// PEAR-like class name
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
}
if (isset($this->prefixesPsr0[$first])) {
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
if (0 === strpos($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
}
}
}
// PSR-0 fallback dirs
foreach ($this->fallbackDirsPsr0 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
// PSR-0 include paths.
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
return false;
}
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
}
composer/InstalledVersions.php 0000644 00000041763 15153526733 0012601 0 ustar 00 <?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
*
* @final
*/
class InstalledVersions
{
/**
* @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
* @internal
*/
private static $selfDir = null;
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
*/
private static $installed;
/**
* @var bool
*/
private static $installedIsLocalDir;
/**
* @var bool|null
*/
private static $canGetVendors;
/**
* @var array[]
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static $installedByVendor = array();
/**
* Returns a list of all package names which are present, either by being installed, replaced or provided
*
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
/**
* Returns a list of all package names with a specific type e.g. 'library'
*
* @param string $type
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackagesByType($type)
{
$packagesByType = array();
foreach (self::getInstalled() as $installed) {
foreach ($installed['versions'] as $name => $package) {
if (isset($package['type']) && $package['type'] === $type) {
$packagesByType[] = $name;
}
}
}
return $packagesByType;
}
/**
* Checks whether the given package is installed
*
* This also returns true if the package name is provided or replaced by another package
*
* @param string $packageName
* @param bool $includeDevRequirements
* @return bool
*/
public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}
return false;
}
/**
* Checks whether the given package satisfies a version constraint
*
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
*
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
*
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
* @param string $packageName
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
* @return bool
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
/**
* Returns a version constraint representing all the range(s) which are installed for a given package
*
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
* whether a given version of a package is installed, and not just whether it exists
*
* @param string $packageName
* @return string Version constraint usable with composer/semver
*/
public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}
return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
*/
public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}
return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
*/
public static function getInstallPath($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @return array
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
*/
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['root'];
}
/**
* Returns the raw installed.php data for custom implementations
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
*/
public static function getRawData()
{
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
return self::$installed;
}
/**
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
public static function getAllRawData()
{
return self::getInstalled();
}
/**
* Lets you reload the static array from another file
*
* This is only useful for complex integrations in which a project needs to use
* this class but then also needs to execute another project's autoloader in process,
* and wants to ensure both projects have access to their version of installed.php.
*
* A typical case would be PHPUnit, where it would need to make sure it reads all
* the data it needs from this class, then call reload() with
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
* the project in which it runs can then also use this class safely, without
* interference between PHPUnit's dependencies and the project's dependencies.
*
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
*/
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
// when using reload, we disable the duplicate protection to ensure that self::$installed data is
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
// so we have to assume it does not, and that may result in duplicate data being returned when listing
// all installed packages for example
self::$installedIsLocalDir = false;
}
/**
* @return string
*/
private static function getSelfDir()
{
if (self::$selfDir === null) {
self::$selfDir = strtr(__DIR__, '\\', '/');
}
return self::$selfDir;
}
/**
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
$copiedLocalDir = false;
if (self::$canGetVendors) {
$selfDir = self::getSelfDir();
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
$vendorDir = strtr($vendorDir, '\\', '/');
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
self::$installedByVendor[$vendorDir] = $required;
$installed[] = $required;
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
self::$installed = $required;
self::$installedIsLocalDir = true;
}
}
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
$copiedLocalDir = true;
}
}
}
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else {
self::$installed = array();
}
}
if (self::$installed !== array() && !$copiedLocalDir) {
$installed[] = self::$installed;
}
return $installed;
}
}
composer/LICENSE 0000644 00000002056 15153526733 0007415 0 ustar 00
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
composer/autoload_classmap.php 0000644 00000014376 15153526733 0012624 0 ustar 00 <?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'AIOSEO\\BrokenLinkChecker\\Admin\\Admin' => $baseDir . '/app/Admin/Admin.php',
'AIOSEO\\BrokenLinkChecker\\Admin\\License' => $baseDir . '/app/Admin/License.php',
'AIOSEO\\BrokenLinkChecker\\Admin\\Notices\\NotConnected' => $baseDir . '/app/Admin/Notices/NotConnected.php',
'AIOSEO\\BrokenLinkChecker\\Admin\\Notices\\Review' => $baseDir . '/app/Admin/Notices/Review.php',
'AIOSEO\\BrokenLinkChecker\\Admin\\Notifications' => $baseDir . '/app/Admin/Notifications.php',
'AIOSEO\\BrokenLinkChecker\\Api\\Api' => $baseDir . '/app/Api/Api.php',
'AIOSEO\\BrokenLinkChecker\\Api\\BrokenLinks' => $baseDir . '/app/Api/BrokenLinks.php',
'AIOSEO\\BrokenLinkChecker\\Api\\CommonTableActions' => $baseDir . '/app/Api/CommonTableActions.php',
'AIOSEO\\BrokenLinkChecker\\Api\\EditRow' => $baseDir . '/app/Api/EditRow.php',
'AIOSEO\\BrokenLinkChecker\\Api\\License' => $baseDir . '/app/Api/License.php',
'AIOSEO\\BrokenLinkChecker\\Api\\LinkStatusDetail' => $baseDir . '/app/Api/LinkStatusDetail.php',
'AIOSEO\\BrokenLinkChecker\\Api\\LinkStatusTable' => $baseDir . '/app/Api/LinkStatusTable.php',
'AIOSEO\\BrokenLinkChecker\\Api\\LinksTable' => $baseDir . '/app/Api/LinksTable.php',
'AIOSEO\\BrokenLinkChecker\\Api\\Notifications' => $baseDir . '/app/Api/Notifications.php',
'AIOSEO\\BrokenLinkChecker\\Api\\Plugins' => $baseDir . '/app/Api/Plugins.php',
'AIOSEO\\BrokenLinkChecker\\Api\\Post' => $baseDir . '/app/Api/Post.php',
'AIOSEO\\BrokenLinkChecker\\Api\\PostsTerms' => $baseDir . '/app/Api/PostsTerms.php',
'AIOSEO\\BrokenLinkChecker\\Api\\Redirects' => $baseDir . '/app/Api/Redirects.php',
'AIOSEO\\BrokenLinkChecker\\Api\\VueSettings' => $baseDir . '/app/Api/VueSettings.php',
'AIOSEO\\BrokenLinkChecker\\BrokenLinkChecker' => $baseDir . '/app/BrokenLinkChecker.php',
'AIOSEO\\BrokenLinkChecker\\Core\\Assets' => $baseDir . '/app/Core/Assets.php',
'AIOSEO\\BrokenLinkChecker\\Core\\Cache' => $baseDir . '/app/Core/Cache.php',
'AIOSEO\\BrokenLinkChecker\\Core\\Core' => $baseDir . '/app/Core/Core.php',
'AIOSEO\\BrokenLinkChecker\\Core\\Database' => $baseDir . '/app/Core/Database.php',
'AIOSEO\\BrokenLinkChecker\\Core\\Filesystem' => $baseDir . '/app/Core/Filesystem.php',
'AIOSEO\\BrokenLinkChecker\\Core\\NetworkCache' => $baseDir . '/app/Core/NetworkCache.php',
'AIOSEO\\BrokenLinkChecker\\Core\\Uninstall' => $baseDir . '/app/Core/Uninstall.php',
'AIOSEO\\BrokenLinkChecker\\LinkStatus\\Data' => $baseDir . '/app/LinkStatus/Data.php',
'AIOSEO\\BrokenLinkChecker\\LinkStatus\\LinkStatus' => $baseDir . '/app/LinkStatus/LinkStatus.php',
'AIOSEO\\BrokenLinkChecker\\Links\\Data' => $baseDir . '/app/Links/Data.php',
'AIOSEO\\BrokenLinkChecker\\Links\\Links' => $baseDir . '/app/Links/Links.php',
'AIOSEO\\BrokenLinkChecker\\Main\\Activate' => $baseDir . '/app/Main/Activate.php',
'AIOSEO\\BrokenLinkChecker\\Main\\Main' => $baseDir . '/app/Main/Main.php',
'AIOSEO\\BrokenLinkChecker\\Main\\Paragraph' => $baseDir . '/app/Main/Paragraph.php',
'AIOSEO\\BrokenLinkChecker\\Main\\PreUpdates' => $baseDir . '/app/Main/PreUpdates.php',
'AIOSEO\\BrokenLinkChecker\\Main\\Updates' => $baseDir . '/app/Main/Updates.php',
'AIOSEO\\BrokenLinkChecker\\Models\\Link' => $baseDir . '/app/Models/Link.php',
'AIOSEO\\BrokenLinkChecker\\Models\\LinkStatus' => $baseDir . '/app/Models/LinkStatus.php',
'AIOSEO\\BrokenLinkChecker\\Models\\Model' => $baseDir . '/app/Models/Model.php',
'AIOSEO\\BrokenLinkChecker\\Models\\Notification' => $baseDir . '/app/Models/Notification.php',
'AIOSEO\\BrokenLinkChecker\\Models\\Post' => $baseDir . '/app/Models/Post.php',
'AIOSEO\\BrokenLinkChecker\\Options\\Cache' => $baseDir . '/app/Options/Cache.php',
'AIOSEO\\BrokenLinkChecker\\Options\\InternalOptions' => $baseDir . '/app/Options/InternalOptions.php',
'AIOSEO\\BrokenLinkChecker\\Options\\Options' => $baseDir . '/app/Options/Options.php',
'AIOSEO\\BrokenLinkChecker\\Standalone\\Highlighter' => $baseDir . '/app/Standalone/Highlighter.php',
'AIOSEO\\BrokenLinkChecker\\Standalone\\SetupWizard' => $baseDir . '/app/Standalone/SetupWizard.php',
'AIOSEO\\BrokenLinkChecker\\Standalone\\Standalone' => $baseDir . '/app/Standalone/Standalone.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\Api' => $baseDir . '/app/Traits/Helpers/Api.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\Arrays' => $baseDir . '/app/Traits/Helpers/Arrays.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\Constants' => $baseDir . '/app/Traits/Helpers/Constants.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\DateTime' => $baseDir . '/app/Traits/Helpers/DateTime.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\Strings' => $baseDir . '/app/Traits/Helpers/Strings.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\ThirdParty' => $baseDir . '/app/Traits/Helpers/ThirdParty.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\Vue' => $baseDir . '/app/Traits/Helpers/Vue.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\Wp' => $baseDir . '/app/Traits/Helpers/Wp.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\WpContext' => $baseDir . '/app/Traits/Helpers/WpContext.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\WpMultisite' => $baseDir . '/app/Traits/Helpers/WpMultisite.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\WpUri' => $baseDir . '/app/Traits/Helpers/WpUri.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Options' => $baseDir . '/app/Traits/Options.php',
'AIOSEO\\BrokenLinkChecker\\Utils\\Access' => $baseDir . '/app/Utils/Access.php',
'AIOSEO\\BrokenLinkChecker\\Utils\\ActionScheduler' => $baseDir . '/app/Utils/ActionScheduler.php',
'AIOSEO\\BrokenLinkChecker\\Utils\\Helpers' => $baseDir . '/app/Utils/Helpers.php',
'AIOSEO\\BrokenLinkChecker\\Utils\\PluginUpgraderSilentAjax' => $baseDir . '/app/Utils/PluginUpgraderSilentAjax.php',
'AIOSEO\\BrokenLinkChecker\\Utils\\PluginUpgraderSkin' => $baseDir . '/app/Utils/PluginUpgraderSkin.php',
'AIOSEO\\BrokenLinkChecker\\Utils\\VueSettings' => $baseDir . '/app/Utils/VueSettings.php',
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
);
composer/autoload_namespaces.php 0000644 00000000213 15153526733 0013121 0 ustar 00 <?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
);
composer/autoload_psr4.php 0000644 00000000304 15153526733 0011673 0 ustar 00 <?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'AIOSEO\\BrokenLinkChecker\\' => array($baseDir . '/app'),
);
composer/autoload_real.php 0000644 00000002077 15153526733 0011737 0 ustar 00 <?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitea83457257a54dc833bf8ffd41c209c3
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitea83457257a54dc833bf8ffd41c209c3', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitea83457257a54dc833bf8ffd41c209c3', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitea83457257a54dc833bf8ffd41c209c3::getInitializer($loader));
$loader->register(true);
return $loader;
}
}
composer/autoload_static.php 0000644 00000017754 15153526733 0012313 0 ustar 00 <?php
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInitea83457257a54dc833bf8ffd41c209c3
{
public static $prefixLengthsPsr4 = array (
'A' =>
array (
'AIOSEO\\BrokenLinkChecker\\' => 25,
),
);
public static $prefixDirsPsr4 = array (
'AIOSEO\\BrokenLinkChecker\\' =>
array (
0 => __DIR__ . '/../..' . '/app',
),
);
public static $classMap = array (
'AIOSEO\\BrokenLinkChecker\\Admin\\Admin' => __DIR__ . '/../..' . '/app/Admin/Admin.php',
'AIOSEO\\BrokenLinkChecker\\Admin\\License' => __DIR__ . '/../..' . '/app/Admin/License.php',
'AIOSEO\\BrokenLinkChecker\\Admin\\Notices\\NotConnected' => __DIR__ . '/../..' . '/app/Admin/Notices/NotConnected.php',
'AIOSEO\\BrokenLinkChecker\\Admin\\Notices\\Review' => __DIR__ . '/../..' . '/app/Admin/Notices/Review.php',
'AIOSEO\\BrokenLinkChecker\\Admin\\Notifications' => __DIR__ . '/../..' . '/app/Admin/Notifications.php',
'AIOSEO\\BrokenLinkChecker\\Api\\Api' => __DIR__ . '/../..' . '/app/Api/Api.php',
'AIOSEO\\BrokenLinkChecker\\Api\\BrokenLinks' => __DIR__ . '/../..' . '/app/Api/BrokenLinks.php',
'AIOSEO\\BrokenLinkChecker\\Api\\CommonTableActions' => __DIR__ . '/../..' . '/app/Api/CommonTableActions.php',
'AIOSEO\\BrokenLinkChecker\\Api\\EditRow' => __DIR__ . '/../..' . '/app/Api/EditRow.php',
'AIOSEO\\BrokenLinkChecker\\Api\\License' => __DIR__ . '/../..' . '/app/Api/License.php',
'AIOSEO\\BrokenLinkChecker\\Api\\LinkStatusDetail' => __DIR__ . '/../..' . '/app/Api/LinkStatusDetail.php',
'AIOSEO\\BrokenLinkChecker\\Api\\LinkStatusTable' => __DIR__ . '/../..' . '/app/Api/LinkStatusTable.php',
'AIOSEO\\BrokenLinkChecker\\Api\\LinksTable' => __DIR__ . '/../..' . '/app/Api/LinksTable.php',
'AIOSEO\\BrokenLinkChecker\\Api\\Notifications' => __DIR__ . '/../..' . '/app/Api/Notifications.php',
'AIOSEO\\BrokenLinkChecker\\Api\\Plugins' => __DIR__ . '/../..' . '/app/Api/Plugins.php',
'AIOSEO\\BrokenLinkChecker\\Api\\Post' => __DIR__ . '/../..' . '/app/Api/Post.php',
'AIOSEO\\BrokenLinkChecker\\Api\\PostsTerms' => __DIR__ . '/../..' . '/app/Api/PostsTerms.php',
'AIOSEO\\BrokenLinkChecker\\Api\\Redirects' => __DIR__ . '/../..' . '/app/Api/Redirects.php',
'AIOSEO\\BrokenLinkChecker\\Api\\VueSettings' => __DIR__ . '/../..' . '/app/Api/VueSettings.php',
'AIOSEO\\BrokenLinkChecker\\BrokenLinkChecker' => __DIR__ . '/../..' . '/app/BrokenLinkChecker.php',
'AIOSEO\\BrokenLinkChecker\\Core\\Assets' => __DIR__ . '/../..' . '/app/Core/Assets.php',
'AIOSEO\\BrokenLinkChecker\\Core\\Cache' => __DIR__ . '/../..' . '/app/Core/Cache.php',
'AIOSEO\\BrokenLinkChecker\\Core\\Core' => __DIR__ . '/../..' . '/app/Core/Core.php',
'AIOSEO\\BrokenLinkChecker\\Core\\Database' => __DIR__ . '/../..' . '/app/Core/Database.php',
'AIOSEO\\BrokenLinkChecker\\Core\\Filesystem' => __DIR__ . '/../..' . '/app/Core/Filesystem.php',
'AIOSEO\\BrokenLinkChecker\\Core\\NetworkCache' => __DIR__ . '/../..' . '/app/Core/NetworkCache.php',
'AIOSEO\\BrokenLinkChecker\\Core\\Uninstall' => __DIR__ . '/../..' . '/app/Core/Uninstall.php',
'AIOSEO\\BrokenLinkChecker\\LinkStatus\\Data' => __DIR__ . '/../..' . '/app/LinkStatus/Data.php',
'AIOSEO\\BrokenLinkChecker\\LinkStatus\\LinkStatus' => __DIR__ . '/../..' . '/app/LinkStatus/LinkStatus.php',
'AIOSEO\\BrokenLinkChecker\\Links\\Data' => __DIR__ . '/../..' . '/app/Links/Data.php',
'AIOSEO\\BrokenLinkChecker\\Links\\Links' => __DIR__ . '/../..' . '/app/Links/Links.php',
'AIOSEO\\BrokenLinkChecker\\Main\\Activate' => __DIR__ . '/../..' . '/app/Main/Activate.php',
'AIOSEO\\BrokenLinkChecker\\Main\\Main' => __DIR__ . '/../..' . '/app/Main/Main.php',
'AIOSEO\\BrokenLinkChecker\\Main\\Paragraph' => __DIR__ . '/../..' . '/app/Main/Paragraph.php',
'AIOSEO\\BrokenLinkChecker\\Main\\PreUpdates' => __DIR__ . '/../..' . '/app/Main/PreUpdates.php',
'AIOSEO\\BrokenLinkChecker\\Main\\Updates' => __DIR__ . '/../..' . '/app/Main/Updates.php',
'AIOSEO\\BrokenLinkChecker\\Models\\Link' => __DIR__ . '/../..' . '/app/Models/Link.php',
'AIOSEO\\BrokenLinkChecker\\Models\\LinkStatus' => __DIR__ . '/../..' . '/app/Models/LinkStatus.php',
'AIOSEO\\BrokenLinkChecker\\Models\\Model' => __DIR__ . '/../..' . '/app/Models/Model.php',
'AIOSEO\\BrokenLinkChecker\\Models\\Notification' => __DIR__ . '/../..' . '/app/Models/Notification.php',
'AIOSEO\\BrokenLinkChecker\\Models\\Post' => __DIR__ . '/../..' . '/app/Models/Post.php',
'AIOSEO\\BrokenLinkChecker\\Options\\Cache' => __DIR__ . '/../..' . '/app/Options/Cache.php',
'AIOSEO\\BrokenLinkChecker\\Options\\InternalOptions' => __DIR__ . '/../..' . '/app/Options/InternalOptions.php',
'AIOSEO\\BrokenLinkChecker\\Options\\Options' => __DIR__ . '/../..' . '/app/Options/Options.php',
'AIOSEO\\BrokenLinkChecker\\Standalone\\Highlighter' => __DIR__ . '/../..' . '/app/Standalone/Highlighter.php',
'AIOSEO\\BrokenLinkChecker\\Standalone\\SetupWizard' => __DIR__ . '/../..' . '/app/Standalone/SetupWizard.php',
'AIOSEO\\BrokenLinkChecker\\Standalone\\Standalone' => __DIR__ . '/../..' . '/app/Standalone/Standalone.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\Api' => __DIR__ . '/../..' . '/app/Traits/Helpers/Api.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\Arrays' => __DIR__ . '/../..' . '/app/Traits/Helpers/Arrays.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\Constants' => __DIR__ . '/../..' . '/app/Traits/Helpers/Constants.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\DateTime' => __DIR__ . '/../..' . '/app/Traits/Helpers/DateTime.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\Strings' => __DIR__ . '/../..' . '/app/Traits/Helpers/Strings.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\ThirdParty' => __DIR__ . '/../..' . '/app/Traits/Helpers/ThirdParty.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\Vue' => __DIR__ . '/../..' . '/app/Traits/Helpers/Vue.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\Wp' => __DIR__ . '/../..' . '/app/Traits/Helpers/Wp.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\WpContext' => __DIR__ . '/../..' . '/app/Traits/Helpers/WpContext.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\WpMultisite' => __DIR__ . '/../..' . '/app/Traits/Helpers/WpMultisite.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Helpers\\WpUri' => __DIR__ . '/../..' . '/app/Traits/Helpers/WpUri.php',
'AIOSEO\\BrokenLinkChecker\\Traits\\Options' => __DIR__ . '/../..' . '/app/Traits/Options.php',
'AIOSEO\\BrokenLinkChecker\\Utils\\Access' => __DIR__ . '/../..' . '/app/Utils/Access.php',
'AIOSEO\\BrokenLinkChecker\\Utils\\ActionScheduler' => __DIR__ . '/../..' . '/app/Utils/ActionScheduler.php',
'AIOSEO\\BrokenLinkChecker\\Utils\\Helpers' => __DIR__ . '/../..' . '/app/Utils/Helpers.php',
'AIOSEO\\BrokenLinkChecker\\Utils\\PluginUpgraderSilentAjax' => __DIR__ . '/../..' . '/app/Utils/PluginUpgraderSilentAjax.php',
'AIOSEO\\BrokenLinkChecker\\Utils\\PluginUpgraderSkin' => __DIR__ . '/../..' . '/app/Utils/PluginUpgraderSkin.php',
'AIOSEO\\BrokenLinkChecker\\Utils\\VueSettings' => __DIR__ . '/../..' . '/app/Utils/VueSettings.php',
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
);
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitea83457257a54dc833bf8ffd41c209c3::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitea83457257a54dc833bf8ffd41c209c3::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitea83457257a54dc833bf8ffd41c209c3::$classMap;
}, null, ClassLoader::class);
}
}
composer/installed.json 0000644 00000004056 15153526733 0011264 0 ustar 00 {
"packages": [
{
"name": "woocommerce/action-scheduler",
"version": "3.9.2",
"version_normalized": "3.9.2.0",
"source": {
"type": "git",
"url": "https://github.com/woocommerce/action-scheduler.git",
"reference": "efbb7953f72a433086335b249292f280dd43ddfe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/woocommerce/action-scheduler/zipball/efbb7953f72a433086335b249292f280dd43ddfe",
"reference": "efbb7953f72a433086335b249292f280dd43ddfe",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"require-dev": {
"phpunit/phpunit": "^7.5",
"woocommerce/woocommerce-sniffs": "0.1.0",
"wp-cli/wp-cli": "~2.5.0",
"yoast/phpunit-polyfills": "^2.0"
},
"time": "2025-02-03T09:09:30+00:00",
"type": "wordpress-plugin",
"extra": {
"scripts-description": {
"test": "Run unit tests",
"phpcs": "Analyze code against the WordPress coding standards with PHP_CodeSniffer",
"phpcbf": "Fix coding standards warnings/errors automatically with PHP Code Beautifier"
}
},
"installation-source": "dist",
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-3.0-or-later"
],
"description": "Action Scheduler for WordPress and WooCommerce",
"homepage": "https://actionscheduler.org/",
"support": {
"issues": "https://github.com/woocommerce/action-scheduler/issues",
"source": "https://github.com/woocommerce/action-scheduler/tree/3.9.2"
},
"install-path": "../woocommerce/action-scheduler"
}
],
"dev": false,
"dev-package-names": []
}
composer/installed.php 0000644 00000002271 15153526733 0011077 0 ustar 00 <?php return array(
'root' => array(
'name' => 'awesomemotive/aioseo-broken-link-checker',
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => 'ffa7236a53bfd306572fd00fcda88192824b22c9',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev' => false,
),
'versions' => array(
'awesomemotive/aioseo-broken-link-checker' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => 'ffa7236a53bfd306572fd00fcda88192824b22c9',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'woocommerce/action-scheduler' => array(
'pretty_version' => '3.9.2',
'version' => '3.9.2.0',
'reference' => 'efbb7953f72a433086335b249292f280dd43ddfe',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../woocommerce/action-scheduler',
'aliases' => array(),
'dev_requirement' => false,
),
),
);
composer/installers/LICENSE 0000644 00000002046 15153526733 0011574 0 ustar 00 Copyright (c) 2012 Kyle Robinson Young
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. composer/installers/composer.json 0000644 00000005235 15153526733 0013314 0 ustar 00 {
"name": "composer/installers",
"type": "composer-plugin",
"license": "MIT",
"description": "A multi-framework Composer library installer",
"keywords": [
"installer",
"AGL",
"AnnotateCms",
"Attogram",
"Bitrix",
"CakePHP",
"Chef",
"Cockpit",
"CodeIgniter",
"concrete5",
"ConcreteCMS",
"Croogo",
"DokuWiki",
"Dolibarr",
"Drupal",
"Elgg",
"Eliasis",
"ExpressionEngine",
"eZ Platform",
"FuelPHP",
"Grav",
"Hurad",
"ImageCMS",
"iTop",
"Kanboard",
"Known",
"Kohana",
"Lan Management System",
"Laravel",
"Lavalite",
"Lithium",
"Magento",
"majima",
"Mako",
"MantisBT",
"Matomo",
"Mautic",
"Maya",
"MODX",
"MODX Evo",
"MediaWiki",
"Miaoxing",
"OXID",
"osclass",
"MODULEWork",
"Moodle",
"Pantheon",
"Piwik",
"pxcms",
"phpBB",
"Plentymarkets",
"PPI",
"Puppet",
"Porto",
"ProcessWire",
"RadPHP",
"ReIndex",
"Roundcube",
"shopware",
"SilverStripe",
"SMF",
"Starbug",
"SyDES",
"Sylius",
"TastyIgniter",
"Thelia",
"WHMCS",
"WolfCMS",
"WordPress",
"YAWIK",
"Zend",
"Zikula"
],
"homepage": "https://composer.github.io/installers/",
"authors": [
{
"name": "Kyle Robinson Young",
"email": "kyle@dontkry.com",
"homepage": "https://github.com/shama"
}
],
"autoload": {
"psr-4": { "Composer\\Installers\\": "src/Composer/Installers" }
},
"autoload-dev": {
"psr-4": { "Composer\\Installers\\Test\\": "tests/Composer/Installers/Test" }
},
"extra": {
"class": "Composer\\Installers\\Plugin",
"branch-alias": {
"dev-main": "2.x-dev"
},
"plugin-modifies-install-path": true
},
"require": {
"php": "^7.2 || ^8.0",
"composer-plugin-api": "^1.0 || ^2.0"
},
"require-dev": {
"composer/composer": "^1.10.27 || ^2.7",
"composer/semver": "^1.7.2 || ^3.4.0",
"symfony/phpunit-bridge": "^7.1.1",
"phpstan/phpstan": "^1.11",
"symfony/process": "^5 || ^6 || ^7",
"phpstan/phpstan-phpunit": "^1"
},
"scripts": {
"test": "@php vendor/bin/simple-phpunit",
"phpstan": "@php vendor/bin/phpstan analyse"
}
}
composer/installers/src/Composer/Installers/AglInstaller.php 0000644 00000000711 15153526733 0020354 0 ustar 00 <?php
namespace Composer\Installers;
class AglInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'More/{$name}/',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars($vars)
{
$vars['name'] = preg_replace_callback('/(?:^|_|-)(.?)/', function ($matches) {
return strtoupper($matches[1]);
}, $vars['name']);
return $vars;
}
}
composer/installers/src/Composer/Installers/AkauntingInstaller.php 0000644 00000001133 15153526733 0021571 0 ustar 00 <?php
namespace Composer\Installers;
class AkauntingInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'module' => 'modules/{$name}',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars(array $vars): array
{
$vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}
composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php 0000644 00000000436 15153526733 0022071 0 ustar 00 <?php
namespace Composer\Installers;
class AnnotateCmsInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'addons/modules/{$name}/',
'component' => 'addons/components/{$name}/',
'service' => 'addons/services/{$name}/',
);
}
composer/installers/src/Composer/Installers/AsgardInstaller.php 0000644 00000002456 15153526733 0021062 0 ustar 00 <?php
namespace Composer\Installers;
class AsgardInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'Modules/{$name}/',
'theme' => 'Themes/{$name}/'
);
/**
* Format package name.
*
* For package type asgard-module, cut off a trailing '-plugin' if present.
*
* For package type asgard-theme, cut off a trailing '-theme' if present.
*
*/
public function inflectPackageVars($vars)
{
if ($vars['type'] === 'asgard-module') {
return $this->inflectPluginVars($vars);
}
if ($vars['type'] === 'asgard-theme') {
return $this->inflectThemeVars($vars);
}
return $vars;
}
protected function inflectPluginVars($vars)
{
$vars['name'] = preg_replace('/-module$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
protected function inflectThemeVars($vars)
{
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}
composer/installers/src/Composer/Installers/AttogramInstaller.php 0000644 00000000251 15153526733 0021426 0 ustar 00 <?php
namespace Composer\Installers;
class AttogramInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'modules/{$name}/',
);
}
composer/installers/src/Composer/Installers/BaseInstaller.php 0000644 00000007753 15153526733 0020540 0 ustar 00 <?php
namespace Composer\Installers;
use Composer\IO\IOInterface;
use Composer\Composer;
use Composer\Package\PackageInterface;
abstract class BaseInstaller
{
protected $locations = array();
protected $composer;
protected $package;
protected $io;
/**
* Initializes base installer.
*
* @param PackageInterface $package
* @param Composer $composer
* @param IOInterface $io
*/
public function __construct(PackageInterface $package = null, Composer $composer = null, IOInterface $io = null)
{
$this->composer = $composer;
$this->package = $package;
$this->io = $io;
}
/**
* Return the install path based on package type.
*
* @param PackageInterface $package
* @param string $frameworkType
* @return string
*/
public function getInstallPath(PackageInterface $package, $frameworkType = '')
{
$type = $this->package->getType();
$prettyName = $this->package->getPrettyName();
if (strpos($prettyName, '/') !== false) {
list($vendor, $name) = explode('/', $prettyName);
} else {
$vendor = '';
$name = $prettyName;
}
$availableVars = $this->inflectPackageVars(compact('name', 'vendor', 'type'));
$extra = $package->getExtra();
if (!empty($extra['installer-name'])) {
$availableVars['name'] = $extra['installer-name'];
}
if ($this->composer->getPackage()) {
$extra = $this->composer->getPackage()->getExtra();
if (!empty($extra['installer-paths'])) {
$customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type, $vendor);
if ($customPath !== false) {
return $this->templatePath($customPath, $availableVars);
}
}
}
$packageType = substr($type, strlen($frameworkType) + 1);
$locations = $this->getLocations();
if (!isset($locations[$packageType])) {
throw new \InvalidArgumentException(sprintf('Package type "%s" is not supported', $type));
}
return $this->templatePath($locations[$packageType], $availableVars);
}
/**
* For an installer to override to modify the vars per installer.
*
* @param array<string, string> $vars This will normally receive array{name: string, vendor: string, type: string}
* @return array<string, string>
*/
public function inflectPackageVars($vars)
{
return $vars;
}
/**
* Gets the installer's locations
*
* @return array<string, string> map of package types => install path
*/
public function getLocations()
{
return $this->locations;
}
/**
* Replace vars in a path
*
* @param string $path
* @param array<string, string> $vars
* @return string
*/
protected function templatePath($path, array $vars = array())
{
if (strpos($path, '{') !== false) {
extract($vars);
preg_match_all('@\{\$([A-Za-z0-9_]*)\}@i', $path, $matches);
if (!empty($matches[1])) {
foreach ($matches[1] as $var) {
$path = str_replace('{$' . $var . '}', $$var, $path);
}
}
}
return $path;
}
/**
* Search through a passed paths array for a custom install path.
*
* @param array $paths
* @param string $name
* @param string $type
* @param string $vendor = NULL
* @return string|false
*/
protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL)
{
foreach ($paths as $path => $names) {
$names = (array) $names;
if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
return $path;
}
}
return false;
}
}
composer/installers/src/Composer/Installers/BitrixInstaller.php 0000644 00000010251 15153526733 0021112 0 ustar 00 <?php
namespace Composer\Installers;
use Composer\Util\Filesystem;
/**
* Installer for Bitrix Framework. Supported types of extensions:
* - `bitrix-d7-module` — copy the module to directory `bitrix/modules/<vendor>.<name>`.
* - `bitrix-d7-component` — copy the component to directory `bitrix/components/<vendor>/<name>`.
* - `bitrix-d7-template` — copy the template to directory `bitrix/templates/<vendor>_<name>`.
*
* You can set custom path to directory with Bitrix kernel in `composer.json`:
*
* ```json
* {
* "extra": {
* "bitrix-dir": "s1/bitrix"
* }
* }
* ```
*
* @author Nik Samokhvalov <nik@samokhvalov.info>
* @author Denis Kulichkin <onexhovia@gmail.com>
*/
class BitrixInstaller extends BaseInstaller
{
protected $locations = array(
'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
'theme' => '{$bitrix_dir}/templates/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
'd7-module' => '{$bitrix_dir}/modules/{$vendor}.{$name}/',
'd7-component' => '{$bitrix_dir}/components/{$vendor}/{$name}/',
'd7-template' => '{$bitrix_dir}/templates/{$vendor}_{$name}/',
);
/**
* @var array Storage for informations about duplicates at all the time of installation packages.
*/
private static $checkedDuplicates = array();
/**
* {@inheritdoc}
*/
public function inflectPackageVars($vars)
{
if ($this->composer->getPackage()) {
$extra = $this->composer->getPackage()->getExtra();
if (isset($extra['bitrix-dir'])) {
$vars['bitrix_dir'] = $extra['bitrix-dir'];
}
}
if (!isset($vars['bitrix_dir'])) {
$vars['bitrix_dir'] = 'bitrix';
}
return parent::inflectPackageVars($vars);
}
/**
* {@inheritdoc}
*/
protected function templatePath($path, array $vars = array())
{
$templatePath = parent::templatePath($path, $vars);
$this->checkDuplicates($templatePath, $vars);
return $templatePath;
}
/**
* Duplicates search packages.
*
* @param string $path
* @param array $vars
*/
protected function checkDuplicates($path, array $vars = array())
{
$packageType = substr($vars['type'], strlen('bitrix') + 1);
$localDir = explode('/', $vars['bitrix_dir']);
array_pop($localDir);
$localDir[] = 'local';
$localDir = implode('/', $localDir);
$oldPath = str_replace(
array('{$bitrix_dir}', '{$name}'),
array($localDir, $vars['name']),
$this->locations[$packageType]
);
if (in_array($oldPath, static::$checkedDuplicates)) {
return;
}
if ($oldPath !== $path && file_exists($oldPath) && $this->io && $this->io->isInteractive()) {
$this->io->writeError(' <error>Duplication of packages:</error>');
$this->io->writeError(' <info>Package ' . $oldPath . ' will be called instead package ' . $path . '</info>');
while (true) {
switch ($this->io->ask(' <info>Delete ' . $oldPath . ' [y,n,?]?</info> ', '?')) {
case 'y':
$fs = new Filesystem();
$fs->removeDirectory($oldPath);
break 2;
case 'n':
break 2;
case '?':
default:
$this->io->writeError(array(
' y - delete package ' . $oldPath . ' and to continue with the installation',
' n - don\'t delete and to continue with the installation',
));
$this->io->writeError(' ? - print help');
break;
}
}
}
static::$checkedDuplicates[] = $oldPath;
}
}
composer/installers/src/Composer/Installers/BonefishInstaller.php 0000644 00000000267 15153526733 0021414 0 ustar 00 <?php
namespace Composer\Installers;
class BonefishInstaller extends BaseInstaller
{
protected $locations = array(
'package' => 'Packages/{$vendor}/{$name}/'
);
}
composer/installers/src/Composer/Installers/BotbleInstaller.php 0000644 00000000417 15153526733 0021063 0 ustar 00 <?php
namespace Composer\Installers;
class BotbleInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'platform/plugins/{$name}/',
'theme' => 'platform/themes/{$name}/',
);
}
composer/installers/src/Composer/Installers/CakePHPInstaller.php 0000644 00000003446 15153526733 0021074 0 ustar 00 <?php
namespace Composer\Installers;
use Composer\DependencyResolver\Pool;
use Composer\Semver\Constraint\Constraint;
class CakePHPInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'Plugin/{$name}/',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars($vars)
{
if ($this->matchesCakeVersion('>=', '3.0.0')) {
return $vars;
}
$nameParts = explode('/', $vars['name']);
foreach ($nameParts as &$value) {
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
$value = str_replace(array('-', '_'), ' ', $value);
$value = str_replace(' ', '', ucwords($value));
}
$vars['name'] = implode('/', $nameParts);
return $vars;
}
/**
* Change the default plugin location when cakephp >= 3.0
*/
public function getLocations()
{
if ($this->matchesCakeVersion('>=', '3.0.0')) {
$this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
}
return $this->locations;
}
/**
* Check if CakePHP version matches against a version
*
* @param string $matcher
* @param string $version
* @return bool
* @phpstan-param Constraint::STR_OP_* $matcher
*/
protected function matchesCakeVersion($matcher, $version)
{
$repositoryManager = $this->composer->getRepositoryManager();
if (! $repositoryManager) {
return false;
}
$repos = $repositoryManager->getLocalRepository();
if (!$repos) {
return false;
}
return $repos->findPackage('cakephp/cakephp', new Constraint($matcher, $version)) !== null;
}
}
composer/installers/src/Composer/Installers/ChefInstaller.php 0000644 00000000336 15153526733 0020521 0 ustar 00 <?php
namespace Composer\Installers;
class ChefInstaller extends BaseInstaller
{
protected $locations = array(
'cookbook' => 'Chef/{$vendor}/{$name}/',
'role' => 'Chef/roles/{$name}/',
);
}
composer/installers/src/Composer/Installers/CiviCrmInstaller.php 0000644 00000000243 15153526733 0021205 0 ustar 00 <?php
namespace Composer\Installers;
class CiviCrmInstaller extends BaseInstaller
{
protected $locations = array(
'ext' => 'ext/{$name}/'
);
}
composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php 0000644 00000000326 15153526733 0023221 0 ustar 00 <?php
namespace Composer\Installers;
class ClanCatsFrameworkInstaller extends BaseInstaller
{
protected $locations = array(
'ship' => 'CCF/orbit/{$name}/',
'theme' => 'CCF/app/themes/{$name}/',
);
} composer/installers/src/Composer/Installers/CockpitInstaller.php 0000644 00000001231 15153526733 0021243 0 ustar 00 <?php
namespace Composer\Installers;
class CockpitInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'cockpit/modules/addons/{$name}/',
);
/**
* Format module name.
*
* Strip `module-` prefix from package name.
*
* {@inheritDoc}
*/
public function inflectPackageVars($vars)
{
if ($vars['type'] == 'cockpit-module') {
return $this->inflectModuleVars($vars);
}
return $vars;
}
public function inflectModuleVars($vars)
{
$vars['name'] = ucfirst(preg_replace('/cockpit-/i', '', $vars['name']));
return $vars;
}
}
composer/installers/src/Composer/Installers/CodeIgniterInstaller.php 0000644 00000000465 15153526733 0022053 0 ustar 00 <?php
namespace Composer\Installers;
class CodeIgniterInstaller extends BaseInstaller
{
protected $locations = array(
'library' => 'application/libraries/{$name}/',
'third-party' => 'application/third_party/{$name}/',
'module' => 'application/modules/{$name}/',
);
}
composer/installers/src/Composer/Installers/Concrete5Installer.php 0000644 00000000556 15153526733 0021507 0 ustar 00 <?php
namespace Composer\Installers;
class Concrete5Installer extends BaseInstaller
{
protected $locations = array(
'core' => 'concrete/',
'block' => 'application/blocks/{$name}/',
'package' => 'packages/{$name}/',
'theme' => 'application/themes/{$name}/',
'update' => 'updates/{$name}/',
);
}
composer/installers/src/Composer/Installers/ConcreteCMSInstaller.php 0000644 00000000627 15153526733 0021764 0 ustar 00 <?php
namespace Composer\Installers;
class ConcreteCMSInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'core' => 'concrete/',
'block' => 'application/blocks/{$name}/',
'package' => 'packages/{$name}/',
'theme' => 'application/themes/{$name}/',
'update' => 'updates/{$name}/',
);
}
composer/installers/src/Composer/Installers/CroogoInstaller.php 0000644 00000000767 15153526733 0021114 0 ustar 00 <?php
namespace Composer\Installers;
class CroogoInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'Plugin/{$name}/',
'theme' => 'View/Themed/{$name}/',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars($vars)
{
$vars['name'] = strtolower(str_replace(array('-', '_'), ' ', $vars['name']));
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}
composer/installers/src/Composer/Installers/DecibelInstaller.php 0000644 00000000272 15153526733 0021202 0 ustar 00 <?php
namespace Composer\Installers;
class DecibelInstaller extends BaseInstaller
{
/** @var array */
protected $locations = array(
'app' => 'app/{$name}/',
);
}
composer/installers/src/Composer/Installers/DframeInstaller.php 0000644 00000000263 15153526733 0021051 0 ustar 00 <?php
namespace Composer\Installers;
class DframeInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'modules/{$vendor}/{$name}/',
);
}
composer/installers/src/Composer/Installers/DokuWikiInstaller.php 0000644 00000002354 15153526733 0021404 0 ustar 00 <?php
namespace Composer\Installers;
class DokuWikiInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'lib/plugins/{$name}/',
'template' => 'lib/tpl/{$name}/',
);
/**
* Format package name.
*
* For package type dokuwiki-plugin, cut off a trailing '-plugin',
* or leading dokuwiki_ if present.
*
* For package type dokuwiki-template, cut off a trailing '-template' if present.
*
*/
public function inflectPackageVars($vars)
{
if ($vars['type'] === 'dokuwiki-plugin') {
return $this->inflectPluginVars($vars);
}
if ($vars['type'] === 'dokuwiki-template') {
return $this->inflectTemplateVars($vars);
}
return $vars;
}
protected function inflectPluginVars($vars)
{
$vars['name'] = preg_replace('/-plugin$/', '', $vars['name']);
$vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
return $vars;
}
protected function inflectTemplateVars($vars)
{
$vars['name'] = preg_replace('/-template$/', '', $vars['name']);
$vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
return $vars;
}
}
composer/installers/src/Composer/Installers/DolibarrInstaller.php 0000644 00000000542 15153526733 0021411 0 ustar 00 <?php
namespace Composer\Installers;
/**
* Class DolibarrInstaller
*
* @package Composer\Installers
* @author Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*/
class DolibarrInstaller extends BaseInstaller
{
//TODO: Add support for scripts and themes
protected $locations = array(
'module' => 'htdocs/custom/{$name}/',
);
}
composer/installers/src/Composer/Installers/DrupalInstaller.php 0000644 00000001543 15153526733 0021104 0 ustar 00 <?php
namespace Composer\Installers;
class DrupalInstaller extends BaseInstaller
{
protected $locations = array(
'core' => 'core/',
'module' => 'modules/{$name}/',
'theme' => 'themes/{$name}/',
'library' => 'libraries/{$name}/',
'profile' => 'profiles/{$name}/',
'database-driver' => 'drivers/lib/Drupal/Driver/Database/{$name}/',
'drush' => 'drush/{$name}/',
'custom-theme' => 'themes/custom/{$name}/',
'custom-module' => 'modules/custom/{$name}/',
'custom-profile' => 'profiles/custom/{$name}/',
'drupal-multisite' => 'sites/{$name}/',
'console' => 'console/{$name}/',
'console-language' => 'console/language/{$name}/',
'config' => 'config/sync/',
);
}
composer/installers/src/Composer/Installers/ElggInstaller.php 0000644 00000000241 15153526733 0020525 0 ustar 00 <?php
namespace Composer\Installers;
class ElggInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'mod/{$name}/',
);
}
composer/installers/src/Composer/Installers/EliasisInstaller.php 0000644 00000000461 15153526733 0021244 0 ustar 00 <?php
namespace Composer\Installers;
class EliasisInstaller extends BaseInstaller
{
protected $locations = array(
'component' => 'components/{$name}/',
'module' => 'modules/{$name}/',
'plugin' => 'plugins/{$name}/',
'template' => 'templates/{$name}/',
);
}
composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php 0000644 00000001334 15153526733 0023140 0 ustar 00 <?php
namespace Composer\Installers;
use Composer\Package\PackageInterface;
class ExpressionEngineInstaller extends BaseInstaller
{
protected $locations = array();
private $ee2Locations = array(
'addon' => 'system/expressionengine/third_party/{$name}/',
'theme' => 'themes/third_party/{$name}/',
);
private $ee3Locations = array(
'addon' => 'system/user/addons/{$name}/',
'theme' => 'themes/user/{$name}/',
);
public function getInstallPath(PackageInterface $package, $frameworkType = '')
{
$version = "{$frameworkType}Locations";
$this->locations = $this->$version;
return parent::getInstallPath($package, $frameworkType);
}
}
composer/installers/src/Composer/Installers/EzPlatformInstaller.php 0000644 00000000354 15153526733 0021737 0 ustar 00 <?php
namespace Composer\Installers;
class EzPlatformInstaller extends BaseInstaller
{
protected $locations = array(
'meta-assets' => 'web/assets/ezplatform/',
'assets' => 'web/assets/ezplatform/{$name}/',
);
}
composer/installers/src/Composer/Installers/ForkCMSInstaller.php 0000644 00000003460 15153526733 0021121 0 ustar 00 <?php
namespace Composer\Installers;
class ForkCMSInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = [
'module' => 'src/Modules/{$name}/',
'theme' => 'src/Themes/{$name}/'
];
/**
* Format package name.
*
* For package type fork-cms-module, cut off a trailing '-plugin' if present.
*
* For package type fork-cms-theme, cut off a trailing '-theme' if present.
*/
public function inflectPackageVars(array $vars): array
{
if ($vars['type'] === 'fork-cms-module') {
return $this->inflectModuleVars($vars);
}
if ($vars['type'] === 'fork-cms-theme') {
return $this->inflectThemeVars($vars);
}
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectModuleVars(array $vars): array
{
$vars['name'] = $this->pregReplace('/^fork-cms-|-module|ForkCMS|ForkCms|Forkcms|forkcms|Module$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); // replace hyphens with spaces
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); // make module name camelcased
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectThemeVars(array $vars): array
{
$vars['name'] = $this->pregReplace('/^fork-cms-|-theme|ForkCMS|ForkCms|Forkcms|forkcms|Theme$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); // replace hyphens with spaces
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); // make theme name camelcased
return $vars;
}
}
composer/installers/src/Composer/Installers/FuelInstaller.php 0000644 00000000417 15153526733 0020547 0 ustar 00 <?php
namespace Composer\Installers;
class FuelInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'fuel/app/modules/{$name}/',
'package' => 'fuel/packages/{$name}/',
'theme' => 'fuel/app/themes/{$name}/',
);
}
composer/installers/src/Composer/Installers/FuelphpInstaller.php 0000644 00000000257 15153526733 0021261 0 ustar 00 <?php
namespace Composer\Installers;
class FuelphpInstaller extends BaseInstaller
{
protected $locations = array(
'component' => 'components/{$name}/',
);
}
composer/installers/src/Composer/Installers/GravInstaller.php 0000644 00000001274 15153526733 0020555 0 ustar 00 <?php
namespace Composer\Installers;
class GravInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'user/plugins/{$name}/',
'theme' => 'user/themes/{$name}/',
);
/**
* Format package name
*
* @param array $vars
*
* @return array
*/
public function inflectPackageVars($vars)
{
$restrictedWords = implode('|', array_keys($this->locations));
$vars['name'] = strtolower($vars['name']);
$vars['name'] = preg_replace('/^(?:grav-)?(?:(?:'.$restrictedWords.')-)?(.*?)(?:-(?:'.$restrictedWords.'))?$/ui',
'$1',
$vars['name']
);
return $vars;
}
}
composer/installers/src/Composer/Installers/HuradInstaller.php 0000644 00000001276 15153526733 0020723 0 ustar 00 <?php
namespace Composer\Installers;
class HuradInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'plugins/{$name}/',
'theme' => 'plugins/{$name}/',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars($vars)
{
$nameParts = explode('/', $vars['name']);
foreach ($nameParts as &$value) {
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
$value = str_replace(array('-', '_'), ' ', $value);
$value = str_replace(' ', '', ucwords($value));
}
$vars['name'] = implode('/', $nameParts);
return $vars;
}
}
composer/installers/src/Composer/Installers/ImageCMSInstaller.php 0000644 00000000444 15153526733 0021241 0 ustar 00 <?php
namespace Composer\Installers;
class ImageCMSInstaller extends BaseInstaller
{
protected $locations = array(
'template' => 'templates/{$name}/',
'module' => 'application/modules/{$name}/',
'library' => 'application/libraries/{$name}/',
);
}
composer/installers/src/Composer/Installers/Installer.php 0000644 00000024372 15153526733 0017741 0 ustar 00 <?php
namespace Composer\Installers;
use Composer\Composer;
use Composer\Installer\BinaryInstaller;
use Composer\Installer\LibraryInstaller;
use Composer\IO\IOInterface;
use Composer\Package\PackageInterface;
use Composer\Repository\InstalledRepositoryInterface;
use Composer\Util\Filesystem;
use React\Promise\PromiseInterface;
class Installer extends LibraryInstaller
{
/**
* Package types to installer class map
*
* @var array
*/
private $supportedTypes = array(
'aimeos' => 'AimeosInstaller',
'asgard' => 'AsgardInstaller',
'attogram' => 'AttogramInstaller',
'agl' => 'AglInstaller',
'annotatecms' => 'AnnotateCmsInstaller',
'bitrix' => 'BitrixInstaller',
'bonefish' => 'BonefishInstaller',
'cakephp' => 'CakePHPInstaller',
'chef' => 'ChefInstaller',
'civicrm' => 'CiviCrmInstaller',
'ccframework' => 'ClanCatsFrameworkInstaller',
'cockpit' => 'CockpitInstaller',
'codeigniter' => 'CodeIgniterInstaller',
'concrete5' => 'Concrete5Installer',
'craft' => 'CraftInstaller',
'croogo' => 'CroogoInstaller',
'dframe' => 'DframeInstaller',
'dokuwiki' => 'DokuWikiInstaller',
'dolibarr' => 'DolibarrInstaller',
'decibel' => 'DecibelInstaller',
'drupal' => 'DrupalInstaller',
'elgg' => 'ElggInstaller',
'eliasis' => 'EliasisInstaller',
'ee3' => 'ExpressionEngineInstaller',
'ee2' => 'ExpressionEngineInstaller',
'ezplatform' => 'EzPlatformInstaller',
'fuel' => 'FuelInstaller',
'fuelphp' => 'FuelphpInstaller',
'grav' => 'GravInstaller',
'hurad' => 'HuradInstaller',
'tastyigniter' => 'TastyIgniterInstaller',
'imagecms' => 'ImageCMSInstaller',
'itop' => 'ItopInstaller',
'joomla' => 'JoomlaInstaller',
'kanboard' => 'KanboardInstaller',
'kirby' => 'KirbyInstaller',
'known' => 'KnownInstaller',
'kodicms' => 'KodiCMSInstaller',
'kohana' => 'KohanaInstaller',
'lms' => 'LanManagementSystemInstaller',
'laravel' => 'LaravelInstaller',
'lavalite' => 'LavaLiteInstaller',
'lithium' => 'LithiumInstaller',
'magento' => 'MagentoInstaller',
'majima' => 'MajimaInstaller',
'mantisbt' => 'MantisBTInstaller',
'mako' => 'MakoInstaller',
'maya' => 'MayaInstaller',
'mautic' => 'MauticInstaller',
'mediawiki' => 'MediaWikiInstaller',
'miaoxing' => 'MiaoxingInstaller',
'microweber' => 'MicroweberInstaller',
'modulework' => 'MODULEWorkInstaller',
'modx' => 'ModxInstaller',
'modxevo' => 'MODXEvoInstaller',
'moodle' => 'MoodleInstaller',
'october' => 'OctoberInstaller',
'ontowiki' => 'OntoWikiInstaller',
'oxid' => 'OxidInstaller',
'osclass' => 'OsclassInstaller',
'pxcms' => 'PxcmsInstaller',
'phpbb' => 'PhpBBInstaller',
'pimcore' => 'PimcoreInstaller',
'piwik' => 'PiwikInstaller',
'plentymarkets'=> 'PlentymarketsInstaller',
'ppi' => 'PPIInstaller',
'puppet' => 'PuppetInstaller',
'radphp' => 'RadPHPInstaller',
'phifty' => 'PhiftyInstaller',
'porto' => 'PortoInstaller',
'processwire' => 'ProcessWireInstaller',
'quicksilver' => 'PantheonInstaller',
'redaxo' => 'RedaxoInstaller',
'redaxo5' => 'Redaxo5Installer',
'reindex' => 'ReIndexInstaller',
'roundcube' => 'RoundcubeInstaller',
'shopware' => 'ShopwareInstaller',
'sitedirect' => 'SiteDirectInstaller',
'silverstripe' => 'SilverStripeInstaller',
'smf' => 'SMFInstaller',
'starbug' => 'StarbugInstaller',
'sydes' => 'SyDESInstaller',
'sylius' => 'SyliusInstaller',
'symfony1' => 'Symfony1Installer',
'tao' => 'TaoInstaller',
'thelia' => 'TheliaInstaller',
'tusk' => 'TuskInstaller',
'typo3-cms' => 'TYPO3CmsInstaller',
'typo3-flow' => 'TYPO3FlowInstaller',
'userfrosting' => 'UserFrostingInstaller',
'vanilla' => 'VanillaInstaller',
'whmcs' => 'WHMCSInstaller',
'winter' => 'WinterInstaller',
'wolfcms' => 'WolfCMSInstaller',
'wordpress' => 'WordPressInstaller',
'yawik' => 'YawikInstaller',
'zend' => 'ZendInstaller',
'zikula' => 'ZikulaInstaller',
'prestashop' => 'PrestashopInstaller'
);
/**
* Installer constructor.
*
* Disables installers specified in main composer extra installer-disable
* list
*
* @param IOInterface $io
* @param Composer $composer
* @param string $type
* @param Filesystem|null $filesystem
* @param BinaryInstaller|null $binaryInstaller
*/
public function __construct(
IOInterface $io,
Composer $composer,
$type = 'library',
Filesystem $filesystem = null,
BinaryInstaller $binaryInstaller = null
) {
parent::__construct($io, $composer, $type, $filesystem,
$binaryInstaller);
$this->removeDisabledInstallers();
}
/**
* {@inheritDoc}
*/
public function getInstallPath(PackageInterface $package)
{
$type = $package->getType();
$frameworkType = $this->findFrameworkType($type);
if ($frameworkType === false) {
throw new \InvalidArgumentException(
'Sorry the package type of this package is not yet supported.'
);
}
$class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
$installer = new $class($package, $this->composer, $this->getIO());
return $installer->getInstallPath($package, $frameworkType);
}
public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
{
$installPath = $this->getPackageBasePath($package);
$io = $this->io;
$outputStatus = function () use ($io, $installPath) {
$io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
};
$promise = parent::uninstall($repo, $package);
// Composer v2 might return a promise here
if ($promise instanceof PromiseInterface) {
return $promise->then($outputStatus);
}
// If not, execute the code right away as parent::uninstall executed synchronously (composer v1, or v2 without async)
$outputStatus();
return null;
}
/**
* {@inheritDoc}
*/
public function supports($packageType)
{
$frameworkType = $this->findFrameworkType($packageType);
if ($frameworkType === false) {
return false;
}
$locationPattern = $this->getLocationPattern($frameworkType);
return preg_match('#' . $frameworkType . '-' . $locationPattern . '#', $packageType, $matches) === 1;
}
/**
* Finds a supported framework type if it exists and returns it
*
* @param string $type
* @return string|false
*/
protected function findFrameworkType($type)
{
krsort($this->supportedTypes);
foreach ($this->supportedTypes as $key => $val) {
if ($key === substr($type, 0, strlen($key))) {
return substr($type, 0, strlen($key));
}
}
return false;
}
/**
* Get the second part of the regular expression to check for support of a
* package type
*
* @param string $frameworkType
* @return string
*/
protected function getLocationPattern($frameworkType)
{
$pattern = false;
if (!empty($this->supportedTypes[$frameworkType])) {
$frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
/** @var BaseInstaller $framework */
$framework = new $frameworkClass(null, $this->composer, $this->getIO());
$locations = array_keys($framework->getLocations());
$pattern = $locations ? '(' . implode('|', $locations) . ')' : false;
}
return $pattern ? : '(\w+)';
}
/**
* Get I/O object
*
* @return IOInterface
*/
private function getIO()
{
return $this->io;
}
/**
* Look for installers set to be disabled in composer's extra config and
* remove them from the list of supported installers.
*
* Globals:
* - true, "all", and "*" - disable all installers.
* - false - enable all installers (useful with
* wikimedia/composer-merge-plugin or similar)
*
* @return void
*/
protected function removeDisabledInstallers()
{
$extra = $this->composer->getPackage()->getExtra();
if (!isset($extra['installer-disable']) || $extra['installer-disable'] === false) {
// No installers are disabled
return;
}
// Get installers to disable
$disable = $extra['installer-disable'];
// Ensure $disabled is an array
if (!is_array($disable)) {
$disable = array($disable);
}
// Check which installers should be disabled
$all = array(true, "all", "*");
$intersect = array_intersect($all, $disable);
if (!empty($intersect)) {
// Disable all installers
$this->supportedTypes = array();
} else {
// Disable specified installers
foreach ($disable as $key => $installer) {
if (is_string($installer) && key_exists($installer, $this->supportedTypes)) {
unset($this->supportedTypes[$installer]);
}
}
}
}
}
composer/installers/src/Composer/Installers/ItopInstaller.php 0000644 00000000256 15153526733 0020570 0 ustar 00 <?php
namespace Composer\Installers;
class ItopInstaller extends BaseInstaller
{
protected $locations = array(
'extension' => 'extensions/{$name}/',
);
}
composer/installers/src/Composer/Installers/KanboardInstaller.php 0000644 00000000450 15153526733 0021372 0 ustar 00 <?php
namespace Composer\Installers;
/**
*
* Installer for kanboard plugins
*
* kanboard.net
*
* Class KanboardInstaller
* @package Composer\Installers
*/
class KanboardInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
}
composer/installers/src/Composer/Installers/KnownInstaller.php 0000644 00000000411 15153526733 0020742 0 ustar 00 <?php
namespace Composer\Installers;
class KnownInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'IdnoPlugins/{$name}/',
'theme' => 'Themes/{$name}/',
'console' => 'ConsolePlugins/{$name}/',
);
}
composer/installers/src/Composer/Installers/KodiCMSInstaller.php 0000644 00000000333 15153526733 0021102 0 ustar 00 <?php
namespace Composer\Installers;
class KodiCMSInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'cms/plugins/{$name}/',
'media' => 'cms/media/vendor/{$name}/'
);
} composer/installers/src/Composer/Installers/KohanaInstaller.php 0000644 00000000247 15153526733 0021056 0 ustar 00 <?php
namespace Composer\Installers;
class KohanaInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'modules/{$name}/',
);
}
composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php 0000644 00000001326 15153526733 0023570 0 ustar 00 <?php
namespace Composer\Installers;
class LanManagementSystemInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'plugins/{$name}/',
'template' => 'templates/{$name}/',
'document-template' => 'documents/templates/{$name}/',
'userpanel-module' => 'userpanel/modules/{$name}/',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars($vars)
{
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}
composer/installers/src/Composer/Installers/LaravelInstaller.php 0000644 00000000253 15153526733 0021240 0 ustar 00 <?php
namespace Composer\Installers;
class LaravelInstaller extends BaseInstaller
{
protected $locations = array(
'library' => 'libraries/{$name}/',
);
}
composer/installers/src/Composer/Installers/LavaLiteInstaller.php 0000644 00000000344 15153526733 0021354 0 ustar 00 <?php
namespace Composer\Installers;
class LavaLiteInstaller extends BaseInstaller
{
protected $locations = array(
'package' => 'packages/{$vendor}/{$name}/',
'theme' => 'public/themes/{$name}/',
);
}
composer/installers/src/Composer/Installers/LithiumInstaller.php 0000644 00000000336 15153526733 0021267 0 ustar 00 <?php
namespace Composer\Installers;
class LithiumInstaller extends BaseInstaller
{
protected $locations = array(
'library' => 'libraries/{$name}/',
'source' => 'libraries/_source/{$name}/',
);
}
composer/installers/src/Composer/Installers/MODULEWorkInstaller.php 0000644 00000000256 15153526733 0021505 0 ustar 00 <?php
namespace Composer\Installers;
class MODULEWorkInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'modules/{$name}/',
);
}
composer/installers/src/Composer/Installers/MODXEvoInstaller.php 0000644 00000000741 15153526733 0021075 0 ustar 00 <?php
namespace Composer\Installers;
/**
* An installer to handle MODX Evolution specifics when installing packages.
*/
class MODXEvoInstaller extends BaseInstaller
{
protected $locations = array(
'snippet' => 'assets/snippets/{$name}/',
'plugin' => 'assets/plugins/{$name}/',
'module' => 'assets/modules/{$name}/',
'template' => 'assets/templates/{$name}/',
'lib' => 'assets/lib/{$name}/'
);
}
composer/installers/src/Composer/Installers/MagentoInstaller.php 0000644 00000000421 15153526733 0021241 0 ustar 00 <?php
namespace Composer\Installers;
class MagentoInstaller extends BaseInstaller
{
protected $locations = array(
'theme' => 'app/design/frontend/{$name}/',
'skin' => 'skin/frontend/default/{$name}/',
'library' => 'lib/{$name}/',
);
}
composer/installers/src/Composer/Installers/MajimaInstaller.php 0000644 00000001502 15153526733 0021046 0 ustar 00 <?php
namespace Composer\Installers;
/**
* Plugin/theme installer for majima
* @author David Neustadt
*/
class MajimaInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
/**
* Transforms the names
* @param array $vars
* @return array
*/
public function inflectPackageVars($vars)
{
return $this->correctPluginName($vars);
}
/**
* Change hyphenated names to camelcase
* @param array $vars
* @return array
*/
private function correctPluginName($vars)
{
$camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
return strtoupper($matches[0][1]);
}, $vars['name']);
$vars['name'] = ucfirst($camelCasedName);
return $vars;
}
}
composer/installers/src/Composer/Installers/MakoInstaller.php 0000644 00000000253 15153526733 0020541 0 ustar 00 <?php
namespace Composer\Installers;
class MakoInstaller extends BaseInstaller
{
protected $locations = array(
'package' => 'app/packages/{$name}/',
);
}
composer/installers/src/Composer/Installers/MantisBTInstaller.php 0000644 00000001110 15153526733 0021324 0 ustar 00 <?php
namespace Composer\Installers;
use Composer\DependencyResolver\Pool;
class MantisBTInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars($vars)
{
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}
composer/installers/src/Composer/Installers/MatomoInstaller.php 0000644 00000001235 15153526733 0021107 0 ustar 00 <?php
namespace Composer\Installers;
/**
* Class MatomoInstaller
*
* @package Composer\Installers
*/
class MatomoInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars(array $vars): array
{
$vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}
composer/installers/src/Composer/Installers/MauticInstaller.php 0000644 00000002225 15153526733 0021075 0 ustar 00 <?php
namespace Composer\Installers;
use Composer\Package\PackageInterface;
class MauticInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'plugins/{$name}/',
'theme' => 'themes/{$name}/',
'core' => 'app/',
);
private function getDirectoryName()
{
$extra = $this->package->getExtra();
if (!empty($extra['install-directory-name'])) {
return $extra['install-directory-name'];
}
return $this->toCamelCase($this->package->getPrettyName());
}
/**
* @param string $packageName
*
* @return string
*/
private function toCamelCase($packageName)
{
return str_replace(' ', '', ucwords(str_replace('-', ' ', basename($packageName))));
}
/**
* Format package name of mautic-plugins to CamelCase
*/
public function inflectPackageVars($vars)
{
if ($vars['type'] == 'mautic-plugin' || $vars['type'] == 'mautic-theme') {
$directoryName = $this->getDirectoryName();
$vars['name'] = $directoryName;
}
return $vars;
}
}
composer/installers/src/Composer/Installers/MayaInstaller.php 0000644 00000001427 15153526733 0020545 0 ustar 00 <?php
namespace Composer\Installers;
class MayaInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'modules/{$name}/',
);
/**
* Format package name.
*
* For package type maya-module, cut off a trailing '-module' if present.
*
*/
public function inflectPackageVars($vars)
{
if ($vars['type'] === 'maya-module') {
return $this->inflectModuleVars($vars);
}
return $vars;
}
protected function inflectModuleVars($vars)
{
$vars['name'] = preg_replace('/-module$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}
composer/installers/src/Composer/Installers/MediaWikiInstaller.php 0000644 00000002422 15153526733 0021515 0 ustar 00 <?php
namespace Composer\Installers;
class MediaWikiInstaller extends BaseInstaller
{
protected $locations = array(
'core' => 'core/',
'extension' => 'extensions/{$name}/',
'skin' => 'skins/{$name}/',
);
/**
* Format package name.
*
* For package type mediawiki-extension, cut off a trailing '-extension' if present and transform
* to CamelCase keeping existing uppercase chars.
*
* For package type mediawiki-skin, cut off a trailing '-skin' if present.
*
*/
public function inflectPackageVars($vars)
{
if ($vars['type'] === 'mediawiki-extension') {
return $this->inflectExtensionVars($vars);
}
if ($vars['type'] === 'mediawiki-skin') {
return $this->inflectSkinVars($vars);
}
return $vars;
}
protected function inflectExtensionVars($vars)
{
$vars['name'] = preg_replace('/-extension$/', '', $vars['name']);
$vars['name'] = str_replace('-', ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
protected function inflectSkinVars($vars)
{
$vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
return $vars;
}
}
composer/installers/src/Composer/Installers/MiaoxingInstaller.php 0000644 00000000252 15153526733 0021424 0 ustar 00 <?php
namespace Composer\Installers;
class MiaoxingInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
}
composer/installers/src/Composer/Installers/MicroweberInstaller.php 0000644 00000010340 15153526733 0021746 0 ustar 00 <?php
namespace Composer\Installers;
class MicroweberInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'userfiles/modules/{$install_item_dir}/',
'module-skin' => 'userfiles/modules/{$install_item_dir}/templates/',
'template' => 'userfiles/templates/{$install_item_dir}/',
'element' => 'userfiles/elements/{$install_item_dir}/',
'vendor' => 'vendor/{$install_item_dir}/',
'components' => 'components/{$install_item_dir}/'
);
/**
* Format package name.
*
* For package type microweber-module, cut off a trailing '-module' if present
*
* For package type microweber-template, cut off a trailing '-template' if present.
*
*/
public function inflectPackageVars($vars)
{
if ($this->package->getTargetDir()) {
$vars['install_item_dir'] = $this->package->getTargetDir();
} else {
$vars['install_item_dir'] = $vars['name'];
if ($vars['type'] === 'microweber-template') {
return $this->inflectTemplateVars($vars);
}
if ($vars['type'] === 'microweber-templates') {
return $this->inflectTemplatesVars($vars);
}
if ($vars['type'] === 'microweber-core') {
return $this->inflectCoreVars($vars);
}
if ($vars['type'] === 'microweber-adapter') {
return $this->inflectCoreVars($vars);
}
if ($vars['type'] === 'microweber-module') {
return $this->inflectModuleVars($vars);
}
if ($vars['type'] === 'microweber-modules') {
return $this->inflectModulesVars($vars);
}
if ($vars['type'] === 'microweber-skin') {
return $this->inflectSkinVars($vars);
}
if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
return $this->inflectElementVars($vars);
}
}
return $vars;
}
protected function inflectTemplateVars($vars)
{
$vars['install_item_dir'] = preg_replace('/-template$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/template-$/', '', $vars['install_item_dir']);
return $vars;
}
protected function inflectTemplatesVars($vars)
{
$vars['install_item_dir'] = preg_replace('/-templates$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/templates-$/', '', $vars['install_item_dir']);
return $vars;
}
protected function inflectCoreVars($vars)
{
$vars['install_item_dir'] = preg_replace('/-providers$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/-provider$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/-adapter$/', '', $vars['install_item_dir']);
return $vars;
}
protected function inflectModuleVars($vars)
{
$vars['install_item_dir'] = preg_replace('/-module$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/module-$/', '', $vars['install_item_dir']);
return $vars;
}
protected function inflectModulesVars($vars)
{
$vars['install_item_dir'] = preg_replace('/-modules$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/modules-$/', '', $vars['install_item_dir']);
return $vars;
}
protected function inflectSkinVars($vars)
{
$vars['install_item_dir'] = preg_replace('/-skin$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/skin-$/', '', $vars['install_item_dir']);
return $vars;
}
protected function inflectElementVars($vars)
{
$vars['install_item_dir'] = preg_replace('/-elements$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/elements-$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/-element$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/element-$/', '', $vars['install_item_dir']);
return $vars;
}
}
composer/installers/src/Composer/Installers/ModxInstaller.php 0000644 00000000364 15153526733 0020564 0 ustar 00 <?php
namespace Composer\Installers;
/**
* An installer to handle MODX specifics when installing packages.
*/
class ModxInstaller extends BaseInstaller
{
protected $locations = array(
'extra' => 'core/packages/{$name}/'
);
}
composer/installers/src/Composer/Installers/MoodleInstaller.php 0000644 00000006054 15153526733 0021076 0 ustar 00 <?php
namespace Composer\Installers;
class MoodleInstaller extends BaseInstaller
{
protected $locations = array(
'mod' => 'mod/{$name}/',
'admin_report' => 'admin/report/{$name}/',
'atto' => 'lib/editor/atto/plugins/{$name}/',
'tool' => 'admin/tool/{$name}/',
'assignment' => 'mod/assignment/type/{$name}/',
'assignsubmission' => 'mod/assign/submission/{$name}/',
'assignfeedback' => 'mod/assign/feedback/{$name}/',
'auth' => 'auth/{$name}/',
'availability' => 'availability/condition/{$name}/',
'block' => 'blocks/{$name}/',
'booktool' => 'mod/book/tool/{$name}/',
'cachestore' => 'cache/stores/{$name}/',
'cachelock' => 'cache/locks/{$name}/',
'calendartype' => 'calendar/type/{$name}/',
'fileconverter' => 'files/converter/{$name}/',
'format' => 'course/format/{$name}/',
'coursereport' => 'course/report/{$name}/',
'customcertelement' => 'mod/customcert/element/{$name}/',
'datafield' => 'mod/data/field/{$name}/',
'datapreset' => 'mod/data/preset/{$name}/',
'editor' => 'lib/editor/{$name}/',
'enrol' => 'enrol/{$name}/',
'filter' => 'filter/{$name}/',
'gradeexport' => 'grade/export/{$name}/',
'gradeimport' => 'grade/import/{$name}/',
'gradereport' => 'grade/report/{$name}/',
'gradingform' => 'grade/grading/form/{$name}/',
'local' => 'local/{$name}/',
'logstore' => 'admin/tool/log/store/{$name}/',
'ltisource' => 'mod/lti/source/{$name}/',
'ltiservice' => 'mod/lti/service/{$name}/',
'message' => 'message/output/{$name}/',
'mnetservice' => 'mnet/service/{$name}/',
'plagiarism' => 'plagiarism/{$name}/',
'portfolio' => 'portfolio/{$name}/',
'qbehaviour' => 'question/behaviour/{$name}/',
'qformat' => 'question/format/{$name}/',
'qtype' => 'question/type/{$name}/',
'quizaccess' => 'mod/quiz/accessrule/{$name}/',
'quiz' => 'mod/quiz/report/{$name}/',
'report' => 'report/{$name}/',
'repository' => 'repository/{$name}/',
'scormreport' => 'mod/scorm/report/{$name}/',
'search' => 'search/engine/{$name}/',
'theme' => 'theme/{$name}/',
'tinymce' => 'lib/editor/tinymce/plugins/{$name}/',
'profilefield' => 'user/profile/field/{$name}/',
'webservice' => 'webservice/{$name}/',
'workshopallocation' => 'mod/workshop/allocation/{$name}/',
'workshopeval' => 'mod/workshop/eval/{$name}/',
'workshopform' => 'mod/workshop/form/{$name}/'
);
}
composer/installers/src/Composer/Installers/OctoberInstaller.php 0000644 00000002377 15153526733 0021260 0 ustar 00 <?php
namespace Composer\Installers;
class OctoberInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'modules/{$name}/',
'plugin' => 'plugins/{$vendor}/{$name}/',
'theme' => 'themes/{$vendor}-{$name}/'
);
/**
* Format package name.
*
* For package type october-plugin, cut off a trailing '-plugin' if present.
*
* For package type october-theme, cut off a trailing '-theme' if present.
*
*/
public function inflectPackageVars($vars)
{
if ($vars['type'] === 'october-plugin') {
return $this->inflectPluginVars($vars);
}
if ($vars['type'] === 'october-theme') {
return $this->inflectThemeVars($vars);
}
return $vars;
}
protected function inflectPluginVars($vars)
{
$vars['name'] = preg_replace('/^oc-|-plugin$/', '', $vars['name']);
$vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']);
return $vars;
}
protected function inflectThemeVars($vars)
{
$vars['name'] = preg_replace('/^oc-|-theme$/', '', $vars['name']);
$vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']);
return $vars;
}
}
composer/installers/src/Composer/Installers/OntoWikiInstaller.php 0000644 00000001324 15153526733 0021415 0 ustar 00 <?php
namespace Composer\Installers;
class OntoWikiInstaller extends BaseInstaller
{
protected $locations = array(
'extension' => 'extensions/{$name}/',
'theme' => 'extensions/themes/{$name}/',
'translation' => 'extensions/translations/{$name}/',
);
/**
* Format package name to lower case and remove ".ontowiki" suffix
*/
public function inflectPackageVars($vars)
{
$vars['name'] = strtolower($vars['name']);
$vars['name'] = preg_replace('/.ontowiki$/', '', $vars['name']);
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
$vars['name'] = preg_replace('/-translation$/', '', $vars['name']);
return $vars;
}
}
composer/installers/src/Composer/Installers/OsclassInstaller.php 0000644 00000000447 15153526733 0021266 0 ustar 00 <?php
namespace Composer\Installers;
class OsclassInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'oc-content/plugins/{$name}/',
'theme' => 'oc-content/themes/{$name}/',
'language' => 'oc-content/languages/{$name}/',
);
}
composer/installers/src/Composer/Installers/OxidInstaller.php 0000644 00000002652 15153526733 0020562 0 ustar 00 <?php
namespace Composer\Installers;
use Composer\Package\PackageInterface;
class OxidInstaller extends BaseInstaller
{
const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/';
protected $locations = array(
'module' => 'modules/{$name}/',
'theme' => 'application/views/{$name}/',
'out' => 'out/{$name}/',
);
/**
* getInstallPath
*
* @param PackageInterface $package
* @param string $frameworkType
* @return string
*/
public function getInstallPath(PackageInterface $package, $frameworkType = '')
{
$installPath = parent::getInstallPath($package, $frameworkType);
$type = $this->package->getType();
if ($type === 'oxid-module') {
$this->prepareVendorDirectory($installPath);
}
return $installPath;
}
/**
* prepareVendorDirectory
*
* Makes sure there is a vendormetadata.php file inside
* the vendor folder if there is a vendor folder.
*
* @param string $installPath
* @return void
*/
protected function prepareVendorDirectory($installPath)
{
$matches = '';
$hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
if (!$hasVendorDirectory) {
return;
}
$vendorDirectory = $matches['vendor'];
$vendorPath = getcwd() . '/modules/' . $vendorDirectory;
if (!file_exists($vendorPath)) {
mkdir($vendorPath, 0755, true);
}
$vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
touch($vendorMetaDataPath);
}
}
composer/installers/src/Composer/Installers/PPIInstaller.php 0000644 00000000244 15153526733 0020302 0 ustar 00 <?php
namespace Composer\Installers;
class PPIInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'modules/{$name}/',
);
}
composer/installers/src/Composer/Installers/PantheonInstaller.php 0000644 00000000446 15153526733 0021432 0 ustar 00 <?php
namespace Composer\Installers;
class PantheonInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'script' => 'web/private/scripts/quicksilver/{$name}',
'module' => 'web/private/scripts/quicksilver/{$name}',
);
}
composer/installers/src/Composer/Installers/PhiftyInstaller.php 0000644 00000000400 15153526733 0021107 0 ustar 00 <?php
namespace Composer\Installers;
class PhiftyInstaller extends BaseInstaller
{
protected $locations = array(
'bundle' => 'bundles/{$name}/',
'library' => 'libraries/{$name}/',
'framework' => 'frameworks/{$name}/',
);
}
composer/installers/src/Composer/Installers/PhpBBInstaller.php 0000644 00000000405 15153526733 0020604 0 ustar 00 <?php
namespace Composer\Installers;
class PhpBBInstaller extends BaseInstaller
{
protected $locations = array(
'extension' => 'ext/{$vendor}/{$name}/',
'language' => 'language/{$name}/',
'style' => 'styles/{$name}/',
);
}
composer/installers/src/Composer/Installers/PiwikInstaller.php 0000644 00000001271 15153526733 0020736 0 ustar 00 <?php
namespace Composer\Installers;
/**
* Class PiwikInstaller
*
* @package Composer\Installers
*/
class PiwikInstaller extends BaseInstaller
{
/**
* @var array
*/
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
/**
* Format package name to CamelCase
* @param array $vars
*
* @return array
*/
public function inflectPackageVars($vars)
{
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}
composer/installers/src/Composer/Installers/PlentymarketsInstaller.php 0000644 00000001311 15153526733 0022510 0 ustar 00 <?php
namespace Composer\Installers;
class PlentymarketsInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => '{$name}/'
);
/**
* Remove hyphen, "plugin" and format to camelcase
* @param array $vars
*
* @return array
*/
public function inflectPackageVars($vars)
{
$vars['name'] = explode("-", $vars['name']);
foreach ($vars['name'] as $key => $name) {
$vars['name'][$key] = ucfirst($vars['name'][$key]);
if (strcasecmp($name, "Plugin") == 0) {
unset($vars['name'][$key]);
}
}
$vars['name'] = implode("",$vars['name']);
return $vars;
}
}
composer/installers/src/Composer/Installers/Plugin.php 0000644 00000001214 15153526733 0017230 0 ustar 00 <?php
namespace Composer\Installers;
use Composer\Composer;
use Composer\IO\IOInterface;
use Composer\Plugin\PluginInterface;
class Plugin implements PluginInterface
{
private $installer;
public function activate(Composer $composer, IOInterface $io)
{
$this->installer = new Installer($io, $composer);
$composer->getInstallationManager()->addInstaller($this->installer);
}
public function deactivate(Composer $composer, IOInterface $io)
{
$composer->getInstallationManager()->removeInstaller($this->installer);
}
public function uninstall(Composer $composer, IOInterface $io)
{
}
}
composer/installers/src/Composer/Installers/PortoInstaller.php 0000644 00000000260 15153526733 0020753 0 ustar 00 <?php
namespace Composer\Installers;
class PortoInstaller extends BaseInstaller
{
protected $locations = array(
'container' => 'app/Containers/{$name}/',
);
}
composer/installers/src/Composer/Installers/PrestashopInstaller.php 0000644 00000000322 15153526733 0021777 0 ustar 00 <?php
namespace Composer\Installers;
class PrestashopInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'modules/{$name}/',
'theme' => 'themes/{$name}/',
);
}
composer/installers/src/Composer/Installers/ProcessWireInstaller.php 0000644 00000001053 15153526733 0022116 0 ustar 00 <?php
namespace Composer\Installers;
class ProcessWireInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'site/modules/{$name}/',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars($vars)
{
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}
composer/installers/src/Composer/Installers/PuppetInstaller.php 0000644 00000000251 15153526733 0021125 0 ustar 00 <?php
namespace Composer\Installers;
class PuppetInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'modules/{$name}/',
);
}
composer/installers/src/Composer/Installers/PxcmsInstaller.php 0000644 00000003734 15153526733 0020753 0 ustar 00 <?php
namespace Composer\Installers;
class PxcmsInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'app/Modules/{$name}/',
'theme' => 'themes/{$name}/',
);
/**
* Format package name.
*
* @param array $vars
*
* @return array
*/
public function inflectPackageVars($vars)
{
if ($vars['type'] === 'pxcms-module') {
return $this->inflectModuleVars($vars);
}
if ($vars['type'] === 'pxcms-theme') {
return $this->inflectThemeVars($vars);
}
return $vars;
}
/**
* For package type pxcms-module, cut off a trailing '-plugin' if present.
*
* return string
*/
protected function inflectModuleVars($vars)
{
$vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
$vars['name'] = str_replace('module-', '', $vars['name']); // strip out module-
$vars['name'] = preg_replace('/-module$/', '', $vars['name']); // strip out -module
$vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
$vars['name'] = ucwords($vars['name']); // make module name camelcased
return $vars;
}
/**
* For package type pxcms-module, cut off a trailing '-plugin' if present.
*
* return string
*/
protected function inflectThemeVars($vars)
{
$vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
$vars['name'] = str_replace('theme-', '', $vars['name']); // strip out theme-
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']); // strip out -theme
$vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
$vars['name'] = ucwords($vars['name']); // make module name camelcased
return $vars;
}
}
composer/installers/src/Composer/Installers/RadPHPInstaller.php 0000644 00000001223 15153526733 0020726 0 ustar 00 <?php
namespace Composer\Installers;
class RadPHPInstaller extends BaseInstaller
{
protected $locations = array(
'bundle' => 'src/{$name}/'
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars($vars)
{
$nameParts = explode('/', $vars['name']);
foreach ($nameParts as &$value) {
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
$value = str_replace(array('-', '_'), ' ', $value);
$value = str_replace(' ', '', ucwords($value));
}
$vars['name'] = implode('/', $nameParts);
return $vars;
}
}
composer/installers/src/Composer/Installers/ReIndexInstaller.php 0000644 00000000324 15153526733 0021207 0 ustar 00 <?php
namespace Composer\Installers;
class ReIndexInstaller extends BaseInstaller
{
protected $locations = array(
'theme' => 'themes/{$name}/',
'plugin' => 'plugins/{$name}/'
);
}
composer/installers/src/Composer/Installers/Redaxo5Installer.php 0000644 00000000404 15153526733 0021157 0 ustar 00 <?php
namespace Composer\Installers;
class Redaxo5Installer extends BaseInstaller
{
protected $locations = array(
'addon' => 'redaxo/src/addons/{$name}/',
'bestyle-plugin' => 'redaxo/src/addons/be_style/plugins/{$name}/'
);
}
composer/installers/src/Composer/Installers/RedaxoInstaller.php 0000644 00000000413 15153526733 0021072 0 ustar 00 <?php
namespace Composer\Installers;
class RedaxoInstaller extends BaseInstaller
{
protected $locations = array(
'addon' => 'redaxo/include/addons/{$name}/',
'bestyle-plugin' => 'redaxo/include/addons/be_style/plugins/{$name}/'
);
}
composer/installers/src/Composer/Installers/RoundcubeInstaller.php 0000644 00000000711 15153526733 0021577 0 ustar 00 <?php
namespace Composer\Installers;
class RoundcubeInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
/**
* Lowercase name and changes the name to a underscores
*
* @param array $vars
* @return array
*/
public function inflectPackageVars($vars)
{
$vars['name'] = strtolower(str_replace('-', '_', $vars['name']));
return $vars;
}
}
composer/installers/src/Composer/Installers/SMFInstaller.php 0000644 00000000312 15153526733 0020273 0 ustar 00 <?php
namespace Composer\Installers;
class SMFInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'Sources/{$name}/',
'theme' => 'Themes/{$name}/',
);
}
composer/installers/src/Composer/Installers/ShopwareInstaller.php 0000644 00000003156 15153526733 0021447 0 ustar 00 <?php
namespace Composer\Installers;
/**
* Plugin/theme installer for shopware
* @author Benjamin Boit
*/
class ShopwareInstaller extends BaseInstaller
{
protected $locations = array(
'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/',
'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/',
'frontend-plugin' => 'engine/Shopware/Plugins/Local/Frontend/{$name}/',
'theme' => 'templates/{$name}/',
'plugin' => 'custom/plugins/{$name}/',
'frontend-theme' => 'themes/Frontend/{$name}/',
);
/**
* Transforms the names
* @param array $vars
* @return array
*/
public function inflectPackageVars($vars)
{
if ($vars['type'] === 'shopware-theme') {
return $this->correctThemeName($vars);
}
return $this->correctPluginName($vars);
}
/**
* Changes the name to a camelcased combination of vendor and name
* @param array $vars
* @return array
*/
private function correctPluginName($vars)
{
$camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
return strtoupper($matches[0][1]);
}, $vars['name']);
$vars['name'] = ucfirst($vars['vendor']) . ucfirst($camelCasedName);
return $vars;
}
/**
* Changes the name to a underscore separated name
* @param array $vars
* @return array
*/
private function correctThemeName($vars)
{
$vars['name'] = str_replace('-', '_', $vars['name']);
return $vars;
}
}
composer/installers/src/Composer/Installers/SilverStripeInstaller.php 0000644 00000002127 15153526733 0022307 0 ustar 00 <?php
namespace Composer\Installers;
use Composer\Package\PackageInterface;
class SilverStripeInstaller extends BaseInstaller
{
protected $locations = array(
'module' => '{$name}/',
'theme' => 'themes/{$name}/',
);
/**
* Return the install path based on package type.
*
* Relies on built-in BaseInstaller behaviour with one exception: silverstripe/framework
* must be installed to 'sapphire' and not 'framework' if the version is <3.0.0
*
* @param PackageInterface $package
* @param string $frameworkType
* @return string
*/
public function getInstallPath(PackageInterface $package, $frameworkType = '')
{
if (
$package->getName() == 'silverstripe/framework'
&& preg_match('/^\d+\.\d+\.\d+/', $package->getVersion())
&& version_compare($package->getVersion(), '2.999.999') < 0
) {
return $this->templatePath($this->locations['module'], array('name' => 'sapphire'));
}
return parent::getInstallPath($package, $frameworkType);
}
}
composer/installers/src/Composer/Installers/SiteDirectInstaller.php 0000644 00000001216 15153526733 0021711 0 ustar 00 <?php
namespace Composer\Installers;
class SiteDirectInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'modules/{$vendor}/{$name}/',
'plugin' => 'plugins/{$vendor}/{$name}/'
);
public function inflectPackageVars($vars)
{
return $this->parseVars($vars);
}
protected function parseVars($vars)
{
$vars['vendor'] = strtolower($vars['vendor']) == 'sitedirect' ? 'SiteDirect' : $vars['vendor'];
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}
composer/installers/src/Composer/Installers/StarbugInstaller.php 0000644 00000000461 15153526733 0021262 0 ustar 00 <?php
namespace Composer\Installers;
class StarbugInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'modules/{$name}/',
'theme' => 'themes/{$name}/',
'custom-module' => 'app/modules/{$name}/',
'custom-theme' => 'app/themes/{$name}/'
);
}
composer/installers/src/Composer/Installers/SyDESInstaller.php 0000644 00000002264 15153526733 0020605 0 ustar 00 <?php
namespace Composer\Installers;
class SyDESInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'app/modules/{$name}/',
'theme' => 'themes/{$name}/',
);
/**
* Format module name.
*
* Strip `sydes-` prefix and a trailing '-theme' or '-module' from package name if present.
*
* {@inerhitDoc}
*/
public function inflectPackageVars($vars)
{
if ($vars['type'] == 'sydes-module') {
return $this->inflectModuleVars($vars);
}
if ($vars['type'] === 'sydes-theme') {
return $this->inflectThemeVars($vars);
}
return $vars;
}
public function inflectModuleVars($vars)
{
$vars['name'] = preg_replace('/(^sydes-|-module$)/i', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
protected function inflectThemeVars($vars)
{
$vars['name'] = preg_replace('/(^sydes-|-theme$)/', '', $vars['name']);
$vars['name'] = strtolower($vars['name']);
return $vars;
}
}
composer/installers/src/Composer/Installers/SyliusInstaller.php 0000644 00000000245 15153526733 0021143 0 ustar 00 <?php
namespace Composer\Installers;
class SyliusInstaller extends BaseInstaller
{
protected $locations = array(
'theme' => 'themes/{$name}/',
);
}
composer/installers/src/Composer/Installers/TaoInstaller.php 0000644 00000001423 15153526733 0020375 0 ustar 00 <?php
namespace Composer\Installers;
/**
* An installer to handle TAO extensions.
*/
class TaoInstaller extends BaseInstaller
{
const EXTRA_TAO_EXTENSION_NAME = 'tao-extension-name';
protected $locations = array(
'extension' => '{$name}'
);
public function inflectPackageVars($vars)
{
$extra = $this->package->getExtra();
if (array_key_exists(self::EXTRA_TAO_EXTENSION_NAME, $extra)) {
$vars['name'] = $extra[self::EXTRA_TAO_EXTENSION_NAME];
return $vars;
}
$vars['name'] = str_replace('extension-', '', $vars['name']);
$vars['name'] = str_replace('-', ' ', $vars['name']);
$vars['name'] = lcfirst(str_replace(' ', '', ucwords($vars['name'])));
return $vars;
}
}
composer/installers/src/Composer/Installers/TastyIgniterInstaller.php 0000644 00000001553 15153526733 0022304 0 ustar 00 <?php
namespace Composer\Installers;
class TastyIgniterInstaller extends BaseInstaller
{
protected $locations = array(
'extension' => 'extensions/{$vendor}/{$name}/',
'theme' => 'themes/{$name}/',
);
/**
* Format package name.
*
* Cut off leading 'ti-ext-' or 'ti-theme-' if present.
* Strip vendor name of characters that is not alphanumeric or an underscore
*
*/
public function inflectPackageVars($vars)
{
if ($vars['type'] === 'tastyigniter-extension') {
$vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']);
$vars['name'] = preg_replace('/^ti-ext-/', '', $vars['name']);
}
if ($vars['type'] === 'tastyigniter-theme') {
$vars['name'] = preg_replace('/^ti-theme-/', '', $vars['name']);
}
return $vars;
}
} composer/installers/src/Composer/Installers/TheliaInstaller.php 0000644 00000000604 15153526733 0021060 0 ustar 00 <?php
namespace Composer\Installers;
class TheliaInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'local/modules/{$name}/',
'frontoffice-template' => 'templates/frontOffice/{$name}/',
'backoffice-template' => 'templates/backOffice/{$name}/',
'email-template' => 'templates/email/{$name}/',
);
}
composer/installers/src/Composer/Installers/TuskInstaller.php 0000644 00000000640 15153526733 0020600 0 ustar 00 <?php
namespace Composer\Installers;
/**
* Composer installer for 3rd party Tusk utilities
* @author Drew Ewing <drew@phenocode.com>
*/
class TuskInstaller extends BaseInstaller
{
protected $locations = array(
'task' => '.tusk/tasks/{$name}/',
'command' => '.tusk/commands/{$name}/',
'asset' => 'assets/tusk/{$name}/',
);
}
composer/installers/src/Composer/Installers/UserFrostingInstaller.php 0000644 00000000265 15153526733 0022307 0 ustar 00 <?php
namespace Composer\Installers;
class UserFrostingInstaller extends BaseInstaller
{
protected $locations = array(
'sprinkle' => 'app/sprinkles/{$name}/',
);
}
composer/installers/src/Composer/Installers/VanillaInstaller.php 0000644 00000000325 15153526733 0021240 0 ustar 00 <?php
namespace Composer\Installers;
class VanillaInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'plugins/{$name}/',
'theme' => 'themes/{$name}/',
);
}
composer/installers/src/Composer/Installers/VgmcpInstaller.php 0000644 00000002457 15153526733 0020736 0 ustar 00 <?php
namespace Composer\Installers;
class VgmcpInstaller extends BaseInstaller
{
protected $locations = array(
'bundle' => 'src/{$vendor}/{$name}/',
'theme' => 'themes/{$name}/'
);
/**
* Format package name.
*
* For package type vgmcp-bundle, cut off a trailing '-bundle' if present.
*
* For package type vgmcp-theme, cut off a trailing '-theme' if present.
*
*/
public function inflectPackageVars($vars)
{
if ($vars['type'] === 'vgmcp-bundle') {
return $this->inflectPluginVars($vars);
}
if ($vars['type'] === 'vgmcp-theme') {
return $this->inflectThemeVars($vars);
}
return $vars;
}
protected function inflectPluginVars($vars)
{
$vars['name'] = preg_replace('/-bundle$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
protected function inflectThemeVars($vars)
{
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}
composer/installers/src/Composer/Installers/WHMCSInstaller.php 0000644 00000001506 15153526733 0020535 0 ustar 00 <?php
namespace Composer\Installers;
class WHMCSInstaller extends BaseInstaller
{
protected $locations = array(
'addons' => 'modules/addons/{$vendor}_{$name}/',
'fraud' => 'modules/fraud/{$vendor}_{$name}/',
'gateways' => 'modules/gateways/{$vendor}_{$name}/',
'notifications' => 'modules/notifications/{$vendor}_{$name}/',
'registrars' => 'modules/registrars/{$vendor}_{$name}/',
'reports' => 'modules/reports/{$vendor}_{$name}/',
'security' => 'modules/security/{$vendor}_{$name}/',
'servers' => 'modules/servers/{$vendor}_{$name}/',
'social' => 'modules/social/{$vendor}_{$name}/',
'support' => 'modules/support/{$vendor}_{$name}/',
'templates' => 'templates/{$vendor}_{$name}/',
'includes' => 'includes/{$vendor}_{$name}/'
);
}
composer/installers/src/Composer/Installers/WinterInstaller.php 0000644 00000002676 15153526733 0021135 0 ustar 00 <?php
namespace Composer\Installers;
class WinterInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'modules/{$name}/',
'plugin' => 'plugins/{$vendor}/{$name}/',
'theme' => 'themes/{$name}/'
);
/**
* Format package name.
*
* For package type winter-plugin, cut off a trailing '-plugin' if present.
*
* For package type winter-theme, cut off a trailing '-theme' if present.
*
*/
public function inflectPackageVars($vars)
{
if ($vars['type'] === 'winter-module') {
return $this->inflectModuleVars($vars);
}
if ($vars['type'] === 'winter-plugin') {
return $this->inflectPluginVars($vars);
}
if ($vars['type'] === 'winter-theme') {
return $this->inflectThemeVars($vars);
}
return $vars;
}
protected function inflectModuleVars($vars)
{
$vars['name'] = preg_replace('/^wn-|-module$/', '', $vars['name']);
return $vars;
}
protected function inflectPluginVars($vars)
{
$vars['name'] = preg_replace('/^wn-|-plugin$/', '', $vars['name']);
$vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']);
return $vars;
}
protected function inflectThemeVars($vars)
{
$vars['name'] = preg_replace('/^wn-|-theme$/', '', $vars['name']);
return $vars;
}
}
composer/installers/src/Composer/Installers/WolfCMSInstaller.php 0000644 00000000255 15153526733 0021126 0 ustar 00 <?php
namespace Composer\Installers;
class WolfCMSInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'wolf/plugins/{$name}/',
);
}
composer/installers/src/Composer/Installers/WordPressInstaller.php 0000644 00000000524 15153526733 0021603 0 ustar 00 <?php
namespace Composer\Installers;
class WordPressInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'wp-content/plugins/{$name}/',
'theme' => 'wp-content/themes/{$name}/',
'muplugin' => 'wp-content/mu-plugins/{$name}/',
'dropin' => 'wp-content/{$name}/',
);
}
composer/installers/src/Composer/Installers/YawikInstaller.php 0000644 00000001246 15153526733 0020741 0 ustar 00 <?php
/**
* Created by PhpStorm.
* User: cbleek
* Date: 25.03.16
* Time: 20:55
*/
namespace Composer\Installers;
class YawikInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'module/{$name}/',
);
/**
* Format package name to CamelCase
* @param array $vars
*
* @return array
*/
public function inflectPackageVars($vars)
{
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
} composer/installers/src/Composer/Installers/ZendInstaller.php 0000644 00000000376 15153526733 0020560 0 ustar 00 <?php
namespace Composer\Installers;
class ZendInstaller extends BaseInstaller
{
protected $locations = array(
'library' => 'library/{$name}/',
'extra' => 'extras/library/{$name}/',
'module' => 'module/{$name}/',
);
}
composer/installers/src/Composer/Installers/ZikulaInstaller.php 0000644 00000000341 15153526733 0021107 0 ustar 00 <?php
namespace Composer\Installers;
class ZikulaInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'modules/{$vendor}-{$name}/',
'theme' => 'themes/{$vendor}-{$name}/'
);
}
composer/installers/src/bootstrap.php 0000644 00000000724 15153526733 0014105 0 ustar 00 <?php
function includeIfExists($file)
{
if (file_exists($file)) {
return include $file;
}
}
if ((!$loader = includeIfExists(__DIR__ . '/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__ . '/../../../autoload.php'))) {
die('You must set up the project dependencies, run the following commands:'.PHP_EOL.
'curl -s http://getcomposer.org/installer | php'.PHP_EOL.
'php composer.phar install'.PHP_EOL);
}
return $loader;
composer/platform_check.php 0000644 00000001635 15153526733 0012104 0 ustar 00 <?php
// platform_check.php @generated by Composer
$issues = array();
if (!(PHP_VERSION_ID >= 70100)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.0". You are running ' . PHP_VERSION . '.';
}
if ($issues) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
} elseif (!headers_sent()) {
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
}
}
trigger_error(
'Composer detected issues in your platform: ' . implode(' ', $issues),
E_USER_ERROR
);
}
autoload_packages.php 0000644 00000000475 15153552355 0010742 0 ustar 00 <?php
/**
* This file was automatically generated by automattic/jetpack-autoloader.
*
* @package automattic/jetpack-autoloader
*/
namespace Automattic\Jetpack\Autoloader\jp865e0ff1636ff8bf9d922e869851562a;
// phpcs:ignore
require_once __DIR__ . '/jetpack-autoloader/class-autoloader.php';
Autoloader::init();
automattic/jetpack-a8c-mc-stats/LICENSE.txt 0000644 00000043760 15153552355 0014407 0 ustar 00 This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
automattic/jetpack-a8c-mc-stats/src/class-a8c-mc-stats.php 0000644 00000010414 15153552355 0017361 0 ustar 00 <?php
/**
* Jetpack MC Stats package.
*
* @package automattic/jetpack-mc-stats
*/
namespace Automattic\Jetpack;
/**
* Class MC Stats, used to record stats using https://pixel.wp.com/g.gif
*/
class A8c_Mc_Stats {
/**
* Holds the stats to be processed
*
* @var array
*/
private $stats = array();
/**
* Indicates whether to use the transparent pixel (b.gif) instead of the regular smiley (g.gif)
*
* @var boolean
*/
public $use_transparent_pixel = true;
/**
* Class Constructor
*
* @param boolean $use_transparent_pixel Use the transparent pixel instead of the smiley.
*/
public function __construct( $use_transparent_pixel = true ) {
$this->use_transparent_pixel = $use_transparent_pixel;
}
/**
* Store a stat for later output.
*
* @param string $group The stat group.
* @param string $name The stat name to bump.
*
* @return boolean true if stat successfully added
*/
public function add( $group, $name ) {
if ( ! \is_string( $group ) || ! \is_string( $name ) ) {
return false;
}
if ( ! isset( $this->stats[ $group ] ) ) {
$this->stats[ $group ] = array();
}
if ( \in_array( $name, $this->stats[ $group ], true ) ) {
return false;
}
$this->stats[ $group ][] = $name;
return true;
}
/**
* Gets current stats stored to be processed
*
* @return array $stats
*/
public function get_current_stats() {
return $this->stats;
}
/**
* Return the stats from a group in an array ready to be added as parameters in a query string
*
* @param string $group_name The name of the group to retrieve.
* @return array Array with one item, where the key is the prefixed group and the value are all stats concatenated with a comma. If group not found, an empty array will be returned
*/
public function get_group_query_args( $group_name ) {
$stats = $this->get_current_stats();
if ( isset( $stats[ $group_name ] ) && ! empty( $stats[ $group_name ] ) ) {
return array( "x_jetpack-{$group_name}" => implode( ',', $stats[ $group_name ] ) );
}
return array();
}
/**
* Gets a list of trac URLs for every stored URL
*
* @return array An array of URLs
*/
public function get_stats_urls() {
$urls = array();
foreach ( $this->get_current_stats() as $group => $stat ) {
$group_query_string = $this->get_group_query_args( $group );
$urls[] = $this->build_stats_url( $group_query_string );
}
return $urls;
}
/**
* Outputs the tracking pixels for the current stats and empty the stored stats from the object
*
* @return void
*/
public function do_stats() {
$urls = $this->get_stats_urls();
foreach ( $urls as $url ) {
echo '<img src="' . esc_url( $url ) . '" width="1" height="1" style="display:none;" />';
}
$this->stats = array();
}
/**
* Pings the stats server for the current stats and empty the stored stats from the object
*
* @return void
*/
public function do_server_side_stats() {
$urls = $this->get_stats_urls();
foreach ( $urls as $url ) {
$this->do_server_side_stat( $url );
}
$this->stats = array();
}
/**
* Runs stats code for a one-off, server-side.
*
* @param string $url string The URL to be pinged. Should include `x_jetpack-{$group}={$stats}` or whatever we want to store.
*
* @return bool If it worked.
*/
public function do_server_side_stat( $url ) {
$response = wp_remote_get( esc_url_raw( $url ) );
if ( is_wp_error( $response ) ) {
return false;
}
if ( 200 !== wp_remote_retrieve_response_code( $response ) ) {
return false;
}
return true;
}
/**
* Builds the stats url.
*
* @param array $args array|string The arguments to append to the URL.
*
* @return string The URL to be pinged.
*/
public function build_stats_url( $args ) {
$defaults = array(
'v' => 'wpcom2',
'rand' => md5( wp_rand( 0, 999 ) . time() ),
);
$args = wp_parse_args( $args, $defaults );
$gifname = true === $this->use_transparent_pixel ? 'b.gif' : 'g.gif';
/**
* Filter the URL used as the Stats tracking pixel.
*
* @since-jetpack 2.3.2
* @since 1.0.0
*
* @param string $url Base URL used as the Stats tracking pixel.
*/
$base_url = apply_filters(
'jetpack_stats_base_url',
'https://pixel.wp.com/' . $gifname
);
$url = add_query_arg( $args, $base_url );
return $url;
}
}
automattic/jetpack-admin-ui/LICENSE.txt 0000644 00000043760 15153552355 0013706 0 ustar 00 This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
automattic/jetpack-admin-ui/src/class-admin-menu.php 0000644 00000015047 15153552356 0016516 0 ustar 00 <?php
/**
* Admin Menu Registration
*
* @package automattic/jetpack-admin-ui
*/
namespace Automattic\Jetpack\Admin_UI;
/**
* This class offers a wrapper to add_submenu_page and makes sure stand-alone plugin's menu items are always added under the Jetpack top level menu.
* If the Jetpack top level was not previously registered by other plugin, it will be registered here.
*/
class Admin_Menu {
const PACKAGE_VERSION = '0.2.23';
/**
* Whether this class has been initialized
*
* @var boolean
*/
private static $initialized = false;
/**
* List of menu items enqueued to be added
*
* @var array
*/
private static $menu_items = array();
/**
* Initialize the class and set up the main hook
*
* @return void
*/
public static function init() {
if ( ! self::$initialized ) {
self::$initialized = true;
self::handle_akismet_menu();
add_action( 'admin_menu', array( __CLASS__, 'admin_menu_hook_callback' ), 1000 ); // Jetpack uses 998.
}
}
/**
* Handles the Akismet menu item when used alongside other stand-alone plugins
*
* When Jetpack plugin is present, Akismet menu item is moved under the Jetpack top level menu, but if Akismet is active alongside other stand-alone plugins,
* we use this method to move the menu item.
*/
private static function handle_akismet_menu() {
if ( ! class_exists( 'Jetpack' ) && class_exists( 'Akismet_Admin' ) ) {
// Prevent Akismet from adding a menu item.
add_action(
'admin_menu',
function () {
remove_action( 'admin_menu', array( 'Akismet_Admin', 'admin_menu' ), 5 );
},
4
);
// Add an Anti-spam menu item for Jetpack.
self::add_menu( __( 'Akismet Anti-spam', 'jetpack-admin-ui' ), __( 'Akismet Anti-spam', 'jetpack-admin-ui' ), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) );
}
}
/**
* Callback to the admin_menu hook that will register the enqueued menu items
*
* @return void
*/
public static function admin_menu_hook_callback() {
$can_see_toplevel_menu = true;
$jetpack_plugin_present = class_exists( 'Jetpack_React_Page' );
$icon = method_exists( '\Automattic\Jetpack\Assets\Logo', 'get_base64_logo' )
? ( new \Automattic\Jetpack\Assets\Logo() )->get_base64_logo()
: 'dashicons-admin-plugins';
if ( ! $jetpack_plugin_present ) {
add_menu_page(
'Jetpack',
'Jetpack',
'read',
'jetpack',
'__return_null',
$icon,
3
);
// If Jetpack plugin is not present, user will only be able to see this menu if they have enough capability to at least one of the sub menus being added.
$can_see_toplevel_menu = false;
}
/**
* The add_sub_menu function has a bug and will not keep the right order of menu items.
*
* @see https://core.trac.wordpress.org/ticket/52035
* Let's order the items before registering them.
* Since this all happens after the Jetpack plugin menu items were added, all items will be added after Jetpack plugin items - unless position is very low number (smaller than the number of menu items present in Jetpack plugin).
*/
usort(
self::$menu_items,
function ( $a, $b ) {
$position_a = empty( $a['position'] ) ? 0 : $a['position'];
$position_b = empty( $b['position'] ) ? 0 : $b['position'];
$result = $position_a - $position_b;
if ( 0 === $result ) {
$result = strcmp( $a['menu_title'], $b['menu_title'] );
}
return $result;
}
);
foreach ( self::$menu_items as $menu_item ) {
if ( ! current_user_can( $menu_item['capability'] ) ) {
continue;
}
$can_see_toplevel_menu = true;
add_submenu_page(
'jetpack',
$menu_item['page_title'],
$menu_item['menu_title'],
$menu_item['capability'],
$menu_item['menu_slug'],
$menu_item['function'],
$menu_item['position']
);
}
if ( ! $jetpack_plugin_present ) {
remove_submenu_page( 'jetpack', 'jetpack' );
}
if ( ! $can_see_toplevel_menu ) {
remove_menu_page( 'jetpack' );
}
}
/**
* Adds a new submenu to the Jetpack Top level menu
*
* The parameters this method accepts are the same as @see add_submenu_page. This class will
* aggreagate all menu items registered by stand-alone plugins and make sure they all go under the same
* Jetpack top level menu. It will also handle the top level menu registration in case the Jetpack plugin is not present.
*
* @param string $page_title The text to be displayed in the title tags of the page when the menu
* is selected.
* @param string $menu_title The text to be used for the menu.
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by. Should be unique for this menu
* and only include lowercase alphanumeric, dashes, and underscores characters
* to be compatible with sanitize_key().
* @param callable $function The function to be called to output the content for this page.
* @param int $position The position in the menu order this item should appear. Leave empty typically.
*
* @return string The resulting page's hook_suffix
*/
public static function add_menu( $page_title, $menu_title, $capability, $menu_slug, $function, $position = null ) {
self::init();
self::$menu_items[] = compact( 'page_title', 'menu_title', 'capability', 'menu_slug', 'function', 'position' );
/**
* Let's return the page hook so consumers can use.
* We know all pages will be under Jetpack top level menu page, so we can hardcode the first part of the string.
* Using get_plugin_page_hookname here won't work because the top level page is not registered yet.
*/
return 'jetpack_page_' . $menu_slug;
}
/**
* Gets the slug for the first item under the Jetpack top level menu
*
* @return string|null
*/
public static function get_top_level_menu_item_slug() {
global $submenu;
if ( ! empty( $submenu['jetpack'] ) ) {
$item = reset( $submenu['jetpack'] );
if ( isset( $item[2] ) ) {
return $item[2];
}
}
}
/**
* Gets the URL for the first item under the Jetpack top level menu
*
* @param string $fallback If Jetpack menu is not there or no children is found, return this fallback instead. Default to admin_url().
* @return string
*/
public static function get_top_level_menu_item_url( $fallback = false ) {
$slug = self::get_top_level_menu_item_slug();
if ( $slug ) {
$url = menu_page_url( $slug, false );
return $url;
}
$url = $fallback ? $fallback : admin_url();
return $url;
}
}
automattic/jetpack-autoloader/LICENSE.txt 0000644 00000043760 15153552356 0014343 0 ustar 00 This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
automattic/jetpack-autoloader/src/AutoloadFileWriter.php 0000644 00000005636 15153552356 0017565 0 ustar 00 <?php // phpcs:ignore WordPress.Files.FileName
/**
* Autoloader file writer.
*
* @package automattic/jetpack-autoloader
*/
// phpcs:disable WordPress.Files.FileName.InvalidClassFileName
// phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
// phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
// phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase
// phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
// phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase
// phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_export
namespace Automattic\Jetpack\Autoloader;
/**
* Class AutoloadFileWriter.
*/
class AutoloadFileWriter {
/**
* The file comment to use.
*/
const COMMENT = <<<AUTOLOADER_COMMENT
/**
* This file was automatically generated by automattic/jetpack-autoloader.
*
* @package automattic/jetpack-autoloader
*/
AUTOLOADER_COMMENT;
/**
* Copies autoloader files and replaces any placeholders in them.
*
* @param IOInterface|null $io An IO for writing to.
* @param string $outDir The directory to place the autoloader files in.
* @param string $suffix The suffix to use in the autoloader's namespace.
*/
public static function copyAutoloaderFiles( $io, $outDir, $suffix ) {
$renameList = array(
'autoload.php' => '../autoload_packages.php',
);
$ignoreList = array(
'AutoloadGenerator.php',
'AutoloadProcessor.php',
'CustomAutoloaderPlugin.php',
'ManifestGenerator.php',
'AutoloadFileWriter.php',
);
// Copy all of the autoloader files.
$files = scandir( __DIR__ );
foreach ( $files as $file ) {
// Only PHP files will be copied.
if ( substr( $file, -4 ) !== '.php' ) {
continue;
}
if ( in_array( $file, $ignoreList, true ) ) {
continue;
}
$newFile = isset( $renameList[ $file ] ) ? $renameList[ $file ] : $file;
$content = self::prepareAutoloaderFile( $file, $suffix );
$written = file_put_contents( $outDir . '/' . $newFile, $content );
if ( $io ) {
if ( $written ) {
$io->writeError( " <info>Generated: $newFile</info>" );
} else {
$io->writeError( " <error>Error: $newFile</error>" );
}
}
}
}
/**
* Prepares an autoloader file to be written to the destination.
*
* @param String $filename a file to prepare.
* @param String $suffix Unique suffix used in the namespace.
*
* @return string
*/
private static function prepareAutoloaderFile( $filename, $suffix ) {
$header = self::COMMENT;
$header .= PHP_EOL;
$header .= 'namespace Automattic\Jetpack\Autoloader\jp' . $suffix . ';';
$header .= PHP_EOL . PHP_EOL;
$sourceLoader = fopen( __DIR__ . '/' . $filename, 'r' );
$file_contents = stream_get_contents( $sourceLoader );
return str_replace(
'/* HEADER */',
$header,
$file_contents
);
}
}
automattic/jetpack-autoloader/src/AutoloadGenerator.php 0000644 00000034237 15153552356 0017436 0 ustar 00 <?php // phpcs:ignore WordPress.Files.FileName
/**
* Autoloader Generator.
*
* @package automattic/jetpack-autoloader
*/
// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_useFound
// phpcs:disable PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound
// phpcs:disable PHPCompatibility.FunctionDeclarations.NewClosure.Found
// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_namespaceFound
// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_dirFound
// phpcs:disable WordPress.Files.FileName.InvalidClassFileName
// phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_export
// phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
// phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
// phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase
// phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
// phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase
namespace Automattic\Jetpack\Autoloader;
use Composer\Composer;
use Composer\Config;
use Composer\Installer\InstallationManager;
use Composer\IO\IOInterface;
use Composer\Package\PackageInterface;
use Composer\Repository\InstalledRepositoryInterface;
use Composer\Util\Filesystem;
use Composer\Util\PackageSorter;
/**
* Class AutoloadGenerator.
*/
class AutoloadGenerator {
/**
* IO object.
*
* @var IOInterface IO object.
*/
private $io;
/**
* The filesystem utility.
*
* @var Filesystem
*/
private $filesystem;
/**
* Instantiate an AutoloadGenerator object.
*
* @param IOInterface $io IO object.
*/
public function __construct( IOInterface $io = null ) {
$this->io = $io;
$this->filesystem = new Filesystem();
}
/**
* Dump the Jetpack autoloader files.
*
* @param Composer $composer The Composer object.
* @param Config $config Config object.
* @param InstalledRepositoryInterface $localRepo Installed Repository object.
* @param PackageInterface $mainPackage Main Package object.
* @param InstallationManager $installationManager Manager for installing packages.
* @param string $targetDir Path to the current target directory.
* @param bool $scanPsrPackages Whether or not PSR packages should be converted to a classmap.
* @param string $suffix The autoloader suffix.
*/
public function dump(
Composer $composer,
Config $config,
InstalledRepositoryInterface $localRepo,
PackageInterface $mainPackage,
InstallationManager $installationManager,
$targetDir,
$scanPsrPackages = false,
$suffix = null
) {
$this->filesystem->ensureDirectoryExists( $config->get( 'vendor-dir' ) );
$packageMap = $composer->getAutoloadGenerator()->buildPackageMap( $installationManager, $mainPackage, $localRepo->getCanonicalPackages() );
$autoloads = $this->parseAutoloads( $packageMap, $mainPackage );
// Convert the autoloads into a format that the manifest generator can consume more easily.
$basePath = $this->filesystem->normalizePath( realpath( getcwd() ) );
$vendorPath = $this->filesystem->normalizePath( realpath( $config->get( 'vendor-dir' ) ) );
$processedAutoloads = $this->processAutoloads( $autoloads, $scanPsrPackages, $vendorPath, $basePath );
unset( $packageMap, $autoloads );
// Make sure none of the legacy files remain that can lead to problems with the autoloader.
$this->removeLegacyFiles( $vendorPath );
// Write all of the files now that we're done.
$this->writeAutoloaderFiles( $vendorPath . '/jetpack-autoloader/', $suffix );
$this->writeManifests( $vendorPath . '/' . $targetDir, $processedAutoloads );
if ( ! $scanPsrPackages ) {
$this->io->writeError( '<warning>You are generating an unoptimized autoloader. If this is a production build, consider using the -o option.</warning>' );
}
}
/**
* Compiles an ordered list of namespace => path mappings
*
* @param array $packageMap Array of array(package, installDir-relative-to-composer.json).
* @param PackageInterface $mainPackage Main package instance.
*
* @return array The list of path mappings.
*/
public function parseAutoloads( array $packageMap, PackageInterface $mainPackage ) {
$rootPackageMap = array_shift( $packageMap );
$sortedPackageMap = $this->sortPackageMap( $packageMap );
$sortedPackageMap[] = $rootPackageMap;
array_unshift( $packageMap, $rootPackageMap );
$psr0 = $this->parseAutoloadsType( $packageMap, 'psr-0', $mainPackage );
$psr4 = $this->parseAutoloadsType( $packageMap, 'psr-4', $mainPackage );
$classmap = $this->parseAutoloadsType( array_reverse( $sortedPackageMap ), 'classmap', $mainPackage );
$files = $this->parseAutoloadsType( $sortedPackageMap, 'files', $mainPackage );
krsort( $psr0 );
krsort( $psr4 );
return array(
'psr-0' => $psr0,
'psr-4' => $psr4,
'classmap' => $classmap,
'files' => $files,
);
}
/**
* Sorts packages by dependency weight
*
* Packages of equal weight retain the original order
*
* @param array $packageMap The package map.
*
* @return array
*/
protected function sortPackageMap( array $packageMap ) {
$packages = array();
$paths = array();
foreach ( $packageMap as $item ) {
list( $package, $path ) = $item;
$name = $package->getName();
$packages[ $name ] = $package;
$paths[ $name ] = $path;
}
$sortedPackages = PackageSorter::sortPackages( $packages );
$sortedPackageMap = array();
foreach ( $sortedPackages as $package ) {
$name = $package->getName();
$sortedPackageMap[] = array( $packages[ $name ], $paths[ $name ] );
}
return $sortedPackageMap;
}
/**
* Returns the file identifier.
*
* @param PackageInterface $package The package instance.
* @param string $path The path.
*/
protected function getFileIdentifier( PackageInterface $package, $path ) {
return md5( $package->getName() . ':' . $path );
}
/**
* Returns the path code for the given path.
*
* @param Filesystem $filesystem The filesystem instance.
* @param string $basePath The base path.
* @param string $vendorPath The vendor path.
* @param string $path The path.
*
* @return string The path code.
*/
protected function getPathCode( Filesystem $filesystem, $basePath, $vendorPath, $path ) {
if ( ! $filesystem->isAbsolutePath( $path ) ) {
$path = $basePath . '/' . $path;
}
$path = $filesystem->normalizePath( $path );
$baseDir = '';
if ( 0 === strpos( $path . '/', $vendorPath . '/' ) ) {
$path = substr( $path, strlen( $vendorPath ) );
$baseDir = '$vendorDir';
if ( false !== $path ) {
$baseDir .= ' . ';
}
} else {
$path = $filesystem->normalizePath( $filesystem->findShortestPath( $basePath, $path, true ) );
if ( ! $filesystem->isAbsolutePath( $path ) ) {
$baseDir = '$baseDir . ';
$path = '/' . $path;
}
}
if ( strpos( $path, '.phar' ) !== false ) {
$baseDir = "'phar://' . " . $baseDir;
}
return $baseDir . ( ( false !== $path ) ? var_export( $path, true ) : '' );
}
/**
* This function differs from the composer parseAutoloadsType in that beside returning the path.
* It also return the path and the version of a package.
*
* Supports PSR-4, PSR-0, and classmap parsing.
*
* @param array $packageMap Map of all the packages.
* @param string $type Type of autoloader to use.
* @param PackageInterface $mainPackage Instance of the Package Object.
*
* @return array
*/
protected function parseAutoloadsType( array $packageMap, $type, PackageInterface $mainPackage ) {
$autoloads = array();
foreach ( $packageMap as $item ) {
list($package, $installPath) = $item;
$autoload = $package->getAutoload();
if ( $package === $mainPackage ) {
$autoload = array_merge_recursive( $autoload, $package->getDevAutoload() );
}
if ( null !== $package->getTargetDir() && $package !== $mainPackage ) {
$installPath = substr( $installPath, 0, -strlen( '/' . $package->getTargetDir() ) );
}
if ( in_array( $type, array( 'psr-4', 'psr-0' ), true ) && isset( $autoload[ $type ] ) && is_array( $autoload[ $type ] ) ) {
foreach ( $autoload[ $type ] as $namespace => $paths ) {
$paths = is_array( $paths ) ? $paths : array( $paths );
foreach ( $paths as $path ) {
$relativePath = empty( $installPath ) ? ( empty( $path ) ? '.' : $path ) : $installPath . '/' . $path;
$autoloads[ $namespace ][] = array(
'path' => $relativePath,
'version' => $package->getVersion(), // Version of the class comes from the package - should we try to parse it?
);
}
}
}
if ( 'classmap' === $type && isset( $autoload['classmap'] ) && is_array( $autoload['classmap'] ) ) {
foreach ( $autoload['classmap'] as $paths ) {
$paths = is_array( $paths ) ? $paths : array( $paths );
foreach ( $paths as $path ) {
$relativePath = empty( $installPath ) ? ( empty( $path ) ? '.' : $path ) : $installPath . '/' . $path;
$autoloads[] = array(
'path' => $relativePath,
'version' => $package->getVersion(), // Version of the class comes from the package - should we try to parse it?
);
}
}
}
if ( 'files' === $type && isset( $autoload['files'] ) && is_array( $autoload['files'] ) ) {
foreach ( $autoload['files'] as $paths ) {
$paths = is_array( $paths ) ? $paths : array( $paths );
foreach ( $paths as $path ) {
$relativePath = empty( $installPath ) ? ( empty( $path ) ? '.' : $path ) : $installPath . '/' . $path;
$autoloads[ $this->getFileIdentifier( $package, $path ) ] = array(
'path' => $relativePath,
'version' => $package->getVersion(), // Version of the file comes from the package - should we try to parse it?
);
}
}
}
}
return $autoloads;
}
/**
* Given Composer's autoloads this will convert them to a version that we can use to generate the manifests.
*
* When the $scanPsrPackages argument is true, PSR-4 namespaces are converted to classmaps. When $scanPsrPackages
* is false, PSR-4 namespaces are not converted to classmaps.
*
* PSR-0 namespaces are always converted to classmaps.
*
* @param array $autoloads The autoloads we want to process.
* @param bool $scanPsrPackages Whether or not PSR-4 packages should be converted to a classmap.
* @param string $vendorPath The path to the vendor directory.
* @param string $basePath The path to the current directory.
*
* @return array $processedAutoloads
*/
private function processAutoloads( $autoloads, $scanPsrPackages, $vendorPath, $basePath ) {
$processor = new AutoloadProcessor(
function ( $path, $excludedClasses, $namespace ) use ( $basePath ) {
$dir = $this->filesystem->normalizePath(
$this->filesystem->isAbsolutePath( $path ) ? $path : $basePath . '/' . $path
);
// Composer 2.4 changed the name of the class.
if ( class_exists( \Composer\ClassMapGenerator\ClassMapGenerator::class ) ) {
if ( ! is_dir( $dir ) && ! is_file( $dir ) ) {
return array();
}
$generator = new \Composer\ClassMapGenerator\ClassMapGenerator();
$generator->scanPaths( $dir, $excludedClasses, 'classmap', empty( $namespace ) ? null : $namespace );
return $generator->getClassMap()->getMap();
}
return \Composer\Autoload\ClassMapGenerator::createMap(
$dir,
$excludedClasses,
null, // Don't pass the IOInterface since the normal autoload generation will have reported already.
empty( $namespace ) ? null : $namespace
);
},
function ( $path ) use ( $basePath, $vendorPath ) {
return $this->getPathCode( $this->filesystem, $basePath, $vendorPath, $path );
}
);
return array(
'psr-4' => $processor->processPsr4Packages( $autoloads, $scanPsrPackages ),
'classmap' => $processor->processClassmap( $autoloads, $scanPsrPackages ),
'files' => $processor->processFiles( $autoloads ),
);
}
/**
* Removes all of the legacy autoloader files so they don't cause any problems.
*
* @param string $outDir The directory legacy files are written to.
*/
private function removeLegacyFiles( $outDir ) {
$files = array(
'autoload_functions.php',
'class-autoloader-handler.php',
'class-classes-handler.php',
'class-files-handler.php',
'class-plugins-handler.php',
'class-version-selector.php',
);
foreach ( $files as $file ) {
$this->filesystem->remove( $outDir . '/' . $file );
}
}
/**
* Writes all of the autoloader files to disk.
*
* @param string $outDir The directory to write to.
* @param string $suffix The unique autoloader suffix.
*/
private function writeAutoloaderFiles( $outDir, $suffix ) {
$this->io->writeError( "<info>Generating jetpack autoloader ($outDir)</info>" );
// We will remove all autoloader files to generate this again.
$this->filesystem->emptyDirectory( $outDir );
// Write the autoloader files.
AutoloadFileWriter::copyAutoloaderFiles( $this->io, $outDir, $suffix );
}
/**
* Writes all of the manifest files to disk.
*
* @param string $outDir The directory to write to.
* @param array $processedAutoloads The processed autoloads.
*/
private function writeManifests( $outDir, $processedAutoloads ) {
$this->io->writeError( "<info>Generating jetpack autoloader manifests ($outDir)</info>" );
$manifestFiles = array(
'classmap' => 'jetpack_autoload_classmap.php',
'psr-4' => 'jetpack_autoload_psr4.php',
'files' => 'jetpack_autoload_filemap.php',
);
foreach ( $manifestFiles as $key => $file ) {
// Make sure the file doesn't exist so it isn't there if we don't write it.
$this->filesystem->remove( $outDir . '/' . $file );
if ( empty( $processedAutoloads[ $key ] ) ) {
continue;
}
$content = ManifestGenerator::buildManifest( $key, $file, $processedAutoloads[ $key ] );
if ( empty( $content ) ) {
continue;
}
if ( file_put_contents( $outDir . '/' . $file, $content ) ) {
$this->io->writeError( " <info>Generated: $file</info>" );
} else {
$this->io->writeError( " <error>Error: $file</error>" );
}
}
}
}
automattic/jetpack-autoloader/src/AutoloadProcessor.php 0000644 00000012407 15153552356 0017462 0 ustar 00 <?php // phpcs:ignore WordPress.Files.FileName
/**
* Autoload Processor.
*
* @package automattic/jetpack-autoloader
*/
// phpcs:disable WordPress.Files.FileName.InvalidClassFileName
// phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
// phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
// phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase
// phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
// phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase
namespace Automattic\Jetpack\Autoloader;
/**
* Class AutoloadProcessor.
*/
class AutoloadProcessor {
/**
* A callable for scanning a directory for all of its classes.
*
* @var callable
*/
private $classmapScanner;
/**
* A callable for transforming a path into one to be used in code.
*
* @var callable
*/
private $pathCodeTransformer;
/**
* The constructor.
*
* @param callable $classmapScanner A callable for scanning a directory for all of its classes.
* @param callable $pathCodeTransformer A callable for transforming a path into one to be used in code.
*/
public function __construct( $classmapScanner, $pathCodeTransformer ) {
$this->classmapScanner = $classmapScanner;
$this->pathCodeTransformer = $pathCodeTransformer;
}
/**
* Processes the classmap autoloads into a relative path format including the version for each file.
*
* @param array $autoloads The autoloads we are processing.
* @param bool $scanPsrPackages Whether or not PSR packages should be converted to a classmap.
*
* @return array $processed
*/
public function processClassmap( $autoloads, $scanPsrPackages ) {
// We can't scan PSR packages if we don't actually have any.
if ( empty( $autoloads['psr-4'] ) ) {
$scanPsrPackages = false;
}
if ( empty( $autoloads['classmap'] ) && ! $scanPsrPackages ) {
return null;
}
$excludedClasses = null;
if ( ! empty( $autoloads['exclude-from-classmap'] ) ) {
$excludedClasses = '{(' . implode( '|', $autoloads['exclude-from-classmap'] ) . ')}';
}
$processed = array();
if ( $scanPsrPackages ) {
foreach ( $autoloads['psr-4'] as $namespace => $sources ) {
$namespace = empty( $namespace ) ? null : $namespace;
foreach ( $sources as $source ) {
$classmap = call_user_func( $this->classmapScanner, $source['path'], $excludedClasses, $namespace );
foreach ( $classmap as $class => $path ) {
$processed[ $class ] = array(
'version' => $source['version'],
'path' => call_user_func( $this->pathCodeTransformer, $path ),
);
}
}
}
}
/*
* PSR-0 namespaces are converted to classmaps for both optimized and unoptimized autoloaders because any new
* development should use classmap or PSR-4 autoloading.
*/
if ( ! empty( $autoloads['psr-0'] ) ) {
foreach ( $autoloads['psr-0'] as $namespace => $sources ) {
$namespace = empty( $namespace ) ? null : $namespace;
foreach ( $sources as $source ) {
$classmap = call_user_func( $this->classmapScanner, $source['path'], $excludedClasses, $namespace );
foreach ( $classmap as $class => $path ) {
$processed[ $class ] = array(
'version' => $source['version'],
'path' => call_user_func( $this->pathCodeTransformer, $path ),
);
}
}
}
}
if ( ! empty( $autoloads['classmap'] ) ) {
foreach ( $autoloads['classmap'] as $package ) {
$classmap = call_user_func( $this->classmapScanner, $package['path'], $excludedClasses, null );
foreach ( $classmap as $class => $path ) {
$processed[ $class ] = array(
'version' => $package['version'],
'path' => call_user_func( $this->pathCodeTransformer, $path ),
);
}
}
}
ksort( $processed );
return $processed;
}
/**
* Processes the PSR-4 autoloads into a relative path format including the version for each file.
*
* @param array $autoloads The autoloads we are processing.
* @param bool $scanPsrPackages Whether or not PSR packages should be converted to a classmap.
*
* @return array $processed
*/
public function processPsr4Packages( $autoloads, $scanPsrPackages ) {
if ( $scanPsrPackages || empty( $autoloads['psr-4'] ) ) {
return null;
}
$processed = array();
foreach ( $autoloads['psr-4'] as $namespace => $packages ) {
$namespace = empty( $namespace ) ? null : $namespace;
$paths = array();
foreach ( $packages as $package ) {
$paths[] = call_user_func( $this->pathCodeTransformer, $package['path'] );
}
$processed[ $namespace ] = array(
'version' => $package['version'],
'path' => $paths,
);
}
return $processed;
}
/**
* Processes the file autoloads into a relative format including the version for each file.
*
* @param array $autoloads The autoloads we are processing.
*
* @return array|null $processed
*/
public function processFiles( $autoloads ) {
if ( empty( $autoloads['files'] ) ) {
return null;
}
$processed = array();
foreach ( $autoloads['files'] as $file_id => $package ) {
$processed[ $file_id ] = array(
'version' => $package['version'],
'path' => call_user_func( $this->pathCodeTransformer, $package['path'] ),
);
}
return $processed;
}
}
automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php 0000644 00000013542 15153552356 0020464 0 ustar 00 <?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
/**
* Custom Autoloader Composer Plugin, hooks into composer events to generate the custom autoloader.
*
* @package automattic/jetpack-autoloader
*/
// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_useFound
// phpcs:disable PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound
// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_namespaceFound
// phpcs:disable WordPress.Files.FileName.NotHyphenatedLowercase
// phpcs:disable WordPress.Files.FileName.InvalidClassFileName
// phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
namespace Automattic\Jetpack\Autoloader;
use Composer\Composer;
use Composer\EventDispatcher\EventSubscriberInterface;
use Composer\IO\IOInterface;
use Composer\Plugin\PluginInterface;
use Composer\Script\Event;
use Composer\Script\ScriptEvents;
/**
* Class CustomAutoloaderPlugin.
*
* @package automattic/jetpack-autoloader
*/
class CustomAutoloaderPlugin implements PluginInterface, EventSubscriberInterface {
/**
* IO object.
*
* @var IOInterface IO object.
*/
private $io;
/**
* Composer object.
*
* @var Composer Composer object.
*/
private $composer;
/**
* Do nothing.
*
* @param Composer $composer Composer object.
* @param IOInterface $io IO object.
*/
public function activate( Composer $composer, IOInterface $io ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
$this->composer = $composer;
$this->io = $io;
}
/**
* Do nothing.
* phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
*
* @param Composer $composer Composer object.
* @param IOInterface $io IO object.
*/
public function deactivate( Composer $composer, IOInterface $io ) {
/*
* Intentionally left empty. This is a PluginInterface method.
* phpcs:enable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
*/
}
/**
* Do nothing.
* phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
*
* @param Composer $composer Composer object.
* @param IOInterface $io IO object.
*/
public function uninstall( Composer $composer, IOInterface $io ) {
/*
* Intentionally left empty. This is a PluginInterface method.
* phpcs:enable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
*/
}
/**
* Tell composer to listen for events and do something with them.
*
* @return array List of subscribed events.
*/
public static function getSubscribedEvents() {
return array(
ScriptEvents::POST_AUTOLOAD_DUMP => 'postAutoloadDump',
);
}
/**
* Generate the custom autolaoder.
*
* @param Event $event Script event object.
*/
public function postAutoloadDump( Event $event ) {
// When the autoloader is not required by the root package we don't want to execute it.
// This prevents unwanted transitive execution that generates unused autoloaders or
// at worst throws fatal executions.
if ( ! $this->isRequiredByRoot() ) {
return;
}
$config = $this->composer->getConfig();
if ( 'vendor' !== $config->raw()['config']['vendor-dir'] ) {
$this->io->writeError( "\n<error>An error occurred while generating the autoloader files:", true );
$this->io->writeError( 'The project\'s composer.json or composer environment set a non-default vendor directory.', true );
$this->io->writeError( 'The default composer vendor directory must be used.</error>', true );
exit();
}
$installationManager = $this->composer->getInstallationManager();
$repoManager = $this->composer->getRepositoryManager();
$localRepo = $repoManager->getLocalRepository();
$package = $this->composer->getPackage();
$optimize = $event->getFlags()['optimize'];
$suffix = $this->determineSuffix();
$generator = new AutoloadGenerator( $this->io );
$generator->dump( $this->composer, $config, $localRepo, $package, $installationManager, 'composer', $optimize, $suffix );
}
/**
* Determine the suffix for the autoloader class.
*
* Reuses an existing suffix from vendor/autoload_packages.php or vendor/autoload.php if possible.
*
* @return string Suffix.
*/
private function determineSuffix() {
$config = $this->composer->getConfig();
$vendorPath = $config->get( 'vendor-dir' );
// Command line.
$suffix = $config->get( 'autoloader-suffix' );
if ( $suffix ) {
return $suffix;
}
// Reuse our own suffix, if any.
if ( is_readable( $vendorPath . '/autoload_packages.php' ) ) {
$content = file_get_contents( $vendorPath . '/autoload_packages.php' );
if ( preg_match( '/^namespace Automattic\\\\Jetpack\\\\Autoloader\\\\jp([^;\s]+);/m', $content, $match ) ) {
return $match[1];
}
}
// Reuse Composer's suffix, if any.
if ( is_readable( $vendorPath . '/autoload.php' ) ) {
$content = file_get_contents( $vendorPath . '/autoload.php' );
if ( preg_match( '{ComposerAutoloaderInit([^:\s]+)::}', $content, $match ) ) {
return $match[1];
}
}
// Generate a random suffix.
return md5( uniqid( '', true ) );
}
/**
* Checks to see whether or not the root package is the one that required the autoloader.
*
* @return bool
*/
private function isRequiredByRoot() {
$package = $this->composer->getPackage();
$requires = $package->getRequires();
if ( ! is_array( $requires ) ) {
$requires = array();
}
$devRequires = $package->getDevRequires();
if ( ! is_array( $devRequires ) ) {
$devRequires = array();
}
$requires = array_merge( $requires, $devRequires );
if ( empty( $requires ) ) {
$this->io->writeError( "\n<error>The package is not required and this should never happen?</error>", true );
exit();
}
foreach ( $requires as $require ) {
if ( 'automattic/jetpack-autoloader' === $require->getTarget() ) {
return true;
}
}
return false;
}
}
automattic/jetpack-autoloader/src/ManifestGenerator.php 0000644 00000007132 15153552356 0017426 0 ustar 00 <?php // phpcs:ignore WordPress.Files.FileName
/**
* Manifest Generator.
*
* @package automattic/jetpack-autoloader
*/
// phpcs:disable WordPress.Files.FileName.InvalidClassFileName
// phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
// phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
// phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase
// phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
// phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase
// phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_export
namespace Automattic\Jetpack\Autoloader;
/**
* Class ManifestGenerator.
*/
class ManifestGenerator {
/**
* Builds a manifest file for the given autoloader type.
*
* @param string $autoloaderType The type of autoloader to build a manifest for.
* @param string $fileName The filename of the manifest.
* @param array $content The manifest content to generate using.
*
* @return string|null $manifestFile
* @throws \InvalidArgumentException When an invalid autoloader type is given.
*/
public static function buildManifest( $autoloaderType, $fileName, $content ) {
if ( empty( $content ) ) {
return null;
}
switch ( $autoloaderType ) {
case 'classmap':
case 'files':
return self::buildStandardManifest( $fileName, $content );
case 'psr-4':
return self::buildPsr4Manifest( $fileName, $content );
}
throw new \InvalidArgumentException( 'An invalid manifest type of ' . $autoloaderType . ' was passed!' );
}
/**
* Builds the contents for the standard manifest file.
*
* @param string $fileName The filename we are building.
* @param array $manifestData The formatted data for the manifest.
*
* @return string|null $manifestFile
*/
private static function buildStandardManifest( $fileName, $manifestData ) {
$fileContent = PHP_EOL;
foreach ( $manifestData as $key => $data ) {
$key = var_export( $key, true );
$versionCode = var_export( $data['version'], true );
$fileContent .= <<<MANIFEST_CODE
$key => array(
'version' => $versionCode,
'path' => {$data['path']}
),
MANIFEST_CODE;
$fileContent .= PHP_EOL;
}
return self::buildFile( $fileName, $fileContent );
}
/**
* Builds the contents for the PSR-4 manifest file.
*
* @param string $fileName The filename we are building.
* @param array $namespaces The formatted PSR-4 data for the manifest.
*
* @return string|null $manifestFile
*/
private static function buildPsr4Manifest( $fileName, $namespaces ) {
$fileContent = PHP_EOL;
foreach ( $namespaces as $namespace => $data ) {
$namespaceCode = var_export( $namespace, true );
$versionCode = var_export( $data['version'], true );
$pathCode = 'array( ' . implode( ', ', $data['path'] ) . ' )';
$fileContent .= <<<MANIFEST_CODE
$namespaceCode => array(
'version' => $versionCode,
'path' => $pathCode
),
MANIFEST_CODE;
$fileContent .= PHP_EOL;
}
return self::buildFile( $fileName, $fileContent );
}
/**
* Generate the PHP that will be used in the file.
*
* @param string $fileName The filename we are building.
* @param string $content The content to be written into the file.
*
* @return string $fileContent
*/
private static function buildFile( $fileName, $content ) {
return <<<INCLUDE_FILE
<?php
// This file `$fileName` was auto generated by automattic/jetpack-autoloader.
\$vendorDir = dirname(__DIR__);
\$baseDir = dirname(\$vendorDir);
return array($content);
INCLUDE_FILE;
}
}
automattic/jetpack-autoloader/src/autoload.php 0000644 00000000173 15153552356 0015617 0 ustar 00 <?php
/* HEADER */ // phpcs:ignore
require_once __DIR__ . '/jetpack-autoloader/class-autoloader.php';
Autoloader::init();
automattic/jetpack-autoloader/src/class-autoloader-handler.php 0000644 00000010465 15153552356 0020671 0 ustar 00 <?php
/* HEADER */ // phpcs:ignore
use Automattic\Jetpack\Autoloader\AutoloadGenerator;
/**
* This class selects the package version for the autoloader.
*/
class Autoloader_Handler {
/**
* The PHP_Autoloader instance.
*
* @var PHP_Autoloader
*/
private $php_autoloader;
/**
* The Hook_Manager instance.
*
* @var Hook_Manager
*/
private $hook_manager;
/**
* The Manifest_Reader instance.
*
* @var Manifest_Reader
*/
private $manifest_reader;
/**
* The Version_Selector instance.
*
* @var Version_Selector
*/
private $version_selector;
/**
* The constructor.
*
* @param PHP_Autoloader $php_autoloader The PHP_Autoloader instance.
* @param Hook_Manager $hook_manager The Hook_Manager instance.
* @param Manifest_Reader $manifest_reader The Manifest_Reader instance.
* @param Version_Selector $version_selector The Version_Selector instance.
*/
public function __construct( $php_autoloader, $hook_manager, $manifest_reader, $version_selector ) {
$this->php_autoloader = $php_autoloader;
$this->hook_manager = $hook_manager;
$this->manifest_reader = $manifest_reader;
$this->version_selector = $version_selector;
}
/**
* Checks to see whether or not an autoloader is currently in the process of initializing.
*
* @return bool
*/
public function is_initializing() {
// If no version has been set it means that no autoloader has started initializing yet.
global $jetpack_autoloader_latest_version;
if ( ! isset( $jetpack_autoloader_latest_version ) ) {
return false;
}
// When the version is set but the classmap is not it ALWAYS means that this is the
// latest autoloader and is being included by an older one.
global $jetpack_packages_classmap;
if ( empty( $jetpack_packages_classmap ) ) {
return true;
}
// Version 2.4.0 added a new global and altered the reset semantics. We need to check
// the other global as well since it may also point at initialization.
// Note: We don't need to check for the class first because every autoloader that
// will set the latest version global requires this class in the classmap.
$replacing_version = $jetpack_packages_classmap[ AutoloadGenerator::class ]['version'];
if ( $this->version_selector->is_dev_version( $replacing_version ) || version_compare( $replacing_version, '2.4.0.0', '>=' ) ) {
global $jetpack_autoloader_loader;
if ( ! isset( $jetpack_autoloader_loader ) ) {
return true;
}
}
return false;
}
/**
* Activates an autoloader using the given plugins and activates it.
*
* @param string[] $plugins The plugins to initialize the autoloader for.
*/
public function activate_autoloader( $plugins ) {
global $jetpack_packages_psr4;
$jetpack_packages_psr4 = array();
$this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_psr4.php', $jetpack_packages_psr4 );
global $jetpack_packages_classmap;
$jetpack_packages_classmap = array();
$this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_classmap.php', $jetpack_packages_classmap );
global $jetpack_packages_filemap;
$jetpack_packages_filemap = array();
$this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_filemap.php', $jetpack_packages_filemap );
$loader = new Version_Loader(
$this->version_selector,
$jetpack_packages_classmap,
$jetpack_packages_psr4,
$jetpack_packages_filemap
);
$this->php_autoloader->register_autoloader( $loader );
// Now that the autoloader is active we can load the filemap.
$loader->load_filemap();
}
/**
* Resets the active autoloader and all related global state.
*/
public function reset_autoloader() {
$this->php_autoloader->unregister_autoloader();
$this->hook_manager->reset();
// Clear all of the autoloader globals so that older autoloaders don't do anything strange.
global $jetpack_autoloader_latest_version;
$jetpack_autoloader_latest_version = null;
global $jetpack_packages_classmap;
$jetpack_packages_classmap = array(); // Must be array to avoid exceptions in old autoloaders!
global $jetpack_packages_psr4;
$jetpack_packages_psr4 = array(); // Must be array to avoid exceptions in old autoloaders!
global $jetpack_packages_filemap;
$jetpack_packages_filemap = array(); // Must be array to avoid exceptions in old autoloaders!
}
}
automattic/jetpack-autoloader/src/class-autoloader-locator.php 0000644 00000003616 15153552356 0020717 0 ustar 00 <?php
/* HEADER */ // phpcs:ignore
use Automattic\Jetpack\Autoloader\AutoloadGenerator;
/**
* This class locates autoloaders.
*/
class Autoloader_Locator {
/**
* The object for comparing autoloader versions.
*
* @var Version_Selector
*/
private $version_selector;
/**
* The constructor.
*
* @param Version_Selector $version_selector The version selector object.
*/
public function __construct( $version_selector ) {
$this->version_selector = $version_selector;
}
/**
* Finds the path to the plugin with the latest autoloader.
*
* @param array $plugin_paths An array of plugin paths.
* @param string $latest_version The latest version reference.
*
* @return string|null
*/
public function find_latest_autoloader( $plugin_paths, &$latest_version ) {
$latest_plugin = null;
foreach ( $plugin_paths as $plugin_path ) {
$version = $this->get_autoloader_version( $plugin_path );
if ( ! $this->version_selector->is_version_update_required( $latest_version, $version ) ) {
continue;
}
$latest_version = $version;
$latest_plugin = $plugin_path;
}
return $latest_plugin;
}
/**
* Gets the path to the autoloader.
*
* @param string $plugin_path The path to the plugin.
*
* @return string
*/
public function get_autoloader_path( $plugin_path ) {
return trailingslashit( $plugin_path ) . 'vendor/autoload_packages.php';
}
/**
* Gets the version for the autoloader.
*
* @param string $plugin_path The path to the plugin.
*
* @return string|null
*/
public function get_autoloader_version( $plugin_path ) {
$classmap = trailingslashit( $plugin_path ) . 'vendor/composer/jetpack_autoload_classmap.php';
if ( ! file_exists( $classmap ) ) {
return null;
}
$classmap = require $classmap;
if ( isset( $classmap[ AutoloadGenerator::class ] ) ) {
return $classmap[ AutoloadGenerator::class ]['version'];
}
return null;
}
}
automattic/jetpack-autoloader/src/class-autoloader.php 0000644 00000007573 15153552356 0017264 0 ustar 00 <?php
/* HEADER */ // phpcs:ignore
/**
* This class handles management of the actual PHP autoloader.
*/
class Autoloader {
/**
* Checks to see whether or not the autoloader should be initialized and then initializes it if so.
*
* @param Container|null $container The container we want to use for autoloader initialization. If none is given
* then a container will be created automatically.
*/
public static function init( $container = null ) {
// The container holds and manages the lifecycle of our dependencies
// to make them easier to work with and increase flexibility.
if ( ! isset( $container ) ) {
require_once __DIR__ . '/class-container.php';
$container = new Container();
}
// phpcs:disable Generic.Commenting.DocComment.MissingShort
/** @var Autoloader_Handler $autoloader_handler */
$autoloader_handler = $container->get( Autoloader_Handler::class );
// If the autoloader is already initializing it means that it has included us as the latest.
$was_included_by_autoloader = $autoloader_handler->is_initializing();
/** @var Plugin_Locator $plugin_locator */
$plugin_locator = $container->get( Plugin_Locator::class );
/** @var Plugins_Handler $plugins_handler */
$plugins_handler = $container->get( Plugins_Handler::class );
// The current plugin is the one that we are attempting to initialize here.
$current_plugin = $plugin_locator->find_current_plugin();
// The active plugins are those that we were able to discover on the site. This list will not
// include mu-plugins, those activated by code, or those who are hidden by filtering. We also
// want to take care to not consider the current plugin unknown if it was included by an
// autoloader. This avoids the case where a plugin will be marked "active" while deactivated
// due to it having the latest autoloader.
$active_plugins = $plugins_handler->get_active_plugins( true, ! $was_included_by_autoloader );
// The cached plugins are all of those that were active or discovered by the autoloader during a previous request.
// Note that it's possible this list will include plugins that have since been deactivated, but after a request
// the cache should be updated and the deactivated plugins will be removed.
$cached_plugins = $plugins_handler->get_cached_plugins();
// We combine the active list and cached list to preemptively load classes for plugins that are
// presently unknown but will be loaded during the request. While this may result in us considering packages in
// deactivated plugins there shouldn't be any problems as a result and the eventual consistency is sufficient.
$all_plugins = array_merge( $active_plugins, $cached_plugins );
// In particular we also include the current plugin to address the case where it is the latest autoloader
// but also unknown (and not cached). We don't want it in the active list because we don't know that it
// is active but we need it in the all plugins list so that it is considered by the autoloader.
$all_plugins[] = $current_plugin;
// We require uniqueness in the array to avoid processing the same plugin more than once.
$all_plugins = array_values( array_unique( $all_plugins ) );
/** @var Latest_Autoloader_Guard $guard */
$guard = $container->get( Latest_Autoloader_Guard::class );
if ( $guard->should_stop_init( $current_plugin, $all_plugins, $was_included_by_autoloader ) ) {
return;
}
// Initialize the autoloader using the handler now that we're ready.
$autoloader_handler->activate_autoloader( $all_plugins );
/** @var Hook_Manager $hook_manager */
$hook_manager = $container->get( Hook_Manager::class );
// Register a shutdown handler to clean up the autoloader.
$hook_manager->add_action( 'shutdown', new Shutdown_Handler( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) );
// phpcs:enable Generic.Commenting.DocComment.MissingShort
}
}
automattic/jetpack-autoloader/src/class-container.php 0000644 00000011157 15153552356 0017100 0 ustar 00 <?php
/* HEADER */ // phpcs:ignore
/**
* This class manages the files and dependencies of the autoloader.
*/
class Container {
/**
* Since each autoloader's class files exist within their own namespace we need a map to
* convert between the local class and a shared key. Note that no version checking is
* performed on these dependencies and the first autoloader to register will be the
* one that is utilized.
*/
const SHARED_DEPENDENCY_KEYS = array(
Hook_Manager::class => 'Hook_Manager',
);
/**
* A map of all the dependencies we've registered with the container and created.
*
* @var array
*/
protected $dependencies;
/**
* The constructor.
*/
public function __construct() {
$this->dependencies = array();
$this->register_shared_dependencies();
$this->register_dependencies();
$this->initialize_globals();
}
/**
* Gets a dependency out of the container.
*
* @param string $class The class to fetch.
*
* @return mixed
* @throws \InvalidArgumentException When a class that isn't registered with the container is fetched.
*/
public function get( $class ) {
if ( ! isset( $this->dependencies[ $class ] ) ) {
throw new \InvalidArgumentException( "Class '$class' is not registered with the container." );
}
return $this->dependencies[ $class ];
}
/**
* Registers all of the dependencies that are shared between all instances of the autoloader.
*/
private function register_shared_dependencies() {
global $jetpack_autoloader_container_shared;
if ( ! isset( $jetpack_autoloader_container_shared ) ) {
$jetpack_autoloader_container_shared = array();
}
$key = self::SHARED_DEPENDENCY_KEYS[ Hook_Manager::class ];
if ( ! isset( $jetpack_autoloader_container_shared[ $key ] ) ) {
require_once __DIR__ . '/class-hook-manager.php';
$jetpack_autoloader_container_shared[ $key ] = new Hook_Manager();
}
$this->dependencies[ Hook_Manager::class ] = &$jetpack_autoloader_container_shared[ $key ];
}
/**
* Registers all of the dependencies with the container.
*/
private function register_dependencies() {
require_once __DIR__ . '/class-path-processor.php';
$this->dependencies[ Path_Processor::class ] = new Path_Processor();
require_once __DIR__ . '/class-plugin-locator.php';
$this->dependencies[ Plugin_Locator::class ] = new Plugin_Locator(
$this->get( Path_Processor::class )
);
require_once __DIR__ . '/class-version-selector.php';
$this->dependencies[ Version_Selector::class ] = new Version_Selector();
require_once __DIR__ . '/class-autoloader-locator.php';
$this->dependencies[ Autoloader_Locator::class ] = new Autoloader_Locator(
$this->get( Version_Selector::class )
);
require_once __DIR__ . '/class-php-autoloader.php';
$this->dependencies[ PHP_Autoloader::class ] = new PHP_Autoloader();
require_once __DIR__ . '/class-manifest-reader.php';
$this->dependencies[ Manifest_Reader::class ] = new Manifest_Reader(
$this->get( Version_Selector::class )
);
require_once __DIR__ . '/class-plugins-handler.php';
$this->dependencies[ Plugins_Handler::class ] = new Plugins_Handler(
$this->get( Plugin_Locator::class ),
$this->get( Path_Processor::class )
);
require_once __DIR__ . '/class-autoloader-handler.php';
$this->dependencies[ Autoloader_Handler::class ] = new Autoloader_Handler(
$this->get( PHP_Autoloader::class ),
$this->get( Hook_Manager::class ),
$this->get( Manifest_Reader::class ),
$this->get( Version_Selector::class )
);
require_once __DIR__ . '/class-latest-autoloader-guard.php';
$this->dependencies[ Latest_Autoloader_Guard::class ] = new Latest_Autoloader_Guard(
$this->get( Plugins_Handler::class ),
$this->get( Autoloader_Handler::class ),
$this->get( Autoloader_Locator::class )
);
// Register any classes that we will use elsewhere.
require_once __DIR__ . '/class-version-loader.php';
require_once __DIR__ . '/class-shutdown-handler.php';
}
/**
* Initializes any of the globals needed by the autoloader.
*/
private function initialize_globals() {
/*
* This global was retired in version 2.9. The value is set to 'false' to maintain
* compatibility with older versions of the autoloader.
*/
global $jetpack_autoloader_including_latest;
$jetpack_autoloader_including_latest = false;
// Not all plugins can be found using the locator. In cases where a plugin loads the autoloader
// but was not discoverable, we will record them in this array to track them as "active".
global $jetpack_autoloader_activating_plugins_paths;
if ( ! isset( $jetpack_autoloader_activating_plugins_paths ) ) {
$jetpack_autoloader_activating_plugins_paths = array();
}
}
}
automattic/jetpack-autoloader/src/class-hook-manager.php 0000644 00000003643 15153552356 0017467 0 ustar 00 <?php
/* HEADER */ // phpcs:ignore
/**
* Allows the latest autoloader to register hooks that can be removed when the autoloader is reset.
*/
class Hook_Manager {
/**
* An array containing all of the hooks that we've registered.
*
* @var array
*/
private $registered_hooks;
/**
* The constructor.
*/
public function __construct() {
$this->registered_hooks = array();
}
/**
* Adds an action to WordPress and registers it internally.
*
* @param string $tag The name of the action which is hooked.
* @param callable $callable The function to call.
* @param int $priority Used to specify the priority of the action.
* @param int $accepted_args Used to specify the number of arguments the callable accepts.
*/
public function add_action( $tag, $callable, $priority = 10, $accepted_args = 1 ) {
$this->registered_hooks[ $tag ][] = array(
'priority' => $priority,
'callable' => $callable,
);
add_action( $tag, $callable, $priority, $accepted_args );
}
/**
* Adds a filter to WordPress and registers it internally.
*
* @param string $tag The name of the filter which is hooked.
* @param callable $callable The function to call.
* @param int $priority Used to specify the priority of the filter.
* @param int $accepted_args Used to specify the number of arguments the callable accepts.
*/
public function add_filter( $tag, $callable, $priority = 10, $accepted_args = 1 ) {
$this->registered_hooks[ $tag ][] = array(
'priority' => $priority,
'callable' => $callable,
);
add_filter( $tag, $callable, $priority, $accepted_args );
}
/**
* Removes all of the registered hooks.
*/
public function reset() {
foreach ( $this->registered_hooks as $tag => $hooks ) {
foreach ( $hooks as $hook ) {
remove_filter( $tag, $hook['callable'], $hook['priority'] );
}
}
$this->registered_hooks = array();
}
}
automattic/jetpack-autoloader/src/class-latest-autoloader-guard.php 0000644 00000005062 15153552356 0021645 0 ustar 00 <?php
/* HEADER */ // phpcs:ignore
/**
* This class ensures that we're only executing the latest autoloader.
*/
class Latest_Autoloader_Guard {
/**
* The Plugins_Handler instance.
*
* @var Plugins_Handler
*/
private $plugins_handler;
/**
* The Autoloader_Handler instance.
*
* @var Autoloader_Handler
*/
private $autoloader_handler;
/**
* The Autoloader_locator instance.
*
* @var Autoloader_Locator
*/
private $autoloader_locator;
/**
* The constructor.
*
* @param Plugins_Handler $plugins_handler The Plugins_Handler instance.
* @param Autoloader_Handler $autoloader_handler The Autoloader_Handler instance.
* @param Autoloader_Locator $autoloader_locator The Autoloader_Locator instance.
*/
public function __construct( $plugins_handler, $autoloader_handler, $autoloader_locator ) {
$this->plugins_handler = $plugins_handler;
$this->autoloader_handler = $autoloader_handler;
$this->autoloader_locator = $autoloader_locator;
}
/**
* Indicates whether or not the autoloader should be initialized. Note that this function
* has the side-effect of actually loading the latest autoloader in the event that this
* is not it.
*
* @param string $current_plugin The current plugin we're checking.
* @param string[] $plugins The active plugins to check for autoloaders in.
* @param bool $was_included_by_autoloader Indicates whether or not this autoloader was included by another.
*
* @return bool True if we should stop initialization, otherwise false.
*/
public function should_stop_init( $current_plugin, $plugins, $was_included_by_autoloader ) {
global $jetpack_autoloader_latest_version;
// We need to reset the autoloader when the plugins change because
// that means the autoloader was generated with a different list.
if ( $this->plugins_handler->have_plugins_changed( $plugins ) ) {
$this->autoloader_handler->reset_autoloader();
}
// When the latest autoloader has already been found we don't need to search for it again.
// We should take care however because this will also trigger if the autoloader has been
// included by an older one.
if ( isset( $jetpack_autoloader_latest_version ) && ! $was_included_by_autoloader ) {
return true;
}
$latest_plugin = $this->autoloader_locator->find_latest_autoloader( $plugins, $jetpack_autoloader_latest_version );
if ( isset( $latest_plugin ) && $latest_plugin !== $current_plugin ) {
require $this->autoloader_locator->get_autoloader_path( $latest_plugin );
return true;
}
return false;
}
}
automattic/jetpack-autoloader/src/class-manifest-reader.php 0000644 00000004673 15153552356 0020171 0 ustar 00 <?php
/* HEADER */ // phpcs:ignore
/**
* This class reads autoloader manifest files.
*/
class Manifest_Reader {
/**
* The Version_Selector object.
*
* @var Version_Selector
*/
private $version_selector;
/**
* The constructor.
*
* @param Version_Selector $version_selector The Version_Selector object.
*/
public function __construct( $version_selector ) {
$this->version_selector = $version_selector;
}
/**
* Reads all of the manifests in the given plugin paths.
*
* @param array $plugin_paths The paths to the plugins we're loading the manifest in.
* @param string $manifest_path The path that we're loading the manifest from in each plugin.
* @param array $path_map The path map to add the contents of the manifests to.
*
* @return array $path_map The path map we've built using the manifests in each plugin.
*/
public function read_manifests( $plugin_paths, $manifest_path, &$path_map ) {
$file_paths = array_map(
function ( $path ) use ( $manifest_path ) {
return trailingslashit( $path ) . $manifest_path;
},
$plugin_paths
);
foreach ( $file_paths as $path ) {
$this->register_manifest( $path, $path_map );
}
return $path_map;
}
/**
* Registers a plugin's manifest file with the path map.
*
* @param string $manifest_path The absolute path to the manifest that we're loading.
* @param array $path_map The path map to add the contents of the manifest to.
*/
protected function register_manifest( $manifest_path, &$path_map ) {
if ( ! is_readable( $manifest_path ) ) {
return;
}
$manifest = require $manifest_path;
if ( ! is_array( $manifest ) ) {
return;
}
foreach ( $manifest as $key => $data ) {
$this->register_record( $key, $data, $path_map );
}
}
/**
* Registers an entry from the manifest in the path map.
*
* @param string $key The identifier for the entry we're registering.
* @param array $data The data for the entry we're registering.
* @param array $path_map The path map to add the contents of the manifest to.
*/
protected function register_record( $key, $data, &$path_map ) {
if ( isset( $path_map[ $key ]['version'] ) ) {
$selected_version = $path_map[ $key ]['version'];
} else {
$selected_version = null;
}
if ( $this->version_selector->is_version_update_required( $selected_version, $data['version'] ) ) {
$path_map[ $key ] = array(
'version' => $data['version'],
'path' => $data['path'],
);
}
}
}
automattic/jetpack-autoloader/src/class-path-processor.php 0000644 00000012557 15153552356 0020074 0 ustar 00 <?php
/* HEADER */ // phpcs:ignore
/**
* This class handles dealing with paths for the autoloader.
*/
class Path_Processor {
/**
* Given a path this will replace any of the path constants with a token to represent it.
*
* @param string $path The path we want to process.
*
* @return string The tokenized path.
*/
public function tokenize_path_constants( $path ) {
$path = wp_normalize_path( $path );
$constants = $this->get_normalized_constants();
foreach ( $constants as $constant => $constant_path ) {
$len = strlen( $constant_path );
if ( substr( $path, 0, $len ) !== $constant_path ) {
continue;
}
return substr_replace( $path, '{{' . $constant . '}}', 0, $len );
}
return $path;
}
/**
* Given a path this will replace any of the path constant tokens with the expanded path.
*
* @param string $tokenized_path The path we want to process.
*
* @return string The expanded path.
*/
public function untokenize_path_constants( $tokenized_path ) {
$tokenized_path = wp_normalize_path( $tokenized_path );
$constants = $this->get_normalized_constants();
foreach ( $constants as $constant => $constant_path ) {
$constant = '{{' . $constant . '}}';
$len = strlen( $constant );
if ( substr( $tokenized_path, 0, $len ) !== $constant ) {
continue;
}
return $this->get_real_path( substr_replace( $tokenized_path, $constant_path, 0, $len ) );
}
return $tokenized_path;
}
/**
* Given a file and an array of places it might be, this will find the absolute path and return it.
*
* @param string $file The plugin or theme file to resolve.
* @param array $directories_to_check The directories we should check for the file if it isn't an absolute path.
*
* @return string|false Returns the absolute path to the directory, otherwise false.
*/
public function find_directory_with_autoloader( $file, $directories_to_check ) {
$file = wp_normalize_path( $file );
if ( ! $this->is_absolute_path( $file ) ) {
$file = $this->find_absolute_plugin_path( $file, $directories_to_check );
if ( ! isset( $file ) ) {
return false;
}
}
// We need the real path for consistency with __DIR__ paths.
$file = $this->get_real_path( $file );
// phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged
$directory = @is_file( $file ) ? dirname( $file ) : $file;
if ( ! @is_file( $directory . '/vendor/composer/jetpack_autoload_classmap.php' ) ) {
return false;
}
// phpcs:enable WordPress.PHP.NoSilencedErrors.Discouraged
return $directory;
}
/**
* Fetches an array of normalized paths keyed by the constant they came from.
*
* @return string[] The normalized paths keyed by the constant.
*/
private function get_normalized_constants() {
$raw_constants = array(
// Order the constants from most-specific to least-specific.
'WP_PLUGIN_DIR',
'WPMU_PLUGIN_DIR',
'WP_CONTENT_DIR',
'ABSPATH',
);
$constants = array();
foreach ( $raw_constants as $raw ) {
if ( ! defined( $raw ) ) {
continue;
}
$path = wp_normalize_path( constant( $raw ) );
if ( isset( $path ) ) {
$constants[ $raw ] = $path;
}
}
return $constants;
}
/**
* Indicates whether or not a path is absolute.
*
* @param string $path The path to check.
*
* @return bool True if the path is absolute, otherwise false.
*/
private function is_absolute_path( $path ) {
if ( 0 === strlen( $path ) || '.' === $path[0] ) {
return false;
}
// Absolute paths on Windows may begin with a drive letter.
if ( preg_match( '/^[a-zA-Z]:[\/\\\\]/', $path ) ) {
return true;
}
// A path starting with / or \ is absolute; anything else is relative.
return ( '/' === $path[0] || '\\' === $path[0] );
}
/**
* Given a file and a list of directories to check, this method will try to figure out
* the absolute path to the file in question.
*
* @param string $normalized_path The normalized path to the plugin or theme file to resolve.
* @param array $directories_to_check The directories we should check for the file if it isn't an absolute path.
*
* @return string|null The absolute path to the plugin file, otherwise null.
*/
private function find_absolute_plugin_path( $normalized_path, $directories_to_check ) {
// We're only able to find the absolute path for plugin/theme PHP files.
if ( ! is_string( $normalized_path ) || '.php' !== substr( $normalized_path, -4 ) ) {
return null;
}
foreach ( $directories_to_check as $directory ) {
$normalized_check = wp_normalize_path( trailingslashit( $directory ) ) . $normalized_path;
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
if ( @is_file( $normalized_check ) ) {
return $normalized_check;
}
}
return null;
}
/**
* Given a path this will figure out the real path that we should be using.
*
* @param string $path The path to resolve.
*
* @return string The resolved path.
*/
private function get_real_path( $path ) {
// We want to resolve symbolic links for consistency with __DIR__ paths.
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
$real_path = @realpath( $path );
if ( false === $real_path ) {
// Let the autoloader deal with paths that don't exist.
$real_path = $path;
}
// Using realpath will make it platform-specific so we must normalize it after.
if ( $path !== $real_path ) {
$real_path = wp_normalize_path( $real_path );
}
return $real_path;
}
}
automattic/jetpack-autoloader/src/class-php-autoloader.php 0000644 00000005145 15153552356 0020042 0 ustar 00 <?php
/* HEADER */ // phpcs:ignore
/**
* This class handles management of the actual PHP autoloader.
*/
class PHP_Autoloader {
/**
* Registers the autoloader with PHP so that it can begin autoloading classes.
*
* @param Version_Loader $version_loader The class loader to use in the autoloader.
*/
public function register_autoloader( $version_loader ) {
// Make sure no other autoloaders are registered.
$this->unregister_autoloader();
// Set the global so that it can be used to load classes.
global $jetpack_autoloader_loader;
$jetpack_autoloader_loader = $version_loader;
// Ensure that the autoloader is first to avoid contention with others.
spl_autoload_register( array( self::class, 'load_class' ), true, true );
}
/**
* Unregisters the active autoloader so that it will no longer autoload classes.
*/
public function unregister_autoloader() {
// Remove any v2 autoloader that we've already registered.
$autoload_chain = spl_autoload_functions();
if ( ! $autoload_chain ) {
return;
}
foreach ( $autoload_chain as $autoloader ) {
// We can identify a v2 autoloader using the namespace.
$namespace_check = null;
// Functions are recorded as strings.
if ( is_string( $autoloader ) ) {
$namespace_check = $autoloader;
} elseif ( is_array( $autoloader ) && is_string( $autoloader[0] ) ) {
// Static method calls have the class as the first array element.
$namespace_check = $autoloader[0];
} else {
// Since the autoloader has only ever been a function or a static method we don't currently need to check anything else.
continue;
}
// Check for the namespace without the generated suffix.
if ( 'Automattic\\Jetpack\\Autoloader\\jp' === substr( $namespace_check, 0, 32 ) ) {
spl_autoload_unregister( $autoloader );
}
}
// Clear the global now that the autoloader has been unregistered.
global $jetpack_autoloader_loader;
$jetpack_autoloader_loader = null;
}
/**
* Loads a class file if one could be found.
*
* Note: This function is static so that the autoloader can be easily unregistered. If
* it was a class method we would have to unwrap the object to check the namespace.
*
* @param string $class_name The name of the class to autoload.
*
* @return bool Indicates whether or not a class file was loaded.
*/
public static function load_class( $class_name ) {
global $jetpack_autoloader_loader;
if ( ! isset( $jetpack_autoloader_loader ) ) {
return;
}
$file = $jetpack_autoloader_loader->find_class_file( $class_name );
if ( ! isset( $file ) ) {
return false;
}
require $file;
return true;
}
}
automattic/jetpack-autoloader/src/class-plugin-locator.php 0000644 00000010732 15153552356 0020053 0 ustar 00 <?php
/* HEADER */ // phpcs:ignore
/**
* This class scans the WordPress installation to find active plugins.
*/
class Plugin_Locator {
/**
* The path processor for finding plugin paths.
*
* @var Path_Processor
*/
private $path_processor;
/**
* The constructor.
*
* @param Path_Processor $path_processor The Path_Processor instance.
*/
public function __construct( $path_processor ) {
$this->path_processor = $path_processor;
}
/**
* Finds the path to the current plugin.
*
* @return string $path The path to the current plugin.
*
* @throws \RuntimeException If the current plugin does not have an autoloader.
*/
public function find_current_plugin() {
// Escape from `vendor/__DIR__` to root plugin directory.
$plugin_directory = dirname( dirname( __DIR__ ) );
// Use the path processor to ensure that this is an autoloader we're referencing.
$path = $this->path_processor->find_directory_with_autoloader( $plugin_directory, array() );
if ( false === $path ) {
throw new \RuntimeException( 'Failed to locate plugin ' . $plugin_directory );
}
return $path;
}
/**
* Checks a given option for plugin paths.
*
* @param string $option_name The option that we want to check for plugin information.
* @param bool $site_option Indicates whether or not we want to check the site option.
*
* @return array $plugin_paths The list of absolute paths we've found.
*/
public function find_using_option( $option_name, $site_option = false ) {
$raw = $site_option ? get_site_option( $option_name ) : get_option( $option_name );
if ( false === $raw ) {
return array();
}
return $this->convert_plugins_to_paths( $raw );
}
/**
* Checks for plugins in the `action` request parameter.
*
* @param string[] $allowed_actions The actions that we're allowed to return plugins for.
*
* @return array $plugin_paths The list of absolute paths we've found.
*/
public function find_using_request_action( $allowed_actions ) {
// phpcs:disable WordPress.Security.NonceVerification.Recommended
/**
* Note: we're not actually checking the nonce here because it's too early
* in the execution. The pluggable functions are not yet loaded to give
* plugins a chance to plug their versions. Therefore we're doing the bare
* minimum: checking whether the nonce exists and it's in the right place.
* The request will fail later if the nonce doesn't pass the check.
*/
if ( empty( $_REQUEST['_wpnonce'] ) ) {
return array();
}
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated just below.
$action = isset( $_REQUEST['action'] ) ? wp_unslash( $_REQUEST['action'] ) : false;
if ( ! in_array( $action, $allowed_actions, true ) ) {
return array();
}
$plugin_slugs = array();
switch ( $action ) {
case 'activate':
case 'deactivate':
if ( empty( $_REQUEST['plugin'] ) ) {
break;
}
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated by convert_plugins_to_paths.
$plugin_slugs[] = wp_unslash( $_REQUEST['plugin'] );
break;
case 'activate-selected':
case 'deactivate-selected':
if ( empty( $_REQUEST['checked'] ) ) {
break;
}
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated by convert_plugins_to_paths.
$plugin_slugs = wp_unslash( $_REQUEST['checked'] );
break;
}
// phpcs:enable WordPress.Security.NonceVerification.Recommended
return $this->convert_plugins_to_paths( $plugin_slugs );
}
/**
* Given an array of plugin slugs or paths, this will convert them to absolute paths and filter
* out the plugins that are not directory plugins. Note that array keys will also be included
* if they are plugin paths!
*
* @param string[] $plugins Plugin paths or slugs to filter.
*
* @return string[]
*/
private function convert_plugins_to_paths( $plugins ) {
if ( ! is_array( $plugins ) || empty( $plugins ) ) {
return array();
}
// We're going to look for plugins in the standard directories.
$path_constants = array( WP_PLUGIN_DIR, WPMU_PLUGIN_DIR );
$plugin_paths = array();
foreach ( $plugins as $key => $value ) {
$path = $this->path_processor->find_directory_with_autoloader( $key, $path_constants );
if ( $path ) {
$plugin_paths[] = $path;
}
$path = $this->path_processor->find_directory_with_autoloader( $value, $path_constants );
if ( $path ) {
$plugin_paths[] = $path;
}
}
return $plugin_paths;
}
}
automattic/jetpack-autoloader/src/class-plugins-handler.php 0000644 00000013071 15153552356 0020207 0 ustar 00 <?php
/* HEADER */ // phpcs:ignore
/**
* This class handles locating and caching all of the active plugins.
*/
class Plugins_Handler {
/**
* The transient key for plugin paths.
*/
const TRANSIENT_KEY = 'jetpack_autoloader_plugin_paths';
/**
* The locator for finding plugins in different locations.
*
* @var Plugin_Locator
*/
private $plugin_locator;
/**
* The processor for transforming cached paths.
*
* @var Path_Processor
*/
private $path_processor;
/**
* The constructor.
*
* @param Plugin_Locator $plugin_locator The locator for finding active plugins.
* @param Path_Processor $path_processor The processor for transforming cached paths.
*/
public function __construct( $plugin_locator, $path_processor ) {
$this->plugin_locator = $plugin_locator;
$this->path_processor = $path_processor;
}
/**
* Gets all of the active plugins we can find.
*
* @param bool $include_deactivating When true, plugins deactivating this request will be considered active.
* @param bool $record_unknown When true, the current plugin will be marked as active and recorded when unknown.
*
* @return string[]
*/
public function get_active_plugins( $include_deactivating, $record_unknown ) {
global $jetpack_autoloader_activating_plugins_paths;
// We're going to build a unique list of plugins from a few different sources
// to find all of our "active" plugins. While we need to return an integer
// array, we're going to use an associative array internally to reduce
// the amount of time that we're going to spend checking uniqueness
// and merging different arrays together to form the output.
$active_plugins = array();
// Make sure that plugins which have activated this request are considered as "active" even though
// they probably won't be present in any option.
if ( is_array( $jetpack_autoloader_activating_plugins_paths ) ) {
foreach ( $jetpack_autoloader_activating_plugins_paths as $path ) {
$active_plugins[ $path ] = $path;
}
}
// This option contains all of the plugins that have been activated.
$plugins = $this->plugin_locator->find_using_option( 'active_plugins' );
foreach ( $plugins as $path ) {
$active_plugins[ $path ] = $path;
}
// This option contains all of the multisite plugins that have been activated.
if ( is_multisite() ) {
$plugins = $this->plugin_locator->find_using_option( 'active_sitewide_plugins', true );
foreach ( $plugins as $path ) {
$active_plugins[ $path ] = $path;
}
}
// These actions contain plugins that are being activated/deactivated during this request.
$plugins = $this->plugin_locator->find_using_request_action( array( 'activate', 'activate-selected', 'deactivate', 'deactivate-selected' ) );
foreach ( $plugins as $path ) {
$active_plugins[ $path ] = $path;
}
// When the current plugin isn't considered "active" there's a problem.
// Since we're here, the plugin is active and currently being loaded.
// We can support this case (mu-plugins and non-standard activation)
// by adding the current plugin to the active list and marking it
// as an unknown (activating) plugin. This also has the benefit
// of causing a reset because the active plugins list has
// been changed since it was saved in the global.
$current_plugin = $this->plugin_locator->find_current_plugin();
if ( $record_unknown && ! in_array( $current_plugin, $active_plugins, true ) ) {
$active_plugins[ $current_plugin ] = $current_plugin;
$jetpack_autoloader_activating_plugins_paths[] = $current_plugin;
}
// When deactivating plugins aren't desired we should entirely remove them from the active list.
if ( ! $include_deactivating ) {
// These actions contain plugins that are being deactivated during this request.
$plugins = $this->plugin_locator->find_using_request_action( array( 'deactivate', 'deactivate-selected' ) );
foreach ( $plugins as $path ) {
unset( $active_plugins[ $path ] );
}
}
// Transform the array so that we don't have to worry about the keys interacting with other array types later.
return array_values( $active_plugins );
}
/**
* Gets all of the cached plugins if there are any.
*
* @return string[]
*/
public function get_cached_plugins() {
$cached = get_transient( self::TRANSIENT_KEY );
if ( ! is_array( $cached ) || empty( $cached ) ) {
return array();
}
// We need to expand the tokens to an absolute path for this webserver.
return array_map( array( $this->path_processor, 'untokenize_path_constants' ), $cached );
}
/**
* Saves the plugin list to the cache.
*
* @param array $plugins The plugin list to save to the cache.
*/
public function cache_plugins( $plugins ) {
// We store the paths in a tokenized form so that that webservers with different absolute paths don't break.
$plugins = array_map( array( $this->path_processor, 'tokenize_path_constants' ), $plugins );
set_transient( self::TRANSIENT_KEY, $plugins );
}
/**
* Checks to see whether or not the plugin list given has changed when compared to the
* shared `$jetpack_autoloader_cached_plugin_paths` global. This allows us to deal
* with cases where the active list may change due to filtering..
*
* @param string[] $plugins The plugins list to check against the global cache.
*
* @return bool True if the plugins have changed, otherwise false.
*/
public function have_plugins_changed( $plugins ) {
global $jetpack_autoloader_cached_plugin_paths;
if ( $jetpack_autoloader_cached_plugin_paths !== $plugins ) {
$jetpack_autoloader_cached_plugin_paths = $plugins;
return true;
}
return false;
}
}
automattic/jetpack-autoloader/src/class-shutdown-handler.php 0000644 00000005203 15153552356 0020377 0 ustar 00 <?php
/* HEADER */ // phpcs:ignore
/**
* This class handles the shutdown of the autoloader.
*/
class Shutdown_Handler {
/**
* The Plugins_Handler instance.
*
* @var Plugins_Handler
*/
private $plugins_handler;
/**
* The plugins cached by this autoloader.
*
* @var string[]
*/
private $cached_plugins;
/**
* Indicates whether or not this autoloader was included by another.
*
* @var bool
*/
private $was_included_by_autoloader;
/**
* Constructor.
*
* @param Plugins_Handler $plugins_handler The Plugins_Handler instance to use.
* @param string[] $cached_plugins The plugins cached by the autoloaer.
* @param bool $was_included_by_autoloader Indicates whether or not the autoloader was included by another.
*/
public function __construct( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) {
$this->plugins_handler = $plugins_handler;
$this->cached_plugins = $cached_plugins;
$this->was_included_by_autoloader = $was_included_by_autoloader;
}
/**
* Handles the shutdown of the autoloader.
*/
public function __invoke() {
// Don't save a broken cache if an error happens during some plugin's initialization.
if ( ! did_action( 'plugins_loaded' ) ) {
// Ensure that the cache is emptied to prevent consecutive failures if the cache is to blame.
if ( ! empty( $this->cached_plugins ) ) {
$this->plugins_handler->cache_plugins( array() );
}
return;
}
// Load the active plugins fresh since the list we pulled earlier might not contain
// plugins that were activated but did not reset the autoloader. This happens
// when a plugin is in the cache but not "active" when the autoloader loads.
// We also want to make sure that plugins which are deactivating are not
// considered "active" so that they will be removed from the cache now.
try {
$active_plugins = $this->plugins_handler->get_active_plugins( false, ! $this->was_included_by_autoloader );
} catch ( \Exception $ex ) {
// When the package is deleted before shutdown it will throw an exception.
// In the event this happens we should erase the cache.
if ( ! empty( $this->cached_plugins ) ) {
$this->plugins_handler->cache_plugins( array() );
}
return;
}
// The paths should be sorted for easy comparisons with those loaded from the cache.
// Note we don't need to sort the cached entries because they're already sorted.
sort( $active_plugins );
// We don't want to waste time saving a cache that hasn't changed.
if ( $this->cached_plugins === $active_plugins ) {
return;
}
$this->plugins_handler->cache_plugins( $active_plugins );
}
}
automattic/jetpack-autoloader/src/class-version-loader.php 0000644 00000007664 15153552356 0020057 0 ustar 00 <?php
/* HEADER */ // phpcs:ignore
/**
* This class loads other classes based on given parameters.
*/
class Version_Loader {
/**
* The Version_Selector object.
*
* @var Version_Selector
*/
private $version_selector;
/**
* A map of available classes and their version and file path.
*
* @var array
*/
private $classmap;
/**
* A map of PSR-4 namespaces and their version and directory path.
*
* @var array
*/
private $psr4_map;
/**
* A map of all the files that we should load.
*
* @var array
*/
private $filemap;
/**
* The constructor.
*
* @param Version_Selector $version_selector The Version_Selector object.
* @param array $classmap The verioned classmap to load using.
* @param array $psr4_map The versioned PSR-4 map to load using.
* @param array $filemap The versioned filemap to load.
*/
public function __construct( $version_selector, $classmap, $psr4_map, $filemap ) {
$this->version_selector = $version_selector;
$this->classmap = $classmap;
$this->psr4_map = $psr4_map;
$this->filemap = $filemap;
}
/**
* Finds the file path for the given class.
*
* @param string $class_name The class to find.
*
* @return string|null $file_path The path to the file if found, null if no class was found.
*/
public function find_class_file( $class_name ) {
$data = $this->select_newest_file(
isset( $this->classmap[ $class_name ] ) ? $this->classmap[ $class_name ] : null,
$this->find_psr4_file( $class_name )
);
if ( ! isset( $data ) ) {
return null;
}
return $data['path'];
}
/**
* Load all of the files in the filemap.
*/
public function load_filemap() {
if ( empty( $this->filemap ) ) {
return;
}
foreach ( $this->filemap as $file_identifier => $file_data ) {
if ( empty( $GLOBALS['__composer_autoload_files'][ $file_identifier ] ) ) {
require_once $file_data['path'];
$GLOBALS['__composer_autoload_files'][ $file_identifier ] = true;
}
}
}
/**
* Compares different class sources and returns the newest.
*
* @param array|null $classmap_data The classmap class data.
* @param array|null $psr4_data The PSR-4 class data.
*
* @return array|null $data
*/
private function select_newest_file( $classmap_data, $psr4_data ) {
if ( ! isset( $classmap_data ) ) {
return $psr4_data;
} elseif ( ! isset( $psr4_data ) ) {
return $classmap_data;
}
if ( $this->version_selector->is_version_update_required( $classmap_data['version'], $psr4_data['version'] ) ) {
return $psr4_data;
}
return $classmap_data;
}
/**
* Finds the file for a given class in a PSR-4 namespace.
*
* @param string $class_name The class to find.
*
* @return array|null $data The version and path path to the file if found, null otherwise.
*/
private function find_psr4_file( $class_name ) {
if ( ! isset( $this->psr4_map ) ) {
return null;
}
// Don't bother with classes that have no namespace.
$class_index = strrpos( $class_name, '\\' );
if ( ! $class_index ) {
return null;
}
$class_for_path = str_replace( '\\', '/', $class_name );
// Search for the namespace by iteratively cutting off the last segment until
// we find a match. This allows us to check the most-specific namespaces
// first as well as minimize the amount of time spent looking.
for (
$class_namespace = substr( $class_name, 0, $class_index );
! empty( $class_namespace );
$class_namespace = substr( $class_namespace, 0, strrpos( $class_namespace, '\\' ) )
) {
$namespace = $class_namespace . '\\';
if ( ! isset( $this->psr4_map[ $namespace ] ) ) {
continue;
}
$data = $this->psr4_map[ $namespace ];
foreach ( $data['path'] as $path ) {
$path .= '/' . substr( $class_for_path, strlen( $namespace ) ) . '.php';
if ( file_exists( $path ) ) {
return array(
'version' => $data['version'],
'path' => $path,
);
}
}
}
return null;
}
}
automattic/jetpack-autoloader/src/class-version-selector.php 0000644 00000003163 15153552356 0020417 0 ustar 00 <?php
/* HEADER */ // phpcs:ignore
/**
* Used to select package versions.
*/
class Version_Selector {
/**
* Checks whether the selected package version should be updated. Composer development
* package versions ('9999999-dev' or versions that start with 'dev-') are favored
* when the JETPACK_AUTOLOAD_DEV constant is set to true.
*
* @param String $selected_version The currently selected package version.
* @param String $compare_version The package version that is being evaluated to
* determine if the version needs to be updated.
*
* @return bool Returns true if the selected package version should be updated,
* else false.
*/
public function is_version_update_required( $selected_version, $compare_version ) {
$use_dev_versions = defined( 'JETPACK_AUTOLOAD_DEV' ) && JETPACK_AUTOLOAD_DEV;
if ( $selected_version === null ) {
return true;
}
if ( $use_dev_versions && $this->is_dev_version( $selected_version ) ) {
return false;
}
if ( $this->is_dev_version( $compare_version ) ) {
if ( $use_dev_versions ) {
return true;
} else {
return false;
}
}
if ( version_compare( $selected_version, $compare_version, '<' ) ) {
return true;
}
return false;
}
/**
* Checks whether the given package version is a development version.
*
* @param String $version The package version.
*
* @return bool True if the version is a dev version, else false.
*/
public function is_dev_version( $version ) {
if ( 'dev-' === substr( $version, 0, 4 ) || '9999999-dev' === $version ) {
return true;
}
return false;
}
}
automattic/jetpack-config/LICENSE.txt 0000644 00000043760 15153552356 0013451 0 ustar 00 This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
automattic/jetpack-config/src/class-config.php 0000644 00000027006 15153552356 0015471 0 ustar 00 <?php
/**
* The base Jetpack configuration class file.
*
* @package automattic/jetpack-config
*/
namespace Automattic\Jetpack;
/*
* The Config package does not require the composer packages that
* contain the package classes shown below. The consumer plugin
* must require the corresponding packages to use these features.
*/
use Automattic\Jetpack\Blaze as Blaze;
use Automattic\Jetpack\Connection\Manager;
use Automattic\Jetpack\Connection\Plugin;
use Automattic\Jetpack\Import\Main as Import_Main;
use Automattic\Jetpack\JITM as JITM;
use Automattic\Jetpack\JITMS\JITM as JITMS_JITM;
use Automattic\Jetpack\Post_List\Post_List as Post_List;
use Automattic\Jetpack\Publicize\Publicize_Setup as Publicize_Setup;
use Automattic\Jetpack\Search\Initializer as Jetpack_Search_Main;
use Automattic\Jetpack\Stats\Main as Stats_Main;
use Automattic\Jetpack\Stats_Admin\Main as Stats_Admin_Main;
use Automattic\Jetpack\Sync\Main as Sync_Main;
use Automattic\Jetpack\VideoPress\Initializer as VideoPress_Pkg_Initializer;
use Automattic\Jetpack\Waf\Waf_Initializer as Jetpack_Waf_Main;
use Automattic\Jetpack\WordAds\Initializer as Jetpack_WordAds_Main;
use Automattic\Jetpack\Yoast_Promo as Yoast_Promo;
/**
* The configuration class.
*/
class Config {
const FEATURE_ENSURED = 1;
const FEATURE_NOT_AVAILABLE = 0;
const FEATURE_ALREADY_ENSURED = -1;
/**
* The initial setting values.
*
* @var Array
*/
protected $config = array(
'jitm' => false,
'connection' => false,
'sync' => false,
'post_list' => false,
'identity_crisis' => false,
'search' => false,
'publicize' => false,
'wordads' => false,
'waf' => false,
'videopress' => false,
'stats' => false,
'stats_admin' => false,
'blaze' => false,
'yoast_promo' => false,
'import' => false,
);
/**
* Initialization options stored here.
*
* @var array
*/
protected $feature_options = array();
/**
* Creates the configuration class instance.
*/
public function __construct() {
/**
* Adding the config handler to run on priority 2 because the class itself is
* being constructed on priority 1.
*/
add_action( 'plugins_loaded', array( $this, 'on_plugins_loaded' ), 2 );
}
/**
* Require a feature to be initialized. It's up to the package consumer to actually add
* the package to their composer project. Declaring a requirement using this method
* instructs the class to initialize it.
*
* Run the options method (if exists) every time the method is called.
*
* @param String $feature the feature slug.
* @param array $options Additional options, optional.
*/
public function ensure( $feature, array $options = array() ) {
$this->config[ $feature ] = true;
$this->set_feature_options( $feature, $options );
$method_options = 'ensure_options_' . $feature;
if ( method_exists( $this, $method_options ) ) {
$this->{ $method_options }();
}
}
/**
* Runs on plugins_loaded hook priority with priority 2.
*
* @action plugins_loaded
*/
public function on_plugins_loaded() {
if ( $this->config['connection'] ) {
$this->ensure_class( 'Automattic\Jetpack\Connection\Manager' )
&& $this->ensure_feature( 'connection' );
}
if ( $this->config['sync'] ) {
$this->ensure_class( 'Automattic\Jetpack\Sync\Main' )
&& $this->ensure_feature( 'sync' );
}
if ( $this->config['jitm'] ) {
// Check for the JITM class in both namespaces. The namespace was changed in jetpack-jitm v1.6.
( $this->ensure_class( 'Automattic\Jetpack\JITMS\JITM', false )
|| $this->ensure_class( 'Automattic\Jetpack\JITM' ) )
&& $this->ensure_feature( 'jitm' );
}
if ( $this->config['post_list'] ) {
$this->ensure_class( 'Automattic\Jetpack\Post_List\Post_List' )
&& $this->ensure_feature( 'post_list' );
}
if ( $this->config['identity_crisis'] ) {
$this->ensure_class( 'Automattic\Jetpack\Identity_Crisis' )
&& $this->ensure_feature( 'identity_crisis' );
}
if ( $this->config['search'] ) {
$this->ensure_class( 'Automattic\Jetpack\Search\Initializer' )
&& $this->ensure_feature( 'search' );
}
if ( $this->config['publicize'] ) {
$this->ensure_class( 'Automattic\Jetpack\Publicize\Publicize_UI' ) && $this->ensure_class( 'Automattic\Jetpack\Publicize\Publicize' )
&& $this->ensure_feature( 'publicize' );
}
if ( $this->config['wordads'] ) {
$this->ensure_class( 'Automattic\Jetpack\WordAds\Initializer' )
&& $this->ensure_feature( 'wordads' );
}
if ( $this->config['waf'] ) {
$this->ensure_class( 'Automattic\Jetpack\Waf\Waf_Initializer' )
&& $this->ensure_feature( 'waf' );
}
if ( $this->config['videopress'] ) {
$this->ensure_class( 'Automattic\Jetpack\VideoPress\Initializer' ) && $this->ensure_feature( 'videopress' );
}
if ( $this->config['stats'] ) {
$this->ensure_class( 'Automattic\Jetpack\Stats\Main' ) && $this->ensure_feature( 'stats' );
}
if ( $this->config['stats_admin'] ) {
$this->ensure_class( 'Automattic\Jetpack\Stats_Admin\Main' ) && $this->ensure_feature( 'stats_admin' );
}
if ( $this->config['blaze'] ) {
$this->ensure_class( 'Automattic\Jetpack\Blaze' ) && $this->ensure_feature( 'blaze' );
}
if ( $this->config['yoast_promo'] ) {
$this->ensure_class( 'Automattic\Jetpack\Yoast_Promo' ) && $this->ensure_feature( 'yoast_promo' );
}
if ( $this->config['import'] ) {
$this->ensure_class( 'Automattic\Jetpack\Import\Main' )
&& $this->ensure_feature( 'import' );
}
}
/**
* Returns true if the required class is available and alerts the user if it's not available
* in case the site is in debug mode.
*
* @param String $classname a fully qualified class name.
* @param Boolean $log_notice whether the E_USER_NOTICE should be generated if the class is not found.
*
* @return Boolean whether the class is available.
*/
protected function ensure_class( $classname, $log_notice = true ) {
$available = class_exists( $classname );
if ( $log_notice && ! $available && defined( 'WP_DEBUG' ) && WP_DEBUG ) {
trigger_error( // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error
sprintf(
/* translators: %1$s is a PHP class name. */
esc_html__(
'Unable to load class %1$s. Please add the package that contains it using composer and make sure you are requiring the Jetpack autoloader',
'jetpack-config'
),
esc_html( $classname )
),
E_USER_NOTICE
);
}
return $available;
}
/**
* Ensures a feature is enabled, sets it up if it hasn't already been set up.
*
* @param String $feature slug of the feature.
* @return Integer either FEATURE_ENSURED, FEATURE_ALREADY_ENSURED or FEATURE_NOT_AVAILABLE constants.
*/
protected function ensure_feature( $feature ) {
$method = 'enable_' . $feature;
if ( ! method_exists( $this, $method ) ) {
return self::FEATURE_NOT_AVAILABLE;
}
if ( did_action( 'jetpack_feature_' . $feature . '_enabled' ) ) {
return self::FEATURE_ALREADY_ENSURED;
}
$this->{ $method }();
/**
* Fires when a specific Jetpack package feature is initalized using the Config package.
*
* @since 1.1.0
*/
do_action( 'jetpack_feature_' . $feature . '_enabled' );
return self::FEATURE_ENSURED;
}
/**
* Enables the JITM feature.
*/
protected function enable_jitm() {
if ( class_exists( 'Automattic\Jetpack\JITMS\JITM' ) ) {
JITMS_JITM::configure();
} else {
// Provides compatibility with jetpack-jitm <v1.6.
JITM::configure();
}
return true;
}
/**
* Enables the Post_List feature.
*/
protected function enable_post_list() {
Post_List::configure();
return true;
}
/**
* Enables the Sync feature.
*/
protected function enable_sync() {
Sync_Main::configure();
return true;
}
/**
* Enables the Connection feature.
*/
protected function enable_connection() {
Manager::configure();
return true;
}
/**
* Enables the identity-crisis feature.
*/
protected function enable_identity_crisis() {
Identity_Crisis::init();
}
/**
* Enables the search feature.
*/
protected function enable_search() {
Jetpack_Search_Main::init();
}
/**
* Enables the Publicize feature.
*/
protected function enable_publicize() {
Publicize_Setup::configure();
return true;
}
/**
* Handles Publicize options.
*/
protected function ensure_options_publicize() {
$options = $this->get_feature_options( 'publicize' );
if ( ! empty( $options['force_refresh'] ) ) {
Publicize_Setup::$refresh_plan_info = true;
}
}
/**
* Enables WordAds.
*/
protected function enable_wordads() {
Jetpack_WordAds_Main::init();
}
/**
* Enables Waf.
*/
protected function enable_waf() {
Jetpack_Waf_Main::init();
return true;
}
/**
* Enables VideoPress.
*/
protected function enable_videopress() {
VideoPress_Pkg_Initializer::init();
return true;
}
/**
* Enables Stats.
*/
protected function enable_stats() {
Stats_Main::init();
return true;
}
/**
* Enables Stats Admin.
*/
protected function enable_stats_admin() {
Stats_Admin_Main::init();
return true;
}
/**
* Handles VideoPress options
*/
protected function ensure_options_videopress() {
$options = $this->get_feature_options( 'videopress' );
if ( ! empty( $options ) ) {
VideoPress_Pkg_Initializer::update_init_options( $options );
}
return true;
}
/**
* Enables Blaze.
*/
protected function enable_blaze() {
Blaze::init();
return true;
}
/**
* Enables Yoast Promo.
*/
protected function enable_yoast_promo() {
Yoast_Promo::init();
return true;
}
/**
* Enables the Import feature.
*/
protected function enable_import() {
Import_Main::configure();
return true;
}
/**
* Setup the Connection options.
*/
protected function ensure_options_connection() {
$options = $this->get_feature_options( 'connection' );
if ( ! empty( $options['slug'] ) ) {
// The `slug` and `name` are removed from the options because they need to be passed as arguments.
$slug = $options['slug'];
unset( $options['slug'] );
$name = $slug;
if ( ! empty( $options['name'] ) ) {
$name = $options['name'];
unset( $options['name'] );
}
( new Plugin( $slug ) )->add( $name, $options );
}
return true;
}
/**
* Setup the Identity Crisis options.
*
* @return bool
*/
protected function ensure_options_identity_crisis() {
$options = $this->get_feature_options( 'identity_crisis' );
if ( is_array( $options ) && count( $options ) ) {
add_filter(
'jetpack_idc_consumers',
function ( $consumers ) use ( $options ) {
$consumers[] = $options;
return $consumers;
}
);
}
return true;
}
/**
* Setup the Sync options.
*/
protected function ensure_options_sync() {
$options = $this->get_feature_options( 'sync' );
if ( method_exists( 'Automattic\Jetpack\Sync\Main', 'set_sync_data_options' ) ) {
Sync_Main::set_sync_data_options( $options );
}
return true;
}
/**
* Temporary save initialization options for a feature.
*
* @param string $feature The feature slug.
* @param array $options The options.
*
* @return bool
*/
protected function set_feature_options( $feature, array $options ) {
if ( $options ) {
$this->feature_options[ $feature ] = $options;
}
return true;
}
/**
* Get initialization options for a feature from the temporary storage.
*
* @param string $feature The feature slug.
*
* @return array
*/
protected function get_feature_options( $feature ) {
return empty( $this->feature_options[ $feature ] ) ? array() : $this->feature_options[ $feature ];
}
}
automattic/jetpack-connection/LICENSE.txt 0000644 00000043760 15153552356 0014343 0 ustar 00 This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
automattic/jetpack-connection/dist/tracks-ajax.asset.php 0000644 00000000124 15153552356 0017505 0 ustar 00 <?php return array('dependencies' => array(), 'version' => '2c644cc46566ed615c42');
automattic/jetpack-connection/dist/tracks-ajax.js 0000644 00000001664 15153552356 0016226 0 ustar 00 !function(t,a){window.jpTracksAJAX=window.jpTracksAJAX||{};const c="dops:analytics"===localStorage.getItem("debug");window.jpTracksAJAX.record_ajax_event=function(n,e,r){const o={tracksNonce:a.jpTracksAJAX_nonce,action:"jetpack_tracks",tracksEventType:e,tracksEventName:n,tracksEventProp:r||!1};return t.ajax({type:"POST",url:a.ajaxurl,data:o,success:function(t){c&&console.log("AJAX tracks event recorded: ",o,t)}})},t(document).ready((function(){t("body").on("click",".jptracks a, a.jptracks",(function(a){const c=t(a.target),n=c.closest(".jptracks"),e=n.attr("data-jptracks-name");if(void 0===e)return;const r=n.attr("data-jptracks-prop")||!1,o=c.attr("href"),s=c.get(0).target;let i=null;o&&s&&"_self"!==s&&(i=window.open("",s),i.opener=null),a.preventDefault(),window.jpTracksAJAX.record_ajax_event(e,"click",r).always((function(){if(o&&!c.hasClass("thickbox")){if(i)return void(i.location=o);window.location=o}}))}))}))}(jQuery,jpTracksAJAX); automattic/jetpack-connection/dist/tracks-callables.asset.php 0000644 00000000124 15153552356 0020504 0 ustar 00 <?php return array('dependencies' => array(), 'version' => 'd9dbf909a3d10fb26f39');
automattic/jetpack-connection/dist/tracks-callables.js 0000644 00000002063 15153552356 0017217 0 ustar 00 (()=>{var e={775:e=>{let n;window._tkq=window._tkq||[];const t=console.error;const o={initialize:function(e,n){o.setUser(e,n),o.identifyUser()},mc:{bumpStat:function(e,n){const t=function(e,n){let t="";if("object"==typeof e)for(const n in e)t+="&x_"+encodeURIComponent(n)+"="+encodeURIComponent(e[n]);else t="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(n);return t}(e,n);(new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+t+"&t="+Math.random()}},tracks:{recordEvent:function(e,n){n=n||{},0===e.indexOf("jetpack_")?window._tkq.push(["recordEvent",e,n]):t('- Event name must be prefixed by "jetpack_"')},recordPageView:function(e){o.tracks.recordEvent("jetpack_page_view",{path:e})}},setUser:function(e,t){n={ID:e,username:t}},identifyUser:function(){n&&window._tkq.push(["identifyUser",n.ID,n.username])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}};e.exports=o}},n={};var t=function t(o){var r=n[o];if(void 0!==r)return r.exports;var i=n[o]={exports:{}};return e[o](i,i.exports,t),i.exports}(775);window.analytics=t})(); automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php 0000644 00000011534 15153552356 0021267 0 ustar 00 <?php
/**
* IXR_Client
*
* @package automattic/jetpack-connection
*
* @since 1.7.0
* @since-jetpack 1.5
* @since-jetpack 7.7 Moved to the jetpack-connection package.
*/
use Automattic\Jetpack\Connection\Client;
use Automattic\Jetpack\Connection\Manager;
if ( ! class_exists( IXR_Client::class ) ) {
require_once ABSPATH . WPINC . '/class-IXR.php';
}
/**
* A Jetpack implementation of the WordPress core IXR client.
*/
class Jetpack_IXR_Client extends IXR_Client {
/**
* Jetpack args, used for the remote requests.
*
* @var array
*/
public $jetpack_args = null;
/**
* Remote Response Headers.
*
* @var array
*/
public $response_headers = null;
/**
* Holds the raw remote response from the latest call to query().
*
* @var null|array|WP_Error
*/
public $last_response = null;
/**
* Constructor.
* Initialize a new Jetpack IXR client instance.
*
* @param array $args Jetpack args, used for the remote requests.
* @param string|bool $path Path to perform the reuqest to.
* @param int $port Port number.
* @param int $timeout The connection timeout, in seconds.
*/
public function __construct( $args = array(), $path = false, $port = 80, $timeout = 15 ) {
$connection = new Manager();
$defaults = array(
'url' => $connection->xmlrpc_api_url(),
'user_id' => 0,
'headers' => array(),
);
$args = wp_parse_args( $args, $defaults );
$args['headers'] = array_merge( array( 'Content-Type' => 'text/xml' ), (array) $args['headers'] );
$this->jetpack_args = $args;
$this->IXR_Client( $args['url'], $path, $port, $timeout );
}
/**
* Perform the IXR request.
*
* @param string[] ...$args IXR args.
*
* @return bool True if request succeeded, false otherwise.
*/
public function query( ...$args ) {
$method = array_shift( $args );
$request = new IXR_Request( $method, $args );
$xml = trim( $request->getXml() );
$response = Client::remote_request( $this->jetpack_args, $xml );
// Store response headers.
$this->response_headers = wp_remote_retrieve_headers( $response );
$this->last_response = $response;
if ( is_array( $this->last_response ) && isset( $this->last_response['http_response'] ) ) {
// If the expected array response is received, format the data as plain arrays.
$this->last_response = $this->last_response['http_response']->to_array();
$this->last_response['headers'] = $this->last_response['headers']->getAll();
}
if ( is_wp_error( $response ) ) {
$this->error = new IXR_Error( -10520, sprintf( 'Jetpack: [%s] %s', $response->get_error_code(), $response->get_error_message() ) );
return false;
}
if ( ! $response ) {
$this->error = new IXR_Error( -10520, 'Jetpack: Unknown Error' );
return false;
}
if ( 200 !== wp_remote_retrieve_response_code( $response ) ) {
$this->error = new IXR_Error( -32300, 'transport error - HTTP status code was not 200' );
return false;
}
$content = wp_remote_retrieve_body( $response );
// Now parse what we've got back.
$this->message = new IXR_Message( $content );
if ( ! $this->message->parse() ) {
// XML error.
$this->error = new IXR_Error( -32700, 'parse error. not well formed' );
return false;
}
// Is the message a fault?
if ( 'fault' === $this->message->messageType ) {
$this->error = new IXR_Error( $this->message->faultCode, $this->message->faultString );
return false;
}
// Message must be OK.
return true;
}
/**
* Retrieve the Jetpack error from the result of the last request.
*
* @param int $fault_code Fault code.
* @param string $fault_string Fault string.
* @return WP_Error Error object.
*/
public function get_jetpack_error( $fault_code = null, $fault_string = null ) {
if ( $fault_code === null ) {
$fault_code = $this->error->code;
}
if ( $fault_string === null ) {
$fault_string = $this->error->message;
}
if ( preg_match( '#jetpack:\s+\[(\w+)\]\s*(.*)?$#i', $fault_string, $match ) ) {
$code = $match[1];
$message = $match[2];
$status = $fault_code;
return new \WP_Error( $code, $message, $status );
}
return new \WP_Error( "IXR_{$fault_code}", $fault_string );
}
/**
* Retrieve a response header if set.
*
* @param string $name header name.
* @return string|bool Header value if set, false if not set.
*/
public function get_response_header( $name ) {
if ( isset( $this->response_headers[ $name ] ) ) {
return $this->response_headers[ $name ];
}
// case-insensitive header names: http://www.ietf.org/rfc/rfc2616.txt.
if ( isset( $this->response_headers[ strtolower( $name ) ] ) ) {
return $this->response_headers[ strtolower( $name ) ];
}
return false;
}
/**
* Retrieve the raw response for the last query() call.
*
* @return null|array|WP_Error
*/
public function get_last_response() {
return $this->last_response;
}
}
automattic/jetpack-connection/legacy/class-jetpack-ixr-clientmulticall.php 0000644 00000003405 15153552356 0023174 0 ustar 00 <?php
/**
* IXR_ClientMulticall
*
* @package automattic/jetpack-connection
*
* @since 1.7.0
* @since-jetpack 1.5
* @since-jetpack 7.7 Moved to the jetpack-connection package.
*/
/**
* A Jetpack implementation of the WordPress core IXR client, capable of multiple calls in a single request.
*/
class Jetpack_IXR_ClientMulticall extends Jetpack_IXR_Client {
/**
* Storage for the IXR calls.
*
* @var array
*/
public $calls = array();
/**
* Add a IXR call to the client.
* First argument is the method name.
* The rest of the arguments are the params specified to the method.
*
* @param string[] ...$args IXR args.
*/
public function addCall( ...$args ) {
$method_name = array_shift( $args );
$struct = array(
'methodName' => $method_name,
'params' => $args,
);
$this->calls[] = $struct;
}
/**
* Perform the IXR multicall request.
*
* @param string[] ...$args IXR args.
*
* @return bool True if request succeeded, false otherwise.
*/
public function query( ...$args ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
$this->calls = $this->sort_calls( $this->calls );
// Prepare multicall, then call the parent::query() method.
return parent::query( 'system.multicall', $this->calls );
}
/**
* Sort the IXR calls.
* Make sure syncs are always done first preserving relative order.
*
* @param array $calls Calls to sort.
* @return array Sorted calls.
*/
public function sort_calls( $calls ) {
$sync_calls = array();
$other_calls = array();
foreach ( $calls as $call ) {
if ( 'jetpack.syncContent' === $call['methodName'] ) {
$sync_calls[] = $call;
} else {
$other_calls[] = $call;
}
}
return array_merge( $sync_calls, $other_calls );
}
}
automattic/jetpack-connection/legacy/class-jetpack-options.php 0000644 00000064422 15153552356 0020710 0 ustar 00 <?php
/**
* Legacy Jetpack_Options class.
*
* @package automattic/jetpack-connection
*/
use Automattic\Jetpack\Constants;
/**
* Class Jetpack_Options
*/
class Jetpack_Options {
/**
* An array that maps a grouped option type to an option name.
*
* @var array
*/
private static $grouped_options = array(
'compact' => 'jetpack_options',
'private' => 'jetpack_private_options',
);
/**
* Returns an array of option names for a given type.
*
* @param string $type The type of option to return. Defaults to 'compact'.
*
* @return array
*/
public static function get_option_names( $type = 'compact' ) {
switch ( $type ) {
case 'non-compact':
case 'non_compact':
return array(
'activated',
'active_modules',
'active_modules_initialized', // (bool) used to determine that all the default modules were activated, so we know how to act on a reconnection.
'allowed_xsite_search_ids', // (array) Array of WP.com blog ids that are allowed to search the content of this site
'available_modules',
'do_activate',
'edit_links_calypso_redirect', // (bool) Whether post/page edit links on front end should point to Calypso.
'log',
'slideshow_background_color',
'widget_twitter',
'wpcc_options',
'relatedposts',
'file_data',
'autoupdate_plugins', // (array) An array of plugin ids ( eg. jetpack/jetpack ) that should be autoupdated
'autoupdate_plugins_translations', // (array) An array of plugin ids ( eg. jetpack/jetpack ) that should be autoupdated translation files.
'autoupdate_themes', // (array) An array of theme ids ( eg. twentyfourteen ) that should be autoupdated
'autoupdate_themes_translations', // (array) An array of theme ids ( eg. twentyfourteen ) that should autoupdated translation files.
'autoupdate_core', // (bool) Whether or not to autoupdate core
'autoupdate_translations', // (bool) Whether or not to autoupdate all translations
'json_api_full_management', // (bool) Allow full management (eg. Activate, Upgrade plugins) of the site via the JSON API.
'sync_non_public_post_stati', // (bool) Allow synchronisation of posts and pages with non-public status.
'site_icon_url', // (string) url to the full site icon
'site_icon_id', // (int) Attachment id of the site icon file
'dismissed_manage_banner', // (bool) Dismiss Jetpack manage banner allows the user to dismiss the banner permanently
'unique_connection', // (array) A flag to determine a unique connection to wordpress.com two values "connected" and "disconnected" with values for how many times each has occured
'unique_registrations', // (integer) A counter of how many times the site was registered
'protect_whitelist', // (array) IP Address for the Protect module to ignore
'sync_error_idc', // (bool|array) false or array containing the site's home and siteurl at time of IDC error
'sync_health_status', // (bool|array) An array of data relating to Jetpack's sync health.
'safe_mode_confirmed', // (bool) True if someone confirms that this site was correctly put into safe mode automatically after an identity crisis is discovered.
'migrate_for_idc', // (bool) True if someone confirms that this site should migrate stats and subscribers from its previous URL
'dismissed_connection_banner', // (bool) True if the connection banner has been dismissed
'ab_connect_banner_green_bar', // (int) Version displayed of the A/B test for the green bar at the top of the connect banner.
'onboarding', // (string) Auth token to be used in the onboarding connection flow
'tos_agreed', // (bool) Whether or not the TOS for connection has been agreed upon.
'static_asset_cdn_files', // (array) An nested array of files that we can swap out for cdn versions.
'mapbox_api_key', // (string) Mapbox API Key, for use with Map block.
'mailchimp', // (string) Mailchimp keyring data, for mailchimp block.
'xmlrpc_errors', // (array) Keys are XML-RPC signature error codes. Values are truthy.
'dismissed_wizard_banner', // (int) (DEPRECATED) True if the Wizard banner has been dismissed.
);
case 'private':
return array(
'blog_token', // (string) The Client Secret/Blog Token of this site.
'user_token', // (string) The User Token of this site. (deprecated)
'user_tokens', // (array) User Tokens for each user of this site who has connected to jetpack.wordpress.com.
'purchase_token', // (string) Token for logged out user purchases.
'token_lock', // (string) Token lock in format `expiration_date|||site_url`.
);
case 'network':
return array(
'onboarding', // (string) Auth token to be used in the onboarding connection flow
'file_data', // (array) List of absolute paths to all Jetpack modules
);
}
return array(
'id', // (int) The Client ID/WP.com Blog ID of this site.
'publicize_connections', // (array) An array of Publicize connections from WordPress.com.
'master_user', // (int) The local User ID of the user who connected this site to jetpack.wordpress.com.
'version', // (string) Used during upgrade procedure to auto-activate new modules. version:time.
'old_version', // (string) Used to determine which modules are the most recently added. previous_version:time.
'fallback_no_verify_ssl_certs', // (int) Flag for determining if this host must skip SSL Certificate verification due to misconfigured SSL.
'time_diff', // (int) Offset between Jetpack server's clocks and this server's clocks. Jetpack Server Time = time() + (int) Jetpack_Options::get_option( 'time_diff' )
'public', // (int|bool) If we think this site is public or not (1, 0), false if we haven't yet tried to figure it out.
'videopress', // (array) VideoPress options array.
'is_network_site', // (int|bool) If we think this site is a network or a single blog (1, 0), false if we haven't yet tried to figue it out.
'social_links', // (array) The specified links for each social networking site.
'identity_crisis_whitelist', // (array) An array of options, each having an array of the values whitelisted for it.
'gplus_authors', // (array) The Google+ authorship information for connected users.
'last_heartbeat', // (int) The timestamp of the last heartbeat that fired.
'hide_jitm', // (array) A list of just in time messages that we should not show because they have been dismissed by the user.
'custom_css_4.7_migration', // (bool) Whether Custom CSS has scanned for and migrated any legacy CSS CPT entries to the new Core format.
'image_widget_migration', // (bool) Whether any legacy Image Widgets have been converted to the new Core widget.
'gallery_widget_migration', // (bool) Whether any legacy Gallery Widgets have been converted to the new Core widget.
'sso_first_login', // (bool) Is this the first time the user logins via SSO.
'dismissed_hints', // (array) Part of Plugin Search Hints. List of cards that have been dismissed.
'first_admin_view', // (bool) Set to true the first time the user views the admin. Usually after the initial connection.
'setup_wizard_questionnaire', // (array) (DEPRECATED) List of user choices from the setup wizard.
'setup_wizard_status', // (string) (DEPRECATED) Status of the setup wizard.
'licensing_error', // (string) Last error message occurred while attaching licenses that is yet to be surfaced to the user.
'recommendations_banner_dismissed', // (bool) Determines if the recommendations dashboard banner is dismissed or not.
'recommendations_banner_enabled', // (bool) Whether the recommendations are enabled or not.
'recommendations_data', // (array) The user choice and other data for the recommendations.
'recommendations_step', // (string) The current step of the recommendations.
'recommendations_conditional', // (array) An array of action-based recommendations.
'licensing_activation_notice_dismiss', // (array) The `last_detached_count` and the `last_dismissed_time` for the user-license activation notice.
'has_seen_wc_connection_modal', // (bool) Whether the site has displayed the WooCommerce Connection modal
'partner_coupon', // (string) A Jetpack partner issued coupon to promote a sale together with Jetpack.
'partner_coupon_added', // (string) A date for when `partner_coupon` was added, so we can auto-purge after a certain time interval.
'dismissed_backup_review_restore', // (bool) Determines if the component review request is dismissed for successful restore requests.
'dismissed_backup_review_backups', // (bool) Determines if the component review request is dismissed for successful backup requests.
);
}
/**
* Is the option name valid?
*
* @param string $name The name of the option.
* @param string|null $group The name of the group that the option is in. Default to null, which will search non_compact.
*
* @return bool Is the option name valid?
*/
public static function is_valid( $name, $group = null ) {
if ( is_array( $name ) ) {
$compact_names = array();
foreach ( array_keys( self::$grouped_options ) as $_group ) {
$compact_names = array_merge( $compact_names, self::get_option_names( $_group ) );
}
$result = array_diff( $name, self::get_option_names( 'non_compact' ), $compact_names );
return empty( $result );
}
if ( $group === null || 'non_compact' === $group ) {
if ( in_array( $name, self::get_option_names( $group ), true ) ) {
return true;
}
}
foreach ( array_keys( self::$grouped_options ) as $_group ) {
if ( $group === null || $group === $_group ) {
if ( in_array( $name, self::get_option_names( $_group ), true ) ) {
return true;
}
}
}
return false;
}
/**
* Checks if an option must be saved for the whole network in WP Multisite
*
* @param string $option_name Option name. It must come _without_ `jetpack_%` prefix. The method will prefix the option name.
*
* @return bool
*/
public static function is_network_option( $option_name ) {
if ( ! is_multisite() ) {
return false;
}
return in_array( $option_name, self::get_option_names( 'network' ), true );
}
/**
* Filters the requested option.
* This is a wrapper around `get_option_from_database` so that we can filter the option.
*
* @param string $name Option name. It must come _without_ `jetpack_%` prefix. The method will prefix the option name.
* @param mixed $default (optional).
*
* @return mixed
*/
public static function get_option( $name, $default = false ) {
/**
* Filter Jetpack Options.
* Can be useful in environments when Jetpack is running with a different setup
*
* @since 1.7.0
*
* @param string $value The value from the database.
* @param string $name Option name, _without_ `jetpack_%` prefix.
* @return string $value, unless the filters modify it.
*/
return apply_filters( 'jetpack_options', self::get_option_from_database( $name, $default ), $name );
}
/**
* Returns the requested option. Looks in jetpack_options or jetpack_$name as appropriate.
*
* @param string $name Option name. It must come _without_ `jetpack_%` prefix. The method will prefix the option name.
* @param mixed $default (optional).
*
* @return mixed
*/
private static function get_option_from_database( $name, $default = false ) {
if ( self::is_valid( $name, 'non_compact' ) ) {
if ( self::is_network_option( $name ) ) {
return get_site_option( "jetpack_$name", $default );
}
return get_option( "jetpack_$name", $default );
}
foreach ( array_keys( self::$grouped_options ) as $group ) {
if ( self::is_valid( $name, $group ) ) {
return self::get_grouped_option( $group, $name, $default );
}
}
trigger_error( sprintf( 'Invalid Jetpack option name: %s', esc_html( $name ) ), E_USER_WARNING ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error -- Don't wish to change legacy behavior.
return $default;
}
/**
* Returns the requested option, and ensures it's autoloaded in the future.
* This does _not_ adjust the prefix in any way (does not prefix jetpack_%)
*
* @param string $name Option name.
* @param mixed $default (optional).
*
* @return mixed
*/
public static function get_option_and_ensure_autoload( $name, $default ) {
// In this function the name is not adjusted by prefixing jetpack_
// so if it has already prefixed, we'll replace it and then
// check if the option name is a network option or not.
$jetpack_name = preg_replace( '/^jetpack_/', '', $name, 1 );
$is_network_option = self::is_network_option( $jetpack_name );
$value = $is_network_option ? get_site_option( $name ) : get_option( $name );
if ( false === $value && false !== $default ) {
if ( $is_network_option ) {
add_site_option( $name, $default );
} else {
add_option( $name, $default );
}
$value = $default;
}
return $value;
}
/**
* Update grouped option
*
* @param string $group Options group.
* @param string $name Options name.
* @param mixed $value Options value.
*
* @return bool Success or failure.
*/
private static function update_grouped_option( $group, $name, $value ) {
$options = get_option( self::$grouped_options[ $group ] );
if ( ! is_array( $options ) ) {
$options = array();
}
$options[ $name ] = $value;
return update_option( self::$grouped_options[ $group ], $options );
}
/**
* Updates the single given option. Updates jetpack_options or jetpack_$name as appropriate.
*
* @param string $name Option name. It must come _without_ `jetpack_%` prefix. The method will prefix the option name.
* @param mixed $value Option value.
* @param string $autoload If not compact option, allows specifying whether to autoload or not.
*
* @return bool Was the option successfully updated?
*/
public static function update_option( $name, $value, $autoload = null ) {
/**
* Fires before Jetpack updates a specific option.
*
* @since 1.1.2
* @since-jetpack 3.0.0
*
* @param str $name The name of the option being updated.
* @param mixed $value The new value of the option.
*/
do_action( 'pre_update_jetpack_option_' . $name, $name, $value );
if ( self::is_valid( $name, 'non_compact' ) ) {
if ( self::is_network_option( $name ) ) {
return update_site_option( "jetpack_$name", $value );
}
return update_option( "jetpack_$name", $value, $autoload );
}
foreach ( array_keys( self::$grouped_options ) as $group ) {
if ( self::is_valid( $name, $group ) ) {
return self::update_grouped_option( $group, $name, $value );
}
}
trigger_error( sprintf( 'Invalid Jetpack option name: %s', esc_html( $name ) ), E_USER_WARNING ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error -- Don't want to change legacy behavior.
return false;
}
/**
* Updates the multiple given options. Updates jetpack_options and/or jetpack_$name as appropriate.
*
* @param array $array array( option name => option value, ... ).
*/
public static function update_options( $array ) {
$names = array_keys( $array );
foreach ( array_diff( $names, self::get_option_names(), self::get_option_names( 'non_compact' ), self::get_option_names( 'private' ) ) as $unknown_name ) {
trigger_error( sprintf( 'Invalid Jetpack option name: %s', esc_html( $unknown_name ) ), E_USER_WARNING ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error -- Don't change legacy behavior.
unset( $array[ $unknown_name ] );
}
foreach ( $names as $name ) {
self::update_option( $name, $array[ $name ] );
}
}
/**
* Deletes the given option. May be passed multiple option names as an array.
* Updates jetpack_options and/or deletes jetpack_$name as appropriate.
*
* @param string|array $names Option names. They must come _without_ `jetpack_%` prefix. The method will prefix the option names.
*
* @return bool Was the option successfully deleted?
*/
public static function delete_option( $names ) {
$result = true;
$names = (array) $names;
if ( ! self::is_valid( $names ) ) {
// phpcs:disable -- This line triggers a handful of errors; ignoring to avoid changing legacy behavior.
trigger_error( sprintf( 'Invalid Jetpack option names: %s', print_r( $names, 1 ) ), E_USER_WARNING );
// phpcs:enable
return false;
}
foreach ( array_intersect( $names, self::get_option_names( 'non_compact' ) ) as $name ) {
if ( self::is_network_option( $name ) ) {
$result = delete_site_option( "jetpack_$name" );
} else {
$result = delete_option( "jetpack_$name" );
}
}
foreach ( array_keys( self::$grouped_options ) as $group ) {
if ( ! self::delete_grouped_option( $group, $names ) ) {
$result = false;
}
}
return $result;
}
/**
* Get group option.
*
* @param string $group Option group name.
* @param string $name Option name.
* @param mixed $default Default option value.
*
* @return mixed Option.
*/
private static function get_grouped_option( $group, $name, $default ) {
$options = get_option( self::$grouped_options[ $group ] );
if ( is_array( $options ) && isset( $options[ $name ] ) ) {
return $options[ $name ];
}
return $default;
}
/**
* Delete grouped option.
*
* @param string $group Option group name.
* @param array $names Option names.
*
* @return bool Success or failure.
*/
private static function delete_grouped_option( $group, $names ) {
$options = get_option( self::$grouped_options[ $group ], array() );
$to_delete = array_intersect( $names, self::get_option_names( $group ), array_keys( $options ) );
if ( $to_delete ) {
foreach ( $to_delete as $name ) {
unset( $options[ $name ] );
}
return update_option( self::$grouped_options[ $group ], $options );
}
return true;
}
/*
* Raw option methods allow Jetpack to get / update / delete options via direct DB queries, including options
* that are not created by the Jetpack plugin. This is helpful only in rare cases when we need to bypass
* cache and filters.
*/
/**
* Deletes an option via $wpdb query.
*
* @param string $name Option name.
*
* @return bool Is the option deleted?
*/
public static function delete_raw_option( $name ) {
if ( self::bypass_raw_option( $name ) ) {
return delete_option( $name );
}
global $wpdb;
$result = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->options WHERE option_name = %s", $name ) );
return $result;
}
/**
* Updates an option via $wpdb query.
*
* @param string $name Option name.
* @param mixed $value Option value.
* @param bool $autoload Specifying whether to autoload or not.
*
* @return bool Is the option updated?
*/
public static function update_raw_option( $name, $value, $autoload = false ) {
if ( self::bypass_raw_option( $name ) ) {
return update_option( $name, $value, $autoload );
}
global $wpdb;
$autoload_value = $autoload ? 'yes' : 'no';
$old_value = $wpdb->get_var(
$wpdb->prepare(
"SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1",
$name
)
);
if ( $old_value === $value ) {
return false;
}
$serialized_value = maybe_serialize( $value );
// below we used "insert ignore" to at least suppress the resulting error.
$updated_num = $wpdb->query(
$wpdb->prepare(
"UPDATE $wpdb->options SET option_value = %s WHERE option_name = %s",
$serialized_value,
$name
)
);
// Try inserting the option if the value doesn't exits.
if ( ! $updated_num ) {
$updated_num = $wpdb->query(
$wpdb->prepare(
"INSERT IGNORE INTO $wpdb->options ( option_name, option_value, autoload ) VALUES ( %s, %s, %s )",
$name,
$serialized_value,
$autoload_value
)
);
}
return (bool) $updated_num;
}
/**
* Gets an option via $wpdb query.
*
* @since 1.1.2
* @since-jetpack 5.4.0
*
* @param string $name Option name.
* @param mixed $default Default option value if option is not found.
*
* @return mixed Option value, or null if option is not found and default is not specified.
*/
public static function get_raw_option( $name, $default = null ) {
if ( self::bypass_raw_option( $name ) ) {
return get_option( $name, $default );
}
global $wpdb;
$value = $wpdb->get_var(
$wpdb->prepare(
"SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1",
$name
)
);
$value = maybe_unserialize( $value );
if ( null === $value && null !== $default ) {
return $default;
}
return $value;
}
/**
* This function checks for a constant that, if present, will disable direct DB queries Jetpack uses to manage certain options and force Jetpack to always use Options API instead.
* Options can be selectively managed via a blocklist by filtering option names via the jetpack_disabled_raw_option filter.
*
* @param string $name Option name.
*
* @return bool
*/
public static function bypass_raw_option( $name ) {
if ( Constants::get_constant( 'JETPACK_DISABLE_RAW_OPTIONS' ) ) {
return true;
}
/**
* Allows to disable particular raw options.
*
* @since 1.1.2
* @since-jetpack 5.5.0
*
* @param array $disabled_raw_options An array of option names that you can selectively blocklist from being managed via direct database queries.
*/
$disabled_raw_options = apply_filters( 'jetpack_disabled_raw_options', array() );
return isset( $disabled_raw_options[ $name ] );
}
/**
* Gets all known options that are used by Jetpack and managed by Jetpack_Options.
*
* @since 1.1.2
* @since-jetpack 5.4.0
*
* @param boolean $strip_unsafe_options If true, and by default, will strip out options necessary for the connection to WordPress.com.
* @return array An array of all options managed via the Jetpack_Options class.
*/
public static function get_all_jetpack_options( $strip_unsafe_options = true ) {
$jetpack_options = self::get_option_names();
$jetpack_options_non_compat = self::get_option_names( 'non_compact' );
$jetpack_options_private = self::get_option_names( 'private' );
$all_jp_options = array_merge( $jetpack_options, $jetpack_options_non_compat, $jetpack_options_private );
if ( $strip_unsafe_options ) {
// Flag some Jetpack options as unsafe.
$unsafe_options = array(
'id', // (int) The Client ID/WP.com Blog ID of this site.
'master_user', // (int) The local User ID of the user who connected this site to jetpack.wordpress.com.
'version', // (string) Used during upgrade procedure to auto-activate new modules. version:time
// non_compact.
'activated',
// private.
'register',
'blog_token', // (string) The Client Secret/Blog Token of this site.
'user_token', // (string) The User Token of this site. (deprecated)
'user_tokens',
);
// Remove the unsafe Jetpack options.
foreach ( $unsafe_options as $unsafe_option ) {
$key = array_search( $unsafe_option, $all_jp_options, true );
if ( false !== $key ) {
unset( $all_jp_options[ $key ] );
}
}
}
return $all_jp_options;
}
/**
* Get all options that are not managed by the Jetpack_Options class that are used by Jetpack.
*
* @since 1.1.2
* @since-jetpack 5.4.0
*
* @return array
*/
public static function get_all_wp_options() {
// A manual build of the wp options.
return array(
'sharing-options',
'disabled_likes',
'disabled_reblogs',
'jetpack_comments_likes_enabled',
'stats_options',
'stats_dashboard_widget',
'safecss_preview_rev',
'safecss_rev',
'safecss_revision_migrated',
'nova_menu_order',
'jetpack_portfolio',
'jetpack_portfolio_posts_per_page',
'jetpack_testimonial',
'jetpack_testimonial_posts_per_page',
'sharedaddy_disable_resources',
'sharing-options',
'sharing-services',
'site_icon_temp_data',
'featured-content',
'site_logo',
'jetpack_dismissed_notices',
'jetpack-twitter-cards-site-tag',
'jetpack-sitemap-state',
'jetpack_sitemap_post_types',
'jetpack_sitemap_location',
'jetpack_protect_key',
'jetpack_protect_blocked_attempts',
'jetpack_protect_activating',
'jetpack_connection_banner_ab',
'jetpack_active_plan',
'jetpack_activation_source',
'jetpack_site_products',
'jetpack_sso_match_by_email',
'jetpack_sso_require_two_step',
'jetpack_sso_remove_login_form',
'jetpack_last_connect_url_check',
'jpo_business_address',
'jpo_site_type',
'jpo_homepage_format',
'jpo_contact_page',
'jetpack_excluded_extensions',
);
}
/**
* Gets all options that can be safely reset by CLI.
*
* @since 1.1.2
* @since-jetpack 5.4.0
*
* @return array array Associative array containing jp_options which are managed by the Jetpack_Options class and wp_options which are not.
*/
public static function get_options_for_reset() {
$all_jp_options = self::get_all_jetpack_options();
$wp_options = self::get_all_wp_options();
$options = array(
'jp_options' => $all_jp_options,
'wp_options' => $wp_options,
);
return $options;
}
/**
* Delete all known options
*
* @since 1.1.2
* @since-jetpack 5.4.0
*
* @return void
*/
public static function delete_all_known_options() {
// Delete all compact options.
foreach ( (array) self::$grouped_options as $option_name ) {
delete_option( $option_name );
}
// Delete all non-compact Jetpack options.
foreach ( (array) self::get_option_names( 'non-compact' ) as $option_name ) {
self::delete_option( $option_name );
}
// Delete all options that can be reset via CLI, that aren't Jetpack options.
foreach ( (array) self::get_all_wp_options() as $option_name ) {
delete_option( $option_name );
}
}
}
automattic/jetpack-connection/legacy/class-jetpack-signature.php 0000644 00000035075 15153552356 0021220 0 ustar 00 <?php
/**
* The Jetpack Connection signature class file.
*
* @package automattic/jetpack-connection
*/
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
/**
* The Jetpack Connection signature class that is used to sign requests.
*/
class Jetpack_Signature {
/**
* Token part of the access token.
*
* @access public
* @var string
*/
public $token;
/**
* Access token secret.
*
* @access public
* @var string
*/
public $secret;
/**
* Timezone difference (in seconds).
*
* @access public
* @var int
*/
public $time_diff;
/**
* The current request URL.
*
* @access public
* @var string
*/
public $current_request_url;
/**
* Constructor.
*
* @param array $access_token Access token.
* @param int $time_diff Timezone difference (in seconds).
*/
public function __construct( $access_token, $time_diff = 0 ) {
$secret = explode( '.', $access_token );
if ( 2 !== count( $secret ) ) {
return;
}
$this->token = $secret[0];
$this->secret = $secret[1];
$this->time_diff = $time_diff;
}
/**
* Sign the current request.
*
* @todo Implement a proper nonce verification.
*
* @param array $override Optional arguments to override the ones from the current request.
* @return string|WP_Error Request signature, or a WP_Error on failure.
*/
public function sign_current_request( $override = array() ) {
if ( isset( $override['scheme'] ) ) {
$scheme = $override['scheme'];
if ( ! in_array( $scheme, array( 'http', 'https' ), true ) ) {
return new WP_Error( 'invalid_scheme', 'Invalid URL scheme' );
}
} elseif ( is_ssl() ) {
$scheme = 'https';
} else {
$scheme = 'http';
}
$port = $this->get_current_request_port();
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidatedNotSanitized -- Sniff misses the esc_url_raw wrapper.
$this->current_request_url = esc_url_raw( wp_unslash( "{$scheme}://{$_SERVER['HTTP_HOST']}:{$port}" . ( isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : '' ) ) );
if ( array_key_exists( 'body', $override ) && ! empty( $override['body'] ) ) {
$body = $override['body'];
} elseif ( isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === strtoupper( $_SERVER['REQUEST_METHOD'] ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is validating.
$body = isset( $GLOBALS['HTTP_RAW_POST_DATA'] ) ? $GLOBALS['HTTP_RAW_POST_DATA'] : null;
// Convert the $_POST to the body, if the body was empty. This is how arrays are hashed
// and encoded on the Jetpack side.
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
// phpcs:ignore WordPress.Security.NonceVerification.Missing
if ( empty( $body ) && is_array( $_POST ) && count( $_POST ) > 0 ) {
$body = $_POST; // phpcs:ignore WordPress.Security.NonceVerification.Missing
}
}
} elseif ( isset( $_SERVER['REQUEST_METHOD'] ) && 'PUT' === strtoupper( $_SERVER['REQUEST_METHOD'] ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is validating.
// This is a little strange-looking, but there doesn't seem to be another way to get the PUT body.
$raw_put_data = file_get_contents( 'php://input' );
parse_str( $raw_put_data, $body );
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
$put_data = json_decode( $raw_put_data, true );
if ( is_array( $put_data ) && count( $put_data ) > 0 ) {
$body = $put_data;
}
}
} else {
$body = null;
}
if ( empty( $body ) ) {
$body = null;
}
$a = array();
foreach ( array( 'token', 'timestamp', 'nonce', 'body-hash' ) as $parameter ) {
if ( isset( $override[ $parameter ] ) ) {
$a[ $parameter ] = $override[ $parameter ];
} else {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
$a[ $parameter ] = isset( $_GET[ $parameter ] ) ? filter_var( wp_unslash( $_GET[ $parameter ] ) ) : '';
}
}
$method = isset( $override['method'] ) ? $override['method'] : ( isset( $_SERVER['REQUEST_METHOD'] ) ? filter_var( wp_unslash( $_SERVER['REQUEST_METHOD'] ) ) : null );
return $this->sign_request( $a['token'], $a['timestamp'], $a['nonce'], $a['body-hash'], $method, $this->current_request_url, $body, true );
}
/**
* Sign a specified request.
*
* @todo Having body_hash v. body-hash is annoying. Refactor to accept an array?
* @todo Use wp_json_encode() instead of json_encode()?
*
* @param string $token Request token.
* @param int $timestamp Timestamp of the request.
* @param string $nonce Request nonce.
* @param string $body_hash Request body hash.
* @param string $method Request method.
* @param string $url Request URL.
* @param mixed $body Request body.
* @param bool $verify_body_hash Whether to verify the body hash against the body.
* @return string|WP_Error Request signature, or a WP_Error on failure.
*/
public function sign_request( $token = '', $timestamp = 0, $nonce = '', $body_hash = '', $method = '', $url = '', $body = null, $verify_body_hash = true ) {
if ( ! $this->secret ) {
return new WP_Error( 'invalid_secret', 'Invalid secret' );
}
if ( ! $this->token ) {
return new WP_Error( 'invalid_token', 'Invalid token' );
}
list( $token ) = explode( '.', $token );
$signature_details = compact( 'token', 'timestamp', 'nonce', 'body_hash', 'method', 'url' );
if ( 0 !== strpos( $token, "$this->token:" ) ) {
return new WP_Error( 'token_mismatch', 'Incorrect token', compact( 'signature_details' ) );
}
// If we got an array at this point, let's encode it, so we can see what it looks like as a string.
if ( is_array( $body ) ) {
if ( count( $body ) > 0 ) {
// phpcs:ignore WordPress.WP.AlternativeFunctions.json_encode_json_encode
$body = json_encode( $body );
} else {
$body = '';
}
}
$required_parameters = array( 'token', 'timestamp', 'nonce', 'method', 'url' );
if ( $body !== null ) {
$required_parameters[] = 'body_hash';
if ( ! is_string( $body ) ) {
return new WP_Error( 'invalid_body', 'Body is malformed.', compact( 'signature_details' ) );
}
}
foreach ( $required_parameters as $required ) {
if ( ! is_scalar( $$required ) ) {
return new WP_Error( 'invalid_signature', sprintf( 'The required "%s" parameter is malformed.', str_replace( '_', '-', $required ) ), compact( 'signature_details' ) );
}
if ( ! strlen( $$required ) ) {
return new WP_Error( 'invalid_signature', sprintf( 'The required "%s" parameter is missing.', str_replace( '_', '-', $required ) ), compact( 'signature_details' ) );
}
}
if ( empty( $body ) ) {
if ( $body_hash ) {
return new WP_Error( 'invalid_body_hash', 'Invalid body hash for empty body.', compact( 'signature_details' ) );
}
} else {
$connection = new Connection_Manager();
if ( $verify_body_hash && $connection->sha1_base64( $body ) !== $body_hash ) {
return new WP_Error( 'invalid_body_hash', 'The body hash does not match.', compact( 'signature_details' ) );
}
}
$parsed = wp_parse_url( $url );
if ( ! isset( $parsed['host'] ) ) {
return new WP_Error( 'invalid_signature', sprintf( 'The required "%s" parameter is malformed.', 'url' ), compact( 'signature_details' ) );
}
if ( ! empty( $parsed['port'] ) ) {
$port = $parsed['port'];
} elseif ( 'http' === $parsed['scheme'] ) {
$port = 80;
} elseif ( 'https' === $parsed['scheme'] ) {
$port = 443;
} else {
return new WP_Error( 'unknown_scheme_port', "The scheme's port is unknown", compact( 'signature_details' ) );
}
if ( ! ctype_digit( "$timestamp" ) || 10 < strlen( $timestamp ) ) { // If Jetpack is around in 275 years, you can blame mdawaffe for the bug.
return new WP_Error( 'invalid_signature', sprintf( 'The required "%s" parameter is malformed.', 'timestamp' ), compact( 'signature_details' ) );
}
$local_time = $timestamp - $this->time_diff;
if ( $local_time < time() - 600 || $local_time > time() + 300 ) {
return new WP_Error( 'invalid_signature', 'The timestamp is too old.', compact( 'signature_details' ) );
}
if ( 12 < strlen( $nonce ) || preg_match( '/[^a-zA-Z0-9]/', $nonce ) ) {
return new WP_Error( 'invalid_signature', sprintf( 'The required "%s" parameter is malformed.', 'nonce' ), compact( 'signature_details' ) );
}
$normalized_request_pieces = array(
$token,
$timestamp,
$nonce,
$body_hash,
strtoupper( $method ),
strtolower( $parsed['host'] ),
$port,
empty( $parsed['path'] ) ? '' : $parsed['path'],
// Normalized Query String.
);
$normalized_request_pieces = array_merge( $normalized_request_pieces, $this->normalized_query_parameters( isset( $parsed['query'] ) ? $parsed['query'] : '' ) );
$flat_normalized_request_pieces = array();
foreach ( $normalized_request_pieces as $piece ) {
if ( is_array( $piece ) ) {
foreach ( $piece as $subpiece ) {
$flat_normalized_request_pieces[] = $subpiece;
}
} else {
$flat_normalized_request_pieces[] = $piece;
}
}
$normalized_request_pieces = $flat_normalized_request_pieces;
$normalized_request_string = join( "\n", $normalized_request_pieces ) . "\n";
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
return base64_encode( hash_hmac( 'sha1', $normalized_request_string, $this->secret, true ) );
}
/**
* Retrieve and normalize the parameters from a query string.
*
* @param string $query_string Query string.
* @return array Normalized query string parameters.
*/
public function normalized_query_parameters( $query_string ) {
parse_str( $query_string, $array );
unset( $array['signature'] );
$names = array_keys( $array );
$values = array_values( $array );
$names = array_map( array( $this, 'encode_3986' ), $names );
$values = array_map( array( $this, 'encode_3986' ), $values );
$pairs = array_map( array( $this, 'join_with_equal_sign' ), $names, $values );
sort( $pairs );
return $pairs;
}
/**
* Encodes a string or array of strings according to RFC 3986.
*
* @param string|array $string_or_array String or array to encode.
* @return string|array URL-encoded string or array.
*/
public function encode_3986( $string_or_array ) {
if ( is_array( $string_or_array ) ) {
return array_map( array( $this, 'encode_3986' ), $string_or_array );
}
return rawurlencode( $string_or_array );
}
/**
* Concatenates a parameter name and a parameter value with an equals sign between them.
*
* @param string $name Parameter name.
* @param string|array $value Parameter value.
* @return string|array A string pair (e.g. `name=value`) or an array of string pairs.
*/
public function join_with_equal_sign( $name, $value ) {
if ( is_array( $value ) ) {
return $this->join_array_with_equal_sign( $name, $value );
}
return "{$name}={$value}";
}
/**
* Helper function for join_with_equal_sign for handling arrayed values.
* Explicitly supports nested arrays.
*
* @param string $name Parameter name.
* @param array $value Parameter value.
* @return array An array of string pairs (e.g. `[ name[example]=value ]`).
*/
private function join_array_with_equal_sign( $name, $value ) {
$result = array();
foreach ( $value as $value_key => $value_value ) {
$joined_value = $this->join_with_equal_sign( $name . '[' . $value_key . ']', $value_value );
if ( is_array( $joined_value ) ) {
foreach ( array_values( $joined_value ) as $individual_joined_value ) {
$result[] = $individual_joined_value;
}
} elseif ( is_string( $joined_value ) ) {
$result[] = $joined_value;
}
}
sort( $result );
return $result;
}
/**
* Gets the port that should be considered to sign the current request.
*
* It will analyze the current request, as well as some Jetpack constants, to return the string
* to be concatenated in the URL representing the port of the current request.
*
* @since 1.8.4
*
* @return string The port to be used in the signature
*/
public function get_current_request_port() {
$host_port = isset( $_SERVER['HTTP_X_FORWARDED_PORT'] ) ? $this->sanitize_host_post( $_SERVER['HTTP_X_FORWARDED_PORT'] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is validating.
if ( '' === $host_port && isset( $_SERVER['SERVER_PORT'] ) ) {
$host_port = $this->sanitize_host_post( $_SERVER['SERVER_PORT'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is validating.
}
/**
* Note: This port logic is tested in the Jetpack_Cxn_Tests->test__server_port_value() test.
* Please update the test if any changes are made in this logic.
*/
if ( is_ssl() ) {
// 443: Standard Port
// 80: Assume we're behind a proxy without X-Forwarded-Port. Hardcoding "80" here means most sites
// with SSL termination proxies (self-served, Cloudflare, etc.) don't need to fiddle with
// the JETPACK_SIGNATURE__HTTPS_PORT constant. The code also implies we can't talk to a
// site at https://example.com:80/ (which would be a strange configuration).
// JETPACK_SIGNATURE__HTTPS_PORT: Set this constant in wp-config.php to the back end webserver's port
// if the site is behind a proxy running on port 443 without
// X-Forwarded-Port and the back end's port is *not* 80. It's better,
// though, to configure the proxy to send X-Forwarded-Port.
$https_port = defined( 'JETPACK_SIGNATURE__HTTPS_PORT' ) ? $this->sanitize_host_post( JETPACK_SIGNATURE__HTTPS_PORT ) : '443';
$port = in_array( $host_port, array( '443', '80', $https_port ), true ) ? '' : $host_port;
} else {
// 80: Standard Port
// JETPACK_SIGNATURE__HTTPS_PORT: Set this constant in wp-config.php to the back end webserver's port
// if the site is behind a proxy running on port 80 without
// X-Forwarded-Port. It's better, though, to configure the proxy to
// send X-Forwarded-Port.
$http_port = defined( 'JETPACK_SIGNATURE__HTTP_PORT' ) ? $this->sanitize_host_post( JETPACK_SIGNATURE__HTTP_PORT ) : '80';
$port = in_array( $host_port, array( '80', $http_port ), true ) ? '' : $host_port;
}
return (string) $port;
}
/**
* Sanitizes a variable checking if it's a valid port number, which can be an integer or a numeric string
*
* @since 1.8.4
*
* @param mixed $port_number Variable representing a port number.
* @return string Always a string with a valid port number, or an empty string if input is invalid
*/
public function sanitize_host_post( $port_number ) {
if ( ! is_int( $port_number ) && ! is_string( $port_number ) ) {
return '';
}
if ( is_string( $port_number ) && ! ctype_digit( $port_number ) ) {
return '';
}
if ( 0 >= (int) $port_number || 65535 < $port_number ) {
return '';
}
return (string) $port_number;
}
}
automattic/jetpack-connection/legacy/class-jetpack-tracks-client.php 0000644 00000014625 15153552356 0021760 0 ustar 00 <?php
/**
* Legacy Jetpack Tracks Client
*
* @package automattic/jetpack-tracking
*/
use Automattic\Jetpack\Connection\Manager;
/**
* Jetpack_Tracks_Client
*
* Send Tracks events on behalf of a user
*
* Example Usage:
```php
require( dirname(__FILE__).'path/to/tracks/class-jetpack-tracks-client.php' );
$result = Jetpack_Tracks_Client::record_event( array(
'_en' => $event_name, // required
'_ui' => $user_id, // required unless _ul is provided
'_ul' => $user_login, // required unless _ui is provided
// Optional, but recommended
'_ts' => $ts_in_ms, // Default: now
'_via_ip' => $client_ip, // we use it for geo, etc.
// Possibly useful to set some context for the event
'_via_ua' => $client_user_agent,
'_via_url' => $client_url,
'_via_ref' => $client_referrer,
// For user-targeted tests
'abtest_name' => $abtest_name,
'abtest_variation' => $abtest_variation,
// Your application-specific properties
'custom_property' => $some_value,
) );
if ( is_wp_error( $result ) ) {
// Handle the error in your app
}
```
*/
class Jetpack_Tracks_Client {
const PIXEL = 'https://pixel.wp.com/t.gif';
const BROWSER_TYPE = 'php-agent';
const USER_AGENT_SLUG = 'tracks-client';
const VERSION = '0.3';
/**
* Stores the Terms of Service Object Reference.
*
* @var null
*/
private static $terms_of_service = null;
/**
* Record an event.
*
* @param mixed $event Event object to send to Tracks. An array will be cast to object. Required.
* Properties are included directly in the pixel query string after light validation.
* @return mixed True on success, WP_Error on failure
*/
public static function record_event( $event ) {
if ( ! self::$terms_of_service ) {
self::$terms_of_service = new \Automattic\Jetpack\Terms_Of_Service();
}
// Don't track users who have opted out or not agreed to our TOS, or are not running an active Jetpack.
if ( ! self::$terms_of_service->has_agreed() || ! empty( $_COOKIE['tk_opt-out'] ) ) {
return false;
}
if ( ! $event instanceof Jetpack_Tracks_Event ) {
$event = new Jetpack_Tracks_Event( $event );
}
if ( is_wp_error( $event ) ) {
return $event;
}
$pixel = $event->build_pixel_url( $event );
if ( ! $pixel ) {
return new WP_Error( 'invalid_pixel', 'cannot generate tracks pixel for given input', 400 );
}
return self::record_pixel( $pixel );
}
/**
* Synchronously request the pixel.
*
* @param string $pixel The wp.com tracking pixel.
* @return array|bool|WP_Error True if successful. wp_remote_get response or WP_Error if not.
*/
public static function record_pixel( $pixel ) {
// Add the Request Timestamp and URL terminator just before the HTTP request.
$pixel .= '&_rt=' . self::build_timestamp() . '&_=_';
$response = wp_remote_get(
$pixel,
array(
'blocking' => true, // The default, but being explicit here :).
'timeout' => 1,
'redirection' => 2,
'httpversion' => '1.1',
'user-agent' => self::get_user_agent(),
)
);
if ( is_wp_error( $response ) ) {
return $response;
}
$code = isset( $response['response']['code'] ) ? $response['response']['code'] : 0;
if ( 200 !== $code ) {
return new WP_Error( 'request_failed', 'Tracks pixel request failed', $code );
}
return true;
}
/**
* Get the user agent.
*
* @return string The user agent.
*/
public static function get_user_agent() {
return self::USER_AGENT_SLUG . '-v' . self::VERSION;
}
/**
* Build an event and return its tracking URL
*
* @deprecated Call the `build_pixel_url` method on a Jetpack_Tracks_Event object instead.
* @param array $event Event keys and values.
* @return string URL of a tracking pixel.
*/
public static function build_pixel_url( $event ) {
$_event = new Jetpack_Tracks_Event( $event );
return $_event->build_pixel_url();
}
/**
* Validate input for a tracks event.
*
* @deprecated Instantiate a Jetpack_Tracks_Event object instead
* @param array $event Event keys and values.
* @return mixed Validated keys and values or WP_Error on failure
*/
private static function validate_and_sanitize( $event ) {
$_event = new Jetpack_Tracks_Event( $event );
if ( is_wp_error( $_event ) ) {
return $_event;
}
return get_object_vars( $_event );
}
/**
* Builds a timestamp.
*
* Milliseconds since 1970-01-01.
*
* @return string
*/
public static function build_timestamp() {
$ts = round( microtime( true ) * 1000 );
return number_format( $ts, 0, '', '' );
}
/**
* Grabs the user's anon id from cookies, or generates and sets a new one
*
* @return string An anon id for the user
*/
public static function get_anon_id() {
static $anon_id = null;
if ( ! isset( $anon_id ) ) {
// Did the browser send us a cookie?
if ( isset( $_COOKIE['tk_ai'] ) && preg_match( '#^[a-z]+:[A-Za-z0-9+/=]{24}$#', $_COOKIE['tk_ai'] ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is validating.
$anon_id = $_COOKIE['tk_ai']; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is validating.
} else {
$binary = '';
// Generate a new anonId and try to save it in the browser's cookies.
// Note that base64-encoding an 18 character string generates a 24-character anon id.
for ( $i = 0; $i < 18; ++$i ) {
$binary .= chr( wp_rand( 0, 255 ) );
}
$anon_id = 'jetpack:' . base64_encode( $binary ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
if ( ! headers_sent()
&& ! ( defined( 'REST_REQUEST' ) && REST_REQUEST )
&& ! ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST )
) {
setcookie( 'tk_ai', $anon_id, 0, COOKIEPATH, COOKIE_DOMAIN, is_ssl(), false ); // phpcs:ignore Jetpack.Functions.SetCookie -- This is a random value and should be fine.
}
}
}
return $anon_id;
}
/**
* Gets the WordPress.com user's Tracks identity, if connected.
*
* @return array|bool
*/
public static function get_connected_user_tracks_identity() {
$user_data = ( new Manager() )->get_connected_user_data();
if ( ! $user_data ) {
return false;
}
return array(
'blogid' => Jetpack_Options::get_option( 'id', 0 ),
'userid' => $user_data['ID'],
'username' => $user_data['login'],
'user_locale' => $user_data['user_locale'],
);
}
}
automattic/jetpack-connection/legacy/class-jetpack-tracks-event.php 0000644 00000010530 15153552356 0021612 0 ustar 00 <?php
/**
* Class Jetpack_Tracks_Event. Legacy.
*
* @package automattic/jetpack-sync
*/
/*
* Example Usage:
```php
require_once( dirname(__FILE__) . 'path/to/tracks/class-jetpack-tracks-event.php' );
$event = new Jetpack_Tracks_Event( array(
'_en' => $event_name, // required
'_ui' => $user_id, // required unless _ul is provided
'_ul' => $user_login, // required unless _ui is provided
// Optional, but recommended
'_via_ip' => $client_ip, // for geo, etc.
// Possibly useful to set some context for the event
'_via_ua' => $client_user_agent,
'_via_url' => $client_url,
'_via_ref' => $client_referrer,
// For user-targeted tests
'abtest_name' => $abtest_name,
'abtest_variation' => $abtest_variation,
// Your application-specific properties
'custom_property' => $some_value,
) );
if ( is_wp_error( $event->error ) ) {
// Handle the error in your app
}
$bump_and_redirect_pixel = $event->build_signed_pixel_url();
```
*/
/**
* Class Jetpack_Tracks_Event
*/
#[AllowDynamicProperties]
class Jetpack_Tracks_Event {
const EVENT_NAME_REGEX = '/^(([a-z0-9]+)_){2}([a-z0-9_]+)$/';
const PROP_NAME_REGEX = '/^[a-z_][a-z0-9_]*$/';
/**
* Tracks Event Error.
*
* @var mixed Error.
*/
public $error;
/**
* Jetpack_Tracks_Event constructor.
*
* @param object $event Tracks event.
*/
public function __construct( $event ) {
$_event = self::validate_and_sanitize( $event );
if ( is_wp_error( $_event ) ) {
$this->error = $_event;
return;
}
foreach ( $_event as $key => $value ) {
$this->{$key} = $value;
}
}
/**
* Record a track event.
*/
public function record() {
return Jetpack_Tracks_Client::record_event( $this );
}
/**
* Annotate the event with all relevant info.
*
* @param mixed $event Object or (flat) array.
* @return mixed The transformed event array or WP_Error on failure.
*/
public static function validate_and_sanitize( $event ) {
$event = (object) $event;
// Required.
if ( ! $event->_en ) {
return new WP_Error( 'invalid_event', 'A valid event must be specified via `_en`', 400 );
}
// delete non-routable addresses otherwise geoip will discard the record entirely.
if ( property_exists( $event, '_via_ip' ) && preg_match( '/^192\.168|^10\./', $event->_via_ip ) ) {
unset( $event->_via_ip );
}
$validated = array(
'browser_type' => Jetpack_Tracks_Client::BROWSER_TYPE,
'_aua' => Jetpack_Tracks_Client::get_user_agent(),
);
$_event = (object) array_merge( (array) $event, $validated );
// If you want to block property names, do it here.
// Make sure we have an event timestamp.
if ( ! isset( $_event->_ts ) ) {
$_event->_ts = Jetpack_Tracks_Client::build_timestamp();
}
return $_event;
}
/**
* Build a pixel URL that will send a Tracks event when fired.
* On error, returns an empty string ('').
*
* @return string A pixel URL or empty string ('') if there were invalid args.
*/
public function build_pixel_url() {
if ( $this->error ) {
return '';
}
$args = get_object_vars( $this );
// Request Timestamp and URL Terminator must be added just before the HTTP request or not at all.
unset( $args['_rt'] );
unset( $args['_'] );
$validated = self::validate_and_sanitize( $args );
if ( is_wp_error( $validated ) ) {
return '';
}
return Jetpack_Tracks_Client::PIXEL . '?' . http_build_query( $validated );
}
/**
* Validate the event name.
*
* @param string $name Event name.
* @return false|int
*/
public static function event_name_is_valid( $name ) {
return preg_match( self::EVENT_NAME_REGEX, $name );
}
/**
* Validates prop name
*
* @param string $name Property name.
*
* @return false|int Truthy value.
*/
public static function prop_name_is_valid( $name ) {
return preg_match( self::PROP_NAME_REGEX, $name );
}
/**
* Scrutinize event name.
*
* @param object $event Tracks event.
*/
public static function scrutinize_event_names( $event ) {
if ( ! self::event_name_is_valid( $event->_en ) ) {
return;
}
$whitelisted_key_names = array(
'anonId',
'Browser_Type',
);
foreach ( array_keys( (array) $event ) as $key ) {
if ( in_array( $key, $whitelisted_key_names, true ) ) {
continue;
}
if ( ! self::prop_name_is_valid( $key ) ) {
return;
}
}
}
}
automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php 0000644 00000062465 15153552356 0022033 0 ustar 00 <?php
/**
* Jetpack XMLRPC Server.
*
* @package automattic/jetpack-connection
*/
use Automattic\Jetpack\Connection\Client;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Connection\Secrets;
use Automattic\Jetpack\Connection\Tokens;
use Automattic\Jetpack\Connection\Urls;
use Automattic\Jetpack\Constants;
use Automattic\Jetpack\Roles;
/**
* Just a sack of functions. Not actually an IXR_Server
*/
class Jetpack_XMLRPC_Server {
/**
* The current error object
*
* @var \WP_Error
*/
public $error = null;
/**
* The current user
*
* @var \WP_User
*/
public $user = null;
/**
* The connection manager object.
*
* @var Automattic\Jetpack\Connection\Manager
*/
private $connection;
/**
* Creates a new XMLRPC server object.
*/
public function __construct() {
$this->connection = new Connection_Manager();
}
/**
* Whitelist of the XML-RPC methods available to the Jetpack Server. If the
* user is not authenticated (->login()) then the methods are never added,
* so they will get a "does not exist" error.
*
* @param array $core_methods Core XMLRPC methods.
*/
public function xmlrpc_methods( $core_methods ) {
$jetpack_methods = array(
'jetpack.verifyAction' => array( $this, 'verify_action' ),
'jetpack.idcUrlValidation' => array( $this, 'validate_urls_for_idc_mitigation' ),
'jetpack.unlinkUser' => array( $this, 'unlink_user' ),
'jetpack.testConnection' => array( $this, 'test_connection' ),
);
$jetpack_methods = array_merge( $jetpack_methods, $this->provision_xmlrpc_methods() );
$this->user = $this->login();
if ( $this->user ) {
$jetpack_methods = array_merge(
$jetpack_methods,
array(
'jetpack.testAPIUserCode' => array( $this, 'test_api_user_code' ),
)
);
if ( isset( $core_methods['metaWeblog.editPost'] ) ) {
$jetpack_methods['metaWeblog.newMediaObject'] = $core_methods['metaWeblog.newMediaObject'];
$jetpack_methods['jetpack.updateAttachmentParent'] = array( $this, 'update_attachment_parent' );
}
/**
* Filters the XML-RPC methods available to Jetpack for authenticated users.
*
* @since 1.7.0
* @since-jetpack 1.1.0
*
* @param array $jetpack_methods XML-RPC methods available to the Jetpack Server.
* @param array $core_methods Available core XML-RPC methods.
* @param \WP_User $user Information about the user authenticated in the request.
*/
$jetpack_methods = apply_filters( 'jetpack_xmlrpc_methods', $jetpack_methods, $core_methods, $this->user );
}
/**
* Filters the XML-RPC methods available to Jetpack for requests signed both with a blog token or a user token.
*
* @since 1.7.0
* @since 1.9.5 Introduced the $user parameter.
* @since-jetpack 3.0.0
*
* @param array $jetpack_methods XML-RPC methods available to the Jetpack Server.
* @param array $core_methods Available core XML-RPC methods.
* @param \WP_User|bool $user Information about the user authenticated in the request. False if authenticated with blog token.
*/
return apply_filters( 'jetpack_xmlrpc_unauthenticated_methods', $jetpack_methods, $core_methods, $this->user );
}
/**
* Whitelist of the bootstrap XML-RPC methods
*/
public function bootstrap_xmlrpc_methods() {
return array(
'jetpack.remoteAuthorize' => array( $this, 'remote_authorize' ),
'jetpack.remoteRegister' => array( $this, 'remote_register' ),
);
}
/**
* Additional method needed for authorization calls.
*/
public function authorize_xmlrpc_methods() {
return array(
'jetpack.remoteAuthorize' => array( $this, 'remote_authorize' ),
'jetpack.remoteRegister' => array( $this, 'remote_already_registered' ),
);
}
/**
* Remote provisioning methods.
*/
public function provision_xmlrpc_methods() {
return array(
'jetpack.remoteRegister' => array( $this, 'remote_register' ),
'jetpack.remoteProvision' => array( $this, 'remote_provision' ),
'jetpack.remoteConnect' => array( $this, 'remote_connect' ),
'jetpack.getUser' => array( $this, 'get_user' ),
);
}
/**
* Used to verify whether a local user exists and what role they have.
*
* @param int|string|array $request One of:
* int|string The local User's ID, username, or email address.
* array A request array containing:
* 0: int|string The local User's ID, username, or email address.
*
* @return array|\IXR_Error Information about the user, or error if no such user found:
* roles: string[] The user's rols.
* login: string The user's username.
* email_hash string[] The MD5 hash of the user's normalized email address.
* caps string[] The user's capabilities.
* allcaps string[] The user's granular capabilities, merged from role capabilities.
* token_key string The Token Key of the user's Jetpack token. Empty string if none.
*/
public function get_user( $request ) {
$user_id = is_array( $request ) ? $request[0] : $request;
if ( ! $user_id ) {
return $this->error(
new \WP_Error(
'invalid_user',
__( 'Invalid user identifier.', 'jetpack-connection' ),
400
),
'get_user'
);
}
$user = $this->get_user_by_anything( $user_id );
if ( ! $user ) {
return $this->error(
new \WP_Error(
'user_unknown',
__( 'User not found.', 'jetpack-connection' ),
404
),
'get_user'
);
}
$user_token = ( new Tokens() )->get_access_token( $user->ID );
if ( $user_token ) {
list( $user_token_key ) = explode( '.', $user_token->secret );
if ( $user_token_key === $user_token->secret ) {
$user_token_key = '';
}
} else {
$user_token_key = '';
}
return array(
'id' => $user->ID,
'login' => $user->user_login,
'email_hash' => md5( strtolower( trim( $user->user_email ) ) ),
'roles' => $user->roles,
'caps' => $user->caps,
'allcaps' => $user->allcaps,
'token_key' => $user_token_key,
);
}
/**
* Remote authorization XMLRPC method handler.
*
* @param array $request the request.
*/
public function remote_authorize( $request ) {
$user = get_user_by( 'id', $request['state'] );
/**
* Happens on various request handling events in the Jetpack XMLRPC server.
* The action combines several types of events:
* - remote_authorize
* - remote_provision
* - get_user.
*
* @since 1.7.0
* @since-jetpack 8.0.0
*
* @param String $action the action name, i.e., 'remote_authorize'.
* @param String $stage the execution stage, can be 'begin', 'success', 'error', etc.
* @param array $parameters extra parameters from the event.
* @param WP_User $user the acting user.
*/
do_action( 'jetpack_xmlrpc_server_event', 'remote_authorize', 'begin', array(), $user );
foreach ( array( 'secret', 'state', 'redirect_uri', 'code' ) as $required ) {
if ( ! isset( $request[ $required ] ) || empty( $request[ $required ] ) ) {
return $this->error(
new \WP_Error( 'missing_parameter', 'One or more parameters is missing from the request.', 400 ),
'remote_authorize'
);
}
}
if ( ! $user ) {
return $this->error( new \WP_Error( 'user_unknown', 'User not found.', 404 ), 'remote_authorize' );
}
if ( $this->connection->has_connected_owner() && $this->connection->is_user_connected( $request['state'] ) ) {
return $this->error( new \WP_Error( 'already_connected', 'User already connected.', 400 ), 'remote_authorize' );
}
$verified = $this->verify_action( array( 'authorize', $request['secret'], $request['state'] ) );
if ( is_a( $verified, 'IXR_Error' ) ) {
return $this->error( $verified, 'remote_authorize' );
}
wp_set_current_user( $request['state'] );
$result = $this->connection->authorize( $request );
if ( is_wp_error( $result ) ) {
return $this->error( $result, 'remote_authorize' );
}
// This action is documented in class.jetpack-xmlrpc-server.php.
do_action( 'jetpack_xmlrpc_server_event', 'remote_authorize', 'success' );
return array(
'result' => $result,
);
}
/**
* This XML-RPC method is called from the /jpphp/provision endpoint on WPCOM in order to
* register this site so that a plan can be provisioned.
*
* @param array $request An array containing at minimum nonce and local_user keys.
*
* @return \WP_Error|array
*/
public function remote_register( $request ) {
// This action is documented in class.jetpack-xmlrpc-server.php.
do_action( 'jetpack_xmlrpc_server_event', 'remote_register', 'begin', array() );
$user = $this->fetch_and_verify_local_user( $request );
if ( ! $user ) {
return $this->error(
new WP_Error( 'input_error', __( 'Valid user is required', 'jetpack-connection' ), 400 ),
'remote_register'
);
}
if ( is_wp_error( $user ) || is_a( $user, 'IXR_Error' ) ) {
return $this->error( $user, 'remote_register' );
}
if ( empty( $request['nonce'] ) ) {
return $this->error(
new \WP_Error(
'nonce_missing',
__( 'The required "nonce" parameter is missing.', 'jetpack-connection' ),
400
),
'remote_register'
);
}
$nonce = sanitize_text_field( $request['nonce'] );
unset( $request['nonce'] );
$api_url = $this->connection->api_url( 'partner_provision_nonce_check' );
$response = Client::_wp_remote_request(
esc_url_raw( add_query_arg( 'nonce', $nonce, $api_url ) ),
array( 'method' => 'GET' ),
true
);
if (
200 !== wp_remote_retrieve_response_code( $response ) ||
'OK' !== trim( wp_remote_retrieve_body( $response ) )
) {
return $this->error(
new \WP_Error(
'invalid_nonce',
__( 'There was an issue validating this request.', 'jetpack-connection' ),
400
),
'remote_register'
);
}
if ( ! Jetpack_Options::get_option( 'id' ) || ! ( new Tokens() )->get_access_token() || ! empty( $request['force'] ) ) {
wp_set_current_user( $user->ID );
// This code mostly copied from Jetpack::admin_page_load.
if ( isset( $request['from'] ) ) {
$this->connection->add_register_request_param( 'from', (string) $request['from'] );
}
$registered = $this->connection->try_registration();
if ( is_wp_error( $registered ) ) {
return $this->error( $registered, 'remote_register' );
} elseif ( ! $registered ) {
return $this->error(
new \WP_Error(
'registration_error',
__( 'There was an unspecified error registering the site', 'jetpack-connection' ),
400
),
'remote_register'
);
}
}
// This action is documented in class.jetpack-xmlrpc-server.php.
do_action( 'jetpack_xmlrpc_server_event', 'remote_register', 'success' );
return array(
'client_id' => Jetpack_Options::get_option( 'id' ),
);
}
/**
* This is a substitute for remote_register() when the blog is already registered which returns an error code
* signifying that state.
* This is an unauthorized call and we should not be responding with any data other than the error code.
*
* @return \IXR_Error
*/
public function remote_already_registered() {
return $this->error(
new \WP_Error( 'already_registered', __( 'Blog is already registered', 'jetpack-connection' ), 400 ),
'remote_register'
);
}
/**
* This XML-RPC method is called from the /jpphp/provision endpoint on WPCOM in order to
* register this site so that a plan can be provisioned.
*
* @param array $request An array containing at minimum a nonce key and a local_username key.
*
* @return \WP_Error|array
*/
public function remote_provision( $request ) {
$user = $this->fetch_and_verify_local_user( $request );
if ( ! $user ) {
return $this->error(
new WP_Error( 'input_error', __( 'Valid user is required', 'jetpack-connection' ), 400 ),
'remote_provision'
);
}
if ( is_wp_error( $user ) || is_a( $user, 'IXR_Error' ) ) {
return $this->error( $user, 'remote_provision' );
}
$site_icon = get_site_icon_url();
/**
* Filters the Redirect URI returned by the remote_register XMLRPC method
*
* @param string $redirect_uri The Redirect URI
*
* @since 1.9.7
*/
$redirect_uri = apply_filters( 'jetpack_xmlrpc_remote_register_redirect_uri', admin_url() );
// Generate secrets.
$roles = new Roles();
$role = $roles->translate_user_to_role( $user );
$secrets = ( new Secrets() )->generate( 'authorize', $user->ID );
$response = array(
'jp_version' => Constants::get_constant( 'JETPACK__VERSION' ),
'redirect_uri' => $redirect_uri,
'user_id' => $user->ID,
'user_email' => $user->user_email,
'user_login' => $user->user_login,
'scope' => $this->connection->sign_role( $role, $user->ID ),
'secret' => $secrets['secret_1'],
'is_active' => $this->connection->has_connected_owner(),
);
if ( $site_icon ) {
$response['site_icon'] = $site_icon;
}
/**
* Filters the response of the remote_provision XMLRPC method
*
* @param array $response The response.
* @param array $request An array containing at minimum a nonce key and a local_username key.
* @param \WP_User $user The local authenticated user.
*
* @since 1.9.7
*/
$response = apply_filters( 'jetpack_remote_xmlrpc_provision_response', $response, $request, $user );
return $response;
}
/**
* Given an array containing a local user identifier and a nonce, will attempt to fetch and set
* an access token for the given user.
*
* @param array $request An array containing local_user and nonce keys at minimum.
* @param \IXR_Client $ixr_client The client object, optional.
* @return mixed
*/
public function remote_connect( $request, $ixr_client = false ) {
if ( $this->connection->has_connected_owner() ) {
return $this->error(
new WP_Error(
'already_connected',
__( 'Jetpack is already connected.', 'jetpack-connection' ),
400
),
'remote_connect'
);
}
$user = $this->fetch_and_verify_local_user( $request );
if ( ! $user || is_wp_error( $user ) || is_a( $user, 'IXR_Error' ) ) {
return $this->error(
new WP_Error(
'input_error',
__( 'Valid user is required.', 'jetpack-connection' ),
400
),
'remote_connect'
);
}
if ( empty( $request['nonce'] ) ) {
return $this->error(
new WP_Error(
'input_error',
__( 'A non-empty nonce must be supplied.', 'jetpack-connection' ),
400
),
'remote_connect'
);
}
if ( ! $ixr_client ) {
$ixr_client = new Jetpack_IXR_Client();
}
// TODO: move this query into the Tokens class?
$ixr_client->query(
'jetpack.getUserAccessToken',
array(
'nonce' => sanitize_text_field( $request['nonce'] ),
'external_user_id' => $user->ID,
)
);
$token = $ixr_client->isError() ? false : $ixr_client->getResponse();
if ( empty( $token ) ) {
return $this->error(
new WP_Error(
'token_fetch_failed',
__( 'Failed to fetch user token from WordPress.com.', 'jetpack-connection' ),
400
),
'remote_connect'
);
}
$token = sanitize_text_field( $token );
( new Tokens() )->update_user_token( $user->ID, sprintf( '%s.%d', $token, $user->ID ), true );
/**
* Hook fired at the end of the jetpack.remoteConnect XML-RPC callback
*
* @since 1.9.7
*/
do_action( 'jetpack_remote_connect_end' );
return $this->connection->has_connected_owner();
}
/**
* Getter for the local user to act as.
*
* @param array $request the current request data.
*/
private function fetch_and_verify_local_user( $request ) {
if ( empty( $request['local_user'] ) ) {
return $this->error(
new \WP_Error(
'local_user_missing',
__( 'The required "local_user" parameter is missing.', 'jetpack-connection' ),
400
),
'remote_provision'
);
}
// Local user is used to look up by login, email or ID.
$local_user_info = $request['local_user'];
return $this->get_user_by_anything( $local_user_info );
}
/**
* Gets the user object by its data.
*
* @param string $user_id can be any identifying user data.
*/
private function get_user_by_anything( $user_id ) {
$user = get_user_by( 'login', $user_id );
if ( ! $user ) {
$user = get_user_by( 'email', $user_id );
}
if ( ! $user ) {
$user = get_user_by( 'ID', $user_id );
}
return $user;
}
/**
* Possible error_codes:
*
* - verify_secret_1_missing
* - verify_secret_1_malformed
* - verify_secrets_missing: verification secrets are not found in database
* - verify_secrets_incomplete: verification secrets are only partially found in database
* - verify_secrets_expired: verification secrets have expired
* - verify_secrets_mismatch: stored secret_1 does not match secret_1 sent by Jetpack.WordPress.com
* - state_missing: required parameter of state not found
* - state_malformed: state is not a digit
* - invalid_state: state in request does not match the stored state
*
* The 'authorize' and 'register' actions have additional error codes
*
* state_missing: a state ( user id ) was not supplied
* state_malformed: state is not the correct data type
* invalid_state: supplied state does not match the stored state
*
* @param array $params action An array of 3 parameters:
* [0]: string action. Possible values are `authorize`, `publicize` and `register`.
* [1]: string secret_1.
* [2]: int state.
* @return \IXR_Error|string IXR_Error on failure, secret_2 on success.
*/
public function verify_action( $params ) {
$action = isset( $params[0] ) ? $params[0] : '';
$verify_secret = isset( $params[1] ) ? $params[1] : '';
$state = isset( $params[2] ) ? $params[2] : '';
$result = ( new Secrets() )->verify( $action, $verify_secret, $state );
if ( is_wp_error( $result ) ) {
return $this->error( $result );
}
return $result;
}
/**
* Wrapper for wp_authenticate( $username, $password );
*
* @return \WP_User|bool
*/
public function login() {
$this->connection->require_jetpack_authentication();
$user = wp_authenticate( 'username', 'password' );
if ( is_wp_error( $user ) ) {
if ( 'authentication_failed' === $user->get_error_code() ) { // Generic error could mean most anything.
$this->error = new \WP_Error( 'invalid_request', 'Invalid Request', 403 );
} else {
$this->error = $user;
}
return false;
} elseif ( ! $user ) { // Shouldn't happen.
$this->error = new \WP_Error( 'invalid_request', 'Invalid Request', 403 );
return false;
}
wp_set_current_user( $user->ID );
return $user;
}
/**
* Returns the current error as an \IXR_Error
*
* @param \WP_Error|\IXR_Error $error The error object, optional.
* @param string $event_name The event name.
* @param \WP_User $user The user object.
* @return bool|\IXR_Error
*/
public function error( $error = null, $event_name = null, $user = null ) {
if ( null !== $event_name ) {
// This action is documented in class.jetpack-xmlrpc-server.php.
do_action( 'jetpack_xmlrpc_server_event', $event_name, 'fail', $error, $user );
}
if ( $error !== null ) {
$this->error = $error;
}
if ( is_wp_error( $this->error ) ) {
$code = $this->error->get_error_data();
if ( ! $code ) {
$code = -10520;
}
$message = sprintf( 'Jetpack: [%s] %s', $this->error->get_error_code(), $this->error->get_error_message() );
if ( ! class_exists( \IXR_Error::class ) ) {
require_once ABSPATH . WPINC . '/class-IXR.php';
}
return new \IXR_Error( $code, $message );
} elseif ( is_a( $this->error, 'IXR_Error' ) ) {
return $this->error;
}
return false;
}
/* API Methods */
/**
* Just authenticates with the given Jetpack credentials.
*
* @return string A success string. The Jetpack plugin filters it and make it return the Jetpack plugin version.
*/
public function test_connection() {
/**
* Filters the successful response of the XMLRPC test_connection method
*
* @param string $response The response string.
*/
return apply_filters( 'jetpack_xmlrpc_test_connection_response', 'success' );
}
/**
* Test the API user code.
*
* @param array $args arguments identifying the test site.
*/
public function test_api_user_code( $args ) {
$client_id = (int) $args[0];
$user_id = (int) $args[1];
$nonce = (string) $args[2];
$verify = (string) $args[3];
if ( ! $client_id || ! $user_id || ! strlen( $nonce ) || 32 !== strlen( $verify ) ) {
return false;
}
$user = get_user_by( 'id', $user_id );
if ( ! $user || is_wp_error( $user ) ) {
return false;
}
/* phpcs:ignore
debugging
error_log( "CLIENT: $client_id" );
error_log( "USER: $user_id" );
error_log( "NONCE: $nonce" );
error_log( "VERIFY: $verify" );
*/
$jetpack_token = ( new Tokens() )->get_access_token( $user_id );
$api_user_code = get_user_meta( $user_id, "jetpack_json_api_$client_id", true );
if ( ! $api_user_code ) {
return false;
}
$hmac = hash_hmac(
'md5',
json_encode( // phpcs:ignore WordPress.WP.AlternativeFunctions.json_encode_json_encode
(object) array(
'client_id' => (int) $client_id,
'user_id' => (int) $user_id,
'nonce' => (string) $nonce,
'code' => (string) $api_user_code,
)
),
$jetpack_token->secret
);
if ( ! hash_equals( $hmac, $verify ) ) {
return false;
}
return $user_id;
}
/**
* Unlink a user from WordPress.com
*
* When the request is done without any parameter, this XMLRPC callback gets an empty array as input.
*
* If $user_id is not provided, it will try to disconnect the current logged in user. This will fail if called by the Master User.
*
* If $user_id is is provided, it will try to disconnect the informed user, even if it's the Master User.
*
* @param mixed $user_id The user ID to disconnect from this site.
*/
public function unlink_user( $user_id = array() ) {
$user_id = (int) $user_id;
if ( $user_id < 1 ) {
$user_id = null;
}
/**
* Fired when we want to log an event to the Jetpack event log.
*
* @since 1.7.0
* @since-jetpack 7.7.0
*
* @param string $code Unique name for the event.
* @param string $data Optional data about the event.
*/
do_action( 'jetpack_event_log', 'unlink' );
return $this->connection->disconnect_user(
$user_id,
(bool) $user_id
);
}
/**
* Returns the home URL and site URL for the current site which can be used on the WPCOM side for
* IDC mitigation to decide whether sync should be allowed if the home and siteurl values differ between WPCOM
* and the remote Jetpack site.
*
* @return array
*/
public function validate_urls_for_idc_mitigation() {
return array(
'home' => Urls::home_url(),
'siteurl' => Urls::site_url(),
);
}
/**
* Updates the attachment parent object.
*
* @param array $args attachment and parent identifiers.
*/
public function update_attachment_parent( $args ) {
$attachment_id = (int) $args[0];
$parent_id = (int) $args[1];
return wp_update_post(
array(
'ID' => $attachment_id,
'post_parent' => $parent_id,
)
);
}
/**
* Deprecated: This method is no longer part of the Connection package and now lives on the Jetpack plugin.
*
* Disconnect this blog from the connected wordpress.com account
*
* @deprecated since 1.25.0
* @see Jetpack_XMLRPC_Methods::disconnect_blog() in the Jetpack plugin
*
* @return boolean
*/
public function disconnect_blog() {
_deprecated_function( __METHOD__, '1.25.0', 'Jetpack_XMLRPC_Methods::disconnect_blog()' );
if ( class_exists( 'Jetpack_XMLRPC_Methods' ) ) {
return Jetpack_XMLRPC_Methods::disconnect_blog();
}
return false;
}
/**
* Deprecated: This method is no longer part of the Connection package and now lives on the Jetpack plugin.
*
* Returns what features are available. Uses the slug of the module files.
*
* @deprecated since 1.25.0
* @see Jetpack_XMLRPC_Methods::features_available() in the Jetpack plugin
*
* @return array
*/
public function features_available() {
_deprecated_function( __METHOD__, '1.25.0', 'Jetpack_XMLRPC_Methods::features_available()' );
if ( class_exists( 'Jetpack_XMLRPC_Methods' ) ) {
return Jetpack_XMLRPC_Methods::features_available();
}
return array();
}
/**
* Deprecated: This method is no longer part of the Connection package and now lives on the Jetpack plugin.
*
* Returns what features are enabled. Uses the slug of the modules files.
*
* @deprecated since 1.25.0
* @see Jetpack_XMLRPC_Methods::features_enabled() in the Jetpack plugin
*
* @return array
*/
public function features_enabled() {
_deprecated_function( __METHOD__, '1.25.0', 'Jetpack_XMLRPC_Methods::features_enabled()' );
if ( class_exists( 'Jetpack_XMLRPC_Methods' ) ) {
return Jetpack_XMLRPC_Methods::features_enabled();
}
return array();
}
/**
* Deprecated: This method is no longer part of the Connection package and now lives on the Jetpack plugin.
*
* Serve a JSON API request.
*
* @deprecated since 1.25.0
* @see Jetpack_XMLRPC_Methods::json_api() in the Jetpack plugin
*
* @param array $args request arguments.
*/
public function json_api( $args = array() ) {
_deprecated_function( __METHOD__, '1.25.0', 'Jetpack_XMLRPC_Methods::json_api()' );
if ( class_exists( 'Jetpack_XMLRPC_Methods' ) ) {
return Jetpack_XMLRPC_Methods::json_api( $args );
}
return array();
}
}
automattic/jetpack-connection/src/class-client.php 0000644 00000035762 15153552356 0016404 0 ustar 00 <?php
/**
* The Connection Client class file.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Constants;
/**
* The Client class that is used to connect to WordPress.com Jetpack API.
*/
class Client {
const WPCOM_JSON_API_VERSION = '1.1';
/**
* Makes an authorized remote request using Jetpack_Signature
*
* @param array $args the arguments for the remote request.
* @param array|String $body the request body.
* @return array|WP_Error WP HTTP response on success
*/
public static function remote_request( $args, $body = null ) {
if ( isset( $args['url'] ) ) {
/**
* Filters the remote request url.
*
* @since 1.30.12
*
* @param string The remote request url.
*/
$args['url'] = apply_filters( 'jetpack_remote_request_url', $args['url'] );
}
$result = self::build_signed_request( $args, $body );
if ( ! $result || is_wp_error( $result ) ) {
return $result;
}
$response = self::_wp_remote_request( $result['url'], $result['request'] );
Error_Handler::get_instance()->check_api_response_for_errors(
$response,
$result['auth'],
empty( $args['url'] ) ? '' : $args['url'],
empty( $args['method'] ) ? 'POST' : $args['method'],
'rest'
);
/**
* Fired when the remote request response has been received.
*
* @since 1.30.8
*
* @param array|WP_Error The HTTP response.
*/
do_action( 'jetpack_received_remote_request_response', $response );
return $response;
}
/**
* Adds authorization signature to a remote request using Jetpack_Signature
*
* @param array $args the arguments for the remote request.
* @param array|String $body the request body.
* @return WP_Error|array {
* An array containing URL and request items.
*
* @type String $url The request URL.
* @type array $request Request arguments.
* @type array $auth Authorization data.
* }
*/
public static function build_signed_request( $args, $body = null ) {
add_filter(
'jetpack_constant_default_value',
__NAMESPACE__ . '\Utils::jetpack_api_constant_filter',
10,
2
);
$defaults = array(
'url' => '',
'user_id' => 0,
'blog_id' => 0,
'auth_location' => Constants::get_constant( 'JETPACK_CLIENT__AUTH_LOCATION' ),
'method' => 'POST',
'timeout' => 10,
'redirection' => 0,
'headers' => array(),
'stream' => false,
'filename' => null,
'sslverify' => true,
);
$args = wp_parse_args( $args, $defaults );
$args['blog_id'] = (int) $args['blog_id'];
if ( 'header' !== $args['auth_location'] ) {
$args['auth_location'] = 'query_string';
}
$token = ( new Tokens() )->get_access_token( $args['user_id'] );
if ( ! $token ) {
return new \WP_Error( 'missing_token' );
}
$method = strtoupper( $args['method'] );
$timeout = (int) $args['timeout'];
$redirection = $args['redirection'];
$stream = $args['stream'];
$filename = $args['filename'];
$sslverify = $args['sslverify'];
$request = compact( 'method', 'body', 'timeout', 'redirection', 'stream', 'filename', 'sslverify' );
@list( $token_key, $secret ) = explode( '.', $token->secret ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
if ( empty( $token ) || empty( $secret ) ) {
return new \WP_Error( 'malformed_token' );
}
$token_key = sprintf(
'%s:%d:%d',
$token_key,
Constants::get_constant( 'JETPACK__API_VERSION' ),
$token->external_user_id
);
$time_diff = (int) \Jetpack_Options::get_option( 'time_diff' );
$jetpack_signature = new \Jetpack_Signature( $token->secret, $time_diff );
$timestamp = time() + $time_diff;
if ( function_exists( 'wp_generate_password' ) ) {
$nonce = wp_generate_password( 10, false );
} else {
$nonce = substr( sha1( wp_rand( 0, 1000000 ) ), 0, 10 );
}
// Kind of annoying. Maybe refactor Jetpack_Signature to handle body-hashing.
if ( $body === null ) {
$body_hash = '';
} else {
// Allow arrays to be used in passing data.
$body_to_hash = $body;
if ( is_array( $body ) ) {
// We cast this to a new variable, because the array form of $body needs to be
// maintained so it can be passed into the request later on in the code.
if ( count( $body ) > 0 ) {
$body_to_hash = wp_json_encode( self::_stringify_data( $body ) );
} else {
$body_to_hash = '';
}
}
if ( ! is_string( $body_to_hash ) ) {
return new \WP_Error( 'invalid_body', 'Body is malformed.' );
}
$body_hash = base64_encode( sha1( $body_to_hash, true ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
}
$auth = array(
'token' => $token_key,
'timestamp' => $timestamp,
'nonce' => $nonce,
'body-hash' => $body_hash,
);
if ( false !== strpos( $args['url'], 'xmlrpc.php' ) ) {
$url_args = array(
'for' => 'jetpack',
'wpcom_blog_id' => \Jetpack_Options::get_option( 'id' ),
);
} else {
$url_args = array();
}
if ( 'header' !== $args['auth_location'] ) {
$url_args += $auth;
}
$url = add_query_arg( urlencode_deep( $url_args ), $args['url'] );
$signature = $jetpack_signature->sign_request( $token_key, $timestamp, $nonce, $body_hash, $method, $url, $body, false );
if ( ! $signature || is_wp_error( $signature ) ) {
return $signature;
}
// Send an Authorization header so various caches/proxies do the right thing.
$auth['signature'] = $signature;
$auth['version'] = Constants::get_constant( 'JETPACK__VERSION' );
$header_pieces = array();
foreach ( $auth as $key => $value ) {
$header_pieces[] = sprintf( '%s="%s"', $key, $value );
}
$request['headers'] = array_merge(
$args['headers'],
array(
'Authorization' => 'X_JETPACK ' . join( ' ', $header_pieces ),
)
);
if ( 'header' !== $args['auth_location'] ) {
$url = add_query_arg( 'signature', rawurlencode( $signature ), $url );
}
return compact( 'url', 'request', 'auth' );
}
/**
* Wrapper for wp_remote_request(). Turns off SSL verification for certain SSL errors.
* This is lame, but many, many, many hosts have misconfigured SSL.
*
* When Jetpack is registered, the jetpack_fallback_no_verify_ssl_certs option is set to the current time if:
* 1. a certificate error is found AND
* 2. not verifying the certificate works around the problem.
*
* The option is checked on each request.
*
* @internal
*
* @param String $url the request URL.
* @param array $args request arguments.
* @param Boolean $set_fallback whether to allow flagging this request to use a fallback certficate override.
* @return array|WP_Error WP HTTP response on success
*/
public static function _wp_remote_request( $url, $args, $set_fallback = false ) { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
$fallback = \Jetpack_Options::get_option( 'fallback_no_verify_ssl_certs' );
if ( false === $fallback ) {
\Jetpack_Options::update_option( 'fallback_no_verify_ssl_certs', 0 );
}
/**
* SSL verification (`sslverify`) for the JetpackClient remote request
* defaults to off, use this filter to force it on.
*
* Return `true` to ENABLE SSL verification, return `false`
* to DISABLE SSL verification.
*
* @since 1.7.0
* @since-jetpack 3.6.0
*
* @param bool Whether to force `sslverify` or not.
*/
if ( apply_filters( 'jetpack_client_verify_ssl_certs', false ) ) {
return wp_remote_request( $url, $args );
}
if ( (int) $fallback ) {
// We're flagged to fallback.
$args['sslverify'] = false;
}
$response = wp_remote_request( $url, $args );
if (
! $set_fallback // We're not allowed to set the flag on this request, so whatever happens happens.
||
isset( $args['sslverify'] ) && ! $args['sslverify'] // No verification - no point in doing it again.
||
! is_wp_error( $response ) // Let it ride.
) {
self::set_time_diff( $response, $set_fallback );
return $response;
}
// At this point, we're not flagged to fallback and we are allowed to set the flag on this request.
$message = $response->get_error_message();
// Is it an SSL Certificate verification error?
if (
false === strpos( $message, '14090086' ) // OpenSSL SSL3 certificate error.
&&
false === strpos( $message, '1407E086' ) // OpenSSL SSL2 certificate error.
&&
false === strpos( $message, 'error setting certificate verify locations' ) // cURL CA bundle not found.
&&
false === strpos( $message, 'Peer certificate cannot be authenticated with' ) // cURL CURLE_SSL_CACERT: CA bundle found, but not helpful
// Different versions of curl have different error messages
// this string should catch them all.
&&
false === strpos( $message, 'Problem with the SSL CA cert' ) // cURL CURLE_SSL_CACERT_BADFILE: probably access rights.
) {
// No, it is not.
return $response;
}
// Redo the request without SSL certificate verification.
$args['sslverify'] = false;
$response = wp_remote_request( $url, $args );
if ( ! is_wp_error( $response ) ) {
// The request went through this time, flag for future fallbacks.
\Jetpack_Options::update_option( 'fallback_no_verify_ssl_certs', time() );
self::set_time_diff( $response, $set_fallback );
}
return $response;
}
/**
* Sets the time difference for correct signature computation.
*
* @param HTTP_Response $response the response object.
* @param Boolean $force_set whether to force setting the time difference.
*/
public static function set_time_diff( &$response, $force_set = false ) {
$code = wp_remote_retrieve_response_code( $response );
// Only trust the Date header on some responses.
if ( 200 != $code && 304 != $code && 400 != $code && 401 != $code ) { // phpcs:ignore Universal.Operators.StrictComparisons.LooseNotEqual
return;
}
$date = wp_remote_retrieve_header( $response, 'date' );
if ( ! $date ) {
return;
}
$time = (int) strtotime( $date );
if ( 0 >= $time ) {
return;
}
$time_diff = $time - time();
if ( $force_set ) { // During register.
\Jetpack_Options::update_option( 'time_diff', $time_diff );
} else { // Otherwise.
$old_diff = \Jetpack_Options::get_option( 'time_diff' );
if ( false === $old_diff || abs( $time_diff - (int) $old_diff ) > 10 ) {
\Jetpack_Options::update_option( 'time_diff', $time_diff );
}
}
}
/**
* Validate and build arguments for a WordPress.com REST API request.
*
* @param string $path REST API path.
* @param string $version REST API version. Default is `2`.
* @param array $args Arguments to {@see WP_Http}. Default is `array()`.
* @param string $base_api_path REST API root. Default is `wpcom`.
*
* @return array|WP_Error $response Response data, else {@see WP_Error} on failure.
*/
public static function validate_args_for_wpcom_json_api_request(
$path,
$version = '2',
$args = array(),
$base_api_path = 'wpcom'
) {
$base_api_path = trim( $base_api_path, '/' );
$version = ltrim( $version, 'v' );
$path = ltrim( $path, '/' );
$filtered_args = array_intersect_key(
$args,
array(
'headers' => 'array',
'method' => 'string',
'timeout' => 'int',
'redirection' => 'int',
'stream' => 'boolean',
'filename' => 'string',
'sslverify' => 'boolean',
)
);
// Use GET by default whereas `remote_request` uses POST.
$request_method = isset( $filtered_args['method'] ) ? strtoupper( $filtered_args['method'] ) : 'GET';
$url = sprintf(
'%s/%s/v%s/%s',
Constants::get_constant( 'JETPACK__WPCOM_JSON_API_BASE' ),
$base_api_path,
$version,
$path
);
$validated_args = array_merge(
$filtered_args,
array(
'url' => $url,
'method' => $request_method,
)
);
return $validated_args;
}
/**
* Queries the WordPress.com REST API with a user token.
*
* @param string $path REST API path.
* @param string $version REST API version. Default is `2`.
* @param array $args Arguments to {@see WP_Http}. Default is `array()`.
* @param string $body Body passed to {@see WP_Http}. Default is `null`.
* @param string $base_api_path REST API root. Default is `wpcom`.
*
* @return array|WP_Error $response Response data, else {@see WP_Error} on failure.
*/
public static function wpcom_json_api_request_as_user(
$path,
$version = '2',
$args = array(),
$body = null,
$base_api_path = 'wpcom'
) {
$args = self::validate_args_for_wpcom_json_api_request( $path, $version, $args, $base_api_path );
$args['user_id'] = get_current_user_id();
if ( isset( $body ) && ! isset( $args['headers'] ) && in_array( $args['method'], array( 'POST', 'PUT', 'PATCH' ), true ) ) {
$args['headers'] = array( 'Content-Type' => 'application/json' );
}
if ( isset( $body ) && ! is_string( $body ) ) {
$body = wp_json_encode( $body );
}
return self::remote_request( $args, $body );
}
/**
* Query the WordPress.com REST API using the blog token
*
* @param String $path The API endpoint relative path.
* @param String $version The API version.
* @param array $args Request arguments.
* @param String $body Request body.
* @param String $base_api_path (optional) the API base path override, defaults to 'rest'.
* @return array|WP_Error $response Data.
*/
public static function wpcom_json_api_request_as_blog(
$path,
$version = self::WPCOM_JSON_API_VERSION,
$args = array(),
$body = null,
$base_api_path = 'rest'
) {
$validated_args = self::validate_args_for_wpcom_json_api_request( $path, $version, $args, $base_api_path );
$validated_args['blog_id'] = (int) \Jetpack_Options::get_option( 'id' );
// For Simple sites get the response directly without any HTTP requests.
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
add_filter( 'is_jetpack_authorized_for_site', '__return_true' );
require_lib( 'wpcom-api-direct' );
return \WPCOM_API_Direct::do_request( $validated_args, $body );
}
return self::remote_request( $validated_args, $body );
}
/**
* Takes an array or similar structure and recursively turns all values into strings. This is used to
* make sure that body hashes are made ith the string version, which is what will be seen after a
* server pulls up the data in the $_POST array.
*
* @param array|Mixed $data the data that needs to be stringified.
*
* @return array|string
*/
public static function _stringify_data( $data ) { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
// Booleans are special, lets just makes them and explicit 1/0 instead of the 0 being an empty string.
if ( is_bool( $data ) ) {
return $data ? '1' : '0';
}
// Cast objects into arrays.
if ( is_object( $data ) ) {
$data = (array) $data;
}
// Non arrays at this point should be just converted to strings.
if ( ! is_array( $data ) ) {
return (string) $data;
}
foreach ( $data as &$value ) {
$value = self::_stringify_data( $value );
}
return $data;
}
}
automattic/jetpack-connection/src/class-connection-notice.php 0000644 00000017660 15153552356 0020541 0 ustar 00 <?php
/**
* Admin connection notices.
*
* @package automattic/jetpack-admin-ui
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Redirect;
use Automattic\Jetpack\Tracking;
/**
* Admin connection notices.
*/
class Connection_Notice {
/**
* Whether the class has been initialized.
*
* @var bool
*/
private static $is_initialized = false;
/**
* The constructor.
*/
public function __construct() {
if ( ! static::$is_initialized ) {
add_action( 'current_screen', array( $this, 'initialize_notices' ) );
static::$is_initialized = true;
}
}
/**
* Initialize the notices if needed.
*
* @param \WP_Screen $screen WP Core's screen object.
*
* @return void
*/
public function initialize_notices( $screen ) {
if ( ! in_array(
$screen->id,
array(
'jetpack_page_akismet-key-config',
'admin_page_jetpack_modules',
),
true
) ) {
add_action( 'admin_notices', array( $this, 'delete_user_update_connection_owner_notice' ) );
}
}
/**
* This is an entire admin notice dedicated to messaging and handling of the case where a user is trying to delete
* the connection owner.
*/
public function delete_user_update_connection_owner_notice() {
global $current_screen;
/*
* phpcs:disable WordPress.Security.NonceVerification.Recommended
*
* This function is firing within wp-admin and checks (below) if it is in the midst of a deletion on the users
* page. Nonce will be already checked by WordPress, so we do not need to check ourselves.
*/
if ( ! isset( $current_screen->base ) || 'users' !== $current_screen->base ) {
return;
}
if ( ! isset( $_REQUEST['action'] ) || 'delete' !== $_REQUEST['action'] ) {
return;
}
// Get connection owner or bail.
$connection_manager = new Manager();
$connection_owner_id = $connection_manager->get_connection_owner_id();
if ( ! $connection_owner_id ) {
return;
}
$connection_owner_userdata = get_userdata( $connection_owner_id );
// Bail if we're not trying to delete connection owner.
$user_ids_to_delete = array();
if ( isset( $_REQUEST['users'] ) ) {
$user_ids_to_delete = array_map( 'sanitize_text_field', wp_unslash( $_REQUEST['users'] ) );
} elseif ( isset( $_REQUEST['user'] ) ) {
$user_ids_to_delete[] = sanitize_text_field( wp_unslash( $_REQUEST['user'] ) );
}
// phpcs:enable
$user_ids_to_delete = array_map( 'absint', $user_ids_to_delete );
$deleting_connection_owner = in_array( $connection_owner_id, (array) $user_ids_to_delete, true );
if ( ! $deleting_connection_owner ) {
return;
}
// Bail if they're trying to delete themselves to avoid confusion.
if ( get_current_user_id() === $connection_owner_id ) {
return;
}
$tracking = new Tracking();
// Track it!
if ( method_exists( $tracking, 'record_user_event' ) ) {
$tracking->record_user_event( 'delete_connection_owner_notice_view' );
}
$connected_admins = $connection_manager->get_connected_users( 'jetpack_disconnect' );
$user = is_a( $connection_owner_userdata, 'WP_User' ) ? esc_html( $connection_owner_userdata->data->user_login ) : '';
echo "<div class='notice notice-warning' id='jetpack-notice-switch-connection-owner'>";
echo '<h2>' . esc_html__( 'Important notice about your Jetpack connection:', 'jetpack-connection' ) . '</h2>';
echo '<p>' . sprintf(
/* translators: WordPress User, if available. */
esc_html__( 'Warning! You are about to delete the Jetpack connection owner (%s) for this site, which may cause some of your Jetpack features to stop working.', 'jetpack-connection' ),
esc_html( $user )
) . '</p>';
if ( ! empty( $connected_admins ) && count( $connected_admins ) > 1 ) {
echo '<form id="jp-switch-connection-owner" action="" method="post">';
echo "<label for='owner'>" . esc_html__( 'You can choose to transfer connection ownership to one of these already-connected admins:', 'jetpack-connection' ) . ' </label>';
$connected_admin_ids = array_map(
function ( $connected_admin ) {
return $connected_admin->ID;
},
$connected_admins
);
wp_dropdown_users(
array(
'name' => 'owner',
'include' => array_diff( $connected_admin_ids, array( $connection_owner_id ) ),
'show' => 'display_name_with_login',
)
);
echo '<p>';
submit_button( esc_html__( 'Set new connection owner', 'jetpack-connection' ), 'primary', 'jp-switch-connection-owner-submit', false );
echo '</p>';
echo "<div id='jp-switch-user-results'></div>";
echo '</form>';
?>
<script type="text/javascript">
( function() {
const switchOwnerButton = document.getElementById('jp-switch-connection-owner');
if ( ! switchOwnerButton ) {
return;
}
switchOwnerButton.addEventListener( 'submit', function ( e ) {
e.preventDefault();
const submitBtn = document.getElementById('jp-switch-connection-owner-submit');
submitBtn.disabled = true;
const results = document.getElementById('jp-switch-user-results');
results.innerHTML = '';
results.classList.remove( 'error-message' );
const handleAPIError = ( message ) => {
submitBtn.disabled = false;
results.classList.add( 'error-message' );
results.innerHTML = message || "<?php esc_html_e( 'Something went wrong. Please try again.', 'jetpack-connection' ); ?>";
}
fetch(
<?php echo wp_json_encode( esc_url_raw( get_rest_url() . 'jetpack/v4/connection/owner' ), JSON_HEX_TAG | JSON_HEX_AMP ); ?>,
{
method: 'POST',
headers: {
'X-WP-Nonce': <?php echo wp_json_encode( wp_create_nonce( 'wp_rest' ), JSON_HEX_TAG | JSON_HEX_AMP ); ?>,
},
body: new URLSearchParams( new FormData( this ) ),
}
)
.then( response => response.json() )
.then( data => {
if ( data.hasOwnProperty( 'code' ) && data.code === 'success' ) {
// Owner successfully changed.
results.innerHTML = <?php echo wp_json_encode( esc_html__( 'Success!', 'jetpack-connection' ), JSON_HEX_TAG | JSON_HEX_AMP ); ?>;
setTimeout(function () {
document.getElementById( 'jetpack-notice-switch-connection-owner' ).style.display = 'none';
}, 1000);
return;
}
handleAPIError( data?.message );
} )
.catch( () => handleAPIError() );
});
} )();
</script>
<?php
} else {
echo '<p>' . esc_html__( 'Every Jetpack site needs at least one connected admin for the features to work properly. Please connect to your WordPress.com account via the button below. Once you connect, you may refresh this page to see an option to change the connection owner.', 'jetpack-connection' ) . '</p>';
$connect_url = $connection_manager->get_authorization_url();
$connect_url = add_query_arg( 'from', 'delete_connection_owner_notice', $connect_url );
echo "<a href='" . esc_url( $connect_url ) . "' target='_blank' rel='noopener noreferrer' class='button-primary'>" . esc_html__( 'Connect to WordPress.com', 'jetpack-connection' ) . '</a>';
}
echo '<p>';
printf(
wp_kses(
/* translators: URL to Jetpack support doc regarding the primary user. */
__( "<a href='%s' target='_blank' rel='noopener noreferrer'>Learn more</a> about the connection owner and what will break if you do not have one.", 'jetpack-connection' ),
array(
'a' => array(
'href' => true,
'target' => true,
'rel' => true,
),
)
),
esc_url( Redirect::get_url( 'jetpack-support-primary-user' ) )
);
echo '</p>';
echo '<p>';
printf(
wp_kses(
/* translators: URL to contact Jetpack support. */
__( 'As always, feel free to <a href="%s" target="_blank" rel="noopener noreferrer">contact our support team</a> if you have any questions.', 'jetpack-connection' ),
array(
'a' => array(
'href' => true,
'target' => true,
'rel' => true,
),
)
),
esc_url( Redirect::get_url( 'jetpack-contact-support' ) )
);
echo '</p>';
echo '</div>';
}
}
automattic/jetpack-connection/src/class-error-handler.php 0000644 00000050472 15153552356 0017665 0 ustar 00 <?php
/**
* The Jetpack Connection error class file.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
/**
* The Jetpack Connection Errors that handles errors
*
* This class handles the following workflow:
*
* 1. A XML-RCP request with an invalid signature triggers a error
* 2. Applies a gate to only process each error code once an hour to avoid overflow
* 3. It stores the error on the database, but we don't know yet if this is a valid error, because
* we can't confirm it came from WP.com.
* 4. It encrypts the error details and send it to thw wp.com server
* 5. wp.com checks it and, if valid, sends a new request back to this site using the verify_xml_rpc_error REST endpoint
* 6. This endpoint add this error to the Verified errors in the database
* 7. Triggers a workflow depending on the error (display user an error message, do some self healing, etc.)
*
* Errors are stored in the database as options in the following format:
*
* [
* $error_code => [
* $user_id => [
* $error_details
* ]
* ]
* ]
*
* For each error code we store a maximum of 5 errors for 5 different user ids.
*
* An user ID can be
* * 0 for blog tokens
* * positive integer for user tokens
* * 'invalid' for malformed tokens
*
* @since 1.14.2
*/
class Error_Handler {
/**
* The name of the option that stores the errors
*
* @since 1.14.2
*
* @var string
*/
const STORED_ERRORS_OPTION = 'jetpack_connection_xmlrpc_errors';
/**
* The name of the option that stores the errors
*
* @since 1.14.2
*
* @var string
*/
const STORED_VERIFIED_ERRORS_OPTION = 'jetpack_connection_xmlrpc_verified_errors';
/**
* The prefix of the transient that controls the gate for each error code
*
* @since 1.14.2
*
* @var string
*/
const ERROR_REPORTING_GATE = 'jetpack_connection_error_reporting_gate_';
/**
* Time in seconds a test should live in the database before being discarded
*
* @since 1.14.2
*/
const ERROR_LIFE_TIME = DAY_IN_SECONDS;
/**
* The error code for event tracking purposes.
* If there are many, only the first error code will be tracked.
*
* @var string
*/
private $error_code;
/**
* List of known errors. Only error codes in this list will be handled
*
* @since 1.14.2
*
* @var array
*/
public $known_errors = array(
'malformed_token',
'malformed_user_id',
'unknown_user',
'no_user_tokens',
'empty_master_user_option',
'no_token_for_user',
'token_malformed',
'user_id_mismatch',
'no_possible_tokens',
'no_valid_user_token',
'no_valid_blog_token',
'unknown_token',
'could_not_sign',
'invalid_scheme',
'invalid_secret',
'invalid_token',
'token_mismatch',
'invalid_body',
'invalid_signature',
'invalid_body_hash',
'invalid_nonce',
'signature_mismatch',
);
/**
* Holds the instance of this singleton class
*
* @since 1.14.2
*
* @var Error_Handler $instance
*/
public static $instance = null;
/**
* Initialize instance, hookds and load verified errors handlers
*
* @since 1.14.2
*/
private function __construct() {
defined( 'JETPACK__ERRORS_PUBLIC_KEY' ) || define( 'JETPACK__ERRORS_PUBLIC_KEY', 'KdZY80axKX+nWzfrOcizf0jqiFHnrWCl9X8yuaClKgM=' );
add_action( 'rest_api_init', array( $this, 'register_verify_error_endpoint' ) );
$this->handle_verified_errors();
// If the site gets reconnected, clear errors.
add_action( 'jetpack_site_registered', array( $this, 'delete_all_errors' ) );
add_action( 'jetpack_get_site_data_success', array( $this, 'delete_all_errors' ) );
add_filter( 'jetpack_connection_disconnect_site_wpcom', array( $this, 'delete_all_errors_and_return_unfiltered_value' ) );
add_filter( 'jetpack_connection_delete_all_tokens', array( $this, 'delete_all_errors_and_return_unfiltered_value' ) );
add_action( 'jetpack_unlinked_user', array( $this, 'delete_all_errors' ) );
add_action( 'jetpack_updated_user_token', array( $this, 'delete_all_errors' ) );
}
/**
* Gets the list of verified errors and act upon them
*
* @since 1.14.2
*
* @return void
*/
public function handle_verified_errors() {
$verified_errors = $this->get_verified_errors();
foreach ( array_keys( $verified_errors ) as $error_code ) {
switch ( $error_code ) {
case 'malformed_token':
case 'token_malformed':
case 'no_possible_tokens':
case 'no_valid_user_token':
case 'no_valid_blog_token':
case 'unknown_token':
case 'could_not_sign':
case 'invalid_token':
case 'token_mismatch':
case 'invalid_signature':
case 'signature_mismatch':
case 'no_user_tokens':
case 'no_token_for_user':
add_action( 'admin_notices', array( $this, 'generic_admin_notice_error' ) );
add_action( 'react_connection_errors_initial_state', array( $this, 'jetpack_react_dashboard_error' ) );
$this->error_code = $error_code;
// Since we are only generically handling errors, we don't need to trigger error messages for each one of them.
break 2;
}
}
}
/**
* Gets the instance of this singleton class
*
* @since 1.14.2
*
* @return Error_Handler $instance
*/
public static function get_instance() {
if ( self::$instance === null ) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Keep track of a connection error that was encountered
*
* @param \WP_Error $error The error object.
* @param boolean $force Force the report, even if should_report_error is false.
* @param boolean $skip_wpcom_verification Set to 'true' to verify the error locally and skip the WP.com verification.
*
* @return void
* @since 1.14.2
*/
public function report_error( \WP_Error $error, $force = false, $skip_wpcom_verification = false ) {
if ( in_array( $error->get_error_code(), $this->known_errors, true ) && $this->should_report_error( $error ) || $force ) {
$stored_error = $this->store_error( $error );
if ( $stored_error ) {
$skip_wpcom_verification ? $this->verify_error( $stored_error ) : $this->send_error_to_wpcom( $stored_error );
}
}
}
/**
* Checks the status of the gate
*
* This protects the site (and WPCOM) against over loads.
*
* @since 1.14.2
*
* @param \WP_Error $error the error object.
* @return boolean $should_report True if gate is open and the error should be reported.
*/
public function should_report_error( \WP_Error $error ) {
if ( defined( 'JETPACK_DEV_DEBUG' ) && JETPACK_DEV_DEBUG ) {
return true;
}
/**
* Whether to bypass the gate for the error handling
*
* By default, we only process errors once an hour for each error code.
* This is done to avoid overflows. If you need to disable this gate, you can set this variable to true.
*
* This filter is useful for unit testing
*
* @since 1.14.2
*
* @param boolean $bypass_gate whether to bypass the gate. Default is false, do not bypass.
*/
$bypass_gate = apply_filters( 'jetpack_connection_bypass_error_reporting_gate', false );
if ( true === $bypass_gate ) {
return true;
}
$transient = self::ERROR_REPORTING_GATE . $error->get_error_code();
if ( get_transient( $transient ) ) {
return false;
}
set_transient( $transient, true, HOUR_IN_SECONDS );
return true;
}
/**
* Stores the error in the database so we know there is an issue and can inform the user
*
* @since 1.14.2
*
* @param \WP_Error $error the error object.
* @return boolean|array False if stored errors were not updated and the error array if it was successfully stored.
*/
public function store_error( \WP_Error $error ) {
$stored_errors = $this->get_stored_errors();
$error_array = $this->wp_error_to_array( $error );
$error_code = $error->get_error_code();
$user_id = $error_array['user_id'];
if ( ! isset( $stored_errors[ $error_code ] ) || ! is_array( $stored_errors[ $error_code ] ) ) {
$stored_errors[ $error_code ] = array();
}
$stored_errors[ $error_code ][ $user_id ] = $error_array;
// Let's store a maximum of 5 different user ids for each error code.
if ( count( $stored_errors[ $error_code ] ) > 5 ) {
// array_shift will destroy keys here because they are numeric, so manually remove first item.
$keys = array_keys( $stored_errors[ $error_code ] );
unset( $stored_errors[ $error_code ][ $keys[0] ] );
}
if ( update_option( self::STORED_ERRORS_OPTION, $stored_errors ) ) {
return $error_array;
}
return false;
}
/**
* Converts a WP_Error object in the array representation we store in the database
*
* @since 1.14.2
*
* @param \WP_Error $error the error object.
* @return boolean|array False if error is invalid or the error array
*/
public function wp_error_to_array( \WP_Error $error ) {
$data = $error->get_error_data();
if ( ! isset( $data['signature_details'] ) || ! is_array( $data['signature_details'] ) ) {
return false;
}
$signature_details = $data['signature_details'];
if ( ! isset( $signature_details['token'] ) || empty( $signature_details['token'] ) ) {
return false;
}
$user_id = $this->get_user_id_from_token( $signature_details['token'] );
$error_array = array(
'error_code' => $error->get_error_code(),
'user_id' => $user_id,
'error_message' => $error->get_error_message(),
'error_data' => $signature_details,
'timestamp' => time(),
'nonce' => wp_generate_password( 10, false ),
'error_type' => empty( $data['error_type'] ) ? '' : $data['error_type'],
);
return $error_array;
}
/**
* Sends the error to WP.com to be verified
*
* @since 1.14.2
*
* @param array $error_array The array representation of the error as it is stored in the database.
* @return bool
*/
public function send_error_to_wpcom( $error_array ) {
$blog_id = \Jetpack_Options::get_option( 'id' );
$encrypted_data = $this->encrypt_data_to_wpcom( $error_array );
if ( false === $encrypted_data ) {
return false;
}
$args = array(
'body' => array(
'error_data' => $encrypted_data,
),
);
// send encrypted data to WP.com Public-API v2.
wp_remote_post( "https://public-api.wordpress.com/wpcom/v2/sites/{$blog_id}/jetpack-report-error/", $args );
return true;
}
/**
* Encrypt data to be sent over to WP.com
*
* @since 1.14.2
*
* @param array|string $data the data to be encoded.
* @return boolean|string The encoded string on success, false on failure
*/
public function encrypt_data_to_wpcom( $data ) {
try {
// phpcs:disable WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
// phpcs:disable WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
$encrypted_data = base64_encode( sodium_crypto_box_seal( wp_json_encode( $data ), base64_decode( JETPACK__ERRORS_PUBLIC_KEY ) ) );
// phpcs:enable WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
// phpcs:enable WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
} catch ( \SodiumException $e ) {
// error encrypting data.
return false;
}
return $encrypted_data;
}
/**
* Extracts the user ID from a token
*
* @since 1.14.2
*
* @param string $token the token used to make the request.
* @return string $the user id or `invalid` if user id not present.
*/
public function get_user_id_from_token( $token ) {
$parsed_token = explode( ':', wp_unslash( $token ) );
if ( isset( $parsed_token[2] ) && ctype_digit( $parsed_token[2] ) ) {
$user_id = $parsed_token[2];
} else {
$user_id = 'invalid';
}
return $user_id;
}
/**
* Gets the reported errors stored in the database
*
* @since 1.14.2
*
* @return array $errors
*/
public function get_stored_errors() {
$stored_errors = get_option( self::STORED_ERRORS_OPTION );
if ( ! is_array( $stored_errors ) ) {
$stored_errors = array();
}
$stored_errors = $this->garbage_collector( $stored_errors );
return $stored_errors;
}
/**
* Gets the verified errors stored in the database
*
* @since 1.14.2
*
* @return array $errors
*/
public function get_verified_errors() {
$verified_errors = get_option( self::STORED_VERIFIED_ERRORS_OPTION );
if ( ! is_array( $verified_errors ) ) {
$verified_errors = array();
}
$verified_errors = $this->garbage_collector( $verified_errors );
return $verified_errors;
}
/**
* Removes expired errors from the array
*
* This method is called by get_stored_errors and get_verified errors and filters their result
* Whenever a new error is stored to the database or verified, this will be triggered and the
* expired error will be permantently removed from the database
*
* @since 1.14.2
*
* @param array $errors array of errors as stored in the database.
* @return array
*/
private function garbage_collector( $errors ) {
foreach ( $errors as $error_code => $users ) {
foreach ( $users as $user_id => $error ) {
if ( self::ERROR_LIFE_TIME < time() - (int) $error['timestamp'] ) {
unset( $errors[ $error_code ][ $user_id ] );
}
}
}
// Clear empty error codes.
$errors = array_filter(
$errors,
function ( $user_errors ) {
return ! empty( $user_errors );
}
);
return $errors;
}
/**
* Delete all stored and verified errors from the database
*
* @since 1.14.2
*
* @return void
*/
public function delete_all_errors() {
$this->delete_stored_errors();
$this->delete_verified_errors();
}
/**
* Delete all stored and verified errors from the database and returns unfiltered value
*
* This is used to hook into a couple of filters that expect true to not short circuit the disconnection flow
*
* @since 8.9.0
*
* @param mixed $check The input sent by the filter.
* @return boolean
*/
public function delete_all_errors_and_return_unfiltered_value( $check ) {
$this->delete_all_errors();
return $check;
}
/**
* Delete the reported errors stored in the database
*
* @since 1.14.2
*
* @return boolean True, if option is successfully deleted. False on failure.
*/
public function delete_stored_errors() {
return delete_option( self::STORED_ERRORS_OPTION );
}
/**
* Delete the verified errors stored in the database
*
* @since 1.14.2
*
* @return boolean True, if option is successfully deleted. False on failure.
*/
public function delete_verified_errors() {
return delete_option( self::STORED_VERIFIED_ERRORS_OPTION );
}
/**
* Gets an error based on the nonce
*
* Receives a nonce and finds the related error.
*
* @since 1.14.2
*
* @param string $nonce The nonce created for the error we want to get.
* @return null|array Returns the error array representation or null if error not found.
*/
public function get_error_by_nonce( $nonce ) {
$errors = $this->get_stored_errors();
foreach ( $errors as $user_group ) {
foreach ( $user_group as $error ) {
if ( $error['nonce'] === $nonce ) {
return $error;
}
}
}
return null;
}
/**
* Adds an error to the verified error list
*
* @since 1.14.2
*
* @param array $error The error array, as it was saved in the unverified errors list.
* @return void
*/
public function verify_error( $error ) {
$verified_errors = $this->get_verified_errors();
$error_code = $error['error_code'];
$user_id = $error['user_id'];
if ( ! isset( $verified_errors[ $error_code ] ) ) {
$verified_errors[ $error_code ] = array();
}
$verified_errors[ $error_code ][ $user_id ] = $error;
update_option( self::STORED_VERIFIED_ERRORS_OPTION, $verified_errors );
}
/**
* Register REST API end point for error hanlding.
*
* @since 1.14.2
*
* @return void
*/
public function register_verify_error_endpoint() {
register_rest_route(
'jetpack/v4',
'/verify_xmlrpc_error',
array(
'methods' => \WP_REST_Server::CREATABLE,
'callback' => array( $this, 'verify_xml_rpc_error' ),
'permission_callback' => '__return_true',
'args' => array(
'nonce' => array(
'required' => true,
'type' => 'string',
),
),
)
);
}
/**
* Handles verification that a xml rpc error is legit and came from WordPres.com
*
* @since 1.14.2
*
* @param \WP_REST_Request $request The request sent to the WP REST API.
*
* @return boolean
*/
public function verify_xml_rpc_error( \WP_REST_Request $request ) {
$error = $this->get_error_by_nonce( $request['nonce'] );
if ( $error ) {
$this->verify_error( $error );
return new \WP_REST_Response( true, 200 );
}
return new \WP_REST_Response( false, 200 );
}
/**
* Prints a generic error notice for all connection errors
*
* @since 8.9.0
*
* @return void
*/
public function generic_admin_notice_error() {
// do not add admin notice to the jetpack dashboard.
global $pagenow;
if ( 'admin.php' === $pagenow || isset( $_GET['page'] ) && 'jetpack' === $_GET['page'] ) { // phpcs:ignore
return;
}
if ( ! current_user_can( 'jetpack_connect' ) ) {
return;
}
/**
* Filters the message to be displayed in the admin notices area when there's a connection error.
*
* By default we don't display any errors.
*
* Return an empty value to disable the message.
*
* @since 8.9.0
*
* @param string $message The error message.
* @param array $errors The array of errors. See Automattic\Jetpack\Connection\Error_Handler for details on the array structure.
*/
$message = apply_filters( 'jetpack_connection_error_notice_message', '', $this->get_verified_errors() );
/**
* Fires inside the admin_notices hook just before displaying the error message for a broken connection.
*
* If you want to disable the default message from being displayed, return an emtpy value in the jetpack_connection_error_notice_message filter.
*
* @since 8.9.0
*
* @param array $errors The array of errors. See Automattic\Jetpack\Connection\Error_Handler for details on the array structure.
*/
do_action( 'jetpack_connection_error_notice', $this->get_verified_errors() );
if ( empty( $message ) ) {
return;
}
?>
<div class="notice notice-error is-dismissible jetpack-message jp-connect" style="display:block !important;">
<p><?php echo esc_html( $message ); ?></p>
</div>
<?php
}
/**
* Adds the error message to the Jetpack React Dashboard
*
* @since 8.9.0
*
* @param array $errors The array of errors. See Automattic\Jetpack\Connection\Error_Handler for details on the array structure.
* @return array
*/
public function jetpack_react_dashboard_error( $errors ) {
$errors[] = array(
'code' => 'connection_error',
'message' => __( 'Your connection with WordPress.com seems to be broken. If you\'re experiencing issues, please try reconnecting.', 'jetpack-connection' ),
'action' => 'reconnect',
'data' => array( 'api_error_code' => $this->error_code ),
);
return $errors;
}
/**
* Check REST API response for errors, and report them to WP.com if needed.
*
* @see wp_remote_request() For more information on the $http_response array format.
* @param array|\WP_Error $http_response The response or WP_Error on failure.
* @param array $auth_data Auth data, allowed keys: `token`, `timestamp`, `nonce`, `body-hash`.
* @param string $url Request URL.
* @param string $method Request method.
* @param string $error_type The source of an error: 'xmlrpc' or 'rest'.
*
* @return void
*/
public function check_api_response_for_errors( $http_response, $auth_data, $url, $method, $error_type ) {
if ( 200 === wp_remote_retrieve_response_code( $http_response ) || ! is_array( $auth_data ) || ! $url || ! $method ) {
return;
}
$body_raw = wp_remote_retrieve_body( $http_response );
if ( ! $body_raw ) {
return;
}
$body = json_decode( $body_raw, true );
if ( empty( $body['error'] ) || ( ! is_string( $body['error'] ) && ! is_int( $body['error'] ) ) ) {
return;
}
$error = new \WP_Error(
$body['error'],
empty( $body['message'] ) ? '' : $body['message'],
array(
'signature_details' => array(
'token' => empty( $auth_data['token'] ) ? '' : $auth_data['token'],
'timestamp' => empty( $auth_data['timestamp'] ) ? '' : $auth_data['timestamp'],
'nonce' => empty( $auth_data['nonce'] ) ? '' : $auth_data['nonce'],
'body_hash' => empty( $auth_data['body_hash'] ) ? '' : $auth_data['body_hash'],
'method' => $method,
'url' => $url,
),
'error_type' => in_array( $error_type, array( 'xmlrpc', 'rest' ), true ) ? $error_type : '',
)
);
$this->report_error( $error, false, true );
}
}
automattic/jetpack-connection/src/class-heartbeat.php 0000644 00000014374 15153552356 0017061 0 ustar 00 <?php
/**
* Jetpack Heartbeat package.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack;
use Jetpack_Options;
use WP_CLI;
/**
* Heartbeat sends a batch of stats to wp.com once a day
*/
class Heartbeat {
/**
* Holds the singleton instance of this class
*
* @since 1.0.0
* @since-jetpack 2.3.3
* @var Heartbeat
*/
private static $instance = false;
/**
* Cronjob identifier
*
* @var string
*/
private $cron_name = 'jetpack_v2_heartbeat';
/**
* Singleton
*
* @since 1.0.0
* @since-jetpack 2.3.3
* @static
* @return Heartbeat
*/
public static function init() {
if ( ! self::$instance ) {
self::$instance = new Heartbeat();
}
return self::$instance;
}
/**
* Constructor for singleton
*
* @since 1.0.0
* @since-jetpack 2.3.3
*/
private function __construct() {
// Schedule the task.
add_action( $this->cron_name, array( $this, 'cron_exec' ) );
if ( ! wp_next_scheduled( $this->cron_name ) ) {
// Deal with the old pre-3.0 weekly one.
$timestamp = wp_next_scheduled( 'jetpack_heartbeat' );
if ( $timestamp ) {
wp_unschedule_event( $timestamp, 'jetpack_heartbeat' );
}
wp_schedule_event( time(), 'daily', $this->cron_name );
}
add_filter( 'jetpack_xmlrpc_unauthenticated_methods', array( __CLASS__, 'jetpack_xmlrpc_methods' ) );
if ( defined( 'WP_CLI' ) && WP_CLI ) {
WP_CLI::add_command( 'jetpack-heartbeat', array( $this, 'cli_callback' ) );
}
}
/**
* Method that gets executed on the wp-cron call
*
* @since 1.0.0
* @since-jetpack 2.3.3
* @global string $wp_version
*/
public function cron_exec() {
$a8c_mc_stats = new A8c_Mc_Stats();
/*
* This should run daily. Figuring in for variances in
* WP_CRON, don't let it run more than every 23 hours at most.
*
* i.e. if it ran less than 23 hours ago, fail out.
*/
$last = (int) Jetpack_Options::get_option( 'last_heartbeat' );
if ( $last && ( $last + DAY_IN_SECONDS - HOUR_IN_SECONDS > time() ) ) {
return;
}
/*
* Check for an identity crisis
*
* If one exists:
* - Bump stat for ID crisis
* - Email site admin about potential ID crisis
*/
// Coming Soon!
foreach ( self::generate_stats_array( 'v2-' ) as $key => $value ) {
if ( is_array( $value ) ) {
foreach ( $value as $v ) {
$a8c_mc_stats->add( $key, (string) $v );
}
} else {
$a8c_mc_stats->add( $key, (string) $value );
}
}
Jetpack_Options::update_option( 'last_heartbeat', time() );
$a8c_mc_stats->do_server_side_stats();
/**
* Fires when we synchronize all registered options on heartbeat.
*
* @since 3.3.0
*/
do_action( 'jetpack_heartbeat' );
}
/**
* Generates heartbeat stats data.
*
* @param string $prefix Prefix to add before stats identifier.
*
* @return array The stats array.
*/
public static function generate_stats_array( $prefix = '' ) {
/**
* This filter is used to build the array of stats that are bumped once a day by Jetpack Heartbeat.
*
* Filter the array and add key => value pairs where
* * key is the stat group name
* * value is the stat name.
*
* Example:
* add_filter( 'jetpack_heartbeat_stats_array', function( $stats ) {
* $stats['is-https'] = is_ssl() ? 'https' : 'http';
* });
*
* This will bump the stats for the 'is-https/https' or 'is-https/http' stat.
*
* @param array $stats The stats to be filtered.
* @param string $prefix The prefix that will automatically be added at the begining at each stat group name.
*/
$stats = apply_filters( 'jetpack_heartbeat_stats_array', array(), $prefix );
$return = array();
// Apply prefix to stats.
foreach ( $stats as $stat => $value ) {
$return[ "$prefix$stat" ] = $value;
}
return $return;
}
/**
* Registers jetpack.getHeartbeatData xmlrpc method
*
* @param array $methods The list of methods to be filtered.
* @return array $methods
*/
public static function jetpack_xmlrpc_methods( $methods ) {
$methods['jetpack.getHeartbeatData'] = array( __CLASS__, 'xmlrpc_data_response' );
return $methods;
}
/**
* Handles the response for the jetpack.getHeartbeatData xmlrpc method
*
* @param array $params The parameters received in the request.
* @return array $params all the stats that heartbeat handles.
*/
public static function xmlrpc_data_response( $params = array() ) {
// The WordPress XML-RPC server sets a default param of array()
// if no argument is passed on the request and the method handlers get this array in $params.
// generate_stats_array() needs a string as first argument.
$params = empty( $params ) ? '' : $params;
return self::generate_stats_array( $params );
}
/**
* Clear scheduled events
*
* @return void
*/
public function deactivate() {
// Deal with the old pre-3.0 weekly one.
$timestamp = wp_next_scheduled( 'jetpack_heartbeat' );
if ( $timestamp ) {
wp_unschedule_event( $timestamp, 'jetpack_heartbeat' );
}
$timestamp = wp_next_scheduled( $this->cron_name );
wp_unschedule_event( $timestamp, $this->cron_name );
}
/**
* Interact with the Heartbeat
*
* ## OPTIONS
*
* inspect (default): Gets the list of data that is going to be sent in the heartbeat and the date/time of the last heartbeat
*
* @param array $args Arguments passed via CLI.
*
* @return void
*/
public function cli_callback( $args ) {
$allowed_args = array(
'inspect',
);
if ( isset( $args[0] ) && ! in_array( $args[0], $allowed_args, true ) ) {
/* translators: %s is a command like "prompt" */
WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack-connection' ), $args[0] ) );
}
$stats = self::generate_stats_array();
$formatted_stats = array();
foreach ( $stats as $stat_name => $bin ) {
$formatted_stats[] = array(
'Stat name' => $stat_name,
'Bin' => $bin,
);
}
WP_CLI\Utils\format_items( 'table', $formatted_stats, array( 'Stat name', 'Bin' ) );
$last_heartbeat = Jetpack_Options::get_option( 'last_heartbeat' );
if ( $last_heartbeat ) {
$last_date = gmdate( 'Y-m-d H:i:s', $last_heartbeat );
/* translators: %s is the full datetime of the last heart beat e.g. 2020-01-01 12:21:23 */
WP_CLI::line( sprintf( __( 'Last heartbeat sent at: %s', 'jetpack-connection' ), $last_date ) );
}
}
}
automattic/jetpack-connection/src/class-initial-state.php 0000644 00000002624 15153552356 0017664 0 ustar 00 <?php
/**
* The React initial state.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Status;
/**
* The React initial state.
*/
class Initial_State {
/**
* Whether the initial state was already rendered
*
* @var boolean
*/
private static $rendered = false;
/**
* Get the initial state data.
*
* @return array
*/
private static function get_data() {
global $wp_version;
return array(
'apiRoot' => esc_url_raw( rest_url() ),
'apiNonce' => wp_create_nonce( 'wp_rest' ),
'registrationNonce' => wp_create_nonce( 'jetpack-registration-nonce' ),
'connectionStatus' => REST_Connector::connection_status( false ),
'userConnectionData' => REST_Connector::get_user_connection_data( false ),
'connectedPlugins' => REST_Connector::get_connection_plugins( false ),
'wpVersion' => $wp_version,
'siteSuffix' => ( new Status() )->get_site_suffix(),
'connectionErrors' => Error_Handler::get_instance()->get_verified_errors(),
);
}
/**
* Render the initial state into a JavaScript variable.
*
* @return string
*/
public static function render() {
if ( self::$rendered ) {
return null;
}
self::$rendered = true;
return 'var JP_CONNECTION_INITIAL_STATE=JSON.parse(decodeURIComponent("' . rawurlencode( wp_json_encode( self::get_data() ) ) . '"));';
}
}
automattic/jetpack-connection/src/class-manager.php 0000644 00000230577 15153552356 0016541 0 ustar 00 <?php
/**
* The Jetpack Connection manager class file.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\A8c_Mc_Stats as A8c_Mc_Stats;
use Automattic\Jetpack\Constants;
use Automattic\Jetpack\Heartbeat;
use Automattic\Jetpack\Roles;
use Automattic\Jetpack\Status;
use Automattic\Jetpack\Terms_Of_Service;
use Automattic\Jetpack\Tracking;
use Jetpack_IXR_Client;
use Jetpack_Options;
use WP_Error;
use WP_User;
/**
* The Jetpack Connection Manager class that is used as a single gateway between WordPress.com
* and Jetpack.
*/
class Manager {
/**
* A copy of the raw POST data for signature verification purposes.
*
* @var String
*/
protected $raw_post_data;
/**
* Verification data needs to be stored to properly verify everything.
*
* @var Object
*/
private $xmlrpc_verification = null;
/**
* Plugin management object.
*
* @var Plugin
*/
private $plugin = null;
/**
* Error handler object.
*
* @var Error_Handler
*/
public $error_handler = null;
/**
* Jetpack_XMLRPC_Server object
*
* @var Jetpack_XMLRPC_Server
*/
public $xmlrpc_server = null;
/**
* Holds extra parameters that will be sent along in the register request body.
*
* Use Manager::add_register_request_param to add values to this array.
*
* @since 1.26.0
* @var array
*/
private static $extra_register_params = array();
/**
* Initialize the object.
* Make sure to call the "Configure" first.
*
* @param string $plugin_slug Slug of the plugin using the connection (optional, but encouraged).
*
* @see \Automattic\Jetpack\Config
*/
public function __construct( $plugin_slug = null ) {
if ( $plugin_slug && is_string( $plugin_slug ) ) {
$this->set_plugin_instance( new Plugin( $plugin_slug ) );
}
}
/**
* Initializes required listeners. This is done separately from the constructors
* because some objects sometimes need to instantiate separate objects of this class.
*
* @todo Implement a proper nonce verification.
*/
public static function configure() {
$manager = new self();
add_filter(
'jetpack_constant_default_value',
__NAMESPACE__ . '\Utils::jetpack_api_constant_filter',
10,
2
);
$manager->setup_xmlrpc_handlers(
$_GET, // phpcs:ignore WordPress.Security.NonceVerification.Recommended
$manager->has_connected_owner(),
$manager->verify_xml_rpc_signature()
);
$manager->error_handler = Error_Handler::get_instance();
if ( $manager->is_connected() ) {
add_filter( 'xmlrpc_methods', array( $manager, 'public_xmlrpc_methods' ) );
add_filter( 'shutdown', array( new Package_Version_Tracker(), 'maybe_update_package_versions' ) );
}
add_action( 'rest_api_init', array( $manager, 'initialize_rest_api_registration_connector' ) );
( new Nonce_Handler() )->init_schedule();
add_action( 'plugins_loaded', __NAMESPACE__ . '\Plugin_Storage::configure', 100 );
add_filter( 'map_meta_cap', array( $manager, 'jetpack_connection_custom_caps' ), 1, 4 );
Heartbeat::init();
add_filter( 'jetpack_heartbeat_stats_array', array( $manager, 'add_stats_to_heartbeat' ) );
Webhooks::init( $manager );
// Set up package version hook.
add_filter( 'jetpack_package_versions', __NAMESPACE__ . '\Package_Version::send_package_version_to_tracker' );
if ( defined( 'JETPACK__SANDBOX_DOMAIN' ) && JETPACK__SANDBOX_DOMAIN ) {
( new Server_Sandbox() )->init();
}
// Initialize connection notices.
new Connection_Notice();
}
/**
* Sets up the XMLRPC request handlers.
*
* @since 1.25.0 Deprecate $is_active param.
*
* @param array $request_params incoming request parameters.
* @param bool $has_connected_owner Whether the site has a connected owner.
* @param bool $is_signed whether the signature check has been successful.
* @param \Jetpack_XMLRPC_Server $xmlrpc_server (optional) an instance of the server to use instead of instantiating a new one.
*/
public function setup_xmlrpc_handlers(
$request_params,
$has_connected_owner,
$is_signed,
\Jetpack_XMLRPC_Server $xmlrpc_server = null
) {
add_filter( 'xmlrpc_blog_options', array( $this, 'xmlrpc_options' ), 1000, 2 );
if (
! isset( $request_params['for'] )
|| 'jetpack' !== $request_params['for']
) {
return false;
}
// Alternate XML-RPC, via ?for=jetpack&jetpack=comms.
if (
isset( $request_params['jetpack'] )
&& 'comms' === $request_params['jetpack']
) {
if ( ! Constants::is_defined( 'XMLRPC_REQUEST' ) ) {
// Use the real constant here for WordPress' sake.
define( 'XMLRPC_REQUEST', true );
}
add_action( 'template_redirect', array( $this, 'alternate_xmlrpc' ) );
add_filter( 'xmlrpc_methods', array( $this, 'remove_non_jetpack_xmlrpc_methods' ), 1000 );
}
if ( ! Constants::get_constant( 'XMLRPC_REQUEST' ) ) {
return false;
}
// Display errors can cause the XML to be not well formed.
@ini_set( 'display_errors', false ); // phpcs:ignore
if ( $xmlrpc_server ) {
$this->xmlrpc_server = $xmlrpc_server;
} else {
$this->xmlrpc_server = new \Jetpack_XMLRPC_Server();
}
$this->require_jetpack_authentication();
if ( $is_signed ) {
// If the site is connected either at a site or user level and the request is signed, expose the methods.
// The callback is responsible to determine whether the request is signed with blog or user token and act accordingly.
// The actual API methods.
$callback = array( $this->xmlrpc_server, 'xmlrpc_methods' );
// Hack to preserve $HTTP_RAW_POST_DATA.
add_filter( 'xmlrpc_methods', array( $this, 'xmlrpc_methods' ) );
} elseif ( $has_connected_owner && ! $is_signed ) {
// The jetpack.authorize method should be available for unauthenticated users on a site with an
// active Jetpack connection, so that additional users can link their account.
$callback = array( $this->xmlrpc_server, 'authorize_xmlrpc_methods' );
} else {
// Any other unsigned request should expose the bootstrap methods.
$callback = array( $this->xmlrpc_server, 'bootstrap_xmlrpc_methods' );
new XMLRPC_Connector( $this );
}
add_filter( 'xmlrpc_methods', $callback );
// Now that no one can authenticate, and we're whitelisting all XML-RPC methods, force enable_xmlrpc on.
add_filter( 'pre_option_enable_xmlrpc', '__return_true' );
return true;
}
/**
* Initializes the REST API connector on the init hook.
*/
public function initialize_rest_api_registration_connector() {
new REST_Connector( $this );
}
/**
* Since a lot of hosts use a hammer approach to "protecting" WordPress sites,
* and just blanket block all requests to /xmlrpc.php, or apply other overly-sensitive
* security/firewall policies, we provide our own alternate XML RPC API endpoint
* which is accessible via a different URI. Most of the below is copied directly
* from /xmlrpc.php so that we're replicating it as closely as possible.
*
* @todo Tighten $wp_xmlrpc_server_class a bit to make sure it doesn't do bad things.
*/
public function alternate_xmlrpc() {
// Some browser-embedded clients send cookies. We don't want them.
$_COOKIE = array();
include_once ABSPATH . 'wp-admin/includes/admin.php';
include_once ABSPATH . WPINC . '/class-IXR.php';
include_once ABSPATH . WPINC . '/class-wp-xmlrpc-server.php';
/**
* Filters the class used for handling XML-RPC requests.
*
* @since 1.7.0
* @since-jetpack 3.1.0
*
* @param string $class The name of the XML-RPC server class.
*/
$wp_xmlrpc_server_class = apply_filters( 'wp_xmlrpc_server_class', 'wp_xmlrpc_server' );
$wp_xmlrpc_server = new $wp_xmlrpc_server_class();
// Fire off the request.
nocache_headers();
$wp_xmlrpc_server->serve_request();
exit;
}
/**
* Removes all XML-RPC methods that are not `jetpack.*`.
* Only used in our alternate XML-RPC endpoint, where we want to
* ensure that Core and other plugins' methods are not exposed.
*
* @param array $methods a list of registered WordPress XMLRPC methods.
* @return array filtered $methods
*/
public function remove_non_jetpack_xmlrpc_methods( $methods ) {
$jetpack_methods = array();
foreach ( $methods as $method => $callback ) {
if ( 0 === strpos( $method, 'jetpack.' ) ) {
$jetpack_methods[ $method ] = $callback;
}
}
return $jetpack_methods;
}
/**
* Removes all other authentication methods not to allow other
* methods to validate unauthenticated requests.
*/
public function require_jetpack_authentication() {
// Don't let anyone authenticate.
$_COOKIE = array();
remove_all_filters( 'authenticate' );
remove_all_actions( 'wp_login_failed' );
if ( $this->is_connected() ) {
// Allow Jetpack authentication.
add_filter( 'authenticate', array( $this, 'authenticate_jetpack' ), 10, 3 );
}
}
/**
* Authenticates XML-RPC and other requests from the Jetpack Server
*
* @param WP_User|Mixed $user user object if authenticated.
* @param String $username username.
* @param String $password password string.
* @return WP_User|Mixed authenticated user or error.
*/
public function authenticate_jetpack( $user, $username, $password ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
if ( is_a( $user, '\\WP_User' ) ) {
return $user;
}
$token_details = $this->verify_xml_rpc_signature();
if ( ! $token_details ) {
return $user;
}
if ( 'user' !== $token_details['type'] ) {
return $user;
}
if ( ! $token_details['user_id'] ) {
return $user;
}
nocache_headers();
return new \WP_User( $token_details['user_id'] );
}
/**
* Verifies the signature of the current request.
*
* @return false|array
*/
public function verify_xml_rpc_signature() {
if ( $this->xmlrpc_verification === null ) {
$this->xmlrpc_verification = $this->internal_verify_xml_rpc_signature();
if ( is_wp_error( $this->xmlrpc_verification ) ) {
/**
* Action for logging XMLRPC signature verification errors. This data is sensitive.
*
* @since 1.7.0
* @since-jetpack 7.5.0
*
* @param WP_Error $signature_verification_error The verification error
*/
do_action( 'jetpack_verify_signature_error', $this->xmlrpc_verification );
Error_Handler::get_instance()->report_error( $this->xmlrpc_verification );
}
}
return is_wp_error( $this->xmlrpc_verification ) ? false : $this->xmlrpc_verification;
}
/**
* Verifies the signature of the current request.
*
* This function has side effects and should not be used. Instead,
* use the memoized version `->verify_xml_rpc_signature()`.
*
* @internal
* @todo Refactor to use proper nonce verification.
*/
private function internal_verify_xml_rpc_signature() {
// phpcs:disable WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
// It's not for us.
if ( ! isset( $_GET['token'] ) || empty( $_GET['signature'] ) ) {
return false;
}
$signature_details = array(
'token' => isset( $_GET['token'] ) ? wp_unslash( $_GET['token'] ) : '',
'timestamp' => isset( $_GET['timestamp'] ) ? wp_unslash( $_GET['timestamp'] ) : '',
'nonce' => isset( $_GET['nonce'] ) ? wp_unslash( $_GET['nonce'] ) : '',
'body_hash' => isset( $_GET['body-hash'] ) ? wp_unslash( $_GET['body-hash'] ) : '',
'method' => isset( $_SERVER['REQUEST_METHOD'] ) ? wp_unslash( $_SERVER['REQUEST_METHOD'] ) : null,
'url' => wp_unslash( ( isset( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : null ) . ( isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : null ) ), // Temp - will get real signature URL later.
'signature' => isset( $_GET['signature'] ) ? wp_unslash( $_GET['signature'] ) : '',
);
$error_type = 'xmlrpc';
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
@list( $token_key, $version, $user_id ) = explode( ':', wp_unslash( $_GET['token'] ) );
// phpcs:enable WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
$jetpack_api_version = Constants::get_constant( 'JETPACK__API_VERSION' );
if (
empty( $token_key )
||
empty( $version ) || (string) $jetpack_api_version !== $version ) {
return new \WP_Error( 'malformed_token', 'Malformed token in request', compact( 'signature_details', 'error_type' ) );
}
if ( '0' === $user_id ) {
$token_type = 'blog';
$user_id = 0;
} else {
$token_type = 'user';
if ( empty( $user_id ) || ! ctype_digit( $user_id ) ) {
return new \WP_Error(
'malformed_user_id',
'Malformed user_id in request',
compact( 'signature_details', 'error_type' )
);
}
$user_id = (int) $user_id;
$user = new \WP_User( $user_id );
if ( ! $user || ! $user->exists() ) {
return new \WP_Error(
'unknown_user',
sprintf( 'User %d does not exist', $user_id ),
compact( 'signature_details', 'error_type' )
);
}
}
$token = $this->get_tokens()->get_access_token( $user_id, $token_key, false );
if ( is_wp_error( $token ) ) {
$token->add_data( compact( 'signature_details', 'error_type' ) );
return $token;
} elseif ( ! $token ) {
return new \WP_Error(
'unknown_token',
sprintf( 'Token %s:%s:%d does not exist', $token_key, $version, $user_id ),
compact( 'signature_details', 'error_type' )
);
}
$jetpack_signature = new \Jetpack_Signature( $token->secret, (int) \Jetpack_Options::get_option( 'time_diff' ) );
// phpcs:disable WordPress.Security.NonceVerification.Missing
if ( isset( $_POST['_jetpack_is_multipart'] ) ) {
$post_data = $_POST;
$file_hashes = array();
foreach ( $post_data as $post_data_key => $post_data_value ) {
if ( 0 !== strpos( $post_data_key, '_jetpack_file_hmac_' ) ) {
continue;
}
$post_data_key = substr( $post_data_key, strlen( '_jetpack_file_hmac_' ) );
$file_hashes[ $post_data_key ] = $post_data_value;
}
foreach ( $file_hashes as $post_data_key => $post_data_value ) {
unset( $post_data[ "_jetpack_file_hmac_{$post_data_key}" ] );
$post_data[ $post_data_key ] = $post_data_value;
}
ksort( $post_data );
$body = http_build_query( stripslashes_deep( $post_data ) );
} elseif ( $this->raw_post_data === null ) {
$body = file_get_contents( 'php://input' );
} else {
$body = null;
}
// phpcs:enable
$signature = $jetpack_signature->sign_current_request(
array( 'body' => $body === null ? $this->raw_post_data : $body )
);
$signature_details['url'] = $jetpack_signature->current_request_url;
if ( ! $signature ) {
return new \WP_Error(
'could_not_sign',
'Unknown signature error',
compact( 'signature_details', 'error_type' )
);
} elseif ( is_wp_error( $signature ) ) {
return $signature;
}
// phpcs:disable WordPress.Security.NonceVerification.Recommended
$timestamp = (int) $_GET['timestamp'];
$nonce = wp_unslash( (string) $_GET['nonce'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- WP Core doesn't sanitize nonces either.
// phpcs:enable WordPress.Security.NonceVerification.Recommended
// Use up the nonce regardless of whether the signature matches.
if ( ! ( new Nonce_Handler() )->add( $timestamp, $nonce ) ) {
return new \WP_Error(
'invalid_nonce',
'Could not add nonce',
compact( 'signature_details', 'error_type' )
);
}
// Be careful about what you do with this debugging data.
// If a malicious requester has access to the expected signature,
// bad things might be possible.
$signature_details['expected'] = $signature;
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( ! hash_equals( $signature, wp_unslash( $_GET['signature'] ) ) ) {
return new \WP_Error(
'signature_mismatch',
'Signature mismatch',
compact( 'signature_details', 'error_type' )
);
}
/**
* Action for additional token checking.
*
* @since 1.7.0
* @since-jetpack 7.7.0
*
* @param array $post_data request data.
* @param array $token_data token data.
*/
return apply_filters(
'jetpack_signature_check_token',
array(
'type' => $token_type,
'token_key' => $token_key,
'user_id' => $token->external_user_id,
),
$token,
$this->raw_post_data
);
}
/**
* Returns true if the current site is connected to WordPress.com and has the minimum requirements to enable Jetpack UI.
*
* This method is deprecated since version 1.25.0 of this package. Please use has_connected_owner instead.
*
* Since this method has a wide spread use, we decided not to throw any deprecation warnings for now.
*
* @deprecated 1.25.0
* @see Manager::has_connected_owner
* @return Boolean is the site connected?
*/
public function is_active() {
return (bool) $this->get_tokens()->get_access_token( true );
}
/**
* Obtains an instance of the Tokens class.
*
* @return Tokens the Tokens object
*/
public function get_tokens() {
return new Tokens();
}
/**
* Returns true if the site has both a token and a blog id, which indicates a site has been registered.
*
* @access public
* @deprecated 1.12.1 Use is_connected instead
* @see Manager::is_connected
*
* @return bool
*/
public function is_registered() {
_deprecated_function( __METHOD__, '1.12.1' );
return $this->is_connected();
}
/**
* Returns true if the site has both a token and a blog id, which indicates a site has been connected.
*
* @access public
* @since 1.21.1
*
* @return bool
*/
public function is_connected() {
$has_blog_id = (bool) \Jetpack_Options::get_option( 'id' );
$has_blog_token = (bool) $this->get_tokens()->get_access_token();
return $has_blog_id && $has_blog_token;
}
/**
* Returns true if the site has at least one connected administrator.
*
* @access public
* @since 1.21.1
*
* @return bool
*/
public function has_connected_admin() {
return (bool) count( $this->get_connected_users( 'manage_options' ) );
}
/**
* Returns true if the site has any connected user.
*
* @access public
* @since 1.21.1
*
* @return bool
*/
public function has_connected_user() {
return (bool) count( $this->get_connected_users( 'any', 1 ) );
}
/**
* Returns an array of users that have user tokens for communicating with wpcom.
* Able to select by specific capability.
*
* @since 9.9.1 Added $limit parameter.
*
* @param string $capability The capability of the user.
* @param int|null $limit How many connected users to get before returning.
* @return WP_User[] Array of WP_User objects if found.
*/
public function get_connected_users( $capability = 'any', $limit = null ) {
$connected_users = array();
$user_tokens = $this->get_tokens()->get_user_tokens();
if ( ! is_array( $user_tokens ) || empty( $user_tokens ) ) {
return $connected_users;
}
$connected_user_ids = array_keys( $user_tokens );
if ( ! empty( $connected_user_ids ) ) {
foreach ( $connected_user_ids as $id ) {
// Check for capability.
if ( 'any' !== $capability && ! user_can( $id, $capability ) ) {
continue;
}
$user_data = get_userdata( $id );
if ( $user_data instanceof \WP_User ) {
$connected_users[] = $user_data;
if ( $limit && count( $connected_users ) >= $limit ) {
return $connected_users;
}
}
}
}
return $connected_users;
}
/**
* Returns true if the site has a connected Blog owner (master_user).
*
* @access public
* @since 1.21.1
*
* @return bool
*/
public function has_connected_owner() {
return (bool) $this->get_connection_owner_id();
}
/**
* Returns true if the site is connected only at a site level.
*
* Note that we are explicitly checking for the existence of the master_user option in order to account for cases where we don't have any user tokens (user-level connection) but the master_user option is set, which could be the result of a problematic user connection.
*
* @access public
* @since 1.25.0
* @deprecated 1.27.0
*
* @return bool
*/
public function is_userless() {
_deprecated_function( __METHOD__, '1.27.0', 'Automattic\\Jetpack\\Connection\\Manager::is_site_connection' );
return $this->is_site_connection();
}
/**
* Returns true if the site is connected only at a site level.
*
* Note that we are explicitly checking for the existence of the master_user option in order to account for cases where we don't have any user tokens (user-level connection) but the master_user option is set, which could be the result of a problematic user connection.
*
* @access public
* @since 1.27.0
*
* @return bool
*/
public function is_site_connection() {
return $this->is_connected() && ! $this->has_connected_user() && ! \Jetpack_Options::get_option( 'master_user' );
}
/**
* Checks to see if the connection owner of the site is missing.
*
* @return bool
*/
public function is_missing_connection_owner() {
$connection_owner = $this->get_connection_owner_id();
if ( ! get_user_by( 'id', $connection_owner ) ) {
return true;
}
return false;
}
/**
* Returns true if the user with the specified identifier is connected to
* WordPress.com.
*
* @param int $user_id the user identifier. Default is the current user.
* @return bool Boolean is the user connected?
*/
public function is_user_connected( $user_id = false ) {
$user_id = false === $user_id ? get_current_user_id() : absint( $user_id );
if ( ! $user_id ) {
return false;
}
return (bool) $this->get_tokens()->get_access_token( $user_id );
}
/**
* Returns the local user ID of the connection owner.
*
* @return bool|int Returns the ID of the connection owner or False if no connection owner found.
*/
public function get_connection_owner_id() {
$owner = $this->get_connection_owner();
return $owner instanceof \WP_User ? $owner->ID : false;
}
/**
* Get the wpcom user data of the current|specified connected user.
*
* @todo Refactor to properly load the XMLRPC client independently.
*
* @param Integer $user_id the user identifier.
* @return bool|array An array with the WPCOM user data on success, false otherwise.
*/
public function get_connected_user_data( $user_id = null ) {
if ( ! $user_id ) {
$user_id = get_current_user_id();
}
// Check if the user is connected and return false otherwise.
if ( ! $this->is_user_connected( $user_id ) ) {
return false;
}
$transient_key = "jetpack_connected_user_data_$user_id";
$cached_user_data = get_transient( $transient_key );
if ( $cached_user_data ) {
return $cached_user_data;
}
$xml = new Jetpack_IXR_Client(
array(
'user_id' => $user_id,
)
);
$xml->query( 'wpcom.getUser' );
if ( ! $xml->isError() ) {
$user_data = $xml->getResponse();
set_transient( $transient_key, $xml->getResponse(), DAY_IN_SECONDS );
return $user_data;
}
return false;
}
/**
* Returns a user object of the connection owner.
*
* @return WP_User|false False if no connection owner found.
*/
public function get_connection_owner() {
$user_id = \Jetpack_Options::get_option( 'master_user' );
if ( ! $user_id ) {
return false;
}
// Make sure user is connected.
$user_token = $this->get_tokens()->get_access_token( $user_id );
$connection_owner = false;
if ( $user_token && is_object( $user_token ) && isset( $user_token->external_user_id ) ) {
$connection_owner = get_userdata( $user_token->external_user_id );
}
return $connection_owner;
}
/**
* Returns true if the provided user is the Jetpack connection owner.
* If user ID is not specified, the current user will be used.
*
* @param Integer|Boolean $user_id the user identifier. False for current user.
* @return Boolean True the user the connection owner, false otherwise.
*/
public function is_connection_owner( $user_id = false ) {
if ( ! $user_id ) {
$user_id = get_current_user_id();
}
return ( (int) $user_id ) === $this->get_connection_owner_id();
}
/**
* Connects the user with a specified ID to a WordPress.com user using the
* remote login flow.
*
* @access public
*
* @param Integer $user_id (optional) the user identifier, defaults to current user.
* @param String $redirect_url the URL to redirect the user to for processing, defaults to
* admin_url().
* @return WP_Error only in case of a failed user lookup.
*/
public function connect_user( $user_id = null, $redirect_url = null ) {
$user = null;
if ( null === $user_id ) {
$user = wp_get_current_user();
} else {
$user = get_user_by( 'ID', $user_id );
}
if ( empty( $user ) ) {
return new \WP_Error( 'user_not_found', 'Attempting to connect a non-existent user.' );
}
if ( null === $redirect_url ) {
$redirect_url = admin_url();
}
// Using wp_redirect intentionally because we're redirecting outside.
wp_redirect( $this->get_authorization_url( $user, $redirect_url ) ); // phpcs:ignore WordPress.Security.SafeRedirect
exit();
}
/**
* Unlinks the current user from the linked WordPress.com user.
*
* @access public
* @static
*
* @todo Refactor to properly load the XMLRPC client independently.
*
* @param Integer $user_id the user identifier.
* @param bool $can_overwrite_primary_user Allow for the primary user to be disconnected.
* @param bool $force_disconnect_locally Disconnect user locally even if we were unable to disconnect them from WP.com.
* @return Boolean Whether the disconnection of the user was successful.
*/
public function disconnect_user( $user_id = null, $can_overwrite_primary_user = false, $force_disconnect_locally = false ) {
$user_id = empty( $user_id ) ? get_current_user_id() : (int) $user_id;
$is_primary_user = Jetpack_Options::get_option( 'master_user' ) === $user_id;
if ( $is_primary_user && ! $can_overwrite_primary_user ) {
return false;
}
// Attempt to disconnect the user from WordPress.com.
$is_disconnected_from_wpcom = $this->unlink_user_from_wpcom( $user_id );
$is_disconnected_locally = false;
if ( $is_disconnected_from_wpcom || $force_disconnect_locally ) {
// Disconnect the user locally.
$is_disconnected_locally = $this->get_tokens()->disconnect_user( $user_id );
if ( $is_disconnected_locally ) {
// Delete cached connected user data.
$transient_key = "jetpack_connected_user_data_$user_id";
delete_transient( $transient_key );
/**
* Fires after the current user has been unlinked from WordPress.com.
*
* @since 1.7.0
* @since-jetpack 4.1.0
*
* @param int $user_id The current user's ID.
*/
do_action( 'jetpack_unlinked_user', $user_id );
if ( $is_primary_user ) {
Jetpack_Options::delete_option( 'master_user' );
}
}
}
return $is_disconnected_from_wpcom && $is_disconnected_locally;
}
/**
* Request to wpcom for a user to be unlinked from their WordPress.com account
*
* @param int $user_id The user identifier.
*
* @return bool Whether the disconnection of the user was successful.
*/
public function unlink_user_from_wpcom( $user_id ) {
// Attempt to disconnect the user from WordPress.com.
$xml = new Jetpack_IXR_Client();
$xml->query( 'jetpack.unlink_user', $user_id );
if ( $xml->isError() ) {
return false;
}
return (bool) $xml->getResponse();
}
/**
* Update the connection owner.
*
* @since 1.29.0
*
* @param Integer $new_owner_id The ID of the user to become the connection owner.
*
* @return true|WP_Error True if owner successfully changed, WP_Error otherwise.
*/
public function update_connection_owner( $new_owner_id ) {
$roles = new Roles();
if ( ! user_can( $new_owner_id, $roles->translate_role_to_cap( 'administrator' ) ) ) {
return new WP_Error(
'new_owner_not_admin',
__( 'New owner is not admin', 'jetpack-connection' ),
array( 'status' => 400 )
);
}
$old_owner_id = $this->get_connection_owner_id();
if ( $old_owner_id === $new_owner_id ) {
return new WP_Error(
'new_owner_is_existing_owner',
__( 'New owner is same as existing owner', 'jetpack-connection' ),
array( 'status' => 400 )
);
}
if ( ! $this->is_user_connected( $new_owner_id ) ) {
return new WP_Error(
'new_owner_not_connected',
__( 'New owner is not connected', 'jetpack-connection' ),
array( 'status' => 400 )
);
}
// Notify WPCOM about the connection owner change.
$owner_updated_wpcom = $this->update_connection_owner_wpcom( $new_owner_id );
if ( $owner_updated_wpcom ) {
// Update the connection owner in Jetpack only if they were successfully updated on WPCOM.
// This will ensure consistency with WPCOM.
\Jetpack_Options::update_option( 'master_user', $new_owner_id );
// Track it.
( new Tracking() )->record_user_event( 'set_connection_owner_success' );
return true;
}
return new WP_Error(
'error_setting_new_owner',
__( 'Could not confirm new owner.', 'jetpack-connection' ),
array( 'status' => 500 )
);
}
/**
* Request to WPCOM to update the connection owner.
*
* @since 1.29.0
*
* @param Integer $new_owner_id The ID of the user to become the connection owner.
*
* @return Boolean Whether the ownership transfer was successful.
*/
public function update_connection_owner_wpcom( $new_owner_id ) {
// Notify WPCOM about the connection owner change.
$xml = new Jetpack_IXR_Client(
array(
'user_id' => get_current_user_id(),
)
);
$xml->query(
'jetpack.switchBlogOwner',
array(
'new_blog_owner' => $new_owner_id,
)
);
if ( $xml->isError() ) {
return false;
}
return (bool) $xml->getResponse();
}
/**
* Returns the requested Jetpack API URL.
*
* @param String $relative_url the relative API path.
* @return String API URL.
*/
public function api_url( $relative_url ) {
$api_base = Constants::get_constant( 'JETPACK__API_BASE' );
$api_version = '/' . Constants::get_constant( 'JETPACK__API_VERSION' ) . '/';
/**
* Filters the API URL that Jetpack uses for server communication.
*
* @since 1.7.0
* @since-jetpack 8.0.0
*
* @param String $url the generated URL.
* @param String $relative_url the relative URL that was passed as an argument.
* @param String $api_base the API base string that is being used.
* @param String $api_version the API version string that is being used.
*/
return apply_filters(
'jetpack_api_url',
rtrim( $api_base . $relative_url, '/\\' ) . $api_version,
$relative_url,
$api_base,
$api_version
);
}
/**
* Returns the Jetpack XMLRPC WordPress.com API endpoint URL.
*
* @return String XMLRPC API URL.
*/
public function xmlrpc_api_url() {
$base = preg_replace(
'#(https?://[^?/]+)(/?.*)?$#',
'\\1',
Constants::get_constant( 'JETPACK__API_BASE' )
);
return untrailingslashit( $base ) . '/xmlrpc.php';
}
/**
* Attempts Jetpack registration which sets up the site for connection. Should
* remain public because the call to action comes from the current site, not from
* WordPress.com.
*
* @param String $api_endpoint (optional) an API endpoint to use, defaults to 'register'.
* @return true|WP_Error The error object.
*/
public function register( $api_endpoint = 'register' ) {
add_action( 'pre_update_jetpack_option_register', array( '\\Jetpack_Options', 'delete_option' ) );
$secrets = ( new Secrets() )->generate( 'register', get_current_user_id(), 600 );
if ( false === $secrets ) {
return new WP_Error( 'cannot_save_secrets', __( 'Jetpack experienced an issue trying to save options (cannot_save_secrets). We suggest that you contact your hosting provider, and ask them for help checking that the options table is writable on your site.', 'jetpack-connection' ) );
}
if (
empty( $secrets['secret_1'] ) ||
empty( $secrets['secret_2'] ) ||
empty( $secrets['exp'] )
) {
return new \WP_Error( 'missing_secrets' );
}
// Better to try (and fail) to set a higher timeout than this system
// supports than to have register fail for more users than it should.
$timeout = $this->set_min_time_limit( 60 ) / 2;
$gmt_offset = get_option( 'gmt_offset' );
if ( ! $gmt_offset ) {
$gmt_offset = 0;
}
$stats_options = get_option( 'stats_options' );
$stats_id = isset( $stats_options['blog_id'] )
? $stats_options['blog_id']
: null;
/* This action is documented in src/class-package-version-tracker.php */
$package_versions = apply_filters( 'jetpack_package_versions', array() );
$active_plugins_using_connection = Plugin_Storage::get_all();
/**
* Filters the request body for additional property addition.
*
* @since 1.7.0
* @since-jetpack 7.7.0
*
* @param array $post_data request data.
* @param Array $token_data token data.
*/
$body = apply_filters(
'jetpack_register_request_body',
array_merge(
array(
'siteurl' => Urls::site_url(),
'home' => Urls::home_url(),
'gmt_offset' => $gmt_offset,
'timezone_string' => (string) get_option( 'timezone_string' ),
'site_name' => (string) get_option( 'blogname' ),
'secret_1' => $secrets['secret_1'],
'secret_2' => $secrets['secret_2'],
'site_lang' => get_locale(),
'timeout' => $timeout,
'stats_id' => $stats_id,
'state' => get_current_user_id(),
'site_created' => $this->get_assumed_site_creation_date(),
'jetpack_version' => Constants::get_constant( 'JETPACK__VERSION' ),
'ABSPATH' => Constants::get_constant( 'ABSPATH' ),
'current_user_email' => wp_get_current_user()->user_email,
'connect_plugin' => $this->get_plugin() ? $this->get_plugin()->get_slug() : null,
'package_versions' => $package_versions,
'active_connected_plugins' => $active_plugins_using_connection,
),
self::$extra_register_params
)
);
$args = array(
'method' => 'POST',
'body' => $body,
'headers' => array(
'Accept' => 'application/json',
),
'timeout' => $timeout,
);
$args['body'] = $this->apply_activation_source_to_args( $args['body'] );
// TODO: fix URLs for bad hosts.
$response = Client::_wp_remote_request(
$this->api_url( $api_endpoint ),
$args,
true
);
// Make sure the response is valid and does not contain any Jetpack errors.
$registration_details = $this->validate_remote_register_response( $response );
if ( is_wp_error( $registration_details ) ) {
return $registration_details;
} elseif ( ! $registration_details ) {
return new \WP_Error(
'unknown_error',
'Unknown error registering your Jetpack site.',
wp_remote_retrieve_response_code( $response )
);
}
if ( empty( $registration_details->jetpack_secret ) || ! is_string( $registration_details->jetpack_secret ) ) {
return new \WP_Error(
'jetpack_secret',
'Unable to validate registration of your Jetpack site.',
wp_remote_retrieve_response_code( $response )
);
}
if ( isset( $registration_details->jetpack_public ) ) {
$jetpack_public = (int) $registration_details->jetpack_public;
} else {
$jetpack_public = false;
}
\Jetpack_Options::update_options(
array(
'id' => (int) $registration_details->jetpack_id,
'public' => $jetpack_public,
)
);
update_option( Package_Version_Tracker::PACKAGE_VERSION_OPTION, $package_versions );
$this->get_tokens()->update_blog_token( (string) $registration_details->jetpack_secret );
$alternate_authorization_url = isset( $registration_details->alternate_authorization_url ) ? $registration_details->alternate_authorization_url : '';
add_filter(
'jetpack_register_site_rest_response',
function ( $response ) use ( $alternate_authorization_url ) {
$response['alternateAuthorizeUrl'] = $alternate_authorization_url;
return $response;
}
);
/**
* Fires when a site is registered on WordPress.com.
*
* @since 1.7.0
* @since-jetpack 3.7.0
*
* @param int $json->jetpack_id Jetpack Blog ID.
* @param string $json->jetpack_secret Jetpack Blog Token.
* @param int|bool $jetpack_public Is the site public.
*/
do_action(
'jetpack_site_registered',
$registration_details->jetpack_id,
$registration_details->jetpack_secret,
$jetpack_public
);
if ( isset( $registration_details->token ) ) {
/**
* Fires when a user token is sent along with the registration data.
*
* @since 1.7.0
* @since-jetpack 7.6.0
*
* @param object $token the administrator token for the newly registered site.
*/
do_action( 'jetpack_site_registered_user_token', $registration_details->token );
}
return true;
}
/**
* Attempts Jetpack registration.
*
* @param bool $tos_agree Whether the user agreed to TOS.
*
* @return bool|WP_Error
*/
public function try_registration( $tos_agree = true ) {
if ( $tos_agree ) {
$terms_of_service = new Terms_Of_Service();
$terms_of_service->agree();
}
/**
* Action fired when the user attempts the registration.
*
* @since 1.26.0
*/
$pre_register = apply_filters( 'jetpack_pre_register', null );
if ( is_wp_error( $pre_register ) ) {
return $pre_register;
}
$tracking_data = array();
if ( null !== $this->get_plugin() ) {
$tracking_data['plugin_slug'] = $this->get_plugin()->get_slug();
}
$tracking = new Tracking();
$tracking->record_user_event( 'jpc_register_begin', $tracking_data );
add_filter( 'jetpack_register_request_body', array( Utils::class, 'filter_register_request_body' ) );
$result = $this->register();
remove_filter( 'jetpack_register_request_body', array( Utils::class, 'filter_register_request_body' ) );
// If there was an error with registration and the site was not registered, record this so we can show a message.
if ( ! $result || is_wp_error( $result ) ) {
return $result;
}
return true;
}
/**
* Adds a parameter to the register request body
*
* @since 1.26.0
*
* @param string $name The name of the parameter to be added.
* @param string $value The value of the parameter to be added.
*
* @throws \InvalidArgumentException If supplied arguments are not strings.
* @return void
*/
public function add_register_request_param( $name, $value ) {
if ( ! is_string( $name ) || ! is_string( $value ) ) {
throw new \InvalidArgumentException( 'name and value must be strings' );
}
self::$extra_register_params[ $name ] = $value;
}
/**
* Takes the response from the Jetpack register new site endpoint and
* verifies it worked properly.
*
* @since 1.7.0
* @since-jetpack 2.6.0
*
* @param Mixed $response the response object, or the error object.
* @return string|WP_Error A JSON object on success or WP_Error on failures
**/
protected function validate_remote_register_response( $response ) {
if ( is_wp_error( $response ) ) {
return new \WP_Error(
'register_http_request_failed',
$response->get_error_message()
);
}
$code = wp_remote_retrieve_response_code( $response );
$entity = wp_remote_retrieve_body( $response );
if ( $entity ) {
$registration_response = json_decode( $entity );
} else {
$registration_response = false;
}
$code_type = (int) ( $code / 100 );
if ( 5 === $code_type ) {
return new \WP_Error( 'wpcom_5??', $code );
} elseif ( 408 === $code ) {
return new \WP_Error( 'wpcom_408', $code );
} elseif ( ! empty( $registration_response->error ) ) {
if (
'xml_rpc-32700' === $registration_response->error
&& ! function_exists( 'xml_parser_create' )
) {
$error_description = __( "PHP's XML extension is not available. Jetpack requires the XML extension to communicate with WordPress.com. Please contact your hosting provider to enable PHP's XML extension.", 'jetpack-connection' );
} else {
$error_description = isset( $registration_response->error_description )
? (string) $registration_response->error_description
: '';
}
return new \WP_Error(
(string) $registration_response->error,
$error_description,
$code
);
} elseif ( 200 !== $code ) {
return new \WP_Error( 'wpcom_bad_response', $code );
}
// Jetpack ID error block.
if ( empty( $registration_response->jetpack_id ) ) {
return new \WP_Error(
'jetpack_id',
/* translators: %s is an error message string */
sprintf( __( 'Error Details: Jetpack ID is empty. Do not publicly post this error message! %s', 'jetpack-connection' ), $entity ),
$entity
);
} elseif ( ! is_scalar( $registration_response->jetpack_id ) ) {
return new \WP_Error(
'jetpack_id',
/* translators: %s is an error message string */
sprintf( __( 'Error Details: Jetpack ID is not a scalar. Do not publicly post this error message! %s', 'jetpack-connection' ), $entity ),
$entity
);
} elseif ( preg_match( '/[^0-9]/', $registration_response->jetpack_id ) ) {
return new \WP_Error(
'jetpack_id',
/* translators: %s is an error message string */
sprintf( __( 'Error Details: Jetpack ID begins with a numeral. Do not publicly post this error message! %s', 'jetpack-connection' ), $entity ),
$entity
);
}
return $registration_response;
}
/**
* Adds a used nonce to a list of known nonces.
*
* @param int $timestamp the current request timestamp.
* @param string $nonce the nonce value.
* @return bool whether the nonce is unique or not.
*
* @deprecated since 1.24.0
* @see Nonce_Handler::add()
*/
public function add_nonce( $timestamp, $nonce ) {
_deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Nonce_Handler::add' );
return ( new Nonce_Handler() )->add( $timestamp, $nonce );
}
/**
* Cleans nonces that were saved when calling ::add_nonce.
*
* @todo Properly prepare the query before executing it.
*
* @param bool $all whether to clean even non-expired nonces.
*
* @deprecated since 1.24.0
* @see Nonce_Handler::clean_all()
*/
public function clean_nonces( $all = false ) {
_deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Nonce_Handler::clean_all' );
( new Nonce_Handler() )->clean_all( $all ? PHP_INT_MAX : ( time() - Nonce_Handler::LIFETIME ) );
}
/**
* Sets the Connection custom capabilities.
*
* @param string[] $caps Array of the user's capabilities.
* @param string $cap Capability name.
* @param int $user_id The user ID.
* @param array $args Adds the context to the cap. Typically the object ID.
*/
public function jetpack_connection_custom_caps( $caps, $cap, $user_id, $args ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
switch ( $cap ) {
case 'jetpack_connect':
case 'jetpack_reconnect':
$is_offline_mode = ( new Status() )->is_offline_mode();
if ( $is_offline_mode ) {
$caps = array( 'do_not_allow' );
break;
}
// Pass through. If it's not offline mode, these should match disconnect.
// Let users disconnect if it's offline mode, just in case things glitch.
case 'jetpack_disconnect':
/**
* Filters the jetpack_disconnect capability.
*
* @since 1.14.2
*
* @param array An array containing the capability name.
*/
$caps = apply_filters( 'jetpack_disconnect_cap', array( 'manage_options' ) );
break;
case 'jetpack_connect_user':
$is_offline_mode = ( new Status() )->is_offline_mode();
if ( $is_offline_mode ) {
$caps = array( 'do_not_allow' );
break;
}
// With site connections in mind, non-admin users can connect their account only if a connection owner exists.
$caps = $this->has_connected_owner() ? array( 'read' ) : array( 'manage_options' );
break;
}
return $caps;
}
/**
* Builds the timeout limit for queries talking with the wpcom servers.
*
* Based on local php max_execution_time in php.ini
*
* @since 1.7.0
* @since-jetpack 5.4.0
* @return int
**/
public function get_max_execution_time() {
$timeout = (int) ini_get( 'max_execution_time' );
// Ensure exec time set in php.ini.
if ( ! $timeout ) {
$timeout = 30;
}
return $timeout;
}
/**
* Sets a minimum request timeout, and returns the current timeout
*
* @since 1.7.0
* @since-jetpack 5.4.0
* @param Integer $min_timeout the minimum timeout value.
**/
public function set_min_time_limit( $min_timeout ) {
$timeout = $this->get_max_execution_time();
if ( $timeout < $min_timeout ) {
$timeout = $min_timeout;
set_time_limit( $timeout );
}
return $timeout;
}
/**
* Get our assumed site creation date.
* Calculated based on the earlier date of either:
* - Earliest admin user registration date.
* - Earliest date of post of any post type.
*
* @since 1.7.0
* @since-jetpack 7.2.0
*
* @return string Assumed site creation date and time.
*/
public function get_assumed_site_creation_date() {
$cached_date = get_transient( 'jetpack_assumed_site_creation_date' );
if ( ! empty( $cached_date ) ) {
return $cached_date;
}
$earliest_registered_users = get_users(
array(
'role' => 'administrator',
'orderby' => 'user_registered',
'order' => 'ASC',
'fields' => array( 'user_registered' ),
'number' => 1,
)
);
$earliest_registration_date = $earliest_registered_users[0]->user_registered;
$earliest_posts = get_posts(
array(
'posts_per_page' => 1,
'post_type' => 'any',
'post_status' => 'any',
'orderby' => 'date',
'order' => 'ASC',
)
);
// If there are no posts at all, we'll count only on user registration date.
if ( $earliest_posts ) {
$earliest_post_date = $earliest_posts[0]->post_date;
} else {
$earliest_post_date = PHP_INT_MAX;
}
$assumed_date = min( $earliest_registration_date, $earliest_post_date );
set_transient( 'jetpack_assumed_site_creation_date', $assumed_date );
return $assumed_date;
}
/**
* Adds the activation source string as a parameter to passed arguments.
*
* @todo Refactor to use rawurlencode() instead of urlencode().
*
* @param array $args arguments that need to have the source added.
* @return array $amended arguments.
*/
public static function apply_activation_source_to_args( $args ) {
list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' );
if ( $activation_source_name ) {
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode
$args['_as'] = urlencode( $activation_source_name );
}
if ( $activation_source_keyword ) {
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode
$args['_ak'] = urlencode( $activation_source_keyword );
}
return $args;
}
/**
* Generates two secret tokens and the end of life timestamp for them.
*
* @param String $action The action name.
* @param Integer $user_id The user identifier.
* @param Integer $exp Expiration time in seconds.
*/
public function generate_secrets( $action, $user_id = false, $exp = 600 ) {
return ( new Secrets() )->generate( $action, $user_id, $exp );
}
/**
* Returns two secret tokens and the end of life timestamp for them.
*
* @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Secrets->get() instead.
*
* @param String $action The action name.
* @param Integer $user_id The user identifier.
* @return string|array an array of secrets or an error string.
*/
public function get_secrets( $action, $user_id ) {
_deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Secrets->get' );
return ( new Secrets() )->get( $action, $user_id );
}
/**
* Deletes secret tokens in case they, for example, have expired.
*
* @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Secrets->delete() instead.
*
* @param String $action The action name.
* @param Integer $user_id The user identifier.
*/
public function delete_secrets( $action, $user_id ) {
_deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Secrets->delete' );
( new Secrets() )->delete( $action, $user_id );
}
/**
* Deletes all connection tokens and transients from the local Jetpack site.
* If the plugin object has been provided in the constructor, the function first checks
* whether it's the only active connection.
* If there are any other connections, the function will do nothing and return `false`
* (unless `$ignore_connected_plugins` is set to `true`).
*
* @param bool $ignore_connected_plugins Delete the tokens even if there are other connected plugins.
*
* @return bool True if disconnected successfully, false otherwise.
*/
public function delete_all_connection_tokens( $ignore_connected_plugins = false ) {
// refuse to delete if we're not the last Jetpack plugin installed.
if ( ! $ignore_connected_plugins && null !== $this->plugin && ! $this->plugin->is_only() ) {
return false;
}
/**
* Fires upon the disconnect attempt.
* Return `false` to prevent the disconnect.
*
* @since 1.14.2
*/
if ( ! apply_filters( 'jetpack_connection_delete_all_tokens', true ) ) {
return false;
}
\Jetpack_Options::delete_option(
array(
'master_user',
'time_diff',
'fallback_no_verify_ssl_certs',
)
);
( new Secrets() )->delete_all();
$this->get_tokens()->delete_all();
// Delete cached connected user data.
$transient_key = 'jetpack_connected_user_data_' . get_current_user_id();
delete_transient( $transient_key );
// Delete all XML-RPC errors.
Error_Handler::get_instance()->delete_all_errors();
return true;
}
/**
* Tells WordPress.com to disconnect the site and clear all tokens from cached site.
* If the plugin object has been provided in the constructor, the function first check
* whether it's the only active connection.
* If there are any other connections, the function will do nothing and return `false`
* (unless `$ignore_connected_plugins` is set to `true`).
*
* @param bool $ignore_connected_plugins Delete the tokens even if there are other connected plugins.
*
* @return bool True if disconnected successfully, false otherwise.
*/
public function disconnect_site_wpcom( $ignore_connected_plugins = false ) {
if ( ! $ignore_connected_plugins && null !== $this->plugin && ! $this->plugin->is_only() ) {
return false;
}
/**
* Fires upon the disconnect attempt.
* Return `false` to prevent the disconnect.
*
* @since 1.14.2
*/
if ( ! apply_filters( 'jetpack_connection_disconnect_site_wpcom', true, $this ) ) {
return false;
}
$xml = new Jetpack_IXR_Client();
$xml->query( 'jetpack.deregister', get_current_user_id() );
return true;
}
/**
* Disconnect the plugin and remove the tokens.
* This function will automatically perform "soft" or "hard" disconnect depending on whether other plugins are using the connection.
* This is a proxy method to simplify the Connection package API.
*
* @see Manager::disconnect_site()
*
* @param boolean $disconnect_wpcom Should disconnect_site_wpcom be called.
* @param bool $ignore_connected_plugins Delete the tokens even if there are other connected plugins.
* @return bool
*/
public function remove_connection( $disconnect_wpcom = true, $ignore_connected_plugins = false ) {
$this->disconnect_site( $disconnect_wpcom, $ignore_connected_plugins );
return true;
}
/**
* Completely clearing up the connection, and initiating reconnect.
*
* @return true|WP_Error True if reconnected successfully, a `WP_Error` object otherwise.
*/
public function reconnect() {
( new Tracking() )->record_user_event( 'restore_connection_reconnect' );
$this->disconnect_site_wpcom( true );
$this->delete_all_connection_tokens( true );
return $this->register();
}
/**
* Validate the tokens, and refresh the invalid ones.
*
* @return string|bool|WP_Error True if connection restored or string indicating what's to be done next. A `WP_Error` object or false otherwise.
*/
public function restore() {
// If this is a site connection we need to trigger a full reconnection as our only secure means of
// communication with WPCOM, aka the blog token, is compromised.
if ( $this->is_site_connection() ) {
return $this->reconnect();
}
$validate_tokens_response = $this->get_tokens()->validate();
// If token validation failed, trigger a full reconnection.
if ( is_array( $validate_tokens_response ) &&
isset( $validate_tokens_response['blog_token']['is_healthy'] ) &&
isset( $validate_tokens_response['user_token']['is_healthy'] ) ) {
$blog_token_healthy = $validate_tokens_response['blog_token']['is_healthy'];
$user_token_healthy = $validate_tokens_response['user_token']['is_healthy'];
} else {
$blog_token_healthy = false;
$user_token_healthy = false;
}
// Tokens are both valid, or both invalid. We can't fix the problem we don't see, so the full reconnection is needed.
if ( $blog_token_healthy === $user_token_healthy ) {
$result = $this->reconnect();
return ( true === $result ) ? 'authorize' : $result;
}
if ( ! $blog_token_healthy ) {
return $this->refresh_blog_token();
}
if ( ! $user_token_healthy ) {
return ( true === $this->refresh_user_token() ) ? 'authorize' : false;
}
return false;
}
/**
* Responds to a WordPress.com call to register the current site.
* Should be changed to protected.
*
* @param array $registration_data Array of [ secret_1, user_id ].
*/
public function handle_registration( array $registration_data ) {
list( $registration_secret_1, $registration_user_id ) = $registration_data;
if ( empty( $registration_user_id ) ) {
return new \WP_Error( 'registration_state_invalid', __( 'Invalid Registration State', 'jetpack-connection' ), 400 );
}
return ( new Secrets() )->verify( 'register', $registration_secret_1, (int) $registration_user_id );
}
/**
* Perform the API request to validate the blog and user tokens.
*
* @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Tokens->validate_tokens() instead.
*
* @param int|null $user_id ID of the user we need to validate token for. Current user's ID by default.
*
* @return array|false|WP_Error The API response: `array( 'blog_token_is_healthy' => true|false, 'user_token_is_healthy' => true|false )`.
*/
public function validate_tokens( $user_id = null ) {
_deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Tokens->validate' );
return $this->get_tokens()->validate( $user_id );
}
/**
* Verify a Previously Generated Secret.
*
* @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Secrets->verify() instead.
*
* @param string $action The type of secret to verify.
* @param string $secret_1 The secret string to compare to what is stored.
* @param int $user_id The user ID of the owner of the secret.
* @return \WP_Error|string WP_Error on failure, secret_2 on success.
*/
public function verify_secrets( $action, $secret_1, $user_id ) {
_deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Secrets->verify' );
return ( new Secrets() )->verify( $action, $secret_1, $user_id );
}
/**
* Responds to a WordPress.com call to authorize the current user.
* Should be changed to protected.
*/
public function handle_authorization() {
}
/**
* Obtains the auth token.
*
* @param array $data The request data.
* @return object|\WP_Error Returns the auth token on success.
* Returns a \WP_Error on failure.
*/
public function get_token( $data ) {
return $this->get_tokens()->get( $data, $this->api_url( 'token' ) );
}
/**
* Builds a URL to the Jetpack connection auth page.
*
* @param WP_User $user (optional) defaults to the current logged in user.
* @param String $redirect (optional) a redirect URL to use instead of the default.
* @return string Connect URL.
*/
public function get_authorization_url( $user = null, $redirect = null ) {
if ( empty( $user ) ) {
$user = wp_get_current_user();
}
$roles = new Roles();
$role = $roles->translate_user_to_role( $user );
$signed_role = $this->get_tokens()->sign_role( $role );
/**
* Filter the URL of the first time the user gets redirected back to your site for connection
* data processing.
*
* @since 1.7.0
* @since-jetpack 8.0.0
*
* @param string $redirect_url Defaults to the site admin URL.
*/
$processing_url = apply_filters( 'jetpack_connect_processing_url', admin_url( 'admin.php' ) );
/**
* Filter the URL to redirect the user back to when the authorization process
* is complete.
*
* @since 1.7.0
* @since-jetpack 8.0.0
*
* @param string $redirect_url Defaults to the site URL.
*/
$redirect = apply_filters( 'jetpack_connect_redirect_url', $redirect );
$secrets = ( new Secrets() )->generate( 'authorize', $user->ID, 2 * HOUR_IN_SECONDS );
/**
* Filter the type of authorization.
* 'calypso' completes authorization on wordpress.com/jetpack/connect
* while 'jetpack' ( or any other value ) completes the authorization at jetpack.wordpress.com.
*
* @since 1.7.0
* @since-jetpack 4.3.3
*
* @param string $auth_type Defaults to 'calypso', can also be 'jetpack'.
*/
$auth_type = apply_filters( 'jetpack_auth_type', 'calypso' );
/**
* Filters the user connection request data for additional property addition.
*
* @since 1.7.0
* @since-jetpack 8.0.0
*
* @param array $request_data request data.
*/
$body = apply_filters(
'jetpack_connect_request_body',
array(
'response_type' => 'code',
'client_id' => \Jetpack_Options::get_option( 'id' ),
'redirect_uri' => add_query_arg(
array(
'handler' => 'jetpack-connection-webhooks',
'action' => 'authorize',
'_wpnonce' => wp_create_nonce( "jetpack-authorize_{$role}_{$redirect}" ),
'redirect' => $redirect ? rawurlencode( $redirect ) : false,
),
esc_url( $processing_url )
),
'state' => $user->ID,
'scope' => $signed_role,
'user_email' => $user->user_email,
'user_login' => $user->user_login,
'is_active' => $this->has_connected_owner(), // TODO Deprecate this.
'jp_version' => (string) Constants::get_constant( 'JETPACK__VERSION' ),
'auth_type' => $auth_type,
'secret' => $secrets['secret_1'],
'blogname' => get_option( 'blogname' ),
'site_url' => Urls::site_url(),
'home_url' => Urls::home_url(),
'site_icon' => get_site_icon_url(),
'site_lang' => get_locale(),
'site_created' => $this->get_assumed_site_creation_date(),
'allow_site_connection' => ! $this->has_connected_owner(),
)
);
$body = $this->apply_activation_source_to_args( urlencode_deep( $body ) );
$api_url = $this->api_url( 'authorize' );
return add_query_arg( $body, $api_url );
}
/**
* Authorizes the user by obtaining and storing the user token.
*
* @param array $data The request data.
* @return string|\WP_Error Returns a string on success.
* Returns a \WP_Error on failure.
*/
public function authorize( $data = array() ) {
/**
* Action fired when user authorization starts.
*
* @since 1.7.0
* @since-jetpack 8.0.0
*/
do_action( 'jetpack_authorize_starting' );
$roles = new Roles();
$role = $roles->translate_current_user_to_role();
if ( ! $role ) {
return new \WP_Error( 'no_role', 'Invalid request.', 400 );
}
$cap = $roles->translate_role_to_cap( $role );
if ( ! $cap ) {
return new \WP_Error( 'no_cap', 'Invalid request.', 400 );
}
if ( ! empty( $data['error'] ) ) {
return new \WP_Error( $data['error'], 'Error included in the request.', 400 );
}
if ( ! isset( $data['state'] ) ) {
return new \WP_Error( 'no_state', 'Request must include state.', 400 );
}
if ( ! ctype_digit( $data['state'] ) ) {
return new \WP_Error( $data['error'], 'State must be an integer.', 400 );
}
$current_user_id = get_current_user_id();
if ( $current_user_id !== (int) $data['state'] ) {
return new \WP_Error( 'wrong_state', 'State does not match current user.', 400 );
}
if ( empty( $data['code'] ) ) {
return new \WP_Error( 'no_code', 'Request must include an authorization code.', 400 );
}
$token = $this->get_tokens()->get( $data, $this->api_url( 'token' ) );
if ( is_wp_error( $token ) ) {
$code = $token->get_error_code();
if ( empty( $code ) ) {
$code = 'invalid_token';
}
return new \WP_Error( $code, $token->get_error_message(), 400 );
}
if ( ! $token ) {
return new \WP_Error( 'no_token', 'Error generating token.', 400 );
}
$is_connection_owner = ! $this->has_connected_owner();
$this->get_tokens()->update_user_token( $current_user_id, sprintf( '%s.%d', $token, $current_user_id ), $is_connection_owner );
/**
* Fires after user has successfully received an auth token.
*
* @since 1.7.0
* @since-jetpack 3.9.0
*/
do_action( 'jetpack_user_authorized' );
if ( ! $is_connection_owner ) {
/**
* Action fired when a secondary user has been authorized.
*
* @since 1.7.0
* @since-jetpack 8.0.0
*/
do_action( 'jetpack_authorize_ending_linked' );
return 'linked';
}
/**
* Action fired when the master user has been authorized.
*
* @since 1.7.0
* @since-jetpack 8.0.0
*
* @param array $data The request data.
*/
do_action( 'jetpack_authorize_ending_authorized', $data );
\Jetpack_Options::delete_raw_option( 'jetpack_last_connect_url_check' );
( new Nonce_Handler() )->reschedule();
return 'authorized';
}
/**
* Disconnects from the Jetpack servers.
* Forgets all connection details and tells the Jetpack servers to do the same.
*
* @param boolean $disconnect_wpcom Should disconnect_site_wpcom be called.
* @param bool $ignore_connected_plugins Delete the tokens even if there are other connected plugins.
*/
public function disconnect_site( $disconnect_wpcom = true, $ignore_connected_plugins = true ) {
if ( ! $ignore_connected_plugins && null !== $this->plugin && ! $this->plugin->is_only() ) {
return false;
}
wp_clear_scheduled_hook( 'jetpack_clean_nonces' );
( new Nonce_Handler() )->clean_all();
/**
* Fires when a site is disconnected.
*
* @since 1.36.3
*/
do_action( 'jetpack_site_before_disconnected' );
// If the site is in an IDC because sync is not allowed,
// let's make sure to not disconnect the production site.
if ( $disconnect_wpcom ) {
$tracking = new Tracking();
$tracking->record_user_event( 'disconnect_site', array() );
$this->disconnect_site_wpcom( $ignore_connected_plugins );
}
$this->delete_all_connection_tokens( $ignore_connected_plugins );
// Remove tracked package versions, since they depend on the Jetpack Connection.
delete_option( Package_Version_Tracker::PACKAGE_VERSION_OPTION );
$jetpack_unique_connection = \Jetpack_Options::get_option( 'unique_connection' );
if ( $jetpack_unique_connection ) {
// Check then record unique disconnection if site has never been disconnected previously.
if ( - 1 === $jetpack_unique_connection['disconnected'] ) {
$jetpack_unique_connection['disconnected'] = 1;
} else {
if ( 0 === $jetpack_unique_connection['disconnected'] ) {
$a8c_mc_stats_instance = new A8c_Mc_Stats();
$a8c_mc_stats_instance->add( 'connections', 'unique-disconnect' );
$a8c_mc_stats_instance->do_server_side_stats();
}
// increment number of times disconnected.
$jetpack_unique_connection['disconnected'] += 1;
}
\Jetpack_Options::update_option( 'unique_connection', $jetpack_unique_connection );
}
/**
* Fires when a site is disconnected.
*
* @since 1.30.1
*/
do_action( 'jetpack_site_disconnected' );
}
/**
* The Base64 Encoding of the SHA1 Hash of the Input.
*
* @param string $text The string to hash.
* @return string
*/
public function sha1_base64( $text ) {
return base64_encode( sha1( $text, true ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
}
/**
* This function mirrors Jetpack_Data::is_usable_domain() in the WPCOM codebase.
*
* @param string $domain The domain to check.
*
* @return bool|WP_Error
*/
public function is_usable_domain( $domain ) {
// If it's empty, just fail out.
if ( ! $domain ) {
return new \WP_Error(
'fail_domain_empty',
/* translators: %1$s is a domain name. */
sprintf( __( 'Domain `%1$s` just failed is_usable_domain check as it is empty.', 'jetpack-connection' ), $domain )
);
}
/**
* Skips the usuable domain check when connecting a site.
*
* Allows site administrators with domains that fail gethostname-based checks to pass the request to WP.com
*
* @since 1.7.0
* @since-jetpack 4.1.0
*
* @param bool If the check should be skipped. Default false.
*/
if ( apply_filters( 'jetpack_skip_usuable_domain_check', false ) ) {
return true;
}
// None of the explicit localhosts.
$forbidden_domains = array(
'wordpress.com',
'localhost',
'localhost.localdomain',
'127.0.0.1',
'local.wordpress.test', // VVV pattern.
'local.wordpress-trunk.test', // VVV pattern.
'src.wordpress-develop.test', // VVV pattern.
'build.wordpress-develop.test', // VVV pattern.
);
if ( in_array( $domain, $forbidden_domains, true ) ) {
return new \WP_Error(
'fail_domain_forbidden',
sprintf(
/* translators: %1$s is a domain name. */
__(
'Domain `%1$s` just failed is_usable_domain check as it is in the forbidden array.',
'jetpack-connection'
),
$domain
)
);
}
// No .test or .local domains.
if ( preg_match( '#\.(test|local)$#i', $domain ) ) {
return new \WP_Error(
'fail_domain_tld',
sprintf(
/* translators: %1$s is a domain name. */
__(
'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.',
'jetpack-connection'
),
$domain
)
);
}
// No WPCOM subdomains.
if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) {
return new \WP_Error(
'fail_subdomain_wpcom',
sprintf(
/* translators: %1$s is a domain name. */
__(
'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.',
'jetpack-connection'
),
$domain
)
);
}
// If PHP was compiled without support for the Filter module (very edge case).
if ( ! function_exists( 'filter_var' ) ) {
// Just pass back true for now, and let wpcom sort it out.
return true;
}
return true;
}
/**
* Gets the requested token.
*
* @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Tokens->get_access_token() instead.
*
* @param int|false $user_id false: Return the Blog Token. int: Return that user's User Token.
* @param string|false $token_key If provided, check that the token matches the provided input.
* @param bool|true $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found.
*
* @return object|false
*
* @see $this->get_tokens()->get_access_token()
*/
public function get_access_token( $user_id = false, $token_key = false, $suppress_errors = true ) {
_deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Tokens->get_access_token' );
return $this->get_tokens()->get_access_token( $user_id, $token_key, $suppress_errors );
}
/**
* In some setups, $HTTP_RAW_POST_DATA can be emptied during some IXR_Server paths
* since it is passed by reference to various methods.
* Capture it here so we can verify the signature later.
*
* @param array $methods an array of available XMLRPC methods.
* @return array the same array, since this method doesn't add or remove anything.
*/
public function xmlrpc_methods( $methods ) {
$this->raw_post_data = isset( $GLOBALS['HTTP_RAW_POST_DATA'] ) ? $GLOBALS['HTTP_RAW_POST_DATA'] : null;
return $methods;
}
/**
* Resets the raw post data parameter for testing purposes.
*/
public function reset_raw_post_data() {
$this->raw_post_data = null;
}
/**
* Registering an additional method.
*
* @param array $methods an array of available XMLRPC methods.
* @return array the amended array in case the method is added.
*/
public function public_xmlrpc_methods( $methods ) {
if ( array_key_exists( 'wp.getOptions', $methods ) ) {
$methods['wp.getOptions'] = array( $this, 'jetpack_get_options' );
}
return $methods;
}
/**
* Handles a getOptions XMLRPC method call.
*
* @param array $args method call arguments.
* @return an amended XMLRPC server options array.
*/
public function jetpack_get_options( $args ) {
global $wp_xmlrpc_server;
$wp_xmlrpc_server->escape( $args );
$username = $args[1];
$password = $args[2];
$user = $wp_xmlrpc_server->login( $username, $password );
if ( ! $user ) {
return $wp_xmlrpc_server->error;
}
$options = array();
$user_data = $this->get_connected_user_data();
if ( is_array( $user_data ) ) {
$options['jetpack_user_id'] = array(
'desc' => __( 'The WP.com user ID of the connected user', 'jetpack-connection' ),
'readonly' => true,
'value' => $user_data['ID'],
);
$options['jetpack_user_login'] = array(
'desc' => __( 'The WP.com username of the connected user', 'jetpack-connection' ),
'readonly' => true,
'value' => $user_data['login'],
);
$options['jetpack_user_email'] = array(
'desc' => __( 'The WP.com user email of the connected user', 'jetpack-connection' ),
'readonly' => true,
'value' => $user_data['email'],
);
$options['jetpack_user_site_count'] = array(
'desc' => __( 'The number of sites of the connected WP.com user', 'jetpack-connection' ),
'readonly' => true,
'value' => $user_data['site_count'],
);
}
$wp_xmlrpc_server->blog_options = array_merge( $wp_xmlrpc_server->blog_options, $options );
$args = stripslashes_deep( $args );
return $wp_xmlrpc_server->wp_getOptions( $args );
}
/**
* Adds Jetpack-specific options to the output of the XMLRPC options method.
*
* @param array $options standard Core options.
* @return array amended options.
*/
public function xmlrpc_options( $options ) {
$jetpack_client_id = false;
if ( $this->is_connected() ) {
$jetpack_client_id = \Jetpack_Options::get_option( 'id' );
}
$options['jetpack_version'] = array(
'desc' => __( 'Jetpack Plugin Version', 'jetpack-connection' ),
'readonly' => true,
'value' => Constants::get_constant( 'JETPACK__VERSION' ),
);
$options['jetpack_client_id'] = array(
'desc' => __( 'The Client ID/WP.com Blog ID of this site', 'jetpack-connection' ),
'readonly' => true,
'value' => $jetpack_client_id,
);
return $options;
}
/**
* Resets the saved authentication state in between testing requests.
*/
public function reset_saved_auth_state() {
$this->xmlrpc_verification = null;
}
/**
* Sign a user role with the master access token.
* If not specified, will default to the current user.
*
* @access public
*
* @param string $role User role.
* @param int $user_id ID of the user.
* @return string Signed user role.
*/
public function sign_role( $role, $user_id = null ) {
return $this->get_tokens()->sign_role( $role, $user_id );
}
/**
* Set the plugin instance.
*
* @param Plugin $plugin_instance The plugin instance.
*
* @return $this
*/
public function set_plugin_instance( Plugin $plugin_instance ) {
$this->plugin = $plugin_instance;
return $this;
}
/**
* Retrieve the plugin management object.
*
* @return Plugin|null
*/
public function get_plugin() {
return $this->plugin;
}
/**
* Get all connected plugins information, excluding those disconnected by user.
* WARNING: the method cannot be called until Plugin_Storage::configure is called, which happens on plugins_loaded
* Even if you don't use Jetpack Config, it may be introduced later by other plugins,
* so please make sure not to run the method too early in the code.
*
* @return array|WP_Error
*/
public function get_connected_plugins() {
$maybe_plugins = Plugin_Storage::get_all();
if ( $maybe_plugins instanceof WP_Error ) {
return $maybe_plugins;
}
return $maybe_plugins;
}
/**
* Force plugin disconnect. After its called, the plugin will not be allowed to use the connection.
* Note: this method does not remove any access tokens.
*
* @deprecated since 1.39.0
* @return bool
*/
public function disable_plugin() {
return null;
}
/**
* Force plugin reconnect after user-initiated disconnect.
* After its called, the plugin will be allowed to use the connection again.
* Note: this method does not initialize access tokens.
*
* @deprecated since 1.39.0.
* @return bool
*/
public function enable_plugin() {
return null;
}
/**
* Whether the plugin is allowed to use the connection, or it's been disconnected by user.
* If no plugin slug was passed into the constructor, always returns true.
*
* @deprecated 1.42.0 This method no longer has a purpose after the removal of the soft disconnect feature.
*
* @return bool
*/
public function is_plugin_enabled() {
return true;
}
/**
* Perform the API request to refresh the blog token.
* Note that we are making this request on behalf of the Jetpack master user,
* given they were (most probably) the ones that registered the site at the first place.
*
* @return WP_Error|bool The result of updating the blog_token option.
*/
public function refresh_blog_token() {
( new Tracking() )->record_user_event( 'restore_connection_refresh_blog_token' );
$blog_id = \Jetpack_Options::get_option( 'id' );
if ( ! $blog_id ) {
return new WP_Error( 'site_not_registered', 'Site not registered.' );
}
$url = sprintf(
'%s/%s/v%s/%s',
Constants::get_constant( 'JETPACK__WPCOM_JSON_API_BASE' ),
'wpcom',
'2',
'sites/' . $blog_id . '/jetpack-refresh-blog-token'
);
$method = 'POST';
$user_id = get_current_user_id();
$response = Client::remote_request( compact( 'url', 'method', 'user_id' ) );
if ( is_wp_error( $response ) ) {
return new WP_Error( 'refresh_blog_token_http_request_failed', $response->get_error_message() );
}
$code = wp_remote_retrieve_response_code( $response );
$entity = wp_remote_retrieve_body( $response );
if ( $entity ) {
$json = json_decode( $entity );
} else {
$json = false;
}
if ( 200 !== $code ) {
if ( empty( $json->code ) ) {
return new WP_Error( 'unknown', '', $code );
}
/* translators: Error description string. */
$error_description = isset( $json->message ) ? sprintf( __( 'Error Details: %s', 'jetpack-connection' ), (string) $json->message ) : '';
return new WP_Error( (string) $json->code, $error_description, $code );
}
if ( empty( $json->jetpack_secret ) || ! is_scalar( $json->jetpack_secret ) ) {
return new WP_Error( 'jetpack_secret', '', $code );
}
Error_Handler::get_instance()->delete_all_errors();
return $this->get_tokens()->update_blog_token( (string) $json->jetpack_secret );
}
/**
* Disconnect the user from WP.com, and initiate the reconnect process.
*
* @return bool
*/
public function refresh_user_token() {
( new Tracking() )->record_user_event( 'restore_connection_refresh_user_token' );
$this->disconnect_user( null, true, true );
return true;
}
/**
* Fetches a signed token.
*
* @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Tokens->get_signed_token() instead.
*
* @param object $token the token.
* @return WP_Error|string a signed token
*/
public function get_signed_token( $token ) {
_deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Tokens->get_signed_token' );
return $this->get_tokens()->get_signed_token( $token );
}
/**
* If the site-level connection is active, add the list of plugins using connection to the heartbeat (except Jetpack itself)
*
* @param array $stats The Heartbeat stats array.
* @return array $stats
*/
public function add_stats_to_heartbeat( $stats ) {
if ( ! $this->is_connected() ) {
return $stats;
}
$active_plugins_using_connection = Plugin_Storage::get_all();
foreach ( array_keys( $active_plugins_using_connection ) as $plugin_slug ) {
if ( 'jetpack' !== $plugin_slug ) {
$stats_group = isset( $active_plugins_using_connection['jetpack'] ) ? 'combined-connection' : 'standalone-connection';
$stats[ $stats_group ][] = $plugin_slug;
}
}
return $stats;
}
/**
* Get the WPCOM or self-hosted site ID.
*
* @return int|WP_Error
*/
public static function get_site_id() {
$is_wpcom = ( defined( 'IS_WPCOM' ) && IS_WPCOM );
$site_id = $is_wpcom ? get_current_blog_id() : \Jetpack_Options::get_option( 'id' );
if ( ! $site_id ) {
return new \WP_Error(
'unavailable_site_id',
__( 'Sorry, something is wrong with your Jetpack connection.', 'jetpack-connection' ),
403
);
}
return (int) $site_id;
}
}
automattic/jetpack-connection/src/class-nonce-handler.php 0000644 00000013264 15153552356 0017634 0 ustar 00 <?php
/**
* The nonce handler.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
/**
* The nonce handler.
*/
class Nonce_Handler {
/**
* How long the scheduled cleanup can run (in seconds).
* Can be modified using the filter `jetpack_connection_nonce_scheduled_cleanup_limit`.
*/
const SCHEDULED_CLEANUP_TIME_LIMIT = 5;
/**
* How many nonces should be removed per batch during the `clean_all()` run.
*/
const CLEAN_ALL_LIMIT_PER_BATCH = 1000;
/**
* Nonce lifetime in seconds.
*/
const LIFETIME = HOUR_IN_SECONDS;
/**
* The nonces used during the request are stored here to keep them valid.
* The property is static to keep the nonces accessible between the `Nonce_Handler` instances.
*
* @var array
*/
private static $nonces_used_this_request = array();
/**
* The database object.
*
* @var \wpdb
*/
private $db;
/**
* Initializing the object.
*/
public function __construct() {
global $wpdb;
$this->db = $wpdb;
}
/**
* Scheduling the WP-cron cleanup event.
*/
public function init_schedule() {
add_action( 'jetpack_clean_nonces', array( __CLASS__, 'clean_scheduled' ) );
if ( ! wp_next_scheduled( 'jetpack_clean_nonces' ) ) {
wp_schedule_event( time(), 'hourly', 'jetpack_clean_nonces' );
}
}
/**
* Reschedule the WP-cron cleanup event to make it start sooner.
*/
public function reschedule() {
wp_clear_scheduled_hook( 'jetpack_clean_nonces' );
wp_schedule_event( time(), 'hourly', 'jetpack_clean_nonces' );
}
/**
* Adds a used nonce to a list of known nonces.
*
* @param int $timestamp the current request timestamp.
* @param string $nonce the nonce value.
*
* @return bool whether the nonce is unique or not.
*/
public function add( $timestamp, $nonce ) {
if ( isset( static::$nonces_used_this_request[ "$timestamp:$nonce" ] ) ) {
return static::$nonces_used_this_request[ "$timestamp:$nonce" ];
}
// This should always have gone through Jetpack_Signature::sign_request() first to check $timestamp and $nonce.
$timestamp = (int) $timestamp;
$nonce = esc_sql( $nonce );
// Raw query so we can avoid races: add_option will also update.
$show_errors = $this->db->hide_errors();
// Running `try...finally` to make sure that we re-enable errors in case of an exception.
try {
$old_nonce = $this->db->get_row(
$this->db->prepare( "SELECT 1 FROM `{$this->db->options}` WHERE option_name = %s", "jetpack_nonce_{$timestamp}_{$nonce}" )
);
if ( $old_nonce === null ) {
$return = (bool) $this->db->query(
$this->db->prepare(
"INSERT INTO `{$this->db->options}` (`option_name`, `option_value`, `autoload`) VALUES (%s, %s, %s)",
"jetpack_nonce_{$timestamp}_{$nonce}",
time(),
'no'
)
);
} else {
$return = false;
}
} finally {
$this->db->show_errors( $show_errors );
}
static::$nonces_used_this_request[ "$timestamp:$nonce" ] = $return;
return $return;
}
/**
* Removing all existing nonces, or at least as many as possible.
* Capped at 20 seconds to avoid breaking the site.
*
* @param int $cutoff_timestamp All nonces added before this timestamp will be removed.
* @param int $time_limit How long the cleanup can run (in seconds).
*
* @return true
*/
public function clean_all( $cutoff_timestamp = PHP_INT_MAX, $time_limit = 20 ) {
// phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
for ( $end_time = time() + $time_limit; time() < $end_time; ) {
$result = $this->delete( static::CLEAN_ALL_LIMIT_PER_BATCH, $cutoff_timestamp );
if ( ! $result ) {
break;
}
}
return true;
}
/**
* Scheduled clean up of the expired nonces.
*/
public static function clean_scheduled() {
/**
* Adjust the time limit for the scheduled cleanup.
*
* @since 9.5.0
*
* @param int $time_limit How long the cleanup can run (in seconds).
*/
$time_limit = apply_filters( 'jetpack_connection_nonce_cleanup_runtime_limit', static::SCHEDULED_CLEANUP_TIME_LIMIT );
( new static() )->clean_all( time() - static::LIFETIME, $time_limit );
}
/**
* Delete the nonces.
*
* @param int $limit How many nonces to delete.
* @param null|int $cutoff_timestamp All nonces added before this timestamp will be removed.
*
* @return int|false Number of removed nonces, or `false` if nothing to remove (or in case of a database error).
*/
public function delete( $limit = 10, $cutoff_timestamp = null ) {
global $wpdb;
$ids = $wpdb->get_col(
$wpdb->prepare(
"SELECT option_id FROM `{$wpdb->options}`"
. " WHERE `option_name` >= 'jetpack_nonce_' AND `option_name` < %s"
. ' LIMIT %d',
'jetpack_nonce_' . $cutoff_timestamp,
$limit
)
);
if ( ! is_array( $ids ) ) {
// There's an error and we can't proceed.
return false;
}
// Removing zeroes in case AUTO_INCREMENT of the options table is broken, and all ID's are zeroes.
$ids = array_filter( $ids );
if ( ! count( $ids ) ) {
// There's nothing to remove.
return false;
}
$ids_fill = implode( ', ', array_fill( 0, count( $ids ), '%d' ) );
$args = $ids;
$args[] = 'jetpack_nonce_%';
// The Code Sniffer is unable to understand what's going on...
// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber
return $wpdb->query( $wpdb->prepare( "DELETE FROM `{$wpdb->options}` WHERE `option_id` IN ( {$ids_fill} ) AND option_name LIKE %s", $args ) );
}
/**
* Clean the cached nonces valid during the current request, therefore making them invalid.
*
* @return bool
*/
public static function invalidate_request_nonces() {
static::$nonces_used_this_request = array();
return true;
}
}
automattic/jetpack-connection/src/class-package-version-tracker.php 0000644 00000006277 15153552356 0021634 0 ustar 00 <?php
/**
* The Package_Version_Tracker class.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
/**
* The Package_Version_Tracker class.
*/
class Package_Version_Tracker {
const PACKAGE_VERSION_OPTION = 'jetpack_package_versions';
/**
* The cache key for storing a failed request to update remote package versions.
* The caching logic is that when a failed request occurs, we cache it temporarily
* with a set expiration time.
* Only after the key has expired, we'll be able to repeat a remote request.
* This also implies that the cached value is redundant, however we chose the datetime
* of the failed request to avoid using booleans.
*/
const CACHED_FAILED_REQUEST_KEY = 'jetpack_failed_update_remote_package_versions';
/**
* The min time difference in seconds for attempting to
* update remote tracked package versions after a failed remote request.
*/
const CACHED_FAILED_REQUEST_EXPIRATION = 1 * HOUR_IN_SECONDS;
/**
* Uses the jetpack_package_versions filter to obtain the package versions from packages that need
* version tracking. If the package versions have changed, updates the option and notifies WPCOM.
*/
public function maybe_update_package_versions() {
/**
* Obtains the package versions.
*
* @since 1.30.2
*
* @param array An associative array of Jetpack package slugs and their corresponding versions as key/value pairs.
*/
$filter_versions = apply_filters( 'jetpack_package_versions', array() );
if ( ! is_array( $filter_versions ) ) {
return;
}
$option_versions = get_option( self::PACKAGE_VERSION_OPTION, array() );
foreach ( $filter_versions as $package => $version ) {
if ( ! is_string( $package ) || ! is_string( $version ) ) {
unset( $filter_versions[ $package ] );
}
}
if ( ! is_array( $option_versions )
|| count( array_diff_assoc( $filter_versions, $option_versions ) )
|| count( array_diff_assoc( $option_versions, $filter_versions ) )
) {
$this->update_package_versions_option( $filter_versions );
}
}
/**
* Updates the package versions:
* - Sends the updated package versions to wpcom.
* - Updates the 'jetpack_package_versions' option.
*
* @param array $package_versions The package versions.
*/
protected function update_package_versions_option( $package_versions ) {
$connection = new Manager();
if ( ! $connection->is_connected() ) {
return;
}
$site_id = \Jetpack_Options::get_option( 'id' );
$last_failed_attempt_within_hour = get_transient( self::CACHED_FAILED_REQUEST_KEY );
if ( $last_failed_attempt_within_hour ) {
return;
}
$body = wp_json_encode(
array(
'package_versions' => $package_versions,
)
);
$response = Client::wpcom_json_api_request_as_blog(
sprintf( '/sites/%d/jetpack-package-versions', $site_id ),
'2',
array(
'headers' => array( 'content-type' => 'application/json' ),
'method' => 'POST',
),
$body,
'wpcom'
);
if ( 200 === wp_remote_retrieve_response_code( $response ) ) {
update_option( self::PACKAGE_VERSION_OPTION, $package_versions );
} else {
set_transient( self::CACHED_FAILED_REQUEST_KEY, time(), self::CACHED_FAILED_REQUEST_EXPIRATION );
}
}
}
automattic/jetpack-connection/src/class-package-version.php 0000644 00000001210 15153552356 0020161 0 ustar 00 <?php
/**
* The Package_Version class.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
/**
* The Package_Version class.
*/
class Package_Version {
const PACKAGE_VERSION = '1.51.7';
const PACKAGE_SLUG = 'connection';
/**
* Adds the package slug and version to the package version tracker's data.
*
* @param array $package_versions The package version array.
*
* @return array The packge version array.
*/
public static function send_package_version_to_tracker( $package_versions ) {
$package_versions[ self::PACKAGE_SLUG ] = self::PACKAGE_VERSION;
return $package_versions;
}
}
automattic/jetpack-connection/src/class-plugin-storage.php 0000644 00000016313 15153552356 0020055 0 ustar 00 <?php
/**
* Storage for plugin connection information.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use WP_Error;
/**
* The class serves a single purpose - to store the data which plugins use the connection, along with some auxiliary information.
*/
class Plugin_Storage {
const ACTIVE_PLUGINS_OPTION_NAME = 'jetpack_connection_active_plugins';
/**
* Options where disabled plugins were stored
*
* @deprecated since 1.39.0.
* @var string
*/
const PLUGINS_DISABLED_OPTION_NAME = 'jetpack_connection_disabled_plugins';
/**
* Whether this class was configured for the first time or not.
*
* @var boolean
*/
private static $configured = false;
/**
* Refresh list of connected plugins upon intialization.
*
* @var boolean
*/
private static $refresh_connected_plugins = false;
/**
* Connected plugins.
*
* @var array
*/
private static $plugins = array();
/**
* The blog ID the storage is setup for.
* The data will be refreshed if the blog ID changes.
* Used for the multisite networks.
*
* @var int
*/
private static $current_blog_id = null;
/**
* Add or update the plugin information in the storage.
*
* @param string $slug Plugin slug.
* @param array $args Plugin arguments, optional.
*
* @return bool
*/
public static function upsert( $slug, array $args = array() ) {
self::$plugins[ $slug ] = $args;
// if plugin is not in the list of active plugins, refresh the list.
if ( ! array_key_exists( $slug, (array) get_option( self::ACTIVE_PLUGINS_OPTION_NAME, array() ) ) ) {
self::$refresh_connected_plugins = true;
}
return true;
}
/**
* Retrieve the plugin information by slug.
* WARNING: the method cannot be called until Plugin_Storage::configure is called, which happens on plugins_loaded
* Even if you don't use Jetpack Config, it may be introduced later by other plugins,
* so please make sure not to run the method too early in the code.
*
* @param string $slug The plugin slug.
*
* @return array|null|WP_Error
*/
public static function get_one( $slug ) {
$plugins = self::get_all();
if ( $plugins instanceof WP_Error ) {
return $plugins;
}
return empty( $plugins[ $slug ] ) ? null : $plugins[ $slug ];
}
/**
* Retrieve info for all plugins that use the connection.
* WARNING: the method cannot be called until Plugin_Storage::configure is called, which happens on plugins_loaded
* Even if you don't use Jetpack Config, it may be introduced later by other plugins,
* so please make sure not to run the method too early in the code.
*
* @since 1.39.0 deprecated the $connected_only argument.
*
* @param null $deprecated null plugins that were explicitly disconnected. Deprecated, there's no such a thing as disconnecting only specific plugins anymore.
*
* @return array|WP_Error
*/
public static function get_all( $deprecated = null ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
$maybe_error = self::ensure_configured();
if ( $maybe_error instanceof WP_Error ) {
return $maybe_error;
}
return self::$plugins;
}
/**
* Remove the plugin connection info from Jetpack.
* WARNING: the method cannot be called until Plugin_Storage::configure is called, which happens on plugins_loaded
* Even if you don't use Jetpack Config, it may be introduced later by other plugins,
* so please make sure not to run the method too early in the code.
*
* @param string $slug The plugin slug.
*
* @return bool|WP_Error
*/
public static function delete( $slug ) {
$maybe_error = self::ensure_configured();
if ( $maybe_error instanceof WP_Error ) {
return $maybe_error;
}
if ( array_key_exists( $slug, self::$plugins ) ) {
unset( self::$plugins[ $slug ] );
}
return true;
}
/**
* The method makes sure that `Jetpack\Config` has finished, and it's now safe to retrieve the list of plugins.
*
* @return bool|WP_Error
*/
private static function ensure_configured() {
if ( ! self::$configured ) {
return new WP_Error( 'too_early', __( 'You cannot call this method until Jetpack Config is configured', 'jetpack-connection' ) );
}
if ( is_multisite() && get_current_blog_id() !== self::$current_blog_id ) {
self::$plugins = (array) get_option( self::ACTIVE_PLUGINS_OPTION_NAME, array() );
self::$current_blog_id = get_current_blog_id();
}
return true;
}
/**
* Called once to configure this class after plugins_loaded.
*
* @return void
*/
public static function configure() {
if ( self::$configured ) {
return;
}
if ( is_multisite() ) {
self::$current_blog_id = get_current_blog_id();
}
// If a plugin was activated or deactivated.
// self::$plugins is populated in Config::ensure_options_connection().
$number_of_plugins_differ = count( self::$plugins ) !== count( (array) get_option( self::ACTIVE_PLUGINS_OPTION_NAME, array() ) );
if ( $number_of_plugins_differ || true === self::$refresh_connected_plugins ) {
self::update_active_plugins_option();
}
self::$configured = true;
}
/**
* Updates the active plugins option with current list of active plugins.
*
* @return void
*/
public static function update_active_plugins_option() {
// Note: Since this options is synced to wpcom, if you change its structure, you have to update the sanitizer at wpcom side.
update_option( self::ACTIVE_PLUGINS_OPTION_NAME, self::$plugins );
if ( ! class_exists( 'Automattic\Jetpack\Sync\Settings' ) || ! \Automattic\Jetpack\Sync\Settings::is_sync_enabled() ) {
self::update_active_plugins_wpcom_no_sync_fallback();
}
}
/**
* Add the plugin to the set of disconnected ones.
*
* @deprecated since 1.39.0.
*
* @param string $slug Plugin slug.
*
* @return bool
*/
public static function disable_plugin( $slug ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
return true;
}
/**
* Remove the plugin from the set of disconnected ones.
*
* @deprecated since 1.39.0.
*
* @param string $slug Plugin slug.
*
* @return bool
*/
public static function enable_plugin( $slug ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
return true;
}
/**
* Get all plugins that were disconnected by user.
*
* @deprecated since 1.39.0.
*
* @return array
*/
public static function get_all_disabled_plugins() { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
return array();
}
/**
* Update active plugins option with current list of active plugins on WPCOM.
* This is a fallback to ensure this option is always up to date on WPCOM in case
* Sync is not present or disabled.
*
* @since 1.34.0
*/
private static function update_active_plugins_wpcom_no_sync_fallback() {
$connection = new Manager();
if ( ! $connection->is_connected() ) {
return;
}
$site_id = \Jetpack_Options::get_option( 'id' );
$body = wp_json_encode(
array(
'active_connected_plugins' => self::$plugins,
)
);
Client::wpcom_json_api_request_as_blog(
sprintf( '/sites/%d/jetpack-active-connected-plugins', $site_id ),
'2',
array(
'headers' => array( 'content-type' => 'application/json' ),
'method' => 'POST',
),
$body,
'wpcom'
);
}
}
automattic/jetpack-connection/src/class-plugin.php 0000644 00000004516 15153552356 0016415 0 ustar 00 <?php
/**
* Plugin connection management class.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
/**
* Plugin connection management class.
* The class represents a single plugin that uses Jetpack connection.
* Its functionality has been pretty simplistic so far: add to the storage (`Plugin_Storage`), remove it from there,
* and determine whether it's the last active connection. As the component grows, there'll be more functionality added.
*/
class Plugin {
/**
* List of the keys allowed as arguments
*
* @var array
*/
private $arguments_whitelist = array(
'url_info',
);
/**
* Plugin slug.
*
* @var string
*/
private $slug;
/**
* Initialize the plugin manager.
*
* @param string $slug Plugin slug.
*/
public function __construct( $slug ) {
$this->slug = $slug;
}
/**
* Get the plugin slug.
*
* @return string
*/
public function get_slug() {
return $this->slug;
}
/**
* Add the plugin connection info into Jetpack.
*
* @param string $name Plugin name, required.
* @param array $args Plugin arguments, optional.
*
* @return $this
* @see $this->arguments_whitelist
*/
public function add( $name, array $args = array() ) {
$args = compact( 'name' ) + array_intersect_key( $args, array_flip( $this->arguments_whitelist ) );
Plugin_Storage::upsert( $this->slug, $args );
return $this;
}
/**
* Remove the plugin connection info from Jetpack.
*
* @return $this
*/
public function remove() {
Plugin_Storage::delete( $this->slug );
return $this;
}
/**
* Determine if this plugin connection is the only one active at the moment, if any.
*
* @return bool
*/
public function is_only() {
$plugins = Plugin_Storage::get_all();
return ! $plugins || ( array_key_exists( $this->slug, $plugins ) && 1 === count( $plugins ) );
}
/**
* Add the plugin to the set of disconnected ones.
*
* @deprecated since 1.39.0.
*
* @return bool
*/
public function disable() {
return true;
}
/**
* Remove the plugin from the set of disconnected ones.
*
* @deprecated since 1.39.0.
*
* @return bool
*/
public function enable() {
return true;
}
/**
* Whether this plugin is allowed to use the connection.
*
* @deprecated since 11.0
* @return bool
*/
public function is_enabled() {
return true;
}
}
automattic/jetpack-connection/src/class-rest-authentication.php 0000644 00000013436 15153552356 0021112 0 ustar 00 <?php
/**
* The Jetpack Connection Rest Authentication file.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
/**
* The Jetpack Connection Rest Authentication class.
*/
class Rest_Authentication {
/**
* The rest authentication status.
*
* @since 1.17.0
* @var boolean
*/
private $rest_authentication_status = null;
/**
* The rest authentication type.
* Can be either 'user' or 'blog' depending on whether the request
* is signed with a user or a blog token.
*
* @since 1.29.0
* @var string
*/
private $rest_authentication_type = null;
/**
* The Manager object.
*
* @since 1.17.0
* @var Object
*/
private $connection_manager = null;
/**
* Holds the singleton instance of this class
*
* @since 1.17.0
* @var Object
*/
private static $instance = false;
/**
* Flag used to avoid determine_current_user filter to enter an infinite loop
*
* @since 1.26.0
* @var boolean
*/
private $doing_determine_current_user_filter = false;
/**
* The constructor.
*/
private function __construct() {
$this->connection_manager = new Manager();
}
/**
* Controls the single instance of this class.
*
* @static
*/
public static function init() {
if ( ! self::$instance ) {
self::$instance = new self();
add_filter( 'determine_current_user', array( self::$instance, 'wp_rest_authenticate' ) );
add_filter( 'rest_authentication_errors', array( self::$instance, 'wp_rest_authentication_errors' ) );
}
return self::$instance;
}
/**
* Authenticates requests from Jetpack server to WP REST API endpoints.
* Uses the existing XMLRPC request signing implementation.
*
* @param int|bool $user User ID if one has been determined, false otherwise.
*
* @return int|null The user id or null if the request was authenticated via blog token, or not authenticated at all.
*/
public function wp_rest_authenticate( $user ) {
if ( $this->doing_determine_current_user_filter ) {
return $user;
}
$this->doing_determine_current_user_filter = true;
try {
if ( ! empty( $user ) ) {
// Another authentication method is in effect.
return $user;
}
add_filter(
'jetpack_constant_default_value',
__NAMESPACE__ . '\Utils::jetpack_api_constant_filter',
10,
2
);
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( ! isset( $_GET['_for'] ) || 'jetpack' !== $_GET['_for'] ) {
// Nothing to do for this authentication method.
return null;
}
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( ! isset( $_GET['token'] ) && ! isset( $_GET['signature'] ) ) {
// Nothing to do for this authentication method.
return null;
}
if ( ! isset( $_SERVER['REQUEST_METHOD'] ) ) {
$this->rest_authentication_status = new \WP_Error(
'rest_invalid_request',
__( 'The request method is missing.', 'jetpack-connection' ),
array( 'status' => 400 )
);
return null;
}
// Only support specific request parameters that have been tested and
// are known to work with signature verification. A different method
// can be passed to the WP REST API via the '?_method=' parameter if
// needed.
if ( 'GET' !== $_SERVER['REQUEST_METHOD'] && 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
$this->rest_authentication_status = new \WP_Error(
'rest_invalid_request',
__( 'This request method is not supported.', 'jetpack-connection' ),
array( 'status' => 400 )
);
return null;
}
if ( 'POST' !== $_SERVER['REQUEST_METHOD'] && ! empty( file_get_contents( 'php://input' ) ) ) {
$this->rest_authentication_status = new \WP_Error(
'rest_invalid_request',
__( 'This request method does not support body parameters.', 'jetpack-connection' ),
array( 'status' => 400 )
);
return null;
}
$verified = $this->connection_manager->verify_xml_rpc_signature();
if (
$verified &&
isset( $verified['type'] ) &&
'blog' === $verified['type']
) {
// Site-level authentication successful.
$this->rest_authentication_status = true;
$this->rest_authentication_type = 'blog';
return null;
}
if (
$verified &&
isset( $verified['type'] ) &&
'user' === $verified['type'] &&
! empty( $verified['user_id'] )
) {
// User-level authentication successful.
$this->rest_authentication_status = true;
$this->rest_authentication_type = 'user';
return $verified['user_id'];
}
// Something else went wrong. Probably a signature error.
$this->rest_authentication_status = new \WP_Error(
'rest_invalid_signature',
__( 'The request is not signed correctly.', 'jetpack-connection' ),
array( 'status' => 400 )
);
return null;
} finally {
$this->doing_determine_current_user_filter = false;
}
}
/**
* Report authentication status to the WP REST API.
*
* @param WP_Error|mixed $value Error from another authentication handler, null if we should handle it, or another value if not.
* @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
*/
public function wp_rest_authentication_errors( $value ) {
if ( null !== $value ) {
return $value;
}
return $this->rest_authentication_status;
}
/**
* Resets the saved authentication state in between testing requests.
*/
public function reset_saved_auth_state() {
$this->rest_authentication_status = null;
$this->connection_manager->reset_saved_auth_state();
}
/**
* Whether the request was signed with a blog token.
*
* @since 1.29.0
*
* @return bool True if the request was signed with a valid blog token, false otherwise.
*/
public static function is_signed_with_blog_token() {
$instance = self::init();
return true === $instance->rest_authentication_status && 'blog' === $instance->rest_authentication_type;
}
}
automattic/jetpack-connection/src/class-rest-connector.php 0000644 00000062424 15153552356 0020066 0 ustar 00 <?php
/**
* Sets up the Connection REST API endpoints.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Constants;
use Automattic\Jetpack\Redirect;
use Automattic\Jetpack\Status;
use Jetpack_XMLRPC_Server;
use WP_Error;
use WP_REST_Request;
use WP_REST_Response;
use WP_REST_Server;
/**
* Registers the REST routes for Connections.
*/
class REST_Connector {
/**
* The Connection Manager.
*
* @var Manager
*/
private $connection;
/**
* This property stores the localized "Insufficient Permissions" error message.
*
* @var string Generic error message when user is not allowed to perform an action.
*/
private static $user_permissions_error_msg;
const JETPACK__DEBUGGER_PUBLIC_KEY = "\r\n" . '-----BEGIN PUBLIC KEY-----' . "\r\n"
. 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm+uLLVoxGCY71LS6KFc6' . "\r\n"
. '1UnF6QGBAsi5XF8ty9kR3/voqfOkpW+gRerM2Kyjy6DPCOmzhZj7BFGtxSV2ZoMX' . "\r\n"
. '9ZwWxzXhl/Q/6k8jg8BoY1QL6L2K76icXJu80b+RDIqvOfJruaAeBg1Q9NyeYqLY' . "\r\n"
. 'lEVzN2vIwcFYl+MrP/g6Bc2co7Jcbli+tpNIxg4Z+Hnhbs7OJ3STQLmEryLpAxQO' . "\r\n"
. 'q8cbhQkMx+FyQhxzSwtXYI/ClCUmTnzcKk7SgGvEjoKGAmngILiVuEJ4bm7Q1yok' . "\r\n"
. 'xl9+wcfW6JAituNhml9dlHCWnn9D3+j8pxStHihKy2gVMwiFRjLEeD8K/7JVGkb/' . "\r\n"
. 'EwIDAQAB' . "\r\n"
. '-----END PUBLIC KEY-----' . "\r\n";
/**
* Constructor.
*
* @param Manager $connection The Connection Manager.
*/
public function __construct( Manager $connection ) {
$this->connection = $connection;
self::$user_permissions_error_msg = esc_html__(
'You do not have the correct user permissions to perform this action.
Please contact your site admin if you think this is a mistake.',
'jetpack-connection'
);
$jp_version = Constants::get_constant( 'JETPACK__VERSION' );
if ( ! $this->connection->has_connected_owner() ) {
// Register a site.
register_rest_route(
'jetpack/v4',
'/verify_registration',
array(
'methods' => WP_REST_Server::EDITABLE,
'callback' => array( $this, 'verify_registration' ),
'permission_callback' => '__return_true',
)
);
}
// Authorize a remote user.
register_rest_route(
'jetpack/v4',
'/remote_authorize',
array(
'methods' => WP_REST_Server::EDITABLE,
'callback' => __CLASS__ . '::remote_authorize',
'permission_callback' => '__return_true',
)
);
// Get current connection status of Jetpack.
register_rest_route(
'jetpack/v4',
'/connection',
array(
'methods' => WP_REST_Server::READABLE,
'callback' => __CLASS__ . '::connection_status',
'permission_callback' => '__return_true',
)
);
// Disconnect site.
register_rest_route(
'jetpack/v4',
'/connection',
array(
'methods' => WP_REST_Server::EDITABLE,
'callback' => __CLASS__ . '::disconnect_site',
'permission_callback' => __CLASS__ . '::disconnect_site_permission_check',
'args' => array(
'isActive' => array(
'description' => __( 'Set to false will trigger the site to disconnect.', 'jetpack-connection' ),
'validate_callback' => function ( $value ) {
if ( false !== $value ) {
return new WP_Error(
'rest_invalid_param',
__( 'The isActive argument should be set to false.', 'jetpack-connection' ),
array( 'status' => 400 )
);
}
return true;
},
'required' => true,
),
),
)
);
// We are only registering this route if Jetpack-the-plugin is not active or it's version is ge 10.0-alpha.
// The reason for doing so is to avoid conflicts between the Connection package and
// older versions of Jetpack, registering the same route twice.
if ( empty( $jp_version ) || version_compare( $jp_version, '10.0-alpha', '>=' ) ) {
// Get current user connection data.
register_rest_route(
'jetpack/v4',
'/connection/data',
array(
'methods' => WP_REST_Server::READABLE,
'callback' => __CLASS__ . '::get_user_connection_data',
'permission_callback' => __CLASS__ . '::user_connection_data_permission_check',
)
);
}
// Get list of plugins that use the Jetpack connection.
register_rest_route(
'jetpack/v4',
'/connection/plugins',
array(
'methods' => WP_REST_Server::READABLE,
'callback' => array( __CLASS__, 'get_connection_plugins' ),
'permission_callback' => __CLASS__ . '::connection_plugins_permission_check',
)
);
// Full or partial reconnect in case of connection issues.
register_rest_route(
'jetpack/v4',
'/connection/reconnect',
array(
'methods' => WP_REST_Server::EDITABLE,
'callback' => array( $this, 'connection_reconnect' ),
'permission_callback' => __CLASS__ . '::jetpack_reconnect_permission_check',
)
);
// Register the site (get `blog_token`).
register_rest_route(
'jetpack/v4',
'/connection/register',
array(
'methods' => WP_REST_Server::EDITABLE,
'callback' => array( $this, 'connection_register' ),
'permission_callback' => __CLASS__ . '::jetpack_register_permission_check',
'args' => array(
'from' => array(
'description' => __( 'Indicates where the registration action was triggered for tracking/segmentation purposes', 'jetpack-connection' ),
'type' => 'string',
),
'registration_nonce' => array(
'description' => __( 'The registration nonce', 'jetpack-connection' ),
'type' => 'string',
'required' => true,
),
'redirect_uri' => array(
'description' => __( 'URI of the admin page where the user should be redirected after connection flow', 'jetpack-connection' ),
'type' => 'string',
),
'plugin_slug' => array(
'description' => __( 'Indicates from what plugin the request is coming from', 'jetpack-connection' ),
'type' => 'string',
),
),
)
);
// Get authorization URL.
register_rest_route(
'jetpack/v4',
'/connection/authorize_url',
array(
'methods' => WP_REST_Server::READABLE,
'callback' => array( $this, 'connection_authorize_url' ),
'permission_callback' => __CLASS__ . '::user_connection_data_permission_check',
'args' => array(
'redirect_uri' => array(
'description' => __( 'URI of the admin page where the user should be redirected after connection flow', 'jetpack-connection' ),
'type' => 'string',
),
),
)
);
register_rest_route(
'jetpack/v4',
'/user-token',
array(
array(
'methods' => WP_REST_Server::EDITABLE,
'callback' => array( static::class, 'update_user_token' ),
'permission_callback' => array( static::class, 'update_user_token_permission_check' ),
'args' => array(
'user_token' => array(
'description' => __( 'New user token', 'jetpack-connection' ),
'type' => 'string',
'required' => true,
),
'is_connection_owner' => array(
'description' => __( 'Is connection owner', 'jetpack-connection' ),
'type' => 'boolean',
),
),
),
)
);
// Set the connection owner.
register_rest_route(
'jetpack/v4',
'/connection/owner',
array(
'methods' => WP_REST_Server::EDITABLE,
'callback' => array( static::class, 'set_connection_owner' ),
'permission_callback' => array( static::class, 'set_connection_owner_permission_check' ),
'args' => array(
'owner' => array(
'description' => __( 'New owner', 'jetpack-connection' ),
'type' => 'integer',
'required' => true,
),
),
)
);
}
/**
* Handles verification that a site is registered.
*
* @since 1.7.0
* @since-jetpack 5.4.0
*
* @param WP_REST_Request $request The request sent to the WP REST API.
*
* @return string|WP_Error
*/
public function verify_registration( WP_REST_Request $request ) {
$registration_data = array( $request['secret_1'], $request['state'] );
return $this->connection->handle_registration( $registration_data );
}
/**
* Handles verification that a site is registered
*
* @since 1.7.0
* @since-jetpack 5.4.0
*
* @param WP_REST_Request $request The request sent to the WP REST API.
*
* @return array|wp-error
*/
public static function remote_authorize( $request ) {
$xmlrpc_server = new Jetpack_XMLRPC_Server();
$result = $xmlrpc_server->remote_authorize( $request );
if ( is_a( $result, 'IXR_Error' ) ) {
$result = new WP_Error( $result->code, $result->message );
}
return $result;
}
/**
* Get connection status for this Jetpack site.
*
* @since 1.7.0
* @since-jetpack 4.3.0
*
* @param bool $rest_response Should we return a rest response or a simple array. Default to rest response.
*
* @return WP_REST_Response|array Connection information.
*/
public static function connection_status( $rest_response = true ) {
$status = new Status();
$connection = new Manager();
$connection_status = array(
'isActive' => $connection->has_connected_owner(), // TODO deprecate this.
'isStaging' => $status->is_staging_site(),
'isRegistered' => $connection->is_connected(),
'isUserConnected' => $connection->is_user_connected(),
'hasConnectedOwner' => $connection->has_connected_owner(),
'offlineMode' => array(
'isActive' => $status->is_offline_mode(),
'constant' => defined( 'JETPACK_DEV_DEBUG' ) && JETPACK_DEV_DEBUG,
'url' => $status->is_local_site(),
/** This filter is documented in packages/status/src/class-status.php */
'filter' => ( apply_filters( 'jetpack_development_mode', false ) || apply_filters( 'jetpack_offline_mode', false ) ), // jetpack_development_mode is deprecated.
'wpLocalConstant' => defined( 'WP_LOCAL_DEV' ) && WP_LOCAL_DEV,
),
'isPublic' => '1' == get_option( 'blog_public' ), // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual
);
/**
* Filters the connection status data.
*
* @since 1.25.0
*
* @param array An array containing the connection status data.
*/
$connection_status = apply_filters( 'jetpack_connection_status', $connection_status );
if ( $rest_response ) {
return rest_ensure_response(
$connection_status
);
} else {
return $connection_status;
}
}
/**
* Get plugins connected to the Jetpack.
*
* @param bool $rest_response Should we return a rest response or a simple array. Default to rest response.
*
* @since 1.13.1
* @since 1.38.0 Added $rest_response param.
*
* @return WP_REST_Response|WP_Error Response or error object, depending on the request result.
*/
public static function get_connection_plugins( $rest_response = true ) {
$plugins = ( new Manager() )->get_connected_plugins();
if ( is_wp_error( $plugins ) ) {
return $plugins;
}
array_walk(
$plugins,
function ( &$data, $slug ) {
$data['slug'] = $slug;
}
);
if ( $rest_response ) {
return rest_ensure_response( array_values( $plugins ) );
}
return array_values( $plugins );
}
/**
* Verify that user can view Jetpack admin page and can activate plugins.
*
* @since 1.15.0
*
* @return bool|WP_Error Whether user has the capability 'activate_plugins'.
*/
public static function activate_plugins_permission_check() {
if ( current_user_can( 'activate_plugins' ) ) {
return true;
}
return new WP_Error( 'invalid_user_permission_activate_plugins', self::get_user_permissions_error_msg(), array( 'status' => rest_authorization_required_code() ) );
}
/**
* Permission check for the connection_plugins endpoint
*
* @return bool|WP_Error
*/
public static function connection_plugins_permission_check() {
if ( true === static::activate_plugins_permission_check() ) {
return true;
}
if ( true === static::is_request_signed_by_jetpack_debugger() ) {
return true;
}
return new WP_Error( 'invalid_user_permission_activate_plugins', self::get_user_permissions_error_msg(), array( 'status' => rest_authorization_required_code() ) );
}
/**
* Permission check for the disconnect site endpoint.
*
* @since 1.30.1
*
* @return bool|WP_Error True if user is able to disconnect the site.
*/
public static function disconnect_site_permission_check() {
if ( current_user_can( 'jetpack_disconnect' ) ) {
return true;
}
return new WP_Error(
'invalid_user_permission_jetpack_disconnect',
self::get_user_permissions_error_msg(),
array( 'status' => rest_authorization_required_code() )
);
}
/**
* Get miscellaneous user data related to the connection. Similar data available in old "My Jetpack".
* Information about the master/primary user.
* Information about the current user.
*
* @param bool $rest_response Should we return a rest response or a simple array. Default to rest response.
*
* @since 1.30.1
*
* @return \WP_REST_Response|array
*/
public static function get_user_connection_data( $rest_response = true ) {
$blog_id = \Jetpack_Options::get_option( 'id' );
$connection = new Manager();
$current_user = wp_get_current_user();
$connection_owner = $connection->get_connection_owner();
$owner_display_name = false === $connection_owner ? null : $connection_owner->display_name;
$is_user_connected = $connection->is_user_connected();
$is_master_user = false === $connection_owner ? false : ( $current_user->ID === $connection_owner->ID );
$wpcom_user_data = $connection->get_connected_user_data();
// Add connected user gravatar to the returned wpcom_user_data.
// Probably we shouldn't do this when $wpcom_user_data is false, but we have been since 2016 so
// clients probably expect that by now.
if ( false === $wpcom_user_data ) {
$wpcom_user_data = array();
}
$wpcom_user_data['avatar'] = ( ! empty( $wpcom_user_data['email'] ) ?
get_avatar_url(
$wpcom_user_data['email'],
array(
'size' => 64,
'default' => 'mysteryman',
)
)
: false );
$current_user_connection_data = array(
'isConnected' => $is_user_connected,
'isMaster' => $is_master_user,
'username' => $current_user->user_login,
'id' => $current_user->ID,
'blogId' => $blog_id,
'wpcomUser' => $wpcom_user_data,
'gravatar' => get_avatar_url( $current_user->ID, 64, 'mm', '', array( 'force_display' => true ) ),
'permissions' => array(
'connect' => current_user_can( 'jetpack_connect' ),
'connect_user' => current_user_can( 'jetpack_connect_user' ),
'disconnect' => current_user_can( 'jetpack_disconnect' ),
),
);
/**
* Filters the current user connection data.
*
* @since 1.30.1
*
* @param array An array containing the current user connection data.
*/
$current_user_connection_data = apply_filters( 'jetpack_current_user_connection_data', $current_user_connection_data );
$response = array(
'currentUser' => $current_user_connection_data,
'connectionOwner' => $owner_display_name,
);
if ( $rest_response ) {
return rest_ensure_response( $response );
}
return $response;
}
/**
* Permission check for the connection/data endpoint
*
* @return bool|WP_Error
*/
public static function user_connection_data_permission_check() {
if ( current_user_can( 'jetpack_connect_user' ) ) {
return true;
}
return new WP_Error(
'invalid_user_permission_user_connection_data',
self::get_user_permissions_error_msg(),
array( 'status' => rest_authorization_required_code() )
);
}
/**
* Verifies if the request was signed with the Jetpack Debugger key
*
* @param string|null $pub_key The public key used to verify the signature. Default is the Jetpack Debugger key. This is used for testing purposes.
*
* @return bool
*/
public static function is_request_signed_by_jetpack_debugger( $pub_key = null ) {
// phpcs:disable WordPress.Security.NonceVerification.Recommended
if ( ! isset( $_GET['signature'], $_GET['timestamp'], $_GET['url'], $_GET['rest_route'] ) ) {
return false;
}
// signature timestamp must be within 5min of current time.
if ( abs( time() - (int) $_GET['timestamp'] ) > 300 ) {
return false;
}
$signature = base64_decode( filter_var( wp_unslash( $_GET['signature'] ) ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
$signature_data = wp_json_encode(
array(
'rest_route' => filter_var( wp_unslash( $_GET['rest_route'] ) ),
'timestamp' => (int) $_GET['timestamp'],
'url' => filter_var( wp_unslash( $_GET['url'] ) ),
)
);
if (
! function_exists( 'openssl_verify' )
|| 1 !== openssl_verify(
$signature_data,
$signature,
$pub_key ? $pub_key : static::JETPACK__DEBUGGER_PUBLIC_KEY
)
) {
return false;
}
// phpcs:enable WordPress.Security.NonceVerification.Recommended
return true;
}
/**
* Verify that user is allowed to disconnect Jetpack.
*
* @since 1.15.0
*
* @return bool|WP_Error Whether user has the capability 'jetpack_disconnect'.
*/
public static function jetpack_reconnect_permission_check() {
if ( current_user_can( 'jetpack_reconnect' ) ) {
return true;
}
return new WP_Error( 'invalid_user_permission_jetpack_disconnect', self::get_user_permissions_error_msg(), array( 'status' => rest_authorization_required_code() ) );
}
/**
* Returns generic error message when user is not allowed to perform an action.
*
* @return string The error message.
*/
public static function get_user_permissions_error_msg() {
return self::$user_permissions_error_msg;
}
/**
* The endpoint tried to partially or fully reconnect the website to WP.com.
*
* @since 1.15.0
*
* @return \WP_REST_Response|WP_Error
*/
public function connection_reconnect() {
$response = array();
$next = null;
$result = $this->connection->restore();
if ( is_wp_error( $result ) ) {
$response = $result;
} elseif ( is_string( $result ) ) {
$next = $result;
} else {
$next = true === $result ? 'completed' : 'failed';
}
switch ( $next ) {
case 'authorize':
$response['status'] = 'in_progress';
$response['authorizeUrl'] = $this->connection->get_authorization_url();
break;
case 'completed':
$response['status'] = 'completed';
/**
* Action fired when reconnection has completed successfully.
*
* @since 1.18.1
*/
do_action( 'jetpack_reconnection_completed' );
break;
case 'failed':
$response = new WP_Error( 'Reconnect failed' );
break;
}
return rest_ensure_response( $response );
}
/**
* Verify that user is allowed to connect Jetpack.
*
* @since 1.26.0
*
* @return bool|WP_Error Whether user has the capability 'jetpack_connect'.
*/
public static function jetpack_register_permission_check() {
if ( current_user_can( 'jetpack_connect' ) ) {
return true;
}
return new WP_Error( 'invalid_user_permission_jetpack_connect', self::get_user_permissions_error_msg(), array( 'status' => rest_authorization_required_code() ) );
}
/**
* The endpoint tried to partially or fully reconnect the website to WP.com.
*
* @since 1.7.0
* @since-jetpack 7.7.0
*
* @param \WP_REST_Request $request The request sent to the WP REST API.
*
* @return \WP_REST_Response|WP_Error
*/
public function connection_register( $request ) {
if ( ! wp_verify_nonce( $request->get_param( 'registration_nonce' ), 'jetpack-registration-nonce' ) ) {
return new WP_Error( 'invalid_nonce', __( 'Unable to verify your request.', 'jetpack-connection' ), array( 'status' => 403 ) );
}
if ( isset( $request['from'] ) ) {
$this->connection->add_register_request_param( 'from', (string) $request['from'] );
}
if ( ! empty( $request['plugin_slug'] ) ) {
// If `plugin_slug` matches a plugin using the connection, let's inform the plugin that is establishing the connection.
$connected_plugin = Plugin_Storage::get_one( (string) $request['plugin_slug'] );
if ( ! is_wp_error( $connected_plugin ) && ! empty( $connected_plugin ) ) {
$this->connection->set_plugin_instance( new Plugin( (string) $request['plugin_slug'] ) );
}
}
$result = $this->connection->try_registration();
if ( is_wp_error( $result ) ) {
return $result;
}
$redirect_uri = $request->get_param( 'redirect_uri' ) ? admin_url( $request->get_param( 'redirect_uri' ) ) : null;
if ( class_exists( 'Jetpack' ) ) {
$authorize_url = \Jetpack::build_authorize_url( $redirect_uri );
} else {
$authorize_url = $this->connection->get_authorization_url( null, $redirect_uri );
}
/**
* Filters the response of jetpack/v4/connection/register endpoint
*
* @param array $response Array response
* @since 1.27.0
*/
$response_body = apply_filters(
'jetpack_register_site_rest_response',
array()
);
// We manipulate the alternate URLs after the filter is applied, so they can not be overwritten.
$response_body['authorizeUrl'] = $authorize_url;
if ( ! empty( $response_body['alternateAuthorizeUrl'] ) ) {
$response_body['alternateAuthorizeUrl'] = Redirect::get_url( $response_body['alternateAuthorizeUrl'] );
}
return rest_ensure_response( $response_body );
}
/**
* Get the authorization URL.
*
* @since 1.27.0
*
* @param \WP_REST_Request $request The request sent to the WP REST API.
*
* @return \WP_REST_Response|WP_Error
*/
public function connection_authorize_url( $request ) {
$redirect_uri = $request->get_param( 'redirect_uri' ) ? admin_url( $request->get_param( 'redirect_uri' ) ) : null;
$authorize_url = $this->connection->get_authorization_url( null, $redirect_uri );
return rest_ensure_response(
array(
'authorizeUrl' => $authorize_url,
)
);
}
/**
* The endpoint tried to partially or fully reconnect the website to WP.com.
*
* @since 1.29.0
*
* @param \WP_REST_Request $request The request sent to the WP REST API.
*
* @return \WP_REST_Response|WP_Error
*/
public static function update_user_token( $request ) {
$token_parts = explode( '.', $request['user_token'] );
if ( count( $token_parts ) !== 3 || ! (int) $token_parts[2] || ! ctype_digit( $token_parts[2] ) ) {
return new WP_Error( 'invalid_argument_user_token', esc_html__( 'Invalid user token is provided', 'jetpack-connection' ) );
}
$user_id = (int) $token_parts[2];
if ( false === get_userdata( $user_id ) ) {
return new WP_Error( 'invalid_argument_user_id', esc_html__( 'Invalid user id is provided', 'jetpack-connection' ) );
}
$connection = new Manager();
if ( ! $connection->is_connected() ) {
return new WP_Error( 'site_not_connected', esc_html__( 'Site is not connected', 'jetpack-connection' ) );
}
$is_connection_owner = isset( $request['is_connection_owner'] )
? (bool) $request['is_connection_owner']
: ( new Manager() )->get_connection_owner_id() === $user_id;
( new Tokens() )->update_user_token( $user_id, $request['user_token'], $is_connection_owner );
/**
* Fires when the user token gets successfully replaced.
*
* @since 1.29.0
*
* @param int $user_id User ID.
* @param string $token New user token.
*/
do_action( 'jetpack_updated_user_token', $user_id, $request['user_token'] );
return rest_ensure_response(
array(
'success' => true,
)
);
}
/**
* Disconnects Jetpack from the WordPress.com Servers
*
* @since 1.30.1
*
* @return bool|WP_Error True if Jetpack successfully disconnected.
*/
public static function disconnect_site() {
$connection = new Manager();
if ( $connection->is_connected() ) {
$connection->disconnect_site();
return rest_ensure_response( array( 'code' => 'success' ) );
}
return new WP_Error(
'disconnect_failed',
esc_html__( 'Failed to disconnect the site as it appears already disconnected.', 'jetpack-connection' ),
array( 'status' => 400 )
);
}
/**
* Verify that the API client is allowed to replace user token.
*
* @since 1.29.0
*
* @return bool|WP_Error.
*/
public static function update_user_token_permission_check() {
return Rest_Authentication::is_signed_with_blog_token()
? true
: new WP_Error( 'invalid_permission_update_user_token', self::get_user_permissions_error_msg(), array( 'status' => rest_authorization_required_code() ) );
}
/**
* Change the connection owner.
*
* @since 1.29.0
*
* @param WP_REST_Request $request The request sent to the WP REST API.
*
* @return \WP_REST_Response|WP_Error
*/
public static function set_connection_owner( $request ) {
$new_owner_id = $request['owner'];
$owner_set = ( new Manager() )->update_connection_owner( $new_owner_id );
if ( is_wp_error( $owner_set ) ) {
return $owner_set;
}
return rest_ensure_response(
array(
'code' => 'success',
)
);
}
/**
* Check that user has permission to change the master user.
*
* @since 1.7.0
* @since-jetpack 6.2.0
* @since-jetpack 7.7.0 Update so that any user with jetpack_disconnect privs can set owner.
*
* @return bool|WP_Error True if user is able to change master user.
*/
public static function set_connection_owner_permission_check() {
if ( current_user_can( 'jetpack_disconnect' ) ) {
return true;
}
return new WP_Error( 'invalid_user_permission_set_connection_owner', self::get_user_permissions_error_msg(), array( 'status' => rest_authorization_required_code() ) );
}
}
automattic/jetpack-connection/src/class-secrets.php 0000644 00000020437 15153552357 0016570 0 ustar 00 <?php
/**
* The Jetpack Connection Secrets class file.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Jetpack_Options;
use WP_Error;
/**
* The Jetpack Connection Secrets class that is used to manage secrets.
*/
class Secrets {
const SECRETS_MISSING = 'secrets_missing';
const SECRETS_EXPIRED = 'secrets_expired';
const LEGACY_SECRETS_OPTION_NAME = 'jetpack_secrets';
/**
* Deletes all connection secrets from the local Jetpack site.
*/
public function delete_all() {
Jetpack_Options::delete_raw_option( 'jetpack_secrets' );
}
/**
* Runs the wp_generate_password function with the required parameters. This is the
* default implementation of the secret callable, can be overridden using the
* jetpack_connection_secret_generator filter.
*
* @return String $secret value.
*/
private function secret_callable_method() {
$secret = wp_generate_password( 32, false );
// Some sites may hook into the random_password filter and make the password shorter, let's make sure our secret has the required length.
$attempts = 1;
$secret_length = strlen( $secret );
while ( $secret_length < 32 && $attempts < 32 ) {
++$attempts;
$secret .= wp_generate_password( 32, false );
$secret_length = strlen( $secret );
}
return (string) substr( $secret, 0, 32 );
}
/**
* Generates two secret tokens and the end of life timestamp for them.
*
* @param String $action The action name.
* @param Integer|bool $user_id The user identifier. Defaults to `false`.
* @param Integer $exp Expiration time in seconds.
*/
public function generate( $action, $user_id = false, $exp = 600 ) {
if ( false === $user_id ) {
$user_id = get_current_user_id();
}
$callable = apply_filters( 'jetpack_connection_secret_generator', array( get_called_class(), 'secret_callable_method' ) );
$secrets = Jetpack_Options::get_raw_option(
self::LEGACY_SECRETS_OPTION_NAME,
array()
);
$secret_name = 'jetpack_' . $action . '_' . $user_id;
if (
isset( $secrets[ $secret_name ] ) &&
$secrets[ $secret_name ]['exp'] > time()
) {
return $secrets[ $secret_name ];
}
$secret_value = array(
'secret_1' => call_user_func( $callable ),
'secret_2' => call_user_func( $callable ),
'exp' => time() + $exp,
);
$secrets[ $secret_name ] = $secret_value;
$res = Jetpack_Options::update_raw_option( self::LEGACY_SECRETS_OPTION_NAME, $secrets );
return $res ? $secrets[ $secret_name ] : false;
}
/**
* Returns two secret tokens and the end of life timestamp for them.
*
* @param String $action The action name.
* @param Integer $user_id The user identifier.
* @return string|array an array of secrets or an error string.
*/
public function get( $action, $user_id ) {
$secret_name = 'jetpack_' . $action . '_' . $user_id;
$secrets = Jetpack_Options::get_raw_option(
self::LEGACY_SECRETS_OPTION_NAME,
array()
);
if ( ! isset( $secrets[ $secret_name ] ) ) {
return self::SECRETS_MISSING;
}
if ( $secrets[ $secret_name ]['exp'] < time() ) {
$this->delete( $action, $user_id );
return self::SECRETS_EXPIRED;
}
return $secrets[ $secret_name ];
}
/**
* Deletes secret tokens in case they, for example, have expired.
*
* @param String $action The action name.
* @param Integer $user_id The user identifier.
*/
public function delete( $action, $user_id ) {
$secret_name = 'jetpack_' . $action . '_' . $user_id;
$secrets = Jetpack_Options::get_raw_option(
self::LEGACY_SECRETS_OPTION_NAME,
array()
);
if ( isset( $secrets[ $secret_name ] ) ) {
unset( $secrets[ $secret_name ] );
Jetpack_Options::update_raw_option( self::LEGACY_SECRETS_OPTION_NAME, $secrets );
}
}
/**
* Verify a Previously Generated Secret.
*
* @param string $action The type of secret to verify.
* @param string $secret_1 The secret string to compare to what is stored.
* @param int $user_id The user ID of the owner of the secret.
* @return WP_Error|string WP_Error on failure, secret_2 on success.
*/
public function verify( $action, $secret_1, $user_id ) {
$allowed_actions = array( 'register', 'authorize', 'publicize' );
if ( ! in_array( $action, $allowed_actions, true ) ) {
return new WP_Error( 'unknown_verification_action', 'Unknown Verification Action', 400 );
}
$user = get_user_by( 'id', $user_id );
/**
* We've begun verifying the previously generated secret.
*
* @since 1.7.0
* @since-jetpack 7.5.0
*
* @param string $action The type of secret to verify.
* @param \WP_User $user The user object.
*/
do_action( 'jetpack_verify_secrets_begin', $action, $user );
$return_error = function ( WP_Error $error ) use ( $action, $user ) {
/**
* Verifying of the previously generated secret has failed.
*
* @since 1.7.0
* @since-jetpack 7.5.0
*
* @param string $action The type of secret to verify.
* @param \WP_User $user The user object.
* @param WP_Error $error The error object.
*/
do_action( 'jetpack_verify_secrets_fail', $action, $user, $error );
return $error;
};
$stored_secrets = $this->get( $action, $user_id );
$this->delete( $action, $user_id );
$error = null;
if ( empty( $secret_1 ) ) {
$error = $return_error(
new WP_Error(
'verify_secret_1_missing',
/* translators: "%s" is the name of a paramter. It can be either "secret_1" or "state". */
sprintf( __( 'The required "%s" parameter is missing.', 'jetpack-connection' ), 'secret_1' ),
400
)
);
} elseif ( ! is_string( $secret_1 ) ) {
$error = $return_error(
new WP_Error(
'verify_secret_1_malformed',
/* translators: "%s" is the name of a paramter. It can be either "secret_1" or "state". */
sprintf( __( 'The required "%s" parameter is malformed.', 'jetpack-connection' ), 'secret_1' ),
400
)
);
} elseif ( empty( $user_id ) ) {
// $user_id is passed around during registration as "state".
$error = $return_error(
new WP_Error(
'state_missing',
/* translators: "%s" is the name of a paramter. It can be either "secret_1" or "state". */
sprintf( __( 'The required "%s" parameter is missing.', 'jetpack-connection' ), 'state' ),
400
)
);
} elseif ( ! ctype_digit( (string) $user_id ) ) {
$error = $return_error(
new WP_Error(
'state_malformed',
/* translators: "%s" is the name of a paramter. It can be either "secret_1" or "state". */
sprintf( __( 'The required "%s" parameter is malformed.', 'jetpack-connection' ), 'state' ),
400
)
);
} elseif ( self::SECRETS_MISSING === $stored_secrets ) {
$error = $return_error(
new WP_Error(
'verify_secrets_missing',
__( 'Verification secrets not found', 'jetpack-connection' ),
400
)
);
} elseif ( self::SECRETS_EXPIRED === $stored_secrets ) {
$error = $return_error(
new WP_Error(
'verify_secrets_expired',
__( 'Verification took too long', 'jetpack-connection' ),
400
)
);
} elseif ( ! $stored_secrets ) {
$error = $return_error(
new WP_Error(
'verify_secrets_empty',
__( 'Verification secrets are empty', 'jetpack-connection' ),
400
)
);
} elseif ( is_wp_error( $stored_secrets ) ) {
$stored_secrets->add_data( 400 );
$error = $return_error( $stored_secrets );
} elseif ( empty( $stored_secrets['secret_1'] ) || empty( $stored_secrets['secret_2'] ) || empty( $stored_secrets['exp'] ) ) {
$error = $return_error(
new WP_Error(
'verify_secrets_incomplete',
__( 'Verification secrets are incomplete', 'jetpack-connection' ),
400
)
);
} elseif ( ! hash_equals( $secret_1, $stored_secrets['secret_1'] ) ) {
$error = $return_error(
new WP_Error(
'verify_secrets_mismatch',
__( 'Secret mismatch', 'jetpack-connection' ),
400
)
);
}
// Something went wrong during the checks, returning the error.
if ( ! empty( $error ) ) {
return $error;
}
/**
* We've succeeded at verifying the previously generated secret.
*
* @since 1.7.0
* @since-jetpack 7.5.0
*
* @param string $action The type of secret to verify.
* @param \WP_User $user The user object.
*/
do_action( 'jetpack_verify_secrets_success', $action, $user );
return $stored_secrets['secret_2'];
}
}
automattic/jetpack-connection/src/class-server-sandbox.php 0000644 00000017266 15153552357 0020070 0 ustar 00 <?php
/**
* The Server_Sandbox class.
*
* This feature is only useful for Automattic developers.
* It configures Jetpack to talk to staging/sandbox servers
* on WordPress.com instead of production servers.
*
* @package automattic/jetpack-sandbox
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Constants;
/**
* The Server_Sandbox class.
*/
class Server_Sandbox {
/**
* Sets up the action hooks for the server sandbox.
*/
public function init() {
if ( did_action( 'jetpack_server_sandbox_init' ) ) {
return;
}
add_action( 'requests-requests.before_request', array( $this, 'server_sandbox' ), 10, 4 );
add_action( 'admin_bar_menu', array( $this, 'admin_bar_add_sandbox_item' ), 999 );
/**
* Fires when the server sandbox is initialized. This action is used to ensure that
* the server sandbox action hooks are set up only once.
*
* @since 1.30.7
*/
do_action( 'jetpack_server_sandbox_init' );
}
/**
* Returns the new url and host values.
*
* @param string $sandbox Sandbox domain.
* @param string $url URL of request about to be made.
* @param array $headers Headers of request about to be made.
* @param string $data The body of request about to be made.
* @param string $method The method of request about to be made.
*
* @return array [ 'url' => new URL, 'host' => new Host, 'new_signature => New signature if url was changed ]
*/
public function server_sandbox_request_parameters( $sandbox, $url, $headers, $data = null, $method = 'GET' ) {
$host = '';
$new_signature = '';
if ( ! is_string( $sandbox ) || ! is_string( $url ) ) {
return array(
'url' => $url,
'host' => $host,
'new_signature' => $new_signature,
);
}
$url_host = wp_parse_url( $url, PHP_URL_HOST );
switch ( $url_host ) {
case 'public-api.wordpress.com':
case 'jetpack.wordpress.com':
case 'jetpack.com':
case 'dashboard.wordpress.com':
$host = isset( $headers['Host'] ) ? $headers['Host'] : $url_host;
$original_url = $url;
$url = preg_replace(
'@^(https?://)' . preg_quote( $url_host, '@' ) . '(?=[/?#].*|$)@',
'${1}' . $sandbox,
$url,
1
);
/**
* Whether to add the X Debug query parameter to the request made to the Sandbox
*
* @since 1.36.0
*
* @param bool $add_parameter Whether to add the parameter to the request or not. Default is to false.
* @param string $url The URL of the request being made.
* @param string $host The host of the request being made.
*/
if ( apply_filters( 'jetpack_sandbox_add_profile_parameter', false, $url, $host ) ) {
$url = add_query_arg( 'XDEBUG_PROFILE', 1, $url );
// URL has been modified since the signature was created. We'll need a new one.
$original_url = add_query_arg( 'XDEBUG_PROFILE', 1, $original_url );
$new_signature = $this->get_new_signature( $original_url, $headers, $data, $method );
}
}
return compact( 'url', 'host', 'new_signature' );
}
/**
* Gets a new signature for the request
*
* @param string $url The new URL to be signed.
* @param array $headers The headers of the request about to be made.
* @param string $data The body of request about to be made.
* @param string $method The method of the request about to be made.
* @return string|null
*/
private function get_new_signature( $url, $headers, $data, $method ) {
if ( ! empty( $headers['Authorization'] ) ) {
$a_headers = $this->extract_authorization_headers( $headers );
if ( ! empty( $a_headers ) ) {
$token_details = explode( ':', $a_headers['token'] );
if ( count( $token_details ) === 3 ) {
$user_id = $token_details[2];
$token = ( new Tokens() )->get_access_token( $user_id );
$time_diff = (int) \Jetpack_Options::get_option( 'time_diff' );
$jetpack_signature = new \Jetpack_Signature( $token->secret, $time_diff );
$signature = $jetpack_signature->sign_request(
$a_headers['token'],
$a_headers['timestamp'],
$a_headers['nonce'],
$a_headers['body-hash'],
$method,
$url,
$data,
false
);
if ( $signature && ! is_wp_error( $signature ) ) {
return $signature;
} elseif ( is_wp_error( $signature ) ) {
$this->log_new_signature_error( $signature->get_error_message() );
}
} else {
$this->log_new_signature_error( 'Malformed token on Authorization Header' );
}
} else {
$this->log_new_signature_error( 'Error extracting Authorization Header' );
}
} else {
$this->log_new_signature_error( 'Empty Authorization Header' );
}
}
/**
* Logs error if the attempt to create a new signature fails
*
* @param string $message The error message.
* @return void
*/
private function log_new_signature_error( $message ) {
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
error_log( sprintf( "SANDBOXING: Error re-signing the request. '%s'", $message ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
}
}
/**
* Extract the values in the Authorization header into an array
*
* @param array $headers The headers of the request about to be made.
* @return array|null
*/
public function extract_authorization_headers( $headers ) {
if ( ! empty( $headers['Authorization'] ) && is_string( $headers['Authorization'] ) ) {
$header = str_replace( 'X_JETPACK ', '', $headers['Authorization'] );
$vars = explode( ' ', $header );
$result = array();
foreach ( $vars as $var ) {
$elements = explode( '"', $var );
if ( count( $elements ) === 3 ) {
$result[ substr( $elements[0], 0, -1 ) ] = $elements[1];
}
}
return $result;
}
}
/**
* Modifies parameters of request in order to send the request to the
* server specified by `JETPACK__SANDBOX_DOMAIN`.
*
* Attached to the `requests-requests.before_request` filter.
*
* @param string $url URL of request about to be made.
* @param array $headers Headers of request about to be made.
* @param array|string $data Data of request about to be made.
* @param string $type Type of request about to be made.
* @return void
*/
public function server_sandbox( &$url, &$headers, &$data = null, &$type = null ) {
if ( ! Constants::get_constant( 'JETPACK__SANDBOX_DOMAIN' ) ) {
return;
}
$original_url = $url;
$request_parameters = $this->server_sandbox_request_parameters( Constants::get_constant( 'JETPACK__SANDBOX_DOMAIN' ), $url, $headers, $data, $type );
$url = $request_parameters['url'];
if ( $request_parameters['host'] ) {
$headers['Host'] = $request_parameters['host'];
if ( $request_parameters['new_signature'] ) {
$headers['Authorization'] = preg_replace( '/signature=\"[^\"]+\"/', 'signature="' . $request_parameters['new_signature'] . '"', $headers['Authorization'] );
}
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
error_log( sprintf( "SANDBOXING via '%s': '%s'", Constants::get_constant( 'JETPACK__SANDBOX_DOMAIN' ), $original_url ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
}
}
}
/**
* Adds a "Jetpack API Sandboxed" item to the admin bar if the JETPACK__SANDBOX_DOMAIN
* constant is set.
*
* Attached to the `admin_bar_menu` action.
*
* @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
*/
public function admin_bar_add_sandbox_item( $wp_admin_bar ) {
if ( ! Constants::get_constant( 'JETPACK__SANDBOX_DOMAIN' ) ) {
return;
}
$node = array(
'id' => 'jetpack-connection-api-sandbox',
'title' => 'Jetpack API Sandboxed',
'meta' => array(
'title' => 'Sandboxing via ' . Constants::get_constant( 'JETPACK__SANDBOX_DOMAIN' ),
),
);
$wp_admin_bar->add_menu( $node );
}
}
automattic/jetpack-connection/src/class-terms-of-service.php 0000644 00000005357 15153552357 0020316 0 ustar 00 <?php
/**
* A Terms of Service class for Jetpack.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack;
/**
* Class Terms_Of_Service
*
* Helper class that is responsible for the state of agreement of the terms of service.
*/
class Terms_Of_Service {
/**
* Jetpack option name where the terms of service state is stored.
*
* @var string
*/
const OPTION_NAME = 'tos_agreed';
/**
* Allow the site to agree to the terms of service.
*/
public function agree() {
$this->set_agree();
/**
* Acton fired when the master user has agreed to the terms of service.
*
* @since 1.0.4
* @since-jetpack 7.9.0
*/
do_action( 'jetpack_agreed_to_terms_of_service' );
}
/**
* Allow the site to reject to the terms of service.
*/
public function reject() {
$this->set_reject();
/**
* Acton fired when the master user has revoked their agreement to the terms of service.
*
* @since 1.0.4
* @since-jetpack 7.9.1
*/
do_action( 'jetpack_reject_terms_of_service' );
}
/**
* Returns whether the master user has agreed to the terms of service.
*
* The following conditions have to be met in order to agree to the terms of service.
* 1. The master user has gone though the connect flow.
* 2. The site is not in dev mode.
* 3. The master user of the site is still connected (deprecated @since 1.4.0).
*
* @return bool
*/
public function has_agreed() {
if ( $this->is_offline_mode() ) {
return false;
}
/**
* Before 1.4.0 we used to also check if the master user of the site is connected
* by calling the Connection related `is_active` method.
* As of 1.4.0 we have removed this check in order to resolve the
* circular dependencies it was introducing to composer packages.
*
* @since 1.4.0
*/
return $this->get_raw_has_agreed();
}
/**
* Abstracted for testing purposes.
* Tells us if the site is in dev mode.
*
* @return bool
*/
protected function is_offline_mode() {
return ( new Status() )->is_offline_mode();
}
/**
* Gets just the Jetpack Option that contains the terms of service state.
* Abstracted for testing purposes.
*
* @return bool
*/
protected function get_raw_has_agreed() {
return \Jetpack_Options::get_option( self::OPTION_NAME, false );
}
/**
* Sets the correct Jetpack Option to mark the that the site has agreed to the terms of service.
* Abstracted for testing purposes.
*/
protected function set_agree() {
\Jetpack_Options::update_option( self::OPTION_NAME, true );
}
/**
* Sets the correct Jetpack Option to mark that the site has rejected the terms of service.
* Abstracted for testing purposes.
*/
protected function set_reject() {
\Jetpack_Options::update_option( self::OPTION_NAME, false );
}
}
automattic/jetpack-connection/src/class-tokens.php 0000644 00000051543 15153552357 0016425 0 ustar 00 <?php
/**
* The Jetpack Connection Tokens class file.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Constants;
use Automattic\Jetpack\Roles;
use DateInterval;
use DateTime;
use Exception;
use Jetpack_Options;
use WP_Error;
/**
* The Jetpack Connection Tokens class that manages tokens.
*/
class Tokens {
const MAGIC_NORMAL_TOKEN_KEY = ';normal;';
/**
* Datetime format.
*/
const DATE_FORMAT_ATOM = 'Y-m-d\TH:i:sP';
/**
* Deletes all connection tokens and transients from the local Jetpack site.
*/
public function delete_all() {
Jetpack_Options::delete_option(
array(
'blog_token',
'user_token',
'user_tokens',
)
);
$this->remove_lock();
}
/**
* Perform the API request to validate the blog and user tokens.
*
* @param int|null $user_id ID of the user we need to validate token for. Current user's ID by default.
*
* @return array|false|WP_Error The API response: `array( 'blog_token_is_healthy' => true|false, 'user_token_is_healthy' => true|false )`.
*/
public function validate( $user_id = null ) {
$blog_id = Jetpack_Options::get_option( 'id' );
if ( ! $blog_id ) {
return new WP_Error( 'site_not_registered', 'Site not registered.' );
}
$url = sprintf(
'%s/%s/v%s/%s',
Constants::get_constant( 'JETPACK__WPCOM_JSON_API_BASE' ),
'wpcom',
'2',
'sites/' . $blog_id . '/jetpack-token-health'
);
$user_token = $this->get_access_token( $user_id ? $user_id : get_current_user_id() );
$blog_token = $this->get_access_token();
// Cannot validate non-existent tokens.
if ( false === $user_token || false === $blog_token ) {
return false;
}
$method = 'POST';
$body = array(
'user_token' => $this->get_signed_token( $user_token ),
'blog_token' => $this->get_signed_token( $blog_token ),
);
$response = Client::_wp_remote_request( $url, compact( 'body', 'method' ) );
if ( is_wp_error( $response ) || ! wp_remote_retrieve_body( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
return false;
}
$body = json_decode( wp_remote_retrieve_body( $response ), true );
return $body ? $body : false;
}
/**
* Perform the API request to validate only the blog.
*
* @return bool|WP_Error Boolean with the test result. WP_Error if test cannot be performed.
*/
public function validate_blog_token() {
$blog_id = Jetpack_Options::get_option( 'id' );
if ( ! $blog_id ) {
return new WP_Error( 'site_not_registered', 'Site not registered.' );
}
$url = sprintf(
'%s/%s/v%s/%s',
Constants::get_constant( 'JETPACK__WPCOM_JSON_API_BASE' ),
'wpcom',
'2',
'sites/' . $blog_id . '/jetpack-token-health/blog'
);
$method = 'GET';
$response = Client::remote_request( compact( 'url', 'method' ) );
if ( is_wp_error( $response ) || ! wp_remote_retrieve_body( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
return false;
}
$body = json_decode( wp_remote_retrieve_body( $response ), true );
return is_array( $body ) && isset( $body['is_healthy'] ) && true === $body['is_healthy'];
}
/**
* Obtains the auth token.
*
* @param array $data The request data.
* @param string $token_api_url The URL of the Jetpack "token" API.
* @return object|WP_Error Returns the auth token on success.
* Returns a WP_Error on failure.
*/
public function get( $data, $token_api_url ) {
$roles = new Roles();
$role = $roles->translate_current_user_to_role();
if ( ! $role ) {
return new WP_Error( 'role', __( 'An administrator for this blog must set up the Jetpack connection.', 'jetpack-connection' ) );
}
$client_secret = $this->get_access_token();
if ( ! $client_secret ) {
return new WP_Error( 'client_secret', __( 'You need to register your Jetpack before connecting it.', 'jetpack-connection' ) );
}
/**
* Filter the URL of the first time the user gets redirected back to your site for connection
* data processing.
*
* @since 1.7.0
* @since-jetpack 8.0.0
*
* @param string $redirect_url Defaults to the site admin URL.
*/
$processing_url = apply_filters( 'jetpack_token_processing_url', admin_url( 'admin.php' ) );
$redirect = isset( $data['redirect'] ) ? esc_url_raw( (string) $data['redirect'] ) : '';
/**
* Filter the URL to redirect the user back to when the authentication process
* is complete.
*
* @since 1.7.0
* @since-jetpack 8.0.0
*
* @param string $redirect_url Defaults to the site URL.
*/
$redirect = apply_filters( 'jetpack_token_redirect_url', $redirect );
$redirect_uri = ( 'calypso' === $data['auth_type'] )
? $data['redirect_uri']
: add_query_arg(
array(
'handler' => 'jetpack-connection-webhooks',
'action' => 'authorize',
'_wpnonce' => wp_create_nonce( "jetpack-authorize_{$role}_{$redirect}" ),
'redirect' => $redirect ? rawurlencode( $redirect ) : false,
),
esc_url( $processing_url )
);
/**
* Filters the token request data.
*
* @since 1.7.0
* @since-jetpack 8.0.0
*
* @param array $request_data request data.
*/
$body = apply_filters(
'jetpack_token_request_body',
array(
'client_id' => Jetpack_Options::get_option( 'id' ),
'client_secret' => $client_secret->secret,
'grant_type' => 'authorization_code',
'code' => $data['code'],
'redirect_uri' => $redirect_uri,
)
);
$args = array(
'method' => 'POST',
'body' => $body,
'headers' => array(
'Accept' => 'application/json',
),
);
add_filter( 'http_request_timeout', array( $this, 'return_30' ), PHP_INT_MAX - 1 );
$response = Client::_wp_remote_request( $token_api_url, $args );
remove_filter( 'http_request_timeout', array( $this, 'return_30' ), PHP_INT_MAX - 1 );
if ( is_wp_error( $response ) ) {
return new WP_Error( 'token_http_request_failed', $response->get_error_message() );
}
$code = wp_remote_retrieve_response_code( $response );
$entity = wp_remote_retrieve_body( $response );
if ( $entity ) {
$json = json_decode( $entity );
} else {
$json = false;
}
if ( 200 !== $code || ! empty( $json->error ) ) {
if ( empty( $json->error ) ) {
return new WP_Error( 'unknown', '', $code );
}
/* translators: Error description string. */
$error_description = isset( $json->error_description ) ? sprintf( __( 'Error Details: %s', 'jetpack-connection' ), (string) $json->error_description ) : '';
return new WP_Error( (string) $json->error, $error_description, $code );
}
if ( empty( $json->access_token ) || ! is_scalar( $json->access_token ) ) {
return new WP_Error( 'access_token', '', $code );
}
if ( empty( $json->token_type ) || 'X_JETPACK' !== strtoupper( $json->token_type ) ) {
return new WP_Error( 'token_type', '', $code );
}
if ( empty( $json->scope ) ) {
return new WP_Error( 'scope', 'No Scope', $code );
}
// TODO: get rid of the error silencer.
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
@list( $role, $hmac ) = explode( ':', $json->scope );
if ( empty( $role ) || empty( $hmac ) ) {
return new WP_Error( 'scope', 'Malformed Scope', $code );
}
if ( $this->sign_role( $role ) !== $json->scope ) {
return new WP_Error( 'scope', 'Invalid Scope', $code );
}
$cap = $roles->translate_role_to_cap( $role );
if ( ! $cap ) {
return new WP_Error( 'scope', 'No Cap', $code );
}
if ( ! current_user_can( $cap ) ) {
return new WP_Error( 'scope', 'current_user_cannot', $code );
}
return (string) $json->access_token;
}
/**
* Enters a user token into the user_tokens option
*
* @param int $user_id The user id.
* @param string $token The user token.
* @param bool $is_master_user Whether the user is the master user.
* @return bool
*/
public function update_user_token( $user_id, $token, $is_master_user ) {
// Not designed for concurrent updates.
$user_tokens = $this->get_user_tokens();
if ( ! is_array( $user_tokens ) ) {
$user_tokens = array();
}
$user_tokens[ $user_id ] = $token;
if ( $is_master_user ) {
$master_user = $user_id;
$options = compact( 'user_tokens', 'master_user' );
} else {
$options = compact( 'user_tokens' );
}
return Jetpack_Options::update_options( $options );
}
/**
* Sign a user role with the master access token.
* If not specified, will default to the current user.
*
* @access public
*
* @param string $role User role.
* @param int $user_id ID of the user.
* @return string Signed user role.
*/
public function sign_role( $role, $user_id = null ) {
if ( empty( $user_id ) ) {
$user_id = (int) get_current_user_id();
}
if ( ! $user_id ) {
return false;
}
$token = $this->get_access_token();
if ( ! $token || is_wp_error( $token ) ) {
return false;
}
return $role . ':' . hash_hmac( 'md5', "{$role}|{$user_id}", $token->secret );
}
/**
* Increases the request timeout value to 30 seconds.
*
* @return int Returns 30.
*/
public function return_30() {
return 30;
}
/**
* Gets the requested token.
*
* Tokens are one of two types:
* 1. Blog Tokens: These are the "main" tokens. Each site typically has one Blog Token,
* though some sites can have multiple "Special" Blog Tokens (see below). These tokens
* are not associated with a user account. They represent the site's connection with
* the Jetpack servers.
* 2. User Tokens: These are "sub-"tokens. Each connected user account has one User Token.
*
* All tokens look like "{$token_key}.{$private}". $token_key is a public ID for the
* token, and $private is a secret that should never be displayed anywhere or sent
* over the network; it's used only for signing things.
*
* Blog Tokens can be "Normal" or "Special".
* * Normal: The result of a normal connection flow. They look like
* "{$random_string_1}.{$random_string_2}"
* That is, $token_key and $private are both random strings.
* Sites only have one Normal Blog Token. Normal Tokens are found in either
* Jetpack_Options::get_option( 'blog_token' ) (usual) or the JETPACK_BLOG_TOKEN
* constant (rare).
* * Special: A connection token for sites that have gone through an alternative
* connection flow. They look like:
* ";{$special_id}{$special_version};{$wpcom_blog_id};.{$random_string}"
* That is, $private is a random string and $token_key has a special structure with
* lots of semicolons.
* Most sites have zero Special Blog Tokens. Special tokens are only found in the
* JETPACK_BLOG_TOKEN constant.
*
* In particular, note that Normal Blog Tokens never start with ";" and that
* Special Blog Tokens always do.
*
* When searching for a matching Blog Tokens, Blog Tokens are examined in the following
* order:
* 1. Defined Special Blog Tokens (via the JETPACK_BLOG_TOKEN constant)
* 2. Stored Normal Tokens (via Jetpack_Options::get_option( 'blog_token' ))
* 3. Defined Normal Tokens (via the JETPACK_BLOG_TOKEN constant)
*
* @param int|false $user_id false: Return the Blog Token. int: Return that user's User Token.
* @param string|false $token_key If provided, check that the token matches the provided input.
* @param bool|true $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found.
*
* @return object|false|WP_Error
*/
public function get_access_token( $user_id = false, $token_key = false, $suppress_errors = true ) {
if ( $this->is_locked() ) {
$this->delete_all();
return false;
}
$possible_special_tokens = array();
$possible_normal_tokens = array();
$user_tokens = $this->get_user_tokens();
if ( $user_id ) {
if ( ! $user_tokens ) {
return $suppress_errors ? false : new WP_Error( 'no_user_tokens', __( 'No user tokens found', 'jetpack-connection' ) );
}
if ( true === $user_id ) { // connection owner.
$user_id = Jetpack_Options::get_option( 'master_user' );
if ( ! $user_id ) {
return $suppress_errors ? false : new WP_Error( 'empty_master_user_option', __( 'No primary user defined', 'jetpack-connection' ) );
}
}
if ( ! isset( $user_tokens[ $user_id ] ) || ! $user_tokens[ $user_id ] ) {
// translators: %s is the user ID.
return $suppress_errors ? false : new WP_Error( 'no_token_for_user', sprintf( __( 'No token for user %d', 'jetpack-connection' ), $user_id ) );
}
$user_token_chunks = explode( '.', $user_tokens[ $user_id ] );
if ( empty( $user_token_chunks[1] ) || empty( $user_token_chunks[2] ) ) {
// translators: %s is the user ID.
return $suppress_errors ? false : new WP_Error( 'token_malformed', sprintf( __( 'Token for user %d is malformed', 'jetpack-connection' ), $user_id ) );
}
if ( $user_token_chunks[2] !== (string) $user_id ) {
// translators: %1$d is the ID of the requested user. %2$d is the user ID found in the token.
return $suppress_errors ? false : new WP_Error( 'user_id_mismatch', sprintf( __( 'Requesting user_id %1$d does not match token user_id %2$d', 'jetpack-connection' ), $user_id, $user_token_chunks[2] ) );
}
$possible_normal_tokens[] = "{$user_token_chunks[0]}.{$user_token_chunks[1]}";
} else {
$stored_blog_token = Jetpack_Options::get_option( 'blog_token' );
if ( $stored_blog_token ) {
$possible_normal_tokens[] = $stored_blog_token;
}
$defined_tokens_string = Constants::get_constant( 'JETPACK_BLOG_TOKEN' );
if ( $defined_tokens_string ) {
$defined_tokens = explode( ',', $defined_tokens_string );
foreach ( $defined_tokens as $defined_token ) {
if ( ';' === $defined_token[0] ) {
$possible_special_tokens[] = $defined_token;
} else {
$possible_normal_tokens[] = $defined_token;
}
}
}
}
if ( self::MAGIC_NORMAL_TOKEN_KEY === $token_key ) {
$possible_tokens = $possible_normal_tokens;
} else {
$possible_tokens = array_merge( $possible_special_tokens, $possible_normal_tokens );
}
if ( ! $possible_tokens ) {
// If no user tokens were found, it would have failed earlier, so this is about blog token.
return $suppress_errors ? false : new WP_Error( 'no_possible_tokens', __( 'No blog token found', 'jetpack-connection' ) );
}
$valid_token = false;
if ( false === $token_key ) {
// Use first token.
$valid_token = $possible_tokens[0];
} elseif ( self::MAGIC_NORMAL_TOKEN_KEY === $token_key ) {
// Use first normal token.
$valid_token = $possible_tokens[0]; // $possible_tokens only contains normal tokens because of earlier check.
} else {
// Use the token matching $token_key or false if none.
// Ensure we check the full key.
$token_check = rtrim( $token_key, '.' ) . '.';
foreach ( $possible_tokens as $possible_token ) {
if ( hash_equals( substr( $possible_token, 0, strlen( $token_check ) ), $token_check ) ) {
$valid_token = $possible_token;
break;
}
}
}
if ( ! $valid_token ) {
if ( $user_id ) {
// translators: %d is the user ID.
return $suppress_errors ? false : new WP_Error( 'no_valid_user_token', sprintf( __( 'Invalid token for user %d', 'jetpack-connection' ), $user_id ) );
} else {
return $suppress_errors ? false : new WP_Error( 'no_valid_blog_token', __( 'Invalid blog token', 'jetpack-connection' ) );
}
}
return (object) array(
'secret' => $valid_token,
'external_user_id' => (int) $user_id,
);
}
/**
* Updates the blog token to a new value.
*
* @access public
*
* @param string $token the new blog token value.
* @return Boolean Whether updating the blog token was successful.
*/
public function update_blog_token( $token ) {
return Jetpack_Options::update_option( 'blog_token', $token );
}
/**
* Unlinks the current user from the linked WordPress.com user.
*
* @access public
* @static
*
* @todo Refactor to properly load the XMLRPC client independently.
*
* @param int $user_id The user identifier.
*
* @return bool Whether the disconnection of the user was successful.
*/
public function disconnect_user( $user_id ) {
$tokens = $this->get_user_tokens();
if ( ! $tokens ) {
return false;
}
if ( ! isset( $tokens[ $user_id ] ) ) {
return false;
}
unset( $tokens[ $user_id ] );
$this->update_user_tokens( $tokens );
return true;
}
/**
* Returns an array of user_id's that have user tokens for communicating with wpcom.
* Able to select by specific capability.
*
* @deprecated 1.30.0
* @see Manager::get_connected_users
*
* @param string $capability The capability of the user.
* @param int|null $limit How many connected users to get before returning.
* @return array Array of WP_User objects if found.
*/
public function get_connected_users( $capability = 'any', $limit = null ) {
_deprecated_function( __METHOD__, '1.30.0' );
return ( new Manager( 'jetpack' ) )->get_connected_users( $capability, $limit );
}
/**
* Fetches a signed token.
*
* @param object $token the token.
* @return WP_Error|string a signed token
*/
public function get_signed_token( $token ) {
if ( ! isset( $token->secret ) || empty( $token->secret ) ) {
return new WP_Error( 'invalid_token' );
}
list( $token_key, $token_secret ) = explode( '.', $token->secret );
$token_key = sprintf(
'%s:%d:%d',
$token_key,
Constants::get_constant( 'JETPACK__API_VERSION' ),
$token->external_user_id
);
$timestamp = time();
if ( function_exists( 'wp_generate_password' ) ) {
$nonce = wp_generate_password( 10, false );
} else {
$nonce = substr( sha1( wp_rand( 0, 1000000 ) ), 0, 10 );
}
$normalized_request_string = join(
"\n",
array(
$token_key,
$timestamp,
$nonce,
)
) . "\n";
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
$signature = base64_encode( hash_hmac( 'sha1', $normalized_request_string, $token_secret, true ) );
$auth = array(
'token' => $token_key,
'timestamp' => $timestamp,
'nonce' => $nonce,
'signature' => $signature,
);
$header_pieces = array();
foreach ( $auth as $key => $value ) {
$header_pieces[] = sprintf( '%s="%s"', $key, $value );
}
return join( ' ', $header_pieces );
}
/**
* Gets the list of user tokens
*
* @since 1.30.0
*
* @return bool|array An array of user tokens where keys are user IDs and values are the tokens. False if no user token is found.
*/
public function get_user_tokens() {
return Jetpack_Options::get_option( 'user_tokens' );
}
/**
* Updates the option that stores the user tokens
*
* @since 1.30.0
*
* @param array $tokens An array of user tokens where keys are user IDs and values are the tokens.
* @return bool Was the option successfully updated?
*
* @todo add validate the input.
*/
public function update_user_tokens( $tokens ) {
return Jetpack_Options::update_option( 'user_tokens', $tokens );
}
/**
* Lock the tokens to the current site URL.
*
* @param int $timespan How long the tokens should be locked, in seconds.
*
* @return bool
*/
public function set_lock( $timespan = HOUR_IN_SECONDS ) {
try {
$expires = ( new DateTime() )->add( DateInterval::createFromDateString( (int) $timespan . ' seconds' ) );
} catch ( Exception $e ) {
return false;
}
if ( false === $expires ) {
return false;
}
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
return Jetpack_Options::update_option( 'token_lock', $expires->format( static::DATE_FORMAT_ATOM ) . '|||' . base64_encode( Urls::site_url() ) );
}
/**
* Remove the site lock from tokens.
*
* @return bool
*/
public function remove_lock() {
Jetpack_Options::delete_option( 'token_lock' );
return true;
}
/**
* Check if the domain is locked, remove the lock if needed.
* Possible scenarios:
* - lock expired, site URL matches the lock URL: remove the lock, return false.
* - lock not expired, site URL matches the lock URL: return false.
* - site URL does not match the lock URL (expiration date is ignored): return true, do not remove the lock.
*
* @return bool
*/
public function is_locked() {
$the_lock = Jetpack_Options::get_option( 'token_lock' );
if ( ! $the_lock ) {
// Not locked.
return false;
}
$the_lock = explode( '|||', $the_lock, 2 );
if ( count( $the_lock ) !== 2 ) {
// Something's wrong with the lock.
$this->remove_lock();
return false;
}
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
$locked_site_url = base64_decode( $the_lock[1] );
$expires = $the_lock[0];
$expiration_date = DateTime::createFromFormat( static::DATE_FORMAT_ATOM, $expires );
if ( false === $expiration_date || ! $locked_site_url ) {
// Something's wrong with the lock.
$this->remove_lock();
return false;
}
if ( Urls::site_url() === $locked_site_url ) {
if ( new DateTime() > $expiration_date ) {
// Site lock expired.
// Site URL matches, removing the lock.
$this->remove_lock();
}
return false;
}
// Site URL doesn't match.
return true;
}
}
automattic/jetpack-connection/src/class-tracking.php 0000644 00000023322 15153552357 0016716 0 ustar 00 <?php
/**
* Nosara Tracks for Jetpack
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack;
/**
* The Tracking class, used to record events in wpcom
*/
class Tracking {
/**
* The assets version.
*
* @since 1.13.1
* @deprecated since 1.40.1
*
* @var string Assets version.
*/
const ASSETS_VERSION = '1.0.0';
/**
* Slug of the product that we are tracking.
*
* @var string
*/
private $product_name;
/**
* Connection manager object.
*
* @var Object
*/
private $connection;
/**
* Creates the Tracking object.
*
* @param String $product_name the slug of the product that we are tracking.
* @param Automattic\Jetpack\Connection\Manager $connection the connection manager object.
*/
public function __construct( $product_name = 'jetpack', $connection = null ) {
$this->product_name = $product_name;
$this->connection = $connection;
if ( $this->connection === null ) {
// TODO We should always pass a Connection.
$this->connection = new Connection\Manager();
}
if ( ! did_action( 'jetpack_set_tracks_ajax_hook' ) ) {
add_action( 'wp_ajax_jetpack_tracks', array( $this, 'ajax_tracks' ) );
/**
* Fires when the Tracking::ajax_tracks() callback has been hooked to the
* wp_ajax_jetpack_tracks action. This action is used to ensure that
* the callback is hooked only once.
*
* @since 1.13.11
*/
do_action( 'jetpack_set_tracks_ajax_hook' );
}
}
/**
* Universal method for for all tracking events triggered via the JavaScript client.
*
* @access public
*/
public function ajax_tracks() {
// Check for nonce.
if (
empty( $_REQUEST['tracksNonce'] )
|| ! wp_verify_nonce( $_REQUEST['tracksNonce'], 'jp-tracks-ajax-nonce' ) // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- WP core doesn't pre-sanitize nonces either.
) {
wp_send_json_error(
__( 'You aren’t authorized to do that.', 'jetpack-connection' ),
403
);
}
if ( ! isset( $_REQUEST['tracksEventName'] ) || ! isset( $_REQUEST['tracksEventType'] ) ) {
wp_send_json_error(
__( 'No valid event name or type.', 'jetpack-connection' ),
403
);
}
$tracks_data = array();
if ( 'click' === $_REQUEST['tracksEventType'] && isset( $_REQUEST['tracksEventProp'] ) ) {
if ( is_array( $_REQUEST['tracksEventProp'] ) ) {
$tracks_data = array_map( 'filter_var', wp_unslash( $_REQUEST['tracksEventProp'] ) );
} else {
$tracks_data = array( 'clicked' => filter_var( wp_unslash( $_REQUEST['tracksEventProp'] ) ) );
}
}
$this->record_user_event( filter_var( wp_unslash( $_REQUEST['tracksEventName'] ) ), $tracks_data, null, false );
wp_send_json_success();
}
/**
* Register script necessary for tracking.
*
* @param boolean $enqueue Also enqueue? defaults to false.
*/
public static function register_tracks_functions_scripts( $enqueue = false ) {
// Register jp-tracks as it is a dependency.
wp_register_script(
'jp-tracks',
'//stats.wp.com/w.js',
array(),
gmdate( 'YW' ),
true
);
Assets::register_script(
'jp-tracks-functions',
'../dist/tracks-callables.js',
__FILE__,
array(
'dependencies' => array( 'jp-tracks' ),
'enqueue' => $enqueue,
'in_footer' => true,
)
);
}
/**
* Enqueue script necessary for tracking.
*/
public function enqueue_tracks_scripts() {
Assets::register_script(
'jptracks',
'../dist/tracks-ajax.js',
__FILE__,
array(
'dependencies' => array( 'jquery' ),
'enqueue' => true,
'in_footer' => true,
)
);
wp_localize_script(
'jptracks',
'jpTracksAJAX',
array(
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'jpTracksAJAX_nonce' => wp_create_nonce( 'jp-tracks-ajax-nonce' ),
)
);
}
/**
* Send an event in Tracks.
*
* @param string $event_type Type of the event.
* @param array $data Data to send with the event.
* @param mixed $user Username, user_id, or WP_user object.
* @param bool $use_product_prefix Whether to use the object's product name as a prefix to the event type. If
* set to false, the prefix will be 'jetpack_'.
*/
public function record_user_event( $event_type, $data = array(), $user = null, $use_product_prefix = true ) {
if ( ! $user ) {
$user = wp_get_current_user();
}
$site_url = get_option( 'siteurl' );
$data['_via_ua'] = isset( $_SERVER['HTTP_USER_AGENT'] ) ? filter_var( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) : '';
$data['_via_ip'] = isset( $_SERVER['REMOTE_ADDR'] ) ? filter_var( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : '';
$data['_lg'] = isset( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ? filter_var( wp_unslash( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ) : '';
$data['blog_url'] = $site_url;
$data['blog_id'] = \Jetpack_Options::get_option( 'id' );
// Top level events should not be namespaced.
if ( '_aliasUser' !== $event_type ) {
$prefix = $use_product_prefix ? $this->product_name : 'jetpack';
$event_type = $prefix . '_' . $event_type;
}
$data['jetpack_version'] = defined( 'JETPACK__VERSION' ) ? JETPACK__VERSION : '0';
return $this->tracks_record_event( $user, $event_type, $data );
}
/**
* Record an event in Tracks - this is the preferred way to record events from PHP.
*
* @param mixed $user username, user_id, or WP_user object.
* @param string $event_name The name of the event.
* @param array $properties Custom properties to send with the event.
* @param int $event_timestamp_millis The time in millis since 1970-01-01 00:00:00 when the event occurred.
*
* @return bool true for success | \WP_Error if the event pixel could not be fired
*/
public function tracks_record_event( $user, $event_name, $properties = array(), $event_timestamp_millis = false ) {
// We don't want to track user events during unit tests/CI runs.
if ( $user instanceof \WP_User && 'wptests_capabilities' === $user->cap_key ) {
return false;
}
$terms_of_service = new Terms_Of_Service();
$status = new Status();
// Don't track users who have not agreed to our TOS.
if ( ! $this->should_enable_tracking( $terms_of_service, $status ) ) {
return false;
}
$event_obj = $this->tracks_build_event_obj( $user, $event_name, $properties, $event_timestamp_millis );
if ( is_wp_error( $event_obj->error ) ) {
return $event_obj->error;
}
return $event_obj->record();
}
/**
* Determines whether tracking should be enabled.
*
* @param Automattic\Jetpack\Terms_Of_Service $terms_of_service A Terms_Of_Service object.
* @param Automattic\Jetpack\Status $status A Status object.
*
* @return boolean True if tracking should be enabled, else false.
*/
public function should_enable_tracking( $terms_of_service, $status ) {
if ( $status->is_offline_mode() ) {
return false;
}
return $terms_of_service->has_agreed() || $this->connection->is_user_connected();
}
/**
* Procedurally build a Tracks Event Object.
* NOTE: Use this only when the simpler Automattic\Jetpack\Tracking->jetpack_tracks_record_event() function won't work for you.
*
* @param WP_user $user WP_user object.
* @param string $event_name The name of the event.
* @param array $properties Custom properties to send with the event.
* @param int $event_timestamp_millis The time in millis since 1970-01-01 00:00:00 when the event occurred.
*
* @return \Jetpack_Tracks_Event|\WP_Error
*/
private function tracks_build_event_obj( $user, $event_name, $properties = array(), $event_timestamp_millis = false ) {
$identity = $this->tracks_get_identity( $user->ID );
$properties['user_lang'] = $user->get( 'WPLANG' );
$blog_details = array(
'blog_lang' => isset( $properties['blog_lang'] ) ? $properties['blog_lang'] : get_bloginfo( 'language' ),
);
$timestamp = ( false !== $event_timestamp_millis ) ? $event_timestamp_millis : round( microtime( true ) * 1000 );
$timestamp_string = is_string( $timestamp ) ? $timestamp : number_format( $timestamp, 0, '', '' );
return new \Jetpack_Tracks_Event(
array_merge(
$blog_details,
(array) $properties,
$identity,
array(
'_en' => $event_name,
'_ts' => $timestamp_string,
)
)
);
}
/**
* Get the identity to send to tracks.
*
* @param int $user_id The user id of the local user.
*
* @return array $identity
*/
public function tracks_get_identity( $user_id ) {
// Meta is set, and user is still connected. Use WPCOM ID.
$wpcom_id = get_user_meta( $user_id, 'jetpack_tracks_wpcom_id', true );
if ( $wpcom_id && $this->connection->is_user_connected( $user_id ) ) {
return array(
'_ut' => 'wpcom:user_id',
'_ui' => $wpcom_id,
);
}
// User is connected, but no meta is set yet. Use WPCOM ID and set meta.
if ( $this->connection->is_user_connected( $user_id ) ) {
$wpcom_user_data = $this->connection->get_connected_user_data( $user_id );
update_user_meta( $user_id, 'jetpack_tracks_wpcom_id', $wpcom_user_data['ID'] );
return array(
'_ut' => 'wpcom:user_id',
'_ui' => $wpcom_user_data['ID'],
);
}
// User isn't linked at all. Fall back to anonymous ID.
$anon_id = get_user_meta( $user_id, 'jetpack_tracks_anon_id', true );
if ( ! $anon_id ) {
$anon_id = \Jetpack_Tracks_Client::get_anon_id();
add_user_meta( $user_id, 'jetpack_tracks_anon_id', $anon_id, false );
}
if ( ! isset( $_COOKIE['tk_ai'] ) && ! headers_sent() ) {
setcookie( 'tk_ai', $anon_id, 0, COOKIEPATH, COOKIE_DOMAIN, is_ssl(), false ); // phpcs:ignore Jetpack.Functions.SetCookie -- This is a random string and should be fine.
}
return array(
'_ut' => 'anon',
'_ui' => $anon_id,
);
}
}
automattic/jetpack-connection/src/class-urls.php 0000644 00000011611 15153552357 0016077 0 ustar 00 <?php
/**
* The Jetpack Connection package Urls class file.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Constants;
/**
* Provides Url methods for the Connection package.
*/
class Urls {
const HTTPS_CHECK_OPTION_PREFIX = 'jetpack_sync_https_history_';
const HTTPS_CHECK_HISTORY = 5;
/**
* Return URL from option or PHP constant.
*
* @param string $option_name (e.g. 'home').
*
* @return mixed|null URL.
*/
public static function get_raw_url( $option_name ) {
$value = null;
$constant = ( 'home' === $option_name )
? 'WP_HOME'
: 'WP_SITEURL';
// Since we disregard the constant for multisites in ms-default-filters.php,
// let's also use the db value if this is a multisite.
if ( ! is_multisite() && Constants::is_defined( $constant ) ) {
$value = Constants::get_constant( $constant );
} else {
// Let's get the option from the database so that we can bypass filters. This will help
// ensure that we get more uniform values.
$value = \Jetpack_Options::get_raw_option( $option_name );
}
return $value;
}
/**
* Normalize domains by removing www unless declared in the site's option.
*
* @param string $option Option value from the site.
* @param callable $url_function Function retrieving the URL to normalize.
* @return mixed|string URL.
*/
public static function normalize_www_in_url( $option, $url_function ) {
$url = wp_parse_url( call_user_func( $url_function ) );
$option_url = wp_parse_url( get_option( $option ) );
if ( ! $option_url || ! $url ) {
return $url;
}
if ( "www.{$option_url[ 'host' ]}" === $url['host'] ) {
// remove www if not present in option URL.
$url['host'] = $option_url['host'];
}
if ( "www.{$url[ 'host' ]}" === $option_url['host'] ) {
// add www if present in option URL.
$url['host'] = $option_url['host'];
}
$normalized_url = "{$url['scheme']}://{$url['host']}";
if ( isset( $url['path'] ) ) {
$normalized_url .= "{$url['path']}";
}
if ( isset( $url['query'] ) ) {
$normalized_url .= "?{$url['query']}";
}
return $normalized_url;
}
/**
* Return URL with a normalized protocol.
*
* @param callable $callable Function to retrieve URL option.
* @param string $new_value URL Protocol to set URLs to.
* @return string Normalized URL.
*/
public static function get_protocol_normalized_url( $callable, $new_value ) {
$option_key = self::HTTPS_CHECK_OPTION_PREFIX . $callable;
$parsed_url = wp_parse_url( $new_value );
if ( ! $parsed_url ) {
return $new_value;
}
if ( array_key_exists( 'scheme', $parsed_url ) ) {
$scheme = $parsed_url['scheme'];
} else {
$scheme = '';
}
$scheme_history = get_option( $option_key, array() );
$scheme_history[] = $scheme;
// Limit length to self::HTTPS_CHECK_HISTORY.
$scheme_history = array_slice( $scheme_history, ( self::HTTPS_CHECK_HISTORY * -1 ) );
update_option( $option_key, $scheme_history );
$forced_scheme = in_array( 'https', $scheme_history, true ) ? 'https' : 'http';
return set_url_scheme( $new_value, $forced_scheme );
}
/**
* Helper function that is used when getting home or siteurl values. Decides
* whether to get the raw or filtered value.
*
* @param string $url_type URL to get, home or siteurl.
* @return string
*/
public static function get_raw_or_filtered_url( $url_type ) {
$url_function = ( 'home' === $url_type )
? 'home_url'
: 'site_url';
if (
! Constants::is_defined( 'JETPACK_SYNC_USE_RAW_URL' ) ||
Constants::get_constant( 'JETPACK_SYNC_USE_RAW_URL' )
) {
$scheme = is_ssl() ? 'https' : 'http';
$url = (string) self::get_raw_url( $url_type );
$url = set_url_scheme( $url, $scheme );
} else {
$url = self::normalize_www_in_url( $url_type, $url_function );
}
return self::get_protocol_normalized_url( $url_function, $url );
}
/**
* Return the escaped home_url.
*
* @return string
*/
public static function home_url() {
$url = self::get_raw_or_filtered_url( 'home' );
/**
* Allows overriding of the home_url value that is synced back to WordPress.com.
*
* @since 1.7.0
* @since-jetpack 5.2.0
*
* @param string $home_url
*/
return esc_url_raw( apply_filters( 'jetpack_sync_home_url', $url ) );
}
/**
* Return the escaped siteurl.
*
* @return string
*/
public static function site_url() {
$url = self::get_raw_or_filtered_url( 'siteurl' );
/**
* Allows overriding of the site_url value that is synced back to WordPress.com.
*
* @since 1.7.0
* @since-jetpack 5.2.0
*
* @param string $site_url
*/
return esc_url_raw( apply_filters( 'jetpack_sync_site_url', $url ) );
}
/**
* Return main site URL with a normalized protocol.
*
* @return string
*/
public static function main_network_site_url() {
return self::get_protocol_normalized_url( 'main_network_site_url', network_site_url() );
}
}
automattic/jetpack-connection/src/class-utils.php 0000644 00000004556 15153552357 0016264 0 ustar 00 <?php
/**
* The Jetpack Connection package Utils class file.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\Tracking;
/**
* Provides utility methods for the Connection package.
*/
class Utils {
const DEFAULT_JETPACK__API_VERSION = 1;
const DEFAULT_JETPACK__API_BASE = 'https://jetpack.wordpress.com/jetpack.';
const DEFAULT_JETPACK__WPCOM_JSON_API_BASE = 'https://public-api.wordpress.com';
/**
* Enters a user token into the user_tokens option
*
* @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Tokens->update_user_token() instead.
*
* @param int $user_id The user id.
* @param string $token The user token.
* @param bool $is_master_user Whether the user is the master user.
* @return bool
*/
public static function update_user_token( $user_id, $token, $is_master_user ) {
_deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Tokens->update_user_token' );
return ( new Tokens() )->update_user_token( $user_id, $token, $is_master_user );
}
/**
* Filters the value of the api constant.
*
* @param String $constant_value The constant value.
* @param String $constant_name The constant name.
* @return mixed | null
*/
public static function jetpack_api_constant_filter( $constant_value, $constant_name ) {
if ( $constant_value !== null ) {
// If the constant value was already set elsewhere, use that value.
return $constant_value;
}
if ( defined( "self::DEFAULT_$constant_name" ) ) {
return constant( "self::DEFAULT_$constant_name" );
}
return null;
}
/**
* Add a filter to initialize default values of the constants.
*/
public static function init_default_constants() {
add_filter(
'jetpack_constant_default_value',
array( __CLASS__, 'jetpack_api_constant_filter' ),
10,
2
);
}
/**
* Filters the registration request body to include tracking properties.
*
* @param array $properties Already prepared tracking properties.
* @return array amended properties.
*/
public static function filter_register_request_body( $properties ) {
$tracking = new Tracking();
$tracks_identity = $tracking->tracks_get_identity( get_current_user_id() );
return array_merge(
$properties,
array(
'_ui' => $tracks_identity['_ui'],
'_ut' => $tracks_identity['_ut'],
)
);
}
}
automattic/jetpack-connection/src/class-webhooks.php 0000644 00000014426 15153552357 0016742 0 ustar 00 <?php
/**
* Connection Webhooks class.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Automattic\Jetpack\CookieState;
use Automattic\Jetpack\Roles;
use Automattic\Jetpack\Status\Host;
use Automattic\Jetpack\Tracking;
use Jetpack_Options;
/**
* Connection Webhooks class.
*/
class Webhooks {
/**
* The Connection Manager object.
*
* @var Manager
*/
private $connection;
/**
* Webhooks constructor.
*
* @param Manager $connection The Connection Manager object.
*/
public function __construct( $connection ) {
$this->connection = $connection;
}
/**
* Initialize the webhooks.
*
* @param Manager $connection The Connection Manager object.
*/
public static function init( $connection ) {
$webhooks = new static( $connection );
add_action( 'init', array( $webhooks, 'controller' ) );
add_action( 'load-toplevel_page_jetpack', array( $webhooks, 'fallback_jetpack_controller' ) );
}
/**
* Jetpack plugin used to trigger this webhooks in Jetpack::admin_page_load()
*
* The Jetpack toplevel menu is still accessible for stand-alone plugins, and while there's no content for that page, there are still
* actions from Calypso and WPCOM that reach that route regardless of the site having the Jetpack plugin or not. That's why we are still handling it here.
*/
public function fallback_jetpack_controller() {
$this->controller( true );
}
/**
* The "controller" decides which handler we need to run.
*
* @param bool $force Do not check if it's a webhook request and just run the controller.
*/
public function controller( $force = false ) {
if ( ! $force ) {
// The nonce is verified in specific handlers.
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( empty( $_GET['handler'] ) || 'jetpack-connection-webhooks' !== $_GET['handler'] ) {
return;
}
}
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( isset( $_GET['connect_url_redirect'] ) ) {
$this->handle_connect_url_redirect();
}
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( empty( $_GET['action'] ) ) {
return;
}
// The nonce is verified in specific handlers.
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
switch ( $_GET['action'] ) {
case 'authorize':
$this->handle_authorize();
$this->do_exit();
break;
case 'authorize_redirect':
$this->handle_authorize_redirect();
$this->do_exit();
break;
// Class Jetpack::admin_page_load() still handles other cases.
}
}
/**
* Perform the authorization action.
*/
public function handle_authorize() {
if ( $this->connection->is_connected() && $this->connection->is_user_connected() ) {
$redirect_url = apply_filters( 'jetpack_client_authorize_already_authorized_url', admin_url() );
wp_safe_redirect( $redirect_url );
return;
}
do_action( 'jetpack_client_authorize_processing' );
$data = stripslashes_deep( $_GET );
$data['auth_type'] = 'client';
$roles = new Roles();
$role = $roles->translate_current_user_to_role();
$redirect = isset( $data['redirect'] ) ? esc_url_raw( (string) $data['redirect'] ) : '';
check_admin_referer( "jetpack-authorize_{$role}_{$redirect}" );
$tracking = new Tracking();
$result = $this->connection->authorize( $data );
if ( is_wp_error( $result ) ) {
do_action( 'jetpack_client_authorize_error', $result );
$tracking->record_user_event(
'jpc_client_authorize_fail',
array(
'error_code' => $result->get_error_code(),
'error_message' => $result->get_error_message(),
)
);
} else {
/**
* Fires after the Jetpack client is authorized to communicate with WordPress.com.
*
* @param int Jetpack Blog ID.
*
* @since 1.7.0
* @since-jetpack 4.2.0
*/
do_action( 'jetpack_client_authorized', Jetpack_Options::get_option( 'id' ) );
$tracking->record_user_event( 'jpc_client_authorize_success' );
}
$fallback_redirect = apply_filters( 'jetpack_client_authorize_fallback_url', admin_url() );
$redirect = wp_validate_redirect( $redirect ) ? $redirect : $fallback_redirect;
wp_safe_redirect( $redirect );
}
/**
* The authorhize_redirect webhook handler
*/
public function handle_authorize_redirect() {
$authorize_redirect_handler = new Webhooks\Authorize_Redirect( $this->connection );
$authorize_redirect_handler->handle();
}
/**
* The `exit` is wrapped into a method so we could mock it.
*/
protected function do_exit() {
exit;
}
/**
* Handle the `connect_url_redirect` action,
* which is usually called to repeat an attempt for user to authorize the connection.
*
* @return void
*/
public function handle_connect_url_redirect() {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- no site changes.
$from = ! empty( $_GET['from'] ) ? sanitize_text_field( wp_unslash( $_GET['from'] ) ) : 'iframe';
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- no site changes, sanitization happens in get_authorization_url()
$redirect = ! empty( $_GET['redirect_after_auth'] ) ? wp_unslash( $_GET['redirect_after_auth'] ) : false;
add_filter( 'allowed_redirect_hosts', array( Host::class, 'allow_wpcom_environments' ) );
if ( ! $this->connection->is_user_connected() ) {
if ( ! $this->connection->is_connected() ) {
$this->connection->register();
}
$connect_url = add_query_arg( 'from', $from, $this->connection->get_authorization_url( null, $redirect ) );
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- no site changes.
if ( isset( $_GET['notes_iframe'] ) ) {
$connect_url .= '¬es_iframe';
}
wp_safe_redirect( $connect_url );
$this->do_exit();
} elseif ( ! isset( $_GET['calypso_env'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- no site changes.
( new CookieState() )->state( 'message', 'already_authorized' );
wp_safe_redirect( $redirect );
$this->do_exit();
} else {
$connect_url = add_query_arg(
array(
'from' => $from,
'already_authorized' => true,
),
$this->connection->get_authorization_url()
);
wp_safe_redirect( $connect_url );
$this->do_exit();
}
}
}
automattic/jetpack-connection/src/class-xmlrpc-async-call.php 0000644 00000005117 15153552357 0020447 0 ustar 00 <?php
/**
* XMLRPC Async Call class.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
use Jetpack_IXR_ClientMulticall;
/**
* Make XMLRPC async calls to WordPress.com
*
* This class allows you to enqueue XMLRPC calls that will be grouped and sent
* at once in a multi-call request at shutdown.
*
* Usage:
*
* XMLRPC_Async_Call::add_call( 'methodName', get_current_user_id(), $arg1, $arg2, etc... )
*
* See XMLRPC_Async_Call::add_call for details
*/
class XMLRPC_Async_Call {
/**
* Hold the IXR Clients that will be dispatched at shutdown
*
* Clients are stored in the following schema:
* [
* $blog_id => [
* $user_id => [
* arrat of Jetpack_IXR_ClientMulticall
* ]
* ]
* ]
*
* @var array
*/
public static $clients = array();
/**
* Adds a new XMLRPC call to the queue to be processed on shutdown
*
* @param string $method The XML-RPC method.
* @param integer $user_id The user ID used to make the request (will use this user's token); Use 0 for the blog token.
* @param mixed ...$args This function accepts any number of additional arguments, that will be passed to the call.
* @return void
*/
public static function add_call( $method, $user_id = 0, ...$args ) {
global $blog_id;
$client_blog_id = is_multisite() ? $blog_id : 0;
if ( ! isset( self::$clients[ $client_blog_id ] ) ) {
self::$clients[ $client_blog_id ] = array();
}
if ( ! isset( self::$clients[ $client_blog_id ][ $user_id ] ) ) {
self::$clients[ $client_blog_id ][ $user_id ] = new Jetpack_IXR_ClientMulticall( array( 'user_id' => $user_id ) );
}
if ( function_exists( 'ignore_user_abort' ) ) {
ignore_user_abort( true );
}
array_unshift( $args, $method );
call_user_func_array( array( self::$clients[ $client_blog_id ][ $user_id ], 'addCall' ), $args );
if ( false === has_action( 'shutdown', array( 'Automattic\Jetpack\Connection\XMLRPC_Async_Call', 'do_calls' ) ) ) {
add_action( 'shutdown', array( 'Automattic\Jetpack\Connection\XMLRPC_Async_Call', 'do_calls' ) );
}
}
/**
* Trigger the calls at shutdown
*
* @return void
*/
public static function do_calls() {
foreach ( self::$clients as $client_blog_id => $blog_clients ) {
if ( $client_blog_id > 0 ) {
$switch_success = switch_to_blog( $client_blog_id, true );
if ( ! $switch_success ) {
continue;
}
}
foreach ( $blog_clients as $client ) {
if ( empty( $client->calls ) ) {
continue;
}
flush();
$client->query();
}
if ( $client_blog_id > 0 ) {
restore_current_blog();
}
}
}
}
automattic/jetpack-connection/src/class-xmlrpc-connector.php 0000644 00000003502 15153552357 0020407 0 ustar 00 <?php
/**
* Sets up the Connection XML-RPC methods.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
/**
* Registers the XML-RPC methods for Connections.
*/
class XMLRPC_Connector {
/**
* The Connection Manager.
*
* @var Manager
*/
private $connection;
/**
* Constructor.
*
* @param Manager $connection The Connection Manager.
*/
public function __construct( Manager $connection ) {
$this->connection = $connection;
// Adding the filter late to avoid being overwritten by Jetpack's XMLRPC server.
add_filter( 'xmlrpc_methods', array( $this, 'xmlrpc_methods' ), 20 );
}
/**
* Attached to the `xmlrpc_methods` filter.
*
* @param array $methods The already registered XML-RPC methods.
* @return array
*/
public function xmlrpc_methods( $methods ) {
return array_merge(
$methods,
array(
'jetpack.verifyRegistration' => array( $this, 'verify_registration' ),
)
);
}
/**
* Handles verification that a site is registered.
*
* @param array $registration_data The data sent by the XML-RPC client:
* [ $secret_1, $user_id ].
*
* @return string|IXR_Error
*/
public function verify_registration( $registration_data ) {
return $this->output( $this->connection->handle_registration( $registration_data ) );
}
/**
* Normalizes output for XML-RPC.
*
* @param mixed $data The data to output.
*/
private function output( $data ) {
if ( is_wp_error( $data ) ) {
$code = $data->get_error_data();
if ( ! $code ) {
$code = -10520;
}
if ( ! class_exists( \IXR_Error::class ) ) {
require_once ABSPATH . WPINC . '/class-IXR.php';
}
return new \IXR_Error(
$code,
sprintf( 'Jetpack: [%s] %s', $data->get_error_code(), $data->get_error_message() )
);
}
return $data;
}
}
automattic/jetpack-connection/src/interface-manager.php 0000644 00000000452 15153552357 0017360 0 ustar 00 <?php
/**
* The Jetpack Connection Interface file.
* No longer used.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection;
/**
* This interface is no longer used and is now deprecated.
*
* @deprecated since jetpack 7.8
*/
interface Manager_Interface {
}
automattic/jetpack-connection/src/webhooks/class-authorize-redirect.php 0000644 00000014112 15153552357 0022543 0 ustar 00 <?php
/**
* Authorize_Redirect Webhook handler class.
*
* @package automattic/jetpack-connection
*/
namespace Automattic\Jetpack\Connection\Webhooks;
use Automattic\Jetpack\Admin_UI\Admin_Menu;
use Automattic\Jetpack\Constants;
use Automattic\Jetpack\Licensing;
use Automattic\Jetpack\Tracking;
use GP_Locales;
use Jetpack_Network;
/**
* Authorize_Redirect Webhook handler class.
*/
class Authorize_Redirect {
/**
* Constructs the object
*
* @param Automattic\Jetpack\Connection\Manager $connection The Connection Manager object.
*/
public function __construct( $connection ) {
$this->connection = $connection;
}
/**
* Handle the webhook
*
* This method implements what's in Jetpack::admin_page_load when the Jetpack plugin is not present
*/
public function handle() {
add_filter(
'allowed_redirect_hosts',
function ( $domains ) {
$domains[] = 'jetpack.com';
$domains[] = 'jetpack.wordpress.com';
$domains[] = 'wordpress.com';
// Calypso envs.
$domains[] = 'calypso.localhost';
$domains[] = 'wpcalypso.wordpress.com';
$domains[] = 'horizon.wordpress.com';
return array_unique( $domains );
}
);
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
$dest_url = empty( $_GET['dest_url'] ) ? null : esc_url_raw( wp_unslash( $_GET['dest_url'] ) );
if ( ! $dest_url || ( 0 === stripos( $dest_url, 'https://jetpack.com/' ) && 0 === stripos( $dest_url, 'https://wordpress.com/' ) ) ) {
// The destination URL is missing or invalid, nothing to do here.
exit;
}
// The user is either already connected, or finished the connection process.
if ( $this->connection->is_connected() && $this->connection->is_user_connected() ) {
if ( class_exists( '\Automattic\Jetpack\Licensing' ) && method_exists( '\Automattic\Jetpack\Licensing', 'handle_user_connected_redirect' ) ) {
Licensing::instance()->handle_user_connected_redirect( $dest_url );
}
wp_safe_redirect( $dest_url );
exit;
} elseif ( ! empty( $_GET['done'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
// The user decided not to proceed with setting up the connection.
wp_safe_redirect( Admin_Menu::get_top_level_menu_item_url() );
exit;
}
$redirect_args = array(
'page' => 'jetpack',
'action' => 'authorize_redirect',
'dest_url' => rawurlencode( $dest_url ),
'done' => '1',
);
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( ! empty( $_GET['from'] ) && 'jetpack_site_only_checkout' === $_GET['from'] ) {
$redirect_args['from'] = 'jetpack_site_only_checkout';
}
wp_safe_redirect( $this->build_authorize_url( add_query_arg( $redirect_args, admin_url( 'admin.php' ) ) ) );
exit;
}
/**
* Create the Jetpack authorization URL. Copied from Jetpack class.
*
* @param bool|string $redirect URL to redirect to.
*
* @todo Update default value for redirect since the called function expects a string.
*
* @return mixed|void
*/
public function build_authorize_url( $redirect = false ) {
add_filter( 'jetpack_connect_request_body', array( __CLASS__, 'filter_connect_request_body' ) );
add_filter( 'jetpack_connect_redirect_url', array( __CLASS__, 'filter_connect_redirect_url' ) );
$url = $this->connection->get_authorization_url( wp_get_current_user(), $redirect );
remove_filter( 'jetpack_connect_request_body', array( __CLASS__, 'filter_connect_request_body' ) );
remove_filter( 'jetpack_connect_redirect_url', array( __CLASS__, 'filter_connect_redirect_url' ) );
/**
* This filter is documented in plugins/jetpack/class-jetpack.php
*/
return apply_filters( 'jetpack_build_authorize_url', $url );
}
/**
* Filters the redirection URL that is used for connect requests. The redirect
* URL should return the user back to the Jetpack console.
* Copied from Jetpack class.
*
* @param String $redirect the default redirect URL used by the package.
* @return String the modified URL.
*/
public static function filter_connect_redirect_url( $redirect ) {
$jetpack_admin_page = esc_url_raw( admin_url( 'admin.php?page=jetpack' ) );
$redirect = $redirect
? wp_validate_redirect( esc_url_raw( $redirect ), $jetpack_admin_page )
: $jetpack_admin_page;
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( isset( $_REQUEST['is_multisite'] ) ) {
$redirect = Jetpack_Network::init()->get_url( 'network_admin_page' );
}
return $redirect;
}
/**
* Filters the connection URL parameter array.
* Copied from Jetpack class.
*
* @param array $args default URL parameters used by the package.
* @return array the modified URL arguments array.
*/
public static function filter_connect_request_body( $args ) {
if (
Constants::is_defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' )
&& include_once Constants::get_constant( 'JETPACK__GLOTPRESS_LOCALES_PATH' )
) {
$gp_locale = GP_Locales::by_field( 'wp_locale', get_locale() );
$args['locale'] = isset( $gp_locale ) && isset( $gp_locale->slug )
? $gp_locale->slug
: '';
}
$tracking = new Tracking();
$tracks_identity = $tracking->tracks_get_identity( $args['state'] );
$args = array_merge(
$args,
array(
'_ui' => $tracks_identity['_ui'],
'_ut' => $tracks_identity['_ut'],
)
);
$calypso_env = self::get_calypso_env();
if ( ! empty( $calypso_env ) ) {
$args['calypso_env'] = $calypso_env;
}
return $args;
}
/**
* Return Calypso environment value; used for developing Jetpack and pairing
* it with different Calypso enrionments, such as localhost.
* Copied from Jetpack class.
*
* @since 1.37.1
*
* @return string Calypso environment
*/
public static function get_calypso_env() {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( isset( $_GET['calypso_env'] ) ) {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
return sanitize_key( $_GET['calypso_env'] );
}
if ( getenv( 'CALYPSO_ENV' ) ) {
return sanitize_key( getenv( 'CALYPSO_ENV' ) );
}
if ( defined( 'CALYPSO_ENV' ) && CALYPSO_ENV ) {
return sanitize_key( CALYPSO_ENV );
}
return '';
}
}
automattic/jetpack-constants/LICENSE.txt 0000644 00000043760 15153552357 0014221 0 ustar 00 This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
automattic/jetpack-constants/src/class-constants.php 0000644 00000006526 15153552357 0017014 0 ustar 00 <?php
/**
* A constants manager for Jetpack.
*
* @package automattic/jetpack-constants
*/
namespace Automattic\Jetpack;
/**
* Class Automattic\Jetpack\Constants
*
* Testing constants is hard. Once you define a constant, it's defined. Constants Manager is an
* abstraction layer so that unit tests can set "constants" for tests.
*
* To test your code, you'll need to swap out `defined( 'CONSTANT' )` with `Automattic\Jetpack\Constants::is_defined( 'CONSTANT' )`
* and replace `CONSTANT` with `Automattic\Jetpack\Constants::get_constant( 'CONSTANT' )`. Then in the unit test, you can set the
* constant with `Automattic\Jetpack\Constants::set_constant( 'CONSTANT', $value )` and then clean up after each test with something like
* this:
*
* function tearDown() {
* Automattic\Jetpack\Constants::clear_constants();
* }
*/
class Constants {
/**
* A container for all defined constants.
*
* @access public
* @static
*
* @var array.
*/
public static $set_constants = array();
/**
* Checks if a "constant" has been set in constants Manager
* and has a truthy value (e.g. not null, not false, not 0, any string).
*
* @param string $name The name of the constant.
*
* @return bool
*/
public static function is_true( $name ) {
return self::is_defined( $name ) && self::get_constant( $name );
}
/**
* Checks if a "constant" has been set in constants Manager, and if not,
* checks if the constant was defined with define( 'name', 'value ).
*
* @param string $name The name of the constant.
*
* @return bool
*/
public static function is_defined( $name ) {
return array_key_exists( $name, self::$set_constants )
? true
: defined( $name );
}
/**
* Attempts to retrieve the "constant" from constants Manager, and if it hasn't been set,
* then attempts to get the constant with the constant() function. If that also hasn't
* been set, attempts to get a value from filters.
*
* @param string $name The name of the constant.
*
* @return mixed null if the constant does not exist or the value of the constant.
*/
public static function get_constant( $name ) {
if ( array_key_exists( $name, self::$set_constants ) ) {
return self::$set_constants[ $name ];
}
if ( defined( $name ) ) {
return constant( $name );
}
/**
* Filters the value of the constant.
*
* @since 1.2.0
*
* @param null The constant value to be filtered. The default is null.
* @param String $name The constant name.
*/
return apply_filters( 'jetpack_constant_default_value', null, $name );
}
/**
* Sets the value of the "constant" within constants Manager.
*
* @param string $name The name of the constant.
* @param string $value The value of the constant.
*/
public static function set_constant( $name, $value ) {
self::$set_constants[ $name ] = $value;
}
/**
* Will unset a "constant" from constants Manager if the constant exists.
*
* @param string $name The name of the constant.
*
* @return bool Whether the constant was removed.
*/
public static function clear_single_constant( $name ) {
if ( ! array_key_exists( $name, self::$set_constants ) ) {
return false;
}
unset( self::$set_constants[ $name ] );
return true;
}
/**
* Resets all of the constants within constants Manager.
*/
public static function clear_constants() {
self::$set_constants = array();
}
}
automattic/jetpack-redirect/LICENSE.txt 0000644 00000043760 15153552357 0014006 0 ustar 00 This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
automattic/jetpack-redirect/src/class-redirect.php 0000644 00000005052 15153552357 0016357 0 ustar 00 <?php
/**
* Jetpack Redirect package.
*
* @package automattic/jetpack-redirect
*/
namespace Automattic\Jetpack;
/**
* Class Redirect
*/
class Redirect {
/**
* Constructor.
*
* Static-only class, so nothing here.
*/
private function __construct() {}
/**
* Builds and returns an URL using the jetpack.com/redirect/ service
*
* If $source is a simple slug, it will be sent using the source query parameter. e.g. jetpack.com/redirect/?source=slug
*
* If $source is a full URL, starting with https://, it will be sent using the url query parameter. e.g. jetpack.com/redirect/?url=https://wordpress.com
*
* Note: if using full URL, query parameters and anchor must be passed in $args. Any querystring of url fragment in the URL will be discarded.
*
* @param string $source The URL handler registered in the server or the full destination URL (starting with https://).
* @param array|string $args {
* Optional. Additional arguments to build the url. This is not a complete list as any argument passed here will be sent to as a query parameter to the Redirect server. These parameters will not necessarily be passed over to the final destination URL. If you want to add a parameter to the final destination URL, use the `query` argument.
*
* @type string $site URL of the site; Default is current site.
* @type string $path Additional path to be appended to the URL.
* @type string $query Query parameters to be added to the final destination URL. should be in query string format (e.g. 'key=value&foo=bar').
* @type string $anchor Anchor to be added to the URL.
* @type integer $u The user ID.
* }
*
* @return string The built URL
*/
public static function get_url( $source, $args = array() ) {
$url = 'https://jetpack.com/redirect/';
$site_suffix = ( new Status() )->get_site_suffix();
$args = wp_parse_args( $args, array( 'site' => $site_suffix ) );
$source_key = 'source';
if ( 0 === strpos( $source, 'https://' ) ) {
$source_key = 'url';
$source_url = \wp_parse_url( $source );
// discard any query and fragments.
$source = 'https://' . $source_url['host'] . ( isset( $source_url['path'] ) ? $source_url['path'] : '' );
}
$to_be_added = array(
$source_key => rawurlencode( $source ),
);
foreach ( $args as $arg_name => $arg_value ) {
if ( empty( $arg_value ) ) {
continue;
}
$to_be_added[ $arg_name ] = rawurlencode( $arg_value );
}
if ( ! empty( $to_be_added ) ) {
$url = add_query_arg( $to_be_added, $url );
}
return $url;
}
}
automattic/jetpack-roles/LICENSE.txt 0000644 00000043760 15153552357 0013331 0 ustar 00 This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
automattic/jetpack-roles/src/class-roles.php 0000644 00000003507 15153552357 0015230 0 ustar 00 <?php
/**
* A user roles class for Jetpack.
*
* @package automattic/jetpack-roles
*/
namespace Automattic\Jetpack;
/**
* Class Automattic\Jetpack\Roles
*
* Contains utilities for translating user roles to capabilities and vice versa.
*/
class Roles {
/**
* Map of roles we care about, and their corresponding minimum capabilities.
*
* @access protected
*
* @var array
*/
protected $capability_translations = array(
'administrator' => 'manage_options',
'editor' => 'edit_others_posts',
'author' => 'publish_posts',
'contributor' => 'edit_posts',
'subscriber' => 'read',
);
/**
* Get the role of the current user.
*
* @access public
*
* @return string|boolean Current user's role, false if not enough capabilities for any of the roles.
*/
public function translate_current_user_to_role() {
foreach ( $this->capability_translations as $role => $cap ) {
if ( current_user_can( $role ) || current_user_can( $cap ) ) {
return $role;
}
}
return false;
}
/**
* Get the role of a particular user.
*
* @access public
*
* @param \WP_User $user User object.
* @return string|boolean User's role, false if not enough capabilities for any of the roles.
*/
public function translate_user_to_role( $user ) {
foreach ( $this->capability_translations as $role => $cap ) {
if ( user_can( $user, $role ) || user_can( $user, $cap ) ) {
return $role;
}
}
return false;
}
/**
* Get the minimum capability for a role.
*
* @access public
*
* @param string $role Role name.
* @return string|boolean Capability, false if role isn't mapped to any capabilities.
*/
public function translate_role_to_cap( $role ) {
if ( ! isset( $this->capability_translations[ $role ] ) ) {
return false;
}
return $this->capability_translations[ $role ];
}
}
automattic/jetpack-status/LICENSE.txt 0000644 00000043760 15153552357 0013530 0 ustar 00 This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
automattic/jetpack-status/src/class-cache.php 0000644 00000002240 15153552357 0015337 0 ustar 00 <?php
/**
* A static in-process cache for blog data.
*
* @package automattic/jetpack-status
*/
namespace Automattic\Jetpack\Status;
/**
* A static in-process cache for blog data.
*
* For internal use only. Do not use this externally.
*/
class Cache {
/**
* Cached data;
*
* @var array[]
*/
private static $cache = array();
/**
* Get a value from the cache.
*
* @param string $key Key to fetch.
* @param mixed $default Default value to return if the key is not set.
* @returns mixed Data.
*/
public static function get( $key, $default = null ) {
$blog_id = get_current_blog_id();
return isset( self::$cache[ $blog_id ] ) && array_key_exists( $key, self::$cache[ $blog_id ] ) ? self::$cache[ $blog_id ][ $key ] : $default;
}
/**
* Set a value in the cache.
*
* @param string $key Key to set.
* @param mixed $value Value to store.
*/
public static function set( $key, $value ) {
$blog_id = get_current_blog_id();
self::$cache[ $blog_id ][ $key ] = $value;
}
/**
* Clear the cache.
*
* This is intended for use in unit tests.
*/
public static function clear() {
self::$cache = array();
}
}
automattic/jetpack-status/src/class-cookiestate.php 0000644 00000005370 15153552357 0016615 0 ustar 00 <?php
/**
* Pass state to subsequent requests via cookies.
*
* @package automattic/jetpack-status
*/
namespace Automattic\Jetpack;
/**
* Class Automattic\Jetpack\Status
*
* Used to retrieve information about the current status of Jetpack and the site overall.
*/
class CookieState {
/**
* State is passed via cookies from one request to the next, but never to subsequent requests.
* SET: state( $key, $value );
* GET: $value = state( $key );
*
* @param string $key State key.
* @param string $value Value.
* @param bool $restate Reset the cookie (private).
*/
public function state( $key = null, $value = null, $restate = false ) {
static $state = array();
static $path, $domain;
if ( ! isset( $path ) ) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
$admin_url = ( new Paths() )->admin_url();
$bits = wp_parse_url( $admin_url );
if ( is_array( $bits ) ) {
$path = ( isset( $bits['path'] ) ) ? dirname( $bits['path'] ) : null;
$domain = ( isset( $bits['host'] ) ) ? $bits['host'] : null;
} else {
$path = null;
$domain = null;
}
}
// Extract state from cookies and delete cookies.
if ( isset( $_COOKIE['jetpackState'] ) && is_array( $_COOKIE['jetpackState'] ) ) {
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- User should sanitize if necessary.
$yum = wp_unslash( $_COOKIE['jetpackState'] );
unset( $_COOKIE['jetpackState'] );
foreach ( $yum as $k => $v ) {
if ( strlen( $v ) ) {
$state[ $k ] = $v;
}
setcookie( "jetpackState[$k]", false, 0, $path, $domain, is_ssl(), true );
}
}
if ( $restate ) {
foreach ( $state as $k => $v ) {
setcookie( "jetpackState[$k]", $v, 0, $path, $domain, is_ssl(), true );
}
return;
}
// Get a state variable.
if ( isset( $key ) && ! isset( $value ) ) {
if ( array_key_exists( $key, $state ) ) {
return $state[ $key ];
}
return null;
}
// Set a state variable.
if ( isset( $key ) && isset( $value ) ) {
if ( is_array( $value ) && isset( $value[0] ) ) {
$value = $value[0];
}
$state[ $key ] = $value;
if ( ! headers_sent() ) {
if ( $this->should_set_cookie( $key ) ) {
setcookie( "jetpackState[$key]", $value, 0, $path, $domain, is_ssl(), true );
}
}
}
}
/**
* Determines whether the jetpackState[$key] value should be added to the
* cookie.
*
* @param string $key The state key.
*
* @return boolean Whether the value should be added to the cookie.
*/
public function should_set_cookie( $key ) {
global $current_screen;
$page = isset( $current_screen->base ) ? $current_screen->base : null;
if ( 'toplevel_page_jetpack' === $page && 'display_update_modal' === $key ) {
return false;
}
return true;
}
}
automattic/jetpack-status/src/class-errors.php 0000644 00000002277 15153552357 0015622 0 ustar 00 <?php
/**
* An errors utility class for Jetpack.
*
* @package automattic/jetpack-status
*/
// phpcs:disable WordPress.PHP.IniSet.display_errors_Disallowed
// phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged
// phpcs:disable WordPress.PHP.DevelopmentFunctions.prevent_path_disclosure_error_reporting
// phpcs:disable WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_error_reporting
namespace Automattic\Jetpack;
/**
* Erros class.
*/
class Errors {
/**
* Catches PHP errors. Must be used in conjunction with output buffering.
*
* @param bool $catch True to start catching, False to stop.
*
* @static
*/
public function catch_errors( $catch ) {
static $display_errors, $error_reporting;
if ( $catch ) {
$display_errors = @ini_set( 'display_errors', 1 );
$error_reporting = @error_reporting( E_ALL );
if ( class_exists( 'Jetpack' ) ) {
add_action( 'shutdown', array( 'Jetpack', 'catch_errors_on_shutdown' ), 0 );
}
} else {
@ini_set( 'display_errors', $display_errors );
@error_reporting( $error_reporting );
if ( class_exists( 'Jetpack' ) ) {
remove_action( 'shutdown', array( 'Jetpack', 'catch_errors_on_shutdown' ), 0 );
}
}
}
}
automattic/jetpack-status/src/class-files.php 0000644 00000002330 15153552357 0015376 0 ustar 00 <?php
/**
* A modules class for Jetpack.
*
* @package automattic/jetpack-status
*/
namespace Automattic\Jetpack;
/**
* Class Automattic\Jetpack\Files
*
* Used to retrieve information about files.
*/
class Files {
/**
* Returns an array of all PHP files in the specified absolute path.
* Equivalent to glob( "$absolute_path/*.php" ).
*
* @param string $absolute_path The absolute path of the directory to search.
* @return array Array of absolute paths to the PHP files.
*/
public function glob_php( $absolute_path ) {
if ( function_exists( 'glob' ) ) {
return glob( "$absolute_path/*.php" );
}
$absolute_path = untrailingslashit( $absolute_path );
$files = array();
$dir = @opendir( $absolute_path ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
if ( ! $dir ) {
return $files;
}
// phpcs:ignore Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition
while ( false !== $file = readdir( $dir ) ) {
if ( '.' === substr( $file, 0, 1 ) || '.php' !== substr( $file, -4 ) ) {
continue;
}
$file = "$absolute_path/$file";
if ( ! is_file( $file ) ) {
continue;
}
$files[] = $file;
}
closedir( $dir );
return $files;
}
}
automattic/jetpack-status/src/class-host.php 0000644 00000005625 15153552357 0015263 0 ustar 00 <?php
/**
* A hosting provide class for Jetpack.
*
* @package automattic/jetpack-status
*/
namespace Automattic\Jetpack\Status;
use Automattic\Jetpack\Constants;
/**
* Hosting provider class.
*/
class Host {
/**
* Determine if this site is an WordPress.com on Atomic site or not by looking for presence of the wpcomsh plugin.
*
* @since 1.9.0
*
* @return bool
*/
public function is_woa_site() {
$ret = Cache::get( 'is_woa_site' );
if ( null === $ret ) {
$ret = $this->is_atomic_platform() && Constants::is_true( 'WPCOMSH__PLUGIN_FILE' );
Cache::set( 'is_woa_site', $ret );
}
return $ret;
}
/**
* Determine if the site is hosted on the Atomic hosting platform.
*
* @since 1.9.0
*
* @return bool;
*/
public function is_atomic_platform() {
return Constants::is_true( 'ATOMIC_SITE_ID' ) && Constants::is_true( 'ATOMIC_CLIENT_ID' );
}
/**
* Determine if this is a Newspack site.
*
* @return bool
*/
public function is_newspack_site() {
return Constants::is_defined( 'NEWSPACK_PLUGIN_FILE' );
}
/**
* Determine if this is a VIP-hosted site.
*
* @return bool
*/
public function is_vip_site() {
return Constants::is_defined( 'WPCOM_IS_VIP_ENV' ) && true === Constants::get_constant( 'WPCOM_IS_VIP_ENV' );
}
/**
* Determine if this is a Simple platform site.
*
* @return bool
*/
public function is_wpcom_simple() {
return Constants::is_defined( 'IS_WPCOM' ) && true === Constants::get_constant( 'IS_WPCOM' );
}
/**
* Determine if this is a WordPress.com site.
*
* Includes both Simple and WoA platforms.
*
* @return bool
*/
public function is_wpcom_platform() {
return $this->is_wpcom_simple() || $this->is_woa_site();
}
/**
* Add all wordpress.com environments to the safe redirect allowed list.
*
* To be used with a filter of allowed domains for a redirect.
*
* @param array $domains Allowed WP.com Environments.
*/
public static function allow_wpcom_environments( $domains ) {
$domains[] = 'wordpress.com';
$domains[] = 'jetpack.wordpress.com';
$domains[] = 'wpcalypso.wordpress.com';
$domains[] = 'horizon.wordpress.com';
$domains[] = 'calypso.localhost';
return $domains;
}
/**
* Return Calypso environment value; used for developing Jetpack and pairing
* it with different Calypso environments, such as localhost.
*
* @since 1.18.0
*
* @return string Calypso environment
*/
public function get_calypso_env() {
// phpcs:disable WordPress.Security.NonceVerification.Recommended -- Nonce is not required; only used for changing environments.
if ( isset( $_GET['calypso_env'] ) ) {
return sanitize_key( $_GET['calypso_env'] );
}
// phpcs:enable WordPress.Security.NonceVerification.Recommended
if ( getenv( 'CALYPSO_ENV' ) ) {
return sanitize_key( getenv( 'CALYPSO_ENV' ) );
}
if ( defined( 'CALYPSO_ENV' ) && CALYPSO_ENV ) {
return sanitize_key( CALYPSO_ENV );
}
return '';
}
}
automattic/jetpack-status/src/class-modules.php 0000644 00000046572 15153552357 0015764 0 ustar 00 <?php
/**
* A modules class for Jetpack.
*
* @package automattic/jetpack-status
*/
namespace Automattic\Jetpack;
use Automattic\Jetpack\Current_Plan as Jetpack_Plan;
use Automattic\Jetpack\IP\Utils as IP_Utils;
use Automattic\Jetpack\Status\Host;
/**
* Class Automattic\Jetpack\Modules
*
* Used to retrieve information about the current status of Jetpack modules.
*/
class Modules {
/**
* Check whether or not a Jetpack module is active.
*
* @param string $module The slug of a Jetpack module.
* @return bool
*/
public function is_active( $module ) {
return in_array( $module, self::get_active(), true );
}
/**
* Load module data from module file. Headers differ from WordPress
* plugin headers to avoid them being identified as standalone
* plugins on the WordPress plugins page.
*
* @param string $module The module slug.
*/
public function get( $module ) {
static $modules_details;
// This method relies heavy on auto-generated file found in Jetpack only: module-headings.php
// If it doesn't exist, it's safe to assume none of this will be helpful.
if ( ! function_exists( 'jetpack_has_no_module_info' ) ) {
return false;
}
if ( jetpack_has_no_module_info( $module ) ) {
return false;
}
$file = $this->get_path( $this->get_slug( $module ) );
if ( isset( $modules_details[ $module ] ) ) {
$mod = $modules_details[ $module ];
} else {
$mod = jetpack_get_module_info( $module );
if ( null === $mod ) {
// Try to get the module info from the file as a fallback.
$mod = $this->get_file_data( $file, jetpack_get_all_module_header_names() );
if ( empty( $mod['name'] ) ) {
// No info for this module.
return false;
}
}
$mod['sort'] = empty( $mod['sort'] ) ? 10 : (int) $mod['sort'];
$mod['recommendation_order'] = empty( $mod['recommendation_order'] ) ? 20 : (int) $mod['recommendation_order'];
$mod['deactivate'] = empty( $mod['deactivate'] );
$mod['free'] = empty( $mod['free'] );
$mod['requires_connection'] = ( ! empty( $mod['requires_connection'] ) && 'No' === $mod['requires_connection'] ) ? false : true;
$mod['requires_user_connection'] = ( empty( $mod['requires_user_connection'] ) || 'No' === $mod['requires_user_connection'] ) ? false : true;
if ( empty( $mod['auto_activate'] ) || ! in_array( strtolower( $mod['auto_activate'] ), array( 'yes', 'no', 'public' ), true ) ) {
$mod['auto_activate'] = 'No';
} else {
$mod['auto_activate'] = (string) $mod['auto_activate'];
}
if ( $mod['module_tags'] ) {
$mod['module_tags'] = explode( ',', $mod['module_tags'] );
$mod['module_tags'] = array_map( 'trim', $mod['module_tags'] );
} else {
$mod['module_tags'] = array( 'Other' );
}
if ( $mod['plan_classes'] ) {
$mod['plan_classes'] = explode( ',', $mod['plan_classes'] );
$mod['plan_classes'] = array_map( 'strtolower', array_map( 'trim', $mod['plan_classes'] ) );
} else {
$mod['plan_classes'] = array( 'free' );
}
if ( $mod['feature'] ) {
$mod['feature'] = explode( ',', $mod['feature'] );
$mod['feature'] = array_map( 'trim', $mod['feature'] );
} else {
$mod['feature'] = array( 'Other' );
}
$modules_details[ $module ] = $mod;
}
/**
* Filters the feature array on a module.
*
* This filter allows you to control where each module is filtered: Recommended,
* and the default "Other" listing.
*
* @since-jetpack 3.5.0
*
* @param array $mod['feature'] The areas to feature this module:
* 'Recommended' shows on the main Jetpack admin screen.
* 'Other' should be the default if no other value is in the array.
* @param string $module The slug of the module, e.g. sharedaddy.
* @param array $mod All the currently assembled module data.
*/
$mod['feature'] = apply_filters( 'jetpack_module_feature', $mod['feature'], $module, $mod );
/**
* Filter the returned data about a module.
*
* This filter allows overriding any info about Jetpack modules. It is dangerous,
* so please be careful.
*
* @since-jetpack 3.6.0
*
* @param array $mod The details of the requested module.
* @param string $module The slug of the module, e.g. sharedaddy
* @param string $file The path to the module source file.
*/
return apply_filters( 'jetpack_get_module', $mod, $module, $file );
}
/**
* Like core's get_file_data implementation, but caches the result.
*
* @param string $file Absolute path to the file.
* @param array $headers List of headers, in the format array( 'HeaderKey' => 'Header Name' ).
*/
public function get_file_data( $file, $headers ) {
// Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated.
$file_name = basename( $file );
if ( ! Constants::is_defined( 'JETPACK__VERSION' ) ) {
return get_file_data( $file, $headers );
}
$cache_key = 'jetpack_file_data_' . JETPACK__VERSION;
$file_data_option = get_transient( $cache_key );
if ( ! is_array( $file_data_option ) ) {
delete_transient( $cache_key );
$file_data_option = false;
}
if ( false === $file_data_option ) {
$file_data_option = array();
}
$key = md5( $file_name . maybe_serialize( $headers ) );
$refresh_cache = is_admin() && isset( $_GET['page'] ) && 'jetpack' === substr( $_GET['page'], 0, 7 ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput
// If we don't need to refresh the cache, and already have the value, short-circuit!
if ( ! $refresh_cache && isset( $file_data_option[ $key ] ) ) {
return $file_data_option[ $key ];
}
$data = get_file_data( $file, $headers );
$file_data_option[ $key ] = $data;
set_transient( $cache_key, $file_data_option, 29 * DAY_IN_SECONDS );
return $data;
}
/**
* Get a list of activated modules as an array of module slugs.
*/
public function get_active() {
$active = \Jetpack_Options::get_option( 'active_modules' );
if ( ! is_array( $active ) ) {
$active = array();
}
if ( class_exists( 'VaultPress' ) || function_exists( 'vaultpress_contact_service' ) ) {
$active[] = 'vaultpress';
} else {
$active = array_diff( $active, array( 'vaultpress' ) );
}
// If protect is active on the main site of a multisite, it should be active on all sites. Doesn't apply to WP.com.
if ( ! in_array( 'protect', $active, true )
&& ! ( new Host() )->is_wpcom_simple()
&& is_multisite()
&& get_site_option( 'jetpack_protect_active' ) ) {
$active[] = 'protect';
}
// If it's not available, it shouldn't be active.
// We don't delete it from the options though, as it will be active again when a plugin gets reactivated.
$active = array_intersect( $active, $this->get_available() );
/**
* Allow filtering of the active modules.
*
* Gives theme and plugin developers the power to alter the modules that
* are activated on the fly.
*
* @since-jetpack 5.8.0
*
* @param array $active Array of active module slugs.
*/
$active = apply_filters( 'jetpack_active_modules', $active );
return array_unique( $active );
}
/**
* Extract a module's slug from its full path.
*
* @param string $file Full path to a file.
*
* @return string Module slug.
*/
public function get_slug( $file ) {
return str_replace( '.php', '', basename( $file ) );
}
/**
* List available Jetpack modules. Simply lists .php files in /modules/.
* Make sure to tuck away module "library" files in a sub-directory.
*
* @param bool|string $min_version Only return modules introduced in this version or later. Default is false, do not filter.
* @param bool|string $max_version Only return modules introduced before this version. Default is false, do not filter.
* @param bool|null $requires_connection Pass a boolean value to only return modules that require (or do not require) a connection.
* @param bool|null $requires_user_connection Pass a boolean value to only return modules that require (or do not require) a user connection.
*
* @return array $modules Array of module slugs
*/
public function get_available( $min_version = false, $max_version = false, $requires_connection = null, $requires_user_connection = null ) {
static $modules = null;
if ( ! class_exists( 'Jetpack' ) || ! Constants::is_defined( 'JETPACK__VERSION' ) || ! Constants::is_defined( 'JETPACK__PLUGIN_DIR' ) ) {
return array_unique(
/**
* Stand alone plugins need to use this filter to register the modules they interact with.
* This will allow them to activate and deactivate these modules even when Jetpack is not present.
* Note: Standalone plugins can only interact with modules that also exist in the Jetpack plugin, otherwise they'll lose the ability to control it if Jetpack is activated.
*
* @since 1.13.6
*
* @param array $modules The list of available modules as an array of slugs.
* @param bool $requires_connection Whether to list only modules that require a connection to work.
* @param bool $requires_user_connection Whether to list only modules that require a user connection to work.
*/
apply_filters( 'jetpack_get_available_standalone_modules', array(), $requires_connection, $requires_user_connection )
);
}
if ( ! isset( $modules ) ) {
$available_modules_option = \Jetpack_Options::get_option( 'available_modules', array() );
// Use the cache if we're on the front-end and it's available...
if ( ! is_admin() && ! empty( $available_modules_option[ JETPACK__VERSION ] ) ) {
$modules = $available_modules_option[ JETPACK__VERSION ];
} else {
$files = ( new Files() )->glob_php( JETPACK__PLUGIN_DIR . 'modules' );
$modules = array();
foreach ( $files as $file ) {
$slug = $this->get_slug( $file );
$headers = $this->get( $slug );
if ( ! $headers ) {
continue;
}
$modules[ $slug ] = $headers['introduced'];
}
\Jetpack_Options::update_option(
'available_modules',
array(
JETPACK__VERSION => $modules,
)
);
}
}
/**
* Filters the array of modules available to be activated.
*
* @since 2.4.0
*
* @param array $modules Array of available modules.
* @param string $min_version Minimum version number required to use modules.
* @param string $max_version Maximum version number required to use modules.
* @param bool|null $requires_connection Value of the Requires Connection filter.
* @param bool|null $requires_user_connection Value of the Requires User Connection filter.
*/
$mods = apply_filters( 'jetpack_get_available_modules', $modules, $min_version, $max_version, $requires_connection, $requires_user_connection );
if ( ! $min_version && ! $max_version && $requires_connection === null && $requires_user_connection === null ) {
return array_keys( $mods );
}
$r = array();
foreach ( $mods as $slug => $introduced ) {
if ( $min_version && version_compare( $min_version, $introduced, '>=' ) ) {
continue;
}
if ( $max_version && version_compare( $max_version, $introduced, '<' ) ) {
continue;
}
$mod_details = $this->get( $slug );
if ( null !== $requires_connection && (bool) $requires_connection !== $mod_details['requires_connection'] ) {
continue;
}
if ( null !== $requires_user_connection && (bool) $requires_user_connection !== $mod_details['requires_user_connection'] ) {
continue;
}
$r[] = $slug;
}
return $r;
}
/**
* Is slug a valid module.
*
* @param string $module Module slug.
*
* @return bool
*/
public function is_module( $module ) {
return ! empty( $module ) && ! validate_file( $module, $this->get_available() );
}
/**
* Update module status.
*
* @param string $module - module slug.
* @param boolean $active - true to activate, false to deactivate.
* @param bool $exit Should exit be called after deactivation.
* @param bool $redirect Should there be a redirection after activation.
*/
public function update_status( $module, $active, $exit = true, $redirect = true ) {
return $active ? $this->activate( $module, $exit, $redirect ) : $this->deactivate( $module );
}
/**
* Activate a module.
*
* @param string $module Module slug.
* @param bool $exit Should exit be called after deactivation.
* @param bool $redirect Should there be a redirection after activation.
*
* @return bool|void
*/
public function activate( $module, $exit = true, $redirect = true ) {
/**
* Fires before a module is activated.
*
* @since 2.6.0
*
* @param string $module Module slug.
* @param bool $exit Should we exit after the module has been activated. Default to true.
* @param bool $redirect Should the user be redirected after module activation? Default to true.
*/
do_action( 'jetpack_pre_activate_module', $module, $exit, $redirect );
if ( ! strlen( $module ) ) {
return false;
}
// If it's already active, then don't do it again.
$active = $this->get_active();
foreach ( $active as $act ) {
if ( $act === $module ) {
return true;
}
}
if ( ! $this->is_module( $module ) ) {
return false;
}
// Jetpack plugin only
if ( class_exists( 'Jetpack' ) ) {
$module_data = $this->get( $module );
$status = new Status();
$state = new CookieState();
if ( ! \Jetpack::is_connection_ready() ) {
if ( ! $status->is_offline_mode() && ! $status->is_onboarding() ) {
return false;
}
// If we're not connected but in offline mode, make sure the module doesn't require a connection.
if ( $status->is_offline_mode() && $module_data['requires_connection'] ) {
return false;
}
}
if ( class_exists( 'Jetpack_Client_Server' ) ) {
$jetpack = \Jetpack::init();
// Check and see if the old plugin is active.
if ( isset( $jetpack->plugins_to_deactivate[ $module ] ) ) {
// Deactivate the old plugins.
$deactivated = array();
foreach ( $jetpack->plugins_to_deactivate[ $module ] as $idx => $deactivate_me ) {
if ( \Jetpack_Client_Server::deactivate_plugin( $deactivate_me[0], $deactivate_me[1] ) ) {
// If we deactivated the old plugin, remembere that with ::state() and redirect back to this page to activate the module
// We can't activate the module on this page load since the newly deactivated old plugin is still loaded on this page load.
$deactivated[] = "$module:$idx";
}
}
if ( $deactivated ) {
$state->state( 'deactivated_plugins', implode( ',', $deactivated ) );
wp_safe_redirect( add_query_arg( 'jetpack_restate', 1 ) );
exit;
}
}
}
// Protect won't work with mis-configured IPs.
if ( 'protect' === $module ) {
if ( ! IP_Utils::get_ip() ) {
$state->state( 'message', 'protect_misconfigured_ip' );
return false;
}
}
if ( ! Jetpack_Plan::supports( $module ) ) {
return false;
}
// Check the file for fatal errors, a la wp-admin/plugins.php::activate.
$errors = new Errors();
$state->state( 'module', $module );
$state->state( 'error', 'module_activation_failed' ); // we'll override this later if the plugin can be included without fatal error.
$errors->catch_errors( true );
ob_start();
$module_path = $this->get_path( $module );
if ( file_exists( $module_path ) ) {
require $this->get_path( $module ); // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.NotAbsolutePath
}
$active[] = $module;
$this->update_active( $active );
$state->state( 'error', false ); // the override.
ob_end_clean();
$errors->catch_errors( false );
} else { // Not a Jetpack plugin.
$active[] = $module;
$this->update_active( $active );
}
if ( $redirect ) {
wp_safe_redirect( ( new Paths() )->admin_url( 'page=jetpack' ) );
}
if ( $exit ) {
exit;
}
return true;
}
/**
* Deactivate module.
*
* @param string $module Module slug.
*
* @return bool
*/
public function deactivate( $module ) {
/**
* Fires when a module is deactivated.
*
* @since 1.9.0
*
* @param string $module Module slug.
*/
do_action( 'jetpack_pre_deactivate_module', $module );
$active = $this->get_active();
$new = array_filter( array_diff( $active, (array) $module ) );
return $this->update_active( $new );
}
/**
* Generate a module's path from its slug.
*
* @param string $slug Module slug.
*/
public function get_path( $slug ) {
if ( ! Constants::is_defined( 'JETPACK__PLUGIN_DIR' ) ) {
return '';
}
/**
* Filters the path of a modules.
*
* @since 7.4.0
*
* @param array $return The absolute path to a module's root php file
* @param string $slug The module slug
*/
return apply_filters( 'jetpack_get_module_path', JETPACK__PLUGIN_DIR . "modules/$slug.php", $slug );
}
/**
* Saves all the currently active modules to options.
* Also fires Action hooks for each newly activated and deactivated module.
*
* @param array $modules Array of active modules to be saved in options.
*
* @return $success bool true for success, false for failure.
*/
public function update_active( $modules ) {
$current_modules = \Jetpack_Options::get_option( 'active_modules', array() );
$active_modules = $this->get_active();
$new_active_modules = array_diff( $modules, $current_modules );
$new_inactive_modules = array_diff( $active_modules, $modules );
$new_current_modules = array_diff( array_merge( $current_modules, $new_active_modules ), $new_inactive_modules );
$reindexed_modules = array_values( $new_current_modules );
$success = \Jetpack_Options::update_option( 'active_modules', array_unique( $reindexed_modules ) );
// Let's take `pre_update_option_jetpack_active_modules` filter into account
// and actually decide for which modules we need to fire hooks by comparing
// the 'active_modules' option before and after the update.
$current_modules_post_update = \Jetpack_Options::get_option( 'active_modules', array() );
$new_inactive_modules = array_diff( $current_modules, $current_modules_post_update );
$new_inactive_modules = array_unique( $new_inactive_modules );
$new_inactive_modules = array_values( $new_inactive_modules );
$new_active_modules = array_diff( $current_modules_post_update, $current_modules );
$new_active_modules = array_unique( $new_active_modules );
$new_active_modules = array_values( $new_active_modules );
foreach ( $new_active_modules as $module ) {
/**
* Fires when a specific module is activated.
*
* @since 1.9.0
*
* @param string $module Module slug.
* @param boolean $success whether the module was activated. @since 4.2
*/
do_action( 'jetpack_activate_module', $module, $success );
/**
* Fires when a module is activated.
* The dynamic part of the filter, $module, is the module slug.
*
* @since 1.9.0
*
* @param string $module Module slug.
*/
do_action( "jetpack_activate_module_$module", $module );
}
foreach ( $new_inactive_modules as $module ) {
/**
* Fired after a module has been deactivated.
*
* @since 4.2.0
*
* @param string $module Module slug.
* @param boolean $success whether the module was deactivated.
*/
do_action( 'jetpack_deactivate_module', $module, $success );
/**
* Fires when a module is deactivated.
* The dynamic part of the filter, $module, is the module slug.
*
* @since 1.9.0
*
* @param string $module Module slug.
*/
do_action( "jetpack_deactivate_module_$module", $module );
}
return $success;
}
}
automattic/jetpack-status/src/class-paths.php 0000644 00000001040 15153552357 0015410 0 ustar 00 <?php
/**
* A Path & URL utility class for Jetpack.
*
* @package automattic/jetpack-status
*/
namespace Automattic\Jetpack;
/**
* Class Automattic\Jetpack\Paths
*
* Used to retrieve information about files.
*/
class Paths {
/**
* Jetpack Admin URL.
*
* @param array $args Query string args.
*
* @return string Jetpack admin URL.
*/
public function admin_url( $args = null ) {
$args = wp_parse_args( $args, array( 'page' => 'jetpack' ) );
$url = add_query_arg( $args, admin_url( 'admin.php' ) );
return $url;
}
}
automattic/jetpack-status/src/class-status.php 0000644 00000030014 15153552357 0015617 0 ustar 00 <?php
/**
* A status class for Jetpack.
*
* @package automattic/jetpack-status
*/
namespace Automattic\Jetpack;
use Automattic\Jetpack\Status\Cache;
use Automattic\Jetpack\Status\Host;
use WPCOM_Masterbar;
/**
* Class Automattic\Jetpack\Status
*
* Used to retrieve information about the current status of Jetpack and the site overall.
*/
class Status {
/**
* Is Jetpack in development (offline) mode?
*
* @deprecated 1.3.0 Use Status->is_offline_mode().
*
* @return bool Whether Jetpack's offline mode is active.
*/
public function is_development_mode() {
_deprecated_function( __FUNCTION__, '1.3.0', 'Automattic\Jetpack\Status->is_offline_mode' );
return $this->is_offline_mode();
}
/**
* Is Jetpack in offline mode?
*
* This was formerly called "Development Mode", but sites "in development" aren't always offline/localhost.
*
* @since 1.3.0
*
* @return bool Whether Jetpack's offline mode is active.
*/
public function is_offline_mode() {
$cached = Cache::get( 'is_offline_mode' );
if ( null !== $cached ) {
return $cached;
}
$offline_mode = false;
if ( defined( '\\JETPACK_DEV_DEBUG' ) ) {
$offline_mode = constant( '\\JETPACK_DEV_DEBUG' );
} elseif ( defined( '\\WP_LOCAL_DEV' ) ) {
$offline_mode = constant( '\\WP_LOCAL_DEV' );
} elseif ( $this->is_local_site() ) {
$offline_mode = true;
}
/**
* Filters Jetpack's offline mode.
*
* @see https://jetpack.com/support/development-mode/
* @todo Update documentation ^^.
*
* @since 1.1.1
* @since-jetpack 2.2.1
* @deprecated 1.3.0
*
* @param bool $offline_mode Is Jetpack's offline mode active.
*/
$offline_mode = (bool) apply_filters_deprecated( 'jetpack_development_mode', array( $offline_mode ), '1.3.0', 'jetpack_offline_mode' );
/**
* Filters Jetpack's offline mode.
*
* @see https://jetpack.com/support/development-mode/
* @todo Update documentation ^^.
*
* @since 1.3.0
*
* @param bool $offline_mode Is Jetpack's offline mode active.
*/
$offline_mode = (bool) apply_filters( 'jetpack_offline_mode', $offline_mode );
Cache::set( 'is_offline_mode', $offline_mode );
return $offline_mode;
}
/**
* Is Jetpack in "No User test mode"?
*
* This will make Jetpack act as if there were no connected users, but only a site connection (aka blog token)
*
* @since 1.6.0
* @deprecated 1.7.5 Since this version, Jetpack connection is considered active after registration, making no_user_testing_mode obsolete.
*
* @return bool Whether Jetpack's No User Testing Mode is active.
*/
public function is_no_user_testing_mode() {
_deprecated_function( __METHOD__, '1.7.5' );
return true;
}
/**
* Whether this is a system with a multiple networks.
* Implemented since there is no core is_multi_network function.
* Right now there is no way to tell which network is the dominant network on the system.
*
* @return boolean
*/
public function is_multi_network() {
global $wpdb;
$cached = Cache::get( 'is_multi_network' );
if ( null !== $cached ) {
return $cached;
}
// If we don't have a multi site setup no need to do any more.
if ( ! is_multisite() ) {
Cache::set( 'is_multi_network', false );
return false;
}
$num_sites = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->site}" );
if ( $num_sites > 1 ) {
Cache::set( 'is_multi_network', true );
return true;
}
Cache::set( 'is_multi_network', false );
return false;
}
/**
* Whether the current site is single user site.
*
* @return bool
*/
public function is_single_user_site() {
global $wpdb;
$ret = Cache::get( 'is_single_user_site' );
if ( null === $ret ) {
$some_users = get_transient( 'jetpack_is_single_user' );
if ( false === $some_users ) {
$some_users = $wpdb->get_var( "SELECT COUNT(*) FROM (SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '{$wpdb->prefix}capabilities' LIMIT 2) AS someusers" );
set_transient( 'jetpack_is_single_user', (int) $some_users, 12 * HOUR_IN_SECONDS );
}
$ret = 1 === (int) $some_users;
Cache::set( 'is_single_user_site', $ret );
}
return $ret;
}
/**
* If the site is a local site.
*
* @since 1.3.0
*
* @return bool
*/
public function is_local_site() {
$cached = Cache::get( 'is_local_site' );
if ( null !== $cached ) {
return $cached;
}
$site_url = site_url();
// Check for localhost and sites using an IP only first.
$is_local = $site_url && false === strpos( $site_url, '.' );
// Use Core's environment check, if available.
if ( 'local' === wp_get_environment_type() ) {
$is_local = true;
}
// Then check for usual usual domains used by local dev tools.
$known_local = array(
'#\.local$#i',
'#\.localhost$#i',
'#\.test$#i',
'#\.docksal$#i', // Docksal.
'#\.docksal\.site$#i', // Docksal.
'#\.dev\.cc$#i', // ServerPress.
'#\.lndo\.site$#i', // Lando.
'#^https?://127\.0\.0\.1$#',
);
if ( ! $is_local ) {
foreach ( $known_local as $url ) {
if ( preg_match( $url, $site_url ) ) {
$is_local = true;
break;
}
}
}
/**
* Filters is_local_site check.
*
* @since 1.3.0
*
* @param bool $is_local If the current site is a local site.
*/
$is_local = apply_filters( 'jetpack_is_local_site', $is_local );
Cache::set( 'is_local_site', $is_local );
return $is_local;
}
/**
* If is a staging site.
*
* @todo Add IDC detection to a package.
*
* @return bool
*/
public function is_staging_site() {
$cached = Cache::get( 'is_staging_site' );
if ( null !== $cached ) {
return $cached;
}
/*
* Core's wp_get_environment_type allows for a few specific options.
* We should default to bowing out gracefully for anything other than production or local.
*/
$is_staging = ! in_array( wp_get_environment_type(), array( 'production', 'local' ), true );
$known_staging = array(
'urls' => array(
'#\.staging\.wpengine\.com$#i', // WP Engine. This is their legacy staging URL structure. Their new platform does not have a common URL. https://github.com/Automattic/jetpack/issues/21504
'#\.staging\.kinsta\.com$#i', // Kinsta.com.
'#\.kinsta\.cloud$#i', // Kinsta.com.
'#\.stage\.site$#i', // DreamPress.
'#\.newspackstaging\.com$#i', // Newspack.
'#^(?!live-)([a-zA-Z0-9-]+)\.pantheonsite\.io$#i', // Pantheon.
'#\.flywheelsites\.com$#i', // Flywheel.
'#\.flywheelstaging\.com$#i', // Flywheel.
'#\.cloudwaysapps\.com$#i', // Cloudways.
'#\.azurewebsites\.net$#i', // Azure.
'#\.wpserveur\.net$#i', // WPServeur.
'#\-liquidwebsites\.com$#i', // Liquidweb.
),
'constants' => array(
'IS_WPE_SNAPSHOT', // WP Engine. This is used on their legacy staging environment. Their new platform does not have a constant. https://github.com/Automattic/jetpack/issues/21504
'KINSTA_DEV_ENV', // Kinsta.com.
'WPSTAGECOACH_STAGING', // WP Stagecoach.
'JETPACK_STAGING_MODE', // Generic.
'WP_LOCAL_DEV', // Generic.
),
);
/**
* Filters the flags of known staging sites.
*
* @since 1.1.1
* @since-jetpack 3.9.0
*
* @param array $known_staging {
* An array of arrays that each are used to check if the current site is staging.
* @type array $urls URLs of staging sites in regex to check against site_url.
* @type array $constants PHP constants of known staging/developement environments.
* }
*/
$known_staging = apply_filters( 'jetpack_known_staging', $known_staging );
if ( isset( $known_staging['urls'] ) ) {
$site_url = site_url();
foreach ( $known_staging['urls'] as $url ) {
if ( preg_match( $url, wp_parse_url( $site_url, PHP_URL_HOST ) ) ) {
$is_staging = true;
break;
}
}
}
if ( isset( $known_staging['constants'] ) ) {
foreach ( $known_staging['constants'] as $constant ) {
if ( defined( $constant ) && constant( $constant ) ) {
$is_staging = true;
}
}
}
// Last, let's check if sync is erroring due to an IDC. If so, set the site to staging mode.
if ( ! $is_staging && method_exists( 'Automattic\\Jetpack\\Identity_Crisis', 'validate_sync_error_idc_option' ) && \Automattic\Jetpack\Identity_Crisis::validate_sync_error_idc_option() ) {
$is_staging = true;
}
/**
* Filters is_staging_site check.
*
* @since 1.1.1
* @since-jetpack 3.9.0
*
* @param bool $is_staging If the current site is a staging site.
*/
$is_staging = apply_filters( 'jetpack_is_staging_site', $is_staging );
Cache::set( 'is_staging_site', $is_staging );
return $is_staging;
}
/**
* Whether the site is currently onboarding or not.
* A site is considered as being onboarded if it currently has an onboarding token.
*
* @since-jetpack 5.8
*
* @access public
* @static
*
* @return bool True if the site is currently onboarding, false otherwise
*/
public function is_onboarding() {
return \Jetpack_Options::get_option( 'onboarding' ) !== false;
}
/**
* Whether the site is currently private or not.
* On WordPress.com and WoA, sites can be marked as private
*
* @since 1.16.0
*
* @return bool True if the site is private.
*/
public function is_private_site() {
$ret = Cache::get( 'is_private_site' );
if ( null === $ret ) {
$is_private_site = '-1' === get_option( 'blog_public' );
/**
* Filters the is_private_site check.
*
* @since 1.16.1
*
* @param bool $is_private_site True if the site is private.
*/
$is_private_site = apply_filters( 'jetpack_is_private_site', $is_private_site );
Cache::set( 'is_private_site', $is_private_site );
return $is_private_site;
}
return $ret;
}
/**
* Whether the site is currently unlaunched or not.
* On WordPress.com and WoA, sites can be marked as "coming soon", aka unlaunched
*
* @since 1.16.0
*
* @return bool True if the site is not launched.
*/
public function is_coming_soon() {
$ret = Cache::get( 'is_coming_soon' );
if ( null === $ret ) {
$is_coming_soon = (bool) ( function_exists( 'site_is_coming_soon' ) && \site_is_coming_soon() )
|| get_option( 'wpcom_public_coming_soon' );
/**
* Filters the is_coming_soon check.
*
* @since 1.16.1
*
* @param bool $is_coming_soon True if the site is coming soon (i.e. unlaunched).
*/
$is_coming_soon = apply_filters( 'jetpack_is_coming_soon', $is_coming_soon );
Cache::set( 'is_coming_soon', $is_coming_soon );
return $is_coming_soon;
}
return $ret;
}
/**
* Returns the site slug suffix to be used as part of Calypso URLs.
*
* Strips http:// or https:// from a url, replaces forward slash with ::.
*
* @since 1.6.0
*
* @param string $url Optional. URL to build the site suffix from. Default: Home URL.
*
* @return string
*/
public function get_site_suffix( $url = '' ) {
// On WordPress.com, site suffixes are a bit different.
if ( method_exists( 'WPCOM_Masterbar', 'get_calypso_site_slug' ) ) {
return WPCOM_Masterbar::get_calypso_site_slug( get_current_blog_id() );
}
// Grab the 'site_url' option for WoA sites to avoid plugins to interfere with the site
// identifier (e.g. i18n plugins may change the main url to '<DOMAIN>/<LOCALE>', but we
// want to exclude the locale since it's not part of the site suffix).
if ( ( new Host() )->is_woa_site() ) {
$url = \site_url();
}
if ( empty( $url ) ) {
// WordPress can be installed in subdirectories (e.g. make.wordpress.org/plugins)
// where the 'site_url' option points to the root domain (e.g. make.wordpress.org)
// which could collide with another site in the same domain but with WordPress
// installed in a different subdirectory (e.g. make.wordpress.org/core). To avoid
// such collision, we identify the site with the 'home_url' option.
$url = \home_url();
}
$url = preg_replace( '#^.*?://#', '', $url );
$url = str_replace( '/', '::', $url );
return rtrim( $url, ':' );
}
}
automattic/jetpack-status/src/class-visitor.php 0000644 00000002033 15153552357 0015773 0 ustar 00 <?php
/**
* Status and information regarding the site visitor.
*
* @package automattic/jetpack-status
*/
namespace Automattic\Jetpack\Status;
/**
* Visitor class.
*/
class Visitor {
/**
* Gets current user IP address.
*
* @param bool $check_all_headers Check all headers? Default is `false`.
*
* @return string Current user IP address.
*/
public function get_ip( $check_all_headers = false ) {
if ( $check_all_headers ) {
foreach ( array(
'HTTP_CF_CONNECTING_IP',
'HTTP_CLIENT_IP',
'HTTP_X_FORWARDED_FOR',
'HTTP_X_FORWARDED',
'HTTP_X_CLUSTER_CLIENT_IP',
'HTTP_FORWARDED_FOR',
'HTTP_FORWARDED',
'HTTP_VIA',
) as $key ) {
if ( ! empty( $_SERVER[ $key ] ) ) {
// @todo Some of these might actually be lists of IPs (e.g. HTTP_X_FORWARDED_FOR) or something else entirely (HTTP_VIA).
return filter_var( wp_unslash( $_SERVER[ $key ] ) );
}
}
}
return ! empty( $_SERVER['REMOTE_ADDR'] ) ? filter_var( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : '';
}
}
bin/export-plural-rules 0000644 00000006635 15153552357 0011232 0 ustar 00 #!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../../bin/composer/wp/vendor/gettext/languages/bin/export-plural-rules)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/../..'.'/bin/composer/wp/vendor/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_seek($offset, $whence)
{
if (0 === fseek($this->handle, $offset, $whence)) {
$this->position = ftell($this->handle);
return true;
}
return false;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
return include("phpvfscomposer://" . __DIR__ . '/../..'.'/bin/composer/wp/vendor/gettext/languages/bin/export-plural-rules');
}
}
return include __DIR__ . '/../..'.'/bin/composer/wp/vendor/gettext/languages/bin/export-plural-rules';
bin/mozart 0000644 00000006606 15153552357 0006576 0 ustar 00 #!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../../bin/composer/mozart/vendor/coenjacobs/mozart/bin/mozart)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/../..'.'/bin/composer/mozart/vendor/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_seek($offset, $whence)
{
if (0 === fseek($this->handle, $offset, $whence)) {
$this->position = ftell($this->handle);
return true;
}
return false;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
return include("phpvfscomposer://" . __DIR__ . '/../..'.'/bin/composer/mozart/vendor/coenjacobs/mozart/bin/mozart');
}
}
return include __DIR__ . '/../..'.'/bin/composer/mozart/vendor/coenjacobs/mozart/bin/mozart';
bin/phpcbf 0000644 00000006632 15153552357 0006523 0 ustar 00 #!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../../bin/composer/phpcs/vendor/squizlabs/php_codesniffer/bin/phpcbf)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/../..'.'/bin/composer/phpcs/vendor/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_seek($offset, $whence)
{
if (0 === fseek($this->handle, $offset, $whence)) {
$this->position = ftell($this->handle);
return true;
}
return false;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
return include("phpvfscomposer://" . __DIR__ . '/../..'.'/bin/composer/phpcs/vendor/squizlabs/php_codesniffer/bin/phpcbf');
}
}
return include __DIR__ . '/../..'.'/bin/composer/phpcs/vendor/squizlabs/php_codesniffer/bin/phpcbf';
bin/phpcs 0000644 00000006627 15153552357 0006402 0 ustar 00 #!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../../bin/composer/phpcs/vendor/squizlabs/php_codesniffer/bin/phpcs)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/../..'.'/bin/composer/phpcs/vendor/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_seek($offset, $whence)
{
if (0 === fseek($this->handle, $offset, $whence)) {
$this->position = ftell($this->handle);
return true;
}
return false;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
return include("phpvfscomposer://" . __DIR__ . '/../..'.'/bin/composer/phpcs/vendor/squizlabs/php_codesniffer/bin/phpcs');
}
}
return include __DIR__ . '/../..'.'/bin/composer/phpcs/vendor/squizlabs/php_codesniffer/bin/phpcs';
bin/phpcs-changed 0000644 00000006654 15153552357 0007771 0 ustar 00 #!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../../bin/composer/phpcs/vendor/sirbrillig/phpcs-changed/bin/phpcs-changed)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/../..'.'/bin/composer/phpcs/vendor/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_seek($offset, $whence)
{
if (0 === fseek($this->handle, $offset, $whence)) {
$this->position = ftell($this->handle);
return true;
}
return false;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
return include("phpvfscomposer://" . __DIR__ . '/../..'.'/bin/composer/phpcs/vendor/sirbrillig/phpcs-changed/bin/phpcs-changed');
}
}
return include __DIR__ . '/../..'.'/bin/composer/phpcs/vendor/sirbrillig/phpcs-changed/bin/phpcs-changed';
bin/wp 0000644 00000001706 15153552357 0005704 0 ustar 00 #!/usr/bin/env sh
# Support bash to support `source` with fallback on $0 if this does not run with bash
# https://stackoverflow.com/a/35006505/6512
selfArg="$BASH_SOURCE"
if [ -z "$selfArg" ]; then
selfArg="$0"
fi
self=$(realpath $selfArg 2> /dev/null)
if [ -z "$self" ]; then
self="$selfArg"
fi
dir=$(cd "${self%[/\\]*}" > /dev/null; cd '../../bin/composer/wp/vendor/wp-cli/wp-cli/bin' && pwd)
if [ -d /proc/cygdrive ]; then
case $(which php) in
$(readlink -n /proc/cygdrive)/*)
# We are in Cygwin using Windows php, so the path must be translated
dir=$(cygpath -m "$dir");
;;
esac
fi
export COMPOSER_RUNTIME_BIN_DIR="$(cd "${self%[/\\]*}" > /dev/null; pwd)"
# If bash is sourcing this file, we have to source the target as well
bashSource="$BASH_SOURCE"
if [ -n "$bashSource" ]; then
if [ "$bashSource" != "$0" ]; then
source "${dir}/wp" "$@"
return
fi
fi
"${dir}/wp" "$@"
bin/wp.bat 0000644 00000001716 15153552357 0006452 0 ustar 00 #!/usr/bin/env sh
# Support bash to support `source` with fallback on $0 if this does not run with bash
# https://stackoverflow.com/a/35006505/6512
selfArg="$BASH_SOURCE"
if [ -z "$selfArg" ]; then
selfArg="$0"
fi
self=$(realpath $selfArg 2> /dev/null)
if [ -z "$self" ]; then
self="$selfArg"
fi
dir=$(cd "${self%[/\\]*}" > /dev/null; cd '../../bin/composer/wp/vendor/wp-cli/wp-cli/bin' && pwd)
if [ -d /proc/cygdrive ]; then
case $(which php) in
$(readlink -n /proc/cygdrive)/*)
# We are in Cygwin using Windows php, so the path must be translated
dir=$(cygpath -m "$dir");
;;
esac
fi
export COMPOSER_RUNTIME_BIN_DIR="$(cd "${self%[/\\]*}" > /dev/null; pwd)"
# If bash is sourcing this file, we have to source the target as well
bashSource="$BASH_SOURCE"
if [ -n "$bashSource" ]; then
if [ "$bashSource" != "$0" ]; then
source "${dir}/wp.bat" "$@"
return
fi
fi
"${dir}/wp.bat" "$@"
composer/autoload_files.php 0000644 00000000707 15153552360 0012107 0 ustar 00 <?php
// autoload_files.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'fcd5d7d87e03ff4f5b5a66c2b8968671' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/deprecated.php',
'd0f16a186498c2ba04f1d0064fecf9cf' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/functions.php',
);
composer/installers/phpstan.neon.dist 0000644 00000000325 15153552360 0014060 0 ustar 00 parameters:
level: 5
paths:
- src
- tests
excludes_analyse:
- tests/Composer/Installers/Test/PolyfillTestCase.php
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
composer/installers/src/Composer/Installers/AimeosInstaller.php 0000644 00000000250 15153552360 0021057 0 ustar 00 <?php
namespace Composer\Installers;
class AimeosInstaller extends BaseInstaller
{
protected $locations = array(
'extension' => 'ext/{$name}/',
);
}
composer/installers/src/Composer/Installers/CraftInstaller.php 0000644 00000001446 15153552360 0020711 0 ustar 00 <?php
namespace Composer\Installers;
/**
* Installer for Craft Plugins
*/
class CraftInstaller extends BaseInstaller
{
const NAME_PREFIX = 'craft';
const NAME_SUFFIX = 'plugin';
protected $locations = array(
'plugin' => 'craft/plugins/{$name}/',
);
/**
* Strip `craft-` prefix and/or `-plugin` suffix from package names
*
* @param array $vars
*
* @return array
*/
final public function inflectPackageVars($vars)
{
return $this->inflectPluginVars($vars);
}
private function inflectPluginVars($vars)
{
$vars['name'] = preg_replace('/-' . self::NAME_SUFFIX . '$/i', '', $vars['name']);
$vars['name'] = preg_replace('/^' . self::NAME_PREFIX . '-/i', '', $vars['name']);
return $vars;
}
}
composer/installers/src/Composer/Installers/JoomlaInstaller.php 0000644 00000000640 15153552361 0021067 0 ustar 00 <?php
namespace Composer\Installers;
class JoomlaInstaller extends BaseInstaller
{
protected $locations = array(
'component' => 'components/{$name}/',
'module' => 'modules/{$name}/',
'template' => 'templates/{$name}/',
'plugin' => 'plugins/{$name}/',
'library' => 'libraries/{$name}/',
);
// TODO: Add inflector for mod_ and com_ names
}
composer/installers/src/Composer/Installers/KirbyInstaller.php 0000644 00000000405 15153552361 0020725 0 ustar 00 <?php
namespace Composer\Installers;
class KirbyInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'site/plugins/{$name}/',
'field' => 'site/fields/{$name}/',
'tag' => 'site/tags/{$name}/'
);
}
composer/installers/src/Composer/Installers/PimcoreInstaller.php 0000644 00000001040 15153552361 0021237 0 ustar 00 <?php
namespace Composer\Installers;
class PimcoreInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars($vars)
{
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}
composer/installers/src/Composer/Installers/Symfony1Installer.php 0000644 00000001066 15153552362 0021377 0 ustar 00 <?php
namespace Composer\Installers;
/**
* Plugin installer for symfony 1.x
*
* @author Jérôme Tamarelle <jerome@tamarelle.net>
*/
class Symfony1Installer extends BaseInstaller
{
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars($vars)
{
$vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
return strtoupper($matches[0][1]);
}, $vars['name']);
return $vars;
}
}
composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php 0000644 00000000575 15153552362 0021177 0 ustar 00 <?php
namespace Composer\Installers;
/**
* Extension installer for TYPO3 CMS
*
* @deprecated since 1.0.25, use https://packagist.org/packages/typo3/cms-composer-installers instead
*
* @author Sascha Egerer <sascha.egerer@dkd.de>
*/
class TYPO3CmsInstaller extends BaseInstaller
{
protected $locations = array(
'extension' => 'typo3conf/ext/{$name}/',
);
}
composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php 0000644 00000002300 15153552362 0021350 0 ustar 00 <?php
namespace Composer\Installers;
/**
* An installer to handle TYPO3 Flow specifics when installing packages.
*/
class TYPO3FlowInstaller extends BaseInstaller
{
protected $locations = array(
'package' => 'Packages/Application/{$name}/',
'framework' => 'Packages/Framework/{$name}/',
'plugin' => 'Packages/Plugins/{$name}/',
'site' => 'Packages/Sites/{$name}/',
'boilerplate' => 'Packages/Boilerplates/{$name}/',
'build' => 'Build/{$name}/',
);
/**
* Modify the package name to be a TYPO3 Flow style key.
*
* @param array $vars
* @return array
*/
public function inflectPackageVars($vars)
{
$autoload = $this->package->getAutoload();
if (isset($autoload['psr-0']) && is_array($autoload['psr-0'])) {
$namespace = key($autoload['psr-0']);
$vars['name'] = str_replace('\\', '.', $namespace);
}
if (isset($autoload['psr-4']) && is_array($autoload['psr-4'])) {
$namespace = key($autoload['psr-4']);
$vars['name'] = rtrim(str_replace('\\', '.', $namespace), '.');
}
return $vars;
}
}
composer/jetpack_autoload_classmap.php 0000644 00000725603 15153552362 0014324 0 ustar 00 <?php
// This file `jetpack_autoload_classmap.php` was auto generated by automattic/jetpack-autoloader.
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'Attribute' => array(
'version' => '1.28.0.0',
'path' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php'
),
'Autoloader' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader.php'
),
'Autoloader_Handler' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader-handler.php'
),
'Autoloader_Locator' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader-locator.php'
),
'Automattic\\Jetpack\\A8c_Mc_Stats' => array(
'version' => '1.4.22.0',
'path' => $vendorDir . '/automattic/jetpack-a8c-mc-stats/src/class-a8c-mc-stats.php'
),
'Automattic\\Jetpack\\Admin_UI\\Admin_Menu' => array(
'version' => '0.2.23.0',
'path' => $vendorDir . '/automattic/jetpack-admin-ui/src/class-admin-menu.php'
),
'Automattic\\Jetpack\\Autoloader\\AutoloadFileWriter' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadFileWriter.php'
),
'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php'
),
'Automattic\\Jetpack\\Autoloader\\AutoloadProcessor' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadProcessor.php'
),
'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php'
),
'Automattic\\Jetpack\\Autoloader\\ManifestGenerator' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/ManifestGenerator.php'
),
'Automattic\\Jetpack\\Config' => array(
'version' => '1.15.2.0',
'path' => $vendorDir . '/automattic/jetpack-config/src/class-config.php'
),
'Automattic\\Jetpack\\Connection\\Client' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-client.php'
),
'Automattic\\Jetpack\\Connection\\Connection_Notice' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-connection-notice.php'
),
'Automattic\\Jetpack\\Connection\\Error_Handler' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-error-handler.php'
),
'Automattic\\Jetpack\\Connection\\Initial_State' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-initial-state.php'
),
'Automattic\\Jetpack\\Connection\\Manager' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-manager.php'
),
'Automattic\\Jetpack\\Connection\\Manager_Interface' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/interface-manager.php'
),
'Automattic\\Jetpack\\Connection\\Nonce_Handler' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-nonce-handler.php'
),
'Automattic\\Jetpack\\Connection\\Package_Version' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-package-version.php'
),
'Automattic\\Jetpack\\Connection\\Package_Version_Tracker' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-package-version-tracker.php'
),
'Automattic\\Jetpack\\Connection\\Plugin' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-plugin.php'
),
'Automattic\\Jetpack\\Connection\\Plugin_Storage' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-plugin-storage.php'
),
'Automattic\\Jetpack\\Connection\\REST_Connector' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-rest-connector.php'
),
'Automattic\\Jetpack\\Connection\\Rest_Authentication' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-rest-authentication.php'
),
'Automattic\\Jetpack\\Connection\\Secrets' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-secrets.php'
),
'Automattic\\Jetpack\\Connection\\Server_Sandbox' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-server-sandbox.php'
),
'Automattic\\Jetpack\\Connection\\Tokens' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-tokens.php'
),
'Automattic\\Jetpack\\Connection\\Urls' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-urls.php'
),
'Automattic\\Jetpack\\Connection\\Utils' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-utils.php'
),
'Automattic\\Jetpack\\Connection\\Webhooks' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-webhooks.php'
),
'Automattic\\Jetpack\\Connection\\Webhooks\\Authorize_Redirect' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/webhooks/class-authorize-redirect.php'
),
'Automattic\\Jetpack\\Connection\\XMLRPC_Async_Call' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-xmlrpc-async-call.php'
),
'Automattic\\Jetpack\\Connection\\XMLRPC_Connector' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-xmlrpc-connector.php'
),
'Automattic\\Jetpack\\Constants' => array(
'version' => '1.6.23.0',
'path' => $vendorDir . '/automattic/jetpack-constants/src/class-constants.php'
),
'Automattic\\Jetpack\\CookieState' => array(
'version' => '1.18.5.0',
'path' => $vendorDir . '/automattic/jetpack-status/src/class-cookiestate.php'
),
'Automattic\\Jetpack\\Errors' => array(
'version' => '1.18.5.0',
'path' => $vendorDir . '/automattic/jetpack-status/src/class-errors.php'
),
'Automattic\\Jetpack\\Files' => array(
'version' => '1.18.5.0',
'path' => $vendorDir . '/automattic/jetpack-status/src/class-files.php'
),
'Automattic\\Jetpack\\Heartbeat' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-heartbeat.php'
),
'Automattic\\Jetpack\\Modules' => array(
'version' => '1.18.5.0',
'path' => $vendorDir . '/automattic/jetpack-status/src/class-modules.php'
),
'Automattic\\Jetpack\\Paths' => array(
'version' => '1.18.5.0',
'path' => $vendorDir . '/automattic/jetpack-status/src/class-paths.php'
),
'Automattic\\Jetpack\\Redirect' => array(
'version' => '1.7.27.0',
'path' => $vendorDir . '/automattic/jetpack-redirect/src/class-redirect.php'
),
'Automattic\\Jetpack\\Roles' => array(
'version' => '1.4.25.0',
'path' => $vendorDir . '/automattic/jetpack-roles/src/class-roles.php'
),
'Automattic\\Jetpack\\Status' => array(
'version' => '1.18.5.0',
'path' => $vendorDir . '/automattic/jetpack-status/src/class-status.php'
),
'Automattic\\Jetpack\\Status\\Cache' => array(
'version' => '1.18.5.0',
'path' => $vendorDir . '/automattic/jetpack-status/src/class-cache.php'
),
'Automattic\\Jetpack\\Status\\Host' => array(
'version' => '1.18.5.0',
'path' => $vendorDir . '/automattic/jetpack-status/src/class-host.php'
),
'Automattic\\Jetpack\\Status\\Visitor' => array(
'version' => '1.18.5.0',
'path' => $vendorDir . '/automattic/jetpack-status/src/class-visitor.php'
),
'Automattic\\Jetpack\\Terms_Of_Service' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-terms-of-service.php'
),
'Automattic\\Jetpack\\Tracking' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/src/class-tracking.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Coupons' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Coupons.php'
),
'Automattic\\WooCommerce\\Admin\\API\\CustomAttributeTraits' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/CustomAttributeTraits.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Customers' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Customers.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Data' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Data.php'
),
'Automattic\\WooCommerce\\Admin\\API\\DataCountries' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/DataCountries.php'
),
'Automattic\\WooCommerce\\Admin\\API\\DataDownloadIPs' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/DataDownloadIPs.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Experiments' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Experiments.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Features' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Features.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Init' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Init.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Leaderboards' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Leaderboards.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Marketing' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Marketing.php'
),
'Automattic\\WooCommerce\\Admin\\API\\MarketingCampaignTypes' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/MarketingCampaignTypes.php'
),
'Automattic\\WooCommerce\\Admin\\API\\MarketingCampaigns' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/MarketingCampaigns.php'
),
'Automattic\\WooCommerce\\Admin\\API\\MarketingChannels' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/MarketingChannels.php'
),
'Automattic\\WooCommerce\\Admin\\API\\MarketingOverview' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/MarketingOverview.php'
),
'Automattic\\WooCommerce\\Admin\\API\\MarketingRecommendations' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/MarketingRecommendations.php'
),
'Automattic\\WooCommerce\\Admin\\API\\MobileAppMagicLink' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/MobileAppMagicLink.php'
),
'Automattic\\WooCommerce\\Admin\\API\\NavigationFavorites' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/NavigationFavorites.php'
),
'Automattic\\WooCommerce\\Admin\\API\\NoteActions' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/NoteActions.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Notes' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Notes.php'
),
'Automattic\\WooCommerce\\Admin\\API\\OnboardingFreeExtensions' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/OnboardingFreeExtensions.php'
),
'Automattic\\WooCommerce\\Admin\\API\\OnboardingPlugins' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/OnboardingPlugins.php'
),
'Automattic\\WooCommerce\\Admin\\API\\OnboardingProductTypes' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/OnboardingProductTypes.php'
),
'Automattic\\WooCommerce\\Admin\\API\\OnboardingProfile' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/OnboardingProfile.php'
),
'Automattic\\WooCommerce\\Admin\\API\\OnboardingTasks' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/OnboardingTasks.php'
),
'Automattic\\WooCommerce\\Admin\\API\\OnboardingThemes' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/OnboardingThemes.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Options' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Options.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Orders' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Orders.php'
),
'Automattic\\WooCommerce\\Admin\\API\\PaymentGatewaySuggestions' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/PaymentGatewaySuggestions.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Plugins' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Plugins.php'
),
'Automattic\\WooCommerce\\Admin\\API\\ProductAttributeTerms' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/ProductAttributeTerms.php'
),
'Automattic\\WooCommerce\\Admin\\API\\ProductAttributes' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/ProductAttributes.php'
),
'Automattic\\WooCommerce\\Admin\\API\\ProductCategories' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/ProductCategories.php'
),
'Automattic\\WooCommerce\\Admin\\API\\ProductForm' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/ProductForm.php'
),
'Automattic\\WooCommerce\\Admin\\API\\ProductReviews' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/ProductReviews.php'
),
'Automattic\\WooCommerce\\Admin\\API\\ProductVariations' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/ProductVariations.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Products' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Products.php'
),
'Automattic\\WooCommerce\\Admin\\API\\ProductsLowInStock' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/ProductsLowInStock.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Cache' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Cache.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Categories\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Categories/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Categories\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Categories/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Categories\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Categories/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Coupons\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Coupons/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Coupons\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Coupons/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Coupons\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Coupons/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Coupons\\Stats\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Coupons/Stats/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Coupons\\Stats\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Coupons/Stats/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Coupons\\Stats\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Coupons/Stats/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Coupons\\Stats\\Segmenter' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Coupons/Stats/Segmenter.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Customers\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Customers/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Customers\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Customers/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Customers\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Customers/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Customers\\Stats\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Customers/Stats/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Customers\\Stats\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Customers/Stats/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Customers\\Stats\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Customers/Stats/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\DataStoreInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/DataStoreInterface.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Downloads\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Downloads/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Downloads\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Downloads/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Downloads\\Files\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Downloads/Files/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Downloads\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Downloads/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Downloads\\Stats\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Downloads/Stats/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Downloads\\Stats\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Downloads/Stats/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Downloads\\Stats\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Downloads/Stats/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Export\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Export/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\ExportableInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/ExportableInterface.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\ExportableTraits' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/ExportableTraits.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\GenericController' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/GenericController.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\GenericStatsController' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/GenericStatsController.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Import\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Import/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Orders\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Orders/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Orders\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Orders/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Orders\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Orders/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Orders\\Stats\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Orders/Stats/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Orders\\Stats\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Orders/Stats/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Orders\\Stats\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Orders/Stats/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Orders\\Stats\\Segmenter' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Orders/Stats/Segmenter.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\ParameterException' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/ParameterException.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\PerformanceIndicators\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/PerformanceIndicators/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Products\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Products/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Products\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Products/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Products\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Products/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Products\\Stats\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Products/Stats/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Products\\Stats\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Products/Stats/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Products\\Stats\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Products/Stats/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Products\\Stats\\Segmenter' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Products/Stats/Segmenter.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Revenue\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Revenue/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Revenue\\Stats\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Revenue/Stats/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Segmenter' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Segmenter.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\SqlQuery' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/SqlQuery.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Stock\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Stock/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Stock\\Stats\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Stock/Stats/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Stock\\Stats\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Stock/Stats/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Stock\\Stats\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Stock/Stats/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Taxes\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Taxes/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Taxes\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Taxes/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Taxes\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Taxes/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Taxes\\Stats\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Taxes/Stats/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Taxes\\Stats\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Taxes/Stats/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Taxes\\Stats\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Taxes/Stats/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Taxes\\Stats\\Segmenter' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Taxes/Stats/Segmenter.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\TimeInterval' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/TimeInterval.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Variations\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Variations/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Variations\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Variations/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Variations\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Variations/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Variations\\Stats\\Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Variations/Stats/Controller.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Variations\\Stats\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Variations/Stats/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Variations\\Stats\\Query' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Variations/Stats/Query.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Reports\\Variations\\Stats\\Segmenter' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Reports/Variations/Stats/Segmenter.php'
),
'Automattic\\WooCommerce\\Admin\\API\\SettingOptions' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/SettingOptions.php'
),
'Automattic\\WooCommerce\\Admin\\API\\ShippingPartnerSuggestions' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/ShippingPartnerSuggestions.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Taxes' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Taxes.php'
),
'Automattic\\WooCommerce\\Admin\\API\\Themes' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/API/Themes.php'
),
'Automattic\\WooCommerce\\Admin\\BlockTemplates\\BlockContainerInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/BlockTemplates/BlockContainerInterface.php'
),
'Automattic\\WooCommerce\\Admin\\BlockTemplates\\BlockInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/BlockTemplates/BlockInterface.php'
),
'Automattic\\WooCommerce\\Admin\\BlockTemplates\\BlockTemplateInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/BlockTemplates/BlockTemplateInterface.php'
),
'Automattic\\WooCommerce\\Admin\\BlockTemplates\\ContainerInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/BlockTemplates/ContainerInterface.php'
),
'Automattic\\WooCommerce\\Admin\\Composer\\Package' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Composer/Package.php'
),
'Automattic\\WooCommerce\\Admin\\DataSourcePoller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/DataSourcePoller.php'
),
'Automattic\\WooCommerce\\Admin\\DateTimeProvider\\CurrentDateTimeProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/DateTimeProvider/CurrentDateTimeProvider.php'
),
'Automattic\\WooCommerce\\Admin\\DateTimeProvider\\DateTimeProviderInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/DateTimeProvider/DateTimeProviderInterface.php'
),
'Automattic\\WooCommerce\\Admin\\DeprecatedClassFacade' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/DeprecatedClassFacade.php'
),
'Automattic\\WooCommerce\\Admin\\FeaturePlugin' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/FeaturePlugin.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\AsyncProductEditorCategoryField\\Init' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/AsyncProductEditorCategoryField/Init.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\Features' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/Features.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\Navigation\\CoreMenu' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/Navigation/CoreMenu.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\Navigation\\Favorites' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/Navigation/Favorites.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\Navigation\\Init' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/Navigation/Init.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\Navigation\\Menu' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/Navigation/Menu.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\Navigation\\Screen' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/Navigation/Screen.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\NewProductManagementExperience' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/NewProductManagementExperience.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\Onboarding' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/Onboarding.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\DeprecatedExtendedTask' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/DeprecatedExtendedTask.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\DeprecatedOptions' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/DeprecatedOptions.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Init' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Init.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Task' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Task.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\TaskList' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/TaskList.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\TaskListSection' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/TaskListSection.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\TaskLists' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/TaskLists.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\TaskTraits' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/TaskTraits.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Tasks\\AdditionalPayments' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Tasks/AdditionalPayments.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Tasks\\Appearance' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Tasks/Appearance.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Tasks\\CustomizeStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Tasks/CustomizeStore.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Tasks\\ExperimentalShippingRecommendation' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Tasks/ExperimentalShippingRecommendation.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Tasks\\GetMobileApp' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Tasks/GetMobileApp.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Tasks\\Marketing' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Tasks/Marketing.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Tasks\\Payments' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Tasks/Payments.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Tasks\\Products' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Tasks/Products.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Tasks\\Purchase' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Tasks/Purchase.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Tasks\\ReviewShippingOptions' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Tasks/ReviewShippingOptions.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Tasks\\Shipping' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Tasks/Shipping.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Tasks\\StoreCreation' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Tasks/StoreCreation.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Tasks\\StoreDetails' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Tasks/StoreDetails.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Tasks\\Tax' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Tasks/Tax.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Tasks\\TourInAppMarketplace' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Tasks/TourInAppMarketplace.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\Tasks\\WooCommercePayments' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/OnboardingTasks/Tasks/WooCommercePayments.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\PaymentGatewaySuggestions\\DefaultPaymentGateways' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/PaymentGatewaySuggestions/DefaultPaymentGateways.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\PaymentGatewaySuggestions\\EvaluateSuggestion' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/PaymentGatewaySuggestions/EvaluateSuggestion.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\PaymentGatewaySuggestions\\Init' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/PaymentGatewaySuggestions/Init.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\PaymentGatewaySuggestions\\PaymentGatewaySuggestionsDataSourcePoller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/PaymentGatewaySuggestions/PaymentGatewaySuggestionsDataSourcePoller.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\PaymentGatewaySuggestions\\PaymentGatewaysController' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/PaymentGatewaySuggestions/PaymentGatewaysController.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\ProductBlockEditor\\BlockRegistry' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/ProductBlockEditor/BlockRegistry.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\ProductBlockEditor\\Init' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/ProductBlockEditor/Init.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\ProductBlockEditor\\ProductTemplates\\AbstractProductFormTemplate' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/ProductBlockEditor/ProductTemplates/AbstractProductFormTemplate.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\ProductBlockEditor\\ProductTemplates\\Group' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/ProductBlockEditor/ProductTemplates/Group.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\ProductBlockEditor\\ProductTemplates\\GroupInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/ProductBlockEditor/ProductTemplates/GroupInterface.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\ProductBlockEditor\\ProductTemplates\\ProductBlock' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/ProductBlockEditor/ProductTemplates/ProductBlock.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\ProductBlockEditor\\ProductTemplates\\ProductFormTemplateInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/ProductBlockEditor/ProductTemplates/ProductFormTemplateInterface.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\ProductBlockEditor\\ProductTemplates\\Section' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/ProductBlockEditor/ProductTemplates/Section.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\ProductBlockEditor\\ProductTemplates\\SectionInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/ProductBlockEditor/ProductTemplates/SectionInterface.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\ProductBlockEditor\\ProductTemplates\\SimpleProductTemplate' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/ProductBlockEditor/ProductTemplates/SimpleProductTemplate.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\ProductBlockEditor\\RedirectionController' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/ProductBlockEditor/RedirectionController.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\ProductBlockEditor\\Tracks' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/ProductBlockEditor/Tracks.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\ShippingPartnerSuggestions\\DefaultShippingPartners' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/ShippingPartnerSuggestions/DefaultShippingPartners.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\ShippingPartnerSuggestions\\ShippingPartnerSuggestions' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/ShippingPartnerSuggestions/ShippingPartnerSuggestions.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\ShippingPartnerSuggestions\\ShippingPartnerSuggestionsDataSourcePoller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/ShippingPartnerSuggestions/ShippingPartnerSuggestionsDataSourcePoller.php'
),
'Automattic\\WooCommerce\\Admin\\Features\\TransientNotices' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Features/TransientNotices.php'
),
'Automattic\\WooCommerce\\Admin\\Loader' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Loader.php'
),
'Automattic\\WooCommerce\\Admin\\Marketing\\InstalledExtensions' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Marketing/InstalledExtensions.php'
),
'Automattic\\WooCommerce\\Admin\\Marketing\\MarketingCampaign' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Marketing/MarketingCampaign.php'
),
'Automattic\\WooCommerce\\Admin\\Marketing\\MarketingCampaignType' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Marketing/MarketingCampaignType.php'
),
'Automattic\\WooCommerce\\Admin\\Marketing\\MarketingChannelInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Marketing/MarketingChannelInterface.php'
),
'Automattic\\WooCommerce\\Admin\\Marketing\\MarketingChannels' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Marketing/MarketingChannels.php'
),
'Automattic\\WooCommerce\\Admin\\Marketing\\Price' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Marketing/Price.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\DataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DataStore.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\Note' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/Note.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\NoteTraits' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/NoteTraits.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\Notes' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/Notes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\NotesUnavailableException' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/NotesUnavailableException.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Note' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Coupon_Page_Moved' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Customize_Store_With_Blocks' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_EU_VAT_Number' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Edit_Products_On_The_Move' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Facebook_Marketing_Expert' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_First_Product' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Giving_Feedback_Notes' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Install_JP_And_WCS_Plugins' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Launch_Checklist' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Migrate_From_Shopify' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Mobile_App' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_New_Sales_Record' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Onboarding_Email_Marketing' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Onboarding_Payments' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Online_Clothing_Store' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Order_Milestones' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Performance_On_Mobile' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Personalize_Store' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Real_Time_Order_Alerts' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Selling_Online_Courses' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Test_Checkout' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Tracking_Opt_In' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_WooCommerce_Payments' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_WooCommerce_Subscriptions' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Notes\\WC_Admin_Notes_Woo_Subscriptions_Notes' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Notes/DeprecatedNotes.php'
),
'Automattic\\WooCommerce\\Admin\\Overrides\\Order' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Overrides/Order.php'
),
'Automattic\\WooCommerce\\Admin\\Overrides\\OrderRefund' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Overrides/OrderRefund.php'
),
'Automattic\\WooCommerce\\Admin\\Overrides\\OrderTraits' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Overrides/OrderTraits.php'
),
'Automattic\\WooCommerce\\Admin\\Overrides\\ThemeUpgrader' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Overrides/ThemeUpgrader.php'
),
'Automattic\\WooCommerce\\Admin\\Overrides\\ThemeUpgraderSkin' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Overrides/ThemeUpgraderSkin.php'
),
'Automattic\\WooCommerce\\Admin\\PageController' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/PageController.php'
),
'Automattic\\WooCommerce\\Admin\\PluginsHelper' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/PluginsHelper.php'
),
'Automattic\\WooCommerce\\Admin\\PluginsInstallLoggers\\AsyncPluginsInstallLogger' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/PluginsInstallLoggers/AsyncPluginsInstallLogger.php'
),
'Automattic\\WooCommerce\\Admin\\PluginsInstallLoggers\\PluginsInstallLogger' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/PluginsInstallLoggers/PluginsInstallLogger.php'
),
'Automattic\\WooCommerce\\Admin\\PluginsInstaller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/PluginsInstaller.php'
),
'Automattic\\WooCommerce\\Admin\\PluginsProvider\\PluginsProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/PluginsProvider/PluginsProvider.php'
),
'Automattic\\WooCommerce\\Admin\\PluginsProvider\\PluginsProviderInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/PluginsProvider/PluginsProviderInterface.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\BaseLocationCountryRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/BaseLocationCountryRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\BaseLocationStateRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/BaseLocationStateRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\ComparisonOperation' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/ComparisonOperation.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\DataSourcePoller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/DataSourcePoller.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\EvaluateAndGetStatus' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/EvaluateAndGetStatus.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\EvaluationLogger' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/EvaluationLogger.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\FailRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/FailRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\GetRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/GetRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\IsEcommerceRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/IsEcommerceRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\NotRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/NotRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\NoteStatusRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/NoteStatusRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\OnboardingProfileRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/OnboardingProfileRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\OptionRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/OptionRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\OrRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/OrRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\OrderCountRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/OrderCountRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\OrdersProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/OrdersProvider.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\PassRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/PassRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\PluginVersionRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/PluginVersionRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\PluginsActivatedRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/PluginsActivatedRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\ProductCountRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/ProductCountRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\PublishAfterTimeRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/PublishAfterTimeRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\PublishBeforeTimeRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/PublishBeforeTimeRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\RemoteInboxNotificationsEngine' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/RemoteInboxNotificationsEngine.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\RuleEvaluator' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/RuleEvaluator.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\RuleProcessorInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/RuleProcessorInterface.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\SpecRunner' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/SpecRunner.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\StoredStateRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/StoredStateRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\StoredStateSetupForProducts' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/StoredStateSetupForProducts.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\TotalPaymentsVolumeProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/TotalPaymentsVolumeProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\TransformerInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/TransformerInterface.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\TransformerService' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/TransformerService.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\Transformers\\ArrayColumn' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/Transformers/ArrayColumn.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\Transformers\\ArrayFlatten' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/Transformers/ArrayFlatten.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\Transformers\\ArrayKeys' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/Transformers/ArrayKeys.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\Transformers\\ArraySearch' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/Transformers/ArraySearch.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\Transformers\\ArrayValues' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/Transformers/ArrayValues.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\Transformers\\Count' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/Transformers/Count.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\Transformers\\DotNotation' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/Transformers/DotNotation.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\Transformers\\PrepareUrl' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/Transformers/PrepareUrl.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\WCAdminActiveForProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/WCAdminActiveForProvider.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\WCAdminActiveForRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/WCAdminActiveForRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\RemoteInboxNotifications\\WooCommerceAdminUpdatedRuleProcessor' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/RemoteInboxNotifications/WooCommerceAdminUpdatedRuleProcessor.php'
),
'Automattic\\WooCommerce\\Admin\\ReportCSVEmail' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/ReportCSVEmail.php'
),
'Automattic\\WooCommerce\\Admin\\ReportCSVExporter' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/ReportCSVExporter.php'
),
'Automattic\\WooCommerce\\Admin\\ReportExporter' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/ReportExporter.php'
),
'Automattic\\WooCommerce\\Admin\\ReportsSync' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/ReportsSync.php'
),
'Automattic\\WooCommerce\\Admin\\Schedulers\\SchedulerTraits' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/Schedulers/SchedulerTraits.php'
),
'Automattic\\WooCommerce\\Admin\\WCAdminHelper' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Admin/WCAdminHelper.php'
),
'Automattic\\WooCommerce\\Autoloader' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Autoloader.php'
),
'Automattic\\WooCommerce\\Blocks\\Assets' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Assets.php'
),
'Automattic\\WooCommerce\\Blocks\\AssetsController' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/AssetsController.php'
),
'Automattic\\WooCommerce\\Blocks\\Assets\\Api' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Assets/Api.php'
),
'Automattic\\WooCommerce\\Blocks\\Assets\\AssetDataRegistry' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Assets/AssetDataRegistry.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockPatterns' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockPatterns.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTemplatesController' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTemplatesController.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypesController' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypesController.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\AbstractBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/AbstractBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\AbstractDynamicBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/AbstractDynamicBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\AbstractInnerBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/AbstractInnerBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\AbstractProductGrid' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/AbstractProductGrid.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ActiveFilters' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ActiveFilters.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\AddToCartForm' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/AddToCartForm.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\AllProducts' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/AllProducts.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\AllReviews' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/AllReviews.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\AtomicBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/AtomicBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\AttributeFilter' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/AttributeFilter.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\Breadcrumbs' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/Breadcrumbs.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\Cart' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/Cart.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CartAcceptedPaymentMethodsBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CartAcceptedPaymentMethodsBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CartCrossSellsBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CartCrossSellsBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CartCrossSellsProductsBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CartCrossSellsProductsBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CartExpressPaymentBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CartExpressPaymentBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CartItemsBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CartItemsBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CartLineItemsBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CartLineItemsBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CartOrderSummaryBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CartOrderSummaryBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CartOrderSummaryCouponFormBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CartOrderSummaryCouponFormBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CartOrderSummaryDiscountBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CartOrderSummaryDiscountBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CartOrderSummaryFeeBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CartOrderSummaryFeeBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CartOrderSummaryHeadingBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CartOrderSummaryHeadingBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CartOrderSummaryShippingBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CartOrderSummaryShippingBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CartOrderSummarySubtotalBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CartOrderSummarySubtotalBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CartOrderSummaryTaxesBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CartOrderSummaryTaxesBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CartTotalsBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CartTotalsBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CatalogSorting' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CatalogSorting.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\Checkout' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/Checkout.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutActionsBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutActionsBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutBillingAddressBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutBillingAddressBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutContactInformationBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutContactInformationBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutExpressPaymentBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutExpressPaymentBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutFieldsBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutFieldsBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutOrderNoteBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutOrderNoteBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutOrderSummaryBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutOrderSummaryBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutOrderSummaryCartItemsBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutOrderSummaryCartItemsBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutOrderSummaryCouponFormBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutOrderSummaryCouponFormBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutOrderSummaryDiscountBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutOrderSummaryDiscountBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutOrderSummaryFeeBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutOrderSummaryFeeBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutOrderSummaryShippingBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutOrderSummaryShippingBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutOrderSummarySubtotalBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutOrderSummarySubtotalBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutOrderSummaryTaxesBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutOrderSummaryTaxesBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutPaymentBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutPaymentBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutPickupOptionsBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutPickupOptionsBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutShippingAddressBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutShippingAddressBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutShippingMethodBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutShippingMethodBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutShippingMethodsBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutShippingMethodsBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutTermsBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutTermsBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CheckoutTotalsBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CheckoutTotalsBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ClassicTemplate' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ClassicTemplate.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\CustomerAccount' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/CustomerAccount.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\EmptyCartBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/EmptyCartBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\EmptyMiniCartContentsBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/EmptyMiniCartContentsBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\FeaturedCategory' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/FeaturedCategory.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\FeaturedItem' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/FeaturedItem.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\FeaturedProduct' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/FeaturedProduct.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\FilledCartBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/FilledCartBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\FilledMiniCartContentsBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/FilledMiniCartContentsBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\FilterWrapper' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/FilterWrapper.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\HandpickedProducts' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/HandpickedProducts.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\MiniCart' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/MiniCart.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\MiniCartCartButtonBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/MiniCartCartButtonBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\MiniCartCheckoutButtonBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/MiniCartCheckoutButtonBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\MiniCartContents' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/MiniCartContents.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\MiniCartFooterBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/MiniCartFooterBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\MiniCartItemsBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/MiniCartItemsBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\MiniCartProductsTableBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/MiniCartProductsTableBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\MiniCartShoppingButtonBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/MiniCartShoppingButtonBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\MiniCartTitleBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/MiniCartTitleBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\MiniCartTitleItemsCounterBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/MiniCartTitleItemsCounterBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\MiniCartTitleLabelBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/MiniCartTitleLabelBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\PriceFilter' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/PriceFilter.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProceedToCheckoutBlock' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProceedToCheckoutBlock.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductAddToCart' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductAddToCart.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductAverageRating' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductAverageRating.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductBestSellers' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductBestSellers.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductButton' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductButton.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductCategories' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductCategories.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductCategory' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductCategory.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductCollection' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductCollection.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductDetails' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductDetails.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductGallery' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductGallery.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductGalleryLargeImage' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductGalleryLargeImage.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductGalleryLargeImageNextPrevious' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductGalleryLargeImageNextPrevious.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductGalleryPager' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductGalleryPager.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductGalleryThumbnails' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductGalleryThumbnails.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductImage' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductImage.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductImageGallery' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductImageGallery.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductNew' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductNew.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductOnSale' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductOnSale.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductPrice' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductPrice.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductQuery' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductQuery.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductRating' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductRating.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductRatingCounter' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductRatingCounter.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductRatingStars' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductRatingStars.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductResultsCount' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductResultsCount.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductReviews' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductReviews.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductSKU' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductSKU.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductSaleBadge' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductSaleBadge.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductSearch' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductSearch.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductStockIndicator' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductStockIndicator.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductSummary' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductSummary.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductTag' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductTag.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductTemplate' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductTemplate.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductTitle' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductTitle.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductTopRated' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductTopRated.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ProductsByAttribute' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ProductsByAttribute.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\RatingFilter' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/RatingFilter.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\RelatedProducts' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/RelatedProducts.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ReviewsByCategory' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ReviewsByCategory.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\ReviewsByProduct' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/ReviewsByProduct.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\SingleProduct' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/SingleProduct.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\StockFilter' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/StockFilter.php'
),
'Automattic\\WooCommerce\\Blocks\\BlockTypes\\StoreNotices' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/BlockTypes/StoreNotices.php'
),
'Automattic\\WooCommerce\\Blocks\\Domain\\Bootstrap' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Domain/Bootstrap.php'
),
'Automattic\\WooCommerce\\Blocks\\Domain\\Package' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Domain/Package.php'
),
'Automattic\\WooCommerce\\Blocks\\Domain\\Services\\CreateAccount' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Domain/Services/CreateAccount.php'
),
'Automattic\\WooCommerce\\Blocks\\Domain\\Services\\DraftOrders' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Domain/Services/DraftOrders.php'
),
'Automattic\\WooCommerce\\Blocks\\Domain\\Services\\Email\\CustomerNewAccount' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Domain/Services/Email/CustomerNewAccount.php'
),
'Automattic\\WooCommerce\\Blocks\\Domain\\Services\\FeatureGating' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Domain/Services/FeatureGating.php'
),
'Automattic\\WooCommerce\\Blocks\\Domain\\Services\\GoogleAnalytics' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Domain/Services/GoogleAnalytics.php'
),
'Automattic\\WooCommerce\\Blocks\\Domain\\Services\\Hydration' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Domain/Services/Hydration.php'
),
'Automattic\\WooCommerce\\Blocks\\Domain\\Services\\Notices' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Domain/Services/Notices.php'
),
'Automattic\\WooCommerce\\Blocks\\InboxNotifications' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/InboxNotifications.php'
),
'Automattic\\WooCommerce\\Blocks\\Installer' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Installer.php'
),
'Automattic\\WooCommerce\\Blocks\\Integrations\\IntegrationInterface' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Integrations/IntegrationInterface.php'
),
'Automattic\\WooCommerce\\Blocks\\Integrations\\IntegrationRegistry' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Integrations/IntegrationRegistry.php'
),
'Automattic\\WooCommerce\\Blocks\\Library' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Library.php'
),
'Automattic\\WooCommerce\\Blocks\\Migration' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Migration.php'
),
'Automattic\\WooCommerce\\Blocks\\Options' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Options.php'
),
'Automattic\\WooCommerce\\Blocks\\Package' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Package.php'
),
'Automattic\\WooCommerce\\Blocks\\Payments\\Api' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Payments/Api.php'
),
'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\AbstractPaymentMethodType' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Payments/Integrations/AbstractPaymentMethodType.php'
),
'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\BankTransfer' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Payments/Integrations/BankTransfer.php'
),
'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\CashOnDelivery' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Payments/Integrations/CashOnDelivery.php'
),
'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\Cheque' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Payments/Integrations/Cheque.php'
),
'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\PayPal' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Payments/Integrations/PayPal.php'
),
'Automattic\\WooCommerce\\Blocks\\Payments\\PaymentMethodRegistry' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Payments/PaymentMethodRegistry.php'
),
'Automattic\\WooCommerce\\Blocks\\Payments\\PaymentMethodTypeInterface' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Payments/PaymentMethodTypeInterface.php'
),
'Automattic\\WooCommerce\\Blocks\\Registry\\AbstractDependencyType' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Registry/AbstractDependencyType.php'
),
'Automattic\\WooCommerce\\Blocks\\Registry\\Container' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Registry/Container.php'
),
'Automattic\\WooCommerce\\Blocks\\Registry\\FactoryType' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Registry/FactoryType.php'
),
'Automattic\\WooCommerce\\Blocks\\Registry\\SharedType' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Registry/SharedType.php'
),
'Automattic\\WooCommerce\\Blocks\\Shipping\\PickupLocation' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Shipping/PickupLocation.php'
),
'Automattic\\WooCommerce\\Blocks\\Shipping\\ShippingController' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Shipping/ShippingController.php'
),
'Automattic\\WooCommerce\\Blocks\\Templates\\AbstractPageTemplate' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Templates/AbstractPageTemplate.php'
),
'Automattic\\WooCommerce\\Blocks\\Templates\\AbstractTemplateCompatibility' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Templates/AbstractTemplateCompatibility.php'
),
'Automattic\\WooCommerce\\Blocks\\Templates\\ArchiveProductTemplatesCompatibility' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Templates/ArchiveProductTemplatesCompatibility.php'
),
'Automattic\\WooCommerce\\Blocks\\Templates\\CartTemplate' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Templates/CartTemplate.php'
),
'Automattic\\WooCommerce\\Blocks\\Templates\\CheckoutHeaderTemplate' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Templates/CheckoutHeaderTemplate.php'
),
'Automattic\\WooCommerce\\Blocks\\Templates\\CheckoutTemplate' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Templates/CheckoutTemplate.php'
),
'Automattic\\WooCommerce\\Blocks\\Templates\\ClassicTemplatesCompatibility' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Templates/ClassicTemplatesCompatibility.php'
),
'Automattic\\WooCommerce\\Blocks\\Templates\\MiniCartTemplate' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Templates/MiniCartTemplate.php'
),
'Automattic\\WooCommerce\\Blocks\\Templates\\OrderConfirmationTemplate' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Templates/OrderConfirmationTemplate.php'
),
'Automattic\\WooCommerce\\Blocks\\Templates\\ProductAttributeTemplate' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Templates/ProductAttributeTemplate.php'
),
'Automattic\\WooCommerce\\Blocks\\Templates\\ProductSearchResultsTemplate' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Templates/ProductSearchResultsTemplate.php'
),
'Automattic\\WooCommerce\\Blocks\\Templates\\SingleProductTemplateCompatibility' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Templates/SingleProductTemplateCompatibility.php'
),
'Automattic\\WooCommerce\\Blocks\\Utils\\BlockTemplateMigrationUtils' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Utils/BlockTemplateMigrationUtils.php'
),
'Automattic\\WooCommerce\\Blocks\\Utils\\BlockTemplateUtils' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Utils/BlockTemplateUtils.php'
),
'Automattic\\WooCommerce\\Blocks\\Utils\\BlocksWpQuery' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Utils/BlocksWpQuery.php'
),
'Automattic\\WooCommerce\\Blocks\\Utils\\CartCheckoutUtils' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Utils/CartCheckoutUtils.php'
),
'Automattic\\WooCommerce\\Blocks\\Utils\\MiniCartUtils' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Utils/MiniCartUtils.php'
),
'Automattic\\WooCommerce\\Blocks\\Utils\\SettingsUtils' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Utils/SettingsUtils.php'
),
'Automattic\\WooCommerce\\Blocks\\Utils\\StyleAttributesUtils' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Utils/StyleAttributesUtils.php'
),
'Automattic\\WooCommerce\\Blocks\\Utils\\Utils' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Utils/Utils.php'
),
'Automattic\\WooCommerce\\Blocks\\Verticals\\Client' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Verticals/Client.php'
),
'Automattic\\WooCommerce\\Caches\\OrderCache' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Caches/OrderCache.php'
),
'Automattic\\WooCommerce\\Caches\\OrderCacheController' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Caches/OrderCacheController.php'
),
'Automattic\\WooCommerce\\Caching\\CacheEngine' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Caching/CacheEngine.php'
),
'Automattic\\WooCommerce\\Caching\\CacheException' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Caching/CacheException.php'
),
'Automattic\\WooCommerce\\Caching\\CacheNameSpaceTrait' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Caching/CacheNameSpaceTrait.php'
),
'Automattic\\WooCommerce\\Caching\\ObjectCache' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Caching/ObjectCache.php'
),
'Automattic\\WooCommerce\\Caching\\WPCacheEngine' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Caching/WPCacheEngine.php'
),
'Automattic\\WooCommerce\\Checkout\\Helpers\\ReserveStock' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Checkout/Helpers/ReserveStock.php'
),
'Automattic\\WooCommerce\\Checkout\\Helpers\\ReserveStockException' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Checkout/Helpers/ReserveStockException.php'
),
'Automattic\\WooCommerce\\Container' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Container.php'
),
'Automattic\\WooCommerce\\DataBase\\Migrations\\CustomOrderTable\\CLIRunner' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Database/Migrations/CustomOrderTable/CLIRunner.php'
),
'Automattic\\WooCommerce\\Database\\Migrations\\CustomOrderTable\\PostMetaToOrderMetaMigrator' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Database/Migrations/CustomOrderTable/PostMetaToOrderMetaMigrator.php'
),
'Automattic\\WooCommerce\\Database\\Migrations\\CustomOrderTable\\PostToOrderAddressTableMigrator' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Database/Migrations/CustomOrderTable/PostToOrderAddressTableMigrator.php'
),
'Automattic\\WooCommerce\\Database\\Migrations\\CustomOrderTable\\PostToOrderOpTableMigrator' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Database/Migrations/CustomOrderTable/PostToOrderOpTableMigrator.php'
),
'Automattic\\WooCommerce\\Database\\Migrations\\CustomOrderTable\\PostToOrderTableMigrator' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Database/Migrations/CustomOrderTable/PostToOrderTableMigrator.php'
),
'Automattic\\WooCommerce\\Database\\Migrations\\CustomOrderTable\\PostsToOrdersMigrationController' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Database/Migrations/CustomOrderTable/PostsToOrdersMigrationController.php'
),
'Automattic\\WooCommerce\\Database\\Migrations\\MetaToCustomTableMigrator' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Database/Migrations/MetaToCustomTableMigrator.php'
),
'Automattic\\WooCommerce\\Database\\Migrations\\MetaToMetaTableMigrator' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Database/Migrations/MetaToMetaTableMigrator.php'
),
'Automattic\\WooCommerce\\Database\\Migrations\\MigrationHelper' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Database/Migrations/MigrationHelper.php'
),
'Automattic\\WooCommerce\\Database\\Migrations\\TableMigrator' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Database/Migrations/TableMigrator.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\ActivityPanels' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/ActivityPanels.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Analytics' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Analytics.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\BlockTemplateRegistry\\BlockTemplateRegistry' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/BlockTemplateRegistry/BlockTemplateRegistry.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\BlockTemplateRegistry\\BlockTemplatesController' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/BlockTemplateRegistry/BlockTemplatesController.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\BlockTemplateRegistry\\TemplateTransformer' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/BlockTemplateRegistry/TemplateTransformer.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\BlockTemplates\\AbstractBlock' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/BlockTemplates/AbstractBlock.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\BlockTemplates\\AbstractBlockTemplate' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/BlockTemplates/AbstractBlockTemplate.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\BlockTemplates\\Block' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/BlockTemplates/Block.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\BlockTemplates\\BlockContainerTrait' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/BlockTemplates/BlockContainerTrait.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\BlockTemplates\\BlockTemplate' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/BlockTemplates/BlockTemplate.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\BlockTemplates\\BlockTemplateLogger' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/BlockTemplates/BlockTemplateLogger.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\CategoryLookup' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/CategoryLookup.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Coupons' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Coupons.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\CouponsMovedTrait' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/CouponsMovedTrait.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\CustomerEffortScoreTracks' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/CustomerEffortScoreTracks.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Events' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Events.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\FeaturePlugin' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/FeaturePlugin.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Homescreen' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Homescreen.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Loader' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Loader.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Marketing' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Marketing.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Marketing\\MarketingSpecs' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Marketing/MarketingSpecs.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Marketplace' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Marketplace.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\MobileAppBanner' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/MobileAppBanner.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\AddFirstProduct' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/AddFirstProduct.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\ChoosingTheme' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/ChoosingTheme.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\CouponPageMoved' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/CouponPageMoved.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\CustomizeStoreWithBlocks' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/CustomizeStoreWithBlocks.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\CustomizingProductCatalog' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/CustomizingProductCatalog.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\EUVATNumber' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/EUVATNumber.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\EditProductsOnTheMove' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/EditProductsOnTheMove.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\EmailNotification' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/EmailNotification.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\FirstProduct' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/FirstProduct.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\GivingFeedbackNotes' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/GivingFeedbackNotes.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\InstallJPAndWCSPlugins' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/InstallJPAndWCSPlugins.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\LaunchChecklist' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/LaunchChecklist.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\MagentoMigration' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/MagentoMigration.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\ManageOrdersOnTheGo' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/ManageOrdersOnTheGo.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\MarketingJetpack' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/MarketingJetpack.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\MerchantEmailNotifications' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/MerchantEmailNotifications.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\MigrateFromShopify' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/MigrateFromShopify.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\MobileApp' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/MobileApp.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\NewSalesRecord' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/NewSalesRecord.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\OnboardingPayments' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/OnboardingPayments.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\OnlineClothingStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/OnlineClothingStore.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\OrderMilestones' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/OrderMilestones.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\PaymentsMoreInfoNeeded' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/PaymentsMoreInfoNeeded.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\PaymentsRemindMeLater' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/PaymentsRemindMeLater.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\PerformanceOnMobile' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/PerformanceOnMobile.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\PersonalizeStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/PersonalizeStore.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\RealTimeOrderAlerts' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/RealTimeOrderAlerts.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\SellingOnlineCourses' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/SellingOnlineCourses.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\TestCheckout' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/TestCheckout.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\TrackingOptIn' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/TrackingOptIn.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\UnsecuredReportFiles' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/UnsecuredReportFiles.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\WooCommercePayments' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/WooCommercePayments.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\WooCommerceSubscriptions' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/WooCommerceSubscriptions.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Notes\\WooSubscriptionsNotes' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Notes/WooSubscriptionsNotes.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Onboarding\\Onboarding' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Onboarding/Onboarding.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Onboarding\\OnboardingHelper' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Onboarding/OnboardingHelper.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Onboarding\\OnboardingIndustries' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Onboarding/OnboardingIndustries.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Onboarding\\OnboardingJetpack' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Onboarding/OnboardingJetpack.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Onboarding\\OnboardingMailchimp' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Onboarding/OnboardingMailchimp.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Onboarding\\OnboardingProducts' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Onboarding/OnboardingProducts.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Onboarding\\OnboardingProfile' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Onboarding/OnboardingProfile.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Onboarding\\OnboardingSetupWizard' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Onboarding/OnboardingSetupWizard.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Onboarding\\OnboardingSync' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Onboarding/OnboardingSync.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Onboarding\\OnboardingThemes' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Onboarding/OnboardingThemes.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Orders\\COTRedirectionController' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Orders/COTRedirectionController.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Orders\\Edit' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Orders/Edit.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Orders\\EditLock' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Orders/EditLock.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Orders\\ListTable' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Orders/ListTable.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Orders\\MetaBoxes\\CustomMetaBox' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Orders/MetaBoxes/CustomMetaBox.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Orders\\MetaBoxes\\TaxonomiesMetaBox' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Orders/MetaBoxes/TaxonomiesMetaBox.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Orders\\PageController' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Orders/PageController.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Orders\\PostsRedirectionController' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Orders/PostsRedirectionController.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\ProductForm\\Component' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/ProductForm/Component.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\ProductForm\\ComponentTrait' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/ProductForm/ComponentTrait.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\ProductForm\\Field' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/ProductForm/Field.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\ProductForm\\FormFactory' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/ProductForm/FormFactory.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\ProductForm\\Section' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/ProductForm/Section.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\ProductForm\\Subsection' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/ProductForm/Subsection.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\ProductForm\\Tab' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/ProductForm/Tab.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\ProductReviews\\Reviews' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/ProductReviews/Reviews.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\ProductReviews\\ReviewsCommentsOverrides' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/ProductReviews/ReviewsCommentsOverrides.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\ProductReviews\\ReviewsListTable' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/ProductReviews/ReviewsListTable.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\ProductReviews\\ReviewsUtil' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/ProductReviews/ReviewsUtil.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\RemoteFreeExtensions\\DefaultFreeExtensions' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\RemoteFreeExtensions\\EvaluateExtension' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/RemoteFreeExtensions/EvaluateExtension.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\RemoteFreeExtensions\\Init' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/RemoteFreeExtensions/Init.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\RemoteFreeExtensions\\RemoteFreeExtensionsDataSourcePoller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/RemoteFreeExtensions/RemoteFreeExtensionsDataSourcePoller.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\RemoteInboxNotifications' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/RemoteInboxNotifications.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Schedulers\\CustomersScheduler' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Schedulers/CustomersScheduler.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Schedulers\\ImportInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Schedulers/ImportInterface.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Schedulers\\ImportScheduler' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Schedulers/ImportScheduler.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Schedulers\\MailchimpScheduler' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Schedulers/MailchimpScheduler.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Schedulers\\OrdersScheduler' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Schedulers/OrdersScheduler.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Settings' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Settings.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\SettingsNavigationFeature' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/SettingsNavigationFeature.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\ShippingLabelBanner' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/ShippingLabelBanner.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\ShippingLabelBannerDisplayRules' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/ShippingLabelBannerDisplayRules.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\SiteHealth' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/SiteHealth.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Survey' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Survey.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\SystemStatusReport' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/SystemStatusReport.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\Translations' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/Translations.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\WCAdminAssets' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/WCAdminAssets.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\WCAdminSharedSettings' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/WCAdminSharedSettings.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\WCAdminUser' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/WCAdminUser.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\WCPayPromotion\\Init' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/WCPayPromotion/Init.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\WCPayPromotion\\WCPayPromotionDataSourcePoller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/WCPayPromotion/WCPayPromotionDataSourcePoller.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\WCPayPromotion\\WCPaymentGatewayPreInstallWCPayPromotion' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/WCPayPromotion/WCPaymentGatewayPreInstallWCPayPromotion.php'
),
'Automattic\\WooCommerce\\Internal\\Admin\\WcPayWelcomePage' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Admin/WcPayWelcomePage.php'
),
'Automattic\\WooCommerce\\Internal\\AssignDefaultCategory' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/AssignDefaultCategory.php'
),
'Automattic\\WooCommerce\\Internal\\BatchProcessing\\BatchProcessingController' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/BatchProcessing/BatchProcessingController.php'
),
'Automattic\\WooCommerce\\Internal\\BatchProcessing\\BatchProcessorInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/BatchProcessing/BatchProcessorInterface.php'
),
'Automattic\\WooCommerce\\Internal\\DataStores\\CustomMetaDataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DataStores/CustomMetaDataStore.php'
),
'Automattic\\WooCommerce\\Internal\\DataStores\\Orders\\CustomOrdersTableController' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DataStores/Orders/CustomOrdersTableController.php'
),
'Automattic\\WooCommerce\\Internal\\DataStores\\Orders\\DataSynchronizer' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DataStores/Orders/DataSynchronizer.php'
),
'Automattic\\WooCommerce\\Internal\\DataStores\\Orders\\OrdersTableDataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DataStores/Orders/OrdersTableDataStore.php'
),
'Automattic\\WooCommerce\\Internal\\DataStores\\Orders\\OrdersTableDataStoreMeta' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DataStores/Orders/OrdersTableDataStoreMeta.php'
),
'Automattic\\WooCommerce\\Internal\\DataStores\\Orders\\OrdersTableFieldQuery' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DataStores/Orders/OrdersTableFieldQuery.php'
),
'Automattic\\WooCommerce\\Internal\\DataStores\\Orders\\OrdersTableMetaQuery' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DataStores/Orders/OrdersTableMetaQuery.php'
),
'Automattic\\WooCommerce\\Internal\\DataStores\\Orders\\OrdersTableQuery' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DataStores/Orders/OrdersTableQuery.php'
),
'Automattic\\WooCommerce\\Internal\\DataStores\\Orders\\OrdersTableRefundDataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DataStores/Orders/OrdersTableRefundDataStore.php'
),
'Automattic\\WooCommerce\\Internal\\DataStores\\Orders\\OrdersTableSearchQuery' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DataStores/Orders/OrdersTableSearchQuery.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\AbstractServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/AbstractServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ContainerException' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ContainerException.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\Definition' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/Definition.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ExtendedContainer' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ExtendedContainer.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\AssignDefaultCategoryServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/AssignDefaultCategoryServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\BatchProcessingServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/BatchProcessingServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\BlockTemplatesServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/BlockTemplatesServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\COTMigrationServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/COTMigrationServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\DownloadPermissionsAdjusterServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/DownloadPermissionsAdjusterServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\FeaturesServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/FeaturesServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\MarketingServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/MarketingServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\MarketplaceServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/MarketplaceServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\ObjectCacheServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/ObjectCacheServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\OptionSanitizerServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/OptionSanitizerServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\OrderAdminServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/OrderAdminServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\OrderMetaBoxServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/OrderMetaBoxServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\OrdersControllersServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/OrdersControllersServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\OrdersDataStoreServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/OrdersDataStoreServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\ProductAttributesLookupServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/ProductAttributesLookupServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\ProductDownloadsServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/ProductDownloadsServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\ProductReviewsServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/ProductReviewsServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\ProxiesServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/ProxiesServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\RestockRefundedItemsAdjusterServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/RestockRefundedItemsAdjusterServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DependencyManagement\\ServiceProviders\\UtilsClassesServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DependencyManagement/ServiceProviders/UtilsClassesServiceProvider.php'
),
'Automattic\\WooCommerce\\Internal\\DownloadPermissionsAdjuster' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/DownloadPermissionsAdjuster.php'
),
'Automattic\\WooCommerce\\Internal\\Features\\FeaturesController' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Features/FeaturesController.php'
),
'Automattic\\WooCommerce\\Internal\\Orders\\CouponsController' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Orders/CouponsController.php'
),
'Automattic\\WooCommerce\\Internal\\Orders\\IppFunctions' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Orders/IppFunctions.php'
),
'Automattic\\WooCommerce\\Internal\\Orders\\MobileMessagingHandler' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Orders/MobileMessagingHandler.php'
),
'Automattic\\WooCommerce\\Internal\\Orders\\TaxesController' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Orders/TaxesController.php'
),
'Automattic\\WooCommerce\\Internal\\ProductAttributesLookup\\DataRegenerator' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/ProductAttributesLookup/DataRegenerator.php'
),
'Automattic\\WooCommerce\\Internal\\ProductAttributesLookup\\Filterer' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/ProductAttributesLookup/Filterer.php'
),
'Automattic\\WooCommerce\\Internal\\ProductAttributesLookup\\LookupDataStore' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/ProductAttributesLookup/LookupDataStore.php'
),
'Automattic\\WooCommerce\\Internal\\ProductDownloads\\ApprovedDirectories\\Admin\\SyncUI' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/ProductDownloads/ApprovedDirectories/Admin/SyncUI.php'
),
'Automattic\\WooCommerce\\Internal\\ProductDownloads\\ApprovedDirectories\\Admin\\Table' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/ProductDownloads/ApprovedDirectories/Admin/Table.php'
),
'Automattic\\WooCommerce\\Internal\\ProductDownloads\\ApprovedDirectories\\Admin\\UI' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/ProductDownloads/ApprovedDirectories/Admin/UI.php'
),
'Automattic\\WooCommerce\\Internal\\ProductDownloads\\ApprovedDirectories\\ApprovedDirectoriesException' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/ProductDownloads/ApprovedDirectories/ApprovedDirectoriesException.php'
),
'Automattic\\WooCommerce\\Internal\\ProductDownloads\\ApprovedDirectories\\Register' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/ProductDownloads/ApprovedDirectories/Register.php'
),
'Automattic\\WooCommerce\\Internal\\ProductDownloads\\ApprovedDirectories\\StoredUrl' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/ProductDownloads/ApprovedDirectories/StoredUrl.php'
),
'Automattic\\WooCommerce\\Internal\\ProductDownloads\\ApprovedDirectories\\Synchronize' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/ProductDownloads/ApprovedDirectories/Synchronize.php'
),
'Automattic\\WooCommerce\\Internal\\RestApiUtil' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/RestApiUtil.php'
),
'Automattic\\WooCommerce\\Internal\\RestockRefundedItemsAdjuster' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/RestockRefundedItemsAdjuster.php'
),
'Automattic\\WooCommerce\\Internal\\Settings\\OptionSanitizer' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Settings/OptionSanitizer.php'
),
'Automattic\\WooCommerce\\Internal\\Traits\\AccessiblePrivateMethods' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Traits/AccessiblePrivateMethods.php'
),
'Automattic\\WooCommerce\\Internal\\Utilities\\BlocksUtil' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Utilities/BlocksUtil.php'
),
'Automattic\\WooCommerce\\Internal\\Utilities\\COTMigrationUtil' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Utilities/COTMigrationUtil.php'
),
'Automattic\\WooCommerce\\Internal\\Utilities\\DatabaseUtil' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Utilities/DatabaseUtil.php'
),
'Automattic\\WooCommerce\\Internal\\Utilities\\HtmlSanitizer' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Utilities/HtmlSanitizer.php'
),
'Automattic\\WooCommerce\\Internal\\Utilities\\URL' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Utilities/URL.php'
),
'Automattic\\WooCommerce\\Internal\\Utilities\\URLException' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Utilities/URLException.php'
),
'Automattic\\WooCommerce\\Internal\\Utilities\\Users' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Utilities/Users.php'
),
'Automattic\\WooCommerce\\Internal\\Utilities\\WebhookUtil' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/Utilities/WebhookUtil.php'
),
'Automattic\\WooCommerce\\Internal\\WCCom\\ConnectionHelper' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Internal/WCCom/ConnectionHelper.php'
),
'Automattic\\WooCommerce\\Packages' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Packages.php'
),
'Automattic\\WooCommerce\\Proxies\\ActionsProxy' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Proxies/ActionsProxy.php'
),
'Automattic\\WooCommerce\\Proxies\\LegacyProxy' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Proxies/LegacyProxy.php'
),
'Automattic\\WooCommerce\\RestApi\\Package' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Package.php'
),
'Automattic\\WooCommerce\\RestApi\\Server' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Server.php'
),
'Automattic\\WooCommerce\\RestApi\\UnitTests\\Helpers\\AdminNotesHelper' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/legacy/unit-tests/rest-api/Helpers/AdminNotesHelper.php'
),
'Automattic\\WooCommerce\\RestApi\\UnitTests\\Helpers\\CouponHelper' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/legacy/unit-tests/rest-api/Helpers/CouponHelper.php'
),
'Automattic\\WooCommerce\\RestApi\\UnitTests\\Helpers\\CustomerHelper' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/legacy/unit-tests/rest-api/Helpers/CustomerHelper.php'
),
'Automattic\\WooCommerce\\RestApi\\UnitTests\\Helpers\\OrderHelper' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/legacy/unit-tests/rest-api/Helpers/OrderHelper.php'
),
'Automattic\\WooCommerce\\RestApi\\UnitTests\\Helpers\\ProductHelper' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/legacy/unit-tests/rest-api/Helpers/ProductHelper.php'
),
'Automattic\\WooCommerce\\RestApi\\UnitTests\\Helpers\\QueueHelper' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/legacy/unit-tests/rest-api/Helpers/QueueHelper.php'
),
'Automattic\\WooCommerce\\RestApi\\UnitTests\\Helpers\\SettingsHelper' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/legacy/unit-tests/rest-api/Helpers/SettingsHelper.php'
),
'Automattic\\WooCommerce\\RestApi\\UnitTests\\Helpers\\ShippingHelper' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/legacy/unit-tests/rest-api/Helpers/ShippingHelper.php'
),
'Automattic\\WooCommerce\\RestApi\\Utilities\\ImageAttachment' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Utilities/ImageAttachment.php'
),
'Automattic\\WooCommerce\\RestApi\\Utilities\\SingletonTrait' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Utilities/SingletonTrait.php'
),
'Automattic\\WooCommerce\\StoreApi\\Authentication' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Authentication.php'
),
'Automattic\\WooCommerce\\StoreApi\\Exceptions\\InvalidCartException' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Exceptions/InvalidCartException.php'
),
'Automattic\\WooCommerce\\StoreApi\\Exceptions\\InvalidStockLevelsInCartException' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Exceptions/InvalidStockLevelsInCartException.php'
),
'Automattic\\WooCommerce\\StoreApi\\Exceptions\\NotPurchasableException' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Exceptions/NotPurchasableException.php'
),
'Automattic\\WooCommerce\\StoreApi\\Exceptions\\OutOfStockException' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Exceptions/OutOfStockException.php'
),
'Automattic\\WooCommerce\\StoreApi\\Exceptions\\PartialOutOfStockException' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Exceptions/PartialOutOfStockException.php'
),
'Automattic\\WooCommerce\\StoreApi\\Exceptions\\RouteException' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Exceptions/RouteException.php'
),
'Automattic\\WooCommerce\\StoreApi\\Exceptions\\StockAvailabilityException' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Exceptions/StockAvailabilityException.php'
),
'Automattic\\WooCommerce\\StoreApi\\Exceptions\\TooManyInCartException' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Exceptions/TooManyInCartException.php'
),
'Automattic\\WooCommerce\\StoreApi\\Formatters' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Formatters.php'
),
'Automattic\\WooCommerce\\StoreApi\\Formatters\\CurrencyFormatter' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Formatters/CurrencyFormatter.php'
),
'Automattic\\WooCommerce\\StoreApi\\Formatters\\DefaultFormatter' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Formatters/DefaultFormatter.php'
),
'Automattic\\WooCommerce\\StoreApi\\Formatters\\FormatterInterface' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Formatters/FormatterInterface.php'
),
'Automattic\\WooCommerce\\StoreApi\\Formatters\\HtmlFormatter' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Formatters/HtmlFormatter.php'
),
'Automattic\\WooCommerce\\StoreApi\\Formatters\\MoneyFormatter' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Formatters/MoneyFormatter.php'
),
'Automattic\\WooCommerce\\StoreApi\\Legacy' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Legacy.php'
),
'Automattic\\WooCommerce\\StoreApi\\Payments\\PaymentContext' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Payments/PaymentContext.php'
),
'Automattic\\WooCommerce\\StoreApi\\Payments\\PaymentResult' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Payments/PaymentResult.php'
),
'Automattic\\WooCommerce\\StoreApi\\RoutesController' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/RoutesController.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\RouteInterface' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/RouteInterface.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\AbstractCartRoute' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/AbstractCartRoute.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\AbstractRoute' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/AbstractRoute.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\AbstractTermsRoute' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/AbstractTermsRoute.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\Batch' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/Batch.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\Cart' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/Cart.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\CartAddItem' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/CartAddItem.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\CartApplyCoupon' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/CartApplyCoupon.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\CartCoupons' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/CartCoupons.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\CartCouponsByCode' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/CartCouponsByCode.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\CartExtensions' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/CartExtensions.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\CartItems' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/CartItems.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\CartItemsByKey' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/CartItemsByKey.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\CartRemoveCoupon' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/CartRemoveCoupon.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\CartRemoveItem' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/CartRemoveItem.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\CartSelectShippingRate' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/CartSelectShippingRate.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\CartUpdateCustomer' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/CartUpdateCustomer.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\CartUpdateItem' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/CartUpdateItem.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\Checkout' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/Checkout.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\CheckoutOrder' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/CheckoutOrder.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\Order' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/Order.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\ProductAttributeTerms' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/ProductAttributeTerms.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\ProductAttributes' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/ProductAttributes.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\ProductAttributesById' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/ProductAttributesById.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\ProductCategories' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/ProductCategories.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\ProductCategoriesById' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/ProductCategoriesById.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\ProductCollectionData' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/ProductCollectionData.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\ProductReviews' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/ProductReviews.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\ProductTags' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/ProductTags.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\Products' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/Products.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\ProductsById' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/ProductsById.php'
),
'Automattic\\WooCommerce\\StoreApi\\Routes\\V1\\ProductsBySlug' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Routes/V1/ProductsBySlug.php'
),
'Automattic\\WooCommerce\\StoreApi\\SchemaController' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/SchemaController.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\ExtendSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/ExtendSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\AbstractAddressSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/AbstractAddressSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\AbstractSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/AbstractSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\BatchSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/BatchSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\BillingAddressSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/BillingAddressSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\CartCouponSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/CartCouponSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\CartExtensionsSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/CartExtensionsSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\CartFeeSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/CartFeeSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\CartItemSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/CartItemSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\CartSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/CartSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\CartShippingRateSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/CartShippingRateSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\CheckoutOrderSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/CheckoutOrderSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\CheckoutSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/CheckoutSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\ErrorSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/ErrorSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\ImageAttachmentSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/ImageAttachmentSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\ItemSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/ItemSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\OrderCouponSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/OrderCouponSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\OrderFeeSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/OrderFeeSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\OrderItemSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/OrderItemSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\OrderSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/OrderSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\ProductAttributeSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/ProductAttributeSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\ProductCategorySchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/ProductCategorySchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\ProductCollectionDataSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/ProductCollectionDataSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\ProductReviewSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/ProductReviewSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\ProductSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/ProductSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\ShippingAddressSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/ShippingAddressSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\Schemas\\V1\\TermSchema' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/TermSchema.php'
),
'Automattic\\WooCommerce\\StoreApi\\SessionHandler' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/SessionHandler.php'
),
'Automattic\\WooCommerce\\StoreApi\\StoreApi' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/StoreApi.php'
),
'Automattic\\WooCommerce\\StoreApi\\Utilities\\ArrayUtils' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Utilities/ArrayUtils.php'
),
'Automattic\\WooCommerce\\StoreApi\\Utilities\\CartController' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Utilities/CartController.php'
),
'Automattic\\WooCommerce\\StoreApi\\Utilities\\CheckoutTrait' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Utilities/CheckoutTrait.php'
),
'Automattic\\WooCommerce\\StoreApi\\Utilities\\DraftOrderTrait' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Utilities/DraftOrderTrait.php'
),
'Automattic\\WooCommerce\\StoreApi\\Utilities\\JsonWebToken' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Utilities/JsonWebToken.php'
),
'Automattic\\WooCommerce\\StoreApi\\Utilities\\LocalPickupUtils' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Utilities/LocalPickupUtils.php'
),
'Automattic\\WooCommerce\\StoreApi\\Utilities\\NoticeHandler' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Utilities/NoticeHandler.php'
),
'Automattic\\WooCommerce\\StoreApi\\Utilities\\OrderAuthorizationTrait' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Utilities/OrderAuthorizationTrait.php'
),
'Automattic\\WooCommerce\\StoreApi\\Utilities\\OrderController' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Utilities/OrderController.php'
),
'Automattic\\WooCommerce\\StoreApi\\Utilities\\Pagination' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Utilities/Pagination.php'
),
'Automattic\\WooCommerce\\StoreApi\\Utilities\\ProductItemTrait' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Utilities/ProductItemTrait.php'
),
'Automattic\\WooCommerce\\StoreApi\\Utilities\\ProductQuery' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Utilities/ProductQuery.php'
),
'Automattic\\WooCommerce\\StoreApi\\Utilities\\ProductQueryFilters' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Utilities/ProductQueryFilters.php'
),
'Automattic\\WooCommerce\\StoreApi\\Utilities\\QuantityLimits' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Utilities/QuantityLimits.php'
),
'Automattic\\WooCommerce\\StoreApi\\Utilities\\RateLimits' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Utilities/RateLimits.php'
),
'Automattic\\WooCommerce\\StoreApi\\Utilities\\ValidationUtils' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/Utilities/ValidationUtils.php'
),
'Automattic\\WooCommerce\\Testing\\Tools\\CodeHacking\\CodeHacker' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/Tools/CodeHacking/CodeHacker.php'
),
'Automattic\\WooCommerce\\Testing\\Tools\\CodeHacking\\Hacks\\BypassFinalsHack' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/Tools/CodeHacking/Hacks/BypassFinalsHack.php'
),
'Automattic\\WooCommerce\\Testing\\Tools\\CodeHacking\\Hacks\\CodeHack' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/Tools/CodeHacking/Hacks/CodeHack.php'
),
'Automattic\\WooCommerce\\Testing\\Tools\\CodeHacking\\Hacks\\FunctionsMockerHack' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/Tools/CodeHacking/Hacks/FunctionsMockerHack.php'
),
'Automattic\\WooCommerce\\Testing\\Tools\\CodeHacking\\Hacks\\StaticMockerHack' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/Tools/CodeHacking/Hacks/StaticMockerHack.php'
),
'Automattic\\WooCommerce\\Testing\\Tools\\DependencyManagement\\MockableLegacyProxy' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/Tools/DependencyManagement/MockableLegacyProxy.php'
),
'Automattic\\WooCommerce\\Testing\\Tools\\DynamicDecorator' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/Tools/DynamicDecorator.php'
),
'Automattic\\WooCommerce\\Testing\\Tools\\FakeQueue' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/Tools/FakeQueue.php'
),
'Automattic\\WooCommerce\\Tests\\Admin\\API\\MarketingCampaignTypesTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Admin/API/MarketingCampaignTypesTest.php'
),
'Automattic\\WooCommerce\\Tests\\Admin\\API\\MarketingCampaignsTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Admin/API/MarketingCampaignsTest.php'
),
'Automattic\\WooCommerce\\Tests\\Admin\\API\\MarketingChannelsTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Admin/API/MarketingChannelsTest.php'
),
'Automattic\\WooCommerce\\Tests\\Admin\\API\\MarketingRecommendationsTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Admin/API/MarketingRecommendationsTest.php'
),
'Automattic\\WooCommerce\\Tests\\Admin\\API\\OnboardingPluginsTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Admin/API/OnboardingPluginsTest.php'
),
'Automattic\\WooCommerce\\Tests\\Admin\\Marketing\\MarketingCampaignTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Admin/Marketing/MarketingCampaignTest.php'
),
'Automattic\\WooCommerce\\Tests\\Admin\\Marketing\\MarketingChannelsTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Admin/Marketing/MarketingChannelsTest.php'
),
'Automattic\\WooCommerce\\Tests\\Admin\\ProductBlockEditor\\ProductTemplates\\CustomProductFormTemplate' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Admin/ProductBlockEditor/ProductTemplates/CustomProductFormTemplate.php'
),
'Automattic\\WooCommerce\\Tests\\Admin\\ProductBlockEditor\\ProductTemplates\\CustomProductFormTemplateTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Admin/ProductBlockEditor/ProductTemplates/CustomProductFormTemplateTest.php'
),
'Automattic\\WooCommerce\\Tests\\Caching\\CacheExceptionTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Caching/CacheExceptionTest.php'
),
'Automattic\\WooCommerce\\Tests\\Caching\\InvalidObjectCacheClass' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Caching/InvalidObjectCacheClass.php'
),
'Automattic\\WooCommerce\\Tests\\Caching\\ObjectCacheTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Caching/ObjectCacheTest.php'
),
'Automattic\\WooCommerce\\Tests\\Caching\\WPCacheEngineTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Caching/WPCacheEngineTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Admin\\BlockTemplates\\BlockTemplateRegistryTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Admin/BlockTemplateRegistry/BlockTemplateRegistryTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Admin\\BlockTemplates\\BlockTemplateTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Admin/BlockTemplates/BlockTemplateTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Admin\\BlockTemplates\\BlockTemplatesControllerTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Admin/BlockTemplateRegistry/BlockTemplatesControllerTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Admin\\BlockTemplates\\BlockTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Admin/BlockTemplates/BlockTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Admin\\BlockTemplates\\CustomBlock' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Admin/BlockTemplates/CustomBlock.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Admin\\BlockTemplates\\CustomBlockInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Admin/BlockTemplates/CustomBlockInterface.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Admin\\BlockTemplates\\CustomBlockTemplate' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Admin/BlockTemplates/CustomBlockTemplate.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Admin\\BlockTemplates\\CustomBlockTemplateTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Admin/BlockTemplates/CustomBlockTemplateTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Admin\\BlockTemplates\\CustomBlockTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Admin/BlockTemplates/CustomBlockTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Admin\\BlockTemplates\\TemplateTransformerTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Admin/BlockTemplateRegistry/TemplateTransformerTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Admin\\Orders\\PageControllerTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Admin/Orders/PageControllerTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Admin\\ProductReviews\\ReviewsCommentsOverridesTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Admin/ProductReviews/ReviewsCommentsOverridesTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Admin\\ProductReviews\\ReviewsListTableTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Admin/ProductReviews/ReviewsListTableTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Admin\\ProductReviews\\ReviewsTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Admin/ProductReviews/ReviewsTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Admin\\ProductReviews\\ReviewsUtilTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Admin/ProductReviews/ReviewsUtilTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\AssignDefaultCategoryTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/AssignDefaultCategoryTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\DependencyManagement\\AbstractServiceProviderTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/DependencyManagement/AbstractServiceProviderTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\DependencyManagement\\ExampleClasses\\ClassWithDependencies' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/DependencyManagement/ExampleClasses/ClassWithDependencies.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\DependencyManagement\\ExampleClasses\\ClassWithInjectionMethodArgumentWithoutTypeHint' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/DependencyManagement/ExampleClasses/ClassWithInjectionMethodArgumentWithoutTypeHint.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\DependencyManagement\\ExampleClasses\\ClassWithNonFinalInjectionMethod' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/DependencyManagement/ExampleClasses/ClassWithNonFinalInjectionMethod.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\DependencyManagement\\ExampleClasses\\ClassWithPrivateInjectionMethod' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/DependencyManagement/ExampleClasses/ClassWithPrivateInjectionMethod.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\DependencyManagement\\ExampleClasses\\ClassWithScalarInjectionMethodArgument' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/DependencyManagement/ExampleClasses/ClassWithScalarInjectionMethodArgument.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\DependencyManagement\\ExampleClasses\\DependencyClass' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/DependencyManagement/ExampleClasses/DependencyClass.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\DependencyManagement\\ExampleClasses\\DerivedDependencyClass' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/DependencyManagement/ExampleClasses/DerivedDependencyClass.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\DependencyManagement\\ExtendedContainerTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/DependencyManagement/ExtendedContainerTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\DownloadPermissionsAdjusterTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/DownloadPermissionsAdjusterTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Features\\FeaturesControllerTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Features/FeaturesControllerTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Orders\\IppFunctionsTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Orders/IppFunctionsTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\ProductAttributesLookup\\DataRegeneratorTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/ProductAttributesLookup/DataRegeneratorTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\ProductAttributesLookup\\FiltererTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/ProductAttributesLookup/FiltererTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\ProductAttributesLookup\\LookupDataStoreTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/ProductAttributesLookup/LookupDataStoreTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\ProductDownloads\\RegisterTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/ProductDownloads/ApprovedDirectories/RegisterTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\ProductDownloads\\SynchronizeTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/ProductDownloads/ApprovedDirectories/SynchronizeTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\RestApiUtilTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/RestApiUtilTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Telemetry\\TelemetryControllerTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Telemetry/TelemetryControllerTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Traits\\AccessiblePrivateMethodsTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Traits/AccessiblePrivateMethodsTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Traits\\BaseClass' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Traits/AccessiblePrivateMethodsTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\Utilities\\URLTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Utilities/URLTest.php'
),
'Automattic\\WooCommerce\\Tests\\Internal\\WCCom\\ConnectionHelperTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/WCCom/ConnectionHelperTest.php'
),
'Automattic\\WooCommerce\\Tests\\Proxies\\ClassThatDependsOnLegacyCodeTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Proxies/ClassThatDependsOnLegacyCodeTest.php'
),
'Automattic\\WooCommerce\\Tests\\Proxies\\DynamicDecoratorTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Proxies/DynamicDecoratorTest.php'
),
'Automattic\\WooCommerce\\Tests\\Proxies\\ExampleClasses\\ClassThatDependsOnLegacyCode' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Proxies/ExampleClasses/ClassThatDependsOnLegacyCode.php'
),
'Automattic\\WooCommerce\\Tests\\Proxies\\ExampleClasses\\ClassWithReplaceableMembers' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Proxies/ExampleClasses/ClassWithReplaceableMembers.php'
),
'Automattic\\WooCommerce\\Tests\\Proxies\\LegacyProxyTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Proxies/LegacyProxyTest.php'
),
'Automattic\\WooCommerce\\Tests\\Proxies\\MockableLegacyProxyTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Proxies/MockableLegacyProxyTest.php'
),
'Automattic\\WooCommerce\\Tests\\Utilities\\ArrayUtilTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Utilities/ArrayUtilTest.php'
),
'Automattic\\WooCommerce\\Tests\\Utilities\\I18nUtilTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Utilities/I18nUtilTest.php'
),
'Automattic\\WooCommerce\\Tests\\Utilities\\NumberUtilTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Utilities/NumberUtilTest.php'
),
'Automattic\\WooCommerce\\Tests\\Utilities\\PluginUtilTests' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Utilities/PluginUtilTests.php'
),
'Automattic\\WooCommerce\\Tests\\Utilities\\StringUtilTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Utilities/StringUtilTest.php'
),
'Automattic\\WooCommerce\\Utilities\\ArrayUtil' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Utilities/ArrayUtil.php'
),
'Automattic\\WooCommerce\\Utilities\\FeaturesUtil' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Utilities/FeaturesUtil.php'
),
'Automattic\\WooCommerce\\Utilities\\I18nUtil' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Utilities/I18nUtil.php'
),
'Automattic\\WooCommerce\\Utilities\\NumberUtil' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Utilities/NumberUtil.php'
),
'Automattic\\WooCommerce\\Utilities\\OrderUtil' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Utilities/OrderUtil.php'
),
'Automattic\\WooCommerce\\Utilities\\PluginUtil' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Utilities/PluginUtil.php'
),
'Automattic\\WooCommerce\\Utilities\\StringUtil' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/src/Utilities/StringUtil.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Argument\\ArgumentResolverInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Argument/ArgumentResolverInterface.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Argument\\ArgumentResolverTrait' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Argument/ArgumentResolverTrait.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Argument\\ClassName' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Argument/ClassName.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Argument\\ClassNameInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Argument/ClassNameInterface.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Argument\\ClassNameWithOptionalValue' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Argument/ClassNameWithOptionalValue.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Argument\\RawArgument' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Argument/RawArgument.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Argument\\RawArgumentInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Argument/RawArgumentInterface.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Container' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Container.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\ContainerAwareInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/ContainerAwareInterface.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\ContainerAwareTrait' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/ContainerAwareTrait.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Definition\\Definition' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Definition/Definition.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Definition\\DefinitionAggregate' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Definition/DefinitionAggregate.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Definition\\DefinitionAggregateInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Definition/DefinitionAggregateInterface.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Definition\\DefinitionInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Definition/DefinitionInterface.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Exception\\ContainerException' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Exception/ContainerException.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Exception\\NotFoundException' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Exception/NotFoundException.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Inflector\\Inflector' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Inflector/Inflector.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Inflector\\InflectorAggregate' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Inflector/InflectorAggregate.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Inflector\\InflectorAggregateInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Inflector/InflectorAggregateInterface.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\Inflector\\InflectorInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/Inflector/InflectorInterface.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\ReflectionContainer' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/ReflectionContainer.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\ServiceProvider\\AbstractServiceProvider' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/ServiceProvider/AbstractServiceProvider.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\ServiceProvider\\BootableServiceProviderInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/ServiceProvider/BootableServiceProviderInterface.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\ServiceProvider\\ServiceProviderAggregate' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/ServiceProvider/ServiceProviderAggregate.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\ServiceProvider\\ServiceProviderAggregateInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/ServiceProvider/ServiceProviderAggregateInterface.php'
),
'Automattic\\WooCommerce\\Vendor\\League\\Container\\ServiceProvider\\ServiceProviderInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/League/Container/ServiceProvider/ServiceProviderInterface.php'
),
'Automattic\\WooCommerce\\Vendor\\Psr\\Container\\ContainerExceptionInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/Psr/Container/ContainerExceptionInterface.php'
),
'Automattic\\WooCommerce\\Vendor\\Psr\\Container\\ContainerInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/Psr/Container/ContainerInterface.php'
),
'Automattic\\WooCommerce\\Vendor\\Psr\\Container\\NotFoundExceptionInterface' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/lib/packages/Psr/Container/NotFoundExceptionInterface.php'
),
'BatchProcessingControllerTests' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/BatchProcessing/BatchProcessingControllerTests.php'
),
'COTMigrationUtilTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Utilities/COTMigrationUtilTest.php'
),
'COTRedirectionControllerTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Admin/Orders/COTRedirectionControllerTest.php'
),
'ClassWithLoadMethod' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/DependencyManagement/ExampleClasses/ClassWithLoadMethod.php'
),
'ClassWithSingleton' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/DependencyManagement/ExampleClasses/ClassWithSingleton.php'
),
'Composer\\Installers\\AglInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/AglInstaller.php'
),
'Composer\\Installers\\AimeosInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/AimeosInstaller.php'
),
'Composer\\Installers\\AnnotateCmsInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php'
),
'Composer\\Installers\\AsgardInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/AsgardInstaller.php'
),
'Composer\\Installers\\AttogramInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/AttogramInstaller.php'
),
'Composer\\Installers\\BaseInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/BaseInstaller.php'
),
'Composer\\Installers\\BitrixInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/BitrixInstaller.php'
),
'Composer\\Installers\\BonefishInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/BonefishInstaller.php'
),
'Composer\\Installers\\CakePHPInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php'
),
'Composer\\Installers\\ChefInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ChefInstaller.php'
),
'Composer\\Installers\\CiviCrmInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php'
),
'Composer\\Installers\\ClanCatsFrameworkInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php'
),
'Composer\\Installers\\CockpitInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/CockpitInstaller.php'
),
'Composer\\Installers\\CodeIgniterInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php'
),
'Composer\\Installers\\Concrete5Installer' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/Concrete5Installer.php'
),
'Composer\\Installers\\CraftInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/CraftInstaller.php'
),
'Composer\\Installers\\CroogoInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/CroogoInstaller.php'
),
'Composer\\Installers\\DecibelInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/DecibelInstaller.php'
),
'Composer\\Installers\\DframeInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/DframeInstaller.php'
),
'Composer\\Installers\\DokuWikiInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php'
),
'Composer\\Installers\\DolibarrInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php'
),
'Composer\\Installers\\DrupalInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/DrupalInstaller.php'
),
'Composer\\Installers\\ElggInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ElggInstaller.php'
),
'Composer\\Installers\\EliasisInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/EliasisInstaller.php'
),
'Composer\\Installers\\ExpressionEngineInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php'
),
'Composer\\Installers\\EzPlatformInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php'
),
'Composer\\Installers\\FuelInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelInstaller.php'
),
'Composer\\Installers\\FuelphpInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php'
),
'Composer\\Installers\\GravInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/GravInstaller.php'
),
'Composer\\Installers\\HuradInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/HuradInstaller.php'
),
'Composer\\Installers\\ImageCMSInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php'
),
'Composer\\Installers\\Installer' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/Installer.php'
),
'Composer\\Installers\\ItopInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ItopInstaller.php'
),
'Composer\\Installers\\JoomlaInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/JoomlaInstaller.php'
),
'Composer\\Installers\\KanboardInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/KanboardInstaller.php'
),
'Composer\\Installers\\KirbyInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/KirbyInstaller.php'
),
'Composer\\Installers\\KnownInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/KnownInstaller.php'
),
'Composer\\Installers\\KodiCMSInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php'
),
'Composer\\Installers\\KohanaInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/KohanaInstaller.php'
),
'Composer\\Installers\\LanManagementSystemInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php'
),
'Composer\\Installers\\LaravelInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/LaravelInstaller.php'
),
'Composer\\Installers\\LavaLiteInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/LavaLiteInstaller.php'
),
'Composer\\Installers\\LithiumInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/LithiumInstaller.php'
),
'Composer\\Installers\\MODULEWorkInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php'
),
'Composer\\Installers\\MODXEvoInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MODXEvoInstaller.php'
),
'Composer\\Installers\\MagentoInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MagentoInstaller.php'
),
'Composer\\Installers\\MajimaInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MajimaInstaller.php'
),
'Composer\\Installers\\MakoInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MakoInstaller.php'
),
'Composer\\Installers\\MantisBTInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php'
),
'Composer\\Installers\\MauticInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MauticInstaller.php'
),
'Composer\\Installers\\MayaInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MayaInstaller.php'
),
'Composer\\Installers\\MediaWikiInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php'
),
'Composer\\Installers\\MiaoxingInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MiaoxingInstaller.php'
),
'Composer\\Installers\\MicroweberInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MicroweberInstaller.php'
),
'Composer\\Installers\\ModxInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ModxInstaller.php'
),
'Composer\\Installers\\MoodleInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MoodleInstaller.php'
),
'Composer\\Installers\\OctoberInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/OctoberInstaller.php'
),
'Composer\\Installers\\OntoWikiInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/OntoWikiInstaller.php'
),
'Composer\\Installers\\OsclassInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/OsclassInstaller.php'
),
'Composer\\Installers\\OxidInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/OxidInstaller.php'
),
'Composer\\Installers\\PPIInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PPIInstaller.php'
),
'Composer\\Installers\\PantheonInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PantheonInstaller.php'
),
'Composer\\Installers\\PhiftyInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php'
),
'Composer\\Installers\\PhpBBInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php'
),
'Composer\\Installers\\PimcoreInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PimcoreInstaller.php'
),
'Composer\\Installers\\PiwikInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PiwikInstaller.php'
),
'Composer\\Installers\\PlentymarketsInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php'
),
'Composer\\Installers\\Plugin' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/Plugin.php'
),
'Composer\\Installers\\PortoInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PortoInstaller.php'
),
'Composer\\Installers\\PrestashopInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php'
),
'Composer\\Installers\\ProcessWireInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ProcessWireInstaller.php'
),
'Composer\\Installers\\PuppetInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PuppetInstaller.php'
),
'Composer\\Installers\\PxcmsInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php'
),
'Composer\\Installers\\RadPHPInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php'
),
'Composer\\Installers\\ReIndexInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php'
),
'Composer\\Installers\\Redaxo5Installer' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php'
),
'Composer\\Installers\\RedaxoInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php'
),
'Composer\\Installers\\RoundcubeInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php'
),
'Composer\\Installers\\SMFInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/SMFInstaller.php'
),
'Composer\\Installers\\ShopwareInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ShopwareInstaller.php'
),
'Composer\\Installers\\SilverStripeInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php'
),
'Composer\\Installers\\SiteDirectInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/SiteDirectInstaller.php'
),
'Composer\\Installers\\StarbugInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/StarbugInstaller.php'
),
'Composer\\Installers\\SyDESInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/SyDESInstaller.php'
),
'Composer\\Installers\\SyliusInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/SyliusInstaller.php'
),
'Composer\\Installers\\Symfony1Installer' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/Symfony1Installer.php'
),
'Composer\\Installers\\TYPO3CmsInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php'
),
'Composer\\Installers\\TYPO3FlowInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php'
),
'Composer\\Installers\\TaoInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/TaoInstaller.php'
),
'Composer\\Installers\\TastyIgniterInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php'
),
'Composer\\Installers\\TheliaInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/TheliaInstaller.php'
),
'Composer\\Installers\\TuskInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/TuskInstaller.php'
),
'Composer\\Installers\\UserFrostingInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/UserFrostingInstaller.php'
),
'Composer\\Installers\\VanillaInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/VanillaInstaller.php'
),
'Composer\\Installers\\VgmcpInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/VgmcpInstaller.php'
),
'Composer\\Installers\\WHMCSInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/WHMCSInstaller.php'
),
'Composer\\Installers\\WinterInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/WinterInstaller.php'
),
'Composer\\Installers\\WolfCMSInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/WolfCMSInstaller.php'
),
'Composer\\Installers\\WordPressInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/WordPressInstaller.php'
),
'Composer\\Installers\\YawikInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/YawikInstaller.php'
),
'Composer\\Installers\\ZendInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ZendInstaller.php'
),
'Composer\\Installers\\ZikulaInstaller' => array(
'version' => '1.12.0.0',
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php'
),
'Container' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-container.php'
),
'DataSynchronizerTests' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/DataStores/Orders/DataSynchronizerTests.php'
),
'DatabaseUtilTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Utilities/DatabaseUtilTest.php'
),
'EditLockTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Admin/Orders/EditLockTest.php'
),
'Hook_Manager' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-hook-manager.php'
),
'HtmlSanitizerTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Utilities/HtmlSanitizerTest.php'
),
'Jetpack_IXR_Client' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php'
),
'Jetpack_IXR_ClientMulticall' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-ixr-clientmulticall.php'
),
'Jetpack_Options' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-options.php'
),
'Jetpack_Signature' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-signature.php'
),
'Jetpack_Tracks_Client' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-tracks-client.php'
),
'Jetpack_Tracks_Event' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-tracks-event.php'
),
'Jetpack_XMLRPC_Server' => array(
'version' => '1.51.7.0',
'path' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php'
),
'Latest_Autoloader_Guard' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-latest-autoloader-guard.php'
),
'Manifest_Reader' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-manifest-reader.php'
),
'MaxMind\\Db\\Reader' => array(
'version' => '1.11.0.0',
'path' => $vendorDir . '/maxmind-db/reader/src/MaxMind/Db/Reader.php'
),
'MaxMind\\Db\\Reader\\Decoder' => array(
'version' => '1.11.0.0',
'path' => $vendorDir . '/maxmind-db/reader/src/MaxMind/Db/Reader/Decoder.php'
),
'MaxMind\\Db\\Reader\\InvalidDatabaseException' => array(
'version' => '1.11.0.0',
'path' => $vendorDir . '/maxmind-db/reader/src/MaxMind/Db/Reader/InvalidDatabaseException.php'
),
'MaxMind\\Db\\Reader\\Metadata' => array(
'version' => '1.11.0.0',
'path' => $vendorDir . '/maxmind-db/reader/src/MaxMind/Db/Reader/Metadata.php'
),
'MaxMind\\Db\\Reader\\Util' => array(
'version' => '1.11.0.0',
'path' => $vendorDir . '/maxmind-db/reader/src/MaxMind/Db/Reader/Util.php'
),
'MobileMessagingHandlerTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/Orders/MobileMessagingHandlerTest.php'
),
'OrderCacheTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Caching/OrderCacheTest.php'
),
'OrdersTableDataStoreRestOrdersControllerTests' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreRestOrdersControllerTests.php'
),
'OrdersTableDataStoreTests' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php'
),
'OrdersTableQueryTests' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/DataStores/Orders/OrdersTableQueryTests.php'
),
'OrdersTableRefundDataStoreTests' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Internal/DataStores/Orders/OrdersTableRefundDataStoreTests.php'
),
'PHP_Autoloader' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-php-autoloader.php'
),
'Path_Processor' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-path-processor.php'
),
'Pelago\\Emogrifier\\Caching\\SimpleStringCache' => array(
'version' => '6.0.0.0',
'path' => $vendorDir . '/pelago/emogrifier/src/Caching/SimpleStringCache.php'
),
'Pelago\\Emogrifier\\CssInliner' => array(
'version' => '6.0.0.0',
'path' => $vendorDir . '/pelago/emogrifier/src/CssInliner.php'
),
'Pelago\\Emogrifier\\Css\\CssDocument' => array(
'version' => '6.0.0.0',
'path' => $vendorDir . '/pelago/emogrifier/src/Css/CssDocument.php'
),
'Pelago\\Emogrifier\\Css\\StyleRule' => array(
'version' => '6.0.0.0',
'path' => $vendorDir . '/pelago/emogrifier/src/Css/StyleRule.php'
),
'Pelago\\Emogrifier\\HtmlProcessor\\AbstractHtmlProcessor' => array(
'version' => '6.0.0.0',
'path' => $vendorDir . '/pelago/emogrifier/src/HtmlProcessor/AbstractHtmlProcessor.php'
),
'Pelago\\Emogrifier\\HtmlProcessor\\CssToAttributeConverter' => array(
'version' => '6.0.0.0',
'path' => $vendorDir . '/pelago/emogrifier/src/HtmlProcessor/CssToAttributeConverter.php'
),
'Pelago\\Emogrifier\\HtmlProcessor\\HtmlNormalizer' => array(
'version' => '6.0.0.0',
'path' => $vendorDir . '/pelago/emogrifier/src/HtmlProcessor/HtmlNormalizer.php'
),
'Pelago\\Emogrifier\\HtmlProcessor\\HtmlPruner' => array(
'version' => '6.0.0.0',
'path' => $vendorDir . '/pelago/emogrifier/src/HtmlProcessor/HtmlPruner.php'
),
'Pelago\\Emogrifier\\Utilities\\ArrayIntersector' => array(
'version' => '6.0.0.0',
'path' => $vendorDir . '/pelago/emogrifier/src/Utilities/ArrayIntersector.php'
),
'Pelago\\Emogrifier\\Utilities\\CssConcatenator' => array(
'version' => '6.0.0.0',
'path' => $vendorDir . '/pelago/emogrifier/src/Utilities/CssConcatenator.php'
),
'PhpToken' => array(
'version' => '1.28.0.0',
'path' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php'
),
'Plugin_Locator' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-plugin-locator.php'
),
'Plugins_Handler' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-plugins-handler.php'
),
'PostsToOrdersMigrationControllerTest' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/tests/php/src/Database/Migrations/CustomOrderTable/PostsToOrdersMigrationControllerTest.php'
),
'Sabberworm\\CSS\\CSSList\\AtRuleBlockList' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/CSSList/AtRuleBlockList.php'
),
'Sabberworm\\CSS\\CSSList\\CSSBlockList' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/CSSList/CSSBlockList.php'
),
'Sabberworm\\CSS\\CSSList\\CSSList' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/CSSList/CSSList.php'
),
'Sabberworm\\CSS\\CSSList\\Document' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/CSSList/Document.php'
),
'Sabberworm\\CSS\\CSSList\\KeyFrame' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/CSSList/KeyFrame.php'
),
'Sabberworm\\CSS\\Comment\\Comment' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Comment/Comment.php'
),
'Sabberworm\\CSS\\Comment\\Commentable' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Comment/Commentable.php'
),
'Sabberworm\\CSS\\OutputFormat' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/OutputFormat.php'
),
'Sabberworm\\CSS\\OutputFormatter' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/OutputFormatter.php'
),
'Sabberworm\\CSS\\Parser' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Parser.php'
),
'Sabberworm\\CSS\\Parsing\\OutputException' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Parsing/OutputException.php'
),
'Sabberworm\\CSS\\Parsing\\ParserState' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Parsing/ParserState.php'
),
'Sabberworm\\CSS\\Parsing\\SourceException' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Parsing/SourceException.php'
),
'Sabberworm\\CSS\\Parsing\\UnexpectedEOFException' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Parsing/UnexpectedEOFException.php'
),
'Sabberworm\\CSS\\Parsing\\UnexpectedTokenException' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Parsing/UnexpectedTokenException.php'
),
'Sabberworm\\CSS\\Property\\AtRule' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Property/AtRule.php'
),
'Sabberworm\\CSS\\Property\\CSSNamespace' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Property/CSSNamespace.php'
),
'Sabberworm\\CSS\\Property\\Charset' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Property/Charset.php'
),
'Sabberworm\\CSS\\Property\\Import' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Property/Import.php'
),
'Sabberworm\\CSS\\Property\\KeyframeSelector' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Property/KeyframeSelector.php'
),
'Sabberworm\\CSS\\Property\\Selector' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Property/Selector.php'
),
'Sabberworm\\CSS\\Renderable' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Renderable.php'
),
'Sabberworm\\CSS\\RuleSet\\AtRuleSet' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/RuleSet/AtRuleSet.php'
),
'Sabberworm\\CSS\\RuleSet\\DeclarationBlock' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/RuleSet/DeclarationBlock.php'
),
'Sabberworm\\CSS\\RuleSet\\RuleSet' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/RuleSet/RuleSet.php'
),
'Sabberworm\\CSS\\Rule\\Rule' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Rule/Rule.php'
),
'Sabberworm\\CSS\\Settings' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Settings.php'
),
'Sabberworm\\CSS\\Value\\CSSFunction' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Value/CSSFunction.php'
),
'Sabberworm\\CSS\\Value\\CSSString' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Value/CSSString.php'
),
'Sabberworm\\CSS\\Value\\CalcFunction' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Value/CalcFunction.php'
),
'Sabberworm\\CSS\\Value\\CalcRuleValueList' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Value/CalcRuleValueList.php'
),
'Sabberworm\\CSS\\Value\\Color' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Value/Color.php'
),
'Sabberworm\\CSS\\Value\\LineName' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Value/LineName.php'
),
'Sabberworm\\CSS\\Value\\PrimitiveValue' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Value/PrimitiveValue.php'
),
'Sabberworm\\CSS\\Value\\RuleValueList' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Value/RuleValueList.php'
),
'Sabberworm\\CSS\\Value\\Size' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Value/Size.php'
),
'Sabberworm\\CSS\\Value\\URL' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Value/URL.php'
),
'Sabberworm\\CSS\\Value\\Value' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Value/Value.php'
),
'Sabberworm\\CSS\\Value\\ValueList' => array(
'version' => '8.4.0.0',
'path' => $vendorDir . '/sabberworm/php-css-parser/src/Value/ValueList.php'
),
'Shutdown_Handler' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-shutdown-handler.php'
),
'Stringable' => array(
'version' => '1.28.0.0',
'path' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php'
),
'Symfony\\Component\\CssSelector\\CssSelectorConverter' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/CssSelectorConverter.php'
),
'Symfony\\Component\\CssSelector\\Exception\\ExceptionInterface' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Exception/ExceptionInterface.php'
),
'Symfony\\Component\\CssSelector\\Exception\\ExpressionErrorException' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Exception/ExpressionErrorException.php'
),
'Symfony\\Component\\CssSelector\\Exception\\InternalErrorException' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Exception/InternalErrorException.php'
),
'Symfony\\Component\\CssSelector\\Exception\\ParseException' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Exception/ParseException.php'
),
'Symfony\\Component\\CssSelector\\Exception\\SyntaxErrorException' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Exception/SyntaxErrorException.php'
),
'Symfony\\Component\\CssSelector\\Node\\AbstractNode' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Node/AbstractNode.php'
),
'Symfony\\Component\\CssSelector\\Node\\AttributeNode' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Node/AttributeNode.php'
),
'Symfony\\Component\\CssSelector\\Node\\ClassNode' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Node/ClassNode.php'
),
'Symfony\\Component\\CssSelector\\Node\\CombinedSelectorNode' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Node/CombinedSelectorNode.php'
),
'Symfony\\Component\\CssSelector\\Node\\ElementNode' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Node/ElementNode.php'
),
'Symfony\\Component\\CssSelector\\Node\\FunctionNode' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Node/FunctionNode.php'
),
'Symfony\\Component\\CssSelector\\Node\\HashNode' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Node/HashNode.php'
),
'Symfony\\Component\\CssSelector\\Node\\NegationNode' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Node/NegationNode.php'
),
'Symfony\\Component\\CssSelector\\Node\\NodeInterface' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Node/NodeInterface.php'
),
'Symfony\\Component\\CssSelector\\Node\\PseudoNode' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Node/PseudoNode.php'
),
'Symfony\\Component\\CssSelector\\Node\\SelectorNode' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Node/SelectorNode.php'
),
'Symfony\\Component\\CssSelector\\Node\\Specificity' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Node/Specificity.php'
),
'Symfony\\Component\\CssSelector\\Parser\\Handler\\CommentHandler' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/Handler/CommentHandler.php'
),
'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/Handler/HandlerInterface.php'
),
'Symfony\\Component\\CssSelector\\Parser\\Handler\\HashHandler' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/Handler/HashHandler.php'
),
'Symfony\\Component\\CssSelector\\Parser\\Handler\\IdentifierHandler' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/Handler/IdentifierHandler.php'
),
'Symfony\\Component\\CssSelector\\Parser\\Handler\\NumberHandler' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/Handler/NumberHandler.php'
),
'Symfony\\Component\\CssSelector\\Parser\\Handler\\StringHandler' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/Handler/StringHandler.php'
),
'Symfony\\Component\\CssSelector\\Parser\\Handler\\WhitespaceHandler' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/Handler/WhitespaceHandler.php'
),
'Symfony\\Component\\CssSelector\\Parser\\Parser' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/Parser.php'
),
'Symfony\\Component\\CssSelector\\Parser\\ParserInterface' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/ParserInterface.php'
),
'Symfony\\Component\\CssSelector\\Parser\\Reader' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/Reader.php'
),
'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\ClassParser' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/Shortcut/ClassParser.php'
),
'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\ElementParser' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/Shortcut/ElementParser.php'
),
'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\EmptyStringParser' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/Shortcut/EmptyStringParser.php'
),
'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\HashParser' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/Shortcut/HashParser.php'
),
'Symfony\\Component\\CssSelector\\Parser\\Token' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/Token.php'
),
'Symfony\\Component\\CssSelector\\Parser\\TokenStream' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/TokenStream.php'
),
'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\Tokenizer' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/Tokenizer/Tokenizer.php'
),
'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\TokenizerEscaping' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/Tokenizer/TokenizerEscaping.php'
),
'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\TokenizerPatterns' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/Parser/Tokenizer/TokenizerPatterns.php'
),
'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/XPath/Extension/AbstractExtension.php'
),
'Symfony\\Component\\CssSelector\\XPath\\Extension\\AttributeMatchingExtension' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php'
),
'Symfony\\Component\\CssSelector\\XPath\\Extension\\CombinationExtension' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/XPath/Extension/CombinationExtension.php'
),
'Symfony\\Component\\CssSelector\\XPath\\Extension\\ExtensionInterface' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/XPath/Extension/ExtensionInterface.php'
),
'Symfony\\Component\\CssSelector\\XPath\\Extension\\FunctionExtension' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/XPath/Extension/FunctionExtension.php'
),
'Symfony\\Component\\CssSelector\\XPath\\Extension\\HtmlExtension' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/XPath/Extension/HtmlExtension.php'
),
'Symfony\\Component\\CssSelector\\XPath\\Extension\\NodeExtension' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/XPath/Extension/NodeExtension.php'
),
'Symfony\\Component\\CssSelector\\XPath\\Extension\\PseudoClassExtension' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/XPath/Extension/PseudoClassExtension.php'
),
'Symfony\\Component\\CssSelector\\XPath\\Translator' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/XPath/Translator.php'
),
'Symfony\\Component\\CssSelector\\XPath\\TranslatorInterface' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/XPath/TranslatorInterface.php'
),
'Symfony\\Component\\CssSelector\\XPath\\XPathExpr' => array(
'version' => '5.4.26.0',
'path' => $vendorDir . '/symfony/css-selector/XPath/XPathExpr.php'
),
'Symfony\\Polyfill\\Php80\\Php80' => array(
'version' => '1.28.0.0',
'path' => $vendorDir . '/symfony/polyfill-php80/Php80.php'
),
'Symfony\\Polyfill\\Php80\\PhpToken' => array(
'version' => '1.28.0.0',
'path' => $vendorDir . '/symfony/polyfill-php80/PhpToken.php'
),
'UnhandledMatchError' => array(
'version' => '1.28.0.0',
'path' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php'
),
'ValueError' => array(
'version' => '1.28.0.0',
'path' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php'
),
'Version_Loader' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-version-loader.php'
),
'Version_Selector' => array(
'version' => '2.11.18.0',
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-version-selector.php'
),
'WC_Interactivity_Store' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/Interactivity/class-wc-interactivity-store.php'
),
'WC_REST_CRUD_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-crud-controller.php'
),
'WC_REST_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-controller.php'
),
'WC_REST_Coupons_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-coupons-controller.php'
),
'WC_REST_Coupons_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-coupons-v1-controller.php'
),
'WC_REST_Coupons_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-coupons-v2-controller.php'
),
'WC_REST_Customer_Downloads_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-customer-downloads-controller.php'
),
'WC_REST_Customer_Downloads_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-customer-downloads-v1-controller.php'
),
'WC_REST_Customer_Downloads_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-customer-downloads-v2-controller.php'
),
'WC_REST_Customers_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-customers-controller.php'
),
'WC_REST_Customers_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-customers-v1-controller.php'
),
'WC_REST_Customers_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-customers-v2-controller.php'
),
'WC_REST_Data_Continents_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-data-continents-controller.php'
),
'WC_REST_Data_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-data-controller.php'
),
'WC_REST_Data_Countries_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-data-countries-controller.php'
),
'WC_REST_Data_Currencies_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-data-currencies-controller.php'
),
'WC_REST_Network_Orders_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-network-orders-controller.php'
),
'WC_REST_Network_Orders_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-network-orders-v2-controller.php'
),
'WC_REST_Order_Notes_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-order-notes-controller.php'
),
'WC_REST_Order_Notes_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-order-notes-v1-controller.php'
),
'WC_REST_Order_Notes_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-order-notes-v2-controller.php'
),
'WC_REST_Order_Refunds_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-order-refunds-controller.php'
),
'WC_REST_Order_Refunds_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-order-refunds-v1-controller.php'
),
'WC_REST_Order_Refunds_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-order-refunds-v2-controller.php'
),
'WC_REST_Orders_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-orders-controller.php'
),
'WC_REST_Orders_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-orders-v1-controller.php'
),
'WC_REST_Orders_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php'
),
'WC_REST_Payment_Gateways_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-payment-gateways-controller.php'
),
'WC_REST_Payment_Gateways_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-payment-gateways-v2-controller.php'
),
'WC_REST_Posts_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-posts-controller.php'
),
'WC_REST_Product_Attribute_Terms_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-product-attribute-terms-controller.php'
),
'WC_REST_Product_Attribute_Terms_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-product-attribute-terms-v1-controller.php'
),
'WC_REST_Product_Attribute_Terms_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-product-attribute-terms-v2-controller.php'
),
'WC_REST_Product_Attributes_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-product-attributes-controller.php'
),
'WC_REST_Product_Attributes_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-product-attributes-v1-controller.php'
),
'WC_REST_Product_Attributes_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-product-attributes-v2-controller.php'
),
'WC_REST_Product_Categories_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-product-categories-controller.php'
),
'WC_REST_Product_Categories_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-product-categories-v1-controller.php'
),
'WC_REST_Product_Categories_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-product-categories-v2-controller.php'
),
'WC_REST_Product_Reviews_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-product-reviews-controller.php'
),
'WC_REST_Product_Reviews_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-product-reviews-v1-controller.php'
),
'WC_REST_Product_Reviews_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-product-reviews-v2-controller.php'
),
'WC_REST_Product_Shipping_Classes_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-product-shipping-classes-controller.php'
),
'WC_REST_Product_Shipping_Classes_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-product-shipping-classes-v1-controller.php'
),
'WC_REST_Product_Shipping_Classes_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-product-shipping-classes-v2-controller.php'
),
'WC_REST_Product_Tags_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-product-tags-controller.php'
),
'WC_REST_Product_Tags_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-product-tags-v1-controller.php'
),
'WC_REST_Product_Tags_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-product-tags-v2-controller.php'
),
'WC_REST_Product_Variations_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php'
),
'WC_REST_Product_Variations_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-product-variations-v2-controller.php'
),
'WC_REST_Products_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php'
),
'WC_REST_Products_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-products-v1-controller.php'
),
'WC_REST_Products_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-products-v2-controller.php'
),
'WC_REST_Report_Coupons_Totals_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-report-coupons-totals-controller.php'
),
'WC_REST_Report_Customers_Totals_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-report-customers-totals-controller.php'
),
'WC_REST_Report_Orders_Totals_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-report-orders-totals-controller.php'
),
'WC_REST_Report_Products_Totals_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-report-products-totals-controller.php'
),
'WC_REST_Report_Reviews_Totals_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-report-reviews-totals-controller.php'
),
'WC_REST_Report_Sales_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-report-sales-controller.php'
),
'WC_REST_Report_Sales_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-report-sales-v1-controller.php'
),
'WC_REST_Report_Sales_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-report-sales-v2-controller.php'
),
'WC_REST_Report_Top_Sellers_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-report-top-sellers-controller.php'
),
'WC_REST_Report_Top_Sellers_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-report-top-sellers-v1-controller.php'
),
'WC_REST_Report_Top_Sellers_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-report-top-sellers-v2-controller.php'
),
'WC_REST_Reports_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-reports-controller.php'
),
'WC_REST_Reports_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-reports-v1-controller.php'
),
'WC_REST_Reports_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-reports-v2-controller.php'
),
'WC_REST_Setting_Options_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-setting-options-controller.php'
),
'WC_REST_Setting_Options_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-setting-options-v2-controller.php'
),
'WC_REST_Settings_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-settings-controller.php'
),
'WC_REST_Settings_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-settings-v2-controller.php'
),
'WC_REST_Shipping_Methods_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-shipping-methods-controller.php'
),
'WC_REST_Shipping_Methods_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-shipping-methods-v2-controller.php'
),
'WC_REST_Shipping_Zone_Locations_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-shipping-zone-locations-controller.php'
),
'WC_REST_Shipping_Zone_Locations_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-shipping-zone-locations-v2-controller.php'
),
'WC_REST_Shipping_Zone_Methods_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-shipping-zone-methods-controller.php'
),
'WC_REST_Shipping_Zone_Methods_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-shipping-zone-methods-v2-controller.php'
),
'WC_REST_Shipping_Zones_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-shipping-zones-controller.php'
),
'WC_REST_Shipping_Zones_Controller_Base' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-shipping-zones-controller-base.php'
),
'WC_REST_Shipping_Zones_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-shipping-zones-v2-controller.php'
),
'WC_REST_System_Status_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-system-status-controller.php'
),
'WC_REST_System_Status_Tools_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-system-status-tools-controller.php'
),
'WC_REST_System_Status_Tools_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-system-status-tools-v2-controller.php'
),
'WC_REST_System_Status_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-system-status-v2-controller.php'
),
'WC_REST_Tax_Classes_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-tax-classes-controller.php'
),
'WC_REST_Tax_Classes_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-tax-classes-v1-controller.php'
),
'WC_REST_Tax_Classes_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-tax-classes-v2-controller.php'
),
'WC_REST_Taxes_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-taxes-controller.php'
),
'WC_REST_Taxes_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-taxes-v1-controller.php'
),
'WC_REST_Taxes_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-taxes-v2-controller.php'
),
'WC_REST_Telemetry_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Telemetry/class-wc-rest-telemetry-controller.php'
),
'WC_REST_Terms_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-terms-controller.php'
),
'WC_REST_Webhook_Deliveries_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-webhook-deliveries-v1-controller.php'
),
'WC_REST_Webhook_Deliveries_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-webhook-deliveries-v2-controller.php'
),
'WC_REST_Webhooks_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version3/class-wc-rest-webhooks-controller.php'
),
'WC_REST_Webhooks_V1_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version1/class-wc-rest-webhooks-v1-controller.php'
),
'WC_REST_Webhooks_V2_Controller' => array(
'version' => '8.2.0.0',
'path' => $baseDir . '/includes/rest-api/Controllers/Version2/class-wc-rest-webhooks-v2-controller.php'
),
);
composer/jetpack_autoload_filemap.php 0000644 00000001220 15153552362 0014114 0 ustar 00 <?php
// This file `jetpack_autoload_filemap.php` was auto generated by automattic/jetpack-autoloader.
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'a4a119a56e50fbb293281d9a48007e0e' => array(
'version' => '1.28.0.0',
'path' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php'
),
'fcd5d7d87e03ff4f5b5a66c2b8968671' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/deprecated.php'
),
'd0f16a186498c2ba04f1d0064fecf9cf' => array(
'version' => '11.1.2.0',
'path' => $baseDir . '/packages/woocommerce-blocks/src/StoreApi/functions.php'
),
);
jetpack-autoloader/class-autoloader-handler.php 0000644 00000010767 15153552362 0015732 0 ustar 00 <?php
/**
* This file was automatically generated by automattic/jetpack-autoloader.
*
* @package automattic/jetpack-autoloader
*/
namespace Automattic\Jetpack\Autoloader\jp865e0ff1636ff8bf9d922e869851562a;
// phpcs:ignore
use Automattic\Jetpack\Autoloader\AutoloadGenerator;
/**
* This class selects the package version for the autoloader.
*/
class Autoloader_Handler {
/**
* The PHP_Autoloader instance.
*
* @var PHP_Autoloader
*/
private $php_autoloader;
/**
* The Hook_Manager instance.
*
* @var Hook_Manager
*/
private $hook_manager;
/**
* The Manifest_Reader instance.
*
* @var Manifest_Reader
*/
private $manifest_reader;
/**
* The Version_Selector instance.
*
* @var Version_Selector
*/
private $version_selector;
/**
* The constructor.
*
* @param PHP_Autoloader $php_autoloader The PHP_Autoloader instance.
* @param Hook_Manager $hook_manager The Hook_Manager instance.
* @param Manifest_Reader $manifest_reader The Manifest_Reader instance.
* @param Version_Selector $version_selector The Version_Selector instance.
*/
public function __construct( $php_autoloader, $hook_manager, $manifest_reader, $version_selector ) {
$this->php_autoloader = $php_autoloader;
$this->hook_manager = $hook_manager;
$this->manifest_reader = $manifest_reader;
$this->version_selector = $version_selector;
}
/**
* Checks to see whether or not an autoloader is currently in the process of initializing.
*
* @return bool
*/
public function is_initializing() {
// If no version has been set it means that no autoloader has started initializing yet.
global $jetpack_autoloader_latest_version;
if ( ! isset( $jetpack_autoloader_latest_version ) ) {
return false;
}
// When the version is set but the classmap is not it ALWAYS means that this is the
// latest autoloader and is being included by an older one.
global $jetpack_packages_classmap;
if ( empty( $jetpack_packages_classmap ) ) {
return true;
}
// Version 2.4.0 added a new global and altered the reset semantics. We need to check
// the other global as well since it may also point at initialization.
// Note: We don't need to check for the class first because every autoloader that
// will set the latest version global requires this class in the classmap.
$replacing_version = $jetpack_packages_classmap[ AutoloadGenerator::class ]['version'];
if ( $this->version_selector->is_dev_version( $replacing_version ) || version_compare( $replacing_version, '2.4.0.0', '>=' ) ) {
global $jetpack_autoloader_loader;
if ( ! isset( $jetpack_autoloader_loader ) ) {
return true;
}
}
return false;
}
/**
* Activates an autoloader using the given plugins and activates it.
*
* @param string[] $plugins The plugins to initialize the autoloader for.
*/
public function activate_autoloader( $plugins ) {
global $jetpack_packages_psr4;
$jetpack_packages_psr4 = array();
$this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_psr4.php', $jetpack_packages_psr4 );
global $jetpack_packages_classmap;
$jetpack_packages_classmap = array();
$this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_classmap.php', $jetpack_packages_classmap );
global $jetpack_packages_filemap;
$jetpack_packages_filemap = array();
$this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_filemap.php', $jetpack_packages_filemap );
$loader = new Version_Loader(
$this->version_selector,
$jetpack_packages_classmap,
$jetpack_packages_psr4,
$jetpack_packages_filemap
);
$this->php_autoloader->register_autoloader( $loader );
// Now that the autoloader is active we can load the filemap.
$loader->load_filemap();
}
/**
* Resets the active autoloader and all related global state.
*/
public function reset_autoloader() {
$this->php_autoloader->unregister_autoloader();
$this->hook_manager->reset();
// Clear all of the autoloader globals so that older autoloaders don't do anything strange.
global $jetpack_autoloader_latest_version;
$jetpack_autoloader_latest_version = null;
global $jetpack_packages_classmap;
$jetpack_packages_classmap = array(); // Must be array to avoid exceptions in old autoloaders!
global $jetpack_packages_psr4;
$jetpack_packages_psr4 = array(); // Must be array to avoid exceptions in old autoloaders!
global $jetpack_packages_filemap;
$jetpack_packages_filemap = array(); // Must be array to avoid exceptions in old autoloaders!
}
}
jetpack-autoloader/class-autoloader-locator.php 0000644 00000004120 15153552362 0015742 0 ustar 00 <?php
/**
* This file was automatically generated by automattic/jetpack-autoloader.
*
* @package automattic/jetpack-autoloader
*/
namespace Automattic\Jetpack\Autoloader\jp865e0ff1636ff8bf9d922e869851562a;
// phpcs:ignore
use Automattic\Jetpack\Autoloader\AutoloadGenerator;
/**
* This class locates autoloaders.
*/
class Autoloader_Locator {
/**
* The object for comparing autoloader versions.
*
* @var Version_Selector
*/
private $version_selector;
/**
* The constructor.
*
* @param Version_Selector $version_selector The version selector object.
*/
public function __construct( $version_selector ) {
$this->version_selector = $version_selector;
}
/**
* Finds the path to the plugin with the latest autoloader.
*
* @param array $plugin_paths An array of plugin paths.
* @param string $latest_version The latest version reference.
*
* @return string|null
*/
public function find_latest_autoloader( $plugin_paths, &$latest_version ) {
$latest_plugin = null;
foreach ( $plugin_paths as $plugin_path ) {
$version = $this->get_autoloader_version( $plugin_path );
if ( ! $this->version_selector->is_version_update_required( $latest_version, $version ) ) {
continue;
}
$latest_version = $version;
$latest_plugin = $plugin_path;
}
return $latest_plugin;
}
/**
* Gets the path to the autoloader.
*
* @param string $plugin_path The path to the plugin.
*
* @return string
*/
public function get_autoloader_path( $plugin_path ) {
return trailingslashit( $plugin_path ) . 'vendor/autoload_packages.php';
}
/**
* Gets the version for the autoloader.
*
* @param string $plugin_path The path to the plugin.
*
* @return string|null
*/
public function get_autoloader_version( $plugin_path ) {
$classmap = trailingslashit( $plugin_path ) . 'vendor/composer/jetpack_autoload_classmap.php';
if ( ! file_exists( $classmap ) ) {
return null;
}
$classmap = require $classmap;
if ( isset( $classmap[ AutoloadGenerator::class ] ) ) {
return $classmap[ AutoloadGenerator::class ]['version'];
}
return null;
}
}
jetpack-autoloader/class-autoloader.php 0000644 00000010075 15153552362 0014307 0 ustar 00 <?php
/**
* This file was automatically generated by automattic/jetpack-autoloader.
*
* @package automattic/jetpack-autoloader
*/
namespace Automattic\Jetpack\Autoloader\jp865e0ff1636ff8bf9d922e869851562a;
// phpcs:ignore
/**
* This class handles management of the actual PHP autoloader.
*/
class Autoloader {
/**
* Checks to see whether or not the autoloader should be initialized and then initializes it if so.
*
* @param Container|null $container The container we want to use for autoloader initialization. If none is given
* then a container will be created automatically.
*/
public static function init( $container = null ) {
// The container holds and manages the lifecycle of our dependencies
// to make them easier to work with and increase flexibility.
if ( ! isset( $container ) ) {
require_once __DIR__ . '/class-container.php';
$container = new Container();
}
// phpcs:disable Generic.Commenting.DocComment.MissingShort
/** @var Autoloader_Handler $autoloader_handler */
$autoloader_handler = $container->get( Autoloader_Handler::class );
// If the autoloader is already initializing it means that it has included us as the latest.
$was_included_by_autoloader = $autoloader_handler->is_initializing();
/** @var Plugin_Locator $plugin_locator */
$plugin_locator = $container->get( Plugin_Locator::class );
/** @var Plugins_Handler $plugins_handler */
$plugins_handler = $container->get( Plugins_Handler::class );
// The current plugin is the one that we are attempting to initialize here.
$current_plugin = $plugin_locator->find_current_plugin();
// The active plugins are those that we were able to discover on the site. This list will not
// include mu-plugins, those activated by code, or those who are hidden by filtering. We also
// want to take care to not consider the current plugin unknown if it was included by an
// autoloader. This avoids the case where a plugin will be marked "active" while deactivated
// due to it having the latest autoloader.
$active_plugins = $plugins_handler->get_active_plugins( true, ! $was_included_by_autoloader );
// The cached plugins are all of those that were active or discovered by the autoloader during a previous request.
// Note that it's possible this list will include plugins that have since been deactivated, but after a request
// the cache should be updated and the deactivated plugins will be removed.
$cached_plugins = $plugins_handler->get_cached_plugins();
// We combine the active list and cached list to preemptively load classes for plugins that are
// presently unknown but will be loaded during the request. While this may result in us considering packages in
// deactivated plugins there shouldn't be any problems as a result and the eventual consistency is sufficient.
$all_plugins = array_merge( $active_plugins, $cached_plugins );
// In particular we also include the current plugin to address the case where it is the latest autoloader
// but also unknown (and not cached). We don't want it in the active list because we don't know that it
// is active but we need it in the all plugins list so that it is considered by the autoloader.
$all_plugins[] = $current_plugin;
// We require uniqueness in the array to avoid processing the same plugin more than once.
$all_plugins = array_values( array_unique( $all_plugins ) );
/** @var Latest_Autoloader_Guard $guard */
$guard = $container->get( Latest_Autoloader_Guard::class );
if ( $guard->should_stop_init( $current_plugin, $all_plugins, $was_included_by_autoloader ) ) {
return;
}
// Initialize the autoloader using the handler now that we're ready.
$autoloader_handler->activate_autoloader( $all_plugins );
/** @var Hook_Manager $hook_manager */
$hook_manager = $container->get( Hook_Manager::class );
// Register a shutdown handler to clean up the autoloader.
$hook_manager->add_action( 'shutdown', new Shutdown_Handler( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) );
// phpcs:enable Generic.Commenting.DocComment.MissingShort
}
}
jetpack-autoloader/class-container.php 0000644 00000011461 15153552362 0014132 0 ustar 00 <?php
/**
* This file was automatically generated by automattic/jetpack-autoloader.
*
* @package automattic/jetpack-autoloader
*/
namespace Automattic\Jetpack\Autoloader\jp865e0ff1636ff8bf9d922e869851562a;
// phpcs:ignore
/**
* This class manages the files and dependencies of the autoloader.
*/
class Container {
/**
* Since each autoloader's class files exist within their own namespace we need a map to
* convert between the local class and a shared key. Note that no version checking is
* performed on these dependencies and the first autoloader to register will be the
* one that is utilized.
*/
const SHARED_DEPENDENCY_KEYS = array(
Hook_Manager::class => 'Hook_Manager',
);
/**
* A map of all the dependencies we've registered with the container and created.
*
* @var array
*/
protected $dependencies;
/**
* The constructor.
*/
public function __construct() {
$this->dependencies = array();
$this->register_shared_dependencies();
$this->register_dependencies();
$this->initialize_globals();
}
/**
* Gets a dependency out of the container.
*
* @param string $class The class to fetch.
*
* @return mixed
* @throws \InvalidArgumentException When a class that isn't registered with the container is fetched.
*/
public function get( $class ) {
if ( ! isset( $this->dependencies[ $class ] ) ) {
throw new \InvalidArgumentException( "Class '$class' is not registered with the container." );
}
return $this->dependencies[ $class ];
}
/**
* Registers all of the dependencies that are shared between all instances of the autoloader.
*/
private function register_shared_dependencies() {
global $jetpack_autoloader_container_shared;
if ( ! isset( $jetpack_autoloader_container_shared ) ) {
$jetpack_autoloader_container_shared = array();
}
$key = self::SHARED_DEPENDENCY_KEYS[ Hook_Manager::class ];
if ( ! isset( $jetpack_autoloader_container_shared[ $key ] ) ) {
require_once __DIR__ . '/class-hook-manager.php';
$jetpack_autoloader_container_shared[ $key ] = new Hook_Manager();
}
$this->dependencies[ Hook_Manager::class ] = &$jetpack_autoloader_container_shared[ $key ];
}
/**
* Registers all of the dependencies with the container.
*/
private function register_dependencies() {
require_once __DIR__ . '/class-path-processor.php';
$this->dependencies[ Path_Processor::class ] = new Path_Processor();
require_once __DIR__ . '/class-plugin-locator.php';
$this->dependencies[ Plugin_Locator::class ] = new Plugin_Locator(
$this->get( Path_Processor::class )
);
require_once __DIR__ . '/class-version-selector.php';
$this->dependencies[ Version_Selector::class ] = new Version_Selector();
require_once __DIR__ . '/class-autoloader-locator.php';
$this->dependencies[ Autoloader_Locator::class ] = new Autoloader_Locator(
$this->get( Version_Selector::class )
);
require_once __DIR__ . '/class-php-autoloader.php';
$this->dependencies[ PHP_Autoloader::class ] = new PHP_Autoloader();
require_once __DIR__ . '/class-manifest-reader.php';
$this->dependencies[ Manifest_Reader::class ] = new Manifest_Reader(
$this->get( Version_Selector::class )
);
require_once __DIR__ . '/class-plugins-handler.php';
$this->dependencies[ Plugins_Handler::class ] = new Plugins_Handler(
$this->get( Plugin_Locator::class ),
$this->get( Path_Processor::class )
);
require_once __DIR__ . '/class-autoloader-handler.php';
$this->dependencies[ Autoloader_Handler::class ] = new Autoloader_Handler(
$this->get( PHP_Autoloader::class ),
$this->get( Hook_Manager::class ),
$this->get( Manifest_Reader::class ),
$this->get( Version_Selector::class )
);
require_once __DIR__ . '/class-latest-autoloader-guard.php';
$this->dependencies[ Latest_Autoloader_Guard::class ] = new Latest_Autoloader_Guard(
$this->get( Plugins_Handler::class ),
$this->get( Autoloader_Handler::class ),
$this->get( Autoloader_Locator::class )
);
// Register any classes that we will use elsewhere.
require_once __DIR__ . '/class-version-loader.php';
require_once __DIR__ . '/class-shutdown-handler.php';
}
/**
* Initializes any of the globals needed by the autoloader.
*/
private function initialize_globals() {
/*
* This global was retired in version 2.9. The value is set to 'false' to maintain
* compatibility with older versions of the autoloader.
*/
global $jetpack_autoloader_including_latest;
$jetpack_autoloader_including_latest = false;
// Not all plugins can be found using the locator. In cases where a plugin loads the autoloader
// but was not discoverable, we will record them in this array to track them as "active".
global $jetpack_autoloader_activating_plugins_paths;
if ( ! isset( $jetpack_autoloader_activating_plugins_paths ) ) {
$jetpack_autoloader_activating_plugins_paths = array();
}
}
}
jetpack-autoloader/class-hook-manager.php 0000644 00000004145 15153552362 0014521 0 ustar 00 <?php
/**
* This file was automatically generated by automattic/jetpack-autoloader.
*
* @package automattic/jetpack-autoloader
*/
namespace Automattic\Jetpack\Autoloader\jp865e0ff1636ff8bf9d922e869851562a;
// phpcs:ignore
/**
* Allows the latest autoloader to register hooks that can be removed when the autoloader is reset.
*/
class Hook_Manager {
/**
* An array containing all of the hooks that we've registered.
*
* @var array
*/
private $registered_hooks;
/**
* The constructor.
*/
public function __construct() {
$this->registered_hooks = array();
}
/**
* Adds an action to WordPress and registers it internally.
*
* @param string $tag The name of the action which is hooked.
* @param callable $callable The function to call.
* @param int $priority Used to specify the priority of the action.
* @param int $accepted_args Used to specify the number of arguments the callable accepts.
*/
public function add_action( $tag, $callable, $priority = 10, $accepted_args = 1 ) {
$this->registered_hooks[ $tag ][] = array(
'priority' => $priority,
'callable' => $callable,
);
add_action( $tag, $callable, $priority, $accepted_args );
}
/**
* Adds a filter to WordPress and registers it internally.
*
* @param string $tag The name of the filter which is hooked.
* @param callable $callable The function to call.
* @param int $priority Used to specify the priority of the filter.
* @param int $accepted_args Used to specify the number of arguments the callable accepts.
*/
public function add_filter( $tag, $callable, $priority = 10, $accepted_args = 1 ) {
$this->registered_hooks[ $tag ][] = array(
'priority' => $priority,
'callable' => $callable,
);
add_filter( $tag, $callable, $priority, $accepted_args );
}
/**
* Removes all of the registered hooks.
*/
public function reset() {
foreach ( $this->registered_hooks as $tag => $hooks ) {
foreach ( $hooks as $hook ) {
remove_filter( $tag, $hook['callable'], $hook['priority'] );
}
}
$this->registered_hooks = array();
}
}
jetpack-autoloader/class-latest-autoloader-guard.php 0000644 00000005364 15153552362 0016706 0 ustar 00 <?php
/**
* This file was automatically generated by automattic/jetpack-autoloader.
*
* @package automattic/jetpack-autoloader
*/
namespace Automattic\Jetpack\Autoloader\jp865e0ff1636ff8bf9d922e869851562a;
// phpcs:ignore
/**
* This class ensures that we're only executing the latest autoloader.
*/
class Latest_Autoloader_Guard {
/**
* The Plugins_Handler instance.
*
* @var Plugins_Handler
*/
private $plugins_handler;
/**
* The Autoloader_Handler instance.
*
* @var Autoloader_Handler
*/
private $autoloader_handler;
/**
* The Autoloader_locator instance.
*
* @var Autoloader_Locator
*/
private $autoloader_locator;
/**
* The constructor.
*
* @param Plugins_Handler $plugins_handler The Plugins_Handler instance.
* @param Autoloader_Handler $autoloader_handler The Autoloader_Handler instance.
* @param Autoloader_Locator $autoloader_locator The Autoloader_Locator instance.
*/
public function __construct( $plugins_handler, $autoloader_handler, $autoloader_locator ) {
$this->plugins_handler = $plugins_handler;
$this->autoloader_handler = $autoloader_handler;
$this->autoloader_locator = $autoloader_locator;
}
/**
* Indicates whether or not the autoloader should be initialized. Note that this function
* has the side-effect of actually loading the latest autoloader in the event that this
* is not it.
*
* @param string $current_plugin The current plugin we're checking.
* @param string[] $plugins The active plugins to check for autoloaders in.
* @param bool $was_included_by_autoloader Indicates whether or not this autoloader was included by another.
*
* @return bool True if we should stop initialization, otherwise false.
*/
public function should_stop_init( $current_plugin, $plugins, $was_included_by_autoloader ) {
global $jetpack_autoloader_latest_version;
// We need to reset the autoloader when the plugins change because
// that means the autoloader was generated with a different list.
if ( $this->plugins_handler->have_plugins_changed( $plugins ) ) {
$this->autoloader_handler->reset_autoloader();
}
// When the latest autoloader has already been found we don't need to search for it again.
// We should take care however because this will also trigger if the autoloader has been
// included by an older one.
if ( isset( $jetpack_autoloader_latest_version ) && ! $was_included_by_autoloader ) {
return true;
}
$latest_plugin = $this->autoloader_locator->find_latest_autoloader( $plugins, $jetpack_autoloader_latest_version );
if ( isset( $latest_plugin ) && $latest_plugin !== $current_plugin ) {
require $this->autoloader_locator->get_autoloader_path( $latest_plugin );
return true;
}
return false;
}
}
jetpack-autoloader/class-manifest-reader.php 0000644 00000005175 15153552362 0015223 0 ustar 00 <?php
/**
* This file was automatically generated by automattic/jetpack-autoloader.
*
* @package automattic/jetpack-autoloader
*/
namespace Automattic\Jetpack\Autoloader\jp865e0ff1636ff8bf9d922e869851562a;
// phpcs:ignore
/**
* This class reads autoloader manifest files.
*/
class Manifest_Reader {
/**
* The Version_Selector object.
*
* @var Version_Selector
*/
private $version_selector;
/**
* The constructor.
*
* @param Version_Selector $version_selector The Version_Selector object.
*/
public function __construct( $version_selector ) {
$this->version_selector = $version_selector;
}
/**
* Reads all of the manifests in the given plugin paths.
*
* @param array $plugin_paths The paths to the plugins we're loading the manifest in.
* @param string $manifest_path The path that we're loading the manifest from in each plugin.
* @param array $path_map The path map to add the contents of the manifests to.
*
* @return array $path_map The path map we've built using the manifests in each plugin.
*/
public function read_manifests( $plugin_paths, $manifest_path, &$path_map ) {
$file_paths = array_map(
function ( $path ) use ( $manifest_path ) {
return trailingslashit( $path ) . $manifest_path;
},
$plugin_paths
);
foreach ( $file_paths as $path ) {
$this->register_manifest( $path, $path_map );
}
return $path_map;
}
/**
* Registers a plugin's manifest file with the path map.
*
* @param string $manifest_path The absolute path to the manifest that we're loading.
* @param array $path_map The path map to add the contents of the manifest to.
*/
protected function register_manifest( $manifest_path, &$path_map ) {
if ( ! is_readable( $manifest_path ) ) {
return;
}
$manifest = require $manifest_path;
if ( ! is_array( $manifest ) ) {
return;
}
foreach ( $manifest as $key => $data ) {
$this->register_record( $key, $data, $path_map );
}
}
/**
* Registers an entry from the manifest in the path map.
*
* @param string $key The identifier for the entry we're registering.
* @param array $data The data for the entry we're registering.
* @param array $path_map The path map to add the contents of the manifest to.
*/
protected function register_record( $key, $data, &$path_map ) {
if ( isset( $path_map[ $key ]['version'] ) ) {
$selected_version = $path_map[ $key ]['version'];
} else {
$selected_version = null;
}
if ( $this->version_selector->is_version_update_required( $selected_version, $data['version'] ) ) {
$path_map[ $key ] = array(
'version' => $data['version'],
'path' => $data['path'],
);
}
}
}
jetpack-autoloader/class-path-processor.php 0000644 00000013061 15153552362 0015117 0 ustar 00 <?php
/**
* This file was automatically generated by automattic/jetpack-autoloader.
*
* @package automattic/jetpack-autoloader
*/
namespace Automattic\Jetpack\Autoloader\jp865e0ff1636ff8bf9d922e869851562a;
// phpcs:ignore
/**
* This class handles dealing with paths for the autoloader.
*/
class Path_Processor {
/**
* Given a path this will replace any of the path constants with a token to represent it.
*
* @param string $path The path we want to process.
*
* @return string The tokenized path.
*/
public function tokenize_path_constants( $path ) {
$path = wp_normalize_path( $path );
$constants = $this->get_normalized_constants();
foreach ( $constants as $constant => $constant_path ) {
$len = strlen( $constant_path );
if ( substr( $path, 0, $len ) !== $constant_path ) {
continue;
}
return substr_replace( $path, '{{' . $constant . '}}', 0, $len );
}
return $path;
}
/**
* Given a path this will replace any of the path constant tokens with the expanded path.
*
* @param string $tokenized_path The path we want to process.
*
* @return string The expanded path.
*/
public function untokenize_path_constants( $tokenized_path ) {
$tokenized_path = wp_normalize_path( $tokenized_path );
$constants = $this->get_normalized_constants();
foreach ( $constants as $constant => $constant_path ) {
$constant = '{{' . $constant . '}}';
$len = strlen( $constant );
if ( substr( $tokenized_path, 0, $len ) !== $constant ) {
continue;
}
return $this->get_real_path( substr_replace( $tokenized_path, $constant_path, 0, $len ) );
}
return $tokenized_path;
}
/**
* Given a file and an array of places it might be, this will find the absolute path and return it.
*
* @param string $file The plugin or theme file to resolve.
* @param array $directories_to_check The directories we should check for the file if it isn't an absolute path.
*
* @return string|false Returns the absolute path to the directory, otherwise false.
*/
public function find_directory_with_autoloader( $file, $directories_to_check ) {
$file = wp_normalize_path( $file );
if ( ! $this->is_absolute_path( $file ) ) {
$file = $this->find_absolute_plugin_path( $file, $directories_to_check );
if ( ! isset( $file ) ) {
return false;
}
}
// We need the real path for consistency with __DIR__ paths.
$file = $this->get_real_path( $file );
// phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged
$directory = @is_file( $file ) ? dirname( $file ) : $file;
if ( ! @is_file( $directory . '/vendor/composer/jetpack_autoload_classmap.php' ) ) {
return false;
}
// phpcs:enable WordPress.PHP.NoSilencedErrors.Discouraged
return $directory;
}
/**
* Fetches an array of normalized paths keyed by the constant they came from.
*
* @return string[] The normalized paths keyed by the constant.
*/
private function get_normalized_constants() {
$raw_constants = array(
// Order the constants from most-specific to least-specific.
'WP_PLUGIN_DIR',
'WPMU_PLUGIN_DIR',
'WP_CONTENT_DIR',
'ABSPATH',
);
$constants = array();
foreach ( $raw_constants as $raw ) {
if ( ! defined( $raw ) ) {
continue;
}
$path = wp_normalize_path( constant( $raw ) );
if ( isset( $path ) ) {
$constants[ $raw ] = $path;
}
}
return $constants;
}
/**
* Indicates whether or not a path is absolute.
*
* @param string $path The path to check.
*
* @return bool True if the path is absolute, otherwise false.
*/
private function is_absolute_path( $path ) {
if ( 0 === strlen( $path ) || '.' === $path[0] ) {
return false;
}
// Absolute paths on Windows may begin with a drive letter.
if ( preg_match( '/^[a-zA-Z]:[\/\\\\]/', $path ) ) {
return true;
}
// A path starting with / or \ is absolute; anything else is relative.
return ( '/' === $path[0] || '\\' === $path[0] );
}
/**
* Given a file and a list of directories to check, this method will try to figure out
* the absolute path to the file in question.
*
* @param string $normalized_path The normalized path to the plugin or theme file to resolve.
* @param array $directories_to_check The directories we should check for the file if it isn't an absolute path.
*
* @return string|null The absolute path to the plugin file, otherwise null.
*/
private function find_absolute_plugin_path( $normalized_path, $directories_to_check ) {
// We're only able to find the absolute path for plugin/theme PHP files.
if ( ! is_string( $normalized_path ) || '.php' !== substr( $normalized_path, -4 ) ) {
return null;
}
foreach ( $directories_to_check as $directory ) {
$normalized_check = wp_normalize_path( trailingslashit( $directory ) ) . $normalized_path;
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
if ( @is_file( $normalized_check ) ) {
return $normalized_check;
}
}
return null;
}
/**
* Given a path this will figure out the real path that we should be using.
*
* @param string $path The path to resolve.
*
* @return string The resolved path.
*/
private function get_real_path( $path ) {
// We want to resolve symbolic links for consistency with __DIR__ paths.
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
$real_path = @realpath( $path );
if ( false === $real_path ) {
// Let the autoloader deal with paths that don't exist.
$real_path = $path;
}
// Using realpath will make it platform-specific so we must normalize it after.
if ( $path !== $real_path ) {
$real_path = wp_normalize_path( $real_path );
}
return $real_path;
}
}
jetpack-autoloader/class-php-autoloader.php 0000644 00000005447 15153552362 0015103 0 ustar 00 <?php
/**
* This file was automatically generated by automattic/jetpack-autoloader.
*
* @package automattic/jetpack-autoloader
*/
namespace Automattic\Jetpack\Autoloader\jp865e0ff1636ff8bf9d922e869851562a;
// phpcs:ignore
/**
* This class handles management of the actual PHP autoloader.
*/
class PHP_Autoloader {
/**
* Registers the autoloader with PHP so that it can begin autoloading classes.
*
* @param Version_Loader $version_loader The class loader to use in the autoloader.
*/
public function register_autoloader( $version_loader ) {
// Make sure no other autoloaders are registered.
$this->unregister_autoloader();
// Set the global so that it can be used to load classes.
global $jetpack_autoloader_loader;
$jetpack_autoloader_loader = $version_loader;
// Ensure that the autoloader is first to avoid contention with others.
spl_autoload_register( array( self::class, 'load_class' ), true, true );
}
/**
* Unregisters the active autoloader so that it will no longer autoload classes.
*/
public function unregister_autoloader() {
// Remove any v2 autoloader that we've already registered.
$autoload_chain = spl_autoload_functions();
if ( ! $autoload_chain ) {
return;
}
foreach ( $autoload_chain as $autoloader ) {
// We can identify a v2 autoloader using the namespace.
$namespace_check = null;
// Functions are recorded as strings.
if ( is_string( $autoloader ) ) {
$namespace_check = $autoloader;
} elseif ( is_array( $autoloader ) && is_string( $autoloader[0] ) ) {
// Static method calls have the class as the first array element.
$namespace_check = $autoloader[0];
} else {
// Since the autoloader has only ever been a function or a static method we don't currently need to check anything else.
continue;
}
// Check for the namespace without the generated suffix.
if ( 'Automattic\\Jetpack\\Autoloader\\jp' === substr( $namespace_check, 0, 32 ) ) {
spl_autoload_unregister( $autoloader );
}
}
// Clear the global now that the autoloader has been unregistered.
global $jetpack_autoloader_loader;
$jetpack_autoloader_loader = null;
}
/**
* Loads a class file if one could be found.
*
* Note: This function is static so that the autoloader can be easily unregistered. If
* it was a class method we would have to unwrap the object to check the namespace.
*
* @param string $class_name The name of the class to autoload.
*
* @return bool Indicates whether or not a class file was loaded.
*/
public static function load_class( $class_name ) {
global $jetpack_autoloader_loader;
if ( ! isset( $jetpack_autoloader_loader ) ) {
return;
}
$file = $jetpack_autoloader_loader->find_class_file( $class_name );
if ( ! isset( $file ) ) {
return false;
}
require $file;
return true;
}
}
jetpack-autoloader/class-plugin-locator.php 0000644 00000011234 15153552362 0015105 0 ustar 00 <?php
/**
* This file was automatically generated by automattic/jetpack-autoloader.
*
* @package automattic/jetpack-autoloader
*/
namespace Automattic\Jetpack\Autoloader\jp865e0ff1636ff8bf9d922e869851562a;
// phpcs:ignore
/**
* This class scans the WordPress installation to find active plugins.
*/
class Plugin_Locator {
/**
* The path processor for finding plugin paths.
*
* @var Path_Processor
*/
private $path_processor;
/**
* The constructor.
*
* @param Path_Processor $path_processor The Path_Processor instance.
*/
public function __construct( $path_processor ) {
$this->path_processor = $path_processor;
}
/**
* Finds the path to the current plugin.
*
* @return string $path The path to the current plugin.
*
* @throws \RuntimeException If the current plugin does not have an autoloader.
*/
public function find_current_plugin() {
// Escape from `vendor/__DIR__` to root plugin directory.
$plugin_directory = dirname( dirname( __DIR__ ) );
// Use the path processor to ensure that this is an autoloader we're referencing.
$path = $this->path_processor->find_directory_with_autoloader( $plugin_directory, array() );
if ( false === $path ) {
throw new \RuntimeException( 'Failed to locate plugin ' . $plugin_directory );
}
return $path;
}
/**
* Checks a given option for plugin paths.
*
* @param string $option_name The option that we want to check for plugin information.
* @param bool $site_option Indicates whether or not we want to check the site option.
*
* @return array $plugin_paths The list of absolute paths we've found.
*/
public function find_using_option( $option_name, $site_option = false ) {
$raw = $site_option ? get_site_option( $option_name ) : get_option( $option_name );
if ( false === $raw ) {
return array();
}
return $this->convert_plugins_to_paths( $raw );
}
/**
* Checks for plugins in the `action` request parameter.
*
* @param string[] $allowed_actions The actions that we're allowed to return plugins for.
*
* @return array $plugin_paths The list of absolute paths we've found.
*/
public function find_using_request_action( $allowed_actions ) {
// phpcs:disable WordPress.Security.NonceVerification.Recommended
/**
* Note: we're not actually checking the nonce here because it's too early
* in the execution. The pluggable functions are not yet loaded to give
* plugins a chance to plug their versions. Therefore we're doing the bare
* minimum: checking whether the nonce exists and it's in the right place.
* The request will fail later if the nonce doesn't pass the check.
*/
if ( empty( $_REQUEST['_wpnonce'] ) ) {
return array();
}
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated just below.
$action = isset( $_REQUEST['action'] ) ? wp_unslash( $_REQUEST['action'] ) : false;
if ( ! in_array( $action, $allowed_actions, true ) ) {
return array();
}
$plugin_slugs = array();
switch ( $action ) {
case 'activate':
case 'deactivate':
if ( empty( $_REQUEST['plugin'] ) ) {
break;
}
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated by convert_plugins_to_paths.
$plugin_slugs[] = wp_unslash( $_REQUEST['plugin'] );
break;
case 'activate-selected':
case 'deactivate-selected':
if ( empty( $_REQUEST['checked'] ) ) {
break;
}
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated by convert_plugins_to_paths.
$plugin_slugs = wp_unslash( $_REQUEST['checked'] );
break;
}
// phpcs:enable WordPress.Security.NonceVerification.Recommended
return $this->convert_plugins_to_paths( $plugin_slugs );
}
/**
* Given an array of plugin slugs or paths, this will convert them to absolute paths and filter
* out the plugins that are not directory plugins. Note that array keys will also be included
* if they are plugin paths!
*
* @param string[] $plugins Plugin paths or slugs to filter.
*
* @return string[]
*/
private function convert_plugins_to_paths( $plugins ) {
if ( ! is_array( $plugins ) || empty( $plugins ) ) {
return array();
}
// We're going to look for plugins in the standard directories.
$path_constants = array( WP_PLUGIN_DIR, WPMU_PLUGIN_DIR );
$plugin_paths = array();
foreach ( $plugins as $key => $value ) {
$path = $this->path_processor->find_directory_with_autoloader( $key, $path_constants );
if ( $path ) {
$plugin_paths[] = $path;
}
$path = $this->path_processor->find_directory_with_autoloader( $value, $path_constants );
if ( $path ) {
$plugin_paths[] = $path;
}
}
return $plugin_paths;
}
}
jetpack-autoloader/class-plugins-handler.php 0000644 00000013373 15153552362 0015250 0 ustar 00 <?php
/**
* This file was automatically generated by automattic/jetpack-autoloader.
*
* @package automattic/jetpack-autoloader
*/
namespace Automattic\Jetpack\Autoloader\jp865e0ff1636ff8bf9d922e869851562a;
// phpcs:ignore
/**
* This class handles locating and caching all of the active plugins.
*/
class Plugins_Handler {
/**
* The transient key for plugin paths.
*/
const TRANSIENT_KEY = 'jetpack_autoloader_plugin_paths';
/**
* The locator for finding plugins in different locations.
*
* @var Plugin_Locator
*/
private $plugin_locator;
/**
* The processor for transforming cached paths.
*
* @var Path_Processor
*/
private $path_processor;
/**
* The constructor.
*
* @param Plugin_Locator $plugin_locator The locator for finding active plugins.
* @param Path_Processor $path_processor The processor for transforming cached paths.
*/
public function __construct( $plugin_locator, $path_processor ) {
$this->plugin_locator = $plugin_locator;
$this->path_processor = $path_processor;
}
/**
* Gets all of the active plugins we can find.
*
* @param bool $include_deactivating When true, plugins deactivating this request will be considered active.
* @param bool $record_unknown When true, the current plugin will be marked as active and recorded when unknown.
*
* @return string[]
*/
public function get_active_plugins( $include_deactivating, $record_unknown ) {
global $jetpack_autoloader_activating_plugins_paths;
// We're going to build a unique list of plugins from a few different sources
// to find all of our "active" plugins. While we need to return an integer
// array, we're going to use an associative array internally to reduce
// the amount of time that we're going to spend checking uniqueness
// and merging different arrays together to form the output.
$active_plugins = array();
// Make sure that plugins which have activated this request are considered as "active" even though
// they probably won't be present in any option.
if ( is_array( $jetpack_autoloader_activating_plugins_paths ) ) {
foreach ( $jetpack_autoloader_activating_plugins_paths as $path ) {
$active_plugins[ $path ] = $path;
}
}
// This option contains all of the plugins that have been activated.
$plugins = $this->plugin_locator->find_using_option( 'active_plugins' );
foreach ( $plugins as $path ) {
$active_plugins[ $path ] = $path;
}
// This option contains all of the multisite plugins that have been activated.
if ( is_multisite() ) {
$plugins = $this->plugin_locator->find_using_option( 'active_sitewide_plugins', true );
foreach ( $plugins as $path ) {
$active_plugins[ $path ] = $path;
}
}
// These actions contain plugins that are being activated/deactivated during this request.
$plugins = $this->plugin_locator->find_using_request_action( array( 'activate', 'activate-selected', 'deactivate', 'deactivate-selected' ) );
foreach ( $plugins as $path ) {
$active_plugins[ $path ] = $path;
}
// When the current plugin isn't considered "active" there's a problem.
// Since we're here, the plugin is active and currently being loaded.
// We can support this case (mu-plugins and non-standard activation)
// by adding the current plugin to the active list and marking it
// as an unknown (activating) plugin. This also has the benefit
// of causing a reset because the active plugins list has
// been changed since it was saved in the global.
$current_plugin = $this->plugin_locator->find_current_plugin();
if ( $record_unknown && ! in_array( $current_plugin, $active_plugins, true ) ) {
$active_plugins[ $current_plugin ] = $current_plugin;
$jetpack_autoloader_activating_plugins_paths[] = $current_plugin;
}
// When deactivating plugins aren't desired we should entirely remove them from the active list.
if ( ! $include_deactivating ) {
// These actions contain plugins that are being deactivated during this request.
$plugins = $this->plugin_locator->find_using_request_action( array( 'deactivate', 'deactivate-selected' ) );
foreach ( $plugins as $path ) {
unset( $active_plugins[ $path ] );
}
}
// Transform the array so that we don't have to worry about the keys interacting with other array types later.
return array_values( $active_plugins );
}
/**
* Gets all of the cached plugins if there are any.
*
* @return string[]
*/
public function get_cached_plugins() {
$cached = get_transient( self::TRANSIENT_KEY );
if ( ! is_array( $cached ) || empty( $cached ) ) {
return array();
}
// We need to expand the tokens to an absolute path for this webserver.
return array_map( array( $this->path_processor, 'untokenize_path_constants' ), $cached );
}
/**
* Saves the plugin list to the cache.
*
* @param array $plugins The plugin list to save to the cache.
*/
public function cache_plugins( $plugins ) {
// We store the paths in a tokenized form so that that webservers with different absolute paths don't break.
$plugins = array_map( array( $this->path_processor, 'tokenize_path_constants' ), $plugins );
set_transient( self::TRANSIENT_KEY, $plugins );
}
/**
* Checks to see whether or not the plugin list given has changed when compared to the
* shared `$jetpack_autoloader_cached_plugin_paths` global. This allows us to deal
* with cases where the active list may change due to filtering..
*
* @param string[] $plugins The plugins list to check against the global cache.
*
* @return bool True if the plugins have changed, otherwise false.
*/
public function have_plugins_changed( $plugins ) {
global $jetpack_autoloader_cached_plugin_paths;
if ( $jetpack_autoloader_cached_plugin_paths !== $plugins ) {
$jetpack_autoloader_cached_plugin_paths = $plugins;
return true;
}
return false;
}
}
jetpack-autoloader/class-shutdown-handler.php 0000644 00000005505 15153552362 0015440 0 ustar 00 <?php
/**
* This file was automatically generated by automattic/jetpack-autoloader.
*
* @package automattic/jetpack-autoloader
*/
namespace Automattic\Jetpack\Autoloader\jp865e0ff1636ff8bf9d922e869851562a;
// phpcs:ignore
/**
* This class handles the shutdown of the autoloader.
*/
class Shutdown_Handler {
/**
* The Plugins_Handler instance.
*
* @var Plugins_Handler
*/
private $plugins_handler;
/**
* The plugins cached by this autoloader.
*
* @var string[]
*/
private $cached_plugins;
/**
* Indicates whether or not this autoloader was included by another.
*
* @var bool
*/
private $was_included_by_autoloader;
/**
* Constructor.
*
* @param Plugins_Handler $plugins_handler The Plugins_Handler instance to use.
* @param string[] $cached_plugins The plugins cached by the autoloaer.
* @param bool $was_included_by_autoloader Indicates whether or not the autoloader was included by another.
*/
public function __construct( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) {
$this->plugins_handler = $plugins_handler;
$this->cached_plugins = $cached_plugins;
$this->was_included_by_autoloader = $was_included_by_autoloader;
}
/**
* Handles the shutdown of the autoloader.
*/
public function __invoke() {
// Don't save a broken cache if an error happens during some plugin's initialization.
if ( ! did_action( 'plugins_loaded' ) ) {
// Ensure that the cache is emptied to prevent consecutive failures if the cache is to blame.
if ( ! empty( $this->cached_plugins ) ) {
$this->plugins_handler->cache_plugins( array() );
}
return;
}
// Load the active plugins fresh since the list we pulled earlier might not contain
// plugins that were activated but did not reset the autoloader. This happens
// when a plugin is in the cache but not "active" when the autoloader loads.
// We also want to make sure that plugins which are deactivating are not
// considered "active" so that they will be removed from the cache now.
try {
$active_plugins = $this->plugins_handler->get_active_plugins( false, ! $this->was_included_by_autoloader );
} catch ( \Exception $ex ) {
// When the package is deleted before shutdown it will throw an exception.
// In the event this happens we should erase the cache.
if ( ! empty( $this->cached_plugins ) ) {
$this->plugins_handler->cache_plugins( array() );
}
return;
}
// The paths should be sorted for easy comparisons with those loaded from the cache.
// Note we don't need to sort the cached entries because they're already sorted.
sort( $active_plugins );
// We don't want to waste time saving a cache that hasn't changed.
if ( $this->cached_plugins === $active_plugins ) {
return;
}
$this->plugins_handler->cache_plugins( $active_plugins );
}
}
jetpack-autoloader/class-version-loader.php 0000644 00000010166 15153552362 0015102 0 ustar 00 <?php
/**
* This file was automatically generated by automattic/jetpack-autoloader.
*
* @package automattic/jetpack-autoloader
*/
namespace Automattic\Jetpack\Autoloader\jp865e0ff1636ff8bf9d922e869851562a;
// phpcs:ignore
/**
* This class loads other classes based on given parameters.
*/
class Version_Loader {
/**
* The Version_Selector object.
*
* @var Version_Selector
*/
private $version_selector;
/**
* A map of available classes and their version and file path.
*
* @var array
*/
private $classmap;
/**
* A map of PSR-4 namespaces and their version and directory path.
*
* @var array
*/
private $psr4_map;
/**
* A map of all the files that we should load.
*
* @var array
*/
private $filemap;
/**
* The constructor.
*
* @param Version_Selector $version_selector The Version_Selector object.
* @param array $classmap The verioned classmap to load using.
* @param array $psr4_map The versioned PSR-4 map to load using.
* @param array $filemap The versioned filemap to load.
*/
public function __construct( $version_selector, $classmap, $psr4_map, $filemap ) {
$this->version_selector = $version_selector;
$this->classmap = $classmap;
$this->psr4_map = $psr4_map;
$this->filemap = $filemap;
}
/**
* Finds the file path for the given class.
*
* @param string $class_name The class to find.
*
* @return string|null $file_path The path to the file if found, null if no class was found.
*/
public function find_class_file( $class_name ) {
$data = $this->select_newest_file(
isset( $this->classmap[ $class_name ] ) ? $this->classmap[ $class_name ] : null,
$this->find_psr4_file( $class_name )
);
if ( ! isset( $data ) ) {
return null;
}
return $data['path'];
}
/**
* Load all of the files in the filemap.
*/
public function load_filemap() {
if ( empty( $this->filemap ) ) {
return;
}
foreach ( $this->filemap as $file_identifier => $file_data ) {
if ( empty( $GLOBALS['__composer_autoload_files'][ $file_identifier ] ) ) {
require_once $file_data['path'];
$GLOBALS['__composer_autoload_files'][ $file_identifier ] = true;
}
}
}
/**
* Compares different class sources and returns the newest.
*
* @param array|null $classmap_data The classmap class data.
* @param array|null $psr4_data The PSR-4 class data.
*
* @return array|null $data
*/
private function select_newest_file( $classmap_data, $psr4_data ) {
if ( ! isset( $classmap_data ) ) {
return $psr4_data;
} elseif ( ! isset( $psr4_data ) ) {
return $classmap_data;
}
if ( $this->version_selector->is_version_update_required( $classmap_data['version'], $psr4_data['version'] ) ) {
return $psr4_data;
}
return $classmap_data;
}
/**
* Finds the file for a given class in a PSR-4 namespace.
*
* @param string $class_name The class to find.
*
* @return array|null $data The version and path path to the file if found, null otherwise.
*/
private function find_psr4_file( $class_name ) {
if ( ! isset( $this->psr4_map ) ) {
return null;
}
// Don't bother with classes that have no namespace.
$class_index = strrpos( $class_name, '\\' );
if ( ! $class_index ) {
return null;
}
$class_for_path = str_replace( '\\', '/', $class_name );
// Search for the namespace by iteratively cutting off the last segment until
// we find a match. This allows us to check the most-specific namespaces
// first as well as minimize the amount of time spent looking.
for (
$class_namespace = substr( $class_name, 0, $class_index );
! empty( $class_namespace );
$class_namespace = substr( $class_namespace, 0, strrpos( $class_namespace, '\\' ) )
) {
$namespace = $class_namespace . '\\';
if ( ! isset( $this->psr4_map[ $namespace ] ) ) {
continue;
}
$data = $this->psr4_map[ $namespace ];
foreach ( $data['path'] as $path ) {
$path .= '/' . substr( $class_for_path, strlen( $namespace ) ) . '.php';
if ( file_exists( $path ) ) {
return array(
'version' => $data['version'],
'path' => $path,
);
}
}
}
return null;
}
}
jetpack-autoloader/class-version-selector.php 0000644 00000003465 15153552362 0015460 0 ustar 00 <?php
/**
* This file was automatically generated by automattic/jetpack-autoloader.
*
* @package automattic/jetpack-autoloader
*/
namespace Automattic\Jetpack\Autoloader\jp865e0ff1636ff8bf9d922e869851562a;
// phpcs:ignore
/**
* Used to select package versions.
*/
class Version_Selector {
/**
* Checks whether the selected package version should be updated. Composer development
* package versions ('9999999-dev' or versions that start with 'dev-') are favored
* when the JETPACK_AUTOLOAD_DEV constant is set to true.
*
* @param String $selected_version The currently selected package version.
* @param String $compare_version The package version that is being evaluated to
* determine if the version needs to be updated.
*
* @return bool Returns true if the selected package version should be updated,
* else false.
*/
public function is_version_update_required( $selected_version, $compare_version ) {
$use_dev_versions = defined( 'JETPACK_AUTOLOAD_DEV' ) && JETPACK_AUTOLOAD_DEV;
if ( $selected_version === null ) {
return true;
}
if ( $use_dev_versions && $this->is_dev_version( $selected_version ) ) {
return false;
}
if ( $this->is_dev_version( $compare_version ) ) {
if ( $use_dev_versions ) {
return true;
} else {
return false;
}
}
if ( version_compare( $selected_version, $compare_version, '<' ) ) {
return true;
}
return false;
}
/**
* Checks whether the given package version is a development version.
*
* @param String $version The package version.
*
* @return bool True if the version is a dev version, else false.
*/
public function is_dev_version( $version ) {
if ( 'dev-' === substr( $version, 0, 4 ) || '9999999-dev' === $version ) {
return true;
}
return false;
}
}
maxmind-db/reader/LICENSE 0000644 00000026136 15153552362 0011052 0 ustar 00
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
maxmind-db/reader/autoload.php 0000644 00000002621 15153552362 0012357 0 ustar 00 <?php
declare(strict_types=1);
/**
* PSR-4 autoloader implementation for the MaxMind\DB namespace.
* First we define the 'mmdb_autoload' function, and then we register
* it with 'spl_autoload_register' so that PHP knows to use it.
*
* @param mixed $class
*/
/**
* Automatically include the file that defines <code>class</code>.
*
* @param string $class
* the name of the class to load
*/
function mmdb_autoload($class): void
{
/*
* A project-specific mapping between the namespaces and where
* they're located. By convention, we include the trailing
* slashes. The one-element array here simply makes things easy
* to extend in the future if (for example) the test classes
* begin to use one another.
*/
$namespace_map = ['MaxMind\\Db\\' => __DIR__ . '/src/MaxMind/Db/'];
foreach ($namespace_map as $prefix => $dir) {
// First swap out the namespace prefix with a directory...
$path = str_replace($prefix, $dir, $class);
// replace the namespace separator with a directory separator...
$path = str_replace('\\', '/', $path);
// and finally, add the PHP file extension to the result.
$path = $path . '.php';
// $path should now contain the path to a PHP file defining $class
if (file_exists($path)) {
include $path;
}
}
}
spl_autoload_register('mmdb_autoload');
maxmind-db/reader/ext/config.m4 0000644 00000003101 15153552362 0012337 0 ustar 00 PHP_ARG_WITH(maxminddb,
[Whether to enable the MaxMind DB Reader extension],
[ --with-maxminddb Enable MaxMind DB Reader extension support])
PHP_ARG_ENABLE(maxminddb-debug, for MaxMind DB debug support,
[ --enable-maxminddb-debug Enable enable MaxMind DB deubg support], no, no)
if test $PHP_MAXMINDDB != "no"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
AC_MSG_CHECKING(for libmaxminddb)
if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libmaxminddb; then
dnl retrieve build options from pkg-config
if $PKG_CONFIG libmaxminddb --atleast-version 1.0.0; then
LIBMAXMINDDB_INC=`$PKG_CONFIG libmaxminddb --cflags`
LIBMAXMINDDB_LIB=`$PKG_CONFIG libmaxminddb --libs`
LIBMAXMINDDB_VER=`$PKG_CONFIG libmaxminddb --modversion`
AC_MSG_RESULT(found version $LIBMAXMINDDB_VER)
else
AC_MSG_ERROR(system libmaxminddb must be upgraded to version >= 1.0.0)
fi
PHP_EVAL_LIBLINE($LIBMAXMINDDB_LIB, MAXMINDDB_SHARED_LIBADD)
PHP_EVAL_INCLINE($LIBMAXMINDDB_INC)
else
AC_MSG_RESULT(pkg-config information missing)
AC_MSG_WARN(will use libmaxmxinddb from compiler default path)
PHP_CHECK_LIBRARY(maxminddb, MMDB_open)
PHP_ADD_LIBRARY(maxminddb, 1, MAXMINDDB_SHARED_LIBADD)
fi
if test $PHP_MAXMINDDB_DEBUG != "no"; then
CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror"
fi
PHP_SUBST(MAXMINDDB_SHARED_LIBADD)
PHP_NEW_EXTENSION(maxminddb, maxminddb.c, $ext_shared)
fi
maxmind-db/reader/ext/config.w32 0000644 00000000653 15153552362 0012443 0 ustar 00 ARG_WITH("maxminddb", "Enable MaxMind DB Reader extension support", "no");
if (PHP_MAXMINDDB == "yes") {
if (CHECK_HEADER_ADD_INCLUDE("maxminddb.h", "CFLAGS_MAXMINDDB", PHP_MAXMINDDB + ";" + PHP_PHP_BUILD + "\\include\\maxminddb") &&
CHECK_LIB("libmaxminddb.lib", "maxminddb", PHP_MAXMINDDB)) {
EXTENSION("maxminddb", "maxminddb.c");
} else {
WARNING('Could not find maxminddb.h or libmaxminddb.lib; skipping');
}
}
maxmind-db/reader/ext/maxminddb.c 0000644 00000067311 15153552362 0012754 0 ustar 00 /* MaxMind, Inc., licenses this file to you under the Apache License, Version
* 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
#include "php_maxminddb.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <php.h>
#include <zend.h>
#include "Zend/zend_exceptions.h"
#include "Zend/zend_types.h"
#include "ext/spl/spl_exceptions.h"
#include "ext/standard/info.h"
#include <maxminddb.h>
#ifdef ZTS
#include <TSRM.h>
#endif
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#define PHP_MAXMINDDB_NS ZEND_NS_NAME("MaxMind", "Db")
#define PHP_MAXMINDDB_READER_NS ZEND_NS_NAME(PHP_MAXMINDDB_NS, "Reader")
#define PHP_MAXMINDDB_METADATA_NS \
ZEND_NS_NAME(PHP_MAXMINDDB_READER_NS, "Metadata")
#define PHP_MAXMINDDB_READER_EX_NS \
ZEND_NS_NAME(PHP_MAXMINDDB_READER_NS, "InvalidDatabaseException")
#define Z_MAXMINDDB_P(zv) php_maxminddb_fetch_object(Z_OBJ_P(zv))
typedef size_t strsize_t;
typedef zend_object free_obj_t;
/* For PHP 8 compatibility */
#if PHP_VERSION_ID < 80000
#define PROP_OBJ(zv) (zv)
#else
#define PROP_OBJ(zv) Z_OBJ_P(zv)
#define TSRMLS_C
#define TSRMLS_CC
#define TSRMLS_DC
/* End PHP 8 compatibility */
#endif
#ifndef ZEND_ACC_CTOR
#define ZEND_ACC_CTOR 0
#endif
/* IS_MIXED was added in 2020 */
#ifndef IS_MIXED
#define IS_MIXED IS_UNDEF
#endif
/* ZEND_THIS was added in 7.4 */
#ifndef ZEND_THIS
#define ZEND_THIS (&EX(This))
#endif
typedef struct _maxminddb_obj {
MMDB_s *mmdb;
zend_object std;
} maxminddb_obj;
PHP_FUNCTION(maxminddb);
static int
get_record(INTERNAL_FUNCTION_PARAMETERS, zval *record, int *prefix_len);
static const MMDB_entry_data_list_s *
handle_entry_data_list(const MMDB_entry_data_list_s *entry_data_list,
zval *z_value TSRMLS_DC);
static const MMDB_entry_data_list_s *
handle_array(const MMDB_entry_data_list_s *entry_data_list,
zval *z_value TSRMLS_DC);
static const MMDB_entry_data_list_s *
handle_map(const MMDB_entry_data_list_s *entry_data_list,
zval *z_value TSRMLS_DC);
static void handle_uint128(const MMDB_entry_data_list_s *entry_data_list,
zval *z_value TSRMLS_DC);
static void handle_uint64(const MMDB_entry_data_list_s *entry_data_list,
zval *z_value TSRMLS_DC);
static void handle_uint32(const MMDB_entry_data_list_s *entry_data_list,
zval *z_value TSRMLS_DC);
#define CHECK_ALLOCATED(val) \
if (!val) { \
zend_error(E_ERROR, "Out of memory"); \
return; \
}
static zend_object_handlers maxminddb_obj_handlers;
static zend_class_entry *maxminddb_ce, *maxminddb_exception_ce, *metadata_ce;
static inline maxminddb_obj *
php_maxminddb_fetch_object(zend_object *obj TSRMLS_DC) {
return (maxminddb_obj *)((char *)(obj)-XtOffsetOf(maxminddb_obj, std));
}
ZEND_BEGIN_ARG_INFO_EX(arginfo_maxminddbreader_construct, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, db_file, IS_STRING, 0)
ZEND_END_ARG_INFO()
PHP_METHOD(MaxMind_Db_Reader, __construct) {
char *db_file = NULL;
strsize_t name_len;
zval *_this_zval = NULL;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
getThis(),
"Os",
&_this_zval,
maxminddb_ce,
&db_file,
&name_len) == FAILURE) {
return;
}
if (0 != php_check_open_basedir(db_file TSRMLS_CC) ||
0 != access(db_file, R_OK)) {
zend_throw_exception_ex(
spl_ce_InvalidArgumentException,
0 TSRMLS_CC,
"The file \"%s\" does not exist or is not readable.",
db_file);
return;
}
MMDB_s *mmdb = (MMDB_s *)ecalloc(1, sizeof(MMDB_s));
uint16_t status = MMDB_open(db_file, MMDB_MODE_MMAP, mmdb);
if (MMDB_SUCCESS != status) {
zend_throw_exception_ex(
maxminddb_exception_ce,
0 TSRMLS_CC,
"Error opening database file (%s). Is this a valid "
"MaxMind DB file?",
db_file);
efree(mmdb);
return;
}
maxminddb_obj *mmdb_obj = Z_MAXMINDDB_P(ZEND_THIS);
mmdb_obj->mmdb = mmdb;
}
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(
arginfo_maxminddbreader_get, 0, 1, IS_MIXED, 1)
ZEND_ARG_TYPE_INFO(0, ip_address, IS_STRING, 0)
ZEND_END_ARG_INFO()
PHP_METHOD(MaxMind_Db_Reader, get) {
int prefix_len = 0;
get_record(INTERNAL_FUNCTION_PARAM_PASSTHRU, return_value, &prefix_len);
}
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(
arginfo_maxminddbreader_getWithPrefixLen, 0, 1, IS_ARRAY, 1)
ZEND_ARG_TYPE_INFO(0, ip_address, IS_STRING, 0)
ZEND_END_ARG_INFO()
PHP_METHOD(MaxMind_Db_Reader, getWithPrefixLen) {
zval record, z_prefix_len;
int prefix_len = 0;
if (get_record(INTERNAL_FUNCTION_PARAM_PASSTHRU, &record, &prefix_len) ==
FAILURE) {
return;
}
array_init(return_value);
add_next_index_zval(return_value, &record);
ZVAL_LONG(&z_prefix_len, prefix_len);
add_next_index_zval(return_value, &z_prefix_len);
}
static int
get_record(INTERNAL_FUNCTION_PARAMETERS, zval *record, int *prefix_len) {
char *ip_address = NULL;
strsize_t name_len;
zval *this_zval = NULL;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
getThis(),
"Os",
&this_zval,
maxminddb_ce,
&ip_address,
&name_len) == FAILURE) {
return FAILURE;
}
const maxminddb_obj *mmdb_obj = (maxminddb_obj *)Z_MAXMINDDB_P(ZEND_THIS);
MMDB_s *mmdb = mmdb_obj->mmdb;
if (NULL == mmdb) {
zend_throw_exception_ex(spl_ce_BadMethodCallException,
0 TSRMLS_CC,
"Attempt to read from a closed MaxMind DB.");
return FAILURE;
}
struct addrinfo hints = {
.ai_family = AF_UNSPEC,
.ai_flags = AI_NUMERICHOST,
/* We set ai_socktype so that we only get one result back */
.ai_socktype = SOCK_STREAM};
struct addrinfo *addresses = NULL;
int gai_status = getaddrinfo(ip_address, NULL, &hints, &addresses);
if (gai_status) {
zend_throw_exception_ex(spl_ce_InvalidArgumentException,
0 TSRMLS_CC,
"The value \"%s\" is not a valid IP address.",
ip_address);
return FAILURE;
}
if (!addresses || !addresses->ai_addr) {
zend_throw_exception_ex(
spl_ce_InvalidArgumentException,
0 TSRMLS_CC,
"getaddrinfo was successful but failed to set the addrinfo");
return FAILURE;
}
int sa_family = addresses->ai_addr->sa_family;
int mmdb_error = MMDB_SUCCESS;
MMDB_lookup_result_s result =
MMDB_lookup_sockaddr(mmdb, addresses->ai_addr, &mmdb_error);
freeaddrinfo(addresses);
if (MMDB_SUCCESS != mmdb_error) {
zend_class_entry *ex;
if (MMDB_IPV6_LOOKUP_IN_IPV4_DATABASE_ERROR == mmdb_error) {
ex = spl_ce_InvalidArgumentException;
} else {
ex = maxminddb_exception_ce;
}
zend_throw_exception_ex(ex,
0 TSRMLS_CC,
"Error looking up %s. %s",
ip_address,
MMDB_strerror(mmdb_error));
return FAILURE;
}
*prefix_len = result.netmask;
if (sa_family == AF_INET && mmdb->metadata.ip_version == 6) {
/* We return the prefix length given the IPv4 address. If there is
no IPv4 subtree, we return a prefix length of 0. */
*prefix_len = *prefix_len >= 96 ? *prefix_len - 96 : 0;
}
if (!result.found_entry) {
ZVAL_NULL(record);
return SUCCESS;
}
MMDB_entry_data_list_s *entry_data_list = NULL;
int status = MMDB_get_entry_data_list(&result.entry, &entry_data_list);
if (MMDB_SUCCESS != status) {
zend_throw_exception_ex(maxminddb_exception_ce,
0 TSRMLS_CC,
"Error while looking up data for %s. %s",
ip_address,
MMDB_strerror(status));
MMDB_free_entry_data_list(entry_data_list);
return FAILURE;
} else if (NULL == entry_data_list) {
zend_throw_exception_ex(
maxminddb_exception_ce,
0 TSRMLS_CC,
"Error while looking up data for %s. Your database may "
"be corrupt or you have found a bug in libmaxminddb.",
ip_address);
return FAILURE;
}
const MMDB_entry_data_list_s *rv =
handle_entry_data_list(entry_data_list, record TSRMLS_CC);
if (rv == NULL) {
/* We should have already thrown the exception in handle_entry_data_list
*/
return FAILURE;
}
MMDB_free_entry_data_list(entry_data_list);
return SUCCESS;
}
ZEND_BEGIN_ARG_INFO_EX(arginfo_maxminddbreader_void, 0, 0, 0)
ZEND_END_ARG_INFO()
PHP_METHOD(MaxMind_Db_Reader, metadata) {
zval *this_zval = NULL;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
getThis(),
"O",
&this_zval,
maxminddb_ce) == FAILURE) {
return;
}
const maxminddb_obj *const mmdb_obj =
(maxminddb_obj *)Z_MAXMINDDB_P(this_zval);
if (NULL == mmdb_obj->mmdb) {
zend_throw_exception_ex(spl_ce_BadMethodCallException,
0 TSRMLS_CC,
"Attempt to read from a closed MaxMind DB.");
return;
}
object_init_ex(return_value, metadata_ce);
MMDB_entry_data_list_s *entry_data_list;
MMDB_get_metadata_as_entry_data_list(mmdb_obj->mmdb, &entry_data_list);
zval metadata_array;
const MMDB_entry_data_list_s *rv =
handle_entry_data_list(entry_data_list, &metadata_array TSRMLS_CC);
if (rv == NULL) {
return;
}
MMDB_free_entry_data_list(entry_data_list);
zend_call_method_with_1_params(PROP_OBJ(return_value),
metadata_ce,
&metadata_ce->constructor,
ZEND_CONSTRUCTOR_FUNC_NAME,
NULL,
&metadata_array);
zval_ptr_dtor(&metadata_array);
}
PHP_METHOD(MaxMind_Db_Reader, close) {
zval *this_zval = NULL;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
getThis(),
"O",
&this_zval,
maxminddb_ce) == FAILURE) {
return;
}
maxminddb_obj *mmdb_obj = (maxminddb_obj *)Z_MAXMINDDB_P(this_zval);
if (NULL == mmdb_obj->mmdb) {
zend_throw_exception_ex(spl_ce_BadMethodCallException,
0 TSRMLS_CC,
"Attempt to close a closed MaxMind DB.");
return;
}
MMDB_close(mmdb_obj->mmdb);
efree(mmdb_obj->mmdb);
mmdb_obj->mmdb = NULL;
}
static const MMDB_entry_data_list_s *
handle_entry_data_list(const MMDB_entry_data_list_s *entry_data_list,
zval *z_value TSRMLS_DC) {
switch (entry_data_list->entry_data.type) {
case MMDB_DATA_TYPE_MAP:
return handle_map(entry_data_list, z_value TSRMLS_CC);
case MMDB_DATA_TYPE_ARRAY:
return handle_array(entry_data_list, z_value TSRMLS_CC);
case MMDB_DATA_TYPE_UTF8_STRING:
ZVAL_STRINGL(z_value,
(char *)entry_data_list->entry_data.utf8_string,
entry_data_list->entry_data.data_size);
break;
case MMDB_DATA_TYPE_BYTES:
ZVAL_STRINGL(z_value,
(char *)entry_data_list->entry_data.bytes,
entry_data_list->entry_data.data_size);
break;
case MMDB_DATA_TYPE_DOUBLE:
ZVAL_DOUBLE(z_value, entry_data_list->entry_data.double_value);
break;
case MMDB_DATA_TYPE_FLOAT:
ZVAL_DOUBLE(z_value, entry_data_list->entry_data.float_value);
break;
case MMDB_DATA_TYPE_UINT16:
ZVAL_LONG(z_value, entry_data_list->entry_data.uint16);
break;
case MMDB_DATA_TYPE_UINT32:
handle_uint32(entry_data_list, z_value TSRMLS_CC);
break;
case MMDB_DATA_TYPE_BOOLEAN:
ZVAL_BOOL(z_value, entry_data_list->entry_data.boolean);
break;
case MMDB_DATA_TYPE_UINT64:
handle_uint64(entry_data_list, z_value TSRMLS_CC);
break;
case MMDB_DATA_TYPE_UINT128:
handle_uint128(entry_data_list, z_value TSRMLS_CC);
break;
case MMDB_DATA_TYPE_INT32:
ZVAL_LONG(z_value, entry_data_list->entry_data.int32);
break;
default:
zend_throw_exception_ex(maxminddb_exception_ce,
0 TSRMLS_CC,
"Invalid data type arguments: %d",
entry_data_list->entry_data.type);
return NULL;
}
return entry_data_list;
}
static const MMDB_entry_data_list_s *
handle_map(const MMDB_entry_data_list_s *entry_data_list,
zval *z_value TSRMLS_DC) {
array_init(z_value);
const uint32_t map_size = entry_data_list->entry_data.data_size;
uint32_t i;
for (i = 0; i < map_size && entry_data_list; i++) {
entry_data_list = entry_data_list->next;
char *key = estrndup((char *)entry_data_list->entry_data.utf8_string,
entry_data_list->entry_data.data_size);
if (NULL == key) {
zend_throw_exception_ex(maxminddb_exception_ce,
0 TSRMLS_CC,
"Invalid data type arguments");
return NULL;
}
entry_data_list = entry_data_list->next;
zval new_value;
entry_data_list =
handle_entry_data_list(entry_data_list, &new_value TSRMLS_CC);
if (entry_data_list != NULL) {
add_assoc_zval(z_value, key, &new_value);
}
efree(key);
}
return entry_data_list;
}
static const MMDB_entry_data_list_s *
handle_array(const MMDB_entry_data_list_s *entry_data_list,
zval *z_value TSRMLS_DC) {
const uint32_t size = entry_data_list->entry_data.data_size;
array_init(z_value);
uint32_t i;
for (i = 0; i < size && entry_data_list; i++) {
entry_data_list = entry_data_list->next;
zval new_value;
entry_data_list =
handle_entry_data_list(entry_data_list, &new_value TSRMLS_CC);
if (entry_data_list != NULL) {
add_next_index_zval(z_value, &new_value);
}
}
return entry_data_list;
}
static void handle_uint128(const MMDB_entry_data_list_s *entry_data_list,
zval *z_value TSRMLS_DC) {
uint64_t high = 0;
uint64_t low = 0;
#if MMDB_UINT128_IS_BYTE_ARRAY
int i;
for (i = 0; i < 8; i++) {
high = (high << 8) | entry_data_list->entry_data.uint128[i];
}
for (i = 8; i < 16; i++) {
low = (low << 8) | entry_data_list->entry_data.uint128[i];
}
#else
high = entry_data_list->entry_data.uint128 >> 64;
low = (uint64_t)entry_data_list->entry_data.uint128;
#endif
char *num_str;
spprintf(&num_str, 0, "0x%016" PRIX64 "%016" PRIX64, high, low);
CHECK_ALLOCATED(num_str);
ZVAL_STRING(z_value, num_str);
efree(num_str);
}
static void handle_uint32(const MMDB_entry_data_list_s *entry_data_list,
zval *z_value TSRMLS_DC) {
uint32_t val = entry_data_list->entry_data.uint32;
#if LONG_MAX >= UINT32_MAX
ZVAL_LONG(z_value, val);
return;
#else
if (val <= LONG_MAX) {
ZVAL_LONG(z_value, val);
return;
}
char *int_str;
spprintf(&int_str, 0, "%" PRIu32, val);
CHECK_ALLOCATED(int_str);
ZVAL_STRING(z_value, int_str);
efree(int_str);
#endif
}
static void handle_uint64(const MMDB_entry_data_list_s *entry_data_list,
zval *z_value TSRMLS_DC) {
uint64_t val = entry_data_list->entry_data.uint64;
#if LONG_MAX >= UINT64_MAX
ZVAL_LONG(z_value, val);
return;
#else
if (val <= LONG_MAX) {
ZVAL_LONG(z_value, val);
return;
}
char *int_str;
spprintf(&int_str, 0, "%" PRIu64, val);
CHECK_ALLOCATED(int_str);
ZVAL_STRING(z_value, int_str);
efree(int_str);
#endif
}
static void maxminddb_free_storage(free_obj_t *object TSRMLS_DC) {
maxminddb_obj *obj =
php_maxminddb_fetch_object((zend_object *)object TSRMLS_CC);
if (obj->mmdb != NULL) {
MMDB_close(obj->mmdb);
efree(obj->mmdb);
}
zend_object_std_dtor(&obj->std TSRMLS_CC);
}
static zend_object *maxminddb_create_handler(zend_class_entry *type TSRMLS_DC) {
maxminddb_obj *obj = (maxminddb_obj *)ecalloc(1, sizeof(maxminddb_obj));
zend_object_std_init(&obj->std, type TSRMLS_CC);
object_properties_init(&(obj->std), type);
obj->std.handlers = &maxminddb_obj_handlers;
return &obj->std;
}
/* clang-format off */
static zend_function_entry maxminddb_methods[] = {
PHP_ME(MaxMind_Db_Reader, __construct, arginfo_maxminddbreader_construct,
ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
PHP_ME(MaxMind_Db_Reader, close, arginfo_maxminddbreader_void, ZEND_ACC_PUBLIC)
PHP_ME(MaxMind_Db_Reader, get, arginfo_maxminddbreader_get, ZEND_ACC_PUBLIC)
PHP_ME(MaxMind_Db_Reader, getWithPrefixLen, arginfo_maxminddbreader_getWithPrefixLen, ZEND_ACC_PUBLIC)
PHP_ME(MaxMind_Db_Reader, metadata, arginfo_maxminddbreader_void, ZEND_ACC_PUBLIC)
{ NULL, NULL, NULL }
};
/* clang-format on */
ZEND_BEGIN_ARG_INFO_EX(arginfo_metadata_construct, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, metadata, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
PHP_METHOD(MaxMind_Db_Reader_Metadata, __construct) {
zval *object = NULL;
zval *metadata_array = NULL;
zend_long node_count = 0;
zend_long record_size = 0;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
getThis(),
"Oa",
&object,
metadata_ce,
&metadata_array) == FAILURE) {
return;
}
zval *tmp = NULL;
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
"binary_format_major_version",
sizeof("binary_format_major_version") - 1))) {
zend_update_property(metadata_ce,
PROP_OBJ(object),
"binaryFormatMajorVersion",
sizeof("binaryFormatMajorVersion") - 1,
tmp);
}
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
"binary_format_minor_version",
sizeof("binary_format_minor_version") - 1))) {
zend_update_property(metadata_ce,
PROP_OBJ(object),
"binaryFormatMinorVersion",
sizeof("binaryFormatMinorVersion") - 1,
tmp);
}
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
"build_epoch",
sizeof("build_epoch") - 1))) {
zend_update_property(metadata_ce,
PROP_OBJ(object),
"buildEpoch",
sizeof("buildEpoch") - 1,
tmp);
}
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
"database_type",
sizeof("database_type") - 1))) {
zend_update_property(metadata_ce,
PROP_OBJ(object),
"databaseType",
sizeof("databaseType") - 1,
tmp);
}
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
"description",
sizeof("description") - 1))) {
zend_update_property(metadata_ce,
PROP_OBJ(object),
"description",
sizeof("description") - 1,
tmp);
}
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
"ip_version",
sizeof("ip_version") - 1))) {
zend_update_property(metadata_ce,
PROP_OBJ(object),
"ipVersion",
sizeof("ipVersion") - 1,
tmp);
}
if ((tmp = zend_hash_str_find(
HASH_OF(metadata_array), "languages", sizeof("languages") - 1))) {
zend_update_property(metadata_ce,
PROP_OBJ(object),
"languages",
sizeof("languages") - 1,
tmp);
}
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
"record_size",
sizeof("record_size") - 1))) {
zend_update_property(metadata_ce,
PROP_OBJ(object),
"recordSize",
sizeof("recordSize") - 1,
tmp);
if (Z_TYPE_P(tmp) == IS_LONG) {
record_size = Z_LVAL_P(tmp);
}
}
if (record_size != 0) {
zend_update_property_long(metadata_ce,
PROP_OBJ(object),
"nodeByteSize",
sizeof("nodeByteSize") - 1,
record_size / 4);
}
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
"node_count",
sizeof("node_count") - 1))) {
zend_update_property(metadata_ce,
PROP_OBJ(object),
"nodeCount",
sizeof("nodeCount") - 1,
tmp);
if (Z_TYPE_P(tmp) == IS_LONG) {
node_count = Z_LVAL_P(tmp);
}
}
if (record_size != 0) {
zend_update_property_long(metadata_ce,
PROP_OBJ(object),
"searchTreeSize",
sizeof("searchTreeSize") - 1,
record_size * node_count / 4);
}
}
// clang-format off
static zend_function_entry metadata_methods[] = {
PHP_ME(MaxMind_Db_Reader_Metadata, __construct, arginfo_metadata_construct, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
{NULL, NULL, NULL}
};
// clang-format on
PHP_MINIT_FUNCTION(maxminddb) {
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, PHP_MAXMINDDB_READER_EX_NS, NULL);
maxminddb_exception_ce =
zend_register_internal_class_ex(&ce, zend_ce_exception);
INIT_CLASS_ENTRY(ce, PHP_MAXMINDDB_READER_NS, maxminddb_methods);
maxminddb_ce = zend_register_internal_class(&ce TSRMLS_CC);
maxminddb_ce->create_object = maxminddb_create_handler;
INIT_CLASS_ENTRY(ce, PHP_MAXMINDDB_METADATA_NS, metadata_methods);
metadata_ce = zend_register_internal_class(&ce TSRMLS_CC);
zend_declare_property_null(metadata_ce,
"binaryFormatMajorVersion",
sizeof("binaryFormatMajorVersion") - 1,
ZEND_ACC_PUBLIC);
zend_declare_property_null(metadata_ce,
"binaryFormatMinorVersion",
sizeof("binaryFormatMinorVersion") - 1,
ZEND_ACC_PUBLIC);
zend_declare_property_null(
metadata_ce, "buildEpoch", sizeof("buildEpoch") - 1, ZEND_ACC_PUBLIC);
zend_declare_property_null(metadata_ce,
"databaseType",
sizeof("databaseType") - 1,
ZEND_ACC_PUBLIC);
zend_declare_property_null(
metadata_ce, "description", sizeof("description") - 1, ZEND_ACC_PUBLIC);
zend_declare_property_null(
metadata_ce, "ipVersion", sizeof("ipVersion") - 1, ZEND_ACC_PUBLIC);
zend_declare_property_null(
metadata_ce, "languages", sizeof("languages") - 1, ZEND_ACC_PUBLIC);
zend_declare_property_null(metadata_ce,
"nodeByteSize",
sizeof("nodeByteSize") - 1,
ZEND_ACC_PUBLIC);
zend_declare_property_null(
metadata_ce, "nodeCount", sizeof("nodeCount") - 1, ZEND_ACC_PUBLIC);
zend_declare_property_null(
metadata_ce, "recordSize", sizeof("recordSize") - 1, ZEND_ACC_PUBLIC);
zend_declare_property_null(metadata_ce,
"searchTreeSize",
sizeof("searchTreeSize") - 1,
ZEND_ACC_PUBLIC);
memcpy(&maxminddb_obj_handlers,
zend_get_std_object_handlers(),
sizeof(zend_object_handlers));
maxminddb_obj_handlers.clone_obj = NULL;
maxminddb_obj_handlers.offset = XtOffsetOf(maxminddb_obj, std);
maxminddb_obj_handlers.free_obj = maxminddb_free_storage;
zend_declare_class_constant_string(maxminddb_ce,
"MMDB_LIB_VERSION",
sizeof("MMDB_LIB_VERSION") - 1,
MMDB_lib_version() TSRMLS_CC);
return SUCCESS;
}
static PHP_MINFO_FUNCTION(maxminddb) {
php_info_print_table_start();
php_info_print_table_row(2, "MaxMind DB Reader", "enabled");
php_info_print_table_row(
2, "maxminddb extension version", PHP_MAXMINDDB_VERSION);
php_info_print_table_row(
2, "libmaxminddb library version", MMDB_lib_version());
php_info_print_table_end();
}
zend_module_entry maxminddb_module_entry = {STANDARD_MODULE_HEADER,
PHP_MAXMINDDB_EXTNAME,
NULL,
PHP_MINIT(maxminddb),
NULL,
NULL,
NULL,
PHP_MINFO(maxminddb),
PHP_MAXMINDDB_VERSION,
STANDARD_MODULE_PROPERTIES};
#ifdef COMPILE_DL_MAXMINDDB
ZEND_GET_MODULE(maxminddb)
#endif
maxmind-db/reader/ext/php_maxminddb.h 0000644 00000001536 15153552363 0013626 0 ustar 00 /* MaxMind, Inc., licenses this file to you under the Apache License, Version
* 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
#include <zend_interfaces.h>
#ifndef PHP_MAXMINDDB_H
#define PHP_MAXMINDDB_H 1
#define PHP_MAXMINDDB_VERSION "1.10.1"
#define PHP_MAXMINDDB_EXTNAME "maxminddb"
extern zend_module_entry maxminddb_module_entry;
#define phpext_maxminddb_ptr &maxminddb_module_entry
#endif
maxmind-db/reader/ext/tests/001-load.phpt 0000644 00000000332 15153552363 0014110 0 ustar 00 --TEST--
Check for maxminddb presence
--SKIPIF--
<?php if (!extension_loaded('maxminddb')) {
echo 'skip';
} ?>
--FILE--
<?php
echo 'maxminddb extension is available';
?>
--EXPECT--
maxminddb extension is available
maxmind-db/reader/ext/tests/002-final.phpt 0000644 00000000411 15153552363 0014261 0 ustar 00 --TEST--
Check that Reader class is not final
--SKIPIF--
<?php if (!extension_loaded('maxminddb')) {
echo 'skip';
} ?>
--FILE--
<?php
$reflectionClass = new \ReflectionClass('MaxMind\Db\Reader');
var_dump($reflectionClass->isFinal());
?>
--EXPECT--
bool(false)
maxmind-db/reader/ext/tests/003-open-basedir.phpt 0000644 00000000342 15153552363 0015544 0 ustar 00 --TEST--
openbase_dir is followed
--INI--
open_basedir=/--dne--
--FILE--
<?php
use MaxMind\Db\Reader;
$reader = new Reader('/usr/local/share/GeoIP/GeoIP2-City.mmdb');
?>
--EXPECTREGEX--
.*open_basedir restriction in effect.*
maxmind-db/reader/package.xml 0000644 00000004557 15153552363 0012166 0 ustar 00 <?xml version="1.0"?>
<package version="2.0" xmlns="http://pear.php.net/dtd/package-2.0"
xmlns:tasks="http://pear.php.net/dtd/tasks-1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>maxminddb</name>
<channel>pecl.php.net</channel>
<summary>Reader for the MaxMind DB file format</summary>
<description>This is the PHP extension for reading MaxMind DB files. MaxMind DB is a binary file format that stores data indexed by IP address subnets (IPv4 or IPv6).</description>
<lead>
<name>Greg Oschwald</name>
<user>oschwald</user>
<email>goschwald@maxmind.com</email>
<active>yes</active>
</lead>
<date>2021-04-14</date>
<version>
<release>1.10.1</release>
<api>1.10.1</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="https://github.com/maxmind/MaxMind-DB-Reader-php/blob/main/LICENSE">Apache License 2.0</license>
<notes>* Fix a `TypeError` exception in the pure PHP reader when using large
databases on 32-bit PHP builds with the `bcmath` extension. Reported
by dodo1708. GitHub #124.</notes>
<contents>
<dir name="/">
<file role="doc" name="LICENSE"/>
<file role="doc" name="CHANGELOG.md"/>
<file role="doc" name="README.md"/>
<dir name="ext">
<file role="src" name="config.m4"/>
<file role="src" name="config.w32"/>
<file role="src" name="maxminddb.c"/>
<file role="src" name="php_maxminddb.h"/>
<dir name="tests">
<file role="test" name="001-load.phpt"/>
<file role="test" name="002-final.phpt"/>
<file role="test" name="003-open-basedir.phpt"/>
</dir>
</dir>
</dir>
</contents>
<dependencies>
<required>
<php>
<min>7.2.0</min>
</php>
<pearinstaller>
<min>1.10.0</min>
</pearinstaller>
</required>
</dependencies>
<providesextension>maxminddb</providesextension>
<extsrcrelease />
</package>
maxmind-db/reader/src/MaxMind/Db/Reader/Decoder.php 0000644 00000024304 15153552363 0015772 0 ustar 00 <?php
declare(strict_types=1);
namespace MaxMind\Db\Reader;
// @codingStandardsIgnoreLine
use RuntimeException;
class Decoder
{
/**
* @var resource
*/
private $fileStream;
/**
* @var int
*/
private $pointerBase;
/**
* @var float
*/
private $pointerBaseByteSize;
/**
* This is only used for unit testing.
*
* @var bool
*/
private $pointerTestHack;
/**
* @var bool
*/
private $switchByteOrder;
private const _EXTENDED = 0;
private const _POINTER = 1;
private const _UTF8_STRING = 2;
private const _DOUBLE = 3;
private const _BYTES = 4;
private const _UINT16 = 5;
private const _UINT32 = 6;
private const _MAP = 7;
private const _INT32 = 8;
private const _UINT64 = 9;
private const _UINT128 = 10;
private const _ARRAY = 11;
private const _CONTAINER = 12;
private const _END_MARKER = 13;
private const _BOOLEAN = 14;
private const _FLOAT = 15;
/**
* @param resource $fileStream
*/
public function __construct(
$fileStream,
int $pointerBase = 0,
bool $pointerTestHack = false
) {
$this->fileStream = $fileStream;
$this->pointerBase = $pointerBase;
$this->pointerBaseByteSize = $pointerBase > 0 ? log($pointerBase, 2) / 8 : 0;
$this->pointerTestHack = $pointerTestHack;
$this->switchByteOrder = $this->isPlatformLittleEndian();
}
public function decode(int $offset): array
{
$ctrlByte = \ord(Util::read($this->fileStream, $offset, 1));
++$offset;
$type = $ctrlByte >> 5;
// Pointers are a special case, we don't read the next $size bytes, we
// use the size to determine the length of the pointer and then follow
// it.
if ($type === self::_POINTER) {
[$pointer, $offset] = $this->decodePointer($ctrlByte, $offset);
// for unit testing
if ($this->pointerTestHack) {
return [$pointer];
}
[$result] = $this->decode($pointer);
return [$result, $offset];
}
if ($type === self::_EXTENDED) {
$nextByte = \ord(Util::read($this->fileStream, $offset, 1));
$type = $nextByte + 7;
if ($type < 8) {
throw new InvalidDatabaseException(
'Something went horribly wrong in the decoder. An extended type '
. 'resolved to a type number < 8 ('
. $type
. ')'
);
}
++$offset;
}
[$size, $offset] = $this->sizeFromCtrlByte($ctrlByte, $offset);
return $this->decodeByType($type, $offset, $size);
}
private function decodeByType(int $type, int $offset, int $size): array
{
switch ($type) {
case self::_MAP:
return $this->decodeMap($size, $offset);
case self::_ARRAY:
return $this->decodeArray($size, $offset);
case self::_BOOLEAN:
return [$this->decodeBoolean($size), $offset];
}
$newOffset = $offset + $size;
$bytes = Util::read($this->fileStream, $offset, $size);
switch ($type) {
case self::_BYTES:
case self::_UTF8_STRING:
return [$bytes, $newOffset];
case self::_DOUBLE:
$this->verifySize(8, $size);
return [$this->decodeDouble($bytes), $newOffset];
case self::_FLOAT:
$this->verifySize(4, $size);
return [$this->decodeFloat($bytes), $newOffset];
case self::_INT32:
return [$this->decodeInt32($bytes, $size), $newOffset];
case self::_UINT16:
case self::_UINT32:
case self::_UINT64:
case self::_UINT128:
return [$this->decodeUint($bytes, $size), $newOffset];
default:
throw new InvalidDatabaseException(
'Unknown or unexpected type: ' . $type
);
}
}
private function verifySize(int $expected, int $actual): void
{
if ($expected !== $actual) {
throw new InvalidDatabaseException(
"The MaxMind DB file's data section contains bad data (unknown data type or corrupt data)"
);
}
}
private function decodeArray(int $size, int $offset): array
{
$array = [];
for ($i = 0; $i < $size; ++$i) {
[$value, $offset] = $this->decode($offset);
$array[] = $value;
}
return [$array, $offset];
}
private function decodeBoolean(int $size): bool
{
return $size !== 0;
}
private function decodeDouble(string $bytes): float
{
// This assumes IEEE 754 doubles, but most (all?) modern platforms
// use them.
[, $double] = unpack('E', $bytes);
return $double;
}
private function decodeFloat(string $bytes): float
{
// This assumes IEEE 754 floats, but most (all?) modern platforms
// use them.
[, $float] = unpack('G', $bytes);
return $float;
}
private function decodeInt32(string $bytes, int $size): int
{
switch ($size) {
case 0:
return 0;
case 1:
case 2:
case 3:
$bytes = str_pad($bytes, 4, "\x00", \STR_PAD_LEFT);
break;
case 4:
break;
default:
throw new InvalidDatabaseException(
"The MaxMind DB file's data section contains bad data (unknown data type or corrupt data)"
);
}
[, $int] = unpack('l', $this->maybeSwitchByteOrder($bytes));
return $int;
}
private function decodeMap(int $size, int $offset): array
{
$map = [];
for ($i = 0; $i < $size; ++$i) {
[$key, $offset] = $this->decode($offset);
[$value, $offset] = $this->decode($offset);
$map[$key] = $value;
}
return [$map, $offset];
}
private function decodePointer(int $ctrlByte, int $offset): array
{
$pointerSize = (($ctrlByte >> 3) & 0x3) + 1;
$buffer = Util::read($this->fileStream, $offset, $pointerSize);
$offset = $offset + $pointerSize;
switch ($pointerSize) {
case 1:
$packed = \chr($ctrlByte & 0x7) . $buffer;
[, $pointer] = unpack('n', $packed);
$pointer += $this->pointerBase;
break;
case 2:
$packed = "\x00" . \chr($ctrlByte & 0x7) . $buffer;
[, $pointer] = unpack('N', $packed);
$pointer += $this->pointerBase + 2048;
break;
case 3:
$packed = \chr($ctrlByte & 0x7) . $buffer;
// It is safe to use 'N' here, even on 32 bit machines as the
// first bit is 0.
[, $pointer] = unpack('N', $packed);
$pointer += $this->pointerBase + 526336;
break;
case 4:
// We cannot use unpack here as we might overflow on 32 bit
// machines
$pointerOffset = $this->decodeUint($buffer, $pointerSize);
$pointerBase = $this->pointerBase;
if (\PHP_INT_MAX - $pointerBase >= $pointerOffset) {
$pointer = $pointerOffset + $pointerBase;
} else {
throw new RuntimeException(
'The database offset is too large to be represented on your platform.'
);
}
break;
default:
throw new InvalidDatabaseException(
'Unexpected pointer size ' . $pointerSize
);
}
return [$pointer, $offset];
}
// @phpstan-ignore-next-line
private function decodeUint(string $bytes, int $byteLength)
{
if ($byteLength === 0) {
return 0;
}
$integer = 0;
// PHP integers are signed. PHP_INT_SIZE - 1 is the number of
// complete bytes that can be converted to an integer. However,
// we can convert another byte if the leading bit is zero.
$useRealInts = $byteLength <= \PHP_INT_SIZE - 1
|| ($byteLength === \PHP_INT_SIZE && (\ord($bytes[0]) & 0x80) === 0);
for ($i = 0; $i < $byteLength; ++$i) {
$part = \ord($bytes[$i]);
// We only use gmp or bcmath if the final value is too big
if ($useRealInts) {
$integer = ($integer << 8) + $part;
} elseif (\extension_loaded('gmp')) {
$integer = gmp_strval(gmp_add(gmp_mul((string) $integer, '256'), $part));
} elseif (\extension_loaded('bcmath')) {
$integer = bcadd(bcmul((string) $integer, '256'), (string) $part);
} else {
throw new RuntimeException(
'The gmp or bcmath extension must be installed to read this database.'
);
}
}
return $integer;
}
private function sizeFromCtrlByte(int $ctrlByte, int $offset): array
{
$size = $ctrlByte & 0x1F;
if ($size < 29) {
return [$size, $offset];
}
$bytesToRead = $size - 28;
$bytes = Util::read($this->fileStream, $offset, $bytesToRead);
if ($size === 29) {
$size = 29 + \ord($bytes);
} elseif ($size === 30) {
[, $adjust] = unpack('n', $bytes);
$size = 285 + $adjust;
} else {
[, $adjust] = unpack('N', "\x00" . $bytes);
$size = $adjust + 65821;
}
return [$size, $offset + $bytesToRead];
}
private function maybeSwitchByteOrder(string $bytes): string
{
return $this->switchByteOrder ? strrev($bytes) : $bytes;
}
private function isPlatformLittleEndian(): bool
{
$testint = 0x00FF;
$packed = pack('S', $testint);
return $testint === current(unpack('v', $packed));
}
}
maxmind-db/reader/src/MaxMind/Db/Reader/InvalidDatabaseException.php 0000644 00000000332 15153552363 0021312 0 ustar 00 <?php
declare(strict_types=1);
namespace MaxMind\Db\Reader;
use Exception;
/**
* This class should be thrown when unexpected data is found in the database.
*/
class InvalidDatabaseException extends Exception
{
}
maxmind-db/reader/src/MaxMind/Db/Reader/Metadata.php 0000644 00000006256 15153552363 0016153 0 ustar 00 <?php
declare(strict_types=1);
namespace MaxMind\Db\Reader;
use ArgumentCountError;
/**
* This class provides the metadata for the MaxMind DB file.
*/
class Metadata
{
/**
* This is an unsigned 16-bit integer indicating the major version number
* for the database's binary format.
*
* @var int
*/
public $binaryFormatMajorVersion;
/**
* This is an unsigned 16-bit integer indicating the minor version number
* for the database's binary format.
*
* @var int
*/
public $binaryFormatMinorVersion;
/**
* This is an unsigned 64-bit integer that contains the database build
* timestamp as a Unix epoch value.
*
* @var int
*/
public $buildEpoch;
/**
* This is a string that indicates the structure of each data record
* associated with an IP address. The actual definition of these
* structures is left up to the database creator.
*
* @var string
*/
public $databaseType;
/**
* This key will always point to a map (associative array). The keys of
* that map will be language codes, and the values will be a description
* in that language as a UTF-8 string. May be undefined for some
* databases.
*
* @var array
*/
public $description;
/**
* This is an unsigned 16-bit integer which is always 4 or 6. It indicates
* whether the database contains IPv4 or IPv6 address data.
*
* @var int
*/
public $ipVersion;
/**
* An array of strings, each of which is a language code. A given record
* may contain data items that have been localized to some or all of
* these languages. This may be undefined.
*
* @var array
*/
public $languages;
/**
* @var int
*/
public $nodeByteSize;
/**
* This is an unsigned 32-bit integer indicating the number of nodes in
* the search tree.
*
* @var int
*/
public $nodeCount;
/**
* This is an unsigned 16-bit integer. It indicates the number of bits in a
* record in the search tree. Note that each node consists of two records.
*
* @var int
*/
public $recordSize;
/**
* @var int
*/
public $searchTreeSize;
public function __construct(array $metadata)
{
if (\func_num_args() !== 1) {
throw new ArgumentCountError(
sprintf('%s() expects exactly 1 parameter, %d given', __METHOD__, \func_num_args())
);
}
$this->binaryFormatMajorVersion =
$metadata['binary_format_major_version'];
$this->binaryFormatMinorVersion =
$metadata['binary_format_minor_version'];
$this->buildEpoch = $metadata['build_epoch'];
$this->databaseType = $metadata['database_type'];
$this->languages = $metadata['languages'];
$this->description = $metadata['description'];
$this->ipVersion = $metadata['ip_version'];
$this->nodeCount = $metadata['node_count'];
$this->recordSize = $metadata['record_size'];
$this->nodeByteSize = $this->recordSize / 4;
$this->searchTreeSize = $this->nodeCount * $this->nodeByteSize;
}
}
maxmind-db/reader/src/MaxMind/Db/Reader/Util.php 0000644 00000001454 15153552363 0015343 0 ustar 00 <?php
declare(strict_types=1);
namespace MaxMind\Db\Reader;
class Util
{
/**
* @param resource $stream
*/
public static function read($stream, int $offset, int $numberOfBytes): string
{
if ($numberOfBytes === 0) {
return '';
}
if (fseek($stream, $offset) === 0) {
$value = fread($stream, $numberOfBytes);
// We check that the number of bytes read is equal to the number
// asked for. We use ftell as getting the length of $value is
// much slower.
if ($value !== false && ftell($stream) - $offset === $numberOfBytes) {
return $value;
}
}
throw new InvalidDatabaseException(
'The MaxMind DB file contains bad data'
);
}
}
maxmind-db/reader/src/MaxMind/Db/Reader.php 0000644 00000026570 15153552363 0014434 0 ustar 00 <?php
declare(strict_types=1);
namespace MaxMind\Db;
use ArgumentCountError;
use BadMethodCallException;
use Exception;
use InvalidArgumentException;
use MaxMind\Db\Reader\Decoder;
use MaxMind\Db\Reader\InvalidDatabaseException;
use MaxMind\Db\Reader\Metadata;
use MaxMind\Db\Reader\Util;
use UnexpectedValueException;
/**
* Instances of this class provide a reader for the MaxMind DB format. IP
* addresses can be looked up using the get method.
*/
class Reader
{
/**
* @var int
*/
private static $DATA_SECTION_SEPARATOR_SIZE = 16;
/**
* @var string
*/
private static $METADATA_START_MARKER = "\xAB\xCD\xEFMaxMind.com";
/**
* @var int
*/
private static $METADATA_START_MARKER_LENGTH = 14;
/**
* @var int
*/
private static $METADATA_MAX_SIZE = 131072; // 128 * 1024 = 128KiB
/**
* @var Decoder
*/
private $decoder;
/**
* @var resource
*/
private $fileHandle;
/**
* @var int
*/
private $fileSize;
/**
* @var int
*/
private $ipV4Start;
/**
* @var Metadata
*/
private $metadata;
/**
* Constructs a Reader for the MaxMind DB format. The file passed to it must
* be a valid MaxMind DB file such as a GeoIp2 database file.
*
* @param string $database
* the MaxMind DB file to use
*
* @throws InvalidArgumentException for invalid database path or unknown arguments
* @throws InvalidDatabaseException
* if the database is invalid or there is an error reading
* from it
*/
public function __construct(string $database)
{
if (\func_num_args() !== 1) {
throw new ArgumentCountError(
sprintf('%s() expects exactly 1 parameter, %d given', __METHOD__, \func_num_args())
);
}
$fileHandle = @fopen($database, 'rb');
if ($fileHandle === false) {
throw new InvalidArgumentException(
"The file \"$database\" does not exist or is not readable."
);
}
$this->fileHandle = $fileHandle;
$fileSize = @filesize($database);
if ($fileSize === false) {
throw new UnexpectedValueException(
"Error determining the size of \"$database\"."
);
}
$this->fileSize = $fileSize;
$start = $this->findMetadataStart($database);
$metadataDecoder = new Decoder($this->fileHandle, $start);
[$metadataArray] = $metadataDecoder->decode($start);
$this->metadata = new Metadata($metadataArray);
$this->decoder = new Decoder(
$this->fileHandle,
$this->metadata->searchTreeSize + self::$DATA_SECTION_SEPARATOR_SIZE
);
$this->ipV4Start = $this->ipV4StartNode();
}
/**
* Retrieves the record for the IP address.
*
* @param string $ipAddress
* the IP address to look up
*
* @throws BadMethodCallException if this method is called on a closed database
* @throws InvalidArgumentException if something other than a single IP address is passed to the method
* @throws InvalidDatabaseException
* if the database is invalid or there is an error reading
* from it
*
* @return mixed the record for the IP address
*/
public function get(string $ipAddress)
{
if (\func_num_args() !== 1) {
throw new ArgumentCountError(
sprintf('%s() expects exactly 1 parameter, %d given', __METHOD__, \func_num_args())
);
}
[$record] = $this->getWithPrefixLen($ipAddress);
return $record;
}
/**
* Retrieves the record for the IP address and its associated network prefix length.
*
* @param string $ipAddress
* the IP address to look up
*
* @throws BadMethodCallException if this method is called on a closed database
* @throws InvalidArgumentException if something other than a single IP address is passed to the method
* @throws InvalidDatabaseException
* if the database is invalid or there is an error reading
* from it
*
* @return array an array where the first element is the record and the
* second the network prefix length for the record
*/
public function getWithPrefixLen(string $ipAddress): array
{
if (\func_num_args() !== 1) {
throw new ArgumentCountError(
sprintf('%s() expects exactly 1 parameter, %d given', __METHOD__, \func_num_args())
);
}
if (!\is_resource($this->fileHandle)) {
throw new BadMethodCallException(
'Attempt to read from a closed MaxMind DB.'
);
}
[$pointer, $prefixLen] = $this->findAddressInTree($ipAddress);
if ($pointer === 0) {
return [null, $prefixLen];
}
return [$this->resolveDataPointer($pointer), $prefixLen];
}
private function findAddressInTree(string $ipAddress): array
{
$packedAddr = @inet_pton($ipAddress);
if ($packedAddr === false) {
throw new InvalidArgumentException(
"The value \"$ipAddress\" is not a valid IP address."
);
}
$rawAddress = unpack('C*', $packedAddr);
$bitCount = \count($rawAddress) * 8;
// The first node of the tree is always node 0, at the beginning of the
// value
$node = 0;
$metadata = $this->metadata;
// Check if we are looking up an IPv4 address in an IPv6 tree. If this
// is the case, we can skip over the first 96 nodes.
if ($metadata->ipVersion === 6) {
if ($bitCount === 32) {
$node = $this->ipV4Start;
}
} elseif ($metadata->ipVersion === 4 && $bitCount === 128) {
throw new InvalidArgumentException(
"Error looking up $ipAddress. You attempted to look up an"
. ' IPv6 address in an IPv4-only database.'
);
}
$nodeCount = $metadata->nodeCount;
for ($i = 0; $i < $bitCount && $node < $nodeCount; ++$i) {
$tempBit = 0xFF & $rawAddress[($i >> 3) + 1];
$bit = 1 & ($tempBit >> 7 - ($i % 8));
$node = $this->readNode($node, $bit);
}
if ($node === $nodeCount) {
// Record is empty
return [0, $i];
}
if ($node > $nodeCount) {
// Record is a data pointer
return [$node, $i];
}
throw new InvalidDatabaseException(
'Invalid or corrupt database. Maximum search depth reached without finding a leaf node'
);
}
private function ipV4StartNode(): int
{
// If we have an IPv4 database, the start node is the first node
if ($this->metadata->ipVersion === 4) {
return 0;
}
$node = 0;
for ($i = 0; $i < 96 && $node < $this->metadata->nodeCount; ++$i) {
$node = $this->readNode($node, 0);
}
return $node;
}
private function readNode(int $nodeNumber, int $index): int
{
$baseOffset = $nodeNumber * $this->metadata->nodeByteSize;
switch ($this->metadata->recordSize) {
case 24:
$bytes = Util::read($this->fileHandle, $baseOffset + $index * 3, 3);
[, $node] = unpack('N', "\x00" . $bytes);
return $node;
case 28:
$bytes = Util::read($this->fileHandle, $baseOffset + 3 * $index, 4);
if ($index === 0) {
$middle = (0xF0 & \ord($bytes[3])) >> 4;
} else {
$middle = 0x0F & \ord($bytes[0]);
}
[, $node] = unpack('N', \chr($middle) . substr($bytes, $index, 3));
return $node;
case 32:
$bytes = Util::read($this->fileHandle, $baseOffset + $index * 4, 4);
[, $node] = unpack('N', $bytes);
return $node;
default:
throw new InvalidDatabaseException(
'Unknown record size: '
. $this->metadata->recordSize
);
}
}
/**
* @return mixed
*/
private function resolveDataPointer(int $pointer)
{
$resolved = $pointer - $this->metadata->nodeCount
+ $this->metadata->searchTreeSize;
if ($resolved >= $this->fileSize) {
throw new InvalidDatabaseException(
"The MaxMind DB file's search tree is corrupt"
);
}
[$data] = $this->decoder->decode($resolved);
return $data;
}
/*
* This is an extremely naive but reasonably readable implementation. There
* are much faster algorithms (e.g., Boyer-Moore) for this if speed is ever
* an issue, but I suspect it won't be.
*/
private function findMetadataStart(string $filename): int
{
$handle = $this->fileHandle;
$fstat = fstat($handle);
$fileSize = $fstat['size'];
$marker = self::$METADATA_START_MARKER;
$markerLength = self::$METADATA_START_MARKER_LENGTH;
$minStart = $fileSize - min(self::$METADATA_MAX_SIZE, $fileSize);
for ($offset = $fileSize - $markerLength; $offset >= $minStart; --$offset) {
if (fseek($handle, $offset) !== 0) {
break;
}
$value = fread($handle, $markerLength);
if ($value === $marker) {
return $offset + $markerLength;
}
}
throw new InvalidDatabaseException(
"Error opening database file ($filename). " .
'Is this a valid MaxMind DB file?'
);
}
/**
* @throws InvalidArgumentException if arguments are passed to the method
* @throws BadMethodCallException if the database has been closed
*
* @return Metadata object for the database
*/
public function metadata(): Metadata
{
if (\func_num_args()) {
throw new ArgumentCountError(
sprintf('%s() expects exactly 0 parameters, %d given', __METHOD__, \func_num_args())
);
}
// Not technically required, but this makes it consistent with
// C extension and it allows us to change our implementation later.
if (!\is_resource($this->fileHandle)) {
throw new BadMethodCallException(
'Attempt to read from a closed MaxMind DB.'
);
}
return clone $this->metadata;
}
/**
* Closes the MaxMind DB and returns resources to the system.
*
* @throws Exception
* if an I/O error occurs
*/
public function close(): void
{
if (\func_num_args()) {
throw new ArgumentCountError(
sprintf('%s() expects exactly 0 parameters, %d given', __METHOD__, \func_num_args())
);
}
if (!\is_resource($this->fileHandle)) {
throw new BadMethodCallException(
'Attempt to close a closed MaxMind DB.'
);
}
fclose($this->fileHandle);
}
}
pelago/emogrifier/LICENSE 0000644 00000002054 15153552363 0011161 0 ustar 00 MIT License
Copyright (c) 2008-2018 Pelago
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
pelago/emogrifier/src/Caching/SimpleStringCache.php 0000644 00000004031 15153552363 0016351 0 ustar 00 <?php
declare(strict_types=1);
namespace Pelago\Emogrifier\Caching;
/**
* This cache caches string values with string keys. It is not PSR-6-compliant.
*
* Usage:
*
* ```php
* $cache = new SimpleStringCache();
* $cache->set($key, $value);
* …
* if ($cache->has($key) {
* $cachedValue = $cache->get($value);
* }
* ```
*
* @internal
*/
class SimpleStringCache
{
/**
* @var array<string, string>
*/
private $values = [];
/**
* Checks whether there is an entry stored for the given key.
*
* @param string $key the key to check; must not be empty
*
* @throws \InvalidArgumentException
*/
public function has(string $key): bool
{
$this->assertNotEmptyKey($key);
return isset($this->values[$key]);
}
/**
* Returns the entry stored for the given key, and throws an exception if the value does not exist
* (which helps keep the return type simple).
*
* @param string $key the key to of the item to retrieve; must not be empty
*
* @return string the retrieved value; may be empty
*
* @throws \BadMethodCallException
*/
public function get(string $key): string
{
if (!$this->has($key)) {
throw new \BadMethodCallException('You can only call `get` with a key for an existing value.', 1625996246);
}
return $this->values[$key];
}
/**
* Sets or overwrites an entry.
*
* @param string $key the key to of the item to set; must not be empty
* @param string $value the value to set; can be empty
*
* @throws \BadMethodCallException
*/
public function set(string $key, string $value): void
{
$this->assertNotEmptyKey($key);
$this->values[$key] = $value;
}
/**
* @throws \InvalidArgumentException
*/
private function assertNotEmptyKey(string $key): void
{
if ($key === '') {
throw new \InvalidArgumentException('Please provide a non-empty key.', 1625995840);
}
}
}
pelago/emogrifier/src/Css/CssDocument.php 0000644 00000014747 15153552363 0014447 0 ustar 00 <?php
declare(strict_types=1);
namespace Pelago\Emogrifier\Css;
use Sabberworm\CSS\CSSList\AtRuleBlockList as CssAtRuleBlockList;
use Sabberworm\CSS\CSSList\Document as SabberwormCssDocument;
use Sabberworm\CSS\Parser as CssParser;
use Sabberworm\CSS\Property\AtRule as CssAtRule;
use Sabberworm\CSS\Property\Charset as CssCharset;
use Sabberworm\CSS\Property\Import as CssImport;
use Sabberworm\CSS\Renderable as CssRenderable;
use Sabberworm\CSS\RuleSet\DeclarationBlock as CssDeclarationBlock;
use Sabberworm\CSS\RuleSet\RuleSet as CssRuleSet;
/**
* Parses and stores a CSS document from a string of CSS, and provides methods to obtain the CSS in parts or as data
* structures.
*
* @internal
*/
class CssDocument
{
/**
* @var SabberwormCssDocument
*/
private $sabberwormCssDocument;
/**
* `@import` rules must precede all other types of rules, except `@charset` rules. This property is used while
* rendering at-rules to enforce that.
*
* @var bool
*/
private $isImportRuleAllowed = true;
/**
* @param string $css
*/
public function __construct(string $css)
{
$cssParser = new CssParser($css);
/** @var SabberwormCssDocument $sabberwormCssDocument */
$sabberwormCssDocument = $cssParser->parse();
$this->sabberwormCssDocument = $sabberwormCssDocument;
}
/**
* Collates the media query, selectors and declarations for individual rules from the parsed CSS, in order.
*
* @param array<array-key, string> $allowedMediaTypes
*
* @return array<int, StyleRule>
*/
public function getStyleRulesData(array $allowedMediaTypes): array
{
$ruleMatches = [];
/** @var CssRenderable $rule */
foreach ($this->sabberwormCssDocument->getContents() as $rule) {
if ($rule instanceof CssAtRuleBlockList) {
$containingAtRule = $this->getFilteredAtIdentifierAndRule($rule, $allowedMediaTypes);
if (\is_string($containingAtRule)) {
/** @var CssRenderable $nestedRule */
foreach ($rule->getContents() as $nestedRule) {
if ($nestedRule instanceof CssDeclarationBlock) {
$ruleMatches[] = new StyleRule($nestedRule, $containingAtRule);
}
}
}
} elseif ($rule instanceof CssDeclarationBlock) {
$ruleMatches[] = new StyleRule($rule);
}
}
return $ruleMatches;
}
/**
* Renders at-rules from the parsed CSS that are valid and not conditional group rules (i.e. not rules such as
* `@media` which contain style rules whose data is returned by {@see getStyleRulesData}). Also does not render
* `@charset` rules; these are discarded (only UTF-8 is supported).
*
* @return string
*/
public function renderNonConditionalAtRules(): string
{
$this->isImportRuleAllowed = true;
/** @var array<int, CssRenderable> $cssContents */
$cssContents = $this->sabberwormCssDocument->getContents();
$atRules = \array_filter($cssContents, [$this, 'isValidAtRuleToRender']);
if ($atRules === []) {
return '';
}
$atRulesDocument = new SabberwormCssDocument();
$atRulesDocument->setContents($atRules);
/** @var string $renderedRules */
$renderedRules = $atRulesDocument->render();
return $renderedRules;
}
/**
* @param CssAtRuleBlockList $rule
* @param array<array-key, string> $allowedMediaTypes
*
* @return ?string
* If the nested at-rule is supported, it's opening declaration (e.g. "@media (max-width: 768px)") is
* returned; otherwise the return value is null.
*/
private function getFilteredAtIdentifierAndRule(CssAtRuleBlockList $rule, array $allowedMediaTypes): ?string
{
$result = null;
if ($rule->atRuleName() === 'media') {
/** @var string $mediaQueryList */
$mediaQueryList = $rule->atRuleArgs();
[$mediaType] = \explode('(', $mediaQueryList, 2);
if (\trim($mediaType) !== '') {
$escapedAllowedMediaTypes = \array_map(
static function (string $allowedMediaType): string {
return \preg_quote($allowedMediaType, '/');
},
$allowedMediaTypes
);
$mediaTypesMatcher = \implode('|', $escapedAllowedMediaTypes);
$isAllowed = \preg_match('/^\\s*+(?:only\\s++)?+(?:' . $mediaTypesMatcher . ')/i', $mediaType) > 0;
} else {
$isAllowed = true;
}
if ($isAllowed) {
$result = '@media ' . $mediaQueryList;
}
}
return $result;
}
/**
* Tests if a CSS rule is an at-rule that should be passed though and copied to a `<style>` element unmodified:
* - `@charset` rules are discarded - only UTF-8 is supported - `false` is returned;
* - `@import` rules are passed through only if they satisfy the specification ("user agents must ignore any
* '@import' rule that occurs inside a block or after any non-ignored statement other than an '@charset' or an
* '@import' rule");
* - `@media` rules are processed separately to see if their nested rules apply - `false` is returned;
* - `@font-face` rules are checked for validity - they must contain both a `src` and `font-family` property;
* - other at-rules are assumed to be valid and treated as a black box - `true` is returned.
*
* @param CssRenderable $rule
*
* @return bool
*/
private function isValidAtRuleToRender(CssRenderable $rule): bool
{
if ($rule instanceof CssCharset) {
return false;
}
if ($rule instanceof CssImport) {
return $this->isImportRuleAllowed;
}
$this->isImportRuleAllowed = false;
if (!$rule instanceof CssAtRule) {
return false;
}
switch ($rule->atRuleName()) {
case 'media':
$result = false;
break;
case 'font-face':
$result = $rule instanceof CssRuleSet
&& $rule->getRules('font-family') !== []
&& $rule->getRules('src') !== [];
break;
default:
$result = true;
}
return $result;
}
}
pelago/emogrifier/src/Css/StyleRule.php 0000644 00000004174 15153552363 0014141 0 ustar 00 <?php
declare(strict_types=1);
namespace Pelago\Emogrifier\Css;
use Sabberworm\CSS\Property\Selector;
use Sabberworm\CSS\RuleSet\DeclarationBlock;
/**
* This class represents a CSS style rule, including selectors, a declaration block, and an optional containing at-rule.
*
* @internal
*/
class StyleRule
{
/**
* @var DeclarationBlock
*/
private $declarationBlock;
/**
* @var string
*/
private $containingAtRule;
/**
* @param DeclarationBlock $declarationBlock
* @param string $containingAtRule e.g. `@media screen and (max-width: 480px)`
*/
public function __construct(DeclarationBlock $declarationBlock, string $containingAtRule = '')
{
$this->declarationBlock = $declarationBlock;
$this->containingAtRule = \trim($containingAtRule);
}
/**
* @return array<int, string> the selectors, e.g. `["h1", "p"]`
*/
public function getSelectors(): array
{
/** @var array<int, Selector> $selectors */
$selectors = $this->declarationBlock->getSelectors();
return \array_map(
static function (Selector $selector): string {
return (string)$selector;
},
$selectors
);
}
/**
* @return string the CSS declarations, separated and followed by a semicolon, e.g., `color: red; height: 4px;`
*/
public function getDeclarationAsText(): string
{
return \implode(' ', $this->declarationBlock->getRules());
}
/**
* Checks whether the declaration block has at least one declaration.
*/
public function hasAtLeastOneDeclaration(): bool
{
return $this->declarationBlock->getRules() !== [];
}
/**
* @returns string e.g. `@media screen and (max-width: 480px)`, or an empty string
*/
public function getContainingAtRule(): string
{
return $this->containingAtRule;
}
/**
* Checks whether the containing at-rule is non-empty and has any non-whitespace characters.
*/
public function hasContainingAtRule(): bool
{
return $this->getContainingAtRule() !== '';
}
}
pelago/emogrifier/src/CssInliner.php 0000644 00000123627 15153552363 0013537 0 ustar 00 <?php
declare(strict_types=1);
namespace Pelago\Emogrifier;
use Pelago\Emogrifier\Css\CssDocument;
use Pelago\Emogrifier\HtmlProcessor\AbstractHtmlProcessor;
use Pelago\Emogrifier\Utilities\CssConcatenator;
use Symfony\Component\CssSelector\CssSelectorConverter;
use Symfony\Component\CssSelector\Exception\ParseException;
/**
* This class provides functions for converting CSS styles into inline style attributes in your HTML code.
*/
class CssInliner extends AbstractHtmlProcessor
{
/**
* @var int
*/
private const CACHE_KEY_SELECTOR = 0;
/**
* @var int
*/
private const CACHE_KEY_CSS_DECLARATIONS_BLOCK = 1;
/**
* @var int
*/
private const CACHE_KEY_COMBINED_STYLES = 2;
/**
* Regular expression component matching a static pseudo class in a selector, without the preceding ":",
* for which the applicable elements can be determined (by converting the selector to an XPath expression).
* (Contains alternation without a group and is intended to be placed within a capturing, non-capturing or lookahead
* group, as appropriate for the usage context.)
*
* @var string
*/
private const PSEUDO_CLASS_MATCHER
= 'empty|(?:first|last|nth(?:-last)?+|only)-(?:child|of-type)|not\\([[:ascii:]]*\\)';
/**
* This regular expression componenet matches an `...of-type` pseudo class name, without the preceding ":". These
* pseudo-classes can currently online be inlined if they have an associated type in the selector expression.
*
* @var string
*/
private const OF_TYPE_PSEUDO_CLASS_MATCHER = '(?:first|last|nth(?:-last)?+|only)-of-type';
/**
* regular expression component to match a selector combinator
*
* @var string
*/
private const COMBINATOR_MATCHER = '(?:\\s++|\\s*+[>+~]\\s*+)(?=[[:alpha:]_\\-.#*:\\[])';
/**
* @var array<string, bool>
*/
private $excludedSelectors = [];
/**
* @var array<string, bool>
*/
private $allowedMediaTypes = ['all' => true, 'screen' => true, 'print' => true];
/**
* @var array{
* 0: array<string, int>,
* 1: array<string, array<string, string>>,
* 2: array<string, string>
* }
*/
private $caches = [
self::CACHE_KEY_SELECTOR => [],
self::CACHE_KEY_CSS_DECLARATIONS_BLOCK => [],
self::CACHE_KEY_COMBINED_STYLES => [],
];
/**
* @var ?CssSelectorConverter
*/
private $cssSelectorConverter = null;
/**
* the visited nodes with the XPath paths as array keys
*
* @var array<string, \DOMElement>
*/
private $visitedNodes = [];
/**
* the styles to apply to the nodes with the XPath paths as array keys for the outer array
* and the attribute names/values as key/value pairs for the inner array
*
* @var array<string, array<string, string>>
*/
private $styleAttributesForNodes = [];
/**
* Determines whether the "style" attributes of tags in the the HTML passed to this class should be preserved.
* If set to false, the value of the style attributes will be discarded.
*
* @var bool
*/
private $isInlineStyleAttributesParsingEnabled = true;
/**
* Determines whether the `<style>` blocks in the HTML passed to this class should be parsed.
*
* If set to true, the `<style>` blocks will be removed from the HTML and their contents will be applied to the HTML
* via inline styles.
*
* If set to false, the `<style>` blocks will be left as they are in the HTML.
*
* @var bool
*/
private $isStyleBlocksParsingEnabled = true;
/**
* For calculating selector precedence order.
* Keys are a regular expression part to match before a CSS name.
* Values are a multiplier factor per match to weight specificity.
*
* @var array<string, int>
*/
private $selectorPrecedenceMatchers = [
// IDs: worth 10000
'\\#' => 10000,
// classes, attributes, pseudo-classes (not pseudo-elements) except `:not`: worth 100
'(?:\\.|\\[|(?<!:):(?!not\\())' => 100,
// elements (not attribute values or `:not`), pseudo-elements: worth 1
'(?:(?<![="\':\\w\\-])|::)' => 1,
];
/**
* array of data describing CSS rules which apply to the document but cannot be inlined, in the format returned by
* {@see collateCssRules}
*
* @var array<array-key, array{
* media: string,
* selector: string,
* hasUnmatchablePseudo: bool,
* declarationsBlock: string,
* line: int
* }>|null
*/
private $matchingUninlinableCssRules = null;
/**
* Emogrifier will throw Exceptions when it encounters an error instead of silently ignoring them.
*
* @var bool
*/
private $debug = false;
/**
* Inlines the given CSS into the existing HTML.
*
* @param string $css the CSS to inline, must be UTF-8-encoded
*
* @return self fluent interface
*
* @throws ParseException in debug mode, if an invalid selector is encountered
* @throws \RuntimeException in debug mode, if an internal PCRE error occurs
*/
public function inlineCss(string $css = ''): self
{
$this->clearAllCaches();
$this->purgeVisitedNodes();
$this->normalizeStyleAttributesOfAllNodes();
$combinedCss = $css;
// grab any existing style blocks from the HTML and append them to the existing CSS
// (these blocks should be appended so as to have precedence over conflicting styles in the existing CSS)
if ($this->isStyleBlocksParsingEnabled) {
$combinedCss .= $this->getCssFromAllStyleNodes();
}
$parsedCss = new CssDocument($combinedCss);
$excludedNodes = $this->getNodesToExclude();
$cssRules = $this->collateCssRules($parsedCss);
$cssSelectorConverter = $this->getCssSelectorConverter();
foreach ($cssRules['inlinable'] as $cssRule) {
try {
$nodesMatchingCssSelectors = $this->getXPath()
->query($cssSelectorConverter->toXPath($cssRule['selector']));
/** @var \DOMElement $node */
foreach ($nodesMatchingCssSelectors as $node) {
if (\in_array($node, $excludedNodes, true)) {
continue;
}
$this->copyInlinableCssToStyleAttribute($node, $cssRule);
}
} catch (ParseException $e) {
if ($this->debug) {
throw $e;
}
}
}
if ($this->isInlineStyleAttributesParsingEnabled) {
$this->fillStyleAttributesWithMergedStyles();
}
$this->removeImportantAnnotationFromAllInlineStyles();
$this->determineMatchingUninlinableCssRules($cssRules['uninlinable']);
$this->copyUninlinableCssToStyleNode($parsedCss);
return $this;
}
/**
* Disables the parsing of inline styles.
*
* @return self fluent interface
*/
public function disableInlineStyleAttributesParsing(): self
{
$this->isInlineStyleAttributesParsingEnabled = false;
return $this;
}
/**
* Disables the parsing of `<style>` blocks.
*
* @return self fluent interface
*/
public function disableStyleBlocksParsing(): self
{
$this->isStyleBlocksParsingEnabled = false;
return $this;
}
/**
* Marks a media query type to keep.
*
* @param string $mediaName the media type name, e.g., "braille"
*
* @return self fluent interface
*/
public function addAllowedMediaType(string $mediaName): self
{
$this->allowedMediaTypes[$mediaName] = true;
return $this;
}
/**
* Drops a media query type from the allowed list.
*
* @param string $mediaName the tag name, e.g., "braille"
*
* @return self fluent interface
*/
public function removeAllowedMediaType(string $mediaName): self
{
if (isset($this->allowedMediaTypes[$mediaName])) {
unset($this->allowedMediaTypes[$mediaName]);
}
return $this;
}
/**
* Adds a selector to exclude nodes from emogrification.
*
* Any nodes that match the selector will not have their style altered.
*
* @param string $selector the selector to exclude, e.g., ".editor"
*
* @return self fluent interface
*/
public function addExcludedSelector(string $selector): self
{
$this->excludedSelectors[$selector] = true;
return $this;
}
/**
* No longer excludes the nodes matching this selector from emogrification.
*
* @param string $selector the selector to no longer exclude, e.g., ".editor"
*
* @return self fluent interface
*/
public function removeExcludedSelector(string $selector): self
{
if (isset($this->excludedSelectors[$selector])) {
unset($this->excludedSelectors[$selector]);
}
return $this;
}
/**
* Sets the debug mode.
*
* @param bool $debug set to true to enable debug mode
*
* @return self fluent interface
*/
public function setDebug(bool $debug): self
{
$this->debug = $debug;
return $this;
}
/**
* Gets the array of selectors present in the CSS provided to `inlineCss()` for which the declarations could not be
* applied as inline styles, but which may affect elements in the HTML. The relevant CSS will have been placed in a
* `<style>` element. The selectors may include those used within `@media` rules or those involving dynamic
* pseudo-classes (such as `:hover`) or pseudo-elements (such as `::after`).
*
* @return array<array-key, string>
*
* @throws \BadMethodCallException if `inlineCss` has not been called first
*/
public function getMatchingUninlinableSelectors(): array
{
return \array_column($this->getMatchingUninlinableCssRules(), 'selector');
}
/**
* @return array<array-key, array{
* media: string,
* selector: string,
* hasUnmatchablePseudo: bool,
* declarationsBlock: string,
* line: int
* }>
*
* @throws \BadMethodCallException if `inlineCss` has not been called first
*/
private function getMatchingUninlinableCssRules(): array
{
if (!\is_array($this->matchingUninlinableCssRules)) {
throw new \BadMethodCallException('inlineCss must be called first', 1568385221);
}
return $this->matchingUninlinableCssRules;
}
/**
* Clears all caches.
*/
private function clearAllCaches(): void
{
$this->caches = [
self::CACHE_KEY_SELECTOR => [],
self::CACHE_KEY_CSS_DECLARATIONS_BLOCK => [],
self::CACHE_KEY_COMBINED_STYLES => [],
];
}
/**
* Purges the visited nodes.
*/
private function purgeVisitedNodes(): void
{
$this->visitedNodes = [];
$this->styleAttributesForNodes = [];
}
/**
* Parses the document and normalizes all existing CSS attributes.
* This changes 'DISPLAY: none' to 'display: none'.
* We wouldn't have to do this if DOMXPath supported XPath 2.0.
* Also stores a reference of nodes with existing inline styles so we don't overwrite them.
*/
private function normalizeStyleAttributesOfAllNodes(): void
{
/** @var \DOMElement $node */
foreach ($this->getAllNodesWithStyleAttribute() as $node) {
if ($this->isInlineStyleAttributesParsingEnabled) {
$this->normalizeStyleAttributes($node);
}
// Remove style attribute in every case, so we can add them back (if inline style attributes
// parsing is enabled) to the end of the style list, thus keeping the right priority of CSS rules;
// else original inline style rules may remain at the beginning of the final inline style definition
// of a node, which may give not the desired results
$node->removeAttribute('style');
}
}
/**
* Returns a list with all DOM nodes that have a style attribute.
*
* @return \DOMNodeList
*
* @throws \RuntimeException
*/
private function getAllNodesWithStyleAttribute(): \DOMNodeList
{
$query = '//*[@style]';
$matches = $this->getXPath()->query($query);
if (!$matches instanceof \DOMNodeList) {
throw new \RuntimeException('XPatch query failed: ' . $query, 1618577797);
}
return $matches;
}
/**
* Normalizes the value of the "style" attribute and saves it.
*
* @param \DOMElement $node
*/
private function normalizeStyleAttributes(\DOMElement $node): void
{
$normalizedOriginalStyle = \preg_replace_callback(
'/-?+[_a-zA-Z][\\w\\-]*+(?=:)/S',
/** @param array<array-key, string> $propertyNameMatches */
static function (array $propertyNameMatches): string {
return \strtolower($propertyNameMatches[0]);
},
$node->getAttribute('style')
);
// In order to not overwrite existing style attributes in the HTML, we have to save the original HTML styles.
$nodePath = $node->getNodePath();
if (\is_string($nodePath) && !isset($this->styleAttributesForNodes[$nodePath])) {
$this->styleAttributesForNodes[$nodePath] = $this->parseCssDeclarationsBlock($normalizedOriginalStyle);
$this->visitedNodes[$nodePath] = $node;
}
$node->setAttribute('style', $normalizedOriginalStyle);
}
/**
* Parses a CSS declaration block into property name/value pairs.
*
* Example:
*
* The declaration block
*
* "color: #000; font-weight: bold;"
*
* will be parsed into the following array:
*
* "color" => "#000"
* "font-weight" => "bold"
*
* @param string $cssDeclarationsBlock the CSS declarations block without the curly braces, may be empty
*
* @return array<string, string>
* the CSS declarations with the property names as array keys and the property values as array values
*/
private function parseCssDeclarationsBlock(string $cssDeclarationsBlock): array
{
if (isset($this->caches[self::CACHE_KEY_CSS_DECLARATIONS_BLOCK][$cssDeclarationsBlock])) {
return $this->caches[self::CACHE_KEY_CSS_DECLARATIONS_BLOCK][$cssDeclarationsBlock];
}
$properties = [];
foreach (\preg_split('/;(?!base64|charset)/', $cssDeclarationsBlock) as $declaration) {
/** @var array<int, string> $matches */
$matches = [];
if (!\preg_match('/^([A-Za-z\\-]+)\\s*:\\s*(.+)$/s', \trim($declaration), $matches)) {
continue;
}
$propertyName = \strtolower($matches[1]);
$propertyValue = $matches[2];
$properties[$propertyName] = $propertyValue;
}
$this->caches[self::CACHE_KEY_CSS_DECLARATIONS_BLOCK][$cssDeclarationsBlock] = $properties;
return $properties;
}
/**
* Returns CSS content.
*
* @return string
*/
private function getCssFromAllStyleNodes(): string
{
$styleNodes = $this->getXPath()->query('//style');
if ($styleNodes === false) {
return '';
}
$css = '';
foreach ($styleNodes as $styleNode) {
$css .= "\n\n" . $styleNode->nodeValue;
$parentNode = $styleNode->parentNode;
if ($parentNode instanceof \DOMNode) {
$parentNode->removeChild($styleNode);
}
}
return $css;
}
/**
* Find the nodes that are not to be emogrified.
*
* @return array<int, \DOMElement>
*
* @throws ParseException
* @throws \UnexpectedValueException
*/
private function getNodesToExclude(): array
{
$excludedNodes = [];
foreach (\array_keys($this->excludedSelectors) as $selectorToExclude) {
try {
$matchingNodes = $this->getXPath()
->query($this->getCssSelectorConverter()->toXPath($selectorToExclude));
foreach ($matchingNodes as $node) {
if (!$node instanceof \DOMElement) {
$path = $node->getNodePath() ?? '$node';
throw new \UnexpectedValueException($path . ' is not a DOMElement.', 1617975914);
}
$excludedNodes[] = $node;
}
} catch (ParseException $e) {
if ($this->debug) {
throw $e;
}
}
}
return $excludedNodes;
}
/**
* @return CssSelectorConverter
*/
private function getCssSelectorConverter(): CssSelectorConverter
{
if (!$this->cssSelectorConverter instanceof CssSelectorConverter) {
$this->cssSelectorConverter = new CssSelectorConverter();
}
return $this->cssSelectorConverter;
}
/**
* Collates the individual rules from a `CssDocument` object.
*
* @param CssDocument $parsedCss
*
* @return array<string, array<array-key, array{
* media: string,
* selector: string,
* hasUnmatchablePseudo: bool,
* declarationsBlock: string,
* line: int
* }>>
* This 2-entry array has the key "inlinable" containing rules which can be inlined as `style` attributes
* and the key "uninlinable" containing rules which cannot. Each value is an array of sub-arrays with the
* following keys:
* - "media" (the media query string, e.g. "@media screen and (max-width: 480px)",
* or an empty string if not from a `@media` rule);
* - "selector" (the CSS selector, e.g., "*" or "header h1");
* - "hasUnmatchablePseudo" (`true` if that selector contains pseudo-elements or dynamic pseudo-classes such
* that the declarations cannot be applied inline);
* - "declarationsBlock" (the semicolon-separated CSS declarations for that selector,
* e.g., `color: red; height: 4px;`);
* - "line" (the line number, e.g. 42).
*/
private function collateCssRules(CssDocument $parsedCss): array
{
$matches = $parsedCss->getStyleRulesData(\array_keys($this->allowedMediaTypes));
$cssRules = [
'inlinable' => [],
'uninlinable' => [],
];
foreach ($matches as $key => $cssRule) {
if (!$cssRule->hasAtLeastOneDeclaration()) {
continue;
}
$mediaQuery = $cssRule->getContainingAtRule();
$declarationsBlock = $cssRule->getDeclarationAsText();
foreach ($cssRule->getSelectors() as $selector) {
// don't process pseudo-elements and behavioral (dynamic) pseudo-classes;
// only allow structural pseudo-classes
$hasPseudoElement = \strpos($selector, '::') !== false;
$hasUnmatchablePseudo = $hasPseudoElement || $this->hasUnsupportedPseudoClass($selector);
$parsedCssRule = [
'media' => $mediaQuery,
'selector' => $selector,
'hasUnmatchablePseudo' => $hasUnmatchablePseudo,
'declarationsBlock' => $declarationsBlock,
// keep track of where it appears in the file, since order is important
'line' => $key,
];
$ruleType = (!$cssRule->hasContainingAtRule() && !$hasUnmatchablePseudo) ? 'inlinable' : 'uninlinable';
$cssRules[$ruleType][] = $parsedCssRule;
}
}
\usort(
$cssRules['inlinable'],
/**
* @param array{selector: string, line: int} $first
* @param array{selector: string, line: int} $second
*/
function (array $first, array $second): int {
return $this->sortBySelectorPrecedence($first, $second);
}
);
return $cssRules;
}
/**
* Tests if a selector contains a pseudo-class which would mean it cannot be converted to an XPath expression for
* inlining CSS declarations.
*
* Any pseudo class that does not match {@see PSEUDO_CLASS_MATCHER} cannot be converted. Additionally, `...of-type`
* pseudo-classes cannot be converted if they are not associated with a type selector.
*
* @param string $selector
*
* @return bool
*/
private function hasUnsupportedPseudoClass(string $selector): bool
{
if (\preg_match('/:(?!' . self::PSEUDO_CLASS_MATCHER . ')[\\w\\-]/i', $selector)) {
return true;
}
if (!\preg_match('/:(?:' . self::OF_TYPE_PSEUDO_CLASS_MATCHER . ')/i', $selector)) {
return false;
}
foreach (\preg_split('/' . self::COMBINATOR_MATCHER . '/', $selector) as $selectorPart) {
if ($this->selectorPartHasUnsupportedOfTypePseudoClass($selectorPart)) {
return true;
}
}
return false;
}
/**
* Tests if part of a selector contains an `...of-type` pseudo-class such that it cannot be converted to an XPath
* expression.
*
* @param string $selectorPart part of a selector which has been split up at combinators
*
* @return bool `true` if the selector part does not have a type but does have an `...of-type` pseudo-class
*/
private function selectorPartHasUnsupportedOfTypePseudoClass(string $selectorPart): bool
{
if (\preg_match('/^[\\w\\-]/', $selectorPart)) {
return false;
}
return (bool)\preg_match('/:(?:' . self::OF_TYPE_PSEUDO_CLASS_MATCHER . ')/i', $selectorPart);
}
/**
* @param array{selector: string, line: int} $first
* @param array{selector: string, line: int} $second
*
* @return int
*/
private function sortBySelectorPrecedence(array $first, array $second): int
{
$precedenceOfFirst = $this->getCssSelectorPrecedence($first['selector']);
$precedenceOfSecond = $this->getCssSelectorPrecedence($second['selector']);
// We want these sorted in ascending order so selectors with lesser precedence get processed first and
// selectors with greater precedence get sorted last.
$precedenceForEquals = $first['line'] < $second['line'] ? -1 : 1;
$precedenceForNotEquals = $precedenceOfFirst < $precedenceOfSecond ? -1 : 1;
return ($precedenceOfFirst === $precedenceOfSecond) ? $precedenceForEquals : $precedenceForNotEquals;
}
/**
* @param string $selector
*
* @return int
*/
private function getCssSelectorPrecedence(string $selector): int
{
$selectorKey = \md5($selector);
if (isset($this->caches[self::CACHE_KEY_SELECTOR][$selectorKey])) {
return $this->caches[self::CACHE_KEY_SELECTOR][$selectorKey];
}
$precedence = 0;
foreach ($this->selectorPrecedenceMatchers as $matcher => $value) {
if (\trim($selector) === '') {
break;
}
$number = 0;
$selector = \preg_replace('/' . $matcher . '\\w+/', '', $selector, -1, $number);
$precedence += ($value * (int)$number);
}
$this->caches[self::CACHE_KEY_SELECTOR][$selectorKey] = $precedence;
return $precedence;
}
/**
* Copies $cssRule into the style attribute of $node.
*
* Note: This method does not check whether $cssRule matches $node.
*
* @param \DOMElement $node
* @param array{
* media: string,
* selector: string,
* hasUnmatchablePseudo: bool,
* declarationsBlock: string,
* line: int
* } $cssRule
*/
private function copyInlinableCssToStyleAttribute(\DOMElement $node, array $cssRule): void
{
$declarationsBlock = $cssRule['declarationsBlock'];
$newStyleDeclarations = $this->parseCssDeclarationsBlock($declarationsBlock);
if ($newStyleDeclarations === []) {
return;
}
// if it has a style attribute, get it, process it, and append (overwrite) new stuff
if ($node->hasAttribute('style')) {
// break it up into an associative array
$oldStyleDeclarations = $this->parseCssDeclarationsBlock($node->getAttribute('style'));
} else {
$oldStyleDeclarations = [];
}
$node->setAttribute(
'style',
$this->generateStyleStringFromDeclarationsArrays($oldStyleDeclarations, $newStyleDeclarations)
);
}
/**
* This method merges old or existing name/value array with new name/value array
* and then generates a string of the combined style suitable for placing inline.
* This becomes the single point for CSS string generation allowing for consistent
* CSS output no matter where the CSS originally came from.
*
* @param array<string, string> $oldStyles
* @param array<string, string> $newStyles
*
* @return string
*/
private function generateStyleStringFromDeclarationsArrays(array $oldStyles, array $newStyles): string
{
$cacheKey = \serialize([$oldStyles, $newStyles]);
if (isset($this->caches[self::CACHE_KEY_COMBINED_STYLES][$cacheKey])) {
return $this->caches[self::CACHE_KEY_COMBINED_STYLES][$cacheKey];
}
// Unset the overridden styles to preserve order, important if shorthand and individual properties are mixed
foreach ($oldStyles as $attributeName => $attributeValue) {
if (!isset($newStyles[$attributeName])) {
continue;
}
$newAttributeValue = $newStyles[$attributeName];
if (
$this->attributeValueIsImportant($attributeValue)
&& !$this->attributeValueIsImportant($newAttributeValue)
) {
unset($newStyles[$attributeName]);
} else {
unset($oldStyles[$attributeName]);
}
}
$combinedStyles = \array_merge($oldStyles, $newStyles);
$style = '';
foreach ($combinedStyles as $attributeName => $attributeValue) {
$style .= \strtolower(\trim($attributeName)) . ': ' . \trim($attributeValue) . '; ';
}
$trimmedStyle = \rtrim($style);
$this->caches[self::CACHE_KEY_COMBINED_STYLES][$cacheKey] = $trimmedStyle;
return $trimmedStyle;
}
/**
* Checks whether $attributeValue is marked as !important.
*
* @param string $attributeValue
*
* @return bool
*/
private function attributeValueIsImportant(string $attributeValue): bool
{
return (bool)\preg_match('/!\\s*+important$/i', $attributeValue);
}
/**
* Merges styles from styles attributes and style nodes and applies them to the attribute nodes
*/
private function fillStyleAttributesWithMergedStyles(): void
{
foreach ($this->styleAttributesForNodes as $nodePath => $styleAttributesForNode) {
$node = $this->visitedNodes[$nodePath];
$currentStyleAttributes = $this->parseCssDeclarationsBlock($node->getAttribute('style'));
$node->setAttribute(
'style',
$this->generateStyleStringFromDeclarationsArrays(
$currentStyleAttributes,
$styleAttributesForNode
)
);
}
}
/**
* Searches for all nodes with a style attribute and removes the "!important" annotations out of
* the inline style declarations, eventually by rearranging declarations.
*
* @throws \RuntimeException
*/
private function removeImportantAnnotationFromAllInlineStyles(): void
{
/** @var \DOMElement $node */
foreach ($this->getAllNodesWithStyleAttribute() as $node) {
$this->removeImportantAnnotationFromNodeInlineStyle($node);
}
}
/**
* Removes the "!important" annotations out of the inline style declarations,
* eventually by rearranging declarations.
* Rearranging needed when !important shorthand properties are followed by some of their
* not !important expanded-version properties.
* For example "font: 12px serif !important; font-size: 13px;" must be reordered
* to "font-size: 13px; font: 12px serif;" in order to remain correct.
*
* @param \DOMElement $node
*
* @throws \RuntimeException
*/
private function removeImportantAnnotationFromNodeInlineStyle(\DOMElement $node): void
{
$inlineStyleDeclarations = $this->parseCssDeclarationsBlock($node->getAttribute('style'));
/** @var array<string, string> $regularStyleDeclarations */
$regularStyleDeclarations = [];
/** @var array<string, string> $importantStyleDeclarations */
$importantStyleDeclarations = [];
foreach ($inlineStyleDeclarations as $property => $value) {
if ($this->attributeValueIsImportant($value)) {
$importantStyleDeclarations[$property] = $this->pregReplace('/\\s*+!\\s*+important$/i', '', $value);
} else {
$regularStyleDeclarations[$property] = $value;
}
}
$inlineStyleDeclarationsInNewOrder = \array_merge($regularStyleDeclarations, $importantStyleDeclarations);
$node->setAttribute(
'style',
$this->generateStyleStringFromSingleDeclarationsArray($inlineStyleDeclarationsInNewOrder)
);
}
/**
* Generates a CSS style string suitable to be used inline from the $styleDeclarations property => value array.
*
* @param array<string, string> $styleDeclarations
*
* @return string
*/
private function generateStyleStringFromSingleDeclarationsArray(array $styleDeclarations): string
{
return $this->generateStyleStringFromDeclarationsArrays([], $styleDeclarations);
}
/**
* Determines which of `$cssRules` actually apply to `$this->domDocument`, and sets them in
* `$this->matchingUninlinableCssRules`.
*
* @param array<array-key, array{
* media: string,
* selector: string,
* hasUnmatchablePseudo: bool,
* declarationsBlock: string,
* line: int
* }> $cssRules
* the "uninlinable" array of CSS rules returned by `collateCssRules`
*/
private function determineMatchingUninlinableCssRules(array $cssRules): void
{
$this->matchingUninlinableCssRules = \array_filter(
$cssRules,
function (array $cssRule): bool {
return $this->existsMatchForSelectorInCssRule($cssRule);
}
);
}
/**
* Checks whether there is at least one matching element for the CSS selector contained in the `selector` element
* of the provided CSS rule.
*
* Any dynamic pseudo-classes will be assumed to apply. If the selector matches a pseudo-element,
* it will test for a match with its originating element.
*
* @param array{
* media: string,
* selector: string,
* hasUnmatchablePseudo: bool,
* declarationsBlock: string,
* line: int
* } $cssRule
*
* @return bool
*
* @throws ParseException
*/
private function existsMatchForSelectorInCssRule(array $cssRule): bool
{
$selector = $cssRule['selector'];
if ($cssRule['hasUnmatchablePseudo']) {
$selector = $this->removeUnmatchablePseudoComponents($selector);
}
return $this->existsMatchForCssSelector($selector);
}
/**
* Checks whether there is at least one matching element for $cssSelector.
* When not in debug mode, it returns true also for invalid selectors (because they may be valid,
* just not implemented/recognized yet by Emogrifier).
*
* @param string $cssSelector
*
* @return bool
*
* @throws ParseException
*/
private function existsMatchForCssSelector(string $cssSelector): bool
{
try {
$nodesMatchingSelector = $this->getXPath()->query($this->getCssSelectorConverter()->toXPath($cssSelector));
} catch (ParseException $e) {
if ($this->debug) {
throw $e;
}
return true;
}
return $nodesMatchingSelector !== false && $nodesMatchingSelector->length !== 0;
}
/**
* Removes pseudo-elements and dynamic pseudo-classes from a CSS selector, replacing them with "*" if necessary.
* If such a pseudo-component is within the argument of `:not`, the entire `:not` component is removed or replaced.
*
* @param string $selector
*
* @return string
* selector which will match the relevant DOM elements if the pseudo-classes are assumed to apply, or in the
* case of pseudo-elements will match their originating element
*/
private function removeUnmatchablePseudoComponents(string $selector): string
{
// The regex allows nested brackets via `(?2)`.
// A space is temporarily prepended because the callback can't determine if the match was at the very start.
$selectorWithoutNots = \ltrim(\preg_replace_callback(
'/([\\s>+~]?+):not(\\([^()]*+(?:(?2)[^()]*+)*+\\))/i',
/** @param array<array-key, string> $matches */
function (array $matches): string {
return $this->replaceUnmatchableNotComponent($matches);
},
' ' . $selector
));
$selectorWithoutUnmatchablePseudoComponents = $this->removeSelectorComponents(
':(?!' . self::PSEUDO_CLASS_MATCHER . '):?+[\\w\\-]++(?:\\([^\\)]*+\\))?+',
$selectorWithoutNots
);
if (
!\preg_match(
'/:(?:' . self::OF_TYPE_PSEUDO_CLASS_MATCHER . ')/i',
$selectorWithoutUnmatchablePseudoComponents
)
) {
return $selectorWithoutUnmatchablePseudoComponents;
}
return \implode('', \array_map(
function (string $selectorPart): string {
return $this->removeUnsupportedOfTypePseudoClasses($selectorPart);
},
\preg_split(
'/(' . self::COMBINATOR_MATCHER . ')/',
$selectorWithoutUnmatchablePseudoComponents,
-1,
PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY
)
));
}
/**
* Helps `removeUnmatchablePseudoComponents()` replace or remove a selector `:not(...)` component if its argument
* contains pseudo-elements or dynamic pseudo-classes.
*
* @param array<array-key, string> $matches array of elements matched by the regular expression
*
* @return string
* the full match if there were no unmatchable pseudo components within; otherwise, any preceding combinator
* followed by "*", or an empty string if there was no preceding combinator
*/
private function replaceUnmatchableNotComponent(array $matches): string
{
[$notComponentWithAnyPrecedingCombinator, $anyPrecedingCombinator, $notArgumentInBrackets] = $matches;
if ($this->hasUnsupportedPseudoClass($notArgumentInBrackets)) {
return $anyPrecedingCombinator !== '' ? $anyPrecedingCombinator . '*' : '';
}
return $notComponentWithAnyPrecedingCombinator;
}
/**
* Removes components from a CSS selector, replacing them with "*" if necessary.
*
* @param string $matcher regular expression part to match the components to remove
* @param string $selector
*
* @return string
* selector which will match the relevant DOM elements if the removed components are assumed to apply (or in
* the case of pseudo-elements will match their originating element)
*/
private function removeSelectorComponents(string $matcher, string $selector): string
{
return \preg_replace(
['/([\\s>+~]|^)' . $matcher . '/i', '/' . $matcher . '/i'],
['$1*', ''],
$selector
);
}
/**
* Removes any `...-of-type` pseudo-classes from part of a CSS selector, if it does not have a type, replacing them
* with "*" if necessary.
*
* @param string $selectorPart part of a selector which has been split up at combinators
*
* @return string
* selector part which will match the relevant DOM elements if the pseudo-classes are assumed to apply
*/
private function removeUnsupportedOfTypePseudoClasses(string $selectorPart): string
{
if (!$this->selectorPartHasUnsupportedOfTypePseudoClass($selectorPart)) {
return $selectorPart;
}
return $this->removeSelectorComponents(
':(?:' . self::OF_TYPE_PSEUDO_CLASS_MATCHER . ')(?:\\([^\\)]*+\\))?+',
$selectorPart
);
}
/**
* Applies `$this->matchingUninlinableCssRules` to `$this->domDocument` by placing them as CSS in a `<style>`
* element.
* If there are no uninlinable CSS rules to copy there, a `<style>` element will be created containing only the
* applicable at-rules from `$parsedCss`.
* If there are none of either, an empty `<style>` element will not be created.
*
* @param CssDocument $parsedCss
* This may contain various at-rules whose content `CssInliner` does not currently attempt to inline or
* process in any other way, such as `@import`, `@font-face`, `@keyframes`, etc., and which should precede
* the processed but found-to-be-uninlinable CSS placed in the `<style>` element.
* Note that `CssInliner` processes `@media` rules so that they can be ordered correctly with respect to
* other uninlinable rules; these will not be duplicated from `$parsedCss`.
*/
private function copyUninlinableCssToStyleNode(CssDocument $parsedCss): void
{
$css = $parsedCss->renderNonConditionalAtRules();
// avoid including unneeded class dependency if there are no rules
if ($this->getMatchingUninlinableCssRules() !== []) {
$cssConcatenator = new CssConcatenator();
foreach ($this->getMatchingUninlinableCssRules() as $cssRule) {
$cssConcatenator->append([$cssRule['selector']], $cssRule['declarationsBlock'], $cssRule['media']);
}
$css .= $cssConcatenator->getCss();
}
// avoid adding empty style element
if ($css !== '') {
$this->addStyleElementToDocument($css);
}
}
/**
* Adds a style element with $css to $this->domDocument.
*
* This method is protected to allow overriding.
*
* @see https://github.com/MyIntervals/emogrifier/issues/103
*
* @param string $css
*/
protected function addStyleElementToDocument(string $css): void
{
$domDocument = $this->getDomDocument();
$styleElement = $domDocument->createElement('style', $css);
$styleAttribute = $domDocument->createAttribute('type');
$styleAttribute->value = 'text/css';
$styleElement->appendChild($styleAttribute);
$headElement = $this->getHeadElement();
$headElement->appendChild($styleElement);
}
/**
* Returns the HEAD element.
*
* This method assumes that there always is a HEAD element.
*
* @return \DOMElement
*
* @throws \UnexpectedValueException
*/
private function getHeadElement(): \DOMElement
{
$node = $this->getDomDocument()->getElementsByTagName('head')->item(0);
if (!$node instanceof \DOMElement) {
throw new \UnexpectedValueException('There is no HEAD element. This should never happen.', 1617923227);
}
return $node;
}
/**
* Wraps `preg_replace`. If an error occurs (which is highly unlikely), either it is logged and the original
* `$subject` is returned, or in debug mode an exception is thrown.
*
* This method only supports strings, not arrays of strings.
*
* @param string $pattern
* @param string $replacement
* @param string $subject
*
* @return string
*
* @throws \RuntimeException
*/
private function pregReplace(string $pattern, string $replacement, string $subject): string
{
$result = \preg_replace($pattern, $replacement, $subject);
if (!\is_string($result)) {
$this->logOrThrowPregLastError();
$result = $subject;
}
return $result;
}
/**
* Obtains the name of the error constant for `preg_last_error` (based on code posted at
* {@see https://www.php.net/manual/en/function.preg-last-error.php#124124}) and puts it into an error message
* which is either passed to `trigger_error` (in non-debug mode) or an exception which is thrown (in debug mode).
*
* @throws \RuntimeException
*/
private function logOrThrowPregLastError(): void
{
$pcreConstants = \get_defined_constants(true)['pcre'];
$pcreErrorConstantNames = \array_flip(\array_filter(
$pcreConstants,
static function (string $key): bool {
return \substr($key, -6) === '_ERROR';
},
ARRAY_FILTER_USE_KEY
));
$pregLastError = \preg_last_error();
$message = 'PCRE regex execution error `' . (string)($pcreErrorConstantNames[$pregLastError] ?? $pregLastError)
. '`';
if ($this->debug) {
throw new \RuntimeException($message, 1592870147);
}
\trigger_error($message);
}
}
pelago/emogrifier/src/HtmlProcessor/AbstractHtmlProcessor.php 0000644 00000035420 15153552363 0020553 0 ustar 00 <?php
declare(strict_types=1);
namespace Pelago\Emogrifier\HtmlProcessor;
/**
* Base class for HTML processor that e.g., can remove, add or modify nodes or attributes.
*
* The "vanilla" subclass is the HtmlNormalizer.
*
* @psalm-consistent-constructor
*/
abstract class AbstractHtmlProcessor
{
/**
* @var string
*/
protected const DEFAULT_DOCUMENT_TYPE = '<!DOCTYPE html>';
/**
* @var string
*/
protected const CONTENT_TYPE_META_TAG = '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
/**
* @var string Regular expression part to match tag names that PHP's DOMDocument implementation is not aware are
* self-closing. These are mostly HTML5 elements, but for completeness <command> (obsolete) and <keygen>
* (deprecated) are also included.
*
* @see https://bugs.php.net/bug.php?id=73175
*/
protected const PHP_UNRECOGNIZED_VOID_TAGNAME_MATCHER = '(?:command|embed|keygen|source|track|wbr)';
/**
* Regular expression part to match tag names that may appear before the start of the `<body>` element. A start tag
* for any other element would implicitly start the `<body>` element due to tag omission rules.
*
* @var string
*/
protected const TAGNAME_ALLOWED_BEFORE_BODY_MATCHER
= '(?:html|head|base|command|link|meta|noscript|script|style|template|title)';
/**
* regular expression pattern to match an HTML comment, including delimiters and modifiers
*
* @var string
*/
protected const HTML_COMMENT_PATTERN = '/<!--[^-]*+(?:-(?!->)[^-]*+)*+(?:-->|$)/';
/**
* regular expression pattern to match an HTML `<template>` element, including delimiters and modifiers
*
* @var string
*/
protected const HTML_TEMPLATE_ELEMENT_PATTERN
= '%<template[\\s>][^<]*+(?:<(?!/template>)[^<]*+)*+(?:</template>|$)%i';
/**
* @var ?\DOMDocument
*/
protected $domDocument = null;
/**
* @var ?\DOMXPath
*/
private $xPath = null;
/**
* The constructor.
*
* Please use `::fromHtml` or `::fromDomDocument` instead.
*/
private function __construct()
{
}
/**
* Builds a new instance from the given HTML.
*
* @param string $unprocessedHtml raw HTML, must be UTF-encoded, must not be empty
*
* @return static
*
* @throws \InvalidArgumentException if $unprocessedHtml is anything other than a non-empty string
*/
public static function fromHtml(string $unprocessedHtml): self
{
if ($unprocessedHtml === '') {
throw new \InvalidArgumentException('The provided HTML must not be empty.', 1515763647);
}
$instance = new static();
$instance->setHtml($unprocessedHtml);
return $instance;
}
/**
* Builds a new instance from the given DOM document.
*
* @param \DOMDocument $document a DOM document returned by getDomDocument() of another instance
*
* @return static
*/
public static function fromDomDocument(\DOMDocument $document): self
{
$instance = new static();
$instance->setDomDocument($document);
return $instance;
}
/**
* Sets the HTML to process.
*
* @param string $html the HTML to process, must be UTF-8-encoded
*/
private function setHtml(string $html): void
{
$this->createUnifiedDomDocument($html);
}
/**
* Provides access to the internal DOMDocument representation of the HTML in its current state.
*
* @return \DOMDocument
*
* @throws \UnexpectedValueException
*/
public function getDomDocument(): \DOMDocument
{
if (!$this->domDocument instanceof \DOMDocument) {
$message = self::class . '::setDomDocument() has not yet been called on ' . static::class;
throw new \UnexpectedValueException($message, 1570472239);
}
return $this->domDocument;
}
/**
* @param \DOMDocument $domDocument
*/
private function setDomDocument(\DOMDocument $domDocument): void
{
$this->domDocument = $domDocument;
$this->xPath = new \DOMXPath($this->domDocument);
}
/**
* @return \DOMXPath
*
* @throws \UnexpectedValueException
*/
protected function getXPath(): \DOMXPath
{
if (!$this->xPath instanceof \DOMXPath) {
$message = self::class . '::setDomDocument() has not yet been called on ' . static::class;
throw new \UnexpectedValueException($message, 1617819086);
}
return $this->xPath;
}
/**
* Renders the normalized and processed HTML.
*
* @return string
*/
public function render(): string
{
$htmlWithPossibleErroneousClosingTags = $this->getDomDocument()->saveHTML();
return $this->removeSelfClosingTagsClosingTags($htmlWithPossibleErroneousClosingTags);
}
/**
* Renders the content of the BODY element of the normalized and processed HTML.
*
* @return string
*/
public function renderBodyContent(): string
{
$htmlWithPossibleErroneousClosingTags = $this->getDomDocument()->saveHTML($this->getBodyElement());
$bodyNodeHtml = $this->removeSelfClosingTagsClosingTags($htmlWithPossibleErroneousClosingTags);
return \preg_replace('%</?+body(?:\\s[^>]*+)?+>%', '', $bodyNodeHtml);
}
/**
* Eliminates any invalid closing tags for void elements from the given HTML.
*
* @param string $html
*
* @return string
*/
private function removeSelfClosingTagsClosingTags(string $html): string
{
return \preg_replace('%</' . self::PHP_UNRECOGNIZED_VOID_TAGNAME_MATCHER . '>%', '', $html);
}
/**
* Returns the BODY element.
*
* This method assumes that there always is a BODY element.
*
* @return \DOMElement
*
* @throws \RuntimeException
*/
private function getBodyElement(): \DOMElement
{
$node = $this->getDomDocument()->getElementsByTagName('body')->item(0);
if (!$node instanceof \DOMElement) {
throw new \RuntimeException('There is no body element.', 1617922607);
}
return $node;
}
/**
* Creates a DOM document from the given HTML and stores it in $this->domDocument.
*
* The DOM document will always have a BODY element and a document type.
*
* @param string $html
*/
private function createUnifiedDomDocument(string $html): void
{
$this->createRawDomDocument($html);
$this->ensureExistenceOfBodyElement();
}
/**
* Creates a DOMDocument instance from the given HTML and stores it in $this->domDocument.
*
* @param string $html
*/
private function createRawDomDocument(string $html): void
{
$domDocument = new \DOMDocument();
$domDocument->strictErrorChecking = false;
$domDocument->formatOutput = true;
$libXmlState = \libxml_use_internal_errors(true);
$domDocument->loadHTML($this->prepareHtmlForDomConversion($html));
\libxml_clear_errors();
\libxml_use_internal_errors($libXmlState);
$this->setDomDocument($domDocument);
}
/**
* Returns the HTML with added document type, Content-Type meta tag, and self-closing slashes, if needed,
* ensuring that the HTML will be good for creating a DOM document from it.
*
* @param string $html
*
* @return string the unified HTML
*/
private function prepareHtmlForDomConversion(string $html): string
{
$htmlWithSelfClosingSlashes = $this->ensurePhpUnrecognizedSelfClosingTagsAreXml($html);
$htmlWithDocumentType = $this->ensureDocumentType($htmlWithSelfClosingSlashes);
return $this->addContentTypeMetaTag($htmlWithDocumentType);
}
/**
* Makes sure that the passed HTML has a document type, with lowercase "html".
*
* @param string $html
*
* @return string HTML with document type
*/
private function ensureDocumentType(string $html): string
{
$hasDocumentType = \stripos($html, '<!DOCTYPE') !== false;
if ($hasDocumentType) {
return $this->normalizeDocumentType($html);
}
return self::DEFAULT_DOCUMENT_TYPE . $html;
}
/**
* Makes sure the document type in the passed HTML has lowercase "html".
*
* @param string $html
*
* @return string HTML with normalized document type
*/
private function normalizeDocumentType(string $html): string
{
// Limit to replacing the first occurrence: as an optimization; and in case an example exists as unescaped text.
return \preg_replace(
'/<!DOCTYPE\\s++html(?=[\\s>])/i',
'<!DOCTYPE html',
$html,
1
);
}
/**
* Adds a Content-Type meta tag for the charset.
*
* This method also ensures that there is a HEAD element.
*
* @param string $html
*
* @return string the HTML with the meta tag added
*/
private function addContentTypeMetaTag(string $html): string
{
if ($this->hasContentTypeMetaTagInHead($html)) {
return $html;
}
// We are trying to insert the meta tag to the right spot in the DOM.
// If we just prepended it to the HTML, we would lose attributes set to the HTML tag.
$hasHeadTag = \preg_match('/<head[\\s>]/i', $html);
$hasHtmlTag = \stripos($html, '<html') !== false;
if ($hasHeadTag) {
$reworkedHtml = \preg_replace(
'/<head(?=[\\s>])([^>]*+)>/i',
'<head$1>' . self::CONTENT_TYPE_META_TAG,
$html
);
} elseif ($hasHtmlTag) {
$reworkedHtml = \preg_replace(
'/<html(.*?)>/is',
'<html$1><head>' . self::CONTENT_TYPE_META_TAG . '</head>',
$html
);
} else {
$reworkedHtml = self::CONTENT_TYPE_META_TAG . $html;
}
return $reworkedHtml;
}
/**
* Tests whether the given HTML has a valid `Content-Type` metadata element within the `<head>` element. Due to tag
* omission rules, HTML parsers are expected to end the `<head>` element and start the `<body>` element upon
* encountering a start tag for any element which is permitted only within the `<body>`.
*
* @param string $html
*
* @return bool
*/
private function hasContentTypeMetaTagInHead(string $html): bool
{
\preg_match('%^.*?(?=<meta(?=\\s)[^>]*\\shttp-equiv=(["\']?+)Content-Type\\g{-1}[\\s/>])%is', $html, $matches);
if (isset($matches[0])) {
$htmlBefore = $matches[0];
try {
$hasContentTypeMetaTagInHead = !$this->hasEndOfHeadElement($htmlBefore);
} catch (\RuntimeException $exception) {
// If something unexpected occurs, assume the `Content-Type` that was found is valid.
\trigger_error($exception->getMessage());
$hasContentTypeMetaTagInHead = true;
}
} else {
$hasContentTypeMetaTagInHead = false;
}
return $hasContentTypeMetaTagInHead;
}
/**
* Tests whether the `<head>` element ends within the given HTML. Due to tag omission rules, HTML parsers are
* expected to end the `<head>` element and start the `<body>` element upon encountering a start tag for any element
* which is permitted only within the `<body>`.
*
* @param string $html
*
* @return bool
*
* @throws \RuntimeException
*/
private function hasEndOfHeadElement(string $html): bool
{
$headEndTagMatchCount
= \preg_match('%<(?!' . self::TAGNAME_ALLOWED_BEFORE_BODY_MATCHER . '[\\s/>])\\w|</head>%i', $html);
if (\is_int($headEndTagMatchCount) && $headEndTagMatchCount > 0) {
// An exception to the implicit end of the `<head>` is any content within a `<template>` element, as well in
// comments. As an optimization, this is only checked for if a potential `<head>` end tag is found.
$htmlWithoutCommentsOrTemplates = $this->removeHtmlTemplateElements($this->removeHtmlComments($html));
$hasEndOfHeadElement = $htmlWithoutCommentsOrTemplates === $html
|| $this->hasEndOfHeadElement($htmlWithoutCommentsOrTemplates);
} else {
$hasEndOfHeadElement = false;
}
return $hasEndOfHeadElement;
}
/**
* Removes comments from the given HTML, including any which are unterminated, for which the remainder of the string
* is removed.
*
* @param string $html
*
* @return string
*
* @throws \RuntimeException
*/
private function removeHtmlComments(string $html): string
{
$result = \preg_replace(self::HTML_COMMENT_PATTERN, '', $html);
if (!\is_string($result)) {
throw new \RuntimeException('Internal PCRE error', 1616521475);
}
return $result;
}
/**
* Removes `<template>` elements from the given HTML, including any without an end tag, for which the remainder of
* the string is removed.
*
* @param string $html
*
* @return string
*
* @throws \RuntimeException
*/
private function removeHtmlTemplateElements(string $html): string
{
$result = \preg_replace(self::HTML_TEMPLATE_ELEMENT_PATTERN, '', $html);
if (!\is_string($result)) {
throw new \RuntimeException('Internal PCRE error', 1616519652);
}
return $result;
}
/**
* Makes sure that any self-closing tags not recognized as such by PHP's DOMDocument implementation have a
* self-closing slash.
*
* @param string $html
*
* @return string HTML with problematic tags converted.
*/
private function ensurePhpUnrecognizedSelfClosingTagsAreXml(string $html): string
{
return \preg_replace(
'%<' . self::PHP_UNRECOGNIZED_VOID_TAGNAME_MATCHER . '\\b[^>]*+(?<!/)(?=>)%',
'$0/',
$html
);
}
/**
* Checks that $this->domDocument has a BODY element and adds it if it is missing.
*
* @throws \UnexpectedValueException
*/
private function ensureExistenceOfBodyElement(): void
{
if ($this->getDomDocument()->getElementsByTagName('body')->item(0) instanceof \DOMElement) {
return;
}
$htmlElement = $this->getDomDocument()->getElementsByTagName('html')->item(0);
if (!$htmlElement instanceof \DOMElement) {
throw new \UnexpectedValueException('There is no HTML element although there should be one.', 1569930853);
}
$htmlElement->appendChild($this->getDomDocument()->createElement('body'));
}
}
pelago/emogrifier/src/HtmlProcessor/CssToAttributeConverter.php 0000644 00000024101 15153552363 0021064 0 ustar 00 <?php
declare(strict_types=1);
namespace Pelago\Emogrifier\HtmlProcessor;
/**
* This HtmlProcessor can convert style HTML attributes to the corresponding other visual HTML attributes,
* e.g. it converts style="width: 100px" to width="100".
*
* It will only add attributes, but leaves the style attribute untouched.
*
* To trigger the conversion, call the convertCssToVisualAttributes method.
*/
class CssToAttributeConverter extends AbstractHtmlProcessor
{
/**
* This multi-level array contains simple mappings of CSS properties to
* HTML attributes. If a mapping only applies to certain HTML nodes or
* only for certain values, the mapping is an object with a whitelist
* of nodes and values.
*
* @var array<string, array{attribute: string, nodes?: array<int, string>, values?: array<int, string>}>
*/
private $cssToHtmlMap = [
'background-color' => [
'attribute' => 'bgcolor',
],
'text-align' => [
'attribute' => 'align',
'nodes' => ['p', 'div', 'td', 'th'],
'values' => ['left', 'right', 'center', 'justify'],
],
'float' => [
'attribute' => 'align',
'nodes' => ['table', 'img'],
'values' => ['left', 'right'],
],
'border-spacing' => [
'attribute' => 'cellspacing',
'nodes' => ['table'],
],
];
/**
* @var array<string, array<string, string>>
*/
private static $parsedCssCache = [];
/**
* Maps the CSS from the style nodes to visual HTML attributes.
*
* @return self fluent interface
*/
public function convertCssToVisualAttributes(): self
{
/** @var \DOMElement $node */
foreach ($this->getAllNodesWithStyleAttribute() as $node) {
$inlineStyleDeclarations = $this->parseCssDeclarationsBlock($node->getAttribute('style'));
$this->mapCssToHtmlAttributes($inlineStyleDeclarations, $node);
}
return $this;
}
/**
* Returns a list with all DOM nodes that have a style attribute.
*
* @return \DOMNodeList
*/
private function getAllNodesWithStyleAttribute(): \DOMNodeList
{
return $this->getXPath()->query('//*[@style]');
}
/**
* Parses a CSS declaration block into property name/value pairs.
*
* Example:
*
* The declaration block
*
* "color: #000; font-weight: bold;"
*
* will be parsed into the following array:
*
* "color" => "#000"
* "font-weight" => "bold"
*
* @param string $cssDeclarationsBlock the CSS declarations block without the curly braces, may be empty
*
* @return array<string, string>
* the CSS declarations with the property names as array keys and the property values as array values
*/
private function parseCssDeclarationsBlock(string $cssDeclarationsBlock): array
{
if (isset(self::$parsedCssCache[$cssDeclarationsBlock])) {
return self::$parsedCssCache[$cssDeclarationsBlock];
}
$properties = [];
foreach (\preg_split('/;(?!base64|charset)/', $cssDeclarationsBlock) as $declaration) {
/** @var array<int, string> $matches */
$matches = [];
if (!\preg_match('/^([A-Za-z\\-]+)\\s*:\\s*(.+)$/s', \trim($declaration), $matches)) {
continue;
}
$propertyName = \strtolower($matches[1]);
$propertyValue = $matches[2];
$properties[$propertyName] = $propertyValue;
}
self::$parsedCssCache[$cssDeclarationsBlock] = $properties;
return $properties;
}
/**
* Applies $styles to $node.
*
* This method maps CSS styles to HTML attributes and adds those to the
* node.
*
* @param array<string, string> $styles the new CSS styles taken from the global styles to be applied to this node
* @param \DOMElement $node node to apply styles to
*/
private function mapCssToHtmlAttributes(array $styles, \DOMElement $node): void
{
foreach ($styles as $property => $value) {
// Strip !important indicator
$value = \trim(\str_replace('!important', '', $value));
$this->mapCssToHtmlAttribute($property, $value, $node);
}
}
/**
* Tries to apply the CSS style to $node as an attribute.
*
* This method maps a CSS rule to HTML attributes and adds those to the node.
*
* @param string $property the name of the CSS property to map
* @param string $value the value of the style rule to map
* @param \DOMElement $node node to apply styles to
*/
private function mapCssToHtmlAttribute(string $property, string $value, \DOMElement $node): void
{
if (!$this->mapSimpleCssProperty($property, $value, $node)) {
$this->mapComplexCssProperty($property, $value, $node);
}
}
/**
* Looks up the CSS property in the mapping table and maps it if it matches the conditions.
*
* @param string $property the name of the CSS property to map
* @param string $value the value of the style rule to map
* @param \DOMElement $node node to apply styles to
*
* @return bool true if the property can be mapped using the simple mapping table
*/
private function mapSimpleCssProperty(string $property, string $value, \DOMElement $node): bool
{
if (!isset($this->cssToHtmlMap[$property])) {
return false;
}
$mapping = $this->cssToHtmlMap[$property];
$nodesMatch = !isset($mapping['nodes']) || \in_array($node->nodeName, $mapping['nodes'], true);
$valuesMatch = !isset($mapping['values']) || \in_array($value, $mapping['values'], true);
$canBeMapped = $nodesMatch && $valuesMatch;
if ($canBeMapped) {
$node->setAttribute($mapping['attribute'], $value);
}
return $canBeMapped;
}
/**
* Maps CSS properties that need special transformation to an HTML attribute.
*
* @param string $property the name of the CSS property to map
* @param string $value the value of the style rule to map
* @param \DOMElement $node node to apply styles to
*/
private function mapComplexCssProperty(string $property, string $value, \DOMElement $node): void
{
switch ($property) {
case 'background':
$this->mapBackgroundProperty($node, $value);
break;
case 'width':
// intentional fall-through
case 'height':
$this->mapWidthOrHeightProperty($node, $value, $property);
break;
case 'margin':
$this->mapMarginProperty($node, $value);
break;
case 'border':
$this->mapBorderProperty($node, $value);
break;
default:
}
}
/**
* @param \DOMElement $node node to apply styles to
* @param string $value the value of the style rule to map
*/
private function mapBackgroundProperty(\DOMElement $node, string $value): void
{
// parse out the color, if any
/** @var array<int, string> $styles */
$styles = \explode(' ', $value, 2);
$first = $styles[0];
if (\is_numeric($first[0]) || \strncmp($first, 'url', 3) === 0) {
return;
}
// as this is not a position or image, assume it's a color
$node->setAttribute('bgcolor', $first);
}
/**
* @param \DOMElement $node node to apply styles to
* @param string $value the value of the style rule to map
* @param string $property the name of the CSS property to map
*/
private function mapWidthOrHeightProperty(\DOMElement $node, string $value, string $property): void
{
// only parse values in px and %, but not values like "auto"
if (!\preg_match('/^(\\d+)(\\.(\\d+))?(px|%)$/', $value)) {
return;
}
$number = \preg_replace('/[^0-9.%]/', '', $value);
$node->setAttribute($property, $number);
}
/**
* @param \DOMElement $node node to apply styles to
* @param string $value the value of the style rule to map
*/
private function mapMarginProperty(\DOMElement $node, string $value): void
{
if (!$this->isTableOrImageNode($node)) {
return;
}
$margins = $this->parseCssShorthandValue($value);
if ($margins['left'] === 'auto' && $margins['right'] === 'auto') {
$node->setAttribute('align', 'center');
}
}
/**
* @param \DOMElement $node node to apply styles to
* @param string $value the value of the style rule to map
*/
private function mapBorderProperty(\DOMElement $node, string $value): void
{
if (!$this->isTableOrImageNode($node)) {
return;
}
if ($value === 'none' || $value === '0') {
$node->setAttribute('border', '0');
}
}
/**
* @param \DOMElement $node
*
* @return bool
*/
private function isTableOrImageNode(\DOMElement $node): bool
{
return $node->nodeName === 'table' || $node->nodeName === 'img';
}
/**
* Parses a shorthand CSS value and splits it into individual values. For example: `padding: 0 auto;` - `0 auto` is
* split into top: 0, left: auto, bottom: 0, right: auto.
*
* @param string $value a CSS property value with 1, 2, 3 or 4 sizes
*
* @return array<string, string>
* an array of values for top, right, bottom and left (using these as associative array keys)
*/
private function parseCssShorthandValue(string $value): array
{
/** @var array<int, string> $values */
$values = \preg_split('/\\s+/', $value);
$css = [];
$css['top'] = $values[0];
$css['right'] = (\count($values) > 1) ? $values[1] : $css['top'];
$css['bottom'] = (\count($values) > 2) ? $values[2] : $css['top'];
$css['left'] = (\count($values) > 3) ? $values[3] : $css['right'];
return $css;
}
}
pelago/emogrifier/src/HtmlProcessor/HtmlNormalizer.php 0000644 00000000502 15153552363 0017223 0 ustar 00 <?php
declare(strict_types=1);
namespace Pelago\Emogrifier\HtmlProcessor;
/**
* Normalizes HTML:
* - add a document type (HTML5) if missing
* - disentangle incorrectly nested tags
* - add HEAD and BODY elements (if they are missing)
* - reformat the HTML
*/
class HtmlNormalizer extends AbstractHtmlProcessor
{
}
pelago/emogrifier/src/HtmlProcessor/HtmlPruner.php 0000644 00000012010 15153552363 0016351 0 ustar 00 <?php
declare(strict_types=1);
namespace Pelago\Emogrifier\HtmlProcessor;
use Pelago\Emogrifier\CssInliner;
use Pelago\Emogrifier\Utilities\ArrayIntersector;
/**
* This class can remove things from HTML.
*/
class HtmlPruner extends AbstractHtmlProcessor
{
/**
* We need to look for display:none, but we need to do a case-insensitive search. Since DOMDocument only
* supports XPath 1.0, lower-case() isn't available to us. We've thus far only set attributes to lowercase,
* not attribute values. Consequently, we need to translate() the letters that would be in 'NONE' ("NOE")
* to lowercase.
*
* @var string
*/
private const DISPLAY_NONE_MATCHER
= '//*[@style and contains(translate(translate(@style," ",""),"NOE","noe"),"display:none")'
. ' and not(@class and contains(concat(" ", normalize-space(@class), " "), " -emogrifier-keep "))]';
/**
* Removes elements that have a "display: none;" style.
*
* @return self fluent interface
*/
public function removeElementsWithDisplayNone(): self
{
$elementsWithStyleDisplayNone = $this->getXPath()->query(self::DISPLAY_NONE_MATCHER);
if ($elementsWithStyleDisplayNone->length === 0) {
return $this;
}
foreach ($elementsWithStyleDisplayNone as $element) {
$parentNode = $element->parentNode;
if ($parentNode !== null) {
$parentNode->removeChild($element);
}
}
return $this;
}
/**
* Removes classes that are no longer required (e.g. because there are no longer any CSS rules that reference them)
* from `class` attributes.
*
* Note that this does not inspect the CSS, but expects to be provided with a list of classes that are still in use.
*
* This method also has the (presumably beneficial) side-effect of minifying (removing superfluous whitespace from)
* `class` attributes.
*
* @param array<array-key, string> $classesToKeep names of classes that should not be removed
*
* @return self fluent interface
*/
public function removeRedundantClasses(array $classesToKeep = []): self
{
$elementsWithClassAttribute = $this->getXPath()->query('//*[@class]');
if ($classesToKeep !== []) {
$this->removeClassesFromElements($elementsWithClassAttribute, $classesToKeep);
} else {
// Avoid unnecessary processing if there are no classes to keep.
$this->removeClassAttributeFromElements($elementsWithClassAttribute);
}
return $this;
}
/**
* Removes classes from the `class` attribute of each element in `$elements`, except any in `$classesToKeep`,
* removing the `class` attribute itself if the resultant list is empty.
*
* @param \DOMNodeList $elements
* @param array<array-key, string> $classesToKeep
*/
private function removeClassesFromElements(\DOMNodeList $elements, array $classesToKeep): void
{
$classesToKeepIntersector = new ArrayIntersector($classesToKeep);
/** @var \DOMElement $element */
foreach ($elements as $element) {
$elementClasses = \preg_split('/\\s++/', \trim($element->getAttribute('class')));
$elementClassesToKeep = $classesToKeepIntersector->intersectWith($elementClasses);
if ($elementClassesToKeep !== []) {
$element->setAttribute('class', \implode(' ', $elementClassesToKeep));
} else {
$element->removeAttribute('class');
}
}
}
/**
* Removes the `class` attribute from each element in `$elements`.
*
* @param \DOMNodeList $elements
*/
private function removeClassAttributeFromElements(\DOMNodeList $elements): void
{
/** @var \DOMElement $element */
foreach ($elements as $element) {
$element->removeAttribute('class');
}
}
/**
* After CSS has been inlined, there will likely be some classes in `class` attributes that are no longer referenced
* by any remaining (uninlinable) CSS. This method removes such classes.
*
* Note that it does not inspect the remaining CSS, but uses information readily available from the `CssInliner`
* instance about the CSS rules that could not be inlined.
*
* @param CssInliner $cssInliner object instance that performed the CSS inlining
*
* @return self fluent interface
*
* @throws \BadMethodCallException if `inlineCss` has not first been called on `$cssInliner`
*/
public function removeRedundantClassesAfterCssInlined(CssInliner $cssInliner): self
{
$classesToKeepAsKeys = [];
foreach ($cssInliner->getMatchingUninlinableSelectors() as $selector) {
\preg_match_all('/\\.(-?+[_a-zA-Z][\\w\\-]*+)/', $selector, $matches);
$classesToKeepAsKeys += \array_fill_keys($matches[1], true);
}
$this->removeRedundantClasses(\array_keys($classesToKeepAsKeys));
return $this;
}
}
pelago/emogrifier/src/Utilities/ArrayIntersector.php 0000644 00000003560 15153552363 0016732 0 ustar 00 <?php
declare(strict_types=1);
namespace Pelago\Emogrifier\Utilities;
/**
* When computing many array intersections using the same array, it is more efficient to use `array_flip()` first and
* then `array_intersect_key()`, than `array_intersect()`. See the discussion at
* {@link https://stackoverflow.com/questions/6329211/php-array-intersect-efficiency Stack Overflow} for more
* information.
*
* Of course, this is only possible if the arrays contain integer or string values, and either don't contain duplicates,
* or that fact that duplicates will be removed does not matter.
*
* This class takes care of the detail.
*
* @internal
*/
class ArrayIntersector
{
/**
* the array with which the object was constructed, with all its keys exchanged with their associated values
*
* @var array<array-key, array-key>
*/
private $invertedArray;
/**
* Constructs the object with the array that will be reused for many intersection computations.
*
* @param array<array-key, array-key> $array
*/
public function __construct(array $array)
{
$this->invertedArray = \array_flip($array);
}
/**
* Computes the intersection of `$array` and the array with which this object was constructed.
*
* @param array<array-key, array-key> $array
*
* @return array<array-key, array-key>
* Returns an array containing all of the values in `$array` whose values exist in the array
* with which this object was constructed. Note that keys are preserved, order is maintained, but
* duplicates are removed.
*/
public function intersectWith(array $array): array
{
$invertedArray = \array_flip($array);
$invertedIntersection = \array_intersect_key($invertedArray, $this->invertedArray);
return \array_flip($invertedIntersection);
}
}
pelago/emogrifier/src/Utilities/CssConcatenator.php 0000644 00000015116 15153552363 0016523 0 ustar 00 <?php
declare(strict_types=1);
namespace Pelago\Emogrifier\Utilities;
/**
* Facilitates building a CSS string by appending rule blocks one at a time, checking whether the media query,
* selectors, or declarations block are the same as those from the preceding block and combining blocks in such cases.
*
* Example:
* $concatenator = new CssConcatenator();
* $concatenator->append(['body'], 'color: blue;');
* $concatenator->append(['body'], 'font-size: 16px;');
* $concatenator->append(['p'], 'margin: 1em 0;');
* $concatenator->append(['ul', 'ol'], 'margin: 1em 0;');
* $concatenator->append(['body'], 'font-size: 14px;', '@media screen and (max-width: 400px)');
* $concatenator->append(['ul', 'ol'], 'margin: 0.75em 0;', '@media screen and (max-width: 400px)');
* $css = $concatenator->getCss();
*
* `$css` (if unminified) would contain the following CSS:
* ` body {
* ` color: blue;
* ` font-size: 16px;
* ` }
* ` p, ul, ol {
* ` margin: 1em 0;
* ` }
* ` @media screen and (max-width: 400px) {
* ` body {
* ` font-size: 14px;
* ` }
* ` ul, ol {
* ` margin: 0.75em 0;
* ` }
* ` }
*
* @internal
*/
class CssConcatenator
{
/**
* Array of media rules in order. Each element is an object with the following properties:
* - string `media` - The media query string, e.g. "@media screen and (max-width:639px)", or an empty string for
* rules not within a media query block;
* - object[] `ruleBlocks` - Array of rule blocks in order, where each element is an object with the following
* properties:
* - mixed[] `selectorsAsKeys` - Array whose keys are selectors for the rule block (values are of no
* significance);
* - string `declarationsBlock` - The property declarations, e.g. "margin-top: 0.5em; padding: 0".
*
* @var array<int, object{
* media: string,
* ruleBlocks: array<int, object{
* selectorsAsKeys: array<string, array-key>,
* declarationsBlock: string
* }>
* }>
*/
private $mediaRules = [];
/**
* Appends a declaration block to the CSS.
*
* @param array<array-key, string> $selectors
* array of selectors for the rule, e.g. ["ul", "ol", "p:first-child"]
* @param string $declarationsBlock
* the property declarations, e.g. "margin-top: 0.5em; padding: 0"
* @param string $media
* the media query for the rule, e.g. "@media screen and (max-width:639px)", or an empty string if none
*/
public function append(array $selectors, string $declarationsBlock, string $media = ''): void
{
$selectorsAsKeys = \array_flip($selectors);
$mediaRule = $this->getOrCreateMediaRuleToAppendTo($media);
$ruleBlocks = $mediaRule->ruleBlocks;
$lastRuleBlock = \end($ruleBlocks);
$hasSameDeclarationsAsLastRule = \is_object($lastRuleBlock)
&& $declarationsBlock === $lastRuleBlock->declarationsBlock;
if ($hasSameDeclarationsAsLastRule) {
$lastRuleBlock->selectorsAsKeys += $selectorsAsKeys;
} else {
$lastRuleBlockSelectors = \is_object($lastRuleBlock) ? $lastRuleBlock->selectorsAsKeys : [];
$hasSameSelectorsAsLastRule = \is_object($lastRuleBlock)
&& self::hasEquivalentSelectors($selectorsAsKeys, $lastRuleBlockSelectors);
if ($hasSameSelectorsAsLastRule) {
$lastDeclarationsBlockWithoutSemicolon = \rtrim(\rtrim($lastRuleBlock->declarationsBlock), ';');
$lastRuleBlock->declarationsBlock = $lastDeclarationsBlockWithoutSemicolon . ';' . $declarationsBlock;
} else {
$mediaRule->ruleBlocks[] = (object)\compact('selectorsAsKeys', 'declarationsBlock');
}
}
}
/**
* @return string
*/
public function getCss(): string
{
return \implode('', \array_map([self::class, 'getMediaRuleCss'], $this->mediaRules));
}
/**
* @param string $media The media query for rules to be appended, e.g. "@media screen and (max-width:639px)",
* or an empty string if none.
*
* @return object{
* media: string,
* ruleBlocks: array<int, object{
* selectorsAsKeys: array<string, array-key>,
* declarationsBlock: string
* }>
* }
*/
private function getOrCreateMediaRuleToAppendTo(string $media): object
{
$lastMediaRule = \end($this->mediaRules);
if (\is_object($lastMediaRule) && $media === $lastMediaRule->media) {
return $lastMediaRule;
}
$newMediaRule = (object)[
'media' => $media,
'ruleBlocks' => [],
];
$this->mediaRules[] = $newMediaRule;
return $newMediaRule;
}
/**
* Tests if two sets of selectors are equivalent (i.e. the same selectors, possibly in a different order).
*
* @param array<string, array-key> $selectorsAsKeys1
* array in which the selectors are the keys, and the values are of no significance
* @param array<string, array-key> $selectorsAsKeys2 another such array
*
* @return bool
*/
private static function hasEquivalentSelectors(array $selectorsAsKeys1, array $selectorsAsKeys2): bool
{
return \count($selectorsAsKeys1) === \count($selectorsAsKeys2)
&& \count($selectorsAsKeys1) === \count($selectorsAsKeys1 + $selectorsAsKeys2);
}
/**
* @param object{
* media: string,
* ruleBlocks: array<int, object{
* selectorsAsKeys: array<string, array-key>,
* declarationsBlock: string
* }>
* } $mediaRule
*
* @return string CSS for the media rule.
*/
private static function getMediaRuleCss(object $mediaRule): string
{
$ruleBlocks = $mediaRule->ruleBlocks;
$css = \implode('', \array_map([self::class, 'getRuleBlockCss'], $ruleBlocks));
$media = $mediaRule->media;
if ($media !== '') {
$css = $media . '{' . $css . '}';
}
return $css;
}
/**
* @param object{selectorsAsKeys: array<string, array-key>, declarationsBlock: string} $ruleBlock
*
* @return string CSS for the rule block.
*/
private static function getRuleBlockCss(object $ruleBlock): string
{
$selectorsAsKeys = $ruleBlock->selectorsAsKeys;
$selectors = \array_keys($selectorsAsKeys);
$declarationsBlock = $ruleBlock->declarationsBlock;
return \implode(',', $selectors) . '{' . $declarationsBlock . '}';
}
}
sabberworm/php-css-parser/LICENSE 0000644 00000002120 15153552363 0012566 0 ustar 00 MIT License
Copyright (c) 2011 Raphael Schweikert, https://www.sabberworm.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
sabberworm/php-css-parser/src/CSSList/AtRuleBlockList.php 0000644 00000003172 15153552363 0017360 0 ustar 00 <?php
namespace Sabberworm\CSS\CSSList;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Property\AtRule;
/**
* A `BlockList` constructed by an unknown at-rule. `@media` rules are rendered into `AtRuleBlockList` objects.
*/
class AtRuleBlockList extends CSSBlockList implements AtRule
{
/**
* @var string
*/
private $sType;
/**
* @var string
*/
private $sArgs;
/**
* @param string $sType
* @param string $sArgs
* @param int $iLineNo
*/
public function __construct($sType, $sArgs = '', $iLineNo = 0)
{
parent::__construct($iLineNo);
$this->sType = $sType;
$this->sArgs = $sArgs;
}
/**
* @return string
*/
public function atRuleName()
{
return $this->sType;
}
/**
* @return string
*/
public function atRuleArgs()
{
return $this->sArgs;
}
/**
* @return string
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
$sArgs = $this->sArgs;
if ($sArgs) {
$sArgs = ' ' . $sArgs;
}
$sResult = $oOutputFormat->sBeforeAtRuleBlock;
$sResult .= "@{$this->sType}$sArgs{$oOutputFormat->spaceBeforeOpeningBrace()}{";
$sResult .= parent::render($oOutputFormat);
$sResult .= '}';
$sResult .= $oOutputFormat->sAfterAtRuleBlock;
return $sResult;
}
/**
* @return bool
*/
public function isRootList()
{
return false;
}
}
sabberworm/php-css-parser/src/CSSList/CSSBlockList.php 0000644 00000012164 15153552363 0016615 0 ustar 00 <?php
namespace Sabberworm\CSS\CSSList;
use Sabberworm\CSS\Property\Selector;
use Sabberworm\CSS\Rule\Rule;
use Sabberworm\CSS\RuleSet\DeclarationBlock;
use Sabberworm\CSS\RuleSet\RuleSet;
use Sabberworm\CSS\Value\CSSFunction;
use Sabberworm\CSS\Value\Value;
use Sabberworm\CSS\Value\ValueList;
/**
* A `CSSBlockList` is a `CSSList` whose `DeclarationBlock`s are guaranteed to contain valid declaration blocks or
* at-rules.
*
* Most `CSSList`s conform to this category but some at-rules (such as `@keyframes`) do not.
*/
abstract class CSSBlockList extends CSSList
{
/**
* @param int $iLineNo
*/
public function __construct($iLineNo = 0)
{
parent::__construct($iLineNo);
}
/**
* @param array<int, DeclarationBlock> $aResult
*
* @return void
*/
protected function allDeclarationBlocks(array &$aResult)
{
foreach ($this->aContents as $mContent) {
if ($mContent instanceof DeclarationBlock) {
$aResult[] = $mContent;
} elseif ($mContent instanceof CSSBlockList) {
$mContent->allDeclarationBlocks($aResult);
}
}
}
/**
* @param array<int, RuleSet> $aResult
*
* @return void
*/
protected function allRuleSets(array &$aResult)
{
foreach ($this->aContents as $mContent) {
if ($mContent instanceof RuleSet) {
$aResult[] = $mContent;
} elseif ($mContent instanceof CSSBlockList) {
$mContent->allRuleSets($aResult);
}
}
}
/**
* @param CSSList|Rule|RuleSet|Value $oElement
* @param array<int, Value> $aResult
* @param string|null $sSearchString
* @param bool $bSearchInFunctionArguments
*
* @return void
*/
protected function allValues($oElement, array &$aResult, $sSearchString = null, $bSearchInFunctionArguments = false)
{
if ($oElement instanceof CSSBlockList) {
foreach ($oElement->getContents() as $oContent) {
$this->allValues($oContent, $aResult, $sSearchString, $bSearchInFunctionArguments);
}
} elseif ($oElement instanceof RuleSet) {
foreach ($oElement->getRules($sSearchString) as $oRule) {
$this->allValues($oRule, $aResult, $sSearchString, $bSearchInFunctionArguments);
}
} elseif ($oElement instanceof Rule) {
$this->allValues($oElement->getValue(), $aResult, $sSearchString, $bSearchInFunctionArguments);
} elseif ($oElement instanceof ValueList) {
if ($bSearchInFunctionArguments || !($oElement instanceof CSSFunction)) {
foreach ($oElement->getListComponents() as $mComponent) {
$this->allValues($mComponent, $aResult, $sSearchString, $bSearchInFunctionArguments);
}
}
} else {
// Non-List `Value` or `CSSString` (CSS identifier)
$aResult[] = $oElement;
}
}
/**
* @param array<int, Selector> $aResult
* @param string|null $sSpecificitySearch
*
* @return void
*/
protected function allSelectors(array &$aResult, $sSpecificitySearch = null)
{
/** @var array<int, DeclarationBlock> $aDeclarationBlocks */
$aDeclarationBlocks = [];
$this->allDeclarationBlocks($aDeclarationBlocks);
foreach ($aDeclarationBlocks as $oBlock) {
foreach ($oBlock->getSelectors() as $oSelector) {
if ($sSpecificitySearch === null) {
$aResult[] = $oSelector;
} else {
$sComparator = '===';
$aSpecificitySearch = explode(' ', $sSpecificitySearch);
$iTargetSpecificity = $aSpecificitySearch[0];
if (count($aSpecificitySearch) > 1) {
$sComparator = $aSpecificitySearch[0];
$iTargetSpecificity = $aSpecificitySearch[1];
}
$iTargetSpecificity = (int)$iTargetSpecificity;
$iSelectorSpecificity = $oSelector->getSpecificity();
$bMatches = false;
switch ($sComparator) {
case '<=':
$bMatches = $iSelectorSpecificity <= $iTargetSpecificity;
break;
case '<':
$bMatches = $iSelectorSpecificity < $iTargetSpecificity;
break;
case '>=':
$bMatches = $iSelectorSpecificity >= $iTargetSpecificity;
break;
case '>':
$bMatches = $iSelectorSpecificity > $iTargetSpecificity;
break;
default:
$bMatches = $iSelectorSpecificity === $iTargetSpecificity;
break;
}
if ($bMatches) {
$aResult[] = $oSelector;
}
}
}
}
}
}
sabberworm/php-css-parser/src/CSSList/CSSList.php 0000644 00000036416 15153552363 0015650 0 ustar 00 <?php
namespace Sabberworm\CSS\CSSList;
use Sabberworm\CSS\Comment\Comment;
use Sabberworm\CSS\Comment\Commentable;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Parsing\ParserState;
use Sabberworm\CSS\Parsing\SourceException;
use Sabberworm\CSS\Parsing\UnexpectedEOFException;
use Sabberworm\CSS\Parsing\UnexpectedTokenException;
use Sabberworm\CSS\Property\AtRule;
use Sabberworm\CSS\Property\Charset;
use Sabberworm\CSS\Property\CSSNamespace;
use Sabberworm\CSS\Property\Import;
use Sabberworm\CSS\Property\Selector;
use Sabberworm\CSS\Renderable;
use Sabberworm\CSS\RuleSet\AtRuleSet;
use Sabberworm\CSS\RuleSet\DeclarationBlock;
use Sabberworm\CSS\RuleSet\RuleSet;
use Sabberworm\CSS\Settings;
use Sabberworm\CSS\Value\CSSString;
use Sabberworm\CSS\Value\URL;
use Sabberworm\CSS\Value\Value;
/**
* A `CSSList` is the most generic container available. Its contents include `RuleSet` as well as other `CSSList`
* objects.
*
* Also, it may contain `Import` and `Charset` objects stemming from at-rules.
*/
abstract class CSSList implements Renderable, Commentable
{
/**
* @var array<array-key, Comment>
*/
protected $aComments;
/**
* @var array<int, RuleSet|CSSList|Import|Charset>
*/
protected $aContents;
/**
* @var int
*/
protected $iLineNo;
/**
* @param int $iLineNo
*/
public function __construct($iLineNo = 0)
{
$this->aComments = [];
$this->aContents = [];
$this->iLineNo = $iLineNo;
}
/**
* @return void
*
* @throws UnexpectedTokenException
* @throws SourceException
*/
public static function parseList(ParserState $oParserState, CSSList $oList)
{
$bIsRoot = $oList instanceof Document;
if (is_string($oParserState)) {
$oParserState = new ParserState($oParserState, Settings::create());
}
$bLenientParsing = $oParserState->getSettings()->bLenientParsing;
while (!$oParserState->isEnd()) {
$comments = $oParserState->consumeWhiteSpace();
$oListItem = null;
if ($bLenientParsing) {
try {
$oListItem = self::parseListItem($oParserState, $oList);
} catch (UnexpectedTokenException $e) {
$oListItem = false;
}
} else {
$oListItem = self::parseListItem($oParserState, $oList);
}
if ($oListItem === null) {
// List parsing finished
return;
}
if ($oListItem) {
$oListItem->setComments($comments);
$oList->append($oListItem);
}
$oParserState->consumeWhiteSpace();
}
if (!$bIsRoot && !$bLenientParsing) {
throw new SourceException("Unexpected end of document", $oParserState->currentLine());
}
}
/**
* @return AtRuleBlockList|KeyFrame|Charset|CSSNamespace|Import|AtRuleSet|DeclarationBlock|null|false
*
* @throws SourceException
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*/
private static function parseListItem(ParserState $oParserState, CSSList $oList)
{
$bIsRoot = $oList instanceof Document;
if ($oParserState->comes('@')) {
$oAtRule = self::parseAtRule($oParserState);
if ($oAtRule instanceof Charset) {
if (!$bIsRoot) {
throw new UnexpectedTokenException(
'@charset may only occur in root document',
'',
'custom',
$oParserState->currentLine()
);
}
if (count($oList->getContents()) > 0) {
throw new UnexpectedTokenException(
'@charset must be the first parseable token in a document',
'',
'custom',
$oParserState->currentLine()
);
}
$oParserState->setCharset($oAtRule->getCharset()->getString());
}
return $oAtRule;
} elseif ($oParserState->comes('}')) {
if (!$oParserState->getSettings()->bLenientParsing) {
throw new UnexpectedTokenException('CSS selector', '}', 'identifier', $oParserState->currentLine());
} else {
if ($bIsRoot) {
if ($oParserState->getSettings()->bLenientParsing) {
return DeclarationBlock::parse($oParserState);
} else {
throw new SourceException("Unopened {", $oParserState->currentLine());
}
} else {
return null;
}
}
} else {
return DeclarationBlock::parse($oParserState, $oList);
}
}
/**
* @param ParserState $oParserState
*
* @return AtRuleBlockList|KeyFrame|Charset|CSSNamespace|Import|AtRuleSet|null
*
* @throws SourceException
* @throws UnexpectedTokenException
* @throws UnexpectedEOFException
*/
private static function parseAtRule(ParserState $oParserState)
{
$oParserState->consume('@');
$sIdentifier = $oParserState->parseIdentifier();
$iIdentifierLineNum = $oParserState->currentLine();
$oParserState->consumeWhiteSpace();
if ($sIdentifier === 'import') {
$oLocation = URL::parse($oParserState);
$oParserState->consumeWhiteSpace();
$sMediaQuery = null;
if (!$oParserState->comes(';')) {
$sMediaQuery = trim($oParserState->consumeUntil([';', ParserState::EOF]));
}
$oParserState->consumeUntil([';', ParserState::EOF], true, true);
return new Import($oLocation, $sMediaQuery ?: null, $iIdentifierLineNum);
} elseif ($sIdentifier === 'charset') {
$sCharset = CSSString::parse($oParserState);
$oParserState->consumeWhiteSpace();
$oParserState->consumeUntil([';', ParserState::EOF], true, true);
return new Charset($sCharset, $iIdentifierLineNum);
} elseif (self::identifierIs($sIdentifier, 'keyframes')) {
$oResult = new KeyFrame($iIdentifierLineNum);
$oResult->setVendorKeyFrame($sIdentifier);
$oResult->setAnimationName(trim($oParserState->consumeUntil('{', false, true)));
CSSList::parseList($oParserState, $oResult);
if ($oParserState->comes('}')) {
$oParserState->consume('}');
}
return $oResult;
} elseif ($sIdentifier === 'namespace') {
$sPrefix = null;
$mUrl = Value::parsePrimitiveValue($oParserState);
if (!$oParserState->comes(';')) {
$sPrefix = $mUrl;
$mUrl = Value::parsePrimitiveValue($oParserState);
}
$oParserState->consumeUntil([';', ParserState::EOF], true, true);
if ($sPrefix !== null && !is_string($sPrefix)) {
throw new UnexpectedTokenException('Wrong namespace prefix', $sPrefix, 'custom', $iIdentifierLineNum);
}
if (!($mUrl instanceof CSSString || $mUrl instanceof URL)) {
throw new UnexpectedTokenException(
'Wrong namespace url of invalid type',
$mUrl,
'custom',
$iIdentifierLineNum
);
}
return new CSSNamespace($mUrl, $sPrefix, $iIdentifierLineNum);
} else {
// Unknown other at rule (font-face or such)
$sArgs = trim($oParserState->consumeUntil('{', false, true));
if (substr_count($sArgs, "(") != substr_count($sArgs, ")")) {
if ($oParserState->getSettings()->bLenientParsing) {
return null;
} else {
throw new SourceException("Unmatched brace count in media query", $oParserState->currentLine());
}
}
$bUseRuleSet = true;
foreach (explode('/', AtRule::BLOCK_RULES) as $sBlockRuleName) {
if (self::identifierIs($sIdentifier, $sBlockRuleName)) {
$bUseRuleSet = false;
break;
}
}
if ($bUseRuleSet) {
$oAtRule = new AtRuleSet($sIdentifier, $sArgs, $iIdentifierLineNum);
RuleSet::parseRuleSet($oParserState, $oAtRule);
} else {
$oAtRule = new AtRuleBlockList($sIdentifier, $sArgs, $iIdentifierLineNum);
CSSList::parseList($oParserState, $oAtRule);
if ($oParserState->comes('}')) {
$oParserState->consume('}');
}
}
return $oAtRule;
}
}
/**
* Tests an identifier for a given value. Since identifiers are all keywords, they can be vendor-prefixed.
* We need to check for these versions too.
*
* @param string $sIdentifier
* @param string $sMatch
*
* @return bool
*/
private static function identifierIs($sIdentifier, $sMatch)
{
return (strcasecmp($sIdentifier, $sMatch) === 0)
?: preg_match("/^(-\\w+-)?$sMatch$/i", $sIdentifier) === 1;
}
/**
* @return int
*/
public function getLineNo()
{
return $this->iLineNo;
}
/**
* Prepends an item to the list of contents.
*
* @param RuleSet|CSSList|Import|Charset $oItem
*
* @return void
*/
public function prepend($oItem)
{
array_unshift($this->aContents, $oItem);
}
/**
* Appends an item to tje list of contents.
*
* @param RuleSet|CSSList|Import|Charset $oItem
*
* @return void
*/
public function append($oItem)
{
$this->aContents[] = $oItem;
}
/**
* Splices the list of contents.
*
* @param int $iOffset
* @param int $iLength
* @param array<int, RuleSet|CSSList|Import|Charset> $mReplacement
*
* @return void
*/
public function splice($iOffset, $iLength = null, $mReplacement = null)
{
array_splice($this->aContents, $iOffset, $iLength, $mReplacement);
}
/**
* Removes an item from the CSS list.
*
* @param RuleSet|Import|Charset|CSSList $oItemToRemove
* May be a RuleSet (most likely a DeclarationBlock), a Import,
* a Charset or another CSSList (most likely a MediaQuery)
*
* @return bool whether the item was removed
*/
public function remove($oItemToRemove)
{
$iKey = array_search($oItemToRemove, $this->aContents, true);
if ($iKey !== false) {
unset($this->aContents[$iKey]);
return true;
}
return false;
}
/**
* Replaces an item from the CSS list.
*
* @param RuleSet|Import|Charset|CSSList $oOldItem
* May be a `RuleSet` (most likely a `DeclarationBlock`), an `Import`, a `Charset`
* or another `CSSList` (most likely a `MediaQuery`)
*
* @return bool
*/
public function replace($oOldItem, $mNewItem)
{
$iKey = array_search($oOldItem, $this->aContents, true);
if ($iKey !== false) {
if (is_array($mNewItem)) {
array_splice($this->aContents, $iKey, 1, $mNewItem);
} else {
array_splice($this->aContents, $iKey, 1, [$mNewItem]);
}
return true;
}
return false;
}
/**
* @param array<int, RuleSet|Import|Charset|CSSList> $aContents
*/
public function setContents(array $aContents)
{
$this->aContents = [];
foreach ($aContents as $content) {
$this->append($content);
}
}
/**
* Removes a declaration block from the CSS list if it matches all given selectors.
*
* @param DeclarationBlock|array<array-key, Selector>|string $mSelector the selectors to match
* @param bool $bRemoveAll whether to stop at the first declaration block found or remove all blocks
*
* @return void
*/
public function removeDeclarationBlockBySelector($mSelector, $bRemoveAll = false)
{
if ($mSelector instanceof DeclarationBlock) {
$mSelector = $mSelector->getSelectors();
}
if (!is_array($mSelector)) {
$mSelector = explode(',', $mSelector);
}
foreach ($mSelector as $iKey => &$mSel) {
if (!($mSel instanceof Selector)) {
if (!Selector::isValid($mSel)) {
throw new UnexpectedTokenException(
"Selector did not match '" . Selector::SELECTOR_VALIDATION_RX . "'.",
$mSel,
"custom"
);
}
$mSel = new Selector($mSel);
}
}
foreach ($this->aContents as $iKey => $mItem) {
if (!($mItem instanceof DeclarationBlock)) {
continue;
}
if ($mItem->getSelectors() == $mSelector) {
unset($this->aContents[$iKey]);
if (!$bRemoveAll) {
return;
}
}
}
}
/**
* @return string
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
$sResult = '';
$bIsFirst = true;
$oNextLevel = $oOutputFormat;
if (!$this->isRootList()) {
$oNextLevel = $oOutputFormat->nextLevel();
}
foreach ($this->aContents as $oContent) {
$sRendered = $oOutputFormat->safely(function () use ($oNextLevel, $oContent) {
return $oContent->render($oNextLevel);
});
if ($sRendered === null) {
continue;
}
if ($bIsFirst) {
$bIsFirst = false;
$sResult .= $oNextLevel->spaceBeforeBlocks();
} else {
$sResult .= $oNextLevel->spaceBetweenBlocks();
}
$sResult .= $sRendered;
}
if (!$bIsFirst) {
// Had some output
$sResult .= $oOutputFormat->spaceAfterBlocks();
}
return $sResult;
}
/**
* Return true if the list can not be further outdented. Only important when rendering.
*
* @return bool
*/
abstract public function isRootList();
/**
* @return array<int, RuleSet|Import|Charset|CSSList>
*/
public function getContents()
{
return $this->aContents;
}
/**
* @param array<array-key, Comment> $aComments
*
* @return void
*/
public function addComments(array $aComments)
{
$this->aComments = array_merge($this->aComments, $aComments);
}
/**
* @return array<array-key, Comment>
*/
public function getComments()
{
return $this->aComments;
}
/**
* @param array<array-key, Comment> $aComments
*
* @return void
*/
public function setComments(array $aComments)
{
$this->aComments = $aComments;
}
}
sabberworm/php-css-parser/src/CSSList/Document.php 0000644 00000011211 15153552363 0016124 0 ustar 00 <?php
namespace Sabberworm\CSS\CSSList;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Parsing\ParserState;
use Sabberworm\CSS\Parsing\SourceException;
use Sabberworm\CSS\Property\Selector;
use Sabberworm\CSS\RuleSet\DeclarationBlock;
use Sabberworm\CSS\RuleSet\RuleSet;
use Sabberworm\CSS\Value\Value;
/**
* The root `CSSList` of a parsed file. Contains all top-level CSS contents, mostly declaration blocks,
* but also any at-rules encountered.
*/
class Document extends CSSBlockList
{
/**
* @param int $iLineNo
*/
public function __construct($iLineNo = 0)
{
parent::__construct($iLineNo);
}
/**
* @return Document
*
* @throws SourceException
*/
public static function parse(ParserState $oParserState)
{
$oDocument = new Document($oParserState->currentLine());
CSSList::parseList($oParserState, $oDocument);
return $oDocument;
}
/**
* Gets all `DeclarationBlock` objects recursively.
*
* @return array<int, DeclarationBlock>
*/
public function getAllDeclarationBlocks()
{
/** @var array<int, DeclarationBlock> $aResult */
$aResult = [];
$this->allDeclarationBlocks($aResult);
return $aResult;
}
/**
* Gets all `DeclarationBlock` objects recursively.
*
* @return array<int, DeclarationBlock>
*
* @deprecated will be removed in version 9.0; use `getAllDeclarationBlocks()` instead
*/
public function getAllSelectors()
{
return $this->getAllDeclarationBlocks();
}
/**
* Returns all `RuleSet` objects found recursively in the tree.
*
* @return array<int, RuleSet>
*/
public function getAllRuleSets()
{
/** @var array<int, RuleSet> $aResult */
$aResult = [];
$this->allRuleSets($aResult);
return $aResult;
}
/**
* Returns all `Value` objects found recursively in the tree.
*
* @param CSSList|RuleSet|string $mElement
* the `CSSList` or `RuleSet` to start the search from (defaults to the whole document).
* If a string is given, it is used as rule name filter.
* @param bool $bSearchInFunctionArguments whether to also return Value objects used as Function arguments.
*
* @return array<int, Value>
*
* @see RuleSet->getRules()
*/
public function getAllValues($mElement = null, $bSearchInFunctionArguments = false)
{
$sSearchString = null;
if ($mElement === null) {
$mElement = $this;
} elseif (is_string($mElement)) {
$sSearchString = $mElement;
$mElement = $this;
}
/** @var array<int, Value> $aResult */
$aResult = [];
$this->allValues($mElement, $aResult, $sSearchString, $bSearchInFunctionArguments);
return $aResult;
}
/**
* Returns all `Selector` objects found recursively in the tree.
*
* Note that this does not yield the full `DeclarationBlock` that the selector belongs to
* (and, currently, there is no way to get to that).
*
* @param string|null $sSpecificitySearch
* An optional filter by specificity.
* May contain a comparison operator and a number or just a number (defaults to "==").
*
* @return array<int, Selector>
* @example `getSelectorsBySpecificity('>= 100')`
*
*/
public function getSelectorsBySpecificity($sSpecificitySearch = null)
{
/** @var array<int, Selector> $aResult */
$aResult = [];
$this->allSelectors($aResult, $sSpecificitySearch);
return $aResult;
}
/**
* Expands all shorthand properties to their long value.
*
* @return void
*/
public function expandShorthands()
{
foreach ($this->getAllDeclarationBlocks() as $oDeclaration) {
$oDeclaration->expandShorthands();
}
}
/**
* Create shorthands properties whenever possible.
*
* @return void
*/
public function createShorthands()
{
foreach ($this->getAllDeclarationBlocks() as $oDeclaration) {
$oDeclaration->createShorthands();
}
}
/**
* Overrides `render()` to make format argument optional.
*
* @param OutputFormat|null $oOutputFormat
*
* @return string
*/
public function render(OutputFormat $oOutputFormat = null)
{
if ($oOutputFormat === null) {
$oOutputFormat = new OutputFormat();
}
return parent::render($oOutputFormat);
}
/**
* @return bool
*/
public function isRootList()
{
return true;
}
}
sabberworm/php-css-parser/src/CSSList/KeyFrame.php 0000644 00000003616 15153552363 0016063 0 ustar 00 <?php
namespace Sabberworm\CSS\CSSList;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Property\AtRule;
class KeyFrame extends CSSList implements AtRule
{
/**
* @var string|null
*/
private $vendorKeyFrame;
/**
* @var string|null
*/
private $animationName;
/**
* @param int $iLineNo
*/
public function __construct($iLineNo = 0)
{
parent::__construct($iLineNo);
$this->vendorKeyFrame = null;
$this->animationName = null;
}
/**
* @param string $vendorKeyFrame
*/
public function setVendorKeyFrame($vendorKeyFrame)
{
$this->vendorKeyFrame = $vendorKeyFrame;
}
/**
* @return string|null
*/
public function getVendorKeyFrame()
{
return $this->vendorKeyFrame;
}
/**
* @param string $animationName
*/
public function setAnimationName($animationName)
{
$this->animationName = $animationName;
}
/**
* @return string|null
*/
public function getAnimationName()
{
return $this->animationName;
}
/**
* @return string
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
$sResult = "@{$this->vendorKeyFrame} {$this->animationName}{$oOutputFormat->spaceBeforeOpeningBrace()}{";
$sResult .= parent::render($oOutputFormat);
$sResult .= '}';
return $sResult;
}
/**
* @return bool
*/
public function isRootList()
{
return false;
}
/**
* @return string|null
*/
public function atRuleName()
{
return $this->vendorKeyFrame;
}
/**
* @return string|null
*/
public function atRuleArgs()
{
return $this->animationName;
}
}
sabberworm/php-css-parser/src/Comment/Comment.php 0000644 00000002215 15153552363 0016072 0 ustar 00 <?php
namespace Sabberworm\CSS\Comment;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Renderable;
class Comment implements Renderable
{
/**
* @var int
*/
protected $iLineNo;
/**
* @var string
*/
protected $sComment;
/**
* @param string $sComment
* @param int $iLineNo
*/
public function __construct($sComment = '', $iLineNo = 0)
{
$this->sComment = $sComment;
$this->iLineNo = $iLineNo;
}
/**
* @return string
*/
public function getComment()
{
return $this->sComment;
}
/**
* @return int
*/
public function getLineNo()
{
return $this->iLineNo;
}
/**
* @param string $sComment
*
* @return void
*/
public function setComment($sComment)
{
$this->sComment = $sComment;
}
/**
* @return string
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
return '/*' . $this->sComment . '*/';
}
}
sabberworm/php-css-parser/src/Comment/Commentable.php 0000644 00000000704 15153552363 0016717 0 ustar 00 <?php
namespace Sabberworm\CSS\Comment;
interface Commentable
{
/**
* @param array<array-key, Comment> $aComments
*
* @return void
*/
public function addComments(array $aComments);
/**
* @return array<array-key, Comment>
*/
public function getComments();
/**
* @param array<array-key, Comment> $aComments
*
* @return void
*/
public function setComments(array $aComments);
}
sabberworm/php-css-parser/src/OutputFormat.php 0000644 00000017233 15153552363 0015545 0 ustar 00 <?php
namespace Sabberworm\CSS;
/**
* Class OutputFormat
*
* @method OutputFormat setSemicolonAfterLastRule(bool $bSemicolonAfterLastRule) Set whether semicolons are added after
* last rule.
*/
class OutputFormat
{
/**
* Value format: `"` means double-quote, `'` means single-quote
*
* @var string
*/
public $sStringQuotingType = '"';
/**
* Output RGB colors in hash notation if possible
*
* @var string
*/
public $bRGBHashNotation = true;
/**
* Declaration format
*
* Semicolon after the last rule of a declaration block can be omitted. To do that, set this false.
*
* @var bool
*/
public $bSemicolonAfterLastRule = true;
/**
* Spacing
* Note that these strings are not sanity-checked: the value should only consist of whitespace
* Any newline character will be indented according to the current level.
* The triples (After, Before, Between) can be set using a wildcard (e.g. `$oFormat->set('Space*Rules', "\n");`)
*/
public $sSpaceAfterRuleName = ' ';
/**
* @var string
*/
public $sSpaceBeforeRules = '';
/**
* @var string
*/
public $sSpaceAfterRules = '';
/**
* @var string
*/
public $sSpaceBetweenRules = '';
/**
* @var string
*/
public $sSpaceBeforeBlocks = '';
/**
* @var string
*/
public $sSpaceAfterBlocks = '';
/**
* @var string
*/
public $sSpaceBetweenBlocks = "\n";
/**
* Content injected in and around at-rule blocks.
*
* @var string
*/
public $sBeforeAtRuleBlock = '';
/**
* @var string
*/
public $sAfterAtRuleBlock = '';
/**
* This is what’s printed before and after the comma if a declaration block contains multiple selectors.
*
* @var string
*/
public $sSpaceBeforeSelectorSeparator = '';
/**
* @var string
*/
public $sSpaceAfterSelectorSeparator = ' ';
/**
* This is what’s printed after the comma of value lists
*
* @var string
*/
public $sSpaceBeforeListArgumentSeparator = '';
/**
* @var string
*/
public $sSpaceAfterListArgumentSeparator = '';
/**
* @var string
*/
public $sSpaceBeforeOpeningBrace = ' ';
/**
* Content injected in and around declaration blocks.
*
* @var string
*/
public $sBeforeDeclarationBlock = '';
/**
* @var string
*/
public $sAfterDeclarationBlockSelectors = '';
/**
* @var string
*/
public $sAfterDeclarationBlock = '';
/**
* Indentation character(s) per level. Only applicable if newlines are used in any of the spacing settings.
*
* @var string
*/
public $sIndentation = "\t";
/**
* Output exceptions.
*
* @var bool
*/
public $bIgnoreExceptions = false;
/**
* @var OutputFormatter|null
*/
private $oFormatter = null;
/**
* @var OutputFormat|null
*/
private $oNextLevelFormat = null;
/**
* @var int
*/
private $iIndentationLevel = 0;
public function __construct()
{
}
/**
* @param string $sName
*
* @return string|null
*/
public function get($sName)
{
$aVarPrefixes = ['a', 's', 'm', 'b', 'f', 'o', 'c', 'i'];
foreach ($aVarPrefixes as $sPrefix) {
$sFieldName = $sPrefix . ucfirst($sName);
if (isset($this->$sFieldName)) {
return $this->$sFieldName;
}
}
return null;
}
/**
* @param array<array-key, string>|string $aNames
* @param mixed $mValue
*
* @return self|false
*/
public function set($aNames, $mValue)
{
$aVarPrefixes = ['a', 's', 'm', 'b', 'f', 'o', 'c', 'i'];
if (is_string($aNames) && strpos($aNames, '*') !== false) {
$aNames =
[
str_replace('*', 'Before', $aNames),
str_replace('*', 'Between', $aNames),
str_replace('*', 'After', $aNames),
];
} elseif (!is_array($aNames)) {
$aNames = [$aNames];
}
foreach ($aVarPrefixes as $sPrefix) {
$bDidReplace = false;
foreach ($aNames as $sName) {
$sFieldName = $sPrefix . ucfirst($sName);
if (isset($this->$sFieldName)) {
$this->$sFieldName = $mValue;
$bDidReplace = true;
}
}
if ($bDidReplace) {
return $this;
}
}
// Break the chain so the user knows this option is invalid
return false;
}
/**
* @param string $sMethodName
* @param array<array-key, mixed> $aArguments
*
* @return mixed
*
* @throws \Exception
*/
public function __call($sMethodName, array $aArguments)
{
if (strpos($sMethodName, 'set') === 0) {
return $this->set(substr($sMethodName, 3), $aArguments[0]);
} elseif (strpos($sMethodName, 'get') === 0) {
return $this->get(substr($sMethodName, 3));
} elseif (method_exists(OutputFormatter::class, $sMethodName)) {
return call_user_func_array([$this->getFormatter(), $sMethodName], $aArguments);
} else {
throw new \Exception('Unknown OutputFormat method called: ' . $sMethodName);
}
}
/**
* @param int $iNumber
*
* @return self
*/
public function indentWithTabs($iNumber = 1)
{
return $this->setIndentation(str_repeat("\t", $iNumber));
}
/**
* @param int $iNumber
*
* @return self
*/
public function indentWithSpaces($iNumber = 2)
{
return $this->setIndentation(str_repeat(" ", $iNumber));
}
/**
* @return OutputFormat
*/
public function nextLevel()
{
if ($this->oNextLevelFormat === null) {
$this->oNextLevelFormat = clone $this;
$this->oNextLevelFormat->iIndentationLevel++;
$this->oNextLevelFormat->oFormatter = null;
}
return $this->oNextLevelFormat;
}
/**
* @return void
*/
public function beLenient()
{
$this->bIgnoreExceptions = true;
}
/**
* @return OutputFormatter
*/
public function getFormatter()
{
if ($this->oFormatter === null) {
$this->oFormatter = new OutputFormatter($this);
}
return $this->oFormatter;
}
/**
* @return int
*/
public function level()
{
return $this->iIndentationLevel;
}
/**
* Creates an instance of this class without any particular formatting settings.
*
* @return self
*/
public static function create()
{
return new OutputFormat();
}
/**
* Creates an instance of this class with a preset for compact formatting.
*
* @return self
*/
public static function createCompact()
{
$format = self::create();
$format->set('Space*Rules', "")->set('Space*Blocks', "")->setSpaceAfterRuleName('')
->setSpaceBeforeOpeningBrace('')->setSpaceAfterSelectorSeparator('');
return $format;
}
/**
* Creates an instance of this class with a preset for pretty formatting.
*
* @return self
*/
public static function createPretty()
{
$format = self::create();
$format->set('Space*Rules', "\n")->set('Space*Blocks', "\n")
->setSpaceBetweenBlocks("\n\n")->set('SpaceAfterListArgumentSeparator', ['default' => '', ',' => ' ']);
return $format;
}
}
sabberworm/php-css-parser/src/OutputFormatter.php 0000644 00000012336 15153552363 0016257 0 ustar 00 <?php
namespace Sabberworm\CSS;
use Sabberworm\CSS\Parsing\OutputException;
class OutputFormatter
{
/**
* @var OutputFormat
*/
private $oFormat;
public function __construct(OutputFormat $oFormat)
{
$this->oFormat = $oFormat;
}
/**
* @param string $sName
* @param string|null $sType
*
* @return string
*/
public function space($sName, $sType = null)
{
$sSpaceString = $this->oFormat->get("Space$sName");
// If $sSpaceString is an array, we have multiple values configured
// depending on the type of object the space applies to
if (is_array($sSpaceString)) {
if ($sType !== null && isset($sSpaceString[$sType])) {
$sSpaceString = $sSpaceString[$sType];
} else {
$sSpaceString = reset($sSpaceString);
}
}
return $this->prepareSpace($sSpaceString);
}
/**
* @return string
*/
public function spaceAfterRuleName()
{
return $this->space('AfterRuleName');
}
/**
* @return string
*/
public function spaceBeforeRules()
{
return $this->space('BeforeRules');
}
/**
* @return string
*/
public function spaceAfterRules()
{
return $this->space('AfterRules');
}
/**
* @return string
*/
public function spaceBetweenRules()
{
return $this->space('BetweenRules');
}
/**
* @return string
*/
public function spaceBeforeBlocks()
{
return $this->space('BeforeBlocks');
}
/**
* @return string
*/
public function spaceAfterBlocks()
{
return $this->space('AfterBlocks');
}
/**
* @return string
*/
public function spaceBetweenBlocks()
{
return $this->space('BetweenBlocks');
}
/**
* @return string
*/
public function spaceBeforeSelectorSeparator()
{
return $this->space('BeforeSelectorSeparator');
}
/**
* @return string
*/
public function spaceAfterSelectorSeparator()
{
return $this->space('AfterSelectorSeparator');
}
/**
* @param string $sSeparator
*
* @return string
*/
public function spaceBeforeListArgumentSeparator($sSeparator)
{
return $this->space('BeforeListArgumentSeparator', $sSeparator);
}
/**
* @param string $sSeparator
*
* @return string
*/
public function spaceAfterListArgumentSeparator($sSeparator)
{
return $this->space('AfterListArgumentSeparator', $sSeparator);
}
/**
* @return string
*/
public function spaceBeforeOpeningBrace()
{
return $this->space('BeforeOpeningBrace');
}
/**
* Runs the given code, either swallowing or passing exceptions, depending on the `bIgnoreExceptions` setting.
*
* @param string $cCode the name of the function to call
*
* @return string|null
*/
public function safely($cCode)
{
if ($this->oFormat->get('IgnoreExceptions')) {
// If output exceptions are ignored, run the code with exception guards
try {
return $cCode();
} catch (OutputException $e) {
return null;
} // Do nothing
} else {
// Run the code as-is
return $cCode();
}
}
/**
* Clone of the `implode` function, but calls `render` with the current output format instead of `__toString()`.
*
* @param string $sSeparator
* @param array<array-key, Renderable|string> $aValues
* @param bool $bIncreaseLevel
*
* @return string
*/
public function implode($sSeparator, array $aValues, $bIncreaseLevel = false)
{
$sResult = '';
$oFormat = $this->oFormat;
if ($bIncreaseLevel) {
$oFormat = $oFormat->nextLevel();
}
$bIsFirst = true;
foreach ($aValues as $mValue) {
if ($bIsFirst) {
$bIsFirst = false;
} else {
$sResult .= $sSeparator;
}
if ($mValue instanceof Renderable) {
$sResult .= $mValue->render($oFormat);
} else {
$sResult .= $mValue;
}
}
return $sResult;
}
/**
* @param string $sString
*
* @return string
*/
public function removeLastSemicolon($sString)
{
if ($this->oFormat->get('SemicolonAfterLastRule')) {
return $sString;
}
$sString = explode(';', $sString);
if (count($sString) < 2) {
return $sString[0];
}
$sLast = array_pop($sString);
$sNextToLast = array_pop($sString);
array_push($sString, $sNextToLast . $sLast);
return implode(';', $sString);
}
/**
* @param string $sSpaceString
*
* @return string
*/
private function prepareSpace($sSpaceString)
{
return str_replace("\n", "\n" . $this->indent(), $sSpaceString);
}
/**
* @return string
*/
private function indent()
{
return str_repeat($this->oFormat->sIndentation, $this->oFormat->level());
}
}
sabberworm/php-css-parser/src/Parser.php 0000644 00000002457 15153552363 0014332 0 ustar 00 <?php
namespace Sabberworm\CSS;
use Sabberworm\CSS\CSSList\Document;
use Sabberworm\CSS\Parsing\ParserState;
use Sabberworm\CSS\Parsing\SourceException;
/**
* This class parses CSS from text into a data structure.
*/
class Parser
{
/**
* @var ParserState
*/
private $oParserState;
/**
* @param string $sText
* @param Settings|null $oParserSettings
* @param int $iLineNo the line number (starting from 1, not from 0)
*/
public function __construct($sText, Settings $oParserSettings = null, $iLineNo = 1)
{
if ($oParserSettings === null) {
$oParserSettings = Settings::create();
}
$this->oParserState = new ParserState($sText, $oParserSettings, $iLineNo);
}
/**
* @param string $sCharset
*
* @return void
*/
public function setCharset($sCharset)
{
$this->oParserState->setCharset($sCharset);
}
/**
* @return void
*/
public function getCharset()
{
// Note: The `return` statement is missing here. This is a bug that needs to be fixed.
$this->oParserState->getCharset();
}
/**
* @return Document
*
* @throws SourceException
*/
public function parse()
{
return Document::parse($this->oParserState);
}
}
sabberworm/php-css-parser/src/Parsing/OutputException.php 0000644 00000000546 15153552363 0017655 0 ustar 00 <?php
namespace Sabberworm\CSS\Parsing;
/**
* Thrown if the CSS parser attempts to print something invalid.
*/
class OutputException extends SourceException
{
/**
* @param string $sMessage
* @param int $iLineNo
*/
public function __construct($sMessage, $iLineNo = 0)
{
parent::__construct($sMessage, $iLineNo);
}
}
sabberworm/php-css-parser/src/Parsing/ParserState.php 0000644 00000032212 15153552363 0016726 0 ustar 00 <?php
namespace Sabberworm\CSS\Parsing;
use Sabberworm\CSS\Comment\Comment;
use Sabberworm\CSS\Settings;
class ParserState
{
/**
* @var null
*/
const EOF = null;
/**
* @var Settings
*/
private $oParserSettings;
/**
* @var string
*/
private $sText;
/**
* @var array<int, string>
*/
private $aText;
/**
* @var int
*/
private $iCurrentPosition;
/**
* @var string
*/
private $sCharset;
/**
* @var int
*/
private $iLength;
/**
* @var int
*/
private $iLineNo;
/**
* @param string $sText
* @param int $iLineNo
*/
public function __construct($sText, Settings $oParserSettings, $iLineNo = 1)
{
$this->oParserSettings = $oParserSettings;
$this->sText = $sText;
$this->iCurrentPosition = 0;
$this->iLineNo = $iLineNo;
$this->setCharset($this->oParserSettings->sDefaultCharset);
}
/**
* @param string $sCharset
*
* @return void
*/
public function setCharset($sCharset)
{
$this->sCharset = $sCharset;
$this->aText = $this->strsplit($this->sText);
if (is_array($this->aText)) {
$this->iLength = count($this->aText);
}
}
/**
* @return string
*/
public function getCharset()
{
return $this->sCharset;
}
/**
* @return int
*/
public function currentLine()
{
return $this->iLineNo;
}
/**
* @return int
*/
public function currentColumn()
{
return $this->iCurrentPosition;
}
/**
* @return Settings
*/
public function getSettings()
{
return $this->oParserSettings;
}
/**
* @param bool $bIgnoreCase
*
* @return string
*
* @throws UnexpectedTokenException
*/
public function parseIdentifier($bIgnoreCase = true)
{
$sResult = $this->parseCharacter(true);
if ($sResult === null) {
throw new UnexpectedTokenException($sResult, $this->peek(5), 'identifier', $this->iLineNo);
}
$sCharacter = null;
while (($sCharacter = $this->parseCharacter(true)) !== null) {
if (preg_match('/[a-zA-Z0-9\x{00A0}-\x{FFFF}_-]/Sux', $sCharacter)) {
$sResult .= $sCharacter;
} else {
$sResult .= '\\' . $sCharacter;
}
}
if ($bIgnoreCase) {
$sResult = $this->strtolower($sResult);
}
return $sResult;
}
/**
* @param bool $bIsForIdentifier
*
* @return string|null
*
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*/
public function parseCharacter($bIsForIdentifier)
{
if ($this->peek() === '\\') {
if (
$bIsForIdentifier && $this->oParserSettings->bLenientParsing
&& ($this->comes('\0') || $this->comes('\9'))
) {
// Non-strings can contain \0 or \9 which is an IE hack supported in lenient parsing.
return null;
}
$this->consume('\\');
if ($this->comes('\n') || $this->comes('\r')) {
return '';
}
if (preg_match('/[0-9a-fA-F]/Su', $this->peek()) === 0) {
return $this->consume(1);
}
$sUnicode = $this->consumeExpression('/^[0-9a-fA-F]{1,6}/u', 6);
if ($this->strlen($sUnicode) < 6) {
// Consume whitespace after incomplete unicode escape
if (preg_match('/\\s/isSu', $this->peek())) {
if ($this->comes('\r\n')) {
$this->consume(2);
} else {
$this->consume(1);
}
}
}
$iUnicode = intval($sUnicode, 16);
$sUtf32 = "";
for ($i = 0; $i < 4; ++$i) {
$sUtf32 .= chr($iUnicode & 0xff);
$iUnicode = $iUnicode >> 8;
}
return iconv('utf-32le', $this->sCharset, $sUtf32);
}
if ($bIsForIdentifier) {
$peek = ord($this->peek());
// Ranges: a-z A-Z 0-9 - _
if (
($peek >= 97 && $peek <= 122)
|| ($peek >= 65 && $peek <= 90)
|| ($peek >= 48 && $peek <= 57)
|| ($peek === 45)
|| ($peek === 95)
|| ($peek > 0xa1)
) {
return $this->consume(1);
}
} else {
return $this->consume(1);
}
return null;
}
/**
* @return array<int, Comment>|void
*
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*/
public function consumeWhiteSpace()
{
$comments = [];
do {
while (preg_match('/\\s/isSu', $this->peek()) === 1) {
$this->consume(1);
}
if ($this->oParserSettings->bLenientParsing) {
try {
$oComment = $this->consumeComment();
} catch (UnexpectedEOFException $e) {
$this->iCurrentPosition = $this->iLength;
return;
}
} else {
$oComment = $this->consumeComment();
}
if ($oComment !== false) {
$comments[] = $oComment;
}
} while ($oComment !== false);
return $comments;
}
/**
* @param string $sString
* @param bool $bCaseInsensitive
*
* @return bool
*/
public function comes($sString, $bCaseInsensitive = false)
{
$sPeek = $this->peek(strlen($sString));
return ($sPeek == '')
? false
: $this->streql($sPeek, $sString, $bCaseInsensitive);
}
/**
* @param int $iLength
* @param int $iOffset
*
* @return string
*/
public function peek($iLength = 1, $iOffset = 0)
{
$iOffset += $this->iCurrentPosition;
if ($iOffset >= $this->iLength) {
return '';
}
return $this->substr($iOffset, $iLength);
}
/**
* @param int $mValue
*
* @return string
*
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*/
public function consume($mValue = 1)
{
if (is_string($mValue)) {
$iLineCount = substr_count($mValue, "\n");
$iLength = $this->strlen($mValue);
if (!$this->streql($this->substr($this->iCurrentPosition, $iLength), $mValue)) {
throw new UnexpectedTokenException($mValue, $this->peek(max($iLength, 5)), $this->iLineNo);
}
$this->iLineNo += $iLineCount;
$this->iCurrentPosition += $this->strlen($mValue);
return $mValue;
} else {
if ($this->iCurrentPosition + $mValue > $this->iLength) {
throw new UnexpectedEOFException($mValue, $this->peek(5), 'count', $this->iLineNo);
}
$sResult = $this->substr($this->iCurrentPosition, $mValue);
$iLineCount = substr_count($sResult, "\n");
$this->iLineNo += $iLineCount;
$this->iCurrentPosition += $mValue;
return $sResult;
}
}
/**
* @param string $mExpression
* @param int|null $iMaxLength
*
* @return string
*
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*/
public function consumeExpression($mExpression, $iMaxLength = null)
{
$aMatches = null;
$sInput = $iMaxLength !== null ? $this->peek($iMaxLength) : $this->inputLeft();
if (preg_match($mExpression, $sInput, $aMatches, PREG_OFFSET_CAPTURE) === 1) {
return $this->consume($aMatches[0][0]);
}
throw new UnexpectedTokenException($mExpression, $this->peek(5), 'expression', $this->iLineNo);
}
/**
* @return Comment|false
*/
public function consumeComment()
{
$mComment = false;
if ($this->comes('/*')) {
$iLineNo = $this->iLineNo;
$this->consume(1);
$mComment = '';
while (($char = $this->consume(1)) !== '') {
$mComment .= $char;
if ($this->comes('*/')) {
$this->consume(2);
break;
}
}
}
if ($mComment !== false) {
// We skip the * which was included in the comment.
return new Comment(substr($mComment, 1), $iLineNo);
}
return $mComment;
}
/**
* @return bool
*/
public function isEnd()
{
return $this->iCurrentPosition >= $this->iLength;
}
/**
* @param array<array-key, string>|string $aEnd
* @param string $bIncludeEnd
* @param string $consumeEnd
* @param array<int, Comment> $comments
*
* @return string
*
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*/
public function consumeUntil($aEnd, $bIncludeEnd = false, $consumeEnd = false, array &$comments = [])
{
$aEnd = is_array($aEnd) ? $aEnd : [$aEnd];
$out = '';
$start = $this->iCurrentPosition;
while (!$this->isEnd()) {
$char = $this->consume(1);
if (in_array($char, $aEnd)) {
if ($bIncludeEnd) {
$out .= $char;
} elseif (!$consumeEnd) {
$this->iCurrentPosition -= $this->strlen($char);
}
return $out;
}
$out .= $char;
if ($comment = $this->consumeComment()) {
$comments[] = $comment;
}
}
if (in_array(self::EOF, $aEnd)) {
return $out;
}
$this->iCurrentPosition = $start;
throw new UnexpectedEOFException(
'One of ("' . implode('","', $aEnd) . '")',
$this->peek(5),
'search',
$this->iLineNo
);
}
/**
* @return string
*/
private function inputLeft()
{
return $this->substr($this->iCurrentPosition, -1);
}
/**
* @param string $sString1
* @param string $sString2
* @param bool $bCaseInsensitive
*
* @return bool
*/
public function streql($sString1, $sString2, $bCaseInsensitive = true)
{
if ($bCaseInsensitive) {
return $this->strtolower($sString1) === $this->strtolower($sString2);
} else {
return $sString1 === $sString2;
}
}
/**
* @param int $iAmount
*
* @return void
*/
public function backtrack($iAmount)
{
$this->iCurrentPosition -= $iAmount;
}
/**
* @param string $sString
*
* @return int
*/
public function strlen($sString)
{
if ($this->oParserSettings->bMultibyteSupport) {
return mb_strlen($sString, $this->sCharset);
} else {
return strlen($sString);
}
}
/**
* @param int $iStart
* @param int $iLength
*
* @return string
*/
private function substr($iStart, $iLength)
{
if ($iLength < 0) {
$iLength = $this->iLength - $iStart + $iLength;
}
if ($iStart + $iLength > $this->iLength) {
$iLength = $this->iLength - $iStart;
}
$sResult = '';
while ($iLength > 0) {
$sResult .= $this->aText[$iStart];
$iStart++;
$iLength--;
}
return $sResult;
}
/**
* @param string $sString
*
* @return string
*/
private function strtolower($sString)
{
if ($this->oParserSettings->bMultibyteSupport) {
return mb_strtolower($sString, $this->sCharset);
} else {
return strtolower($sString);
}
}
/**
* @param string $sString
*
* @return array<int, string>
*/
private function strsplit($sString)
{
if ($this->oParserSettings->bMultibyteSupport) {
if ($this->streql($this->sCharset, 'utf-8')) {
return preg_split('//u', $sString, -1, PREG_SPLIT_NO_EMPTY);
} else {
$iLength = mb_strlen($sString, $this->sCharset);
$aResult = [];
for ($i = 0; $i < $iLength; ++$i) {
$aResult[] = mb_substr($sString, $i, 1, $this->sCharset);
}
return $aResult;
}
} else {
if ($sString === '') {
return [];
} else {
return str_split($sString);
}
}
}
/**
* @param string $sString
* @param string $sNeedle
* @param int $iOffset
*
* @return int|false
*/
private function strpos($sString, $sNeedle, $iOffset)
{
if ($this->oParserSettings->bMultibyteSupport) {
return mb_strpos($sString, $sNeedle, $iOffset, $this->sCharset);
} else {
return strpos($sString, $sNeedle, $iOffset);
}
}
}
sabberworm/php-css-parser/src/Parsing/SourceException.php 0000644 00000001062 15153552363 0017607 0 ustar 00 <?php
namespace Sabberworm\CSS\Parsing;
class SourceException extends \Exception
{
/**
* @var int
*/
private $iLineNo;
/**
* @param string $sMessage
* @param int $iLineNo
*/
public function __construct($sMessage, $iLineNo = 0)
{
$this->iLineNo = $iLineNo;
if (!empty($iLineNo)) {
$sMessage .= " [line no: $iLineNo]";
}
parent::__construct($sMessage);
}
/**
* @return int
*/
public function getLineNo()
{
return $this->iLineNo;
}
}
sabberworm/php-css-parser/src/Parsing/UnexpectedEOFException.php 0000644 00000000421 15153552363 0021003 0 ustar 00 <?php
namespace Sabberworm\CSS\Parsing;
/**
* Thrown if the CSS parser encounters end of file it did not expect.
*
* Extends `UnexpectedTokenException` in order to preserve backwards compatibility.
*/
class UnexpectedEOFException extends UnexpectedTokenException
{
}
sabberworm/php-css-parser/src/Parsing/UnexpectedTokenException.php 0000644 00000002704 15153552363 0021460 0 ustar 00 <?php
namespace Sabberworm\CSS\Parsing;
/**
* Thrown if the CSS parser encounters a token it did not expect.
*/
class UnexpectedTokenException extends SourceException
{
/**
* @var string
*/
private $sExpected;
/**
* @var string
*/
private $sFound;
/**
* Possible values: literal, identifier, count, expression, search
*
* @var string
*/
private $sMatchType;
/**
* @param string $sExpected
* @param string $sFound
* @param string $sMatchType
* @param int $iLineNo
*/
public function __construct($sExpected, $sFound, $sMatchType = 'literal', $iLineNo = 0)
{
$this->sExpected = $sExpected;
$this->sFound = $sFound;
$this->sMatchType = $sMatchType;
$sMessage = "Token “{$sExpected}” ({$sMatchType}) not found. Got “{$sFound}”.";
if ($this->sMatchType === 'search') {
$sMessage = "Search for “{$sExpected}” returned no results. Context: “{$sFound}”.";
} elseif ($this->sMatchType === 'count') {
$sMessage = "Next token was expected to have {$sExpected} chars. Context: “{$sFound}”.";
} elseif ($this->sMatchType === 'identifier') {
$sMessage = "Identifier expected. Got “{$sFound}”";
} elseif ($this->sMatchType === 'custom') {
$sMessage = trim("$sExpected $sFound");
}
parent::__construct($sMessage, $iLineNo);
}
}
sabberworm/php-css-parser/src/Property/AtRule.php 0000644 00000001441 15153552363 0016106 0 ustar 00 <?php
namespace Sabberworm\CSS\Property;
use Sabberworm\CSS\Comment\Commentable;
use Sabberworm\CSS\Renderable;
interface AtRule extends Renderable, Commentable
{
/**
* Since there are more set rules than block rules,
* we’re whitelisting the block rules and have anything else be treated as a set rule.
*
* @var string
*/
const BLOCK_RULES = 'media/document/supports/region-style/font-feature-values';
/**
* … and more font-specific ones (to be used inside font-feature-values)
*
* @var string
*/
const SET_RULES = 'font-face/counter-style/page/swash/styleset/annotation';
/**
* @return string|null
*/
public function atRuleName();
/**
* @return string|null
*/
public function atRuleArgs();
}
sabberworm/php-css-parser/src/Property/CSSNamespace.php 0000644 00000005247 15153552363 0017167 0 ustar 00 <?php
namespace Sabberworm\CSS\Property;
use Sabberworm\CSS\Comment\Comment;
use Sabberworm\CSS\OutputFormat;
/**
* `CSSNamespace` represents an `@namespace` rule.
*/
class CSSNamespace implements AtRule
{
/**
* @var string
*/
private $mUrl;
/**
* @var string
*/
private $sPrefix;
/**
* @var int
*/
private $iLineNo;
/**
* @var array<array-key, Comment>
*/
protected $aComments;
/**
* @param string $mUrl
* @param string|null $sPrefix
* @param int $iLineNo
*/
public function __construct($mUrl, $sPrefix = null, $iLineNo = 0)
{
$this->mUrl = $mUrl;
$this->sPrefix = $sPrefix;
$this->iLineNo = $iLineNo;
$this->aComments = [];
}
/**
* @return int
*/
public function getLineNo()
{
return $this->iLineNo;
}
/**
* @return string
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
return '@namespace ' . ($this->sPrefix === null ? '' : $this->sPrefix . ' ')
. $this->mUrl->render($oOutputFormat) . ';';
}
/**
* @return string
*/
public function getUrl()
{
return $this->mUrl;
}
/**
* @return string|null
*/
public function getPrefix()
{
return $this->sPrefix;
}
/**
* @param string $mUrl
*
* @return void
*/
public function setUrl($mUrl)
{
$this->mUrl = $mUrl;
}
/**
* @param string $sPrefix
*
* @return void
*/
public function setPrefix($sPrefix)
{
$this->sPrefix = $sPrefix;
}
/**
* @return string
*/
public function atRuleName()
{
return 'namespace';
}
/**
* @return array<int, string>
*/
public function atRuleArgs()
{
$aResult = [$this->mUrl];
if ($this->sPrefix) {
array_unshift($aResult, $this->sPrefix);
}
return $aResult;
}
/**
* @param array<array-key, Comment> $aComments
*
* @return void
*/
public function addComments(array $aComments)
{
$this->aComments = array_merge($this->aComments, $aComments);
}
/**
* @return array<array-key, Comment>
*/
public function getComments()
{
return $this->aComments;
}
/**
* @param array<array-key, Comment> $aComments
*
* @return void
*/
public function setComments(array $aComments)
{
$this->aComments = $aComments;
}
}
sabberworm/php-css-parser/src/Property/Charset.php 0000644 00000004440 15153552363 0016305 0 ustar 00 <?php
namespace Sabberworm\CSS\Property;
use Sabberworm\CSS\Comment\Comment;
use Sabberworm\CSS\OutputFormat;
/**
* Class representing an `@charset` rule.
*
* The following restrictions apply:
* - May not be found in any CSSList other than the Document.
* - May only appear at the very top of a Document’s contents.
* - Must not appear more than once.
*/
class Charset implements AtRule
{
/**
* @var string
*/
private $sCharset;
/**
* @var int
*/
protected $iLineNo;
/**
* @var array<array-key, Comment>
*/
protected $aComments;
/**
* @param string $sCharset
* @param int $iLineNo
*/
public function __construct($sCharset, $iLineNo = 0)
{
$this->sCharset = $sCharset;
$this->iLineNo = $iLineNo;
$this->aComments = [];
}
/**
* @return int
*/
public function getLineNo()
{
return $this->iLineNo;
}
/**
* @param string $sCharset
*
* @return void
*/
public function setCharset($sCharset)
{
$this->sCharset = $sCharset;
}
/**
* @return string
*/
public function getCharset()
{
return $this->sCharset;
}
/**
* @return string
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
return "@charset {$this->sCharset->render($oOutputFormat)};";
}
/**
* @return string
*/
public function atRuleName()
{
return 'charset';
}
/**
* @return string
*/
public function atRuleArgs()
{
return $this->sCharset;
}
/**
* @param array<array-key, Comment> $aComments
*
* @return void
*/
public function addComments(array $aComments)
{
$this->aComments = array_merge($this->aComments, $aComments);
}
/**
* @return array<array-key, Comment>
*/
public function getComments()
{
return $this->aComments;
}
/**
* @param array<array-key, Comment> $aComments
*
* @return void
*/
public function setComments(array $aComments)
{
$this->aComments = $aComments;
}
}
sabberworm/php-css-parser/src/Property/Import.php 0000644 00000004760 15153552363 0016173 0 ustar 00 <?php
namespace Sabberworm\CSS\Property;
use Sabberworm\CSS\Comment\Comment;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Value\URL;
/**
* Class representing an `@import` rule.
*/
class Import implements AtRule
{
/**
* @var URL
*/
private $oLocation;
/**
* @var string
*/
private $sMediaQuery;
/**
* @var int
*/
protected $iLineNo;
/**
* @var array<array-key, Comment>
*/
protected $aComments;
/**
* @param URL $oLocation
* @param string $sMediaQuery
* @param int $iLineNo
*/
public function __construct(URL $oLocation, $sMediaQuery, $iLineNo = 0)
{
$this->oLocation = $oLocation;
$this->sMediaQuery = $sMediaQuery;
$this->iLineNo = $iLineNo;
$this->aComments = [];
}
/**
* @return int
*/
public function getLineNo()
{
return $this->iLineNo;
}
/**
* @param URL $oLocation
*
* @return void
*/
public function setLocation($oLocation)
{
$this->oLocation = $oLocation;
}
/**
* @return URL
*/
public function getLocation()
{
return $this->oLocation;
}
/**
* @return string
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
return "@import " . $this->oLocation->render($oOutputFormat)
. ($this->sMediaQuery === null ? '' : ' ' . $this->sMediaQuery) . ';';
}
/**
* @return string
*/
public function atRuleName()
{
return 'import';
}
/**
* @return array<int, URL|string>
*/
public function atRuleArgs()
{
$aResult = [$this->oLocation];
if ($this->sMediaQuery) {
array_push($aResult, $this->sMediaQuery);
}
return $aResult;
}
/**
* @param array<array-key, Comment> $aComments
*
* @return void
*/
public function addComments(array $aComments)
{
$this->aComments = array_merge($this->aComments, $aComments);
}
/**
* @return array<array-key, Comment>
*/
public function getComments()
{
return $this->aComments;
}
/**
* @param array<array-key, Comment> $aComments
*
* @return void
*/
public function setComments(array $aComments)
{
$this->aComments = $aComments;
}
}
sabberworm/php-css-parser/src/Property/KeyframeSelector.php 0000644 00000001271 15153552363 0020157 0 ustar 00 <?php
namespace Sabberworm\CSS\Property;
class KeyframeSelector extends Selector
{
/**
* regexp for specificity calculations
*
* @var string
*/
const SELECTOR_VALIDATION_RX = '/
^(
(?:
[a-zA-Z0-9\x{00A0}-\x{FFFF}_^$|*="\'~\[\]()\-\s\.:#+>]* # any sequence of valid unescaped characters
(?:\\\\.)? # a single escaped character
(?:([\'"]).*?(?<!\\\\)\2)? # a quoted text like [id="example"]
)*
)|
(\d+%) # keyframe animation progress percentage (e.g. 50%)
$
/ux';
}
sabberworm/php-css-parser/src/Property/Selector.php 0000644 00000006553 15153552363 0016503 0 ustar 00 <?php
namespace Sabberworm\CSS\Property;
/**
* Class representing a single CSS selector. Selectors have to be split by the comma prior to being passed into this
* class.
*/
class Selector
{
/**
* regexp for specificity calculations
*
* @var string
*/
const NON_ID_ATTRIBUTES_AND_PSEUDO_CLASSES_RX = '/
(\.[\w]+) # classes
|
\[(\w+) # attributes
|
(\:( # pseudo classes
link|visited|active
|hover|focus
|lang
|target
|enabled|disabled|checked|indeterminate
|root
|nth-child|nth-last-child|nth-of-type|nth-last-of-type
|first-child|last-child|first-of-type|last-of-type
|only-child|only-of-type
|empty|contains
))
/ix';
/**
* regexp for specificity calculations
*
* @var string
*/
const ELEMENTS_AND_PSEUDO_ELEMENTS_RX = '/
((^|[\s\+\>\~]+)[\w]+ # elements
|
\:{1,2}( # pseudo-elements
after|before|first-letter|first-line|selection
))
/ix';
/**
* regexp for specificity calculations
*
* @var string
*/
const SELECTOR_VALIDATION_RX = '/
^(
(?:
[a-zA-Z0-9\x{00A0}-\x{FFFF}_^$|*="\'~\[\]()\-\s\.:#+>]* # any sequence of valid unescaped characters
(?:\\\\.)? # a single escaped character
(?:([\'"]).*?(?<!\\\\)\2)? # a quoted text like [id="example"]
)*
)$
/ux';
/**
* @var string
*/
private $sSelector;
/**
* @var int|null
*/
private $iSpecificity;
/**
* @param string $sSelector
*
* @return bool
*/
public static function isValid($sSelector)
{
return preg_match(static::SELECTOR_VALIDATION_RX, $sSelector);
}
/**
* @param string $sSelector
* @param bool $bCalculateSpecificity
*/
public function __construct($sSelector, $bCalculateSpecificity = false)
{
$this->setSelector($sSelector);
if ($bCalculateSpecificity) {
$this->getSpecificity();
}
}
/**
* @return string
*/
public function getSelector()
{
return $this->sSelector;
}
/**
* @param string $sSelector
*
* @return void
*/
public function setSelector($sSelector)
{
$this->sSelector = trim($sSelector);
$this->iSpecificity = null;
}
/**
* @return string
*/
public function __toString()
{
return $this->getSelector();
}
/**
* @return int
*/
public function getSpecificity()
{
if ($this->iSpecificity === null) {
$a = 0;
/// @todo should exclude \# as well as "#"
$aMatches = null;
$b = substr_count($this->sSelector, '#');
$c = preg_match_all(self::NON_ID_ATTRIBUTES_AND_PSEUDO_CLASSES_RX, $this->sSelector, $aMatches);
$d = preg_match_all(self::ELEMENTS_AND_PSEUDO_ELEMENTS_RX, $this->sSelector, $aMatches);
$this->iSpecificity = ($a * 1000) + ($b * 100) + ($c * 10) + $d;
}
return $this->iSpecificity;
}
}
sabberworm/php-css-parser/src/Renderable.php 0000644 00000000450 15153552363 0015130 0 ustar 00 <?php
namespace Sabberworm\CSS;
interface Renderable
{
/**
* @return string
*/
public function __toString();
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat);
/**
* @return int
*/
public function getLineNo();
}
sabberworm/php-css-parser/src/Rule/Rule.php 0000644 00000023660 15153552363 0014713 0 ustar 00 <?php
namespace Sabberworm\CSS\Rule;
use Sabberworm\CSS\Comment\Comment;
use Sabberworm\CSS\Comment\Commentable;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Parsing\ParserState;
use Sabberworm\CSS\Parsing\UnexpectedEOFException;
use Sabberworm\CSS\Parsing\UnexpectedTokenException;
use Sabberworm\CSS\Renderable;
use Sabberworm\CSS\Value\RuleValueList;
use Sabberworm\CSS\Value\Value;
/**
* RuleSets contains Rule objects which always have a key and a value.
* In CSS, Rules are expressed as follows: “key: value[0][0] value[0][1], value[1][0] value[1][1];”
*/
class Rule implements Renderable, Commentable
{
/**
* @var string
*/
private $sRule;
/**
* @var RuleValueList|null
*/
private $mValue;
/**
* @var bool
*/
private $bIsImportant;
/**
* @var array<int, int>
*/
private $aIeHack;
/**
* @var int
*/
protected $iLineNo;
/**
* @var int
*/
protected $iColNo;
/**
* @var array<array-key, Comment>
*/
protected $aComments;
/**
* @param string $sRule
* @param int $iLineNo
* @param int $iColNo
*/
public function __construct($sRule, $iLineNo = 0, $iColNo = 0)
{
$this->sRule = $sRule;
$this->mValue = null;
$this->bIsImportant = false;
$this->aIeHack = [];
$this->iLineNo = $iLineNo;
$this->iColNo = $iColNo;
$this->aComments = [];
}
/**
* @return Rule
*
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*/
public static function parse(ParserState $oParserState)
{
$aComments = $oParserState->consumeWhiteSpace();
$oRule = new Rule(
$oParserState->parseIdentifier(!$oParserState->comes("--")),
$oParserState->currentLine(),
$oParserState->currentColumn()
);
$oRule->setComments($aComments);
$oRule->addComments($oParserState->consumeWhiteSpace());
$oParserState->consume(':');
$oValue = Value::parseValue($oParserState, self::listDelimiterForRule($oRule->getRule()));
$oRule->setValue($oValue);
if ($oParserState->getSettings()->bLenientParsing) {
while ($oParserState->comes('\\')) {
$oParserState->consume('\\');
$oRule->addIeHack($oParserState->consume());
$oParserState->consumeWhiteSpace();
}
}
$oParserState->consumeWhiteSpace();
if ($oParserState->comes('!')) {
$oParserState->consume('!');
$oParserState->consumeWhiteSpace();
$oParserState->consume('important');
$oRule->setIsImportant(true);
}
$oParserState->consumeWhiteSpace();
while ($oParserState->comes(';')) {
$oParserState->consume(';');
}
$oParserState->consumeWhiteSpace();
return $oRule;
}
/**
* @param string $sRule
*
* @return array<int, string>
*/
private static function listDelimiterForRule($sRule)
{
if (preg_match('/^font($|-)/', $sRule)) {
return [',', '/', ' '];
}
return [',', ' ', '/'];
}
/**
* @return int
*/
public function getLineNo()
{
return $this->iLineNo;
}
/**
* @return int
*/
public function getColNo()
{
return $this->iColNo;
}
/**
* @param int $iLine
* @param int $iColumn
*
* @return void
*/
public function setPosition($iLine, $iColumn)
{
$this->iColNo = $iColumn;
$this->iLineNo = $iLine;
}
/**
* @param string $sRule
*
* @return void
*/
public function setRule($sRule)
{
$this->sRule = $sRule;
}
/**
* @return string
*/
public function getRule()
{
return $this->sRule;
}
/**
* @return RuleValueList|null
*/
public function getValue()
{
return $this->mValue;
}
/**
* @param RuleValueList|null $mValue
*
* @return void
*/
public function setValue($mValue)
{
$this->mValue = $mValue;
}
/**
* @param array<array-key, array<array-key, RuleValueList>> $aSpaceSeparatedValues
*
* @return RuleValueList
*
* @deprecated will be removed in version 9.0
* Old-Style 2-dimensional array given. Retained for (some) backwards-compatibility.
* Use `setValue()` instead and wrap the value inside a RuleValueList if necessary.
*/
public function setValues(array $aSpaceSeparatedValues)
{
$oSpaceSeparatedList = null;
if (count($aSpaceSeparatedValues) > 1) {
$oSpaceSeparatedList = new RuleValueList(' ', $this->iLineNo);
}
foreach ($aSpaceSeparatedValues as $aCommaSeparatedValues) {
$oCommaSeparatedList = null;
if (count($aCommaSeparatedValues) > 1) {
$oCommaSeparatedList = new RuleValueList(',', $this->iLineNo);
}
foreach ($aCommaSeparatedValues as $mValue) {
if (!$oSpaceSeparatedList && !$oCommaSeparatedList) {
$this->mValue = $mValue;
return $mValue;
}
if ($oCommaSeparatedList) {
$oCommaSeparatedList->addListComponent($mValue);
} else {
$oSpaceSeparatedList->addListComponent($mValue);
}
}
if (!$oSpaceSeparatedList) {
$this->mValue = $oCommaSeparatedList;
return $oCommaSeparatedList;
} else {
$oSpaceSeparatedList->addListComponent($oCommaSeparatedList);
}
}
$this->mValue = $oSpaceSeparatedList;
return $oSpaceSeparatedList;
}
/**
* @return array<int, array<int, RuleValueList>>
*
* @deprecated will be removed in version 9.0
* Old-Style 2-dimensional array returned. Retained for (some) backwards-compatibility.
* Use `getValue()` instead and check for the existence of a (nested set of) ValueList object(s).
*/
public function getValues()
{
if (!$this->mValue instanceof RuleValueList) {
return [[$this->mValue]];
}
if ($this->mValue->getListSeparator() === ',') {
return [$this->mValue->getListComponents()];
}
$aResult = [];
foreach ($this->mValue->getListComponents() as $mValue) {
if (!$mValue instanceof RuleValueList || $mValue->getListSeparator() !== ',') {
$aResult[] = [$mValue];
continue;
}
if ($this->mValue->getListSeparator() === ' ' || count($aResult) === 0) {
$aResult[] = [];
}
foreach ($mValue->getListComponents() as $mValue) {
$aResult[count($aResult) - 1][] = $mValue;
}
}
return $aResult;
}
/**
* Adds a value to the existing value. Value will be appended if a `RuleValueList` exists of the given type.
* Otherwise, the existing value will be wrapped by one.
*
* @param RuleValueList|array<int, RuleValueList> $mValue
* @param string $sType
*
* @return void
*/
public function addValue($mValue, $sType = ' ')
{
if (!is_array($mValue)) {
$mValue = [$mValue];
}
if (!$this->mValue instanceof RuleValueList || $this->mValue->getListSeparator() !== $sType) {
$mCurrentValue = $this->mValue;
$this->mValue = new RuleValueList($sType, $this->iLineNo);
if ($mCurrentValue) {
$this->mValue->addListComponent($mCurrentValue);
}
}
foreach ($mValue as $mValueItem) {
$this->mValue->addListComponent($mValueItem);
}
}
/**
* @param int $iModifier
*
* @return void
*/
public function addIeHack($iModifier)
{
$this->aIeHack[] = $iModifier;
}
/**
* @param array<int, int> $aModifiers
*
* @return void
*/
public function setIeHack(array $aModifiers)
{
$this->aIeHack = $aModifiers;
}
/**
* @return array<int, int>
*/
public function getIeHack()
{
return $this->aIeHack;
}
/**
* @param bool $bIsImportant
*
* @return void
*/
public function setIsImportant($bIsImportant)
{
$this->bIsImportant = $bIsImportant;
}
/**
* @return bool
*/
public function getIsImportant()
{
return $this->bIsImportant;
}
/**
* @return string
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
$sResult = "{$this->sRule}:{$oOutputFormat->spaceAfterRuleName()}";
if ($this->mValue instanceof Value) { //Can also be a ValueList
$sResult .= $this->mValue->render($oOutputFormat);
} else {
$sResult .= $this->mValue;
}
if (!empty($this->aIeHack)) {
$sResult .= ' \\' . implode('\\', $this->aIeHack);
}
if ($this->bIsImportant) {
$sResult .= ' !important';
}
$sResult .= ';';
return $sResult;
}
/**
* @param array<array-key, Comment> $aComments
*
* @return void
*/
public function addComments(array $aComments)
{
$this->aComments = array_merge($this->aComments, $aComments);
}
/**
* @return array<array-key, Comment>
*/
public function getComments()
{
return $this->aComments;
}
/**
* @param array<array-key, Comment> $aComments
*
* @return void
*/
public function setComments(array $aComments)
{
$this->aComments = $aComments;
}
}
sabberworm/php-css-parser/src/RuleSet/AtRuleSet.php 0000644 00000002620 15153552363 0016321 0 ustar 00 <?php
namespace Sabberworm\CSS\RuleSet;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Property\AtRule;
/**
* A RuleSet constructed by an unknown at-rule. `@font-face` rules are rendered into AtRuleSet objects.
*/
class AtRuleSet extends RuleSet implements AtRule
{
/**
* @var string
*/
private $sType;
/**
* @var string
*/
private $sArgs;
/**
* @param string $sType
* @param string $sArgs
* @param int $iLineNo
*/
public function __construct($sType, $sArgs = '', $iLineNo = 0)
{
parent::__construct($iLineNo);
$this->sType = $sType;
$this->sArgs = $sArgs;
}
/**
* @return string
*/
public function atRuleName()
{
return $this->sType;
}
/**
* @return string
*/
public function atRuleArgs()
{
return $this->sArgs;
}
/**
* @return string
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
$sArgs = $this->sArgs;
if ($sArgs) {
$sArgs = ' ' . $sArgs;
}
$sResult = "@{$this->sType}$sArgs{$oOutputFormat->spaceBeforeOpeningBrace()}{";
$sResult .= parent::render($oOutputFormat);
$sResult .= '}';
return $sResult;
}
}
sabberworm/php-css-parser/src/RuleSet/DeclarationBlock.php 0000644 00000071606 15153552363 0017663 0 ustar 00 <?php
namespace Sabberworm\CSS\RuleSet;
use Sabberworm\CSS\CSSList\CSSList;
use Sabberworm\CSS\CSSList\KeyFrame;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Parsing\OutputException;
use Sabberworm\CSS\Parsing\ParserState;
use Sabberworm\CSS\Parsing\UnexpectedEOFException;
use Sabberworm\CSS\Parsing\UnexpectedTokenException;
use Sabberworm\CSS\Property\KeyframeSelector;
use Sabberworm\CSS\Property\Selector;
use Sabberworm\CSS\Rule\Rule;
use Sabberworm\CSS\Value\Color;
use Sabberworm\CSS\Value\RuleValueList;
use Sabberworm\CSS\Value\Size;
use Sabberworm\CSS\Value\URL;
use Sabberworm\CSS\Value\Value;
/**
* Declaration blocks are the parts of a CSS file which denote the rules belonging to a selector.
*
* Declaration blocks usually appear directly inside a `Document` or another `CSSList` (mostly a `MediaQuery`).
*/
class DeclarationBlock extends RuleSet
{
/**
* @var array<int, Selector|string>
*/
private $aSelectors;
/**
* @param int $iLineNo
*/
public function __construct($iLineNo = 0)
{
parent::__construct($iLineNo);
$this->aSelectors = [];
}
/**
* @param CSSList|null $oList
*
* @return DeclarationBlock|false
*
* @throws UnexpectedTokenException
* @throws UnexpectedEOFException
*/
public static function parse(ParserState $oParserState, $oList = null)
{
$aComments = [];
$oResult = new DeclarationBlock($oParserState->currentLine());
try {
$aSelectorParts = [];
$sStringWrapperChar = false;
do {
$aSelectorParts[] = $oParserState->consume(1)
. $oParserState->consumeUntil(['{', '}', '\'', '"'], false, false, $aComments);
if (in_array($oParserState->peek(), ['\'', '"']) && substr(end($aSelectorParts), -1) != "\\") {
if ($sStringWrapperChar === false) {
$sStringWrapperChar = $oParserState->peek();
} elseif ($sStringWrapperChar == $oParserState->peek()) {
$sStringWrapperChar = false;
}
}
} while (!in_array($oParserState->peek(), ['{', '}']) || $sStringWrapperChar !== false);
$oResult->setSelectors(implode('', $aSelectorParts), $oList);
if ($oParserState->comes('{')) {
$oParserState->consume(1);
}
} catch (UnexpectedTokenException $e) {
if ($oParserState->getSettings()->bLenientParsing) {
if (!$oParserState->comes('}')) {
$oParserState->consumeUntil('}', false, true);
}
return false;
} else {
throw $e;
}
}
$oResult->setComments($aComments);
RuleSet::parseRuleSet($oParserState, $oResult);
return $oResult;
}
/**
* @param array<int, Selector|string>|string $mSelector
* @param CSSList|null $oList
*
* @throws UnexpectedTokenException
*/
public function setSelectors($mSelector, $oList = null)
{
if (is_array($mSelector)) {
$this->aSelectors = $mSelector;
} else {
$this->aSelectors = explode(',', $mSelector);
}
foreach ($this->aSelectors as $iKey => $mSelector) {
if (!($mSelector instanceof Selector)) {
if ($oList === null || !($oList instanceof KeyFrame)) {
if (!Selector::isValid($mSelector)) {
throw new UnexpectedTokenException(
"Selector did not match '" . Selector::SELECTOR_VALIDATION_RX . "'.",
$mSelector,
"custom"
);
}
$this->aSelectors[$iKey] = new Selector($mSelector);
} else {
if (!KeyframeSelector::isValid($mSelector)) {
throw new UnexpectedTokenException(
"Selector did not match '" . KeyframeSelector::SELECTOR_VALIDATION_RX . "'.",
$mSelector,
"custom"
);
}
$this->aSelectors[$iKey] = new KeyframeSelector($mSelector);
}
}
}
}
/**
* Remove one of the selectors of the block.
*
* @param Selector|string $mSelector
*
* @return bool
*/
public function removeSelector($mSelector)
{
if ($mSelector instanceof Selector) {
$mSelector = $mSelector->getSelector();
}
foreach ($this->aSelectors as $iKey => $oSelector) {
if ($oSelector->getSelector() === $mSelector) {
unset($this->aSelectors[$iKey]);
return true;
}
}
return false;
}
/**
* @return array<int, Selector|string>
*
* @deprecated will be removed in version 9.0; use `getSelectors()` instead
*/
public function getSelector()
{
return $this->getSelectors();
}
/**
* @param Selector|string $mSelector
* @param CSSList|null $oList
*
* @return void
*
* @deprecated will be removed in version 9.0; use `setSelectors()` instead
*/
public function setSelector($mSelector, $oList = null)
{
$this->setSelectors($mSelector, $oList);
}
/**
* @return array<int, Selector|string>
*/
public function getSelectors()
{
return $this->aSelectors;
}
/**
* Splits shorthand declarations (e.g. `margin` or `font`) into their constituent parts.
*
* @return void
*/
public function expandShorthands()
{
// border must be expanded before dimensions
$this->expandBorderShorthand();
$this->expandDimensionsShorthand();
$this->expandFontShorthand();
$this->expandBackgroundShorthand();
$this->expandListStyleShorthand();
}
/**
* Creates shorthand declarations (e.g. `margin` or `font`) whenever possible.
*
* @return void
*/
public function createShorthands()
{
$this->createBackgroundShorthand();
$this->createDimensionsShorthand();
// border must be shortened after dimensions
$this->createBorderShorthand();
$this->createFontShorthand();
$this->createListStyleShorthand();
}
/**
* Splits shorthand border declarations (e.g. `border: 1px red;`).
*
* Additional splitting happens in expandDimensionsShorthand.
*
* Multiple borders are not yet supported as of 3.
*
* @return void
*/
public function expandBorderShorthand()
{
$aBorderRules = [
'border',
'border-left',
'border-right',
'border-top',
'border-bottom',
];
$aBorderSizes = [
'thin',
'medium',
'thick',
];
$aRules = $this->getRulesAssoc();
foreach ($aBorderRules as $sBorderRule) {
if (!isset($aRules[$sBorderRule])) {
continue;
}
$oRule = $aRules[$sBorderRule];
$mRuleValue = $oRule->getValue();
$aValues = [];
if (!$mRuleValue instanceof RuleValueList) {
$aValues[] = $mRuleValue;
} else {
$aValues = $mRuleValue->getListComponents();
}
foreach ($aValues as $mValue) {
if ($mValue instanceof Value) {
$mNewValue = clone $mValue;
} else {
$mNewValue = $mValue;
}
if ($mValue instanceof Size) {
$sNewRuleName = $sBorderRule . "-width";
} elseif ($mValue instanceof Color) {
$sNewRuleName = $sBorderRule . "-color";
} else {
if (in_array($mValue, $aBorderSizes)) {
$sNewRuleName = $sBorderRule . "-width";
} else {
$sNewRuleName = $sBorderRule . "-style";
}
}
$oNewRule = new Rule($sNewRuleName, $oRule->getLineNo(), $oRule->getColNo());
$oNewRule->setIsImportant($oRule->getIsImportant());
$oNewRule->addValue([$mNewValue]);
$this->addRule($oNewRule);
}
$this->removeRule($sBorderRule);
}
}
/**
* Splits shorthand dimensional declarations (e.g. `margin: 0px auto;`)
* into their constituent parts.
*
* Handles `margin`, `padding`, `border-color`, `border-style` and `border-width`.
*
* @return void
*/
public function expandDimensionsShorthand()
{
$aExpansions = [
'margin' => 'margin-%s',
'padding' => 'padding-%s',
'border-color' => 'border-%s-color',
'border-style' => 'border-%s-style',
'border-width' => 'border-%s-width',
];
$aRules = $this->getRulesAssoc();
foreach ($aExpansions as $sProperty => $sExpanded) {
if (!isset($aRules[$sProperty])) {
continue;
}
$oRule = $aRules[$sProperty];
$mRuleValue = $oRule->getValue();
$aValues = [];
if (!$mRuleValue instanceof RuleValueList) {
$aValues[] = $mRuleValue;
} else {
$aValues = $mRuleValue->getListComponents();
}
$top = $right = $bottom = $left = null;
switch (count($aValues)) {
case 1:
$top = $right = $bottom = $left = $aValues[0];
break;
case 2:
$top = $bottom = $aValues[0];
$left = $right = $aValues[1];
break;
case 3:
$top = $aValues[0];
$left = $right = $aValues[1];
$bottom = $aValues[2];
break;
case 4:
$top = $aValues[0];
$right = $aValues[1];
$bottom = $aValues[2];
$left = $aValues[3];
break;
}
foreach (['top', 'right', 'bottom', 'left'] as $sPosition) {
$oNewRule = new Rule(sprintf($sExpanded, $sPosition), $oRule->getLineNo(), $oRule->getColNo());
$oNewRule->setIsImportant($oRule->getIsImportant());
$oNewRule->addValue(${$sPosition});
$this->addRule($oNewRule);
}
$this->removeRule($sProperty);
}
}
/**
* Converts shorthand font declarations
* (e.g. `font: 300 italic 11px/14px verdana, helvetica, sans-serif;`)
* into their constituent parts.
*
* @return void
*/
public function expandFontShorthand()
{
$aRules = $this->getRulesAssoc();
if (!isset($aRules['font'])) {
return;
}
$oRule = $aRules['font'];
// reset properties to 'normal' per http://www.w3.org/TR/21/fonts.html#font-shorthand
$aFontProperties = [
'font-style' => 'normal',
'font-variant' => 'normal',
'font-weight' => 'normal',
'font-size' => 'normal',
'line-height' => 'normal',
];
$mRuleValue = $oRule->getValue();
$aValues = [];
if (!$mRuleValue instanceof RuleValueList) {
$aValues[] = $mRuleValue;
} else {
$aValues = $mRuleValue->getListComponents();
}
foreach ($aValues as $mValue) {
if (!$mValue instanceof Value) {
$mValue = mb_strtolower($mValue);
}
if (in_array($mValue, ['normal', 'inherit'])) {
foreach (['font-style', 'font-weight', 'font-variant'] as $sProperty) {
if (!isset($aFontProperties[$sProperty])) {
$aFontProperties[$sProperty] = $mValue;
}
}
} elseif (in_array($mValue, ['italic', 'oblique'])) {
$aFontProperties['font-style'] = $mValue;
} elseif ($mValue == 'small-caps') {
$aFontProperties['font-variant'] = $mValue;
} elseif (
in_array($mValue, ['bold', 'bolder', 'lighter'])
|| ($mValue instanceof Size
&& in_array($mValue->getSize(), range(100, 900, 100)))
) {
$aFontProperties['font-weight'] = $mValue;
} elseif ($mValue instanceof RuleValueList && $mValue->getListSeparator() == '/') {
list($oSize, $oHeight) = $mValue->getListComponents();
$aFontProperties['font-size'] = $oSize;
$aFontProperties['line-height'] = $oHeight;
} elseif ($mValue instanceof Size && $mValue->getUnit() !== null) {
$aFontProperties['font-size'] = $mValue;
} else {
$aFontProperties['font-family'] = $mValue;
}
}
foreach ($aFontProperties as $sProperty => $mValue) {
$oNewRule = new Rule($sProperty, $oRule->getLineNo(), $oRule->getColNo());
$oNewRule->addValue($mValue);
$oNewRule->setIsImportant($oRule->getIsImportant());
$this->addRule($oNewRule);
}
$this->removeRule('font');
}
/**
* Converts shorthand background declarations
* (e.g. `background: url("chess.png") gray 50% repeat fixed;`)
* into their constituent parts.
*
* @see http://www.w3.org/TR/21/colors.html#propdef-background
*
* @return void
*/
public function expandBackgroundShorthand()
{
$aRules = $this->getRulesAssoc();
if (!isset($aRules['background'])) {
return;
}
$oRule = $aRules['background'];
$aBgProperties = [
'background-color' => ['transparent'],
'background-image' => ['none'],
'background-repeat' => ['repeat'],
'background-attachment' => ['scroll'],
'background-position' => [
new Size(0, '%', null, false, $this->iLineNo),
new Size(0, '%', null, false, $this->iLineNo),
],
];
$mRuleValue = $oRule->getValue();
$aValues = [];
if (!$mRuleValue instanceof RuleValueList) {
$aValues[] = $mRuleValue;
} else {
$aValues = $mRuleValue->getListComponents();
}
if (count($aValues) == 1 && $aValues[0] == 'inherit') {
foreach ($aBgProperties as $sProperty => $mValue) {
$oNewRule = new Rule($sProperty, $oRule->getLineNo(), $oRule->getColNo());
$oNewRule->addValue('inherit');
$oNewRule->setIsImportant($oRule->getIsImportant());
$this->addRule($oNewRule);
}
$this->removeRule('background');
return;
}
$iNumBgPos = 0;
foreach ($aValues as $mValue) {
if (!$mValue instanceof Value) {
$mValue = mb_strtolower($mValue);
}
if ($mValue instanceof URL) {
$aBgProperties['background-image'] = $mValue;
} elseif ($mValue instanceof Color) {
$aBgProperties['background-color'] = $mValue;
} elseif (in_array($mValue, ['scroll', 'fixed'])) {
$aBgProperties['background-attachment'] = $mValue;
} elseif (in_array($mValue, ['repeat', 'no-repeat', 'repeat-x', 'repeat-y'])) {
$aBgProperties['background-repeat'] = $mValue;
} elseif (
in_array($mValue, ['left', 'center', 'right', 'top', 'bottom'])
|| $mValue instanceof Size
) {
if ($iNumBgPos == 0) {
$aBgProperties['background-position'][0] = $mValue;
$aBgProperties['background-position'][1] = 'center';
} else {
$aBgProperties['background-position'][$iNumBgPos] = $mValue;
}
$iNumBgPos++;
}
}
foreach ($aBgProperties as $sProperty => $mValue) {
$oNewRule = new Rule($sProperty, $oRule->getLineNo(), $oRule->getColNo());
$oNewRule->setIsImportant($oRule->getIsImportant());
$oNewRule->addValue($mValue);
$this->addRule($oNewRule);
}
$this->removeRule('background');
}
/**
* @return void
*/
public function expandListStyleShorthand()
{
$aListProperties = [
'list-style-type' => 'disc',
'list-style-position' => 'outside',
'list-style-image' => 'none',
];
$aListStyleTypes = [
'none',
'disc',
'circle',
'square',
'decimal-leading-zero',
'decimal',
'lower-roman',
'upper-roman',
'lower-greek',
'lower-alpha',
'lower-latin',
'upper-alpha',
'upper-latin',
'hebrew',
'armenian',
'georgian',
'cjk-ideographic',
'hiragana',
'hira-gana-iroha',
'katakana-iroha',
'katakana',
];
$aListStylePositions = [
'inside',
'outside',
];
$aRules = $this->getRulesAssoc();
if (!isset($aRules['list-style'])) {
return;
}
$oRule = $aRules['list-style'];
$mRuleValue = $oRule->getValue();
$aValues = [];
if (!$mRuleValue instanceof RuleValueList) {
$aValues[] = $mRuleValue;
} else {
$aValues = $mRuleValue->getListComponents();
}
if (count($aValues) == 1 && $aValues[0] == 'inherit') {
foreach ($aListProperties as $sProperty => $mValue) {
$oNewRule = new Rule($sProperty, $oRule->getLineNo(), $oRule->getColNo());
$oNewRule->addValue('inherit');
$oNewRule->setIsImportant($oRule->getIsImportant());
$this->addRule($oNewRule);
}
$this->removeRule('list-style');
return;
}
foreach ($aValues as $mValue) {
if (!$mValue instanceof Value) {
$mValue = mb_strtolower($mValue);
}
if ($mValue instanceof Url) {
$aListProperties['list-style-image'] = $mValue;
} elseif (in_array($mValue, $aListStyleTypes)) {
$aListProperties['list-style-types'] = $mValue;
} elseif (in_array($mValue, $aListStylePositions)) {
$aListProperties['list-style-position'] = $mValue;
}
}
foreach ($aListProperties as $sProperty => $mValue) {
$oNewRule = new Rule($sProperty, $oRule->getLineNo(), $oRule->getColNo());
$oNewRule->setIsImportant($oRule->getIsImportant());
$oNewRule->addValue($mValue);
$this->addRule($oNewRule);
}
$this->removeRule('list-style');
}
/**
* @param array<array-key, string> $aProperties
* @param string $sShorthand
*
* @return void
*/
public function createShorthandProperties(array $aProperties, $sShorthand)
{
$aRules = $this->getRulesAssoc();
$aNewValues = [];
foreach ($aProperties as $sProperty) {
if (!isset($aRules[$sProperty])) {
continue;
}
$oRule = $aRules[$sProperty];
if (!$oRule->getIsImportant()) {
$mRuleValue = $oRule->getValue();
$aValues = [];
if (!$mRuleValue instanceof RuleValueList) {
$aValues[] = $mRuleValue;
} else {
$aValues = $mRuleValue->getListComponents();
}
foreach ($aValues as $mValue) {
$aNewValues[] = $mValue;
}
$this->removeRule($sProperty);
}
}
if (count($aNewValues)) {
$oNewRule = new Rule($sShorthand, $oRule->getLineNo(), $oRule->getColNo());
foreach ($aNewValues as $mValue) {
$oNewRule->addValue($mValue);
}
$this->addRule($oNewRule);
}
}
/**
* @return void
*/
public function createBackgroundShorthand()
{
$aProperties = [
'background-color',
'background-image',
'background-repeat',
'background-position',
'background-attachment',
];
$this->createShorthandProperties($aProperties, 'background');
}
/**
* @return void
*/
public function createListStyleShorthand()
{
$aProperties = [
'list-style-type',
'list-style-position',
'list-style-image',
];
$this->createShorthandProperties($aProperties, 'list-style');
}
/**
* Combines `border-color`, `border-style` and `border-width` into `border`.
*
* Should be run after `create_dimensions_shorthand`!
*
* @return void
*/
public function createBorderShorthand()
{
$aProperties = [
'border-width',
'border-style',
'border-color',
];
$this->createShorthandProperties($aProperties, 'border');
}
/**
* Looks for long format CSS dimensional properties
* (margin, padding, border-color, border-style and border-width)
* and converts them into shorthand CSS properties.
*
* @return void
*/
public function createDimensionsShorthand()
{
$aPositions = ['top', 'right', 'bottom', 'left'];
$aExpansions = [
'margin' => 'margin-%s',
'padding' => 'padding-%s',
'border-color' => 'border-%s-color',
'border-style' => 'border-%s-style',
'border-width' => 'border-%s-width',
];
$aRules = $this->getRulesAssoc();
foreach ($aExpansions as $sProperty => $sExpanded) {
$aFoldable = [];
foreach ($aRules as $sRuleName => $oRule) {
foreach ($aPositions as $sPosition) {
if ($sRuleName == sprintf($sExpanded, $sPosition)) {
$aFoldable[$sRuleName] = $oRule;
}
}
}
// All four dimensions must be present
if (count($aFoldable) == 4) {
$aValues = [];
foreach ($aPositions as $sPosition) {
$oRule = $aRules[sprintf($sExpanded, $sPosition)];
$mRuleValue = $oRule->getValue();
$aRuleValues = [];
if (!$mRuleValue instanceof RuleValueList) {
$aRuleValues[] = $mRuleValue;
} else {
$aRuleValues = $mRuleValue->getListComponents();
}
$aValues[$sPosition] = $aRuleValues;
}
$oNewRule = new Rule($sProperty, $oRule->getLineNo(), $oRule->getColNo());
if ((string)$aValues['left'][0] == (string)$aValues['right'][0]) {
if ((string)$aValues['top'][0] == (string)$aValues['bottom'][0]) {
if ((string)$aValues['top'][0] == (string)$aValues['left'][0]) {
// All 4 sides are equal
$oNewRule->addValue($aValues['top']);
} else {
// Top and bottom are equal, left and right are equal
$oNewRule->addValue($aValues['top']);
$oNewRule->addValue($aValues['left']);
}
} else {
// Only left and right are equal
$oNewRule->addValue($aValues['top']);
$oNewRule->addValue($aValues['left']);
$oNewRule->addValue($aValues['bottom']);
}
} else {
// No sides are equal
$oNewRule->addValue($aValues['top']);
$oNewRule->addValue($aValues['left']);
$oNewRule->addValue($aValues['bottom']);
$oNewRule->addValue($aValues['right']);
}
$this->addRule($oNewRule);
foreach ($aPositions as $sPosition) {
$this->removeRule(sprintf($sExpanded, $sPosition));
}
}
}
}
/**
* Looks for long format CSS font properties (e.g. `font-weight`) and
* tries to convert them into a shorthand CSS `font` property.
*
* At least `font-size` AND `font-family` must be present in order to create a shorthand declaration.
*
* @return void
*/
public function createFontShorthand()
{
$aFontProperties = [
'font-style',
'font-variant',
'font-weight',
'font-size',
'line-height',
'font-family',
];
$aRules = $this->getRulesAssoc();
if (!isset($aRules['font-size']) || !isset($aRules['font-family'])) {
return;
}
$oOldRule = isset($aRules['font-size']) ? $aRules['font-size'] : $aRules['font-family'];
$oNewRule = new Rule('font', $oOldRule->getLineNo(), $oOldRule->getColNo());
unset($oOldRule);
foreach (['font-style', 'font-variant', 'font-weight'] as $sProperty) {
if (isset($aRules[$sProperty])) {
$oRule = $aRules[$sProperty];
$mRuleValue = $oRule->getValue();
$aValues = [];
if (!$mRuleValue instanceof RuleValueList) {
$aValues[] = $mRuleValue;
} else {
$aValues = $mRuleValue->getListComponents();
}
if ($aValues[0] !== 'normal') {
$oNewRule->addValue($aValues[0]);
}
}
}
// Get the font-size value
$oRule = $aRules['font-size'];
$mRuleValue = $oRule->getValue();
$aFSValues = [];
if (!$mRuleValue instanceof RuleValueList) {
$aFSValues[] = $mRuleValue;
} else {
$aFSValues = $mRuleValue->getListComponents();
}
// But wait to know if we have line-height to add it
if (isset($aRules['line-height'])) {
$oRule = $aRules['line-height'];
$mRuleValue = $oRule->getValue();
$aLHValues = [];
if (!$mRuleValue instanceof RuleValueList) {
$aLHValues[] = $mRuleValue;
} else {
$aLHValues = $mRuleValue->getListComponents();
}
if ($aLHValues[0] !== 'normal') {
$val = new RuleValueList('/', $this->iLineNo);
$val->addListComponent($aFSValues[0]);
$val->addListComponent($aLHValues[0]);
$oNewRule->addValue($val);
}
} else {
$oNewRule->addValue($aFSValues[0]);
}
$oRule = $aRules['font-family'];
$mRuleValue = $oRule->getValue();
$aFFValues = [];
if (!$mRuleValue instanceof RuleValueList) {
$aFFValues[] = $mRuleValue;
} else {
$aFFValues = $mRuleValue->getListComponents();
}
$oFFValue = new RuleValueList(',', $this->iLineNo);
$oFFValue->setListComponents($aFFValues);
$oNewRule->addValue($oFFValue);
$this->addRule($oNewRule);
foreach ($aFontProperties as $sProperty) {
$this->removeRule($sProperty);
}
}
/**
* @return string
*
* @throws OutputException
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*
* @throws OutputException
*/
public function render(OutputFormat $oOutputFormat)
{
if (count($this->aSelectors) === 0) {
// If all the selectors have been removed, this declaration block becomes invalid
throw new OutputException("Attempt to print declaration block with missing selector", $this->iLineNo);
}
$sResult = $oOutputFormat->sBeforeDeclarationBlock;
$sResult .= $oOutputFormat->implode(
$oOutputFormat->spaceBeforeSelectorSeparator() . ',' . $oOutputFormat->spaceAfterSelectorSeparator(),
$this->aSelectors
);
$sResult .= $oOutputFormat->sAfterDeclarationBlockSelectors;
$sResult .= $oOutputFormat->spaceBeforeOpeningBrace() . '{';
$sResult .= parent::render($oOutputFormat);
$sResult .= '}';
$sResult .= $oOutputFormat->sAfterDeclarationBlock;
return $sResult;
}
}
sabberworm/php-css-parser/src/RuleSet/RuleSet.php 0000644 00000025324 15153552363 0016042 0 ustar 00 <?php
namespace Sabberworm\CSS\RuleSet;
use Sabberworm\CSS\Comment\Comment;
use Sabberworm\CSS\Comment\Commentable;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Parsing\ParserState;
use Sabberworm\CSS\Parsing\UnexpectedEOFException;
use Sabberworm\CSS\Parsing\UnexpectedTokenException;
use Sabberworm\CSS\Renderable;
use Sabberworm\CSS\Rule\Rule;
/**
* RuleSet is a generic superclass denoting rules. The typical example for rule sets are declaration block.
* However, unknown At-Rules (like `@font-face`) are also rule sets.
*/
abstract class RuleSet implements Renderable, Commentable
{
/**
* @var array<string, Rule>
*/
private $aRules;
/**
* @var int
*/
protected $iLineNo;
/**
* @var array<array-key, Comment>
*/
protected $aComments;
/**
* @param int $iLineNo
*/
public function __construct($iLineNo = 0)
{
$this->aRules = [];
$this->iLineNo = $iLineNo;
$this->aComments = [];
}
/**
* @return void
*
* @throws UnexpectedTokenException
* @throws UnexpectedEOFException
*/
public static function parseRuleSet(ParserState $oParserState, RuleSet $oRuleSet)
{
while ($oParserState->comes(';')) {
$oParserState->consume(';');
}
while (!$oParserState->comes('}')) {
$oRule = null;
if ($oParserState->getSettings()->bLenientParsing) {
try {
$oRule = Rule::parse($oParserState);
} catch (UnexpectedTokenException $e) {
try {
$sConsume = $oParserState->consumeUntil(["\n", ";", '}'], true);
// We need to “unfind” the matches to the end of the ruleSet as this will be matched later
if ($oParserState->streql(substr($sConsume, -1), '}')) {
$oParserState->backtrack(1);
} else {
while ($oParserState->comes(';')) {
$oParserState->consume(';');
}
}
} catch (UnexpectedTokenException $e) {
// We’ve reached the end of the document. Just close the RuleSet.
return;
}
}
} else {
$oRule = Rule::parse($oParserState);
}
if ($oRule) {
$oRuleSet->addRule($oRule);
}
}
$oParserState->consume('}');
}
/**
* @return int
*/
public function getLineNo()
{
return $this->iLineNo;
}
/**
* @param Rule|null $oSibling
*
* @return void
*/
public function addRule(Rule $oRule, Rule $oSibling = null)
{
$sRule = $oRule->getRule();
if (!isset($this->aRules[$sRule])) {
$this->aRules[$sRule] = [];
}
$iPosition = count($this->aRules[$sRule]);
if ($oSibling !== null) {
$iSiblingPos = array_search($oSibling, $this->aRules[$sRule], true);
if ($iSiblingPos !== false) {
$iPosition = $iSiblingPos;
$oRule->setPosition($oSibling->getLineNo(), $oSibling->getColNo() - 1);
}
}
if ($oRule->getLineNo() === 0 && $oRule->getColNo() === 0) {
//this node is added manually, give it the next best line
$rules = $this->getRules();
$pos = count($rules);
if ($pos > 0) {
$last = $rules[$pos - 1];
$oRule->setPosition($last->getLineNo() + 1, 0);
}
}
array_splice($this->aRules[$sRule], $iPosition, 0, [$oRule]);
}
/**
* Returns all rules matching the given rule name
*
* @example $oRuleSet->getRules('font') // returns array(0 => $oRule, …) or array().
*
* @example $oRuleSet->getRules('font-')
* //returns an array of all rules either beginning with font- or matching font.
*
* @param Rule|string|null $mRule
* Pattern to search for. If null, returns all rules.
* If the pattern ends with a dash, all rules starting with the pattern are returned
* as well as one matching the pattern with the dash excluded.
* Passing a Rule behaves like calling `getRules($mRule->getRule())`.
*
* @return array<int, Rule>
*/
public function getRules($mRule = null)
{
if ($mRule instanceof Rule) {
$mRule = $mRule->getRule();
}
/** @var array<int, Rule> $aResult */
$aResult = [];
foreach ($this->aRules as $sName => $aRules) {
// Either no search rule is given or the search rule matches the found rule exactly
// or the search rule ends in “-” and the found rule starts with the search rule.
if (
!$mRule || $sName === $mRule
|| (
strrpos($mRule, '-') === strlen($mRule) - strlen('-')
&& (strpos($sName, $mRule) === 0 || $sName === substr($mRule, 0, -1))
)
) {
$aResult = array_merge($aResult, $aRules);
}
}
usort($aResult, function (Rule $first, Rule $second) {
if ($first->getLineNo() === $second->getLineNo()) {
return $first->getColNo() - $second->getColNo();
}
return $first->getLineNo() - $second->getLineNo();
});
return $aResult;
}
/**
* Overrides all the rules of this set.
*
* @param array<array-key, Rule> $aRules The rules to override with.
*
* @return void
*/
public function setRules(array $aRules)
{
$this->aRules = [];
foreach ($aRules as $rule) {
$this->addRule($rule);
}
}
/**
* Returns all rules matching the given pattern and returns them in an associative array with the rule’s name
* as keys. This method exists mainly for backwards-compatibility and is really only partially useful.
*
* Note: This method loses some information: Calling this (with an argument of `background-`) on a declaration block
* like `{ background-color: green; background-color; rgba(0, 127, 0, 0.7); }` will only yield an associative array
* containing the rgba-valued rule while `getRules()` would yield an indexed array containing both.
*
* @param Rule|string|null $mRule $mRule
* Pattern to search for. If null, returns all rules. If the pattern ends with a dash,
* all rules starting with the pattern are returned as well as one matching the pattern with the dash
* excluded. Passing a Rule behaves like calling `getRules($mRule->getRule())`.
*
* @return array<string, Rule>
*/
public function getRulesAssoc($mRule = null)
{
/** @var array<string, Rule> $aResult */
$aResult = [];
foreach ($this->getRules($mRule) as $oRule) {
$aResult[$oRule->getRule()] = $oRule;
}
return $aResult;
}
/**
* Removes a rule from this RuleSet. This accepts all the possible values that `getRules()` accepts.
*
* If given a Rule, it will only remove this particular rule (by identity).
* If given a name, it will remove all rules by that name.
*
* Note: this is different from pre-v.2.0 behaviour of PHP-CSS-Parser, where passing a Rule instance would
* remove all rules with the same name. To get the old behaviour, use `removeRule($oRule->getRule())`.
*
* @param Rule|string|null $mRule
* pattern to remove. If $mRule is null, all rules are removed. If the pattern ends in a dash,
* all rules starting with the pattern are removed as well as one matching the pattern with the dash
* excluded. Passing a Rule behaves matches by identity.
*
* @return void
*/
public function removeRule($mRule)
{
if ($mRule instanceof Rule) {
$sRule = $mRule->getRule();
if (!isset($this->aRules[$sRule])) {
return;
}
foreach ($this->aRules[$sRule] as $iKey => $oRule) {
if ($oRule === $mRule) {
unset($this->aRules[$sRule][$iKey]);
}
}
} else {
foreach ($this->aRules as $sName => $aRules) {
// Either no search rule is given or the search rule matches the found rule exactly
// or the search rule ends in “-” and the found rule starts with the search rule or equals it
// (without the trailing dash).
if (
!$mRule || $sName === $mRule
|| (strrpos($mRule, '-') === strlen($mRule) - strlen('-')
&& (strpos($sName, $mRule) === 0 || $sName === substr($mRule, 0, -1)))
) {
unset($this->aRules[$sName]);
}
}
}
}
/**
* @return string
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
$sResult = '';
$bIsFirst = true;
foreach ($this->aRules as $aRules) {
foreach ($aRules as $oRule) {
$sRendered = $oOutputFormat->safely(function () use ($oRule, $oOutputFormat) {
return $oRule->render($oOutputFormat->nextLevel());
});
if ($sRendered === null) {
continue;
}
if ($bIsFirst) {
$bIsFirst = false;
$sResult .= $oOutputFormat->nextLevel()->spaceBeforeRules();
} else {
$sResult .= $oOutputFormat->nextLevel()->spaceBetweenRules();
}
$sResult .= $sRendered;
}
}
if (!$bIsFirst) {
// Had some output
$sResult .= $oOutputFormat->spaceAfterRules();
}
return $oOutputFormat->removeLastSemicolon($sResult);
}
/**
* @param array<string, Comment> $aComments
*
* @return void
*/
public function addComments(array $aComments)
{
$this->aComments = array_merge($this->aComments, $aComments);
}
/**
* @return array<string, Comment>
*/
public function getComments()
{
return $this->aComments;
}
/**
* @param array<string, Comment> $aComments
*
* @return void
*/
public function setComments(array $aComments)
{
$this->aComments = $aComments;
}
}
sabberworm/php-css-parser/src/Settings.php 0000644 00000003647 15153552363 0014700 0 ustar 00 <?php
namespace Sabberworm\CSS;
/**
* Parser settings class.
*
* Configure parser behaviour here.
*/
class Settings
{
/**
* Multi-byte string support.
* If true (mbstring extension must be enabled), will use (slower) `mb_strlen`, `mb_convert_case`, `mb_substr`
* and `mb_strpos` functions. Otherwise, the normal (ASCII-Only) functions will be used.
*
* @var bool
*/
public $bMultibyteSupport;
/**
* The default charset for the CSS if no `@charset` rule is found. Defaults to utf-8.
*
* @var string
*/
public $sDefaultCharset = 'utf-8';
/**
* Lenient parsing. When used (which is true by default), the parser will not choke
* on unexpected tokens but simply ignore them.
*
* @var bool
*/
public $bLenientParsing = true;
private function __construct()
{
$this->bMultibyteSupport = extension_loaded('mbstring');
}
/**
* @return self new instance
*/
public static function create()
{
return new Settings();
}
/**
* @param bool $bMultibyteSupport
*
* @return self fluent interface
*/
public function withMultibyteSupport($bMultibyteSupport = true)
{
$this->bMultibyteSupport = $bMultibyteSupport;
return $this;
}
/**
* @param string $sDefaultCharset
*
* @return self fluent interface
*/
public function withDefaultCharset($sDefaultCharset)
{
$this->sDefaultCharset = $sDefaultCharset;
return $this;
}
/**
* @param bool $bLenientParsing
*
* @return self fluent interface
*/
public function withLenientParsing($bLenientParsing = true)
{
$this->bLenientParsing = $bLenientParsing;
return $this;
}
/**
* @return self fluent interface
*/
public function beStrict()
{
return $this->withLenientParsing(false);
}
}
sabberworm/php-css-parser/src/Value/CSSFunction.php 0000644 00000003066 15153552363 0016305 0 ustar 00 <?php
namespace Sabberworm\CSS\Value;
use Sabberworm\CSS\OutputFormat;
class CSSFunction extends ValueList
{
/**
* @var string
*/
protected $sName;
/**
* @param string $sName
* @param RuleValueList|array<int, RuleValueList|CSSFunction|CSSString|LineName|Size|URL|string> $aArguments
* @param string $sSeparator
* @param int $iLineNo
*/
public function __construct($sName, $aArguments, $sSeparator = ',', $iLineNo = 0)
{
if ($aArguments instanceof RuleValueList) {
$sSeparator = $aArguments->getListSeparator();
$aArguments = $aArguments->getListComponents();
}
$this->sName = $sName;
$this->iLineNo = $iLineNo;
parent::__construct($aArguments, $sSeparator, $iLineNo);
}
/**
* @return string
*/
public function getName()
{
return $this->sName;
}
/**
* @param string $sName
*
* @return void
*/
public function setName($sName)
{
$this->sName = $sName;
}
/**
* @return array<int, RuleValueList|CSSFunction|CSSString|LineName|Size|URL|string>
*/
public function getArguments()
{
return $this->aComponents;
}
/**
* @return string
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
$aArguments = parent::render($oOutputFormat);
return "{$this->sName}({$aArguments})";
}
}
sabberworm/php-css-parser/src/Value/CSSString.php 0000644 00000005247 15153552363 0015771 0 ustar 00 <?php
namespace Sabberworm\CSS\Value;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Parsing\ParserState;
use Sabberworm\CSS\Parsing\SourceException;
use Sabberworm\CSS\Parsing\UnexpectedEOFException;
use Sabberworm\CSS\Parsing\UnexpectedTokenException;
class CSSString extends PrimitiveValue
{
/**
* @var string
*/
private $sString;
/**
* @param string $sString
* @param int $iLineNo
*/
public function __construct($sString, $iLineNo = 0)
{
$this->sString = $sString;
parent::__construct($iLineNo);
}
/**
* @return CSSString
*
* @throws SourceException
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*/
public static function parse(ParserState $oParserState)
{
$sBegin = $oParserState->peek();
$sQuote = null;
if ($sBegin === "'") {
$sQuote = "'";
} elseif ($sBegin === '"') {
$sQuote = '"';
}
if ($sQuote !== null) {
$oParserState->consume($sQuote);
}
$sResult = "";
$sContent = null;
if ($sQuote === null) {
// Unquoted strings end in whitespace or with braces, brackets, parentheses
while (!preg_match('/[\\s{}()<>\\[\\]]/isu', $oParserState->peek())) {
$sResult .= $oParserState->parseCharacter(false);
}
} else {
while (!$oParserState->comes($sQuote)) {
$sContent = $oParserState->parseCharacter(false);
if ($sContent === null) {
throw new SourceException(
"Non-well-formed quoted string {$oParserState->peek(3)}",
$oParserState->currentLine()
);
}
$sResult .= $sContent;
}
$oParserState->consume($sQuote);
}
return new CSSString($sResult, $oParserState->currentLine());
}
/**
* @param string $sString
*
* @return void
*/
public function setString($sString)
{
$this->sString = $sString;
}
/**
* @return string
*/
public function getString()
{
return $this->sString;
}
/**
* @return string
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
$sString = addslashes($this->sString);
$sString = str_replace("\n", '\A', $sString);
return $oOutputFormat->getStringQuotingType() . $sString . $oOutputFormat->getStringQuotingType();
}
}
sabberworm/php-css-parser/src/Value/CalcFunction.php 0000644 00000006520 15153552363 0016515 0 ustar 00 <?php
namespace Sabberworm\CSS\Value;
use Sabberworm\CSS\Parsing\ParserState;
use Sabberworm\CSS\Parsing\UnexpectedEOFException;
use Sabberworm\CSS\Parsing\UnexpectedTokenException;
class CalcFunction extends CSSFunction
{
/**
* @var int
*/
const T_OPERAND = 1;
/**
* @var int
*/
const T_OPERATOR = 2;
/**
* @return CalcFunction
*
* @throws UnexpectedTokenException
* @throws UnexpectedEOFException
*/
public static function parse(ParserState $oParserState)
{
$aOperators = ['+', '-', '*', '/'];
$sFunction = trim($oParserState->consumeUntil('(', false, true));
$oCalcList = new CalcRuleValueList($oParserState->currentLine());
$oList = new RuleValueList(',', $oParserState->currentLine());
$iNestingLevel = 0;
$iLastComponentType = null;
while (!$oParserState->comes(')') || $iNestingLevel > 0) {
$oParserState->consumeWhiteSpace();
if ($oParserState->comes('(')) {
$iNestingLevel++;
$oCalcList->addListComponent($oParserState->consume(1));
$oParserState->consumeWhiteSpace();
continue;
} elseif ($oParserState->comes(')')) {
$iNestingLevel--;
$oCalcList->addListComponent($oParserState->consume(1));
$oParserState->consumeWhiteSpace();
continue;
}
if ($iLastComponentType != CalcFunction::T_OPERAND) {
$oVal = Value::parsePrimitiveValue($oParserState);
$oCalcList->addListComponent($oVal);
$iLastComponentType = CalcFunction::T_OPERAND;
} else {
if (in_array($oParserState->peek(), $aOperators)) {
if (($oParserState->comes('-') || $oParserState->comes('+'))) {
if (
$oParserState->peek(1, -1) != ' '
|| !($oParserState->comes('- ')
|| $oParserState->comes('+ '))
) {
throw new UnexpectedTokenException(
" {$oParserState->peek()} ",
$oParserState->peek(1, -1) . $oParserState->peek(2),
'literal',
$oParserState->currentLine()
);
}
}
$oCalcList->addListComponent($oParserState->consume(1));
$iLastComponentType = CalcFunction::T_OPERATOR;
} else {
throw new UnexpectedTokenException(
sprintf(
'Next token was expected to be an operand of type %s. Instead "%s" was found.',
implode(', ', $aOperators),
$oVal
),
'',
'custom',
$oParserState->currentLine()
);
}
}
$oParserState->consumeWhiteSpace();
}
$oList->addListComponent($oCalcList);
$oParserState->consume(')');
return new CalcFunction($sFunction, $oList, ',', $oParserState->currentLine());
}
}
sabberworm/php-css-parser/src/Value/CalcRuleValueList.php 0000644 00000000671 15153552363 0017471 0 ustar 00 <?php
namespace Sabberworm\CSS\Value;
use Sabberworm\CSS\OutputFormat;
class CalcRuleValueList extends RuleValueList
{
/**
* @param int $iLineNo
*/
public function __construct($iLineNo = 0)
{
parent::__construct(',', $iLineNo);
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
return $oOutputFormat->implode(' ', $this->aComponents);
}
}
sabberworm/php-css-parser/src/Value/Color.php 0000644 00000013230 15153552363 0015217 0 ustar 00 <?php
namespace Sabberworm\CSS\Value;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Parsing\ParserState;
use Sabberworm\CSS\Parsing\UnexpectedEOFException;
use Sabberworm\CSS\Parsing\UnexpectedTokenException;
class Color extends CSSFunction
{
/**
* @param array<int, RuleValueList|CSSFunction|CSSString|LineName|Size|URL|string> $aColor
* @param int $iLineNo
*/
public function __construct(array $aColor, $iLineNo = 0)
{
parent::__construct(implode('', array_keys($aColor)), $aColor, ',', $iLineNo);
}
/**
* @return Color|CSSFunction
*
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*/
public static function parse(ParserState $oParserState)
{
$aColor = [];
if ($oParserState->comes('#')) {
$oParserState->consume('#');
$sValue = $oParserState->parseIdentifier(false);
if ($oParserState->strlen($sValue) === 3) {
$sValue = $sValue[0] . $sValue[0] . $sValue[1] . $sValue[1] . $sValue[2] . $sValue[2];
} elseif ($oParserState->strlen($sValue) === 4) {
$sValue = $sValue[0] . $sValue[0] . $sValue[1] . $sValue[1] . $sValue[2] . $sValue[2] . $sValue[3]
. $sValue[3];
}
if ($oParserState->strlen($sValue) === 8) {
$aColor = [
'r' => new Size(intval($sValue[0] . $sValue[1], 16), null, true, $oParserState->currentLine()),
'g' => new Size(intval($sValue[2] . $sValue[3], 16), null, true, $oParserState->currentLine()),
'b' => new Size(intval($sValue[4] . $sValue[5], 16), null, true, $oParserState->currentLine()),
'a' => new Size(
round(self::mapRange(intval($sValue[6] . $sValue[7], 16), 0, 255, 0, 1), 2),
null,
true,
$oParserState->currentLine()
),
];
} else {
$aColor = [
'r' => new Size(intval($sValue[0] . $sValue[1], 16), null, true, $oParserState->currentLine()),
'g' => new Size(intval($sValue[2] . $sValue[3], 16), null, true, $oParserState->currentLine()),
'b' => new Size(intval($sValue[4] . $sValue[5], 16), null, true, $oParserState->currentLine()),
];
}
} else {
$sColorMode = $oParserState->parseIdentifier(true);
$oParserState->consumeWhiteSpace();
$oParserState->consume('(');
$bContainsVar = false;
$iLength = $oParserState->strlen($sColorMode);
for ($i = 0; $i < $iLength; ++$i) {
$oParserState->consumeWhiteSpace();
if ($oParserState->comes('var')) {
$aColor[$sColorMode[$i]] = CSSFunction::parseIdentifierOrFunction($oParserState);
$bContainsVar = true;
} else {
$aColor[$sColorMode[$i]] = Size::parse($oParserState, true);
}
if ($bContainsVar && $oParserState->comes(')')) {
// With a var argument the function can have fewer arguments
break;
}
$oParserState->consumeWhiteSpace();
if ($i < ($iLength - 1)) {
$oParserState->consume(',');
}
}
$oParserState->consume(')');
if ($bContainsVar) {
return new CSSFunction($sColorMode, array_values($aColor), ',', $oParserState->currentLine());
}
}
return new Color($aColor, $oParserState->currentLine());
}
/**
* @param float $fVal
* @param float $fFromMin
* @param float $fFromMax
* @param float $fToMin
* @param float $fToMax
*
* @return float
*/
private static function mapRange($fVal, $fFromMin, $fFromMax, $fToMin, $fToMax)
{
$fFromRange = $fFromMax - $fFromMin;
$fToRange = $fToMax - $fToMin;
$fMultiplier = $fToRange / $fFromRange;
$fNewVal = $fVal - $fFromMin;
$fNewVal *= $fMultiplier;
return $fNewVal + $fToMin;
}
/**
* @return array<int, RuleValueList|CSSFunction|CSSString|LineName|Size|URL|string>
*/
public function getColor()
{
return $this->aComponents;
}
/**
* @param array<int, RuleValueList|CSSFunction|CSSString|LineName|Size|URL|string> $aColor
*
* @return void
*/
public function setColor(array $aColor)
{
$this->setName(implode('', array_keys($aColor)));
$this->aComponents = $aColor;
}
/**
* @return string
*/
public function getColorDescription()
{
return $this->getName();
}
/**
* @return string
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
// Shorthand RGB color values
if ($oOutputFormat->getRGBHashNotation() && implode('', array_keys($this->aComponents)) === 'rgb') {
$sResult = sprintf(
'%02x%02x%02x',
$this->aComponents['r']->getSize(),
$this->aComponents['g']->getSize(),
$this->aComponents['b']->getSize()
);
return '#' . (($sResult[0] == $sResult[1]) && ($sResult[2] == $sResult[3]) && ($sResult[4] == $sResult[5])
? "$sResult[0]$sResult[2]$sResult[4]" : $sResult);
}
return parent::render($oOutputFormat);
}
}
sabberworm/php-css-parser/src/Value/LineName.php 0000644 00000003411 15153552363 0015631 0 ustar 00 <?php
namespace Sabberworm\CSS\Value;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Parsing\ParserState;
use Sabberworm\CSS\Parsing\UnexpectedEOFException;
use Sabberworm\CSS\Parsing\UnexpectedTokenException;
class LineName extends ValueList
{
/**
* @param array<int, RuleValueList|CSSFunction|CSSString|LineName|Size|URL|string> $aComponents
* @param int $iLineNo
*/
public function __construct(array $aComponents = [], $iLineNo = 0)
{
parent::__construct($aComponents, ' ', $iLineNo);
}
/**
* @return LineName
*
* @throws UnexpectedTokenException
* @throws UnexpectedEOFException
*/
public static function parse(ParserState $oParserState)
{
$oParserState->consume('[');
$oParserState->consumeWhiteSpace();
$aNames = [];
do {
if ($oParserState->getSettings()->bLenientParsing) {
try {
$aNames[] = $oParserState->parseIdentifier();
} catch (UnexpectedTokenException $e) {
if (!$oParserState->comes(']')) {
throw $e;
}
}
} else {
$aNames[] = $oParserState->parseIdentifier();
}
$oParserState->consumeWhiteSpace();
} while (!$oParserState->comes(']'));
$oParserState->consume(']');
return new LineName($aNames, $oParserState->currentLine());
}
/**
* @return string
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
return '[' . parent::render(OutputFormat::createCompact()) . ']';
}
}
sabberworm/php-css-parser/src/Value/PrimitiveValue.php 0000644 00000000344 15153552363 0017110 0 ustar 00 <?php
namespace Sabberworm\CSS\Value;
abstract class PrimitiveValue extends Value
{
/**
* @param int $iLineNo
*/
public function __construct($iLineNo = 0)
{
parent::__construct($iLineNo);
}
}
sabberworm/php-css-parser/src/Value/RuleValueList.php 0000644 00000000443 15153552363 0016703 0 ustar 00 <?php
namespace Sabberworm\CSS\Value;
class RuleValueList extends ValueList
{
/**
* @param string $sSeparator
* @param int $iLineNo
*/
public function __construct($sSeparator = ',', $iLineNo = 0)
{
parent::__construct([], $sSeparator, $iLineNo);
}
}
sabberworm/php-css-parser/src/Value/Size.php 0000644 00000012400 15153552363 0015051 0 ustar 00 <?php
namespace Sabberworm\CSS\Value;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Parsing\ParserState;
use Sabberworm\CSS\Parsing\UnexpectedEOFException;
use Sabberworm\CSS\Parsing\UnexpectedTokenException;
class Size extends PrimitiveValue
{
/**
* vh/vw/vm(ax)/vmin/rem are absolute insofar as they don’t scale to the immediate parent (only the viewport)
*
* @var array<int, string>
*/
const ABSOLUTE_SIZE_UNITS = ['px', 'cm', 'mm', 'mozmm', 'in', 'pt', 'pc', 'vh', 'vw', 'vmin', 'vmax', 'rem'];
/**
* @var array<int, string>
*/
const RELATIVE_SIZE_UNITS = ['%', 'em', 'ex', 'ch', 'fr'];
/**
* @var array<int, string>
*/
const NON_SIZE_UNITS = ['deg', 'grad', 'rad', 's', 'ms', 'turns', 'Hz', 'kHz'];
/**
* @var array<int, array<string, string>>|null
*/
private static $SIZE_UNITS = null;
/**
* @var float
*/
private $fSize;
/**
* @var string|null
*/
private $sUnit;
/**
* @var bool
*/
private $bIsColorComponent;
/**
* @param float|int|string $fSize
* @param string|null $sUnit
* @param bool $bIsColorComponent
* @param int $iLineNo
*/
public function __construct($fSize, $sUnit = null, $bIsColorComponent = false, $iLineNo = 0)
{
parent::__construct($iLineNo);
$this->fSize = (float)$fSize;
$this->sUnit = $sUnit;
$this->bIsColorComponent = $bIsColorComponent;
}
/**
* @param bool $bIsColorComponent
*
* @return Size
*
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*/
public static function parse(ParserState $oParserState, $bIsColorComponent = false)
{
$sSize = '';
if ($oParserState->comes('-')) {
$sSize .= $oParserState->consume('-');
}
while (is_numeric($oParserState->peek()) || $oParserState->comes('.')) {
if ($oParserState->comes('.')) {
$sSize .= $oParserState->consume('.');
} else {
$sSize .= $oParserState->consume(1);
}
}
$sUnit = null;
$aSizeUnits = self::getSizeUnits();
foreach ($aSizeUnits as $iLength => &$aValues) {
$sKey = strtolower($oParserState->peek($iLength));
if (array_key_exists($sKey, $aValues)) {
if (($sUnit = $aValues[$sKey]) !== null) {
$oParserState->consume($iLength);
break;
}
}
}
return new Size((float)$sSize, $sUnit, $bIsColorComponent, $oParserState->currentLine());
}
/**
* @return array<int, array<string, string>>
*/
private static function getSizeUnits()
{
if (!is_array(self::$SIZE_UNITS)) {
self::$SIZE_UNITS = [];
foreach (array_merge(self::ABSOLUTE_SIZE_UNITS, self::RELATIVE_SIZE_UNITS, self::NON_SIZE_UNITS) as $val) {
$iSize = strlen($val);
if (!isset(self::$SIZE_UNITS[$iSize])) {
self::$SIZE_UNITS[$iSize] = [];
}
self::$SIZE_UNITS[$iSize][strtolower($val)] = $val;
}
krsort(self::$SIZE_UNITS, SORT_NUMERIC);
}
return self::$SIZE_UNITS;
}
/**
* @param string $sUnit
*
* @return void
*/
public function setUnit($sUnit)
{
$this->sUnit = $sUnit;
}
/**
* @return string|null
*/
public function getUnit()
{
return $this->sUnit;
}
/**
* @param float|int|string $fSize
*/
public function setSize($fSize)
{
$this->fSize = (float)$fSize;
}
/**
* @return float
*/
public function getSize()
{
return $this->fSize;
}
/**
* @return bool
*/
public function isColorComponent()
{
return $this->bIsColorComponent;
}
/**
* Returns whether the number stored in this Size really represents a size (as in a length of something on screen).
*
* @return false if the unit an angle, a duration, a frequency or the number is a component in a Color object.
*/
public function isSize()
{
if (in_array($this->sUnit, self::NON_SIZE_UNITS, true)) {
return false;
}
return !$this->isColorComponent();
}
/**
* @return bool
*/
public function isRelative()
{
if (in_array($this->sUnit, self::RELATIVE_SIZE_UNITS, true)) {
return true;
}
if ($this->sUnit === null && $this->fSize != 0) {
return true;
}
return false;
}
/**
* @return string
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
$l = localeconv();
$sPoint = preg_quote($l['decimal_point'], '/');
$sSize = preg_match("/[\d\.]+e[+-]?\d+/i", (string)$this->fSize)
? preg_replace("/$sPoint?0+$/", "", sprintf("%f", $this->fSize)) : $this->fSize;
return preg_replace(["/$sPoint/", "/^(-?)0\./"], ['.', '$1.'], $sSize)
. ($this->sUnit === null ? '' : $this->sUnit);
}
}
sabberworm/php-css-parser/src/Value/URL.php 0000644 00000003415 15153552363 0014607 0 ustar 00 <?php
namespace Sabberworm\CSS\Value;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Parsing\ParserState;
use Sabberworm\CSS\Parsing\SourceException;
use Sabberworm\CSS\Parsing\UnexpectedEOFException;
use Sabberworm\CSS\Parsing\UnexpectedTokenException;
class URL extends PrimitiveValue
{
/**
* @var CSSString
*/
private $oURL;
/**
* @param int $iLineNo
*/
public function __construct(CSSString $oURL, $iLineNo = 0)
{
parent::__construct($iLineNo);
$this->oURL = $oURL;
}
/**
* @return URL
*
* @throws SourceException
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*/
public static function parse(ParserState $oParserState)
{
$bUseUrl = $oParserState->comes('url', true);
if ($bUseUrl) {
$oParserState->consume('url');
$oParserState->consumeWhiteSpace();
$oParserState->consume('(');
}
$oParserState->consumeWhiteSpace();
$oResult = new URL(CSSString::parse($oParserState), $oParserState->currentLine());
if ($bUseUrl) {
$oParserState->consumeWhiteSpace();
$oParserState->consume(')');
}
return $oResult;
}
/**
* @return void
*/
public function setURL(CSSString $oURL)
{
$this->oURL = $oURL;
}
/**
* @return CSSString
*/
public function getURL()
{
return $this->oURL;
}
/**
* @return string
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
return "url({$this->oURL->render($oOutputFormat)})";
}
}
sabberworm/php-css-parser/src/Value/Value.php 0000644 00000016041 15153552363 0015220 0 ustar 00 <?php
namespace Sabberworm\CSS\Value;
use Sabberworm\CSS\Parsing\ParserState;
use Sabberworm\CSS\Parsing\SourceException;
use Sabberworm\CSS\Parsing\UnexpectedEOFException;
use Sabberworm\CSS\Parsing\UnexpectedTokenException;
use Sabberworm\CSS\Renderable;
abstract class Value implements Renderable
{
/**
* @var int
*/
protected $iLineNo;
/**
* @param int $iLineNo
*/
public function __construct($iLineNo = 0)
{
$this->iLineNo = $iLineNo;
}
/**
* @param array<array-key, string> $aListDelimiters
*
* @return RuleValueList|CSSFunction|CSSString|LineName|Size|URL|string
*
* @throws UnexpectedTokenException
* @throws UnexpectedEOFException
*/
public static function parseValue(ParserState $oParserState, array $aListDelimiters = [])
{
/** @var array<int, RuleValueList|CSSFunction|CSSString|LineName|Size|URL|string> $aStack */
$aStack = [];
$oParserState->consumeWhiteSpace();
//Build a list of delimiters and parsed values
while (
!($oParserState->comes('}') || $oParserState->comes(';') || $oParserState->comes('!')
|| $oParserState->comes(')')
|| $oParserState->comes('\\'))
) {
if (count($aStack) > 0) {
$bFoundDelimiter = false;
foreach ($aListDelimiters as $sDelimiter) {
if ($oParserState->comes($sDelimiter)) {
array_push($aStack, $oParserState->consume($sDelimiter));
$oParserState->consumeWhiteSpace();
$bFoundDelimiter = true;
break;
}
}
if (!$bFoundDelimiter) {
//Whitespace was the list delimiter
array_push($aStack, ' ');
}
}
array_push($aStack, self::parsePrimitiveValue($oParserState));
$oParserState->consumeWhiteSpace();
}
// Convert the list to list objects
foreach ($aListDelimiters as $sDelimiter) {
if (count($aStack) === 1) {
return $aStack[0];
}
$iStartPosition = null;
while (($iStartPosition = array_search($sDelimiter, $aStack, true)) !== false) {
$iLength = 2; //Number of elements to be joined
for ($i = $iStartPosition + 2; $i < count($aStack); $i += 2, ++$iLength) {
if ($sDelimiter !== $aStack[$i]) {
break;
}
}
$oList = new RuleValueList($sDelimiter, $oParserState->currentLine());
for ($i = $iStartPosition - 1; $i - $iStartPosition + 1 < $iLength * 2; $i += 2) {
$oList->addListComponent($aStack[$i]);
}
array_splice($aStack, $iStartPosition - 1, $iLength * 2 - 1, [$oList]);
}
}
if (!isset($aStack[0])) {
throw new UnexpectedTokenException(
" {$oParserState->peek()} ",
$oParserState->peek(1, -1) . $oParserState->peek(2),
'literal',
$oParserState->currentLine()
);
}
return $aStack[0];
}
/**
* @param bool $bIgnoreCase
*
* @return CSSFunction|string
*
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*/
public static function parseIdentifierOrFunction(ParserState $oParserState, $bIgnoreCase = false)
{
$sResult = $oParserState->parseIdentifier($bIgnoreCase);
if ($oParserState->comes('(')) {
$oParserState->consume('(');
$aArguments = Value::parseValue($oParserState, ['=', ' ', ',']);
$sResult = new CSSFunction($sResult, $aArguments, ',', $oParserState->currentLine());
$oParserState->consume(')');
}
return $sResult;
}
/**
* @return CSSFunction|CSSString|LineName|Size|URL|string
*
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
* @throws SourceException
*/
public static function parsePrimitiveValue(ParserState $oParserState)
{
$oValue = null;
$oParserState->consumeWhiteSpace();
if (
is_numeric($oParserState->peek())
|| ($oParserState->comes('-.')
&& is_numeric($oParserState->peek(1, 2)))
|| (($oParserState->comes('-') || $oParserState->comes('.')) && is_numeric($oParserState->peek(1, 1)))
) {
$oValue = Size::parse($oParserState);
} elseif ($oParserState->comes('#') || $oParserState->comes('rgb', true) || $oParserState->comes('hsl', true)) {
$oValue = Color::parse($oParserState);
} elseif ($oParserState->comes('url', true)) {
$oValue = URL::parse($oParserState);
} elseif (
$oParserState->comes('calc', true) || $oParserState->comes('-webkit-calc', true)
|| $oParserState->comes('-moz-calc', true)
) {
$oValue = CalcFunction::parse($oParserState);
} elseif ($oParserState->comes("'") || $oParserState->comes('"')) {
$oValue = CSSString::parse($oParserState);
} elseif ($oParserState->comes("progid:") && $oParserState->getSettings()->bLenientParsing) {
$oValue = self::parseMicrosoftFilter($oParserState);
} elseif ($oParserState->comes("[")) {
$oValue = LineName::parse($oParserState);
} elseif ($oParserState->comes("U+")) {
$oValue = self::parseUnicodeRangeValue($oParserState);
} else {
$oValue = self::parseIdentifierOrFunction($oParserState);
}
$oParserState->consumeWhiteSpace();
return $oValue;
}
/**
* @return CSSFunction
*
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*/
private static function parseMicrosoftFilter(ParserState $oParserState)
{
$sFunction = $oParserState->consumeUntil('(', false, true);
$aArguments = Value::parseValue($oParserState, [',', '=']);
return new CSSFunction($sFunction, $aArguments, ',', $oParserState->currentLine());
}
/**
* @return string
*
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*/
private static function parseUnicodeRangeValue(ParserState $oParserState)
{
$iCodepointMaxLength = 6; // Code points outside BMP can use up to six digits
$sRange = "";
$oParserState->consume("U+");
do {
if ($oParserState->comes('-')) {
$iCodepointMaxLength = 13; // Max length is 2 six digit code points + the dash(-) between them
}
$sRange .= $oParserState->consume(1);
} while (strlen($sRange) < $iCodepointMaxLength && preg_match("/[A-Fa-f0-9\?-]/", $oParserState->peek()));
return "U+{$sRange}";
}
/**
* @return int
*/
public function getLineNo()
{
return $this->iLineNo;
}
}
sabberworm/php-css-parser/src/Value/ValueList.php 0000644 00000004536 15153552363 0016062 0 ustar 00 <?php
namespace Sabberworm\CSS\Value;
use Sabberworm\CSS\OutputFormat;
abstract class ValueList extends Value
{
/**
* @var array<int, RuleValueList|CSSFunction|CSSString|LineName|Size|URL|string>
*/
protected $aComponents;
/**
* @var string
*/
protected $sSeparator;
/**
* phpcs:ignore Generic.Files.LineLength
* @param array<int, RuleValueList|CSSFunction|CSSString|LineName|Size|URL|string>|RuleValueList|CSSFunction|CSSString|LineName|Size|URL|string $aComponents
* @param string $sSeparator
* @param int $iLineNo
*/
public function __construct($aComponents = [], $sSeparator = ',', $iLineNo = 0)
{
parent::__construct($iLineNo);
if (!is_array($aComponents)) {
$aComponents = [$aComponents];
}
$this->aComponents = $aComponents;
$this->sSeparator = $sSeparator;
}
/**
* @param RuleValueList|CSSFunction|CSSString|LineName|Size|URL|string $mComponent
*
* @return void
*/
public function addListComponent($mComponent)
{
$this->aComponents[] = $mComponent;
}
/**
* @return array<int, RuleValueList|CSSFunction|CSSString|LineName|Size|URL|string>
*/
public function getListComponents()
{
return $this->aComponents;
}
/**
* @param array<int, RuleValueList|CSSFunction|CSSString|LineName|Size|URL|string> $aComponents
*
* @return void
*/
public function setListComponents(array $aComponents)
{
$this->aComponents = $aComponents;
}
/**
* @return string
*/
public function getListSeparator()
{
return $this->sSeparator;
}
/**
* @param string $sSeparator
*
* @return void
*/
public function setListSeparator($sSeparator)
{
$this->sSeparator = $sSeparator;
}
/**
* @return string
*/
public function __toString()
{
return $this->render(new OutputFormat());
}
/**
* @return string
*/
public function render(OutputFormat $oOutputFormat)
{
return $oOutputFormat->implode(
$oOutputFormat->spaceBeforeListArgumentSeparator($this->sSeparator) . $this->sSeparator
. $oOutputFormat->spaceAfterListArgumentSeparator($this->sSeparator),
$this->aComponents
);
}
}
symfony/css-selector/CssSelectorConverter.php 0000644 00000004151 15153552363 0015521 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector;
use Symfony\Component\CssSelector\Parser\Shortcut\ClassParser;
use Symfony\Component\CssSelector\Parser\Shortcut\ElementParser;
use Symfony\Component\CssSelector\Parser\Shortcut\EmptyStringParser;
use Symfony\Component\CssSelector\Parser\Shortcut\HashParser;
use Symfony\Component\CssSelector\XPath\Extension\HtmlExtension;
use Symfony\Component\CssSelector\XPath\Translator;
/**
* CssSelectorConverter is the main entry point of the component and can convert CSS
* selectors to XPath expressions.
*
* @author Christophe Coevoet <stof@notk.org>
*/
class CssSelectorConverter
{
private $translator;
private $cache;
private static $xmlCache = [];
private static $htmlCache = [];
/**
* @param bool $html Whether HTML support should be enabled. Disable it for XML documents
*/
public function __construct(bool $html = true)
{
$this->translator = new Translator();
if ($html) {
$this->translator->registerExtension(new HtmlExtension($this->translator));
$this->cache = &self::$htmlCache;
} else {
$this->cache = &self::$xmlCache;
}
$this->translator
->registerParserShortcut(new EmptyStringParser())
->registerParserShortcut(new ElementParser())
->registerParserShortcut(new ClassParser())
->registerParserShortcut(new HashParser())
;
}
/**
* Translates a CSS expression to its XPath equivalent.
*
* Optionally, a prefix can be added to the resulting XPath
* expression with the $prefix parameter.
*
* @return string
*/
public function toXPath(string $cssExpr, string $prefix = 'descendant-or-self::')
{
return $this->cache[$prefix][$cssExpr] ?? $this->cache[$prefix][$cssExpr] = $this->translator->cssToXPath($cssExpr, $prefix);
}
}
symfony/css-selector/Exception/ExceptionInterface.php 0000644 00000001123 15153552363 0017111 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Exception;
/**
* Interface for exceptions.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*/
interface ExceptionInterface extends \Throwable
{
}
symfony/css-selector/Exception/ExpressionErrorException.php 0000644 00000001201 15153552363 0020357 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Exception;
/**
* ParseException is thrown when a CSS selector syntax is not valid.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*/
class ExpressionErrorException extends ParseException
{
}
symfony/css-selector/Exception/InternalErrorException.php 0000644 00000001177 15153552363 0020010 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Exception;
/**
* ParseException is thrown when a CSS selector syntax is not valid.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*/
class InternalErrorException extends ParseException
{
}
symfony/css-selector/Exception/ParseException.php 0000644 00000001176 15153552363 0016273 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Exception;
/**
* ParseException is thrown when a CSS selector syntax is not valid.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ParseException extends \Exception implements ExceptionInterface
{
}
symfony/css-selector/Exception/SyntaxErrorException.php 0000644 00000003204 15153552363 0017513 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Exception;
use Symfony\Component\CssSelector\Parser\Token;
/**
* ParseException is thrown when a CSS selector syntax is not valid.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*/
class SyntaxErrorException extends ParseException
{
/**
* @return self
*/
public static function unexpectedToken(string $expectedValue, Token $foundToken)
{
return new self(sprintf('Expected %s, but %s found.', $expectedValue, $foundToken));
}
/**
* @return self
*/
public static function pseudoElementFound(string $pseudoElement, string $unexpectedLocation)
{
return new self(sprintf('Unexpected pseudo-element "::%s" found %s.', $pseudoElement, $unexpectedLocation));
}
/**
* @return self
*/
public static function unclosedString(int $position)
{
return new self(sprintf('Unclosed/invalid string at %s.', $position));
}
/**
* @return self
*/
public static function nestedNot()
{
return new self('Got nested ::not().');
}
/**
* @return self
*/
public static function stringAsFunctionArgument()
{
return new self('String not allowed as function argument.');
}
}
symfony/css-selector/LICENSE 0000644 00000002054 15153552363 0011674 0 ustar 00 Copyright (c) 2004-present Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
symfony/css-selector/Node/AbstractNode.php 0000644 00000001603 15153552363 0014635 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Node;
/**
* Abstract base node class.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
abstract class AbstractNode implements NodeInterface
{
/**
* @var string
*/
private $nodeName;
public function getNodeName(): string
{
if (null === $this->nodeName) {
$this->nodeName = preg_replace('~.*\\\\([^\\\\]+)Node$~', '$1', static::class);
}
return $this->nodeName;
}
}
symfony/css-selector/Node/AttributeNode.php 0000644 00000004114 15153552363 0015035 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Node;
/**
* Represents a "<selector>[<namespace>|<attribute> <operator> <value>]" node.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class AttributeNode extends AbstractNode
{
private $selector;
private $namespace;
private $attribute;
private $operator;
private $value;
public function __construct(NodeInterface $selector, ?string $namespace, string $attribute, string $operator, ?string $value)
{
$this->selector = $selector;
$this->namespace = $namespace;
$this->attribute = $attribute;
$this->operator = $operator;
$this->value = $value;
}
public function getSelector(): NodeInterface
{
return $this->selector;
}
public function getNamespace(): ?string
{
return $this->namespace;
}
public function getAttribute(): string
{
return $this->attribute;
}
public function getOperator(): string
{
return $this->operator;
}
public function getValue(): ?string
{
return $this->value;
}
/**
* {@inheritdoc}
*/
public function getSpecificity(): Specificity
{
return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0));
}
public function __toString(): string
{
$attribute = $this->namespace ? $this->namespace.'|'.$this->attribute : $this->attribute;
return 'exists' === $this->operator
? sprintf('%s[%s[%s]]', $this->getNodeName(), $this->selector, $attribute)
: sprintf("%s[%s[%s %s '%s']]", $this->getNodeName(), $this->selector, $attribute, $this->operator, $this->value);
}
}
symfony/css-selector/Node/ClassNode.php 0000644 00000002422 15153552363 0014137 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Node;
/**
* Represents a "<selector>.<name>" node.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class ClassNode extends AbstractNode
{
private $selector;
private $name;
public function __construct(NodeInterface $selector, string $name)
{
$this->selector = $selector;
$this->name = $name;
}
public function getSelector(): NodeInterface
{
return $this->selector;
}
public function getName(): string
{
return $this->name;
}
/**
* {@inheritdoc}
*/
public function getSpecificity(): Specificity
{
return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0));
}
public function __toString(): string
{
return sprintf('%s[%s.%s]', $this->getNodeName(), $this->selector, $this->name);
}
}
symfony/css-selector/Node/CombinedSelectorNode.php 0000644 00000003163 15153552363 0016316 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Node;
/**
* Represents a combined node.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class CombinedSelectorNode extends AbstractNode
{
private $selector;
private $combinator;
private $subSelector;
public function __construct(NodeInterface $selector, string $combinator, NodeInterface $subSelector)
{
$this->selector = $selector;
$this->combinator = $combinator;
$this->subSelector = $subSelector;
}
public function getSelector(): NodeInterface
{
return $this->selector;
}
public function getCombinator(): string
{
return $this->combinator;
}
public function getSubSelector(): NodeInterface
{
return $this->subSelector;
}
/**
* {@inheritdoc}
*/
public function getSpecificity(): Specificity
{
return $this->selector->getSpecificity()->plus($this->subSelector->getSpecificity());
}
public function __toString(): string
{
$combinator = ' ' === $this->combinator ? '<followed>' : $this->combinator;
return sprintf('%s[%s %s %s]', $this->getNodeName(), $this->selector, $combinator, $this->subSelector);
}
}
symfony/css-selector/Node/ElementNode.php 0000644 00000002545 15153552363 0014471 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Node;
/**
* Represents a "<namespace>|<element>" node.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class ElementNode extends AbstractNode
{
private $namespace;
private $element;
public function __construct(string $namespace = null, string $element = null)
{
$this->namespace = $namespace;
$this->element = $element;
}
public function getNamespace(): ?string
{
return $this->namespace;
}
public function getElement(): ?string
{
return $this->element;
}
/**
* {@inheritdoc}
*/
public function getSpecificity(): Specificity
{
return new Specificity(0, 0, $this->element ? 1 : 0);
}
public function __toString(): string
{
$element = $this->element ?: '*';
return sprintf('%s[%s]', $this->getNodeName(), $this->namespace ? $this->namespace.'|'.$element : $element);
}
}
symfony/css-selector/Node/FunctionNode.php 0000644 00000003445 15153552363 0014665 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Node;
use Symfony\Component\CssSelector\Parser\Token;
/**
* Represents a "<selector>:<name>(<arguments>)" node.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class FunctionNode extends AbstractNode
{
private $selector;
private $name;
private $arguments;
/**
* @param Token[] $arguments
*/
public function __construct(NodeInterface $selector, string $name, array $arguments = [])
{
$this->selector = $selector;
$this->name = strtolower($name);
$this->arguments = $arguments;
}
public function getSelector(): NodeInterface
{
return $this->selector;
}
public function getName(): string
{
return $this->name;
}
/**
* @return Token[]
*/
public function getArguments(): array
{
return $this->arguments;
}
/**
* {@inheritdoc}
*/
public function getSpecificity(): Specificity
{
return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0));
}
public function __toString(): string
{
$arguments = implode(', ', array_map(function (Token $token) {
return "'".$token->getValue()."'";
}, $this->arguments));
return sprintf('%s[%s:%s(%s)]', $this->getNodeName(), $this->selector, $this->name, $arguments ? '['.$arguments.']' : '');
}
}
symfony/css-selector/Node/HashNode.php 0000644 00000002401 15153552363 0013752 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Node;
/**
* Represents a "<selector>#<id>" node.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class HashNode extends AbstractNode
{
private $selector;
private $id;
public function __construct(NodeInterface $selector, string $id)
{
$this->selector = $selector;
$this->id = $id;
}
public function getSelector(): NodeInterface
{
return $this->selector;
}
public function getId(): string
{
return $this->id;
}
/**
* {@inheritdoc}
*/
public function getSpecificity(): Specificity
{
return $this->selector->getSpecificity()->plus(new Specificity(1, 0, 0));
}
public function __toString(): string
{
return sprintf('%s[%s#%s]', $this->getNodeName(), $this->selector, $this->id);
}
}
symfony/css-selector/Node/NegationNode.php 0000644 00000002560 15153552363 0014641 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Node;
/**
* Represents a "<selector>:not(<identifier>)" node.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class NegationNode extends AbstractNode
{
private $selector;
private $subSelector;
public function __construct(NodeInterface $selector, NodeInterface $subSelector)
{
$this->selector = $selector;
$this->subSelector = $subSelector;
}
public function getSelector(): NodeInterface
{
return $this->selector;
}
public function getSubSelector(): NodeInterface
{
return $this->subSelector;
}
/**
* {@inheritdoc}
*/
public function getSpecificity(): Specificity
{
return $this->selector->getSpecificity()->plus($this->subSelector->getSpecificity());
}
public function __toString(): string
{
return sprintf('%s[%s:not(%s)]', $this->getNodeName(), $this->selector, $this->subSelector);
}
}
symfony/css-selector/Node/NodeInterface.php 0000644 00000001313 15153552363 0014770 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Node;
/**
* Interface for nodes.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
interface NodeInterface
{
public function getNodeName(): string;
public function getSpecificity(): Specificity;
public function __toString(): string;
}
symfony/css-selector/Node/PseudoNode.php 0000644 00000002517 15153552363 0014336 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Node;
/**
* Represents a "<selector>:<identifier>" node.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class PseudoNode extends AbstractNode
{
private $selector;
private $identifier;
public function __construct(NodeInterface $selector, string $identifier)
{
$this->selector = $selector;
$this->identifier = strtolower($identifier);
}
public function getSelector(): NodeInterface
{
return $this->selector;
}
public function getIdentifier(): string
{
return $this->identifier;
}
/**
* {@inheritdoc}
*/
public function getSpecificity(): Specificity
{
return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0));
}
public function __toString(): string
{
return sprintf('%s[%s:%s]', $this->getNodeName(), $this->selector, $this->identifier);
}
}
symfony/css-selector/Node/SelectorNode.php 0000644 00000002651 15153552363 0014656 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Node;
/**
* Represents a "<selector>(::|:)<pseudoElement>" node.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class SelectorNode extends AbstractNode
{
private $tree;
private $pseudoElement;
public function __construct(NodeInterface $tree, string $pseudoElement = null)
{
$this->tree = $tree;
$this->pseudoElement = $pseudoElement ? strtolower($pseudoElement) : null;
}
public function getTree(): NodeInterface
{
return $this->tree;
}
public function getPseudoElement(): ?string
{
return $this->pseudoElement;
}
/**
* {@inheritdoc}
*/
public function getSpecificity(): Specificity
{
return $this->tree->getSpecificity()->plus(new Specificity(0, 0, $this->pseudoElement ? 1 : 0));
}
public function __toString(): string
{
return sprintf('%s[%s%s]', $this->getNodeName(), $this->tree, $this->pseudoElement ? '::'.$this->pseudoElement : '');
}
}
symfony/css-selector/Node/Specificity.php 0000644 00000003414 15153552363 0014541 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Node;
/**
* Represents a node specificity.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @see http://www.w3.org/TR/selectors/#specificity
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class Specificity
{
public const A_FACTOR = 100;
public const B_FACTOR = 10;
public const C_FACTOR = 1;
private $a;
private $b;
private $c;
public function __construct(int $a, int $b, int $c)
{
$this->a = $a;
$this->b = $b;
$this->c = $c;
}
public function plus(self $specificity): self
{
return new self($this->a + $specificity->a, $this->b + $specificity->b, $this->c + $specificity->c);
}
public function getValue(): int
{
return $this->a * self::A_FACTOR + $this->b * self::B_FACTOR + $this->c * self::C_FACTOR;
}
/**
* Returns -1 if the object specificity is lower than the argument,
* 0 if they are equal, and 1 if the argument is lower.
*/
public function compareTo(self $specificity): int
{
if ($this->a !== $specificity->a) {
return $this->a > $specificity->a ? 1 : -1;
}
if ($this->b !== $specificity->b) {
return $this->b > $specificity->b ? 1 : -1;
}
if ($this->c !== $specificity->c) {
return $this->c > $specificity->c ? 1 : -1;
}
return 0;
}
}
symfony/css-selector/Parser/Handler/CommentHandler.php 0000644 00000002162 15153552363 0017111 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser\Handler;
use Symfony\Component\CssSelector\Parser\Reader;
use Symfony\Component\CssSelector\Parser\TokenStream;
/**
* CSS selector comment handler.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class CommentHandler implements HandlerInterface
{
/**
* {@inheritdoc}
*/
public function handle(Reader $reader, TokenStream $stream): bool
{
if ('/*' !== $reader->getSubstring(2)) {
return false;
}
$offset = $reader->getOffset('*/');
if (false === $offset) {
$reader->moveToEnd();
} else {
$reader->moveForward($offset + 2);
}
return true;
}
}
symfony/css-selector/Parser/Handler/HandlerInterface.php 0000644 00000001410 15153552363 0017402 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser\Handler;
use Symfony\Component\CssSelector\Parser\Reader;
use Symfony\Component\CssSelector\Parser\TokenStream;
/**
* CSS selector handler interface.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
interface HandlerInterface
{
public function handle(Reader $reader, TokenStream $stream): bool;
}
symfony/css-selector/Parser/Handler/HashHandler.php 0000644 00000003104 15153552363 0016367 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser\Handler;
use Symfony\Component\CssSelector\Parser\Reader;
use Symfony\Component\CssSelector\Parser\Token;
use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping;
use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns;
use Symfony\Component\CssSelector\Parser\TokenStream;
/**
* CSS selector comment handler.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class HashHandler implements HandlerInterface
{
private $patterns;
private $escaping;
public function __construct(TokenizerPatterns $patterns, TokenizerEscaping $escaping)
{
$this->patterns = $patterns;
$this->escaping = $escaping;
}
/**
* {@inheritdoc}
*/
public function handle(Reader $reader, TokenStream $stream): bool
{
$match = $reader->findPattern($this->patterns->getHashPattern());
if (!$match) {
return false;
}
$value = $this->escaping->escapeUnicode($match[1]);
$stream->push(new Token(Token::TYPE_HASH, $value, $reader->getPosition()));
$reader->moveForward(\strlen($match[0]));
return true;
}
}
symfony/css-selector/Parser/Handler/IdentifierHandler.php 0000644 00000003126 15153552363 0017572 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser\Handler;
use Symfony\Component\CssSelector\Parser\Reader;
use Symfony\Component\CssSelector\Parser\Token;
use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping;
use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns;
use Symfony\Component\CssSelector\Parser\TokenStream;
/**
* CSS selector comment handler.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class IdentifierHandler implements HandlerInterface
{
private $patterns;
private $escaping;
public function __construct(TokenizerPatterns $patterns, TokenizerEscaping $escaping)
{
$this->patterns = $patterns;
$this->escaping = $escaping;
}
/**
* {@inheritdoc}
*/
public function handle(Reader $reader, TokenStream $stream): bool
{
$match = $reader->findPattern($this->patterns->getIdentifierPattern());
if (!$match) {
return false;
}
$value = $this->escaping->escapeUnicode($match[0]);
$stream->push(new Token(Token::TYPE_IDENTIFIER, $value, $reader->getPosition()));
$reader->moveForward(\strlen($match[0]));
return true;
}
}
symfony/css-selector/Parser/Handler/NumberHandler.php 0000644 00000002562 15153552363 0016743 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser\Handler;
use Symfony\Component\CssSelector\Parser\Reader;
use Symfony\Component\CssSelector\Parser\Token;
use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns;
use Symfony\Component\CssSelector\Parser\TokenStream;
/**
* CSS selector comment handler.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class NumberHandler implements HandlerInterface
{
private $patterns;
public function __construct(TokenizerPatterns $patterns)
{
$this->patterns = $patterns;
}
/**
* {@inheritdoc}
*/
public function handle(Reader $reader, TokenStream $stream): bool
{
$match = $reader->findPattern($this->patterns->getNumberPattern());
if (!$match) {
return false;
}
$stream->push(new Token(Token::TYPE_NUMBER, $match[0], $reader->getPosition()));
$reader->moveForward(\strlen($match[0]));
return true;
}
}
symfony/css-selector/Parser/Handler/StringHandler.php 0000644 00000004607 15153552363 0016763 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser\Handler;
use Symfony\Component\CssSelector\Exception\InternalErrorException;
use Symfony\Component\CssSelector\Exception\SyntaxErrorException;
use Symfony\Component\CssSelector\Parser\Reader;
use Symfony\Component\CssSelector\Parser\Token;
use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping;
use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns;
use Symfony\Component\CssSelector\Parser\TokenStream;
/**
* CSS selector comment handler.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class StringHandler implements HandlerInterface
{
private $patterns;
private $escaping;
public function __construct(TokenizerPatterns $patterns, TokenizerEscaping $escaping)
{
$this->patterns = $patterns;
$this->escaping = $escaping;
}
/**
* {@inheritdoc}
*/
public function handle(Reader $reader, TokenStream $stream): bool
{
$quote = $reader->getSubstring(1);
if (!\in_array($quote, ["'", '"'])) {
return false;
}
$reader->moveForward(1);
$match = $reader->findPattern($this->patterns->getQuotedStringPattern($quote));
if (!$match) {
throw new InternalErrorException(sprintf('Should have found at least an empty match at %d.', $reader->getPosition()));
}
// check unclosed strings
if (\strlen($match[0]) === $reader->getRemainingLength()) {
throw SyntaxErrorException::unclosedString($reader->getPosition() - 1);
}
// check quotes pairs validity
if ($quote !== $reader->getSubstring(1, \strlen($match[0]))) {
throw SyntaxErrorException::unclosedString($reader->getPosition() - 1);
}
$string = $this->escaping->escapeUnicodeAndNewLine($match[0]);
$stream->push(new Token(Token::TYPE_STRING, $string, $reader->getPosition()));
$reader->moveForward(\strlen($match[0]) + 1);
return true;
}
}
symfony/css-selector/Parser/Handler/WhitespaceHandler.php 0000644 00000002247 15153552363 0017607 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser\Handler;
use Symfony\Component\CssSelector\Parser\Reader;
use Symfony\Component\CssSelector\Parser\Token;
use Symfony\Component\CssSelector\Parser\TokenStream;
/**
* CSS selector whitespace handler.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class WhitespaceHandler implements HandlerInterface
{
/**
* {@inheritdoc}
*/
public function handle(Reader $reader, TokenStream $stream): bool
{
$match = $reader->findPattern('~^[ \t\r\n\f]+~');
if (false === $match) {
return false;
}
$stream->push(new Token(Token::TYPE_WHITESPACE, $match[0], $reader->getPosition()));
$reader->moveForward(\strlen($match[0]));
return true;
}
}
symfony/css-selector/Parser/Parser.php 0000644 00000026542 15153552363 0014100 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser;
use Symfony\Component\CssSelector\Exception\SyntaxErrorException;
use Symfony\Component\CssSelector\Node;
use Symfony\Component\CssSelector\Parser\Tokenizer\Tokenizer;
/**
* CSS selector parser.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class Parser implements ParserInterface
{
private $tokenizer;
public function __construct(Tokenizer $tokenizer = null)
{
$this->tokenizer = $tokenizer ?? new Tokenizer();
}
/**
* {@inheritdoc}
*/
public function parse(string $source): array
{
$reader = new Reader($source);
$stream = $this->tokenizer->tokenize($reader);
return $this->parseSelectorList($stream);
}
/**
* Parses the arguments for ":nth-child()" and friends.
*
* @param Token[] $tokens
*
* @throws SyntaxErrorException
*/
public static function parseSeries(array $tokens): array
{
foreach ($tokens as $token) {
if ($token->isString()) {
throw SyntaxErrorException::stringAsFunctionArgument();
}
}
$joined = trim(implode('', array_map(function (Token $token) {
return $token->getValue();
}, $tokens)));
$int = function ($string) {
if (!is_numeric($string)) {
throw SyntaxErrorException::stringAsFunctionArgument();
}
return (int) $string;
};
switch (true) {
case 'odd' === $joined:
return [2, 1];
case 'even' === $joined:
return [2, 0];
case 'n' === $joined:
return [1, 0];
case !str_contains($joined, 'n'):
return [0, $int($joined)];
}
$split = explode('n', $joined);
$first = $split[0] ?? null;
return [
$first ? ('-' === $first || '+' === $first ? $int($first.'1') : $int($first)) : 1,
isset($split[1]) && $split[1] ? $int($split[1]) : 0,
];
}
private function parseSelectorList(TokenStream $stream): array
{
$stream->skipWhitespace();
$selectors = [];
while (true) {
$selectors[] = $this->parserSelectorNode($stream);
if ($stream->getPeek()->isDelimiter([','])) {
$stream->getNext();
$stream->skipWhitespace();
} else {
break;
}
}
return $selectors;
}
private function parserSelectorNode(TokenStream $stream): Node\SelectorNode
{
[$result, $pseudoElement] = $this->parseSimpleSelector($stream);
while (true) {
$stream->skipWhitespace();
$peek = $stream->getPeek();
if ($peek->isFileEnd() || $peek->isDelimiter([','])) {
break;
}
if (null !== $pseudoElement) {
throw SyntaxErrorException::pseudoElementFound($pseudoElement, 'not at the end of a selector');
}
if ($peek->isDelimiter(['+', '>', '~'])) {
$combinator = $stream->getNext()->getValue();
$stream->skipWhitespace();
} else {
$combinator = ' ';
}
[$nextSelector, $pseudoElement] = $this->parseSimpleSelector($stream);
$result = new Node\CombinedSelectorNode($result, $combinator, $nextSelector);
}
return new Node\SelectorNode($result, $pseudoElement);
}
/**
* Parses next simple node (hash, class, pseudo, negation).
*
* @throws SyntaxErrorException
*/
private function parseSimpleSelector(TokenStream $stream, bool $insideNegation = false): array
{
$stream->skipWhitespace();
$selectorStart = \count($stream->getUsed());
$result = $this->parseElementNode($stream);
$pseudoElement = null;
while (true) {
$peek = $stream->getPeek();
if ($peek->isWhitespace()
|| $peek->isFileEnd()
|| $peek->isDelimiter([',', '+', '>', '~'])
|| ($insideNegation && $peek->isDelimiter([')']))
) {
break;
}
if (null !== $pseudoElement) {
throw SyntaxErrorException::pseudoElementFound($pseudoElement, 'not at the end of a selector');
}
if ($peek->isHash()) {
$result = new Node\HashNode($result, $stream->getNext()->getValue());
} elseif ($peek->isDelimiter(['.'])) {
$stream->getNext();
$result = new Node\ClassNode($result, $stream->getNextIdentifier());
} elseif ($peek->isDelimiter(['['])) {
$stream->getNext();
$result = $this->parseAttributeNode($result, $stream);
} elseif ($peek->isDelimiter([':'])) {
$stream->getNext();
if ($stream->getPeek()->isDelimiter([':'])) {
$stream->getNext();
$pseudoElement = $stream->getNextIdentifier();
continue;
}
$identifier = $stream->getNextIdentifier();
if (\in_array(strtolower($identifier), ['first-line', 'first-letter', 'before', 'after'])) {
// Special case: CSS 2.1 pseudo-elements can have a single ':'.
// Any new pseudo-element must have two.
$pseudoElement = $identifier;
continue;
}
if (!$stream->getPeek()->isDelimiter(['('])) {
$result = new Node\PseudoNode($result, $identifier);
continue;
}
$stream->getNext();
$stream->skipWhitespace();
if ('not' === strtolower($identifier)) {
if ($insideNegation) {
throw SyntaxErrorException::nestedNot();
}
[$argument, $argumentPseudoElement] = $this->parseSimpleSelector($stream, true);
$next = $stream->getNext();
if (null !== $argumentPseudoElement) {
throw SyntaxErrorException::pseudoElementFound($argumentPseudoElement, 'inside ::not()');
}
if (!$next->isDelimiter([')'])) {
throw SyntaxErrorException::unexpectedToken('")"', $next);
}
$result = new Node\NegationNode($result, $argument);
} else {
$arguments = [];
$next = null;
while (true) {
$stream->skipWhitespace();
$next = $stream->getNext();
if ($next->isIdentifier()
|| $next->isString()
|| $next->isNumber()
|| $next->isDelimiter(['+', '-'])
) {
$arguments[] = $next;
} elseif ($next->isDelimiter([')'])) {
break;
} else {
throw SyntaxErrorException::unexpectedToken('an argument', $next);
}
}
if (empty($arguments)) {
throw SyntaxErrorException::unexpectedToken('at least one argument', $next);
}
$result = new Node\FunctionNode($result, $identifier, $arguments);
}
} else {
throw SyntaxErrorException::unexpectedToken('selector', $peek);
}
}
if (\count($stream->getUsed()) === $selectorStart) {
throw SyntaxErrorException::unexpectedToken('selector', $stream->getPeek());
}
return [$result, $pseudoElement];
}
private function parseElementNode(TokenStream $stream): Node\ElementNode
{
$peek = $stream->getPeek();
if ($peek->isIdentifier() || $peek->isDelimiter(['*'])) {
if ($peek->isIdentifier()) {
$namespace = $stream->getNext()->getValue();
} else {
$stream->getNext();
$namespace = null;
}
if ($stream->getPeek()->isDelimiter(['|'])) {
$stream->getNext();
$element = $stream->getNextIdentifierOrStar();
} else {
$element = $namespace;
$namespace = null;
}
} else {
$element = $namespace = null;
}
return new Node\ElementNode($namespace, $element);
}
private function parseAttributeNode(Node\NodeInterface $selector, TokenStream $stream): Node\AttributeNode
{
$stream->skipWhitespace();
$attribute = $stream->getNextIdentifierOrStar();
if (null === $attribute && !$stream->getPeek()->isDelimiter(['|'])) {
throw SyntaxErrorException::unexpectedToken('"|"', $stream->getPeek());
}
if ($stream->getPeek()->isDelimiter(['|'])) {
$stream->getNext();
if ($stream->getPeek()->isDelimiter(['='])) {
$namespace = null;
$stream->getNext();
$operator = '|=';
} else {
$namespace = $attribute;
$attribute = $stream->getNextIdentifier();
$operator = null;
}
} else {
$namespace = $operator = null;
}
if (null === $operator) {
$stream->skipWhitespace();
$next = $stream->getNext();
if ($next->isDelimiter([']'])) {
return new Node\AttributeNode($selector, $namespace, $attribute, 'exists', null);
} elseif ($next->isDelimiter(['='])) {
$operator = '=';
} elseif ($next->isDelimiter(['^', '$', '*', '~', '|', '!'])
&& $stream->getPeek()->isDelimiter(['='])
) {
$operator = $next->getValue().'=';
$stream->getNext();
} else {
throw SyntaxErrorException::unexpectedToken('operator', $next);
}
}
$stream->skipWhitespace();
$value = $stream->getNext();
if ($value->isNumber()) {
// if the value is a number, it's casted into a string
$value = new Token(Token::TYPE_STRING, (string) $value->getValue(), $value->getPosition());
}
if (!($value->isIdentifier() || $value->isString())) {
throw SyntaxErrorException::unexpectedToken('string or identifier', $value);
}
$stream->skipWhitespace();
$next = $stream->getNext();
if (!$next->isDelimiter([']'])) {
throw SyntaxErrorException::unexpectedToken('"]"', $next);
}
return new Node\AttributeNode($selector, $namespace, $attribute, $operator, $value->getValue());
}
}
symfony/css-selector/Parser/ParserInterface.php 0000644 00000001451 15153552363 0015711 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser;
use Symfony\Component\CssSelector\Node\SelectorNode;
/**
* CSS selector parser interface.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
interface ParserInterface
{
/**
* Parses given selector source into an array of tokens.
*
* @return SelectorNode[]
*/
public function parse(string $source): array;
}
symfony/css-selector/Parser/Reader.php 0000644 00000003532 15153552363 0014040 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser;
/**
* CSS selector reader.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class Reader
{
private $source;
private $length;
private $position = 0;
public function __construct(string $source)
{
$this->source = $source;
$this->length = \strlen($source);
}
public function isEOF(): bool
{
return $this->position >= $this->length;
}
public function getPosition(): int
{
return $this->position;
}
public function getRemainingLength(): int
{
return $this->length - $this->position;
}
public function getSubstring(int $length, int $offset = 0): string
{
return substr($this->source, $this->position + $offset, $length);
}
public function getOffset(string $string)
{
$position = strpos($this->source, $string, $this->position);
return false === $position ? false : $position - $this->position;
}
/**
* @return array|false
*/
public function findPattern(string $pattern)
{
$source = substr($this->source, $this->position);
if (preg_match($pattern, $source, $matches)) {
return $matches;
}
return false;
}
public function moveForward(int $length)
{
$this->position += $length;
}
public function moveToEnd()
{
$this->position = $this->length;
}
}
symfony/css-selector/Parser/Shortcut/ClassParser.php 0000644 00000003074 15153552363 0016674 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser\Shortcut;
use Symfony\Component\CssSelector\Node\ClassNode;
use Symfony\Component\CssSelector\Node\ElementNode;
use Symfony\Component\CssSelector\Node\SelectorNode;
use Symfony\Component\CssSelector\Parser\ParserInterface;
/**
* CSS selector class parser shortcut.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class ClassParser implements ParserInterface
{
/**
* {@inheritdoc}
*/
public function parse(string $source): array
{
// Matches an optional namespace, optional element, and required class
// $source = 'test|input.ab6bd_field';
// $matches = array (size=4)
// 0 => string 'test|input.ab6bd_field' (length=22)
// 1 => string 'test' (length=4)
// 2 => string 'input' (length=5)
// 3 => string 'ab6bd_field' (length=11)
if (preg_match('/^(?:([a-z]++)\|)?+([\w-]++|\*)?+\.([\w-]++)$/i', trim($source), $matches)) {
return [
new SelectorNode(new ClassNode(new ElementNode($matches[1] ?: null, $matches[2] ?: null), $matches[3])),
];
}
return [];
}
}
symfony/css-selector/Parser/Shortcut/ElementParser.php 0000644 00000002554 15153552363 0017222 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser\Shortcut;
use Symfony\Component\CssSelector\Node\ElementNode;
use Symfony\Component\CssSelector\Node\SelectorNode;
use Symfony\Component\CssSelector\Parser\ParserInterface;
/**
* CSS selector element parser shortcut.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class ElementParser implements ParserInterface
{
/**
* {@inheritdoc}
*/
public function parse(string $source): array
{
// Matches an optional namespace, required element or `*`
// $source = 'testns|testel';
// $matches = array (size=3)
// 0 => string 'testns|testel' (length=13)
// 1 => string 'testns' (length=6)
// 2 => string 'testel' (length=6)
if (preg_match('/^(?:([a-z]++)\|)?([\w-]++|\*)$/i', trim($source), $matches)) {
return [new SelectorNode(new ElementNode($matches[1] ?: null, $matches[2]))];
}
return [];
}
}
symfony/css-selector/Parser/Shortcut/EmptyStringParser.php 0000644 00000002316 15153552363 0020112 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser\Shortcut;
use Symfony\Component\CssSelector\Node\ElementNode;
use Symfony\Component\CssSelector\Node\SelectorNode;
use Symfony\Component\CssSelector\Parser\ParserInterface;
/**
* CSS selector class parser shortcut.
*
* This shortcut ensure compatibility with previous version.
* - The parser fails to parse an empty string.
* - In the previous version, an empty string matches each tags.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class EmptyStringParser implements ParserInterface
{
/**
* {@inheritdoc}
*/
public function parse(string $source): array
{
// Matches an empty string
if ('' == $source) {
return [new SelectorNode(new ElementNode(null, '*'))];
}
return [];
}
}
symfony/css-selector/Parser/Shortcut/HashParser.php 0000644 00000003064 15153552363 0016511 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser\Shortcut;
use Symfony\Component\CssSelector\Node\ElementNode;
use Symfony\Component\CssSelector\Node\HashNode;
use Symfony\Component\CssSelector\Node\SelectorNode;
use Symfony\Component\CssSelector\Parser\ParserInterface;
/**
* CSS selector hash parser shortcut.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class HashParser implements ParserInterface
{
/**
* {@inheritdoc}
*/
public function parse(string $source): array
{
// Matches an optional namespace, optional element, and required id
// $source = 'test|input#ab6bd_field';
// $matches = array (size=4)
// 0 => string 'test|input#ab6bd_field' (length=22)
// 1 => string 'test' (length=4)
// 2 => string 'input' (length=5)
// 3 => string 'ab6bd_field' (length=11)
if (preg_match('/^(?:([a-z]++)\|)?+([\w-]++|\*)?+#([\w-]++)$/i', trim($source), $matches)) {
return [
new SelectorNode(new HashNode(new ElementNode($matches[1] ?: null, $matches[2] ?: null), $matches[3])),
];
}
return [];
}
}
symfony/css-selector/Parser/Token.php 0000644 00000004714 15153552363 0013721 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser;
/**
* CSS selector token.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class Token
{
public const TYPE_FILE_END = 'eof';
public const TYPE_DELIMITER = 'delimiter';
public const TYPE_WHITESPACE = 'whitespace';
public const TYPE_IDENTIFIER = 'identifier';
public const TYPE_HASH = 'hash';
public const TYPE_NUMBER = 'number';
public const TYPE_STRING = 'string';
private $type;
private $value;
private $position;
public function __construct(?string $type, ?string $value, ?int $position)
{
$this->type = $type;
$this->value = $value;
$this->position = $position;
}
public function getType(): ?int
{
return $this->type;
}
public function getValue(): ?string
{
return $this->value;
}
public function getPosition(): ?int
{
return $this->position;
}
public function isFileEnd(): bool
{
return self::TYPE_FILE_END === $this->type;
}
public function isDelimiter(array $values = []): bool
{
if (self::TYPE_DELIMITER !== $this->type) {
return false;
}
if (empty($values)) {
return true;
}
return \in_array($this->value, $values);
}
public function isWhitespace(): bool
{
return self::TYPE_WHITESPACE === $this->type;
}
public function isIdentifier(): bool
{
return self::TYPE_IDENTIFIER === $this->type;
}
public function isHash(): bool
{
return self::TYPE_HASH === $this->type;
}
public function isNumber(): bool
{
return self::TYPE_NUMBER === $this->type;
}
public function isString(): bool
{
return self::TYPE_STRING === $this->type;
}
public function __toString(): string
{
if ($this->value) {
return sprintf('<%s "%s" at %s>', $this->type, $this->value, $this->position);
}
return sprintf('<%s at %s>', $this->type, $this->position);
}
}
symfony/css-selector/Parser/TokenStream.php 0000644 00000006470 15153552363 0015076 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser;
use Symfony\Component\CssSelector\Exception\InternalErrorException;
use Symfony\Component\CssSelector\Exception\SyntaxErrorException;
/**
* CSS selector token stream.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class TokenStream
{
/**
* @var Token[]
*/
private $tokens = [];
/**
* @var Token[]
*/
private $used = [];
/**
* @var int
*/
private $cursor = 0;
/**
* @var Token|null
*/
private $peeked;
/**
* @var bool
*/
private $peeking = false;
/**
* Pushes a token.
*
* @return $this
*/
public function push(Token $token): self
{
$this->tokens[] = $token;
return $this;
}
/**
* Freezes stream.
*
* @return $this
*/
public function freeze(): self
{
return $this;
}
/**
* Returns next token.
*
* @throws InternalErrorException If there is no more token
*/
public function getNext(): Token
{
if ($this->peeking) {
$this->peeking = false;
$this->used[] = $this->peeked;
return $this->peeked;
}
if (!isset($this->tokens[$this->cursor])) {
throw new InternalErrorException('Unexpected token stream end.');
}
return $this->tokens[$this->cursor++];
}
/**
* Returns peeked token.
*/
public function getPeek(): Token
{
if (!$this->peeking) {
$this->peeked = $this->getNext();
$this->peeking = true;
}
return $this->peeked;
}
/**
* Returns used tokens.
*
* @return Token[]
*/
public function getUsed(): array
{
return $this->used;
}
/**
* Returns next identifier token.
*
* @throws SyntaxErrorException If next token is not an identifier
*/
public function getNextIdentifier(): string
{
$next = $this->getNext();
if (!$next->isIdentifier()) {
throw SyntaxErrorException::unexpectedToken('identifier', $next);
}
return $next->getValue();
}
/**
* Returns next identifier or null if star delimiter token is found.
*
* @throws SyntaxErrorException If next token is not an identifier or a star delimiter
*/
public function getNextIdentifierOrStar(): ?string
{
$next = $this->getNext();
if ($next->isIdentifier()) {
return $next->getValue();
}
if ($next->isDelimiter(['*'])) {
return null;
}
throw SyntaxErrorException::unexpectedToken('identifier or "*"', $next);
}
/**
* Skips next whitespace if any.
*/
public function skipWhitespace()
{
$peek = $this->getPeek();
if ($peek->isWhitespace()) {
$this->getNext();
}
}
}
symfony/css-selector/Parser/Tokenizer/Tokenizer.php 0000644 00000003762 15153552363 0016567 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser\Tokenizer;
use Symfony\Component\CssSelector\Parser\Handler;
use Symfony\Component\CssSelector\Parser\Reader;
use Symfony\Component\CssSelector\Parser\Token;
use Symfony\Component\CssSelector\Parser\TokenStream;
/**
* CSS selector tokenizer.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class Tokenizer
{
/**
* @var Handler\HandlerInterface[]
*/
private $handlers;
public function __construct()
{
$patterns = new TokenizerPatterns();
$escaping = new TokenizerEscaping($patterns);
$this->handlers = [
new Handler\WhitespaceHandler(),
new Handler\IdentifierHandler($patterns, $escaping),
new Handler\HashHandler($patterns, $escaping),
new Handler\StringHandler($patterns, $escaping),
new Handler\NumberHandler($patterns),
new Handler\CommentHandler(),
];
}
/**
* Tokenize selector source code.
*/
public function tokenize(Reader $reader): TokenStream
{
$stream = new TokenStream();
while (!$reader->isEOF()) {
foreach ($this->handlers as $handler) {
if ($handler->handle($reader, $stream)) {
continue 2;
}
}
$stream->push(new Token(Token::TYPE_DELIMITER, $reader->getSubstring(1), $reader->getPosition()));
$reader->moveForward(1);
}
return $stream
->push(new Token(Token::TYPE_FILE_END, null, $reader->getPosition()))
->freeze();
}
}
symfony/css-selector/Parser/Tokenizer/TokenizerEscaping.php 0000644 00000003360 15153552363 0020233 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser\Tokenizer;
/**
* CSS selector tokenizer escaping applier.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class TokenizerEscaping
{
private $patterns;
public function __construct(TokenizerPatterns $patterns)
{
$this->patterns = $patterns;
}
public function escapeUnicode(string $value): string
{
$value = $this->replaceUnicodeSequences($value);
return preg_replace($this->patterns->getSimpleEscapePattern(), '$1', $value);
}
public function escapeUnicodeAndNewLine(string $value): string
{
$value = preg_replace($this->patterns->getNewLineEscapePattern(), '', $value);
return $this->escapeUnicode($value);
}
private function replaceUnicodeSequences(string $value): string
{
return preg_replace_callback($this->patterns->getUnicodeEscapePattern(), function ($match) {
$c = hexdec($match[1]);
if (0x80 > $c %= 0x200000) {
return \chr($c);
}
if (0x800 > $c) {
return \chr(0xC0 | $c >> 6).\chr(0x80 | $c & 0x3F);
}
if (0x10000 > $c) {
return \chr(0xE0 | $c >> 12).\chr(0x80 | $c >> 6 & 0x3F).\chr(0x80 | $c & 0x3F);
}
return '';
}, $value);
}
}
symfony/css-selector/Parser/Tokenizer/TokenizerPatterns.php 0000644 00000005332 15153552363 0020303 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Parser\Tokenizer;
/**
* CSS selector tokenizer patterns builder.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class TokenizerPatterns
{
private $unicodeEscapePattern;
private $simpleEscapePattern;
private $newLineEscapePattern;
private $escapePattern;
private $stringEscapePattern;
private $nonAsciiPattern;
private $nmCharPattern;
private $nmStartPattern;
private $identifierPattern;
private $hashPattern;
private $numberPattern;
private $quotedStringPattern;
public function __construct()
{
$this->unicodeEscapePattern = '\\\\([0-9a-f]{1,6})(?:\r\n|[ \n\r\t\f])?';
$this->simpleEscapePattern = '\\\\(.)';
$this->newLineEscapePattern = '\\\\(?:\n|\r\n|\r|\f)';
$this->escapePattern = $this->unicodeEscapePattern.'|\\\\[^\n\r\f0-9a-f]';
$this->stringEscapePattern = $this->newLineEscapePattern.'|'.$this->escapePattern;
$this->nonAsciiPattern = '[^\x00-\x7F]';
$this->nmCharPattern = '[_a-z0-9-]|'.$this->escapePattern.'|'.$this->nonAsciiPattern;
$this->nmStartPattern = '[_a-z]|'.$this->escapePattern.'|'.$this->nonAsciiPattern;
$this->identifierPattern = '-?(?:'.$this->nmStartPattern.')(?:'.$this->nmCharPattern.')*';
$this->hashPattern = '#((?:'.$this->nmCharPattern.')+)';
$this->numberPattern = '[+-]?(?:[0-9]*\.[0-9]+|[0-9]+)';
$this->quotedStringPattern = '([^\n\r\f\\\\%s]|'.$this->stringEscapePattern.')*';
}
public function getNewLineEscapePattern(): string
{
return '~'.$this->newLineEscapePattern.'~';
}
public function getSimpleEscapePattern(): string
{
return '~'.$this->simpleEscapePattern.'~';
}
public function getUnicodeEscapePattern(): string
{
return '~'.$this->unicodeEscapePattern.'~i';
}
public function getIdentifierPattern(): string
{
return '~^'.$this->identifierPattern.'~i';
}
public function getHashPattern(): string
{
return '~^'.$this->hashPattern.'~i';
}
public function getNumberPattern(): string
{
return '~^'.$this->numberPattern.'~';
}
public function getQuotedStringPattern(string $quote): string
{
return '~^'.sprintf($this->quotedStringPattern, $quote).'~i';
}
}
symfony/css-selector/XPath/Extension/AbstractExtension.php 0000644 00000002365 15153552363 0020045 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\XPath\Extension;
/**
* XPath expression translator abstract extension.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
abstract class AbstractExtension implements ExtensionInterface
{
/**
* {@inheritdoc}
*/
public function getNodeTranslators(): array
{
return [];
}
/**
* {@inheritdoc}
*/
public function getCombinationTranslators(): array
{
return [];
}
/**
* {@inheritdoc}
*/
public function getFunctionTranslators(): array
{
return [];
}
/**
* {@inheritdoc}
*/
public function getPseudoClassTranslators(): array
{
return [];
}
/**
* {@inheritdoc}
*/
public function getAttributeMatchingTranslators(): array
{
return [];
}
}
symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php 0000644 00000007356 15153552363 0021725 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\XPath\Extension;
use Symfony\Component\CssSelector\XPath\Translator;
use Symfony\Component\CssSelector\XPath\XPathExpr;
/**
* XPath expression translator attribute extension.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class AttributeMatchingExtension extends AbstractExtension
{
/**
* {@inheritdoc}
*/
public function getAttributeMatchingTranslators(): array
{
return [
'exists' => [$this, 'translateExists'],
'=' => [$this, 'translateEquals'],
'~=' => [$this, 'translateIncludes'],
'|=' => [$this, 'translateDashMatch'],
'^=' => [$this, 'translatePrefixMatch'],
'$=' => [$this, 'translateSuffixMatch'],
'*=' => [$this, 'translateSubstringMatch'],
'!=' => [$this, 'translateDifferent'],
];
}
public function translateExists(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
{
return $xpath->addCondition($attribute);
}
public function translateEquals(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
{
return $xpath->addCondition(sprintf('%s = %s', $attribute, Translator::getXpathLiteral($value)));
}
public function translateIncludes(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
{
return $xpath->addCondition($value ? sprintf(
'%1$s and contains(concat(\' \', normalize-space(%1$s), \' \'), %2$s)',
$attribute,
Translator::getXpathLiteral(' '.$value.' ')
) : '0');
}
public function translateDashMatch(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
{
return $xpath->addCondition(sprintf(
'%1$s and (%1$s = %2$s or starts-with(%1$s, %3$s))',
$attribute,
Translator::getXpathLiteral($value),
Translator::getXpathLiteral($value.'-')
));
}
public function translatePrefixMatch(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
{
return $xpath->addCondition($value ? sprintf(
'%1$s and starts-with(%1$s, %2$s)',
$attribute,
Translator::getXpathLiteral($value)
) : '0');
}
public function translateSuffixMatch(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
{
return $xpath->addCondition($value ? sprintf(
'%1$s and substring(%1$s, string-length(%1$s)-%2$s) = %3$s',
$attribute,
\strlen($value) - 1,
Translator::getXpathLiteral($value)
) : '0');
}
public function translateSubstringMatch(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
{
return $xpath->addCondition($value ? sprintf(
'%1$s and contains(%1$s, %2$s)',
$attribute,
Translator::getXpathLiteral($value)
) : '0');
}
public function translateDifferent(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
{
return $xpath->addCondition(sprintf(
$value ? 'not(%1$s) or %1$s != %2$s' : '%s != %s',
$attribute,
Translator::getXpathLiteral($value)
));
}
/**
* {@inheritdoc}
*/
public function getName(): string
{
return 'attribute-matching';
}
}
symfony/css-selector/XPath/Extension/CombinationExtension.php 0000644 00000003625 15153552363 0020544 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\XPath\Extension;
use Symfony\Component\CssSelector\XPath\XPathExpr;
/**
* XPath expression translator combination extension.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class CombinationExtension extends AbstractExtension
{
/**
* {@inheritdoc}
*/
public function getCombinationTranslators(): array
{
return [
' ' => [$this, 'translateDescendant'],
'>' => [$this, 'translateChild'],
'+' => [$this, 'translateDirectAdjacent'],
'~' => [$this, 'translateIndirectAdjacent'],
];
}
public function translateDescendant(XPathExpr $xpath, XPathExpr $combinedXpath): XPathExpr
{
return $xpath->join('/descendant-or-self::*/', $combinedXpath);
}
public function translateChild(XPathExpr $xpath, XPathExpr $combinedXpath): XPathExpr
{
return $xpath->join('/', $combinedXpath);
}
public function translateDirectAdjacent(XPathExpr $xpath, XPathExpr $combinedXpath): XPathExpr
{
return $xpath
->join('/following-sibling::', $combinedXpath)
->addNameTest()
->addCondition('position() = 1');
}
public function translateIndirectAdjacent(XPathExpr $xpath, XPathExpr $combinedXpath): XPathExpr
{
return $xpath->join('/following-sibling::', $combinedXpath);
}
/**
* {@inheritdoc}
*/
public function getName(): string
{
return 'combination';
}
}
symfony/css-selector/XPath/Extension/ExtensionInterface.php 0000644 00000003005 15153552363 0020172 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\XPath\Extension;
/**
* XPath expression translator extension interface.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
interface ExtensionInterface
{
/**
* Returns node translators.
*
* These callables will receive the node as first argument and the translator as second argument.
*
* @return callable[]
*/
public function getNodeTranslators(): array;
/**
* Returns combination translators.
*
* @return callable[]
*/
public function getCombinationTranslators(): array;
/**
* Returns function translators.
*
* @return callable[]
*/
public function getFunctionTranslators(): array;
/**
* Returns pseudo-class translators.
*
* @return callable[]
*/
public function getPseudoClassTranslators(): array;
/**
* Returns attribute operation translators.
*
* @return callable[]
*/
public function getAttributeMatchingTranslators(): array;
/**
* Returns extension name.
*/
public function getName(): string;
}
symfony/css-selector/XPath/Extension/FunctionExtension.php 0000644 00000012154 15153552363 0020064 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\XPath\Extension;
use Symfony\Component\CssSelector\Exception\ExpressionErrorException;
use Symfony\Component\CssSelector\Exception\SyntaxErrorException;
use Symfony\Component\CssSelector\Node\FunctionNode;
use Symfony\Component\CssSelector\Parser\Parser;
use Symfony\Component\CssSelector\XPath\Translator;
use Symfony\Component\CssSelector\XPath\XPathExpr;
/**
* XPath expression translator function extension.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class FunctionExtension extends AbstractExtension
{
/**
* {@inheritdoc}
*/
public function getFunctionTranslators(): array
{
return [
'nth-child' => [$this, 'translateNthChild'],
'nth-last-child' => [$this, 'translateNthLastChild'],
'nth-of-type' => [$this, 'translateNthOfType'],
'nth-last-of-type' => [$this, 'translateNthLastOfType'],
'contains' => [$this, 'translateContains'],
'lang' => [$this, 'translateLang'],
];
}
/**
* @throws ExpressionErrorException
*/
public function translateNthChild(XPathExpr $xpath, FunctionNode $function, bool $last = false, bool $addNameTest = true): XPathExpr
{
try {
[$a, $b] = Parser::parseSeries($function->getArguments());
} catch (SyntaxErrorException $e) {
throw new ExpressionErrorException(sprintf('Invalid series: "%s".', implode('", "', $function->getArguments())), 0, $e);
}
$xpath->addStarPrefix();
if ($addNameTest) {
$xpath->addNameTest();
}
if (0 === $a) {
return $xpath->addCondition('position() = '.($last ? 'last() - '.($b - 1) : $b));
}
if ($a < 0) {
if ($b < 1) {
return $xpath->addCondition('false()');
}
$sign = '<=';
} else {
$sign = '>=';
}
$expr = 'position()';
if ($last) {
$expr = 'last() - '.$expr;
--$b;
}
if (0 !== $b) {
$expr .= ' - '.$b;
}
$conditions = [sprintf('%s %s 0', $expr, $sign)];
if (1 !== $a && -1 !== $a) {
$conditions[] = sprintf('(%s) mod %d = 0', $expr, $a);
}
return $xpath->addCondition(implode(' and ', $conditions));
// todo: handle an+b, odd, even
// an+b means every-a, plus b, e.g., 2n+1 means odd
// 0n+b means b
// n+0 means a=1, i.e., all elements
// an means every a elements, i.e., 2n means even
// -n means -1n
// -1n+6 means elements 6 and previous
}
public function translateNthLastChild(XPathExpr $xpath, FunctionNode $function): XPathExpr
{
return $this->translateNthChild($xpath, $function, true);
}
public function translateNthOfType(XPathExpr $xpath, FunctionNode $function): XPathExpr
{
return $this->translateNthChild($xpath, $function, false, false);
}
/**
* @throws ExpressionErrorException
*/
public function translateNthLastOfType(XPathExpr $xpath, FunctionNode $function): XPathExpr
{
if ('*' === $xpath->getElement()) {
throw new ExpressionErrorException('"*:nth-of-type()" is not implemented.');
}
return $this->translateNthChild($xpath, $function, true, false);
}
/**
* @throws ExpressionErrorException
*/
public function translateContains(XPathExpr $xpath, FunctionNode $function): XPathExpr
{
$arguments = $function->getArguments();
foreach ($arguments as $token) {
if (!($token->isString() || $token->isIdentifier())) {
throw new ExpressionErrorException('Expected a single string or identifier for :contains(), got '.implode(', ', $arguments));
}
}
return $xpath->addCondition(sprintf(
'contains(string(.), %s)',
Translator::getXpathLiteral($arguments[0]->getValue())
));
}
/**
* @throws ExpressionErrorException
*/
public function translateLang(XPathExpr $xpath, FunctionNode $function): XPathExpr
{
$arguments = $function->getArguments();
foreach ($arguments as $token) {
if (!($token->isString() || $token->isIdentifier())) {
throw new ExpressionErrorException('Expected a single string or identifier for :lang(), got '.implode(', ', $arguments));
}
}
return $xpath->addCondition(sprintf(
'lang(%s)',
Translator::getXpathLiteral($arguments[0]->getValue())
));
}
/**
* {@inheritdoc}
*/
public function getName(): string
{
return 'function';
}
}
symfony/css-selector/XPath/Extension/HtmlExtension.php 0000644 00000013426 15153552363 0017206 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\XPath\Extension;
use Symfony\Component\CssSelector\Exception\ExpressionErrorException;
use Symfony\Component\CssSelector\Node\FunctionNode;
use Symfony\Component\CssSelector\XPath\Translator;
use Symfony\Component\CssSelector\XPath\XPathExpr;
/**
* XPath expression translator HTML extension.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class HtmlExtension extends AbstractExtension
{
public function __construct(Translator $translator)
{
$translator
->getExtension('node')
->setFlag(NodeExtension::ELEMENT_NAME_IN_LOWER_CASE, true)
->setFlag(NodeExtension::ATTRIBUTE_NAME_IN_LOWER_CASE, true);
}
/**
* {@inheritdoc}
*/
public function getPseudoClassTranslators(): array
{
return [
'checked' => [$this, 'translateChecked'],
'link' => [$this, 'translateLink'],
'disabled' => [$this, 'translateDisabled'],
'enabled' => [$this, 'translateEnabled'],
'selected' => [$this, 'translateSelected'],
'invalid' => [$this, 'translateInvalid'],
'hover' => [$this, 'translateHover'],
'visited' => [$this, 'translateVisited'],
];
}
/**
* {@inheritdoc}
*/
public function getFunctionTranslators(): array
{
return [
'lang' => [$this, 'translateLang'],
];
}
public function translateChecked(XPathExpr $xpath): XPathExpr
{
return $xpath->addCondition(
'(@checked '
."and (name(.) = 'input' or name(.) = 'command')"
."and (@type = 'checkbox' or @type = 'radio'))"
);
}
public function translateLink(XPathExpr $xpath): XPathExpr
{
return $xpath->addCondition("@href and (name(.) = 'a' or name(.) = 'link' or name(.) = 'area')");
}
public function translateDisabled(XPathExpr $xpath): XPathExpr
{
return $xpath->addCondition(
'('
.'@disabled and'
.'('
."(name(.) = 'input' and @type != 'hidden')"
." or name(.) = 'button'"
." or name(.) = 'select'"
." or name(.) = 'textarea'"
." or name(.) = 'command'"
." or name(.) = 'fieldset'"
." or name(.) = 'optgroup'"
." or name(.) = 'option'"
.')'
.') or ('
."(name(.) = 'input' and @type != 'hidden')"
." or name(.) = 'button'"
." or name(.) = 'select'"
." or name(.) = 'textarea'"
.')'
.' and ancestor::fieldset[@disabled]'
);
// todo: in the second half, add "and is not a descendant of that fieldset element's first legend element child, if any."
}
public function translateEnabled(XPathExpr $xpath): XPathExpr
{
return $xpath->addCondition(
'('
.'@href and ('
."name(.) = 'a'"
." or name(.) = 'link'"
." or name(.) = 'area'"
.')'
.') or ('
.'('
."name(.) = 'command'"
." or name(.) = 'fieldset'"
." or name(.) = 'optgroup'"
.')'
.' and not(@disabled)'
.') or ('
.'('
."(name(.) = 'input' and @type != 'hidden')"
." or name(.) = 'button'"
." or name(.) = 'select'"
." or name(.) = 'textarea'"
." or name(.) = 'keygen'"
.')'
.' and not (@disabled or ancestor::fieldset[@disabled])'
.') or ('
."name(.) = 'option' and not("
.'@disabled or ancestor::optgroup[@disabled]'
.')'
.')'
);
}
/**
* @throws ExpressionErrorException
*/
public function translateLang(XPathExpr $xpath, FunctionNode $function): XPathExpr
{
$arguments = $function->getArguments();
foreach ($arguments as $token) {
if (!($token->isString() || $token->isIdentifier())) {
throw new ExpressionErrorException('Expected a single string or identifier for :lang(), got '.implode(', ', $arguments));
}
}
return $xpath->addCondition(sprintf(
'ancestor-or-self::*[@lang][1][starts-with(concat('
."translate(@%s, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), '-')"
.', %s)]',
'lang',
Translator::getXpathLiteral(strtolower($arguments[0]->getValue()).'-')
));
}
public function translateSelected(XPathExpr $xpath): XPathExpr
{
return $xpath->addCondition("(@selected and name(.) = 'option')");
}
public function translateInvalid(XPathExpr $xpath): XPathExpr
{
return $xpath->addCondition('0');
}
public function translateHover(XPathExpr $xpath): XPathExpr
{
return $xpath->addCondition('0');
}
public function translateVisited(XPathExpr $xpath): XPathExpr
{
return $xpath->addCondition('0');
}
/**
* {@inheritdoc}
*/
public function getName(): string
{
return 'html';
}
}
symfony/css-selector/XPath/Extension/NodeExtension.php 0000644 00000013373 15153552363 0017170 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\XPath\Extension;
use Symfony\Component\CssSelector\Node;
use Symfony\Component\CssSelector\XPath\Translator;
use Symfony\Component\CssSelector\XPath\XPathExpr;
/**
* XPath expression translator node extension.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class NodeExtension extends AbstractExtension
{
public const ELEMENT_NAME_IN_LOWER_CASE = 1;
public const ATTRIBUTE_NAME_IN_LOWER_CASE = 2;
public const ATTRIBUTE_VALUE_IN_LOWER_CASE = 4;
private $flags;
public function __construct(int $flags = 0)
{
$this->flags = $flags;
}
/**
* @return $this
*/
public function setFlag(int $flag, bool $on): self
{
if ($on && !$this->hasFlag($flag)) {
$this->flags += $flag;
}
if (!$on && $this->hasFlag($flag)) {
$this->flags -= $flag;
}
return $this;
}
public function hasFlag(int $flag): bool
{
return (bool) ($this->flags & $flag);
}
/**
* {@inheritdoc}
*/
public function getNodeTranslators(): array
{
return [
'Selector' => [$this, 'translateSelector'],
'CombinedSelector' => [$this, 'translateCombinedSelector'],
'Negation' => [$this, 'translateNegation'],
'Function' => [$this, 'translateFunction'],
'Pseudo' => [$this, 'translatePseudo'],
'Attribute' => [$this, 'translateAttribute'],
'Class' => [$this, 'translateClass'],
'Hash' => [$this, 'translateHash'],
'Element' => [$this, 'translateElement'],
];
}
public function translateSelector(Node\SelectorNode $node, Translator $translator): XPathExpr
{
return $translator->nodeToXPath($node->getTree());
}
public function translateCombinedSelector(Node\CombinedSelectorNode $node, Translator $translator): XPathExpr
{
return $translator->addCombination($node->getCombinator(), $node->getSelector(), $node->getSubSelector());
}
public function translateNegation(Node\NegationNode $node, Translator $translator): XPathExpr
{
$xpath = $translator->nodeToXPath($node->getSelector());
$subXpath = $translator->nodeToXPath($node->getSubSelector());
$subXpath->addNameTest();
if ($subXpath->getCondition()) {
return $xpath->addCondition(sprintf('not(%s)', $subXpath->getCondition()));
}
return $xpath->addCondition('0');
}
public function translateFunction(Node\FunctionNode $node, Translator $translator): XPathExpr
{
$xpath = $translator->nodeToXPath($node->getSelector());
return $translator->addFunction($xpath, $node);
}
public function translatePseudo(Node\PseudoNode $node, Translator $translator): XPathExpr
{
$xpath = $translator->nodeToXPath($node->getSelector());
return $translator->addPseudoClass($xpath, $node->getIdentifier());
}
public function translateAttribute(Node\AttributeNode $node, Translator $translator): XPathExpr
{
$name = $node->getAttribute();
$safe = $this->isSafeName($name);
if ($this->hasFlag(self::ATTRIBUTE_NAME_IN_LOWER_CASE)) {
$name = strtolower($name);
}
if ($node->getNamespace()) {
$name = sprintf('%s:%s', $node->getNamespace(), $name);
$safe = $safe && $this->isSafeName($node->getNamespace());
}
$attribute = $safe ? '@'.$name : sprintf('attribute::*[name() = %s]', Translator::getXpathLiteral($name));
$value = $node->getValue();
$xpath = $translator->nodeToXPath($node->getSelector());
if ($this->hasFlag(self::ATTRIBUTE_VALUE_IN_LOWER_CASE)) {
$value = strtolower($value);
}
return $translator->addAttributeMatching($xpath, $node->getOperator(), $attribute, $value);
}
public function translateClass(Node\ClassNode $node, Translator $translator): XPathExpr
{
$xpath = $translator->nodeToXPath($node->getSelector());
return $translator->addAttributeMatching($xpath, '~=', '@class', $node->getName());
}
public function translateHash(Node\HashNode $node, Translator $translator): XPathExpr
{
$xpath = $translator->nodeToXPath($node->getSelector());
return $translator->addAttributeMatching($xpath, '=', '@id', $node->getId());
}
public function translateElement(Node\ElementNode $node): XPathExpr
{
$element = $node->getElement();
if ($element && $this->hasFlag(self::ELEMENT_NAME_IN_LOWER_CASE)) {
$element = strtolower($element);
}
if ($element) {
$safe = $this->isSafeName($element);
} else {
$element = '*';
$safe = true;
}
if ($node->getNamespace()) {
$element = sprintf('%s:%s', $node->getNamespace(), $element);
$safe = $safe && $this->isSafeName($node->getNamespace());
}
$xpath = new XPathExpr('', $element);
if (!$safe) {
$xpath->addNameTest();
}
return $xpath;
}
/**
* {@inheritdoc}
*/
public function getName(): string
{
return 'node';
}
private function isSafeName(string $name): bool
{
return 0 < preg_match('~^[a-zA-Z_][a-zA-Z0-9_.-]*$~', $name);
}
}
symfony/css-selector/XPath/Extension/PseudoClassExtension.php 0000644 00000006525 15153552363 0020531 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\XPath\Extension;
use Symfony\Component\CssSelector\Exception\ExpressionErrorException;
use Symfony\Component\CssSelector\XPath\XPathExpr;
/**
* XPath expression translator pseudo-class extension.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class PseudoClassExtension extends AbstractExtension
{
/**
* {@inheritdoc}
*/
public function getPseudoClassTranslators(): array
{
return [
'root' => [$this, 'translateRoot'],
'first-child' => [$this, 'translateFirstChild'],
'last-child' => [$this, 'translateLastChild'],
'first-of-type' => [$this, 'translateFirstOfType'],
'last-of-type' => [$this, 'translateLastOfType'],
'only-child' => [$this, 'translateOnlyChild'],
'only-of-type' => [$this, 'translateOnlyOfType'],
'empty' => [$this, 'translateEmpty'],
];
}
public function translateRoot(XPathExpr $xpath): XPathExpr
{
return $xpath->addCondition('not(parent::*)');
}
public function translateFirstChild(XPathExpr $xpath): XPathExpr
{
return $xpath
->addStarPrefix()
->addNameTest()
->addCondition('position() = 1');
}
public function translateLastChild(XPathExpr $xpath): XPathExpr
{
return $xpath
->addStarPrefix()
->addNameTest()
->addCondition('position() = last()');
}
/**
* @throws ExpressionErrorException
*/
public function translateFirstOfType(XPathExpr $xpath): XPathExpr
{
if ('*' === $xpath->getElement()) {
throw new ExpressionErrorException('"*:first-of-type" is not implemented.');
}
return $xpath
->addStarPrefix()
->addCondition('position() = 1');
}
/**
* @throws ExpressionErrorException
*/
public function translateLastOfType(XPathExpr $xpath): XPathExpr
{
if ('*' === $xpath->getElement()) {
throw new ExpressionErrorException('"*:last-of-type" is not implemented.');
}
return $xpath
->addStarPrefix()
->addCondition('position() = last()');
}
public function translateOnlyChild(XPathExpr $xpath): XPathExpr
{
return $xpath
->addStarPrefix()
->addNameTest()
->addCondition('last() = 1');
}
public function translateOnlyOfType(XPathExpr $xpath): XPathExpr
{
$element = $xpath->getElement();
return $xpath->addCondition(sprintf('count(preceding-sibling::%s)=0 and count(following-sibling::%s)=0', $element, $element));
}
public function translateEmpty(XPathExpr $xpath): XPathExpr
{
return $xpath->addCondition('not(*) and not(string-length())');
}
/**
* {@inheritdoc}
*/
public function getName(): string
{
return 'pseudo-class';
}
}
symfony/css-selector/XPath/Translator.php 0000644 00000016237 15153552363 0014565 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\XPath;
use Symfony\Component\CssSelector\Exception\ExpressionErrorException;
use Symfony\Component\CssSelector\Node\FunctionNode;
use Symfony\Component\CssSelector\Node\NodeInterface;
use Symfony\Component\CssSelector\Node\SelectorNode;
use Symfony\Component\CssSelector\Parser\Parser;
use Symfony\Component\CssSelector\Parser\ParserInterface;
/**
* XPath expression translator interface.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class Translator implements TranslatorInterface
{
private $mainParser;
/**
* @var ParserInterface[]
*/
private $shortcutParsers = [];
/**
* @var Extension\ExtensionInterface[]
*/
private $extensions = [];
private $nodeTranslators = [];
private $combinationTranslators = [];
private $functionTranslators = [];
private $pseudoClassTranslators = [];
private $attributeMatchingTranslators = [];
public function __construct(ParserInterface $parser = null)
{
$this->mainParser = $parser ?? new Parser();
$this
->registerExtension(new Extension\NodeExtension())
->registerExtension(new Extension\CombinationExtension())
->registerExtension(new Extension\FunctionExtension())
->registerExtension(new Extension\PseudoClassExtension())
->registerExtension(new Extension\AttributeMatchingExtension())
;
}
public static function getXpathLiteral(string $element): string
{
if (!str_contains($element, "'")) {
return "'".$element."'";
}
if (!str_contains($element, '"')) {
return '"'.$element.'"';
}
$string = $element;
$parts = [];
while (true) {
if (false !== $pos = strpos($string, "'")) {
$parts[] = sprintf("'%s'", substr($string, 0, $pos));
$parts[] = "\"'\"";
$string = substr($string, $pos + 1);
} else {
$parts[] = "'$string'";
break;
}
}
return sprintf('concat(%s)', implode(', ', $parts));
}
/**
* {@inheritdoc}
*/
public function cssToXPath(string $cssExpr, string $prefix = 'descendant-or-self::'): string
{
$selectors = $this->parseSelectors($cssExpr);
/** @var SelectorNode $selector */
foreach ($selectors as $index => $selector) {
if (null !== $selector->getPseudoElement()) {
throw new ExpressionErrorException('Pseudo-elements are not supported.');
}
$selectors[$index] = $this->selectorToXPath($selector, $prefix);
}
return implode(' | ', $selectors);
}
/**
* {@inheritdoc}
*/
public function selectorToXPath(SelectorNode $selector, string $prefix = 'descendant-or-self::'): string
{
return ($prefix ?: '').$this->nodeToXPath($selector);
}
/**
* @return $this
*/
public function registerExtension(Extension\ExtensionInterface $extension): self
{
$this->extensions[$extension->getName()] = $extension;
$this->nodeTranslators = array_merge($this->nodeTranslators, $extension->getNodeTranslators());
$this->combinationTranslators = array_merge($this->combinationTranslators, $extension->getCombinationTranslators());
$this->functionTranslators = array_merge($this->functionTranslators, $extension->getFunctionTranslators());
$this->pseudoClassTranslators = array_merge($this->pseudoClassTranslators, $extension->getPseudoClassTranslators());
$this->attributeMatchingTranslators = array_merge($this->attributeMatchingTranslators, $extension->getAttributeMatchingTranslators());
return $this;
}
/**
* @throws ExpressionErrorException
*/
public function getExtension(string $name): Extension\ExtensionInterface
{
if (!isset($this->extensions[$name])) {
throw new ExpressionErrorException(sprintf('Extension "%s" not registered.', $name));
}
return $this->extensions[$name];
}
/**
* @return $this
*/
public function registerParserShortcut(ParserInterface $shortcut): self
{
$this->shortcutParsers[] = $shortcut;
return $this;
}
/**
* @throws ExpressionErrorException
*/
public function nodeToXPath(NodeInterface $node): XPathExpr
{
if (!isset($this->nodeTranslators[$node->getNodeName()])) {
throw new ExpressionErrorException(sprintf('Node "%s" not supported.', $node->getNodeName()));
}
return $this->nodeTranslators[$node->getNodeName()]($node, $this);
}
/**
* @throws ExpressionErrorException
*/
public function addCombination(string $combiner, NodeInterface $xpath, NodeInterface $combinedXpath): XPathExpr
{
if (!isset($this->combinationTranslators[$combiner])) {
throw new ExpressionErrorException(sprintf('Combiner "%s" not supported.', $combiner));
}
return $this->combinationTranslators[$combiner]($this->nodeToXPath($xpath), $this->nodeToXPath($combinedXpath));
}
/**
* @throws ExpressionErrorException
*/
public function addFunction(XPathExpr $xpath, FunctionNode $function): XPathExpr
{
if (!isset($this->functionTranslators[$function->getName()])) {
throw new ExpressionErrorException(sprintf('Function "%s" not supported.', $function->getName()));
}
return $this->functionTranslators[$function->getName()]($xpath, $function);
}
/**
* @throws ExpressionErrorException
*/
public function addPseudoClass(XPathExpr $xpath, string $pseudoClass): XPathExpr
{
if (!isset($this->pseudoClassTranslators[$pseudoClass])) {
throw new ExpressionErrorException(sprintf('Pseudo-class "%s" not supported.', $pseudoClass));
}
return $this->pseudoClassTranslators[$pseudoClass]($xpath);
}
/**
* @throws ExpressionErrorException
*/
public function addAttributeMatching(XPathExpr $xpath, string $operator, string $attribute, ?string $value): XPathExpr
{
if (!isset($this->attributeMatchingTranslators[$operator])) {
throw new ExpressionErrorException(sprintf('Attribute matcher operator "%s" not supported.', $operator));
}
return $this->attributeMatchingTranslators[$operator]($xpath, $attribute, $value);
}
/**
* @return SelectorNode[]
*/
private function parseSelectors(string $css): array
{
foreach ($this->shortcutParsers as $shortcut) {
$tokens = $shortcut->parse($css);
if (!empty($tokens)) {
return $tokens;
}
}
return $this->mainParser->parse($css);
}
}
symfony/css-selector/XPath/TranslatorInterface.php 0000644 00000001773 15153552363 0016405 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\XPath;
use Symfony\Component\CssSelector\Node\SelectorNode;
/**
* XPath expression translator interface.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
interface TranslatorInterface
{
/**
* Translates a CSS selector to an XPath expression.
*/
public function cssToXPath(string $cssExpr, string $prefix = 'descendant-or-self::'): string;
/**
* Translates a parsed selector node to an XPath expression.
*/
public function selectorToXPath(SelectorNode $selector, string $prefix = 'descendant-or-self::'): string;
}
symfony/css-selector/XPath/XPathExpr.php 0000644 00000004670 15153552363 0014315 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\XPath;
/**
* XPath expression translator interface.
*
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class XPathExpr
{
private $path;
private $element;
private $condition;
public function __construct(string $path = '', string $element = '*', string $condition = '', bool $starPrefix = false)
{
$this->path = $path;
$this->element = $element;
$this->condition = $condition;
if ($starPrefix) {
$this->addStarPrefix();
}
}
public function getElement(): string
{
return $this->element;
}
/**
* @return $this
*/
public function addCondition(string $condition): self
{
$this->condition = $this->condition ? sprintf('(%s) and (%s)', $this->condition, $condition) : $condition;
return $this;
}
public function getCondition(): string
{
return $this->condition;
}
/**
* @return $this
*/
public function addNameTest(): self
{
if ('*' !== $this->element) {
$this->addCondition('name() = '.Translator::getXpathLiteral($this->element));
$this->element = '*';
}
return $this;
}
/**
* @return $this
*/
public function addStarPrefix(): self
{
$this->path .= '*/';
return $this;
}
/**
* Joins another XPathExpr with a combiner.
*
* @return $this
*/
public function join(string $combiner, self $expr): self
{
$path = $this->__toString().$combiner;
if ('*/' !== $expr->path) {
$path .= $expr->path;
}
$this->path = $path;
$this->element = $expr->element;
$this->condition = $expr->condition;
return $this;
}
public function __toString(): string
{
$path = $this->path.$this->element;
$condition = null === $this->condition || '' === $this->condition ? '' : '['.$this->condition.']';
return $path.$condition;
}
}
symfony/polyfill-php80/LICENSE 0000644 00000002054 15153552363 0012055 0 ustar 00 Copyright (c) 2020-present Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
symfony/polyfill-php80/Php80.php 0000644 00000006771 15153552363 0012472 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Polyfill\Php80;
/**
* @author Ion Bazan <ion.bazan@gmail.com>
* @author Nico Oelgart <nicoswd@gmail.com>
* @author Nicolas Grekas <p@tchwork.com>
*
* @internal
*/
final class Php80
{
public static function fdiv(float $dividend, float $divisor): float
{
return @($dividend / $divisor);
}
public static function get_debug_type($value): string
{
switch (true) {
case null === $value: return 'null';
case \is_bool($value): return 'bool';
case \is_string($value): return 'string';
case \is_array($value): return 'array';
case \is_int($value): return 'int';
case \is_float($value): return 'float';
case \is_object($value): break;
case $value instanceof \__PHP_Incomplete_Class: return '__PHP_Incomplete_Class';
default:
if (null === $type = @get_resource_type($value)) {
return 'unknown';
}
if ('Unknown' === $type) {
$type = 'closed';
}
return "resource ($type)";
}
$class = \get_class($value);
if (false === strpos($class, '@')) {
return $class;
}
return (get_parent_class($class) ?: key(class_implements($class)) ?: 'class').'@anonymous';
}
public static function get_resource_id($res): int
{
if (!\is_resource($res) && null === @get_resource_type($res)) {
throw new \TypeError(sprintf('Argument 1 passed to get_resource_id() must be of the type resource, %s given', get_debug_type($res)));
}
return (int) $res;
}
public static function preg_last_error_msg(): string
{
switch (preg_last_error()) {
case \PREG_INTERNAL_ERROR:
return 'Internal error';
case \PREG_BAD_UTF8_ERROR:
return 'Malformed UTF-8 characters, possibly incorrectly encoded';
case \PREG_BAD_UTF8_OFFSET_ERROR:
return 'The offset did not correspond to the beginning of a valid UTF-8 code point';
case \PREG_BACKTRACK_LIMIT_ERROR:
return 'Backtrack limit exhausted';
case \PREG_RECURSION_LIMIT_ERROR:
return 'Recursion limit exhausted';
case \PREG_JIT_STACKLIMIT_ERROR:
return 'JIT stack limit exhausted';
case \PREG_NO_ERROR:
return 'No error';
default:
return 'Unknown error';
}
}
public static function str_contains(string $haystack, string $needle): bool
{
return '' === $needle || false !== strpos($haystack, $needle);
}
public static function str_starts_with(string $haystack, string $needle): bool
{
return 0 === strncmp($haystack, $needle, \strlen($needle));
}
public static function str_ends_with(string $haystack, string $needle): bool
{
if ('' === $needle || $needle === $haystack) {
return true;
}
if ('' === $haystack) {
return false;
}
$needleLength = \strlen($needle);
return $needleLength <= \strlen($haystack) && 0 === substr_compare($haystack, $needle, -$needleLength);
}
}
symfony/polyfill-php80/PhpToken.php 0000644 00000004211 15153552363 0013306 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Polyfill\Php80;
/**
* @author Fedonyuk Anton <info@ensostudio.ru>
*
* @internal
*/
class PhpToken implements \Stringable
{
/**
* @var int
*/
public $id;
/**
* @var string
*/
public $text;
/**
* @var int
*/
public $line;
/**
* @var int
*/
public $pos;
public function __construct(int $id, string $text, int $line = -1, int $position = -1)
{
$this->id = $id;
$this->text = $text;
$this->line = $line;
$this->pos = $position;
}
public function getTokenName(): ?string
{
if ('UNKNOWN' === $name = token_name($this->id)) {
$name = \strlen($this->text) > 1 || \ord($this->text) < 32 ? null : $this->text;
}
return $name;
}
/**
* @param int|string|array $kind
*/
public function is($kind): bool
{
foreach ((array) $kind as $value) {
if (\in_array($value, [$this->id, $this->text], true)) {
return true;
}
}
return false;
}
public function isIgnorable(): bool
{
return \in_array($this->id, [\T_WHITESPACE, \T_COMMENT, \T_DOC_COMMENT, \T_OPEN_TAG], true);
}
public function __toString(): string
{
return (string) $this->text;
}
/**
* @return static[]
*/
public static function tokenize(string $code, int $flags = 0): array
{
$line = 1;
$position = 0;
$tokens = token_get_all($code, $flags);
foreach ($tokens as $index => $token) {
if (\is_string($token)) {
$id = \ord($token);
$text = $token;
} else {
[$id, $text, $line] = $token;
}
$tokens[$index] = new static($id, $text, $line, $position);
$position += \strlen($text);
}
return $tokens;
}
}
symfony/polyfill-php80/Resources/stubs/Attribute.php 0000644 00000001360 15153552363 0016635 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#[Attribute(Attribute::TARGET_CLASS)]
final class Attribute
{
public const TARGET_CLASS = 1;
public const TARGET_FUNCTION = 2;
public const TARGET_METHOD = 4;
public const TARGET_PROPERTY = 8;
public const TARGET_CLASS_CONSTANT = 16;
public const TARGET_PARAMETER = 32;
public const TARGET_ALL = 63;
public const IS_REPEATABLE = 64;
/** @var int */
public $flags;
public function __construct(int $flags = self::TARGET_ALL)
{
$this->flags = $flags;
}
}
symfony/polyfill-php80/Resources/stubs/PhpToken.php 0000644 00000000567 15153552363 0016432 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
if (\PHP_VERSION_ID < 80000 && extension_loaded('tokenizer')) {
class PhpToken extends Symfony\Polyfill\Php80\PhpToken
{
}
}
symfony/polyfill-php80/Resources/stubs/Stringable.php 0000644 00000000614 15153552363 0016765 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
if (\PHP_VERSION_ID < 80000) {
interface Stringable
{
/**
* @return string
*/
public function __toString();
}
}
symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php 0000644 00000000507 15153552363 0020565 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
if (\PHP_VERSION_ID < 80000) {
class UnhandledMatchError extends Error
{
}
}
symfony/polyfill-php80/Resources/stubs/ValueError.php 0000644 00000000476 15153552363 0016767 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
if (\PHP_VERSION_ID < 80000) {
class ValueError extends Error
{
}
}
symfony/polyfill-php80/bootstrap.php 0000644 00000002774 15153552363 0013607 0 ustar 00 <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Symfony\Polyfill\Php80 as p;
if (\PHP_VERSION_ID >= 80000) {
return;
}
if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) {
define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN);
}
if (!function_exists('fdiv')) {
function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $num2); }
}
if (!function_exists('preg_last_error_msg')) {
function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); }
}
if (!function_exists('str_contains')) {
function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); }
}
if (!function_exists('str_starts_with')) {
function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); }
}
if (!function_exists('str_ends_with')) {
function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); }
}
if (!function_exists('get_debug_type')) {
function get_debug_type($value): string { return p\Php80::get_debug_type($value); }
}
if (!function_exists('get_resource_id')) {
function get_resource_id($resource): int { return p\Php80::get_resource_id($resource); }
}
jwhennessey/phpinsight/.gitignore 0000644 00000000012 15153553404 0013251 0 ustar 00 .DS_Store
jwhennessey/phpinsight/CHANGES 0000644 00000000576 15153553404 0012273 0 ustar 00 Changelog
---------
2.0.0
* Codebase modernization (PHP namespaces, Composer compatibility)
1.2
* Error with how the positive dictionary was serialized fixed
1.1
* Improvements courtesy of Mark-H (https://github.com/Mark-H/) they can been
seen on his Tweetalyzer project (https://github.com/Mark-H/Tweetalyzer)
* Load data from a serialized php file instead of the database
jwhennessey/phpinsight/LICENSE 0000644 00000001210 15153553404 0012267 0 ustar 00 Copyright (C) 2012 James Hennessey
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
jwhennessey/phpinsight/README.md 0000644 00000000542 15153553404 0012550 0 ustar 00 phpInsight - Sentiment Analysis in PHP
---------
phpInsight is a sentiment classifier. It uses a dictionary of words that are
categorised as positive, negative or neutral, and a naive bayes algorithm to
calculate sentiment. To improve accuracy, phpInsight removes 'noise' words.
For example usage, see the `examples` folder.
License: GPLv3 or later
jwhennessey/phpinsight/autoload.php 0000644 00000000426 15153553404 0013613 0 ustar 00 <?php
/*
* This file is part of the RNCryptor package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
require __DIR__.'/lib/PHPInsight/Autoloader.php';
PHPInsight\Autoloader::register();
jwhennessey/phpinsight/composer.json 0000644 00000000763 15153553404 0014020 0 ustar 00 {
"name": "jwhennessey/phpinsight",
"type": "library",
"description": "Sentiment analysis tool for PHP",
"keywords": ["sentiment", "insight", "phpinsight"],
"homepage": "https://github.com/JWHennessey/phpInsight",
"license": "GPLv3 or later",
"minimum-stability": "stable",
"authors": [
{
"name": "James Hennessey"
}
],
"require": {
"php": ">=5.3.0"
},
"autoload": {
"psr-0": {"PHPInsight": "lib/"}
}
}
jwhennessey/phpinsight/examples/demo.php 0000644 00000001362 15153553404 0014545 0 ustar 00 <?php
if (PHP_SAPI != 'cli') {
echo "<pre>";
}
$strings = array(
1 => 'Weather today is rubbish',
2 => 'This cake looks amazing',
3 => 'His skills are mediocre',
4 => 'He is very talented',
5 => 'She is seemingly very agressive',
6 => 'Marie was enthusiastic about the upcoming trip. Her brother was also passionate about her leaving - he would finally have the house for himself.',
7 => 'To be or not to be?',
);
require_once __DIR__ . '/../autoload.php';
$sentiment = new \PHPInsight\Sentiment();
foreach ($strings as $string) {
// calculations:
$scores = $sentiment->score($string);
$class = $sentiment->categorise($string);
// output:
echo "String: $string\n";
echo "Dominant: $class, scores: ";
print_r($scores);
echo "\n";
}
jwhennessey/phpinsight/lib/PHPInsight/Autoloader.php 0000644 00000002431 15153553404 0016623 0 ustar 00 <?php
namespace PHPInsight;
class Autoloader
{
private $directory;
private $prefix;
private $prefixLength;
/**
* @param string $baseDirectory Base directory where the source files are located.
*/
public function __construct($baseDirectory = __DIR__)
{
$this->directory = $baseDirectory;
$this->prefix = __NAMESPACE__ . '\\';
$this->prefixLength = strlen($this->prefix);
}
/**
* Registers the autoloader class with the PHP SPL autoloader.
*
* @param bool $prepend Prepend the autoloader on the stack instead of appending it.
*/
public static function register($prepend = false)
{
spl_autoload_register(array(new self, 'autoload'), true, $prepend);
}
/**
* Loads a class from a file using its fully qualified name.
*
* @param string $className Fully qualified name of a class.
*/
public function autoload($className)
{
if (0 === strpos($className, $this->prefix)) {
$parts = explode('\\', substr($className, $this->prefixLength));
$filepath = $this->directory.DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $parts).'.php';
if (is_file($filepath)) {
require($filepath);
}
}
}
}
jwhennessey/phpinsight/lib/PHPInsight/Sentiment.php 0000644 00000024733 15153553404 0016503 0 ustar 00 <?php
namespace PHPInsight;
/*
phpInsight is a Naive Bayes classifier to calculate sentiment. The program
uses a database of words categorised as positive, negative or neutral
Copyright (C) 2012 James Hennessey
Class modifications and improvements by Ismayil Khayredinov (ismayil.khayredinov@gmail.com)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
*/
class Sentiment {
/**
* Location of the dictionary files
* @var str
*/
private $dataFolder = '';
/**
* List of tokens to ignore
* @var array
*/
private $ignoreList = array();
/**
* List of words with negative prefixes, e.g. isn't, arent't
* @var array
*/
private $negPrefixList = array();
/**
* Storage of cached dictionaries
* @var array
*/
private $dictionary = array();
/**
* Min length of a token for it to be taken into consideration
* @var int
*/
private $minTokenLength = 1;
/**
* Max length of a taken for it be taken into consideration
* @var int
*/
private $maxTokenLength = 15;
/**
* Classification of opinions
* @var array
*/
private $classes = array('pos', 'neg', 'neu');
/**
* Token score per class
* @var array
*/
private $classTokCounts = array(
'pos' => 0,
'neg' => 0,
'neu' => 0
);
/**
* Analyzed text score per class
* @var array
*/
private $classDocCounts = array(
'pos' => 0,
'neg' => 0,
'neu' => 0
);
/**
* Number of tokens in a text
* @var int
*/
private $tokCount = 0;
/**
* Number of analyzed texts
* @var int
*/
private $docCount = 0;
/**
* Implication that the analyzed text has 1/3 chance of being in either of the 3 categories
* @var array
*/
private $prior = array(
'pos' => 0.333,
'neg' => 0.333,
'neu' => 0.334,
);
/**
* Class constructor
* @param str $dataFolder base folder
* Sets defaults and loads/caches dictionaries
*/
public function __construct($dataFolder = false) {
//set the base folder for the data models
$this->setDataFolder($dataFolder);
//load and cache directories, get ignore and prefix lists
$this->loadDefaults();
}
/**
* Get scores for each class
*
* @param str $sentence Text to analyze
* @return int Score
*/
public function score($sentence) {
//For each negative prefix in the list
foreach ($this->negPrefixList as $negPrefix) {
//Search if that prefix is in the document
if (strpos($sentence, $negPrefix) !== false) {
//Reove the white space after the negative prefix
$sentence = str_replace($negPrefix . ' ', $negPrefix, $sentence);
}
}
//Tokenise Document
$tokens = $this->_getTokens($sentence);
// calculate the score in each category
$total_score = 0;
//Empty array for the scores for each of the possible categories
$scores = array();
//Loop through all of the different classes set in the $classes variable
foreach ($this->classes as $class) {
//In the scores array add another dimention for the class and set it's value to 1. EG $scores->neg->1
$scores[$class] = 1;
//For each of the individual words used loop through to see if they match anything in the $dictionary
foreach ($tokens as $token) {
//If statement so to ignore tokens which are either too long or too short or in the $ignoreList
if (strlen($token) > $this->minTokenLength && strlen($token) < $this->maxTokenLength && !in_array($token, $this->ignoreList)) {
//If dictionary[token][class] is set
if (isset($this->dictionary[$token][$class])) {
//Set count equal to it
$count = $this->dictionary[$token][$class];
} else {
$count = 0;
}
//Score[class] is calcumeted by $scores[class] x $count +1 divided by the $classTokCounts[class] + $tokCount
$scores[$class] *= ($count + 1);
}
}
//Score for this class is the prior probability multiplyied by the score for this class
$scores[$class] = $this->prior[$class] * $scores[$class];
}
//Makes the scores relative percents
foreach ($this->classes as $class) {
$total_score += $scores[$class];
}
foreach ($this->classes as $class) {
$scores[$class] = round($scores[$class] / $total_score, 3);
}
//Sort array in reverse order
arsort($scores);
return $scores;
}
/**
* Get the class of the text based on it's score
*
* @param str $sentence
* @return str pos|neu|neg
*/
public function categorise($sentence) {
$scores = $this->score($sentence);
//Classification is the key to the scores array
$classification = key($scores);
return $classification;
}
/**
* Load and cache dictionary
*
* @param str $class
* @return boolean
*/
public function setDictionary($class) {
/**
* For some people this file extention causes some problems!
*/
$fn = "{$this->dataFolder}data.{$class}.php";
if (file_exists($fn)) {
$temp = trim((string) file_get_contents($fn));
$words = unserialize($temp);
} else {
echo 'File does not exist: ' . $fn;
}
//Loop through all of the entries
foreach ($words as $word) {
$this->docCount++;
$this->classDocCounts[$class]++;
//Trim word
$word = trim($word);
//If this word isn't already in the dictionary with this class
if (!isset($this->dictionary[$word][$class])) {
//Add to this word to the dictionary and set counter value as one. This function ensures that if a word is in the text file more than once it still is only accounted for one in the array
$this->dictionary[$word][$class] = 1;
}//Close If statement
$this->classTokCounts[$class]++;
$this->tokCount++;
}//Close while loop going through everyline in the text file
return true;
}
/**
* Set the base folder for loading data models
* @param str $dataFolder base folder
* @param bool $loadDefaults true - load everything by default | false - just change the directory
*/
public function setDataFolder($dataFolder = false, $loadDefaults = false){
//if $dataFolder not provided, load default, else set the provided one
if($dataFolder == false){
$this->dataFolder = __DIR__ . '/data/';
}
else{
if(file_exists($dataFolder)){
$this->dataFolder = $dataFolder;
}
else{
echo 'Error: could not find the directory - '.$dataFolder;
}
}
//load default directories, ignore and prefixe lists
if($loadDefaults !== false){
$this->loadDefaults();
}
}
/**
* Load and cache directories, get ignore and prefix lists
*/
private function loadDefaults(){
// Load and cache dictionaries
foreach ($this->classes as $class) {
if (!$this->setDictionary($class)) {
echo "Error: Dictionary for class '$class' could not be loaded";
}
}
if (!isset($this->dictionary) || empty($this->dictionary))
echo 'Error: Dictionaries not set';
//Run function to get ignore list
$this->ignoreList = $this->getList('ign');
//If ingnoreList not get give error message
if (!isset($this->ignoreList))
echo 'Error: Ignore List not set';
//Get the list of negative prefixes
$this->negPrefixList = $this->getList('prefix');
//If neg prefix list not set give error
if (!isset($this->negPrefixList))
echo 'Error: Ignore List not set';
}
/**
* Break text into tokens
*
* @param str $string String being broken up
* @return array An array of tokens
*/
private function _getTokens($string) {
// Replace line endings with spaces
$string = str_replace("\r\n", " ", $string);
//Clean the string so is free from accents
$string = $this->_cleanString($string);
//Make all texts lowercase as the database of words in in lowercase
$string = strtolower($string);
$string = preg_replace('/[[:punct:]]+/', '', $string);
//Break string into individual words using explode putting them into an array
$matches = explode(' ', $string);
//Return array with each individual token
return $matches;
}
/**
* Load and cache additional word lists
*
* @param str $type
* @return array
*/
public function getList($type) {
//Set up empty word list array
$wordList = array();
$fn = "{$this->dataFolder}data.{$type}.php";
;
if (file_exists($fn)) {
$temp = trim((string) file_get_contents($fn));
$words = unserialize($temp);
} else {
return 'File does not exist: ' . $fn;
}
//Loop through results
foreach ($words as $word) {
//remove any slashes
$word = stripcslashes($word);
//Trim word
$trimmed = trim($word);
//Push results into $wordList array
array_push($wordList, $trimmed);
}
//Return $wordList
return $wordList;
}
/**
* Function to clean a string so all characters with accents are turned into ASCII characters. EG: ‡ = a
*
* @param str $string
* @return str
*/
private function _cleanString($string) {
$diac =
/* A */ chr(192) . chr(193) . chr(194) . chr(195) . chr(196) . chr(197) .
/* a */ chr(224) . chr(225) . chr(226) . chr(227) . chr(228) . chr(229) .
/* O */ chr(210) . chr(211) . chr(212) . chr(213) . chr(214) . chr(216) .
/* o */ chr(242) . chr(243) . chr(244) . chr(245) . chr(246) . chr(248) .
/* E */ chr(200) . chr(201) . chr(202) . chr(203) .
/* e */ chr(232) . chr(233) . chr(234) . chr(235) .
/* Cc */ chr(199) . chr(231) .
/* I */ chr(204) . chr(205) . chr(206) . chr(207) .
/* i */ chr(236) . chr(237) . chr(238) . chr(239) .
/* U */ chr(217) . chr(218) . chr(219) . chr(220) .
/* u */ chr(249) . chr(250) . chr(251) . chr(252) .
/* yNn */ chr(255) . chr(209) . chr(241);
return strtolower(strtr($string, $diac, 'AAAAAAaaaaaaOOOOOOooooooEEEEeeeeCcIIIIiiiiUUUUuuuuyNn'));
}
/**
* Deletes old data/data.* files
* Creates new files from updated source fi
*/
public function reloadDictionaries(){
foreach($this->classes as $class){
$fn = "{$this->dataFolder}data.{$class}.php";
if (file_exists($fn)) {
unlink($fn);
}
}
$dictionaries = __DIR__ . '/dictionaries/';
foreach($this->classes as $class){
$dict = "{$dictionaries}source.{$class}.php";
require_once($dict);
$data = $class;
$fn = "{$this->dataFolder}data.{$class}.php";
file_put_contents($fn, serialize($$data));
}
}
}
?>
jwhennessey/phpinsight/lib/PHPInsight/data/data.ign.php 0000644 00000024533 15153553404 0017131 0 ustar 00 a:578:{i:0;s:6:"ccedil";i:1;s:5:"aelig";i:2;s:4:"much";i:3;s:6:"mostly";i:4;s:4:"most";i:5;s:8:"moreover";i:6;s:4:"more";i:7;s:5:"might";i:8;s:6:"merely";i:9;s:9:"meanwhile";i:10;s:4:"mean";i:11;s:2:"me";i:12;s:5:"maybe";i:13;s:3:"may";i:14;s:4:"many";i:15;s:6:"mainly";i:16;s:3:"ltd";i:17;s:5:"looks";i:18;s:7:"looking";i:19;s:4:"look";i:20;s:6:"little";i:21;s:6:"likely";i:22;s:5:"liked";i:23;s:5:"let's";i:24;s:3:"let";i:25;s:4:"lest";i:26;s:4:"less";i:27;s:5:"least";i:28;s:8:"latterly";i:29;s:6:"latter";i:30;s:5:"later";i:31;s:6:"lately";i:32;s:4:"last";i:33;s:5:"knows";i:34;s:5:"known";i:35;s:4:"know";i:36;s:4:"kept";i:37;s:5:"keeps";i:38;s:4:"keep";i:39;s:4:"just";i:40;s:6:"itself";i:41;s:3:"its";i:42;s:4:"it's";i:43;s:5:"it'll";i:44;s:4:"it'd";i:45;s:2:"it";i:46;s:2:"is";i:47;s:6:"inward";i:48;s:4:"into";i:49;s:7:"instead";i:50;s:7:"insofar";i:51;s:5:"inner";i:52;s:9:"indicates";i:53;s:9:"indicated";i:54;s:8:"indicate";i:55;s:6:"indeed";i:56;s:3:"inc";i:57;s:8:"inasmuch";i:58;s:2:"in";i:59;s:9:"immediate";i:60;s:7:"ignored";i:61;s:2:"if";i:62;s:2:"ie";i:63;s:4:"i've";i:64;s:3:"i'm";i:65;s:4:"i'll";i:66;s:3:"i'd";i:67;s:7:"however";i:68;s:7:"howbeit";i:69;s:3:"how";i:70;s:9:"hopefully";i:71;s:6:"hither";i:72;s:3:"his";i:73;s:7:"himself";i:74;s:3:"him";i:75;s:2:"hi";i:76;s:7:"herself";i:77;s:4:"hers";i:78;s:8:"hereupon";i:79;s:6:"herein";i:80;s:6:"hereby";i:81;s:9:"hereafter";i:82;s:6:"here's";i:83;s:4:"here";i:84;s:3:"her";i:85;s:5:"hence";i:86;s:4:"help";i:87;s:5:"hello";i:88;s:4:"he's";i:89;s:2:"he";i:90;s:6:"having";i:91;s:7:"haven't";i:92;s:4:"have";i:93;s:6:"hasn't";i:94;s:3:"has";i:95;s:6:"hardly";i:96;s:7:"happens";i:97;s:6:"hadn't";i:98;s:3:"had";i:99;s:9:"greetings";i:100;s:6:"gotten";i:101;s:3:"got";i:102;s:4:"gone";i:103;s:5:"going";i:104;s:4:"goes";i:105;s:2:"go";i:106;s:5:"gives";i:107;s:5:"given";i:108;s:7:"getting";i:109;s:4:"gets";i:110;s:3:"get";i:111;s:11:"furthermore";i:112;s:7:"further";i:113;s:4:"from";i:114;s:4:"four";i:115;s:5:"forth";i:116;s:8:"formerly";i:117;s:6:"former";i:118;s:3:"for";i:119;s:7:"follows";i:120;s:9:"following";i:121;s:8:"followed";i:122;s:4:"five";i:123;s:5:"first";i:124;s:5:"fifth";i:125;s:3:"few";i:126;s:3:"far";i:127;s:6:"except";i:128;s:7:"example";i:129;s:7:"exactly";i:130;s:2:"ex";i:131;s:10:"everywhere";i:132;s:10:"everything";i:133;s:8:"everyone";i:134;s:9:"everybody";i:135;s:5:"every";i:136;s:4:"ever";i:137;s:4:"even";i:138;s:3:"etc";i:139;s:2:"et";i:140;s:10:"especially";i:141;s:8:"entirely";i:142;s:6:"enough";i:143;s:9:"elsewhere";i:144;s:4:"else";i:145;s:6:"either";i:146;s:5:"eight";i:147;s:2:"eg";i:148;s:3:"edu";i:149;s:4:"each";i:150;s:6:"during";i:151;s:9:"downwards";i:152;s:4:"down";i:153;s:4:"done";i:154;s:5:"don't";i:155;s:5:"doing";i:156;s:7:"doesn't";i:157;s:4:"does";i:158;s:2:"do";i:159;s:9:"different";i:160;s:6:"didn't";i:161;s:3:"did";i:162;s:7:"despite";i:163;s:9:"described";i:164;s:10:"definitely";i:165;s:9:"currently";i:166;s:6:"course";i:167;s:8:"couldn't";i:168;s:5:"could";i:169;s:13:"corresponding";i:170;s:8:"contains";i:171;s:10:"containing";i:172;s:7:"contain";i:173;s:11:"considering";i:174;s:8:"consider";i:175;s:12:"consequently";i:176;s:10:"concerning";i:177;s:5:"comes";i:178;s:4:"come";i:179;s:3:"com";i:180;s:2:"co";i:181;s:7:"clearly";i:182;s:7:"changes";i:183;s:9:"certainly";i:184;s:7:"certain";i:185;s:6:"causes";i:186;s:5:"cause";i:187;s:4:"cant";i:188;s:6:"cannot";i:189;s:5:"can't";i:190;s:3:"can";i:191;s:4:"came";i:192;s:3:"c's";i:193;s:5:"c'mon";i:194;s:2:"by";i:195;s:3:"but";i:196;s:5:"brief";i:197;s:4:"both";i:198;s:6:"beyond";i:199;s:7:"between";i:200;s:6:"better";i:201;s:4:"best";i:202;s:7:"besides";i:203;s:6:"beside";i:204;s:5:"below";i:205;s:7:"believe";i:206;s:5:"being";i:207;s:6:"behind";i:208;s:10:"beforehand";i:209;s:6:"before";i:210;s:4:"been";i:211;s:8:"becoming";i:212;s:7:"becomes";i:213;s:6:"become";i:214;s:7:"because";i:215;s:6:"became";i:216;s:2:"be";i:217;s:7:"awfully";i:218;s:4:"away";i:219;s:9:"available";i:220;s:2:"at";i:221;s:10:"associated";i:222;s:6:"asking";i:223;s:3:"ask";i:224;s:5:"aside";i:225;s:2:"as";i:226;s:6:"around";i:227;s:3:"are";i:228;s:11:"appropriate";i:229;s:10:"appreciate";i:230;s:6:"appear";i:231;s:5:"apart";i:232;s:8:"anywhere";i:233;s:7:"anyways";i:234;s:6:"anyway";i:235;s:8:"anything";i:236;s:6:"anyone";i:237;s:6:"anyhow";i:238;s:7:"anybody";i:239;s:3:"any";i:240;s:7:"another";i:241;s:3:"and";i:242;s:2:"an";i:243;s:7:"amongst";i:244;s:5:"among";i:245;s:2:"am";i:246;s:6:"always";i:247;s:8:"although";i:248;s:4:"also";i:249;s:7:"already";i:250;s:5:"along";i:251;s:5:"alone";i:252;s:6:"almost";i:253;s:6:"allows";i:254;s:5:"allow";i:255;s:3:"all";i:256;s:7:"against";i:257;s:5:"again";i:258;s:10:"afterwards";i:259;s:5:"after";i:260;s:8:"actually";i:261;s:6:"across";i:262;s:11:"accordingly";i:263;s:9:"according";i:264;s:5:"above";i:265;s:5:"about";i:266;s:4:"able";i:267;s:5:"ain't";i:268;s:3:"bit";i:269;s:4:"para";i:270;s:5:"cedil";i:271;s:5:"https";i:272;s:5:"zynga";i:273;s:4:"must";i:274;s:2:"my";i:275;s:6:"myself";i:276;s:4:"name";i:277;s:6:"namely";i:278;s:2:"nd";i:279;s:4:"near";i:280;s:6:"nearly";i:281;s:9:"necessary";i:282;s:4:"need";i:283;s:5:"needs";i:284;s:7:"neither";i:285;s:5:"never";i:286;s:12:"nevertheless";i:287;s:3:"new";i:288;s:4:"next";i:289;s:4:"nine";i:290;s:2:"no";i:291;s:6:"nobody";i:292;s:3:"non";i:293;s:4:"none";i:294;s:5:"noone";i:295;s:3:"nor";i:296;s:8:"normally";i:297;s:7:"nothing";i:298;s:5:"novel";i:299;s:3:"now";i:300;s:7:"nowhere";i:301;s:9:"obviously";i:302;s:2:"of";i:303;s:3:"off";i:304;s:5:"often";i:305;s:2:"oh";i:306;s:2:"ok";i:307;s:4:"okay";i:308;s:3:"old";i:309;s:2:"on";i:310;s:4:"once";i:311;s:3:"one";i:312;s:4:"ones";i:313;s:4:"only";i:314;s:4:"onto";i:315;s:2:"or";i:316;s:5:"other";i:317;s:6:"others";i:318;s:9:"otherwise";i:319;s:5:"ought";i:320;s:3:"our";i:321;s:4:"ours";i:322;s:9:"ourselves";i:323;s:3:"out";i:324;s:7:"outside";i:325;s:4:"over";i:326;s:7:"overall";i:327;s:3:"own";i:328;s:10:"particular";i:329;s:12:"particularly";i:330;s:3:"per";i:331;s:7:"perhaps";i:332;s:6:"placed";i:333;s:6:"please";i:334;s:4:"plus";i:335;s:8:"possible";i:336;s:10:"presumably";i:337;s:8:"probably";i:338;s:8:"provides";i:339;s:3:"que";i:340;s:5:"quite";i:341;s:2:"qv";i:342;s:6:"rather";i:343;s:2:"rd";i:344;s:2:"re";i:345;s:6:"really";i:346;s:9:"regarding";i:347;s:10:"regardless";i:348;s:7:"regards";i:349;s:10:"relatively";i:350;s:12:"respectively";i:351;s:5:"right";i:352;s:4:"said";i:353;s:4:"same";i:354;s:3:"saw";i:355;s:3:"say";i:356;s:6:"saying";i:357;s:4:"says";i:358;s:6:"second";i:359;s:8:"secondly";i:360;s:3:"see";i:361;s:6:"seeing";i:362;s:4:"seem";i:363;s:6:"seemed";i:364;s:7:"seeming";i:365;s:5:"seems";i:366;s:4:"seen";i:367;s:4:"self";i:368;s:6:"selves";i:369;s:8:"sensible";i:370;s:4:"sent";i:371;s:7:"serious";i:372;s:9:"seriously";i:373;s:5:"seven";i:374;s:7:"several";i:375;s:5:"shall";i:376;s:3:"she";i:377;s:6:"should";i:378;s:9:"shouldn't";i:379;s:5:"since";i:380;s:3:"six";i:381;s:2:"so";i:382;s:4:"some";i:383;s:8:"somebody";i:384;s:7:"somehow";i:385;s:7:"someone";i:386;s:9:"something";i:387;s:8:"sometime";i:388;s:9:"sometimes";i:389;s:8:"somewhat";i:390;s:9:"somewhere";i:391;s:4:"soon";i:392;s:5:"sorry";i:393;s:9:"specified";i:394;s:7:"specify";i:395;s:10:"specifying";i:396;s:5:"still";i:397;s:3:"sub";i:398;s:4:"such";i:399;s:3:"sup";i:400;s:4:"sure";i:401;s:4:"take";i:402;s:5:"taken";i:403;s:4:"tell";i:404;s:5:"tends";i:405;s:2:"th";i:406;s:4:"than";i:407;s:5:"thank";i:408;s:6:"thanks";i:409;s:5:"thanx";i:410;s:4:"that";i:411;s:6:"that's";i:412;s:5:"thats";i:413;s:3:"the";i:414;s:5:"their";i:415;s:6:"theirs";i:416;s:4:"them";i:417;s:10:"themselves";i:418;s:4:"then";i:419;s:6:"thence";i:420;s:5:"there";i:421;s:7:"there's";i:422;s:10:"thereafter";i:423;s:7:"thereby";i:424;s:9:"therefore";i:425;s:7:"therein";i:426;s:6:"theres";i:427;s:9:"thereupon";i:428;s:5:"these";i:429;s:4:"they";i:430;s:6:"they'd";i:431;s:7:"they'll";i:432;s:7:"they're";i:433;s:7:"they've";i:434;s:5:"think";i:435;s:5:"third";i:436;s:4:"this";i:437;s:8:"thorough";i:438;s:10:"thoroughly";i:439;s:5:"those";i:440;s:6:"though";i:441;s:5:"three";i:442;s:7:"through";i:443;s:10:"throughout";i:444;s:4:"thru";i:445;s:4:"thus";i:446;s:2:"to";i:447;s:8:"together";i:448;s:3:"too";i:449;s:4:"took";i:450;s:6:"toward";i:451;s:7:"towards";i:452;s:5:"tried";i:453;s:5:"tries";i:454;s:5:"truly";i:455;s:3:"try";i:456;s:6:"trying";i:457;s:5:"twice";i:458;s:3:"two";i:459;s:2:"un";i:460;s:5:"under";i:461;s:13:"unfortunately";i:462;s:6:"unless";i:463;s:8:"unlikely";i:464;s:5:"until";i:465;s:4:"unto";i:466;s:2:"up";i:467;s:4:"upon";i:468;s:2:"us";i:469;s:3:"use";i:470;s:4:"used";i:471;s:4:"uses";i:472;s:5:"using";i:473;s:7:"usually";i:474;s:5:"value";i:475;s:7:"various";i:476;s:4:"very";i:477;s:3:"via";i:478;s:3:"viz";i:479;s:2:"vs";i:480;s:4:"want";i:481;s:5:"wants";i:482;s:3:"was";i:483;s:6:"wasn't";i:484;s:3:"way";i:485;s:2:"we";i:486;s:4:"we'd";i:487;s:5:"we'll";i:488;s:5:"we're";i:489;s:5:"we've";i:490;s:7:"welcome";i:491;s:4:"well";i:492;s:4:"went";i:493;s:4:"were";i:494;s:7:"weren't";i:495;s:4:"what";i:496;s:6:"what's";i:497;s:8:"whatever";i:498;s:4:"when";i:499;s:6:"whence";i:500;s:8:"whenever";i:501;s:5:"where";i:502;s:7:"where's";i:503;s:10:"whereafter";i:504;s:7:"whereas";i:505;s:7:"whereby";i:506;s:7:"wherein";i:507;s:9:"whereupon";i:508;s:8:"wherever";i:509;s:7:"whether";i:510;s:5:"which";i:511;s:5:"while";i:512;s:7:"whither";i:513;s:3:"who";i:514;s:5:"who's";i:515;s:7:"whoever";i:516;s:5:"whole";i:517;s:4:"whom";i:518;s:5:"whose";i:519;s:3:"why";i:520;s:4:"will";i:521;s:7:"willing";i:522;s:4:"wish";i:523;s:4:"with";i:524;s:6:"within";i:525;s:7:"without";i:526;s:5:"won't";i:527;s:6:"wonder";i:528;s:5:"would";i:529;s:8:"wouldn't";i:530;s:3:"yes";i:531;s:3:"yet";i:532;s:3:"you";i:533;s:5:"you'd";i:534;s:6:"you'll";i:535;s:6:"you're";i:536;s:6:"you've";i:537;s:4:"your";i:538;s:5:"yours";i:539;s:8:"yourself";i:540;s:10:"yourselves";i:541;s:4:"zero";i:542;s:6:"agrave";i:543;s:6:"atilde";i:544;s:4:"http";i:545;s:5:"acirc";i:546;s:5:"aring";i:547;s:4:"quot";i:548;s:6:"ntilde";i:549;s:3:"amp";i:550;s:4:"auml";i:551;s:4:"nbsp";i:552;s:5:"laquo";i:553;s:4:"iuml";i:554;s:6:"egrave";i:555;s:4:"macr";i:556;s:6:"brvbar";i:557;s:4:"ordm";i:558;s:6:"plusmn";i:559;s:3:"reg";i:560;s:3:"www";i:561;s:5:"acute";i:562;s:4:"cent";i:563;s:4:"ordf";i:564;s:6:"eacute";i:565;s:4:"frac";i:566;s:10:"sLZjpNxJtx";i:567;s:3:"ETH";i:568;s:5:"Icirc";i:569;s:4:"sect";i:570;s:3:"goo";i:571;s:3:"seu";i:572;s:4:"como";i:573;s:3:"ser";i:574;s:6:"filhos";i:575;s:4:"dlvr";i:576;s:5:"iexcl";i:577;s:6:"Ugrave";} jwhennessey/phpinsight/lib/PHPInsight/data/data.neg.php 0000644 00000705345 15153553404 0017134 0 ustar 00 a:9095:{i:0;s:7:"rubbish";i:1;s:3:"bad";i:2;s:4:"hate";i:3;s:9:"abandoned";i:4;s:6:"abused";i:5;s:7:"accused";i:6;s:8:"addicted";i:7;s:6:"afraid";i:8;s:10:"aggravated";i:9;s:10:"aggressive";i:10;s:5:"alone";i:11;s:5:"angry";i:12;s:7:"anguish";i:13;s:7:"annoyed";i:14;s:7:"anxious";i:15;s:12:"apprehensive";i:16;s:13:"argumentative";i:17;s:10:"artificial";i:18;s:7:"ashamed";i:19;s:9:"assaulted";i:20;s:9:"atrocious";i:21;s:8:"attacked";i:22;s:7:"avoided";i:23;s:5:"awful";i:24;s:7:"awkward";i:25;s:8:"badgered";i:26;s:7:"baffled";i:27;s:6:"banned";i:28;s:6:"barren";i:29;s:4:"beat";i:30;s:6:"beaten";i:31;s:9:"belittled";i:32;s:7:"berated";i:33;s:8:"betrayed";i:34;s:6:"bitter";i:35;s:7:"bizzare";i:36;s:11:"blacklisted";i:37;s:11:"blackmailed";i:38;s:6:"blamed";i:39;s:5:"bleak";i:40;s:4:"blur";i:41;s:5:"bored";i:42;s:6:"boring";i:43;s:15:"notveryadorable";i:44;s:8:"bothered";i:45;s:10:"bothersome";i:46;s:7:"bounded";i:47;s:11:"notadorable";i:48;s:6:"broken";i:49;s:7:"bruised";i:50;s:14:"notveryrefined";i:51;s:6:"bugged";i:52;s:7:"bullied";i:53;s:6:"bummed";i:54;s:8:"burdened";i:55;s:10:"burdensome";i:56;s:6:"burned";i:57;s:10:"notrefined";i:58;s:5:"caged";i:59;s:2:"in";i:60;s:8:"careless";i:61;s:7:"chaotic";i:62;s:6:"chased";i:63;s:7:"cheated";i:64;s:7:"chicken";i:65;s:14:"claustrophobic";i:66;s:6:"clingy";i:67;s:6:"closed";i:68;s:8:"clueless";i:69;s:6:"clumsy";i:70;s:6:"coaxed";i:71;s:11:"codependent";i:72;s:7:"coerced";i:73;s:4:"cold";i:74;s:13:"notverypoetic";i:75;s:9:"combative";i:76;s:9:"commanded";i:77;s:8:"compared";i:78;s:11:"competitive";i:79;s:10:"compulsive";i:80;s:9:"conceited";i:81;s:9:"concerned";i:82;s:8:"confined";i:83;s:10:"conflicted";i:84;s:10:"confronted";i:85;s:8:"confused";i:86;s:6:"conned";i:87;s:8:"consumed";i:88;s:13:"contemplative";i:89;s:8:"contempt";i:90;s:11:"contentious";i:91;s:10:"controlled";i:92;s:9:"convicted";i:93;s:8:"cornered";i:94;s:9:"corralled";i:95;s:8:"cowardly";i:96;s:6:"crabby";i:97;s:7:"cramped";i:98;s:6:"cranky";i:99;s:4:"crap";i:100;s:6:"crappy";i:101;s:5:"crazy";i:102;s:6:"creepy";i:103;s:8:"critical";i:104;s:10:"criticized";i:105;s:5:"cross";i:106;s:7:"crowded";i:107;s:6:"cruddy";i:108;s:6:"crummy";i:109;s:7:"crushed";i:110;s:9:"notpoetic";i:111;s:7:"cynical";i:112;s:7:"damaged";i:113;s:6:"damned";i:114;s:9:"dangerous";i:115;s:4:"dark";i:116;s:5:"dazed";i:117;s:4:"dead";i:118;s:8:"deceived";i:119;s:4:"deep";i:120;s:7:"defamed";i:121;s:8:"defeated";i:122;s:9:"defective";i:123;s:11:"defenseless";i:124;s:9:"defensive";i:125;s:7:"defiant";i:126;s:9:"deficient";i:127;s:8:"deflated";i:128;s:8:"degraded";i:129;s:11:"dehumanized";i:130;s:8:"dejected";i:131;s:8:"delicate";i:132;s:7:"deluded";i:133;s:9:"demanding";i:134;s:8:"demeaned";i:135;s:8:"demented";i:136;s:11:"demoralized";i:137;s:11:"demotivated";i:138;s:9:"dependent";i:139;s:8:"depleted";i:140;s:8:"depraved";i:141;s:9:"depressed";i:142;s:8:"deprived";i:143;s:8:"deserted";i:144;s:8:"desolate";i:145;s:7:"despair";i:146;s:10:"despairing";i:147;s:9:"desperate";i:148;s:10:"despicable";i:149;s:8:"despised";i:150;s:9:"destroyed";i:151;s:11:"destructive";i:152;s:8:"detached";i:153;s:6:"detest";i:154;s:10:"detestable";i:155;s:8:"detested";i:156;s:8:"devalued";i:157;s:10:"devastated";i:158;s:7:"deviant";i:159;s:6:"devoid";i:160;s:9:"diagnosed";i:161;s:9:"different";i:162;s:9:"difficult";i:163;s:13:"directionless";i:164;s:5:"dirty";i:165;s:8:"disabled";i:166;s:12:"disagreeable";i:167;s:12:"disappointed";i:168;s:13:"disappointing";i:169;s:11:"disbelieved";i:170;s:11:"discardable";i:171;s:9:"discarded";i:172;s:12:"disconnected";i:173;s:10:"discontent";i:174;s:11:"discouraged";i:175;s:13:"discriminated";i:176;s:7:"disdain";i:177;s:10:"disdainful";i:178;s:12:"disempowered";i:179;s:12:"disenchanted";i:180;s:9:"disgraced";i:181;s:11:"disgruntled";i:182;s:7:"disgust";i:183;s:9:"disgusted";i:184;s:12:"disheartened";i:185;s:9:"dishonest";i:186;s:12:"dishonorable";i:187;s:13:"disillusioned";i:188;s:7:"dislike";i:189;s:8:"disliked";i:190;s:6:"dismal";i:191;s:8:"dismayed";i:192;s:12:"disorganized";i:193;s:11:"disoriented";i:194;s:8:"disowned";i:195;s:10:"displeased";i:196;s:10:"disposable";i:197;s:11:"disregarded";i:198;s:12:"disrespected";i:199;s:12:"dissatisfied";i:200;s:7:"distant";i:201;s:10:"distracted";i:202;s:10:"distraught";i:203;s:10:"distressed";i:204;s:9:"disturbed";i:205;s:5:"dizzy";i:206;s:9:"dominated";i:207;s:6:"doomed";i:208;s:17:"notveryattractive";i:209;s:7:"doubted";i:210;s:8:"doubtful";i:211;s:4:"down";i:212;s:11:"downhearted";i:213;s:11:"downtrodden";i:214;s:7:"drained";i:215;s:8:"dramatic";i:216;s:5:"dread";i:217;s:8:"dreadful";i:218;s:6:"dreary";i:219;s:7:"dropped";i:220;s:5:"drunk";i:221;s:3:"dry";i:222;s:4:"dumb";i:223;s:6:"dumped";i:224;s:5:"duped";i:225;s:4:"edgy";i:226;s:10:"egocentric";i:227;s:9:"egotistic";i:228;s:11:"egotistical";i:229;s:7:"elusive";i:230;s:11:"emancipated";i:231;s:11:"emasculated";i:232;s:11:"embarrassed";i:233;s:9:"emotional";i:234;s:11:"emotionless";i:235;s:5:"empty";i:236;s:10:"encumbered";i:237;s:10:"endangered";i:238;s:7:"enraged";i:239;s:8:"enslaved";i:240;s:9:"entangled";i:241;s:6:"evaded";i:242;s:7:"evasive";i:243;s:7:"evicted";i:244;s:9:"excessive";i:245;s:8:"excluded";i:246;s:9:"exhausted";i:247;s:9:"notsprite";i:248;s:7:"failful";i:249;s:4:"fake";i:250;s:5:"false";i:251;s:4:"fear";i:252;s:7:"fearful";i:253;s:6:"flawed";i:254;s:6:"forced";i:255;s:9:"forgetful";i:256;s:11:"forgettable";i:257;s:9:"forgotten";i:258;s:7:"fragile";i:259;s:10:"frightened";i:260;s:6:"frigid";i:261;s:10:"frustrated";i:262;s:7:"furious";i:263;s:6:"gloomy";i:264;s:4:"glum";i:265;s:6:"gothic";i:266;s:4:"grey";i:267;s:5:"grief";i:268;s:4:"grim";i:269;s:5:"gross";i:270;s:13:"notattractive";i:271;s:9:"grotesque";i:272;s:7:"grouchy";i:273;s:8:"grounded";i:274;s:6:"grumpy";i:275;s:6:"guilty";i:276;s:7:"idiotic";i:277;s:8:"ignorant";i:278;s:7:"ignored";i:279;s:3:"ill";i:280;s:18:"notverysentimental";i:281;s:10:"imbalanced";i:282;s:8:"impotent";i:283;s:10:"imprisoned";i:284;s:9:"impulsive";i:285;s:8:"inactive";i:286;s:10:"inadequate";i:287;s:9:"incapable";i:288;s:15:"incommunicative";i:289;s:11:"incompetent";i:290;s:12:"incompatible";i:291;s:10:"incomplete";i:292;s:9:"incorrect";i:293;s:10:"indecisive";i:294;s:11:"indifferent";i:295;s:13:"indoctrinated";i:296;s:10:"inebriated";i:297;s:11:"ineffective";i:298;s:11:"inefficient";i:299;s:8:"inferior";i:300;s:10:"infuriated";i:301;s:9:"inhibited";i:302;s:8:"inhumane";i:303;s:7:"injured";i:304;s:10:"injusticed";i:305;s:6:"insane";i:306;s:8:"insecure";i:307;s:13:"insignificant";i:308;s:9:"insincere";i:309;s:12:"insufficient";i:310;s:8:"insulted";i:311;s:7:"intense";i:312;s:12:"interrogated";i:313;s:11:"interrupted";i:314;s:11:"intimidated";i:315;s:11:"intoxicated";i:316;s:11:"invalidated";i:317;s:9:"invisible";i:318;s:10:"irrational";i:319;s:9:"irritable";i:320;s:9:"irritated";i:321;s:8:"isolated";i:322;s:5:"jaded";i:323;s:7:"jealous";i:324;s:7:"joyless";i:325;s:6:"judged";i:326;s:7:"labeled";i:327;s:9:"laughable";i:328;s:4:"lazy";i:329;s:7:"limited";i:330;s:6:"lonely";i:331;s:8:"lonesome";i:332;s:7:"longing";i:333;s:4:"lost";i:334;s:5:"lousy";i:335;s:8:"loveless";i:336;s:3:"low";i:337;s:3:"mad";i:338;s:11:"manipulated";i:339;s:11:"masochistic";i:340;s:5:"messy";i:341;s:6:"miffed";i:342;s:9:"miserable";i:343;s:6:"misled";i:344;s:8:"mistaken";i:345;s:10:"mistreated";i:346;s:10:"mistrusted";i:347;s:13:"misunderstood";i:348;s:14:"notsentimental";i:349;s:6:"mocked";i:350;s:8:"molested";i:351;s:5:"moody";i:352;s:6:"nagged";i:353;s:5:"needy";i:354;s:8:"negative";i:355;s:7:"nervous";i:356;s:8:"neurotic";i:357;s:13:"nonconforming";i:358;s:4:"numb";i:359;s:4:"nuts";i:360;s:5:"nutty";i:361;s:11:"objectified";i:362;s:9:"obligated";i:363;s:8:"obsessed";i:364;s:9:"obsessive";i:365;s:10:"obstructed";i:366;s:3:"odd";i:367;s:8:"offended";i:368;s:7:"opposed";i:369;s:9:"oppressed";i:370;s:16:"notveryambitious";i:371;s:12:"notambitious";i:372;s:11:"overwhelmed";i:373;s:4:"pain";i:374;s:5:"panic";i:375;s:8:"paranoid";i:376;s:7:"passive";i:377;s:8:"pathetic";i:378;s:11:"pessimistic";i:379;s:9:"petrified";i:380;s:5:"phony";i:381;s:6:"pissed";i:382;s:5:"plain";i:383;s:6:"pooped";i:384;s:4:"poor";i:385;s:9:"powerless";i:386;s:11:"preoccupied";i:387;s:11:"predjudiced";i:388;s:9:"pressured";i:389;s:10:"prosecuted";i:390;s:8:"provoked";i:391;s:12:"psychopathic";i:392;s:9:"psychotic";i:393;s:8:"punished";i:394;s:6:"pushed";i:395;s:7:"puzzled";i:396;s:11:"quarrelsome";i:397;s:5:"queer";i:398;s:10:"questioned";i:399;s:5:"quiet";i:400;s:4:"rage";i:401;s:5:"raped";i:402;s:7:"rattled";i:403;s:6:"regret";i:404;s:8:"rejected";i:405;s:8:"resented";i:406;s:9:"resentful";i:407;s:11:"responsible";i:408;s:8:"retarded";i:409;s:10:"revengeful";i:410;s:9:"ridiculed";i:411;s:10:"ridiculous";i:412;s:6:"robbed";i:413;s:6:"rotten";i:414;s:3:"sad";i:415;s:8:"sadistic";i:416;s:9:"sarcastic";i:417;s:6:"scared";i:418;s:7:"scarred";i:419;s:7:"screwed";i:420;s:16:"notveryvisionary";i:421;s:12:"notvisionary";i:422;s:13:"notverylively";i:423;s:9:"notlively";i:424;s:7:"selfish";i:425;s:9:"sensitive";i:426;s:3:"shy";i:427;s:14:"notveryprudent";i:428;s:4:"slow";i:429;s:5:"small";i:430;s:9:"smothered";i:431;s:8:"spiteful";i:432;s:11:"stereotyped";i:433;s:7:"strange";i:434;s:8:"stressed";i:435;s:9:"stretched";i:436;s:5:"stuck";i:437;s:6:"stupid";i:438;s:10:"submissive";i:439;s:9:"suffering";i:440;s:10:"suffocated";i:441;s:8:"suicidal";i:442;s:11:"superficial";i:443;s:10:"suppressed";i:444;s:10:"suspicious";i:445;s:10:"notawesome";i:446;s:10:"notspecial";i:447;s:13:"notveryactive";i:448;s:18:"notveryresponsible";i:449;s:17:"notdiscriminating";i:450;s:21:"notverydiscriminating";i:451;s:14:"notresponsible";i:452;s:14:"notveryawesome";i:453;s:10:"notprudent";i:454;s:14:"notveryspecial";i:455;s:16:"notveryvivacious";i:456;s:12:"notvivacious";i:457;s:14:"notveryethical";i:458;s:10:"notethical";i:459;s:13:"notverytender";i:460;s:9:"nottender";i:461;s:16:"notverydignified";i:462;s:12:"notdignified";i:463;s:16:"notveryagreeable";i:464;s:12:"notagreeable";i:465;s:7:"notgood";i:466;s:5:"blame";i:467;s:13:"isn'tverygood";i:468;s:13:"notverythanks";i:469;s:9:"notthanks";i:470;s:12:"notverylovee";i:471;s:8:"notlovee";i:472;s:11:"notverygood";i:473;s:10:"aren'tgood";i:474;s:11:"notverynice";i:475;s:7:"notnice";i:476;s:14:"notveryamazing";i:477;s:11:"abandonment";i:478;s:11:"notverylike";i:479;s:7:"notlike";i:480;s:13:"notveryadmire";i:481;s:9:"notadmire";i:482;s:12:"notveryadore";i:483;s:8:"notadore";i:484;s:12:"notveryhappy";i:485;s:8:"nothappy";i:486;s:15:"notverygrateful";i:487;s:11:"notgrateful";i:488;s:17:"notverydetermined";i:489;s:13:"notdetermined";i:490;s:19:"notveryprofessional";i:491;s:15:"notprofessional";i:492;s:12:"notveryswell";i:493;s:8:"notswell";i:494;s:14:"notveryhelpful";i:495;s:10:"nothelpful";i:496;s:14:"notverysincere";i:497;s:10:"notsincere";i:498;s:16:"notveryauthentic";i:499;s:12:"notauthentic";i:500;s:14:"notverycontent";i:501;s:10:"notcontent";i:502;s:14:"notveryfocused";i:503;s:10:"notfocused";i:504;s:20:"notveryextraordinary";i:505;s:16:"notextraordinary";i:506;s:17:"notverydelightful";i:507;s:13:"notdelightful";i:508;s:18:"notveryimaginative";i:509;s:14:"notimaginative";i:510;s:15:"notveryreverent";i:511;s:11:"notreverent";i:512;s:17:"notverysuccessful";i:513;s:13:"notsuccessful";i:514;s:13:"notveryheroic";i:515;s:9:"notheroic";i:516;s:15:"notverycheerful";i:517;s:11:"notcheerful";i:518;s:16:"notveryinventive";i:519;s:12:"notinventive";i:520;s:13:"notveryunique";i:521;s:9:"notunique";i:522;s:14:"notveryupright";i:523;s:10:"notupright";i:524;s:11:"notverytidy";i:525;s:7:"nottidy";i:526;s:15:"notveryblissful";i:527;s:11:"notblissful";i:528;s:12:"notverytough";i:529;s:8:"nottough";i:530;s:11:"notveryglad";i:531;s:7:"notglad";i:532;s:14:"notveryreposed";i:533;s:10:"notreposed";i:534;s:16:"notverydesirable";i:535;s:12:"notdesirable";i:536;s:14:"notveryvaliant";i:537;s:10:"notvaliant";i:538;s:13:"notverymodest";i:539;s:9:"notmodest";i:540;s:16:"notveryingenious";i:541;s:12:"notingenious";i:542;s:12:"notverysolid";i:543;s:8:"notsolid";i:544;s:17:"notverycourageous";i:545;s:13:"notcourageous";i:546;s:15:"notveryprofound";i:547;s:11:"notprofound";i:548;s:16:"notveryadaptable";i:549;s:12:"notadaptable";i:550;s:13:"notveryworthy";i:551;s:9:"notworthy";i:552;s:15:"notverycolorful";i:553;s:11:"notcolorful";i:554;s:13:"notveryjoyful";i:555;s:9:"notjoyful";i:556;s:15:"notverylaudable";i:557;s:11:"notlaudable";i:558;s:11:"notverycute";i:559;s:7:"notcute";i:560;s:17:"notverydelectable";i:561;s:13:"notdelectable";i:562;s:17:"notverydependable";i:563;s:13:"notdependable";i:564;s:17:"notveryremarkable";i:565;s:13:"notremarkable";i:566;s:16:"notveryconfident";i:567;s:12:"notconfident";i:568;s:17:"notveryforbearing";i:569;s:13:"notforbearing";i:570;s:12:"notveryfunny";i:571;s:8:"notfunny";i:572;s:12:"notveryready";i:573;s:8:"notready";i:574;s:14:"notverylenient";i:575;s:10:"notlenient";i:576;s:15:"notverymagnetic";i:577;s:11:"notmagnetic";i:578;s:18:"notveryenlightened";i:579;s:14:"notenlightened";i:580;s:20:"notveryauthoritative";i:581;s:16:"notauthoritative";i:582;s:19:"notveryenterprising";i:583;s:15:"notenterprising";i:584;s:16:"notveryrighteous";i:585;s:12:"notrighteous";i:586;s:15:"notveryluminous";i:587;s:11:"notluminous";i:588;s:12:"notveryexact";i:589;s:8:"notexact";i:590;s:16:"notverycognizant";i:591;s:12:"notcognizant";i:592;s:15:"notveryecstatic";i:593;s:11:"notecstatic";i:594;s:13:"notverylovely";i:595;s:9:"notlovely";i:596;s:19:"notveryentertaining";i:597;s:15:"notentertaining";i:598;s:15:"notveryinspired";i:599;s:11:"notinspired";i:600;s:15:"notverythorough";i:601;s:11:"notthorough";i:602;s:13:"notverydecent";i:603;s:9:"notdecent";i:604;s:16:"notverypragmatic";i:605;s:12:"notpragmatic";i:606;s:12:"notverywitty";i:607;s:8:"notwitty";i:608;s:17:"notveryconvincing";i:609;s:13:"notconvincing";i:610;s:16:"notverybeautiful";i:611;s:12:"notbeautiful";i:612;s:18:"notveryresplendent";i:613;s:14:"notresplendent";i:614;s:11:"notverysexy";i:615;s:7:"notsexy";i:616;s:14:"notveryassured";i:617;s:10:"notassured";i:618;s:16:"notverycompetent";i:619;s:12:"notcompetent";i:620;s:18:"notveryprogressive";i:621;s:14:"notprogressive";i:622;s:14:"notverycomedic";i:623;s:10:"notcomedic";i:624;s:17:"notveryfelicitous";i:625;s:13:"notfelicitous";i:626;s:17:"notveryaccessible";i:627;s:13:"notaccessible";i:628;s:18:"notverycommendable";i:629;s:14:"notcommendable";i:630;s:14:"notverysensual";i:631;s:10:"notsensual";i:632;s:14:"notverysublime";i:633;s:10:"notsublime";i:634;s:18:"notverysympathetic";i:635;s:14:"notsympathetic";i:636;s:17:"notverycompatible";i:637;s:13:"notcompatible";i:638;s:15:"notverydiscrete";i:639;s:11:"notdiscrete";i:640;s:18:"notveryinfluential";i:641;s:14:"notinfluential";i:642;s:16:"notveryefficient";i:643;s:12:"notefficient";i:644;s:15:"notveryhumorous";i:645;s:11:"nothumorous";i:646;s:15:"notveryengaging";i:647;s:11:"notengaging";i:648;s:12:"notverycivil";i:649;s:8:"notcivil";i:650;s:15:"notverymerciful";i:651;s:11:"notmerciful";i:652;s:17:"notverybelievable";i:653;s:13:"notbelievable";i:654;s:13:"notverygentle";i:655;s:9:"notgentle";i:656;s:12:"notverylucky";i:657;s:8:"notlucky";i:658;s:20:"notveryknowledgeable";i:659;s:16:"notknowledgeable";i:660;s:13:"notveryserene";i:661;s:9:"notserene";i:662;s:14:"notveryearnest";i:663;s:10:"notearnest";i:664;s:13:"notveryadroit";i:665;s:9:"notadroit";i:666;s:15:"notveryfaithful";i:667;s:11:"notfaithful";i:668;s:15:"notveryexultant";i:669;s:11:"notexultant";i:670;s:17:"notveryhospitable";i:671;s:13:"nothospitable";i:672;s:14:"notverygleeful";i:673;s:10:"notgleeful";i:674;s:16:"notverysparkling";i:675;s:12:"notsparkling";i:676;s:14:"notverycordial";i:677;s:10:"notcordial";i:678;s:14:"notverysoulful";i:679;s:10:"notsoulful";i:680;s:19:"notveryappreciative";i:681;s:15:"notappreciative";i:682;s:18:"notveryspontaneous";i:683;s:14:"notspontaneous";i:684;s:18:"notveryfascinating";i:685;s:14:"notfascinating";i:686;s:16:"notverybrilliant";i:687;s:12:"notbrilliant";i:688;s:16:"notveryimpartial";i:689;s:12:"notimpartial";i:690;s:15:"notveryconstant";i:691;s:11:"notconstant";i:692;s:14:"notverynatural";i:693;s:10:"notnatural";i:694;s:11:"notverykeen";i:695;s:7:"notkeen";i:696;s:12:"notverymerry";i:697;s:8:"notmerry";i:698;s:15:"notveryeloquent";i:699;s:11:"noteloquent";i:700;s:15:"notverysensible";i:701;s:11:"notsensible";i:702;s:18:"notverycomfortable";i:703;s:14:"notcomfortable";i:704;s:14:"notveryrelaxed";i:705;s:10:"notrelaxed";i:706;s:13:"notverycasual";i:707;s:9:"notcasual";i:708;s:12:"notveryloyal";i:709;s:8:"notloyal";i:710;s:13:"notverystable";i:711;s:9:"notstable";i:712;s:12:"notveryalive";i:713;s:8:"notalive";i:714;s:15:"notverycharming";i:715;s:11:"notcharming";i:716;s:16:"notveryreceptive";i:717;s:12:"notreceptive";i:718;s:14:"notverylooking";i:719;s:10:"notlooking";i:720;s:9:"isn'tgood";i:721;s:15:"notverymannered";i:722;s:11:"notmannered";i:723;s:13:"notveryshrewd";i:724;s:9:"notshrewd";i:725;s:14:"notveryliberal";i:726;s:10:"notliberal";i:727;s:15:"notverygrounded";i:728;s:11:"notgrounded";i:729;s:15:"notverytruthful";i:730;s:11:"nottruthful";i:731;s:15:"notverygorgeous";i:732;s:11:"notgorgeous";i:733;s:16:"notverypractical";i:734;s:12:"notpractical";i:735;s:18:"notveryindustrious";i:736;s:14:"notindustrious";i:737;s:12:"notverybrave";i:738;s:8:"notbrave";i:739;s:14:"notveryperfect";i:740;s:10:"notperfect";i:741;s:12:"notveryhardy";i:742;s:8:"nothardy";i:743;s:15:"notveryinnocent";i:744;s:11:"notinnocent";i:745;s:16:"notveryenchanted";i:746;s:12:"notenchanted";i:747;s:15:"notveryathletic";i:748;s:11:"notathletic";i:749;s:12:"notverynoble";i:750;s:8:"notnoble";i:751;s:15:"notverydiligent";i:752;s:11:"notdiligent";i:753;s:17:"notverygregarious";i:754;s:13:"notgregarious";i:755;s:17:"notveryresponsive";i:756;s:13:"notresponsive";i:757;s:15:"notveryprecious";i:758;s:11:"notprecious";i:759;s:16:"notverysatisfied";i:760;s:12:"notsatisfied";i:761;s:11:"notverydeep";i:762;s:7:"notdeep";i:763;s:11:"notverycozy";i:764;s:7:"notcozy";i:765;s:12:"notveryagile";i:766;s:8:"notagile";i:767;s:17:"notveryrestrained";i:768;s:13:"notrestrained";i:769;s:14:"notveryhealthy";i:770;s:10:"nothealthy";i:771;s:11:"notveryjust";i:772;s:7:"notjust";i:773;s:15:"notverycreative";i:774;s:11:"notcreative";i:775;s:14:"notverygenteel";i:776;s:10:"notgenteel";i:777;s:18:"notverymeritorious";i:778;s:14:"notmeritorious";i:779;s:14:"notverylearned";i:780;s:10:"notlearned";i:781;s:12:"notveryright";i:782;s:8:"notright";i:783;s:19:"notveryapproachable";i:784;s:15:"notapproachable";i:785;s:17:"notveryharmonious";i:786;s:13:"notharmonious";i:787;s:15:"notverykissable";i:788;s:11:"notkissable";i:789;s:17:"notverybenevolent";i:790;s:13:"notbenevolent";i:791;s:12:"notverylucid";i:792;s:8:"notlucid";i:793;s:19:"notveryconciliatory";i:794;s:15:"notconciliatory";i:795;s:10:"notveryfun";i:796;s:6:"notfun";i:797;s:11:"notverybold";i:798;s:7:"notbold";i:799;s:11:"notveryrich";i:800;s:7:"notrich";i:801;s:20:"notveryaccommodating";i:802;s:16:"notaccommodating";i:803;s:16:"notveryfantastic";i:804;s:12:"notfantastic";i:805;s:12:"notveryjolly";i:806;s:8:"notjolly";i:807;s:16:"notverywhimsical";i:808;s:12:"notwhimsical";i:809;s:14:"notverydefined";i:810;s:10:"notdefined";i:811;s:17:"notveryimmaculate";i:812;s:13:"notimmaculate";i:813;s:17:"notverydiplomatic";i:814;s:13:"notdiplomatic";i:815;s:13:"notverybright";i:816;s:9:"notbright";i:817;s:13:"notverychatty";i:818;s:9:"notchatty";i:819;s:11:"notverymild";i:820;s:7:"notmild";i:821;s:13:"notveryproper";i:822;s:9:"notproper";i:823;s:15:"notveryvigorous";i:824;s:11:"notvigorous";i:825;s:16:"notverywonderful";i:826;s:12:"notwonderful";i:827;s:15:"notveryalluring";i:828;s:11:"notalluring";i:829;s:20:"notverycompanionable";i:830;s:16:"notcompanionable";i:831;s:17:"notveryreflective";i:832;s:13:"notreflective";i:833;s:15:"notverycredible";i:834;s:11:"notcredible";i:835;s:15:"notverypunctual";i:836;s:11:"notpunctual";i:837;s:13:"notveryelated";i:838;s:9:"notelated";i:839;s:17:"notveryimpressive";i:840;s:13:"notimpressive";i:841;s:14:"notveryplayful";i:842;s:10:"notplayful";i:843;s:18:"notveryintelligent";i:844;s:14:"notintelligent";i:845;s:13:"notverysuperb";i:846;s:9:"notsuperb";i:847;s:15:"notveryoriginal";i:848;s:11:"notoriginal";i:849;s:14:"notverydevoted";i:850;s:10:"notdevoted";i:851;s:15:"notverypleasant";i:852;s:11:"notpleasant";i:853;s:11:"notverywarm";i:854;s:7:"notwarm";i:855;s:15:"notverypowerful";i:856;s:11:"notpowerful";i:857;s:17:"notveryconvulsive";i:858;s:13:"notconvulsive";i:859;s:15:"notveryfabulous";i:860;s:11:"notfabulous";i:861;s:15:"notverygracious";i:862;s:11:"notgracious";i:863;s:17:"notveryaltruistic";i:864;s:13:"notaltruistic";i:865;s:18:"notveryaffirmative";i:866;s:14:"notaffirmative";i:867;s:13:"notverydirect";i:868;s:9:"notdirect";i:869;s:18:"notverygoodhearted";i:870;s:14:"notgoodhearted";i:871;s:13:"notverychaste";i:872;s:9:"notchaste";i:873;s:11:"notverywise";i:874;s:7:"notwise";i:875;s:20:"notveryphilanthropic";i:876;s:16:"notphilanthropic";i:877;s:13:"notveryrobust";i:878;s:9:"notrobust";i:879;s:16:"notveryconvivial";i:880;s:12:"notconvivial";i:881;s:17:"notveryconsistent";i:882;s:13:"notconsistent";i:883;s:16:"notverydedicated";i:884;s:12:"notdedicated";i:885;s:17:"notverypersuasive";i:886;s:13:"notpersuasive";i:887;s:10:"notamazing";i:888;s:11:"notverycalm";i:889;s:7:"notcalm";i:890;s:13:"notverynimble";i:891;s:9:"notnimble";i:892;s:15:"notverystudious";i:893;s:11:"notstudious";i:894;s:17:"notveryneighborly";i:895;s:13:"notneighborly";i:896;s:15:"notverydecisive";i:897;s:11:"notdecisive";i:898;s:13:"notverysubtle";i:899;s:9:"notsubtle";i:900;s:17:"notverypersonable";i:901;s:13:"notpersonable";i:902;s:15:"notverypeaceful";i:903;s:11:"notpeaceful";i:904;s:13:"notverybrainy";i:905;s:9:"notbrainy";i:906;s:14:"notverystylish";i:907;s:10:"notstylish";i:908;s:14:"notveryhopeful";i:909;s:10:"nothopeful";i:910;s:14:"notveryaffable";i:911;s:10:"notaffable";i:912;s:16:"notveryexcellent";i:913;s:12:"notexcellent";i:914;s:11:"notverychic";i:915;s:7:"notchic";i:916;s:16:"notveryintuitive";i:917;s:12:"notintuitive";i:918;s:14:"notveryheedful";i:919;s:10:"notheedful";i:920;s:16:"notverycourteous";i:921;s:12:"notcourteous";i:922;s:16:"notverydisarming";i:923;s:12:"notdisarming";i:924;s:13:"notverycaring";i:925;s:9:"notcaring";i:926;s:11:"notveryfine";i:927;s:7:"notfine";i:928;s:14:"notverylogical";i:929;s:10:"notlogical";i:930;s:15:"notverytranquil";i:931;s:11:"nottranquil";i:932;s:15:"notveryvirtuous";i:933;s:11:"notvirtuous";i:934;s:16:"notveryattentive";i:935;s:12:"notattentive";i:936;s:16:"notveryprovident";i:937;s:12:"notprovident";i:938;s:17:"notverythoughtful";i:939;s:13:"notthoughtful";i:940;s:15:"notverycerebral";i:941;s:11:"notcerebral";i:942;s:15:"notveryjubilant";i:943;s:11:"notjubilant";i:944;s:19:"notveryaffectionate";i:945;s:15:"notaffectionate";i:946;s:16:"notveryforgiving";i:947;s:12:"notforgiving";i:948;s:14:"notverymindful";i:949;s:10:"notmindful";i:950;s:20:"notveryunderstanding";i:951;s:16:"notunderstanding";i:952;s:15:"notveryfruitful";i:953;s:11:"notfruitful";i:954;s:14:"notverywinsome";i:955;s:10:"notwinsome";i:956;s:15:"notverysociable";i:957;s:11:"notsociable";i:958;s:14:"notveryelegant";i:959;s:10:"notelegant";i:960;s:15:"notverymasterly";i:961;s:11:"notmasterly";i:962;s:14:"notveryfertile";i:963;s:10:"notfertile";i:964;s:12:"notverygreat";i:965;s:8:"notgreat";i:966;s:15:"notverytolerant";i:967;s:11:"nottolerant";i:968;s:11:"notveryfree";i:969;s:7:"notfree";i:970;s:13:"notverydaring";i:971;s:9:"notdaring";i:972;s:16:"notverydeserving";i:973;s:12:"notdeserving";i:974;s:15:"notverypolished";i:975;s:11:"notpolished";i:976;s:11:"notveryreal";i:977;s:7:"notreal";i:978;s:16:"notveryadmirable";i:979;s:12:"notadmirable";i:980;s:14:"notveryblessed";i:981;s:10:"notblessed";i:982;s:16:"notverycongenial";i:983;s:12:"notcongenial";i:984;s:12:"notverygodly";i:985;s:8:"notgodly";i:986;s:17:"notveryopenhanded";i:987;s:13:"notopenhanded";i:988;s:18:"notveryindependent";i:989;s:14:"notindependent";i:990;s:20:"notverycompassionate";i:991;s:16:"notcompassionate";i:992;s:17:"notveryconsummate";i:993;s:13:"notconsummate";i:994;s:15:"notveryartistic";i:995;s:11:"notartistic";i:996;s:14:"notverygenuine";i:997;s:10:"notgenuine";i:998;s:14:"notveryamorous";i:999;s:10:"notamorous";i:1000;s:13:"notverysmooth";i:1001;s:9:"notsmooth";i:1002;s:11:"notveryspry";i:1003;s:7:"notspry";i:1004;s:14:"notverycomplex";i:1005;s:10:"notcomplex";i:1006;s:16:"notveryscholarly";i:1007;s:12:"notscholarly";i:1008;s:17:"notveryautonomous";i:1009;s:13:"notautonomous";i:1010;s:19:"notveryaccomplished";i:1011;s:15:"notaccomplished";i:1012;s:13:"notveryseemly";i:1013;s:9:"notseemly";i:1014;s:13:"notveryastute";i:1015;s:9:"notastute";i:1016;s:16:"notveryrejoicing";i:1017;s:12:"notrejoicing";i:1018;s:20:"notveryphilosophical";i:1019;s:16:"notphilosophical";i:1020;s:17:"notverybeneficent";i:1021;s:13:"notbeneficent";i:1022;s:17:"notveryprivileged";i:1023;s:13:"notprivileged";i:1024;s:18:"notveryestablished";i:1025;s:14:"notestablished";i:1026;s:16:"notverysagacious";i:1027;s:12:"notsagacious";i:1028;s:12:"notverygrand";i:1029;s:8:"notgrand";i:1030;s:16:"notveryimportant";i:1031;s:12:"notimportant";i:1032;s:15:"notveryresolute";i:1033;s:11:"notresolute";i:1034;s:14:"notveryradiant";i:1035;s:10:"notradiant";i:1036;s:13:"notverygenial";i:1037;s:9:"notgenial";i:1038;s:13:"notverycandid";i:1039;s:9:"notcandid";i:1040;s:17:"notverydeliberate";i:1041;s:13:"notdeliberate";i:1042;s:15:"notveryflexible";i:1043;s:11:"notflexible";i:1044;s:15:"notveryreliable";i:1045;s:11:"notreliable";i:1046;s:15:"notveryterrific";i:1047;s:11:"notterrific";i:1048;s:12:"notverysharp";i:1049;s:8:"notsharp";i:1050;s:17:"notverydemocratic";i:1051;s:13:"notdemocratic";i:1052;s:12:"notverysweet";i:1053;s:8:"notsweet";i:1054;s:17:"notverycharitable";i:1055;s:13:"notcharitable";i:1056;s:17:"notveryproductive";i:1057;s:13:"notproductive";i:1058;s:14:"notverysaintly";i:1059;s:10:"notsaintly";i:1060;s:14:"notverywilling";i:1061;s:10:"notwilling";i:1062;s:18:"notveryclearheaded";i:1063;s:14:"notclearheaded";i:1064;s:13:"notveryprompt";i:1065;s:9:"notprompt";i:1066;s:15:"notverysplendid";i:1067;s:11:"notsplendid";i:1068;s:20:"notverysophisticated";i:1069;s:16:"notsophisticated";i:1070;s:15:"notveryprolific";i:1071;s:11:"notprolific";i:1072;s:14:"notveryworldly";i:1073;s:10:"notworldly";i:1074;s:16:"notveryenergetic";i:1075;s:12:"notenergetic";i:1076;s:15:"notveryamicable";i:1077;s:11:"notamicable";i:1078;s:17:"notverydiscerning";i:1079;s:13:"notdiscerning";i:1080;s:15:"notverygenerous";i:1081;s:11:"notgenerous";i:1082;s:12:"notverysunny";i:1083;s:8:"notsunny";i:1084;s:18:"notveryfashionable";i:1085;s:14:"notfashionable";i:1086;s:13:"notverymature";i:1087;s:9:"notmature";i:1088;s:12:"notverylight";i:1089;s:8:"notlight";i:1090;s:17:"notveryreasonable";i:1091;s:13:"notreasonable";i:1092;s:16:"notverypriceless";i:1093;s:12:"notpriceless";i:1094;s:12:"notverysuave";i:1095;s:8:"notsuave";i:1096;s:17:"notveryforthright";i:1097;s:13:"notforthright";i:1098;s:16:"notveryhilarious";i:1099;s:12:"nothilarious";i:1100;s:17:"notveryrespectful";i:1101;s:13:"notrespectful";i:1102;s:13:"notverycomely";i:1103;s:9:"notcomely";i:1104;s:16:"notveryspiritual";i:1105;s:12:"notspiritual";i:1106;s:13:"notverysteady";i:1107;s:9:"notsteady";i:1108;s:15:"notveryspirited";i:1109;s:11:"notspirited";i:1110;s:17:"notverynourishing";i:1111;s:13:"notnourishing";i:1112;s:15:"notverythankful";i:1113;s:11:"notthankful";i:1114;s:15:"notverypositive";i:1115;s:11:"notpositive";i:1116;s:11:"notveryairy";i:1117;s:7:"notairy";i:1118;s:17:"notverysystematic";i:1119;s:13:"notsystematic";i:1120;s:12:"notveryhandy";i:1121;s:8:"nothandy";i:1122;s:18:"notveryconsiderate";i:1123;s:14:"notconsiderate";i:1124;s:15:"notveryromantic";i:1125;s:11:"notromantic";i:1126;s:15:"notverylikeable";i:1127;s:11:"notlikeable";i:1128;s:18:"notveryappropriate";i:1129;s:14:"notappropriate";i:1130;s:15:"notveryheavenly";i:1131;s:11:"notheavenly";i:1132;s:14:"notverydutiful";i:1133;s:10:"notdutiful";i:1134;s:18:"notveryencouraging";i:1135;s:14:"notencouraging";i:1136;s:11:"notveryrosy";i:1137;s:7:"notrosy";i:1138;s:14:"notverygallant";i:1139;s:10:"notgallant";i:1140;s:16:"notveryversatile";i:1141;s:12:"notversatile";i:1142;s:14:"notveryamiable";i:1143;s:10:"notamiable";i:1144;s:14:"notverythrifty";i:1145;s:10:"notthrifty";i:1146;s:12:"notverymoral";i:1147;s:8:"notmoral";i:1148;s:13:"notveryspeedy";i:1149;s:9:"notspeedy";i:1150;s:15:"notverybalanced";i:1151;s:11:"notbalanced";i:1152;s:14:"notveryconcise";i:1153;s:10:"notconcise";i:1154;s:17:"notverypurposeful";i:1155;s:9:"notactive";i:1156;s:18:"notverydistinctive";i:1157;s:14:"notdistinctive";i:1158;s:13:"notpurposeful";i:1159;s:19:"notveryenthusiastic";i:1160;s:15:"notenthusiastic";i:1161;s:17:"notverypassionate";i:1162;s:13:"notpassionate";i:1163;s:13:"notverybenign";i:1164;s:9:"notbenign";i:1165;s:18:"notveryaccountable";i:1166;s:14:"notaccountable";i:1167;s:15:"notverymoderate";i:1168;s:11:"notmoderate";i:1169;s:18:"notverycaptivating";i:1170;s:14:"notcaptivating";i:1171;s:13:"notverystrong";i:1172;s:9:"notstrong";i:1173;s:13:"notverysprite";i:1174;s:3:"%-(";i:1175;s:3:")-:";i:1176;s:2:"):";i:1177;s:2:":(";i:1178;s:3:")o:";i:1179;s:3:"38*";i:1180;s:3:"8-0";i:1181;s:2:"8/";i:1182;s:1:"8";i:1183;s:2:"8c";i:1184;s:2:":#";i:1185;s:3:":*(";i:1186;s:3:":,(";i:1187;s:3:":-&";i:1188;s:3:":-(";i:1189;s:5:":-(o)";i:1190;s:3:":-/";i:1191;s:3:":-s";i:1192;s:2:":-";i:1193;s:3:":-|";i:1194;s:2:":/";i:1195;s:2:":e";i:1196;s:2:":f";i:1197;s:2:":o";i:1198;s:2:":s";i:1199;s:2:":[";i:1200;s:1:":";i:1201;s:3:":_(";i:1202;s:3:":o(";i:1203;s:2:":|";i:1204;s:6:" " "=(";i:1205;s:2:"=[";i:1206;s:2:">/";i:1207;s:3:">:(";i:1208;s:3:">:l";i:1209;s:3:">:o";i:1210;s:2:">[";i:1211;s:1:">";i:1212;s:3:">o>";i:1213;s:2:"b(";i:1214;s:2:"bd";i:1215;s:2:"d:";i:1216;s:2:"x(";i:1217;s:3:"x-(";i:1218;s:2:"xo";i:1219;s:2:"xp";i:1220;s:3:"^o)";i:1221;s:3:"|8c";i:1222;s:7:"abandon";i:1223;s:5:"abase";i:1224;s:9:"abasement";i:1225;s:5:"abash";i:1226;s:5:"abate";i:1227;s:8:"abdicate";i:1228;s:10:"aberration";i:1229;s:5:"abhor";i:1230;s:8:"abhorred";i:1231;s:10:"abhorrence";i:1232;s:9:"abhorrent";i:1233;s:11:"abhorrently";i:1234;s:6:"abhors";i:1235;s:6:"abject";i:1236;s:8:"abjectly";i:1237;s:6:"abjure";i:1238;s:8:"abnormal";i:1239;s:7:"abolish";i:1240;s:10:"abominable";i:1241;s:10:"abominably";i:1242;s:9:"abominate";i:1243;s:11:"abomination";i:1244;s:6:"abrade";i:1245;s:8:"abrasive";i:1246;s:6:"abrupt";i:1247;s:7:"abscond";i:1248;s:7:"absence";i:1249;s:8:"absentee";i:1250;s:13:"absent-minded";i:1251;s:6:"absurd";i:1252;s:9:"absurdity";i:1253;s:8:"absurdly";i:1254;s:10:"absurdness";i:1255;s:5:"abuse";i:1256;s:6:"abuses";i:1257;s:7:"abusive";i:1258;s:7:"abysmal";i:1259;s:9:"abysmally";i:1260;s:5:"abyss";i:1261;s:10:"accidental";i:1262;s:6:"accost";i:1263;s:8:"accursed";i:1264;s:10:"accusation";i:1265;s:11:"accusations";i:1266;s:6:"accuse";i:1267;s:7:"accuses";i:1268;s:8:"accusing";i:1269;s:10:"accusingly";i:1270;s:8:"acerbate";i:1271;s:7:"acerbic";i:1272;s:11:"acerbically";i:1273;s:4:"ache";i:1274;s:5:"acrid";i:1275;s:7:"acridly";i:1276;s:9:"acridness";i:1277;s:11:"acrimonious";i:1278;s:13:"acrimoniously";i:1279;s:8:"acrimony";i:1280;s:7:"adamant";i:1281;s:9:"adamantly";i:1282;s:6:"addict";i:1283;s:9:"addiction";i:1284;s:8:"admonish";i:1285;s:10:"admonisher";i:1286;s:13:"admonishingly";i:1287;s:12:"admonishment";i:1288;s:10:"admonition";i:1289;s:6:"adrift";i:1290;s:10:"adulterate";i:1291;s:11:"adulterated";i:1292;s:12:"adulteration";i:1293;s:11:"adversarial";i:1294;s:9:"adversary";i:1295;s:7:"adverse";i:1296;s:9:"adversity";i:1297;s:11:"affectation";i:1298;s:7:"afflict";i:1299;s:10:"affliction";i:1300;s:10:"afflictive";i:1301;s:7:"affront";i:1302;s:9:"aggravate";i:1303;s:11:"aggravating";i:1304;s:11:"aggravation";i:1305;s:10:"aggression";i:1306;s:14:"aggressiveness";i:1307;s:9:"aggressor";i:1308;s:8:"aggrieve";i:1309;s:9:"aggrieved";i:1310;s:6:"aghast";i:1311;s:7:"agitate";i:1312;s:8:"agitated";i:1313;s:9:"agitation";i:1314;s:8:"agitator";i:1315;s:7:"agonies";i:1316;s:7:"agonize";i:1317;s:9:"agonizing";i:1318;s:11:"agonizingly";i:1319;s:5:"agony";i:1320;s:3:"ail";i:1321;s:7:"ailment";i:1322;s:7:"aimless";i:1323;s:4:"airs";i:1324;s:5:"alarm";i:1325;s:7:"alarmed";i:1326;s:8:"alarming";i:1327;s:10:"alarmingly";i:1328;s:4:"alas";i:1329;s:8:"alienate";i:1330;s:9:"alienated";i:1331;s:10:"alienation";i:1332;s:10:"allegation";i:1333;s:11:"allegations";i:1334;s:6:"allege";i:1335;s:8:"allergic";i:1336;s:5:"aloof";i:1337;s:11:"altercation";i:1338;s:9:"ambiguous";i:1339;s:9:"ambiguity";i:1340;s:11:"ambivalence";i:1341;s:10:"ambivalent";i:1342;s:6:"ambush";i:1343;s:5:"amiss";i:1344;s:8:"amputate";i:1345;s:9:"anarchism";i:1346;s:9:"anarchist";i:1347;s:11:"anarchistic";i:1348;s:7:"anarchy";i:1349;s:6:"anemic";i:1350;s:5:"anger";i:1351;s:7:"angrily";i:1352;s:9:"angriness";i:1353;s:10:"annihilate";i:1354;s:12:"annihilation";i:1355;s:9:"animosity";i:1356;s:5:"annoy";i:1357;s:9:"annoyance";i:1358;s:8:"annoying";i:1359;s:10:"annoyingly";i:1360;s:9:"anomalous";i:1361;s:7:"anomaly";i:1362;s:10:"antagonism";i:1363;s:10:"antagonist";i:1364;s:12:"antagonistic";i:1365;s:10:"antagonize";i:1366;s:5:"anti-";i:1367;s:13:"anti-american";i:1368;s:12:"anti-israeli";i:1369;s:12:"anti-semites";i:1370;s:7:"anti-us";i:1371;s:15:"anti-occupation";i:1372;s:18:"anti-proliferation";i:1373;s:11:"anti-social";i:1374;s:10:"anti-white";i:1375;s:9:"antipathy";i:1376;s:10:"antiquated";i:1377;s:12:"antithetical";i:1378;s:9:"anxieties";i:1379;s:7:"anxiety";i:1380;s:9:"anxiously";i:1381;s:11:"anxiousness";i:1382;s:9:"apathetic";i:1383;s:13:"apathetically";i:1384;s:6:"apathy";i:1385;s:3:"ape";i:1386;s:10:"apocalypse";i:1387;s:11:"apocalyptic";i:1388;s:9:"apologist";i:1389;s:10:"apologists";i:1390;s:5:"appal";i:1391;s:6:"appall";i:1392;s:8:"appalled";i:1393;s:9:"appalling";i:1394;s:11:"appallingly";i:1395;s:12:"apprehension";i:1396;s:13:"apprehensions";i:1397;s:14:"apprehensively";i:1398;s:9:"arbitrary";i:1399;s:6:"arcane";i:1400;s:7:"archaic";i:1401;s:7:"arduous";i:1402;s:9:"arduously";i:1403;s:5:"argue";i:1404;s:8:"argument";i:1405;s:9:"arguments";i:1406;s:9:"arrogance";i:1407;s:8:"arrogant";i:1408;s:10:"arrogantly";i:1409;s:7:"asinine";i:1410;s:9:"asininely";i:1411;s:11:"asinininity";i:1412;s:7:"askance";i:1413;s:7:"asperse";i:1414;s:9:"aspersion";i:1415;s:10:"aspersions";i:1416;s:6:"assail";i:1417;s:11:"assassinate";i:1418;s:8:"assassin";i:1419;s:7:"assault";i:1420;s:6:"astray";i:1421;s:7:"asunder";i:1422;s:10:"atrocities";i:1423;s:8:"atrocity";i:1424;s:7:"atrophy";i:1425;s:6:"attack";i:1426;s:9:"audacious";i:1427;s:11:"audaciously";i:1428;s:13:"audaciousness";i:1429;s:8:"audacity";i:1430;s:7:"austere";i:1431;s:13:"authoritarian";i:1432;s:8:"autocrat";i:1433;s:10:"autocratic";i:1434;s:9:"avalanche";i:1435;s:7:"avarice";i:1436;s:10:"avaricious";i:1437;s:12:"avariciously";i:1438;s:6:"avenge";i:1439;s:6:"averse";i:1440;s:8:"aversion";i:1441;s:5:"avoid";i:1442;s:9:"avoidance";i:1443;s:9:"awfulness";i:1444;s:11:"awkwardness";i:1445;s:2:"ax";i:1446;s:6:"babble";i:1447;s:8:"backbite";i:1448;s:10:"backbiting";i:1449;s:8:"backward";i:1450;s:12:"backwardness";i:1451;s:5:"badly";i:1452;s:6:"baffle";i:1453;s:10:"bafflement";i:1454;s:8:"baffling";i:1455;s:4:"bait";i:1456;s:4:"balk";i:1457;s:5:"banal";i:1458;s:8:"banalize";i:1459;s:4:"bane";i:1460;s:6:"banish";i:1461;s:10:"banishment";i:1462;s:8:"bankrupt";i:1463;s:3:"bar";i:1464;s:9:"barbarian";i:1465;s:8:"barbaric";i:1466;s:12:"barbarically";i:1467;s:9:"barbarity";i:1468;s:9:"barbarous";i:1469;s:11:"barbarously";i:1470;s:6:"barely";i:1471;s:8:"baseless";i:1472;s:7:"bashful";i:1473;s:7:"bastard";i:1474;s:8:"battered";i:1475;s:9:"battering";i:1476;s:6:"battle";i:1477;s:12:"battle-lines";i:1478;s:11:"battlefield";i:1479;s:12:"battleground";i:1480;s:5:"batty";i:1481;s:7:"bearish";i:1482;s:5:"beast";i:1483;s:7:"beastly";i:1484;s:6:"bedlam";i:1485;s:9:"bedlamite";i:1486;s:6:"befoul";i:1487;s:3:"beg";i:1488;s:6:"beggar";i:1489;s:8:"beggarly";i:1490;s:7:"begging";i:1491;s:7:"beguile";i:1492;s:7:"belated";i:1493;s:7:"belabor";i:1494;s:9:"beleaguer";i:1495;s:5:"belie";i:1496;s:8:"belittle";i:1497;s:10:"belittling";i:1498;s:9:"bellicose";i:1499;s:12:"belligerence";i:1500;s:11:"belligerent";i:1501;s:13:"belligerently";i:1502;s:6:"bemoan";i:1503;s:9:"bemoaning";i:1504;s:7:"bemused";i:1505;s:4:"bent";i:1506;s:6:"berate";i:1507;s:7:"bereave";i:1508;s:11:"bereavement";i:1509;s:6:"bereft";i:1510;s:7:"berserk";i:1511;s:7:"beseech";i:1512;s:5:"beset";i:1513;s:7:"besiege";i:1514;s:8:"besmirch";i:1515;s:7:"bestial";i:1516;s:6:"betray";i:1517;s:8:"betrayal";i:1518;s:9:"betrayals";i:1519;s:8:"betrayer";i:1520;s:6:"bewail";i:1521;s:6:"beware";i:1522;s:8:"bewilder";i:1523;s:10:"bewildered";i:1524;s:11:"bewildering";i:1525;s:13:"bewilderingly";i:1526;s:12:"bewilderment";i:1527;s:7:"bewitch";i:1528;s:4:"bias";i:1529;s:6:"biased";i:1530;s:6:"biases";i:1531;s:6:"bicker";i:1532;s:9:"bickering";i:1533;s:11:"bid-rigging";i:1534;s:5:"bitch";i:1535;s:6:"bitchy";i:1536;s:6:"biting";i:1537;s:8:"bitingly";i:1538;s:8:"bitterly";i:1539;s:10:"bitterness";i:1540;s:7:"bizarre";i:1541;s:4:"blab";i:1542;s:7:"blabber";i:1543;s:5:"black";i:1544;s:9:"blackmail";i:1545;s:4:"blah";i:1546;s:11:"blameworthy";i:1547;s:5:"bland";i:1548;s:8:"blandish";i:1549;s:9:"blaspheme";i:1550;s:11:"blasphemous";i:1551;s:9:"blasphemy";i:1552;s:5:"blast";i:1553;s:7:"blasted";i:1554;s:7:"blatant";i:1555;s:9:"blatantly";i:1556;s:7:"blather";i:1557;s:7:"bleakly";i:1558;s:9:"bleakness";i:1559;s:5:"bleed";i:1560;s:7:"blemish";i:1561;s:5:"blind";i:1562;s:8:"blinding";i:1563;s:10:"blindingly";i:1564;s:9:"blindness";i:1565;s:9:"blindside";i:1566;s:7:"blister";i:1567;s:10:"blistering";i:1568;s:7:"bloated";i:1569;s:5:"block";i:1570;s:9:"blockhead";i:1571;s:5:"blood";i:1572;s:9:"bloodshed";i:1573;s:12:"bloodthirsty";i:1574;s:6:"bloody";i:1575;s:4:"blow";i:1576;s:7:"blunder";i:1577;s:10:"blundering";i:1578;s:8:"blunders";i:1579;s:5:"blunt";i:1580;s:5:"blurt";i:1581;s:5:"boast";i:1582;s:8:"boastful";i:1583;s:6:"boggle";i:1584;s:5:"bogus";i:1585;s:4:"boil";i:1586;s:7:"boiling";i:1587;s:10:"boisterous";i:1588;s:7:"bombard";i:1589;s:4:"bomb";i:1590;s:11:"bombardment";i:1591;s:9:"bombastic";i:1592;s:7:"bondage";i:1593;s:7:"bonkers";i:1594;s:4:"bore";i:1595;s:7:"boredom";i:1596;s:5:"botch";i:1597;s:6:"bother";i:1598;s:10:"bowdlerize";i:1599;s:7:"boycott";i:1600;s:8:"braggart";i:1601;s:7:"bragger";i:1602;s:9:"brainwash";i:1603;s:5:"brash";i:1604;s:7:"brashly";i:1605;s:9:"brashness";i:1606;s:4:"brat";i:1607;s:7:"bravado";i:1608;s:6:"brazen";i:1609;s:8:"brazenly";i:1610;s:10:"brazenness";i:1611;s:6:"breach";i:1612;s:5:"break";i:1613;s:11:"break-point";i:1614;s:9:"breakdown";i:1615;s:9:"brimstone";i:1616;s:7:"bristle";i:1617;s:7:"brittle";i:1618;s:5:"broke";i:1619;s:14:"broken-hearted";i:1620;s:5:"brood";i:1621;s:8:"browbeat";i:1622;s:6:"bruise";i:1623;s:7:"brusque";i:1624;s:6:"brutal";i:1625;s:11:"brutalising";i:1626;s:11:"brutalities";i:1627;s:9:"brutality";i:1628;s:9:"brutalize";i:1629;s:11:"brutalizing";i:1630;s:8:"brutally";i:1631;s:5:"brute";i:1632;s:7:"brutish";i:1633;s:3:"bug";i:1634;s:6:"buckle";i:1635;s:5:"bulky";i:1636;s:7:"bullies";i:1637;s:5:"bully";i:1638;s:10:"bullyingly";i:1639;s:3:"bum";i:1640;s:5:"bumpy";i:1641;s:6:"bungle";i:1642;s:7:"bungler";i:1643;s:4:"bunk";i:1644;s:6:"burden";i:1645;s:12:"burdensomely";i:1646;s:4:"burn";i:1647;s:4:"busy";i:1648;s:8:"busybody";i:1649;s:7:"butcher";i:1650;s:8:"butchery";i:1651;s:9:"byzantine";i:1652;s:6:"cackle";i:1653;s:6:"cajole";i:1654;s:10:"calamities";i:1655;s:10:"calamitous";i:1656;s:12:"calamitously";i:1657;s:8:"calamity";i:1658;s:7:"callous";i:1659;s:10:"calumniate";i:1660;s:12:"calumniation";i:1661;s:9:"calumnies";i:1662;s:10:"calumnious";i:1663;s:12:"calumniously";i:1664;s:7:"calumny";i:1665;s:6:"cancer";i:1666;s:9:"cancerous";i:1667;s:8:"cannibal";i:1668;s:11:"cannibalize";i:1669;s:10:"capitulate";i:1670;s:10:"capricious";i:1671;s:12:"capriciously";i:1672;s:14:"capriciousness";i:1673;s:7:"capsize";i:1674;s:7:"captive";i:1675;s:12:"carelessness";i:1676;s:10:"caricature";i:1677;s:7:"carnage";i:1678;s:4:"carp";i:1679;s:7:"cartoon";i:1680;s:10:"cartoonish";i:1681;s:13:"cash-strapped";i:1682;s:9:"castigate";i:1683;s:8:"casualty";i:1684;s:9:"cataclysm";i:1685;s:11:"cataclysmal";i:1686;s:11:"cataclysmic";i:1687;s:15:"cataclysmically";i:1688;s:11:"catastrophe";i:1689;s:12:"catastrophes";i:1690;s:12:"catastrophic";i:1691;s:16:"catastrophically";i:1692;s:7:"caustic";i:1693;s:11:"caustically";i:1694;s:10:"cautionary";i:1695;s:8:"cautious";i:1696;s:4:"cave";i:1697;s:7:"censure";i:1698;s:5:"chafe";i:1699;s:5:"chaff";i:1700;s:7:"chagrin";i:1701;s:9:"challenge";i:1702;s:11:"challenging";i:1703;s:5:"chaos";i:1704;s:8:"charisma";i:1705;s:7:"chasten";i:1706;s:8:"chastise";i:1707;s:12:"chastisement";i:1708;s:7:"chatter";i:1709;s:10:"chatterbox";i:1710;s:7:"cheapen";i:1711;s:5:"cheap";i:1712;s:5:"cheat";i:1713;s:7:"cheater";i:1714;s:9:"cheerless";i:1715;s:5:"chide";i:1716;s:8:"childish";i:1717;s:5:"chill";i:1718;s:6:"chilly";i:1719;s:4:"chit";i:1720;s:6:"choppy";i:1721;s:5:"choke";i:1722;s:5:"chore";i:1723;s:7:"chronic";i:1724;s:6:"clamor";i:1725;s:9:"clamorous";i:1726;s:5:"clash";i:1727;s:6:"cliche";i:1728;s:7:"cliched";i:1729;s:6:"clique";i:1730;s:4:"clog";i:1731;s:5:"close";i:1732;s:5:"cloud";i:1733;s:6:"coarse";i:1734;s:5:"cocky";i:1735;s:6:"coerce";i:1736;s:8:"coercion";i:1737;s:8:"coercive";i:1738;s:6:"coldly";i:1739;s:8:"collapse";i:1740;s:7:"collide";i:1741;s:7:"collude";i:1742;s:9:"collusion";i:1743;s:6:"comedy";i:1744;s:7:"comical";i:1745;s:11:"commiserate";i:1746;s:11:"commonplace";i:1747;s:9:"commotion";i:1748;s:6:"compel";i:1749;s:10:"complacent";i:1750;s:8:"complain";i:1751;s:11:"complaining";i:1752;s:9:"complaint";i:1753;s:10:"complaints";i:1754;s:10:"complicate";i:1755;s:11:"complicated";i:1756;s:12:"complication";i:1757;s:9:"complicit";i:1758;s:10:"compulsion";i:1759;s:10:"compulsory";i:1760;s:7:"concede";i:1761;s:7:"conceit";i:1762;s:7:"concern";i:1763;s:8:"concerns";i:1764;s:10:"concession";i:1765;s:11:"concessions";i:1766;s:10:"condescend";i:1767;s:13:"condescending";i:1768;s:15:"condescendingly";i:1769;s:13:"condescension";i:1770;s:7:"condemn";i:1771;s:11:"condemnable";i:1772;s:12:"condemnation";i:1773;s:10:"condolence";i:1774;s:11:"condolences";i:1775;s:7:"confess";i:1776;s:10:"confession";i:1777;s:11:"confessions";i:1778;s:8:"conflict";i:1779;s:8:"confound";i:1780;s:10:"confounded";i:1781;s:11:"confounding";i:1782;s:8:"confront";i:1783;s:13:"confrontation";i:1784;s:15:"confrontational";i:1785;s:7:"confuse";i:1786;s:9:"confusing";i:1787;s:9:"confusion";i:1788;s:9:"congested";i:1789;s:10:"congestion";i:1790;s:11:"conspicuous";i:1791;s:13:"conspicuously";i:1792;s:12:"conspiracies";i:1793;s:10:"conspiracy";i:1794;s:11:"conspirator";i:1795;s:14:"conspiratorial";i:1796;s:8:"conspire";i:1797;s:13:"consternation";i:1798;s:9:"constrain";i:1799;s:10:"constraint";i:1800;s:7:"consume";i:1801;s:10:"contagious";i:1802;s:11:"contaminate";i:1803;s:13:"contamination";i:1804;s:12:"contemptible";i:1805;s:12:"contemptuous";i:1806;s:14:"contemptuously";i:1807;s:7:"contend";i:1808;s:10:"contention";i:1809;s:7:"contort";i:1810;s:11:"contortions";i:1811;s:10:"contradict";i:1812;s:13:"contradiction";i:1813;s:13:"contradictory";i:1814;s:12:"contrariness";i:1815;s:8:"contrary";i:1816;s:10:"contravene";i:1817;s:8:"contrive";i:1818;s:9:"contrived";i:1819;s:13:"controversial";i:1820;s:11:"controversy";i:1821;s:10:"convoluted";i:1822;s:6:"coping";i:1823;s:7:"corrode";i:1824;s:9:"corrosion";i:1825;s:9:"corrosive";i:1826;s:7:"corrupt";i:1827;s:10:"corruption";i:1828;s:6:"costly";i:1829;s:17:"counterproductive";i:1830;s:8:"coupists";i:1831;s:8:"covetous";i:1832;s:3:"cow";i:1833;s:6:"coward";i:1834;s:9:"crackdown";i:1835;s:6:"crafty";i:1836;s:5:"crass";i:1837;s:6:"craven";i:1838;s:8:"cravenly";i:1839;s:5:"craze";i:1840;s:7:"crazily";i:1841;s:9:"craziness";i:1842;s:9:"credulous";i:1843;s:5:"crime";i:1844;s:8:"criminal";i:1845;s:6:"cringe";i:1846;s:7:"cripple";i:1847;s:9:"crippling";i:1848;s:6:"crisis";i:1849;s:6:"critic";i:1850;s:9:"criticism";i:1851;s:10:"criticisms";i:1852;s:9:"criticize";i:1853;s:7:"critics";i:1854;s:5:"crook";i:1855;s:7:"crooked";i:1856;s:5:"crude";i:1857;s:5:"cruel";i:1858;s:9:"cruelties";i:1859;s:7:"cruelty";i:1860;s:7:"crumble";i:1861;s:7:"crumple";i:1862;s:5:"crush";i:1863;s:8:"crushing";i:1864;s:3:"cry";i:1865;s:8:"culpable";i:1866;s:7:"cuplrit";i:1867;s:10:"cumbersome";i:1868;s:5:"curse";i:1869;s:6:"cursed";i:1870;s:6:"curses";i:1871;s:7:"cursory";i:1872;s:4:"curt";i:1873;s:4:"cuss";i:1874;s:3:"cut";i:1875;s:9:"cutthroat";i:1876;s:8:"cynicism";i:1877;s:6:"damage";i:1878;s:8:"damaging";i:1879;s:4:"damn";i:1880;s:8:"damnable";i:1881;s:8:"damnably";i:1882;s:9:"damnation";i:1883;s:7:"damning";i:1884;s:6:"danger";i:1885;s:13:"dangerousness";i:1886;s:6:"dangle";i:1887;s:6:"darken";i:1888;s:8:"darkness";i:1889;s:4:"darn";i:1890;s:4:"dash";i:1891;s:7:"dastard";i:1892;s:9:"dastardly";i:1893;s:5:"daunt";i:1894;s:8:"daunting";i:1895;s:10:"dauntingly";i:1896;s:6:"dawdle";i:1897;s:4:"daze";i:1898;s:8:"deadbeat";i:1899;s:8:"deadlock";i:1900;s:6:"deadly";i:1901;s:10:"deadweight";i:1902;s:4:"deaf";i:1903;s:6:"dearth";i:1904;s:5:"death";i:1905;s:7:"debacle";i:1906;s:6:"debase";i:1907;s:10:"debasement";i:1908;s:7:"debaser";i:1909;s:9:"debatable";i:1910;s:6:"debate";i:1911;s:7:"debauch";i:1912;s:9:"debaucher";i:1913;s:10:"debauchery";i:1914;s:10:"debilitate";i:1915;s:12:"debilitating";i:1916;s:8:"debility";i:1917;s:9:"decadence";i:1918;s:8:"decadent";i:1919;s:5:"decay";i:1920;s:7:"decayed";i:1921;s:6:"deceit";i:1922;s:9:"deceitful";i:1923;s:11:"deceitfully";i:1924;s:13:"deceitfulness";i:1925;s:9:"deceiving";i:1926;s:7:"deceive";i:1927;s:8:"deceiver";i:1928;s:9:"deceivers";i:1929;s:9:"deception";i:1930;s:9:"deceptive";i:1931;s:11:"deceptively";i:1932;s:7:"declaim";i:1933;s:7:"decline";i:1934;s:9:"declining";i:1935;s:8:"decrease";i:1936;s:10:"decreasing";i:1937;s:9:"decrement";i:1938;s:8:"decrepit";i:1939;s:11:"decrepitude";i:1940;s:5:"decry";i:1941;s:9:"deepening";i:1942;s:10:"defamation";i:1943;s:11:"defamations";i:1944;s:10:"defamatory";i:1945;s:6:"defame";i:1946;s:6:"defeat";i:1947;s:6:"defect";i:1948;s:8:"defiance";i:1949;s:9:"defiantly";i:1950;s:10:"deficiency";i:1951;s:6:"defile";i:1952;s:7:"defiler";i:1953;s:6:"deform";i:1954;s:8:"deformed";i:1955;s:10:"defrauding";i:1956;s:7:"defunct";i:1957;s:4:"defy";i:1958;s:10:"degenerate";i:1959;s:12:"degenerately";i:1960;s:12:"degeneration";i:1961;s:11:"degradation";i:1962;s:7:"degrade";i:1963;s:9:"degrading";i:1964;s:11:"degradingly";i:1965;s:14:"dehumanization";i:1966;s:10:"dehumanize";i:1967;s:5:"deign";i:1968;s:6:"deject";i:1969;s:10:"dejectedly";i:1970;s:9:"dejection";i:1971;s:11:"delinquency";i:1972;s:10:"delinquent";i:1973;s:9:"delirious";i:1974;s:8:"delirium";i:1975;s:6:"delude";i:1976;s:6:"deluge";i:1977;s:8:"delusion";i:1978;s:10:"delusional";i:1979;s:9:"delusions";i:1980;s:6:"demean";i:1981;s:9:"demeaning";i:1982;s:6:"demise";i:1983;s:8:"demolish";i:1984;s:10:"demolisher";i:1985;s:5:"demon";i:1986;s:7:"demonic";i:1987;s:8:"demonize";i:1988;s:10:"demoralize";i:1989;s:12:"demoralizing";i:1990;s:14:"demoralizingly";i:1991;s:6:"denial";i:1992;s:9:"denigrate";i:1993;s:4:"deny";i:1994;s:8:"denounce";i:1995;s:10:"denunciate";i:1996;s:12:"denunciation";i:1997;s:13:"denunciations";i:1998;s:7:"deplete";i:1999;s:10:"deplorable";i:2000;s:10:"deplorably";i:2001;s:7:"deplore";i:2002;s:9:"deploring";i:2003;s:11:"deploringly";i:2004;s:7:"deprave";i:2005;s:10:"depravedly";i:2006;s:9:"deprecate";i:2007;s:7:"depress";i:2008;s:10:"depressing";i:2009;s:12:"depressingly";i:2010;s:10:"depression";i:2011;s:7:"deprive";i:2012;s:6:"deride";i:2013;s:8:"derision";i:2014;s:8:"derisive";i:2015;s:10:"derisively";i:2016;s:12:"derisiveness";i:2017;s:10:"derogatory";i:2018;s:9:"desecrate";i:2019;s:6:"desert";i:2020;s:9:"desertion";i:2021;s:9:"desiccate";i:2022;s:10:"desiccated";i:2023;s:10:"desolately";i:2024;s:10:"desolation";i:2025;s:12:"despairingly";i:2026;s:11:"desperately";i:2027;s:11:"desperation";i:2028;s:10:"despicably";i:2029;s:7:"despise";i:2030;s:7:"despoil";i:2031;s:9:"despoiler";i:2032;s:11:"despondence";i:2033;s:11:"despondency";i:2034;s:10:"despondent";i:2035;s:12:"despondently";i:2036;s:6:"despot";i:2037;s:8:"despotic";i:2038;s:9:"despotism";i:2039;s:15:"destabilisation";i:2040;s:9:"destitute";i:2041;s:11:"destitution";i:2042;s:7:"destroy";i:2043;s:9:"destroyer";i:2044;s:11:"destruction";i:2045;s:9:"desultory";i:2046;s:5:"deter";i:2047;s:11:"deteriorate";i:2048;s:13:"deteriorating";i:2049;s:13:"deterioration";i:2050;s:9:"deterrent";i:2051;s:10:"detestably";i:2052;s:7:"detract";i:2053;s:10:"detraction";i:2054;s:9:"detriment";i:2055;s:11:"detrimental";i:2056;s:9:"devastate";i:2057;s:11:"devastating";i:2058;s:13:"devastatingly";i:2059;s:11:"devastation";i:2060;s:7:"deviate";i:2061;s:9:"deviation";i:2062;s:5:"devil";i:2063;s:8:"devilish";i:2064;s:10:"devilishly";i:2065;s:9:"devilment";i:2066;s:7:"devilry";i:2067;s:7:"devious";i:2068;s:9:"deviously";i:2069;s:11:"deviousness";i:2070;s:8:"diabolic";i:2071;s:10:"diabolical";i:2072;s:12:"diabolically";i:2073;s:13:"diametrically";i:2074;s:8:"diatribe";i:2075;s:9:"diatribes";i:2076;s:8:"dictator";i:2077;s:11:"dictatorial";i:2078;s:6:"differ";i:2079;s:12:"difficulties";i:2080;s:10:"difficulty";i:2081;s:10:"diffidence";i:2082;s:3:"dig";i:2083;s:7:"digress";i:2084;s:11:"dilapidated";i:2085;s:7:"dilemma";i:2086;s:11:"dilly-dally";i:2087;s:3:"dim";i:2088;s:8:"diminish";i:2089;s:11:"diminishing";i:2090;s:3:"din";i:2091;s:5:"dinky";i:2092;s:4:"dire";i:2093;s:6:"direly";i:2094;s:8:"direness";i:2095;s:4:"dirt";i:2096;s:7:"disable";i:2097;s:9:"disaccord";i:2098;s:12:"disadvantage";i:2099;s:13:"disadvantaged";i:2100;s:15:"disadvantageous";i:2101;s:9:"disaffect";i:2102;s:11:"disaffected";i:2103;s:9:"disaffirm";i:2104;s:8:"disagree";i:2105;s:12:"disagreeably";i:2106;s:12:"disagreement";i:2107;s:8:"disallow";i:2108;s:10:"disappoint";i:2109;s:15:"disappointingly";i:2110;s:14:"disappointment";i:2111;s:14:"disapprobation";i:2112;s:11:"disapproval";i:2113;s:10:"disapprove";i:2114;s:12:"disapproving";i:2115;s:6:"disarm";i:2116;s:8:"disarray";i:2117;s:8:"disaster";i:2118;s:10:"disastrous";i:2119;s:12:"disastrously";i:2120;s:7:"disavow";i:2121;s:9:"disavowal";i:2122;s:9:"disbelief";i:2123;s:10:"disbelieve";i:2124;s:11:"disbeliever";i:2125;s:8:"disclaim";i:2126;s:14:"discombobulate";i:2127;s:9:"discomfit";i:2128;s:14:"discomfititure";i:2129;s:10:"discomfort";i:2130;s:10:"discompose";i:2131;s:10:"disconcert";i:2132;s:12:"disconcerted";i:2133;s:13:"disconcerting";i:2134;s:15:"disconcertingly";i:2135;s:12:"disconsolate";i:2136;s:14:"disconsolately";i:2137;s:14:"disconsolation";i:2138;s:12:"discontented";i:2139;s:14:"discontentedly";i:2140;s:13:"discontinuity";i:2141;s:7:"discord";i:2142;s:11:"discordance";i:2143;s:10:"discordant";i:2144;s:14:"discountenance";i:2145;s:10:"discourage";i:2146;s:14:"discouragement";i:2147;s:12:"discouraging";i:2148;s:14:"discouragingly";i:2149;s:12:"discourteous";i:2150;s:14:"discourteously";i:2151;s:9:"discredit";i:2152;s:10:"discrepant";i:2153;s:12:"discriminate";i:2154;s:14:"discrimination";i:2155;s:14:"discriminatory";i:2156;s:12:"disdainfully";i:2157;s:7:"disease";i:2158;s:8:"diseased";i:2159;s:8:"disfavor";i:2160;s:8:"disgrace";i:2161;s:11:"disgraceful";i:2162;s:13:"disgracefully";i:2163;s:10:"disgruntle";i:2164;s:11:"disgustedly";i:2165;s:10:"disgustful";i:2166;s:12:"disgustfully";i:2167;s:10:"disgusting";i:2168;s:12:"disgustingly";i:2169;s:10:"dishearten";i:2170;s:13:"disheartening";i:2171;s:15:"dishearteningly";i:2172;s:11:"dishonestly";i:2173;s:10:"dishonesty";i:2174;s:8:"dishonor";i:2175;s:14:"dishonorablely";i:2176;s:11:"disillusion";i:2177;s:14:"disinclination";i:2178;s:11:"disinclined";i:2179;s:12:"disingenuous";i:2180;s:14:"disingenuously";i:2181;s:12:"disintegrate";i:2182;s:13:"disinterested";i:2183;s:14:"disintegration";i:2184;s:11:"disinterest";i:2185;s:10:"dislocated";i:2186;s:8:"disloyal";i:2187;s:10:"disloyalty";i:2188;s:8:"dismally";i:2189;s:10:"dismalness";i:2190;s:6:"dismay";i:2191;s:9:"dismaying";i:2192;s:11:"dismayingly";i:2193;s:10:"dismissive";i:2194;s:12:"dismissively";i:2195;s:12:"disobedience";i:2196;s:11:"disobedient";i:2197;s:7:"disobey";i:2198;s:6:"disown";i:2199;s:8:"disorder";i:2200;s:10:"disordered";i:2201;s:10:"disorderly";i:2202;s:9:"disorient";i:2203;s:9:"disparage";i:2204;s:11:"disparaging";i:2205;s:13:"disparagingly";i:2206;s:11:"dispensable";i:2207;s:8:"dispirit";i:2208;s:10:"dispirited";i:2209;s:12:"dispiritedly";i:2210;s:11:"dispiriting";i:2211;s:8:"displace";i:2212;s:9:"displaced";i:2213;s:9:"displease";i:2214;s:11:"displeasing";i:2215;s:11:"displeasure";i:2216;s:16:"disproportionate";i:2217;s:8:"disprove";i:2218;s:10:"disputable";i:2219;s:7:"dispute";i:2220;s:8:"disputed";i:2221;s:8:"disquiet";i:2222;s:11:"disquieting";i:2223;s:13:"disquietingly";i:2224;s:11:"disquietude";i:2225;s:9:"disregard";i:2226;s:12:"disregardful";i:2227;s:12:"disreputable";i:2228;s:9:"disrepute";i:2229;s:10:"disrespect";i:2230;s:14:"disrespectable";i:2231;s:16:"disrespectablity";i:2232;s:13:"disrespectful";i:2233;s:15:"disrespectfully";i:2234;s:17:"disrespectfulness";i:2235;s:13:"disrespecting";i:2236;s:7:"disrupt";i:2237;s:10:"disruption";i:2238;s:10:"disruptive";i:2239;s:15:"dissatisfaction";i:2240;s:15:"dissatisfactory";i:2241;s:10:"dissatisfy";i:2242;s:13:"dissatisfying";i:2243;s:9:"dissemble";i:2244;s:10:"dissembler";i:2245;s:10:"dissension";i:2246;s:7:"dissent";i:2247;s:9:"dissenter";i:2248;s:10:"dissention";i:2249;s:10:"disservice";i:2250;s:10:"dissidence";i:2251;s:9:"dissident";i:2252;s:10:"dissidents";i:2253;s:9:"dissocial";i:2254;s:9:"dissolute";i:2255;s:11:"dissolution";i:2256;s:10:"dissonance";i:2257;s:9:"dissonant";i:2258;s:11:"dissonantly";i:2259;s:8:"dissuade";i:2260;s:10:"dissuasive";i:2261;s:8:"distaste";i:2262;s:11:"distasteful";i:2263;s:13:"distastefully";i:2264;s:7:"distort";i:2265;s:10:"distortion";i:2266;s:8:"distract";i:2267;s:11:"distracting";i:2268;s:11:"distraction";i:2269;s:12:"distraughtly";i:2270;s:14:"distraughtness";i:2271;s:8:"distress";i:2272;s:11:"distressing";i:2273;s:13:"distressingly";i:2274;s:8:"distrust";i:2275;s:11:"distrustful";i:2276;s:11:"distrusting";i:2277;s:7:"disturb";i:2278;s:13:"disturbed-let";i:2279;s:10:"disturbing";i:2280;s:12:"disturbingly";i:2281;s:8:"disunity";i:2282;s:8:"disvalue";i:2283;s:9:"divergent";i:2284;s:6:"divide";i:2285;s:7:"divided";i:2286;s:8:"division";i:2287;s:8:"divisive";i:2288;s:10:"divisively";i:2289;s:12:"divisiveness";i:2290;s:7:"divorce";i:2291;s:8:"divorced";i:2292;s:7:"dizzing";i:2293;s:9:"dizzingly";i:2294;s:9:"doddering";i:2295;s:6:"dodgey";i:2296;s:6:"dogged";i:2297;s:8:"doggedly";i:2298;s:8:"dogmatic";i:2299;s:8:"doldrums";i:2300;s:9:"dominance";i:2301;s:8:"dominate";i:2302;s:10:"domination";i:2303;s:8:"domineer";i:2304;s:11:"domineering";i:2305;s:4:"doom";i:2306;s:8:"doomsday";i:2307;s:4:"dope";i:2308;s:5:"doubt";i:2309;s:10:"doubtfully";i:2310;s:6:"doubts";i:2311;s:8:"downbeat";i:2312;s:8:"downcast";i:2313;s:6:"downer";i:2314;s:8:"downfall";i:2315;s:10:"downfallen";i:2316;s:9:"downgrade";i:2317;s:13:"downheartedly";i:2318;s:8:"downside";i:2319;s:4:"drab";i:2320;s:9:"draconian";i:2321;s:8:"draconic";i:2322;s:6:"dragon";i:2323;s:7:"dragons";i:2324;s:7:"dragoon";i:2325;s:5:"drain";i:2326;s:5:"drama";i:2327;s:7:"drastic";i:2328;s:11:"drastically";i:2329;s:10:"dreadfully";i:2330;s:12:"dreadfulness";i:2331;s:6:"drones";i:2332;s:5:"droop";i:2333;s:7:"drought";i:2334;s:8:"drowning";i:2335;s:8:"drunkard";i:2336;s:7:"drunken";i:2337;s:7:"dubious";i:2338;s:9:"dubiously";i:2339;s:9:"dubitable";i:2340;s:3:"dud";i:2341;s:4:"dull";i:2342;s:7:"dullard";i:2343;s:9:"dumbfound";i:2344;s:11:"dumbfounded";i:2345;s:5:"dummy";i:2346;s:4:"dump";i:2347;s:5:"dunce";i:2348;s:7:"dungeon";i:2349;s:8:"dungeons";i:2350;s:4:"dupe";i:2351;s:5:"dusty";i:2352;s:7:"dwindle";i:2353;s:9:"dwindling";i:2354;s:5:"dying";i:2355;s:12:"earsplitting";i:2356;s:9:"eccentric";i:2357;s:12:"eccentricity";i:2358;s:6:"effigy";i:2359;s:10:"effrontery";i:2360;s:3:"ego";i:2361;s:8:"egomania";i:2362;s:7:"egotism";i:2363;s:13:"egotistically";i:2364;s:9:"egregious";i:2365;s:11:"egregiously";i:2366;s:9:"ejaculate";i:2367;s:15:"election-rigger";i:2368;s:9:"eliminate";i:2369;s:11:"elimination";i:2370;s:9:"emaciated";i:2371;s:10:"emasculate";i:2372;s:9:"embarrass";i:2373;s:12:"embarrassing";i:2374;s:14:"embarrassingly";i:2375;s:13:"embarrassment";i:2376;s:9:"embattled";i:2377;s:7:"embroil";i:2378;s:9:"embroiled";i:2379;s:11:"embroilment";i:2380;s:9:"empathize";i:2381;s:7:"empathy";i:2382;s:8:"emphatic";i:2383;s:12:"emphatically";i:2384;s:9:"emptiness";i:2385;s:8:"encroach";i:2386;s:12:"encroachment";i:2387;s:8:"endanger";i:2388;s:7:"endless";i:2389;s:7:"enemies";i:2390;s:5:"enemy";i:2391;s:8:"enervate";i:2392;s:8:"enfeeble";i:2393;s:7:"enflame";i:2394;s:6:"engulf";i:2395;s:6:"enjoin";i:2396;s:6:"enmity";i:2397;s:10:"enormities";i:2398;s:8:"enormity";i:2399;s:8:"enormous";i:2400;s:10:"enormously";i:2401;s:6:"enrage";i:2402;s:7:"enslave";i:2403;s:8:"entangle";i:2404;s:12:"entanglement";i:2405;s:6:"entrap";i:2406;s:10:"entrapment";i:2407;s:7:"envious";i:2408;s:9:"enviously";i:2409;s:11:"enviousness";i:2410;s:4:"envy";i:2411;s:8:"epidemic";i:2412;s:9:"equivocal";i:2413;s:9:"eradicate";i:2414;s:5:"erase";i:2415;s:5:"erode";i:2416;s:7:"erosion";i:2417;s:3:"err";i:2418;s:6:"errant";i:2419;s:7:"erratic";i:2420;s:11:"erratically";i:2421;s:9:"erroneous";i:2422;s:11:"erroneously";i:2423;s:5:"error";i:2424;s:8:"escapade";i:2425;s:6:"eschew";i:2426;s:8:"esoteric";i:2427;s:9:"estranged";i:2428;s:7:"eternal";i:2429;s:5:"evade";i:2430;s:7:"evasion";i:2431;s:4:"evil";i:2432;s:8:"evildoer";i:2433;s:5:"evils";i:2434;s:10:"eviscerate";i:2435;s:10:"exacerbate";i:2436;s:8:"exacting";i:2437;s:10:"exaggerate";i:2438;s:12:"exaggeration";i:2439;s:10:"exasperate";i:2440;s:12:"exasperation";i:2441;s:12:"exasperating";i:2442;s:14:"exasperatingly";i:2443;s:11:"excessively";i:2444;s:7:"exclaim";i:2445;s:7:"exclude";i:2446;s:9:"exclusion";i:2447;s:9:"excoriate";i:2448;s:12:"excruciating";i:2449;s:14:"excruciatingly";i:2450;s:6:"excuse";i:2451;s:7:"excuses";i:2452;s:8:"execrate";i:2453;s:7:"exhaust";i:2454;s:10:"exhaustion";i:2455;s:6:"exhort";i:2456;s:5:"exile";i:2457;s:10:"exorbitant";i:2458;s:14:"exorbitantance";i:2459;s:12:"exorbitantly";i:2460;s:9:"expedient";i:2461;s:12:"expediencies";i:2462;s:5:"expel";i:2463;s:9:"expensive";i:2464;s:6:"expire";i:2465;s:7:"explode";i:2466;s:7:"exploit";i:2467;s:12:"exploitation";i:2468;s:6:"expose";i:2469;s:7:"exposed";i:2470;s:9:"explosive";i:2471;s:11:"expropriate";i:2472;s:13:"expropriation";i:2473;s:7:"expulse";i:2474;s:7:"expunge";i:2475;s:11:"exterminate";i:2476;s:13:"extermination";i:2477;s:10:"extinguish";i:2478;s:6:"extort";i:2479;s:9:"extortion";i:2480;s:10:"extraneous";i:2481;s:12:"extravagance";i:2482;s:11:"extravagant";i:2483;s:13:"extravagantly";i:2484;s:7:"extreme";i:2485;s:9:"extremely";i:2486;s:9:"extremism";i:2487;s:9:"extremist";i:2488;s:10:"extremists";i:2489;s:9:"fabricate";i:2490;s:11:"fabrication";i:2491;s:9:"facetious";i:2492;s:11:"facetiously";i:2493;s:6:"fading";i:2494;s:4:"fail";i:2495;s:7:"failing";i:2496;s:7:"failure";i:2497;s:8:"failures";i:2498;s:5:"faint";i:2499;s:12:"fainthearted";i:2500;s:9:"faithless";i:2501;s:4:"fall";i:2502;s:9:"fallacies";i:2503;s:10:"fallacious";i:2504;s:12:"fallaciously";i:2505;s:14:"fallaciousness";i:2506;s:7:"fallacy";i:2507;s:7:"fallout";i:2508;s:9:"falsehood";i:2509;s:7:"falsely";i:2510;s:7:"falsify";i:2511;s:6:"falter";i:2512;s:6:"famine";i:2513;s:8:"famished";i:2514;s:7:"fanatic";i:2515;s:9:"fanatical";i:2516;s:11:"fanatically";i:2517;s:10:"fanaticism";i:2518;s:8:"fanatics";i:2519;s:8:"fanciful";i:2520;s:11:"far-fetched";i:2521;s:10:"farfetched";i:2522;s:5:"farce";i:2523;s:8:"farcical";i:2524;s:24:"farcical-yet-provocative";i:2525;s:10:"farcically";i:2526;s:7:"fascism";i:2527;s:7:"fascist";i:2528;s:10:"fastidious";i:2529;s:12:"fastidiously";i:2530;s:8:"fastuous";i:2531;s:3:"fat";i:2532;s:5:"fatal";i:2533;s:10:"fatalistic";i:2534;s:14:"fatalistically";i:2535;s:7:"fatally";i:2536;s:7:"fateful";i:2537;s:9:"fatefully";i:2538;s:10:"fathomless";i:2539;s:7:"fatigue";i:2540;s:5:"fatty";i:2541;s:7:"fatuity";i:2542;s:7:"fatuous";i:2543;s:9:"fatuously";i:2544;s:5:"fault";i:2545;s:6:"faulty";i:2546;s:9:"fawningly";i:2547;s:4:"faze";i:2548;s:9:"fearfully";i:2549;s:5:"fears";i:2550;s:8:"fearsome";i:2551;s:8:"feckless";i:2552;s:6:"feeble";i:2553;s:8:"feeblely";i:2554;s:12:"feebleminded";i:2555;s:5:"feign";i:2556;s:5:"feint";i:2557;s:4:"fell";i:2558;s:5:"felon";i:2559;s:9:"felonious";i:2560;s:9:"ferocious";i:2561;s:11:"ferociously";i:2562;s:8:"ferocity";i:2563;s:8:"feverish";i:2564;s:5:"fetid";i:2565;s:5:"fever";i:2566;s:6:"fiasco";i:2567;s:4:"fiat";i:2568;s:3:"fib";i:2569;s:6:"fibber";i:2570;s:6:"fickle";i:2571;s:7:"fiction";i:2572;s:9:"fictional";i:2573;s:10:"fictitious";i:2574;s:6:"fidget";i:2575;s:7:"fidgety";i:2576;s:5:"fiend";i:2577;s:8:"fiendish";i:2578;s:6:"fierce";i:2579;s:5:"fight";i:2580;s:10:"figurehead";i:2581;s:5:"filth";i:2582;s:6:"filthy";i:2583;s:7:"finagle";i:2584;s:8:"fissures";i:2585;s:4:"fist";i:2586;s:11:"flabbergast";i:2587;s:13:"flabbergasted";i:2588;s:8:"flagging";i:2589;s:8:"flagrant";i:2590;s:10:"flagrantly";i:2591;s:4:"flak";i:2592;s:5:"flake";i:2593;s:6:"flakey";i:2594;s:5:"flaky";i:2595;s:5:"flash";i:2596;s:6:"flashy";i:2597;s:8:"flat-out";i:2598;s:6:"flaunt";i:2599;s:4:"flaw";i:2600;s:5:"flaws";i:2601;s:5:"fleer";i:2602;s:8:"fleeting";i:2603;s:7:"flighty";i:2604;s:8:"flimflam";i:2605;s:6:"flimsy";i:2606;s:5:"flirt";i:2607;s:6:"flirty";i:2608;s:7:"floored";i:2609;s:8:"flounder";i:2610;s:11:"floundering";i:2611;s:5:"flout";i:2612;s:7:"fluster";i:2613;s:3:"foe";i:2614;s:4:"fool";i:2615;s:9:"foolhardy";i:2616;s:7:"foolish";i:2617;s:9:"foolishly";i:2618;s:11:"foolishness";i:2619;s:6:"forbid";i:2620;s:9:"forbidden";i:2621;s:10:"forbidding";i:2622;s:5:"force";i:2623;s:8:"forceful";i:2624;s:10:"foreboding";i:2625;s:12:"forebodingly";i:2626;s:7:"forfeit";i:2627;s:6:"forged";i:2628;s:6:"forget";i:2629;s:11:"forgetfully";i:2630;s:13:"forgetfulness";i:2631;s:7:"forlorn";i:2632;s:9:"forlornly";i:2633;s:10:"formidable";i:2634;s:7:"forsake";i:2635;s:8:"forsaken";i:2636;s:8:"forswear";i:2637;s:4:"foul";i:2638;s:6:"foully";i:2639;s:8:"foulness";i:2640;s:9:"fractious";i:2641;s:11:"fractiously";i:2642;s:8:"fracture";i:2643;s:10:"fragmented";i:2644;s:5:"frail";i:2645;s:7:"frantic";i:2646;s:11:"frantically";i:2647;s:9:"franticly";i:2648;s:10:"fraternize";i:2649;s:5:"fraud";i:2650;s:10:"fraudulent";i:2651;s:7:"fraught";i:2652;s:5:"freak";i:2653;s:8:"freakish";i:2654;s:10:"freakishly";i:2655;s:7:"frazzle";i:2656;s:8:"frazzled";i:2657;s:8:"frenetic";i:2658;s:12:"frenetically";i:2659;s:8:"frenzied";i:2660;s:6:"frenzy";i:2661;s:4:"fret";i:2662;s:7:"fretful";i:2663;s:8:"friction";i:2664;s:9:"frictions";i:2665;s:7:"friggin";i:2666;s:6:"fright";i:2667;s:8:"frighten";i:2668;s:11:"frightening";i:2669;s:13:"frighteningly";i:2670;s:9:"frightful";i:2671;s:11:"frightfully";i:2672;s:9:"frivolous";i:2673;s:5:"frown";i:2674;s:6:"frozen";i:2675;s:9:"fruitless";i:2676;s:11:"fruitlessly";i:2677;s:6:"fumble";i:2678;s:9:"frustrate";i:2679;s:11:"frustrating";i:2680;s:13:"frustratingly";i:2681;s:11:"frustration";i:2682;s:5:"fudge";i:2683;s:8:"fugitive";i:2684;s:10:"full-blown";i:2685;s:9:"fulminate";i:2686;s:4:"fume";i:2687;s:14:"fundamentalism";i:2688;s:9:"furiously";i:2689;s:5:"furor";i:2690;s:4:"fury";i:2691;s:4:"fuss";i:2692;s:9:"fustigate";i:2693;s:5:"fussy";i:2694;s:5:"fusty";i:2695;s:6:"futile";i:2696;s:8:"futilely";i:2697;s:8:"futility";i:2698;s:5:"fuzzy";i:2699;s:6:"gabble";i:2700;s:4:"gaff";i:2701;s:5:"gaffe";i:2702;s:7:"gainsay";i:2703;s:9:"gainsayer";i:2704;s:4:"gaga";i:2705;s:6:"gaggle";i:2706;s:4:"gall";i:2707;s:7:"galling";i:2708;s:9:"gallingly";i:2709;s:6:"gamble";i:2710;s:4:"game";i:2711;s:4:"gape";i:2712;s:7:"garbage";i:2713;s:6:"garish";i:2714;s:4:"gasp";i:2715;s:6:"gauche";i:2716;s:5:"gaudy";i:2717;s:4:"gawk";i:2718;s:5:"gawky";i:2719;s:6:"geezer";i:2720;s:8:"genocide";i:2721;s:8:"get-rich";i:2722;s:7:"ghastly";i:2723;s:6:"ghetto";i:2724;s:6:"gibber";i:2725;s:9:"gibberish";i:2726;s:4:"gibe";i:2727;s:5:"glare";i:2728;s:7:"glaring";i:2729;s:9:"glaringly";i:2730;s:4:"glib";i:2731;s:6:"glibly";i:2732;s:6:"glitch";i:2733;s:10:"gloatingly";i:2734;s:5:"gloom";i:2735;s:5:"gloss";i:2736;s:6:"glower";i:2737;s:4:"glut";i:2738;s:7:"gnawing";i:2739;s:4:"goad";i:2740;s:7:"goading";i:2741;s:9:"god-awful";i:2742;s:6:"goddam";i:2743;s:7:"goddamn";i:2744;s:4:"goof";i:2745;s:6:"gossip";i:2746;s:9:"graceless";i:2747;s:11:"gracelessly";i:2748;s:5:"graft";i:2749;s:9:"grandiose";i:2750;s:7:"grapple";i:2751;s:5:"grate";i:2752;s:7:"grating";i:2753;s:10:"gratuitous";i:2754;s:12:"gratuitously";i:2755;s:5:"grave";i:2756;s:7:"gravely";i:2757;s:5:"greed";i:2758;s:6:"greedy";i:2759;s:9:"grievance";i:2760;s:10:"grievances";i:2761;s:6:"grieve";i:2762;s:8:"grieving";i:2763;s:8:"grievous";i:2764;s:10:"grievously";i:2765;s:5:"grill";i:2766;s:7:"grimace";i:2767;s:5:"grind";i:2768;s:5:"gripe";i:2769;s:6:"grisly";i:2770;s:6:"gritty";i:2771;s:7:"grossly";i:2772;s:6:"grouch";i:2773;s:10:"groundless";i:2774;s:6:"grouse";i:2775;s:5:"growl";i:2776;s:6:"grudge";i:2777;s:7:"grudges";i:2778;s:8:"grudging";i:2779;s:10:"grudgingly";i:2780;s:8:"gruesome";i:2781;s:10:"gruesomely";i:2782;s:5:"gruff";i:2783;s:7:"grumble";i:2784;s:5:"guile";i:2785;s:5:"guilt";i:2786;s:8:"guiltily";i:2787;s:8:"gullible";i:2788;s:7:"haggard";i:2789;s:6:"haggle";i:2790;s:11:"halfhearted";i:2791;s:13:"halfheartedly";i:2792;s:11:"hallucinate";i:2793;s:13:"hallucination";i:2794;s:6:"hamper";i:2795;s:9:"hamstring";i:2796;s:9:"hamstrung";i:2797;s:11:"handicapped";i:2798;s:7:"hapless";i:2799;s:9:"haphazard";i:2800;s:8:"harangue";i:2801;s:6:"harass";i:2802;s:10:"harassment";i:2803;s:9:"harboring";i:2804;s:7:"harbors";i:2805;s:4:"hard";i:2806;s:8:"hard-hit";i:2807;s:9:"hard-line";i:2808;s:10:"hard-liner";i:2809;s:8:"hardball";i:2810;s:6:"harden";i:2811;s:8:"hardened";i:2812;s:10:"hardheaded";i:2813;s:11:"hardhearted";i:2814;s:9:"hardliner";i:2815;s:10:"hardliners";i:2816;s:8:"hardship";i:2817;s:9:"hardships";i:2818;s:4:"harm";i:2819;s:7:"harmful";i:2820;s:5:"harms";i:2821;s:5:"harpy";i:2822;s:8:"harridan";i:2823;s:7:"harried";i:2824;s:6:"harrow";i:2825;s:5:"harsh";i:2826;s:7:"harshly";i:2827;s:6:"hassle";i:2828;s:5:"haste";i:2829;s:5:"hasty";i:2830;s:5:"hater";i:2831;s:7:"hateful";i:2832;s:9:"hatefully";i:2833;s:11:"hatefulness";i:2834;s:9:"haughtily";i:2835;s:7:"haughty";i:2836;s:6:"hatred";i:2837;s:5:"haunt";i:2838;s:8:"haunting";i:2839;s:5:"havoc";i:2840;s:7:"hawkish";i:2841;s:6:"hazard";i:2842;s:9:"hazardous";i:2843;s:4:"hazy";i:2844;s:8:"headache";i:2845;s:9:"headaches";i:2846;s:10:"heartbreak";i:2847;s:12:"heartbreaker";i:2848;s:13:"heartbreaking";i:2849;s:15:"heartbreakingly";i:2850;s:9:"heartless";i:2851;s:12:"heartrending";i:2852;s:7:"heathen";i:2853;s:7:"heavily";i:2854;s:12:"heavy-handed";i:2855;s:12:"heavyhearted";i:2856;s:4:"heck";i:2857;s:6:"heckle";i:2858;s:6:"hectic";i:2859;s:5:"hedge";i:2860;s:10:"hedonistic";i:2861;s:8:"heedless";i:2862;s:10:"hegemonism";i:2863;s:12:"hegemonistic";i:2864;s:8:"hegemony";i:2865;s:7:"heinous";i:2866;s:4:"hell";i:2867;s:9:"hell-bent";i:2868;s:7:"hellion";i:2869;s:8:"helpless";i:2870;s:10:"helplessly";i:2871;s:12:"helplessness";i:2872;s:6:"heresy";i:2873;s:7:"heretic";i:2874;s:9:"heretical";i:2875;s:8:"hesitant";i:2876;s:7:"hideous";i:2877;s:9:"hideously";i:2878;s:11:"hideousness";i:2879;s:6:"hinder";i:2880;s:9:"hindrance";i:2881;s:5:"hoard";i:2882;s:4:"hoax";i:2883;s:6:"hobble";i:2884;s:4:"hole";i:2885;s:6:"hollow";i:2886;s:8:"hoodwink";i:2887;s:8:"hopeless";i:2888;s:10:"hopelessly";i:2889;s:12:"hopelessness";i:2890;s:5:"horde";i:2891;s:10:"horrendous";i:2892;s:12:"horrendously";i:2893;s:8:"horrible";i:2894;s:8:"horribly";i:2895;s:6:"horrid";i:2896;s:8:"horrific";i:2897;s:12:"horrifically";i:2898;s:7:"horrify";i:2899;s:10:"horrifying";i:2900;s:12:"horrifyingly";i:2901;s:6:"horror";i:2902;s:7:"horrors";i:2903;s:7:"hostage";i:2904;s:7:"hostile";i:2905;s:11:"hostilities";i:2906;s:9:"hostility";i:2907;s:7:"hothead";i:2908;s:9:"hotheaded";i:2909;s:7:"hotbeds";i:2910;s:8:"hothouse";i:2911;s:6:"hubris";i:2912;s:8:"huckster";i:2913;s:8:"humbling";i:2914;s:9:"humiliate";i:2915;s:11:"humiliating";i:2916;s:11:"humiliation";i:2917;s:6:"hunger";i:2918;s:6:"hungry";i:2919;s:4:"hurt";i:2920;s:7:"hurtful";i:2921;s:7:"hustler";i:2922;s:9:"hypocrisy";i:2923;s:9:"hypocrite";i:2924;s:10:"hypocrites";i:2925;s:12:"hypocritical";i:2926;s:14:"hypocritically";i:2927;s:8:"hysteria";i:2928;s:8:"hysteric";i:2929;s:10:"hysterical";i:2930;s:12:"hysterically";i:2931;s:9:"hysterics";i:2932;s:3:"icy";i:2933;s:8:"idiocies";i:2934;s:6:"idiocy";i:2935;s:5:"idiot";i:2936;s:11:"idiotically";i:2937;s:6:"idiots";i:2938;s:4:"idle";i:2939;s:7:"ignoble";i:2940;s:11:"ignominious";i:2941;s:13:"ignominiously";i:2942;s:8:"ignominy";i:2943;s:6:"ignore";i:2944;s:9:"ignorance";i:2945;s:11:"ill-advised";i:2946;s:13:"ill-conceived";i:2947;s:9:"ill-fated";i:2948;s:11:"ill-favored";i:2949;s:12:"ill-mannered";i:2950;s:11:"ill-natured";i:2951;s:10:"ill-sorted";i:2952;s:12:"ill-tempered";i:2953;s:11:"ill-treated";i:2954;s:13:"ill-treatment";i:2955;s:9:"ill-usage";i:2956;s:8:"ill-used";i:2957;s:7:"illegal";i:2958;s:9:"illegally";i:2959;s:12:"illegitimate";i:2960;s:7:"illicit";i:2961;s:8:"illiquid";i:2962;s:10:"illiterate";i:2963;s:7:"illness";i:2964;s:7:"illogic";i:2965;s:9:"illogical";i:2966;s:11:"illogically";i:2967;s:8:"illusion";i:2968;s:9:"illusions";i:2969;s:8:"illusory";i:2970;s:9:"imaginary";i:2971;s:9:"imbalance";i:2972;s:8:"imbecile";i:2973;s:9:"imbroglio";i:2974;s:10:"immaterial";i:2975;s:8:"immature";i:2976;s:9:"imminence";i:2977;s:8:"imminent";i:2978;s:10:"imminently";i:2979;s:11:"immobilized";i:2980;s:10:"immoderate";i:2981;s:12:"immoderately";i:2982;s:8:"immodest";i:2983;s:7:"immoral";i:2984;s:10:"immorality";i:2985;s:9:"immorally";i:2986;s:9:"immovable";i:2987;s:6:"impair";i:2988;s:8:"impaired";i:2989;s:7:"impasse";i:2990;s:9:"impassive";i:2991;s:10:"impatience";i:2992;s:9:"impatient";i:2993;s:11:"impatiently";i:2994;s:7:"impeach";i:2995;s:6:"impede";i:2996;s:9:"impedance";i:2997;s:10:"impediment";i:2998;s:9:"impending";i:2999;s:10:"impenitent";i:3000;s:9:"imperfect";i:3001;s:11:"imperfectly";i:3002;s:11:"imperialist";i:3003;s:7:"imperil";i:3004;s:9:"imperious";i:3005;s:11:"imperiously";i:3006;s:13:"impermissible";i:3007;s:10:"impersonal";i:3008;s:11:"impertinent";i:3009;s:9:"impetuous";i:3010;s:11:"impetuously";i:3011;s:7:"impiety";i:3012;s:7:"impinge";i:3013;s:7:"impious";i:3014;s:10:"implacable";i:3015;s:11:"implausible";i:3016;s:11:"implausibly";i:3017;s:9:"implicate";i:3018;s:11:"implication";i:3019;s:7:"implode";i:3020;s:8:"impolite";i:3021;s:10:"impolitely";i:3022;s:9:"impolitic";i:3023;s:11:"importunate";i:3024;s:9:"importune";i:3025;s:6:"impose";i:3026;s:8:"imposers";i:3027;s:8:"imposing";i:3028;s:10:"imposition";i:3029;s:10:"impossible";i:3030;s:12:"impossiblity";i:3031;s:10:"impossibly";i:3032;s:10:"impoverish";i:3033;s:12:"impoverished";i:3034;s:11:"impractical";i:3035;s:9:"imprecate";i:3036;s:9:"imprecise";i:3037;s:11:"imprecisely";i:3038;s:11:"imprecision";i:3039;s:8:"imprison";i:3040;s:12:"imprisonment";i:3041;s:13:"improbability";i:3042;s:10:"improbable";i:3043;s:10:"improbably";i:3044;s:8:"improper";i:3045;s:10:"improperly";i:3046;s:11:"impropriety";i:3047;s:10:"imprudence";i:3048;s:9:"imprudent";i:3049;s:9:"impudence";i:3050;s:8:"impudent";i:3051;s:10:"impudently";i:3052;s:6:"impugn";i:3053;s:11:"impulsively";i:3054;s:8:"impunity";i:3055;s:6:"impure";i:3056;s:8:"impurity";i:3057;s:9:"inability";i:3058;s:12:"inaccessible";i:3059;s:10:"inaccuracy";i:3060;s:12:"inaccuracies";i:3061;s:10:"inaccurate";i:3062;s:12:"inaccurately";i:3063;s:8:"inaction";i:3064;s:10:"inadequacy";i:3065;s:12:"inadequately";i:3066;s:10:"inadverent";i:3067;s:12:"inadverently";i:3068;s:11:"inadvisable";i:3069;s:11:"inadvisably";i:3070;s:5:"inane";i:3071;s:7:"inanely";i:3072;s:13:"inappropriate";i:3073;s:15:"inappropriately";i:3074;s:5:"inapt";i:3075;s:10:"inaptitude";i:3076;s:12:"inarticulate";i:3077;s:11:"inattentive";i:3078;s:9:"incapably";i:3079;s:10:"incautious";i:3080;s:10:"incendiary";i:3081;s:7:"incense";i:3082;s:9:"incessant";i:3083;s:11:"incessantly";i:3084;s:6:"incite";i:3085;s:10:"incitement";i:3086;s:10:"incivility";i:3087;s:9:"inclement";i:3088;s:11:"incognizant";i:3089;s:11:"incoherence";i:3090;s:10:"incoherent";i:3091;s:12:"incoherently";i:3092;s:14:"incommensurate";i:3093;s:12:"incomparable";i:3094;s:12:"incomparably";i:3095;s:15:"incompatibility";i:3096;s:12:"incompetence";i:3097;s:13:"incompetently";i:3098;s:11:"incompliant";i:3099;s:16:"incomprehensible";i:3100;s:15:"incomprehension";i:3101;s:13:"inconceivable";i:3102;s:13:"inconceivably";i:3103;s:12:"inconclusive";i:3104;s:11:"incongruous";i:3105;s:13:"incongruously";i:3106;s:12:"inconsequent";i:3107;s:14:"inconsequently";i:3108;s:15:"inconsequential";i:3109;s:17:"inconsequentially";i:3110;s:13:"inconsiderate";i:3111;s:15:"inconsiderately";i:3112;s:13:"inconsistence";i:3113;s:15:"inconsistencies";i:3114;s:13:"inconsistency";i:3115;s:12:"inconsistent";i:3116;s:12:"inconsolable";i:3117;s:12:"inconsolably";i:3118;s:10:"inconstant";i:3119;s:13:"inconvenience";i:3120;s:12:"inconvenient";i:3121;s:14:"inconveniently";i:3122;s:11:"incorrectly";i:3123;s:12:"incorrigible";i:3124;s:12:"incorrigibly";i:3125;s:11:"incredulous";i:3126;s:13:"incredulously";i:3127;s:9:"inculcate";i:3128;s:9:"indecency";i:3129;s:8:"indecent";i:3130;s:10:"indecently";i:3131;s:10:"indecision";i:3132;s:12:"indecisively";i:3133;s:9:"indecorum";i:3134;s:12:"indefensible";i:3135;s:10:"indefinite";i:3136;s:12:"indefinitely";i:3137;s:10:"indelicate";i:3138;s:14:"indeterminable";i:3139;s:14:"indeterminably";i:3140;s:13:"indeterminate";i:3141;s:12:"indifference";i:3142;s:8:"indigent";i:3143;s:9:"indignant";i:3144;s:11:"indignantly";i:3145;s:11:"indignation";i:3146;s:9:"indignity";i:3147;s:13:"indiscernible";i:3148;s:10:"indiscreet";i:3149;s:12:"indiscreetly";i:3150;s:12:"indiscretion";i:3151;s:14:"indiscriminate";i:3152;s:16:"indiscriminating";i:3153;s:16:"indiscriminately";i:3154;s:10:"indisposed";i:3155;s:10:"indistinct";i:3156;s:13:"indistinctive";i:3157;s:12:"indoctrinate";i:3158;s:14:"indoctrination";i:3159;s:8:"indolent";i:3160;s:7:"indulge";i:3161;s:13:"ineffectively";i:3162;s:15:"ineffectiveness";i:3163;s:11:"ineffectual";i:3164;s:13:"ineffectually";i:3165;s:15:"ineffectualness";i:3166;s:13:"inefficacious";i:3167;s:10:"inefficacy";i:3168;s:12:"inefficiency";i:3169;s:13:"inefficiently";i:3170;s:10:"ineligible";i:3171;s:10:"inelegance";i:3172;s:9:"inelegant";i:3173;s:10:"ineloquent";i:3174;s:12:"ineloquently";i:3175;s:5:"inept";i:3176;s:10:"ineptitude";i:3177;s:7:"ineptly";i:3178;s:12:"inequalities";i:3179;s:10:"inequality";i:3180;s:11:"inequitable";i:3181;s:11:"inequitably";i:3182;s:10:"inequities";i:3183;s:7:"inertia";i:3184;s:11:"inescapable";i:3185;s:11:"inescapably";i:3186;s:11:"inessential";i:3187;s:10:"inevitable";i:3188;s:10:"inevitably";i:3189;s:7:"inexact";i:3190;s:11:"inexcusable";i:3191;s:11:"inexcusably";i:3192;s:10:"inexorable";i:3193;s:10:"inexorably";i:3194;s:12:"inexperience";i:3195;s:13:"inexperienced";i:3196;s:8:"inexpert";i:3197;s:10:"inexpertly";i:3198;s:10:"inexpiable";i:3199;s:13:"inexplainable";i:3200;s:12:"inexplicable";i:3201;s:12:"inextricable";i:3202;s:12:"inextricably";i:3203;s:8:"infamous";i:3204;s:10:"infamously";i:3205;s:6:"infamy";i:3206;s:8:"infected";i:3207;s:11:"inferiority";i:3208;s:8:"infernal";i:3209;s:6:"infest";i:3210;s:8:"infested";i:3211;s:7:"infidel";i:3212;s:8:"infidels";i:3213;s:11:"infiltrator";i:3214;s:12:"infiltrators";i:3215;s:6:"infirm";i:3216;s:7:"inflame";i:3217;s:12:"inflammatory";i:3218;s:8:"inflated";i:3219;s:12:"inflationary";i:3220;s:10:"inflexible";i:3221;s:7:"inflict";i:3222;s:10:"infraction";i:3223;s:8:"infringe";i:3224;s:12:"infringement";i:3225;s:13:"infringements";i:3226;s:9:"infuriate";i:3227;s:11:"infuriating";i:3228;s:13:"infuriatingly";i:3229;s:10:"inglorious";i:3230;s:7:"ingrate";i:3231;s:11:"ingratitude";i:3232;s:7:"inhibit";i:3233;s:10:"inhibition";i:3234;s:12:"inhospitable";i:3235;s:13:"inhospitality";i:3236;s:7:"inhuman";i:3237;s:10:"inhumanity";i:3238;s:8:"inimical";i:3239;s:10:"inimically";i:3240;s:10:"iniquitous";i:3241;s:8:"iniquity";i:3242;s:11:"injudicious";i:3243;s:6:"injure";i:3244;s:9:"injurious";i:3245;s:6:"injury";i:3246;s:9:"injustice";i:3247;s:10:"injustices";i:3248;s:8:"innuendo";i:3249;s:11:"inopportune";i:3250;s:10:"inordinate";i:3251;s:12:"inordinately";i:3252;s:8:"insanely";i:3253;s:8:"insanity";i:3254;s:10:"insatiable";i:3255;s:10:"insecurity";i:3256;s:10:"insensible";i:3257;s:11:"insensitive";i:3258;s:13:"insensitively";i:3259;s:13:"insensitivity";i:3260;s:9:"insidious";i:3261;s:11:"insidiously";i:3262;s:14:"insignificance";i:3263;s:15:"insignificantly";i:3264;s:11:"insincerely";i:3265;s:11:"insincerity";i:3266;s:9:"insinuate";i:3267;s:11:"insinuating";i:3268;s:11:"insinuation";i:3269;s:10:"insociable";i:3270;s:9:"isolation";i:3271;s:9:"insolence";i:3272;s:8:"insolent";i:3273;s:10:"insolently";i:3274;s:9:"insolvent";i:3275;s:11:"insouciance";i:3276;s:11:"instability";i:3277;s:8:"instable";i:3278;s:9:"instigate";i:3279;s:10:"instigator";i:3280;s:11:"instigators";i:3281;s:13:"insubordinate";i:3282;s:13:"insubstantial";i:3283;s:15:"insubstantially";i:3284;s:12:"insufferable";i:3285;s:12:"insufferably";i:3286;s:13:"insufficiency";i:3287;s:14:"insufficiently";i:3288;s:7:"insular";i:3289;s:6:"insult";i:3290;s:9:"insulting";i:3291;s:11:"insultingly";i:3292;s:13:"insupportable";i:3293;s:13:"insupportably";i:3294;s:14:"insurmountable";i:3295;s:14:"insurmountably";i:3296;s:12:"insurrection";i:3297;s:9:"interfere";i:3298;s:12:"interference";i:3299;s:12:"intermittent";i:3300;s:9:"interrupt";i:3301;s:12:"interruption";i:3302;s:10:"intimidate";i:3303;s:12:"intimidating";i:3304;s:14:"intimidatingly";i:3305;s:12:"intimidation";i:3306;s:11:"intolerable";i:3307;s:13:"intolerablely";i:3308;s:11:"intolerance";i:3309;s:10:"intolerant";i:3310;s:10:"intoxicate";i:3311;s:11:"intractable";i:3312;s:13:"intransigence";i:3313;s:12:"intransigent";i:3314;s:7:"intrude";i:3315;s:9:"intrusion";i:3316;s:9:"intrusive";i:3317;s:8:"inundate";i:3318;s:9:"inundated";i:3319;s:7:"invader";i:3320;s:7:"invalid";i:3321;s:10:"invalidate";i:3322;s:10:"invalidity";i:3323;s:8:"invasive";i:3324;s:9:"invective";i:3325;s:8:"inveigle";i:3326;s:9:"invidious";i:3327;s:11:"invidiously";i:3328;s:13:"invidiousness";i:3329;s:13:"involuntarily";i:3330;s:11:"involuntary";i:3331;s:5:"irate";i:3332;s:7:"irately";i:3333;s:3:"ire";i:3334;s:3:"irk";i:3335;s:7:"irksome";i:3336;s:6:"ironic";i:3337;s:7:"ironies";i:3338;s:5:"irony";i:3339;s:13:"irrationality";i:3340;s:12:"irrationally";i:3341;s:14:"irreconcilable";i:3342;s:12:"irredeemable";i:3343;s:12:"irredeemably";i:3344;s:12:"irreformable";i:3345;s:9:"irregular";i:3346;s:12:"irregularity";i:3347;s:11:"irrelevance";i:3348;s:10:"irrelevant";i:3349;s:11:"irreparable";i:3350;s:12:"irreplacible";i:3351;s:13:"irrepressible";i:3352;s:10:"irresolute";i:3353;s:12:"irresolvable";i:3354;s:13:"irresponsible";i:3355;s:13:"irresponsibly";i:3356;s:13:"irretrievable";i:3357;s:11:"irreverence";i:3358;s:10:"irreverent";i:3359;s:12:"irreverently";i:3360;s:12:"irreversible";i:3361;s:9:"irritably";i:3362;s:8:"irritant";i:3363;s:8:"irritate";i:3364;s:10:"irritating";i:3365;s:10:"irritation";i:3366;s:7:"isolate";i:3367;s:4:"itch";i:3368;s:6:"jabber";i:3369;s:3:"jam";i:3370;s:3:"jar";i:3371;s:9:"jaundiced";i:3372;s:9:"jealously";i:3373;s:11:"jealousness";i:3374;s:8:"jealousy";i:3375;s:4:"jeer";i:3376;s:7:"jeering";i:3377;s:9:"jeeringly";i:3378;s:5:"jeers";i:3379;s:10:"jeopardize";i:3380;s:8:"jeopardy";i:3381;s:4:"jerk";i:3382;s:7:"jittery";i:3383;s:7:"jobless";i:3384;s:5:"joker";i:3385;s:4:"jolt";i:3386;s:5:"jumpy";i:3387;s:4:"junk";i:3388;s:5:"junky";i:3389;s:8:"juvenile";i:3390;s:5:"kaput";i:3391;s:4:"kick";i:3392;s:4:"kill";i:3393;s:6:"killer";i:3394;s:7:"killjoy";i:3395;s:5:"knave";i:3396;s:5:"knife";i:3397;s:5:"knock";i:3398;s:4:"kook";i:3399;s:5:"kooky";i:3400;s:4:"lack";i:3401;s:13:"lackadaisical";i:3402;s:6:"lackey";i:3403;s:7:"lackeys";i:3404;s:7:"lacking";i:3405;s:10:"lackluster";i:3406;s:7:"laconic";i:3407;s:3:"lag";i:3408;s:7:"lambast";i:3409;s:8:"lambaste";i:3410;s:4:"lame";i:3411;s:9:"lame-duck";i:3412;s:6:"lament";i:3413;s:10:"lamentable";i:3414;s:10:"lamentably";i:3415;s:7:"languid";i:3416;s:8:"languish";i:3417;s:5:"lanky";i:3418;s:7:"languor";i:3419;s:10:"languorous";i:3420;s:12:"languorously";i:3421;s:5:"lapse";i:3422;s:10:"lascivious";i:3423;s:10:"last-ditch";i:3424;s:5:"laugh";i:3425;s:9:"laughably";i:3426;s:13:"laughingstock";i:3427;s:8:"laughter";i:3428;s:10:"lawbreaker";i:3429;s:11:"lawbreaking";i:3430;s:7:"lawless";i:3431;s:11:"lawlessness";i:3432;s:3:"lax";i:3433;s:4:"leak";i:3434;s:7:"leakage";i:3435;s:5:"leaky";i:3436;s:4:"lech";i:3437;s:6:"lecher";i:3438;s:9:"lecherous";i:3439;s:7:"lechery";i:3440;s:7:"lecture";i:3441;s:5:"leech";i:3442;s:4:"leer";i:3443;s:5:"leery";i:3444;s:12:"left-leaning";i:3445;s:14:"less-developed";i:3446;s:6:"lessen";i:3447;s:6:"lesser";i:3448;s:12:"lesser-known";i:3449;s:5:"letch";i:3450;s:6:"lethal";i:3451;s:9:"lethargic";i:3452;s:8:"lethargy";i:3453;s:4:"lewd";i:3454;s:6:"lewdly";i:3455;s:8:"lewdness";i:3456;s:6:"liable";i:3457;s:9:"liability";i:3458;s:4:"liar";i:3459;s:5:"liars";i:3460;s:10:"licentious";i:3461;s:12:"licentiously";i:3462;s:14:"licentiousness";i:3463;s:3:"lie";i:3464;s:4:"lier";i:3465;s:4:"lies";i:3466;s:16:"life-threatening";i:3467;s:8:"lifeless";i:3468;s:5:"limit";i:3469;s:10:"limitation";i:3470;s:4:"limp";i:3471;s:8:"listless";i:3472;s:9:"litigious";i:3473;s:12:"little-known";i:3474;s:5:"livid";i:3475;s:7:"lividly";i:3476;s:5:"loath";i:3477;s:6:"loathe";i:3478;s:8:"loathing";i:3479;s:7:"loathly";i:3480;s:9:"loathsome";i:3481;s:11:"loathsomely";i:3482;s:4:"lone";i:3483;s:10:"loneliness";i:3484;s:4:"long";i:3485;s:9:"longingly";i:3486;s:8:"loophole";i:3487;s:9:"loopholes";i:3488;s:4:"loot";i:3489;s:4:"lorn";i:3490;s:6:"losing";i:3491;s:4:"lose";i:3492;s:5:"loser";i:3493;s:4:"loss";i:3494;s:8:"lovelorn";i:3495;s:9:"low-rated";i:3496;s:5:"lowly";i:3497;s:9:"ludicrous";i:3498;s:11:"ludicrously";i:3499;s:10:"lugubrious";i:3500;s:8:"lukewarm";i:3501;s:4:"lull";i:3502;s:7:"lunatic";i:3503;s:10:"lunaticism";i:3504;s:5:"lurch";i:3505;s:4:"lure";i:3506;s:5:"lurid";i:3507;s:4:"lurk";i:3508;s:7:"lurking";i:3509;s:5:"lying";i:3510;s:7:"macabre";i:3511;s:6:"madden";i:3512;s:9:"maddening";i:3513;s:11:"maddeningly";i:3514;s:6:"madder";i:3515;s:5:"madly";i:3516;s:6:"madman";i:3517;s:7:"madness";i:3518;s:11:"maladjusted";i:3519;s:13:"maladjustment";i:3520;s:6:"malady";i:3521;s:7:"malaise";i:3522;s:10:"malcontent";i:3523;s:12:"malcontented";i:3524;s:8:"maledict";i:3525;s:11:"malevolence";i:3526;s:10:"malevolent";i:3527;s:12:"malevolently";i:3528;s:6:"malice";i:3529;s:9:"malicious";i:3530;s:11:"maliciously";i:3531;s:13:"maliciousness";i:3532;s:6:"malign";i:3533;s:9:"malignant";i:3534;s:10:"malodorous";i:3535;s:12:"maltreatment";i:3536;s:8:"maneuver";i:3537;s:6:"mangle";i:3538;s:5:"mania";i:3539;s:6:"maniac";i:3540;s:8:"maniacal";i:3541;s:5:"manic";i:3542;s:10:"manipulate";i:3543;s:12:"manipulation";i:3544;s:12:"manipulative";i:3545;s:12:"manipulators";i:3546;s:3:"mar";i:3547;s:8:"marginal";i:3548;s:10:"marginally";i:3549;s:9:"martyrdom";i:3550;s:17:"martyrdom-seeking";i:3551;s:8:"massacre";i:3552;s:9:"massacres";i:3553;s:8:"maverick";i:3554;s:7:"mawkish";i:3555;s:9:"mawkishly";i:3556;s:11:"mawkishness";i:3557;s:16:"maxi-devaluation";i:3558;s:6:"meager";i:3559;s:11:"meaningless";i:3560;s:8:"meanness";i:3561;s:6:"meddle";i:3562;s:10:"meddlesome";i:3563;s:10:"mediocrity";i:3564;s:10:"melancholy";i:3565;s:12:"melodramatic";i:3566;s:16:"melodramatically";i:3567;s:6:"menace";i:3568;s:8:"menacing";i:3569;s:10:"menacingly";i:3570;s:10:"mendacious";i:3571;s:9:"mendacity";i:3572;s:6:"menial";i:3573;s:9:"merciless";i:3574;s:11:"mercilessly";i:3575;s:4:"mere";i:3576;s:4:"mess";i:3577;s:6:"midget";i:3578;s:4:"miff";i:3579;s:9:"militancy";i:3580;s:4:"mind";i:3581;s:8:"mindless";i:3582;s:10:"mindlessly";i:3583;s:6:"mirage";i:3584;s:4:"mire";i:3585;s:12:"misapprehend";i:3586;s:11:"misbecoming";i:3587;s:9:"misbecome";i:3588;s:11:"misbegotten";i:3589;s:9:"misbehave";i:3590;s:11:"misbehavior";i:3591;s:12:"miscalculate";i:3592;s:14:"miscalculation";i:3593;s:8:"mischief";i:3594;s:11:"mischievous";i:3595;s:13:"mischievously";i:3596;s:13:"misconception";i:3597;s:14:"misconceptions";i:3598;s:9:"miscreant";i:3599;s:10:"miscreants";i:3600;s:12:"misdirection";i:3601;s:5:"miser";i:3602;s:7:"miserly";i:3603;s:13:"miserableness";i:3604;s:9:"miserably";i:3605;s:8:"miseries";i:3606;s:6:"misery";i:3607;s:6:"misfit";i:3608;s:10:"misfortune";i:3609;s:9:"misgiving";i:3610;s:10:"misgivings";i:3611;s:11:"misguidance";i:3612;s:8:"misguide";i:3613;s:9:"misguided";i:3614;s:9:"mishandle";i:3615;s:6:"mishap";i:3616;s:9:"misinform";i:3617;s:11:"misinformed";i:3618;s:12:"misinterpret";i:3619;s:8:"misjudge";i:3620;s:11:"misjudgment";i:3621;s:7:"mislead";i:3622;s:10:"misleading";i:3623;s:12:"misleadingly";i:3624;s:7:"mislike";i:3625;s:9:"mismanage";i:3626;s:7:"misread";i:3627;s:10:"misreading";i:3628;s:12:"misrepresent";i:3629;s:17:"misrepresentation";i:3630;s:4:"miss";i:3631;s:12:"misstatement";i:3632;s:7:"mistake";i:3633;s:10:"mistakenly";i:3634;s:8:"mistakes";i:3635;s:8:"mistrust";i:3636;s:11:"mistrustful";i:3637;s:13:"mistrustfully";i:3638;s:13:"misunderstand";i:3639;s:16:"misunderstanding";i:3640;s:17:"misunderstandings";i:3641;s:6:"misuse";i:3642;s:4:"moan";i:3643;s:4:"mock";i:3644;s:9:"mockeries";i:3645;s:7:"mockery";i:3646;s:7:"mocking";i:3647;s:9:"mockingly";i:3648;s:6:"molest";i:3649;s:11:"molestation";i:3650;s:10:"monotonous";i:3651;s:8:"monotony";i:3652;s:7:"monster";i:3653;s:13:"monstrosities";i:3654;s:11:"monstrosity";i:3655;s:9:"monstrous";i:3656;s:11:"monstrously";i:3657;s:4:"moon";i:3658;s:4:"moot";i:3659;s:4:"mope";i:3660;s:6:"morbid";i:3661;s:8:"morbidly";i:3662;s:7:"mordant";i:3663;s:9:"mordantly";i:3664;s:8:"moribund";i:3665;s:13:"mortification";i:3666;s:9:"mortified";i:3667;s:7:"mortify";i:3668;s:10:"mortifying";i:3669;s:10:"motionless";i:3670;s:6:"motley";i:3671;s:5:"mourn";i:3672;s:7:"mourner";i:3673;s:8:"mournful";i:3674;s:10:"mournfully";i:3675;s:6:"muddle";i:3676;s:5:"muddy";i:3677;s:10:"mudslinger";i:3678;s:11:"mudslinging";i:3679;s:6:"mulish";i:3680;s:18:"multi-polarization";i:3681;s:7:"mundane";i:3682;s:6:"murder";i:3683;s:9:"murderous";i:3684;s:11:"murderously";i:3685;s:5:"murky";i:3686;s:14:"muscle-flexing";i:3687;s:10:"mysterious";i:3688;s:12:"mysteriously";i:3689;s:7:"mystery";i:3690;s:7:"mystify";i:3691;s:9:"mistified";i:3692;s:4:"myth";i:3693;s:3:"nag";i:3694;s:7:"nagging";i:3695;s:5:"naive";i:3696;s:7:"naively";i:3697;s:6:"narrow";i:3698;s:8:"narrower";i:3699;s:7:"nastily";i:3700;s:9:"nastiness";i:3701;s:5:"nasty";i:3702;s:11:"nationalism";i:3703;s:7:"naughty";i:3704;s:8:"nauseate";i:3705;s:10:"nauseating";i:3706;s:12:"nauseatingly";i:3707;s:8:"nebulous";i:3708;s:10:"nebulously";i:3709;s:8:"needless";i:3710;s:10:"needlessly";i:3711;s:9:"nefarious";i:3712;s:11:"nefariously";i:3713;s:6:"negate";i:3714;s:8:"negation";i:3715;s:7:"neglect";i:3716;s:9:"neglected";i:3717;s:9:"negligent";i:3718;s:10:"negligence";i:3719;s:10:"negligible";i:3720;s:7:"nemesis";i:3721;s:6:"nettle";i:3722;s:10:"nettlesome";i:3723;s:9:"nervously";i:3724;s:11:"nervousness";i:3725;s:12:"neurotically";i:3726;s:6:"niggle";i:3727;s:9:"nightmare";i:3728;s:11:"nightmarish";i:3729;s:13:"nightmarishly";i:3730;s:3:"nix";i:3731;s:5:"noisy";i:3732;s:14:"non-confidence";i:3733;s:11:"nonexistent";i:3734;s:8:"nonsense";i:3735;s:5:"nosey";i:3736;s:9:"notorious";i:3737;s:11:"notoriously";i:3738;s:8:"nuisance";i:3739;s:5:"obese";i:3740;s:6:"object";i:3741;s:9:"objection";i:3742;s:13:"objectionable";i:3743;s:10:"objections";i:3744;s:7:"oblique";i:3745;s:10:"obliterate";i:3746;s:11:"obliterated";i:3747;s:9:"oblivious";i:3748;s:9:"obnoxious";i:3749;s:11:"obnoxiously";i:3750;s:7:"obscene";i:3751;s:9:"obscenely";i:3752;s:9:"obscenity";i:3753;s:7:"obscure";i:3754;s:9:"obscurity";i:3755;s:6:"obsess";i:3756;s:9:"obsession";i:3757;s:10:"obsessions";i:3758;s:11:"obsessively";i:3759;s:13:"obsessiveness";i:3760;s:8:"obsolete";i:3761;s:8:"obstacle";i:3762;s:9:"obstinate";i:3763;s:11:"obstinately";i:3764;s:8:"obstruct";i:3765;s:11:"obstruction";i:3766;s:9:"obtrusive";i:3767;s:6:"obtuse";i:3768;s:5:"odder";i:3769;s:6:"oddest";i:3770;s:8:"oddities";i:3771;s:6:"oddity";i:3772;s:5:"oddly";i:3773;s:7:"offence";i:3774;s:6:"offend";i:3775;s:9:"offending";i:3776;s:8:"offenses";i:3777;s:9:"offensive";i:3778;s:11:"offensively";i:3779;s:13:"offensiveness";i:3780;s:9:"officious";i:3781;s:7:"ominous";i:3782;s:9:"ominously";i:3783;s:8:"omission";i:3784;s:4:"omit";i:3785;s:8:"one-side";i:3786;s:9:"one-sided";i:3787;s:7:"onerous";i:3788;s:9:"onerously";i:3789;s:9:"onslaught";i:3790;s:11:"opinionated";i:3791;s:8:"opponent";i:3792;s:13:"opportunistic";i:3793;s:6:"oppose";i:3794;s:10:"opposition";i:3795;s:11:"oppositions";i:3796;s:7:"oppress";i:3797;s:10:"oppression";i:3798;s:10:"oppressive";i:3799;s:12:"oppressively";i:3800;s:14:"oppressiveness";i:3801;s:10:"oppressors";i:3802;s:6:"ordeal";i:3803;s:6:"orphan";i:3804;s:9:"ostracize";i:3805;s:8:"outbreak";i:3806;s:8:"outburst";i:3807;s:9:"outbursts";i:3808;s:7:"outcast";i:3809;s:6:"outcry";i:3810;s:8:"outdated";i:3811;s:6:"outlaw";i:3812;s:8:"outmoded";i:3813;s:7:"outrage";i:3814;s:8:"outraged";i:3815;s:10:"outrageous";i:3816;s:12:"outrageously";i:3817;s:14:"outrageousness";i:3818;s:8:"outrages";i:3819;s:8:"outsider";i:3820;s:10:"over-acted";i:3821;s:14:"over-valuation";i:3822;s:7:"overact";i:3823;s:9:"overacted";i:3824;s:7:"overawe";i:3825;s:11:"overbalance";i:3826;s:12:"overbalanced";i:3827;s:11:"overbearing";i:3828;s:13:"overbearingly";i:3829;s:9:"overblown";i:3830;s:8:"overcome";i:3831;s:6:"overdo";i:3832;s:8:"overdone";i:3833;s:7:"overdue";i:3834;s:13:"overemphasize";i:3835;s:8:"overkill";i:3836;s:8:"overlook";i:3837;s:8:"overplay";i:3838;s:9:"overpower";i:3839;s:9:"overreach";i:3840;s:7:"overrun";i:3841;s:10:"overshadow";i:3842;s:9:"oversight";i:3843;s:18:"oversimplification";i:3844;s:14:"oversimplified";i:3845;s:12:"oversimplify";i:3846;s:9:"oversized";i:3847;s:9:"overstate";i:3848;s:13:"overstatement";i:3849;s:14:"overstatements";i:3850;s:9:"overtaxed";i:3851;s:9:"overthrow";i:3852;s:8:"overturn";i:3853;s:9:"overwhelm";i:3854;s:12:"overwhelming";i:3855;s:14:"overwhelmingly";i:3856;s:10:"overworked";i:3857;s:11:"overzealous";i:3858;s:13:"overzealously";i:3859;s:7:"painful";i:3860;s:9:"painfully";i:3861;s:5:"pains";i:3862;s:4:"pale";i:3863;s:6:"paltry";i:3864;s:3:"pan";i:3865;s:11:"pandemonium";i:3866;s:7:"panicky";i:3867;s:11:"paradoxical";i:3868;s:13:"paradoxically";i:3869;s:8:"paralize";i:3870;s:9:"paralyzed";i:3871;s:8:"paranoia";i:3872;s:8:"parasite";i:3873;s:6:"pariah";i:3874;s:6:"parody";i:3875;s:10:"partiality";i:3876;s:8:"partisan";i:3877;s:9:"partisans";i:3878;s:5:"passe";i:3879;s:11:"passiveness";i:3880;s:12:"pathetically";i:3881;s:9:"patronize";i:3882;s:7:"paucity";i:3883;s:6:"pauper";i:3884;s:7:"paupers";i:3885;s:7:"payback";i:3886;s:8:"peculiar";i:3887;s:10:"peculiarly";i:3888;s:8:"pedantic";i:3889;s:10:"pedestrian";i:3890;s:5:"peeve";i:3891;s:6:"peeved";i:3892;s:7:"peevish";i:3893;s:9:"peevishly";i:3894;s:8:"penalize";i:3895;s:7:"penalty";i:3896;s:10:"perfidious";i:3897;s:9:"perfidity";i:3898;s:11:"perfunctory";i:3899;s:5:"peril";i:3900;s:8:"perilous";i:3901;s:10:"perilously";i:3902;s:10:"peripheral";i:3903;s:6:"perish";i:3904;s:10:"pernicious";i:3905;s:7:"perplex";i:3906;s:9:"perplexed";i:3907;s:10:"perplexing";i:3908;s:10:"perplexity";i:3909;s:9:"persecute";i:3910;s:11:"persecution";i:3911;s:12:"pertinacious";i:3912;s:14:"pertinaciously";i:3913;s:11:"pertinacity";i:3914;s:7:"perturb";i:3915;s:9:"perturbed";i:3916;s:8:"perverse";i:3917;s:10:"perversely";i:3918;s:10:"perversion";i:3919;s:10:"perversity";i:3920;s:7:"pervert";i:3921;s:9:"perverted";i:3922;s:9:"pessimism";i:3923;s:15:"pessimistically";i:3924;s:4:"pest";i:3925;s:9:"pestilent";i:3926;s:7:"petrify";i:3927;s:8:"pettifog";i:3928;s:5:"petty";i:3929;s:6:"phobia";i:3930;s:6:"phobic";i:3931;s:5:"picky";i:3932;s:7:"pillage";i:3933;s:7:"pillory";i:3934;s:5:"pinch";i:3935;s:4:"pine";i:3936;s:5:"pique";i:3937;s:8:"pitiable";i:3938;s:7:"pitiful";i:3939;s:9:"pitifully";i:3940;s:8:"pitiless";i:3941;s:10:"pitilessly";i:3942;s:8:"pittance";i:3943;s:4:"pity";i:3944;s:10:"plagiarize";i:3945;s:6:"plague";i:3946;s:9:"plaything";i:3947;s:4:"plea";i:3948;s:5:"pleas";i:3949;s:8:"plebeian";i:3950;s:6:"plight";i:3951;s:4:"plot";i:3952;s:8:"plotters";i:3953;s:4:"ploy";i:3954;s:7:"plunder";i:3955;s:9:"plunderer";i:3956;s:9:"pointless";i:3957;s:11:"pointlessly";i:3958;s:6:"poison";i:3959;s:9:"poisonous";i:3960;s:11:"poisonously";i:3961;s:12:"polarisation";i:3962;s:8:"polemize";i:3963;s:7:"pollute";i:3964;s:8:"polluter";i:3965;s:9:"polluters";i:3966;s:8:"polution";i:3967;s:7:"pompous";i:3968;s:6:"poorly";i:3969;s:9:"posturing";i:3970;s:4:"pout";i:3971;s:7:"poverty";i:3972;s:5:"prate";i:3973;s:8:"pratfall";i:3974;s:7:"prattle";i:3975;s:10:"precarious";i:3976;s:12:"precariously";i:3977;s:11:"precipitate";i:3978;s:11:"precipitous";i:3979;s:9:"predatory";i:3980;s:11:"predicament";i:3981;s:8:"prejudge";i:3982;s:9:"prejudice";i:3983;s:11:"prejudicial";i:3984;s:12:"premeditated";i:3985;s:9:"preoccupy";i:3986;s:12:"preposterous";i:3987;s:14:"preposterously";i:3988;s:8:"pressing";i:3989;s:7:"presume";i:3990;s:12:"presumptuous";i:3991;s:14:"presumptuously";i:3992;s:8:"pretence";i:3993;s:7:"pretend";i:3994;s:8:"pretense";i:3995;s:11:"pretentious";i:3996;s:13:"pretentiously";i:3997;s:11:"prevaricate";i:3998;s:6:"pricey";i:3999;s:7:"prickle";i:4000;s:8:"prickles";i:4001;s:8:"prideful";i:4002;s:9:"primitive";i:4003;s:6:"prison";i:4004;s:8:"prisoner";i:4005;s:7:"problem";i:4006;s:11:"problematic";i:4007;s:8:"problems";i:4008;s:13:"procrastinate";i:4009;s:15:"procrastination";i:4010;s:7:"profane";i:4011;s:9:"profanity";i:4012;s:8:"prohibit";i:4013;s:11:"prohibitive";i:4014;s:13:"prohibitively";i:4015;s:10:"propaganda";i:4016;s:12:"propagandize";i:4017;s:12:"proscription";i:4018;s:13:"proscriptions";i:4019;s:9:"prosecute";i:4020;s:7:"protest";i:4021;s:8:"protests";i:4022;s:10:"protracted";i:4023;s:11:"provocation";i:4024;s:11:"provocative";i:4025;s:7:"provoke";i:4026;s:3:"pry";i:4027;s:10:"pugnacious";i:4028;s:12:"pugnaciously";i:4029;s:9:"pugnacity";i:4030;s:5:"punch";i:4031;s:6:"punish";i:4032;s:10:"punishable";i:4033;s:8:"punitive";i:4034;s:4:"puny";i:4035;s:6:"puppet";i:4036;s:7:"puppets";i:4037;s:6:"puzzle";i:4038;s:10:"puzzlement";i:4039;s:8:"puzzling";i:4040;s:5:"quack";i:4041;s:6:"qualms";i:4042;s:8:"quandary";i:4043;s:7:"quarrel";i:4044;s:11:"quarrellous";i:4045;s:13:"quarrellously";i:4046;s:8:"quarrels";i:4047;s:5:"quash";i:4048;s:12:"questionable";i:4049;s:7:"quibble";i:4050;s:4:"quit";i:4051;s:7:"quitter";i:4052;s:6:"racism";i:4053;s:6:"racist";i:4054;s:7:"racists";i:4055;s:4:"rack";i:4056;s:7:"radical";i:4057;s:14:"radicalization";i:4058;s:9:"radically";i:4059;s:8:"radicals";i:4060;s:6:"ragged";i:4061;s:6:"raging";i:4062;s:4:"rail";i:4063;s:7:"rampage";i:4064;s:7:"rampant";i:4065;s:10:"ramshackle";i:4066;s:6:"rancor";i:4067;s:4:"rank";i:4068;s:6:"rankle";i:4069;s:4:"rant";i:4070;s:7:"ranting";i:4071;s:9:"rantingly";i:4072;s:6:"rascal";i:4073;s:4:"rash";i:4074;s:3:"rat";i:4075;s:11:"rationalize";i:4076;s:6:"rattle";i:4077;s:6:"ravage";i:4078;s:6:"raving";i:4079;s:11:"reactionary";i:4080;s:10:"rebellious";i:4081;s:6:"rebuff";i:4082;s:6:"rebuke";i:4083;s:12:"recalcitrant";i:4084;s:6:"recant";i:4085;s:9:"recession";i:4086;s:12:"recessionary";i:4087;s:8:"reckless";i:4088;s:10:"recklessly";i:4089;s:12:"recklessness";i:4090;s:6:"recoil";i:4091;s:9:"recourses";i:4092;s:10:"redundancy";i:4093;s:9:"redundant";i:4094;s:7:"refusal";i:4095;s:6:"refuse";i:4096;s:10:"refutation";i:4097;s:6:"refute";i:4098;s:7:"regress";i:4099;s:10:"regression";i:4100;s:10:"regressive";i:4101;s:9:"regretful";i:4102;s:11:"regretfully";i:4103;s:11:"regrettable";i:4104;s:11:"regrettably";i:4105;s:6:"reject";i:4106;s:9:"rejection";i:4107;s:7:"relapse";i:4108;s:10:"relentless";i:4109;s:12:"relentlessly";i:4110;s:14:"relentlessness";i:4111;s:10:"reluctance";i:4112;s:9:"reluctant";i:4113;s:11:"reluctantly";i:4114;s:7:"remorse";i:4115;s:10:"remorseful";i:4116;s:12:"remorsefully";i:4117;s:11:"remorseless";i:4118;s:13:"remorselessly";i:4119;s:15:"remorselessness";i:4120;s:8:"renounce";i:4121;s:12:"renunciation";i:4122;s:5:"repel";i:4123;s:10:"repetitive";i:4124;s:13:"reprehensible";i:4125;s:13:"reprehensibly";i:4126;s:12:"reprehension";i:4127;s:12:"reprehensive";i:4128;s:7:"repress";i:4129;s:10:"repression";i:4130;s:10:"repressive";i:4131;s:9:"reprimand";i:4132;s:8:"reproach";i:4133;s:11:"reproachful";i:4134;s:7:"reprove";i:4135;s:11:"reprovingly";i:4136;s:9:"repudiate";i:4137;s:11:"repudiation";i:4138;s:6:"repugn";i:4139;s:10:"repugnance";i:4140;s:9:"repugnant";i:4141;s:11:"repugnantly";i:4142;s:7:"repulse";i:4143;s:8:"repulsed";i:4144;s:9:"repulsing";i:4145;s:9:"repulsive";i:4146;s:11:"repulsively";i:4147;s:13:"repulsiveness";i:4148;s:6:"resent";i:4149;s:10:"resentment";i:4150;s:12:"reservations";i:4151;s:11:"resignation";i:4152;s:8:"resigned";i:4153;s:10:"resistance";i:4154;s:9:"resistant";i:4155;s:8:"restless";i:4156;s:12:"restlessness";i:4157;s:8:"restrict";i:4158;s:10:"restricted";i:4159;s:11:"restriction";i:4160;s:11:"restrictive";i:4161;s:9:"retaliate";i:4162;s:11:"retaliatory";i:4163;s:6:"retard";i:4164;s:8:"reticent";i:4165;s:6:"retire";i:4166;s:7:"retract";i:4167;s:7:"retreat";i:4168;s:7:"revenge";i:4169;s:12:"revengefully";i:4170;s:6:"revert";i:4171;s:6:"revile";i:4172;s:7:"reviled";i:4173;s:6:"revoke";i:4174;s:6:"revolt";i:4175;s:9:"revolting";i:4176;s:11:"revoltingly";i:4177;s:9:"revulsion";i:4178;s:9:"revulsive";i:4179;s:10:"rhapsodize";i:4180;s:8:"rhetoric";i:4181;s:10:"rhetorical";i:4182;s:3:"rid";i:4183;s:8:"ridicule";i:4184;s:12:"ridiculously";i:4185;s:4:"rife";i:4186;s:4:"rift";i:4187;s:5:"rifts";i:4188;s:5:"rigid";i:4189;s:5:"rigor";i:4190;s:8:"rigorous";i:4191;s:4:"rile";i:4192;s:5:"riled";i:4193;s:4:"risk";i:4194;s:5:"risky";i:4195;s:5:"rival";i:4196;s:7:"rivalry";i:4197;s:10:"roadblocks";i:4198;s:5:"rocky";i:4199;s:5:"rogue";i:4200;s:13:"rollercoaster";i:4201;s:3:"rot";i:4202;s:5:"rough";i:4203;s:4:"rude";i:4204;s:3:"rue";i:4205;s:7:"ruffian";i:4206;s:6:"ruffle";i:4207;s:4:"ruin";i:4208;s:7:"ruinous";i:4209;s:8:"rumbling";i:4210;s:5:"rumor";i:4211;s:6:"rumors";i:4212;s:7:"rumours";i:4213;s:6:"rumple";i:4214;s:8:"run-down";i:4215;s:7:"runaway";i:4216;s:7:"rupture";i:4217;s:5:"rusty";i:4218;s:8:"ruthless";i:4219;s:10:"ruthlessly";i:4220;s:12:"ruthlessness";i:4221;s:8:"sabotage";i:4222;s:9:"sacrifice";i:4223;s:6:"sadden";i:4224;s:5:"sadly";i:4225;s:7:"sadness";i:4226;s:3:"sag";i:4227;s:9:"salacious";i:4228;s:13:"sanctimonious";i:4229;s:3:"sap";i:4230;s:7:"sarcasm";i:4231;s:13:"sarcastically";i:4232;s:8:"sardonic";i:4233;s:12:"sardonically";i:4234;s:4:"sass";i:4235;s:9:"satirical";i:4236;s:8:"satirize";i:4237;s:6:"savage";i:4238;s:7:"savaged";i:4239;s:8:"savagely";i:4240;s:8:"savagery";i:4241;s:7:"savages";i:4242;s:7:"scandal";i:4243;s:10:"scandalize";i:4244;s:11:"scandalized";i:4245;s:10:"scandalous";i:4246;s:12:"scandalously";i:4247;s:8:"scandals";i:4248;s:5:"scant";i:4249;s:9:"scapegoat";i:4250;s:4:"scar";i:4251;s:6:"scarce";i:4252;s:8:"scarcely";i:4253;s:8:"scarcity";i:4254;s:5:"scare";i:4255;s:7:"scarier";i:4256;s:8:"scariest";i:4257;s:7:"scarily";i:4258;s:5:"scars";i:4259;s:5:"scary";i:4260;s:8:"scathing";i:4261;s:10:"scathingly";i:4262;s:6:"scheme";i:4263;s:8:"scheming";i:4264;s:5:"scoff";i:4265;s:10:"scoffingly";i:4266;s:5:"scold";i:4267;s:8:"scolding";i:4268;s:10:"scoldingly";i:4269;s:9:"scorching";i:4270;s:11:"scorchingly";i:4271;s:5:"scorn";i:4272;s:8:"scornful";i:4273;s:10:"scornfully";i:4274;s:9:"scoundrel";i:4275;s:7:"scourge";i:4276;s:5:"scowl";i:4277;s:6:"scream";i:4278;s:7:"screech";i:4279;s:5:"screw";i:4280;s:4:"scum";i:4281;s:6:"scummy";i:4282;s:12:"second-class";i:4283;s:11:"second-tier";i:4284;s:9:"secretive";i:4285;s:9:"sedentary";i:4286;s:5:"seedy";i:4287;s:6:"seethe";i:4288;s:8:"seething";i:4289;s:9:"self-coup";i:4290;s:14:"self-criticism";i:4291;s:14:"self-defeating";i:4292;s:16:"self-destructive";i:4293;s:16:"self-humiliation";i:4294;s:13:"self-interest";i:4295;s:15:"self-interested";i:4296;s:12:"self-serving";i:4297;s:14:"selfinterested";i:4298;s:9:"selfishly";i:4299;s:11:"selfishness";i:4300;s:6:"senile";i:4301;s:14:"sensationalize";i:4302;s:9:"senseless";i:4303;s:11:"senselessly";i:4304;s:11:"seriousness";i:4305;s:9:"sermonize";i:4306;s:9:"servitude";i:4307;s:6:"set-up";i:4308;s:5:"sever";i:4309;s:6:"severe";i:4310;s:8:"severely";i:4311;s:8:"severity";i:4312;s:6:"shabby";i:4313;s:6:"shadow";i:4314;s:7:"shadowy";i:4315;s:5:"shady";i:4316;s:5:"shake";i:4317;s:5:"shaky";i:4318;s:7:"shallow";i:4319;s:4:"sham";i:4320;s:8:"shambles";i:4321;s:5:"shame";i:4322;s:8:"shameful";i:4323;s:10:"shamefully";i:4324;s:12:"shamefulness";i:4325;s:9:"shameless";i:4326;s:11:"shamelessly";i:4327;s:13:"shamelessness";i:4328;s:5:"shark";i:4329;s:7:"sharply";i:4330;s:7:"shatter";i:4331;s:5:"sheer";i:4332;s:5:"shirk";i:4333;s:7:"shirker";i:4334;s:9:"shipwreck";i:4335;s:6:"shiver";i:4336;s:5:"shock";i:4337;s:8:"shocking";i:4338;s:10:"shockingly";i:4339;s:6:"shoddy";i:4340;s:11:"short-lived";i:4341;s:8:"shortage";i:4342;s:11:"shortchange";i:4343;s:11:"shortcoming";i:4344;s:12:"shortcomings";i:4345;s:12:"shortsighted";i:4346;s:16:"shortsightedness";i:4347;s:8:"showdown";i:4348;s:5:"shred";i:4349;s:5:"shrew";i:4350;s:6:"shriek";i:4351;s:6:"shrill";i:4352;s:7:"shrilly";i:4353;s:7:"shrivel";i:4354;s:6:"shroud";i:4355;s:8:"shrouded";i:4356;s:5:"shrug";i:4357;s:4:"shun";i:4358;s:7:"shunned";i:4359;s:5:"shyly";i:4360;s:7:"shyness";i:4361;s:4:"sick";i:4362;s:6:"sicken";i:4363;s:6:"sickly";i:4364;s:9:"sickening";i:4365;s:11:"sickeningly";i:4366;s:8:"sickness";i:4367;s:9:"sidetrack";i:4368;s:11:"sidetracked";i:4369;s:5:"siege";i:4370;s:7:"sillily";i:4371;s:5:"silly";i:4372;s:6:"simmer";i:4373;s:10:"simplistic";i:4374;s:14:"simplistically";i:4375;s:3:"sin";i:4376;s:6:"sinful";i:4377;s:8:"sinfully";i:4378;s:8:"sinister";i:4379;s:10:"sinisterly";i:4380;s:7:"sinking";i:4381;s:9:"skeletons";i:4382;s:9:"skeptical";i:4383;s:11:"skeptically";i:4384;s:10:"skepticism";i:4385;s:7:"sketchy";i:4386;s:6:"skimpy";i:4387;s:8:"skittish";i:4388;s:10:"skittishly";i:4389;s:5:"skulk";i:4390;s:5:"slack";i:4391;s:7:"slander";i:4392;s:9:"slanderer";i:4393;s:10:"slanderous";i:4394;s:12:"slanderously";i:4395;s:8:"slanders";i:4396;s:4:"slap";i:4397;s:8:"slashing";i:4398;s:9:"slaughter";i:4399;s:11:"slaughtered";i:4400;s:6:"slaves";i:4401;s:6:"sleazy";i:4402;s:6:"slight";i:4403;s:8:"slightly";i:4404;s:5:"slime";i:4405;s:6:"sloppy";i:4406;s:8:"sloppily";i:4407;s:5:"sloth";i:4408;s:8:"slothful";i:4409;s:6:"slowly";i:4410;s:11:"slow-moving";i:4411;s:4:"slug";i:4412;s:8:"sluggish";i:4413;s:5:"slump";i:4414;s:4:"slur";i:4415;s:3:"sly";i:4416;s:5:"smack";i:4417;s:5:"smash";i:4418;s:5:"smear";i:4419;s:8:"smelling";i:4420;s:11:"smokescreen";i:4421;s:7:"smolder";i:4422;s:10:"smoldering";i:4423;s:7:"smother";i:4424;s:8:"smoulder";i:4425;s:11:"smouldering";i:4426;s:4:"smug";i:4427;s:6:"smugly";i:4428;s:4:"smut";i:4429;s:8:"smuttier";i:4430;s:9:"smuttiest";i:4431;s:6:"smutty";i:4432;s:5:"snare";i:4433;s:5:"snarl";i:4434;s:6:"snatch";i:4435;s:5:"sneak";i:4436;s:8:"sneakily";i:4437;s:6:"sneaky";i:4438;s:5:"sneer";i:4439;s:8:"sneering";i:4440;s:10:"sneeringly";i:4441;s:4:"snub";i:4442;s:6:"so-cal";i:4443;s:9:"so-called";i:4444;s:3:"sob";i:4445;s:5:"sober";i:4446;s:8:"sobering";i:4447;s:6:"solemn";i:4448;s:6:"somber";i:4449;s:4:"sore";i:4450;s:6:"sorely";i:4451;s:8:"soreness";i:4452;s:6:"sorrow";i:4453;s:9:"sorrowful";i:4454;s:11:"sorrowfully";i:4455;s:8:"sounding";i:4456;s:4:"sour";i:4457;s:6:"sourly";i:4458;s:5:"spade";i:4459;s:5:"spank";i:4460;s:8:"spilling";i:4461;s:8:"spinster";i:4462;s:10:"spiritless";i:4463;s:5:"spite";i:4464;s:10:"spitefully";i:4465;s:12:"spitefulness";i:4466;s:5:"split";i:4467;s:9:"splitting";i:4468;s:5:"spoil";i:4469;s:5:"spook";i:4470;s:8:"spookier";i:4471;s:9:"spookiest";i:4472;s:8:"spookily";i:4473;s:6:"spooky";i:4474;s:9:"spoon-fed";i:4475;s:10:"spoon-feed";i:4476;s:8:"spoonfed";i:4477;s:8:"sporadic";i:4478;s:4:"spot";i:4479;s:6:"spotty";i:4480;s:8:"spurious";i:4481;s:5:"spurn";i:4482;s:7:"sputter";i:4483;s:8:"squabble";i:4484;s:10:"squabbling";i:4485;s:8:"squander";i:4486;s:6:"squash";i:4487;s:6:"squirm";i:4488;s:4:"stab";i:4489;s:7:"stagger";i:4490;s:10:"staggering";i:4491;s:12:"staggeringly";i:4492;s:8:"stagnant";i:4493;s:8:"stagnate";i:4494;s:10:"stagnation";i:4495;s:5:"staid";i:4496;s:5:"stain";i:4497;s:5:"stake";i:4498;s:5:"stale";i:4499;s:9:"stalemate";i:4500;s:7:"stammer";i:4501;s:8:"stampede";i:4502;s:10:"standstill";i:4503;s:5:"stark";i:4504;s:7:"starkly";i:4505;s:7:"startle";i:4506;s:9:"startling";i:4507;s:11:"startlingly";i:4508;s:10:"starvation";i:4509;s:6:"starve";i:4510;s:6:"static";i:4511;s:5:"steal";i:4512;s:8:"stealing";i:4513;s:5:"steep";i:4514;s:7:"steeply";i:4515;s:6:"stench";i:4516;s:10:"stereotype";i:4517;s:13:"stereotypical";i:4518;s:15:"stereotypically";i:4519;s:5:"stern";i:4520;s:4:"stew";i:4521;s:6:"sticky";i:4522;s:5:"stiff";i:4523;s:6:"stifle";i:4524;s:8:"stifling";i:4525;s:10:"stiflingly";i:4526;s:6:"stigma";i:4527;s:10:"stigmatize";i:4528;s:5:"sting";i:4529;s:8:"stinging";i:4530;s:10:"stingingly";i:4531;s:5:"stink";i:4532;s:8:"stinking";i:4533;s:6:"stodgy";i:4534;s:5:"stole";i:4535;s:6:"stolen";i:4536;s:6:"stooge";i:4537;s:7:"stooges";i:4538;s:5:"storm";i:4539;s:6:"stormy";i:4540;s:8:"straggle";i:4541;s:9:"straggler";i:4542;s:6:"strain";i:4543;s:8:"strained";i:4544;s:9:"strangely";i:4545;s:8:"stranger";i:4546;s:9:"strangest";i:4547;s:8:"strangle";i:4548;s:9:"strenuous";i:4549;s:6:"stress";i:4550;s:9:"stressful";i:4551;s:11:"stressfully";i:4552;s:8:"stricken";i:4553;s:6:"strict";i:4554;s:8:"strictly";i:4555;s:8:"strident";i:4556;s:10:"stridently";i:4557;s:6:"strife";i:4558;s:6:"strike";i:4559;s:9:"stringent";i:4560;s:11:"stringently";i:4561;s:6:"struck";i:4562;s:8:"struggle";i:4563;s:5:"strut";i:4564;s:8:"stubborn";i:4565;s:10:"stubbornly";i:4566;s:12:"stubbornness";i:4567;s:6:"stuffy";i:4568;s:7:"stumble";i:4569;s:5:"stump";i:4570;s:4:"stun";i:4571;s:5:"stunt";i:4572;s:7:"stunted";i:4573;s:9:"stupidity";i:4574;s:8:"stupidly";i:4575;s:9:"stupified";i:4576;s:7:"stupify";i:4577;s:6:"stupor";i:4578;s:3:"sty";i:4579;s:7:"subdued";i:4580;s:9:"subjected";i:4581;s:10:"subjection";i:4582;s:9:"subjugate";i:4583;s:11:"subjugation";i:4584;s:11:"subordinate";i:4585;s:12:"subservience";i:4586;s:11:"subservient";i:4587;s:7:"subside";i:4588;s:11:"substandard";i:4589;s:8:"subtract";i:4590;s:10:"subversion";i:4591;s:10:"subversive";i:4592;s:12:"subversively";i:4593;s:7:"subvert";i:4594;s:7:"succumb";i:4595;s:6:"sucker";i:4596;s:6:"suffer";i:4597;s:8:"sufferer";i:4598;s:9:"sufferers";i:4599;s:9:"suffocate";i:4600;s:10:"sugar-coat";i:4601;s:12:"sugar-coated";i:4602;s:11:"sugarcoated";i:4603;s:7:"suicide";i:4604;s:4:"sulk";i:4605;s:6:"sullen";i:4606;s:5:"sully";i:4607;s:6:"sunder";i:4608;s:14:"superficiality";i:4609;s:13:"superficially";i:4610;s:11:"superfluous";i:4611;s:11:"superiority";i:4612;s:12:"superstition";i:4613;s:13:"superstitious";i:4614;s:8:"supposed";i:4615;s:8:"suppress";i:4616;s:11:"suppression";i:4617;s:9:"supremacy";i:4618;s:9:"surrender";i:4619;s:11:"susceptible";i:4620;s:7:"suspect";i:4621;s:9:"suspicion";i:4622;s:10:"suspicions";i:4623;s:12:"suspiciously";i:4624;s:7:"swagger";i:4625;s:7:"swamped";i:4626;s:5:"swear";i:4627;s:7:"swindle";i:4628;s:5:"swipe";i:4629;s:5:"swoon";i:4630;s:5:"swore";i:4631;s:15:"sympathetically";i:4632;s:10:"sympathies";i:4633;s:10:"sympathize";i:4634;s:8:"sympathy";i:4635;s:7:"symptom";i:4636;s:8:"syndrome";i:4637;s:5:"taboo";i:4638;s:5:"taint";i:4639;s:7:"tainted";i:4640;s:6:"tamper";i:4641;s:7:"tangled";i:4642;s:7:"tantrum";i:4643;s:5:"tardy";i:4644;s:7:"tarnish";i:4645;s:8:"tattered";i:4646;s:5:"taunt";i:4647;s:8:"taunting";i:4648;s:10:"tauntingly";i:4649;s:6:"taunts";i:4650;s:6:"tawdry";i:4651;s:5:"tease";i:4652;s:9:"teasingly";i:4653;s:6:"taxing";i:4654;s:7:"tedious";i:4655;s:9:"tediously";i:4656;s:8:"temerity";i:4657;s:6:"temper";i:4658;s:7:"tempest";i:4659;s:10:"temptation";i:4660;s:5:"tense";i:4661;s:7:"tension";i:4662;s:9:"tentative";i:4663;s:11:"tentatively";i:4664;s:7:"tenuous";i:4665;s:9:"tenuously";i:4666;s:5:"tepid";i:4667;s:8:"terrible";i:4668;s:12:"terribleness";i:4669;s:8:"terribly";i:4670;s:6:"terror";i:4671;s:12:"terror-genic";i:4672;s:9:"terrorism";i:4673;s:9:"terrorize";i:4674;s:9:"thankless";i:4675;s:6:"thirst";i:4676;s:6:"thorny";i:4677;s:11:"thoughtless";i:4678;s:13:"thoughtlessly";i:4679;s:15:"thoughtlessness";i:4680;s:6:"thrash";i:4681;s:6:"threat";i:4682;s:8:"threaten";i:4683;s:11:"threatening";i:4684;s:7:"threats";i:4685;s:8:"throttle";i:4686;s:5:"throw";i:4687;s:5:"thumb";i:4688;s:6:"thumbs";i:4689;s:6:"thwart";i:4690;s:5:"timid";i:4691;s:8:"timidity";i:4692;s:7:"timidly";i:4693;s:9:"timidness";i:4694;s:4:"tiny";i:4695;s:4:"tire";i:4696;s:5:"tired";i:4697;s:8:"tiresome";i:4698;s:6:"tiring";i:4699;s:8:"tiringly";i:4700;s:4:"toil";i:4701;s:4:"toll";i:4702;s:6:"topple";i:4703;s:7:"torment";i:4704;s:9:"tormented";i:4705;s:7:"torrent";i:4706;s:7:"torture";i:4707;s:8:"tortured";i:4708;s:8:"tortuous";i:4709;s:9:"torturous";i:4710;s:11:"torturously";i:4711;s:12:"totalitarian";i:4712;s:6:"touchy";i:4713;s:9:"toughness";i:4714;s:5:"toxic";i:4715;s:7:"traduce";i:4716;s:7:"tragedy";i:4717;s:6:"tragic";i:4718;s:10:"tragically";i:4719;s:7:"traitor";i:4720;s:10:"traitorous";i:4721;s:12:"traitorously";i:4722;s:5:"tramp";i:4723;s:7:"trample";i:4724;s:10:"transgress";i:4725;s:13:"transgression";i:4726;s:6:"trauma";i:4727;s:9:"traumatic";i:4728;s:13:"traumatically";i:4729;s:10:"traumatize";i:4730;s:11:"traumatized";i:4731;s:10:"travesties";i:4732;s:8:"travesty";i:4733;s:11:"treacherous";i:4734;s:13:"treacherously";i:4735;s:9:"treachery";i:4736;s:7:"treason";i:4737;s:10:"treasonous";i:4738;s:5:"trial";i:4739;s:5:"trick";i:4740;s:6:"tricky";i:4741;s:8:"trickery";i:4742;s:7:"trivial";i:4743;s:10:"trivialize";i:4744;s:9:"trivially";i:4745;s:7:"trouble";i:4746;s:12:"troublemaker";i:4747;s:11:"troublesome";i:4748;s:13:"troublesomely";i:4749;s:9:"troubling";i:4750;s:11:"troublingly";i:4751;s:6:"truant";i:4752;s:10:"tumultuous";i:4753;s:9:"turbulent";i:4754;s:7:"turmoil";i:4755;s:5:"twist";i:4756;s:7:"twisted";i:4757;s:6:"twists";i:4758;s:10:"tyrannical";i:4759;s:12:"tyrannically";i:4760;s:7:"tyranny";i:4761;s:6:"tyrant";i:4762;s:3:"ugh";i:4763;s:8:"ugliness";i:4764;s:4:"ugly";i:4765;s:8:"ulterior";i:4766;s:9:"ultimatum";i:4767;s:10:"ultimatums";i:4768;s:14:"ultra-hardline";i:4769;s:6:"unable";i:4770;s:12:"unacceptable";i:4771;s:14:"unacceptablely";i:4772;s:12:"unaccustomed";i:4773;s:12:"unattractive";i:4774;s:11:"unauthentic";i:4775;s:11:"unavailable";i:4776;s:11:"unavoidable";i:4777;s:11:"unavoidably";i:4778;s:10:"unbearable";i:4779;s:12:"unbearablely";i:4780;s:12:"unbelievable";i:4781;s:12:"unbelievably";i:4782;s:9:"uncertain";i:4783;s:7:"uncivil";i:4784;s:11:"uncivilized";i:4785;s:7:"unclean";i:4786;s:7:"unclear";i:4787;s:13:"uncollectible";i:4788;s:13:"uncomfortable";i:4789;s:13:"uncompetitive";i:4790;s:14:"uncompromising";i:4791;s:16:"uncompromisingly";i:4792;s:11:"unconfirmed";i:4793;s:16:"unconstitutional";i:4794;s:12:"uncontrolled";i:4795;s:12:"unconvincing";i:4796;s:14:"unconvincingly";i:4797;s:7:"uncouth";i:4798;s:9:"undecided";i:4799;s:9:"undefined";i:4800;s:15:"undependability";i:4801;s:12:"undependable";i:4802;s:8:"underdog";i:4803;s:13:"underestimate";i:4804;s:10:"underlings";i:4805;s:9:"undermine";i:4806;s:9:"underpaid";i:4807;s:11:"undesirable";i:4808;s:12:"undetermined";i:4809;s:5:"undid";i:4810;s:11:"undignified";i:4811;s:4:"undo";i:4812;s:12:"undocumented";i:4813;s:6:"undone";i:4814;s:5:"undue";i:4815;s:6:"unease";i:4816;s:8:"uneasily";i:4817;s:10:"uneasiness";i:4818;s:6:"uneasy";i:4819;s:12:"uneconomical";i:4820;s:7:"unequal";i:4821;s:9:"unethical";i:4822;s:6:"uneven";i:4823;s:10:"uneventful";i:4824;s:10:"unexpected";i:4825;s:12:"unexpectedly";i:4826;s:11:"unexplained";i:4827;s:6:"unfair";i:4828;s:8:"unfairly";i:4829;s:10:"unfaithful";i:4830;s:12:"unfaithfully";i:4831;s:10:"unfamiliar";i:4832;s:11:"unfavorable";i:4833;s:9:"unfeeling";i:4834;s:10:"unfinished";i:4835;s:5:"unfit";i:4836;s:10:"unforeseen";i:4837;s:11:"unfortunate";i:4838;s:9:"unfounded";i:4839;s:10:"unfriendly";i:4840;s:11:"unfulfilled";i:4841;s:8:"unfunded";i:4842;s:10:"ungrateful";i:4843;s:12:"ungovernable";i:4844;s:9:"unhappily";i:4845;s:11:"unhappiness";i:4846;s:7:"unhappy";i:4847;s:9:"unhealthy";i:4848;s:13:"unilateralism";i:4849;s:12:"unimaginable";i:4850;s:12:"unimaginably";i:4851;s:11:"unimportant";i:4852;s:10:"uninformed";i:4853;s:9:"uninsured";i:4854;s:8:"unipolar";i:4855;s:6:"unjust";i:4856;s:13:"unjustifiable";i:4857;s:13:"unjustifiably";i:4858;s:11:"unjustified";i:4859;s:8:"unjustly";i:4860;s:6:"unkind";i:4861;s:8:"unkindly";i:4862;s:12:"unlamentable";i:4863;s:12:"unlamentably";i:4864;s:8:"unlawful";i:4865;s:10:"unlawfully";i:4866;s:12:"unlawfulness";i:4867;s:7:"unleash";i:4868;s:10:"unlicensed";i:4869;s:7:"unlucky";i:4870;s:7:"unmoved";i:4871;s:9:"unnatural";i:4872;s:11:"unnaturally";i:4873;s:11:"unnecessary";i:4874;s:8:"unneeded";i:4875;s:7:"unnerve";i:4876;s:8:"unnerved";i:4877;s:9:"unnerving";i:4878;s:11:"unnervingly";i:4879;s:9:"unnoticed";i:4880;s:10:"unobserved";i:4881;s:10:"unorthodox";i:4882;s:11:"unorthodoxy";i:4883;s:10:"unpleasant";i:4884;s:14:"unpleasantries";i:4885;s:9:"unpopular";i:4886;s:11:"unprecedent";i:4887;s:13:"unprecedented";i:4888;s:13:"unpredictable";i:4889;s:10:"unprepared";i:4890;s:12:"unproductive";i:4891;s:12:"unprofitable";i:4892;s:11:"unqualified";i:4893;s:7:"unravel";i:4894;s:9:"unraveled";i:4895;s:11:"unrealistic";i:4896;s:12:"unreasonable";i:4897;s:12:"unreasonably";i:4898;s:11:"unrelenting";i:4899;s:13:"unrelentingly";i:4900;s:13:"unreliability";i:4901;s:10:"unreliable";i:4902;s:10:"unresolved";i:4903;s:6:"unrest";i:4904;s:6:"unruly";i:4905;s:6:"unsafe";i:4906;s:14:"unsatisfactory";i:4907;s:8:"unsavory";i:4908;s:12:"unscrupulous";i:4909;s:14:"unscrupulously";i:4910;s:8:"unseemly";i:4911;s:8:"unsettle";i:4912;s:9:"unsettled";i:4913;s:10:"unsettling";i:4914;s:12:"unsettlingly";i:4915;s:9:"unskilled";i:4916;s:15:"unsophisticated";i:4917;s:7:"unsound";i:4918;s:11:"unspeakable";i:4919;s:13:"unspeakablely";i:4920;s:11:"unspecified";i:4921;s:8:"unstable";i:4922;s:10:"unsteadily";i:4923;s:12:"unsteadiness";i:4924;s:8:"unsteady";i:4925;s:12:"unsuccessful";i:4926;s:14:"unsuccessfully";i:4927;s:11:"unsupported";i:4928;s:6:"unsure";i:4929;s:12:"unsuspecting";i:4930;s:13:"unsustainable";i:4931;s:9:"untenable";i:4932;s:8:"untested";i:4933;s:11:"unthinkable";i:4934;s:11:"unthinkably";i:4935;s:8:"untimely";i:4936;s:6:"untrue";i:4937;s:13:"untrustworthy";i:4938;s:10:"untruthful";i:4939;s:7:"unusual";i:4940;s:9:"unusually";i:4941;s:8:"unwanted";i:4942;s:11:"unwarranted";i:4943;s:9:"unwelcome";i:4944;s:8:"unwieldy";i:4945;s:9:"unwilling";i:4946;s:11:"unwillingly";i:4947;s:13:"unwillingness";i:4948;s:6:"unwise";i:4949;s:8:"unwisely";i:4950;s:10:"unworkable";i:4951;s:8:"unworthy";i:4952;s:10:"unyielding";i:4953;s:7:"upbraid";i:4954;s:8:"upheaval";i:4955;s:8:"uprising";i:4956;s:6:"uproar";i:4957;s:10:"uproarious";i:4958;s:12:"uproariously";i:4959;s:9:"uproarous";i:4960;s:11:"uproarously";i:4961;s:6:"uproot";i:4962;s:5:"upset";i:4963;s:9:"upsetting";i:4964;s:11:"upsettingly";i:4965;s:7:"urgency";i:4966;s:6:"urgent";i:4967;s:8:"urgently";i:4968;s:7:"useless";i:4969;s:5:"usurp";i:4970;s:7:"usurper";i:4971;s:5:"utter";i:4972;s:7:"utterly";i:4973;s:7:"vagrant";i:4974;s:5:"vague";i:4975;s:9:"vagueness";i:4976;s:4:"vain";i:4977;s:6:"vainly";i:4978;s:6:"vanish";i:4979;s:6:"vanity";i:4980;s:8:"vehement";i:4981;s:10:"vehemently";i:4982;s:9:"vengeance";i:4983;s:8:"vengeful";i:4984;s:10:"vengefully";i:4985;s:12:"vengefulness";i:4986;s:5:"venom";i:4987;s:8:"venomous";i:4988;s:10:"venomously";i:4989;s:4:"vent";i:4990;s:8:"vestiges";i:4991;s:4:"veto";i:4992;s:3:"vex";i:4993;s:8:"vexation";i:4994;s:6:"vexing";i:4995;s:8:"vexingly";i:4996;s:4:"vice";i:4997;s:7:"vicious";i:4998;s:9:"viciously";i:4999;s:11:"viciousness";i:5000;s:9:"victimize";i:5001;s:3:"vie";i:5002;s:4:"vile";i:5003;s:8:"vileness";i:5004;s:6:"vilify";i:5005;s:10:"villainous";i:5006;s:12:"villainously";i:5007;s:8:"villains";i:5008;s:7:"villian";i:5009;s:10:"villianous";i:5010;s:12:"villianously";i:5011;s:7:"villify";i:5012;s:10:"vindictive";i:5013;s:12:"vindictively";i:5014;s:14:"vindictiveness";i:5015;s:7:"violate";i:5016;s:9:"violation";i:5017;s:8:"violator";i:5018;s:7:"violent";i:5019;s:9:"violently";i:5020;s:5:"viper";i:5021;s:9:"virulence";i:5022;s:8:"virulent";i:5023;s:10:"virulently";i:5024;s:5:"virus";i:5025;s:7:"vocally";i:5026;s:10:"vociferous";i:5027;s:12:"vociferously";i:5028;s:4:"void";i:5029;s:8:"volatile";i:5030;s:10:"volatility";i:5031;s:5:"vomit";i:5032;s:6:"vulgar";i:5033;s:4:"wail";i:5034;s:6:"wallow";i:5035;s:4:"wane";i:5036;s:6:"waning";i:5037;s:6:"wanton";i:5038;s:3:"war";i:5039;s:8:"war-like";i:5040;s:7:"warfare";i:5041;s:7:"warlike";i:5042;s:7:"warning";i:5043;s:4:"warp";i:5044;s:6:"warped";i:5045;s:4:"wary";i:5046;s:6:"warily";i:5047;s:8:"wariness";i:5048;s:5:"waste";i:5049;s:8:"wasteful";i:5050;s:12:"wastefulness";i:5051;s:8:"watchdog";i:5052;s:7:"wayward";i:5053;s:4:"weak";i:5054;s:6:"weaken";i:5055;s:9:"weakening";i:5056;s:8:"weakness";i:5057;s:10:"weaknesses";i:5058;s:9:"weariness";i:5059;s:9:"wearisome";i:5060;s:5:"weary";i:5061;s:5:"wedge";i:5062;s:3:"wee";i:5063;s:4:"weed";i:5064;s:4:"weep";i:5065;s:5:"weird";i:5066;s:7:"weirdly";i:5067;s:7:"wheedle";i:5068;s:7:"whimper";i:5069;s:5:"whine";i:5070;s:5:"whips";i:5071;s:6:"wicked";i:5072;s:8:"wickedly";i:5073;s:10:"wickedness";i:5074;s:10:"widespread";i:5075;s:4:"wild";i:5076;s:6:"wildly";i:5077;s:5:"wiles";i:5078;s:4:"wilt";i:5079;s:4:"wily";i:5080;s:5:"wince";i:5081;s:8:"withheld";i:5082;s:8:"withhold";i:5083;s:3:"woe";i:5084;s:9:"woebegone";i:5085;s:6:"woeful";i:5086;s:8:"woefully";i:5087;s:4:"worn";i:5088;s:7:"worried";i:5089;s:9:"worriedly";i:5090;s:7:"worrier";i:5091;s:7:"worries";i:5092;s:9:"worrisome";i:5093;s:5:"worry";i:5094;s:8:"worrying";i:5095;s:10:"worryingly";i:5096;s:5:"worse";i:5097;s:6:"worsen";i:5098;s:9:"worsening";i:5099;s:5:"worst";i:5100;s:9:"worthless";i:5101;s:11:"worthlessly";i:5102;s:13:"worthlessness";i:5103;s:5:"wound";i:5104;s:6:"wounds";i:5105;s:5:"wreck";i:5106;s:7:"wrangle";i:5107;s:5:"wrath";i:5108;s:5:"wrest";i:5109;s:7:"wrestle";i:5110;s:6:"wretch";i:5111;s:8:"wretched";i:5112;s:10:"wretchedly";i:5113;s:12:"wretchedness";i:5114;s:6:"writhe";i:5115;s:5:"wrong";i:5116;s:8:"wrongful";i:5117;s:7:"wrongly";i:5118;s:7:"wrought";i:5119;s:4:"yawn";i:5120;s:4:"yelp";i:5121;s:6:"zealot";i:5122;s:7:"zealous";i:5123;s:9:"zealously";i:5124;s:11:"notabidance";i:5125;s:15:"notveryabidance";i:5126;s:8:"notabide";i:5127;s:12:"notveryabide";i:5128;s:12:"notabilities";i:5129;s:16:"notveryabilities";i:5130;s:10:"notability";i:5131;s:14:"notveryability";i:5132;s:16:"notabove-average";i:5133;s:20:"notveryabove-average";i:5134;s:9:"notabound";i:5135;s:13:"notveryabound";i:5136;s:10:"notabsolve";i:5137;s:14:"notveryabsolve";i:5138;s:11:"notabundant";i:5139;s:15:"notveryabundant";i:5140;s:12:"notabundance";i:5141;s:16:"notveryabundance";i:5142;s:9:"notaccede";i:5143;s:13:"notveryaccede";i:5144;s:9:"notaccept";i:5145;s:13:"notveryaccept";i:5146;s:13:"notacceptance";i:5147;s:17:"notveryacceptance";i:5148;s:13:"notacceptable";i:5149;s:17:"notveryacceptable";i:5150;s:10:"notacclaim";i:5151;s:14:"notveryacclaim";i:5152;s:12:"notacclaimed";i:5153;s:16:"notveryacclaimed";i:5154;s:14:"notacclamation";i:5155;s:18:"notveryacclamation";i:5156;s:11:"notaccolade";i:5157;s:15:"notveryaccolade";i:5158;s:12:"notaccolades";i:5159;s:16:"notveryaccolades";i:5160;s:16:"notaccommodative";i:5161;s:20:"notveryaccommodative";i:5162;s:13:"notaccomplish";i:5163;s:17:"notveryaccomplish";i:5164;s:17:"notaccomplishment";i:5165;s:21:"notveryaccomplishment";i:5166;s:18:"notaccomplishments";i:5167;s:22:"notveryaccomplishments";i:5168;s:9:"notaccord";i:5169;s:13:"notveryaccord";i:5170;s:13:"notaccordance";i:5171;s:17:"notveryaccordance";i:5172;s:14:"notaccordantly";i:5173;s:18:"notveryaccordantly";i:5174;s:11:"notaccurate";i:5175;s:15:"notveryaccurate";i:5176;s:13:"notaccurately";i:5177;s:17:"notveryaccurately";i:5178;s:13:"notachievable";i:5179;s:17:"notveryachievable";i:5180;s:10:"notachieve";i:5181;s:14:"notveryachieve";i:5182;s:14:"notachievement";i:5183;s:18:"notveryachievement";i:5184;s:15:"notachievements";i:5185;s:19:"notveryachievements";i:5186;s:14:"notacknowledge";i:5187;s:18:"notveryacknowledge";i:5188;s:18:"notacknowledgement";i:5189;s:22:"notveryacknowledgement";i:5190;s:9:"notacquit";i:5191;s:13:"notveryacquit";i:5192;s:9:"notacumen";i:5193;s:13:"notveryacumen";i:5194;s:15:"notadaptability";i:5195;s:19:"notveryadaptability";i:5196;s:11:"notadaptive";i:5197;s:15:"notveryadaptive";i:5198;s:8:"notadept";i:5199;s:12:"notveryadept";i:5200;s:10:"notadeptly";i:5201;s:14:"notveryadeptly";i:5202;s:11:"notadequate";i:5203;s:15:"notveryadequate";i:5204;s:12:"notadherence";i:5205;s:16:"notveryadherence";i:5206;s:11:"notadherent";i:5207;s:15:"notveryadherent";i:5208;s:11:"notadhesion";i:5209;s:15:"notveryadhesion";i:5210;s:10:"notadmirer";i:5211;s:14:"notveryadmirer";i:5212;s:12:"notadmirably";i:5213;s:16:"notveryadmirably";i:5214;s:13:"notadmiration";i:5215;s:17:"notveryadmiration";i:5216;s:11:"notadmiring";i:5217;s:15:"notveryadmiring";i:5218;s:13:"notadmiringly";i:5219;s:17:"notveryadmiringly";i:5220;s:12:"notadmission";i:5221;s:16:"notveryadmission";i:5222;s:8:"notadmit";i:5223;s:12:"notveryadmit";i:5224;s:13:"notadmittedly";i:5225;s:17:"notveryadmittedly";i:5226;s:9:"notadored";i:5227;s:13:"notveryadored";i:5228;s:9:"notadorer";i:5229;s:13:"notveryadorer";i:5230;s:10:"notadoring";i:5231;s:14:"notveryadoring";i:5232;s:12:"notadoringly";i:5233;s:16:"notveryadoringly";i:5234;s:11:"notadroitly";i:5235;s:15:"notveryadroitly";i:5236;s:10:"notadulate";i:5237;s:14:"notveryadulate";i:5238;s:12:"notadulation";i:5239;s:16:"notveryadulation";i:5240;s:12:"notadulatory";i:5241;s:16:"notveryadulatory";i:5242;s:11:"notadvanced";i:5243;s:15:"notveryadvanced";i:5244;s:12:"notadvantage";i:5245;s:16:"notveryadvantage";i:5246;s:15:"notadvantageous";i:5247;s:19:"notveryadvantageous";i:5248;s:13:"notadvantages";i:5249;s:17:"notveryadvantages";i:5250;s:12:"notadventure";i:5251;s:16:"notveryadventure";i:5252;s:16:"notadventuresome";i:5253;s:20:"notveryadventuresome";i:5254;s:14:"notadventurism";i:5255;s:18:"notveryadventurism";i:5256;s:14:"notadventurous";i:5257;s:18:"notveryadventurous";i:5258;s:9:"notadvice";i:5259;s:13:"notveryadvice";i:5260;s:12:"notadvisable";i:5261;s:16:"notveryadvisable";i:5262;s:11:"notadvocate";i:5263;s:15:"notveryadvocate";i:5264;s:11:"notadvocacy";i:5265;s:15:"notveryadvocacy";i:5266;s:13:"notaffability";i:5267;s:17:"notveryaffability";i:5268;s:10:"notaffably";i:5269;s:14:"notveryaffably";i:5270;s:12:"notaffection";i:5271;s:16:"notveryaffection";i:5272;s:11:"notaffinity";i:5273;s:15:"notveryaffinity";i:5274;s:9:"notaffirm";i:5275;s:13:"notveryaffirm";i:5276;s:14:"notaffirmation";i:5277;s:18:"notveryaffirmation";i:5278;s:11:"notaffluent";i:5279;s:15:"notveryaffluent";i:5280;s:12:"notaffluence";i:5281;s:16:"notveryaffluence";i:5282;s:9:"notafford";i:5283;s:13:"notveryafford";i:5284;s:13:"notaffordable";i:5285;s:17:"notveryaffordable";i:5286;s:9:"notafloat";i:5287;s:13:"notveryafloat";i:5288;s:10:"notagilely";i:5289;s:14:"notveryagilely";i:5290;s:10:"notagility";i:5291;s:14:"notveryagility";i:5292;s:8:"notagree";i:5293;s:12:"notveryagree";i:5294;s:15:"notagreeability";i:5295;s:19:"notveryagreeability";i:5296;s:16:"notagreeableness";i:5297;s:20:"notveryagreeableness";i:5298;s:12:"notagreeably";i:5299;s:16:"notveryagreeably";i:5300;s:12:"notagreement";i:5301;s:16:"notveryagreement";i:5302;s:8:"notallay";i:5303;s:12:"notveryallay";i:5304;s:12:"notalleviate";i:5305;s:16:"notveryalleviate";i:5306;s:12:"notallowable";i:5307;s:16:"notveryallowable";i:5308;s:9:"notallure";i:5309;s:13:"notveryallure";i:5310;s:13:"notalluringly";i:5311;s:17:"notveryalluringly";i:5312;s:7:"notally";i:5313;s:11:"notveryally";i:5314;s:11:"notalmighty";i:5315;s:15:"notveryalmighty";i:5316;s:11:"notaltruist";i:5317;s:15:"notveryaltruist";i:5318;s:17:"notaltruistically";i:5319;s:21:"notveryaltruistically";i:5320;s:8:"notamaze";i:5321;s:12:"notveryamaze";i:5322;s:9:"notamazed";i:5323;s:13:"notveryamazed";i:5324;s:12:"notamazement";i:5325;s:16:"notveryamazement";i:5326;s:12:"notamazingly";i:5327;s:16:"notveryamazingly";i:5328;s:14:"notambitiously";i:5329;s:18:"notveryambitiously";i:5330;s:13:"notameliorate";i:5331;s:17:"notveryameliorate";i:5332;s:11:"notamenable";i:5333;s:15:"notveryamenable";i:5334;s:10:"notamenity";i:5335;s:14:"notveryamenity";i:5336;s:13:"notamiability";i:5337;s:17:"notveryamiability";i:5338;s:11:"notamiabily";i:5339;s:15:"notveryamiabily";i:5340;s:14:"notamicability";i:5341;s:18:"notveryamicability";i:5342;s:11:"notamicably";i:5343;s:15:"notveryamicably";i:5344;s:8:"notamity";i:5345;s:12:"notveryamity";i:5346;s:10:"notamnesty";i:5347;s:14:"notveryamnesty";i:5348;s:8:"notamour";i:5349;s:12:"notveryamour";i:5350;s:8:"notample";i:5351;s:12:"notveryample";i:5352;s:8:"notamply";i:5353;s:12:"notveryamply";i:5354;s:8:"notamuse";i:5355;s:12:"notveryamuse";i:5356;s:12:"notamusement";i:5357;s:16:"notveryamusement";i:5358;s:10:"notamusing";i:5359;s:14:"notveryamusing";i:5360;s:12:"notamusingly";i:5361;s:16:"notveryamusingly";i:5362;s:8:"notangel";i:5363;s:12:"notveryangel";i:5364;s:10:"notangelic";i:5365;s:14:"notveryangelic";i:5366;s:11:"notanimated";i:5367;s:15:"notveryanimated";i:5368;s:10:"notapostle";i:5369;s:14:"notveryapostle";i:5370;s:13:"notapotheosis";i:5371;s:17:"notveryapotheosis";i:5372;s:9:"notappeal";i:5373;s:13:"notveryappeal";i:5374;s:12:"notappealing";i:5375;s:16:"notveryappealing";i:5376;s:10:"notappease";i:5377;s:14:"notveryappease";i:5378;s:10:"notapplaud";i:5379;s:14:"notveryapplaud";i:5380;s:14:"notappreciable";i:5381;s:18:"notveryappreciable";i:5382;s:15:"notappreciation";i:5383;s:19:"notveryappreciation";i:5384;s:17:"notappreciatively";i:5385;s:21:"notveryappreciatively";i:5386;s:19:"notappreciativeness";i:5387;s:23:"notveryappreciativeness";i:5388;s:11:"notapproval";i:5389;s:15:"notveryapproval";i:5390;s:10:"notapprove";i:5391;s:14:"notveryapprove";i:5392;s:6:"notapt";i:5393;s:10:"notveryapt";i:5394;s:8:"notaptly";i:5395;s:12:"notveryaptly";i:5396;s:11:"notaptitude";i:5397;s:15:"notveryaptitude";i:5398;s:9:"notardent";i:5399;s:13:"notveryardent";i:5400;s:11:"notardently";i:5401;s:15:"notveryardently";i:5402;s:8:"notardor";i:5403;s:12:"notveryardor";i:5404;s:15:"notaristocratic";i:5405;s:19:"notveryaristocratic";i:5406;s:10:"notarousal";i:5407;s:14:"notveryarousal";i:5408;s:9:"notarouse";i:5409;s:13:"notveryarouse";i:5410;s:11:"notarousing";i:5411;s:15:"notveryarousing";i:5412;s:12:"notarresting";i:5413;s:16:"notveryarresting";i:5414;s:13:"notarticulate";i:5415;s:17:"notveryarticulate";i:5416;s:12:"notascendant";i:5417;s:16:"notveryascendant";i:5418;s:16:"notascertainable";i:5419;s:20:"notveryascertainable";i:5420;s:13:"notaspiration";i:5421;s:17:"notveryaspiration";i:5422;s:14:"notaspirations";i:5423;s:18:"notveryaspirations";i:5424;s:9:"notaspire";i:5425;s:13:"notveryaspire";i:5426;s:9:"notassent";i:5427;s:13:"notveryassent";i:5428;s:13:"notassertions";i:5429;s:17:"notveryassertions";i:5430;s:12:"notassertive";i:5431;s:16:"notveryassertive";i:5432;s:8:"notasset";i:5433;s:12:"notveryasset";i:5434;s:12:"notassiduous";i:5435;s:16:"notveryassiduous";i:5436;s:14:"notassiduously";i:5437;s:18:"notveryassiduously";i:5438;s:10:"notassuage";i:5439;s:14:"notveryassuage";i:5440;s:12:"notassurance";i:5441;s:16:"notveryassurance";i:5442;s:13:"notassurances";i:5443;s:17:"notveryassurances";i:5444;s:9:"notassure";i:5445;s:13:"notveryassure";i:5446;s:12:"notassuredly";i:5447;s:16:"notveryassuredly";i:5448;s:11:"notastonish";i:5449;s:15:"notveryastonish";i:5450;s:13:"notastonished";i:5451;s:17:"notveryastonished";i:5452;s:14:"notastonishing";i:5453;s:18:"notveryastonishing";i:5454;s:16:"notastonishingly";i:5455;s:20:"notveryastonishingly";i:5456;s:15:"notastonishment";i:5457;s:19:"notveryastonishment";i:5458;s:10:"notastound";i:5459;s:14:"notveryastound";i:5460;s:12:"notastounded";i:5461;s:16:"notveryastounded";i:5462;s:13:"notastounding";i:5463;s:17:"notveryastounding";i:5464;s:15:"notastoundingly";i:5465;s:19:"notveryastoundingly";i:5466;s:11:"notastutely";i:5467;s:15:"notveryastutely";i:5468;s:9:"notasylum";i:5469;s:13:"notveryasylum";i:5470;s:9:"notattain";i:5471;s:13:"notveryattain";i:5472;s:13:"notattainable";i:5473;s:17:"notveryattainable";i:5474;s:9:"notattest";i:5475;s:13:"notveryattest";i:5476;s:13:"notattraction";i:5477;s:17:"notveryattraction";i:5478;s:15:"notattractively";i:5479;s:19:"notveryattractively";i:5480;s:9:"notattune";i:5481;s:13:"notveryattune";i:5482;s:13:"notauspicious";i:5483;s:17:"notveryauspicious";i:5484;s:8:"notaward";i:5485;s:12:"notveryaward";i:5486;s:7:"notaver";i:5487;s:11:"notveryaver";i:5488;s:7:"notavid";i:5489;s:11:"notveryavid";i:5490;s:9:"notavidly";i:5491;s:13:"notveryavidly";i:5492;s:6:"notawe";i:5493;s:10:"notveryawe";i:5494;s:7:"notawed";i:5495;s:11:"notveryawed";i:5496;s:12:"notawesomely";i:5497;s:16:"notveryawesomely";i:5498;s:14:"notawesomeness";i:5499;s:18:"notveryawesomeness";i:5500;s:12:"notawestruck";i:5501;s:16:"notveryawestruck";i:5502;s:7:"notback";i:5503;s:11:"notveryback";i:5504;s:11:"notbackbone";i:5505;s:15:"notverybackbone";i:5506;s:10:"notbargain";i:5507;s:14:"notverybargain";i:5508;s:8:"notbasic";i:5509;s:12:"notverybasic";i:5510;s:7:"notbask";i:5511;s:11:"notverybask";i:5512;s:9:"notbeacon";i:5513;s:13:"notverybeacon";i:5514;s:10:"notbeatify";i:5515;s:14:"notverybeatify";i:5516;s:12:"notbeauteous";i:5517;s:16:"notverybeauteous";i:5518;s:14:"notbeautifully";i:5519;s:18:"notverybeautifully";i:5520;s:11:"notbeautify";i:5521;s:15:"notverybeautify";i:5522;s:9:"notbeauty";i:5523;s:13:"notverybeauty";i:5524;s:8:"notbefit";i:5525;s:12:"notverybefit";i:5526;s:12:"notbefitting";i:5527;s:16:"notverybefitting";i:5528;s:11:"notbefriend";i:5529;s:15:"notverybefriend";i:5530;s:10:"notbeloved";i:5531;s:14:"notverybeloved";i:5532;s:13:"notbenefactor";i:5533;s:17:"notverybenefactor";i:5534;s:13:"notbeneficial";i:5535;s:17:"notverybeneficial";i:5536;s:15:"notbeneficially";i:5537;s:19:"notverybeneficially";i:5538;s:14:"notbeneficiary";i:5539;s:18:"notverybeneficiary";i:5540;s:10:"notbenefit";i:5541;s:14:"notverybenefit";i:5542;s:11:"notbenefits";i:5543;s:15:"notverybenefits";i:5544;s:14:"notbenevolence";i:5545;s:18:"notverybenevolence";i:5546;s:13:"notbest-known";i:5547;s:17:"notverybest-known";i:5548;s:18:"notbest-performing";i:5549;s:22:"notverybest-performing";i:5550;s:15:"notbest-selling";i:5551;s:19:"notverybest-selling";i:5552;s:15:"notbetter-known";i:5553;s:19:"notverybetter-known";i:5554;s:23:"notbetter-than-expected";i:5555;s:27:"notverybetter-than-expected";i:5556;s:12:"notblameless";i:5557;s:16:"notveryblameless";i:5558;s:8:"notbless";i:5559;s:12:"notverybless";i:5560;s:11:"notblessing";i:5561;s:15:"notveryblessing";i:5562;s:8:"notbliss";i:5563;s:12:"notverybliss";i:5564;s:13:"notblissfully";i:5565;s:17:"notveryblissfully";i:5566;s:9:"notblithe";i:5567;s:13:"notveryblithe";i:5568;s:8:"notbloom";i:5569;s:12:"notverybloom";i:5570;s:10:"notblossom";i:5571;s:14:"notveryblossom";i:5572;s:8:"notboast";i:5573;s:12:"notveryboast";i:5574;s:9:"notboldly";i:5575;s:13:"notveryboldly";i:5576;s:11:"notboldness";i:5577;s:15:"notveryboldness";i:5578;s:10:"notbolster";i:5579;s:14:"notverybolster";i:5580;s:8:"notbonny";i:5581;s:12:"notverybonny";i:5582;s:8:"notbonus";i:5583;s:12:"notverybonus";i:5584;s:7:"notboom";i:5585;s:11:"notveryboom";i:5586;s:10:"notbooming";i:5587;s:14:"notverybooming";i:5588;s:8:"notboost";i:5589;s:12:"notveryboost";i:5590;s:12:"notboundless";i:5591;s:16:"notveryboundless";i:5592;s:12:"notbountiful";i:5593;s:16:"notverybountiful";i:5594;s:9:"notbrains";i:5595;s:13:"notverybrains";i:5596;s:10:"notbravery";i:5597;s:14:"notverybravery";i:5598;s:15:"notbreakthrough";i:5599;s:19:"notverybreakthrough";i:5600;s:16:"notbreakthroughs";i:5601;s:20:"notverybreakthroughs";i:5602;s:17:"notbreathlessness";i:5603;s:21:"notverybreathlessness";i:5604;s:15:"notbreathtaking";i:5605;s:19:"notverybreathtaking";i:5606;s:17:"notbreathtakingly";i:5607;s:21:"notverybreathtakingly";i:5608;s:11:"notbrighten";i:5609;s:15:"notverybrighten";i:5610;s:13:"notbrightness";i:5611;s:17:"notverybrightness";i:5612;s:13:"notbrilliance";i:5613;s:17:"notverybrilliance";i:5614;s:14:"notbrilliantly";i:5615;s:18:"notverybrilliantly";i:5616;s:8:"notbrisk";i:5617;s:12:"notverybrisk";i:5618;s:8:"notbroad";i:5619;s:12:"notverybroad";i:5620;s:8:"notbrook";i:5621;s:12:"notverybrook";i:5622;s:12:"notbrotherly";i:5623;s:16:"notverybrotherly";i:5624;s:7:"notbull";i:5625;s:11:"notverybull";i:5626;s:10:"notbullish";i:5627;s:14:"notverybullish";i:5628;s:10:"notbuoyant";i:5629;s:14:"notverybuoyant";i:5630;s:10:"notcalming";i:5631;s:14:"notverycalming";i:5632;s:11:"notcalmness";i:5633;s:15:"notverycalmness";i:5634;s:9:"notcandor";i:5635;s:13:"notverycandor";i:5636;s:10:"notcapable";i:5637;s:14:"notverycapable";i:5638;s:13:"notcapability";i:5639;s:17:"notverycapability";i:5640;s:10:"notcapably";i:5641;s:14:"notverycapably";i:5642;s:13:"notcapitalize";i:5643;s:17:"notverycapitalize";i:5644;s:12:"notcaptivate";i:5645;s:16:"notverycaptivate";i:5646;s:14:"notcaptivation";i:5647;s:18:"notverycaptivation";i:5648;s:7:"notcare";i:5649;s:11:"notverycare";i:5650;s:11:"notcarefree";i:5651;s:15:"notverycarefree";i:5652;s:10:"notcareful";i:5653;s:14:"notverycareful";i:5654;s:11:"notcatalyst";i:5655;s:15:"notverycatalyst";i:5656;s:9:"notcatchy";i:5657;s:13:"notverycatchy";i:5658;s:12:"notcelebrate";i:5659;s:16:"notverycelebrate";i:5660;s:13:"notcelebrated";i:5661;s:17:"notverycelebrated";i:5662;s:14:"notcelebration";i:5663;s:18:"notverycelebration";i:5664;s:14:"notcelebratory";i:5665;s:18:"notverycelebratory";i:5666;s:12:"notcelebrity";i:5667;s:16:"notverycelebrity";i:5668;s:11:"notchampion";i:5669;s:15:"notverychampion";i:5670;s:8:"notchamp";i:5671;s:12:"notverychamp";i:5672;s:14:"notcharismatic";i:5673;s:18:"notverycharismatic";i:5674;s:10:"notcharity";i:5675;s:14:"notverycharity";i:5676;s:8:"notcharm";i:5677;s:12:"notverycharm";i:5678;s:13:"notcharmingly";i:5679;s:17:"notverycharmingly";i:5680;s:8:"notcheer";i:5681;s:12:"notverycheer";i:5682;s:9:"notcheery";i:5683;s:13:"notverycheery";i:5684;s:10:"notcherish";i:5685;s:14:"notverycherish";i:5686;s:12:"notcherished";i:5687;s:16:"notverycherished";i:5688;s:9:"notcherub";i:5689;s:13:"notverycherub";i:5690;s:11:"notchivalry";i:5691;s:15:"notverychivalry";i:5692;s:13:"notchivalrous";i:5693;s:17:"notverychivalrous";i:5694;s:7:"notchum";i:5695;s:11:"notverychum";i:5696;s:11:"notcivility";i:5697;s:15:"notverycivility";i:5698;s:15:"notcivilization";i:5699;s:19:"notverycivilization";i:5700;s:11:"notcivilize";i:5701;s:15:"notverycivilize";i:5702;s:10:"notclarity";i:5703;s:14:"notveryclarity";i:5704;s:10:"notclassic";i:5705;s:14:"notveryclassic";i:5706;s:8:"notclean";i:5707;s:12:"notveryclean";i:5708;s:14:"notcleanliness";i:5709;s:18:"notverycleanliness";i:5710;s:10:"notcleanse";i:5711;s:14:"notverycleanse";i:5712;s:8:"notclear";i:5713;s:12:"notveryclear";i:5714;s:12:"notclear-cut";i:5715;s:16:"notveryclear-cut";i:5716;s:10:"notclearer";i:5717;s:14:"notveryclearer";i:5718;s:9:"notclever";i:5719;s:13:"notveryclever";i:5720;s:12:"notcloseness";i:5721;s:16:"notverycloseness";i:5722;s:8:"notclout";i:5723;s:12:"notveryclout";i:5724;s:15:"notco-operation";i:5725;s:19:"notveryco-operation";i:5726;s:7:"notcoax";i:5727;s:11:"notverycoax";i:5728;s:9:"notcoddle";i:5729;s:13:"notverycoddle";i:5730;s:9:"notcogent";i:5731;s:13:"notverycogent";i:5732;s:11:"notcohesive";i:5733;s:15:"notverycohesive";i:5734;s:9:"notcohere";i:5735;s:13:"notverycohere";i:5736;s:12:"notcoherence";i:5737;s:16:"notverycoherence";i:5738;s:11:"notcoherent";i:5739;s:15:"notverycoherent";i:5740;s:11:"notcohesion";i:5741;s:15:"notverycohesion";i:5742;s:11:"notcolossal";i:5743;s:15:"notverycolossal";i:5744;s:11:"notcomeback";i:5745;s:15:"notverycomeback";i:5746;s:10:"notcomfort";i:5747;s:14:"notverycomfort";i:5748;s:14:"notcomfortably";i:5749;s:18:"notverycomfortably";i:5750;s:13:"notcomforting";i:5751;s:17:"notverycomforting";i:5752;s:10:"notcommend";i:5753;s:14:"notverycommend";i:5754;s:14:"notcommendably";i:5755;s:18:"notverycommendably";i:5756;s:15:"notcommensurate";i:5757;s:19:"notverycommensurate";i:5758;s:14:"notcommonsense";i:5759;s:18:"notverycommonsense";i:5760;s:17:"notcommonsensible";i:5761;s:21:"notverycommonsensible";i:5762;s:17:"notcommonsensibly";i:5763;s:21:"notverycommonsensibly";i:5764;s:17:"notcommonsensical";i:5765;s:21:"notverycommonsensical";i:5766;s:13:"notcommodious";i:5767;s:17:"notverycommodious";i:5768;s:13:"notcommitment";i:5769;s:17:"notverycommitment";i:5770;s:10:"notcompact";i:5771;s:14:"notverycompact";i:5772;s:13:"notcompassion";i:5773;s:17:"notverycompassion";i:5774;s:13:"notcompelling";i:5775;s:17:"notverycompelling";i:5776;s:13:"notcompensate";i:5777;s:17:"notverycompensate";i:5778;s:13:"notcompetence";i:5779;s:17:"notverycompetence";i:5780;s:13:"notcompetency";i:5781;s:17:"notverycompetency";i:5782;s:18:"notcompetitiveness";i:5783;s:22:"notverycompetitiveness";i:5784;s:13:"notcomplement";i:5785;s:17:"notverycomplement";i:5786;s:12:"notcompliant";i:5787;s:16:"notverycompliant";i:5788;s:13:"notcompliment";i:5789;s:17:"notverycompliment";i:5790;s:16:"notcomplimentary";i:5791;s:20:"notverycomplimentary";i:5792;s:16:"notcomprehensive";i:5793;s:20:"notverycomprehensive";i:5794;s:13:"notcompromise";i:5795;s:17:"notverycompromise";i:5796;s:14:"notcompromises";i:5797;s:18:"notverycompromises";i:5798;s:11:"notcomrades";i:5799;s:15:"notverycomrades";i:5800;s:14:"notconceivable";i:5801;s:18:"notveryconceivable";i:5802;s:13:"notconciliate";i:5803;s:17:"notveryconciliate";i:5804;s:13:"notconclusive";i:5805;s:17:"notveryconclusive";i:5806;s:11:"notconcrete";i:5807;s:15:"notveryconcrete";i:5808;s:9:"notconcur";i:5809;s:13:"notveryconcur";i:5810;s:10:"notcondone";i:5811;s:14:"notverycondone";i:5812;s:12:"notconducive";i:5813;s:16:"notveryconducive";i:5814;s:9:"notconfer";i:5815;s:13:"notveryconfer";i:5816;s:13:"notconfidence";i:5817;s:17:"notveryconfidence";i:5818;s:10:"notconfute";i:5819;s:14:"notveryconfute";i:5820;s:15:"notcongratulate";i:5821;s:19:"notverycongratulate";i:5822;s:18:"notcongratulations";i:5823;s:22:"notverycongratulations";i:5824;s:17:"notcongratulatory";i:5825;s:21:"notverycongratulatory";i:5826;s:10:"notconquer";i:5827;s:14:"notveryconquer";i:5828;s:13:"notconscience";i:5829;s:17:"notveryconscience";i:5830;s:16:"notconscientious";i:5831;s:20:"notveryconscientious";i:5832;s:12:"notconsensus";i:5833;s:16:"notveryconsensus";i:5834;s:10:"notconsent";i:5835;s:14:"notveryconsent";i:5836;s:10:"notconsole";i:5837;s:14:"notveryconsole";i:5838;s:12:"notconstancy";i:5839;s:16:"notveryconstancy";i:5840;s:15:"notconstructive";i:5841;s:19:"notveryconstructive";i:5842;s:14:"notcontentment";i:5843;s:18:"notverycontentment";i:5844;s:13:"notcontinuity";i:5845;s:17:"notverycontinuity";i:5846;s:15:"notcontribution";i:5847;s:19:"notverycontribution";i:5848;s:13:"notconvenient";i:5849;s:17:"notveryconvenient";i:5850;s:15:"notconveniently";i:5851;s:19:"notveryconveniently";i:5852;s:13:"notconviction";i:5853;s:17:"notveryconviction";i:5854;s:11:"notconvince";i:5855;s:15:"notveryconvince";i:5856;s:15:"notconvincingly";i:5857;s:19:"notveryconvincingly";i:5858;s:12:"notcooperate";i:5859;s:16:"notverycooperate";i:5860;s:14:"notcooperation";i:5861;s:18:"notverycooperation";i:5862;s:14:"notcooperative";i:5863;s:18:"notverycooperative";i:5864;s:16:"notcooperatively";i:5865;s:20:"notverycooperatively";i:5866;s:14:"notcornerstone";i:5867;s:18:"notverycornerstone";i:5868;s:10:"notcorrect";i:5869;s:14:"notverycorrect";i:5870;s:12:"notcorrectly";i:5871;s:16:"notverycorrectly";i:5872;s:17:"notcost-effective";i:5873;s:21:"notverycost-effective";i:5874;s:14:"notcost-saving";i:5875;s:18:"notverycost-saving";i:5876;s:10:"notcourage";i:5877;s:14:"notverycourage";i:5878;s:15:"notcourageously";i:5879;s:19:"notverycourageously";i:5880;s:17:"notcourageousness";i:5881;s:21:"notverycourageousness";i:5882;s:8:"notcourt";i:5883;s:12:"notverycourt";i:5884;s:11:"notcourtesy";i:5885;s:15:"notverycourtesy";i:5886;s:10:"notcourtly";i:5887;s:14:"notverycourtly";i:5888;s:11:"notcovenant";i:5889;s:15:"notverycovenant";i:5890;s:8:"notcovet";i:5891;s:12:"notverycovet";i:5892;s:11:"notcoveting";i:5893;s:15:"notverycoveting";i:5894;s:13:"notcovetingly";i:5895;s:17:"notverycovetingly";i:5896;s:8:"notcrave";i:5897;s:12:"notverycrave";i:5898;s:10:"notcraving";i:5899;s:14:"notverycraving";i:5900;s:11:"notcredence";i:5901;s:15:"notverycredence";i:5902;s:8:"notcrisp";i:5903;s:12:"notverycrisp";i:5904;s:10:"notcrusade";i:5905;s:14:"notverycrusade";i:5906;s:11:"notcrusader";i:5907;s:15:"notverycrusader";i:5908;s:11:"notcure-all";i:5909;s:15:"notverycure-all";i:5910;s:10:"notcurious";i:5911;s:14:"notverycurious";i:5912;s:12:"notcuriously";i:5913;s:16:"notverycuriously";i:5914;s:8:"notdance";i:5915;s:12:"notverydance";i:5916;s:7:"notdare";i:5917;s:11:"notverydare";i:5918;s:11:"notdaringly";i:5919;s:15:"notverydaringly";i:5920;s:10:"notdarling";i:5921;s:14:"notverydarling";i:5922;s:10:"notdashing";i:5923;s:14:"notverydashing";i:5924;s:12:"notdauntless";i:5925;s:16:"notverydauntless";i:5926;s:7:"notdawn";i:5927;s:11:"notverydawn";i:5928;s:11:"notdaydream";i:5929;s:15:"notverydaydream";i:5930;s:13:"notdaydreamer";i:5931;s:17:"notverydaydreamer";i:5932;s:9:"notdazzle";i:5933;s:13:"notverydazzle";i:5934;s:10:"notdazzled";i:5935;s:14:"notverydazzled";i:5936;s:11:"notdazzling";i:5937;s:15:"notverydazzling";i:5938;s:7:"notdeal";i:5939;s:11:"notverydeal";i:5940;s:7:"notdear";i:5941;s:11:"notverydear";i:5942;s:10:"notdecency";i:5943;s:14:"notverydecency";i:5944;s:15:"notdecisiveness";i:5945;s:19:"notverydecisiveness";i:5946;s:9:"notdefend";i:5947;s:13:"notverydefend";i:5948;s:11:"notdefender";i:5949;s:15:"notverydefender";i:5950;s:12:"notdeference";i:5951;s:16:"notverydeference";i:5952;s:10:"notdefense";i:5953;s:14:"notverydefense";i:5954;s:11:"notdefinite";i:5955;s:15:"notverydefinite";i:5956;s:13:"notdefinitive";i:5957;s:17:"notverydefinitive";i:5958;s:15:"notdefinitively";i:5959;s:19:"notverydefinitively";i:5960;s:15:"notdeflationary";i:5961;s:19:"notverydeflationary";i:5962;s:7:"notdeft";i:5963;s:11:"notverydeft";i:5964;s:11:"notdelicacy";i:5965;s:15:"notverydelicacy";i:5966;s:12:"notdelicious";i:5967;s:16:"notverydelicious";i:5968;s:10:"notdelight";i:5969;s:14:"notverydelight";i:5970;s:12:"notdelighted";i:5971;s:16:"notverydelighted";i:5972;s:15:"notdelightfully";i:5973;s:19:"notverydelightfully";i:5974;s:17:"notdelightfulness";i:5975;s:21:"notverydelightfulness";i:5976;s:12:"notdemystify";i:5977;s:16:"notverydemystify";i:5978;s:10:"notdeserve";i:5979;s:14:"notverydeserve";i:5980;s:11:"notdeserved";i:5981;s:15:"notverydeserved";i:5982;s:13:"notdeservedly";i:5983;s:17:"notverydeservedly";i:5984;s:9:"notdesire";i:5985;s:13:"notverydesire";i:5986;s:11:"notdesirous";i:5987;s:15:"notverydesirous";i:5988;s:10:"notdestine";i:5989;s:14:"notverydestine";i:5990;s:11:"notdestined";i:5991;s:15:"notverydestined";i:5992;s:12:"notdestinies";i:5993;s:16:"notverydestinies";i:5994;s:10:"notdestiny";i:5995;s:14:"notverydestiny";i:5996;s:16:"notdetermination";i:5997;s:20:"notverydetermination";i:5998;s:9:"notdevote";i:5999;s:13:"notverydevote";i:6000;s:10:"notdevotee";i:6001;s:14:"notverydevotee";i:6002;s:11:"notdevotion";i:6003;s:15:"notverydevotion";i:6004;s:9:"notdevout";i:6005;s:13:"notverydevout";i:6006;s:12:"notdexterity";i:6007;s:16:"notverydexterity";i:6008;s:12:"notdexterous";i:6009;s:16:"notverydexterous";i:6010;s:14:"notdexterously";i:6011;s:18:"notverydexterously";i:6012;s:11:"notdextrous";i:6013;s:15:"notverydextrous";i:6014;s:6:"notdig";i:6015;s:10:"notverydig";i:6016;s:10:"notdignify";i:6017;s:14:"notverydignify";i:6018;s:10:"notdignity";i:6019;s:14:"notverydignity";i:6020;s:12:"notdiligence";i:6021;s:16:"notverydiligence";i:6022;s:13:"notdiligently";i:6023;s:17:"notverydiligently";i:6024;s:11:"notdiscreet";i:6025;s:15:"notverydiscreet";i:6026;s:13:"notdiscretion";i:6027;s:17:"notverydiscretion";i:6028;s:19:"notdiscriminatingly";i:6029;s:23:"notverydiscriminatingly";i:6030;s:11:"notdistinct";i:6031;s:15:"notverydistinct";i:6032;s:14:"notdistinction";i:6033;s:18:"notverydistinction";i:6034;s:14:"notdistinguish";i:6035;s:18:"notverydistinguish";i:6036;s:16:"notdistinguished";i:6037;s:20:"notverydistinguished";i:6038;s:14:"notdiversified";i:6039;s:18:"notverydiversified";i:6040;s:9:"notdivine";i:6041;s:13:"notverydivine";i:6042;s:11:"notdivinely";i:6043;s:15:"notverydivinely";i:6044;s:8:"notdodge";i:6045;s:12:"notverydodge";i:6046;s:7:"notdote";i:6047;s:11:"notverydote";i:6048;s:11:"notdotingly";i:6049;s:15:"notverydotingly";i:6050;s:12:"notdoubtless";i:6051;s:16:"notverydoubtless";i:6052;s:8:"notdream";i:6053;s:12:"notverydream";i:6054;s:12:"notdreamland";i:6055;s:16:"notverydreamland";i:6056;s:9:"notdreams";i:6057;s:13:"notverydreams";i:6058;s:9:"notdreamy";i:6059;s:13:"notverydreamy";i:6060;s:8:"notdrive";i:6061;s:12:"notverydrive";i:6062;s:9:"notdriven";i:6063;s:13:"notverydriven";i:6064;s:10:"notdurable";i:6065;s:14:"notverydurable";i:6066;s:13:"notdurability";i:6067;s:17:"notverydurability";i:6068;s:10:"notdynamic";i:6069;s:14:"notverydynamic";i:6070;s:8:"noteager";i:6071;s:12:"notveryeager";i:6072;s:10:"noteagerly";i:6073;s:14:"notveryeagerly";i:6074;s:12:"noteagerness";i:6075;s:16:"notveryeagerness";i:6076;s:12:"notearnestly";i:6077;s:16:"notveryearnestly";i:6078;s:14:"notearnestness";i:6079;s:18:"notveryearnestness";i:6080;s:7:"notease";i:6081;s:11:"notveryease";i:6082;s:9:"noteasier";i:6083;s:13:"notveryeasier";i:6084;s:10:"noteasiest";i:6085;s:14:"notveryeasiest";i:6086;s:9:"noteasily";i:6087;s:13:"notveryeasily";i:6088;s:11:"noteasiness";i:6089;s:15:"notveryeasiness";i:6090;s:7:"noteasy";i:6091;s:11:"notveryeasy";i:6092;s:12:"noteasygoing";i:6093;s:16:"notveryeasygoing";i:6094;s:13:"notebullience";i:6095;s:17:"notveryebullience";i:6096;s:12:"notebullient";i:6097;s:16:"notveryebullient";i:6098;s:14:"notebulliently";i:6099;s:18:"notveryebulliently";i:6100;s:11:"noteclectic";i:6101;s:15:"notveryeclectic";i:6102;s:13:"noteconomical";i:6103;s:17:"notveryeconomical";i:6104;s:12:"notecstasies";i:6105;s:16:"notveryecstasies";i:6106;s:10:"notecstasy";i:6107;s:14:"notveryecstasy";i:6108;s:15:"notecstatically";i:6109;s:19:"notveryecstatically";i:6110;s:8:"notedify";i:6111;s:12:"notveryedify";i:6112;s:11:"noteducable";i:6113;s:15:"notveryeducable";i:6114;s:11:"noteducated";i:6115;s:15:"notveryeducated";i:6116;s:14:"noteducational";i:6117;s:18:"notveryeducational";i:6118;s:12:"noteffective";i:6119;s:16:"notveryeffective";i:6120;s:16:"noteffectiveness";i:6121;s:20:"notveryeffectiveness";i:6122;s:12:"noteffectual";i:6123;s:16:"notveryeffectual";i:6124;s:14:"notefficacious";i:6125;s:18:"notveryefficacious";i:6126;s:13:"notefficiency";i:6127;s:17:"notveryefficiency";i:6128;s:13:"noteffortless";i:6129;s:17:"notveryeffortless";i:6130;s:15:"noteffortlessly";i:6131;s:19:"notveryeffortlessly";i:6132;s:11:"noteffusion";i:6133;s:15:"notveryeffusion";i:6134;s:11:"noteffusive";i:6135;s:15:"notveryeffusive";i:6136;s:13:"noteffusively";i:6137;s:17:"notveryeffusively";i:6138;s:15:"noteffusiveness";i:6139;s:19:"notveryeffusiveness";i:6140;s:14:"notegalitarian";i:6141;s:18:"notveryegalitarian";i:6142;s:7:"notelan";i:6143;s:11:"notveryelan";i:6144;s:8:"notelate";i:6145;s:12:"notveryelate";i:6146;s:11:"notelatedly";i:6147;s:15:"notveryelatedly";i:6148;s:10:"notelation";i:6149;s:14:"notveryelation";i:6150;s:18:"notelectrification";i:6151;s:22:"notveryelectrification";i:6152;s:12:"notelectrify";i:6153;s:16:"notveryelectrify";i:6154;s:11:"notelegance";i:6155;s:15:"notveryelegance";i:6156;s:12:"notelegantly";i:6157;s:16:"notveryelegantly";i:6158;s:10:"notelevate";i:6159;s:14:"notveryelevate";i:6160;s:11:"notelevated";i:6161;s:15:"notveryelevated";i:6162;s:11:"noteligible";i:6163;s:15:"notveryeligible";i:6164;s:8:"notelite";i:6165;s:12:"notveryelite";i:6166;s:12:"noteloquence";i:6167;s:16:"notveryeloquence";i:6168;s:13:"noteloquently";i:6169;s:17:"notveryeloquently";i:6170;s:13:"notemancipate";i:6171;s:17:"notveryemancipate";i:6172;s:12:"notembellish";i:6173;s:16:"notveryembellish";i:6174;s:11:"notembolden";i:6175;s:15:"notveryembolden";i:6176;s:10:"notembrace";i:6177;s:14:"notveryembrace";i:6178;s:11:"noteminence";i:6179;s:15:"notveryeminence";i:6180;s:10:"noteminent";i:6181;s:14:"notveryeminent";i:6182;s:10:"notempower";i:6183;s:14:"notveryempower";i:6184;s:14:"notempowerment";i:6185;s:18:"notveryempowerment";i:6186;s:9:"notenable";i:6187;s:13:"notveryenable";i:6188;s:10:"notenchant";i:6189;s:14:"notveryenchant";i:6190;s:13:"notenchanting";i:6191;s:17:"notveryenchanting";i:6192;s:15:"notenchantingly";i:6193;s:19:"notveryenchantingly";i:6194;s:12:"notencourage";i:6195;s:16:"notveryencourage";i:6196;s:16:"notencouragement";i:6197;s:20:"notveryencouragement";i:6198;s:16:"notencouragingly";i:6199;s:20:"notveryencouragingly";i:6200;s:9:"notendear";i:6201;s:13:"notveryendear";i:6202;s:12:"notendearing";i:6203;s:16:"notveryendearing";i:6204;s:10:"notendorse";i:6205;s:14:"notveryendorse";i:6206;s:14:"notendorsement";i:6207;s:18:"notveryendorsement";i:6208;s:11:"notendorser";i:6209;s:15:"notveryendorser";i:6210;s:12:"notendurable";i:6211;s:16:"notveryendurable";i:6212;s:9:"notendure";i:6213;s:13:"notveryendure";i:6214;s:11:"notenduring";i:6215;s:15:"notveryenduring";i:6216;s:11:"notenergize";i:6217;s:15:"notveryenergize";i:6218;s:13:"notengrossing";i:6219;s:17:"notveryengrossing";i:6220;s:10:"notenhance";i:6221;s:14:"notveryenhance";i:6222;s:11:"notenhanced";i:6223;s:15:"notveryenhanced";i:6224;s:14:"notenhancement";i:6225;s:18:"notveryenhancement";i:6226;s:8:"notenjoy";i:6227;s:12:"notveryenjoy";i:6228;s:12:"notenjoyable";i:6229;s:16:"notveryenjoyable";i:6230;s:12:"notenjoyably";i:6231;s:16:"notveryenjoyably";i:6232;s:12:"notenjoyment";i:6233;s:16:"notveryenjoyment";i:6234;s:12:"notenlighten";i:6235;s:16:"notveryenlighten";i:6236;s:16:"notenlightenment";i:6237;s:20:"notveryenlightenment";i:6238;s:10:"notenliven";i:6239;s:14:"notveryenliven";i:6240;s:10:"notennoble";i:6241;s:14:"notveryennoble";i:6242;s:9:"notenrapt";i:6243;s:13:"notveryenrapt";i:6244;s:12:"notenrapture";i:6245;s:16:"notveryenrapture";i:6246;s:13:"notenraptured";i:6247;s:17:"notveryenraptured";i:6248;s:9:"notenrich";i:6249;s:13:"notveryenrich";i:6250;s:13:"notenrichment";i:6251;s:17:"notveryenrichment";i:6252;s:9:"notensure";i:6253;s:13:"notveryensure";i:6254;s:12:"notentertain";i:6255;s:16:"notveryentertain";i:6256;s:10:"notenthral";i:6257;s:14:"notveryenthral";i:6258;s:11:"notenthrall";i:6259;s:15:"notveryenthrall";i:6260;s:13:"notenthralled";i:6261;s:17:"notveryenthralled";i:6262;s:10:"notenthuse";i:6263;s:14:"notveryenthuse";i:6264;s:13:"notenthusiasm";i:6265;s:17:"notveryenthusiasm";i:6266;s:13:"notenthusiast";i:6267;s:17:"notveryenthusiast";i:6268;s:19:"notenthusiastically";i:6269;s:23:"notveryenthusiastically";i:6270;s:9:"notentice";i:6271;s:13:"notveryentice";i:6272;s:11:"notenticing";i:6273;s:15:"notveryenticing";i:6274;s:13:"notenticingly";i:6275;s:17:"notveryenticingly";i:6276;s:11:"notentrance";i:6277;s:15:"notveryentrance";i:6278;s:12:"notentranced";i:6279;s:16:"notveryentranced";i:6280;s:13:"notentrancing";i:6281;s:17:"notveryentrancing";i:6282;s:10:"notentreat";i:6283;s:14:"notveryentreat";i:6284;s:15:"notentreatingly";i:6285;s:19:"notveryentreatingly";i:6286;s:10:"notentrust";i:6287;s:14:"notveryentrust";i:6288;s:11:"notenviable";i:6289;s:15:"notveryenviable";i:6290;s:11:"notenviably";i:6291;s:15:"notveryenviably";i:6292;s:11:"notenvision";i:6293;s:15:"notveryenvision";i:6294;s:12:"notenvisions";i:6295;s:16:"notveryenvisions";i:6296;s:7:"notepic";i:6297;s:11:"notveryepic";i:6298;s:10:"notepitome";i:6299;s:14:"notveryepitome";i:6300;s:11:"notequality";i:6301;s:15:"notveryequality";i:6302;s:12:"notequitable";i:6303;s:16:"notveryequitable";i:6304;s:10:"noterudite";i:6305;s:14:"notveryerudite";i:6306;s:12:"notessential";i:6307;s:16:"notveryessential";i:6308;s:9:"notesteem";i:6309;s:13:"notveryesteem";i:6310;s:11:"noteternity";i:6311;s:15:"notveryeternity";i:6312;s:11:"noteulogize";i:6313;s:15:"notveryeulogize";i:6314;s:11:"noteuphoria";i:6315;s:15:"notveryeuphoria";i:6316;s:11:"noteuphoric";i:6317;s:15:"notveryeuphoric";i:6318;s:15:"noteuphorically";i:6319;s:19:"notveryeuphorically";i:6320;s:9:"notevenly";i:6321;s:13:"notveryevenly";i:6322;s:11:"noteventful";i:6323;s:15:"notveryeventful";i:6324;s:14:"noteverlasting";i:6325;s:18:"notveryeverlasting";i:6326;s:10:"notevident";i:6327;s:14:"notveryevident";i:6328;s:12:"notevidently";i:6329;s:16:"notveryevidently";i:6330;s:12:"notevocative";i:6331;s:16:"notveryevocative";i:6332;s:8:"notexalt";i:6333;s:12:"notveryexalt";i:6334;s:13:"notexaltation";i:6335;s:17:"notveryexaltation";i:6336;s:10:"notexalted";i:6337;s:14:"notveryexalted";i:6338;s:12:"notexaltedly";i:6339;s:16:"notveryexaltedly";i:6340;s:11:"notexalting";i:6341;s:15:"notveryexalting";i:6342;s:13:"notexaltingly";i:6343;s:17:"notveryexaltingly";i:6344;s:9:"notexceed";i:6345;s:13:"notveryexceed";i:6346;s:12:"notexceeding";i:6347;s:16:"notveryexceeding";i:6348;s:14:"notexceedingly";i:6349;s:18:"notveryexceedingly";i:6350;s:8:"notexcel";i:6351;s:12:"notveryexcel";i:6352;s:13:"notexcellence";i:6353;s:17:"notveryexcellence";i:6354;s:13:"notexcellency";i:6355;s:17:"notveryexcellency";i:6356;s:14:"notexcellently";i:6357;s:18:"notveryexcellently";i:6358;s:14:"notexceptional";i:6359;s:18:"notveryexceptional";i:6360;s:16:"notexceptionally";i:6361;s:20:"notveryexceptionally";i:6362;s:9:"notexcite";i:6363;s:13:"notveryexcite";i:6364;s:10:"notexcited";i:6365;s:14:"notveryexcited";i:6366;s:12:"notexcitedly";i:6367;s:16:"notveryexcitedly";i:6368;s:14:"notexcitedness";i:6369;s:18:"notveryexcitedness";i:6370;s:13:"notexcitement";i:6371;s:17:"notveryexcitement";i:6372;s:11:"notexciting";i:6373;s:15:"notveryexciting";i:6374;s:13:"notexcitingly";i:6375;s:17:"notveryexcitingly";i:6376;s:12:"notexclusive";i:6377;s:16:"notveryexclusive";i:6378;s:12:"notexcusable";i:6379;s:16:"notveryexcusable";i:6380;s:9:"notexcuse";i:6381;s:13:"notveryexcuse";i:6382;s:11:"notexemplar";i:6383;s:15:"notveryexemplar";i:6384;s:12:"notexemplary";i:6385;s:16:"notveryexemplary";i:6386;s:13:"notexhaustive";i:6387;s:17:"notveryexhaustive";i:6388;s:15:"notexhaustively";i:6389;s:19:"notveryexhaustively";i:6390;s:13:"notexhilarate";i:6391;s:17:"notveryexhilarate";i:6392;s:15:"notexhilarating";i:6393;s:19:"notveryexhilarating";i:6394;s:17:"notexhilaratingly";i:6395;s:21:"notveryexhilaratingly";i:6396;s:15:"notexhilaration";i:6397;s:19:"notveryexhilaration";i:6398;s:12:"notexonerate";i:6399;s:16:"notveryexonerate";i:6400;s:12:"notexpansive";i:6401;s:16:"notveryexpansive";i:6402;s:14:"notexperienced";i:6403;s:18:"notveryexperienced";i:6404;s:9:"notexpert";i:6405;s:13:"notveryexpert";i:6406;s:11:"notexpertly";i:6407;s:15:"notveryexpertly";i:6408;s:11:"notexplicit";i:6409;s:15:"notveryexplicit";i:6410;s:13:"notexplicitly";i:6411;s:17:"notveryexplicitly";i:6412;s:13:"notexpressive";i:6413;s:17:"notveryexpressive";i:6414;s:12:"notexquisite";i:6415;s:16:"notveryexquisite";i:6416;s:14:"notexquisitely";i:6417;s:18:"notveryexquisitely";i:6418;s:8:"notextol";i:6419;s:12:"notveryextol";i:6420;s:9:"notextoll";i:6421;s:13:"notveryextoll";i:6422;s:18:"notextraordinarily";i:6423;s:22:"notveryextraordinarily";i:6424;s:13:"notexuberance";i:6425;s:17:"notveryexuberance";i:6426;s:12:"notexuberant";i:6427;s:16:"notveryexuberant";i:6428;s:14:"notexuberantly";i:6429;s:18:"notveryexuberantly";i:6430;s:8:"notexult";i:6431;s:12:"notveryexult";i:6432;s:13:"notexultation";i:6433;s:17:"notveryexultation";i:6434;s:13:"notexultingly";i:6435;s:17:"notveryexultingly";i:6436;s:13:"notfabulously";i:6437;s:17:"notveryfabulously";i:6438;s:13:"notfacilitate";i:6439;s:17:"notveryfacilitate";i:6440;s:7:"notfair";i:6441;s:11:"notveryfair";i:6442;s:9:"notfairly";i:6443;s:13:"notveryfairly";i:6444;s:11:"notfairness";i:6445;s:15:"notveryfairness";i:6446;s:8:"notfaith";i:6447;s:12:"notveryfaith";i:6448;s:13:"notfaithfully";i:6449;s:17:"notveryfaithfully";i:6450;s:15:"notfaithfulness";i:6451;s:19:"notveryfaithfulness";i:6452;s:8:"notfamed";i:6453;s:12:"notveryfamed";i:6454;s:7:"notfame";i:6455;s:11:"notveryfame";i:6456;s:9:"notfamous";i:6457;s:13:"notveryfamous";i:6458;s:11:"notfamously";i:6459;s:15:"notveryfamously";i:6460;s:8:"notfancy";i:6461;s:12:"notveryfancy";i:6462;s:10:"notfanfare";i:6463;s:14:"notveryfanfare";i:6464;s:16:"notfantastically";i:6465;s:20:"notveryfantastically";i:6466;s:10:"notfantasy";i:6467;s:14:"notveryfantasy";i:6468;s:13:"notfarsighted";i:6469;s:17:"notveryfarsighted";i:6470;s:12:"notfascinate";i:6471;s:16:"notveryfascinate";i:6472;s:16:"notfascinatingly";i:6473;s:20:"notveryfascinatingly";i:6474;s:14:"notfascination";i:6475;s:18:"notveryfascination";i:6476;s:14:"notfashionably";i:6477;s:18:"notveryfashionably";i:6478;s:15:"notfast-growing";i:6479;s:19:"notveryfast-growing";i:6480;s:13:"notfast-paced";i:6481;s:17:"notveryfast-paced";i:6482;s:18:"notfastest-growing";i:6483;s:22:"notveryfastest-growing";i:6484;s:9:"notfathom";i:6485;s:13:"notveryfathom";i:6486;s:8:"notfavor";i:6487;s:12:"notveryfavor";i:6488;s:12:"notfavorable";i:6489;s:16:"notveryfavorable";i:6490;s:10:"notfavored";i:6491;s:14:"notveryfavored";i:6492;s:11:"notfavorite";i:6493;s:15:"notveryfavorite";i:6494;s:7:"notfawn";i:6495;s:11:"notveryfawn";i:6496;s:9:"notfavour";i:6497;s:13:"notveryfavour";i:6498;s:11:"notfearless";i:6499;s:15:"notveryfearless";i:6500;s:13:"notfearlessly";i:6501;s:17:"notveryfearlessly";i:6502;s:11:"notfeasible";i:6503;s:15:"notveryfeasible";i:6504;s:11:"notfeasibly";i:6505;s:15:"notveryfeasibly";i:6506;s:7:"notfeat";i:6507;s:11:"notveryfeat";i:6508;s:9:"notfeatly";i:6509;s:13:"notveryfeatly";i:6510;s:9:"notfeisty";i:6511;s:13:"notveryfeisty";i:6512;s:13:"notfelicitate";i:6513;s:17:"notveryfelicitate";i:6514;s:11:"notfelicity";i:6515;s:15:"notveryfelicity";i:6516;s:10:"notfervent";i:6517;s:14:"notveryfervent";i:6518;s:12:"notfervently";i:6519;s:16:"notveryfervently";i:6520;s:9:"notfervid";i:6521;s:13:"notveryfervid";i:6522;s:11:"notfervidly";i:6523;s:15:"notveryfervidly";i:6524;s:9:"notfervor";i:6525;s:13:"notveryfervor";i:6526;s:10:"notfestive";i:6527;s:14:"notveryfestive";i:6528;s:11:"notfidelity";i:6529;s:15:"notveryfidelity";i:6530;s:8:"notfiery";i:6531;s:12:"notveryfiery";i:6532;s:9:"notfinely";i:6533;s:13:"notveryfinely";i:6534;s:14:"notfirst-class";i:6535;s:18:"notveryfirst-class";i:6536;s:13:"notfirst-rate";i:6537;s:17:"notveryfirst-rate";i:6538;s:6:"notfit";i:6539;s:10:"notveryfit";i:6540;s:10:"notfitting";i:6541;s:14:"notveryfitting";i:6542;s:8:"notflair";i:6543;s:12:"notveryflair";i:6544;s:8:"notflame";i:6545;s:12:"notveryflame";i:6546;s:10:"notflatter";i:6547;s:14:"notveryflatter";i:6548;s:13:"notflattering";i:6549;s:17:"notveryflattering";i:6550;s:15:"notflatteringly";i:6551;s:19:"notveryflatteringly";i:6552;s:11:"notflawless";i:6553;s:15:"notveryflawless";i:6554;s:13:"notflawlessly";i:6555;s:17:"notveryflawlessly";i:6556;s:11:"notflourish";i:6557;s:15:"notveryflourish";i:6558;s:14:"notflourishing";i:6559;s:18:"notveryflourishing";i:6560;s:9:"notfluent";i:6561;s:13:"notveryfluent";i:6562;s:7:"notfond";i:6563;s:11:"notveryfond";i:6564;s:9:"notfondly";i:6565;s:13:"notveryfondly";i:6566;s:11:"notfondness";i:6567;s:15:"notveryfondness";i:6568;s:12:"notfoolproof";i:6569;s:16:"notveryfoolproof";i:6570;s:11:"notforemost";i:6571;s:15:"notveryforemost";i:6572;s:12:"notforesight";i:6573;s:16:"notveryforesight";i:6574;s:10:"notforgave";i:6575;s:14:"notveryforgave";i:6576;s:10:"notforgive";i:6577;s:14:"notveryforgive";i:6578;s:11:"notforgiven";i:6579;s:15:"notveryforgiven";i:6580;s:14:"notforgiveness";i:6581;s:18:"notveryforgiveness";i:6582;s:14:"notforgivingly";i:6583;s:18:"notveryforgivingly";i:6584;s:12:"notfortitude";i:6585;s:16:"notveryfortitude";i:6586;s:13:"notfortuitous";i:6587;s:17:"notveryfortuitous";i:6588;s:15:"notfortuitously";i:6589;s:19:"notveryfortuitously";i:6590;s:12:"notfortunate";i:6591;s:16:"notveryfortunate";i:6592;s:14:"notfortunately";i:6593;s:18:"notveryfortunately";i:6594;s:10:"notfortune";i:6595;s:14:"notveryfortune";i:6596;s:11:"notfragrant";i:6597;s:15:"notveryfragrant";i:6598;s:8:"notfrank";i:6599;s:12:"notveryfrank";i:6600;s:10:"notfreedom";i:6601;s:14:"notveryfreedom";i:6602;s:11:"notfreedoms";i:6603;s:15:"notveryfreedoms";i:6604;s:8:"notfresh";i:6605;s:12:"notveryfresh";i:6606;s:9:"notfriend";i:6607;s:13:"notveryfriend";i:6608;s:15:"notfriendliness";i:6609;s:19:"notveryfriendliness";i:6610;s:11:"notfriendly";i:6611;s:15:"notveryfriendly";i:6612;s:10:"notfriends";i:6613;s:14:"notveryfriends";i:6614;s:13:"notfriendship";i:6615;s:17:"notveryfriendship";i:6616;s:9:"notfrolic";i:6617;s:13:"notveryfrolic";i:6618;s:14:"notfulfillment";i:6619;s:18:"notveryfulfillment";i:6620;s:15:"notfull-fledged";i:6621;s:19:"notveryfull-fledged";i:6622;s:13:"notfunctional";i:6623;s:17:"notveryfunctional";i:6624;s:9:"notgaiety";i:6625;s:13:"notverygaiety";i:6626;s:8:"notgaily";i:6627;s:12:"notverygaily";i:6628;s:7:"notgain";i:6629;s:11:"notverygain";i:6630;s:10:"notgainful";i:6631;s:14:"notverygainful";i:6632;s:12:"notgainfully";i:6633;s:16:"notverygainfully";i:6634;s:12:"notgallantly";i:6635;s:16:"notverygallantly";i:6636;s:9:"notgalore";i:6637;s:13:"notverygalore";i:6638;s:6:"notgem";i:6639;s:10:"notverygem";i:6640;s:7:"notgems";i:6641;s:11:"notverygems";i:6642;s:13:"notgenerosity";i:6643;s:17:"notverygenerosity";i:6644;s:13:"notgenerously";i:6645;s:17:"notverygenerously";i:6646;s:9:"notgenius";i:6647;s:13:"notverygenius";i:6648;s:10:"notgermane";i:6649;s:14:"notverygermane";i:6650;s:8:"notgiddy";i:6651;s:12:"notverygiddy";i:6652;s:9:"notgifted";i:6653;s:13:"notverygifted";i:6654;s:10:"notgladden";i:6655;s:14:"notverygladden";i:6656;s:9:"notgladly";i:6657;s:13:"notverygladly";i:6658;s:11:"notgladness";i:6659;s:15:"notverygladness";i:6660;s:12:"notglamorous";i:6661;s:16:"notveryglamorous";i:6662;s:7:"notglee";i:6663;s:11:"notveryglee";i:6664;s:12:"notgleefully";i:6665;s:16:"notverygleefully";i:6666;s:10:"notglimmer";i:6667;s:14:"notveryglimmer";i:6668;s:13:"notglimmering";i:6669;s:17:"notveryglimmering";i:6670;s:10:"notglisten";i:6671;s:14:"notveryglisten";i:6672;s:13:"notglistening";i:6673;s:17:"notveryglistening";i:6674;s:10:"notglitter";i:6675;s:14:"notveryglitter";i:6676;s:8:"notgloat";i:6677;s:12:"notverygloat";i:6678;s:10:"notglorify";i:6679;s:14:"notveryglorify";i:6680;s:11:"notglorious";i:6681;s:15:"notveryglorious";i:6682;s:13:"notgloriously";i:6683;s:17:"notverygloriously";i:6684;s:8:"notglory";i:6685;s:12:"notveryglory";i:6686;s:9:"notglossy";i:6687;s:13:"notveryglossy";i:6688;s:7:"notglow";i:6689;s:11:"notveryglow";i:6690;s:10:"notglowing";i:6691;s:14:"notveryglowing";i:6692;s:12:"notglowingly";i:6693;s:16:"notveryglowingly";i:6694;s:11:"notgo-ahead";i:6695;s:15:"notverygo-ahead";i:6696;s:12:"notgod-given";i:6697;s:16:"notverygod-given";i:6698;s:10:"notgodlike";i:6699;s:14:"notverygodlike";i:6700;s:7:"notgold";i:6701;s:11:"notverygold";i:6702;s:9:"notgolden";i:6703;s:13:"notverygolden";i:6704;s:9:"notgoodly";i:6705;s:13:"notverygoodly";i:6706;s:11:"notgoodness";i:6707;s:15:"notverygoodness";i:6708;s:11:"notgoodwill";i:6709;s:15:"notverygoodwill";i:6710;s:13:"notgorgeously";i:6711;s:17:"notverygorgeously";i:6712;s:8:"notgrace";i:6713;s:12:"notverygrace";i:6714;s:11:"notgraceful";i:6715;s:15:"notverygraceful";i:6716;s:13:"notgracefully";i:6717;s:17:"notverygracefully";i:6718;s:13:"notgraciously";i:6719;s:17:"notverygraciously";i:6720;s:15:"notgraciousness";i:6721;s:19:"notverygraciousness";i:6722;s:8:"notgrail";i:6723;s:12:"notverygrail";i:6724;s:11:"notgrandeur";i:6725;s:15:"notverygrandeur";i:6726;s:13:"notgratefully";i:6727;s:17:"notverygratefully";i:6728;s:16:"notgratification";i:6729;s:20:"notverygratification";i:6730;s:10:"notgratify";i:6731;s:14:"notverygratify";i:6732;s:13:"notgratifying";i:6733;s:17:"notverygratifying";i:6734;s:15:"notgratifyingly";i:6735;s:19:"notverygratifyingly";i:6736;s:12:"notgratitude";i:6737;s:16:"notverygratitude";i:6738;s:11:"notgreatest";i:6739;s:15:"notverygreatest";i:6740;s:12:"notgreatness";i:6741;s:16:"notverygreatness";i:6742;s:8:"notgreet";i:6743;s:12:"notverygreet";i:6744;s:7:"notgrin";i:6745;s:11:"notverygrin";i:6746;s:7:"notgrit";i:6747;s:11:"notverygrit";i:6748;s:9:"notgroove";i:6749;s:13:"notverygroove";i:6750;s:17:"notgroundbreaking";i:6751;s:21:"notverygroundbreaking";i:6752;s:12:"notguarantee";i:6753;s:16:"notveryguarantee";i:6754;s:11:"notguardian";i:6755;s:15:"notveryguardian";i:6756;s:11:"notguidance";i:6757;s:15:"notveryguidance";i:6758;s:12:"notguiltless";i:6759;s:16:"notveryguiltless";i:6760;s:7:"notgush";i:6761;s:11:"notverygush";i:6762;s:11:"notgumption";i:6763;s:15:"notverygumption";i:6764;s:8:"notgusto";i:6765;s:12:"notverygusto";i:6766;s:8:"notgutsy";i:6767;s:12:"notverygutsy";i:6768;s:7:"nothail";i:6769;s:11:"notveryhail";i:6770;s:10:"nothalcyon";i:6771;s:14:"notveryhalcyon";i:6772;s:7:"nothale";i:6773;s:11:"notveryhale";i:6774;s:11:"nothallowed";i:6775;s:15:"notveryhallowed";i:6776;s:10:"nothandily";i:6777;s:14:"notveryhandily";i:6778;s:11:"nothandsome";i:6779;s:15:"notveryhandsome";i:6780;s:9:"nothanker";i:6781;s:13:"notveryhanker";i:6782;s:10:"nothappily";i:6783;s:14:"notveryhappily";i:6784;s:12:"nothappiness";i:6785;s:16:"notveryhappiness";i:6786;s:15:"nothard-working";i:6787;s:19:"notveryhard-working";i:6788;s:10:"nothardier";i:6789;s:14:"notveryhardier";i:6790;s:11:"notharmless";i:6791;s:15:"notveryharmless";i:6792;s:15:"notharmoniously";i:6793;s:19:"notveryharmoniously";i:6794;s:12:"notharmonize";i:6795;s:16:"notveryharmonize";i:6796;s:10:"notharmony";i:6797;s:14:"notveryharmony";i:6798;s:8:"nothaven";i:6799;s:12:"notveryhaven";i:6800;s:10:"notheadway";i:6801;s:14:"notveryheadway";i:6802;s:8:"notheady";i:6803;s:12:"notveryheady";i:6804;s:7:"notheal";i:6805;s:11:"notveryheal";i:6806;s:12:"nothealthful";i:6807;s:16:"notveryhealthful";i:6808;s:8:"notheart";i:6809;s:12:"notveryheart";i:6810;s:10:"nothearten";i:6811;s:14:"notveryhearten";i:6812;s:13:"notheartening";i:6813;s:17:"notveryheartening";i:6814;s:12:"notheartfelt";i:6815;s:16:"notveryheartfelt";i:6816;s:11:"notheartily";i:6817;s:15:"notveryheartily";i:6818;s:15:"notheartwarming";i:6819;s:19:"notveryheartwarming";i:6820;s:9:"notheaven";i:6821;s:13:"notveryheaven";i:6822;s:9:"notherald";i:6823;s:13:"notveryherald";i:6824;s:7:"nothero";i:6825;s:11:"notveryhero";i:6826;s:13:"notheroically";i:6827;s:17:"notveryheroically";i:6828;s:10:"notheroine";i:6829;s:14:"notveryheroine";i:6830;s:10:"notheroize";i:6831;s:14:"notveryheroize";i:6832;s:8:"notheros";i:6833;s:12:"notveryheros";i:6834;s:15:"nothigh-quality";i:6835;s:19:"notveryhigh-quality";i:6836;s:12:"nothighlight";i:6837;s:16:"notveryhighlight";i:6838;s:14:"nothilariously";i:6839;s:18:"notveryhilariously";i:6840;s:16:"nothilariousness";i:6841;s:20:"notveryhilariousness";i:6842;s:11:"nothilarity";i:6843;s:15:"notveryhilarity";i:6844;s:11:"nothistoric";i:6845;s:15:"notveryhistoric";i:6846;s:7:"notholy";i:6847;s:11:"notveryholy";i:6848;s:9:"nothomage";i:6849;s:13:"notveryhomage";i:6850;s:9:"nothonest";i:6851;s:13:"notveryhonest";i:6852;s:11:"nothonestly";i:6853;s:15:"notveryhonestly";i:6854;s:10:"nothonesty";i:6855;s:14:"notveryhonesty";i:6856;s:12:"nothoneymoon";i:6857;s:16:"notveryhoneymoon";i:6858;s:8:"nothonor";i:6859;s:12:"notveryhonor";i:6860;s:12:"nothonorable";i:6861;s:16:"notveryhonorable";i:6862;s:7:"nothope";i:6863;s:11:"notveryhope";i:6864;s:14:"nothopefulness";i:6865;s:18:"notveryhopefulness";i:6866;s:8:"nothopes";i:6867;s:12:"notveryhopes";i:6868;s:6:"nothot";i:6869;s:10:"notveryhot";i:6870;s:6:"nothug";i:6871;s:10:"notveryhug";i:6872;s:9:"nothumane";i:6873;s:13:"notveryhumane";i:6874;s:12:"nothumanists";i:6875;s:16:"notveryhumanists";i:6876;s:11:"nothumanity";i:6877;s:15:"notveryhumanity";i:6878;s:12:"nothumankind";i:6879;s:16:"notveryhumankind";i:6880;s:9:"nothumble";i:6881;s:13:"notveryhumble";i:6882;s:11:"nothumility";i:6883;s:15:"notveryhumility";i:6884;s:8:"nothumor";i:6885;s:12:"notveryhumor";i:6886;s:13:"nothumorously";i:6887;s:17:"notveryhumorously";i:6888;s:9:"nothumour";i:6889;s:13:"notveryhumour";i:6890;s:12:"nothumourous";i:6891;s:16:"notveryhumourous";i:6892;s:8:"notideal";i:6893;s:12:"notveryideal";i:6894;s:11:"notidealism";i:6895;s:15:"notveryidealism";i:6896;s:11:"notidealist";i:6897;s:15:"notveryidealist";i:6898;s:11:"notidealize";i:6899;s:15:"notveryidealize";i:6900;s:10:"notideally";i:6901;s:14:"notveryideally";i:6902;s:7:"notidol";i:6903;s:11:"notveryidol";i:6904;s:10:"notidolize";i:6905;s:14:"notveryidolize";i:6906;s:11:"notidolized";i:6907;s:15:"notveryidolized";i:6908;s:10:"notidyllic";i:6909;s:14:"notveryidyllic";i:6910;s:13:"notilluminate";i:6911;s:17:"notveryilluminate";i:6912;s:13:"notilluminati";i:6913;s:17:"notveryilluminati";i:6914;s:15:"notilluminating";i:6915;s:19:"notveryilluminating";i:6916;s:11:"notillumine";i:6917;s:15:"notveryillumine";i:6918;s:14:"notillustrious";i:6919;s:18:"notveryillustrious";i:6920;s:15:"notimmaculately";i:6921;s:19:"notveryimmaculately";i:6922;s:15:"notimpartiality";i:6923;s:19:"notveryimpartiality";i:6924;s:14:"notimpartially";i:6925;s:18:"notveryimpartially";i:6926;s:14:"notimpassioned";i:6927;s:18:"notveryimpassioned";i:6928;s:13:"notimpeccable";i:6929;s:17:"notveryimpeccable";i:6930;s:13:"notimpeccably";i:6931;s:17:"notveryimpeccably";i:6932;s:8:"notimpel";i:6933;s:12:"notveryimpel";i:6934;s:11:"notimperial";i:6935;s:15:"notveryimperial";i:6936;s:16:"notimperturbable";i:6937;s:20:"notveryimperturbable";i:6938;s:13:"notimpervious";i:6939;s:17:"notveryimpervious";i:6940;s:10:"notimpetus";i:6941;s:14:"notveryimpetus";i:6942;s:13:"notimportance";i:6943;s:17:"notveryimportance";i:6944;s:14:"notimportantly";i:6945;s:18:"notveryimportantly";i:6946;s:14:"notimpregnable";i:6947;s:18:"notveryimpregnable";i:6948;s:10:"notimpress";i:6949;s:14:"notveryimpress";i:6950;s:13:"notimpression";i:6951;s:17:"notveryimpression";i:6952;s:14:"notimpressions";i:6953;s:18:"notveryimpressions";i:6954;s:15:"notimpressively";i:6955;s:19:"notveryimpressively";i:6956;s:17:"notimpressiveness";i:6957;s:21:"notveryimpressiveness";i:6958;s:12:"notimproving";i:6959;s:16:"notveryimproving";i:6960;s:10:"notimprove";i:6961;s:14:"notveryimprove";i:6962;s:11:"notimproved";i:6963;s:15:"notveryimproved";i:6964;s:14:"notimprovement";i:6965;s:18:"notveryimprovement";i:6966;s:12:"notimprovise";i:6967;s:16:"notveryimprovise";i:6968;s:14:"notinalienable";i:6969;s:18:"notveryinalienable";i:6970;s:11:"notincisive";i:6971;s:15:"notveryincisive";i:6972;s:13:"notincisively";i:6973;s:17:"notveryincisively";i:6974;s:15:"notincisiveness";i:6975;s:19:"notveryincisiveness";i:6976;s:14:"notinclination";i:6977;s:18:"notveryinclination";i:6978;s:15:"notinclinations";i:6979;s:19:"notveryinclinations";i:6980;s:11:"notinclined";i:6981;s:15:"notveryinclined";i:6982;s:12:"notinclusive";i:6983;s:16:"notveryinclusive";i:6984;s:16:"notincontestable";i:6985;s:20:"notveryincontestable";i:6986;s:19:"notincontrovertible";i:6987;s:23:"notveryincontrovertible";i:6988;s:16:"notincorruptible";i:6989;s:20:"notveryincorruptible";i:6990;s:13:"notincredible";i:6991;s:17:"notveryincredible";i:6992;s:13:"notincredibly";i:6993;s:17:"notveryincredibly";i:6994;s:11:"notindebted";i:6995;s:15:"notveryindebted";i:6996;s:16:"notindefatigable";i:6997;s:20:"notveryindefatigable";i:6998;s:12:"notindelible";i:6999;s:16:"notveryindelible";i:7000;s:12:"notindelibly";i:7001;s:16:"notveryindelibly";i:7002;s:15:"notindependence";i:7003;s:19:"notveryindependence";i:7004;s:16:"notindescribable";i:7005;s:20:"notveryindescribable";i:7006;s:16:"notindescribably";i:7007;s:20:"notveryindescribably";i:7008;s:17:"notindestructible";i:7009;s:21:"notveryindestructible";i:7010;s:16:"notindispensable";i:7011;s:20:"notveryindispensable";i:7012;s:19:"notindispensability";i:7013;s:23:"notveryindispensability";i:7014;s:15:"notindisputable";i:7015;s:19:"notveryindisputable";i:7016;s:16:"notindividuality";i:7017;s:20:"notveryindividuality";i:7018;s:14:"notindomitable";i:7019;s:18:"notveryindomitable";i:7020;s:14:"notindomitably";i:7021;s:18:"notveryindomitably";i:7022;s:14:"notindubitable";i:7023;s:18:"notveryindubitable";i:7024;s:14:"notindubitably";i:7025;s:18:"notveryindubitably";i:7026;s:13:"notindulgence";i:7027;s:17:"notveryindulgence";i:7028;s:12:"notindulgent";i:7029;s:16:"notveryindulgent";i:7030;s:14:"notinestimable";i:7031;s:18:"notveryinestimable";i:7032;s:14:"notinestimably";i:7033;s:18:"notveryinestimably";i:7034;s:14:"notinexpensive";i:7035;s:18:"notveryinexpensive";i:7036;s:13:"notinfallible";i:7037;s:17:"notveryinfallible";i:7038;s:13:"notinfallibly";i:7039;s:17:"notveryinfallibly";i:7040;s:16:"notinfallibility";i:7041;s:20:"notveryinfallibility";i:7042;s:14:"notinformative";i:7043;s:18:"notveryinformative";i:7044;s:14:"notingeniously";i:7045;s:18:"notveryingeniously";i:7046;s:12:"notingenuity";i:7047;s:16:"notveryingenuity";i:7048;s:12:"notingenuous";i:7049;s:16:"notveryingenuous";i:7050;s:14:"notingenuously";i:7051;s:18:"notveryingenuously";i:7052;s:13:"notingratiate";i:7053;s:17:"notveryingratiate";i:7054;s:15:"notingratiating";i:7055;s:19:"notveryingratiating";i:7056;s:17:"notingratiatingly";i:7057;s:21:"notveryingratiatingly";i:7058;s:12:"notinnocence";i:7059;s:16:"notveryinnocence";i:7060;s:13:"notinnocently";i:7061;s:17:"notveryinnocently";i:7062;s:12:"notinnocuous";i:7063;s:16:"notveryinnocuous";i:7064;s:13:"notinnovation";i:7065;s:17:"notveryinnovation";i:7066;s:13:"notinnovative";i:7067;s:17:"notveryinnovative";i:7068;s:14:"notinoffensive";i:7069;s:18:"notveryinoffensive";i:7070;s:14:"notinquisitive";i:7071;s:18:"notveryinquisitive";i:7072;s:10:"notinsight";i:7073;s:14:"notveryinsight";i:7074;s:13:"notinsightful";i:7075;s:17:"notveryinsightful";i:7076;s:15:"notinsightfully";i:7077;s:19:"notveryinsightfully";i:7078;s:9:"notinsist";i:7079;s:13:"notveryinsist";i:7080;s:13:"notinsistence";i:7081;s:17:"notveryinsistence";i:7082;s:12:"notinsistent";i:7083;s:16:"notveryinsistent";i:7084;s:14:"notinsistently";i:7085;s:18:"notveryinsistently";i:7086;s:14:"notinspiration";i:7087;s:18:"notveryinspiration";i:7088;s:16:"notinspirational";i:7089;s:20:"notveryinspirational";i:7090;s:10:"notinspire";i:7091;s:14:"notveryinspire";i:7092;s:12:"notinspiring";i:7093;s:16:"notveryinspiring";i:7094;s:14:"notinstructive";i:7095;s:18:"notveryinstructive";i:7096;s:15:"notinstrumental";i:7097;s:19:"notveryinstrumental";i:7098;s:9:"notintact";i:7099;s:13:"notveryintact";i:7100;s:11:"notintegral";i:7101;s:15:"notveryintegral";i:7102;s:12:"notintegrity";i:7103;s:16:"notveryintegrity";i:7104;s:15:"notintelligence";i:7105;s:19:"notveryintelligence";i:7106;s:15:"notintelligible";i:7107;s:19:"notveryintelligible";i:7108;s:12:"notintercede";i:7109;s:16:"notveryintercede";i:7110;s:11:"notinterest";i:7111;s:15:"notveryinterest";i:7112;s:13:"notinterested";i:7113;s:17:"notveryinterested";i:7114;s:14:"notinteresting";i:7115;s:18:"notveryinteresting";i:7116;s:12:"notinterests";i:7117;s:16:"notveryinterests";i:7118;s:11:"notintimacy";i:7119;s:15:"notveryintimacy";i:7120;s:11:"notintimate";i:7121;s:15:"notveryintimate";i:7122;s:12:"notintricate";i:7123;s:16:"notveryintricate";i:7124;s:11:"notintrigue";i:7125;s:15:"notveryintrigue";i:7126;s:13:"notintriguing";i:7127;s:17:"notveryintriguing";i:7128;s:15:"notintriguingly";i:7129;s:19:"notveryintriguingly";i:7130;s:13:"notinvaluable";i:7131;s:17:"notveryinvaluable";i:7132;s:15:"notinvaluablely";i:7133;s:19:"notveryinvaluablely";i:7134;s:13:"notinvigorate";i:7135;s:17:"notveryinvigorate";i:7136;s:15:"notinvigorating";i:7137;s:19:"notveryinvigorating";i:7138;s:16:"notinvincibility";i:7139;s:20:"notveryinvincibility";i:7140;s:13:"notinvincible";i:7141;s:17:"notveryinvincible";i:7142;s:13:"notinviolable";i:7143;s:17:"notveryinviolable";i:7144;s:12:"notinviolate";i:7145;s:16:"notveryinviolate";i:7146;s:15:"notinvulnerable";i:7147;s:19:"notveryinvulnerable";i:7148;s:14:"notirrefutable";i:7149;s:18:"notveryirrefutable";i:7150;s:14:"notirrefutably";i:7151;s:18:"notveryirrefutably";i:7152;s:17:"notirreproachable";i:7153;s:21:"notveryirreproachable";i:7154;s:15:"notirresistible";i:7155;s:19:"notveryirresistible";i:7156;s:15:"notirresistibly";i:7157;s:19:"notveryirresistibly";i:7158;s:11:"notjauntily";i:7159;s:15:"notveryjauntily";i:7160;s:9:"notjaunty";i:7161;s:13:"notveryjaunty";i:7162;s:7:"notjest";i:7163;s:11:"notveryjest";i:7164;s:7:"notjoke";i:7165;s:11:"notveryjoke";i:7166;s:10:"notjollify";i:7167;s:14:"notveryjollify";i:7168;s:9:"notjovial";i:7169;s:13:"notveryjovial";i:7170;s:6:"notjoy";i:7171;s:10:"notveryjoy";i:7172;s:11:"notjoyfully";i:7173;s:15:"notveryjoyfully";i:7174;s:9:"notjoyous";i:7175;s:13:"notveryjoyous";i:7176;s:11:"notjoyously";i:7177;s:15:"notveryjoyously";i:7178;s:13:"notjubilantly";i:7179;s:17:"notveryjubilantly";i:7180;s:11:"notjubilate";i:7181;s:15:"notveryjubilate";i:7182;s:13:"notjubilation";i:7183;s:17:"notveryjubilation";i:7184;s:12:"notjudicious";i:7185;s:16:"notveryjudicious";i:7186;s:10:"notjustice";i:7187;s:14:"notveryjustice";i:7188;s:14:"notjustifiable";i:7189;s:18:"notveryjustifiable";i:7190;s:14:"notjustifiably";i:7191;s:18:"notveryjustifiably";i:7192;s:16:"notjustification";i:7193;s:20:"notveryjustification";i:7194;s:10:"notjustify";i:7195;s:14:"notveryjustify";i:7196;s:9:"notjustly";i:7197;s:13:"notveryjustly";i:7198;s:9:"notkeenly";i:7199;s:13:"notverykeenly";i:7200;s:11:"notkeenness";i:7201;s:15:"notverykeenness";i:7202;s:7:"notkemp";i:7203;s:11:"notverykemp";i:7204;s:6:"notkid";i:7205;s:10:"notverykid";i:7206;s:7:"notkind";i:7207;s:11:"notverykind";i:7208;s:9:"notkindly";i:7209;s:13:"notverykindly";i:7210;s:13:"notkindliness";i:7211;s:17:"notverykindliness";i:7212;s:11:"notkindness";i:7213;s:15:"notverykindness";i:7214;s:12:"notkingmaker";i:7215;s:16:"notverykingmaker";i:7216;s:7:"notkiss";i:7217;s:11:"notverykiss";i:7218;s:8:"notlarge";i:7219;s:12:"notverylarge";i:7220;s:7:"notlark";i:7221;s:11:"notverylark";i:7222;s:7:"notlaud";i:7223;s:11:"notverylaud";i:7224;s:11:"notlaudably";i:7225;s:15:"notverylaudably";i:7226;s:9:"notlavish";i:7227;s:13:"notverylavish";i:7228;s:11:"notlavishly";i:7229;s:15:"notverylavishly";i:7230;s:14:"notlaw-abiding";i:7231;s:18:"notverylaw-abiding";i:7232;s:9:"notlawful";i:7233;s:13:"notverylawful";i:7234;s:11:"notlawfully";i:7235;s:15:"notverylawfully";i:7236;s:10:"notleading";i:7237;s:14:"notveryleading";i:7238;s:7:"notlean";i:7239;s:11:"notverylean";i:7240;s:11:"notlearning";i:7241;s:15:"notverylearning";i:7242;s:12:"notlegendary";i:7243;s:16:"notverylegendary";i:7244;s:13:"notlegitimacy";i:7245;s:17:"notverylegitimacy";i:7246;s:13:"notlegitimate";i:7247;s:17:"notverylegitimate";i:7248;s:15:"notlegitimately";i:7249;s:19:"notverylegitimately";i:7250;s:12:"notleniently";i:7251;s:16:"notveryleniently";i:7252;s:17:"notless-expensive";i:7253;s:21:"notveryless-expensive";i:7254;s:11:"notleverage";i:7255;s:15:"notveryleverage";i:7256;s:9:"notlevity";i:7257;s:13:"notverylevity";i:7258;s:13:"notliberation";i:7259;s:17:"notveryliberation";i:7260;s:13:"notliberalism";i:7261;s:17:"notveryliberalism";i:7262;s:12:"notliberally";i:7263;s:16:"notveryliberally";i:7264;s:11:"notliberate";i:7265;s:15:"notveryliberate";i:7266;s:10:"notliberty";i:7267;s:14:"notveryliberty";i:7268;s:12:"notlifeblood";i:7269;s:16:"notverylifeblood";i:7270;s:11:"notlifelong";i:7271;s:15:"notverylifelong";i:7272;s:16:"notlight-hearted";i:7273;s:20:"notverylight-hearted";i:7274;s:10:"notlighten";i:7275;s:14:"notverylighten";i:7276;s:10:"notlikable";i:7277;s:14:"notverylikable";i:7278;s:9:"notliking";i:7279;s:13:"notveryliking";i:7280;s:14:"notlionhearted";i:7281;s:18:"notverylionhearted";i:7282;s:11:"notliterate";i:7283;s:15:"notveryliterate";i:7284;s:7:"notlive";i:7285;s:11:"notverylive";i:7286;s:8:"notlofty";i:7287;s:12:"notverylofty";i:7288;s:10:"notlovable";i:7289;s:14:"notverylovable";i:7290;s:10:"notlovably";i:7291;s:14:"notverylovably";i:7292;s:7:"notlove";i:7293;s:11:"notverylove";i:7294;s:13:"notloveliness";i:7295;s:17:"notveryloveliness";i:7296;s:8:"notlover";i:7297;s:12:"notverylover";i:7298;s:11:"notlow-cost";i:7299;s:15:"notverylow-cost";i:7300;s:11:"notlow-risk";i:7301;s:15:"notverylow-risk";i:7302;s:15:"notlower-priced";i:7303;s:19:"notverylower-priced";i:7304;s:10:"notloyalty";i:7305;s:14:"notveryloyalty";i:7306;s:10:"notlucidly";i:7307;s:14:"notverylucidly";i:7308;s:7:"notluck";i:7309;s:11:"notveryluck";i:7310;s:10:"notluckier";i:7311;s:14:"notveryluckier";i:7312;s:11:"notluckiest";i:7313;s:15:"notveryluckiest";i:7314;s:10:"notluckily";i:7315;s:14:"notveryluckily";i:7316;s:12:"notluckiness";i:7317;s:16:"notveryluckiness";i:7318;s:12:"notlucrative";i:7319;s:16:"notverylucrative";i:7320;s:7:"notlush";i:7321;s:11:"notverylush";i:7322;s:7:"notlust";i:7323;s:11:"notverylust";i:7324;s:9:"notluster";i:7325;s:13:"notveryluster";i:7326;s:11:"notlustrous";i:7327;s:15:"notverylustrous";i:7328;s:12:"notluxuriant";i:7329;s:16:"notveryluxuriant";i:7330;s:12:"notluxuriate";i:7331;s:16:"notveryluxuriate";i:7332;s:12:"notluxurious";i:7333;s:16:"notveryluxurious";i:7334;s:14:"notluxuriously";i:7335;s:18:"notveryluxuriously";i:7336;s:9:"notluxury";i:7337;s:13:"notveryluxury";i:7338;s:10:"notlyrical";i:7339;s:14:"notverylyrical";i:7340;s:8:"notmagic";i:7341;s:12:"notverymagic";i:7342;s:10:"notmagical";i:7343;s:14:"notverymagical";i:7344;s:14:"notmagnanimous";i:7345;s:18:"notverymagnanimous";i:7346;s:16:"notmagnanimously";i:7347;s:20:"notverymagnanimously";i:7348;s:15:"notmagnificence";i:7349;s:19:"notverymagnificence";i:7350;s:14:"notmagnificent";i:7351;s:18:"notverymagnificent";i:7352;s:16:"notmagnificently";i:7353;s:20:"notverymagnificently";i:7354;s:10:"notmagnify";i:7355;s:14:"notverymagnify";i:7356;s:11:"notmajestic";i:7357;s:15:"notverymajestic";i:7358;s:10:"notmajesty";i:7359;s:14:"notverymajesty";i:7360;s:13:"notmanageable";i:7361;s:17:"notverymanageable";i:7362;s:11:"notmanifest";i:7363;s:15:"notverymanifest";i:7364;s:8:"notmanly";i:7365;s:12:"notverymanly";i:7366;s:11:"notmannerly";i:7367;s:15:"notverymannerly";i:7368;s:9:"notmarvel";i:7369;s:13:"notverymarvel";i:7370;s:13:"notmarvellous";i:7371;s:17:"notverymarvellous";i:7372;s:12:"notmarvelous";i:7373;s:16:"notverymarvelous";i:7374;s:14:"notmarvelously";i:7375;s:18:"notverymarvelously";i:7376;s:16:"notmarvelousness";i:7377;s:20:"notverymarvelousness";i:7378;s:10:"notmarvels";i:7379;s:14:"notverymarvels";i:7380;s:9:"notmaster";i:7381;s:13:"notverymaster";i:7382;s:12:"notmasterful";i:7383;s:16:"notverymasterful";i:7384;s:14:"notmasterfully";i:7385;s:18:"notverymasterfully";i:7386;s:14:"notmasterpiece";i:7387;s:18:"notverymasterpiece";i:7388;s:15:"notmasterpieces";i:7389;s:19:"notverymasterpieces";i:7390;s:10:"notmasters";i:7391;s:14:"notverymasters";i:7392;s:10:"notmastery";i:7393;s:14:"notverymastery";i:7394;s:12:"notmatchless";i:7395;s:16:"notverymatchless";i:7396;s:11:"notmaturely";i:7397;s:15:"notverymaturely";i:7398;s:11:"notmaturity";i:7399;s:15:"notverymaturity";i:7400;s:11:"notmaximize";i:7401;s:15:"notverymaximize";i:7402;s:13:"notmeaningful";i:7403;s:17:"notverymeaningful";i:7404;s:7:"notmeek";i:7405;s:11:"notverymeek";i:7406;s:9:"notmellow";i:7407;s:13:"notverymellow";i:7408;s:12:"notmemorable";i:7409;s:16:"notverymemorable";i:7410;s:14:"notmemorialize";i:7411;s:18:"notverymemorialize";i:7412;s:7:"notmend";i:7413;s:11:"notverymend";i:7414;s:9:"notmentor";i:7415;s:13:"notverymentor";i:7416;s:13:"notmercifully";i:7417;s:17:"notverymercifully";i:7418;s:8:"notmercy";i:7419;s:12:"notverymercy";i:7420;s:8:"notmerit";i:7421;s:12:"notverymerit";i:7422;s:10:"notmerrily";i:7423;s:14:"notverymerrily";i:7424;s:12:"notmerriment";i:7425;s:16:"notverymerriment";i:7426;s:12:"notmerriness";i:7427;s:16:"notverymerriness";i:7428;s:12:"notmesmerize";i:7429;s:16:"notverymesmerize";i:7430;s:14:"notmesmerizing";i:7431;s:18:"notverymesmerizing";i:7432;s:16:"notmesmerizingly";i:7433;s:20:"notverymesmerizingly";i:7434;s:13:"notmeticulous";i:7435;s:17:"notverymeticulous";i:7436;s:15:"notmeticulously";i:7437;s:19:"notverymeticulously";i:7438;s:11:"notmightily";i:7439;s:15:"notverymightily";i:7440;s:9:"notmighty";i:7441;s:13:"notverymighty";i:7442;s:11:"notminister";i:7443;s:15:"notveryminister";i:7444;s:10:"notmiracle";i:7445;s:14:"notverymiracle";i:7446;s:11:"notmiracles";i:7447;s:15:"notverymiracles";i:7448;s:13:"notmiraculous";i:7449;s:17:"notverymiraculous";i:7450;s:15:"notmiraculously";i:7451;s:19:"notverymiraculously";i:7452;s:17:"notmiraculousness";i:7453;s:21:"notverymiraculousness";i:7454;s:8:"notmirth";i:7455;s:12:"notverymirth";i:7456;s:13:"notmoderation";i:7457;s:17:"notverymoderation";i:7458;s:9:"notmodern";i:7459;s:13:"notverymodern";i:7460;s:10:"notmodesty";i:7461;s:14:"notverymodesty";i:7462;s:10:"notmollify";i:7463;s:14:"notverymollify";i:7464;s:12:"notmomentous";i:7465;s:16:"notverymomentous";i:7466;s:13:"notmonumental";i:7467;s:17:"notverymonumental";i:7468;s:15:"notmonumentally";i:7469;s:19:"notverymonumentally";i:7470;s:11:"notmorality";i:7471;s:15:"notverymorality";i:7472;s:11:"notmoralize";i:7473;s:15:"notverymoralize";i:7474;s:11:"notmotivate";i:7475;s:15:"notverymotivate";i:7476;s:12:"notmotivated";i:7477;s:16:"notverymotivated";i:7478;s:13:"notmotivation";i:7479;s:17:"notverymotivation";i:7480;s:9:"notmoving";i:7481;s:13:"notverymoving";i:7482;s:9:"notmyriad";i:7483;s:13:"notverymyriad";i:7484;s:12:"notnaturally";i:7485;s:16:"notverynaturally";i:7486;s:12:"notnavigable";i:7487;s:16:"notverynavigable";i:7488;s:7:"notneat";i:7489;s:11:"notveryneat";i:7490;s:9:"notneatly";i:7491;s:13:"notveryneatly";i:7492;s:14:"notnecessarily";i:7493;s:18:"notverynecessarily";i:7494;s:13:"notneutralize";i:7495;s:17:"notveryneutralize";i:7496;s:9:"notnicely";i:7497;s:13:"notverynicely";i:7498;s:8:"notnifty";i:7499;s:12:"notverynifty";i:7500;s:8:"notnobly";i:7501;s:12:"notverynobly";i:7502;s:15:"notnon-violence";i:7503;s:19:"notverynon-violence";i:7504;s:14:"notnon-violent";i:7505;s:18:"notverynon-violent";i:7506;s:9:"notnormal";i:7507;s:13:"notverynormal";i:7508;s:10:"notnotable";i:7509;s:14:"notverynotable";i:7510;s:10:"notnotably";i:7511;s:14:"notverynotably";i:7512;s:13:"notnoteworthy";i:7513;s:17:"notverynoteworthy";i:7514;s:13:"notnoticeable";i:7515;s:17:"notverynoticeable";i:7516;s:10:"notnourish";i:7517;s:14:"notverynourish";i:7518;s:14:"notnourishment";i:7519;s:18:"notverynourishment";i:7520;s:10:"notnurture";i:7521;s:14:"notverynurture";i:7522;s:12:"notnurturing";i:7523;s:16:"notverynurturing";i:7524;s:8:"notoasis";i:7525;s:12:"notveryoasis";i:7526;s:12:"notobedience";i:7527;s:16:"notveryobedience";i:7528;s:11:"notobedient";i:7529;s:15:"notveryobedient";i:7530;s:13:"notobediently";i:7531;s:17:"notveryobediently";i:7532;s:7:"notobey";i:7533;s:11:"notveryobey";i:7534;s:12:"notobjective";i:7535;s:16:"notveryobjective";i:7536;s:14:"notobjectively";i:7537;s:18:"notveryobjectively";i:7538;s:10:"notobliged";i:7539;s:14:"notveryobliged";i:7540;s:10:"notobviate";i:7541;s:14:"notveryobviate";i:7542;s:10:"notoffbeat";i:7543;s:14:"notveryoffbeat";i:7544;s:9:"notoffset";i:7545;s:13:"notveryoffset";i:7546;s:9:"notonward";i:7547;s:13:"notveryonward";i:7548;s:7:"notopen";i:7549;s:11:"notveryopen";i:7550;s:9:"notopenly";i:7551;s:13:"notveryopenly";i:7552;s:11:"notopenness";i:7553;s:15:"notveryopenness";i:7554;s:12:"notopportune";i:7555;s:16:"notveryopportune";i:7556;s:14:"notopportunity";i:7557;s:18:"notveryopportunity";i:7558;s:10:"notoptimal";i:7559;s:14:"notveryoptimal";i:7560;s:11:"notoptimism";i:7561;s:15:"notveryoptimism";i:7562;s:13:"notoptimistic";i:7563;s:17:"notveryoptimistic";i:7564;s:10:"notopulent";i:7565;s:14:"notveryopulent";i:7566;s:10:"notorderly";i:7567;s:14:"notveryorderly";i:7568;s:14:"notoriginality";i:7569;s:18:"notveryoriginality";i:7570;s:8:"notoutdo";i:7571;s:12:"notveryoutdo";i:7572;s:11:"notoutgoing";i:7573;s:15:"notveryoutgoing";i:7574;s:11:"notoutshine";i:7575;s:15:"notveryoutshine";i:7576;s:11:"notoutsmart";i:7577;s:15:"notveryoutsmart";i:7578;s:14:"notoutstanding";i:7579;s:18:"notveryoutstanding";i:7580;s:16:"notoutstandingly";i:7581;s:20:"notveryoutstandingly";i:7582;s:11:"notoutstrip";i:7583;s:15:"notveryoutstrip";i:7584;s:9:"notoutwit";i:7585;s:13:"notveryoutwit";i:7586;s:10:"notovation";i:7587;s:14:"notveryovation";i:7588;s:15:"notoverachiever";i:7589;s:19:"notveryoverachiever";i:7590;s:12:"notoverjoyed";i:7591;s:16:"notveryoverjoyed";i:7592;s:11:"notoverture";i:7593;s:15:"notveryoverture";i:7594;s:11:"notpacifist";i:7595;s:15:"notverypacifist";i:7596;s:12:"notpacifists";i:7597;s:16:"notverypacifists";i:7598;s:11:"notpainless";i:7599;s:15:"notverypainless";i:7600;s:13:"notpainlessly";i:7601;s:17:"notverypainlessly";i:7602;s:14:"notpainstaking";i:7603;s:18:"notverypainstaking";i:7604;s:16:"notpainstakingly";i:7605;s:20:"notverypainstakingly";i:7606;s:12:"notpalatable";i:7607;s:16:"notverypalatable";i:7608;s:11:"notpalatial";i:7609;s:15:"notverypalatial";i:7610;s:11:"notpalliate";i:7611;s:15:"notverypalliate";i:7612;s:9:"notpamper";i:7613;s:13:"notverypamper";i:7614;s:11:"notparadise";i:7615;s:15:"notveryparadise";i:7616;s:12:"notparamount";i:7617;s:16:"notveryparamount";i:7618;s:9:"notpardon";i:7619;s:13:"notverypardon";i:7620;s:10:"notpassion";i:7621;s:14:"notverypassion";i:7622;s:15:"notpassionately";i:7623;s:19:"notverypassionately";i:7624;s:11:"notpatience";i:7625;s:15:"notverypatience";i:7626;s:10:"notpatient";i:7627;s:14:"notverypatient";i:7628;s:12:"notpatiently";i:7629;s:16:"notverypatiently";i:7630;s:10:"notpatriot";i:7631;s:14:"notverypatriot";i:7632;s:12:"notpatriotic";i:7633;s:16:"notverypatriotic";i:7634;s:8:"notpeace";i:7635;s:12:"notverypeace";i:7636;s:12:"notpeaceable";i:7637;s:16:"notverypeaceable";i:7638;s:13:"notpeacefully";i:7639;s:17:"notverypeacefully";i:7640;s:15:"notpeacekeepers";i:7641;s:19:"notverypeacekeepers";i:7642;s:11:"notpeerless";i:7643;s:15:"notverypeerless";i:7644;s:14:"notpenetrating";i:7645;s:18:"notverypenetrating";i:7646;s:11:"notpenitent";i:7647;s:15:"notverypenitent";i:7648;s:13:"notperceptive";i:7649;s:17:"notveryperceptive";i:7650;s:13:"notperfection";i:7651;s:17:"notveryperfection";i:7652;s:12:"notperfectly";i:7653;s:16:"notveryperfectly";i:7654;s:14:"notpermissible";i:7655;s:18:"notverypermissible";i:7656;s:15:"notperseverance";i:7657;s:19:"notveryperseverance";i:7658;s:12:"notpersevere";i:7659;s:16:"notverypersevere";i:7660;s:13:"notpersistent";i:7661;s:17:"notverypersistent";i:7662;s:13:"notpersonages";i:7663;s:17:"notverypersonages";i:7664;s:14:"notpersonality";i:7665;s:18:"notverypersonality";i:7666;s:14:"notperspicuous";i:7667;s:18:"notveryperspicuous";i:7668;s:16:"notperspicuously";i:7669;s:20:"notveryperspicuously";i:7670;s:11:"notpersuade";i:7671;s:15:"notverypersuade";i:7672;s:15:"notpersuasively";i:7673;s:19:"notverypersuasively";i:7674;s:12:"notpertinent";i:7675;s:16:"notverypertinent";i:7676;s:13:"notphenomenal";i:7677;s:17:"notveryphenomenal";i:7678;s:15:"notphenomenally";i:7679;s:19:"notveryphenomenally";i:7680;s:14:"notpicturesque";i:7681;s:18:"notverypicturesque";i:7682;s:8:"notpiety";i:7683;s:12:"notverypiety";i:7684;s:9:"notpillar";i:7685;s:13:"notverypillar";i:7686;s:11:"notpinnacle";i:7687;s:15:"notverypinnacle";i:7688;s:8:"notpious";i:7689;s:12:"notverypious";i:7690;s:8:"notpithy";i:7691;s:12:"notverypithy";i:7692;s:10:"notplacate";i:7693;s:14:"notveryplacate";i:7694;s:9:"notplacid";i:7695;s:13:"notveryplacid";i:7696;s:10:"notplainly";i:7697;s:14:"notveryplainly";i:7698;s:15:"notplausibility";i:7699;s:19:"notveryplausibility";i:7700;s:12:"notplausible";i:7701;s:16:"notveryplausible";i:7702;s:12:"notplayfully";i:7703;s:16:"notveryplayfully";i:7704;s:13:"notpleasantly";i:7705;s:17:"notverypleasantly";i:7706;s:10:"notpleased";i:7707;s:14:"notverypleased";i:7708;s:11:"notpleasing";i:7709;s:15:"notverypleasing";i:7710;s:13:"notpleasingly";i:7711;s:17:"notverypleasingly";i:7712;s:14:"notpleasurable";i:7713;s:18:"notverypleasurable";i:7714;s:14:"notpleasurably";i:7715;s:18:"notverypleasurably";i:7716;s:11:"notpleasure";i:7717;s:15:"notverypleasure";i:7718;s:9:"notpledge";i:7719;s:13:"notverypledge";i:7720;s:10:"notpledges";i:7721;s:14:"notverypledges";i:7722;s:12:"notplentiful";i:7723;s:16:"notveryplentiful";i:7724;s:9:"notplenty";i:7725;s:13:"notveryplenty";i:7726;s:8:"notplush";i:7727;s:12:"notveryplush";i:7728;s:12:"notpoeticize";i:7729;s:16:"notverypoeticize";i:7730;s:11:"notpoignant";i:7731;s:15:"notverypoignant";i:7732;s:8:"notpoise";i:7733;s:12:"notverypoise";i:7734;s:9:"notpoised";i:7735;s:13:"notverypoised";i:7736;s:9:"notpolite";i:7737;s:13:"notverypolite";i:7738;s:13:"notpoliteness";i:7739;s:17:"notverypoliteness";i:7740;s:10:"notpopular";i:7741;s:14:"notverypopular";i:7742;s:13:"notpopularity";i:7743;s:17:"notverypopularity";i:7744;s:11:"notportable";i:7745;s:15:"notveryportable";i:7746;s:7:"notposh";i:7747;s:11:"notveryposh";i:7748;s:15:"notpositiveness";i:7749;s:19:"notverypositiveness";i:7750;s:13:"notpositively";i:7751;s:17:"notverypositively";i:7752;s:12:"notposterity";i:7753;s:16:"notveryposterity";i:7754;s:9:"notpotent";i:7755;s:13:"notverypotent";i:7756;s:12:"notpotential";i:7757;s:16:"notverypotential";i:7758;s:13:"notpowerfully";i:7759;s:17:"notverypowerfully";i:7760;s:14:"notpracticable";i:7761;s:18:"notverypracticable";i:7762;s:9:"notpraise";i:7763;s:13:"notverypraise";i:7764;s:15:"notpraiseworthy";i:7765;s:19:"notverypraiseworthy";i:7766;s:11:"notpraising";i:7767;s:15:"notverypraising";i:7768;s:14:"notpre-eminent";i:7769;s:18:"notverypre-eminent";i:7770;s:9:"notpreach";i:7771;s:13:"notverypreach";i:7772;s:12:"notpreaching";i:7773;s:16:"notverypreaching";i:7774;s:13:"notprecaution";i:7775;s:17:"notveryprecaution";i:7776;s:14:"notprecautions";i:7777;s:18:"notveryprecautions";i:7778;s:12:"notprecedent";i:7779;s:16:"notveryprecedent";i:7780;s:10:"notprecise";i:7781;s:14:"notveryprecise";i:7782;s:12:"notprecisely";i:7783;s:16:"notveryprecisely";i:7784;s:12:"notprecision";i:7785;s:16:"notveryprecision";i:7786;s:13:"notpreeminent";i:7787;s:17:"notverypreeminent";i:7788;s:13:"notpreemptive";i:7789;s:17:"notverypreemptive";i:7790;s:9:"notprefer";i:7791;s:13:"notveryprefer";i:7792;s:13:"notpreferable";i:7793;s:17:"notverypreferable";i:7794;s:13:"notpreferably";i:7795;s:17:"notverypreferably";i:7796;s:13:"notpreference";i:7797;s:17:"notverypreference";i:7798;s:14:"notpreferences";i:7799;s:18:"notverypreferences";i:7800;s:10:"notpremier";i:7801;s:14:"notverypremier";i:7802;s:10:"notpremium";i:7803;s:14:"notverypremium";i:7804;s:11:"notprepared";i:7805;s:15:"notveryprepared";i:7806;s:16:"notpreponderance";i:7807;s:20:"notverypreponderance";i:7808;s:8:"notpress";i:7809;s:12:"notverypress";i:7810;s:11:"notprestige";i:7811;s:15:"notveryprestige";i:7812;s:14:"notprestigious";i:7813;s:18:"notveryprestigious";i:7814;s:11:"notprettily";i:7815;s:15:"notveryprettily";i:7816;s:9:"notpretty";i:7817;s:13:"notverypretty";i:7818;s:8:"notpride";i:7819;s:12:"notverypride";i:7820;s:12:"notprinciple";i:7821;s:16:"notveryprinciple";i:7822;s:13:"notprincipled";i:7823;s:17:"notveryprincipled";i:7824;s:12:"notprivilege";i:7825;s:16:"notveryprivilege";i:7826;s:8:"notprize";i:7827;s:12:"notveryprize";i:7828;s:6:"notpro";i:7829;s:10:"notverypro";i:7830;s:15:"notpro-american";i:7831;s:19:"notverypro-american";i:7832;s:14:"notpro-beijing";i:7833;s:18:"notverypro-beijing";i:7834;s:11:"notpro-cuba";i:7835;s:15:"notverypro-cuba";i:7836;s:12:"notpro-peace";i:7837;s:16:"notverypro-peace";i:7838;s:12:"notproactive";i:7839;s:16:"notveryproactive";i:7840;s:13:"notprodigious";i:7841;s:17:"notveryprodigious";i:7842;s:15:"notprodigiously";i:7843;s:19:"notveryprodigiously";i:7844;s:10:"notprodigy";i:7845;s:14:"notveryprodigy";i:7846;s:10:"notprofess";i:7847;s:14:"notveryprofess";i:7848;s:13:"notproficient";i:7849;s:17:"notveryproficient";i:7850;s:15:"notproficiently";i:7851;s:19:"notveryproficiently";i:7852;s:9:"notprofit";i:7853;s:13:"notveryprofit";i:7854;s:13:"notprofitable";i:7855;s:17:"notveryprofitable";i:7856;s:13:"notprofoundly";i:7857;s:17:"notveryprofoundly";i:7858;s:10:"notprofuse";i:7859;s:14:"notveryprofuse";i:7860;s:12:"notprofusely";i:7861;s:16:"notveryprofusely";i:7862;s:12:"notprofusion";i:7863;s:16:"notveryprofusion";i:7864;s:11:"notprogress";i:7865;s:15:"notveryprogress";i:7866;s:12:"notprominent";i:7867;s:16:"notveryprominent";i:7868;s:13:"notprominence";i:7869;s:17:"notveryprominence";i:7870;s:10:"notpromise";i:7871;s:14:"notverypromise";i:7872;s:12:"notpromising";i:7873;s:16:"notverypromising";i:7874;s:11:"notpromoter";i:7875;s:15:"notverypromoter";i:7876;s:11:"notpromptly";i:7877;s:15:"notverypromptly";i:7878;s:11:"notproperly";i:7879;s:15:"notveryproperly";i:7880;s:13:"notpropitious";i:7881;s:17:"notverypropitious";i:7882;s:15:"notpropitiously";i:7883;s:19:"notverypropitiously";i:7884;s:11:"notprospect";i:7885;s:15:"notveryprospect";i:7886;s:12:"notprospects";i:7887;s:16:"notveryprospects";i:7888;s:10:"notprosper";i:7889;s:14:"notveryprosper";i:7890;s:13:"notprosperity";i:7891;s:17:"notveryprosperity";i:7892;s:13:"notprosperous";i:7893;s:17:"notveryprosperous";i:7894;s:10:"notprotect";i:7895;s:14:"notveryprotect";i:7896;s:13:"notprotection";i:7897;s:17:"notveryprotection";i:7898;s:13:"notprotective";i:7899;s:17:"notveryprotective";i:7900;s:12:"notprotector";i:7901;s:16:"notveryprotector";i:7902;s:8:"notproud";i:7903;s:12:"notveryproud";i:7904;s:13:"notprovidence";i:7905;s:17:"notveryprovidence";i:7906;s:10:"notprowess";i:7907;s:14:"notveryprowess";i:7908;s:11:"notprudence";i:7909;s:15:"notveryprudence";i:7910;s:12:"notprudently";i:7911;s:16:"notveryprudently";i:7912;s:10:"notpundits";i:7913;s:14:"notverypundits";i:7914;s:7:"notpure";i:7915;s:11:"notverypure";i:7916;s:15:"notpurification";i:7917;s:19:"notverypurification";i:7918;s:9:"notpurify";i:7919;s:13:"notverypurify";i:7920;s:9:"notpurity";i:7921;s:13:"notverypurity";i:7922;s:9:"notquaint";i:7923;s:13:"notveryquaint";i:7924;s:12:"notqualified";i:7925;s:16:"notveryqualified";i:7926;s:10:"notqualify";i:7927;s:14:"notveryqualify";i:7928;s:13:"notquasi-ally";i:7929;s:17:"notveryquasi-ally";i:7930;s:9:"notquench";i:7931;s:13:"notveryquench";i:7932;s:10:"notquicken";i:7933;s:14:"notveryquicken";i:7934;s:11:"notradiance";i:7935;s:15:"notveryradiance";i:7936;s:8:"notrally";i:7937;s:12:"notveryrally";i:7938;s:16:"notrapprochement";i:7939;s:20:"notveryrapprochement";i:7940;s:10:"notrapport";i:7941;s:14:"notveryrapport";i:7942;s:7:"notrapt";i:7943;s:11:"notveryrapt";i:7944;s:10:"notrapture";i:7945;s:14:"notveryrapture";i:7946;s:13:"notraptureous";i:7947;s:17:"notveryraptureous";i:7948;s:15:"notraptureously";i:7949;s:19:"notveryraptureously";i:7950;s:12:"notrapturous";i:7951;s:16:"notveryrapturous";i:7952;s:14:"notrapturously";i:7953;s:18:"notveryrapturously";i:7954;s:11:"notrational";i:7955;s:15:"notveryrational";i:7956;s:14:"notrationality";i:7957;s:18:"notveryrationality";i:7958;s:7:"notrave";i:7959;s:11:"notveryrave";i:7960;s:14:"notre-conquest";i:7961;s:18:"notveryre-conquest";i:7962;s:10:"notreadily";i:7963;s:14:"notveryreadily";i:7964;s:11:"notreaffirm";i:7965;s:15:"notveryreaffirm";i:7966;s:16:"notreaffirmation";i:7967;s:20:"notveryreaffirmation";i:7968;s:10:"notrealist";i:7969;s:14:"notveryrealist";i:7970;s:12:"notrealistic";i:7971;s:16:"notveryrealistic";i:7972;s:16:"notrealistically";i:7973;s:20:"notveryrealistically";i:7974;s:9:"notreason";i:7975;s:13:"notveryreason";i:7976;s:13:"notreasonably";i:7977;s:17:"notveryreasonably";i:7978;s:11:"notreasoned";i:7979;s:15:"notveryreasoned";i:7980;s:14:"notreassurance";i:7981;s:18:"notveryreassurance";i:7982;s:11:"notreassure";i:7983;s:15:"notveryreassure";i:7984;s:10:"notreclaim";i:7985;s:14:"notveryreclaim";i:7986;s:14:"notrecognition";i:7987;s:18:"notveryrecognition";i:7988;s:12:"notrecommend";i:7989;s:16:"notveryrecommend";i:7990;s:17:"notrecommendation";i:7991;s:21:"notveryrecommendation";i:7992;s:18:"notrecommendations";i:7993;s:22:"notveryrecommendations";i:7994;s:14:"notrecommended";i:7995;s:18:"notveryrecommended";i:7996;s:13:"notrecompense";i:7997;s:17:"notveryrecompense";i:7998;s:12:"notreconcile";i:7999;s:16:"notveryreconcile";i:8000;s:17:"notreconciliation";i:8001;s:21:"notveryreconciliation";i:8002;s:17:"notrecord-setting";i:8003;s:21:"notveryrecord-setting";i:8004;s:10:"notrecover";i:8005;s:14:"notveryrecover";i:8006;s:16:"notrectification";i:8007;s:20:"notveryrectification";i:8008;s:10:"notrectify";i:8009;s:14:"notveryrectify";i:8010;s:13:"notrectifying";i:8011;s:17:"notveryrectifying";i:8012;s:9:"notredeem";i:8013;s:13:"notveryredeem";i:8014;s:12:"notredeeming";i:8015;s:16:"notveryredeeming";i:8016;s:13:"notredemption";i:8017;s:17:"notveryredemption";i:8018;s:14:"notreestablish";i:8019;s:18:"notveryreestablish";i:8020;s:9:"notrefine";i:8021;s:13:"notveryrefine";i:8022;s:13:"notrefinement";i:8023;s:17:"notveryrefinement";i:8024;s:9:"notreform";i:8025;s:13:"notveryreform";i:8026;s:10:"notrefresh";i:8027;s:14:"notveryrefresh";i:8028;s:13:"notrefreshing";i:8029;s:17:"notveryrefreshing";i:8030;s:9:"notrefuge";i:8031;s:13:"notveryrefuge";i:8032;s:8:"notregal";i:8033;s:12:"notveryregal";i:8034;s:10:"notregally";i:8035;s:14:"notveryregally";i:8036;s:9:"notregard";i:8037;s:13:"notveryregard";i:8038;s:15:"notrehabilitate";i:8039;s:19:"notveryrehabilitate";i:8040;s:17:"notrehabilitation";i:8041;s:21:"notveryrehabilitation";i:8042;s:12:"notreinforce";i:8043;s:16:"notveryreinforce";i:8044;s:16:"notreinforcement";i:8045;s:20:"notveryreinforcement";i:8046;s:10:"notrejoice";i:8047;s:14:"notveryrejoice";i:8048;s:14:"notrejoicingly";i:8049;s:18:"notveryrejoicingly";i:8050;s:8:"notrelax";i:8051;s:12:"notveryrelax";i:8052;s:9:"notrelent";i:8053;s:13:"notveryrelent";i:8054;s:11:"notrelevant";i:8055;s:15:"notveryrelevant";i:8056;s:12:"notrelevance";i:8057;s:16:"notveryrelevance";i:8058;s:14:"notreliability";i:8059;s:18:"notveryreliability";i:8060;s:11:"notreliably";i:8061;s:15:"notveryreliably";i:8062;s:9:"notrelief";i:8063;s:13:"notveryrelief";i:8064;s:10:"notrelieve";i:8065;s:14:"notveryrelieve";i:8066;s:9:"notrelish";i:8067;s:13:"notveryrelish";i:8068;s:13:"notremarkably";i:8069;s:17:"notveryremarkably";i:8070;s:9:"notremedy";i:8071;s:13:"notveryremedy";i:8072;s:14:"notreminiscent";i:8073;s:18:"notveryreminiscent";i:8074;s:13:"notremunerate";i:8075;s:17:"notveryremunerate";i:8076;s:14:"notrenaissance";i:8077;s:18:"notveryrenaissance";i:8078;s:10:"notrenewal";i:8079;s:14:"notveryrenewal";i:8080;s:11:"notrenovate";i:8081;s:15:"notveryrenovate";i:8082;s:13:"notrenovation";i:8083;s:17:"notveryrenovation";i:8084;s:9:"notrenown";i:8085;s:13:"notveryrenown";i:8086;s:11:"notrenowned";i:8087;s:15:"notveryrenowned";i:8088;s:9:"notrepair";i:8089;s:13:"notveryrepair";i:8090;s:13:"notreparation";i:8091;s:17:"notveryreparation";i:8092;s:8:"notrepay";i:8093;s:12:"notveryrepay";i:8094;s:9:"notrepent";i:8095;s:13:"notveryrepent";i:8096;s:13:"notrepentance";i:8097;s:17:"notveryrepentance";i:8098;s:12:"notreputable";i:8099;s:16:"notveryreputable";i:8100;s:9:"notrescue";i:8101;s:13:"notveryrescue";i:8102;s:12:"notresilient";i:8103;s:16:"notveryresilient";i:8104;s:10:"notresolve";i:8105;s:14:"notveryresolve";i:8106;s:11:"notresolved";i:8107;s:15:"notveryresolved";i:8108;s:10:"notresound";i:8109;s:14:"notveryresound";i:8110;s:13:"notresounding";i:8111;s:17:"notveryresounding";i:8112;s:14:"notresourceful";i:8113;s:18:"notveryresourceful";i:8114;s:18:"notresourcefulness";i:8115;s:22:"notveryresourcefulness";i:8116;s:10:"notrespect";i:8117;s:14:"notveryrespect";i:8118;s:14:"notrespectable";i:8119;s:18:"notveryrespectable";i:8120;s:15:"notrespectfully";i:8121;s:19:"notveryrespectfully";i:8122;s:10:"notrespite";i:8123;s:14:"notveryrespite";i:8124;s:17:"notresponsibility";i:8125;s:21:"notveryresponsibility";i:8126;s:14:"notresponsibly";i:8127;s:18:"notveryresponsibly";i:8128;s:10:"notrestful";i:8129;s:14:"notveryrestful";i:8130;s:14:"notrestoration";i:8131;s:18:"notveryrestoration";i:8132;s:10:"notrestore";i:8133;s:14:"notveryrestore";i:8134;s:12:"notrestraint";i:8135;s:16:"notveryrestraint";i:8136;s:12:"notresurgent";i:8137;s:16:"notveryresurgent";i:8138;s:10:"notreunite";i:8139;s:14:"notveryreunite";i:8140;s:8:"notrevel";i:8141;s:12:"notveryrevel";i:8142;s:13:"notrevelation";i:8143;s:17:"notveryrevelation";i:8144;s:9:"notrevere";i:8145;s:13:"notveryrevere";i:8146;s:12:"notreverence";i:8147;s:16:"notveryreverence";i:8148;s:13:"notreverently";i:8149;s:17:"notveryreverently";i:8150;s:10:"notrevival";i:8151;s:14:"notveryrevival";i:8152;s:9:"notrevive";i:8153;s:13:"notveryrevive";i:8154;s:13:"notrevitalize";i:8155;s:17:"notveryrevitalize";i:8156;s:13:"notrevolution";i:8157;s:17:"notveryrevolution";i:8158;s:9:"notreward";i:8159;s:13:"notveryreward";i:8160;s:12:"notrewarding";i:8161;s:16:"notveryrewarding";i:8162;s:14:"notrewardingly";i:8163;s:18:"notveryrewardingly";i:8164;s:9:"notriches";i:8165;s:13:"notveryriches";i:8166;s:9:"notrichly";i:8167;s:13:"notveryrichly";i:8168;s:11:"notrichness";i:8169;s:15:"notveryrichness";i:8170;s:10:"notrighten";i:8171;s:14:"notveryrighten";i:8172;s:14:"notrighteously";i:8173;s:18:"notveryrighteously";i:8174;s:16:"notrighteousness";i:8175;s:20:"notveryrighteousness";i:8176;s:11:"notrightful";i:8177;s:15:"notveryrightful";i:8178;s:13:"notrightfully";i:8179;s:17:"notveryrightfully";i:8180;s:10:"notrightly";i:8181;s:14:"notveryrightly";i:8182;s:12:"notrightness";i:8183;s:16:"notveryrightness";i:8184;s:9:"notrights";i:8185;s:13:"notveryrights";i:8186;s:7:"notripe";i:8187;s:11:"notveryripe";i:8188;s:12:"notrisk-free";i:8189;s:16:"notveryrisk-free";i:8190;s:15:"notromantically";i:8191;s:19:"notveryromantically";i:8192;s:14:"notromanticize";i:8193;s:18:"notveryromanticize";i:8194;s:10:"notrousing";i:8195;s:14:"notveryrousing";i:8196;s:9:"notsacred";i:8197;s:13:"notverysacred";i:8198;s:7:"notsafe";i:8199;s:11:"notverysafe";i:8200;s:12:"notsafeguard";i:8201;s:16:"notverysafeguard";i:8202;s:11:"notsagacity";i:8203;s:15:"notverysagacity";i:8204;s:7:"notsage";i:8205;s:11:"notverysage";i:8206;s:9:"notsagely";i:8207;s:13:"notverysagely";i:8208;s:8:"notsaint";i:8209;s:12:"notverysaint";i:8210;s:14:"notsaintliness";i:8211;s:18:"notverysaintliness";i:8212;s:10:"notsalable";i:8213;s:14:"notverysalable";i:8214;s:11:"notsalivate";i:8215;s:15:"notverysalivate";i:8216;s:11:"notsalutary";i:8217;s:15:"notverysalutary";i:8218;s:9:"notsalute";i:8219;s:13:"notverysalute";i:8220;s:12:"notsalvation";i:8221;s:16:"notverysalvation";i:8222;s:11:"notsanctify";i:8223;s:15:"notverysanctify";i:8224;s:11:"notsanction";i:8225;s:15:"notverysanction";i:8226;s:11:"notsanctity";i:8227;s:15:"notverysanctity";i:8228;s:12:"notsanctuary";i:8229;s:16:"notverysanctuary";i:8230;s:11:"notsanguine";i:8231;s:15:"notverysanguine";i:8232;s:7:"notsane";i:8233;s:11:"notverysane";i:8234;s:9:"notsanity";i:8235;s:13:"notverysanity";i:8236;s:15:"notsatisfaction";i:8237;s:19:"notverysatisfaction";i:8238;s:17:"notsatisfactorily";i:8239;s:21:"notverysatisfactorily";i:8240;s:15:"notsatisfactory";i:8241;s:19:"notverysatisfactory";i:8242;s:10:"notsatisfy";i:8243;s:14:"notverysatisfy";i:8244;s:13:"notsatisfying";i:8245;s:17:"notverysatisfying";i:8246;s:8:"notsavor";i:8247;s:12:"notverysavor";i:8248;s:8:"notsavvy";i:8249;s:12:"notverysavvy";i:8250;s:9:"notscenic";i:8251;s:13:"notveryscenic";i:8252;s:11:"notscruples";i:8253;s:15:"notveryscruples";i:8254;s:13:"notscrupulous";i:8255;s:17:"notveryscrupulous";i:8256;s:15:"notscrupulously";i:8257;s:19:"notveryscrupulously";i:8258;s:11:"notseamless";i:8259;s:15:"notveryseamless";i:8260;s:11:"notseasoned";i:8261;s:15:"notveryseasoned";i:8262;s:9:"notsecure";i:8263;s:13:"notverysecure";i:8264;s:11:"notsecurely";i:8265;s:15:"notverysecurely";i:8266;s:11:"notsecurity";i:8267;s:15:"notverysecurity";i:8268;s:12:"notseductive";i:8269;s:16:"notveryseductive";i:8270;s:12:"notselective";i:8271;s:16:"notveryselective";i:8272;s:21:"notself-determination";i:8273;s:25:"notveryself-determination";i:8274;s:15:"notself-respect";i:8275;s:19:"notveryself-respect";i:8276;s:20:"notself-satisfaction";i:8277;s:24:"notveryself-satisfaction";i:8278;s:19:"notself-sufficiency";i:8279;s:23:"notveryself-sufficiency";i:8280;s:18:"notself-sufficient";i:8281;s:22:"notveryself-sufficient";i:8282;s:12:"notsemblance";i:8283;s:16:"notverysemblance";i:8284;s:12:"notsensation";i:8285;s:16:"notverysensation";i:8286;s:14:"notsensational";i:8287;s:18:"notverysensational";i:8288;s:16:"notsensationally";i:8289;s:20:"notverysensationally";i:8290;s:13:"notsensations";i:8291;s:17:"notverysensations";i:8292;s:8:"notsense";i:8293;s:12:"notverysense";i:8294;s:11:"notsensibly";i:8295;s:15:"notverysensibly";i:8296;s:14:"notsensitively";i:8297;s:18:"notverysensitively";i:8298;s:14:"notsensitivity";i:8299;s:18:"notverysensitivity";i:8300;s:12:"notsentiment";i:8301;s:16:"notverysentiment";i:8302;s:17:"notsentimentality";i:8303;s:21:"notverysentimentality";i:8304;s:16:"notsentimentally";i:8305;s:20:"notverysentimentally";i:8306;s:13:"notsentiments";i:8307;s:17:"notverysentiments";i:8308;s:11:"notserenity";i:8309;s:15:"notveryserenity";i:8310;s:9:"notsettle";i:8311;s:13:"notverysettle";i:8312;s:10:"notshelter";i:8313;s:14:"notveryshelter";i:8314;s:9:"notshield";i:8315;s:13:"notveryshield";i:8316;s:10:"notshimmer";i:8317;s:14:"notveryshimmer";i:8318;s:13:"notshimmering";i:8319;s:17:"notveryshimmering";i:8320;s:15:"notshimmeringly";i:8321;s:19:"notveryshimmeringly";i:8322;s:8:"notshine";i:8323;s:12:"notveryshine";i:8324;s:8:"notshiny";i:8325;s:12:"notveryshiny";i:8326;s:11:"notshrewdly";i:8327;s:15:"notveryshrewdly";i:8328;s:13:"notshrewdness";i:8329;s:17:"notveryshrewdness";i:8330;s:14:"notsignificant";i:8331;s:18:"notverysignificant";i:8332;s:15:"notsignificance";i:8333;s:19:"notverysignificance";i:8334;s:10:"notsignify";i:8335;s:14:"notverysignify";i:8336;s:9:"notsimple";i:8337;s:13:"notverysimple";i:8338;s:13:"notsimplicity";i:8339;s:17:"notverysimplicity";i:8340;s:13:"notsimplified";i:8341;s:17:"notverysimplified";i:8342;s:11:"notsimplify";i:8343;s:15:"notverysimplify";i:8344;s:12:"notsincerely";i:8345;s:16:"notverysincerely";i:8346;s:12:"notsincerity";i:8347;s:16:"notverysincerity";i:8348;s:8:"notskill";i:8349;s:12:"notveryskill";i:8350;s:10:"notskilled";i:8351;s:14:"notveryskilled";i:8352;s:11:"notskillful";i:8353;s:15:"notveryskillful";i:8354;s:13:"notskillfully";i:8355;s:17:"notveryskillfully";i:8356;s:8:"notsleek";i:8357;s:12:"notverysleek";i:8358;s:10:"notslender";i:8359;s:14:"notveryslender";i:8360;s:7:"notslim";i:8361;s:11:"notveryslim";i:8362;s:8:"notsmart";i:8363;s:12:"notverysmart";i:8364;s:10:"notsmarter";i:8365;s:14:"notverysmarter";i:8366;s:11:"notsmartest";i:8367;s:15:"notverysmartest";i:8368;s:10:"notsmartly";i:8369;s:14:"notverysmartly";i:8370;s:8:"notsmile";i:8371;s:12:"notverysmile";i:8372;s:10:"notsmiling";i:8373;s:14:"notverysmiling";i:8374;s:12:"notsmilingly";i:8375;s:16:"notverysmilingly";i:8376;s:10:"notsmitten";i:8377;s:14:"notverysmitten";i:8378;s:14:"notsoft-spoken";i:8379;s:18:"notverysoft-spoken";i:8380;s:9:"notsoften";i:8381;s:13:"notverysoften";i:8382;s:9:"notsolace";i:8383;s:13:"notverysolace";i:8384;s:13:"notsolicitous";i:8385;s:17:"notverysolicitous";i:8386;s:15:"notsolicitously";i:8387;s:19:"notverysolicitously";i:8388;s:13:"notsolicitude";i:8389;s:17:"notverysolicitude";i:8390;s:13:"notsolidarity";i:8391;s:17:"notverysolidarity";i:8392;s:9:"notsoothe";i:8393;s:13:"notverysoothe";i:8394;s:13:"notsoothingly";i:8395;s:17:"notverysoothingly";i:8396;s:8:"notsound";i:8397;s:12:"notverysound";i:8398;s:12:"notsoundness";i:8399;s:16:"notverysoundness";i:8400;s:11:"notspacious";i:8401;s:15:"notveryspacious";i:8402;s:8:"notspare";i:8403;s:12:"notveryspare";i:8404;s:10:"notsparing";i:8405;s:14:"notverysparing";i:8406;s:12:"notsparingly";i:8407;s:16:"notverysparingly";i:8408;s:10:"notsparkle";i:8409;s:14:"notverysparkle";i:8410;s:14:"notspectacular";i:8411;s:18:"notveryspectacular";i:8412;s:16:"notspectacularly";i:8413;s:20:"notveryspectacularly";i:8414;s:12:"notspellbind";i:8415;s:16:"notveryspellbind";i:8416;s:15:"notspellbinding";i:8417;s:19:"notveryspellbinding";i:8418;s:17:"notspellbindingly";i:8419;s:21:"notveryspellbindingly";i:8420;s:13:"notspellbound";i:8421;s:17:"notveryspellbound";i:8422;s:9:"notspirit";i:8423;s:13:"notveryspirit";i:8424;s:13:"notsplendidly";i:8425;s:17:"notverysplendidly";i:8426;s:11:"notsplendor";i:8427;s:15:"notverysplendor";i:8428;s:11:"notspotless";i:8429;s:15:"notveryspotless";i:8430;s:12:"notsprightly";i:8431;s:16:"notverysprightly";i:8432;s:7:"notspur";i:8433;s:11:"notveryspur";i:8434;s:11:"notsquarely";i:8435;s:15:"notverysquarely";i:8436;s:12:"notstability";i:8437;s:16:"notverystability";i:8438;s:12:"notstabilize";i:8439;s:16:"notverystabilize";i:8440;s:12:"notstainless";i:8441;s:16:"notverystainless";i:8442;s:8:"notstand";i:8443;s:12:"notverystand";i:8444;s:7:"notstar";i:8445;s:11:"notverystar";i:8446;s:8:"notstars";i:8447;s:12:"notverystars";i:8448;s:10:"notstately";i:8449;s:14:"notverystately";i:8450;s:13:"notstatuesque";i:8451;s:17:"notverystatuesque";i:8452;s:10:"notstaunch";i:8453;s:14:"notverystaunch";i:8454;s:12:"notstaunchly";i:8455;s:16:"notverystaunchly";i:8456;s:14:"notstaunchness";i:8457;s:18:"notverystaunchness";i:8458;s:12:"notsteadfast";i:8459;s:16:"notverysteadfast";i:8460;s:14:"notsteadfastly";i:8461;s:18:"notverysteadfastly";i:8462;s:16:"notsteadfastness";i:8463;s:20:"notverysteadfastness";i:8464;s:13:"notsteadiness";i:8465;s:17:"notverysteadiness";i:8466;s:10:"notstellar";i:8467;s:14:"notverystellar";i:8468;s:12:"notstellarly";i:8469;s:16:"notverystellarly";i:8470;s:12:"notstimulate";i:8471;s:16:"notverystimulate";i:8472;s:14:"notstimulating";i:8473;s:18:"notverystimulating";i:8474;s:14:"notstimulative";i:8475;s:18:"notverystimulative";i:8476;s:11:"notstirring";i:8477;s:15:"notverystirring";i:8478;s:13:"notstirringly";i:8479;s:17:"notverystirringly";i:8480;s:8:"notstood";i:8481;s:12:"notverystood";i:8482;s:11:"notstraight";i:8483;s:15:"notverystraight";i:8484;s:18:"notstraightforward";i:8485;s:22:"notverystraightforward";i:8486;s:14:"notstreamlined";i:8487;s:18:"notverystreamlined";i:8488;s:9:"notstride";i:8489;s:13:"notverystride";i:8490;s:10:"notstrides";i:8491;s:14:"notverystrides";i:8492;s:11:"notstriking";i:8493;s:15:"notverystriking";i:8494;s:13:"notstrikingly";i:8495;s:17:"notverystrikingly";i:8496;s:11:"notstriving";i:8497;s:15:"notverystriving";i:8498;s:13:"notstudiously";i:8499;s:17:"notverystudiously";i:8500;s:10:"notstunned";i:8501;s:14:"notverystunned";i:8502;s:11:"notstunning";i:8503;s:15:"notverystunning";i:8504;s:13:"notstunningly";i:8505;s:17:"notverystunningly";i:8506;s:13:"notstupendous";i:8507;s:17:"notverystupendous";i:8508;s:15:"notstupendously";i:8509;s:19:"notverystupendously";i:8510;s:9:"notsturdy";i:8511;s:13:"notverysturdy";i:8512;s:12:"notstylishly";i:8513;s:16:"notverystylishly";i:8514;s:12:"notsubscribe";i:8515;s:16:"notverysubscribe";i:8516;s:14:"notsubstantial";i:8517;s:18:"notverysubstantial";i:8518;s:16:"notsubstantially";i:8519;s:20:"notverysubstantially";i:8520;s:14:"notsubstantive";i:8521;s:18:"notverysubstantive";i:8522;s:10:"notsucceed";i:8523;s:14:"notverysucceed";i:8524;s:10:"notsuccess";i:8525;s:14:"notverysuccess";i:8526;s:15:"notsuccessfully";i:8527;s:19:"notverysuccessfully";i:8528;s:10:"notsuffice";i:8529;s:14:"notverysuffice";i:8530;s:13:"notsufficient";i:8531;s:17:"notverysufficient";i:8532;s:15:"notsufficiently";i:8533;s:19:"notverysufficiently";i:8534;s:10:"notsuggest";i:8535;s:14:"notverysuggest";i:8536;s:14:"notsuggestions";i:8537;s:18:"notverysuggestions";i:8538;s:7:"notsuit";i:8539;s:11:"notverysuit";i:8540;s:11:"notsuitable";i:8541;s:15:"notverysuitable";i:8542;s:12:"notsumptuous";i:8543;s:16:"notverysumptuous";i:8544;s:14:"notsumptuously";i:8545;s:18:"notverysumptuously";i:8546;s:16:"notsumptuousness";i:8547;s:20:"notverysumptuousness";i:8548;s:8:"notsuper";i:8549;s:12:"notverysuper";i:8550;s:11:"notsuperbly";i:8551;s:15:"notverysuperbly";i:8552;s:11:"notsuperior";i:8553;s:15:"notverysuperior";i:8554;s:14:"notsuperlative";i:8555;s:18:"notverysuperlative";i:8556;s:10:"notsupport";i:8557;s:14:"notverysupport";i:8558;s:12:"notsupporter";i:8559;s:16:"notverysupporter";i:8560;s:13:"notsupportive";i:8561;s:17:"notverysupportive";i:8562;s:10:"notsupreme";i:8563;s:14:"notverysupreme";i:8564;s:12:"notsupremely";i:8565;s:16:"notverysupremely";i:8566;s:9:"notsupurb";i:8567;s:13:"notverysupurb";i:8568;s:11:"notsupurbly";i:8569;s:15:"notverysupurbly";i:8570;s:9:"notsurely";i:8571;s:13:"notverysurely";i:8572;s:8:"notsurge";i:8573;s:12:"notverysurge";i:8574;s:10:"notsurging";i:8575;s:14:"notverysurging";i:8576;s:10:"notsurmise";i:8577;s:14:"notverysurmise";i:8578;s:11:"notsurmount";i:8579;s:15:"notverysurmount";i:8580;s:10:"notsurpass";i:8581;s:14:"notverysurpass";i:8582;s:11:"notsurvival";i:8583;s:15:"notverysurvival";i:8584;s:10:"notsurvive";i:8585;s:14:"notverysurvive";i:8586;s:11:"notsurvivor";i:8587;s:15:"notverysurvivor";i:8588;s:17:"notsustainability";i:8589;s:21:"notverysustainability";i:8590;s:14:"notsustainable";i:8591;s:18:"notverysustainable";i:8592;s:12:"notsustained";i:8593;s:16:"notverysustained";i:8594;s:11:"notsweeping";i:8595;s:15:"notverysweeping";i:8596;s:10:"notsweeten";i:8597;s:14:"notverysweeten";i:8598;s:13:"notsweetheart";i:8599;s:17:"notverysweetheart";i:8600;s:10:"notsweetly";i:8601;s:14:"notverysweetly";i:8602;s:12:"notsweetness";i:8603;s:16:"notverysweetness";i:8604;s:8:"notswift";i:8605;s:12:"notveryswift";i:8606;s:12:"notswiftness";i:8607;s:16:"notveryswiftness";i:8608;s:8:"notsworn";i:8609;s:12:"notverysworn";i:8610;s:7:"nottact";i:8611;s:11:"notverytact";i:8612;s:9:"nottalent";i:8613;s:13:"notverytalent";i:8614;s:11:"nottalented";i:8615;s:15:"notverytalented";i:8616;s:12:"nottantalize";i:8617;s:16:"notverytantalize";i:8618;s:14:"nottantalizing";i:8619;s:18:"notverytantalizing";i:8620;s:16:"nottantalizingly";i:8621;s:20:"notverytantalizingly";i:8622;s:8:"nottaste";i:8623;s:12:"notverytaste";i:8624;s:13:"nottemperance";i:8625;s:17:"notverytemperance";i:8626;s:12:"nottemperate";i:8627;s:16:"notverytemperate";i:8628;s:8:"nottempt";i:8629;s:12:"notverytempt";i:8630;s:11:"nottempting";i:8631;s:15:"notverytempting";i:8632;s:13:"nottemptingly";i:8633;s:17:"notverytemptingly";i:8634;s:12:"nottenacious";i:8635;s:16:"notverytenacious";i:8636;s:14:"nottenaciously";i:8637;s:18:"notverytenaciously";i:8638;s:11:"nottenacity";i:8639;s:15:"notverytenacity";i:8640;s:11:"nottenderly";i:8641;s:15:"notverytenderly";i:8642;s:13:"nottenderness";i:8643;s:17:"notverytenderness";i:8644;s:15:"notterrifically";i:8645;s:19:"notveryterrifically";i:8646;s:12:"notterrified";i:8647;s:16:"notveryterrified";i:8648;s:10:"notterrify";i:8649;s:14:"notveryterrify";i:8650;s:13:"notterrifying";i:8651;s:17:"notveryterrifying";i:8652;s:15:"notterrifyingly";i:8653;s:19:"notveryterrifyingly";i:8654;s:13:"notthankfully";i:8655;s:17:"notverythankfully";i:8656;s:12:"notthinkable";i:8657;s:16:"notverythinkable";i:8658;s:15:"notthoughtfully";i:8659;s:19:"notverythoughtfully";i:8660;s:17:"notthoughtfulness";i:8661;s:21:"notverythoughtfulness";i:8662;s:9:"notthrift";i:8663;s:13:"notverythrift";i:8664;s:9:"notthrill";i:8665;s:13:"notverythrill";i:8666;s:12:"notthrilling";i:8667;s:16:"notverythrilling";i:8668;s:14:"notthrillingly";i:8669;s:18:"notverythrillingly";i:8670;s:10:"notthrills";i:8671;s:14:"notverythrills";i:8672;s:9:"notthrive";i:8673;s:13:"notverythrive";i:8674;s:11:"notthriving";i:8675;s:15:"notverythriving";i:8676;s:9:"nottickle";i:8677;s:13:"notverytickle";i:8678;s:15:"nottime-honored";i:8679;s:19:"notverytime-honored";i:8680;s:9:"nottimely";i:8681;s:13:"notverytimely";i:8682;s:9:"nottingle";i:8683;s:13:"notverytingle";i:8684;s:12:"nottitillate";i:8685;s:16:"notverytitillate";i:8686;s:14:"nottitillating";i:8687;s:18:"notverytitillating";i:8688;s:16:"nottitillatingly";i:8689;s:20:"notverytitillatingly";i:8690;s:8:"nottoast";i:8691;s:12:"notverytoast";i:8692;s:15:"nottogetherness";i:8693;s:19:"notverytogetherness";i:8694;s:12:"nottolerable";i:8695;s:16:"notverytolerable";i:8696;s:12:"nottolerably";i:8697;s:16:"notverytolerably";i:8698;s:12:"nottolerance";i:8699;s:16:"notverytolerance";i:8700;s:13:"nottolerantly";i:8701;s:17:"notverytolerantly";i:8702;s:11:"nottolerate";i:8703;s:15:"notverytolerate";i:8704;s:13:"nottoleration";i:8705;s:17:"notverytoleration";i:8706;s:6:"nottop";i:8707;s:10:"notverytop";i:8708;s:9:"nottorrid";i:8709;s:13:"notverytorrid";i:8710;s:11:"nottorridly";i:8711;s:15:"notverytorridly";i:8712;s:12:"nottradition";i:8713;s:16:"notverytradition";i:8714;s:14:"nottraditional";i:8715;s:18:"notverytraditional";i:8716;s:14:"nottranquility";i:8717;s:18:"notverytranquility";i:8718;s:11:"nottreasure";i:8719;s:15:"notverytreasure";i:8720;s:8:"nottreat";i:8721;s:12:"notverytreat";i:8722;s:13:"nottremendous";i:8723;s:17:"notverytremendous";i:8724;s:15:"nottremendously";i:8725;s:19:"notverytremendously";i:8726;s:9:"nottrendy";i:8727;s:13:"notverytrendy";i:8728;s:14:"nottrepidation";i:8729;s:18:"notverytrepidation";i:8730;s:10:"nottribute";i:8731;s:14:"notverytribute";i:8732;s:7:"nottrim";i:8733;s:11:"notverytrim";i:8734;s:10:"nottriumph";i:8735;s:14:"notverytriumph";i:8736;s:12:"nottriumphal";i:8737;s:16:"notverytriumphal";i:8738;s:13:"nottriumphant";i:8739;s:17:"notverytriumphant";i:8740;s:15:"nottriumphantly";i:8741;s:19:"notverytriumphantly";i:8742;s:12:"nottruculent";i:8743;s:16:"notverytruculent";i:8744;s:14:"nottruculently";i:8745;s:18:"notverytruculently";i:8746;s:7:"nottrue";i:8747;s:11:"notverytrue";i:8748;s:8:"nottrump";i:8749;s:12:"notverytrump";i:8750;s:10:"nottrumpet";i:8751;s:14:"notverytrumpet";i:8752;s:8:"nottrust";i:8753;s:12:"notverytrust";i:8754;s:11:"nottrusting";i:8755;s:15:"notverytrusting";i:8756;s:13:"nottrustingly";i:8757;s:17:"notverytrustingly";i:8758;s:18:"nottrustworthiness";i:8759;s:22:"notverytrustworthiness";i:8760;s:14:"nottrustworthy";i:8761;s:18:"notverytrustworthy";i:8762;s:8:"nottruth";i:8763;s:12:"notverytruth";i:8764;s:13:"nottruthfully";i:8765;s:17:"notverytruthfully";i:8766;s:15:"nottruthfulness";i:8767;s:19:"notverytruthfulness";i:8768;s:10:"nottwinkly";i:8769;s:14:"notverytwinkly";i:8770;s:11:"notultimate";i:8771;s:15:"notveryultimate";i:8772;s:13:"notultimately";i:8773;s:17:"notveryultimately";i:8774;s:8:"notultra";i:8775;s:12:"notveryultra";i:8776;s:12:"notunabashed";i:8777;s:16:"notveryunabashed";i:8778;s:14:"notunabashedly";i:8779;s:18:"notveryunabashedly";i:8780;s:12:"notunanimous";i:8781;s:16:"notveryunanimous";i:8782;s:15:"notunassailable";i:8783;s:19:"notveryunassailable";i:8784;s:11:"notunbiased";i:8785;s:15:"notveryunbiased";i:8786;s:10:"notunbosom";i:8787;s:14:"notveryunbosom";i:8788;s:10:"notunbound";i:8789;s:14:"notveryunbound";i:8790;s:11:"notunbroken";i:8791;s:15:"notveryunbroken";i:8792;s:11:"notuncommon";i:8793;s:15:"notveryuncommon";i:8794;s:13:"notuncommonly";i:8795;s:17:"notveryuncommonly";i:8796;s:14:"notunconcerned";i:8797;s:18:"notveryunconcerned";i:8798;s:16:"notunconditional";i:8799;s:20:"notveryunconditional";i:8800;s:17:"notunconventional";i:8801;s:21:"notveryunconventional";i:8802;s:12:"notundaunted";i:8803;s:16:"notveryundaunted";i:8804;s:13:"notunderstand";i:8805;s:17:"notveryunderstand";i:8806;s:17:"notunderstandable";i:8807;s:21:"notveryunderstandable";i:8808;s:13:"notunderstood";i:8809;s:17:"notveryunderstood";i:8810;s:13:"notunderstate";i:8811;s:17:"notveryunderstate";i:8812;s:14:"notunderstated";i:8813;s:18:"notveryunderstated";i:8814;s:16:"notunderstatedly";i:8815;s:20:"notveryunderstatedly";i:8816;s:15:"notundisputable";i:8817;s:19:"notveryundisputable";i:8818;s:15:"notundisputably";i:8819;s:19:"notveryundisputably";i:8820;s:13:"notundisputed";i:8821;s:17:"notveryundisputed";i:8822;s:12:"notundoubted";i:8823;s:16:"notveryundoubted";i:8824;s:14:"notundoubtedly";i:8825;s:18:"notveryundoubtedly";i:8826;s:15:"notunencumbered";i:8827;s:19:"notveryunencumbered";i:8828;s:14:"notunequivocal";i:8829;s:18:"notveryunequivocal";i:8830;s:16:"notunequivocally";i:8831;s:20:"notveryunequivocally";i:8832;s:10:"notunfazed";i:8833;s:14:"notveryunfazed";i:8834;s:13:"notunfettered";i:8835;s:17:"notveryunfettered";i:8836;s:16:"notunforgettable";i:8837;s:20:"notveryunforgettable";i:8838;s:10:"notuniform";i:8839;s:14:"notveryuniform";i:8840;s:12:"notuniformly";i:8841;s:16:"notveryuniformly";i:8842;s:8:"notunity";i:8843;s:12:"notveryunity";i:8844;s:12:"notuniversal";i:8845;s:16:"notveryuniversal";i:8846;s:12:"notunlimited";i:8847;s:16:"notveryunlimited";i:8848;s:15:"notunparalleled";i:8849;s:19:"notveryunparalleled";i:8850;s:16:"notunpretentious";i:8851;s:20:"notveryunpretentious";i:8852;s:17:"notunquestionable";i:8853;s:21:"notveryunquestionable";i:8854;s:17:"notunquestionably";i:8855;s:21:"notveryunquestionably";i:8856;s:15:"notunrestricted";i:8857;s:19:"notveryunrestricted";i:8858;s:12:"notunscathed";i:8859;s:16:"notveryunscathed";i:8860;s:12:"notunselfish";i:8861;s:16:"notveryunselfish";i:8862;s:12:"notuntouched";i:8863;s:16:"notveryuntouched";i:8864;s:12:"notuntrained";i:8865;s:16:"notveryuntrained";i:8866;s:9:"notupbeat";i:8867;s:13:"notveryupbeat";i:8868;s:10:"notupfront";i:8869;s:14:"notveryupfront";i:8870;s:10:"notupgrade";i:8871;s:14:"notveryupgrade";i:8872;s:9:"notupheld";i:8873;s:13:"notveryupheld";i:8874;s:9:"notuphold";i:8875;s:13:"notveryuphold";i:8876;s:9:"notuplift";i:8877;s:13:"notveryuplift";i:8878;s:12:"notuplifting";i:8879;s:16:"notveryuplifting";i:8880;s:14:"notupliftingly";i:8881;s:18:"notveryupliftingly";i:8882;s:13:"notupliftment";i:8883;s:17:"notveryupliftment";i:8884;s:10:"notupscale";i:8885;s:14:"notveryupscale";i:8886;s:9:"notupside";i:8887;s:13:"notveryupside";i:8888;s:9:"notupward";i:8889;s:13:"notveryupward";i:8890;s:7:"noturge";i:8891;s:11:"notveryurge";i:8892;s:9:"notusable";i:8893;s:13:"notveryusable";i:8894;s:9:"notuseful";i:8895;s:13:"notveryuseful";i:8896;s:13:"notusefulness";i:8897;s:17:"notveryusefulness";i:8898;s:14:"notutilitarian";i:8899;s:18:"notveryutilitarian";i:8900;s:9:"notutmost";i:8901;s:13:"notveryutmost";i:8902;s:12:"notuttermost";i:8903;s:16:"notveryuttermost";i:8904;s:12:"notvaliantly";i:8905;s:16:"notveryvaliantly";i:8906;s:8:"notvalid";i:8907;s:12:"notveryvalid";i:8908;s:11:"notvalidity";i:8909;s:15:"notveryvalidity";i:8910;s:8:"notvalor";i:8911;s:12:"notveryvalor";i:8912;s:11:"notvaluable";i:8913;s:15:"notveryvaluable";i:8914;s:9:"notvalues";i:8915;s:13:"notveryvalues";i:8916;s:11:"notvanquish";i:8917;s:15:"notveryvanquish";i:8918;s:7:"notvast";i:8919;s:11:"notveryvast";i:8920;s:9:"notvastly";i:8921;s:13:"notveryvastly";i:8922;s:11:"notvastness";i:8923;s:15:"notveryvastness";i:8924;s:12:"notvenerable";i:8925;s:16:"notveryvenerable";i:8926;s:12:"notvenerably";i:8927;s:16:"notveryvenerably";i:8928;s:11:"notvenerate";i:8929;s:15:"notveryvenerate";i:8930;s:13:"notverifiable";i:8931;s:17:"notveryverifiable";i:8932;s:12:"notveritable";i:8933;s:16:"notveryveritable";i:8934;s:14:"notversatility";i:8935;s:18:"notveryversatility";i:8936;s:9:"notviable";i:8937;s:13:"notveryviable";i:8938;s:12:"notviability";i:8939;s:16:"notveryviability";i:8940;s:10:"notvibrant";i:8941;s:14:"notveryvibrant";i:8942;s:12:"notvibrantly";i:8943;s:16:"notveryvibrantly";i:8944;s:13:"notvictorious";i:8945;s:17:"notveryvictorious";i:8946;s:10:"notvictory";i:8947;s:14:"notveryvictory";i:8948;s:12:"notvigilance";i:8949;s:16:"notveryvigilance";i:8950;s:11:"notvigilant";i:8951;s:15:"notveryvigilant";i:8952;s:13:"notvigorously";i:8953;s:17:"notveryvigorously";i:8954;s:12:"notvindicate";i:8955;s:16:"notveryvindicate";i:8956;s:10:"notvintage";i:8957;s:14:"notveryvintage";i:8958;s:9:"notvirtue";i:8959;s:13:"notveryvirtue";i:8960;s:13:"notvirtuously";i:8961;s:17:"notveryvirtuously";i:8962;s:8:"notvital";i:8963;s:12:"notveryvital";i:8964;s:11:"notvitality";i:8965;s:15:"notveryvitality";i:8966;s:8:"notvivid";i:8967;s:12:"notveryvivid";i:8968;s:14:"notvoluntarily";i:8969;s:18:"notveryvoluntarily";i:8970;s:12:"notvoluntary";i:8971;s:16:"notveryvoluntary";i:8972;s:8:"notvouch";i:8973;s:12:"notveryvouch";i:8974;s:12:"notvouchsafe";i:8975;s:16:"notveryvouchsafe";i:8976;s:6:"notvow";i:8977;s:10:"notveryvow";i:8978;s:13:"notvulnerable";i:8979;s:17:"notveryvulnerable";i:8980;s:14:"notwarmhearted";i:8981;s:18:"notverywarmhearted";i:8982;s:9:"notwarmly";i:8983;s:13:"notverywarmly";i:8984;s:9:"notwarmth";i:8985;s:13:"notverywarmth";i:8986;s:10:"notwealthy";i:8987;s:14:"notverywealthy";i:8988;s:10:"notwelfare";i:8989;s:14:"notverywelfare";i:8990;s:13:"notwell-being";i:8991;s:17:"notverywell-being";i:8992;s:17:"notwell-connected";i:8993;s:21:"notverywell-connected";i:8994;s:16:"notwell-educated";i:8995;s:20:"notverywell-educated";i:8996;s:19:"notwell-established";i:8997;s:23:"notverywell-established";i:8998;s:16:"notwell-informed";i:8999;s:20:"notverywell-informed";i:9000;s:19:"notwell-intentioned";i:9001;s:23:"notverywell-intentioned";i:9002;s:15:"notwell-managed";i:9003;s:19:"notverywell-managed";i:9004;s:18:"notwell-positioned";i:9005;s:22:"notverywell-positioned";i:9006;s:18:"notwell-publicized";i:9007;s:22:"notverywell-publicized";i:9008;s:16:"notwell-received";i:9009;s:20:"notverywell-received";i:9010;s:16:"notwell-regarded";i:9011;s:20:"notverywell-regarded";i:9012;s:11:"notwell-run";i:9013;s:15:"notverywell-run";i:9014;s:15:"notwell-wishers";i:9015;s:19:"notverywell-wishers";i:9016;s:12:"notwellbeing";i:9017;s:16:"notverywellbeing";i:9018;s:8:"notwhite";i:9019;s:12:"notverywhite";i:9020;s:17:"notwholeheartedly";i:9021;s:21:"notverywholeheartedly";i:9022;s:12:"notwholesome";i:9023;s:16:"notverywholesome";i:9024;s:7:"notwide";i:9025;s:11:"notverywide";i:9026;s:12:"notwide-open";i:9027;s:16:"notverywide-open";i:9028;s:15:"notwide-ranging";i:9029;s:19:"notverywide-ranging";i:9030;s:10:"notwillful";i:9031;s:14:"notverywillful";i:9032;s:12:"notwillfully";i:9033;s:16:"notverywillfully";i:9034;s:14:"notwillingness";i:9035;s:18:"notverywillingness";i:9036;s:7:"notwink";i:9037;s:11:"notverywink";i:9038;s:11:"notwinnable";i:9039;s:15:"notverywinnable";i:9040;s:10:"notwinners";i:9041;s:14:"notverywinners";i:9042;s:9:"notwisdom";i:9043;s:13:"notverywisdom";i:9044;s:9:"notwisely";i:9045;s:13:"notverywisely";i:9046;s:9:"notwishes";i:9047;s:13:"notverywishes";i:9048;s:10:"notwishing";i:9049;s:14:"notverywishing";i:9050;s:14:"notwonderfully";i:9051;s:18:"notverywonderfully";i:9052;s:12:"notwonderous";i:9053;s:16:"notverywonderous";i:9054;s:14:"notwonderously";i:9055;s:18:"notverywonderously";i:9056;s:11:"notwondrous";i:9057;s:15:"notverywondrous";i:9058;s:6:"notwoo";i:9059;s:10:"notverywoo";i:9060;s:11:"notworkable";i:9061;s:15:"notveryworkable";i:9062;s:15:"notworld-famous";i:9063;s:19:"notveryworld-famous";i:9064;s:10:"notworship";i:9065;s:14:"notveryworship";i:9066;s:8:"notworth";i:9067;s:12:"notveryworth";i:9068;s:14:"notworth-while";i:9069;s:18:"notveryworth-while";i:9070;s:13:"notworthiness";i:9071;s:17:"notveryworthiness";i:9072;s:13:"notworthwhile";i:9073;s:17:"notveryworthwhile";i:9074;s:6:"notwow";i:9075;s:10:"notverywow";i:9076;s:6:"notwry";i:9077;s:10:"notverywry";i:9078;s:8:"notyearn";i:9079;s:12:"notveryyearn";i:9080;s:11:"notyearning";i:9081;s:15:"notveryyearning";i:9082;s:13:"notyearningly";i:9083;s:17:"notveryyearningly";i:9084;s:6:"notyep";i:9085;s:10:"notveryyep";i:9086;s:11:"notyouthful";i:9087;s:15:"notveryyouthful";i:9088;s:7:"notzeal";i:9089;s:11:"notveryzeal";i:9090;s:9:"notzenith";i:9091;s:13:"notveryzenith";i:9092;s:7:"notzest";i:9093;s:11:"notveryzest";i:9094;s:9:"isn'tgood";} jwhennessey/phpinsight/lib/PHPInsight/data/data.neu.php 0000644 00000017210 15153553404 0017135 0 ustar 00 a:373:{i:0;s:7:"average";i:1;s:8:"mediocre";i:2;s:2:"ok";i:3;s:7:"alright";i:4;s:3:"<:}";i:5;s:3:";o)";i:6;s:2:";)";i:7;s:2:":|";i:8;s:2:":l";i:9;s:8:":0->-<|:";i:10;s:2:":-";i:11;s:3:":-o";i:12;s:3:":-\";i:13;s:3:"8-)";i:14;s:2:"*)";i:15;s:3:"(o;";i:16;s:8:"absolute";i:17;s:10:"absolutely";i:18;s:8:"absorbed";i:19;s:10:"accentuate";i:20;s:8:"activist";i:21;s:6:"actual";i:22;s:9:"actuality";i:23;s:11:"adolescents";i:24;s:6:"affect";i:25;s:8:"affected";i:26;s:3:"aha";i:27;s:3:"air";i:28;s:5:"alert";i:29;s:8:"all-time";i:30;s:10:"allegorize";i:31;s:8:"alliance";i:32;s:9:"alliances";i:33;s:8:"allusion";i:34;s:9:"allusions";i:35;s:10:"altogether";i:36;s:7:"amplify";i:37;s:10:"analytical";i:38;s:8:"apparent";i:39;s:10:"apparently";i:40;s:10:"appearance";i:41;s:9:"apprehend";i:42;s:6:"assess";i:43;s:10:"assessment";i:44;s:11:"assessments";i:45;s:10:"assumption";i:46;s:10:"astronomic";i:47;s:12:"astronomical";i:48;s:14:"astronomically";i:49;s:8:"attitude";i:50;s:9:"attitudes";i:51;s:9:"awareness";i:52;s:5:"aware";i:53;s:4:"baby";i:54;s:9:"basically";i:55;s:6:"batons";i:56;s:6:"belief";i:57;s:7:"beliefs";i:58;s:3:"big";i:59;s:5:"blood";i:60;s:11:"broad-based";i:61;s:9:"ceaseless";i:62;s:7:"central";i:63;s:9:"certified";i:64;s:5:"chant";i:65;s:5:"claim";i:66;s:11:"clandestine";i:67;s:8:"cogitate";i:68;s:10:"cognizance";i:69;s:7:"comment";i:70;s:11:"commentator";i:71;s:8:"complete";i:72;s:10:"completely";i:73;s:10:"comprehend";i:74;s:9:"concerted";i:75;s:7:"confide";i:76;s:10:"conjecture";i:77;s:10:"conscience";i:78;s:13:"consciousness";i:79;s:12:"considerable";i:80;s:12:"considerably";i:81;s:13:"consideration";i:82;s:13:"constitutions";i:83;s:11:"contemplate";i:84;s:10:"continuous";i:85;s:10:"corrective";i:86;s:6:"covert";i:87;s:6:"decide";i:88;s:6:"deduce";i:89;s:6:"deeply";i:90;s:7:"destiny";i:91;s:10:"difference";i:92;s:9:"diplomacy";i:93;s:7:"discern";i:94;s:11:"disposition";i:95;s:10:"distinctly";i:96;s:8:"dominant";i:97;s:9:"downright";i:98;s:12:"dramatically";i:99;s:4:"duty";i:100;s:11:"effectively";i:101;s:9:"elaborate";i:102;s:10:"embodiment";i:103;s:7:"emotion";i:104;s:8:"emotions";i:105;s:9:"emphasise";i:106;s:6:"engage";i:107;s:7:"engross";i:108;s:6:"entire";i:109;s:12:"entrenchment";i:110;s:8:"evaluate";i:111;s:10:"evaluation";i:112;s:11:"exclusively";i:113;s:11:"expectation";i:114;s:7:"expound";i:115;s:10:"expression";i:116;s:11:"expressions";i:117;s:11:"extemporize";i:118;s:9:"extensive";i:119;s:11:"extensively";i:120;s:8:"eyebrows";i:121;s:4:"fact";i:122;s:5:"facts";i:123;s:7:"factual";i:124;s:8:"familiar";i:125;s:12:"far-reaching";i:126;s:4:"fast";i:127;s:4:"feel";i:128;s:5:"feels";i:129;s:4:"felt";i:130;s:7:"feeling";i:131;s:8:"feelings";i:132;s:7:"finally";i:133;s:4:"firm";i:134;s:6:"firmly";i:135;s:5:"fixer";i:136;s:5:"floor";i:137;s:6:"forsee";i:138;s:8:"foretell";i:139;s:8:"fortress";i:140;s:7:"frankly";i:141;s:8:"frequent";i:142;s:4:"full";i:143;s:5:"fully";i:144;s:10:"full-scale";i:145;s:11:"fundamental";i:146;s:13:"fundamentally";i:147;s:6:"funded";i:148;s:9:"galvanize";i:149;s:8:"gestures";i:150;s:5:"giant";i:151;s:6:"giants";i:152;s:8:"gigantic";i:153;s:5:"glean";i:154;s:7:"greatly";i:155;s:7:"growing";i:156;s:7:"halfway";i:157;s:4:"halt";i:158;s:10:"heavy-duty";i:159;s:5:"hefty";i:160;s:4:"high";i:161;s:12:"high-powered";i:162;s:2:"hm";i:163;s:3:"hmm";i:164;s:4:"huge";i:165;s:9:"hypnotize";i:166;s:4:"idea";i:167;s:6:"ignite";i:168;s:11:"imagination";i:169;s:7:"imagine";i:170;s:11:"immediately";i:171;s:7:"immense";i:172;s:9:"immensely";i:173;s:9:"immensity";i:174;s:12:"immensurable";i:175;s:6:"immune";i:176;s:10:"imperative";i:177;s:12:"imperatively";i:178;s:8:"implicit";i:179;s:5:"imply";i:180;s:10:"inarguable";i:181;s:10:"inarguably";i:182;s:10:"increasing";i:183;s:12:"increasingly";i:184;s:10:"indication";i:185;s:10:"indicative";i:186;s:8:"indirect";i:187;s:10:"infectious";i:188;s:5:"infer";i:189;s:9:"inference";i:190;s:9:"influence";i:191;s:13:"informational";i:192;s:8:"inherent";i:193;s:7:"inkling";i:194;s:8:"inklings";i:195;s:11:"innumerable";i:196;s:11:"innumerably";i:197;s:10:"innumerous";i:198;s:8:"insights";i:199;s:6:"intend";i:200;s:9:"intensive";i:201;s:11:"intensively";i:202;s:6:"intent";i:203;s:9:"intention";i:204;s:10:"intentions";i:205;s:7:"intents";i:206;s:8:"intimate";i:207;s:8:"intrigue";i:208;s:12:"irregardless";i:209;s:9:"judgement";i:210;s:10:"judgements";i:211;s:8:"judgment";i:212;s:9:"judgments";i:213;s:3:"key";i:214;s:4:"knew";i:215;s:7:"knowing";i:216;s:9:"knowingly";i:217;s:9:"knowledge";i:218;s:5:"large";i:219;s:11:"large-scale";i:220;s:7:"largely";i:221;s:6:"lastly";i:222;s:5:"learn";i:223;s:6:"legacy";i:224;s:8:"legacies";i:225;s:10:"legalistic";i:226;s:10:"likelihood";i:227;s:8:"likewise";i:228;s:9:"limitless";i:229;s:5:"major";i:230;s:6:"mantra";i:231;s:7:"massive";i:232;s:6:"matter";i:233;s:8:"memories";i:234;s:9:"mentality";i:235;s:11:"metaphorize";i:236;s:5:"minor";i:237;s:2:"mm";i:238;s:6:"motive";i:239;s:4:"move";i:240;s:3:"mum";i:241;s:3:"nap";i:242;s:7:"nascent";i:243;s:6:"nature";i:244;s:7:"needful";i:245;s:9:"needfully";i:246;s:10:"nonviolent";i:247;s:6:"notion";i:248;s:6:"nuance";i:249;s:7:"nuances";i:250;s:10:"obligation";i:251;s:7:"obvious";i:252;s:7:"olympic";i:253;s:10:"open-ended";i:254;s:7:"opinion";i:255;s:8:"opinions";i:256;s:9:"orthodoxy";i:257;s:7:"outlook";i:258;s:8:"outright";i:259;s:9:"outspoken";i:260;s:5:"overt";i:261;s:9:"overtures";i:262;s:6:"pacify";i:263;s:11:"perceptions";i:264;s:11:"persistence";i:265;s:11:"perspective";i:266;s:12:"philosophize";i:267;s:7:"pivotal";i:268;s:6:"player";i:269;s:7:"plenary";i:270;s:5:"point";i:271;s:6:"ponder";i:272;s:8:"position";i:273;s:11:"possibility";i:274;s:8:"possibly";i:275;s:7:"posture";i:276;s:5:"power";i:277;s:11:"practically";i:278;s:4:"pray";i:279;s:11:"predictable";i:280;s:13:"predictablely";i:281;s:11:"predominant";i:282;s:8:"pressure";i:283;s:9:"pressures";i:284;s:9:"prevalent";i:285;s:9:"primarily";i:286;s:7:"primary";i:287;s:5:"prime";i:288;s:8:"proclaim";i:289;s:13:"prognosticate";i:290;s:8:"prophesy";i:291;s:13:"proportionate";i:292;s:15:"proportionately";i:293;s:5:"prove";i:294;s:5:"quick";i:295;s:5:"rapid";i:296;s:4:"rare";i:297;s:6:"rarely";i:298;s:5:"react";i:299;s:8:"reaction";i:300;s:9:"reactions";i:301;s:9:"readiness";i:302;s:11:"realization";i:303;s:12:"recognizable";i:304;s:10:"reflecting";i:305;s:6:"regard";i:306;s:12:"regardlessly";i:307;s:9:"reiterate";i:308;s:10:"reiterated";i:309;s:10:"reiterates";i:310;s:9:"relations";i:311;s:6:"remark";i:312;s:9:"renewable";i:313;s:7:"replete";i:314;s:7:"reputed";i:315;s:6:"reveal";i:316;s:9:"revealing";i:317;s:10:"revelatory";i:318;s:9:"screaming";i:319;s:11:"screamingly";i:320;s:10:"scrutinize";i:321;s:8:"scrutiny";i:322;s:9:"seemingly";i:323;s:16:"self-examination";i:324;s:4:"show";i:325;s:7:"signals";i:326;s:6:"simply";i:327;s:6:"sleepy";i:328;s:11:"soliloquize";i:329;s:11:"sovereignty";i:330;s:8:"specific";i:331;s:12:"specifically";i:332;s:9:"speculate";i:333;s:11:"speculation";i:334;s:14:"splayed-finger";i:335;s:6:"stance";i:336;s:7:"stances";i:337;s:6:"stands";i:338;s:10:"statements";i:339;s:4:"stir";i:340;s:8:"strength";i:341;s:22:"stronger-than-expected";i:342;s:7:"stuffed";i:343;s:7:"stupefy";i:344;s:7:"suppose";i:345;s:9:"supposing";i:346;s:8:"surprise";i:347;s:10:"surprising";i:348;s:12:"surprisingly";i:349;s:5:"swing";i:350;s:4:"tale";i:351;s:4:"tall";i:352;s:10:"tantamount";i:353;s:5:"taste";i:354;s:8:"tendency";i:355;s:10:"theoretize";i:356;s:8:"thinking";i:357;s:7:"thought";i:358;s:6:"thusly";i:359;s:4:"tint";i:360;s:5:"touch";i:361;s:7:"touches";i:362;s:12:"transparency";i:363;s:11:"transparent";i:364;s:9:"transport";i:365;s:9:"unaudited";i:366;s:10:"utterances";i:367;s:4:"view";i:368;s:10:"viewpoints";i:369;s:5:"views";i:370;s:5:"vocal";i:371;s:5:"whiff";i:372;s:4:"yeah";} jwhennessey/phpinsight/lib/PHPInsight/data/data.pos.php 0000644 00001112574 15153553404 0017161 0 ustar 00 a:11078:{i:0;s:4:"like";i:1;s:7:"awesome";i:2;s:7:"special";i:3;s:14:"discriminating";i:4;s:11:"responsible";i:5;s:11:"distinctive";i:6;s:6:"active";i:7;s:6:"sprite";i:8;s:6:"strong";i:9;s:11:"captivating";i:10;s:8:"moderate";i:11;s:11:"accountable";i:12;s:6:"benign";i:13;s:10:"passionate";i:14;s:12:"enthusiastic";i:15;s:10:"purposeful";i:16;s:7:"concise";i:17;s:8:"balanced";i:18;s:6:"speedy";i:19;s:5:"moral";i:20;s:7:"thrifty";i:21;s:7:"amiable";i:22;s:9:"versatile";i:23;s:7:"gallant";i:24;s:4:"rosy";i:25;s:11:"encouraging";i:26;s:7:"dutiful";i:27;s:8:"heavenly";i:28;s:9:"agreeable";i:29;s:9:"dignified";i:30;s:6:"tender";i:31;s:7:"ethical";i:32;s:9:"vivacious";i:33;s:7:"prudent";i:34;s:6:"lively";i:35;s:9:"visionary";i:36;s:9:"ambitious";i:37;s:11:"sentimental";i:38;s:10:"attractive";i:39;s:6:"poetic";i:40;s:7:"refined";i:41;s:8:"adorable";i:42;s:11:"appropriate";i:43;s:8:"likeable";i:44;s:8:"romantic";i:45;s:7:"valiant";i:46;s:11:"considerate";i:47;s:5:"handy";i:48;s:10:"systematic";i:49;s:4:"airy";i:50;s:8:"positive";i:51;s:8:"thankful";i:52;s:10:"nourishing";i:53;s:8:"spirited";i:54;s:6:"steady";i:55;s:8:"precious";i:56;s:12:"appreciative";i:57;s:9:"spiritual";i:58;s:6:"comely";i:59;s:10:"respectful";i:60;s:9:"hilarious";i:61;s:10:"forthright";i:62;s:5:"suave";i:63;s:9:"priceless";i:64;s:10:"reasonable";i:65;s:5:"light";i:66;s:6:"mature";i:67;s:11:"fashionable";i:68;s:5:"sunny";i:69;s:8:"generous";i:70;s:10:"discerning";i:71;s:8:"amicable";i:72;s:9:"energetic";i:73;s:7:"worldly";i:74;s:8:"prolific";i:75;s:13:"sophisticated";i:76;s:8:"splendid";i:77;s:6:"prompt";i:78;s:10:"dependable";i:79;s:11:"clearheaded";i:80;s:7:"sincere";i:81;s:7:"willing";i:82;s:7:"saintly";i:83;s:10:"productive";i:84;s:10:"charitable";i:85;s:5:"sweet";i:86;s:10:"impressive";i:87;s:10:"democratic";i:88;s:5:"sharp";i:89;s:8:"terrific";i:90;s:8:"reliable";i:91;s:8:"flexible";i:92;s:10:"deliberate";i:93;s:6:"candid";i:94;s:6:"genial";i:95;s:7:"radiant";i:96;s:8:"resolute";i:97;s:9:"important";i:98;s:5:"grand";i:99;s:9:"sagacious";i:100;s:11:"established";i:101;s:10:"privileged";i:102;s:10:"beneficent";i:103;s:13:"philosophical";i:104;s:9:"rejoicing";i:105;s:6:"astute";i:106;s:6:"seemly";i:107;s:12:"accomplished";i:108;s:10:"autonomous";i:109;s:9:"scholarly";i:110;s:7:"complex";i:111;s:4:"spry";i:112;s:6:"smooth";i:113;s:8:"blissful";i:114;s:7:"amorous";i:115;s:7:"genuine";i:116;s:8:"artistic";i:117;s:10:"consummate";i:118;s:13:"compassionate";i:119;s:11:"independent";i:120;s:10:"openhanded";i:121;s:5:"godly";i:122;s:9:"congenial";i:123;s:7:"blessed";i:124;s:9:"admirable";i:125;s:4:"real";i:126;s:8:"polished";i:127;s:9:"deserving";i:128;s:6:"daring";i:129;s:4:"free";i:130;s:8:"tolerant";i:131;s:5:"great";i:132;s:7:"fertile";i:133;s:8:"masterly";i:134;s:7:"elegant";i:135;s:8:"sociable";i:136;s:7:"winsome";i:137;s:8:"fruitful";i:138;s:13:"understanding";i:139;s:7:"mindful";i:140;s:9:"forgiving";i:141;s:12:"affectionate";i:142;s:8:"jubilant";i:143;s:8:"cerebral";i:144;s:10:"thoughtful";i:145;s:9:"provident";i:146;s:9:"attentive";i:147;s:8:"virtuous";i:148;s:8:"tranquil";i:149;s:7:"logical";i:150;s:4:"fine";i:151;s:6:"caring";i:152;s:9:"disarming";i:153;s:9:"courteous";i:154;s:7:"heedful";i:155;s:9:"intuitive";i:156;s:4:"chic";i:157;s:9:"excellent";i:158;s:7:"affable";i:159;s:7:"hopeful";i:160;s:7:"stylish";i:161;s:6:"brainy";i:162;s:8:"peaceful";i:163;s:10:"personable";i:164;s:6:"subtle";i:165;s:8:"decisive";i:166;s:9:"confident";i:167;s:10:"neighborly";i:168;s:8:"studious";i:169;s:4:"good";i:170;s:9:"desirable";i:171;s:6:"nimble";i:172;s:4:"calm";i:173;s:7:"amazing";i:174;s:10:"persuasive";i:175;s:9:"dedicated";i:176;s:10:"consistent";i:177;s:9:"convivial";i:178;s:6:"robust";i:179;s:13:"philanthropic";i:180;s:4:"wise";i:181;s:6:"chaste";i:182;s:11:"goodhearted";i:183;s:6:"direct";i:184;s:11:"affirmative";i:185;s:10:"altruistic";i:186;s:8:"gracious";i:187;s:8:"fabulous";i:188;s:10:"convulsive";i:189;s:8:"powerful";i:190;s:4:"warm";i:191;s:8:"pleasant";i:192;s:7:"devoted";i:193;s:8:"original";i:194;s:6:"superb";i:195;s:11:"intelligent";i:196;s:7:"playful";i:197;s:6:"elated";i:198;s:8:"punctual";i:199;s:8:"credible";i:200;s:10:"reflective";i:201;s:13:"companionable";i:202;s:8:"alluring";i:203;s:9:"wonderful";i:204;s:8:"vigorous";i:205;s:6:"proper";i:206;s:4:"mild";i:207;s:6:"chatty";i:208;s:6:"bright";i:209;s:10:"diplomatic";i:210;s:10:"immaculate";i:211;s:7:"defined";i:212;s:9:"whimsical";i:213;s:5:"jolly";i:214;s:9:"fantastic";i:215;s:13:"accommodating";i:216;s:4:"rich";i:217;s:4:"bold";i:218;s:3:"fun";i:219;s:4:"nice";i:220;s:12:"conciliatory";i:221;s:5:"lucid";i:222;s:10:"benevolent";i:223;s:8:"kissable";i:224;s:10:"harmonious";i:225;s:12:"approachable";i:226;s:5:"right";i:227;s:7:"learned";i:228;s:11:"meritorious";i:229;s:7:"genteel";i:230;s:8:"creative";i:231;s:4:"just";i:232;s:7:"healthy";i:233;s:10:"restrained";i:234;s:5:"agile";i:235;s:4:"cozy";i:236;s:4:"deep";i:237;s:9:"satisfied";i:238;s:10:"responsive";i:239;s:10:"gregarious";i:240;s:8:"diligent";i:241;s:8:"athletic";i:242;s:9:"enchanted";i:243;s:7:"upright";i:244;s:8:"innocent";i:245;s:5:"hardy";i:246;s:7:"perfect";i:247;s:5:"brave";i:248;s:11:"industrious";i:249;s:9:"practical";i:250;s:8:"gorgeous";i:251;s:8:"truthful";i:252;s:8:"grounded";i:253;s:7:"liberal";i:254;s:6:"shrewd";i:255;s:8:"mannered";i:256;s:7:"looking";i:257;s:9:"receptive";i:258;s:8:"charming";i:259;s:5:"alive";i:260;s:6:"stable";i:261;s:5:"loyal";i:262;s:6:"casual";i:263;s:7:"relaxed";i:264;s:11:"comfortable";i:265;s:8:"sensible";i:266;s:8:"eloquent";i:267;s:5:"merry";i:268;s:4:"keen";i:269;s:7:"natural";i:270;s:8:"constant";i:271;s:9:"impartial";i:272;s:9:"brilliant";i:273;s:11:"fascinating";i:274;s:11:"spontaneous";i:275;s:7:"soulful";i:276;s:7:"cordial";i:277;s:9:"sparkling";i:278;s:7:"gleeful";i:279;s:10:"hospitable";i:280;s:8:"exultant";i:281;s:8:"faithful";i:282;s:6:"adroit";i:283;s:7:"earnest";i:284;s:6:"serene";i:285;s:13:"knowledgeable";i:286;s:5:"lucky";i:287;s:6:"gentle";i:288;s:10:"believable";i:289;s:8:"merciful";i:290;s:5:"civil";i:291;s:8:"engaging";i:292;s:8:"humorous";i:293;s:9:"efficient";i:294;s:11:"influential";i:295;s:8:"discrete";i:296;s:10:"compatible";i:297;s:11:"sympathetic";i:298;s:7:"sublime";i:299;s:7:"sensual";i:300;s:11:"commendable";i:301;s:10:"accessible";i:302;s:10:"felicitous";i:303;s:7:"comedic";i:304;s:11:"progressive";i:305;s:9:"competent";i:306;s:7:"assured";i:307;s:4:"sexy";i:308;s:11:"resplendent";i:309;s:9:"beautiful";i:310;s:10:"convincing";i:311;s:5:"witty";i:312;s:9:"pragmatic";i:313;s:7:"helpful";i:314;s:6:"decent";i:315;s:8:"thorough";i:316;s:8:"inspired";i:317;s:12:"entertaining";i:318;s:6:"lovely";i:319;s:8:"ecstatic";i:320;s:9:"cognizant";i:321;s:5:"exact";i:322;s:8:"luminous";i:323;s:9:"righteous";i:324;s:12:"enterprising";i:325;s:13:"authoritative";i:326;s:11:"enlightened";i:327;s:8:"magnetic";i:328;s:7:"lenient";i:329;s:5:"ready";i:330;s:5:"funny";i:331;s:10:"forbearing";i:332;s:10:"remarkable";i:333;s:10:"delectable";i:334;s:4:"cute";i:335;s:8:"laudable";i:336;s:6:"joyful";i:337;s:8:"colorful";i:338;s:6:"worthy";i:339;s:9:"adaptable";i:340;s:8:"profound";i:341;s:10:"courageous";i:342;s:5:"solid";i:343;s:9:"ingenious";i:344;s:6:"modest";i:345;s:7:"reposed";i:346;s:4:"glad";i:347;s:5:"tough";i:348;s:4:"tidy";i:349;s:6:"unique";i:350;s:9:"inventive";i:351;s:8:"cheerful";i:352;s:6:"heroic";i:353;s:10:"successful";i:354;s:8:"reverent";i:355;s:11:"imaginative";i:356;s:10:"delightful";i:357;s:13:"extraordinary";i:358;s:7:"focused";i:359;s:7:"content";i:360;s:9:"authentic";i:361;s:5:"swell";i:362;s:12:"professional";i:363;s:10:"determined";i:364;s:8:"grateful";i:365;s:5:"happy";i:366;s:5:"adore";i:367;s:6:"admire";i:368;s:5:"lovee";i:369;s:6:"thanks";i:370;s:4:"good";i:371;s:12:"notveryblame";i:372;s:8:"notblame";i:373;s:17:"notverysuspicious";i:374;s:13:"notsuspicious";i:375;s:17:"notverysuppressed";i:376;s:13:"notsuppressed";i:377;s:18:"notverysuperficial";i:378;s:14:"notsuperficial";i:379;s:15:"notverysuicidal";i:380;s:11:"notsuicidal";i:381;s:17:"notverysuffocated";i:382;s:13:"notsuffocated";i:383;s:16:"notverysuffering";i:384;s:12:"notsuffering";i:385;s:17:"notverysubmissive";i:386;s:13:"notsubmissive";i:387;s:13:"notverystupid";i:388;s:9:"notstupid";i:389;s:12:"notverystuck";i:390;s:8:"notstuck";i:391;s:16:"notverystretched";i:392;s:12:"notstretched";i:393;s:15:"notverystressed";i:394;s:11:"notstressed";i:395;s:14:"notverystrange";i:396;s:10:"notstrange";i:397;s:18:"notverystereotyped";i:398;s:14:"notstereotyped";i:399;s:15:"notveryspiteful";i:400;s:11:"notspiteful";i:401;s:16:"notverysmothered";i:402;s:12:"notsmothered";i:403;s:12:"notverysmall";i:404;s:8:"notsmall";i:405;s:11:"notveryslow";i:406;s:7:"notslow";i:407;s:10:"notveryshy";i:408;s:6:"notshy";i:409;s:16:"notverysensitive";i:410;s:12:"notsensitive";i:411;s:14:"notveryselfish";i:412;s:10:"notselfish";i:413;s:14:"notveryscrewed";i:414;s:10:"notscrewed";i:415;s:14:"notveryscarred";i:416;s:10:"notscarred";i:417;s:13:"notveryscared";i:418;s:9:"notscared";i:419;s:16:"notverysarcastic";i:420;s:12:"notsarcastic";i:421;s:15:"notverysadistic";i:422;s:11:"notsadistic";i:423;s:10:"notverysad";i:424;s:6:"notsad";i:425;s:13:"notveryrotten";i:426;s:9:"notrotten";i:427;s:13:"notveryrobbed";i:428;s:9:"notrobbed";i:429;s:17:"notveryridiculous";i:430;s:13:"notridiculous";i:431;s:16:"notveryridiculed";i:432;s:12:"notridiculed";i:433;s:17:"notveryrevengeful";i:434;s:13:"notrevengeful";i:435;s:15:"notveryretarded";i:436;s:11:"notretarded";i:437;s:16:"notveryresentful";i:438;s:12:"notresentful";i:439;s:15:"notveryresented";i:440;s:11:"notresented";i:441;s:15:"notveryrejected";i:442;s:11:"notrejected";i:443;s:13:"notveryregret";i:444;s:9:"notregret";i:445;s:14:"notveryrattled";i:446;s:10:"notrattled";i:447;s:12:"notveryraped";i:448;s:8:"notraped";i:449;s:11:"notveryrage";i:450;s:7:"notrage";i:451;s:12:"notveryquiet";i:452;s:8:"notquiet";i:453;s:17:"notveryquestioned";i:454;s:13:"notquestioned";i:455;s:12:"notveryqueer";i:456;s:8:"notqueer";i:457;s:18:"notveryquarrelsome";i:458;s:14:"notquarrelsome";i:459;s:14:"notverypuzzled";i:460;s:10:"notpuzzled";i:461;s:13:"notverypushed";i:462;s:9:"notpushed";i:463;s:15:"notverypunished";i:464;s:11:"notpunished";i:465;s:16:"notverypsychotic";i:466;s:12:"notpsychotic";i:467;s:19:"notverypsychopathic";i:468;s:15:"notpsychopathic";i:469;s:15:"notveryprovoked";i:470;s:11:"notprovoked";i:471;s:17:"notveryprosecuted";i:472;s:13:"notprosecuted";i:473;s:16:"notverypressured";i:474;s:12:"notpressured";i:475;s:18:"notverypredjudiced";i:476;s:14:"notpredjudiced";i:477;s:18:"notverypreoccupied";i:478;s:14:"notpreoccupied";i:479;s:16:"notverypowerless";i:480;s:12:"notpowerless";i:481;s:11:"notverypoor";i:482;s:7:"notpoor";i:483;s:13:"notverypooped";i:484;s:9:"notpooped";i:485;s:12:"notveryplain";i:486;s:8:"notplain";i:487;s:13:"notverypissed";i:488;s:9:"notpissed";i:489;s:12:"notveryphony";i:490;s:8:"notphony";i:491;s:16:"notverypetrified";i:492;s:12:"notpetrified";i:493;s:18:"notverypessimistic";i:494;s:14:"notpessimistic";i:495;s:15:"notverypathetic";i:496;s:11:"notpathetic";i:497;s:14:"notverypassive";i:498;s:10:"notpassive";i:499;s:15:"notveryparanoid";i:500;s:11:"notparanoid";i:501;s:12:"notverypanic";i:502;s:8:"notpanic";i:503;s:11:"notverypain";i:504;s:7:"notpain";i:505;s:18:"notveryoverwhelmed";i:506;s:14:"notoverwhelmed";i:507;s:16:"notveryoppressed";i:508;s:12:"notoppressed";i:509;s:14:"notveryopposed";i:510;s:10:"notopposed";i:511;s:15:"notveryoffended";i:512;s:11:"notoffended";i:513;s:10:"notveryodd";i:514;s:6:"notodd";i:515;s:17:"notveryobstructed";i:516;s:13:"notobstructed";i:517;s:16:"notveryobsessive";i:518;s:12:"notobsessive";i:519;s:15:"notveryobsessed";i:520;s:11:"notobsessed";i:521;s:16:"notveryobligated";i:522;s:12:"notobligated";i:523;s:18:"notveryobjectified";i:524;s:14:"notobjectified";i:525;s:12:"notverynutty";i:526;s:8:"notnutty";i:527;s:11:"notverynuts";i:528;s:7:"notnuts";i:529;s:11:"notverynumb";i:530;s:7:"notnumb";i:531;s:20:"notverynonconforming";i:532;s:16:"notnonconforming";i:533;s:15:"notveryneurotic";i:534;s:11:"notneurotic";i:535;s:14:"notverynervous";i:536;s:10:"notnervous";i:537;s:15:"notverynegative";i:538;s:11:"notnegative";i:539;s:12:"notveryneedy";i:540;s:8:"notneedy";i:541;s:13:"notverynagged";i:542;s:9:"notnagged";i:543;s:12:"notverymoody";i:544;s:8:"notmoody";i:545;s:15:"notverymolested";i:546;s:11:"notmolested";i:547;s:13:"notverymocked";i:548;s:9:"notmocked";i:549;s:20:"notverymisunderstood";i:550;s:16:"notmisunderstood";i:551;s:17:"notverymistrusted";i:552;s:13:"notmistrusted";i:553;s:17:"notverymistreated";i:554;s:13:"notmistreated";i:555;s:15:"notverymistaken";i:556;s:11:"notmistaken";i:557;s:13:"notverymisled";i:558;s:9:"notmisled";i:559;s:16:"notverymiserable";i:560;s:12:"notmiserable";i:561;s:13:"notverymiffed";i:562;s:9:"notmiffed";i:563;s:12:"notverymessy";i:564;s:8:"notmessy";i:565;s:18:"notverymasochistic";i:566;s:14:"notmasochistic";i:567;s:18:"notverymanipulated";i:568;s:14:"notmanipulated";i:569;s:10:"notverymad";i:570;s:6:"notmad";i:571;s:10:"notverylow";i:572;s:6:"notlow";i:573;s:15:"notveryloveless";i:574;s:11:"notloveless";i:575;s:12:"notverylousy";i:576;s:8:"notlousy";i:577;s:11:"notverylost";i:578;s:7:"notlost";i:579;s:14:"notverylonging";i:580;s:10:"notlonging";i:581;s:15:"notverylonesome";i:582;s:11:"notlonesome";i:583;s:13:"notverylonely";i:584;s:9:"notlonely";i:585;s:13:"notverylittle";i:586;s:9:"notlittle";i:587;s:14:"notverylimited";i:588;s:10:"notlimited";i:589;s:11:"notverylazy";i:590;s:7:"notlazy";i:591;s:16:"notverylaughable";i:592;s:12:"notlaughable";i:593;s:14:"notverylabeled";i:594;s:10:"notlabeled";i:595;s:13:"notveryjudged";i:596;s:9:"notjudged";i:597;s:14:"notveryjoyless";i:598;s:10:"notjoyless";i:599;s:14:"notveryjealous";i:600;s:10:"notjealous";i:601;s:12:"notveryjaded";i:602;s:8:"notjaded";i:603;s:15:"notveryisolated";i:604;s:11:"notisolated";i:605;s:16:"notveryirritated";i:606;s:12:"notirritated";i:607;s:16:"notveryirritable";i:608;s:12:"notirritable";i:609;s:17:"notveryirrational";i:610;s:13:"notirrational";i:611;s:16:"notveryinvisible";i:612;s:12:"notinvisible";i:613;s:18:"notveryinvalidated";i:614;s:14:"notinvalidated";i:615;s:18:"notveryintoxicated";i:616;s:14:"notintoxicated";i:617;s:18:"notveryintimidated";i:618;s:14:"notintimidated";i:619;s:18:"notveryinterrupted";i:620;s:14:"notinterrupted";i:621;s:19:"notveryinterrogated";i:622;s:15:"notinterrogated";i:623;s:14:"notveryintense";i:624;s:10:"notintense";i:625;s:15:"notveryinsulted";i:626;s:11:"notinsulted";i:627;s:19:"notveryinsufficient";i:628;s:15:"notinsufficient";i:629;s:16:"notveryinsincere";i:630;s:12:"notinsincere";i:631;s:20:"notveryinsignificant";i:632;s:16:"notinsignificant";i:633;s:15:"notveryinsecure";i:634;s:11:"notinsecure";i:635;s:13:"notveryinsane";i:636;s:9:"notinsane";i:637;s:17:"notveryinjusticed";i:638;s:13:"notinjusticed";i:639;s:14:"notveryinjured";i:640;s:10:"notinjured";i:641;s:15:"notveryinhumane";i:642;s:11:"notinhumane";i:643;s:16:"notveryinhibited";i:644;s:12:"notinhibited";i:645;s:17:"notveryinfuriated";i:646;s:13:"notinfuriated";i:647;s:15:"notveryinferior";i:648;s:11:"notinferior";i:649;s:18:"notveryinefficient";i:650;s:14:"notinefficient";i:651;s:18:"notveryineffective";i:652;s:14:"notineffective";i:653;s:17:"notveryinebriated";i:654;s:13:"notinebriated";i:655;s:20:"notveryindoctrinated";i:656;s:16:"notindoctrinated";i:657;s:18:"notveryindifferent";i:658;s:14:"notindifferent";i:659;s:17:"notveryindecisive";i:660;s:13:"notindecisive";i:661;s:16:"notveryincorrect";i:662;s:12:"notincorrect";i:663;s:17:"notveryincomplete";i:664;s:13:"notincomplete";i:665;s:19:"notveryincompatible";i:666;s:15:"notincompatible";i:667;s:18:"notveryincompetent";i:668;s:14:"notincompetent";i:669;s:22:"notveryincommunicative";i:670;s:18:"notincommunicative";i:671;s:16:"notveryincapable";i:672;s:12:"notincapable";i:673;s:17:"notveryinadequate";i:674;s:13:"notinadequate";i:675;s:15:"notveryinactive";i:676;s:11:"notinactive";i:677;s:16:"notveryimpulsive";i:678;s:12:"notimpulsive";i:679;s:17:"notveryimprisoned";i:680;s:13:"notimprisoned";i:681;s:15:"notveryimpotent";i:682;s:11:"notimpotent";i:683;s:17:"notveryimbalanced";i:684;s:13:"notimbalanced";i:685;s:10:"notveryill";i:686;s:6:"notill";i:687;s:14:"notveryignored";i:688;s:10:"notignored";i:689;s:15:"notveryignorant";i:690;s:11:"notignorant";i:691;s:14:"notveryidiotic";i:692;s:10:"notidiotic";i:693;s:13:"notveryguilty";i:694;s:9:"notguilty";i:695;s:13:"notverygrumpy";i:696;s:9:"notgrumpy";i:697;s:15:"notverygrounded";i:698;s:11:"notgrounded";i:699;s:14:"notverygrouchy";i:700;s:10:"notgrouchy";i:701;s:16:"notverygrotesque";i:702;s:12:"notgrotesque";i:703;s:12:"notverygross";i:704;s:8:"notgross";i:705;s:11:"notverygrim";i:706;s:7:"notgrim";i:707;s:12:"notverygrief";i:708;s:8:"notgrief";i:709;s:11:"notverygrey";i:710;s:7:"notgrey";i:711;s:13:"notverygothic";i:712;s:9:"notgothic";i:713;s:11:"notveryglum";i:714;s:7:"notglum";i:715;s:13:"notverygloomy";i:716;s:9:"notgloomy";i:717;s:14:"notveryfurious";i:718;s:10:"notfurious";i:719;s:17:"notveryfrustrated";i:720;s:13:"notfrustrated";i:721;s:13:"notveryfrigid";i:722;s:9:"notfrigid";i:723;s:17:"notveryfrightened";i:724;s:13:"notfrightened";i:725;s:14:"notveryfragile";i:726;s:10:"notfragile";i:727;s:16:"notveryforgotten";i:728;s:12:"notforgotten";i:729;s:18:"notveryforgettable";i:730;s:14:"notforgettable";i:731;s:16:"notveryforgetful";i:732;s:12:"notforgetful";i:733;s:13:"notveryforced";i:734;s:9:"notforced";i:735;s:13:"notveryflawed";i:736;s:9:"notflawed";i:737;s:14:"notveryfearful";i:738;s:10:"notfearful";i:739;s:11:"notveryfear";i:740;s:7:"notfear";i:741;s:12:"notveryfalse";i:742;s:8:"notfalse";i:743;s:11:"notveryfake";i:744;s:7:"notfake";i:745;s:14:"notveryfailful";i:746;s:10:"notfailful";i:747;s:16:"notveryexhausted";i:748;s:12:"notexhausted";i:749;s:15:"notveryexcluded";i:750;s:11:"notexcluded";i:751;s:16:"notveryexcessive";i:752;s:12:"notexcessive";i:753;s:14:"notveryevicted";i:754;s:10:"notevicted";i:755;s:14:"notveryevasive";i:756;s:10:"notevasive";i:757;s:13:"notveryevaded";i:758;s:9:"notevaded";i:759;s:16:"notveryentangled";i:760;s:12:"notentangled";i:761;s:15:"notveryenslaved";i:762;s:11:"notenslaved";i:763;s:14:"notveryenraged";i:764;s:10:"notenraged";i:765;s:17:"notveryendangered";i:766;s:13:"notendangered";i:767;s:17:"notveryencumbered";i:768;s:13:"notencumbered";i:769;s:12:"notveryempty";i:770;s:8:"notempty";i:771;s:18:"notveryemotionless";i:772;s:14:"notemotionless";i:773;s:16:"notveryemotional";i:774;s:12:"notemotional";i:775;s:18:"notveryembarrassed";i:776;s:14:"notembarrassed";i:777;s:18:"notveryemasculated";i:778;s:14:"notemasculated";i:779;s:18:"notveryemancipated";i:780;s:14:"notemancipated";i:781;s:14:"notveryelusive";i:782;s:10:"notelusive";i:783;s:18:"notveryegotistical";i:784;s:14:"notegotistical";i:785;s:16:"notveryegotistic";i:786;s:12:"notegotistic";i:787;s:17:"notveryegocentric";i:788;s:13:"notegocentric";i:789;s:11:"notveryedgy";i:790;s:7:"notedgy";i:791;s:12:"notveryduped";i:792;s:8:"notduped";i:793;s:13:"notverydumped";i:794;s:9:"notdumped";i:795;s:11:"notverydumb";i:796;s:7:"notdumb";i:797;s:10:"notverydry";i:798;s:6:"notdry";i:799;s:12:"notverydrunk";i:800;s:8:"notdrunk";i:801;s:14:"notverydropped";i:802;s:10:"notdropped";i:803;s:13:"notverydreary";i:804;s:9:"notdreary";i:805;s:15:"notverydreadful";i:806;s:11:"notdreadful";i:807;s:12:"notverydread";i:808;s:8:"notdread";i:809;s:15:"notverydramatic";i:810;s:11:"notdramatic";i:811;s:14:"notverydrained";i:812;s:10:"notdrained";i:813;s:18:"notverydowntrodden";i:814;s:14:"notdowntrodden";i:815;s:18:"notverydownhearted";i:816;s:14:"notdownhearted";i:817;s:11:"notverydown";i:818;s:7:"notdown";i:819;s:15:"notverydoubtful";i:820;s:11:"notdoubtful";i:821;s:14:"notverydoubted";i:822;s:10:"notdoubted";i:823;s:13:"notverydoomed";i:824;s:9:"notdoomed";i:825;s:16:"notverydominated";i:826;s:12:"notdominated";i:827;s:12:"notverydizzy";i:828;s:8:"notdizzy";i:829;s:16:"notverydisturbed";i:830;s:12:"notdisturbed";i:831;s:17:"notverydistressed";i:832;s:13:"notdistressed";i:833;s:17:"notverydistraught";i:834;s:13:"notdistraught";i:835;s:17:"notverydistracted";i:836;s:13:"notdistracted";i:837;s:14:"notverydistant";i:838;s:10:"notdistant";i:839;s:19:"notverydissatisfied";i:840;s:15:"notdissatisfied";i:841;s:19:"notverydisrespected";i:842;s:15:"notdisrespected";i:843;s:18:"notverydisregarded";i:844;s:14:"notdisregarded";i:845;s:17:"notverydisposable";i:846;s:13:"notdisposable";i:847;s:17:"notverydispleased";i:848;s:13:"notdispleased";i:849;s:15:"notverydisowned";i:850;s:11:"notdisowned";i:851;s:18:"notverydisoriented";i:852;s:14:"notdisoriented";i:853;s:19:"notverydisorganized";i:854;s:15:"notdisorganized";i:855;s:15:"notverydismayed";i:856;s:11:"notdismayed";i:857;s:13:"notverydismal";i:858;s:9:"notdismal";i:859;s:15:"notverydisliked";i:860;s:11:"notdisliked";i:861;s:14:"notverydislike";i:862;s:10:"notdislike";i:863;s:20:"notverydisillusioned";i:864;s:16:"notdisillusioned";i:865;s:19:"notverydishonorable";i:866;s:15:"notdishonorable";i:867;s:16:"notverydishonest";i:868;s:12:"notdishonest";i:869;s:19:"notverydisheartened";i:870;s:15:"notdisheartened";i:871;s:16:"notverydisgusted";i:872;s:12:"notdisgusted";i:873;s:14:"notverydisgust";i:874;s:10:"notdisgust";i:875;s:18:"notverydisgruntled";i:876;s:14:"notdisgruntled";i:877;s:16:"notverydisgraced";i:878;s:12:"notdisgraced";i:879;s:19:"notverydisenchanted";i:880;s:15:"notdisenchanted";i:881;s:19:"notverydisempowered";i:882;s:15:"notdisempowered";i:883;s:17:"notverydisdainful";i:884;s:13:"notdisdainful";i:885;s:14:"notverydisdain";i:886;s:10:"notdisdain";i:887;s:20:"notverydiscriminated";i:888;s:16:"notdiscriminated";i:889;s:18:"notverydiscouraged";i:890;s:14:"notdiscouraged";i:891;s:17:"notverydiscontent";i:892;s:13:"notdiscontent";i:893;s:19:"notverydisconnected";i:894;s:15:"notdisconnected";i:895;s:16:"notverydiscarded";i:896;s:12:"notdiscarded";i:897;s:18:"notverydiscardable";i:898;s:14:"notdiscardable";i:899;s:18:"notverydisbelieved";i:900;s:14:"notdisbelieved";i:901;s:20:"notverydisappointing";i:902;s:16:"notdisappointing";i:903;s:19:"notverydisappointed";i:904;s:15:"notdisappointed";i:905;s:19:"notverydisagreeable";i:906;s:15:"notdisagreeable";i:907;s:15:"notverydisabled";i:908;s:11:"notdisabled";i:909;s:12:"notverydirty";i:910;s:8:"notdirty";i:911;s:20:"notverydirectionless";i:912;s:16:"notdirectionless";i:913;s:16:"notverydifficult";i:914;s:12:"notdifficult";i:915;s:16:"notverydifferent";i:916;s:12:"notdifferent";i:917;s:16:"notverydiagnosed";i:918;s:12:"notdiagnosed";i:919;s:13:"notverydevoid";i:920;s:9:"notdevoid";i:921;s:14:"notverydeviant";i:922;s:10:"notdeviant";i:923;s:17:"notverydevastated";i:924;s:13:"notdevastated";i:925;s:15:"notverydevalued";i:926;s:11:"notdevalued";i:927;s:15:"notverydetested";i:928;s:11:"notdetested";i:929;s:17:"notverydetestable";i:930;s:13:"notdetestable";i:931;s:13:"notverydetest";i:932;s:9:"notdetest";i:933;s:15:"notverydetached";i:934;s:11:"notdetached";i:935;s:18:"notverydestructive";i:936;s:14:"notdestructive";i:937;s:16:"notverydestroyed";i:938;s:12:"notdestroyed";i:939;s:15:"notverydespised";i:940;s:11:"notdespised";i:941;s:17:"notverydespicable";i:942;s:13:"notdespicable";i:943;s:16:"notverydesperate";i:944;s:12:"notdesperate";i:945;s:17:"notverydespairing";i:946;s:13:"notdespairing";i:947;s:14:"notverydespair";i:948;s:10:"notdespair";i:949;s:15:"notverydesolate";i:950;s:11:"notdesolate";i:951;s:15:"notverydeserted";i:952;s:11:"notdeserted";i:953;s:15:"notverydeprived";i:954;s:11:"notdeprived";i:955;s:16:"notverydepressed";i:956;s:12:"notdepressed";i:957;s:15:"notverydepraved";i:958;s:11:"notdepraved";i:959;s:15:"notverydepleted";i:960;s:11:"notdepleted";i:961;s:16:"notverydependent";i:962;s:12:"notdependent";i:963;s:18:"notverydemotivated";i:964;s:14:"notdemotivated";i:965;s:18:"notverydemoralized";i:966;s:14:"notdemoralized";i:967;s:15:"notverydemented";i:968;s:11:"notdemented";i:969;s:15:"notverydemeaned";i:970;s:11:"notdemeaned";i:971;s:16:"notverydemanding";i:972;s:12:"notdemanding";i:973;s:14:"notverydeluded";i:974;s:10:"notdeluded";i:975;s:15:"notverydelicate";i:976;s:11:"notdelicate";i:977;s:15:"notverydejected";i:978;s:11:"notdejected";i:979;s:18:"notverydehumanized";i:980;s:14:"notdehumanized";i:981;s:15:"notverydegraded";i:982;s:11:"notdegraded";i:983;s:15:"notverydeflated";i:984;s:11:"notdeflated";i:985;s:16:"notverydeficient";i:986;s:12:"notdeficient";i:987;s:14:"notverydefiant";i:988;s:10:"notdefiant";i:989;s:16:"notverydefensive";i:990;s:12:"notdefensive";i:991;s:18:"notverydefenseless";i:992;s:14:"notdefenseless";i:993;s:16:"notverydefective";i:994;s:12:"notdefective";i:995;s:15:"notverydefeated";i:996;s:11:"notdefeated";i:997;s:14:"notverydefamed";i:998;s:10:"notdefamed";i:999;s:11:"notverydeep";i:1000;s:7:"notdeep";i:1001;s:15:"notverydeceived";i:1002;s:11:"notdeceived";i:1003;s:11:"notverydead";i:1004;s:7:"notdead";i:1005;s:12:"notverydazed";i:1006;s:8:"notdazed";i:1007;s:11:"notverydark";i:1008;s:7:"notdark";i:1009;s:16:"notverydangerous";i:1010;s:12:"notdangerous";i:1011;s:13:"notverydamned";i:1012;s:9:"notdamned";i:1013;s:14:"notverydamaged";i:1014;s:10:"notdamaged";i:1015;s:14:"notverycynical";i:1016;s:10:"notcynical";i:1017;s:14:"notverycrushed";i:1018;s:10:"notcrushed";i:1019;s:13:"notverycrummy";i:1020;s:9:"notcrummy";i:1021;s:13:"notverycruddy";i:1022;s:9:"notcruddy";i:1023;s:14:"notverycrowded";i:1024;s:10:"notcrowded";i:1025;s:12:"notverycross";i:1026;s:8:"notcross";i:1027;s:17:"notverycriticized";i:1028;s:13:"notcriticized";i:1029;s:15:"notverycritical";i:1030;s:11:"notcritical";i:1031;s:13:"notverycreepy";i:1032;s:9:"notcreepy";i:1033;s:12:"notverycrazy";i:1034;s:8:"notcrazy";i:1035;s:13:"notverycrappy";i:1036;s:9:"notcrappy";i:1037;s:11:"notverycrap";i:1038;s:7:"notcrap";i:1039;s:13:"notverycranky";i:1040;s:9:"notcranky";i:1041;s:14:"notverycramped";i:1042;s:10:"notcramped";i:1043;s:13:"notverycrabby";i:1044;s:9:"notcrabby";i:1045;s:15:"notverycowardly";i:1046;s:11:"notcowardly";i:1047;s:16:"notverycorralled";i:1048;s:12:"notcorralled";i:1049;s:15:"notverycornered";i:1050;s:11:"notcornered";i:1051;s:16:"notveryconvicted";i:1052;s:12:"notconvicted";i:1053;s:17:"notverycontrolled";i:1054;s:13:"notcontrolled";i:1055;s:18:"notverycontentious";i:1056;s:14:"notcontentious";i:1057;s:15:"notverycontempt";i:1058;s:11:"notcontempt";i:1059;s:20:"notverycontemplative";i:1060;s:16:"notcontemplative";i:1061;s:15:"notveryconsumed";i:1062;s:11:"notconsumed";i:1063;s:13:"notveryconned";i:1064;s:9:"notconned";i:1065;s:15:"notveryconfused";i:1066;s:11:"notconfused";i:1067;s:17:"notveryconfronted";i:1068;s:13:"notconfronted";i:1069;s:17:"notveryconflicted";i:1070;s:13:"notconflicted";i:1071;s:15:"notveryconfined";i:1072;s:11:"notconfined";i:1073;s:16:"notveryconcerned";i:1074;s:12:"notconcerned";i:1075;s:16:"notveryconceited";i:1076;s:12:"notconceited";i:1077;s:17:"notverycompulsive";i:1078;s:13:"notcompulsive";i:1079;s:18:"notverycompetitive";i:1080;s:14:"notcompetitive";i:1081;s:15:"notverycompared";i:1082;s:11:"notcompared";i:1083;s:16:"notverycommanded";i:1084;s:12:"notcommanded";i:1085;s:16:"notverycombative";i:1086;s:12:"notcombative";i:1087;s:11:"notverycold";i:1088;s:7:"notcold";i:1089;s:14:"notverycoerced";i:1090;s:10:"notcoerced";i:1091;s:18:"notverycodependent";i:1092;s:14:"notcodependent";i:1093;s:13:"notverycoaxed";i:1094;s:9:"notcoaxed";i:1095;s:13:"notveryclumsy";i:1096;s:9:"notclumsy";i:1097;s:15:"notveryclueless";i:1098;s:11:"notclueless";i:1099;s:13:"notveryclosed";i:1100;s:9:"notclosed";i:1101;s:13:"notveryclingy";i:1102;s:9:"notclingy";i:1103;s:21:"notveryclaustrophobic";i:1104;s:17:"notclaustrophobic";i:1105;s:14:"notverychicken";i:1106;s:10:"notchicken";i:1107;s:14:"notverycheated";i:1108;s:10:"notcheated";i:1109;s:13:"notverychased";i:1110;s:9:"notchased";i:1111;s:14:"notverychaotic";i:1112;s:10:"notchaotic";i:1113;s:15:"notverycareless";i:1114;s:11:"notcareless";i:1115;s:9:"notveryin";i:1116;s:5:"notin";i:1117;s:12:"notverycaged";i:1118;s:8:"notcaged";i:1119;s:13:"notveryburned";i:1120;s:9:"notburned";i:1121;s:17:"notveryburdensome";i:1122;s:13:"notburdensome";i:1123;s:15:"notveryburdened";i:1124;s:11:"notburdened";i:1125;s:13:"notverybummed";i:1126;s:9:"notbummed";i:1127;s:14:"notverybullied";i:1128;s:10:"notbullied";i:1129;s:13:"notverybugged";i:1130;s:9:"notbugged";i:1131;s:14:"notverybruised";i:1132;s:10:"notbruised";i:1133;s:13:"notverybroken";i:1134;s:9:"notbroken";i:1135;s:14:"notverybounded";i:1136;s:10:"notbounded";i:1137;s:17:"notverybothersome";i:1138;s:13:"notbothersome";i:1139;s:15:"notverybothered";i:1140;s:11:"notbothered";i:1141;s:13:"notveryboring";i:1142;s:9:"notboring";i:1143;s:12:"notverybored";i:1144;s:8:"notbored";i:1145;s:11:"notveryblur";i:1146;s:7:"notblur";i:1147;s:12:"notverybleak";i:1148;s:8:"notbleak";i:1149;s:13:"notveryblamed";i:1150;s:9:"notblamed";i:1151;s:18:"notveryblackmailed";i:1152;s:14:"notblackmailed";i:1153;s:18:"notveryblacklisted";i:1154;s:14:"notblacklisted";i:1155;s:14:"notverybizzare";i:1156;s:10:"notbizzare";i:1157;s:13:"notverybitter";i:1158;s:9:"notbitter";i:1159;s:15:"notverybetrayed";i:1160;s:11:"notbetrayed";i:1161;s:14:"notveryberated";i:1162;s:10:"notberated";i:1163;s:16:"notverybelittled";i:1164;s:12:"notbelittled";i:1165;s:13:"notverybeaten";i:1166;s:9:"notbeaten";i:1167;s:11:"notverybeat";i:1168;s:7:"notbeat";i:1169;s:13:"notverybarren";i:1170;s:9:"notbarren";i:1171;s:13:"notverybanned";i:1172;s:9:"notbanned";i:1173;s:14:"notverybaffled";i:1174;s:10:"notbaffled";i:1175;s:15:"notverybadgered";i:1176;s:11:"notbadgered";i:1177;s:10:"notverybad";i:1178;s:6:"notbad";i:1179;s:14:"notveryawkward";i:1180;s:10:"notawkward";i:1181;s:12:"notveryawful";i:1182;s:8:"notawful";i:1183;s:14:"notveryavoided";i:1184;s:10:"notavoided";i:1185;s:15:"notveryattacked";i:1186;s:11:"notattacked";i:1187;s:16:"notveryatrocious";i:1188;s:12:"notatrocious";i:1189;s:16:"notveryassaulted";i:1190;s:12:"notassaulted";i:1191;s:14:"notveryashamed";i:1192;s:10:"notashamed";i:1193;s:17:"notveryartificial";i:1194;s:13:"notartificial";i:1195;s:20:"notveryargumentative";i:1196;s:16:"notargumentative";i:1197;s:19:"notveryapprehensive";i:1198;s:15:"notapprehensive";i:1199;s:14:"notveryanxious";i:1200;s:10:"notanxious";i:1201;s:14:"notveryannoyed";i:1202;s:10:"notannoyed";i:1203;s:14:"notveryanguish";i:1204;s:10:"notanguish";i:1205;s:12:"notveryangry";i:1206;s:8:"notangry";i:1207;s:12:"notveryalone";i:1208;s:8:"notalone";i:1209;s:17:"notveryaggressive";i:1210;s:13:"notaggressive";i:1211;s:17:"notveryaggravated";i:1212;s:13:"notaggravated";i:1213;s:13:"notveryafraid";i:1214;s:9:"notafraid";i:1215;s:15:"notveryaddicted";i:1216;s:11:"notaddicted";i:1217;s:14:"notveryaccused";i:1218;s:10:"notaccused";i:1219;s:13:"notveryabused";i:1220;s:9:"notabused";i:1221;s:16:"notveryabandoned";i:1222;s:12:"notabandoned";i:1223;s:11:"notveryhate";i:1224;s:7:"nothate";i:1225;s:14:"notveryrubbish";i:1226;s:10:"notrubbish";i:1227;s:2:":)";i:1228;s:4:"}:)}";i:1229;s:2:"|d";i:1230;s:2:"xd";i:1231;s:3:"x3?";i:1232;s:3:"^_^";i:1233;s:2:"xp";i:1234;s:6:"@}->--";i:1235;s:3:">=d";i:1236;s:3:">:d";i:1237;s:3:">:)";i:1238;s:2:"=]";i:1239;s:2:"=)";i:1240;s:2:"<3";i:1241;s:3:";^)";i:1242;s:4:":'de";i:1243;s:2:":p";i:1244;s:3:":o)";i:1245;s:3:":b)";i:1246;s:2:":]";i:1247;s:2:":x";i:1248;s:2:":d";i:1249;s:2:":9";i:1250;s:2:":3";i:1251;s:3:":-}";i:1252;s:3:":-p";i:1253;s:3:":-d";i:1254;s:3:":-*";i:1255;s:3:":-)";i:1256;s:2:"8)";i:1257;s:3:"0:)";i:1258;s:6:"--^--@";i:1259;s:5:"*\o/*";i:1260;s:3:"(o:";i:1261;s:5:"(^_^)";i:1262;s:5:"(^.^)";i:1263;s:5:"(^-^)";i:1264;s:2:"^)";i:1265;s:2:"(^";i:1266;s:2:"(:";i:1267;s:3:"(-:";i:1268;s:3:"%-)";i:1269;s:3:"<3 ";i:1270;s:8:"abidance";i:1271;s:5:"abide";i:1272;s:9:"abilities";i:1273;s:7:"ability";i:1274;s:13:"above-average";i:1275;s:6:"abound";i:1276;s:7:"absolve";i:1277;s:8:"abundant";i:1278;s:9:"abundance";i:1279;s:6:"accede";i:1280;s:6:"accept";i:1281;s:10:"acceptance";i:1282;s:10:"acceptable";i:1283;s:7:"acclaim";i:1284;s:9:"acclaimed";i:1285;s:11:"acclamation";i:1286;s:8:"accolade";i:1287;s:9:"accolades";i:1288;s:13:"accommodative";i:1289;s:10:"accomplish";i:1290;s:14:"accomplishment";i:1291;s:15:"accomplishments";i:1292;s:6:"accord";i:1293;s:10:"accordance";i:1294;s:11:"accordantly";i:1295;s:8:"accurate";i:1296;s:10:"accurately";i:1297;s:10:"achievable";i:1298;s:7:"achieve";i:1299;s:11:"achievement";i:1300;s:12:"achievements";i:1301;s:11:"acknowledge";i:1302;s:15:"acknowledgement";i:1303;s:6:"acquit";i:1304;s:6:"acumen";i:1305;s:12:"adaptability";i:1306;s:8:"adaptive";i:1307;s:5:"adept";i:1308;s:7:"adeptly";i:1309;s:8:"adequate";i:1310;s:9:"adherence";i:1311;s:8:"adherent";i:1312;s:8:"adhesion";i:1313;s:7:"admirer";i:1314;s:9:"admirably";i:1315;s:10:"admiration";i:1316;s:8:"admiring";i:1317;s:10:"admiringly";i:1318;s:9:"admission";i:1319;s:5:"admit";i:1320;s:10:"admittedly";i:1321;s:6:"adored";i:1322;s:6:"adorer";i:1323;s:7:"adoring";i:1324;s:9:"adoringly";i:1325;s:8:"adroitly";i:1326;s:7:"adulate";i:1327;s:9:"adulation";i:1328;s:9:"adulatory";i:1329;s:8:"advanced";i:1330;s:9:"advantage";i:1331;s:12:"advantageous";i:1332;s:10:"advantages";i:1333;s:9:"adventure";i:1334;s:13:"adventuresome";i:1335;s:11:"adventurism";i:1336;s:11:"adventurous";i:1337;s:6:"advice";i:1338;s:9:"advisable";i:1339;s:8:"advocate";i:1340;s:8:"advocacy";i:1341;s:10:"affability";i:1342;s:7:"affably";i:1343;s:9:"affection";i:1344;s:8:"affinity";i:1345;s:6:"affirm";i:1346;s:11:"affirmation";i:1347;s:8:"affluent";i:1348;s:9:"affluence";i:1349;s:6:"afford";i:1350;s:10:"affordable";i:1351;s:6:"afloat";i:1352;s:7:"agilely";i:1353;s:7:"agility";i:1354;s:5:"agree";i:1355;s:12:"agreeability";i:1356;s:13:"agreeableness";i:1357;s:9:"agreeably";i:1358;s:9:"agreement";i:1359;s:5:"allay";i:1360;s:9:"alleviate";i:1361;s:9:"allowable";i:1362;s:6:"allure";i:1363;s:10:"alluringly";i:1364;s:4:"ally";i:1365;s:8:"almighty";i:1366;s:8:"altruist";i:1367;s:14:"altruistically";i:1368;s:5:"amaze";i:1369;s:6:"amazed";i:1370;s:9:"amazement";i:1371;s:9:"amazingly";i:1372;s:11:"ambitiously";i:1373;s:10:"ameliorate";i:1374;s:8:"amenable";i:1375;s:7:"amenity";i:1376;s:10:"amiability";i:1377;s:8:"amiabily";i:1378;s:11:"amicability";i:1379;s:8:"amicably";i:1380;s:5:"amity";i:1381;s:7:"amnesty";i:1382;s:5:"amour";i:1383;s:5:"ample";i:1384;s:5:"amply";i:1385;s:5:"amuse";i:1386;s:9:"amusement";i:1387;s:7:"amusing";i:1388;s:9:"amusingly";i:1389;s:5:"angel";i:1390;s:7:"angelic";i:1391;s:8:"animated";i:1392;s:7:"apostle";i:1393;s:10:"apotheosis";i:1394;s:6:"appeal";i:1395;s:9:"appealing";i:1396;s:7:"appease";i:1397;s:7:"applaud";i:1398;s:11:"appreciable";i:1399;s:12:"appreciation";i:1400;s:14:"appreciatively";i:1401;s:16:"appreciativeness";i:1402;s:8:"approval";i:1403;s:7:"approve";i:1404;s:3:"apt";i:1405;s:5:"aptly";i:1406;s:8:"aptitude";i:1407;s:6:"ardent";i:1408;s:8:"ardently";i:1409;s:5:"ardor";i:1410;s:12:"aristocratic";i:1411;s:7:"arousal";i:1412;s:6:"arouse";i:1413;s:8:"arousing";i:1414;s:9:"arresting";i:1415;s:10:"articulate";i:1416;s:9:"ascendant";i:1417;s:13:"ascertainable";i:1418;s:10:"aspiration";i:1419;s:11:"aspirations";i:1420;s:6:"aspire";i:1421;s:6:"assent";i:1422;s:10:"assertions";i:1423;s:9:"assertive";i:1424;s:5:"asset";i:1425;s:9:"assiduous";i:1426;s:11:"assiduously";i:1427;s:7:"assuage";i:1428;s:9:"assurance";i:1429;s:10:"assurances";i:1430;s:6:"assure";i:1431;s:9:"assuredly";i:1432;s:8:"astonish";i:1433;s:10:"astonished";i:1434;s:11:"astonishing";i:1435;s:13:"astonishingly";i:1436;s:12:"astonishment";i:1437;s:7:"astound";i:1438;s:9:"astounded";i:1439;s:10:"astounding";i:1440;s:12:"astoundingly";i:1441;s:8:"astutely";i:1442;s:6:"asylum";i:1443;s:6:"attain";i:1444;s:10:"attainable";i:1445;s:6:"attest";i:1446;s:10:"attraction";i:1447;s:12:"attractively";i:1448;s:6:"attune";i:1449;s:10:"auspicious";i:1450;s:5:"award";i:1451;s:4:"aver";i:1452;s:4:"avid";i:1453;s:6:"avidly";i:1454;s:3:"awe";i:1455;s:4:"awed";i:1456;s:9:"awesomely";i:1457;s:11:"awesomeness";i:1458;s:9:"awestruck";i:1459;s:4:"back";i:1460;s:8:"backbone";i:1461;s:7:"bargain";i:1462;s:5:"basic";i:1463;s:4:"bask";i:1464;s:6:"beacon";i:1465;s:7:"beatify";i:1466;s:9:"beauteous";i:1467;s:11:"beautifully";i:1468;s:8:"beautify";i:1469;s:6:"beauty";i:1470;s:5:"befit";i:1471;s:9:"befitting";i:1472;s:8:"befriend";i:1473;s:7:"beloved";i:1474;s:10:"benefactor";i:1475;s:10:"beneficial";i:1476;s:12:"beneficially";i:1477;s:11:"beneficiary";i:1478;s:7:"benefit";i:1479;s:8:"benefits";i:1480;s:11:"benevolence";i:1481;s:10:"best-known";i:1482;s:15:"best-performing";i:1483;s:12:"best-selling";i:1484;s:12:"better-known";i:1485;s:20:"better-than-expected";i:1486;s:9:"blameless";i:1487;s:5:"bless";i:1488;s:8:"blessing";i:1489;s:5:"bliss";i:1490;s:10:"blissfully";i:1491;s:6:"blithe";i:1492;s:5:"bloom";i:1493;s:7:"blossom";i:1494;s:5:"boast";i:1495;s:6:"boldly";i:1496;s:8:"boldness";i:1497;s:7:"bolster";i:1498;s:5:"bonny";i:1499;s:5:"bonus";i:1500;s:4:"boom";i:1501;s:7:"booming";i:1502;s:5:"boost";i:1503;s:9:"boundless";i:1504;s:9:"bountiful";i:1505;s:6:"brains";i:1506;s:7:"bravery";i:1507;s:12:"breakthrough";i:1508;s:13:"breakthroughs";i:1509;s:14:"breathlessness";i:1510;s:12:"breathtaking";i:1511;s:14:"breathtakingly";i:1512;s:8:"brighten";i:1513;s:10:"brightness";i:1514;s:10:"brilliance";i:1515;s:11:"brilliantly";i:1516;s:5:"brisk";i:1517;s:5:"broad";i:1518;s:5:"brook";i:1519;s:9:"brotherly";i:1520;s:4:"bull";i:1521;s:7:"bullish";i:1522;s:7:"buoyant";i:1523;s:7:"calming";i:1524;s:8:"calmness";i:1525;s:6:"candor";i:1526;s:7:"capable";i:1527;s:10:"capability";i:1528;s:7:"capably";i:1529;s:10:"capitalize";i:1530;s:9:"captivate";i:1531;s:11:"captivation";i:1532;s:4:"care";i:1533;s:8:"carefree";i:1534;s:7:"careful";i:1535;s:8:"catalyst";i:1536;s:6:"catchy";i:1537;s:9:"celebrate";i:1538;s:10:"celebrated";i:1539;s:11:"celebration";i:1540;s:11:"celebratory";i:1541;s:9:"celebrity";i:1542;s:8:"champion";i:1543;s:5:"champ";i:1544;s:11:"charismatic";i:1545;s:7:"charity";i:1546;s:5:"charm";i:1547;s:10:"charmingly";i:1548;s:5:"cheer";i:1549;s:6:"cheery";i:1550;s:7:"cherish";i:1551;s:9:"cherished";i:1552;s:6:"cherub";i:1553;s:8:"chivalry";i:1554;s:10:"chivalrous";i:1555;s:4:"chum";i:1556;s:8:"civility";i:1557;s:12:"civilization";i:1558;s:8:"civilize";i:1559;s:7:"clarity";i:1560;s:7:"classic";i:1561;s:5:"clean";i:1562;s:11:"cleanliness";i:1563;s:7:"cleanse";i:1564;s:5:"clear";i:1565;s:9:"clear-cut";i:1566;s:7:"clearer";i:1567;s:6:"clever";i:1568;s:9:"closeness";i:1569;s:5:"clout";i:1570;s:12:"co-operation";i:1571;s:4:"coax";i:1572;s:6:"coddle";i:1573;s:6:"cogent";i:1574;s:8:"cohesive";i:1575;s:6:"cohere";i:1576;s:9:"coherence";i:1577;s:8:"coherent";i:1578;s:8:"cohesion";i:1579;s:8:"colossal";i:1580;s:8:"comeback";i:1581;s:7:"comfort";i:1582;s:11:"comfortably";i:1583;s:10:"comforting";i:1584;s:7:"commend";i:1585;s:11:"commendably";i:1586;s:12:"commensurate";i:1587;s:11:"commonsense";i:1588;s:14:"commonsensible";i:1589;s:14:"commonsensibly";i:1590;s:14:"commonsensical";i:1591;s:10:"commodious";i:1592;s:10:"commitment";i:1593;s:7:"compact";i:1594;s:10:"compassion";i:1595;s:10:"compelling";i:1596;s:10:"compensate";i:1597;s:10:"competence";i:1598;s:10:"competency";i:1599;s:15:"competitiveness";i:1600;s:10:"complement";i:1601;s:9:"compliant";i:1602;s:10:"compliment";i:1603;s:13:"complimentary";i:1604;s:13:"comprehensive";i:1605;s:10:"compromise";i:1606;s:11:"compromises";i:1607;s:8:"comrades";i:1608;s:11:"conceivable";i:1609;s:10:"conciliate";i:1610;s:10:"conclusive";i:1611;s:8:"concrete";i:1612;s:6:"concur";i:1613;s:7:"condone";i:1614;s:9:"conducive";i:1615;s:6:"confer";i:1616;s:10:"confidence";i:1617;s:7:"confute";i:1618;s:12:"congratulate";i:1619;s:15:"congratulations";i:1620;s:14:"congratulatory";i:1621;s:7:"conquer";i:1622;s:10:"conscience";i:1623;s:13:"conscientious";i:1624;s:9:"consensus";i:1625;s:7:"consent";i:1626;s:7:"console";i:1627;s:9:"constancy";i:1628;s:12:"constructive";i:1629;s:11:"contentment";i:1630;s:10:"continuity";i:1631;s:12:"contribution";i:1632;s:10:"convenient";i:1633;s:12:"conveniently";i:1634;s:10:"conviction";i:1635;s:8:"convince";i:1636;s:12:"convincingly";i:1637;s:9:"cooperate";i:1638;s:11:"cooperation";i:1639;s:11:"cooperative";i:1640;s:13:"cooperatively";i:1641;s:11:"cornerstone";i:1642;s:7:"correct";i:1643;s:9:"correctly";i:1644;s:14:"cost-effective";i:1645;s:11:"cost-saving";i:1646;s:7:"courage";i:1647;s:12:"courageously";i:1648;s:14:"courageousness";i:1649;s:5:"court";i:1650;s:8:"courtesy";i:1651;s:7:"courtly";i:1652;s:8:"covenant";i:1653;s:5:"crave";i:1654;s:7:"craving";i:1655;s:8:"credence";i:1656;s:5:"crisp";i:1657;s:7:"crusade";i:1658;s:8:"crusader";i:1659;s:8:"cure-all";i:1660;s:7:"curious";i:1661;s:9:"curiously";i:1662;s:5:"dance";i:1663;s:4:"dare";i:1664;s:8:"daringly";i:1665;s:7:"darling";i:1666;s:7:"dashing";i:1667;s:9:"dauntless";i:1668;s:4:"dawn";i:1669;s:8:"daydream";i:1670;s:10:"daydreamer";i:1671;s:6:"dazzle";i:1672;s:7:"dazzled";i:1673;s:8:"dazzling";i:1674;s:4:"deal";i:1675;s:4:"dear";i:1676;s:7:"decency";i:1677;s:12:"decisiveness";i:1678;s:6:"defend";i:1679;s:8:"defender";i:1680;s:9:"deference";i:1681;s:7:"defense";i:1682;s:8:"definite";i:1683;s:10:"definitive";i:1684;s:12:"definitively";i:1685;s:12:"deflationary";i:1686;s:4:"deft";i:1687;s:8:"delicacy";i:1688;s:9:"delicious";i:1689;s:7:"delight";i:1690;s:9:"delighted";i:1691;s:12:"delightfully";i:1692;s:14:"delightfulness";i:1693;s:9:"demystify";i:1694;s:7:"deserve";i:1695;s:8:"deserved";i:1696;s:10:"deservedly";i:1697;s:6:"desire";i:1698;s:8:"desirous";i:1699;s:7:"destine";i:1700;s:8:"destined";i:1701;s:9:"destinies";i:1702;s:7:"destiny";i:1703;s:13:"determination";i:1704;s:6:"devote";i:1705;s:7:"devotee";i:1706;s:8:"devotion";i:1707;s:6:"devout";i:1708;s:9:"dexterity";i:1709;s:9:"dexterous";i:1710;s:11:"dexterously";i:1711;s:8:"dextrous";i:1712;s:3:"dig";i:1713;s:7:"dignify";i:1714;s:7:"dignity";i:1715;s:9:"diligence";i:1716;s:10:"diligently";i:1717;s:8:"discreet";i:1718;s:10:"discretion";i:1719;s:16:"discriminatingly";i:1720;s:8:"distinct";i:1721;s:11:"distinction";i:1722;s:11:"distinguish";i:1723;s:13:"distinguished";i:1724;s:11:"diversified";i:1725;s:6:"divine";i:1726;s:8:"divinely";i:1727;s:5:"dodge";i:1728;s:4:"dote";i:1729;s:8:"dotingly";i:1730;s:9:"doubtless";i:1731;s:5:"dream";i:1732;s:9:"dreamland";i:1733;s:6:"dreams";i:1734;s:6:"dreamy";i:1735;s:5:"drive";i:1736;s:6:"driven";i:1737;s:7:"durable";i:1738;s:10:"durability";i:1739;s:7:"dynamic";i:1740;s:5:"eager";i:1741;s:7:"eagerly";i:1742;s:9:"eagerness";i:1743;s:9:"earnestly";i:1744;s:11:"earnestness";i:1745;s:4:"ease";i:1746;s:6:"easier";i:1747;s:7:"easiest";i:1748;s:6:"easily";i:1749;s:8:"easiness";i:1750;s:4:"easy";i:1751;s:9:"easygoing";i:1752;s:10:"ebullience";i:1753;s:9:"ebullient";i:1754;s:11:"ebulliently";i:1755;s:8:"eclectic";i:1756;s:10:"economical";i:1757;s:9:"ecstasies";i:1758;s:7:"ecstasy";i:1759;s:12:"ecstatically";i:1760;s:5:"edify";i:1761;s:8:"educable";i:1762;s:8:"educated";i:1763;s:11:"educational";i:1764;s:9:"effective";i:1765;s:13:"effectiveness";i:1766;s:9:"effectual";i:1767;s:11:"efficacious";i:1768;s:10:"efficiency";i:1769;s:10:"effortless";i:1770;s:12:"effortlessly";i:1771;s:8:"effusion";i:1772;s:8:"effusive";i:1773;s:10:"effusively";i:1774;s:12:"effusiveness";i:1775;s:11:"egalitarian";i:1776;s:4:"elan";i:1777;s:5:"elate";i:1778;s:8:"elatedly";i:1779;s:7:"elation";i:1780;s:15:"electrification";i:1781;s:9:"electrify";i:1782;s:8:"elegance";i:1783;s:9:"elegantly";i:1784;s:7:"elevate";i:1785;s:8:"elevated";i:1786;s:8:"eligible";i:1787;s:5:"elite";i:1788;s:9:"eloquence";i:1789;s:10:"eloquently";i:1790;s:10:"emancipate";i:1791;s:9:"embellish";i:1792;s:8:"embolden";i:1793;s:7:"embrace";i:1794;s:8:"eminence";i:1795;s:7:"eminent";i:1796;s:7:"empower";i:1797;s:11:"empowerment";i:1798;s:6:"enable";i:1799;s:7:"enchant";i:1800;s:10:"enchanting";i:1801;s:12:"enchantingly";i:1802;s:9:"encourage";i:1803;s:13:"encouragement";i:1804;s:13:"encouragingly";i:1805;s:6:"endear";i:1806;s:9:"endearing";i:1807;s:7:"endorse";i:1808;s:11:"endorsement";i:1809;s:8:"endorser";i:1810;s:9:"endurable";i:1811;s:6:"endure";i:1812;s:8:"enduring";i:1813;s:8:"energize";i:1814;s:10:"engrossing";i:1815;s:7:"enhance";i:1816;s:8:"enhanced";i:1817;s:11:"enhancement";i:1818;s:5:"enjoy";i:1819;s:9:"enjoyable";i:1820;s:9:"enjoyably";i:1821;s:9:"enjoyment";i:1822;s:9:"enlighten";i:1823;s:13:"enlightenment";i:1824;s:7:"enliven";i:1825;s:7:"ennoble";i:1826;s:6:"enrapt";i:1827;s:9:"enrapture";i:1828;s:10:"enraptured";i:1829;s:6:"enrich";i:1830;s:10:"enrichment";i:1831;s:6:"ensure";i:1832;s:9:"entertain";i:1833;s:7:"enthral";i:1834;s:8:"enthrall";i:1835;s:10:"enthralled";i:1836;s:7:"enthuse";i:1837;s:10:"enthusiasm";i:1838;s:10:"enthusiast";i:1839;s:16:"enthusiastically";i:1840;s:6:"entice";i:1841;s:8:"enticing";i:1842;s:10:"enticingly";i:1843;s:8:"entrance";i:1844;s:9:"entranced";i:1845;s:10:"entrancing";i:1846;s:7:"entreat";i:1847;s:12:"entreatingly";i:1848;s:7:"entrust";i:1849;s:8:"enviable";i:1850;s:8:"enviably";i:1851;s:8:"envision";i:1852;s:9:"envisions";i:1853;s:4:"epic";i:1854;s:7:"epitome";i:1855;s:8:"equality";i:1856;s:9:"equitable";i:1857;s:7:"erudite";i:1858;s:9:"essential";i:1859;s:6:"esteem";i:1860;s:8:"eternity";i:1861;s:8:"eulogize";i:1862;s:8:"euphoria";i:1863;s:8:"euphoric";i:1864;s:12:"euphorically";i:1865;s:6:"evenly";i:1866;s:8:"eventful";i:1867;s:11:"everlasting";i:1868;s:7:"evident";i:1869;s:9:"evidently";i:1870;s:9:"evocative";i:1871;s:5:"exalt";i:1872;s:10:"exaltation";i:1873;s:7:"exalted";i:1874;s:9:"exaltedly";i:1875;s:8:"exalting";i:1876;s:10:"exaltingly";i:1877;s:6:"exceed";i:1878;s:9:"exceeding";i:1879;s:11:"exceedingly";i:1880;s:5:"excel";i:1881;s:10:"excellence";i:1882;s:10:"excellency";i:1883;s:11:"excellently";i:1884;s:11:"exceptional";i:1885;s:13:"exceptionally";i:1886;s:6:"excite";i:1887;s:7:"excited";i:1888;s:9:"excitedly";i:1889;s:11:"excitedness";i:1890;s:10:"excitement";i:1891;s:8:"exciting";i:1892;s:10:"excitingly";i:1893;s:9:"exclusive";i:1894;s:9:"excusable";i:1895;s:6:"excuse";i:1896;s:8:"exemplar";i:1897;s:9:"exemplary";i:1898;s:10:"exhaustive";i:1899;s:12:"exhaustively";i:1900;s:10:"exhilarate";i:1901;s:12:"exhilarating";i:1902;s:14:"exhilaratingly";i:1903;s:12:"exhilaration";i:1904;s:9:"exonerate";i:1905;s:9:"expansive";i:1906;s:11:"experienced";i:1907;s:6:"expert";i:1908;s:8:"expertly";i:1909;s:8:"explicit";i:1910;s:10:"explicitly";i:1911;s:10:"expressive";i:1912;s:9:"exquisite";i:1913;s:11:"exquisitely";i:1914;s:5:"extol";i:1915;s:6:"extoll";i:1916;s:15:"extraordinarily";i:1917;s:10:"exuberance";i:1918;s:9:"exuberant";i:1919;s:11:"exuberantly";i:1920;s:5:"exult";i:1921;s:10:"exultation";i:1922;s:10:"exultingly";i:1923;s:10:"fabulously";i:1924;s:10:"facilitate";i:1925;s:4:"fair";i:1926;s:6:"fairly";i:1927;s:8:"fairness";i:1928;s:5:"faith";i:1929;s:10:"faithfully";i:1930;s:12:"faithfulness";i:1931;s:5:"famed";i:1932;s:4:"fame";i:1933;s:6:"famous";i:1934;s:8:"famously";i:1935;s:5:"fancy";i:1936;s:7:"fanfare";i:1937;s:13:"fantastically";i:1938;s:7:"fantasy";i:1939;s:10:"farsighted";i:1940;s:9:"fascinate";i:1941;s:13:"fascinatingly";i:1942;s:11:"fascination";i:1943;s:11:"fashionably";i:1944;s:12:"fast-growing";i:1945;s:10:"fast-paced";i:1946;s:15:"fastest-growing";i:1947;s:6:"fathom";i:1948;s:5:"favor";i:1949;s:9:"favorable";i:1950;s:7:"favored";i:1951;s:8:"favorite";i:1952;s:6:"favour";i:1953;s:8:"fearless";i:1954;s:10:"fearlessly";i:1955;s:8:"feasible";i:1956;s:8:"feasibly";i:1957;s:4:"feat";i:1958;s:6:"featly";i:1959;s:6:"feisty";i:1960;s:10:"felicitate";i:1961;s:8:"felicity";i:1962;s:7:"fervent";i:1963;s:9:"fervently";i:1964;s:6:"fervid";i:1965;s:8:"fervidly";i:1966;s:6:"fervor";i:1967;s:7:"festive";i:1968;s:8:"fidelity";i:1969;s:5:"fiery";i:1970;s:6:"finely";i:1971;s:11:"first-class";i:1972;s:10:"first-rate";i:1973;s:3:"fit";i:1974;s:7:"fitting";i:1975;s:5:"flair";i:1976;s:5:"flame";i:1977;s:7:"flatter";i:1978;s:10:"flattering";i:1979;s:12:"flatteringly";i:1980;s:8:"flawless";i:1981;s:10:"flawlessly";i:1982;s:8:"flourish";i:1983;s:11:"flourishing";i:1984;s:6:"fluent";i:1985;s:4:"fond";i:1986;s:6:"fondly";i:1987;s:8:"fondness";i:1988;s:9:"foolproof";i:1989;s:8:"foremost";i:1990;s:9:"foresight";i:1991;s:7:"forgave";i:1992;s:7:"forgive";i:1993;s:8:"forgiven";i:1994;s:11:"forgiveness";i:1995;s:11:"forgivingly";i:1996;s:9:"fortitude";i:1997;s:10:"fortuitous";i:1998;s:12:"fortuitously";i:1999;s:9:"fortunate";i:2000;s:11:"fortunately";i:2001;s:7:"fortune";i:2002;s:8:"fragrant";i:2003;s:5:"frank";i:2004;s:7:"freedom";i:2005;s:8:"freedoms";i:2006;s:5:"fresh";i:2007;s:6:"friend";i:2008;s:12:"friendliness";i:2009;s:8:"friendly";i:2010;s:7:"friends";i:2011;s:10:"friendship";i:2012;s:6:"frolic";i:2013;s:11:"fulfillment";i:2014;s:12:"full-fledged";i:2015;s:10:"functional";i:2016;s:6:"gaiety";i:2017;s:5:"gaily";i:2018;s:4:"gain";i:2019;s:7:"gainful";i:2020;s:9:"gainfully";i:2021;s:9:"gallantly";i:2022;s:6:"galore";i:2023;s:3:"gem";i:2024;s:4:"gems";i:2025;s:10:"generosity";i:2026;s:10:"generously";i:2027;s:6:"genius";i:2028;s:7:"germane";i:2029;s:5:"giddy";i:2030;s:6:"gifted";i:2031;s:7:"gladden";i:2032;s:6:"gladly";i:2033;s:8:"gladness";i:2034;s:9:"glamorous";i:2035;s:4:"glee";i:2036;s:9:"gleefully";i:2037;s:7:"glimmer";i:2038;s:10:"glimmering";i:2039;s:7:"glisten";i:2040;s:10:"glistening";i:2041;s:7:"glitter";i:2042;s:7:"glorify";i:2043;s:8:"glorious";i:2044;s:10:"gloriously";i:2045;s:5:"glory";i:2046;s:6:"glossy";i:2047;s:4:"glow";i:2048;s:7:"glowing";i:2049;s:9:"glowingly";i:2050;s:8:"go-ahead";i:2051;s:9:"god-given";i:2052;s:7:"godlike";i:2053;s:4:"gold";i:2054;s:6:"golden";i:2055;s:6:"goodly";i:2056;s:8:"goodness";i:2057;s:8:"goodwill";i:2058;s:10:"gorgeously";i:2059;s:5:"grace";i:2060;s:8:"graceful";i:2061;s:10:"gracefully";i:2062;s:10:"graciously";i:2063;s:12:"graciousness";i:2064;s:5:"grail";i:2065;s:8:"grandeur";i:2066;s:10:"gratefully";i:2067;s:13:"gratification";i:2068;s:7:"gratify";i:2069;s:10:"gratifying";i:2070;s:12:"gratifyingly";i:2071;s:9:"gratitude";i:2072;s:8:"greatest";i:2073;s:9:"greatness";i:2074;s:5:"greet";i:2075;s:4:"grin";i:2076;s:4:"grit";i:2077;s:6:"groove";i:2078;s:14:"groundbreaking";i:2079;s:9:"guarantee";i:2080;s:8:"guardian";i:2081;s:8:"guidance";i:2082;s:9:"guiltless";i:2083;s:4:"gush";i:2084;s:8:"gumption";i:2085;s:5:"gusto";i:2086;s:5:"gutsy";i:2087;s:4:"hail";i:2088;s:7:"halcyon";i:2089;s:4:"hale";i:2090;s:8:"hallowed";i:2091;s:7:"handily";i:2092;s:8:"handsome";i:2093;s:6:"hanker";i:2094;s:7:"happily";i:2095;s:9:"happiness";i:2096;s:12:"hard-working";i:2097;s:7:"hardier";i:2098;s:8:"harmless";i:2099;s:12:"harmoniously";i:2100;s:9:"harmonize";i:2101;s:7:"harmony";i:2102;s:5:"haven";i:2103;s:7:"headway";i:2104;s:5:"heady";i:2105;s:4:"heal";i:2106;s:9:"healthful";i:2107;s:5:"heart";i:2108;s:7:"hearten";i:2109;s:10:"heartening";i:2110;s:9:"heartfelt";i:2111;s:8:"heartily";i:2112;s:12:"heartwarming";i:2113;s:6:"heaven";i:2114;s:6:"herald";i:2115;s:4:"hero";i:2116;s:10:"heroically";i:2117;s:7:"heroine";i:2118;s:7:"heroize";i:2119;s:5:"heros";i:2120;s:12:"high-quality";i:2121;s:9:"highlight";i:2122;s:11:"hilariously";i:2123;s:13:"hilariousness";i:2124;s:8:"hilarity";i:2125;s:8:"historic";i:2126;s:4:"holy";i:2127;s:6:"homage";i:2128;s:6:"honest";i:2129;s:8:"honestly";i:2130;s:7:"honesty";i:2131;s:9:"honeymoon";i:2132;s:5:"honor";i:2133;s:9:"honorable";i:2134;s:4:"hope";i:2135;s:11:"hopefulness";i:2136;s:5:"hopes";i:2137;s:3:"hot";i:2138;s:3:"hug";i:2139;s:6:"humane";i:2140;s:9:"humanists";i:2141;s:8:"humanity";i:2142;s:9:"humankind";i:2143;s:6:"humble";i:2144;s:8:"humility";i:2145;s:5:"humor";i:2146;s:10:"humorously";i:2147;s:6:"humour";i:2148;s:9:"humourous";i:2149;s:5:"ideal";i:2150;s:8:"idealism";i:2151;s:8:"idealist";i:2152;s:8:"idealize";i:2153;s:7:"ideally";i:2154;s:4:"idol";i:2155;s:7:"idolize";i:2156;s:8:"idolized";i:2157;s:7:"idyllic";i:2158;s:10:"illuminate";i:2159;s:10:"illuminati";i:2160;s:12:"illuminating";i:2161;s:8:"illumine";i:2162;s:11:"illustrious";i:2163;s:12:"immaculately";i:2164;s:12:"impartiality";i:2165;s:11:"impartially";i:2166;s:11:"impassioned";i:2167;s:10:"impeccable";i:2168;s:10:"impeccably";i:2169;s:5:"impel";i:2170;s:8:"imperial";i:2171;s:13:"imperturbable";i:2172;s:10:"impervious";i:2173;s:7:"impetus";i:2174;s:10:"importance";i:2175;s:11:"importantly";i:2176;s:11:"impregnable";i:2177;s:7:"impress";i:2178;s:10:"impression";i:2179;s:11:"impressions";i:2180;s:12:"impressively";i:2181;s:14:"impressiveness";i:2182;s:9:"improving";i:2183;s:7:"improve";i:2184;s:8:"improved";i:2185;s:11:"improvement";i:2186;s:9:"improvise";i:2187;s:11:"inalienable";i:2188;s:8:"incisive";i:2189;s:10:"incisively";i:2190;s:12:"incisiveness";i:2191;s:11:"inclination";i:2192;s:12:"inclinations";i:2193;s:8:"inclined";i:2194;s:9:"inclusive";i:2195;s:13:"incontestable";i:2196;s:16:"incontrovertible";i:2197;s:13:"incorruptible";i:2198;s:10:"incredible";i:2199;s:10:"incredibly";i:2200;s:8:"indebted";i:2201;s:13:"indefatigable";i:2202;s:9:"indelible";i:2203;s:9:"indelibly";i:2204;s:12:"independence";i:2205;s:13:"indescribable";i:2206;s:13:"indescribably";i:2207;s:14:"indestructible";i:2208;s:13:"indispensable";i:2209;s:16:"indispensability";i:2210;s:12:"indisputable";i:2211;s:13:"individuality";i:2212;s:11:"indomitable";i:2213;s:11:"indomitably";i:2214;s:11:"indubitable";i:2215;s:11:"indubitably";i:2216;s:10:"indulgence";i:2217;s:9:"indulgent";i:2218;s:11:"inestimable";i:2219;s:11:"inestimably";i:2220;s:11:"inexpensive";i:2221;s:10:"infallible";i:2222;s:10:"infallibly";i:2223;s:13:"infallibility";i:2224;s:11:"informative";i:2225;s:11:"ingeniously";i:2226;s:9:"ingenuity";i:2227;s:9:"ingenuous";i:2228;s:11:"ingenuously";i:2229;s:10:"ingratiate";i:2230;s:12:"ingratiating";i:2231;s:14:"ingratiatingly";i:2232;s:9:"innocence";i:2233;s:10:"innocently";i:2234;s:9:"innocuous";i:2235;s:10:"innovation";i:2236;s:10:"innovative";i:2237;s:11:"inoffensive";i:2238;s:11:"inquisitive";i:2239;s:7:"insight";i:2240;s:10:"insightful";i:2241;s:12:"insightfully";i:2242;s:6:"insist";i:2243;s:10:"insistence";i:2244;s:9:"insistent";i:2245;s:11:"insistently";i:2246;s:11:"inspiration";i:2247;s:13:"inspirational";i:2248;s:7:"inspire";i:2249;s:9:"inspiring";i:2250;s:11:"instructive";i:2251;s:12:"instrumental";i:2252;s:6:"intact";i:2253;s:8:"integral";i:2254;s:9:"integrity";i:2255;s:12:"intelligence";i:2256;s:12:"intelligible";i:2257;s:9:"intercede";i:2258;s:8:"interest";i:2259;s:10:"interested";i:2260;s:11:"interesting";i:2261;s:9:"interests";i:2262;s:8:"intimacy";i:2263;s:8:"intimate";i:2264;s:9:"intricate";i:2265;s:8:"intrigue";i:2266;s:10:"intriguing";i:2267;s:12:"intriguingly";i:2268;s:10:"invaluable";i:2269;s:12:"invaluablely";i:2270;s:10:"invigorate";i:2271;s:12:"invigorating";i:2272;s:13:"invincibility";i:2273;s:10:"invincible";i:2274;s:10:"inviolable";i:2275;s:9:"inviolate";i:2276;s:12:"invulnerable";i:2277;s:11:"irrefutable";i:2278;s:11:"irrefutably";i:2279;s:14:"irreproachable";i:2280;s:12:"irresistible";i:2281;s:12:"irresistibly";i:2282;s:8:"jauntily";i:2283;s:6:"jaunty";i:2284;s:4:"jest";i:2285;s:4:"joke";i:2286;s:7:"jollify";i:2287;s:6:"jovial";i:2288;s:3:"joy";i:2289;s:8:"joyfully";i:2290;s:6:"joyous";i:2291;s:8:"joyously";i:2292;s:10:"jubilantly";i:2293;s:8:"jubilate";i:2294;s:10:"jubilation";i:2295;s:9:"judicious";i:2296;s:7:"justice";i:2297;s:11:"justifiable";i:2298;s:11:"justifiably";i:2299;s:13:"justification";i:2300;s:7:"justify";i:2301;s:6:"justly";i:2302;s:6:"keenly";i:2303;s:8:"keenness";i:2304;s:4:"kemp";i:2305;s:3:"kid";i:2306;s:4:"kind";i:2307;s:6:"kindly";i:2308;s:10:"kindliness";i:2309;s:8:"kindness";i:2310;s:9:"kingmaker";i:2311;s:4:"kiss";i:2312;s:5:"large";i:2313;s:4:"lark";i:2314;s:4:"laud";i:2315;s:8:"laudably";i:2316;s:6:"lavish";i:2317;s:8:"lavishly";i:2318;s:11:"law-abiding";i:2319;s:6:"lawful";i:2320;s:8:"lawfully";i:2321;s:7:"leading";i:2322;s:4:"lean";i:2323;s:8:"learning";i:2324;s:9:"legendary";i:2325;s:10:"legitimacy";i:2326;s:10:"legitimate";i:2327;s:12:"legitimately";i:2328;s:9:"leniently";i:2329;s:14:"less-expensive";i:2330;s:8:"leverage";i:2331;s:6:"levity";i:2332;s:10:"liberation";i:2333;s:10:"liberalism";i:2334;s:9:"liberally";i:2335;s:8:"liberate";i:2336;s:7:"liberty";i:2337;s:9:"lifeblood";i:2338;s:8:"lifelong";i:2339;s:13:"light-hearted";i:2340;s:7:"lighten";i:2341;s:7:"likable";i:2342;s:6:"liking";i:2343;s:11:"lionhearted";i:2344;s:8:"literate";i:2345;s:4:"live";i:2346;s:5:"lofty";i:2347;s:7:"lovable";i:2348;s:7:"lovably";i:2349;s:4:"love";i:2350;s:10:"loveliness";i:2351;s:5:"lover";i:2352;s:8:"low-cost";i:2353;s:8:"low-risk";i:2354;s:12:"lower-priced";i:2355;s:7:"loyalty";i:2356;s:7:"lucidly";i:2357;s:4:"luck";i:2358;s:7:"luckier";i:2359;s:8:"luckiest";i:2360;s:7:"luckily";i:2361;s:9:"luckiness";i:2362;s:9:"lucrative";i:2363;s:4:"lush";i:2364;s:6:"luster";i:2365;s:8:"lustrous";i:2366;s:9:"luxuriant";i:2367;s:9:"luxuriate";i:2368;s:9:"luxurious";i:2369;s:11:"luxuriously";i:2370;s:6:"luxury";i:2371;s:7:"lyrical";i:2372;s:5:"magic";i:2373;s:7:"magical";i:2374;s:11:"magnanimous";i:2375;s:13:"magnanimously";i:2376;s:12:"magnificence";i:2377;s:11:"magnificent";i:2378;s:13:"magnificently";i:2379;s:7:"magnify";i:2380;s:8:"majestic";i:2381;s:7:"majesty";i:2382;s:10:"manageable";i:2383;s:8:"manifest";i:2384;s:5:"manly";i:2385;s:8:"mannerly";i:2386;s:6:"marvel";i:2387;s:10:"marvellous";i:2388;s:9:"marvelous";i:2389;s:11:"marvelously";i:2390;s:13:"marvelousness";i:2391;s:7:"marvels";i:2392;s:6:"master";i:2393;s:9:"masterful";i:2394;s:11:"masterfully";i:2395;s:11:"masterpiece";i:2396;s:12:"masterpieces";i:2397;s:7:"masters";i:2398;s:7:"mastery";i:2399;s:9:"matchless";i:2400;s:8:"maturely";i:2401;s:8:"maturity";i:2402;s:8:"maximize";i:2403;s:10:"meaningful";i:2404;s:4:"meek";i:2405;s:6:"mellow";i:2406;s:9:"memorable";i:2407;s:11:"memorialize";i:2408;s:4:"mend";i:2409;s:6:"mentor";i:2410;s:10:"mercifully";i:2411;s:5:"mercy";i:2412;s:5:"merit";i:2413;s:7:"merrily";i:2414;s:9:"merriment";i:2415;s:9:"merriness";i:2416;s:9:"mesmerize";i:2417;s:11:"mesmerizing";i:2418;s:13:"mesmerizingly";i:2419;s:10:"meticulous";i:2420;s:12:"meticulously";i:2421;s:8:"mightily";i:2422;s:6:"mighty";i:2423;s:8:"minister";i:2424;s:7:"miracle";i:2425;s:8:"miracles";i:2426;s:10:"miraculous";i:2427;s:12:"miraculously";i:2428;s:14:"miraculousness";i:2429;s:5:"mirth";i:2430;s:10:"moderation";i:2431;s:6:"modern";i:2432;s:7:"modesty";i:2433;s:7:"mollify";i:2434;s:9:"momentous";i:2435;s:10:"monumental";i:2436;s:12:"monumentally";i:2437;s:8:"morality";i:2438;s:8:"moralize";i:2439;s:8:"motivate";i:2440;s:9:"motivated";i:2441;s:10:"motivation";i:2442;s:6:"moving";i:2443;s:6:"myriad";i:2444;s:9:"naturally";i:2445;s:9:"navigable";i:2446;s:4:"neat";i:2447;s:6:"neatly";i:2448;s:11:"necessarily";i:2449;s:10:"neutralize";i:2450;s:6:"nicely";i:2451;s:5:"nifty";i:2452;s:5:"nobly";i:2453;s:12:"non-violence";i:2454;s:11:"non-violent";i:2455;s:6:"normal";i:2456;s:7:"notable";i:2457;s:7:"notably";i:2458;s:10:"noteworthy";i:2459;s:10:"noticeable";i:2460;s:7:"nourish";i:2461;s:11:"nourishment";i:2462;s:7:"nurture";i:2463;s:9:"nurturing";i:2464;s:5:"oasis";i:2465;s:9:"obedience";i:2466;s:8:"obedient";i:2467;s:10:"obediently";i:2468;s:4:"obey";i:2469;s:9:"objective";i:2470;s:11:"objectively";i:2471;s:7:"obliged";i:2472;s:7:"obviate";i:2473;s:7:"offbeat";i:2474;s:6:"offset";i:2475;s:6:"onward";i:2476;s:4:"open";i:2477;s:6:"openly";i:2478;s:8:"openness";i:2479;s:9:"opportune";i:2480;s:11:"opportunity";i:2481;s:7:"optimal";i:2482;s:8:"optimism";i:2483;s:10:"optimistic";i:2484;s:7:"opulent";i:2485;s:7:"orderly";i:2486;s:11:"originality";i:2487;s:5:"outdo";i:2488;s:8:"outgoing";i:2489;s:8:"outshine";i:2490;s:8:"outsmart";i:2491;s:11:"outstanding";i:2492;s:13:"outstandingly";i:2493;s:8:"outstrip";i:2494;s:6:"outwit";i:2495;s:7:"ovation";i:2496;s:12:"overachiever";i:2497;s:9:"overjoyed";i:2498;s:8:"overture";i:2499;s:8:"pacifist";i:2500;s:9:"pacifists";i:2501;s:8:"painless";i:2502;s:10:"painlessly";i:2503;s:11:"painstaking";i:2504;s:13:"painstakingly";i:2505;s:9:"palatable";i:2506;s:8:"palatial";i:2507;s:8:"palliate";i:2508;s:6:"pamper";i:2509;s:8:"paradise";i:2510;s:9:"paramount";i:2511;s:6:"pardon";i:2512;s:7:"passion";i:2513;s:12:"passionately";i:2514;s:8:"patience";i:2515;s:7:"patient";i:2516;s:9:"patiently";i:2517;s:7:"patriot";i:2518;s:9:"patriotic";i:2519;s:5:"peace";i:2520;s:9:"peaceable";i:2521;s:10:"peacefully";i:2522;s:12:"peacekeepers";i:2523;s:8:"peerless";i:2524;s:11:"penetrating";i:2525;s:8:"penitent";i:2526;s:10:"perceptive";i:2527;s:10:"perfection";i:2528;s:9:"perfectly";i:2529;s:11:"permissible";i:2530;s:12:"perseverance";i:2531;s:9:"persevere";i:2532;s:10:"persistent";i:2533;s:10:"personages";i:2534;s:11:"personality";i:2535;s:11:"perspicuous";i:2536;s:13:"perspicuously";i:2537;s:8:"persuade";i:2538;s:12:"persuasively";i:2539;s:9:"pertinent";i:2540;s:10:"phenomenal";i:2541;s:12:"phenomenally";i:2542;s:11:"picturesque";i:2543;s:5:"piety";i:2544;s:6:"pillar";i:2545;s:8:"pinnacle";i:2546;s:5:"pious";i:2547;s:5:"pithy";i:2548;s:7:"placate";i:2549;s:6:"placid";i:2550;s:7:"plainly";i:2551;s:12:"plausibility";i:2552;s:9:"plausible";i:2553;s:9:"playfully";i:2554;s:10:"pleasantly";i:2555;s:7:"pleased";i:2556;s:8:"pleasing";i:2557;s:10:"pleasingly";i:2558;s:11:"pleasurable";i:2559;s:11:"pleasurably";i:2560;s:8:"pleasure";i:2561;s:6:"pledge";i:2562;s:7:"pledges";i:2563;s:9:"plentiful";i:2564;s:6:"plenty";i:2565;s:5:"plush";i:2566;s:9:"poeticize";i:2567;s:8:"poignant";i:2568;s:5:"poise";i:2569;s:6:"poised";i:2570;s:6:"polite";i:2571;s:10:"politeness";i:2572;s:7:"popular";i:2573;s:10:"popularity";i:2574;s:8:"portable";i:2575;s:4:"posh";i:2576;s:12:"positiveness";i:2577;s:10:"positively";i:2578;s:9:"posterity";i:2579;s:6:"potent";i:2580;s:9:"potential";i:2581;s:10:"powerfully";i:2582;s:11:"practicable";i:2583;s:6:"praise";i:2584;s:12:"praiseworthy";i:2585;s:8:"praising";i:2586;s:11:"pre-eminent";i:2587;s:6:"preach";i:2588;s:9:"preaching";i:2589;s:10:"precaution";i:2590;s:11:"precautions";i:2591;s:9:"precedent";i:2592;s:7:"precise";i:2593;s:9:"precisely";i:2594;s:9:"precision";i:2595;s:10:"preeminent";i:2596;s:10:"preemptive";i:2597;s:6:"prefer";i:2598;s:10:"preferable";i:2599;s:10:"preferably";i:2600;s:10:"preference";i:2601;s:11:"preferences";i:2602;s:7:"premier";i:2603;s:7:"premium";i:2604;s:8:"prepared";i:2605;s:13:"preponderance";i:2606;s:5:"press";i:2607;s:8:"prestige";i:2608;s:11:"prestigious";i:2609;s:8:"prettily";i:2610;s:6:"pretty";i:2611;s:5:"pride";i:2612;s:9:"principle";i:2613;s:10:"principled";i:2614;s:9:"privilege";i:2615;s:5:"prize";i:2616;s:3:"pro";i:2617;s:12:"pro-american";i:2618;s:11:"pro-beijing";i:2619;s:8:"pro-cuba";i:2620;s:9:"pro-peace";i:2621;s:9:"proactive";i:2622;s:10:"prodigious";i:2623;s:12:"prodigiously";i:2624;s:7:"prodigy";i:2625;s:7:"profess";i:2626;s:10:"proficient";i:2627;s:12:"proficiently";i:2628;s:6:"profit";i:2629;s:10:"profitable";i:2630;s:10:"profoundly";i:2631;s:7:"profuse";i:2632;s:9:"profusely";i:2633;s:9:"profusion";i:2634;s:8:"progress";i:2635;s:9:"prominent";i:2636;s:10:"prominence";i:2637;s:7:"promise";i:2638;s:9:"promising";i:2639;s:8:"promoter";i:2640;s:8:"promptly";i:2641;s:8:"properly";i:2642;s:10:"propitious";i:2643;s:12:"propitiously";i:2644;s:8:"prospect";i:2645;s:9:"prospects";i:2646;s:7:"prosper";i:2647;s:10:"prosperity";i:2648;s:10:"prosperous";i:2649;s:7:"protect";i:2650;s:10:"protection";i:2651;s:10:"protective";i:2652;s:9:"protector";i:2653;s:5:"proud";i:2654;s:10:"providence";i:2655;s:7:"prowess";i:2656;s:8:"prudence";i:2657;s:9:"prudently";i:2658;s:7:"pundits";i:2659;s:4:"pure";i:2660;s:12:"purification";i:2661;s:6:"purify";i:2662;s:6:"purity";i:2663;s:6:"quaint";i:2664;s:9:"qualified";i:2665;s:7:"qualify";i:2666;s:10:"quasi-ally";i:2667;s:6:"quench";i:2668;s:7:"quicken";i:2669;s:8:"radiance";i:2670;s:5:"rally";i:2671;s:13:"rapprochement";i:2672;s:7:"rapport";i:2673;s:4:"rapt";i:2674;s:7:"rapture";i:2675;s:10:"raptureous";i:2676;s:12:"raptureously";i:2677;s:9:"rapturous";i:2678;s:11:"rapturously";i:2679;s:8:"rational";i:2680;s:11:"rationality";i:2681;s:4:"rave";i:2682;s:11:"re-conquest";i:2683;s:7:"readily";i:2684;s:8:"reaffirm";i:2685;s:13:"reaffirmation";i:2686;s:7:"realist";i:2687;s:9:"realistic";i:2688;s:13:"realistically";i:2689;s:6:"reason";i:2690;s:10:"reasonably";i:2691;s:8:"reasoned";i:2692;s:11:"reassurance";i:2693;s:8:"reassure";i:2694;s:7:"reclaim";i:2695;s:11:"recognition";i:2696;s:9:"recommend";i:2697;s:14:"recommendation";i:2698;s:15:"recommendations";i:2699;s:11:"recommended";i:2700;s:10:"recompense";i:2701;s:9:"reconcile";i:2702;s:14:"reconciliation";i:2703;s:14:"record-setting";i:2704;s:7:"recover";i:2705;s:13:"rectification";i:2706;s:7:"rectify";i:2707;s:10:"rectifying";i:2708;s:6:"redeem";i:2709;s:9:"redeeming";i:2710;s:10:"redemption";i:2711;s:11:"reestablish";i:2712;s:6:"refine";i:2713;s:10:"refinement";i:2714;s:6:"reform";i:2715;s:7:"refresh";i:2716;s:10:"refreshing";i:2717;s:6:"refuge";i:2718;s:5:"regal";i:2719;s:7:"regally";i:2720;s:6:"regard";i:2721;s:12:"rehabilitate";i:2722;s:14:"rehabilitation";i:2723;s:9:"reinforce";i:2724;s:13:"reinforcement";i:2725;s:7:"rejoice";i:2726;s:11:"rejoicingly";i:2727;s:5:"relax";i:2728;s:6:"relent";i:2729;s:8:"relevant";i:2730;s:9:"relevance";i:2731;s:11:"reliability";i:2732;s:8:"reliably";i:2733;s:6:"relief";i:2734;s:7:"relieve";i:2735;s:6:"relish";i:2736;s:10:"remarkably";i:2737;s:6:"remedy";i:2738;s:11:"reminiscent";i:2739;s:10:"remunerate";i:2740;s:11:"renaissance";i:2741;s:7:"renewal";i:2742;s:8:"renovate";i:2743;s:10:"renovation";i:2744;s:6:"renown";i:2745;s:8:"renowned";i:2746;s:6:"repair";i:2747;s:10:"reparation";i:2748;s:5:"repay";i:2749;s:6:"repent";i:2750;s:10:"repentance";i:2751;s:9:"reputable";i:2752;s:6:"rescue";i:2753;s:9:"resilient";i:2754;s:7:"resolve";i:2755;s:8:"resolved";i:2756;s:7:"resound";i:2757;s:10:"resounding";i:2758;s:11:"resourceful";i:2759;s:15:"resourcefulness";i:2760;s:7:"respect";i:2761;s:11:"respectable";i:2762;s:12:"respectfully";i:2763;s:7:"respite";i:2764;s:14:"responsibility";i:2765;s:11:"responsibly";i:2766;s:7:"restful";i:2767;s:11:"restoration";i:2768;s:7:"restore";i:2769;s:9:"restraint";i:2770;s:9:"resurgent";i:2771;s:7:"reunite";i:2772;s:5:"revel";i:2773;s:10:"revelation";i:2774;s:6:"revere";i:2775;s:9:"reverence";i:2776;s:10:"reverently";i:2777;s:7:"revival";i:2778;s:6:"revive";i:2779;s:10:"revitalize";i:2780;s:10:"revolution";i:2781;s:6:"reward";i:2782;s:9:"rewarding";i:2783;s:11:"rewardingly";i:2784;s:6:"riches";i:2785;s:6:"richly";i:2786;s:8:"richness";i:2787;s:7:"righten";i:2788;s:11:"righteously";i:2789;s:13:"righteousness";i:2790;s:8:"rightful";i:2791;s:10:"rightfully";i:2792;s:7:"rightly";i:2793;s:9:"rightness";i:2794;s:6:"rights";i:2795;s:4:"ripe";i:2796;s:9:"risk-free";i:2797;s:12:"romantically";i:2798;s:11:"romanticize";i:2799;s:7:"rousing";i:2800;s:6:"sacred";i:2801;s:4:"safe";i:2802;s:9:"safeguard";i:2803;s:8:"sagacity";i:2804;s:4:"sage";i:2805;s:6:"sagely";i:2806;s:5:"saint";i:2807;s:11:"saintliness";i:2808;s:7:"salable";i:2809;s:8:"salivate";i:2810;s:8:"salutary";i:2811;s:6:"salute";i:2812;s:9:"salvation";i:2813;s:8:"sanctify";i:2814;s:8:"sanction";i:2815;s:8:"sanctity";i:2816;s:9:"sanctuary";i:2817;s:8:"sanguine";i:2818;s:4:"sane";i:2819;s:6:"sanity";i:2820;s:12:"satisfaction";i:2821;s:14:"satisfactorily";i:2822;s:12:"satisfactory";i:2823;s:7:"satisfy";i:2824;s:10:"satisfying";i:2825;s:5:"savor";i:2826;s:5:"savvy";i:2827;s:6:"scenic";i:2828;s:8:"scruples";i:2829;s:10:"scrupulous";i:2830;s:12:"scrupulously";i:2831;s:8:"seamless";i:2832;s:8:"seasoned";i:2833;s:6:"secure";i:2834;s:8:"securely";i:2835;s:8:"security";i:2836;s:9:"seductive";i:2837;s:9:"selective";i:2838;s:18:"self-determination";i:2839;s:12:"self-respect";i:2840;s:17:"self-satisfaction";i:2841;s:16:"self-sufficiency";i:2842;s:15:"self-sufficient";i:2843;s:9:"semblance";i:2844;s:9:"sensation";i:2845;s:11:"sensational";i:2846;s:13:"sensationally";i:2847;s:10:"sensations";i:2848;s:5:"sense";i:2849;s:8:"sensibly";i:2850;s:11:"sensitively";i:2851;s:11:"sensitivity";i:2852;s:9:"sentiment";i:2853;s:14:"sentimentality";i:2854;s:13:"sentimentally";i:2855;s:10:"sentiments";i:2856;s:8:"serenity";i:2857;s:6:"settle";i:2858;s:7:"shelter";i:2859;s:6:"shield";i:2860;s:7:"shimmer";i:2861;s:10:"shimmering";i:2862;s:12:"shimmeringly";i:2863;s:5:"shine";i:2864;s:5:"shiny";i:2865;s:8:"shrewdly";i:2866;s:10:"shrewdness";i:2867;s:11:"significant";i:2868;s:12:"significance";i:2869;s:7:"signify";i:2870;s:6:"simple";i:2871;s:10:"simplicity";i:2872;s:10:"simplified";i:2873;s:8:"simplify";i:2874;s:9:"sincerely";i:2875;s:9:"sincerity";i:2876;s:5:"skill";i:2877;s:7:"skilled";i:2878;s:8:"skillful";i:2879;s:10:"skillfully";i:2880;s:5:"sleek";i:2881;s:7:"slender";i:2882;s:4:"slim";i:2883;s:5:"smart";i:2884;s:7:"smarter";i:2885;s:8:"smartest";i:2886;s:7:"smartly";i:2887;s:5:"smile";i:2888;s:7:"smiling";i:2889;s:9:"smilingly";i:2890;s:7:"smitten";i:2891;s:11:"soft-spoken";i:2892;s:6:"soften";i:2893;s:6:"solace";i:2894;s:10:"solicitous";i:2895;s:12:"solicitously";i:2896;s:10:"solicitude";i:2897;s:10:"solidarity";i:2898;s:6:"soothe";i:2899;s:10:"soothingly";i:2900;s:5:"sound";i:2901;s:9:"soundness";i:2902;s:8:"spacious";i:2903;s:5:"spare";i:2904;s:7:"sparing";i:2905;s:9:"sparingly";i:2906;s:7:"sparkle";i:2907;s:11:"spectacular";i:2908;s:13:"spectacularly";i:2909;s:9:"spellbind";i:2910;s:12:"spellbinding";i:2911;s:14:"spellbindingly";i:2912;s:10:"spellbound";i:2913;s:6:"spirit";i:2914;s:10:"splendidly";i:2915;s:8:"splendor";i:2916;s:8:"spotless";i:2917;s:9:"sprightly";i:2918;s:4:"spur";i:2919;s:8:"squarely";i:2920;s:9:"stability";i:2921;s:9:"stabilize";i:2922;s:9:"stainless";i:2923;s:5:"stand";i:2924;s:4:"star";i:2925;s:5:"stars";i:2926;s:7:"stately";i:2927;s:10:"statuesque";i:2928;s:7:"staunch";i:2929;s:9:"staunchly";i:2930;s:11:"staunchness";i:2931;s:9:"steadfast";i:2932;s:11:"steadfastly";i:2933;s:13:"steadfastness";i:2934;s:10:"steadiness";i:2935;s:7:"stellar";i:2936;s:9:"stellarly";i:2937;s:9:"stimulate";i:2938;s:11:"stimulating";i:2939;s:11:"stimulative";i:2940;s:8:"stirring";i:2941;s:10:"stirringly";i:2942;s:5:"stood";i:2943;s:8:"straight";i:2944;s:15:"straightforward";i:2945;s:11:"streamlined";i:2946;s:6:"stride";i:2947;s:7:"strides";i:2948;s:8:"striking";i:2949;s:10:"strikingly";i:2950;s:8:"striving";i:2951;s:10:"studiously";i:2952;s:7:"stunned";i:2953;s:8:"stunning";i:2954;s:10:"stunningly";i:2955;s:10:"stupendous";i:2956;s:12:"stupendously";i:2957;s:6:"sturdy";i:2958;s:9:"stylishly";i:2959;s:9:"subscribe";i:2960;s:11:"substantial";i:2961;s:13:"substantially";i:2962;s:11:"substantive";i:2963;s:7:"succeed";i:2964;s:7:"success";i:2965;s:12:"successfully";i:2966;s:7:"suffice";i:2967;s:10:"sufficient";i:2968;s:12:"sufficiently";i:2969;s:7:"suggest";i:2970;s:11:"suggestions";i:2971;s:4:"suit";i:2972;s:8:"suitable";i:2973;s:9:"sumptuous";i:2974;s:11:"sumptuously";i:2975;s:13:"sumptuousness";i:2976;s:5:"super";i:2977;s:8:"superbly";i:2978;s:8:"superior";i:2979;s:11:"superlative";i:2980;s:7:"support";i:2981;s:9:"supporter";i:2982;s:10:"supportive";i:2983;s:7:"supreme";i:2984;s:9:"supremely";i:2985;s:6:"supurb";i:2986;s:8:"supurbly";i:2987;s:6:"surely";i:2988;s:5:"surge";i:2989;s:7:"surging";i:2990;s:7:"surmise";i:2991;s:8:"surmount";i:2992;s:7:"surpass";i:2993;s:8:"survival";i:2994;s:7:"survive";i:2995;s:8:"survivor";i:2996;s:14:"sustainability";i:2997;s:11:"sustainable";i:2998;s:9:"sustained";i:2999;s:8:"sweeping";i:3000;s:7:"sweeten";i:3001;s:10:"sweetheart";i:3002;s:7:"sweetly";i:3003;s:9:"sweetness";i:3004;s:5:"swift";i:3005;s:9:"swiftness";i:3006;s:5:"sworn";i:3007;s:4:"tact";i:3008;s:6:"talent";i:3009;s:8:"talented";i:3010;s:9:"tantalize";i:3011;s:11:"tantalizing";i:3012;s:13:"tantalizingly";i:3013;s:5:"taste";i:3014;s:10:"temperance";i:3015;s:9:"temperate";i:3016;s:5:"tempt";i:3017;s:8:"tempting";i:3018;s:10:"temptingly";i:3019;s:9:"tenacious";i:3020;s:11:"tenaciously";i:3021;s:8:"tenacity";i:3022;s:8:"tenderly";i:3023;s:10:"tenderness";i:3024;s:12:"terrifically";i:3025;s:9:"terrified";i:3026;s:7:"terrify";i:3027;s:10:"terrifying";i:3028;s:12:"terrifyingly";i:3029;s:10:"thankfully";i:3030;s:9:"thinkable";i:3031;s:12:"thoughtfully";i:3032;s:14:"thoughtfulness";i:3033;s:6:"thrift";i:3034;s:6:"thrill";i:3035;s:9:"thrilling";i:3036;s:11:"thrillingly";i:3037;s:7:"thrills";i:3038;s:6:"thrive";i:3039;s:8:"thriving";i:3040;s:6:"tickle";i:3041;s:12:"time-honored";i:3042;s:6:"timely";i:3043;s:6:"tingle";i:3044;s:9:"titillate";i:3045;s:11:"titillating";i:3046;s:13:"titillatingly";i:3047;s:5:"toast";i:3048;s:12:"togetherness";i:3049;s:9:"tolerable";i:3050;s:9:"tolerably";i:3051;s:9:"tolerance";i:3052;s:10:"tolerantly";i:3053;s:8:"tolerate";i:3054;s:10:"toleration";i:3055;s:3:"top";i:3056;s:6:"torrid";i:3057;s:8:"torridly";i:3058;s:9:"tradition";i:3059;s:11:"traditional";i:3060;s:11:"tranquility";i:3061;s:8:"treasure";i:3062;s:5:"treat";i:3063;s:10:"tremendous";i:3064;s:12:"tremendously";i:3065;s:6:"trendy";i:3066;s:11:"trepidation";i:3067;s:7:"tribute";i:3068;s:4:"trim";i:3069;s:7:"triumph";i:3070;s:9:"triumphal";i:3071;s:10:"triumphant";i:3072;s:12:"triumphantly";i:3073;s:9:"truculent";i:3074;s:11:"truculently";i:3075;s:4:"true";i:3076;s:5:"trump";i:3077;s:7:"trumpet";i:3078;s:5:"trust";i:3079;s:8:"trusting";i:3080;s:10:"trustingly";i:3081;s:15:"trustworthiness";i:3082;s:11:"trustworthy";i:3083;s:5:"truth";i:3084;s:10:"truthfully";i:3085;s:12:"truthfulness";i:3086;s:7:"twinkly";i:3087;s:8:"ultimate";i:3088;s:10:"ultimately";i:3089;s:5:"ultra";i:3090;s:9:"unabashed";i:3091;s:11:"unabashedly";i:3092;s:9:"unanimous";i:3093;s:12:"unassailable";i:3094;s:8:"unbiased";i:3095;s:7:"unbosom";i:3096;s:7:"unbound";i:3097;s:8:"unbroken";i:3098;s:8:"uncommon";i:3099;s:10:"uncommonly";i:3100;s:11:"unconcerned";i:3101;s:13:"unconditional";i:3102;s:14:"unconventional";i:3103;s:9:"undaunted";i:3104;s:10:"understand";i:3105;s:14:"understandable";i:3106;s:10:"understood";i:3107;s:10:"understate";i:3108;s:11:"understated";i:3109;s:13:"understatedly";i:3110;s:12:"undisputable";i:3111;s:12:"undisputably";i:3112;s:10:"undisputed";i:3113;s:9:"undoubted";i:3114;s:11:"undoubtedly";i:3115;s:12:"unencumbered";i:3116;s:11:"unequivocal";i:3117;s:13:"unequivocally";i:3118;s:7:"unfazed";i:3119;s:10:"unfettered";i:3120;s:13:"unforgettable";i:3121;s:7:"uniform";i:3122;s:9:"uniformly";i:3123;s:5:"unity";i:3124;s:9:"universal";i:3125;s:9:"unlimited";i:3126;s:12:"unparalleled";i:3127;s:13:"unpretentious";i:3128;s:14:"unquestionable";i:3129;s:14:"unquestionably";i:3130;s:12:"unrestricted";i:3131;s:9:"unscathed";i:3132;s:9:"unselfish";i:3133;s:9:"untouched";i:3134;s:9:"untrained";i:3135;s:6:"upbeat";i:3136;s:7:"upfront";i:3137;s:7:"upgrade";i:3138;s:6:"upheld";i:3139;s:6:"uphold";i:3140;s:6:"uplift";i:3141;s:9:"uplifting";i:3142;s:11:"upliftingly";i:3143;s:10:"upliftment";i:3144;s:7:"upscale";i:3145;s:6:"upside";i:3146;s:6:"upward";i:3147;s:4:"urge";i:3148;s:6:"usable";i:3149;s:6:"useful";i:3150;s:10:"usefulness";i:3151;s:11:"utilitarian";i:3152;s:6:"utmost";i:3153;s:9:"uttermost";i:3154;s:9:"valiantly";i:3155;s:5:"valid";i:3156;s:8:"validity";i:3157;s:5:"valor";i:3158;s:8:"valuable";i:3159;s:6:"values";i:3160;s:8:"vanquish";i:3161;s:4:"vast";i:3162;s:6:"vastly";i:3163;s:8:"vastness";i:3164;s:9:"venerable";i:3165;s:9:"venerably";i:3166;s:8:"venerate";i:3167;s:10:"verifiable";i:3168;s:9:"veritable";i:3169;s:11:"versatility";i:3170;s:6:"viable";i:3171;s:9:"viability";i:3172;s:7:"vibrant";i:3173;s:9:"vibrantly";i:3174;s:10:"victorious";i:3175;s:7:"victory";i:3176;s:9:"vigilance";i:3177;s:8:"vigilant";i:3178;s:10:"vigorously";i:3179;s:9:"vindicate";i:3180;s:7:"vintage";i:3181;s:6:"virtue";i:3182;s:10:"virtuously";i:3183;s:5:"vital";i:3184;s:8:"vitality";i:3185;s:5:"vivid";i:3186;s:11:"voluntarily";i:3187;s:9:"voluntary";i:3188;s:5:"vouch";i:3189;s:9:"vouchsafe";i:3190;s:3:"vow";i:3191;s:10:"vulnerable";i:3192;s:11:"warmhearted";i:3193;s:6:"warmly";i:3194;s:6:"warmth";i:3195;s:7:"wealthy";i:3196;s:7:"welfare";i:3197;s:10:"well-being";i:3198;s:14:"well-connected";i:3199;s:13:"well-educated";i:3200;s:16:"well-established";i:3201;s:13:"well-informed";i:3202;s:16:"well-intentioned";i:3203;s:12:"well-managed";i:3204;s:15:"well-positioned";i:3205;s:15:"well-publicized";i:3206;s:13:"well-received";i:3207;s:13:"well-regarded";i:3208;s:8:"well-run";i:3209;s:12:"well-wishers";i:3210;s:9:"wellbeing";i:3211;s:5:"white";i:3212;s:14:"wholeheartedly";i:3213;s:9:"wholesome";i:3214;s:4:"wide";i:3215;s:9:"wide-open";i:3216;s:12:"wide-ranging";i:3217;s:7:"willful";i:3218;s:9:"willfully";i:3219;s:11:"willingness";i:3220;s:4:"wink";i:3221;s:8:"winnable";i:3222;s:7:"winners";i:3223;s:6:"wisdom";i:3224;s:6:"wisely";i:3225;s:6:"wishes";i:3226;s:7:"wishing";i:3227;s:11:"wonderfully";i:3228;s:9:"wonderous";i:3229;s:11:"wonderously";i:3230;s:8:"wondrous";i:3231;s:3:"woo";i:3232;s:8:"workable";i:3233;s:12:"world-famous";i:3234;s:7:"worship";i:3235;s:5:"worth";i:3236;s:11:"worth-while";i:3237;s:10:"worthiness";i:3238;s:10:"worthwhile";i:3239;s:3:"wow";i:3240;s:3:"wry";i:3241;s:5:"yearn";i:3242;s:8:"yearning";i:3243;s:10:"yearningly";i:3244;s:3:"yep";i:3245;s:8:"youthful";i:3246;s:4:"zeal";i:3247;s:6:"zenith";i:3248;s:4:"zest";i:3249;s:14:"notabandonment";i:3250;s:18:"notveryabandonment";i:3251;s:10:"notabandon";i:3252;s:14:"notveryabandon";i:3253;s:8:"notabase";i:3254;s:12:"notveryabase";i:3255;s:12:"notabasement";i:3256;s:16:"notveryabasement";i:3257;s:8:"notabash";i:3258;s:12:"notveryabash";i:3259;s:8:"notabate";i:3260;s:12:"notveryabate";i:3261;s:11:"notabdicate";i:3262;s:15:"notveryabdicate";i:3263;s:13:"notaberration";i:3264;s:17:"notveryaberration";i:3265;s:8:"notabhor";i:3266;s:12:"notveryabhor";i:3267;s:11:"notabhorred";i:3268;s:15:"notveryabhorred";i:3269;s:13:"notabhorrence";i:3270;s:17:"notveryabhorrence";i:3271;s:12:"notabhorrent";i:3272;s:16:"notveryabhorrent";i:3273;s:14:"notabhorrently";i:3274;s:18:"notveryabhorrently";i:3275;s:9:"notabhors";i:3276;s:13:"notveryabhors";i:3277;s:9:"notabject";i:3278;s:13:"notveryabject";i:3279;s:11:"notabjectly";i:3280;s:15:"notveryabjectly";i:3281;s:9:"notabjure";i:3282;s:13:"notveryabjure";i:3283;s:11:"notabnormal";i:3284;s:15:"notveryabnormal";i:3285;s:10:"notabolish";i:3286;s:14:"notveryabolish";i:3287;s:13:"notabominable";i:3288;s:17:"notveryabominable";i:3289;s:13:"notabominably";i:3290;s:17:"notveryabominably";i:3291;s:12:"notabominate";i:3292;s:16:"notveryabominate";i:3293;s:14:"notabomination";i:3294;s:18:"notveryabomination";i:3295;s:9:"notabrade";i:3296;s:13:"notveryabrade";i:3297;s:11:"notabrasive";i:3298;s:15:"notveryabrasive";i:3299;s:9:"notabrupt";i:3300;s:13:"notveryabrupt";i:3301;s:10:"notabscond";i:3302;s:14:"notveryabscond";i:3303;s:10:"notabsence";i:3304;s:14:"notveryabsence";i:3305;s:11:"notabsentee";i:3306;s:15:"notveryabsentee";i:3307;s:16:"notabsent-minded";i:3308;s:20:"notveryabsent-minded";i:3309;s:9:"notabsurd";i:3310;s:13:"notveryabsurd";i:3311;s:12:"notabsurdity";i:3312;s:16:"notveryabsurdity";i:3313;s:11:"notabsurdly";i:3314;s:15:"notveryabsurdly";i:3315;s:13:"notabsurdness";i:3316;s:17:"notveryabsurdness";i:3317;s:8:"notabuse";i:3318;s:12:"notveryabuse";i:3319;s:9:"notabuses";i:3320;s:13:"notveryabuses";i:3321;s:10:"notabusive";i:3322;s:14:"notveryabusive";i:3323;s:10:"notabysmal";i:3324;s:14:"notveryabysmal";i:3325;s:12:"notabysmally";i:3326;s:16:"notveryabysmally";i:3327;s:8:"notabyss";i:3328;s:12:"notveryabyss";i:3329;s:13:"notaccidental";i:3330;s:17:"notveryaccidental";i:3331;s:9:"notaccost";i:3332;s:13:"notveryaccost";i:3333;s:11:"notaccursed";i:3334;s:15:"notveryaccursed";i:3335;s:13:"notaccusation";i:3336;s:17:"notveryaccusation";i:3337;s:14:"notaccusations";i:3338;s:18:"notveryaccusations";i:3339;s:9:"notaccuse";i:3340;s:13:"notveryaccuse";i:3341;s:10:"notaccuses";i:3342;s:14:"notveryaccuses";i:3343;s:11:"notaccusing";i:3344;s:15:"notveryaccusing";i:3345;s:13:"notaccusingly";i:3346;s:17:"notveryaccusingly";i:3347;s:11:"notacerbate";i:3348;s:15:"notveryacerbate";i:3349;s:10:"notacerbic";i:3350;s:14:"notveryacerbic";i:3351;s:14:"notacerbically";i:3352;s:18:"notveryacerbically";i:3353;s:7:"notache";i:3354;s:11:"notveryache";i:3355;s:8:"notacrid";i:3356;s:12:"notveryacrid";i:3357;s:10:"notacridly";i:3358;s:14:"notveryacridly";i:3359;s:12:"notacridness";i:3360;s:16:"notveryacridness";i:3361;s:14:"notacrimonious";i:3362;s:18:"notveryacrimonious";i:3363;s:16:"notacrimoniously";i:3364;s:20:"notveryacrimoniously";i:3365;s:11:"notacrimony";i:3366;s:15:"notveryacrimony";i:3367;s:10:"notadamant";i:3368;s:14:"notveryadamant";i:3369;s:12:"notadamantly";i:3370;s:16:"notveryadamantly";i:3371;s:9:"notaddict";i:3372;s:13:"notveryaddict";i:3373;s:12:"notaddiction";i:3374;s:16:"notveryaddiction";i:3375;s:11:"notadmonish";i:3376;s:15:"notveryadmonish";i:3377;s:13:"notadmonisher";i:3378;s:17:"notveryadmonisher";i:3379;s:16:"notadmonishingly";i:3380;s:20:"notveryadmonishingly";i:3381;s:15:"notadmonishment";i:3382;s:19:"notveryadmonishment";i:3383;s:13:"notadmonition";i:3384;s:17:"notveryadmonition";i:3385;s:9:"notadrift";i:3386;s:13:"notveryadrift";i:3387;s:13:"notadulterate";i:3388;s:17:"notveryadulterate";i:3389;s:14:"notadulterated";i:3390;s:18:"notveryadulterated";i:3391;s:15:"notadulteration";i:3392;s:19:"notveryadulteration";i:3393;s:14:"notadversarial";i:3394;s:18:"notveryadversarial";i:3395;s:12:"notadversary";i:3396;s:16:"notveryadversary";i:3397;s:10:"notadverse";i:3398;s:14:"notveryadverse";i:3399;s:12:"notadversity";i:3400;s:16:"notveryadversity";i:3401;s:14:"notaffectation";i:3402;s:18:"notveryaffectation";i:3403;s:10:"notafflict";i:3404;s:14:"notveryafflict";i:3405;s:13:"notaffliction";i:3406;s:17:"notveryaffliction";i:3407;s:13:"notafflictive";i:3408;s:17:"notveryafflictive";i:3409;s:10:"notaffront";i:3410;s:14:"notveryaffront";i:3411;s:12:"notaggravate";i:3412;s:16:"notveryaggravate";i:3413;s:14:"notaggravating";i:3414;s:18:"notveryaggravating";i:3415;s:14:"notaggravation";i:3416;s:18:"notveryaggravation";i:3417;s:13:"notaggression";i:3418;s:17:"notveryaggression";i:3419;s:17:"notaggressiveness";i:3420;s:21:"notveryaggressiveness";i:3421;s:12:"notaggressor";i:3422;s:16:"notveryaggressor";i:3423;s:11:"notaggrieve";i:3424;s:15:"notveryaggrieve";i:3425;s:12:"notaggrieved";i:3426;s:16:"notveryaggrieved";i:3427;s:9:"notaghast";i:3428;s:13:"notveryaghast";i:3429;s:10:"notagitate";i:3430;s:14:"notveryagitate";i:3431;s:11:"notagitated";i:3432;s:15:"notveryagitated";i:3433;s:12:"notagitation";i:3434;s:16:"notveryagitation";i:3435;s:11:"notagitator";i:3436;s:15:"notveryagitator";i:3437;s:10:"notagonies";i:3438;s:14:"notveryagonies";i:3439;s:10:"notagonize";i:3440;s:14:"notveryagonize";i:3441;s:12:"notagonizing";i:3442;s:16:"notveryagonizing";i:3443;s:14:"notagonizingly";i:3444;s:18:"notveryagonizingly";i:3445;s:8:"notagony";i:3446;s:12:"notveryagony";i:3447;s:6:"notail";i:3448;s:10:"notveryail";i:3449;s:10:"notailment";i:3450;s:14:"notveryailment";i:3451;s:10:"notaimless";i:3452;s:14:"notveryaimless";i:3453;s:7:"notairs";i:3454;s:11:"notveryairs";i:3455;s:8:"notalarm";i:3456;s:12:"notveryalarm";i:3457;s:10:"notalarmed";i:3458;s:14:"notveryalarmed";i:3459;s:11:"notalarming";i:3460;s:15:"notveryalarming";i:3461;s:13:"notalarmingly";i:3462;s:17:"notveryalarmingly";i:3463;s:7:"notalas";i:3464;s:11:"notveryalas";i:3465;s:11:"notalienate";i:3466;s:15:"notveryalienate";i:3467;s:12:"notalienated";i:3468;s:16:"notveryalienated";i:3469;s:13:"notalienation";i:3470;s:17:"notveryalienation";i:3471;s:13:"notallegation";i:3472;s:17:"notveryallegation";i:3473;s:14:"notallegations";i:3474;s:18:"notveryallegations";i:3475;s:9:"notallege";i:3476;s:13:"notveryallege";i:3477;s:11:"notallergic";i:3478;s:15:"notveryallergic";i:3479;s:8:"notaloof";i:3480;s:12:"notveryaloof";i:3481;s:14:"notaltercation";i:3482;s:18:"notveryaltercation";i:3483;s:12:"notambiguous";i:3484;s:16:"notveryambiguous";i:3485;s:12:"notambiguity";i:3486;s:16:"notveryambiguity";i:3487;s:14:"notambivalence";i:3488;s:18:"notveryambivalence";i:3489;s:13:"notambivalent";i:3490;s:17:"notveryambivalent";i:3491;s:9:"notambush";i:3492;s:13:"notveryambush";i:3493;s:8:"notamiss";i:3494;s:12:"notveryamiss";i:3495;s:11:"notamputate";i:3496;s:15:"notveryamputate";i:3497;s:12:"notanarchism";i:3498;s:16:"notveryanarchism";i:3499;s:12:"notanarchist";i:3500;s:16:"notveryanarchist";i:3501;s:14:"notanarchistic";i:3502;s:18:"notveryanarchistic";i:3503;s:10:"notanarchy";i:3504;s:14:"notveryanarchy";i:3505;s:9:"notanemic";i:3506;s:13:"notveryanemic";i:3507;s:8:"notanger";i:3508;s:12:"notveryanger";i:3509;s:10:"notangrily";i:3510;s:14:"notveryangrily";i:3511;s:12:"notangriness";i:3512;s:16:"notveryangriness";i:3513;s:13:"notannihilate";i:3514;s:17:"notveryannihilate";i:3515;s:15:"notannihilation";i:3516;s:19:"notveryannihilation";i:3517;s:12:"notanimosity";i:3518;s:16:"notveryanimosity";i:3519;s:8:"notannoy";i:3520;s:12:"notveryannoy";i:3521;s:12:"notannoyance";i:3522;s:16:"notveryannoyance";i:3523;s:11:"notannoying";i:3524;s:15:"notveryannoying";i:3525;s:13:"notannoyingly";i:3526;s:17:"notveryannoyingly";i:3527;s:12:"notanomalous";i:3528;s:16:"notveryanomalous";i:3529;s:10:"notanomaly";i:3530;s:14:"notveryanomaly";i:3531;s:13:"notantagonism";i:3532;s:17:"notveryantagonism";i:3533;s:13:"notantagonist";i:3534;s:17:"notveryantagonist";i:3535;s:15:"notantagonistic";i:3536;s:19:"notveryantagonistic";i:3537;s:13:"notantagonize";i:3538;s:17:"notveryantagonize";i:3539;s:8:"notanti-";i:3540;s:12:"notveryanti-";i:3541;s:16:"notanti-american";i:3542;s:20:"notveryanti-american";i:3543;s:15:"notanti-israeli";i:3544;s:19:"notveryanti-israeli";i:3545;s:15:"notanti-semites";i:3546;s:19:"notveryanti-semites";i:3547;s:10:"notanti-us";i:3548;s:14:"notveryanti-us";i:3549;s:18:"notanti-occupation";i:3550;s:22:"notveryanti-occupation";i:3551;s:21:"notanti-proliferation";i:3552;s:25:"notveryanti-proliferation";i:3553;s:14:"notanti-social";i:3554;s:18:"notveryanti-social";i:3555;s:13:"notanti-white";i:3556;s:17:"notveryanti-white";i:3557;s:12:"notantipathy";i:3558;s:16:"notveryantipathy";i:3559;s:13:"notantiquated";i:3560;s:17:"notveryantiquated";i:3561;s:15:"notantithetical";i:3562;s:19:"notveryantithetical";i:3563;s:12:"notanxieties";i:3564;s:16:"notveryanxieties";i:3565;s:10:"notanxiety";i:3566;s:14:"notveryanxiety";i:3567;s:12:"notanxiously";i:3568;s:16:"notveryanxiously";i:3569;s:14:"notanxiousness";i:3570;s:18:"notveryanxiousness";i:3571;s:12:"notapathetic";i:3572;s:16:"notveryapathetic";i:3573;s:16:"notapathetically";i:3574;s:20:"notveryapathetically";i:3575;s:9:"notapathy";i:3576;s:13:"notveryapathy";i:3577;s:6:"notape";i:3578;s:10:"notveryape";i:3579;s:13:"notapocalypse";i:3580;s:17:"notveryapocalypse";i:3581;s:14:"notapocalyptic";i:3582;s:18:"notveryapocalyptic";i:3583;s:12:"notapologist";i:3584;s:16:"notveryapologist";i:3585;s:13:"notapologists";i:3586;s:17:"notveryapologists";i:3587;s:8:"notappal";i:3588;s:12:"notveryappal";i:3589;s:9:"notappall";i:3590;s:13:"notveryappall";i:3591;s:11:"notappalled";i:3592;s:15:"notveryappalled";i:3593;s:12:"notappalling";i:3594;s:16:"notveryappalling";i:3595;s:14:"notappallingly";i:3596;s:18:"notveryappallingly";i:3597;s:15:"notapprehension";i:3598;s:19:"notveryapprehension";i:3599;s:16:"notapprehensions";i:3600;s:20:"notveryapprehensions";i:3601;s:17:"notapprehensively";i:3602;s:21:"notveryapprehensively";i:3603;s:12:"notarbitrary";i:3604;s:16:"notveryarbitrary";i:3605;s:9:"notarcane";i:3606;s:13:"notveryarcane";i:3607;s:10:"notarchaic";i:3608;s:14:"notveryarchaic";i:3609;s:10:"notarduous";i:3610;s:14:"notveryarduous";i:3611;s:12:"notarduously";i:3612;s:16:"notveryarduously";i:3613;s:8:"notargue";i:3614;s:12:"notveryargue";i:3615;s:11:"notargument";i:3616;s:15:"notveryargument";i:3617;s:12:"notarguments";i:3618;s:16:"notveryarguments";i:3619;s:12:"notarrogance";i:3620;s:16:"notveryarrogance";i:3621;s:11:"notarrogant";i:3622;s:15:"notveryarrogant";i:3623;s:13:"notarrogantly";i:3624;s:17:"notveryarrogantly";i:3625;s:10:"notasinine";i:3626;s:14:"notveryasinine";i:3627;s:12:"notasininely";i:3628;s:16:"notveryasininely";i:3629;s:14:"notasinininity";i:3630;s:18:"notveryasinininity";i:3631;s:10:"notaskance";i:3632;s:14:"notveryaskance";i:3633;s:10:"notasperse";i:3634;s:14:"notveryasperse";i:3635;s:12:"notaspersion";i:3636;s:16:"notveryaspersion";i:3637;s:13:"notaspersions";i:3638;s:17:"notveryaspersions";i:3639;s:9:"notassail";i:3640;s:13:"notveryassail";i:3641;s:14:"notassassinate";i:3642;s:18:"notveryassassinate";i:3643;s:11:"notassassin";i:3644;s:15:"notveryassassin";i:3645;s:10:"notassault";i:3646;s:14:"notveryassault";i:3647;s:9:"notastray";i:3648;s:13:"notveryastray";i:3649;s:10:"notasunder";i:3650;s:14:"notveryasunder";i:3651;s:13:"notatrocities";i:3652;s:17:"notveryatrocities";i:3653;s:11:"notatrocity";i:3654;s:15:"notveryatrocity";i:3655;s:10:"notatrophy";i:3656;s:14:"notveryatrophy";i:3657;s:9:"notattack";i:3658;s:13:"notveryattack";i:3659;s:12:"notaudacious";i:3660;s:16:"notveryaudacious";i:3661;s:14:"notaudaciously";i:3662;s:18:"notveryaudaciously";i:3663;s:16:"notaudaciousness";i:3664;s:20:"notveryaudaciousness";i:3665;s:11:"notaudacity";i:3666;s:15:"notveryaudacity";i:3667;s:10:"notaustere";i:3668;s:14:"notveryaustere";i:3669;s:16:"notauthoritarian";i:3670;s:20:"notveryauthoritarian";i:3671;s:11:"notautocrat";i:3672;s:15:"notveryautocrat";i:3673;s:13:"notautocratic";i:3674;s:17:"notveryautocratic";i:3675;s:12:"notavalanche";i:3676;s:16:"notveryavalanche";i:3677;s:10:"notavarice";i:3678;s:14:"notveryavarice";i:3679;s:13:"notavaricious";i:3680;s:17:"notveryavaricious";i:3681;s:15:"notavariciously";i:3682;s:19:"notveryavariciously";i:3683;s:9:"notavenge";i:3684;s:13:"notveryavenge";i:3685;s:9:"notaverse";i:3686;s:13:"notveryaverse";i:3687;s:11:"notaversion";i:3688;s:15:"notveryaversion";i:3689;s:8:"notavoid";i:3690;s:12:"notveryavoid";i:3691;s:12:"notavoidance";i:3692;s:16:"notveryavoidance";i:3693;s:12:"notawfulness";i:3694;s:16:"notveryawfulness";i:3695;s:14:"notawkwardness";i:3696;s:18:"notveryawkwardness";i:3697;s:5:"notax";i:3698;s:9:"notveryax";i:3699;s:9:"notbabble";i:3700;s:13:"notverybabble";i:3701;s:11:"notbackbite";i:3702;s:15:"notverybackbite";i:3703;s:13:"notbackbiting";i:3704;s:17:"notverybackbiting";i:3705;s:11:"notbackward";i:3706;s:15:"notverybackward";i:3707;s:15:"notbackwardness";i:3708;s:19:"notverybackwardness";i:3709;s:8:"notbadly";i:3710;s:12:"notverybadly";i:3711;s:9:"notbaffle";i:3712;s:13:"notverybaffle";i:3713;s:13:"notbafflement";i:3714;s:17:"notverybafflement";i:3715;s:11:"notbaffling";i:3716;s:15:"notverybaffling";i:3717;s:7:"notbait";i:3718;s:11:"notverybait";i:3719;s:7:"notbalk";i:3720;s:11:"notverybalk";i:3721;s:8:"notbanal";i:3722;s:12:"notverybanal";i:3723;s:11:"notbanalize";i:3724;s:15:"notverybanalize";i:3725;s:7:"notbane";i:3726;s:11:"notverybane";i:3727;s:9:"notbanish";i:3728;s:13:"notverybanish";i:3729;s:13:"notbanishment";i:3730;s:17:"notverybanishment";i:3731;s:11:"notbankrupt";i:3732;s:15:"notverybankrupt";i:3733;s:6:"notbar";i:3734;s:10:"notverybar";i:3735;s:12:"notbarbarian";i:3736;s:16:"notverybarbarian";i:3737;s:11:"notbarbaric";i:3738;s:15:"notverybarbaric";i:3739;s:15:"notbarbarically";i:3740;s:19:"notverybarbarically";i:3741;s:12:"notbarbarity";i:3742;s:16:"notverybarbarity";i:3743;s:12:"notbarbarous";i:3744;s:16:"notverybarbarous";i:3745;s:14:"notbarbarously";i:3746;s:18:"notverybarbarously";i:3747;s:9:"notbarely";i:3748;s:13:"notverybarely";i:3749;s:11:"notbaseless";i:3750;s:15:"notverybaseless";i:3751;s:10:"notbashful";i:3752;s:14:"notverybashful";i:3753;s:10:"notbastard";i:3754;s:14:"notverybastard";i:3755;s:11:"notbattered";i:3756;s:15:"notverybattered";i:3757;s:12:"notbattering";i:3758;s:16:"notverybattering";i:3759;s:9:"notbattle";i:3760;s:13:"notverybattle";i:3761;s:15:"notbattle-lines";i:3762;s:19:"notverybattle-lines";i:3763;s:14:"notbattlefield";i:3764;s:18:"notverybattlefield";i:3765;s:15:"notbattleground";i:3766;s:19:"notverybattleground";i:3767;s:8:"notbatty";i:3768;s:12:"notverybatty";i:3769;s:10:"notbearish";i:3770;s:14:"notverybearish";i:3771;s:8:"notbeast";i:3772;s:12:"notverybeast";i:3773;s:10:"notbeastly";i:3774;s:14:"notverybeastly";i:3775;s:9:"notbedlam";i:3776;s:13:"notverybedlam";i:3777;s:12:"notbedlamite";i:3778;s:16:"notverybedlamite";i:3779;s:9:"notbefoul";i:3780;s:13:"notverybefoul";i:3781;s:6:"notbeg";i:3782;s:10:"notverybeg";i:3783;s:9:"notbeggar";i:3784;s:13:"notverybeggar";i:3785;s:11:"notbeggarly";i:3786;s:15:"notverybeggarly";i:3787;s:10:"notbegging";i:3788;s:14:"notverybegging";i:3789;s:10:"notbeguile";i:3790;s:14:"notverybeguile";i:3791;s:10:"notbelated";i:3792;s:14:"notverybelated";i:3793;s:10:"notbelabor";i:3794;s:14:"notverybelabor";i:3795;s:12:"notbeleaguer";i:3796;s:16:"notverybeleaguer";i:3797;s:8:"notbelie";i:3798;s:12:"notverybelie";i:3799;s:11:"notbelittle";i:3800;s:15:"notverybelittle";i:3801;s:13:"notbelittling";i:3802;s:17:"notverybelittling";i:3803;s:12:"notbellicose";i:3804;s:16:"notverybellicose";i:3805;s:15:"notbelligerence";i:3806;s:19:"notverybelligerence";i:3807;s:14:"notbelligerent";i:3808;s:18:"notverybelligerent";i:3809;s:16:"notbelligerently";i:3810;s:20:"notverybelligerently";i:3811;s:9:"notbemoan";i:3812;s:13:"notverybemoan";i:3813;s:12:"notbemoaning";i:3814;s:16:"notverybemoaning";i:3815;s:10:"notbemused";i:3816;s:14:"notverybemused";i:3817;s:7:"notbent";i:3818;s:11:"notverybent";i:3819;s:9:"notberate";i:3820;s:13:"notveryberate";i:3821;s:10:"notbereave";i:3822;s:14:"notverybereave";i:3823;s:14:"notbereavement";i:3824;s:18:"notverybereavement";i:3825;s:9:"notbereft";i:3826;s:13:"notverybereft";i:3827;s:10:"notberserk";i:3828;s:14:"notveryberserk";i:3829;s:10:"notbeseech";i:3830;s:14:"notverybeseech";i:3831;s:8:"notbeset";i:3832;s:12:"notverybeset";i:3833;s:10:"notbesiege";i:3834;s:14:"notverybesiege";i:3835;s:11:"notbesmirch";i:3836;s:15:"notverybesmirch";i:3837;s:10:"notbestial";i:3838;s:14:"notverybestial";i:3839;s:9:"notbetray";i:3840;s:13:"notverybetray";i:3841;s:11:"notbetrayal";i:3842;s:15:"notverybetrayal";i:3843;s:12:"notbetrayals";i:3844;s:16:"notverybetrayals";i:3845;s:11:"notbetrayer";i:3846;s:15:"notverybetrayer";i:3847;s:9:"notbewail";i:3848;s:13:"notverybewail";i:3849;s:9:"notbeware";i:3850;s:13:"notverybeware";i:3851;s:11:"notbewilder";i:3852;s:15:"notverybewilder";i:3853;s:13:"notbewildered";i:3854;s:17:"notverybewildered";i:3855;s:14:"notbewildering";i:3856;s:18:"notverybewildering";i:3857;s:16:"notbewilderingly";i:3858;s:20:"notverybewilderingly";i:3859;s:15:"notbewilderment";i:3860;s:19:"notverybewilderment";i:3861;s:10:"notbewitch";i:3862;s:14:"notverybewitch";i:3863;s:7:"notbias";i:3864;s:11:"notverybias";i:3865;s:9:"notbiased";i:3866;s:13:"notverybiased";i:3867;s:9:"notbiases";i:3868;s:13:"notverybiases";i:3869;s:9:"notbicker";i:3870;s:13:"notverybicker";i:3871;s:12:"notbickering";i:3872;s:16:"notverybickering";i:3873;s:14:"notbid-rigging";i:3874;s:18:"notverybid-rigging";i:3875;s:8:"notbitch";i:3876;s:12:"notverybitch";i:3877;s:9:"notbitchy";i:3878;s:13:"notverybitchy";i:3879;s:9:"notbiting";i:3880;s:13:"notverybiting";i:3881;s:11:"notbitingly";i:3882;s:15:"notverybitingly";i:3883;s:11:"notbitterly";i:3884;s:15:"notverybitterly";i:3885;s:13:"notbitterness";i:3886;s:17:"notverybitterness";i:3887;s:10:"notbizarre";i:3888;s:14:"notverybizarre";i:3889;s:7:"notblab";i:3890;s:11:"notveryblab";i:3891;s:10:"notblabber";i:3892;s:14:"notveryblabber";i:3893;s:8:"notblack";i:3894;s:12:"notveryblack";i:3895;s:12:"notblackmail";i:3896;s:16:"notveryblackmail";i:3897;s:7:"notblah";i:3898;s:11:"notveryblah";i:3899;s:14:"notblameworthy";i:3900;s:18:"notveryblameworthy";i:3901;s:8:"notbland";i:3902;s:12:"notverybland";i:3903;s:11:"notblandish";i:3904;s:15:"notveryblandish";i:3905;s:12:"notblaspheme";i:3906;s:16:"notveryblaspheme";i:3907;s:14:"notblasphemous";i:3908;s:18:"notveryblasphemous";i:3909;s:12:"notblasphemy";i:3910;s:16:"notveryblasphemy";i:3911;s:8:"notblast";i:3912;s:12:"notveryblast";i:3913;s:10:"notblasted";i:3914;s:14:"notveryblasted";i:3915;s:10:"notblatant";i:3916;s:14:"notveryblatant";i:3917;s:12:"notblatantly";i:3918;s:16:"notveryblatantly";i:3919;s:10:"notblather";i:3920;s:14:"notveryblather";i:3921;s:10:"notbleakly";i:3922;s:14:"notverybleakly";i:3923;s:12:"notbleakness";i:3924;s:16:"notverybleakness";i:3925;s:8:"notbleed";i:3926;s:12:"notverybleed";i:3927;s:10:"notblemish";i:3928;s:14:"notveryblemish";i:3929;s:8:"notblind";i:3930;s:12:"notveryblind";i:3931;s:11:"notblinding";i:3932;s:15:"notveryblinding";i:3933;s:13:"notblindingly";i:3934;s:17:"notveryblindingly";i:3935;s:12:"notblindness";i:3936;s:16:"notveryblindness";i:3937;s:12:"notblindside";i:3938;s:16:"notveryblindside";i:3939;s:10:"notblister";i:3940;s:14:"notveryblister";i:3941;s:13:"notblistering";i:3942;s:17:"notveryblistering";i:3943;s:10:"notbloated";i:3944;s:14:"notverybloated";i:3945;s:8:"notblock";i:3946;s:12:"notveryblock";i:3947;s:12:"notblockhead";i:3948;s:16:"notveryblockhead";i:3949;s:8:"notblood";i:3950;s:12:"notveryblood";i:3951;s:12:"notbloodshed";i:3952;s:16:"notverybloodshed";i:3953;s:15:"notbloodthirsty";i:3954;s:19:"notverybloodthirsty";i:3955;s:9:"notbloody";i:3956;s:13:"notverybloody";i:3957;s:7:"notblow";i:3958;s:11:"notveryblow";i:3959;s:10:"notblunder";i:3960;s:14:"notveryblunder";i:3961;s:13:"notblundering";i:3962;s:17:"notveryblundering";i:3963;s:11:"notblunders";i:3964;s:15:"notveryblunders";i:3965;s:8:"notblunt";i:3966;s:12:"notveryblunt";i:3967;s:8:"notblurt";i:3968;s:12:"notveryblurt";i:3969;s:8:"notboast";i:3970;s:12:"notveryboast";i:3971;s:11:"notboastful";i:3972;s:15:"notveryboastful";i:3973;s:9:"notboggle";i:3974;s:13:"notveryboggle";i:3975;s:8:"notbogus";i:3976;s:12:"notverybogus";i:3977;s:7:"notboil";i:3978;s:11:"notveryboil";i:3979;s:10:"notboiling";i:3980;s:14:"notveryboiling";i:3981;s:13:"notboisterous";i:3982;s:17:"notveryboisterous";i:3983;s:10:"notbombard";i:3984;s:14:"notverybombard";i:3985;s:7:"notbomb";i:3986;s:11:"notverybomb";i:3987;s:14:"notbombardment";i:3988;s:18:"notverybombardment";i:3989;s:12:"notbombastic";i:3990;s:16:"notverybombastic";i:3991;s:10:"notbondage";i:3992;s:14:"notverybondage";i:3993;s:10:"notbonkers";i:3994;s:14:"notverybonkers";i:3995;s:7:"notbore";i:3996;s:11:"notverybore";i:3997;s:10:"notboredom";i:3998;s:14:"notveryboredom";i:3999;s:8:"notbotch";i:4000;s:12:"notverybotch";i:4001;s:9:"notbother";i:4002;s:13:"notverybother";i:4003;s:13:"notbowdlerize";i:4004;s:17:"notverybowdlerize";i:4005;s:10:"notboycott";i:4006;s:14:"notveryboycott";i:4007;s:7:"notbrag";i:4008;s:11:"notverybrag";i:4009;s:11:"notbraggart";i:4010;s:15:"notverybraggart";i:4011;s:10:"notbragger";i:4012;s:14:"notverybragger";i:4013;s:12:"notbrainwash";i:4014;s:16:"notverybrainwash";i:4015;s:8:"notbrash";i:4016;s:12:"notverybrash";i:4017;s:10:"notbrashly";i:4018;s:14:"notverybrashly";i:4019;s:12:"notbrashness";i:4020;s:16:"notverybrashness";i:4021;s:7:"notbrat";i:4022;s:11:"notverybrat";i:4023;s:10:"notbravado";i:4024;s:14:"notverybravado";i:4025;s:9:"notbrazen";i:4026;s:13:"notverybrazen";i:4027;s:11:"notbrazenly";i:4028;s:15:"notverybrazenly";i:4029;s:13:"notbrazenness";i:4030;s:17:"notverybrazenness";i:4031;s:9:"notbreach";i:4032;s:13:"notverybreach";i:4033;s:8:"notbreak";i:4034;s:12:"notverybreak";i:4035;s:14:"notbreak-point";i:4036;s:18:"notverybreak-point";i:4037;s:12:"notbreakdown";i:4038;s:16:"notverybreakdown";i:4039;s:12:"notbrimstone";i:4040;s:16:"notverybrimstone";i:4041;s:10:"notbristle";i:4042;s:14:"notverybristle";i:4043;s:10:"notbrittle";i:4044;s:14:"notverybrittle";i:4045;s:8:"notbroke";i:4046;s:12:"notverybroke";i:4047;s:17:"notbroken-hearted";i:4048;s:21:"notverybroken-hearted";i:4049;s:8:"notbrood";i:4050;s:12:"notverybrood";i:4051;s:11:"notbrowbeat";i:4052;s:15:"notverybrowbeat";i:4053;s:9:"notbruise";i:4054;s:13:"notverybruise";i:4055;s:10:"notbrusque";i:4056;s:14:"notverybrusque";i:4057;s:9:"notbrutal";i:4058;s:13:"notverybrutal";i:4059;s:14:"notbrutalising";i:4060;s:18:"notverybrutalising";i:4061;s:14:"notbrutalities";i:4062;s:18:"notverybrutalities";i:4063;s:12:"notbrutality";i:4064;s:16:"notverybrutality";i:4065;s:12:"notbrutalize";i:4066;s:16:"notverybrutalize";i:4067;s:14:"notbrutalizing";i:4068;s:18:"notverybrutalizing";i:4069;s:11:"notbrutally";i:4070;s:15:"notverybrutally";i:4071;s:8:"notbrute";i:4072;s:12:"notverybrute";i:4073;s:10:"notbrutish";i:4074;s:14:"notverybrutish";i:4075;s:6:"notbug";i:4076;s:10:"notverybug";i:4077;s:9:"notbuckle";i:4078;s:13:"notverybuckle";i:4079;s:8:"notbulky";i:4080;s:12:"notverybulky";i:4081;s:10:"notbullies";i:4082;s:14:"notverybullies";i:4083;s:8:"notbully";i:4084;s:12:"notverybully";i:4085;s:13:"notbullyingly";i:4086;s:17:"notverybullyingly";i:4087;s:6:"notbum";i:4088;s:10:"notverybum";i:4089;s:8:"notbumpy";i:4090;s:12:"notverybumpy";i:4091;s:9:"notbungle";i:4092;s:13:"notverybungle";i:4093;s:10:"notbungler";i:4094;s:14:"notverybungler";i:4095;s:7:"notbunk";i:4096;s:11:"notverybunk";i:4097;s:9:"notburden";i:4098;s:13:"notveryburden";i:4099;s:15:"notburdensomely";i:4100;s:19:"notveryburdensomely";i:4101;s:7:"notburn";i:4102;s:11:"notveryburn";i:4103;s:7:"notbusy";i:4104;s:11:"notverybusy";i:4105;s:11:"notbusybody";i:4106;s:15:"notverybusybody";i:4107;s:10:"notbutcher";i:4108;s:14:"notverybutcher";i:4109;s:11:"notbutchery";i:4110;s:15:"notverybutchery";i:4111;s:12:"notbyzantine";i:4112;s:16:"notverybyzantine";i:4113;s:9:"notcackle";i:4114;s:13:"notverycackle";i:4115;s:9:"notcajole";i:4116;s:13:"notverycajole";i:4117;s:13:"notcalamities";i:4118;s:17:"notverycalamities";i:4119;s:13:"notcalamitous";i:4120;s:17:"notverycalamitous";i:4121;s:15:"notcalamitously";i:4122;s:19:"notverycalamitously";i:4123;s:11:"notcalamity";i:4124;s:15:"notverycalamity";i:4125;s:10:"notcallous";i:4126;s:14:"notverycallous";i:4127;s:13:"notcalumniate";i:4128;s:17:"notverycalumniate";i:4129;s:15:"notcalumniation";i:4130;s:19:"notverycalumniation";i:4131;s:12:"notcalumnies";i:4132;s:16:"notverycalumnies";i:4133;s:13:"notcalumnious";i:4134;s:17:"notverycalumnious";i:4135;s:15:"notcalumniously";i:4136;s:19:"notverycalumniously";i:4137;s:10:"notcalumny";i:4138;s:14:"notverycalumny";i:4139;s:9:"notcancer";i:4140;s:13:"notverycancer";i:4141;s:12:"notcancerous";i:4142;s:16:"notverycancerous";i:4143;s:11:"notcannibal";i:4144;s:15:"notverycannibal";i:4145;s:14:"notcannibalize";i:4146;s:18:"notverycannibalize";i:4147;s:13:"notcapitulate";i:4148;s:17:"notverycapitulate";i:4149;s:13:"notcapricious";i:4150;s:17:"notverycapricious";i:4151;s:15:"notcapriciously";i:4152;s:19:"notverycapriciously";i:4153;s:17:"notcapriciousness";i:4154;s:21:"notverycapriciousness";i:4155;s:10:"notcapsize";i:4156;s:14:"notverycapsize";i:4157;s:10:"notcaptive";i:4158;s:14:"notverycaptive";i:4159;s:15:"notcarelessness";i:4160;s:19:"notverycarelessness";i:4161;s:13:"notcaricature";i:4162;s:17:"notverycaricature";i:4163;s:10:"notcarnage";i:4164;s:14:"notverycarnage";i:4165;s:7:"notcarp";i:4166;s:11:"notverycarp";i:4167;s:10:"notcartoon";i:4168;s:14:"notverycartoon";i:4169;s:13:"notcartoonish";i:4170;s:17:"notverycartoonish";i:4171;s:16:"notcash-strapped";i:4172;s:20:"notverycash-strapped";i:4173;s:12:"notcastigate";i:4174;s:16:"notverycastigate";i:4175;s:11:"notcasualty";i:4176;s:15:"notverycasualty";i:4177;s:12:"notcataclysm";i:4178;s:16:"notverycataclysm";i:4179;s:14:"notcataclysmal";i:4180;s:18:"notverycataclysmal";i:4181;s:14:"notcataclysmic";i:4182;s:18:"notverycataclysmic";i:4183;s:18:"notcataclysmically";i:4184;s:22:"notverycataclysmically";i:4185;s:14:"notcatastrophe";i:4186;s:18:"notverycatastrophe";i:4187;s:15:"notcatastrophes";i:4188;s:19:"notverycatastrophes";i:4189;s:15:"notcatastrophic";i:4190;s:19:"notverycatastrophic";i:4191;s:19:"notcatastrophically";i:4192;s:23:"notverycatastrophically";i:4193;s:10:"notcaustic";i:4194;s:14:"notverycaustic";i:4195;s:14:"notcaustically";i:4196;s:18:"notverycaustically";i:4197;s:13:"notcautionary";i:4198;s:17:"notverycautionary";i:4199;s:11:"notcautious";i:4200;s:15:"notverycautious";i:4201;s:7:"notcave";i:4202;s:11:"notverycave";i:4203;s:10:"notcensure";i:4204;s:14:"notverycensure";i:4205;s:8:"notchafe";i:4206;s:12:"notverychafe";i:4207;s:8:"notchaff";i:4208;s:12:"notverychaff";i:4209;s:10:"notchagrin";i:4210;s:14:"notverychagrin";i:4211;s:12:"notchallenge";i:4212;s:16:"notverychallenge";i:4213;s:14:"notchallenging";i:4214;s:18:"notverychallenging";i:4215;s:8:"notchaos";i:4216;s:12:"notverychaos";i:4217;s:11:"notcharisma";i:4218;s:15:"notverycharisma";i:4219;s:10:"notchasten";i:4220;s:14:"notverychasten";i:4221;s:11:"notchastise";i:4222;s:15:"notverychastise";i:4223;s:15:"notchastisement";i:4224;s:19:"notverychastisement";i:4225;s:10:"notchatter";i:4226;s:14:"notverychatter";i:4227;s:13:"notchatterbox";i:4228;s:17:"notverychatterbox";i:4229;s:10:"notcheapen";i:4230;s:14:"notverycheapen";i:4231;s:8:"notcheap";i:4232;s:12:"notverycheap";i:4233;s:8:"notcheat";i:4234;s:12:"notverycheat";i:4235;s:10:"notcheater";i:4236;s:14:"notverycheater";i:4237;s:12:"notcheerless";i:4238;s:16:"notverycheerless";i:4239;s:8:"notchide";i:4240;s:12:"notverychide";i:4241;s:11:"notchildish";i:4242;s:15:"notverychildish";i:4243;s:8:"notchill";i:4244;s:12:"notverychill";i:4245;s:9:"notchilly";i:4246;s:13:"notverychilly";i:4247;s:7:"notchit";i:4248;s:11:"notverychit";i:4249;s:9:"notchoppy";i:4250;s:13:"notverychoppy";i:4251;s:8:"notchoke";i:4252;s:12:"notverychoke";i:4253;s:8:"notchore";i:4254;s:12:"notverychore";i:4255;s:10:"notchronic";i:4256;s:14:"notverychronic";i:4257;s:9:"notclamor";i:4258;s:13:"notveryclamor";i:4259;s:12:"notclamorous";i:4260;s:16:"notveryclamorous";i:4261;s:8:"notclash";i:4262;s:12:"notveryclash";i:4263;s:9:"notcliche";i:4264;s:13:"notverycliche";i:4265;s:10:"notcliched";i:4266;s:14:"notverycliched";i:4267;s:9:"notclique";i:4268;s:13:"notveryclique";i:4269;s:7:"notclog";i:4270;s:11:"notveryclog";i:4271;s:8:"notclose";i:4272;s:12:"notveryclose";i:4273;s:8:"notcloud";i:4274;s:12:"notverycloud";i:4275;s:9:"notcoarse";i:4276;s:13:"notverycoarse";i:4277;s:8:"notcocky";i:4278;s:12:"notverycocky";i:4279;s:9:"notcoerce";i:4280;s:13:"notverycoerce";i:4281;s:11:"notcoercion";i:4282;s:15:"notverycoercion";i:4283;s:11:"notcoercive";i:4284;s:15:"notverycoercive";i:4285;s:9:"notcoldly";i:4286;s:13:"notverycoldly";i:4287;s:11:"notcollapse";i:4288;s:15:"notverycollapse";i:4289;s:10:"notcollide";i:4290;s:14:"notverycollide";i:4291;s:10:"notcollude";i:4292;s:14:"notverycollude";i:4293;s:12:"notcollusion";i:4294;s:16:"notverycollusion";i:4295;s:9:"notcomedy";i:4296;s:13:"notverycomedy";i:4297;s:10:"notcomical";i:4298;s:14:"notverycomical";i:4299;s:14:"notcommiserate";i:4300;s:18:"notverycommiserate";i:4301;s:14:"notcommonplace";i:4302;s:18:"notverycommonplace";i:4303;s:12:"notcommotion";i:4304;s:16:"notverycommotion";i:4305;s:9:"notcompel";i:4306;s:13:"notverycompel";i:4307;s:13:"notcomplacent";i:4308;s:17:"notverycomplacent";i:4309;s:11:"notcomplain";i:4310;s:15:"notverycomplain";i:4311;s:14:"notcomplaining";i:4312;s:18:"notverycomplaining";i:4313;s:12:"notcomplaint";i:4314;s:16:"notverycomplaint";i:4315;s:13:"notcomplaints";i:4316;s:17:"notverycomplaints";i:4317;s:13:"notcomplicate";i:4318;s:17:"notverycomplicate";i:4319;s:14:"notcomplicated";i:4320;s:18:"notverycomplicated";i:4321;s:15:"notcomplication";i:4322;s:19:"notverycomplication";i:4323;s:12:"notcomplicit";i:4324;s:16:"notverycomplicit";i:4325;s:13:"notcompulsion";i:4326;s:17:"notverycompulsion";i:4327;s:13:"notcompulsory";i:4328;s:17:"notverycompulsory";i:4329;s:10:"notconcede";i:4330;s:14:"notveryconcede";i:4331;s:10:"notconceit";i:4332;s:14:"notveryconceit";i:4333;s:10:"notconcern";i:4334;s:14:"notveryconcern";i:4335;s:11:"notconcerns";i:4336;s:15:"notveryconcerns";i:4337;s:13:"notconcession";i:4338;s:17:"notveryconcession";i:4339;s:14:"notconcessions";i:4340;s:18:"notveryconcessions";i:4341;s:13:"notcondescend";i:4342;s:17:"notverycondescend";i:4343;s:16:"notcondescending";i:4344;s:20:"notverycondescending";i:4345;s:18:"notcondescendingly";i:4346;s:22:"notverycondescendingly";i:4347;s:16:"notcondescension";i:4348;s:20:"notverycondescension";i:4349;s:10:"notcondemn";i:4350;s:14:"notverycondemn";i:4351;s:14:"notcondemnable";i:4352;s:18:"notverycondemnable";i:4353;s:15:"notcondemnation";i:4354;s:19:"notverycondemnation";i:4355;s:13:"notcondolence";i:4356;s:17:"notverycondolence";i:4357;s:14:"notcondolences";i:4358;s:18:"notverycondolences";i:4359;s:10:"notconfess";i:4360;s:14:"notveryconfess";i:4361;s:13:"notconfession";i:4362;s:17:"notveryconfession";i:4363;s:14:"notconfessions";i:4364;s:18:"notveryconfessions";i:4365;s:11:"notconflict";i:4366;s:15:"notveryconflict";i:4367;s:11:"notconfound";i:4368;s:15:"notveryconfound";i:4369;s:13:"notconfounded";i:4370;s:17:"notveryconfounded";i:4371;s:14:"notconfounding";i:4372;s:18:"notveryconfounding";i:4373;s:11:"notconfront";i:4374;s:15:"notveryconfront";i:4375;s:16:"notconfrontation";i:4376;s:20:"notveryconfrontation";i:4377;s:18:"notconfrontational";i:4378;s:22:"notveryconfrontational";i:4379;s:10:"notconfuse";i:4380;s:14:"notveryconfuse";i:4381;s:12:"notconfusing";i:4382;s:16:"notveryconfusing";i:4383;s:12:"notconfusion";i:4384;s:16:"notveryconfusion";i:4385;s:12:"notcongested";i:4386;s:16:"notverycongested";i:4387;s:13:"notcongestion";i:4388;s:17:"notverycongestion";i:4389;s:14:"notconspicuous";i:4390;s:18:"notveryconspicuous";i:4391;s:16:"notconspicuously";i:4392;s:20:"notveryconspicuously";i:4393;s:15:"notconspiracies";i:4394;s:19:"notveryconspiracies";i:4395;s:13:"notconspiracy";i:4396;s:17:"notveryconspiracy";i:4397;s:14:"notconspirator";i:4398;s:18:"notveryconspirator";i:4399;s:17:"notconspiratorial";i:4400;s:21:"notveryconspiratorial";i:4401;s:11:"notconspire";i:4402;s:15:"notveryconspire";i:4403;s:16:"notconsternation";i:4404;s:20:"notveryconsternation";i:4405;s:12:"notconstrain";i:4406;s:16:"notveryconstrain";i:4407;s:13:"notconstraint";i:4408;s:17:"notveryconstraint";i:4409;s:10:"notconsume";i:4410;s:14:"notveryconsume";i:4411;s:13:"notcontagious";i:4412;s:17:"notverycontagious";i:4413;s:14:"notcontaminate";i:4414;s:18:"notverycontaminate";i:4415;s:16:"notcontamination";i:4416;s:20:"notverycontamination";i:4417;s:15:"notcontemptible";i:4418;s:19:"notverycontemptible";i:4419;s:15:"notcontemptuous";i:4420;s:19:"notverycontemptuous";i:4421;s:17:"notcontemptuously";i:4422;s:21:"notverycontemptuously";i:4423;s:10:"notcontend";i:4424;s:14:"notverycontend";i:4425;s:13:"notcontention";i:4426;s:17:"notverycontention";i:4427;s:10:"notcontort";i:4428;s:14:"notverycontort";i:4429;s:14:"notcontortions";i:4430;s:18:"notverycontortions";i:4431;s:13:"notcontradict";i:4432;s:17:"notverycontradict";i:4433;s:16:"notcontradiction";i:4434;s:20:"notverycontradiction";i:4435;s:16:"notcontradictory";i:4436;s:20:"notverycontradictory";i:4437;s:15:"notcontrariness";i:4438;s:19:"notverycontrariness";i:4439;s:11:"notcontrary";i:4440;s:15:"notverycontrary";i:4441;s:13:"notcontravene";i:4442;s:17:"notverycontravene";i:4443;s:11:"notcontrive";i:4444;s:15:"notverycontrive";i:4445;s:12:"notcontrived";i:4446;s:16:"notverycontrived";i:4447;s:16:"notcontroversial";i:4448;s:20:"notverycontroversial";i:4449;s:14:"notcontroversy";i:4450;s:18:"notverycontroversy";i:4451;s:13:"notconvoluted";i:4452;s:17:"notveryconvoluted";i:4453;s:9:"notcoping";i:4454;s:13:"notverycoping";i:4455;s:10:"notcorrode";i:4456;s:14:"notverycorrode";i:4457;s:12:"notcorrosion";i:4458;s:16:"notverycorrosion";i:4459;s:12:"notcorrosive";i:4460;s:16:"notverycorrosive";i:4461;s:10:"notcorrupt";i:4462;s:14:"notverycorrupt";i:4463;s:13:"notcorruption";i:4464;s:17:"notverycorruption";i:4465;s:9:"notcostly";i:4466;s:13:"notverycostly";i:4467;s:20:"notcounterproductive";i:4468;s:24:"notverycounterproductive";i:4469;s:11:"notcoupists";i:4470;s:15:"notverycoupists";i:4471;s:11:"notcovetous";i:4472;s:15:"notverycovetous";i:4473;s:13:"notcovetously";i:4474;s:17:"notverycovetously";i:4475;s:6:"notcow";i:4476;s:10:"notverycow";i:4477;s:9:"notcoward";i:4478;s:13:"notverycoward";i:4479;s:12:"notcrackdown";i:4480;s:16:"notverycrackdown";i:4481;s:9:"notcrafty";i:4482;s:13:"notverycrafty";i:4483;s:8:"notcrass";i:4484;s:12:"notverycrass";i:4485;s:9:"notcraven";i:4486;s:13:"notverycraven";i:4487;s:11:"notcravenly";i:4488;s:15:"notverycravenly";i:4489;s:8:"notcraze";i:4490;s:12:"notverycraze";i:4491;s:10:"notcrazily";i:4492;s:14:"notverycrazily";i:4493;s:12:"notcraziness";i:4494;s:16:"notverycraziness";i:4495;s:12:"notcredulous";i:4496;s:16:"notverycredulous";i:4497;s:8:"notcrime";i:4498;s:12:"notverycrime";i:4499;s:11:"notcriminal";i:4500;s:15:"notverycriminal";i:4501;s:9:"notcringe";i:4502;s:13:"notverycringe";i:4503;s:10:"notcripple";i:4504;s:14:"notverycripple";i:4505;s:12:"notcrippling";i:4506;s:16:"notverycrippling";i:4507;s:9:"notcrisis";i:4508;s:13:"notverycrisis";i:4509;s:9:"notcritic";i:4510;s:13:"notverycritic";i:4511;s:12:"notcriticism";i:4512;s:16:"notverycriticism";i:4513;s:13:"notcriticisms";i:4514;s:17:"notverycriticisms";i:4515;s:12:"notcriticize";i:4516;s:16:"notverycriticize";i:4517;s:10:"notcritics";i:4518;s:14:"notverycritics";i:4519;s:8:"notcrook";i:4520;s:12:"notverycrook";i:4521;s:10:"notcrooked";i:4522;s:14:"notverycrooked";i:4523;s:8:"notcrude";i:4524;s:12:"notverycrude";i:4525;s:8:"notcruel";i:4526;s:12:"notverycruel";i:4527;s:12:"notcruelties";i:4528;s:16:"notverycruelties";i:4529;s:10:"notcruelty";i:4530;s:14:"notverycruelty";i:4531;s:10:"notcrumble";i:4532;s:14:"notverycrumble";i:4533;s:10:"notcrumple";i:4534;s:14:"notverycrumple";i:4535;s:8:"notcrush";i:4536;s:12:"notverycrush";i:4537;s:11:"notcrushing";i:4538;s:15:"notverycrushing";i:4539;s:6:"notcry";i:4540;s:10:"notverycry";i:4541;s:11:"notculpable";i:4542;s:15:"notveryculpable";i:4543;s:10:"notcuplrit";i:4544;s:14:"notverycuplrit";i:4545;s:13:"notcumbersome";i:4546;s:17:"notverycumbersome";i:4547;s:8:"notcurse";i:4548;s:12:"notverycurse";i:4549;s:9:"notcursed";i:4550;s:13:"notverycursed";i:4551;s:9:"notcurses";i:4552;s:13:"notverycurses";i:4553;s:10:"notcursory";i:4554;s:14:"notverycursory";i:4555;s:7:"notcurt";i:4556;s:11:"notverycurt";i:4557;s:7:"notcuss";i:4558;s:11:"notverycuss";i:4559;s:6:"notcut";i:4560;s:10:"notverycut";i:4561;s:12:"notcutthroat";i:4562;s:16:"notverycutthroat";i:4563;s:11:"notcynicism";i:4564;s:15:"notverycynicism";i:4565;s:9:"notdamage";i:4566;s:13:"notverydamage";i:4567;s:11:"notdamaging";i:4568;s:15:"notverydamaging";i:4569;s:7:"notdamn";i:4570;s:11:"notverydamn";i:4571;s:11:"notdamnable";i:4572;s:15:"notverydamnable";i:4573;s:11:"notdamnably";i:4574;s:15:"notverydamnably";i:4575;s:12:"notdamnation";i:4576;s:16:"notverydamnation";i:4577;s:10:"notdamning";i:4578;s:14:"notverydamning";i:4579;s:9:"notdanger";i:4580;s:13:"notverydanger";i:4581;s:16:"notdangerousness";i:4582;s:20:"notverydangerousness";i:4583;s:9:"notdangle";i:4584;s:13:"notverydangle";i:4585;s:9:"notdarken";i:4586;s:13:"notverydarken";i:4587;s:11:"notdarkness";i:4588;s:15:"notverydarkness";i:4589;s:7:"notdarn";i:4590;s:11:"notverydarn";i:4591;s:7:"notdash";i:4592;s:11:"notverydash";i:4593;s:10:"notdastard";i:4594;s:14:"notverydastard";i:4595;s:12:"notdastardly";i:4596;s:16:"notverydastardly";i:4597;s:8:"notdaunt";i:4598;s:12:"notverydaunt";i:4599;s:11:"notdaunting";i:4600;s:15:"notverydaunting";i:4601;s:13:"notdauntingly";i:4602;s:17:"notverydauntingly";i:4603;s:9:"notdawdle";i:4604;s:13:"notverydawdle";i:4605;s:7:"notdaze";i:4606;s:11:"notverydaze";i:4607;s:11:"notdeadbeat";i:4608;s:15:"notverydeadbeat";i:4609;s:11:"notdeadlock";i:4610;s:15:"notverydeadlock";i:4611;s:9:"notdeadly";i:4612;s:13:"notverydeadly";i:4613;s:13:"notdeadweight";i:4614;s:17:"notverydeadweight";i:4615;s:7:"notdeaf";i:4616;s:11:"notverydeaf";i:4617;s:9:"notdearth";i:4618;s:13:"notverydearth";i:4619;s:8:"notdeath";i:4620;s:12:"notverydeath";i:4621;s:10:"notdebacle";i:4622;s:14:"notverydebacle";i:4623;s:9:"notdebase";i:4624;s:13:"notverydebase";i:4625;s:13:"notdebasement";i:4626;s:17:"notverydebasement";i:4627;s:10:"notdebaser";i:4628;s:14:"notverydebaser";i:4629;s:12:"notdebatable";i:4630;s:16:"notverydebatable";i:4631;s:9:"notdebate";i:4632;s:13:"notverydebate";i:4633;s:10:"notdebauch";i:4634;s:14:"notverydebauch";i:4635;s:12:"notdebaucher";i:4636;s:16:"notverydebaucher";i:4637;s:13:"notdebauchery";i:4638;s:17:"notverydebauchery";i:4639;s:13:"notdebilitate";i:4640;s:17:"notverydebilitate";i:4641;s:15:"notdebilitating";i:4642;s:19:"notverydebilitating";i:4643;s:11:"notdebility";i:4644;s:15:"notverydebility";i:4645;s:12:"notdecadence";i:4646;s:16:"notverydecadence";i:4647;s:11:"notdecadent";i:4648;s:15:"notverydecadent";i:4649;s:8:"notdecay";i:4650;s:12:"notverydecay";i:4651;s:10:"notdecayed";i:4652;s:14:"notverydecayed";i:4653;s:9:"notdeceit";i:4654;s:13:"notverydeceit";i:4655;s:12:"notdeceitful";i:4656;s:16:"notverydeceitful";i:4657;s:14:"notdeceitfully";i:4658;s:18:"notverydeceitfully";i:4659;s:16:"notdeceitfulness";i:4660;s:20:"notverydeceitfulness";i:4661;s:12:"notdeceiving";i:4662;s:16:"notverydeceiving";i:4663;s:10:"notdeceive";i:4664;s:14:"notverydeceive";i:4665;s:11:"notdeceiver";i:4666;s:15:"notverydeceiver";i:4667;s:12:"notdeceivers";i:4668;s:16:"notverydeceivers";i:4669;s:12:"notdeception";i:4670;s:16:"notverydeception";i:4671;s:12:"notdeceptive";i:4672;s:16:"notverydeceptive";i:4673;s:14:"notdeceptively";i:4674;s:18:"notverydeceptively";i:4675;s:10:"notdeclaim";i:4676;s:14:"notverydeclaim";i:4677;s:10:"notdecline";i:4678;s:14:"notverydecline";i:4679;s:12:"notdeclining";i:4680;s:16:"notverydeclining";i:4681;s:11:"notdecrease";i:4682;s:15:"notverydecrease";i:4683;s:13:"notdecreasing";i:4684;s:17:"notverydecreasing";i:4685;s:12:"notdecrement";i:4686;s:16:"notverydecrement";i:4687;s:11:"notdecrepit";i:4688;s:15:"notverydecrepit";i:4689;s:14:"notdecrepitude";i:4690;s:18:"notverydecrepitude";i:4691;s:8:"notdecry";i:4692;s:12:"notverydecry";i:4693;s:12:"notdeepening";i:4694;s:16:"notverydeepening";i:4695;s:13:"notdefamation";i:4696;s:17:"notverydefamation";i:4697;s:14:"notdefamations";i:4698;s:18:"notverydefamations";i:4699;s:13:"notdefamatory";i:4700;s:17:"notverydefamatory";i:4701;s:9:"notdefame";i:4702;s:13:"notverydefame";i:4703;s:9:"notdefeat";i:4704;s:13:"notverydefeat";i:4705;s:9:"notdefect";i:4706;s:13:"notverydefect";i:4707;s:11:"notdefiance";i:4708;s:15:"notverydefiance";i:4709;s:12:"notdefiantly";i:4710;s:16:"notverydefiantly";i:4711;s:13:"notdeficiency";i:4712;s:17:"notverydeficiency";i:4713;s:9:"notdefile";i:4714;s:13:"notverydefile";i:4715;s:10:"notdefiler";i:4716;s:14:"notverydefiler";i:4717;s:9:"notdeform";i:4718;s:13:"notverydeform";i:4719;s:11:"notdeformed";i:4720;s:15:"notverydeformed";i:4721;s:13:"notdefrauding";i:4722;s:17:"notverydefrauding";i:4723;s:10:"notdefunct";i:4724;s:14:"notverydefunct";i:4725;s:7:"notdefy";i:4726;s:11:"notverydefy";i:4727;s:13:"notdegenerate";i:4728;s:17:"notverydegenerate";i:4729;s:15:"notdegenerately";i:4730;s:19:"notverydegenerately";i:4731;s:15:"notdegeneration";i:4732;s:19:"notverydegeneration";i:4733;s:14:"notdegradation";i:4734;s:18:"notverydegradation";i:4735;s:10:"notdegrade";i:4736;s:14:"notverydegrade";i:4737;s:12:"notdegrading";i:4738;s:16:"notverydegrading";i:4739;s:14:"notdegradingly";i:4740;s:18:"notverydegradingly";i:4741;s:17:"notdehumanization";i:4742;s:21:"notverydehumanization";i:4743;s:13:"notdehumanize";i:4744;s:17:"notverydehumanize";i:4745;s:8:"notdeign";i:4746;s:12:"notverydeign";i:4747;s:9:"notdeject";i:4748;s:13:"notverydeject";i:4749;s:13:"notdejectedly";i:4750;s:17:"notverydejectedly";i:4751;s:12:"notdejection";i:4752;s:16:"notverydejection";i:4753;s:14:"notdelinquency";i:4754;s:18:"notverydelinquency";i:4755;s:13:"notdelinquent";i:4756;s:17:"notverydelinquent";i:4757;s:12:"notdelirious";i:4758;s:16:"notverydelirious";i:4759;s:11:"notdelirium";i:4760;s:15:"notverydelirium";i:4761;s:9:"notdelude";i:4762;s:13:"notverydelude";i:4763;s:9:"notdeluge";i:4764;s:13:"notverydeluge";i:4765;s:11:"notdelusion";i:4766;s:15:"notverydelusion";i:4767;s:13:"notdelusional";i:4768;s:17:"notverydelusional";i:4769;s:12:"notdelusions";i:4770;s:16:"notverydelusions";i:4771;s:9:"notdemand";i:4772;s:13:"notverydemand";i:4773;s:10:"notdemands";i:4774;s:14:"notverydemands";i:4775;s:9:"notdemean";i:4776;s:13:"notverydemean";i:4777;s:12:"notdemeaning";i:4778;s:16:"notverydemeaning";i:4779;s:9:"notdemise";i:4780;s:13:"notverydemise";i:4781;s:11:"notdemolish";i:4782;s:15:"notverydemolish";i:4783;s:13:"notdemolisher";i:4784;s:17:"notverydemolisher";i:4785;s:8:"notdemon";i:4786;s:12:"notverydemon";i:4787;s:10:"notdemonic";i:4788;s:14:"notverydemonic";i:4789;s:11:"notdemonize";i:4790;s:15:"notverydemonize";i:4791;s:13:"notdemoralize";i:4792;s:17:"notverydemoralize";i:4793;s:15:"notdemoralizing";i:4794;s:19:"notverydemoralizing";i:4795;s:17:"notdemoralizingly";i:4796;s:21:"notverydemoralizingly";i:4797;s:9:"notdenial";i:4798;s:13:"notverydenial";i:4799;s:12:"notdenigrate";i:4800;s:16:"notverydenigrate";i:4801;s:7:"notdeny";i:4802;s:11:"notverydeny";i:4803;s:11:"notdenounce";i:4804;s:15:"notverydenounce";i:4805;s:13:"notdenunciate";i:4806;s:17:"notverydenunciate";i:4807;s:15:"notdenunciation";i:4808;s:19:"notverydenunciation";i:4809;s:16:"notdenunciations";i:4810;s:20:"notverydenunciations";i:4811;s:10:"notdeplete";i:4812;s:14:"notverydeplete";i:4813;s:13:"notdeplorable";i:4814;s:17:"notverydeplorable";i:4815;s:13:"notdeplorably";i:4816;s:17:"notverydeplorably";i:4817;s:10:"notdeplore";i:4818;s:14:"notverydeplore";i:4819;s:12:"notdeploring";i:4820;s:16:"notverydeploring";i:4821;s:14:"notdeploringly";i:4822;s:18:"notverydeploringly";i:4823;s:10:"notdeprave";i:4824;s:14:"notverydeprave";i:4825;s:13:"notdepravedly";i:4826;s:17:"notverydepravedly";i:4827;s:12:"notdeprecate";i:4828;s:16:"notverydeprecate";i:4829;s:10:"notdepress";i:4830;s:14:"notverydepress";i:4831;s:13:"notdepressing";i:4832;s:17:"notverydepressing";i:4833;s:15:"notdepressingly";i:4834;s:19:"notverydepressingly";i:4835;s:13:"notdepression";i:4836;s:17:"notverydepression";i:4837;s:10:"notdeprive";i:4838;s:14:"notverydeprive";i:4839;s:9:"notderide";i:4840;s:13:"notveryderide";i:4841;s:11:"notderision";i:4842;s:15:"notveryderision";i:4843;s:11:"notderisive";i:4844;s:15:"notveryderisive";i:4845;s:13:"notderisively";i:4846;s:17:"notveryderisively";i:4847;s:15:"notderisiveness";i:4848;s:19:"notveryderisiveness";i:4849;s:13:"notderogatory";i:4850;s:17:"notveryderogatory";i:4851;s:12:"notdesecrate";i:4852;s:16:"notverydesecrate";i:4853;s:9:"notdesert";i:4854;s:13:"notverydesert";i:4855;s:12:"notdesertion";i:4856;s:16:"notverydesertion";i:4857;s:12:"notdesiccate";i:4858;s:16:"notverydesiccate";i:4859;s:13:"notdesiccated";i:4860;s:17:"notverydesiccated";i:4861;s:13:"notdesolately";i:4862;s:17:"notverydesolately";i:4863;s:13:"notdesolation";i:4864;s:17:"notverydesolation";i:4865;s:15:"notdespairingly";i:4866;s:19:"notverydespairingly";i:4867;s:14:"notdesperately";i:4868;s:18:"notverydesperately";i:4869;s:14:"notdesperation";i:4870;s:18:"notverydesperation";i:4871;s:13:"notdespicably";i:4872;s:17:"notverydespicably";i:4873;s:10:"notdespise";i:4874;s:14:"notverydespise";i:4875;s:10:"notdespoil";i:4876;s:14:"notverydespoil";i:4877;s:12:"notdespoiler";i:4878;s:16:"notverydespoiler";i:4879;s:14:"notdespondence";i:4880;s:18:"notverydespondence";i:4881;s:14:"notdespondency";i:4882;s:18:"notverydespondency";i:4883;s:13:"notdespondent";i:4884;s:17:"notverydespondent";i:4885;s:15:"notdespondently";i:4886;s:19:"notverydespondently";i:4887;s:9:"notdespot";i:4888;s:13:"notverydespot";i:4889;s:11:"notdespotic";i:4890;s:15:"notverydespotic";i:4891;s:12:"notdespotism";i:4892;s:16:"notverydespotism";i:4893;s:18:"notdestabilisation";i:4894;s:22:"notverydestabilisation";i:4895;s:12:"notdestitute";i:4896;s:16:"notverydestitute";i:4897;s:14:"notdestitution";i:4898;s:18:"notverydestitution";i:4899;s:10:"notdestroy";i:4900;s:14:"notverydestroy";i:4901;s:12:"notdestroyer";i:4902;s:16:"notverydestroyer";i:4903;s:14:"notdestruction";i:4904;s:18:"notverydestruction";i:4905;s:12:"notdesultory";i:4906;s:16:"notverydesultory";i:4907;s:8:"notdeter";i:4908;s:12:"notverydeter";i:4909;s:14:"notdeteriorate";i:4910;s:18:"notverydeteriorate";i:4911;s:16:"notdeteriorating";i:4912;s:20:"notverydeteriorating";i:4913;s:16:"notdeterioration";i:4914;s:20:"notverydeterioration";i:4915;s:12:"notdeterrent";i:4916;s:16:"notverydeterrent";i:4917;s:13:"notdetestably";i:4918;s:17:"notverydetestably";i:4919;s:10:"notdetract";i:4920;s:14:"notverydetract";i:4921;s:13:"notdetraction";i:4922;s:17:"notverydetraction";i:4923;s:12:"notdetriment";i:4924;s:16:"notverydetriment";i:4925;s:14:"notdetrimental";i:4926;s:18:"notverydetrimental";i:4927;s:12:"notdevastate";i:4928;s:16:"notverydevastate";i:4929;s:14:"notdevastating";i:4930;s:18:"notverydevastating";i:4931;s:16:"notdevastatingly";i:4932;s:20:"notverydevastatingly";i:4933;s:14:"notdevastation";i:4934;s:18:"notverydevastation";i:4935;s:10:"notdeviate";i:4936;s:14:"notverydeviate";i:4937;s:12:"notdeviation";i:4938;s:16:"notverydeviation";i:4939;s:8:"notdevil";i:4940;s:12:"notverydevil";i:4941;s:11:"notdevilish";i:4942;s:15:"notverydevilish";i:4943;s:13:"notdevilishly";i:4944;s:17:"notverydevilishly";i:4945;s:12:"notdevilment";i:4946;s:16:"notverydevilment";i:4947;s:10:"notdevilry";i:4948;s:14:"notverydevilry";i:4949;s:10:"notdevious";i:4950;s:14:"notverydevious";i:4951;s:12:"notdeviously";i:4952;s:16:"notverydeviously";i:4953;s:14:"notdeviousness";i:4954;s:18:"notverydeviousness";i:4955;s:11:"notdiabolic";i:4956;s:15:"notverydiabolic";i:4957;s:13:"notdiabolical";i:4958;s:17:"notverydiabolical";i:4959;s:15:"notdiabolically";i:4960;s:19:"notverydiabolically";i:4961;s:16:"notdiametrically";i:4962;s:20:"notverydiametrically";i:4963;s:11:"notdiatribe";i:4964;s:15:"notverydiatribe";i:4965;s:12:"notdiatribes";i:4966;s:16:"notverydiatribes";i:4967;s:11:"notdictator";i:4968;s:15:"notverydictator";i:4969;s:14:"notdictatorial";i:4970;s:18:"notverydictatorial";i:4971;s:9:"notdiffer";i:4972;s:13:"notverydiffer";i:4973;s:15:"notdifficulties";i:4974;s:19:"notverydifficulties";i:4975;s:13:"notdifficulty";i:4976;s:17:"notverydifficulty";i:4977;s:13:"notdiffidence";i:4978;s:17:"notverydiffidence";i:4979;s:6:"notdig";i:4980;s:10:"notverydig";i:4981;s:10:"notdigress";i:4982;s:14:"notverydigress";i:4983;s:14:"notdilapidated";i:4984;s:18:"notverydilapidated";i:4985;s:10:"notdilemma";i:4986;s:14:"notverydilemma";i:4987;s:14:"notdilly-dally";i:4988;s:18:"notverydilly-dally";i:4989;s:6:"notdim";i:4990;s:10:"notverydim";i:4991;s:11:"notdiminish";i:4992;s:15:"notverydiminish";i:4993;s:14:"notdiminishing";i:4994;s:18:"notverydiminishing";i:4995;s:6:"notdin";i:4996;s:10:"notverydin";i:4997;s:8:"notdinky";i:4998;s:12:"notverydinky";i:4999;s:7:"notdire";i:5000;s:11:"notverydire";i:5001;s:9:"notdirely";i:5002;s:13:"notverydirely";i:5003;s:11:"notdireness";i:5004;s:15:"notverydireness";i:5005;s:7:"notdirt";i:5006;s:11:"notverydirt";i:5007;s:10:"notdisable";i:5008;s:14:"notverydisable";i:5009;s:12:"notdisaccord";i:5010;s:16:"notverydisaccord";i:5011;s:15:"notdisadvantage";i:5012;s:19:"notverydisadvantage";i:5013;s:16:"notdisadvantaged";i:5014;s:20:"notverydisadvantaged";i:5015;s:18:"notdisadvantageous";i:5016;s:22:"notverydisadvantageous";i:5017;s:12:"notdisaffect";i:5018;s:16:"notverydisaffect";i:5019;s:14:"notdisaffected";i:5020;s:18:"notverydisaffected";i:5021;s:12:"notdisaffirm";i:5022;s:16:"notverydisaffirm";i:5023;s:11:"notdisagree";i:5024;s:15:"notverydisagree";i:5025;s:15:"notdisagreeably";i:5026;s:19:"notverydisagreeably";i:5027;s:15:"notdisagreement";i:5028;s:19:"notverydisagreement";i:5029;s:11:"notdisallow";i:5030;s:15:"notverydisallow";i:5031;s:13:"notdisappoint";i:5032;s:17:"notverydisappoint";i:5033;s:18:"notdisappointingly";i:5034;s:22:"notverydisappointingly";i:5035;s:17:"notdisappointment";i:5036;s:21:"notverydisappointment";i:5037;s:17:"notdisapprobation";i:5038;s:21:"notverydisapprobation";i:5039;s:14:"notdisapproval";i:5040;s:18:"notverydisapproval";i:5041;s:13:"notdisapprove";i:5042;s:17:"notverydisapprove";i:5043;s:15:"notdisapproving";i:5044;s:19:"notverydisapproving";i:5045;s:9:"notdisarm";i:5046;s:13:"notverydisarm";i:5047;s:11:"notdisarray";i:5048;s:15:"notverydisarray";i:5049;s:11:"notdisaster";i:5050;s:15:"notverydisaster";i:5051;s:13:"notdisastrous";i:5052;s:17:"notverydisastrous";i:5053;s:15:"notdisastrously";i:5054;s:19:"notverydisastrously";i:5055;s:10:"notdisavow";i:5056;s:14:"notverydisavow";i:5057;s:12:"notdisavowal";i:5058;s:16:"notverydisavowal";i:5059;s:12:"notdisbelief";i:5060;s:16:"notverydisbelief";i:5061;s:13:"notdisbelieve";i:5062;s:17:"notverydisbelieve";i:5063;s:14:"notdisbeliever";i:5064;s:18:"notverydisbeliever";i:5065;s:11:"notdisclaim";i:5066;s:15:"notverydisclaim";i:5067;s:17:"notdiscombobulate";i:5068;s:21:"notverydiscombobulate";i:5069;s:12:"notdiscomfit";i:5070;s:16:"notverydiscomfit";i:5071;s:17:"notdiscomfititure";i:5072;s:21:"notverydiscomfititure";i:5073;s:13:"notdiscomfort";i:5074;s:17:"notverydiscomfort";i:5075;s:13:"notdiscompose";i:5076;s:17:"notverydiscompose";i:5077;s:13:"notdisconcert";i:5078;s:17:"notverydisconcert";i:5079;s:15:"notdisconcerted";i:5080;s:19:"notverydisconcerted";i:5081;s:16:"notdisconcerting";i:5082;s:20:"notverydisconcerting";i:5083;s:18:"notdisconcertingly";i:5084;s:22:"notverydisconcertingly";i:5085;s:15:"notdisconsolate";i:5086;s:19:"notverydisconsolate";i:5087;s:17:"notdisconsolately";i:5088;s:21:"notverydisconsolately";i:5089;s:17:"notdisconsolation";i:5090;s:21:"notverydisconsolation";i:5091;s:15:"notdiscontented";i:5092;s:19:"notverydiscontented";i:5093;s:17:"notdiscontentedly";i:5094;s:21:"notverydiscontentedly";i:5095;s:16:"notdiscontinuity";i:5096;s:20:"notverydiscontinuity";i:5097;s:10:"notdiscord";i:5098;s:14:"notverydiscord";i:5099;s:14:"notdiscordance";i:5100;s:18:"notverydiscordance";i:5101;s:13:"notdiscordant";i:5102;s:17:"notverydiscordant";i:5103;s:17:"notdiscountenance";i:5104;s:21:"notverydiscountenance";i:5105;s:13:"notdiscourage";i:5106;s:17:"notverydiscourage";i:5107;s:17:"notdiscouragement";i:5108;s:21:"notverydiscouragement";i:5109;s:15:"notdiscouraging";i:5110;s:19:"notverydiscouraging";i:5111;s:17:"notdiscouragingly";i:5112;s:21:"notverydiscouragingly";i:5113;s:15:"notdiscourteous";i:5114;s:19:"notverydiscourteous";i:5115;s:17:"notdiscourteously";i:5116;s:21:"notverydiscourteously";i:5117;s:12:"notdiscredit";i:5118;s:16:"notverydiscredit";i:5119;s:13:"notdiscrepant";i:5120;s:17:"notverydiscrepant";i:5121;s:15:"notdiscriminate";i:5122;s:19:"notverydiscriminate";i:5123;s:17:"notdiscrimination";i:5124;s:21:"notverydiscrimination";i:5125;s:17:"notdiscriminatory";i:5126;s:21:"notverydiscriminatory";i:5127;s:15:"notdisdainfully";i:5128;s:19:"notverydisdainfully";i:5129;s:10:"notdisease";i:5130;s:14:"notverydisease";i:5131;s:11:"notdiseased";i:5132;s:15:"notverydiseased";i:5133;s:11:"notdisfavor";i:5134;s:15:"notverydisfavor";i:5135;s:11:"notdisgrace";i:5136;s:15:"notverydisgrace";i:5137;s:14:"notdisgraceful";i:5138;s:18:"notverydisgraceful";i:5139;s:16:"notdisgracefully";i:5140;s:20:"notverydisgracefully";i:5141;s:13:"notdisgruntle";i:5142;s:17:"notverydisgruntle";i:5143;s:14:"notdisgustedly";i:5144;s:18:"notverydisgustedly";i:5145;s:13:"notdisgustful";i:5146;s:17:"notverydisgustful";i:5147;s:15:"notdisgustfully";i:5148;s:19:"notverydisgustfully";i:5149;s:13:"notdisgusting";i:5150;s:17:"notverydisgusting";i:5151;s:15:"notdisgustingly";i:5152;s:19:"notverydisgustingly";i:5153;s:13:"notdishearten";i:5154;s:17:"notverydishearten";i:5155;s:16:"notdisheartening";i:5156;s:20:"notverydisheartening";i:5157;s:18:"notdishearteningly";i:5158;s:22:"notverydishearteningly";i:5159;s:14:"notdishonestly";i:5160;s:18:"notverydishonestly";i:5161;s:13:"notdishonesty";i:5162;s:17:"notverydishonesty";i:5163;s:11:"notdishonor";i:5164;s:15:"notverydishonor";i:5165;s:17:"notdishonorablely";i:5166;s:21:"notverydishonorablely";i:5167;s:14:"notdisillusion";i:5168;s:18:"notverydisillusion";i:5169;s:17:"notdisinclination";i:5170;s:21:"notverydisinclination";i:5171;s:14:"notdisinclined";i:5172;s:18:"notverydisinclined";i:5173;s:15:"notdisingenuous";i:5174;s:19:"notverydisingenuous";i:5175;s:17:"notdisingenuously";i:5176;s:21:"notverydisingenuously";i:5177;s:15:"notdisintegrate";i:5178;s:19:"notverydisintegrate";i:5179;s:16:"notdisinterested";i:5180;s:20:"notverydisinterested";i:5181;s:17:"notdisintegration";i:5182;s:21:"notverydisintegration";i:5183;s:14:"notdisinterest";i:5184;s:18:"notverydisinterest";i:5185;s:13:"notdislocated";i:5186;s:17:"notverydislocated";i:5187;s:11:"notdisloyal";i:5188;s:15:"notverydisloyal";i:5189;s:13:"notdisloyalty";i:5190;s:17:"notverydisloyalty";i:5191;s:11:"notdismally";i:5192;s:15:"notverydismally";i:5193;s:13:"notdismalness";i:5194;s:17:"notverydismalness";i:5195;s:9:"notdismay";i:5196;s:13:"notverydismay";i:5197;s:12:"notdismaying";i:5198;s:16:"notverydismaying";i:5199;s:14:"notdismayingly";i:5200;s:18:"notverydismayingly";i:5201;s:13:"notdismissive";i:5202;s:17:"notverydismissive";i:5203;s:15:"notdismissively";i:5204;s:19:"notverydismissively";i:5205;s:15:"notdisobedience";i:5206;s:19:"notverydisobedience";i:5207;s:14:"notdisobedient";i:5208;s:18:"notverydisobedient";i:5209;s:10:"notdisobey";i:5210;s:14:"notverydisobey";i:5211;s:9:"notdisown";i:5212;s:13:"notverydisown";i:5213;s:11:"notdisorder";i:5214;s:15:"notverydisorder";i:5215;s:13:"notdisordered";i:5216;s:17:"notverydisordered";i:5217;s:13:"notdisorderly";i:5218;s:17:"notverydisorderly";i:5219;s:12:"notdisorient";i:5220;s:16:"notverydisorient";i:5221;s:12:"notdisparage";i:5222;s:16:"notverydisparage";i:5223;s:14:"notdisparaging";i:5224;s:18:"notverydisparaging";i:5225;s:16:"notdisparagingly";i:5226;s:20:"notverydisparagingly";i:5227;s:14:"notdispensable";i:5228;s:18:"notverydispensable";i:5229;s:11:"notdispirit";i:5230;s:15:"notverydispirit";i:5231;s:13:"notdispirited";i:5232;s:17:"notverydispirited";i:5233;s:15:"notdispiritedly";i:5234;s:19:"notverydispiritedly";i:5235;s:14:"notdispiriting";i:5236;s:18:"notverydispiriting";i:5237;s:11:"notdisplace";i:5238;s:15:"notverydisplace";i:5239;s:12:"notdisplaced";i:5240;s:16:"notverydisplaced";i:5241;s:12:"notdisplease";i:5242;s:16:"notverydisplease";i:5243;s:14:"notdispleasing";i:5244;s:18:"notverydispleasing";i:5245;s:14:"notdispleasure";i:5246;s:18:"notverydispleasure";i:5247;s:19:"notdisproportionate";i:5248;s:23:"notverydisproportionate";i:5249;s:11:"notdisprove";i:5250;s:15:"notverydisprove";i:5251;s:13:"notdisputable";i:5252;s:17:"notverydisputable";i:5253;s:10:"notdispute";i:5254;s:14:"notverydispute";i:5255;s:11:"notdisputed";i:5256;s:15:"notverydisputed";i:5257;s:11:"notdisquiet";i:5258;s:15:"notverydisquiet";i:5259;s:14:"notdisquieting";i:5260;s:18:"notverydisquieting";i:5261;s:16:"notdisquietingly";i:5262;s:20:"notverydisquietingly";i:5263;s:14:"notdisquietude";i:5264;s:18:"notverydisquietude";i:5265;s:12:"notdisregard";i:5266;s:16:"notverydisregard";i:5267;s:15:"notdisregardful";i:5268;s:19:"notverydisregardful";i:5269;s:15:"notdisreputable";i:5270;s:19:"notverydisreputable";i:5271;s:12:"notdisrepute";i:5272;s:16:"notverydisrepute";i:5273;s:13:"notdisrespect";i:5274;s:17:"notverydisrespect";i:5275;s:17:"notdisrespectable";i:5276;s:21:"notverydisrespectable";i:5277;s:19:"notdisrespectablity";i:5278;s:23:"notverydisrespectablity";i:5279;s:16:"notdisrespectful";i:5280;s:20:"notverydisrespectful";i:5281;s:18:"notdisrespectfully";i:5282;s:22:"notverydisrespectfully";i:5283;s:20:"notdisrespectfulness";i:5284;s:24:"notverydisrespectfulness";i:5285;s:16:"notdisrespecting";i:5286;s:20:"notverydisrespecting";i:5287;s:10:"notdisrupt";i:5288;s:14:"notverydisrupt";i:5289;s:13:"notdisruption";i:5290;s:17:"notverydisruption";i:5291;s:13:"notdisruptive";i:5292;s:17:"notverydisruptive";i:5293;s:18:"notdissatisfaction";i:5294;s:22:"notverydissatisfaction";i:5295;s:18:"notdissatisfactory";i:5296;s:22:"notverydissatisfactory";i:5297;s:13:"notdissatisfy";i:5298;s:17:"notverydissatisfy";i:5299;s:16:"notdissatisfying";i:5300;s:20:"notverydissatisfying";i:5301;s:12:"notdissemble";i:5302;s:16:"notverydissemble";i:5303;s:13:"notdissembler";i:5304;s:17:"notverydissembler";i:5305;s:13:"notdissension";i:5306;s:17:"notverydissension";i:5307;s:10:"notdissent";i:5308;s:14:"notverydissent";i:5309;s:12:"notdissenter";i:5310;s:16:"notverydissenter";i:5311;s:13:"notdissention";i:5312;s:17:"notverydissention";i:5313;s:13:"notdisservice";i:5314;s:17:"notverydisservice";i:5315;s:13:"notdissidence";i:5316;s:17:"notverydissidence";i:5317;s:12:"notdissident";i:5318;s:16:"notverydissident";i:5319;s:13:"notdissidents";i:5320;s:17:"notverydissidents";i:5321;s:12:"notdissocial";i:5322;s:16:"notverydissocial";i:5323;s:12:"notdissolute";i:5324;s:16:"notverydissolute";i:5325;s:14:"notdissolution";i:5326;s:18:"notverydissolution";i:5327;s:13:"notdissonance";i:5328;s:17:"notverydissonance";i:5329;s:12:"notdissonant";i:5330;s:16:"notverydissonant";i:5331;s:14:"notdissonantly";i:5332;s:18:"notverydissonantly";i:5333;s:11:"notdissuade";i:5334;s:15:"notverydissuade";i:5335;s:13:"notdissuasive";i:5336;s:17:"notverydissuasive";i:5337;s:11:"notdistaste";i:5338;s:15:"notverydistaste";i:5339;s:14:"notdistasteful";i:5340;s:18:"notverydistasteful";i:5341;s:16:"notdistastefully";i:5342;s:20:"notverydistastefully";i:5343;s:10:"notdistort";i:5344;s:14:"notverydistort";i:5345;s:13:"notdistortion";i:5346;s:17:"notverydistortion";i:5347;s:11:"notdistract";i:5348;s:15:"notverydistract";i:5349;s:14:"notdistracting";i:5350;s:18:"notverydistracting";i:5351;s:14:"notdistraction";i:5352;s:18:"notverydistraction";i:5353;s:15:"notdistraughtly";i:5354;s:19:"notverydistraughtly";i:5355;s:17:"notdistraughtness";i:5356;s:21:"notverydistraughtness";i:5357;s:11:"notdistress";i:5358;s:15:"notverydistress";i:5359;s:14:"notdistressing";i:5360;s:18:"notverydistressing";i:5361;s:16:"notdistressingly";i:5362;s:20:"notverydistressingly";i:5363;s:11:"notdistrust";i:5364;s:15:"notverydistrust";i:5365;s:14:"notdistrustful";i:5366;s:18:"notverydistrustful";i:5367;s:14:"notdistrusting";i:5368;s:18:"notverydistrusting";i:5369;s:10:"notdisturb";i:5370;s:14:"notverydisturb";i:5371;s:16:"notdisturbed-let";i:5372;s:20:"notverydisturbed-let";i:5373;s:13:"notdisturbing";i:5374;s:17:"notverydisturbing";i:5375;s:15:"notdisturbingly";i:5376;s:19:"notverydisturbingly";i:5377;s:11:"notdisunity";i:5378;s:15:"notverydisunity";i:5379;s:11:"notdisvalue";i:5380;s:15:"notverydisvalue";i:5381;s:12:"notdivergent";i:5382;s:16:"notverydivergent";i:5383;s:9:"notdivide";i:5384;s:13:"notverydivide";i:5385;s:10:"notdivided";i:5386;s:14:"notverydivided";i:5387;s:11:"notdivision";i:5388;s:15:"notverydivision";i:5389;s:11:"notdivisive";i:5390;s:15:"notverydivisive";i:5391;s:13:"notdivisively";i:5392;s:17:"notverydivisively";i:5393;s:15:"notdivisiveness";i:5394;s:19:"notverydivisiveness";i:5395;s:10:"notdivorce";i:5396;s:14:"notverydivorce";i:5397;s:11:"notdivorced";i:5398;s:15:"notverydivorced";i:5399;s:10:"notdizzing";i:5400;s:14:"notverydizzing";i:5401;s:12:"notdizzingly";i:5402;s:16:"notverydizzingly";i:5403;s:12:"notdoddering";i:5404;s:16:"notverydoddering";i:5405;s:9:"notdodgey";i:5406;s:13:"notverydodgey";i:5407;s:9:"notdogged";i:5408;s:13:"notverydogged";i:5409;s:11:"notdoggedly";i:5410;s:15:"notverydoggedly";i:5411;s:11:"notdogmatic";i:5412;s:15:"notverydogmatic";i:5413;s:11:"notdoldrums";i:5414;s:15:"notverydoldrums";i:5415;s:12:"notdominance";i:5416;s:16:"notverydominance";i:5417;s:11:"notdominate";i:5418;s:15:"notverydominate";i:5419;s:13:"notdomination";i:5420;s:17:"notverydomination";i:5421;s:11:"notdomineer";i:5422;s:15:"notverydomineer";i:5423;s:14:"notdomineering";i:5424;s:18:"notverydomineering";i:5425;s:7:"notdoom";i:5426;s:11:"notverydoom";i:5427;s:11:"notdoomsday";i:5428;s:15:"notverydoomsday";i:5429;s:7:"notdope";i:5430;s:11:"notverydope";i:5431;s:8:"notdoubt";i:5432;s:12:"notverydoubt";i:5433;s:13:"notdoubtfully";i:5434;s:17:"notverydoubtfully";i:5435;s:9:"notdoubts";i:5436;s:13:"notverydoubts";i:5437;s:11:"notdownbeat";i:5438;s:15:"notverydownbeat";i:5439;s:11:"notdowncast";i:5440;s:15:"notverydowncast";i:5441;s:9:"notdowner";i:5442;s:13:"notverydowner";i:5443;s:11:"notdownfall";i:5444;s:15:"notverydownfall";i:5445;s:13:"notdownfallen";i:5446;s:17:"notverydownfallen";i:5447;s:12:"notdowngrade";i:5448;s:16:"notverydowngrade";i:5449;s:16:"notdownheartedly";i:5450;s:20:"notverydownheartedly";i:5451;s:11:"notdownside";i:5452;s:15:"notverydownside";i:5453;s:7:"notdrab";i:5454;s:11:"notverydrab";i:5455;s:12:"notdraconian";i:5456;s:16:"notverydraconian";i:5457;s:11:"notdraconic";i:5458;s:15:"notverydraconic";i:5459;s:9:"notdragon";i:5460;s:13:"notverydragon";i:5461;s:10:"notdragons";i:5462;s:14:"notverydragons";i:5463;s:10:"notdragoon";i:5464;s:14:"notverydragoon";i:5465;s:8:"notdrain";i:5466;s:12:"notverydrain";i:5467;s:8:"notdrama";i:5468;s:12:"notverydrama";i:5469;s:10:"notdrastic";i:5470;s:14:"notverydrastic";i:5471;s:14:"notdrastically";i:5472;s:18:"notverydrastically";i:5473;s:13:"notdreadfully";i:5474;s:17:"notverydreadfully";i:5475;s:15:"notdreadfulness";i:5476;s:19:"notverydreadfulness";i:5477;s:9:"notdrones";i:5478;s:13:"notverydrones";i:5479;s:8:"notdroop";i:5480;s:12:"notverydroop";i:5481;s:10:"notdrought";i:5482;s:14:"notverydrought";i:5483;s:11:"notdrowning";i:5484;s:15:"notverydrowning";i:5485;s:11:"notdrunkard";i:5486;s:15:"notverydrunkard";i:5487;s:10:"notdrunken";i:5488;s:14:"notverydrunken";i:5489;s:10:"notdubious";i:5490;s:14:"notverydubious";i:5491;s:12:"notdubiously";i:5492;s:16:"notverydubiously";i:5493;s:12:"notdubitable";i:5494;s:16:"notverydubitable";i:5495;s:6:"notdud";i:5496;s:10:"notverydud";i:5497;s:7:"notdull";i:5498;s:11:"notverydull";i:5499;s:10:"notdullard";i:5500;s:14:"notverydullard";i:5501;s:12:"notdumbfound";i:5502;s:16:"notverydumbfound";i:5503;s:14:"notdumbfounded";i:5504;s:18:"notverydumbfounded";i:5505;s:8:"notdummy";i:5506;s:12:"notverydummy";i:5507;s:7:"notdump";i:5508;s:11:"notverydump";i:5509;s:8:"notdunce";i:5510;s:12:"notverydunce";i:5511;s:10:"notdungeon";i:5512;s:14:"notverydungeon";i:5513;s:11:"notdungeons";i:5514;s:15:"notverydungeons";i:5515;s:7:"notdupe";i:5516;s:11:"notverydupe";i:5517;s:8:"notdusty";i:5518;s:12:"notverydusty";i:5519;s:10:"notdwindle";i:5520;s:14:"notverydwindle";i:5521;s:12:"notdwindling";i:5522;s:16:"notverydwindling";i:5523;s:8:"notdying";i:5524;s:12:"notverydying";i:5525;s:15:"notearsplitting";i:5526;s:19:"notveryearsplitting";i:5527;s:12:"noteccentric";i:5528;s:16:"notveryeccentric";i:5529;s:15:"noteccentricity";i:5530;s:19:"notveryeccentricity";i:5531;s:9:"noteffigy";i:5532;s:13:"notveryeffigy";i:5533;s:13:"noteffrontery";i:5534;s:17:"notveryeffrontery";i:5535;s:6:"notego";i:5536;s:10:"notveryego";i:5537;s:11:"notegomania";i:5538;s:15:"notveryegomania";i:5539;s:10:"notegotism";i:5540;s:14:"notveryegotism";i:5541;s:16:"notegotistically";i:5542;s:20:"notveryegotistically";i:5543;s:12:"notegregious";i:5544;s:16:"notveryegregious";i:5545;s:14:"notegregiously";i:5546;s:18:"notveryegregiously";i:5547;s:12:"notejaculate";i:5548;s:16:"notveryejaculate";i:5549;s:18:"notelection-rigger";i:5550;s:22:"notveryelection-rigger";i:5551;s:12:"noteliminate";i:5552;s:16:"notveryeliminate";i:5553;s:14:"notelimination";i:5554;s:18:"notveryelimination";i:5555;s:12:"notemaciated";i:5556;s:16:"notveryemaciated";i:5557;s:13:"notemasculate";i:5558;s:17:"notveryemasculate";i:5559;s:12:"notembarrass";i:5560;s:16:"notveryembarrass";i:5561;s:15:"notembarrassing";i:5562;s:19:"notveryembarrassing";i:5563;s:17:"notembarrassingly";i:5564;s:21:"notveryembarrassingly";i:5565;s:16:"notembarrassment";i:5566;s:20:"notveryembarrassment";i:5567;s:12:"notembattled";i:5568;s:16:"notveryembattled";i:5569;s:10:"notembroil";i:5570;s:14:"notveryembroil";i:5571;s:12:"notembroiled";i:5572;s:16:"notveryembroiled";i:5573;s:14:"notembroilment";i:5574;s:18:"notveryembroilment";i:5575;s:12:"notempathize";i:5576;s:16:"notveryempathize";i:5577;s:10:"notempathy";i:5578;s:14:"notveryempathy";i:5579;s:11:"notemphatic";i:5580;s:15:"notveryemphatic";i:5581;s:15:"notemphatically";i:5582;s:19:"notveryemphatically";i:5583;s:12:"notemptiness";i:5584;s:16:"notveryemptiness";i:5585;s:11:"notencroach";i:5586;s:15:"notveryencroach";i:5587;s:15:"notencroachment";i:5588;s:19:"notveryencroachment";i:5589;s:11:"notendanger";i:5590;s:15:"notveryendanger";i:5591;s:10:"notendless";i:5592;s:14:"notveryendless";i:5593;s:10:"notenemies";i:5594;s:14:"notveryenemies";i:5595;s:8:"notenemy";i:5596;s:12:"notveryenemy";i:5597;s:11:"notenervate";i:5598;s:15:"notveryenervate";i:5599;s:11:"notenfeeble";i:5600;s:15:"notveryenfeeble";i:5601;s:10:"notenflame";i:5602;s:14:"notveryenflame";i:5603;s:9:"notengulf";i:5604;s:13:"notveryengulf";i:5605;s:9:"notenjoin";i:5606;s:13:"notveryenjoin";i:5607;s:9:"notenmity";i:5608;s:13:"notveryenmity";i:5609;s:13:"notenormities";i:5610;s:17:"notveryenormities";i:5611;s:11:"notenormity";i:5612;s:15:"notveryenormity";i:5613;s:11:"notenormous";i:5614;s:15:"notveryenormous";i:5615;s:13:"notenormously";i:5616;s:17:"notveryenormously";i:5617;s:9:"notenrage";i:5618;s:13:"notveryenrage";i:5619;s:10:"notenslave";i:5620;s:14:"notveryenslave";i:5621;s:11:"notentangle";i:5622;s:15:"notveryentangle";i:5623;s:15:"notentanglement";i:5624;s:19:"notveryentanglement";i:5625;s:9:"notentrap";i:5626;s:13:"notveryentrap";i:5627;s:13:"notentrapment";i:5628;s:17:"notveryentrapment";i:5629;s:10:"notenvious";i:5630;s:14:"notveryenvious";i:5631;s:12:"notenviously";i:5632;s:16:"notveryenviously";i:5633;s:14:"notenviousness";i:5634;s:18:"notveryenviousness";i:5635;s:7:"notenvy";i:5636;s:11:"notveryenvy";i:5637;s:11:"notepidemic";i:5638;s:15:"notveryepidemic";i:5639;s:12:"notequivocal";i:5640;s:16:"notveryequivocal";i:5641;s:12:"noteradicate";i:5642;s:16:"notveryeradicate";i:5643;s:8:"noterase";i:5644;s:12:"notveryerase";i:5645;s:8:"noterode";i:5646;s:12:"notveryerode";i:5647;s:10:"noterosion";i:5648;s:14:"notveryerosion";i:5649;s:6:"noterr";i:5650;s:10:"notveryerr";i:5651;s:9:"noterrant";i:5652;s:13:"notveryerrant";i:5653;s:10:"noterratic";i:5654;s:14:"notveryerratic";i:5655;s:14:"noterratically";i:5656;s:18:"notveryerratically";i:5657;s:12:"noterroneous";i:5658;s:16:"notveryerroneous";i:5659;s:14:"noterroneously";i:5660;s:18:"notveryerroneously";i:5661;s:8:"noterror";i:5662;s:12:"notveryerror";i:5663;s:11:"notescapade";i:5664;s:15:"notveryescapade";i:5665;s:9:"noteschew";i:5666;s:13:"notveryeschew";i:5667;s:11:"notesoteric";i:5668;s:15:"notveryesoteric";i:5669;s:12:"notestranged";i:5670;s:16:"notveryestranged";i:5671;s:10:"noteternal";i:5672;s:14:"notveryeternal";i:5673;s:8:"notevade";i:5674;s:12:"notveryevade";i:5675;s:10:"notevasion";i:5676;s:14:"notveryevasion";i:5677;s:7:"notevil";i:5678;s:11:"notveryevil";i:5679;s:11:"notevildoer";i:5680;s:15:"notveryevildoer";i:5681;s:8:"notevils";i:5682;s:12:"notveryevils";i:5683;s:13:"noteviscerate";i:5684;s:17:"notveryeviscerate";i:5685;s:13:"notexacerbate";i:5686;s:17:"notveryexacerbate";i:5687;s:11:"notexacting";i:5688;s:15:"notveryexacting";i:5689;s:13:"notexaggerate";i:5690;s:17:"notveryexaggerate";i:5691;s:15:"notexaggeration";i:5692;s:19:"notveryexaggeration";i:5693;s:13:"notexasperate";i:5694;s:17:"notveryexasperate";i:5695;s:15:"notexasperation";i:5696;s:19:"notveryexasperation";i:5697;s:15:"notexasperating";i:5698;s:19:"notveryexasperating";i:5699;s:17:"notexasperatingly";i:5700;s:21:"notveryexasperatingly";i:5701;s:14:"notexcessively";i:5702;s:18:"notveryexcessively";i:5703;s:10:"notexclaim";i:5704;s:14:"notveryexclaim";i:5705;s:10:"notexclude";i:5706;s:14:"notveryexclude";i:5707;s:12:"notexclusion";i:5708;s:16:"notveryexclusion";i:5709;s:12:"notexcoriate";i:5710;s:16:"notveryexcoriate";i:5711;s:15:"notexcruciating";i:5712;s:19:"notveryexcruciating";i:5713;s:17:"notexcruciatingly";i:5714;s:21:"notveryexcruciatingly";i:5715;s:9:"notexcuse";i:5716;s:13:"notveryexcuse";i:5717;s:10:"notexcuses";i:5718;s:14:"notveryexcuses";i:5719;s:11:"notexecrate";i:5720;s:15:"notveryexecrate";i:5721;s:10:"notexhaust";i:5722;s:14:"notveryexhaust";i:5723;s:13:"notexhaustion";i:5724;s:17:"notveryexhaustion";i:5725;s:9:"notexhort";i:5726;s:13:"notveryexhort";i:5727;s:8:"notexile";i:5728;s:12:"notveryexile";i:5729;s:13:"notexorbitant";i:5730;s:17:"notveryexorbitant";i:5731;s:17:"notexorbitantance";i:5732;s:21:"notveryexorbitantance";i:5733;s:15:"notexorbitantly";i:5734;s:19:"notveryexorbitantly";i:5735;s:12:"notexpedient";i:5736;s:16:"notveryexpedient";i:5737;s:15:"notexpediencies";i:5738;s:19:"notveryexpediencies";i:5739;s:8:"notexpel";i:5740;s:12:"notveryexpel";i:5741;s:12:"notexpensive";i:5742;s:16:"notveryexpensive";i:5743;s:9:"notexpire";i:5744;s:13:"notveryexpire";i:5745;s:10:"notexplode";i:5746;s:14:"notveryexplode";i:5747;s:10:"notexploit";i:5748;s:14:"notveryexploit";i:5749;s:15:"notexploitation";i:5750;s:19:"notveryexploitation";i:5751;s:9:"notexpose";i:5752;s:13:"notveryexpose";i:5753;s:10:"notexposed";i:5754;s:14:"notveryexposed";i:5755;s:12:"notexplosive";i:5756;s:16:"notveryexplosive";i:5757;s:14:"notexpropriate";i:5758;s:18:"notveryexpropriate";i:5759;s:16:"notexpropriation";i:5760;s:20:"notveryexpropriation";i:5761;s:10:"notexpulse";i:5762;s:14:"notveryexpulse";i:5763;s:10:"notexpunge";i:5764;s:14:"notveryexpunge";i:5765;s:14:"notexterminate";i:5766;s:18:"notveryexterminate";i:5767;s:16:"notextermination";i:5768;s:20:"notveryextermination";i:5769;s:13:"notextinguish";i:5770;s:17:"notveryextinguish";i:5771;s:9:"notextort";i:5772;s:13:"notveryextort";i:5773;s:12:"notextortion";i:5774;s:16:"notveryextortion";i:5775;s:13:"notextraneous";i:5776;s:17:"notveryextraneous";i:5777;s:15:"notextravagance";i:5778;s:19:"notveryextravagance";i:5779;s:14:"notextravagant";i:5780;s:18:"notveryextravagant";i:5781;s:16:"notextravagantly";i:5782;s:20:"notveryextravagantly";i:5783;s:10:"notextreme";i:5784;s:14:"notveryextreme";i:5785;s:12:"notextremely";i:5786;s:16:"notveryextremely";i:5787;s:12:"notextremism";i:5788;s:16:"notveryextremism";i:5789;s:12:"notextremist";i:5790;s:16:"notveryextremist";i:5791;s:13:"notextremists";i:5792;s:17:"notveryextremists";i:5793;s:12:"notfabricate";i:5794;s:16:"notveryfabricate";i:5795;s:14:"notfabrication";i:5796;s:18:"notveryfabrication";i:5797;s:12:"notfacetious";i:5798;s:16:"notveryfacetious";i:5799;s:14:"notfacetiously";i:5800;s:18:"notveryfacetiously";i:5801;s:9:"notfading";i:5802;s:13:"notveryfading";i:5803;s:7:"notfail";i:5804;s:11:"notveryfail";i:5805;s:10:"notfailing";i:5806;s:14:"notveryfailing";i:5807;s:10:"notfailure";i:5808;s:14:"notveryfailure";i:5809;s:11:"notfailures";i:5810;s:15:"notveryfailures";i:5811;s:8:"notfaint";i:5812;s:12:"notveryfaint";i:5813;s:15:"notfainthearted";i:5814;s:19:"notveryfainthearted";i:5815;s:12:"notfaithless";i:5816;s:16:"notveryfaithless";i:5817;s:7:"notfall";i:5818;s:11:"notveryfall";i:5819;s:12:"notfallacies";i:5820;s:16:"notveryfallacies";i:5821;s:13:"notfallacious";i:5822;s:17:"notveryfallacious";i:5823;s:15:"notfallaciously";i:5824;s:19:"notveryfallaciously";i:5825;s:17:"notfallaciousness";i:5826;s:21:"notveryfallaciousness";i:5827;s:10:"notfallacy";i:5828;s:14:"notveryfallacy";i:5829;s:10:"notfallout";i:5830;s:14:"notveryfallout";i:5831;s:12:"notfalsehood";i:5832;s:16:"notveryfalsehood";i:5833;s:10:"notfalsely";i:5834;s:14:"notveryfalsely";i:5835;s:10:"notfalsify";i:5836;s:14:"notveryfalsify";i:5837;s:9:"notfalter";i:5838;s:13:"notveryfalter";i:5839;s:9:"notfamine";i:5840;s:13:"notveryfamine";i:5841;s:11:"notfamished";i:5842;s:15:"notveryfamished";i:5843;s:10:"notfanatic";i:5844;s:14:"notveryfanatic";i:5845;s:12:"notfanatical";i:5846;s:16:"notveryfanatical";i:5847;s:14:"notfanatically";i:5848;s:18:"notveryfanatically";i:5849;s:13:"notfanaticism";i:5850;s:17:"notveryfanaticism";i:5851;s:11:"notfanatics";i:5852;s:15:"notveryfanatics";i:5853;s:11:"notfanciful";i:5854;s:15:"notveryfanciful";i:5855;s:14:"notfar-fetched";i:5856;s:18:"notveryfar-fetched";i:5857;s:13:"notfarfetched";i:5858;s:17:"notveryfarfetched";i:5859;s:8:"notfarce";i:5860;s:12:"notveryfarce";i:5861;s:11:"notfarcical";i:5862;s:15:"notveryfarcical";i:5863;s:27:"notfarcical-yet-provocative";i:5864;s:31:"notveryfarcical-yet-provocative";i:5865;s:13:"notfarcically";i:5866;s:17:"notveryfarcically";i:5867;s:10:"notfascism";i:5868;s:14:"notveryfascism";i:5869;s:10:"notfascist";i:5870;s:14:"notveryfascist";i:5871;s:13:"notfastidious";i:5872;s:17:"notveryfastidious";i:5873;s:15:"notfastidiously";i:5874;s:19:"notveryfastidiously";i:5875;s:11:"notfastuous";i:5876;s:15:"notveryfastuous";i:5877;s:6:"notfat";i:5878;s:10:"notveryfat";i:5879;s:8:"notfatal";i:5880;s:12:"notveryfatal";i:5881;s:13:"notfatalistic";i:5882;s:17:"notveryfatalistic";i:5883;s:17:"notfatalistically";i:5884;s:21:"notveryfatalistically";i:5885;s:10:"notfatally";i:5886;s:14:"notveryfatally";i:5887;s:10:"notfateful";i:5888;s:14:"notveryfateful";i:5889;s:12:"notfatefully";i:5890;s:16:"notveryfatefully";i:5891;s:13:"notfathomless";i:5892;s:17:"notveryfathomless";i:5893;s:10:"notfatigue";i:5894;s:14:"notveryfatigue";i:5895;s:8:"notfatty";i:5896;s:12:"notveryfatty";i:5897;s:10:"notfatuity";i:5898;s:14:"notveryfatuity";i:5899;s:10:"notfatuous";i:5900;s:14:"notveryfatuous";i:5901;s:12:"notfatuously";i:5902;s:16:"notveryfatuously";i:5903;s:8:"notfault";i:5904;s:12:"notveryfault";i:5905;s:9:"notfaulty";i:5906;s:13:"notveryfaulty";i:5907;s:12:"notfawningly";i:5908;s:16:"notveryfawningly";i:5909;s:7:"notfaze";i:5910;s:11:"notveryfaze";i:5911;s:12:"notfearfully";i:5912;s:16:"notveryfearfully";i:5913;s:8:"notfears";i:5914;s:12:"notveryfears";i:5915;s:11:"notfearsome";i:5916;s:15:"notveryfearsome";i:5917;s:11:"notfeckless";i:5918;s:15:"notveryfeckless";i:5919;s:9:"notfeeble";i:5920;s:13:"notveryfeeble";i:5921;s:11:"notfeeblely";i:5922;s:15:"notveryfeeblely";i:5923;s:15:"notfeebleminded";i:5924;s:19:"notveryfeebleminded";i:5925;s:8:"notfeign";i:5926;s:12:"notveryfeign";i:5927;s:8:"notfeint";i:5928;s:12:"notveryfeint";i:5929;s:7:"notfell";i:5930;s:11:"notveryfell";i:5931;s:8:"notfelon";i:5932;s:12:"notveryfelon";i:5933;s:12:"notfelonious";i:5934;s:16:"notveryfelonious";i:5935;s:12:"notferocious";i:5936;s:16:"notveryferocious";i:5937;s:14:"notferociously";i:5938;s:18:"notveryferociously";i:5939;s:11:"notferocity";i:5940;s:15:"notveryferocity";i:5941;s:11:"notfeverish";i:5942;s:15:"notveryfeverish";i:5943;s:8:"notfetid";i:5944;s:12:"notveryfetid";i:5945;s:8:"notfever";i:5946;s:12:"notveryfever";i:5947;s:9:"notfiasco";i:5948;s:13:"notveryfiasco";i:5949;s:7:"notfiat";i:5950;s:11:"notveryfiat";i:5951;s:6:"notfib";i:5952;s:10:"notveryfib";i:5953;s:9:"notfibber";i:5954;s:13:"notveryfibber";i:5955;s:9:"notfickle";i:5956;s:13:"notveryfickle";i:5957;s:10:"notfiction";i:5958;s:14:"notveryfiction";i:5959;s:12:"notfictional";i:5960;s:16:"notveryfictional";i:5961;s:13:"notfictitious";i:5962;s:17:"notveryfictitious";i:5963;s:9:"notfidget";i:5964;s:13:"notveryfidget";i:5965;s:10:"notfidgety";i:5966;s:14:"notveryfidgety";i:5967;s:8:"notfiend";i:5968;s:12:"notveryfiend";i:5969;s:11:"notfiendish";i:5970;s:15:"notveryfiendish";i:5971;s:9:"notfierce";i:5972;s:13:"notveryfierce";i:5973;s:8:"notfight";i:5974;s:12:"notveryfight";i:5975;s:13:"notfigurehead";i:5976;s:17:"notveryfigurehead";i:5977;s:8:"notfilth";i:5978;s:12:"notveryfilth";i:5979;s:9:"notfilthy";i:5980;s:13:"notveryfilthy";i:5981;s:10:"notfinagle";i:5982;s:14:"notveryfinagle";i:5983;s:11:"notfissures";i:5984;s:15:"notveryfissures";i:5985;s:7:"notfist";i:5986;s:11:"notveryfist";i:5987;s:14:"notflabbergast";i:5988;s:18:"notveryflabbergast";i:5989;s:16:"notflabbergasted";i:5990;s:20:"notveryflabbergasted";i:5991;s:11:"notflagging";i:5992;s:15:"notveryflagging";i:5993;s:11:"notflagrant";i:5994;s:15:"notveryflagrant";i:5995;s:13:"notflagrantly";i:5996;s:17:"notveryflagrantly";i:5997;s:7:"notflak";i:5998;s:11:"notveryflak";i:5999;s:8:"notflake";i:6000;s:12:"notveryflake";i:6001;s:9:"notflakey";i:6002;s:13:"notveryflakey";i:6003;s:8:"notflaky";i:6004;s:12:"notveryflaky";i:6005;s:8:"notflash";i:6006;s:12:"notveryflash";i:6007;s:9:"notflashy";i:6008;s:13:"notveryflashy";i:6009;s:11:"notflat-out";i:6010;s:15:"notveryflat-out";i:6011;s:9:"notflaunt";i:6012;s:13:"notveryflaunt";i:6013;s:7:"notflaw";i:6014;s:11:"notveryflaw";i:6015;s:8:"notflaws";i:6016;s:12:"notveryflaws";i:6017;s:8:"notfleer";i:6018;s:12:"notveryfleer";i:6019;s:11:"notfleeting";i:6020;s:15:"notveryfleeting";i:6021;s:10:"notflighty";i:6022;s:14:"notveryflighty";i:6023;s:11:"notflimflam";i:6024;s:15:"notveryflimflam";i:6025;s:9:"notflimsy";i:6026;s:13:"notveryflimsy";i:6027;s:8:"notflirt";i:6028;s:12:"notveryflirt";i:6029;s:9:"notflirty";i:6030;s:13:"notveryflirty";i:6031;s:10:"notfloored";i:6032;s:14:"notveryfloored";i:6033;s:11:"notflounder";i:6034;s:15:"notveryflounder";i:6035;s:14:"notfloundering";i:6036;s:18:"notveryfloundering";i:6037;s:8:"notflout";i:6038;s:12:"notveryflout";i:6039;s:10:"notfluster";i:6040;s:14:"notveryfluster";i:6041;s:6:"notfoe";i:6042;s:10:"notveryfoe";i:6043;s:7:"notfool";i:6044;s:11:"notveryfool";i:6045;s:12:"notfoolhardy";i:6046;s:16:"notveryfoolhardy";i:6047;s:10:"notfoolish";i:6048;s:14:"notveryfoolish";i:6049;s:12:"notfoolishly";i:6050;s:16:"notveryfoolishly";i:6051;s:14:"notfoolishness";i:6052;s:18:"notveryfoolishness";i:6053;s:9:"notforbid";i:6054;s:13:"notveryforbid";i:6055;s:12:"notforbidden";i:6056;s:16:"notveryforbidden";i:6057;s:13:"notforbidding";i:6058;s:17:"notveryforbidding";i:6059;s:8:"notforce";i:6060;s:12:"notveryforce";i:6061;s:11:"notforceful";i:6062;s:15:"notveryforceful";i:6063;s:13:"notforeboding";i:6064;s:17:"notveryforeboding";i:6065;s:15:"notforebodingly";i:6066;s:19:"notveryforebodingly";i:6067;s:10:"notforfeit";i:6068;s:14:"notveryforfeit";i:6069;s:9:"notforged";i:6070;s:13:"notveryforged";i:6071;s:9:"notforget";i:6072;s:13:"notveryforget";i:6073;s:14:"notforgetfully";i:6074;s:18:"notveryforgetfully";i:6075;s:16:"notforgetfulness";i:6076;s:20:"notveryforgetfulness";i:6077;s:10:"notforlorn";i:6078;s:14:"notveryforlorn";i:6079;s:12:"notforlornly";i:6080;s:16:"notveryforlornly";i:6081;s:13:"notformidable";i:6082;s:17:"notveryformidable";i:6083;s:10:"notforsake";i:6084;s:14:"notveryforsake";i:6085;s:11:"notforsaken";i:6086;s:15:"notveryforsaken";i:6087;s:11:"notforswear";i:6088;s:15:"notveryforswear";i:6089;s:7:"notfoul";i:6090;s:11:"notveryfoul";i:6091;s:9:"notfoully";i:6092;s:13:"notveryfoully";i:6093;s:11:"notfoulness";i:6094;s:15:"notveryfoulness";i:6095;s:12:"notfractious";i:6096;s:16:"notveryfractious";i:6097;s:14:"notfractiously";i:6098;s:18:"notveryfractiously";i:6099;s:11:"notfracture";i:6100;s:15:"notveryfracture";i:6101;s:13:"notfragmented";i:6102;s:17:"notveryfragmented";i:6103;s:8:"notfrail";i:6104;s:12:"notveryfrail";i:6105;s:10:"notfrantic";i:6106;s:14:"notveryfrantic";i:6107;s:14:"notfrantically";i:6108;s:18:"notveryfrantically";i:6109;s:12:"notfranticly";i:6110;s:16:"notveryfranticly";i:6111;s:13:"notfraternize";i:6112;s:17:"notveryfraternize";i:6113;s:8:"notfraud";i:6114;s:12:"notveryfraud";i:6115;s:13:"notfraudulent";i:6116;s:17:"notveryfraudulent";i:6117;s:10:"notfraught";i:6118;s:14:"notveryfraught";i:6119;s:8:"notfreak";i:6120;s:12:"notveryfreak";i:6121;s:11:"notfreakish";i:6122;s:15:"notveryfreakish";i:6123;s:13:"notfreakishly";i:6124;s:17:"notveryfreakishly";i:6125;s:10:"notfrazzle";i:6126;s:14:"notveryfrazzle";i:6127;s:11:"notfrazzled";i:6128;s:15:"notveryfrazzled";i:6129;s:11:"notfrenetic";i:6130;s:15:"notveryfrenetic";i:6131;s:15:"notfrenetically";i:6132;s:19:"notveryfrenetically";i:6133;s:11:"notfrenzied";i:6134;s:15:"notveryfrenzied";i:6135;s:9:"notfrenzy";i:6136;s:13:"notveryfrenzy";i:6137;s:7:"notfret";i:6138;s:11:"notveryfret";i:6139;s:10:"notfretful";i:6140;s:14:"notveryfretful";i:6141;s:11:"notfriction";i:6142;s:15:"notveryfriction";i:6143;s:12:"notfrictions";i:6144;s:16:"notveryfrictions";i:6145;s:10:"notfriggin";i:6146;s:14:"notveryfriggin";i:6147;s:9:"notfright";i:6148;s:13:"notveryfright";i:6149;s:11:"notfrighten";i:6150;s:15:"notveryfrighten";i:6151;s:14:"notfrightening";i:6152;s:18:"notveryfrightening";i:6153;s:16:"notfrighteningly";i:6154;s:20:"notveryfrighteningly";i:6155;s:12:"notfrightful";i:6156;s:16:"notveryfrightful";i:6157;s:14:"notfrightfully";i:6158;s:18:"notveryfrightfully";i:6159;s:12:"notfrivolous";i:6160;s:16:"notveryfrivolous";i:6161;s:8:"notfrown";i:6162;s:12:"notveryfrown";i:6163;s:9:"notfrozen";i:6164;s:13:"notveryfrozen";i:6165;s:12:"notfruitless";i:6166;s:16:"notveryfruitless";i:6167;s:14:"notfruitlessly";i:6168;s:18:"notveryfruitlessly";i:6169;s:9:"notfumble";i:6170;s:13:"notveryfumble";i:6171;s:12:"notfrustrate";i:6172;s:16:"notveryfrustrate";i:6173;s:14:"notfrustrating";i:6174;s:18:"notveryfrustrating";i:6175;s:16:"notfrustratingly";i:6176;s:20:"notveryfrustratingly";i:6177;s:14:"notfrustration";i:6178;s:18:"notveryfrustration";i:6179;s:8:"notfudge";i:6180;s:12:"notveryfudge";i:6181;s:11:"notfugitive";i:6182;s:15:"notveryfugitive";i:6183;s:13:"notfull-blown";i:6184;s:17:"notveryfull-blown";i:6185;s:12:"notfulminate";i:6186;s:16:"notveryfulminate";i:6187;s:7:"notfume";i:6188;s:11:"notveryfume";i:6189;s:17:"notfundamentalism";i:6190;s:21:"notveryfundamentalism";i:6191;s:12:"notfuriously";i:6192;s:16:"notveryfuriously";i:6193;s:8:"notfuror";i:6194;s:12:"notveryfuror";i:6195;s:7:"notfury";i:6196;s:11:"notveryfury";i:6197;s:7:"notfuss";i:6198;s:11:"notveryfuss";i:6199;s:12:"notfustigate";i:6200;s:16:"notveryfustigate";i:6201;s:8:"notfussy";i:6202;s:12:"notveryfussy";i:6203;s:8:"notfusty";i:6204;s:12:"notveryfusty";i:6205;s:9:"notfutile";i:6206;s:13:"notveryfutile";i:6207;s:11:"notfutilely";i:6208;s:15:"notveryfutilely";i:6209;s:11:"notfutility";i:6210;s:15:"notveryfutility";i:6211;s:8:"notfuzzy";i:6212;s:12:"notveryfuzzy";i:6213;s:9:"notgabble";i:6214;s:13:"notverygabble";i:6215;s:7:"notgaff";i:6216;s:11:"notverygaff";i:6217;s:8:"notgaffe";i:6218;s:12:"notverygaffe";i:6219;s:10:"notgainsay";i:6220;s:14:"notverygainsay";i:6221;s:12:"notgainsayer";i:6222;s:16:"notverygainsayer";i:6223;s:7:"notgaga";i:6224;s:11:"notverygaga";i:6225;s:9:"notgaggle";i:6226;s:13:"notverygaggle";i:6227;s:7:"notgall";i:6228;s:11:"notverygall";i:6229;s:10:"notgalling";i:6230;s:14:"notverygalling";i:6231;s:12:"notgallingly";i:6232;s:16:"notverygallingly";i:6233;s:9:"notgamble";i:6234;s:13:"notverygamble";i:6235;s:7:"notgame";i:6236;s:11:"notverygame";i:6237;s:7:"notgape";i:6238;s:11:"notverygape";i:6239;s:10:"notgarbage";i:6240;s:14:"notverygarbage";i:6241;s:9:"notgarish";i:6242;s:13:"notverygarish";i:6243;s:7:"notgasp";i:6244;s:11:"notverygasp";i:6245;s:9:"notgauche";i:6246;s:13:"notverygauche";i:6247;s:8:"notgaudy";i:6248;s:12:"notverygaudy";i:6249;s:7:"notgawk";i:6250;s:11:"notverygawk";i:6251;s:8:"notgawky";i:6252;s:12:"notverygawky";i:6253;s:9:"notgeezer";i:6254;s:13:"notverygeezer";i:6255;s:11:"notgenocide";i:6256;s:15:"notverygenocide";i:6257;s:11:"notget-rich";i:6258;s:15:"notveryget-rich";i:6259;s:10:"notghastly";i:6260;s:14:"notveryghastly";i:6261;s:9:"notghetto";i:6262;s:13:"notveryghetto";i:6263;s:9:"notgibber";i:6264;s:13:"notverygibber";i:6265;s:12:"notgibberish";i:6266;s:16:"notverygibberish";i:6267;s:7:"notgibe";i:6268;s:11:"notverygibe";i:6269;s:8:"notglare";i:6270;s:12:"notveryglare";i:6271;s:10:"notglaring";i:6272;s:14:"notveryglaring";i:6273;s:12:"notglaringly";i:6274;s:16:"notveryglaringly";i:6275;s:7:"notglib";i:6276;s:11:"notveryglib";i:6277;s:9:"notglibly";i:6278;s:13:"notveryglibly";i:6279;s:9:"notglitch";i:6280;s:13:"notveryglitch";i:6281;s:13:"notgloatingly";i:6282;s:17:"notverygloatingly";i:6283;s:8:"notgloom";i:6284;s:12:"notverygloom";i:6285;s:8:"notgloss";i:6286;s:12:"notverygloss";i:6287;s:9:"notglower";i:6288;s:13:"notveryglower";i:6289;s:7:"notglut";i:6290;s:11:"notveryglut";i:6291;s:10:"notgnawing";i:6292;s:14:"notverygnawing";i:6293;s:7:"notgoad";i:6294;s:11:"notverygoad";i:6295;s:10:"notgoading";i:6296;s:14:"notverygoading";i:6297;s:12:"notgod-awful";i:6298;s:16:"notverygod-awful";i:6299;s:9:"notgoddam";i:6300;s:13:"notverygoddam";i:6301;s:10:"notgoddamn";i:6302;s:14:"notverygoddamn";i:6303;s:7:"notgoof";i:6304;s:11:"notverygoof";i:6305;s:9:"notgossip";i:6306;s:13:"notverygossip";i:6307;s:12:"notgraceless";i:6308;s:16:"notverygraceless";i:6309;s:14:"notgracelessly";i:6310;s:18:"notverygracelessly";i:6311;s:8:"notgraft";i:6312;s:12:"notverygraft";i:6313;s:12:"notgrandiose";i:6314;s:16:"notverygrandiose";i:6315;s:10:"notgrapple";i:6316;s:14:"notverygrapple";i:6317;s:8:"notgrate";i:6318;s:12:"notverygrate";i:6319;s:10:"notgrating";i:6320;s:14:"notverygrating";i:6321;s:13:"notgratuitous";i:6322;s:17:"notverygratuitous";i:6323;s:15:"notgratuitously";i:6324;s:19:"notverygratuitously";i:6325;s:8:"notgrave";i:6326;s:12:"notverygrave";i:6327;s:10:"notgravely";i:6328;s:14:"notverygravely";i:6329;s:8:"notgreed";i:6330;s:12:"notverygreed";i:6331;s:9:"notgreedy";i:6332;s:13:"notverygreedy";i:6333;s:12:"notgrievance";i:6334;s:16:"notverygrievance";i:6335;s:13:"notgrievances";i:6336;s:17:"notverygrievances";i:6337;s:9:"notgrieve";i:6338;s:13:"notverygrieve";i:6339;s:11:"notgrieving";i:6340;s:15:"notverygrieving";i:6341;s:11:"notgrievous";i:6342;s:15:"notverygrievous";i:6343;s:13:"notgrievously";i:6344;s:17:"notverygrievously";i:6345;s:8:"notgrill";i:6346;s:12:"notverygrill";i:6347;s:10:"notgrimace";i:6348;s:14:"notverygrimace";i:6349;s:8:"notgrind";i:6350;s:12:"notverygrind";i:6351;s:8:"notgripe";i:6352;s:12:"notverygripe";i:6353;s:9:"notgrisly";i:6354;s:13:"notverygrisly";i:6355;s:9:"notgritty";i:6356;s:13:"notverygritty";i:6357;s:10:"notgrossly";i:6358;s:14:"notverygrossly";i:6359;s:9:"notgrouch";i:6360;s:13:"notverygrouch";i:6361;s:13:"notgroundless";i:6362;s:17:"notverygroundless";i:6363;s:9:"notgrouse";i:6364;s:13:"notverygrouse";i:6365;s:8:"notgrowl";i:6366;s:12:"notverygrowl";i:6367;s:9:"notgrudge";i:6368;s:13:"notverygrudge";i:6369;s:10:"notgrudges";i:6370;s:14:"notverygrudges";i:6371;s:11:"notgrudging";i:6372;s:15:"notverygrudging";i:6373;s:13:"notgrudgingly";i:6374;s:17:"notverygrudgingly";i:6375;s:11:"notgruesome";i:6376;s:15:"notverygruesome";i:6377;s:13:"notgruesomely";i:6378;s:17:"notverygruesomely";i:6379;s:8:"notgruff";i:6380;s:12:"notverygruff";i:6381;s:10:"notgrumble";i:6382;s:14:"notverygrumble";i:6383;s:8:"notguile";i:6384;s:12:"notveryguile";i:6385;s:8:"notguilt";i:6386;s:12:"notveryguilt";i:6387;s:11:"notguiltily";i:6388;s:15:"notveryguiltily";i:6389;s:11:"notgullible";i:6390;s:15:"notverygullible";i:6391;s:10:"nothaggard";i:6392;s:14:"notveryhaggard";i:6393;s:9:"nothaggle";i:6394;s:13:"notveryhaggle";i:6395;s:14:"nothalfhearted";i:6396;s:18:"notveryhalfhearted";i:6397;s:16:"nothalfheartedly";i:6398;s:20:"notveryhalfheartedly";i:6399;s:14:"nothallucinate";i:6400;s:18:"notveryhallucinate";i:6401;s:16:"nothallucination";i:6402;s:20:"notveryhallucination";i:6403;s:9:"nothamper";i:6404;s:13:"notveryhamper";i:6405;s:12:"nothamstring";i:6406;s:16:"notveryhamstring";i:6407;s:12:"nothamstrung";i:6408;s:16:"notveryhamstrung";i:6409;s:14:"nothandicapped";i:6410;s:18:"notveryhandicapped";i:6411;s:10:"nothapless";i:6412;s:14:"notveryhapless";i:6413;s:12:"nothaphazard";i:6414;s:16:"notveryhaphazard";i:6415;s:11:"notharangue";i:6416;s:15:"notveryharangue";i:6417;s:9:"notharass";i:6418;s:13:"notveryharass";i:6419;s:13:"notharassment";i:6420;s:17:"notveryharassment";i:6421;s:12:"notharboring";i:6422;s:16:"notveryharboring";i:6423;s:10:"notharbors";i:6424;s:14:"notveryharbors";i:6425;s:7:"nothard";i:6426;s:11:"notveryhard";i:6427;s:11:"nothard-hit";i:6428;s:15:"notveryhard-hit";i:6429;s:12:"nothard-line";i:6430;s:16:"notveryhard-line";i:6431;s:13:"nothard-liner";i:6432;s:17:"notveryhard-liner";i:6433;s:11:"nothardball";i:6434;s:15:"notveryhardball";i:6435;s:9:"notharden";i:6436;s:13:"notveryharden";i:6437;s:11:"nothardened";i:6438;s:15:"notveryhardened";i:6439;s:13:"nothardheaded";i:6440;s:17:"notveryhardheaded";i:6441;s:14:"nothardhearted";i:6442;s:18:"notveryhardhearted";i:6443;s:12:"nothardliner";i:6444;s:16:"notveryhardliner";i:6445;s:13:"nothardliners";i:6446;s:17:"notveryhardliners";i:6447;s:11:"nothardship";i:6448;s:15:"notveryhardship";i:6449;s:12:"nothardships";i:6450;s:16:"notveryhardships";i:6451;s:7:"notharm";i:6452;s:11:"notveryharm";i:6453;s:10:"notharmful";i:6454;s:14:"notveryharmful";i:6455;s:8:"notharms";i:6456;s:12:"notveryharms";i:6457;s:8:"notharpy";i:6458;s:12:"notveryharpy";i:6459;s:11:"notharridan";i:6460;s:15:"notveryharridan";i:6461;s:10:"notharried";i:6462;s:14:"notveryharried";i:6463;s:9:"notharrow";i:6464;s:13:"notveryharrow";i:6465;s:8:"notharsh";i:6466;s:12:"notveryharsh";i:6467;s:10:"notharshly";i:6468;s:14:"notveryharshly";i:6469;s:9:"nothassle";i:6470;s:13:"notveryhassle";i:6471;s:8:"nothaste";i:6472;s:12:"notveryhaste";i:6473;s:8:"nothasty";i:6474;s:12:"notveryhasty";i:6475;s:8:"nothater";i:6476;s:12:"notveryhater";i:6477;s:10:"nothateful";i:6478;s:14:"notveryhateful";i:6479;s:12:"nothatefully";i:6480;s:16:"notveryhatefully";i:6481;s:14:"nothatefulness";i:6482;s:18:"notveryhatefulness";i:6483;s:12:"nothaughtily";i:6484;s:16:"notveryhaughtily";i:6485;s:10:"nothaughty";i:6486;s:14:"notveryhaughty";i:6487;s:9:"nothatred";i:6488;s:13:"notveryhatred";i:6489;s:8:"nothaunt";i:6490;s:12:"notveryhaunt";i:6491;s:11:"nothaunting";i:6492;s:15:"notveryhaunting";i:6493;s:8:"nothavoc";i:6494;s:12:"notveryhavoc";i:6495;s:10:"nothawkish";i:6496;s:14:"notveryhawkish";i:6497;s:9:"nothazard";i:6498;s:13:"notveryhazard";i:6499;s:12:"nothazardous";i:6500;s:16:"notveryhazardous";i:6501;s:7:"nothazy";i:6502;s:11:"notveryhazy";i:6503;s:11:"notheadache";i:6504;s:15:"notveryheadache";i:6505;s:12:"notheadaches";i:6506;s:16:"notveryheadaches";i:6507;s:13:"notheartbreak";i:6508;s:17:"notveryheartbreak";i:6509;s:15:"notheartbreaker";i:6510;s:19:"notveryheartbreaker";i:6511;s:16:"notheartbreaking";i:6512;s:20:"notveryheartbreaking";i:6513;s:18:"notheartbreakingly";i:6514;s:22:"notveryheartbreakingly";i:6515;s:12:"notheartless";i:6516;s:16:"notveryheartless";i:6517;s:15:"notheartrending";i:6518;s:19:"notveryheartrending";i:6519;s:10:"notheathen";i:6520;s:14:"notveryheathen";i:6521;s:10:"notheavily";i:6522;s:14:"notveryheavily";i:6523;s:15:"notheavy-handed";i:6524;s:19:"notveryheavy-handed";i:6525;s:15:"notheavyhearted";i:6526;s:19:"notveryheavyhearted";i:6527;s:7:"notheck";i:6528;s:11:"notveryheck";i:6529;s:9:"notheckle";i:6530;s:13:"notveryheckle";i:6531;s:9:"nothectic";i:6532;s:13:"notveryhectic";i:6533;s:8:"nothedge";i:6534;s:12:"notveryhedge";i:6535;s:13:"nothedonistic";i:6536;s:17:"notveryhedonistic";i:6537;s:11:"notheedless";i:6538;s:15:"notveryheedless";i:6539;s:13:"nothegemonism";i:6540;s:17:"notveryhegemonism";i:6541;s:15:"nothegemonistic";i:6542;s:19:"notveryhegemonistic";i:6543;s:11:"nothegemony";i:6544;s:15:"notveryhegemony";i:6545;s:10:"notheinous";i:6546;s:14:"notveryheinous";i:6547;s:7:"nothell";i:6548;s:11:"notveryhell";i:6549;s:12:"nothell-bent";i:6550;s:16:"notveryhell-bent";i:6551;s:10:"nothellion";i:6552;s:14:"notveryhellion";i:6553;s:11:"nothelpless";i:6554;s:15:"notveryhelpless";i:6555;s:13:"nothelplessly";i:6556;s:17:"notveryhelplessly";i:6557;s:15:"nothelplessness";i:6558;s:19:"notveryhelplessness";i:6559;s:9:"notheresy";i:6560;s:13:"notveryheresy";i:6561;s:10:"notheretic";i:6562;s:14:"notveryheretic";i:6563;s:12:"notheretical";i:6564;s:16:"notveryheretical";i:6565;s:11:"nothesitant";i:6566;s:15:"notveryhesitant";i:6567;s:10:"nothideous";i:6568;s:14:"notveryhideous";i:6569;s:12:"nothideously";i:6570;s:16:"notveryhideously";i:6571;s:14:"nothideousness";i:6572;s:18:"notveryhideousness";i:6573;s:9:"nothinder";i:6574;s:13:"notveryhinder";i:6575;s:12:"nothindrance";i:6576;s:16:"notveryhindrance";i:6577;s:8:"nothoard";i:6578;s:12:"notveryhoard";i:6579;s:7:"nothoax";i:6580;s:11:"notveryhoax";i:6581;s:9:"nothobble";i:6582;s:13:"notveryhobble";i:6583;s:7:"nothole";i:6584;s:11:"notveryhole";i:6585;s:9:"nothollow";i:6586;s:13:"notveryhollow";i:6587;s:11:"nothoodwink";i:6588;s:15:"notveryhoodwink";i:6589;s:11:"nothopeless";i:6590;s:15:"notveryhopeless";i:6591;s:13:"nothopelessly";i:6592;s:17:"notveryhopelessly";i:6593;s:15:"nothopelessness";i:6594;s:19:"notveryhopelessness";i:6595;s:8:"nothorde";i:6596;s:12:"notveryhorde";i:6597;s:13:"nothorrendous";i:6598;s:17:"notveryhorrendous";i:6599;s:15:"nothorrendously";i:6600;s:19:"notveryhorrendously";i:6601;s:11:"nothorrible";i:6602;s:15:"notveryhorrible";i:6603;s:11:"nothorribly";i:6604;s:15:"notveryhorribly";i:6605;s:9:"nothorrid";i:6606;s:13:"notveryhorrid";i:6607;s:11:"nothorrific";i:6608;s:15:"notveryhorrific";i:6609;s:15:"nothorrifically";i:6610;s:19:"notveryhorrifically";i:6611;s:10:"nothorrify";i:6612;s:14:"notveryhorrify";i:6613;s:13:"nothorrifying";i:6614;s:17:"notveryhorrifying";i:6615;s:15:"nothorrifyingly";i:6616;s:19:"notveryhorrifyingly";i:6617;s:9:"nothorror";i:6618;s:13:"notveryhorror";i:6619;s:10:"nothorrors";i:6620;s:14:"notveryhorrors";i:6621;s:10:"nothostage";i:6622;s:14:"notveryhostage";i:6623;s:10:"nothostile";i:6624;s:14:"notveryhostile";i:6625;s:14:"nothostilities";i:6626;s:18:"notveryhostilities";i:6627;s:12:"nothostility";i:6628;s:16:"notveryhostility";i:6629;s:10:"nothothead";i:6630;s:14:"notveryhothead";i:6631;s:12:"nothotheaded";i:6632;s:16:"notveryhotheaded";i:6633;s:10:"nothotbeds";i:6634;s:14:"notveryhotbeds";i:6635;s:11:"nothothouse";i:6636;s:15:"notveryhothouse";i:6637;s:9:"nothubris";i:6638;s:13:"notveryhubris";i:6639;s:11:"nothuckster";i:6640;s:15:"notveryhuckster";i:6641;s:11:"nothumbling";i:6642;s:15:"notveryhumbling";i:6643;s:12:"nothumiliate";i:6644;s:16:"notveryhumiliate";i:6645;s:14:"nothumiliating";i:6646;s:18:"notveryhumiliating";i:6647;s:14:"nothumiliation";i:6648;s:18:"notveryhumiliation";i:6649;s:9:"nothunger";i:6650;s:13:"notveryhunger";i:6651;s:9:"nothungry";i:6652;s:13:"notveryhungry";i:6653;s:7:"nothurt";i:6654;s:11:"notveryhurt";i:6655;s:10:"nothurtful";i:6656;s:14:"notveryhurtful";i:6657;s:10:"nothustler";i:6658;s:14:"notveryhustler";i:6659;s:12:"nothypocrisy";i:6660;s:16:"notveryhypocrisy";i:6661;s:12:"nothypocrite";i:6662;s:16:"notveryhypocrite";i:6663;s:13:"nothypocrites";i:6664;s:17:"notveryhypocrites";i:6665;s:15:"nothypocritical";i:6666;s:19:"notveryhypocritical";i:6667;s:17:"nothypocritically";i:6668;s:21:"notveryhypocritically";i:6669;s:11:"nothysteria";i:6670;s:15:"notveryhysteria";i:6671;s:11:"nothysteric";i:6672;s:15:"notveryhysteric";i:6673;s:13:"nothysterical";i:6674;s:17:"notveryhysterical";i:6675;s:15:"nothysterically";i:6676;s:19:"notveryhysterically";i:6677;s:12:"nothysterics";i:6678;s:16:"notveryhysterics";i:6679;s:6:"noticy";i:6680;s:10:"notveryicy";i:6681;s:11:"notidiocies";i:6682;s:15:"notveryidiocies";i:6683;s:9:"notidiocy";i:6684;s:13:"notveryidiocy";i:6685;s:8:"notidiot";i:6686;s:12:"notveryidiot";i:6687;s:14:"notidiotically";i:6688;s:18:"notveryidiotically";i:6689;s:9:"notidiots";i:6690;s:13:"notveryidiots";i:6691;s:7:"notidle";i:6692;s:11:"notveryidle";i:6693;s:10:"notignoble";i:6694;s:14:"notveryignoble";i:6695;s:14:"notignominious";i:6696;s:18:"notveryignominious";i:6697;s:16:"notignominiously";i:6698;s:20:"notveryignominiously";i:6699;s:11:"notignominy";i:6700;s:15:"notveryignominy";i:6701;s:9:"notignore";i:6702;s:13:"notveryignore";i:6703;s:12:"notignorance";i:6704;s:16:"notveryignorance";i:6705;s:14:"notill-advised";i:6706;s:18:"notveryill-advised";i:6707;s:16:"notill-conceived";i:6708;s:20:"notveryill-conceived";i:6709;s:12:"notill-fated";i:6710;s:16:"notveryill-fated";i:6711;s:14:"notill-favored";i:6712;s:18:"notveryill-favored";i:6713;s:15:"notill-mannered";i:6714;s:19:"notveryill-mannered";i:6715;s:14:"notill-natured";i:6716;s:18:"notveryill-natured";i:6717;s:13:"notill-sorted";i:6718;s:17:"notveryill-sorted";i:6719;s:15:"notill-tempered";i:6720;s:19:"notveryill-tempered";i:6721;s:14:"notill-treated";i:6722;s:18:"notveryill-treated";i:6723;s:16:"notill-treatment";i:6724;s:20:"notveryill-treatment";i:6725;s:12:"notill-usage";i:6726;s:16:"notveryill-usage";i:6727;s:11:"notill-used";i:6728;s:15:"notveryill-used";i:6729;s:10:"notillegal";i:6730;s:14:"notveryillegal";i:6731;s:12:"notillegally";i:6732;s:16:"notveryillegally";i:6733;s:15:"notillegitimate";i:6734;s:19:"notveryillegitimate";i:6735;s:10:"notillicit";i:6736;s:14:"notveryillicit";i:6737;s:11:"notilliquid";i:6738;s:15:"notveryilliquid";i:6739;s:13:"notilliterate";i:6740;s:17:"notveryilliterate";i:6741;s:10:"notillness";i:6742;s:14:"notveryillness";i:6743;s:10:"notillogic";i:6744;s:14:"notveryillogic";i:6745;s:12:"notillogical";i:6746;s:16:"notveryillogical";i:6747;s:14:"notillogically";i:6748;s:18:"notveryillogically";i:6749;s:11:"notillusion";i:6750;s:15:"notveryillusion";i:6751;s:12:"notillusions";i:6752;s:16:"notveryillusions";i:6753;s:11:"notillusory";i:6754;s:15:"notveryillusory";i:6755;s:12:"notimaginary";i:6756;s:16:"notveryimaginary";i:6757;s:12:"notimbalance";i:6758;s:16:"notveryimbalance";i:6759;s:11:"notimbecile";i:6760;s:15:"notveryimbecile";i:6761;s:12:"notimbroglio";i:6762;s:16:"notveryimbroglio";i:6763;s:13:"notimmaterial";i:6764;s:17:"notveryimmaterial";i:6765;s:11:"notimmature";i:6766;s:15:"notveryimmature";i:6767;s:12:"notimminence";i:6768;s:16:"notveryimminence";i:6769;s:11:"notimminent";i:6770;s:15:"notveryimminent";i:6771;s:13:"notimminently";i:6772;s:17:"notveryimminently";i:6773;s:14:"notimmobilized";i:6774;s:18:"notveryimmobilized";i:6775;s:13:"notimmoderate";i:6776;s:17:"notveryimmoderate";i:6777;s:15:"notimmoderately";i:6778;s:19:"notveryimmoderately";i:6779;s:11:"notimmodest";i:6780;s:15:"notveryimmodest";i:6781;s:10:"notimmoral";i:6782;s:14:"notveryimmoral";i:6783;s:13:"notimmorality";i:6784;s:17:"notveryimmorality";i:6785;s:12:"notimmorally";i:6786;s:16:"notveryimmorally";i:6787;s:12:"notimmovable";i:6788;s:16:"notveryimmovable";i:6789;s:9:"notimpair";i:6790;s:13:"notveryimpair";i:6791;s:11:"notimpaired";i:6792;s:15:"notveryimpaired";i:6793;s:10:"notimpasse";i:6794;s:14:"notveryimpasse";i:6795;s:12:"notimpassive";i:6796;s:16:"notveryimpassive";i:6797;s:13:"notimpatience";i:6798;s:17:"notveryimpatience";i:6799;s:12:"notimpatient";i:6800;s:16:"notveryimpatient";i:6801;s:14:"notimpatiently";i:6802;s:18:"notveryimpatiently";i:6803;s:10:"notimpeach";i:6804;s:14:"notveryimpeach";i:6805;s:9:"notimpede";i:6806;s:13:"notveryimpede";i:6807;s:12:"notimpedance";i:6808;s:16:"notveryimpedance";i:6809;s:13:"notimpediment";i:6810;s:17:"notveryimpediment";i:6811;s:12:"notimpending";i:6812;s:16:"notveryimpending";i:6813;s:13:"notimpenitent";i:6814;s:17:"notveryimpenitent";i:6815;s:12:"notimperfect";i:6816;s:16:"notveryimperfect";i:6817;s:14:"notimperfectly";i:6818;s:18:"notveryimperfectly";i:6819;s:14:"notimperialist";i:6820;s:18:"notveryimperialist";i:6821;s:10:"notimperil";i:6822;s:14:"notveryimperil";i:6823;s:12:"notimperious";i:6824;s:16:"notveryimperious";i:6825;s:14:"notimperiously";i:6826;s:18:"notveryimperiously";i:6827;s:16:"notimpermissible";i:6828;s:20:"notveryimpermissible";i:6829;s:13:"notimpersonal";i:6830;s:17:"notveryimpersonal";i:6831;s:14:"notimpertinent";i:6832;s:18:"notveryimpertinent";i:6833;s:12:"notimpetuous";i:6834;s:16:"notveryimpetuous";i:6835;s:14:"notimpetuously";i:6836;s:18:"notveryimpetuously";i:6837;s:10:"notimpiety";i:6838;s:14:"notveryimpiety";i:6839;s:10:"notimpinge";i:6840;s:14:"notveryimpinge";i:6841;s:10:"notimpious";i:6842;s:14:"notveryimpious";i:6843;s:13:"notimplacable";i:6844;s:17:"notveryimplacable";i:6845;s:14:"notimplausible";i:6846;s:18:"notveryimplausible";i:6847;s:14:"notimplausibly";i:6848;s:18:"notveryimplausibly";i:6849;s:12:"notimplicate";i:6850;s:16:"notveryimplicate";i:6851;s:14:"notimplication";i:6852;s:18:"notveryimplication";i:6853;s:10:"notimplode";i:6854;s:14:"notveryimplode";i:6855;s:10:"notimplore";i:6856;s:14:"notveryimplore";i:6857;s:12:"notimploring";i:6858;s:16:"notveryimploring";i:6859;s:14:"notimploringly";i:6860;s:18:"notveryimploringly";i:6861;s:11:"notimpolite";i:6862;s:15:"notveryimpolite";i:6863;s:13:"notimpolitely";i:6864;s:17:"notveryimpolitely";i:6865;s:12:"notimpolitic";i:6866;s:16:"notveryimpolitic";i:6867;s:14:"notimportunate";i:6868;s:18:"notveryimportunate";i:6869;s:12:"notimportune";i:6870;s:16:"notveryimportune";i:6871;s:9:"notimpose";i:6872;s:13:"notveryimpose";i:6873;s:11:"notimposers";i:6874;s:15:"notveryimposers";i:6875;s:11:"notimposing";i:6876;s:15:"notveryimposing";i:6877;s:13:"notimposition";i:6878;s:17:"notveryimposition";i:6879;s:13:"notimpossible";i:6880;s:17:"notveryimpossible";i:6881;s:15:"notimpossiblity";i:6882;s:19:"notveryimpossiblity";i:6883;s:13:"notimpossibly";i:6884;s:17:"notveryimpossibly";i:6885;s:13:"notimpoverish";i:6886;s:17:"notveryimpoverish";i:6887;s:15:"notimpoverished";i:6888;s:19:"notveryimpoverished";i:6889;s:14:"notimpractical";i:6890;s:18:"notveryimpractical";i:6891;s:12:"notimprecate";i:6892;s:16:"notveryimprecate";i:6893;s:12:"notimprecise";i:6894;s:16:"notveryimprecise";i:6895;s:14:"notimprecisely";i:6896;s:18:"notveryimprecisely";i:6897;s:14:"notimprecision";i:6898;s:18:"notveryimprecision";i:6899;s:11:"notimprison";i:6900;s:15:"notveryimprison";i:6901;s:15:"notimprisonment";i:6902;s:19:"notveryimprisonment";i:6903;s:16:"notimprobability";i:6904;s:20:"notveryimprobability";i:6905;s:13:"notimprobable";i:6906;s:17:"notveryimprobable";i:6907;s:13:"notimprobably";i:6908;s:17:"notveryimprobably";i:6909;s:11:"notimproper";i:6910;s:15:"notveryimproper";i:6911;s:13:"notimproperly";i:6912;s:17:"notveryimproperly";i:6913;s:14:"notimpropriety";i:6914;s:18:"notveryimpropriety";i:6915;s:13:"notimprudence";i:6916;s:17:"notveryimprudence";i:6917;s:12:"notimprudent";i:6918;s:16:"notveryimprudent";i:6919;s:12:"notimpudence";i:6920;s:16:"notveryimpudence";i:6921;s:11:"notimpudent";i:6922;s:15:"notveryimpudent";i:6923;s:13:"notimpudently";i:6924;s:17:"notveryimpudently";i:6925;s:9:"notimpugn";i:6926;s:13:"notveryimpugn";i:6927;s:14:"notimpulsively";i:6928;s:18:"notveryimpulsively";i:6929;s:11:"notimpunity";i:6930;s:15:"notveryimpunity";i:6931;s:9:"notimpure";i:6932;s:13:"notveryimpure";i:6933;s:11:"notimpurity";i:6934;s:15:"notveryimpurity";i:6935;s:12:"notinability";i:6936;s:16:"notveryinability";i:6937;s:15:"notinaccessible";i:6938;s:19:"notveryinaccessible";i:6939;s:13:"notinaccuracy";i:6940;s:17:"notveryinaccuracy";i:6941;s:15:"notinaccuracies";i:6942;s:19:"notveryinaccuracies";i:6943;s:13:"notinaccurate";i:6944;s:17:"notveryinaccurate";i:6945;s:15:"notinaccurately";i:6946;s:19:"notveryinaccurately";i:6947;s:11:"notinaction";i:6948;s:15:"notveryinaction";i:6949;s:13:"notinadequacy";i:6950;s:17:"notveryinadequacy";i:6951;s:15:"notinadequately";i:6952;s:19:"notveryinadequately";i:6953;s:13:"notinadverent";i:6954;s:17:"notveryinadverent";i:6955;s:15:"notinadverently";i:6956;s:19:"notveryinadverently";i:6957;s:14:"notinadvisable";i:6958;s:18:"notveryinadvisable";i:6959;s:14:"notinadvisably";i:6960;s:18:"notveryinadvisably";i:6961;s:8:"notinane";i:6962;s:12:"notveryinane";i:6963;s:10:"notinanely";i:6964;s:14:"notveryinanely";i:6965;s:16:"notinappropriate";i:6966;s:20:"notveryinappropriate";i:6967;s:18:"notinappropriately";i:6968;s:22:"notveryinappropriately";i:6969;s:8:"notinapt";i:6970;s:12:"notveryinapt";i:6971;s:13:"notinaptitude";i:6972;s:17:"notveryinaptitude";i:6973;s:15:"notinarticulate";i:6974;s:19:"notveryinarticulate";i:6975;s:14:"notinattentive";i:6976;s:18:"notveryinattentive";i:6977;s:12:"notincapably";i:6978;s:16:"notveryincapably";i:6979;s:13:"notincautious";i:6980;s:17:"notveryincautious";i:6981;s:13:"notincendiary";i:6982;s:17:"notveryincendiary";i:6983;s:10:"notincense";i:6984;s:14:"notveryincense";i:6985;s:12:"notincessant";i:6986;s:16:"notveryincessant";i:6987;s:14:"notincessantly";i:6988;s:18:"notveryincessantly";i:6989;s:9:"notincite";i:6990;s:13:"notveryincite";i:6991;s:13:"notincitement";i:6992;s:17:"notveryincitement";i:6993;s:13:"notincivility";i:6994;s:17:"notveryincivility";i:6995;s:12:"notinclement";i:6996;s:16:"notveryinclement";i:6997;s:14:"notincognizant";i:6998;s:18:"notveryincognizant";i:6999;s:14:"notincoherence";i:7000;s:18:"notveryincoherence";i:7001;s:13:"notincoherent";i:7002;s:17:"notveryincoherent";i:7003;s:15:"notincoherently";i:7004;s:19:"notveryincoherently";i:7005;s:17:"notincommensurate";i:7006;s:21:"notveryincommensurate";i:7007;s:15:"notincomparable";i:7008;s:19:"notveryincomparable";i:7009;s:15:"notincomparably";i:7010;s:19:"notveryincomparably";i:7011;s:18:"notincompatibility";i:7012;s:22:"notveryincompatibility";i:7013;s:15:"notincompetence";i:7014;s:19:"notveryincompetence";i:7015;s:16:"notincompetently";i:7016;s:20:"notveryincompetently";i:7017;s:14:"notincompliant";i:7018;s:18:"notveryincompliant";i:7019;s:19:"notincomprehensible";i:7020;s:23:"notveryincomprehensible";i:7021;s:18:"notincomprehension";i:7022;s:22:"notveryincomprehension";i:7023;s:16:"notinconceivable";i:7024;s:20:"notveryinconceivable";i:7025;s:16:"notinconceivably";i:7026;s:20:"notveryinconceivably";i:7027;s:15:"notinconclusive";i:7028;s:19:"notveryinconclusive";i:7029;s:14:"notincongruous";i:7030;s:18:"notveryincongruous";i:7031;s:16:"notincongruously";i:7032;s:20:"notveryincongruously";i:7033;s:15:"notinconsequent";i:7034;s:19:"notveryinconsequent";i:7035;s:17:"notinconsequently";i:7036;s:21:"notveryinconsequently";i:7037;s:18:"notinconsequential";i:7038;s:22:"notveryinconsequential";i:7039;s:20:"notinconsequentially";i:7040;s:24:"notveryinconsequentially";i:7041;s:16:"notinconsiderate";i:7042;s:20:"notveryinconsiderate";i:7043;s:18:"notinconsiderately";i:7044;s:22:"notveryinconsiderately";i:7045;s:16:"notinconsistence";i:7046;s:20:"notveryinconsistence";i:7047;s:18:"notinconsistencies";i:7048;s:22:"notveryinconsistencies";i:7049;s:16:"notinconsistency";i:7050;s:20:"notveryinconsistency";i:7051;s:15:"notinconsistent";i:7052;s:19:"notveryinconsistent";i:7053;s:15:"notinconsolable";i:7054;s:19:"notveryinconsolable";i:7055;s:15:"notinconsolably";i:7056;s:19:"notveryinconsolably";i:7057;s:13:"notinconstant";i:7058;s:17:"notveryinconstant";i:7059;s:16:"notinconvenience";i:7060;s:20:"notveryinconvenience";i:7061;s:15:"notinconvenient";i:7062;s:19:"notveryinconvenient";i:7063;s:17:"notinconveniently";i:7064;s:21:"notveryinconveniently";i:7065;s:14:"notincorrectly";i:7066;s:18:"notveryincorrectly";i:7067;s:15:"notincorrigible";i:7068;s:19:"notveryincorrigible";i:7069;s:15:"notincorrigibly";i:7070;s:19:"notveryincorrigibly";i:7071;s:14:"notincredulous";i:7072;s:18:"notveryincredulous";i:7073;s:16:"notincredulously";i:7074;s:20:"notveryincredulously";i:7075;s:12:"notinculcate";i:7076;s:16:"notveryinculcate";i:7077;s:12:"notindecency";i:7078;s:16:"notveryindecency";i:7079;s:11:"notindecent";i:7080;s:15:"notveryindecent";i:7081;s:13:"notindecently";i:7082;s:17:"notveryindecently";i:7083;s:13:"notindecision";i:7084;s:17:"notveryindecision";i:7085;s:15:"notindecisively";i:7086;s:19:"notveryindecisively";i:7087;s:12:"notindecorum";i:7088;s:16:"notveryindecorum";i:7089;s:15:"notindefensible";i:7090;s:19:"notveryindefensible";i:7091;s:13:"notindefinite";i:7092;s:17:"notveryindefinite";i:7093;s:15:"notindefinitely";i:7094;s:19:"notveryindefinitely";i:7095;s:13:"notindelicate";i:7096;s:17:"notveryindelicate";i:7097;s:17:"notindeterminable";i:7098;s:21:"notveryindeterminable";i:7099;s:17:"notindeterminably";i:7100;s:21:"notveryindeterminably";i:7101;s:16:"notindeterminate";i:7102;s:20:"notveryindeterminate";i:7103;s:15:"notindifference";i:7104;s:19:"notveryindifference";i:7105;s:11:"notindigent";i:7106;s:15:"notveryindigent";i:7107;s:12:"notindignant";i:7108;s:16:"notveryindignant";i:7109;s:14:"notindignantly";i:7110;s:18:"notveryindignantly";i:7111;s:14:"notindignation";i:7112;s:18:"notveryindignation";i:7113;s:12:"notindignity";i:7114;s:16:"notveryindignity";i:7115;s:16:"notindiscernible";i:7116;s:20:"notveryindiscernible";i:7117;s:13:"notindiscreet";i:7118;s:17:"notveryindiscreet";i:7119;s:15:"notindiscreetly";i:7120;s:19:"notveryindiscreetly";i:7121;s:15:"notindiscretion";i:7122;s:19:"notveryindiscretion";i:7123;s:17:"notindiscriminate";i:7124;s:21:"notveryindiscriminate";i:7125;s:19:"notindiscriminating";i:7126;s:23:"notveryindiscriminating";i:7127;s:19:"notindiscriminately";i:7128;s:23:"notveryindiscriminately";i:7129;s:13:"notindisposed";i:7130;s:17:"notveryindisposed";i:7131;s:13:"notindistinct";i:7132;s:17:"notveryindistinct";i:7133;s:16:"notindistinctive";i:7134;s:20:"notveryindistinctive";i:7135;s:15:"notindoctrinate";i:7136;s:19:"notveryindoctrinate";i:7137;s:17:"notindoctrination";i:7138;s:21:"notveryindoctrination";i:7139;s:11:"notindolent";i:7140;s:15:"notveryindolent";i:7141;s:10:"notindulge";i:7142;s:14:"notveryindulge";i:7143;s:16:"notineffectively";i:7144;s:20:"notveryineffectively";i:7145;s:18:"notineffectiveness";i:7146;s:22:"notveryineffectiveness";i:7147;s:14:"notineffectual";i:7148;s:18:"notveryineffectual";i:7149;s:16:"notineffectually";i:7150;s:20:"notveryineffectually";i:7151;s:18:"notineffectualness";i:7152;s:22:"notveryineffectualness";i:7153;s:16:"notinefficacious";i:7154;s:20:"notveryinefficacious";i:7155;s:13:"notinefficacy";i:7156;s:17:"notveryinefficacy";i:7157;s:15:"notinefficiency";i:7158;s:19:"notveryinefficiency";i:7159;s:16:"notinefficiently";i:7160;s:20:"notveryinefficiently";i:7161;s:13:"notineligible";i:7162;s:17:"notveryineligible";i:7163;s:13:"notinelegance";i:7164;s:17:"notveryinelegance";i:7165;s:12:"notinelegant";i:7166;s:16:"notveryinelegant";i:7167;s:13:"notineloquent";i:7168;s:17:"notveryineloquent";i:7169;s:15:"notineloquently";i:7170;s:19:"notveryineloquently";i:7171;s:8:"notinept";i:7172;s:12:"notveryinept";i:7173;s:13:"notineptitude";i:7174;s:17:"notveryineptitude";i:7175;s:10:"notineptly";i:7176;s:14:"notveryineptly";i:7177;s:15:"notinequalities";i:7178;s:19:"notveryinequalities";i:7179;s:13:"notinequality";i:7180;s:17:"notveryinequality";i:7181;s:14:"notinequitable";i:7182;s:18:"notveryinequitable";i:7183;s:14:"notinequitably";i:7184;s:18:"notveryinequitably";i:7185;s:13:"notinequities";i:7186;s:17:"notveryinequities";i:7187;s:10:"notinertia";i:7188;s:14:"notveryinertia";i:7189;s:14:"notinescapable";i:7190;s:18:"notveryinescapable";i:7191;s:14:"notinescapably";i:7192;s:18:"notveryinescapably";i:7193;s:14:"notinessential";i:7194;s:18:"notveryinessential";i:7195;s:13:"notinevitable";i:7196;s:17:"notveryinevitable";i:7197;s:13:"notinevitably";i:7198;s:17:"notveryinevitably";i:7199;s:10:"notinexact";i:7200;s:14:"notveryinexact";i:7201;s:14:"notinexcusable";i:7202;s:18:"notveryinexcusable";i:7203;s:14:"notinexcusably";i:7204;s:18:"notveryinexcusably";i:7205;s:13:"notinexorable";i:7206;s:17:"notveryinexorable";i:7207;s:13:"notinexorably";i:7208;s:17:"notveryinexorably";i:7209;s:15:"notinexperience";i:7210;s:19:"notveryinexperience";i:7211;s:16:"notinexperienced";i:7212;s:20:"notveryinexperienced";i:7213;s:11:"notinexpert";i:7214;s:15:"notveryinexpert";i:7215;s:13:"notinexpertly";i:7216;s:17:"notveryinexpertly";i:7217;s:13:"notinexpiable";i:7218;s:17:"notveryinexpiable";i:7219;s:16:"notinexplainable";i:7220;s:20:"notveryinexplainable";i:7221;s:15:"notinexplicable";i:7222;s:19:"notveryinexplicable";i:7223;s:15:"notinextricable";i:7224;s:19:"notveryinextricable";i:7225;s:15:"notinextricably";i:7226;s:19:"notveryinextricably";i:7227;s:11:"notinfamous";i:7228;s:15:"notveryinfamous";i:7229;s:13:"notinfamously";i:7230;s:17:"notveryinfamously";i:7231;s:9:"notinfamy";i:7232;s:13:"notveryinfamy";i:7233;s:13:"notinfatuated";i:7234;s:17:"notveryinfatuated";i:7235;s:11:"notinfected";i:7236;s:15:"notveryinfected";i:7237;s:14:"notinferiority";i:7238;s:18:"notveryinferiority";i:7239;s:11:"notinfernal";i:7240;s:15:"notveryinfernal";i:7241;s:9:"notinfest";i:7242;s:13:"notveryinfest";i:7243;s:11:"notinfested";i:7244;s:15:"notveryinfested";i:7245;s:10:"notinfidel";i:7246;s:14:"notveryinfidel";i:7247;s:11:"notinfidels";i:7248;s:15:"notveryinfidels";i:7249;s:14:"notinfiltrator";i:7250;s:18:"notveryinfiltrator";i:7251;s:15:"notinfiltrators";i:7252;s:19:"notveryinfiltrators";i:7253;s:9:"notinfirm";i:7254;s:13:"notveryinfirm";i:7255;s:10:"notinflame";i:7256;s:14:"notveryinflame";i:7257;s:15:"notinflammatory";i:7258;s:19:"notveryinflammatory";i:7259;s:11:"notinflated";i:7260;s:15:"notveryinflated";i:7261;s:15:"notinflationary";i:7262;s:19:"notveryinflationary";i:7263;s:13:"notinflexible";i:7264;s:17:"notveryinflexible";i:7265;s:10:"notinflict";i:7266;s:14:"notveryinflict";i:7267;s:13:"notinfraction";i:7268;s:17:"notveryinfraction";i:7269;s:11:"notinfringe";i:7270;s:15:"notveryinfringe";i:7271;s:15:"notinfringement";i:7272;s:19:"notveryinfringement";i:7273;s:16:"notinfringements";i:7274;s:20:"notveryinfringements";i:7275;s:12:"notinfuriate";i:7276;s:16:"notveryinfuriate";i:7277;s:14:"notinfuriating";i:7278;s:18:"notveryinfuriating";i:7279;s:16:"notinfuriatingly";i:7280;s:20:"notveryinfuriatingly";i:7281;s:13:"notinglorious";i:7282;s:17:"notveryinglorious";i:7283;s:10:"notingrate";i:7284;s:14:"notveryingrate";i:7285;s:14:"notingratitude";i:7286;s:18:"notveryingratitude";i:7287;s:10:"notinhibit";i:7288;s:14:"notveryinhibit";i:7289;s:13:"notinhibition";i:7290;s:17:"notveryinhibition";i:7291;s:15:"notinhospitable";i:7292;s:19:"notveryinhospitable";i:7293;s:16:"notinhospitality";i:7294;s:20:"notveryinhospitality";i:7295;s:10:"notinhuman";i:7296;s:14:"notveryinhuman";i:7297;s:13:"notinhumanity";i:7298;s:17:"notveryinhumanity";i:7299;s:11:"notinimical";i:7300;s:15:"notveryinimical";i:7301;s:13:"notinimically";i:7302;s:17:"notveryinimically";i:7303;s:13:"notiniquitous";i:7304;s:17:"notveryiniquitous";i:7305;s:11:"notiniquity";i:7306;s:15:"notveryiniquity";i:7307;s:14:"notinjudicious";i:7308;s:18:"notveryinjudicious";i:7309;s:9:"notinjure";i:7310;s:13:"notveryinjure";i:7311;s:12:"notinjurious";i:7312;s:16:"notveryinjurious";i:7313;s:9:"notinjury";i:7314;s:13:"notveryinjury";i:7315;s:12:"notinjustice";i:7316;s:16:"notveryinjustice";i:7317;s:13:"notinjustices";i:7318;s:17:"notveryinjustices";i:7319;s:11:"notinnuendo";i:7320;s:15:"notveryinnuendo";i:7321;s:14:"notinopportune";i:7322;s:18:"notveryinopportune";i:7323;s:13:"notinordinate";i:7324;s:17:"notveryinordinate";i:7325;s:15:"notinordinately";i:7326;s:19:"notveryinordinately";i:7327;s:11:"notinsanely";i:7328;s:15:"notveryinsanely";i:7329;s:11:"notinsanity";i:7330;s:15:"notveryinsanity";i:7331;s:13:"notinsatiable";i:7332;s:17:"notveryinsatiable";i:7333;s:13:"notinsecurity";i:7334;s:17:"notveryinsecurity";i:7335;s:13:"notinsensible";i:7336;s:17:"notveryinsensible";i:7337;s:14:"notinsensitive";i:7338;s:18:"notveryinsensitive";i:7339;s:16:"notinsensitively";i:7340;s:20:"notveryinsensitively";i:7341;s:16:"notinsensitivity";i:7342;s:20:"notveryinsensitivity";i:7343;s:12:"notinsidious";i:7344;s:16:"notveryinsidious";i:7345;s:14:"notinsidiously";i:7346;s:18:"notveryinsidiously";i:7347;s:17:"notinsignificance";i:7348;s:21:"notveryinsignificance";i:7349;s:18:"notinsignificantly";i:7350;s:22:"notveryinsignificantly";i:7351;s:14:"notinsincerely";i:7352;s:18:"notveryinsincerely";i:7353;s:14:"notinsincerity";i:7354;s:18:"notveryinsincerity";i:7355;s:12:"notinsinuate";i:7356;s:16:"notveryinsinuate";i:7357;s:14:"notinsinuating";i:7358;s:18:"notveryinsinuating";i:7359;s:14:"notinsinuation";i:7360;s:18:"notveryinsinuation";i:7361;s:13:"notinsociable";i:7362;s:17:"notveryinsociable";i:7363;s:12:"notisolation";i:7364;s:16:"notveryisolation";i:7365;s:12:"notinsolence";i:7366;s:16:"notveryinsolence";i:7367;s:11:"notinsolent";i:7368;s:15:"notveryinsolent";i:7369;s:13:"notinsolently";i:7370;s:17:"notveryinsolently";i:7371;s:12:"notinsolvent";i:7372;s:16:"notveryinsolvent";i:7373;s:14:"notinsouciance";i:7374;s:18:"notveryinsouciance";i:7375;s:14:"notinstability";i:7376;s:18:"notveryinstability";i:7377;s:11:"notinstable";i:7378;s:15:"notveryinstable";i:7379;s:12:"notinstigate";i:7380;s:16:"notveryinstigate";i:7381;s:13:"notinstigator";i:7382;s:17:"notveryinstigator";i:7383;s:14:"notinstigators";i:7384;s:18:"notveryinstigators";i:7385;s:16:"notinsubordinate";i:7386;s:20:"notveryinsubordinate";i:7387;s:16:"notinsubstantial";i:7388;s:20:"notveryinsubstantial";i:7389;s:18:"notinsubstantially";i:7390;s:22:"notveryinsubstantially";i:7391;s:15:"notinsufferable";i:7392;s:19:"notveryinsufferable";i:7393;s:15:"notinsufferably";i:7394;s:19:"notveryinsufferably";i:7395;s:16:"notinsufficiency";i:7396;s:20:"notveryinsufficiency";i:7397;s:17:"notinsufficiently";i:7398;s:21:"notveryinsufficiently";i:7399;s:10:"notinsular";i:7400;s:14:"notveryinsular";i:7401;s:9:"notinsult";i:7402;s:13:"notveryinsult";i:7403;s:12:"notinsulting";i:7404;s:16:"notveryinsulting";i:7405;s:14:"notinsultingly";i:7406;s:18:"notveryinsultingly";i:7407;s:16:"notinsupportable";i:7408;s:20:"notveryinsupportable";i:7409;s:16:"notinsupportably";i:7410;s:20:"notveryinsupportably";i:7411;s:17:"notinsurmountable";i:7412;s:21:"notveryinsurmountable";i:7413;s:17:"notinsurmountably";i:7414;s:21:"notveryinsurmountably";i:7415;s:15:"notinsurrection";i:7416;s:19:"notveryinsurrection";i:7417;s:12:"notinterfere";i:7418;s:16:"notveryinterfere";i:7419;s:15:"notinterference";i:7420;s:19:"notveryinterference";i:7421;s:15:"notintermittent";i:7422;s:19:"notveryintermittent";i:7423;s:12:"notinterrupt";i:7424;s:16:"notveryinterrupt";i:7425;s:15:"notinterruption";i:7426;s:19:"notveryinterruption";i:7427;s:13:"notintimidate";i:7428;s:17:"notveryintimidate";i:7429;s:15:"notintimidating";i:7430;s:19:"notveryintimidating";i:7431;s:17:"notintimidatingly";i:7432;s:21:"notveryintimidatingly";i:7433;s:15:"notintimidation";i:7434;s:19:"notveryintimidation";i:7435;s:14:"notintolerable";i:7436;s:18:"notveryintolerable";i:7437;s:16:"notintolerablely";i:7438;s:20:"notveryintolerablely";i:7439;s:14:"notintolerance";i:7440;s:18:"notveryintolerance";i:7441;s:13:"notintolerant";i:7442;s:17:"notveryintolerant";i:7443;s:13:"notintoxicate";i:7444;s:17:"notveryintoxicate";i:7445;s:14:"notintractable";i:7446;s:18:"notveryintractable";i:7447;s:16:"notintransigence";i:7448;s:20:"notveryintransigence";i:7449;s:15:"notintransigent";i:7450;s:19:"notveryintransigent";i:7451;s:10:"notintrude";i:7452;s:14:"notveryintrude";i:7453;s:12:"notintrusion";i:7454;s:16:"notveryintrusion";i:7455;s:12:"notintrusive";i:7456;s:16:"notveryintrusive";i:7457;s:11:"notinundate";i:7458;s:15:"notveryinundate";i:7459;s:12:"notinundated";i:7460;s:16:"notveryinundated";i:7461;s:10:"notinvader";i:7462;s:14:"notveryinvader";i:7463;s:10:"notinvalid";i:7464;s:14:"notveryinvalid";i:7465;s:13:"notinvalidate";i:7466;s:17:"notveryinvalidate";i:7467;s:13:"notinvalidity";i:7468;s:17:"notveryinvalidity";i:7469;s:11:"notinvasive";i:7470;s:15:"notveryinvasive";i:7471;s:12:"notinvective";i:7472;s:16:"notveryinvective";i:7473;s:11:"notinveigle";i:7474;s:15:"notveryinveigle";i:7475;s:12:"notinvidious";i:7476;s:16:"notveryinvidious";i:7477;s:14:"notinvidiously";i:7478;s:18:"notveryinvidiously";i:7479;s:16:"notinvidiousness";i:7480;s:20:"notveryinvidiousness";i:7481;s:16:"notinvoluntarily";i:7482;s:20:"notveryinvoluntarily";i:7483;s:14:"notinvoluntary";i:7484;s:18:"notveryinvoluntary";i:7485;s:8:"notirate";i:7486;s:12:"notveryirate";i:7487;s:10:"notirately";i:7488;s:14:"notveryirately";i:7489;s:6:"notire";i:7490;s:10:"notveryire";i:7491;s:6:"notirk";i:7492;s:10:"notveryirk";i:7493;s:10:"notirksome";i:7494;s:14:"notveryirksome";i:7495;s:9:"notironic";i:7496;s:13:"notveryironic";i:7497;s:10:"notironies";i:7498;s:14:"notveryironies";i:7499;s:8:"notirony";i:7500;s:12:"notveryirony";i:7501;s:16:"notirrationality";i:7502;s:20:"notveryirrationality";i:7503;s:15:"notirrationally";i:7504;s:19:"notveryirrationally";i:7505;s:17:"notirreconcilable";i:7506;s:21:"notveryirreconcilable";i:7507;s:15:"notirredeemable";i:7508;s:19:"notveryirredeemable";i:7509;s:15:"notirredeemably";i:7510;s:19:"notveryirredeemably";i:7511;s:15:"notirreformable";i:7512;s:19:"notveryirreformable";i:7513;s:12:"notirregular";i:7514;s:16:"notveryirregular";i:7515;s:15:"notirregularity";i:7516;s:19:"notveryirregularity";i:7517;s:14:"notirrelevance";i:7518;s:18:"notveryirrelevance";i:7519;s:13:"notirrelevant";i:7520;s:17:"notveryirrelevant";i:7521;s:14:"notirreparable";i:7522;s:18:"notveryirreparable";i:7523;s:15:"notirreplacible";i:7524;s:19:"notveryirreplacible";i:7525;s:16:"notirrepressible";i:7526;s:20:"notveryirrepressible";i:7527;s:13:"notirresolute";i:7528;s:17:"notveryirresolute";i:7529;s:15:"notirresolvable";i:7530;s:19:"notveryirresolvable";i:7531;s:16:"notirresponsible";i:7532;s:20:"notveryirresponsible";i:7533;s:16:"notirresponsibly";i:7534;s:20:"notveryirresponsibly";i:7535;s:16:"notirretrievable";i:7536;s:20:"notveryirretrievable";i:7537;s:14:"notirreverence";i:7538;s:18:"notveryirreverence";i:7539;s:13:"notirreverent";i:7540;s:17:"notveryirreverent";i:7541;s:15:"notirreverently";i:7542;s:19:"notveryirreverently";i:7543;s:15:"notirreversible";i:7544;s:19:"notveryirreversible";i:7545;s:12:"notirritably";i:7546;s:16:"notveryirritably";i:7547;s:11:"notirritant";i:7548;s:15:"notveryirritant";i:7549;s:11:"notirritate";i:7550;s:15:"notveryirritate";i:7551;s:13:"notirritating";i:7552;s:17:"notveryirritating";i:7553;s:13:"notirritation";i:7554;s:17:"notveryirritation";i:7555;s:10:"notisolate";i:7556;s:14:"notveryisolate";i:7557;s:7:"notitch";i:7558;s:11:"notveryitch";i:7559;s:9:"notjabber";i:7560;s:13:"notveryjabber";i:7561;s:6:"notjam";i:7562;s:10:"notveryjam";i:7563;s:6:"notjar";i:7564;s:10:"notveryjar";i:7565;s:12:"notjaundiced";i:7566;s:16:"notveryjaundiced";i:7567;s:12:"notjealously";i:7568;s:16:"notveryjealously";i:7569;s:14:"notjealousness";i:7570;s:18:"notveryjealousness";i:7571;s:11:"notjealousy";i:7572;s:15:"notveryjealousy";i:7573;s:7:"notjeer";i:7574;s:11:"notveryjeer";i:7575;s:10:"notjeering";i:7576;s:14:"notveryjeering";i:7577;s:12:"notjeeringly";i:7578;s:16:"notveryjeeringly";i:7579;s:8:"notjeers";i:7580;s:12:"notveryjeers";i:7581;s:13:"notjeopardize";i:7582;s:17:"notveryjeopardize";i:7583;s:11:"notjeopardy";i:7584;s:15:"notveryjeopardy";i:7585;s:7:"notjerk";i:7586;s:11:"notveryjerk";i:7587;s:10:"notjittery";i:7588;s:14:"notveryjittery";i:7589;s:10:"notjobless";i:7590;s:14:"notveryjobless";i:7591;s:8:"notjoker";i:7592;s:12:"notveryjoker";i:7593;s:7:"notjolt";i:7594;s:11:"notveryjolt";i:7595;s:8:"notjumpy";i:7596;s:12:"notveryjumpy";i:7597;s:7:"notjunk";i:7598;s:11:"notveryjunk";i:7599;s:8:"notjunky";i:7600;s:12:"notveryjunky";i:7601;s:11:"notjuvenile";i:7602;s:15:"notveryjuvenile";i:7603;s:8:"notkaput";i:7604;s:12:"notverykaput";i:7605;s:7:"notkick";i:7606;s:11:"notverykick";i:7607;s:7:"notkill";i:7608;s:11:"notverykill";i:7609;s:9:"notkiller";i:7610;s:13:"notverykiller";i:7611;s:10:"notkilljoy";i:7612;s:14:"notverykilljoy";i:7613;s:8:"notknave";i:7614;s:12:"notveryknave";i:7615;s:8:"notknife";i:7616;s:12:"notveryknife";i:7617;s:8:"notknock";i:7618;s:12:"notveryknock";i:7619;s:7:"notkook";i:7620;s:11:"notverykook";i:7621;s:8:"notkooky";i:7622;s:12:"notverykooky";i:7623;s:7:"notlack";i:7624;s:11:"notverylack";i:7625;s:16:"notlackadaisical";i:7626;s:20:"notverylackadaisical";i:7627;s:9:"notlackey";i:7628;s:13:"notverylackey";i:7629;s:10:"notlackeys";i:7630;s:14:"notverylackeys";i:7631;s:10:"notlacking";i:7632;s:14:"notverylacking";i:7633;s:13:"notlackluster";i:7634;s:17:"notverylackluster";i:7635;s:10:"notlaconic";i:7636;s:14:"notverylaconic";i:7637;s:6:"notlag";i:7638;s:10:"notverylag";i:7639;s:10:"notlambast";i:7640;s:14:"notverylambast";i:7641;s:11:"notlambaste";i:7642;s:15:"notverylambaste";i:7643;s:7:"notlame";i:7644;s:11:"notverylame";i:7645;s:12:"notlame-duck";i:7646;s:16:"notverylame-duck";i:7647;s:9:"notlament";i:7648;s:13:"notverylament";i:7649;s:13:"notlamentable";i:7650;s:17:"notverylamentable";i:7651;s:13:"notlamentably";i:7652;s:17:"notverylamentably";i:7653;s:10:"notlanguid";i:7654;s:14:"notverylanguid";i:7655;s:11:"notlanguish";i:7656;s:15:"notverylanguish";i:7657;s:8:"notlanky";i:7658;s:12:"notverylanky";i:7659;s:10:"notlanguor";i:7660;s:14:"notverylanguor";i:7661;s:13:"notlanguorous";i:7662;s:17:"notverylanguorous";i:7663;s:15:"notlanguorously";i:7664;s:19:"notverylanguorously";i:7665;s:8:"notlapse";i:7666;s:12:"notverylapse";i:7667;s:13:"notlascivious";i:7668;s:17:"notverylascivious";i:7669;s:13:"notlast-ditch";i:7670;s:17:"notverylast-ditch";i:7671;s:8:"notlaugh";i:7672;s:12:"notverylaugh";i:7673;s:12:"notlaughably";i:7674;s:16:"notverylaughably";i:7675;s:16:"notlaughingstock";i:7676;s:20:"notverylaughingstock";i:7677;s:11:"notlaughter";i:7678;s:15:"notverylaughter";i:7679;s:13:"notlawbreaker";i:7680;s:17:"notverylawbreaker";i:7681;s:14:"notlawbreaking";i:7682;s:18:"notverylawbreaking";i:7683;s:10:"notlawless";i:7684;s:14:"notverylawless";i:7685;s:14:"notlawlessness";i:7686;s:18:"notverylawlessness";i:7687;s:6:"notlax";i:7688;s:10:"notverylax";i:7689;s:7:"notleak";i:7690;s:11:"notveryleak";i:7691;s:10:"notleakage";i:7692;s:14:"notveryleakage";i:7693;s:8:"notleaky";i:7694;s:12:"notveryleaky";i:7695;s:7:"notlech";i:7696;s:11:"notverylech";i:7697;s:9:"notlecher";i:7698;s:13:"notverylecher";i:7699;s:12:"notlecherous";i:7700;s:16:"notverylecherous";i:7701;s:10:"notlechery";i:7702;s:14:"notverylechery";i:7703;s:10:"notlecture";i:7704;s:14:"notverylecture";i:7705;s:8:"notleech";i:7706;s:12:"notveryleech";i:7707;s:7:"notleer";i:7708;s:11:"notveryleer";i:7709;s:8:"notleery";i:7710;s:12:"notveryleery";i:7711;s:15:"notleft-leaning";i:7712;s:19:"notveryleft-leaning";i:7713;s:17:"notless-developed";i:7714;s:21:"notveryless-developed";i:7715;s:9:"notlessen";i:7716;s:13:"notverylessen";i:7717;s:9:"notlesser";i:7718;s:13:"notverylesser";i:7719;s:15:"notlesser-known";i:7720;s:19:"notverylesser-known";i:7721;s:8:"notletch";i:7722;s:12:"notveryletch";i:7723;s:9:"notlethal";i:7724;s:13:"notverylethal";i:7725;s:12:"notlethargic";i:7726;s:16:"notverylethargic";i:7727;s:11:"notlethargy";i:7728;s:15:"notverylethargy";i:7729;s:7:"notlewd";i:7730;s:11:"notverylewd";i:7731;s:9:"notlewdly";i:7732;s:13:"notverylewdly";i:7733;s:11:"notlewdness";i:7734;s:15:"notverylewdness";i:7735;s:9:"notliable";i:7736;s:13:"notveryliable";i:7737;s:12:"notliability";i:7738;s:16:"notveryliability";i:7739;s:7:"notliar";i:7740;s:11:"notveryliar";i:7741;s:8:"notliars";i:7742;s:12:"notveryliars";i:7743;s:13:"notlicentious";i:7744;s:17:"notverylicentious";i:7745;s:15:"notlicentiously";i:7746;s:19:"notverylicentiously";i:7747;s:17:"notlicentiousness";i:7748;s:21:"notverylicentiousness";i:7749;s:6:"notlie";i:7750;s:10:"notverylie";i:7751;s:7:"notlier";i:7752;s:11:"notverylier";i:7753;s:7:"notlies";i:7754;s:11:"notverylies";i:7755;s:19:"notlife-threatening";i:7756;s:23:"notverylife-threatening";i:7757;s:11:"notlifeless";i:7758;s:15:"notverylifeless";i:7759;s:8:"notlimit";i:7760;s:12:"notverylimit";i:7761;s:13:"notlimitation";i:7762;s:17:"notverylimitation";i:7763;s:7:"notlimp";i:7764;s:11:"notverylimp";i:7765;s:11:"notlistless";i:7766;s:15:"notverylistless";i:7767;s:12:"notlitigious";i:7768;s:16:"notverylitigious";i:7769;s:15:"notlittle-known";i:7770;s:19:"notverylittle-known";i:7771;s:8:"notlivid";i:7772;s:12:"notverylivid";i:7773;s:10:"notlividly";i:7774;s:14:"notverylividly";i:7775;s:8:"notloath";i:7776;s:12:"notveryloath";i:7777;s:9:"notloathe";i:7778;s:13:"notveryloathe";i:7779;s:11:"notloathing";i:7780;s:15:"notveryloathing";i:7781;s:10:"notloathly";i:7782;s:14:"notveryloathly";i:7783;s:12:"notloathsome";i:7784;s:16:"notveryloathsome";i:7785;s:14:"notloathsomely";i:7786;s:18:"notveryloathsomely";i:7787;s:7:"notlone";i:7788;s:11:"notverylone";i:7789;s:13:"notloneliness";i:7790;s:17:"notveryloneliness";i:7791;s:7:"notlong";i:7792;s:11:"notverylong";i:7793;s:12:"notlongingly";i:7794;s:16:"notverylongingly";i:7795;s:11:"notloophole";i:7796;s:15:"notveryloophole";i:7797;s:12:"notloopholes";i:7798;s:16:"notveryloopholes";i:7799;s:7:"notloot";i:7800;s:11:"notveryloot";i:7801;s:7:"notlorn";i:7802;s:11:"notverylorn";i:7803;s:9:"notlosing";i:7804;s:13:"notverylosing";i:7805;s:7:"notlose";i:7806;s:11:"notverylose";i:7807;s:8:"notloser";i:7808;s:12:"notveryloser";i:7809;s:7:"notloss";i:7810;s:11:"notveryloss";i:7811;s:11:"notlovelorn";i:7812;s:15:"notverylovelorn";i:7813;s:12:"notlow-rated";i:7814;s:16:"notverylow-rated";i:7815;s:8:"notlowly";i:7816;s:12:"notverylowly";i:7817;s:12:"notludicrous";i:7818;s:16:"notveryludicrous";i:7819;s:14:"notludicrously";i:7820;s:18:"notveryludicrously";i:7821;s:13:"notlugubrious";i:7822;s:17:"notverylugubrious";i:7823;s:11:"notlukewarm";i:7824;s:15:"notverylukewarm";i:7825;s:7:"notlull";i:7826;s:11:"notverylull";i:7827;s:10:"notlunatic";i:7828;s:14:"notverylunatic";i:7829;s:13:"notlunaticism";i:7830;s:17:"notverylunaticism";i:7831;s:8:"notlurch";i:7832;s:12:"notverylurch";i:7833;s:7:"notlure";i:7834;s:11:"notverylure";i:7835;s:8:"notlurid";i:7836;s:12:"notverylurid";i:7837;s:7:"notlurk";i:7838;s:11:"notverylurk";i:7839;s:10:"notlurking";i:7840;s:14:"notverylurking";i:7841;s:8:"notlying";i:7842;s:12:"notverylying";i:7843;s:10:"notmacabre";i:7844;s:14:"notverymacabre";i:7845;s:9:"notmadden";i:7846;s:13:"notverymadden";i:7847;s:12:"notmaddening";i:7848;s:16:"notverymaddening";i:7849;s:14:"notmaddeningly";i:7850;s:18:"notverymaddeningly";i:7851;s:9:"notmadder";i:7852;s:13:"notverymadder";i:7853;s:8:"notmadly";i:7854;s:12:"notverymadly";i:7855;s:9:"notmadman";i:7856;s:13:"notverymadman";i:7857;s:10:"notmadness";i:7858;s:14:"notverymadness";i:7859;s:14:"notmaladjusted";i:7860;s:18:"notverymaladjusted";i:7861;s:16:"notmaladjustment";i:7862;s:20:"notverymaladjustment";i:7863;s:9:"notmalady";i:7864;s:13:"notverymalady";i:7865;s:10:"notmalaise";i:7866;s:14:"notverymalaise";i:7867;s:13:"notmalcontent";i:7868;s:17:"notverymalcontent";i:7869;s:15:"notmalcontented";i:7870;s:19:"notverymalcontented";i:7871;s:11:"notmaledict";i:7872;s:15:"notverymaledict";i:7873;s:14:"notmalevolence";i:7874;s:18:"notverymalevolence";i:7875;s:13:"notmalevolent";i:7876;s:17:"notverymalevolent";i:7877;s:15:"notmalevolently";i:7878;s:19:"notverymalevolently";i:7879;s:9:"notmalice";i:7880;s:13:"notverymalice";i:7881;s:12:"notmalicious";i:7882;s:16:"notverymalicious";i:7883;s:14:"notmaliciously";i:7884;s:18:"notverymaliciously";i:7885;s:16:"notmaliciousness";i:7886;s:20:"notverymaliciousness";i:7887;s:9:"notmalign";i:7888;s:13:"notverymalign";i:7889;s:12:"notmalignant";i:7890;s:16:"notverymalignant";i:7891;s:13:"notmalodorous";i:7892;s:17:"notverymalodorous";i:7893;s:15:"notmaltreatment";i:7894;s:19:"notverymaltreatment";i:7895;s:11:"notmaneuver";i:7896;s:15:"notverymaneuver";i:7897;s:9:"notmangle";i:7898;s:13:"notverymangle";i:7899;s:8:"notmania";i:7900;s:12:"notverymania";i:7901;s:9:"notmaniac";i:7902;s:13:"notverymaniac";i:7903;s:11:"notmaniacal";i:7904;s:15:"notverymaniacal";i:7905;s:8:"notmanic";i:7906;s:12:"notverymanic";i:7907;s:13:"notmanipulate";i:7908;s:17:"notverymanipulate";i:7909;s:15:"notmanipulation";i:7910;s:19:"notverymanipulation";i:7911;s:15:"notmanipulative";i:7912;s:19:"notverymanipulative";i:7913;s:15:"notmanipulators";i:7914;s:19:"notverymanipulators";i:7915;s:6:"notmar";i:7916;s:10:"notverymar";i:7917;s:11:"notmarginal";i:7918;s:15:"notverymarginal";i:7919;s:13:"notmarginally";i:7920;s:17:"notverymarginally";i:7921;s:12:"notmartyrdom";i:7922;s:16:"notverymartyrdom";i:7923;s:20:"notmartyrdom-seeking";i:7924;s:24:"notverymartyrdom-seeking";i:7925;s:11:"notmassacre";i:7926;s:15:"notverymassacre";i:7927;s:12:"notmassacres";i:7928;s:16:"notverymassacres";i:7929;s:11:"notmaverick";i:7930;s:15:"notverymaverick";i:7931;s:10:"notmawkish";i:7932;s:14:"notverymawkish";i:7933;s:12:"notmawkishly";i:7934;s:16:"notverymawkishly";i:7935;s:14:"notmawkishness";i:7936;s:18:"notverymawkishness";i:7937;s:19:"notmaxi-devaluation";i:7938;s:23:"notverymaxi-devaluation";i:7939;s:9:"notmeager";i:7940;s:13:"notverymeager";i:7941;s:14:"notmeaningless";i:7942;s:18:"notverymeaningless";i:7943;s:11:"notmeanness";i:7944;s:15:"notverymeanness";i:7945;s:9:"notmeddle";i:7946;s:13:"notverymeddle";i:7947;s:13:"notmeddlesome";i:7948;s:17:"notverymeddlesome";i:7949;s:13:"notmediocrity";i:7950;s:17:"notverymediocrity";i:7951;s:13:"notmelancholy";i:7952;s:17:"notverymelancholy";i:7953;s:15:"notmelodramatic";i:7954;s:19:"notverymelodramatic";i:7955;s:19:"notmelodramatically";i:7956;s:23:"notverymelodramatically";i:7957;s:9:"notmenace";i:7958;s:13:"notverymenace";i:7959;s:11:"notmenacing";i:7960;s:15:"notverymenacing";i:7961;s:13:"notmenacingly";i:7962;s:17:"notverymenacingly";i:7963;s:13:"notmendacious";i:7964;s:17:"notverymendacious";i:7965;s:12:"notmendacity";i:7966;s:16:"notverymendacity";i:7967;s:9:"notmenial";i:7968;s:13:"notverymenial";i:7969;s:12:"notmerciless";i:7970;s:16:"notverymerciless";i:7971;s:14:"notmercilessly";i:7972;s:18:"notverymercilessly";i:7973;s:7:"notmere";i:7974;s:11:"notverymere";i:7975;s:7:"notmess";i:7976;s:11:"notverymess";i:7977;s:9:"notmidget";i:7978;s:13:"notverymidget";i:7979;s:7:"notmiff";i:7980;s:11:"notverymiff";i:7981;s:12:"notmilitancy";i:7982;s:16:"notverymilitancy";i:7983;s:7:"notmind";i:7984;s:11:"notverymind";i:7985;s:11:"notmindless";i:7986;s:15:"notverymindless";i:7987;s:13:"notmindlessly";i:7988;s:17:"notverymindlessly";i:7989;s:9:"notmirage";i:7990;s:13:"notverymirage";i:7991;s:7:"notmire";i:7992;s:11:"notverymire";i:7993;s:15:"notmisapprehend";i:7994;s:19:"notverymisapprehend";i:7995;s:14:"notmisbecoming";i:7996;s:18:"notverymisbecoming";i:7997;s:12:"notmisbecome";i:7998;s:16:"notverymisbecome";i:7999;s:14:"notmisbegotten";i:8000;s:18:"notverymisbegotten";i:8001;s:12:"notmisbehave";i:8002;s:16:"notverymisbehave";i:8003;s:14:"notmisbehavior";i:8004;s:18:"notverymisbehavior";i:8005;s:15:"notmiscalculate";i:8006;s:19:"notverymiscalculate";i:8007;s:17:"notmiscalculation";i:8008;s:21:"notverymiscalculation";i:8009;s:11:"notmischief";i:8010;s:15:"notverymischief";i:8011;s:14:"notmischievous";i:8012;s:18:"notverymischievous";i:8013;s:16:"notmischievously";i:8014;s:20:"notverymischievously";i:8015;s:16:"notmisconception";i:8016;s:20:"notverymisconception";i:8017;s:17:"notmisconceptions";i:8018;s:21:"notverymisconceptions";i:8019;s:12:"notmiscreant";i:8020;s:16:"notverymiscreant";i:8021;s:13:"notmiscreants";i:8022;s:17:"notverymiscreants";i:8023;s:15:"notmisdirection";i:8024;s:19:"notverymisdirection";i:8025;s:8:"notmiser";i:8026;s:12:"notverymiser";i:8027;s:10:"notmiserly";i:8028;s:14:"notverymiserly";i:8029;s:16:"notmiserableness";i:8030;s:20:"notverymiserableness";i:8031;s:12:"notmiserably";i:8032;s:16:"notverymiserably";i:8033;s:11:"notmiseries";i:8034;s:15:"notverymiseries";i:8035;s:9:"notmisery";i:8036;s:13:"notverymisery";i:8037;s:9:"notmisfit";i:8038;s:13:"notverymisfit";i:8039;s:13:"notmisfortune";i:8040;s:17:"notverymisfortune";i:8041;s:12:"notmisgiving";i:8042;s:16:"notverymisgiving";i:8043;s:13:"notmisgivings";i:8044;s:17:"notverymisgivings";i:8045;s:14:"notmisguidance";i:8046;s:18:"notverymisguidance";i:8047;s:11:"notmisguide";i:8048;s:15:"notverymisguide";i:8049;s:12:"notmisguided";i:8050;s:16:"notverymisguided";i:8051;s:12:"notmishandle";i:8052;s:16:"notverymishandle";i:8053;s:9:"notmishap";i:8054;s:13:"notverymishap";i:8055;s:12:"notmisinform";i:8056;s:16:"notverymisinform";i:8057;s:14:"notmisinformed";i:8058;s:18:"notverymisinformed";i:8059;s:15:"notmisinterpret";i:8060;s:19:"notverymisinterpret";i:8061;s:11:"notmisjudge";i:8062;s:15:"notverymisjudge";i:8063;s:14:"notmisjudgment";i:8064;s:18:"notverymisjudgment";i:8065;s:10:"notmislead";i:8066;s:14:"notverymislead";i:8067;s:13:"notmisleading";i:8068;s:17:"notverymisleading";i:8069;s:15:"notmisleadingly";i:8070;s:19:"notverymisleadingly";i:8071;s:10:"notmislike";i:8072;s:14:"notverymislike";i:8073;s:12:"notmismanage";i:8074;s:16:"notverymismanage";i:8075;s:10:"notmisread";i:8076;s:14:"notverymisread";i:8077;s:13:"notmisreading";i:8078;s:17:"notverymisreading";i:8079;s:15:"notmisrepresent";i:8080;s:19:"notverymisrepresent";i:8081;s:20:"notmisrepresentation";i:8082;s:24:"notverymisrepresentation";i:8083;s:7:"notmiss";i:8084;s:11:"notverymiss";i:8085;s:15:"notmisstatement";i:8086;s:19:"notverymisstatement";i:8087;s:10:"notmistake";i:8088;s:14:"notverymistake";i:8089;s:13:"notmistakenly";i:8090;s:17:"notverymistakenly";i:8091;s:11:"notmistakes";i:8092;s:15:"notverymistakes";i:8093;s:11:"notmistrust";i:8094;s:15:"notverymistrust";i:8095;s:14:"notmistrustful";i:8096;s:18:"notverymistrustful";i:8097;s:16:"notmistrustfully";i:8098;s:20:"notverymistrustfully";i:8099;s:16:"notmisunderstand";i:8100;s:20:"notverymisunderstand";i:8101;s:19:"notmisunderstanding";i:8102;s:23:"notverymisunderstanding";i:8103;s:20:"notmisunderstandings";i:8104;s:24:"notverymisunderstandings";i:8105;s:9:"notmisuse";i:8106;s:13:"notverymisuse";i:8107;s:7:"notmoan";i:8108;s:11:"notverymoan";i:8109;s:7:"notmock";i:8110;s:11:"notverymock";i:8111;s:12:"notmockeries";i:8112;s:16:"notverymockeries";i:8113;s:10:"notmockery";i:8114;s:14:"notverymockery";i:8115;s:10:"notmocking";i:8116;s:14:"notverymocking";i:8117;s:12:"notmockingly";i:8118;s:16:"notverymockingly";i:8119;s:9:"notmolest";i:8120;s:13:"notverymolest";i:8121;s:14:"notmolestation";i:8122;s:18:"notverymolestation";i:8123;s:13:"notmonotonous";i:8124;s:17:"notverymonotonous";i:8125;s:11:"notmonotony";i:8126;s:15:"notverymonotony";i:8127;s:10:"notmonster";i:8128;s:14:"notverymonster";i:8129;s:16:"notmonstrosities";i:8130;s:20:"notverymonstrosities";i:8131;s:14:"notmonstrosity";i:8132;s:18:"notverymonstrosity";i:8133;s:12:"notmonstrous";i:8134;s:16:"notverymonstrous";i:8135;s:14:"notmonstrously";i:8136;s:18:"notverymonstrously";i:8137;s:7:"notmoon";i:8138;s:11:"notverymoon";i:8139;s:7:"notmoot";i:8140;s:11:"notverymoot";i:8141;s:7:"notmope";i:8142;s:11:"notverymope";i:8143;s:9:"notmorbid";i:8144;s:13:"notverymorbid";i:8145;s:11:"notmorbidly";i:8146;s:15:"notverymorbidly";i:8147;s:10:"notmordant";i:8148;s:14:"notverymordant";i:8149;s:12:"notmordantly";i:8150;s:16:"notverymordantly";i:8151;s:11:"notmoribund";i:8152;s:15:"notverymoribund";i:8153;s:16:"notmortification";i:8154;s:20:"notverymortification";i:8155;s:12:"notmortified";i:8156;s:16:"notverymortified";i:8157;s:10:"notmortify";i:8158;s:14:"notverymortify";i:8159;s:13:"notmortifying";i:8160;s:17:"notverymortifying";i:8161;s:13:"notmotionless";i:8162;s:17:"notverymotionless";i:8163;s:9:"notmotley";i:8164;s:13:"notverymotley";i:8165;s:8:"notmourn";i:8166;s:12:"notverymourn";i:8167;s:10:"notmourner";i:8168;s:14:"notverymourner";i:8169;s:11:"notmournful";i:8170;s:15:"notverymournful";i:8171;s:13:"notmournfully";i:8172;s:17:"notverymournfully";i:8173;s:9:"notmuddle";i:8174;s:13:"notverymuddle";i:8175;s:8:"notmuddy";i:8176;s:12:"notverymuddy";i:8177;s:13:"notmudslinger";i:8178;s:17:"notverymudslinger";i:8179;s:14:"notmudslinging";i:8180;s:18:"notverymudslinging";i:8181;s:9:"notmulish";i:8182;s:13:"notverymulish";i:8183;s:21:"notmulti-polarization";i:8184;s:25:"notverymulti-polarization";i:8185;s:10:"notmundane";i:8186;s:14:"notverymundane";i:8187;s:9:"notmurder";i:8188;s:13:"notverymurder";i:8189;s:12:"notmurderous";i:8190;s:16:"notverymurderous";i:8191;s:14:"notmurderously";i:8192;s:18:"notverymurderously";i:8193;s:8:"notmurky";i:8194;s:12:"notverymurky";i:8195;s:17:"notmuscle-flexing";i:8196;s:21:"notverymuscle-flexing";i:8197;s:13:"notmysterious";i:8198;s:17:"notverymysterious";i:8199;s:15:"notmysteriously";i:8200;s:19:"notverymysteriously";i:8201;s:10:"notmystery";i:8202;s:14:"notverymystery";i:8203;s:10:"notmystify";i:8204;s:14:"notverymystify";i:8205;s:12:"notmistified";i:8206;s:16:"notverymistified";i:8207;s:7:"notmyth";i:8208;s:11:"notverymyth";i:8209;s:6:"notnag";i:8210;s:10:"notverynag";i:8211;s:10:"notnagging";i:8212;s:14:"notverynagging";i:8213;s:8:"notnaive";i:8214;s:12:"notverynaive";i:8215;s:10:"notnaively";i:8216;s:14:"notverynaively";i:8217;s:9:"notnarrow";i:8218;s:13:"notverynarrow";i:8219;s:11:"notnarrower";i:8220;s:15:"notverynarrower";i:8221;s:10:"notnastily";i:8222;s:14:"notverynastily";i:8223;s:12:"notnastiness";i:8224;s:16:"notverynastiness";i:8225;s:8:"notnasty";i:8226;s:12:"notverynasty";i:8227;s:14:"notnationalism";i:8228;s:18:"notverynationalism";i:8229;s:10:"notnaughty";i:8230;s:14:"notverynaughty";i:8231;s:11:"notnauseate";i:8232;s:15:"notverynauseate";i:8233;s:13:"notnauseating";i:8234;s:17:"notverynauseating";i:8235;s:15:"notnauseatingly";i:8236;s:19:"notverynauseatingly";i:8237;s:11:"notnebulous";i:8238;s:15:"notverynebulous";i:8239;s:13:"notnebulously";i:8240;s:17:"notverynebulously";i:8241;s:11:"notneedless";i:8242;s:15:"notveryneedless";i:8243;s:13:"notneedlessly";i:8244;s:17:"notveryneedlessly";i:8245;s:12:"notnefarious";i:8246;s:16:"notverynefarious";i:8247;s:14:"notnefariously";i:8248;s:18:"notverynefariously";i:8249;s:9:"notnegate";i:8250;s:13:"notverynegate";i:8251;s:11:"notnegation";i:8252;s:15:"notverynegation";i:8253;s:10:"notneglect";i:8254;s:14:"notveryneglect";i:8255;s:12:"notneglected";i:8256;s:16:"notveryneglected";i:8257;s:12:"notnegligent";i:8258;s:16:"notverynegligent";i:8259;s:13:"notnegligence";i:8260;s:17:"notverynegligence";i:8261;s:13:"notnegligible";i:8262;s:17:"notverynegligible";i:8263;s:10:"notnemesis";i:8264;s:14:"notverynemesis";i:8265;s:9:"notnettle";i:8266;s:13:"notverynettle";i:8267;s:13:"notnettlesome";i:8268;s:17:"notverynettlesome";i:8269;s:12:"notnervously";i:8270;s:16:"notverynervously";i:8271;s:14:"notnervousness";i:8272;s:18:"notverynervousness";i:8273;s:15:"notneurotically";i:8274;s:19:"notveryneurotically";i:8275;s:9:"notniggle";i:8276;s:13:"notveryniggle";i:8277;s:12:"notnightmare";i:8278;s:16:"notverynightmare";i:8279;s:14:"notnightmarish";i:8280;s:18:"notverynightmarish";i:8281;s:16:"notnightmarishly";i:8282;s:20:"notverynightmarishly";i:8283;s:6:"notnix";i:8284;s:10:"notverynix";i:8285;s:8:"notnoisy";i:8286;s:12:"notverynoisy";i:8287;s:17:"notnon-confidence";i:8288;s:21:"notverynon-confidence";i:8289;s:14:"notnonexistent";i:8290;s:18:"notverynonexistent";i:8291;s:11:"notnonsense";i:8292;s:15:"notverynonsense";i:8293;s:8:"notnosey";i:8294;s:12:"notverynosey";i:8295;s:12:"notnotorious";i:8296;s:16:"notverynotorious";i:8297;s:14:"notnotoriously";i:8298;s:18:"notverynotoriously";i:8299;s:11:"notnuisance";i:8300;s:15:"notverynuisance";i:8301;s:8:"notobese";i:8302;s:12:"notveryobese";i:8303;s:9:"notobject";i:8304;s:13:"notveryobject";i:8305;s:12:"notobjection";i:8306;s:16:"notveryobjection";i:8307;s:16:"notobjectionable";i:8308;s:20:"notveryobjectionable";i:8309;s:13:"notobjections";i:8310;s:17:"notveryobjections";i:8311;s:10:"notoblique";i:8312;s:14:"notveryoblique";i:8313;s:13:"notobliterate";i:8314;s:17:"notveryobliterate";i:8315;s:14:"notobliterated";i:8316;s:18:"notveryobliterated";i:8317;s:12:"notoblivious";i:8318;s:16:"notveryoblivious";i:8319;s:12:"notobnoxious";i:8320;s:16:"notveryobnoxious";i:8321;s:14:"notobnoxiously";i:8322;s:18:"notveryobnoxiously";i:8323;s:10:"notobscene";i:8324;s:14:"notveryobscene";i:8325;s:12:"notobscenely";i:8326;s:16:"notveryobscenely";i:8327;s:12:"notobscenity";i:8328;s:16:"notveryobscenity";i:8329;s:10:"notobscure";i:8330;s:14:"notveryobscure";i:8331;s:12:"notobscurity";i:8332;s:16:"notveryobscurity";i:8333;s:9:"notobsess";i:8334;s:13:"notveryobsess";i:8335;s:12:"notobsession";i:8336;s:16:"notveryobsession";i:8337;s:13:"notobsessions";i:8338;s:17:"notveryobsessions";i:8339;s:14:"notobsessively";i:8340;s:18:"notveryobsessively";i:8341;s:16:"notobsessiveness";i:8342;s:20:"notveryobsessiveness";i:8343;s:11:"notobsolete";i:8344;s:15:"notveryobsolete";i:8345;s:11:"notobstacle";i:8346;s:15:"notveryobstacle";i:8347;s:12:"notobstinate";i:8348;s:16:"notveryobstinate";i:8349;s:14:"notobstinately";i:8350;s:18:"notveryobstinately";i:8351;s:11:"notobstruct";i:8352;s:15:"notveryobstruct";i:8353;s:14:"notobstruction";i:8354;s:18:"notveryobstruction";i:8355;s:12:"notobtrusive";i:8356;s:16:"notveryobtrusive";i:8357;s:9:"notobtuse";i:8358;s:13:"notveryobtuse";i:8359;s:8:"notodder";i:8360;s:12:"notveryodder";i:8361;s:9:"notoddest";i:8362;s:13:"notveryoddest";i:8363;s:11:"notoddities";i:8364;s:15:"notveryoddities";i:8365;s:9:"notoddity";i:8366;s:13:"notveryoddity";i:8367;s:8:"notoddly";i:8368;s:12:"notveryoddly";i:8369;s:10:"notoffence";i:8370;s:14:"notveryoffence";i:8371;s:9:"notoffend";i:8372;s:13:"notveryoffend";i:8373;s:12:"notoffending";i:8374;s:16:"notveryoffending";i:8375;s:11:"notoffenses";i:8376;s:15:"notveryoffenses";i:8377;s:12:"notoffensive";i:8378;s:16:"notveryoffensive";i:8379;s:14:"notoffensively";i:8380;s:18:"notveryoffensively";i:8381;s:16:"notoffensiveness";i:8382;s:20:"notveryoffensiveness";i:8383;s:12:"notofficious";i:8384;s:16:"notveryofficious";i:8385;s:10:"notominous";i:8386;s:14:"notveryominous";i:8387;s:12:"notominously";i:8388;s:16:"notveryominously";i:8389;s:11:"notomission";i:8390;s:15:"notveryomission";i:8391;s:7:"notomit";i:8392;s:11:"notveryomit";i:8393;s:11:"notone-side";i:8394;s:15:"notveryone-side";i:8395;s:12:"notone-sided";i:8396;s:16:"notveryone-sided";i:8397;s:10:"notonerous";i:8398;s:14:"notveryonerous";i:8399;s:12:"notonerously";i:8400;s:16:"notveryonerously";i:8401;s:12:"notonslaught";i:8402;s:16:"notveryonslaught";i:8403;s:14:"notopinionated";i:8404;s:18:"notveryopinionated";i:8405;s:11:"notopponent";i:8406;s:15:"notveryopponent";i:8407;s:16:"notopportunistic";i:8408;s:20:"notveryopportunistic";i:8409;s:9:"notoppose";i:8410;s:13:"notveryoppose";i:8411;s:13:"notopposition";i:8412;s:17:"notveryopposition";i:8413;s:14:"notoppositions";i:8414;s:18:"notveryoppositions";i:8415;s:10:"notoppress";i:8416;s:14:"notveryoppress";i:8417;s:13:"notoppression";i:8418;s:17:"notveryoppression";i:8419;s:13:"notoppressive";i:8420;s:17:"notveryoppressive";i:8421;s:15:"notoppressively";i:8422;s:19:"notveryoppressively";i:8423;s:17:"notoppressiveness";i:8424;s:21:"notveryoppressiveness";i:8425;s:13:"notoppressors";i:8426;s:17:"notveryoppressors";i:8427;s:9:"notordeal";i:8428;s:13:"notveryordeal";i:8429;s:9:"notorphan";i:8430;s:13:"notveryorphan";i:8431;s:12:"notostracize";i:8432;s:16:"notveryostracize";i:8433;s:11:"notoutbreak";i:8434;s:15:"notveryoutbreak";i:8435;s:11:"notoutburst";i:8436;s:15:"notveryoutburst";i:8437;s:12:"notoutbursts";i:8438;s:16:"notveryoutbursts";i:8439;s:10:"notoutcast";i:8440;s:14:"notveryoutcast";i:8441;s:9:"notoutcry";i:8442;s:13:"notveryoutcry";i:8443;s:11:"notoutdated";i:8444;s:15:"notveryoutdated";i:8445;s:9:"notoutlaw";i:8446;s:13:"notveryoutlaw";i:8447;s:11:"notoutmoded";i:8448;s:15:"notveryoutmoded";i:8449;s:10:"notoutrage";i:8450;s:14:"notveryoutrage";i:8451;s:11:"notoutraged";i:8452;s:15:"notveryoutraged";i:8453;s:13:"notoutrageous";i:8454;s:17:"notveryoutrageous";i:8455;s:15:"notoutrageously";i:8456;s:19:"notveryoutrageously";i:8457;s:17:"notoutrageousness";i:8458;s:21:"notveryoutrageousness";i:8459;s:11:"notoutrages";i:8460;s:15:"notveryoutrages";i:8461;s:11:"notoutsider";i:8462;s:15:"notveryoutsider";i:8463;s:13:"notover-acted";i:8464;s:17:"notveryover-acted";i:8465;s:17:"notover-valuation";i:8466;s:21:"notveryover-valuation";i:8467;s:10:"notoveract";i:8468;s:14:"notveryoveract";i:8469;s:12:"notoveracted";i:8470;s:16:"notveryoveracted";i:8471;s:10:"notoverawe";i:8472;s:14:"notveryoverawe";i:8473;s:14:"notoverbalance";i:8474;s:18:"notveryoverbalance";i:8475;s:15:"notoverbalanced";i:8476;s:19:"notveryoverbalanced";i:8477;s:14:"notoverbearing";i:8478;s:18:"notveryoverbearing";i:8479;s:16:"notoverbearingly";i:8480;s:20:"notveryoverbearingly";i:8481;s:12:"notoverblown";i:8482;s:16:"notveryoverblown";i:8483;s:11:"notovercome";i:8484;s:15:"notveryovercome";i:8485;s:9:"notoverdo";i:8486;s:13:"notveryoverdo";i:8487;s:11:"notoverdone";i:8488;s:15:"notveryoverdone";i:8489;s:10:"notoverdue";i:8490;s:14:"notveryoverdue";i:8491;s:16:"notoveremphasize";i:8492;s:20:"notveryoveremphasize";i:8493;s:11:"notoverkill";i:8494;s:15:"notveryoverkill";i:8495;s:11:"notoverlook";i:8496;s:15:"notveryoverlook";i:8497;s:11:"notoverplay";i:8498;s:15:"notveryoverplay";i:8499;s:12:"notoverpower";i:8500;s:16:"notveryoverpower";i:8501;s:12:"notoverreach";i:8502;s:16:"notveryoverreach";i:8503;s:10:"notoverrun";i:8504;s:14:"notveryoverrun";i:8505;s:13:"notovershadow";i:8506;s:17:"notveryovershadow";i:8507;s:12:"notoversight";i:8508;s:16:"notveryoversight";i:8509;s:21:"notoversimplification";i:8510;s:25:"notveryoversimplification";i:8511;s:17:"notoversimplified";i:8512;s:21:"notveryoversimplified";i:8513;s:15:"notoversimplify";i:8514;s:19:"notveryoversimplify";i:8515;s:12:"notoversized";i:8516;s:16:"notveryoversized";i:8517;s:12:"notoverstate";i:8518;s:16:"notveryoverstate";i:8519;s:16:"notoverstatement";i:8520;s:20:"notveryoverstatement";i:8521;s:17:"notoverstatements";i:8522;s:21:"notveryoverstatements";i:8523;s:12:"notovertaxed";i:8524;s:16:"notveryovertaxed";i:8525;s:12:"notoverthrow";i:8526;s:16:"notveryoverthrow";i:8527;s:11:"notoverturn";i:8528;s:15:"notveryoverturn";i:8529;s:12:"notoverwhelm";i:8530;s:16:"notveryoverwhelm";i:8531;s:15:"notoverwhelming";i:8532;s:19:"notveryoverwhelming";i:8533;s:17:"notoverwhelmingly";i:8534;s:21:"notveryoverwhelmingly";i:8535;s:13:"notoverworked";i:8536;s:17:"notveryoverworked";i:8537;s:14:"notoverzealous";i:8538;s:18:"notveryoverzealous";i:8539;s:16:"notoverzealously";i:8540;s:20:"notveryoverzealously";i:8541;s:10:"notpainful";i:8542;s:14:"notverypainful";i:8543;s:12:"notpainfully";i:8544;s:16:"notverypainfully";i:8545;s:8:"notpains";i:8546;s:12:"notverypains";i:8547;s:7:"notpale";i:8548;s:11:"notverypale";i:8549;s:9:"notpaltry";i:8550;s:13:"notverypaltry";i:8551;s:6:"notpan";i:8552;s:10:"notverypan";i:8553;s:14:"notpandemonium";i:8554;s:18:"notverypandemonium";i:8555;s:10:"notpanicky";i:8556;s:14:"notverypanicky";i:8557;s:14:"notparadoxical";i:8558;s:18:"notveryparadoxical";i:8559;s:16:"notparadoxically";i:8560;s:20:"notveryparadoxically";i:8561;s:11:"notparalize";i:8562;s:15:"notveryparalize";i:8563;s:12:"notparalyzed";i:8564;s:16:"notveryparalyzed";i:8565;s:11:"notparanoia";i:8566;s:15:"notveryparanoia";i:8567;s:11:"notparasite";i:8568;s:15:"notveryparasite";i:8569;s:9:"notpariah";i:8570;s:13:"notverypariah";i:8571;s:9:"notparody";i:8572;s:13:"notveryparody";i:8573;s:13:"notpartiality";i:8574;s:17:"notverypartiality";i:8575;s:11:"notpartisan";i:8576;s:15:"notverypartisan";i:8577;s:12:"notpartisans";i:8578;s:16:"notverypartisans";i:8579;s:8:"notpasse";i:8580;s:12:"notverypasse";i:8581;s:14:"notpassiveness";i:8582;s:18:"notverypassiveness";i:8583;s:15:"notpathetically";i:8584;s:19:"notverypathetically";i:8585;s:12:"notpatronize";i:8586;s:16:"notverypatronize";i:8587;s:10:"notpaucity";i:8588;s:14:"notverypaucity";i:8589;s:9:"notpauper";i:8590;s:13:"notverypauper";i:8591;s:10:"notpaupers";i:8592;s:14:"notverypaupers";i:8593;s:10:"notpayback";i:8594;s:14:"notverypayback";i:8595;s:11:"notpeculiar";i:8596;s:15:"notverypeculiar";i:8597;s:13:"notpeculiarly";i:8598;s:17:"notverypeculiarly";i:8599;s:11:"notpedantic";i:8600;s:15:"notverypedantic";i:8601;s:13:"notpedestrian";i:8602;s:17:"notverypedestrian";i:8603;s:8:"notpeeve";i:8604;s:12:"notverypeeve";i:8605;s:9:"notpeeved";i:8606;s:13:"notverypeeved";i:8607;s:10:"notpeevish";i:8608;s:14:"notverypeevish";i:8609;s:12:"notpeevishly";i:8610;s:16:"notverypeevishly";i:8611;s:11:"notpenalize";i:8612;s:15:"notverypenalize";i:8613;s:10:"notpenalty";i:8614;s:14:"notverypenalty";i:8615;s:13:"notperfidious";i:8616;s:17:"notveryperfidious";i:8617;s:12:"notperfidity";i:8618;s:16:"notveryperfidity";i:8619;s:14:"notperfunctory";i:8620;s:18:"notveryperfunctory";i:8621;s:8:"notperil";i:8622;s:12:"notveryperil";i:8623;s:11:"notperilous";i:8624;s:15:"notveryperilous";i:8625;s:13:"notperilously";i:8626;s:17:"notveryperilously";i:8627;s:13:"notperipheral";i:8628;s:17:"notveryperipheral";i:8629;s:9:"notperish";i:8630;s:13:"notveryperish";i:8631;s:13:"notpernicious";i:8632;s:17:"notverypernicious";i:8633;s:10:"notperplex";i:8634;s:14:"notveryperplex";i:8635;s:12:"notperplexed";i:8636;s:16:"notveryperplexed";i:8637;s:13:"notperplexing";i:8638;s:17:"notveryperplexing";i:8639;s:13:"notperplexity";i:8640;s:17:"notveryperplexity";i:8641;s:12:"notpersecute";i:8642;s:16:"notverypersecute";i:8643;s:14:"notpersecution";i:8644;s:18:"notverypersecution";i:8645;s:15:"notpertinacious";i:8646;s:19:"notverypertinacious";i:8647;s:17:"notpertinaciously";i:8648;s:21:"notverypertinaciously";i:8649;s:14:"notpertinacity";i:8650;s:18:"notverypertinacity";i:8651;s:10:"notperturb";i:8652;s:14:"notveryperturb";i:8653;s:12:"notperturbed";i:8654;s:16:"notveryperturbed";i:8655;s:11:"notperverse";i:8656;s:15:"notveryperverse";i:8657;s:13:"notperversely";i:8658;s:17:"notveryperversely";i:8659;s:13:"notperversion";i:8660;s:17:"notveryperversion";i:8661;s:13:"notperversity";i:8662;s:17:"notveryperversity";i:8663;s:10:"notpervert";i:8664;s:14:"notverypervert";i:8665;s:12:"notperverted";i:8666;s:16:"notveryperverted";i:8667;s:12:"notpessimism";i:8668;s:16:"notverypessimism";i:8669;s:18:"notpessimistically";i:8670;s:22:"notverypessimistically";i:8671;s:7:"notpest";i:8672;s:11:"notverypest";i:8673;s:12:"notpestilent";i:8674;s:16:"notverypestilent";i:8675;s:10:"notpetrify";i:8676;s:14:"notverypetrify";i:8677;s:11:"notpettifog";i:8678;s:15:"notverypettifog";i:8679;s:8:"notpetty";i:8680;s:12:"notverypetty";i:8681;s:9:"notphobia";i:8682;s:13:"notveryphobia";i:8683;s:9:"notphobic";i:8684;s:13:"notveryphobic";i:8685;s:8:"notpicky";i:8686;s:12:"notverypicky";i:8687;s:10:"notpillage";i:8688;s:14:"notverypillage";i:8689;s:10:"notpillory";i:8690;s:14:"notverypillory";i:8691;s:8:"notpinch";i:8692;s:12:"notverypinch";i:8693;s:7:"notpine";i:8694;s:11:"notverypine";i:8695;s:8:"notpique";i:8696;s:12:"notverypique";i:8697;s:11:"notpitiable";i:8698;s:15:"notverypitiable";i:8699;s:10:"notpitiful";i:8700;s:14:"notverypitiful";i:8701;s:12:"notpitifully";i:8702;s:16:"notverypitifully";i:8703;s:11:"notpitiless";i:8704;s:15:"notverypitiless";i:8705;s:13:"notpitilessly";i:8706;s:17:"notverypitilessly";i:8707;s:11:"notpittance";i:8708;s:15:"notverypittance";i:8709;s:7:"notpity";i:8710;s:11:"notverypity";i:8711;s:13:"notplagiarize";i:8712;s:17:"notveryplagiarize";i:8713;s:9:"notplague";i:8714;s:13:"notveryplague";i:8715;s:12:"notplaything";i:8716;s:16:"notveryplaything";i:8717;s:8:"notplead";i:8718;s:12:"notveryplead";i:8719;s:11:"notpleading";i:8720;s:15:"notverypleading";i:8721;s:13:"notpleadingly";i:8722;s:17:"notverypleadingly";i:8723;s:7:"notplea";i:8724;s:11:"notveryplea";i:8725;s:8:"notpleas";i:8726;s:12:"notverypleas";i:8727;s:11:"notplebeian";i:8728;s:15:"notveryplebeian";i:8729;s:9:"notplight";i:8730;s:13:"notveryplight";i:8731;s:7:"notplot";i:8732;s:11:"notveryplot";i:8733;s:11:"notplotters";i:8734;s:15:"notveryplotters";i:8735;s:7:"notploy";i:8736;s:11:"notveryploy";i:8737;s:10:"notplunder";i:8738;s:14:"notveryplunder";i:8739;s:12:"notplunderer";i:8740;s:16:"notveryplunderer";i:8741;s:12:"notpointless";i:8742;s:16:"notverypointless";i:8743;s:14:"notpointlessly";i:8744;s:18:"notverypointlessly";i:8745;s:9:"notpoison";i:8746;s:13:"notverypoison";i:8747;s:12:"notpoisonous";i:8748;s:16:"notverypoisonous";i:8749;s:14:"notpoisonously";i:8750;s:18:"notverypoisonously";i:8751;s:15:"notpolarisation";i:8752;s:19:"notverypolarisation";i:8753;s:11:"notpolemize";i:8754;s:15:"notverypolemize";i:8755;s:10:"notpollute";i:8756;s:14:"notverypollute";i:8757;s:11:"notpolluter";i:8758;s:15:"notverypolluter";i:8759;s:12:"notpolluters";i:8760;s:16:"notverypolluters";i:8761;s:11:"notpolution";i:8762;s:15:"notverypolution";i:8763;s:10:"notpompous";i:8764;s:14:"notverypompous";i:8765;s:9:"notpoorly";i:8766;s:13:"notverypoorly";i:8767;s:12:"notposturing";i:8768;s:16:"notveryposturing";i:8769;s:7:"notpout";i:8770;s:11:"notverypout";i:8771;s:10:"notpoverty";i:8772;s:14:"notverypoverty";i:8773;s:8:"notprate";i:8774;s:12:"notveryprate";i:8775;s:11:"notpratfall";i:8776;s:15:"notverypratfall";i:8777;s:10:"notprattle";i:8778;s:14:"notveryprattle";i:8779;s:13:"notprecarious";i:8780;s:17:"notveryprecarious";i:8781;s:15:"notprecariously";i:8782;s:19:"notveryprecariously";i:8783;s:14:"notprecipitate";i:8784;s:18:"notveryprecipitate";i:8785;s:14:"notprecipitous";i:8786;s:18:"notveryprecipitous";i:8787;s:12:"notpredatory";i:8788;s:16:"notverypredatory";i:8789;s:14:"notpredicament";i:8790;s:18:"notverypredicament";i:8791;s:11:"notprejudge";i:8792;s:15:"notveryprejudge";i:8793;s:12:"notprejudice";i:8794;s:16:"notveryprejudice";i:8795;s:14:"notprejudicial";i:8796;s:18:"notveryprejudicial";i:8797;s:15:"notpremeditated";i:8798;s:19:"notverypremeditated";i:8799;s:12:"notpreoccupy";i:8800;s:16:"notverypreoccupy";i:8801;s:15:"notpreposterous";i:8802;s:19:"notverypreposterous";i:8803;s:17:"notpreposterously";i:8804;s:21:"notverypreposterously";i:8805;s:11:"notpressing";i:8806;s:15:"notverypressing";i:8807;s:10:"notpresume";i:8808;s:14:"notverypresume";i:8809;s:15:"notpresumptuous";i:8810;s:19:"notverypresumptuous";i:8811;s:17:"notpresumptuously";i:8812;s:21:"notverypresumptuously";i:8813;s:11:"notpretence";i:8814;s:15:"notverypretence";i:8815;s:10:"notpretend";i:8816;s:14:"notverypretend";i:8817;s:11:"notpretense";i:8818;s:15:"notverypretense";i:8819;s:14:"notpretentious";i:8820;s:18:"notverypretentious";i:8821;s:16:"notpretentiously";i:8822;s:20:"notverypretentiously";i:8823;s:14:"notprevaricate";i:8824;s:18:"notveryprevaricate";i:8825;s:9:"notpricey";i:8826;s:13:"notverypricey";i:8827;s:10:"notprickle";i:8828;s:14:"notveryprickle";i:8829;s:11:"notprickles";i:8830;s:15:"notveryprickles";i:8831;s:11:"notprideful";i:8832;s:15:"notveryprideful";i:8833;s:12:"notprimitive";i:8834;s:16:"notveryprimitive";i:8835;s:9:"notprison";i:8836;s:13:"notveryprison";i:8837;s:11:"notprisoner";i:8838;s:15:"notveryprisoner";i:8839;s:10:"notproblem";i:8840;s:14:"notveryproblem";i:8841;s:14:"notproblematic";i:8842;s:18:"notveryproblematic";i:8843;s:11:"notproblems";i:8844;s:15:"notveryproblems";i:8845;s:16:"notprocrastinate";i:8846;s:20:"notveryprocrastinate";i:8847;s:18:"notprocrastination";i:8848;s:22:"notveryprocrastination";i:8849;s:10:"notprofane";i:8850;s:14:"notveryprofane";i:8851;s:12:"notprofanity";i:8852;s:16:"notveryprofanity";i:8853;s:11:"notprohibit";i:8854;s:15:"notveryprohibit";i:8855;s:14:"notprohibitive";i:8856;s:18:"notveryprohibitive";i:8857;s:16:"notprohibitively";i:8858;s:20:"notveryprohibitively";i:8859;s:13:"notpropaganda";i:8860;s:17:"notverypropaganda";i:8861;s:15:"notpropagandize";i:8862;s:19:"notverypropagandize";i:8863;s:15:"notproscription";i:8864;s:19:"notveryproscription";i:8865;s:16:"notproscriptions";i:8866;s:20:"notveryproscriptions";i:8867;s:12:"notprosecute";i:8868;s:16:"notveryprosecute";i:8869;s:10:"notprotest";i:8870;s:14:"notveryprotest";i:8871;s:11:"notprotests";i:8872;s:15:"notveryprotests";i:8873;s:13:"notprotracted";i:8874;s:17:"notveryprotracted";i:8875;s:14:"notprovocation";i:8876;s:18:"notveryprovocation";i:8877;s:14:"notprovocative";i:8878;s:18:"notveryprovocative";i:8879;s:10:"notprovoke";i:8880;s:14:"notveryprovoke";i:8881;s:6:"notpry";i:8882;s:10:"notverypry";i:8883;s:13:"notpugnacious";i:8884;s:17:"notverypugnacious";i:8885;s:15:"notpugnaciously";i:8886;s:19:"notverypugnaciously";i:8887;s:12:"notpugnacity";i:8888;s:16:"notverypugnacity";i:8889;s:8:"notpunch";i:8890;s:12:"notverypunch";i:8891;s:9:"notpunish";i:8892;s:13:"notverypunish";i:8893;s:13:"notpunishable";i:8894;s:17:"notverypunishable";i:8895;s:11:"notpunitive";i:8896;s:15:"notverypunitive";i:8897;s:7:"notpuny";i:8898;s:11:"notverypuny";i:8899;s:9:"notpuppet";i:8900;s:13:"notverypuppet";i:8901;s:10:"notpuppets";i:8902;s:14:"notverypuppets";i:8903;s:9:"notpuzzle";i:8904;s:13:"notverypuzzle";i:8905;s:13:"notpuzzlement";i:8906;s:17:"notverypuzzlement";i:8907;s:11:"notpuzzling";i:8908;s:15:"notverypuzzling";i:8909;s:8:"notquack";i:8910;s:12:"notveryquack";i:8911;s:9:"notqualms";i:8912;s:13:"notveryqualms";i:8913;s:11:"notquandary";i:8914;s:15:"notveryquandary";i:8915;s:10:"notquarrel";i:8916;s:14:"notveryquarrel";i:8917;s:14:"notquarrellous";i:8918;s:18:"notveryquarrellous";i:8919;s:16:"notquarrellously";i:8920;s:20:"notveryquarrellously";i:8921;s:11:"notquarrels";i:8922;s:15:"notveryquarrels";i:8923;s:8:"notquash";i:8924;s:12:"notveryquash";i:8925;s:15:"notquestionable";i:8926;s:19:"notveryquestionable";i:8927;s:10:"notquibble";i:8928;s:14:"notveryquibble";i:8929;s:7:"notquit";i:8930;s:11:"notveryquit";i:8931;s:10:"notquitter";i:8932;s:14:"notveryquitter";i:8933;s:9:"notracism";i:8934;s:13:"notveryracism";i:8935;s:9:"notracist";i:8936;s:13:"notveryracist";i:8937;s:10:"notracists";i:8938;s:14:"notveryracists";i:8939;s:7:"notrack";i:8940;s:11:"notveryrack";i:8941;s:10:"notradical";i:8942;s:14:"notveryradical";i:8943;s:17:"notradicalization";i:8944;s:21:"notveryradicalization";i:8945;s:12:"notradically";i:8946;s:16:"notveryradically";i:8947;s:11:"notradicals";i:8948;s:15:"notveryradicals";i:8949;s:9:"notragged";i:8950;s:13:"notveryragged";i:8951;s:9:"notraging";i:8952;s:13:"notveryraging";i:8953;s:7:"notrail";i:8954;s:11:"notveryrail";i:8955;s:10:"notrampage";i:8956;s:14:"notveryrampage";i:8957;s:10:"notrampant";i:8958;s:14:"notveryrampant";i:8959;s:13:"notramshackle";i:8960;s:17:"notveryramshackle";i:8961;s:9:"notrancor";i:8962;s:13:"notveryrancor";i:8963;s:7:"notrank";i:8964;s:11:"notveryrank";i:8965;s:9:"notrankle";i:8966;s:13:"notveryrankle";i:8967;s:7:"notrant";i:8968;s:11:"notveryrant";i:8969;s:10:"notranting";i:8970;s:14:"notveryranting";i:8971;s:12:"notrantingly";i:8972;s:16:"notveryrantingly";i:8973;s:9:"notrascal";i:8974;s:13:"notveryrascal";i:8975;s:7:"notrash";i:8976;s:11:"notveryrash";i:8977;s:6:"notrat";i:8978;s:10:"notveryrat";i:8979;s:14:"notrationalize";i:8980;s:18:"notveryrationalize";i:8981;s:9:"notrattle";i:8982;s:13:"notveryrattle";i:8983;s:9:"notravage";i:8984;s:13:"notveryravage";i:8985;s:9:"notraving";i:8986;s:13:"notveryraving";i:8987;s:14:"notreactionary";i:8988;s:18:"notveryreactionary";i:8989;s:13:"notrebellious";i:8990;s:17:"notveryrebellious";i:8991;s:9:"notrebuff";i:8992;s:13:"notveryrebuff";i:8993;s:9:"notrebuke";i:8994;s:13:"notveryrebuke";i:8995;s:15:"notrecalcitrant";i:8996;s:19:"notveryrecalcitrant";i:8997;s:9:"notrecant";i:8998;s:13:"notveryrecant";i:8999;s:12:"notrecession";i:9000;s:16:"notveryrecession";i:9001;s:15:"notrecessionary";i:9002;s:19:"notveryrecessionary";i:9003;s:11:"notreckless";i:9004;s:15:"notveryreckless";i:9005;s:13:"notrecklessly";i:9006;s:17:"notveryrecklessly";i:9007;s:15:"notrecklessness";i:9008;s:19:"notveryrecklessness";i:9009;s:9:"notrecoil";i:9010;s:13:"notveryrecoil";i:9011;s:12:"notrecourses";i:9012;s:16:"notveryrecourses";i:9013;s:13:"notredundancy";i:9014;s:17:"notveryredundancy";i:9015;s:12:"notredundant";i:9016;s:16:"notveryredundant";i:9017;s:10:"notrefusal";i:9018;s:14:"notveryrefusal";i:9019;s:9:"notrefuse";i:9020;s:13:"notveryrefuse";i:9021;s:13:"notrefutation";i:9022;s:17:"notveryrefutation";i:9023;s:9:"notrefute";i:9024;s:13:"notveryrefute";i:9025;s:10:"notregress";i:9026;s:14:"notveryregress";i:9027;s:13:"notregression";i:9028;s:17:"notveryregression";i:9029;s:13:"notregressive";i:9030;s:17:"notveryregressive";i:9031;s:12:"notregretful";i:9032;s:16:"notveryregretful";i:9033;s:14:"notregretfully";i:9034;s:18:"notveryregretfully";i:9035;s:14:"notregrettable";i:9036;s:18:"notveryregrettable";i:9037;s:14:"notregrettably";i:9038;s:18:"notveryregrettably";i:9039;s:9:"notreject";i:9040;s:13:"notveryreject";i:9041;s:12:"notrejection";i:9042;s:16:"notveryrejection";i:9043;s:10:"notrelapse";i:9044;s:14:"notveryrelapse";i:9045;s:13:"notrelentless";i:9046;s:17:"notveryrelentless";i:9047;s:15:"notrelentlessly";i:9048;s:19:"notveryrelentlessly";i:9049;s:17:"notrelentlessness";i:9050;s:21:"notveryrelentlessness";i:9051;s:13:"notreluctance";i:9052;s:17:"notveryreluctance";i:9053;s:12:"notreluctant";i:9054;s:16:"notveryreluctant";i:9055;s:14:"notreluctantly";i:9056;s:18:"notveryreluctantly";i:9057;s:10:"notremorse";i:9058;s:14:"notveryremorse";i:9059;s:13:"notremorseful";i:9060;s:17:"notveryremorseful";i:9061;s:15:"notremorsefully";i:9062;s:19:"notveryremorsefully";i:9063;s:14:"notremorseless";i:9064;s:18:"notveryremorseless";i:9065;s:16:"notremorselessly";i:9066;s:20:"notveryremorselessly";i:9067;s:18:"notremorselessness";i:9068;s:22:"notveryremorselessness";i:9069;s:11:"notrenounce";i:9070;s:15:"notveryrenounce";i:9071;s:15:"notrenunciation";i:9072;s:19:"notveryrenunciation";i:9073;s:8:"notrepel";i:9074;s:12:"notveryrepel";i:9075;s:13:"notrepetitive";i:9076;s:17:"notveryrepetitive";i:9077;s:16:"notreprehensible";i:9078;s:20:"notveryreprehensible";i:9079;s:16:"notreprehensibly";i:9080;s:20:"notveryreprehensibly";i:9081;s:15:"notreprehension";i:9082;s:19:"notveryreprehension";i:9083;s:15:"notreprehensive";i:9084;s:19:"notveryreprehensive";i:9085;s:10:"notrepress";i:9086;s:14:"notveryrepress";i:9087;s:13:"notrepression";i:9088;s:17:"notveryrepression";i:9089;s:13:"notrepressive";i:9090;s:17:"notveryrepressive";i:9091;s:12:"notreprimand";i:9092;s:16:"notveryreprimand";i:9093;s:11:"notreproach";i:9094;s:15:"notveryreproach";i:9095;s:14:"notreproachful";i:9096;s:18:"notveryreproachful";i:9097;s:10:"notreprove";i:9098;s:14:"notveryreprove";i:9099;s:14:"notreprovingly";i:9100;s:18:"notveryreprovingly";i:9101;s:12:"notrepudiate";i:9102;s:16:"notveryrepudiate";i:9103;s:14:"notrepudiation";i:9104;s:18:"notveryrepudiation";i:9105;s:9:"notrepugn";i:9106;s:13:"notveryrepugn";i:9107;s:13:"notrepugnance";i:9108;s:17:"notveryrepugnance";i:9109;s:12:"notrepugnant";i:9110;s:16:"notveryrepugnant";i:9111;s:14:"notrepugnantly";i:9112;s:18:"notveryrepugnantly";i:9113;s:10:"notrepulse";i:9114;s:14:"notveryrepulse";i:9115;s:11:"notrepulsed";i:9116;s:15:"notveryrepulsed";i:9117;s:12:"notrepulsing";i:9118;s:16:"notveryrepulsing";i:9119;s:12:"notrepulsive";i:9120;s:16:"notveryrepulsive";i:9121;s:14:"notrepulsively";i:9122;s:18:"notveryrepulsively";i:9123;s:16:"notrepulsiveness";i:9124;s:20:"notveryrepulsiveness";i:9125;s:9:"notresent";i:9126;s:13:"notveryresent";i:9127;s:13:"notresentment";i:9128;s:17:"notveryresentment";i:9129;s:15:"notreservations";i:9130;s:19:"notveryreservations";i:9131;s:14:"notresignation";i:9132;s:18:"notveryresignation";i:9133;s:11:"notresigned";i:9134;s:15:"notveryresigned";i:9135;s:13:"notresistance";i:9136;s:17:"notveryresistance";i:9137;s:12:"notresistant";i:9138;s:16:"notveryresistant";i:9139;s:11:"notrestless";i:9140;s:15:"notveryrestless";i:9141;s:15:"notrestlessness";i:9142;s:19:"notveryrestlessness";i:9143;s:11:"notrestrict";i:9144;s:15:"notveryrestrict";i:9145;s:13:"notrestricted";i:9146;s:17:"notveryrestricted";i:9147;s:14:"notrestriction";i:9148;s:18:"notveryrestriction";i:9149;s:14:"notrestrictive";i:9150;s:18:"notveryrestrictive";i:9151;s:12:"notretaliate";i:9152;s:16:"notveryretaliate";i:9153;s:14:"notretaliatory";i:9154;s:18:"notveryretaliatory";i:9155;s:9:"notretard";i:9156;s:13:"notveryretard";i:9157;s:11:"notreticent";i:9158;s:15:"notveryreticent";i:9159;s:9:"notretire";i:9160;s:13:"notveryretire";i:9161;s:10:"notretract";i:9162;s:14:"notveryretract";i:9163;s:10:"notretreat";i:9164;s:14:"notveryretreat";i:9165;s:10:"notrevenge";i:9166;s:14:"notveryrevenge";i:9167;s:15:"notrevengefully";i:9168;s:19:"notveryrevengefully";i:9169;s:9:"notrevert";i:9170;s:13:"notveryrevert";i:9171;s:9:"notrevile";i:9172;s:13:"notveryrevile";i:9173;s:10:"notreviled";i:9174;s:14:"notveryreviled";i:9175;s:9:"notrevoke";i:9176;s:13:"notveryrevoke";i:9177;s:9:"notrevolt";i:9178;s:13:"notveryrevolt";i:9179;s:12:"notrevolting";i:9180;s:16:"notveryrevolting";i:9181;s:14:"notrevoltingly";i:9182;s:18:"notveryrevoltingly";i:9183;s:12:"notrevulsion";i:9184;s:16:"notveryrevulsion";i:9185;s:12:"notrevulsive";i:9186;s:16:"notveryrevulsive";i:9187;s:13:"notrhapsodize";i:9188;s:17:"notveryrhapsodize";i:9189;s:11:"notrhetoric";i:9190;s:15:"notveryrhetoric";i:9191;s:13:"notrhetorical";i:9192;s:17:"notveryrhetorical";i:9193;s:6:"notrid";i:9194;s:10:"notveryrid";i:9195;s:11:"notridicule";i:9196;s:15:"notveryridicule";i:9197;s:15:"notridiculously";i:9198;s:19:"notveryridiculously";i:9199;s:7:"notrife";i:9200;s:11:"notveryrife";i:9201;s:7:"notrift";i:9202;s:11:"notveryrift";i:9203;s:8:"notrifts";i:9204;s:12:"notveryrifts";i:9205;s:8:"notrigid";i:9206;s:12:"notveryrigid";i:9207;s:8:"notrigor";i:9208;s:12:"notveryrigor";i:9209;s:11:"notrigorous";i:9210;s:15:"notveryrigorous";i:9211;s:7:"notrile";i:9212;s:11:"notveryrile";i:9213;s:8:"notriled";i:9214;s:12:"notveryriled";i:9215;s:7:"notrisk";i:9216;s:11:"notveryrisk";i:9217;s:8:"notrisky";i:9218;s:12:"notveryrisky";i:9219;s:8:"notrival";i:9220;s:12:"notveryrival";i:9221;s:10:"notrivalry";i:9222;s:14:"notveryrivalry";i:9223;s:13:"notroadblocks";i:9224;s:17:"notveryroadblocks";i:9225;s:8:"notrocky";i:9226;s:12:"notveryrocky";i:9227;s:8:"notrogue";i:9228;s:12:"notveryrogue";i:9229;s:16:"notrollercoaster";i:9230;s:20:"notveryrollercoaster";i:9231;s:6:"notrot";i:9232;s:10:"notveryrot";i:9233;s:8:"notrough";i:9234;s:12:"notveryrough";i:9235;s:7:"notrude";i:9236;s:11:"notveryrude";i:9237;s:6:"notrue";i:9238;s:10:"notveryrue";i:9239;s:10:"notruffian";i:9240;s:14:"notveryruffian";i:9241;s:9:"notruffle";i:9242;s:13:"notveryruffle";i:9243;s:7:"notruin";i:9244;s:11:"notveryruin";i:9245;s:10:"notruinous";i:9246;s:14:"notveryruinous";i:9247;s:11:"notrumbling";i:9248;s:15:"notveryrumbling";i:9249;s:8:"notrumor";i:9250;s:12:"notveryrumor";i:9251;s:9:"notrumors";i:9252;s:13:"notveryrumors";i:9253;s:10:"notrumours";i:9254;s:14:"notveryrumours";i:9255;s:9:"notrumple";i:9256;s:13:"notveryrumple";i:9257;s:11:"notrun-down";i:9258;s:15:"notveryrun-down";i:9259;s:10:"notrunaway";i:9260;s:14:"notveryrunaway";i:9261;s:10:"notrupture";i:9262;s:14:"notveryrupture";i:9263;s:8:"notrusty";i:9264;s:12:"notveryrusty";i:9265;s:11:"notruthless";i:9266;s:15:"notveryruthless";i:9267;s:13:"notruthlessly";i:9268;s:17:"notveryruthlessly";i:9269;s:15:"notruthlessness";i:9270;s:19:"notveryruthlessness";i:9271;s:11:"notsabotage";i:9272;s:15:"notverysabotage";i:9273;s:12:"notsacrifice";i:9274;s:16:"notverysacrifice";i:9275;s:9:"notsadden";i:9276;s:13:"notverysadden";i:9277;s:8:"notsadly";i:9278;s:12:"notverysadly";i:9279;s:10:"notsadness";i:9280;s:14:"notverysadness";i:9281;s:6:"notsag";i:9282;s:10:"notverysag";i:9283;s:12:"notsalacious";i:9284;s:16:"notverysalacious";i:9285;s:16:"notsanctimonious";i:9286;s:20:"notverysanctimonious";i:9287;s:6:"notsap";i:9288;s:10:"notverysap";i:9289;s:10:"notsarcasm";i:9290;s:14:"notverysarcasm";i:9291;s:16:"notsarcastically";i:9292;s:20:"notverysarcastically";i:9293;s:11:"notsardonic";i:9294;s:15:"notverysardonic";i:9295;s:15:"notsardonically";i:9296;s:19:"notverysardonically";i:9297;s:7:"notsass";i:9298;s:11:"notverysass";i:9299;s:12:"notsatirical";i:9300;s:16:"notverysatirical";i:9301;s:11:"notsatirize";i:9302;s:15:"notverysatirize";i:9303;s:9:"notsavage";i:9304;s:13:"notverysavage";i:9305;s:10:"notsavaged";i:9306;s:14:"notverysavaged";i:9307;s:11:"notsavagely";i:9308;s:15:"notverysavagely";i:9309;s:11:"notsavagery";i:9310;s:15:"notverysavagery";i:9311;s:10:"notsavages";i:9312;s:14:"notverysavages";i:9313;s:10:"notscandal";i:9314;s:14:"notveryscandal";i:9315;s:13:"notscandalize";i:9316;s:17:"notveryscandalize";i:9317;s:14:"notscandalized";i:9318;s:18:"notveryscandalized";i:9319;s:13:"notscandalous";i:9320;s:17:"notveryscandalous";i:9321;s:15:"notscandalously";i:9322;s:19:"notveryscandalously";i:9323;s:11:"notscandals";i:9324;s:15:"notveryscandals";i:9325;s:8:"notscant";i:9326;s:12:"notveryscant";i:9327;s:12:"notscapegoat";i:9328;s:16:"notveryscapegoat";i:9329;s:7:"notscar";i:9330;s:11:"notveryscar";i:9331;s:9:"notscarce";i:9332;s:13:"notveryscarce";i:9333;s:11:"notscarcely";i:9334;s:15:"notveryscarcely";i:9335;s:11:"notscarcity";i:9336;s:15:"notveryscarcity";i:9337;s:8:"notscare";i:9338;s:12:"notveryscare";i:9339;s:10:"notscarier";i:9340;s:14:"notveryscarier";i:9341;s:11:"notscariest";i:9342;s:15:"notveryscariest";i:9343;s:10:"notscarily";i:9344;s:14:"notveryscarily";i:9345;s:8:"notscars";i:9346;s:12:"notveryscars";i:9347;s:8:"notscary";i:9348;s:12:"notveryscary";i:9349;s:11:"notscathing";i:9350;s:15:"notveryscathing";i:9351;s:13:"notscathingly";i:9352;s:17:"notveryscathingly";i:9353;s:9:"notscheme";i:9354;s:13:"notveryscheme";i:9355;s:11:"notscheming";i:9356;s:15:"notveryscheming";i:9357;s:8:"notscoff";i:9358;s:12:"notveryscoff";i:9359;s:13:"notscoffingly";i:9360;s:17:"notveryscoffingly";i:9361;s:8:"notscold";i:9362;s:12:"notveryscold";i:9363;s:11:"notscolding";i:9364;s:15:"notveryscolding";i:9365;s:13:"notscoldingly";i:9366;s:17:"notveryscoldingly";i:9367;s:12:"notscorching";i:9368;s:16:"notveryscorching";i:9369;s:14:"notscorchingly";i:9370;s:18:"notveryscorchingly";i:9371;s:8:"notscorn";i:9372;s:12:"notveryscorn";i:9373;s:11:"notscornful";i:9374;s:15:"notveryscornful";i:9375;s:13:"notscornfully";i:9376;s:17:"notveryscornfully";i:9377;s:12:"notscoundrel";i:9378;s:16:"notveryscoundrel";i:9379;s:10:"notscourge";i:9380;s:14:"notveryscourge";i:9381;s:8:"notscowl";i:9382;s:12:"notveryscowl";i:9383;s:9:"notscream";i:9384;s:13:"notveryscream";i:9385;s:10:"notscreech";i:9386;s:14:"notveryscreech";i:9387;s:8:"notscrew";i:9388;s:12:"notveryscrew";i:9389;s:7:"notscum";i:9390;s:11:"notveryscum";i:9391;s:9:"notscummy";i:9392;s:13:"notveryscummy";i:9393;s:15:"notsecond-class";i:9394;s:19:"notverysecond-class";i:9395;s:14:"notsecond-tier";i:9396;s:18:"notverysecond-tier";i:9397;s:12:"notsecretive";i:9398;s:16:"notverysecretive";i:9399;s:12:"notsedentary";i:9400;s:16:"notverysedentary";i:9401;s:8:"notseedy";i:9402;s:12:"notveryseedy";i:9403;s:9:"notseethe";i:9404;s:13:"notveryseethe";i:9405;s:11:"notseething";i:9406;s:15:"notveryseething";i:9407;s:12:"notself-coup";i:9408;s:16:"notveryself-coup";i:9409;s:17:"notself-criticism";i:9410;s:21:"notveryself-criticism";i:9411;s:17:"notself-defeating";i:9412;s:21:"notveryself-defeating";i:9413;s:19:"notself-destructive";i:9414;s:23:"notveryself-destructive";i:9415;s:19:"notself-humiliation";i:9416;s:23:"notveryself-humiliation";i:9417;s:16:"notself-interest";i:9418;s:20:"notveryself-interest";i:9419;s:18:"notself-interested";i:9420;s:22:"notveryself-interested";i:9421;s:15:"notself-serving";i:9422;s:19:"notveryself-serving";i:9423;s:17:"notselfinterested";i:9424;s:21:"notveryselfinterested";i:9425;s:12:"notselfishly";i:9426;s:16:"notveryselfishly";i:9427;s:14:"notselfishness";i:9428;s:18:"notveryselfishness";i:9429;s:9:"notsenile";i:9430;s:13:"notverysenile";i:9431;s:17:"notsensationalize";i:9432;s:21:"notverysensationalize";i:9433;s:12:"notsenseless";i:9434;s:16:"notverysenseless";i:9435;s:14:"notsenselessly";i:9436;s:18:"notverysenselessly";i:9437;s:14:"notseriousness";i:9438;s:18:"notveryseriousness";i:9439;s:12:"notsermonize";i:9440;s:16:"notverysermonize";i:9441;s:12:"notservitude";i:9442;s:16:"notveryservitude";i:9443;s:9:"notset-up";i:9444;s:13:"notveryset-up";i:9445;s:8:"notsever";i:9446;s:12:"notverysever";i:9447;s:9:"notsevere";i:9448;s:13:"notverysevere";i:9449;s:11:"notseverely";i:9450;s:15:"notveryseverely";i:9451;s:11:"notseverity";i:9452;s:15:"notveryseverity";i:9453;s:9:"notshabby";i:9454;s:13:"notveryshabby";i:9455;s:9:"notshadow";i:9456;s:13:"notveryshadow";i:9457;s:10:"notshadowy";i:9458;s:14:"notveryshadowy";i:9459;s:8:"notshady";i:9460;s:12:"notveryshady";i:9461;s:8:"notshake";i:9462;s:12:"notveryshake";i:9463;s:8:"notshaky";i:9464;s:12:"notveryshaky";i:9465;s:10:"notshallow";i:9466;s:14:"notveryshallow";i:9467;s:7:"notsham";i:9468;s:11:"notverysham";i:9469;s:11:"notshambles";i:9470;s:15:"notveryshambles";i:9471;s:8:"notshame";i:9472;s:12:"notveryshame";i:9473;s:11:"notshameful";i:9474;s:15:"notveryshameful";i:9475;s:13:"notshamefully";i:9476;s:17:"notveryshamefully";i:9477;s:15:"notshamefulness";i:9478;s:19:"notveryshamefulness";i:9479;s:12:"notshameless";i:9480;s:16:"notveryshameless";i:9481;s:14:"notshamelessly";i:9482;s:18:"notveryshamelessly";i:9483;s:16:"notshamelessness";i:9484;s:20:"notveryshamelessness";i:9485;s:8:"notshark";i:9486;s:12:"notveryshark";i:9487;s:10:"notsharply";i:9488;s:14:"notverysharply";i:9489;s:10:"notshatter";i:9490;s:14:"notveryshatter";i:9491;s:8:"notsheer";i:9492;s:12:"notverysheer";i:9493;s:8:"notshirk";i:9494;s:12:"notveryshirk";i:9495;s:10:"notshirker";i:9496;s:14:"notveryshirker";i:9497;s:12:"notshipwreck";i:9498;s:16:"notveryshipwreck";i:9499;s:9:"notshiver";i:9500;s:13:"notveryshiver";i:9501;s:8:"notshock";i:9502;s:12:"notveryshock";i:9503;s:11:"notshocking";i:9504;s:15:"notveryshocking";i:9505;s:13:"notshockingly";i:9506;s:17:"notveryshockingly";i:9507;s:9:"notshoddy";i:9508;s:13:"notveryshoddy";i:9509;s:14:"notshort-lived";i:9510;s:18:"notveryshort-lived";i:9511;s:11:"notshortage";i:9512;s:15:"notveryshortage";i:9513;s:14:"notshortchange";i:9514;s:18:"notveryshortchange";i:9515;s:14:"notshortcoming";i:9516;s:18:"notveryshortcoming";i:9517;s:15:"notshortcomings";i:9518;s:19:"notveryshortcomings";i:9519;s:15:"notshortsighted";i:9520;s:19:"notveryshortsighted";i:9521;s:19:"notshortsightedness";i:9522;s:23:"notveryshortsightedness";i:9523;s:11:"notshowdown";i:9524;s:15:"notveryshowdown";i:9525;s:8:"notshred";i:9526;s:12:"notveryshred";i:9527;s:8:"notshrew";i:9528;s:12:"notveryshrew";i:9529;s:9:"notshriek";i:9530;s:13:"notveryshriek";i:9531;s:9:"notshrill";i:9532;s:13:"notveryshrill";i:9533;s:10:"notshrilly";i:9534;s:14:"notveryshrilly";i:9535;s:10:"notshrivel";i:9536;s:14:"notveryshrivel";i:9537;s:9:"notshroud";i:9538;s:13:"notveryshroud";i:9539;s:11:"notshrouded";i:9540;s:15:"notveryshrouded";i:9541;s:8:"notshrug";i:9542;s:12:"notveryshrug";i:9543;s:7:"notshun";i:9544;s:11:"notveryshun";i:9545;s:10:"notshunned";i:9546;s:14:"notveryshunned";i:9547;s:8:"notshyly";i:9548;s:12:"notveryshyly";i:9549;s:10:"notshyness";i:9550;s:14:"notveryshyness";i:9551;s:7:"notsick";i:9552;s:11:"notverysick";i:9553;s:9:"notsicken";i:9554;s:13:"notverysicken";i:9555;s:9:"notsickly";i:9556;s:13:"notverysickly";i:9557;s:12:"notsickening";i:9558;s:16:"notverysickening";i:9559;s:14:"notsickeningly";i:9560;s:18:"notverysickeningly";i:9561;s:11:"notsickness";i:9562;s:15:"notverysickness";i:9563;s:12:"notsidetrack";i:9564;s:16:"notverysidetrack";i:9565;s:14:"notsidetracked";i:9566;s:18:"notverysidetracked";i:9567;s:8:"notsiege";i:9568;s:12:"notverysiege";i:9569;s:10:"notsillily";i:9570;s:14:"notverysillily";i:9571;s:8:"notsilly";i:9572;s:12:"notverysilly";i:9573;s:9:"notsimmer";i:9574;s:13:"notverysimmer";i:9575;s:13:"notsimplistic";i:9576;s:17:"notverysimplistic";i:9577;s:17:"notsimplistically";i:9578;s:21:"notverysimplistically";i:9579;s:6:"notsin";i:9580;s:10:"notverysin";i:9581;s:9:"notsinful";i:9582;s:13:"notverysinful";i:9583;s:11:"notsinfully";i:9584;s:15:"notverysinfully";i:9585;s:11:"notsinister";i:9586;s:15:"notverysinister";i:9587;s:13:"notsinisterly";i:9588;s:17:"notverysinisterly";i:9589;s:10:"notsinking";i:9590;s:14:"notverysinking";i:9591;s:12:"notskeletons";i:9592;s:16:"notveryskeletons";i:9593;s:12:"notskeptical";i:9594;s:16:"notveryskeptical";i:9595;s:14:"notskeptically";i:9596;s:18:"notveryskeptically";i:9597;s:13:"notskepticism";i:9598;s:17:"notveryskepticism";i:9599;s:10:"notsketchy";i:9600;s:14:"notverysketchy";i:9601;s:9:"notskimpy";i:9602;s:13:"notveryskimpy";i:9603;s:11:"notskittish";i:9604;s:15:"notveryskittish";i:9605;s:13:"notskittishly";i:9606;s:17:"notveryskittishly";i:9607;s:8:"notskulk";i:9608;s:12:"notveryskulk";i:9609;s:8:"notslack";i:9610;s:12:"notveryslack";i:9611;s:10:"notslander";i:9612;s:14:"notveryslander";i:9613;s:12:"notslanderer";i:9614;s:16:"notveryslanderer";i:9615;s:13:"notslanderous";i:9616;s:17:"notveryslanderous";i:9617;s:15:"notslanderously";i:9618;s:19:"notveryslanderously";i:9619;s:11:"notslanders";i:9620;s:15:"notveryslanders";i:9621;s:7:"notslap";i:9622;s:11:"notveryslap";i:9623;s:11:"notslashing";i:9624;s:15:"notveryslashing";i:9625;s:12:"notslaughter";i:9626;s:16:"notveryslaughter";i:9627;s:14:"notslaughtered";i:9628;s:18:"notveryslaughtered";i:9629;s:9:"notslaves";i:9630;s:13:"notveryslaves";i:9631;s:9:"notsleazy";i:9632;s:13:"notverysleazy";i:9633;s:9:"notslight";i:9634;s:13:"notveryslight";i:9635;s:11:"notslightly";i:9636;s:15:"notveryslightly";i:9637;s:8:"notslime";i:9638;s:12:"notveryslime";i:9639;s:9:"notsloppy";i:9640;s:13:"notverysloppy";i:9641;s:11:"notsloppily";i:9642;s:15:"notverysloppily";i:9643;s:8:"notsloth";i:9644;s:12:"notverysloth";i:9645;s:11:"notslothful";i:9646;s:15:"notveryslothful";i:9647;s:9:"notslowly";i:9648;s:13:"notveryslowly";i:9649;s:14:"notslow-moving";i:9650;s:18:"notveryslow-moving";i:9651;s:7:"notslug";i:9652;s:11:"notveryslug";i:9653;s:11:"notsluggish";i:9654;s:15:"notverysluggish";i:9655;s:8:"notslump";i:9656;s:12:"notveryslump";i:9657;s:7:"notslur";i:9658;s:11:"notveryslur";i:9659;s:6:"notsly";i:9660;s:10:"notverysly";i:9661;s:8:"notsmack";i:9662;s:12:"notverysmack";i:9663;s:8:"notsmash";i:9664;s:12:"notverysmash";i:9665;s:8:"notsmear";i:9666;s:12:"notverysmear";i:9667;s:11:"notsmelling";i:9668;s:15:"notverysmelling";i:9669;s:14:"notsmokescreen";i:9670;s:18:"notverysmokescreen";i:9671;s:10:"notsmolder";i:9672;s:14:"notverysmolder";i:9673;s:13:"notsmoldering";i:9674;s:17:"notverysmoldering";i:9675;s:10:"notsmother";i:9676;s:14:"notverysmother";i:9677;s:11:"notsmoulder";i:9678;s:15:"notverysmoulder";i:9679;s:14:"notsmouldering";i:9680;s:18:"notverysmouldering";i:9681;s:7:"notsmug";i:9682;s:11:"notverysmug";i:9683;s:9:"notsmugly";i:9684;s:13:"notverysmugly";i:9685;s:7:"notsmut";i:9686;s:11:"notverysmut";i:9687;s:11:"notsmuttier";i:9688;s:15:"notverysmuttier";i:9689;s:12:"notsmuttiest";i:9690;s:16:"notverysmuttiest";i:9691;s:9:"notsmutty";i:9692;s:13:"notverysmutty";i:9693;s:8:"notsnare";i:9694;s:12:"notverysnare";i:9695;s:8:"notsnarl";i:9696;s:12:"notverysnarl";i:9697;s:9:"notsnatch";i:9698;s:13:"notverysnatch";i:9699;s:8:"notsneak";i:9700;s:12:"notverysneak";i:9701;s:11:"notsneakily";i:9702;s:15:"notverysneakily";i:9703;s:9:"notsneaky";i:9704;s:13:"notverysneaky";i:9705;s:8:"notsneer";i:9706;s:12:"notverysneer";i:9707;s:11:"notsneering";i:9708;s:15:"notverysneering";i:9709;s:13:"notsneeringly";i:9710;s:17:"notverysneeringly";i:9711;s:7:"notsnub";i:9712;s:11:"notverysnub";i:9713;s:9:"notso-cal";i:9714;s:13:"notveryso-cal";i:9715;s:12:"notso-called";i:9716;s:16:"notveryso-called";i:9717;s:6:"notsob";i:9718;s:10:"notverysob";i:9719;s:8:"notsober";i:9720;s:12:"notverysober";i:9721;s:11:"notsobering";i:9722;s:15:"notverysobering";i:9723;s:9:"notsolemn";i:9724;s:13:"notverysolemn";i:9725;s:9:"notsomber";i:9726;s:13:"notverysomber";i:9727;s:7:"notsore";i:9728;s:11:"notverysore";i:9729;s:9:"notsorely";i:9730;s:13:"notverysorely";i:9731;s:11:"notsoreness";i:9732;s:15:"notverysoreness";i:9733;s:9:"notsorrow";i:9734;s:13:"notverysorrow";i:9735;s:12:"notsorrowful";i:9736;s:16:"notverysorrowful";i:9737;s:14:"notsorrowfully";i:9738;s:18:"notverysorrowfully";i:9739;s:11:"notsounding";i:9740;s:15:"notverysounding";i:9741;s:7:"notsour";i:9742;s:11:"notverysour";i:9743;s:9:"notsourly";i:9744;s:13:"notverysourly";i:9745;s:8:"notspade";i:9746;s:12:"notveryspade";i:9747;s:8:"notspank";i:9748;s:12:"notveryspank";i:9749;s:11:"notspilling";i:9750;s:15:"notveryspilling";i:9751;s:11:"notspinster";i:9752;s:15:"notveryspinster";i:9753;s:13:"notspiritless";i:9754;s:17:"notveryspiritless";i:9755;s:8:"notspite";i:9756;s:12:"notveryspite";i:9757;s:13:"notspitefully";i:9758;s:17:"notveryspitefully";i:9759;s:15:"notspitefulness";i:9760;s:19:"notveryspitefulness";i:9761;s:8:"notsplit";i:9762;s:12:"notverysplit";i:9763;s:12:"notsplitting";i:9764;s:16:"notverysplitting";i:9765;s:8:"notspoil";i:9766;s:12:"notveryspoil";i:9767;s:8:"notspook";i:9768;s:12:"notveryspook";i:9769;s:11:"notspookier";i:9770;s:15:"notveryspookier";i:9771;s:12:"notspookiest";i:9772;s:16:"notveryspookiest";i:9773;s:11:"notspookily";i:9774;s:15:"notveryspookily";i:9775;s:9:"notspooky";i:9776;s:13:"notveryspooky";i:9777;s:12:"notspoon-fed";i:9778;s:16:"notveryspoon-fed";i:9779;s:13:"notspoon-feed";i:9780;s:17:"notveryspoon-feed";i:9781;s:11:"notspoonfed";i:9782;s:15:"notveryspoonfed";i:9783;s:11:"notsporadic";i:9784;s:15:"notverysporadic";i:9785;s:7:"notspot";i:9786;s:11:"notveryspot";i:9787;s:9:"notspotty";i:9788;s:13:"notveryspotty";i:9789;s:11:"notspurious";i:9790;s:15:"notveryspurious";i:9791;s:8:"notspurn";i:9792;s:12:"notveryspurn";i:9793;s:10:"notsputter";i:9794;s:14:"notverysputter";i:9795;s:11:"notsquabble";i:9796;s:15:"notverysquabble";i:9797;s:13:"notsquabbling";i:9798;s:17:"notverysquabbling";i:9799;s:11:"notsquander";i:9800;s:15:"notverysquander";i:9801;s:9:"notsquash";i:9802;s:13:"notverysquash";i:9803;s:9:"notsquirm";i:9804;s:13:"notverysquirm";i:9805;s:7:"notstab";i:9806;s:11:"notverystab";i:9807;s:10:"notstagger";i:9808;s:14:"notverystagger";i:9809;s:13:"notstaggering";i:9810;s:17:"notverystaggering";i:9811;s:15:"notstaggeringly";i:9812;s:19:"notverystaggeringly";i:9813;s:11:"notstagnant";i:9814;s:15:"notverystagnant";i:9815;s:11:"notstagnate";i:9816;s:15:"notverystagnate";i:9817;s:13:"notstagnation";i:9818;s:17:"notverystagnation";i:9819;s:8:"notstaid";i:9820;s:12:"notverystaid";i:9821;s:8:"notstain";i:9822;s:12:"notverystain";i:9823;s:8:"notstake";i:9824;s:12:"notverystake";i:9825;s:8:"notstale";i:9826;s:12:"notverystale";i:9827;s:12:"notstalemate";i:9828;s:16:"notverystalemate";i:9829;s:10:"notstammer";i:9830;s:14:"notverystammer";i:9831;s:11:"notstampede";i:9832;s:15:"notverystampede";i:9833;s:13:"notstandstill";i:9834;s:17:"notverystandstill";i:9835;s:8:"notstark";i:9836;s:12:"notverystark";i:9837;s:10:"notstarkly";i:9838;s:14:"notverystarkly";i:9839;s:10:"notstartle";i:9840;s:14:"notverystartle";i:9841;s:12:"notstartling";i:9842;s:16:"notverystartling";i:9843;s:14:"notstartlingly";i:9844;s:18:"notverystartlingly";i:9845;s:13:"notstarvation";i:9846;s:17:"notverystarvation";i:9847;s:9:"notstarve";i:9848;s:13:"notverystarve";i:9849;s:9:"notstatic";i:9850;s:13:"notverystatic";i:9851;s:8:"notsteal";i:9852;s:12:"notverysteal";i:9853;s:11:"notstealing";i:9854;s:15:"notverystealing";i:9855;s:8:"notsteep";i:9856;s:12:"notverysteep";i:9857;s:10:"notsteeply";i:9858;s:14:"notverysteeply";i:9859;s:9:"notstench";i:9860;s:13:"notverystench";i:9861;s:13:"notstereotype";i:9862;s:17:"notverystereotype";i:9863;s:16:"notstereotypical";i:9864;s:20:"notverystereotypical";i:9865;s:18:"notstereotypically";i:9866;s:22:"notverystereotypically";i:9867;s:8:"notstern";i:9868;s:12:"notverystern";i:9869;s:7:"notstew";i:9870;s:11:"notverystew";i:9871;s:9:"notsticky";i:9872;s:13:"notverysticky";i:9873;s:8:"notstiff";i:9874;s:12:"notverystiff";i:9875;s:9:"notstifle";i:9876;s:13:"notverystifle";i:9877;s:11:"notstifling";i:9878;s:15:"notverystifling";i:9879;s:13:"notstiflingly";i:9880;s:17:"notverystiflingly";i:9881;s:9:"notstigma";i:9882;s:13:"notverystigma";i:9883;s:13:"notstigmatize";i:9884;s:17:"notverystigmatize";i:9885;s:8:"notsting";i:9886;s:12:"notverysting";i:9887;s:11:"notstinging";i:9888;s:15:"notverystinging";i:9889;s:13:"notstingingly";i:9890;s:17:"notverystingingly";i:9891;s:8:"notstink";i:9892;s:12:"notverystink";i:9893;s:11:"notstinking";i:9894;s:15:"notverystinking";i:9895;s:9:"notstodgy";i:9896;s:13:"notverystodgy";i:9897;s:8:"notstole";i:9898;s:12:"notverystole";i:9899;s:9:"notstolen";i:9900;s:13:"notverystolen";i:9901;s:9:"notstooge";i:9902;s:13:"notverystooge";i:9903;s:10:"notstooges";i:9904;s:14:"notverystooges";i:9905;s:8:"notstorm";i:9906;s:12:"notverystorm";i:9907;s:9:"notstormy";i:9908;s:13:"notverystormy";i:9909;s:11:"notstraggle";i:9910;s:15:"notverystraggle";i:9911;s:12:"notstraggler";i:9912;s:16:"notverystraggler";i:9913;s:9:"notstrain";i:9914;s:13:"notverystrain";i:9915;s:11:"notstrained";i:9916;s:15:"notverystrained";i:9917;s:12:"notstrangely";i:9918;s:16:"notverystrangely";i:9919;s:11:"notstranger";i:9920;s:15:"notverystranger";i:9921;s:12:"notstrangest";i:9922;s:16:"notverystrangest";i:9923;s:11:"notstrangle";i:9924;s:15:"notverystrangle";i:9925;s:12:"notstrenuous";i:9926;s:16:"notverystrenuous";i:9927;s:9:"notstress";i:9928;s:13:"notverystress";i:9929;s:12:"notstressful";i:9930;s:16:"notverystressful";i:9931;s:14:"notstressfully";i:9932;s:18:"notverystressfully";i:9933;s:11:"notstricken";i:9934;s:15:"notverystricken";i:9935;s:9:"notstrict";i:9936;s:13:"notverystrict";i:9937;s:11:"notstrictly";i:9938;s:15:"notverystrictly";i:9939;s:11:"notstrident";i:9940;s:15:"notverystrident";i:9941;s:13:"notstridently";i:9942;s:17:"notverystridently";i:9943;s:9:"notstrife";i:9944;s:13:"notverystrife";i:9945;s:9:"notstrike";i:9946;s:13:"notverystrike";i:9947;s:12:"notstringent";i:9948;s:16:"notverystringent";i:9949;s:14:"notstringently";i:9950;s:18:"notverystringently";i:9951;s:9:"notstruck";i:9952;s:13:"notverystruck";i:9953;s:11:"notstruggle";i:9954;s:15:"notverystruggle";i:9955;s:8:"notstrut";i:9956;s:12:"notverystrut";i:9957;s:11:"notstubborn";i:9958;s:15:"notverystubborn";i:9959;s:13:"notstubbornly";i:9960;s:17:"notverystubbornly";i:9961;s:15:"notstubbornness";i:9962;s:19:"notverystubbornness";i:9963;s:9:"notstuffy";i:9964;s:13:"notverystuffy";i:9965;s:10:"notstumble";i:9966;s:14:"notverystumble";i:9967;s:8:"notstump";i:9968;s:12:"notverystump";i:9969;s:7:"notstun";i:9970;s:11:"notverystun";i:9971;s:8:"notstunt";i:9972;s:12:"notverystunt";i:9973;s:10:"notstunted";i:9974;s:14:"notverystunted";i:9975;s:12:"notstupidity";i:9976;s:16:"notverystupidity";i:9977;s:11:"notstupidly";i:9978;s:15:"notverystupidly";i:9979;s:12:"notstupified";i:9980;s:16:"notverystupified";i:9981;s:10:"notstupify";i:9982;s:14:"notverystupify";i:9983;s:9:"notstupor";i:9984;s:13:"notverystupor";i:9985;s:6:"notsty";i:9986;s:10:"notverysty";i:9987;s:10:"notsubdued";i:9988;s:14:"notverysubdued";i:9989;s:12:"notsubjected";i:9990;s:16:"notverysubjected";i:9991;s:13:"notsubjection";i:9992;s:17:"notverysubjection";i:9993;s:12:"notsubjugate";i:9994;s:16:"notverysubjugate";i:9995;s:14:"notsubjugation";i:9996;s:18:"notverysubjugation";i:9997;s:14:"notsubordinate";i:9998;s:18:"notverysubordinate";i:9999;s:15:"notsubservience";i:10000;s:19:"notverysubservience";i:10001;s:14:"notsubservient";i:10002;s:18:"notverysubservient";i:10003;s:10:"notsubside";i:10004;s:14:"notverysubside";i:10005;s:14:"notsubstandard";i:10006;s:18:"notverysubstandard";i:10007;s:11:"notsubtract";i:10008;s:15:"notverysubtract";i:10009;s:13:"notsubversion";i:10010;s:17:"notverysubversion";i:10011;s:13:"notsubversive";i:10012;s:17:"notverysubversive";i:10013;s:15:"notsubversively";i:10014;s:19:"notverysubversively";i:10015;s:10:"notsubvert";i:10016;s:14:"notverysubvert";i:10017;s:10:"notsuccumb";i:10018;s:14:"notverysuccumb";i:10019;s:9:"notsucker";i:10020;s:13:"notverysucker";i:10021;s:9:"notsuffer";i:10022;s:13:"notverysuffer";i:10023;s:11:"notsufferer";i:10024;s:15:"notverysufferer";i:10025;s:12:"notsufferers";i:10026;s:16:"notverysufferers";i:10027;s:12:"notsuffocate";i:10028;s:16:"notverysuffocate";i:10029;s:13:"notsugar-coat";i:10030;s:17:"notverysugar-coat";i:10031;s:15:"notsugar-coated";i:10032;s:19:"notverysugar-coated";i:10033;s:14:"notsugarcoated";i:10034;s:18:"notverysugarcoated";i:10035;s:10:"notsuicide";i:10036;s:14:"notverysuicide";i:10037;s:7:"notsulk";i:10038;s:11:"notverysulk";i:10039;s:9:"notsullen";i:10040;s:13:"notverysullen";i:10041;s:8:"notsully";i:10042;s:12:"notverysully";i:10043;s:9:"notsunder";i:10044;s:13:"notverysunder";i:10045;s:17:"notsuperficiality";i:10046;s:21:"notverysuperficiality";i:10047;s:16:"notsuperficially";i:10048;s:20:"notverysuperficially";i:10049;s:14:"notsuperfluous";i:10050;s:18:"notverysuperfluous";i:10051;s:14:"notsuperiority";i:10052;s:18:"notverysuperiority";i:10053;s:15:"notsuperstition";i:10054;s:19:"notverysuperstition";i:10055;s:16:"notsuperstitious";i:10056;s:20:"notverysuperstitious";i:10057;s:11:"notsupposed";i:10058;s:15:"notverysupposed";i:10059;s:11:"notsuppress";i:10060;s:15:"notverysuppress";i:10061;s:14:"notsuppression";i:10062;s:18:"notverysuppression";i:10063;s:12:"notsupremacy";i:10064;s:16:"notverysupremacy";i:10065;s:12:"notsurrender";i:10066;s:16:"notverysurrender";i:10067;s:14:"notsusceptible";i:10068;s:18:"notverysusceptible";i:10069;s:10:"notsuspect";i:10070;s:14:"notverysuspect";i:10071;s:12:"notsuspicion";i:10072;s:16:"notverysuspicion";i:10073;s:13:"notsuspicions";i:10074;s:17:"notverysuspicions";i:10075;s:15:"notsuspiciously";i:10076;s:19:"notverysuspiciously";i:10077;s:10:"notswagger";i:10078;s:14:"notveryswagger";i:10079;s:10:"notswamped";i:10080;s:14:"notveryswamped";i:10081;s:8:"notswear";i:10082;s:12:"notveryswear";i:10083;s:10:"notswindle";i:10084;s:14:"notveryswindle";i:10085;s:8:"notswipe";i:10086;s:12:"notveryswipe";i:10087;s:8:"notswoon";i:10088;s:12:"notveryswoon";i:10089;s:8:"notswore";i:10090;s:12:"notveryswore";i:10091;s:18:"notsympathetically";i:10092;s:22:"notverysympathetically";i:10093;s:13:"notsympathies";i:10094;s:17:"notverysympathies";i:10095;s:13:"notsympathize";i:10096;s:17:"notverysympathize";i:10097;s:11:"notsympathy";i:10098;s:15:"notverysympathy";i:10099;s:10:"notsymptom";i:10100;s:14:"notverysymptom";i:10101;s:11:"notsyndrome";i:10102;s:15:"notverysyndrome";i:10103;s:8:"nottaboo";i:10104;s:12:"notverytaboo";i:10105;s:8:"nottaint";i:10106;s:12:"notverytaint";i:10107;s:10:"nottainted";i:10108;s:14:"notverytainted";i:10109;s:9:"nottamper";i:10110;s:13:"notverytamper";i:10111;s:10:"nottangled";i:10112;s:14:"notverytangled";i:10113;s:10:"nottantrum";i:10114;s:14:"notverytantrum";i:10115;s:8:"nottardy";i:10116;s:12:"notverytardy";i:10117;s:10:"nottarnish";i:10118;s:14:"notverytarnish";i:10119;s:11:"nottattered";i:10120;s:15:"notverytattered";i:10121;s:8:"nottaunt";i:10122;s:12:"notverytaunt";i:10123;s:11:"nottaunting";i:10124;s:15:"notverytaunting";i:10125;s:13:"nottauntingly";i:10126;s:17:"notverytauntingly";i:10127;s:9:"nottaunts";i:10128;s:13:"notverytaunts";i:10129;s:9:"nottawdry";i:10130;s:13:"notverytawdry";i:10131;s:8:"nottease";i:10132;s:12:"notverytease";i:10133;s:12:"notteasingly";i:10134;s:16:"notveryteasingly";i:10135;s:9:"nottaxing";i:10136;s:13:"notverytaxing";i:10137;s:10:"nottedious";i:10138;s:14:"notverytedious";i:10139;s:12:"nottediously";i:10140;s:16:"notverytediously";i:10141;s:11:"nottemerity";i:10142;s:15:"notverytemerity";i:10143;s:9:"nottemper";i:10144;s:13:"notverytemper";i:10145;s:10:"nottempest";i:10146;s:14:"notverytempest";i:10147;s:13:"nottemptation";i:10148;s:17:"notverytemptation";i:10149;s:8:"nottense";i:10150;s:12:"notverytense";i:10151;s:10:"nottension";i:10152;s:14:"notverytension";i:10153;s:12:"nottentative";i:10154;s:16:"notverytentative";i:10155;s:14:"nottentatively";i:10156;s:18:"notverytentatively";i:10157;s:10:"nottenuous";i:10158;s:14:"notverytenuous";i:10159;s:12:"nottenuously";i:10160;s:16:"notverytenuously";i:10161;s:8:"nottepid";i:10162;s:12:"notverytepid";i:10163;s:11:"notterrible";i:10164;s:15:"notveryterrible";i:10165;s:15:"notterribleness";i:10166;s:19:"notveryterribleness";i:10167;s:11:"notterribly";i:10168;s:15:"notveryterribly";i:10169;s:9:"notterror";i:10170;s:13:"notveryterror";i:10171;s:15:"notterror-genic";i:10172;s:19:"notveryterror-genic";i:10173;s:12:"notterrorism";i:10174;s:16:"notveryterrorism";i:10175;s:12:"notterrorize";i:10176;s:16:"notveryterrorize";i:10177;s:12:"notthankless";i:10178;s:16:"notverythankless";i:10179;s:9:"notthirst";i:10180;s:13:"notverythirst";i:10181;s:9:"notthorny";i:10182;s:13:"notverythorny";i:10183;s:14:"notthoughtless";i:10184;s:18:"notverythoughtless";i:10185;s:16:"notthoughtlessly";i:10186;s:20:"notverythoughtlessly";i:10187;s:18:"notthoughtlessness";i:10188;s:22:"notverythoughtlessness";i:10189;s:9:"notthrash";i:10190;s:13:"notverythrash";i:10191;s:9:"notthreat";i:10192;s:13:"notverythreat";i:10193;s:11:"notthreaten";i:10194;s:15:"notverythreaten";i:10195;s:14:"notthreatening";i:10196;s:18:"notverythreatening";i:10197;s:10:"notthreats";i:10198;s:14:"notverythreats";i:10199;s:11:"notthrottle";i:10200;s:15:"notverythrottle";i:10201;s:8:"notthrow";i:10202;s:12:"notverythrow";i:10203;s:8:"notthumb";i:10204;s:12:"notverythumb";i:10205;s:9:"notthumbs";i:10206;s:13:"notverythumbs";i:10207;s:9:"notthwart";i:10208;s:13:"notverythwart";i:10209;s:8:"nottimid";i:10210;s:12:"notverytimid";i:10211;s:11:"nottimidity";i:10212;s:15:"notverytimidity";i:10213;s:10:"nottimidly";i:10214;s:14:"notverytimidly";i:10215;s:12:"nottimidness";i:10216;s:16:"notverytimidness";i:10217;s:7:"nottiny";i:10218;s:11:"notverytiny";i:10219;s:7:"nottire";i:10220;s:11:"notverytire";i:10221;s:8:"nottired";i:10222;s:12:"notverytired";i:10223;s:11:"nottiresome";i:10224;s:15:"notverytiresome";i:10225;s:9:"nottiring";i:10226;s:13:"notverytiring";i:10227;s:11:"nottiringly";i:10228;s:15:"notverytiringly";i:10229;s:7:"nottoil";i:10230;s:11:"notverytoil";i:10231;s:7:"nottoll";i:10232;s:11:"notverytoll";i:10233;s:9:"nottopple";i:10234;s:13:"notverytopple";i:10235;s:10:"nottorment";i:10236;s:14:"notverytorment";i:10237;s:12:"nottormented";i:10238;s:16:"notverytormented";i:10239;s:10:"nottorrent";i:10240;s:14:"notverytorrent";i:10241;s:10:"nottorture";i:10242;s:14:"notverytorture";i:10243;s:11:"nottortured";i:10244;s:15:"notverytortured";i:10245;s:11:"nottortuous";i:10246;s:15:"notverytortuous";i:10247;s:12:"nottorturous";i:10248;s:16:"notverytorturous";i:10249;s:14:"nottorturously";i:10250;s:18:"notverytorturously";i:10251;s:15:"nottotalitarian";i:10252;s:19:"notverytotalitarian";i:10253;s:9:"nottouchy";i:10254;s:13:"notverytouchy";i:10255;s:12:"nottoughness";i:10256;s:16:"notverytoughness";i:10257;s:8:"nottoxic";i:10258;s:12:"notverytoxic";i:10259;s:10:"nottraduce";i:10260;s:14:"notverytraduce";i:10261;s:10:"nottragedy";i:10262;s:14:"notverytragedy";i:10263;s:9:"nottragic";i:10264;s:13:"notverytragic";i:10265;s:13:"nottragically";i:10266;s:17:"notverytragically";i:10267;s:10:"nottraitor";i:10268;s:14:"notverytraitor";i:10269;s:13:"nottraitorous";i:10270;s:17:"notverytraitorous";i:10271;s:15:"nottraitorously";i:10272;s:19:"notverytraitorously";i:10273;s:8:"nottramp";i:10274;s:12:"notverytramp";i:10275;s:10:"nottrample";i:10276;s:14:"notverytrample";i:10277;s:13:"nottransgress";i:10278;s:17:"notverytransgress";i:10279;s:16:"nottransgression";i:10280;s:20:"notverytransgression";i:10281;s:9:"nottrauma";i:10282;s:13:"notverytrauma";i:10283;s:12:"nottraumatic";i:10284;s:16:"notverytraumatic";i:10285;s:16:"nottraumatically";i:10286;s:20:"notverytraumatically";i:10287;s:13:"nottraumatize";i:10288;s:17:"notverytraumatize";i:10289;s:14:"nottraumatized";i:10290;s:18:"notverytraumatized";i:10291;s:13:"nottravesties";i:10292;s:17:"notverytravesties";i:10293;s:11:"nottravesty";i:10294;s:15:"notverytravesty";i:10295;s:14:"nottreacherous";i:10296;s:18:"notverytreacherous";i:10297;s:16:"nottreacherously";i:10298;s:20:"notverytreacherously";i:10299;s:12:"nottreachery";i:10300;s:16:"notverytreachery";i:10301;s:10:"nottreason";i:10302;s:14:"notverytreason";i:10303;s:13:"nottreasonous";i:10304;s:17:"notverytreasonous";i:10305;s:8:"nottrial";i:10306;s:12:"notverytrial";i:10307;s:8:"nottrick";i:10308;s:12:"notverytrick";i:10309;s:9:"nottricky";i:10310;s:13:"notverytricky";i:10311;s:11:"nottrickery";i:10312;s:15:"notverytrickery";i:10313;s:10:"nottrivial";i:10314;s:14:"notverytrivial";i:10315;s:13:"nottrivialize";i:10316;s:17:"notverytrivialize";i:10317;s:12:"nottrivially";i:10318;s:16:"notverytrivially";i:10319;s:10:"nottrouble";i:10320;s:14:"notverytrouble";i:10321;s:15:"nottroublemaker";i:10322;s:19:"notverytroublemaker";i:10323;s:14:"nottroublesome";i:10324;s:18:"notverytroublesome";i:10325;s:16:"nottroublesomely";i:10326;s:20:"notverytroublesomely";i:10327;s:12:"nottroubling";i:10328;s:16:"notverytroubling";i:10329;s:14:"nottroublingly";i:10330;s:18:"notverytroublingly";i:10331;s:9:"nottruant";i:10332;s:13:"notverytruant";i:10333;s:13:"nottumultuous";i:10334;s:17:"notverytumultuous";i:10335;s:12:"notturbulent";i:10336;s:16:"notveryturbulent";i:10337;s:10:"notturmoil";i:10338;s:14:"notveryturmoil";i:10339;s:8:"nottwist";i:10340;s:12:"notverytwist";i:10341;s:10:"nottwisted";i:10342;s:14:"notverytwisted";i:10343;s:9:"nottwists";i:10344;s:13:"notverytwists";i:10345;s:13:"nottyrannical";i:10346;s:17:"notverytyrannical";i:10347;s:15:"nottyrannically";i:10348;s:19:"notverytyrannically";i:10349;s:10:"nottyranny";i:10350;s:14:"notverytyranny";i:10351;s:9:"nottyrant";i:10352;s:13:"notverytyrant";i:10353;s:6:"notugh";i:10354;s:10:"notveryugh";i:10355;s:11:"notugliness";i:10356;s:15:"notveryugliness";i:10357;s:7:"notugly";i:10358;s:11:"notveryugly";i:10359;s:11:"notulterior";i:10360;s:15:"notveryulterior";i:10361;s:12:"notultimatum";i:10362;s:16:"notveryultimatum";i:10363;s:13:"notultimatums";i:10364;s:17:"notveryultimatums";i:10365;s:17:"notultra-hardline";i:10366;s:21:"notveryultra-hardline";i:10367;s:9:"notunable";i:10368;s:13:"notveryunable";i:10369;s:15:"notunacceptable";i:10370;s:19:"notveryunacceptable";i:10371;s:17:"notunacceptablely";i:10372;s:21:"notveryunacceptablely";i:10373;s:15:"notunaccustomed";i:10374;s:19:"notveryunaccustomed";i:10375;s:15:"notunattractive";i:10376;s:19:"notveryunattractive";i:10377;s:14:"notunauthentic";i:10378;s:18:"notveryunauthentic";i:10379;s:14:"notunavailable";i:10380;s:18:"notveryunavailable";i:10381;s:14:"notunavoidable";i:10382;s:18:"notveryunavoidable";i:10383;s:14:"notunavoidably";i:10384;s:18:"notveryunavoidably";i:10385;s:13:"notunbearable";i:10386;s:17:"notveryunbearable";i:10387;s:15:"notunbearablely";i:10388;s:19:"notveryunbearablely";i:10389;s:15:"notunbelievable";i:10390;s:19:"notveryunbelievable";i:10391;s:15:"notunbelievably";i:10392;s:19:"notveryunbelievably";i:10393;s:12:"notuncertain";i:10394;s:16:"notveryuncertain";i:10395;s:10:"notuncivil";i:10396;s:14:"notveryuncivil";i:10397;s:14:"notuncivilized";i:10398;s:18:"notveryuncivilized";i:10399;s:10:"notunclean";i:10400;s:14:"notveryunclean";i:10401;s:10:"notunclear";i:10402;s:14:"notveryunclear";i:10403;s:16:"notuncollectible";i:10404;s:20:"notveryuncollectible";i:10405;s:16:"notuncomfortable";i:10406;s:20:"notveryuncomfortable";i:10407;s:16:"notuncompetitive";i:10408;s:20:"notveryuncompetitive";i:10409;s:17:"notuncompromising";i:10410;s:21:"notveryuncompromising";i:10411;s:19:"notuncompromisingly";i:10412;s:23:"notveryuncompromisingly";i:10413;s:14:"notunconfirmed";i:10414;s:18:"notveryunconfirmed";i:10415;s:19:"notunconstitutional";i:10416;s:23:"notveryunconstitutional";i:10417;s:15:"notuncontrolled";i:10418;s:19:"notveryuncontrolled";i:10419;s:15:"notunconvincing";i:10420;s:19:"notveryunconvincing";i:10421;s:17:"notunconvincingly";i:10422;s:21:"notveryunconvincingly";i:10423;s:10:"notuncouth";i:10424;s:14:"notveryuncouth";i:10425;s:12:"notundecided";i:10426;s:16:"notveryundecided";i:10427;s:12:"notundefined";i:10428;s:16:"notveryundefined";i:10429;s:18:"notundependability";i:10430;s:22:"notveryundependability";i:10431;s:15:"notundependable";i:10432;s:19:"notveryundependable";i:10433;s:11:"notunderdog";i:10434;s:15:"notveryunderdog";i:10435;s:16:"notunderestimate";i:10436;s:20:"notveryunderestimate";i:10437;s:13:"notunderlings";i:10438;s:17:"notveryunderlings";i:10439;s:12:"notundermine";i:10440;s:16:"notveryundermine";i:10441;s:12:"notunderpaid";i:10442;s:16:"notveryunderpaid";i:10443;s:14:"notundesirable";i:10444;s:18:"notveryundesirable";i:10445;s:15:"notundetermined";i:10446;s:19:"notveryundetermined";i:10447;s:8:"notundid";i:10448;s:12:"notveryundid";i:10449;s:14:"notundignified";i:10450;s:18:"notveryundignified";i:10451;s:7:"notundo";i:10452;s:11:"notveryundo";i:10453;s:15:"notundocumented";i:10454;s:19:"notveryundocumented";i:10455;s:9:"notundone";i:10456;s:13:"notveryundone";i:10457;s:8:"notundue";i:10458;s:12:"notveryundue";i:10459;s:9:"notunease";i:10460;s:13:"notveryunease";i:10461;s:11:"notuneasily";i:10462;s:15:"notveryuneasily";i:10463;s:13:"notuneasiness";i:10464;s:17:"notveryuneasiness";i:10465;s:9:"notuneasy";i:10466;s:13:"notveryuneasy";i:10467;s:15:"notuneconomical";i:10468;s:19:"notveryuneconomical";i:10469;s:10:"notunequal";i:10470;s:14:"notveryunequal";i:10471;s:12:"notunethical";i:10472;s:16:"notveryunethical";i:10473;s:9:"notuneven";i:10474;s:13:"notveryuneven";i:10475;s:13:"notuneventful";i:10476;s:17:"notveryuneventful";i:10477;s:13:"notunexpected";i:10478;s:17:"notveryunexpected";i:10479;s:15:"notunexpectedly";i:10480;s:19:"notveryunexpectedly";i:10481;s:14:"notunexplained";i:10482;s:18:"notveryunexplained";i:10483;s:9:"notunfair";i:10484;s:13:"notveryunfair";i:10485;s:11:"notunfairly";i:10486;s:15:"notveryunfairly";i:10487;s:13:"notunfaithful";i:10488;s:17:"notveryunfaithful";i:10489;s:15:"notunfaithfully";i:10490;s:19:"notveryunfaithfully";i:10491;s:13:"notunfamiliar";i:10492;s:17:"notveryunfamiliar";i:10493;s:14:"notunfavorable";i:10494;s:18:"notveryunfavorable";i:10495;s:12:"notunfeeling";i:10496;s:16:"notveryunfeeling";i:10497;s:13:"notunfinished";i:10498;s:17:"notveryunfinished";i:10499;s:8:"notunfit";i:10500;s:12:"notveryunfit";i:10501;s:13:"notunforeseen";i:10502;s:17:"notveryunforeseen";i:10503;s:14:"notunfortunate";i:10504;s:18:"notveryunfortunate";i:10505;s:12:"notunfounded";i:10506;s:16:"notveryunfounded";i:10507;s:13:"notunfriendly";i:10508;s:17:"notveryunfriendly";i:10509;s:14:"notunfulfilled";i:10510;s:18:"notveryunfulfilled";i:10511;s:11:"notunfunded";i:10512;s:15:"notveryunfunded";i:10513;s:13:"notungrateful";i:10514;s:17:"notveryungrateful";i:10515;s:15:"notungovernable";i:10516;s:19:"notveryungovernable";i:10517;s:12:"notunhappily";i:10518;s:16:"notveryunhappily";i:10519;s:14:"notunhappiness";i:10520;s:18:"notveryunhappiness";i:10521;s:10:"notunhappy";i:10522;s:14:"notveryunhappy";i:10523;s:12:"notunhealthy";i:10524;s:16:"notveryunhealthy";i:10525;s:16:"notunilateralism";i:10526;s:20:"notveryunilateralism";i:10527;s:15:"notunimaginable";i:10528;s:19:"notveryunimaginable";i:10529;s:15:"notunimaginably";i:10530;s:19:"notveryunimaginably";i:10531;s:14:"notunimportant";i:10532;s:18:"notveryunimportant";i:10533;s:13:"notuninformed";i:10534;s:17:"notveryuninformed";i:10535;s:12:"notuninsured";i:10536;s:16:"notveryuninsured";i:10537;s:11:"notunipolar";i:10538;s:15:"notveryunipolar";i:10539;s:9:"notunjust";i:10540;s:13:"notveryunjust";i:10541;s:16:"notunjustifiable";i:10542;s:20:"notveryunjustifiable";i:10543;s:16:"notunjustifiably";i:10544;s:20:"notveryunjustifiably";i:10545;s:14:"notunjustified";i:10546;s:18:"notveryunjustified";i:10547;s:11:"notunjustly";i:10548;s:15:"notveryunjustly";i:10549;s:9:"notunkind";i:10550;s:13:"notveryunkind";i:10551;s:11:"notunkindly";i:10552;s:15:"notveryunkindly";i:10553;s:15:"notunlamentable";i:10554;s:19:"notveryunlamentable";i:10555;s:15:"notunlamentably";i:10556;s:19:"notveryunlamentably";i:10557;s:11:"notunlawful";i:10558;s:15:"notveryunlawful";i:10559;s:13:"notunlawfully";i:10560;s:17:"notveryunlawfully";i:10561;s:15:"notunlawfulness";i:10562;s:19:"notveryunlawfulness";i:10563;s:10:"notunleash";i:10564;s:14:"notveryunleash";i:10565;s:13:"notunlicensed";i:10566;s:17:"notveryunlicensed";i:10567;s:10:"notunlucky";i:10568;s:14:"notveryunlucky";i:10569;s:10:"notunmoved";i:10570;s:14:"notveryunmoved";i:10571;s:12:"notunnatural";i:10572;s:16:"notveryunnatural";i:10573;s:14:"notunnaturally";i:10574;s:18:"notveryunnaturally";i:10575;s:14:"notunnecessary";i:10576;s:18:"notveryunnecessary";i:10577;s:11:"notunneeded";i:10578;s:15:"notveryunneeded";i:10579;s:10:"notunnerve";i:10580;s:14:"notveryunnerve";i:10581;s:11:"notunnerved";i:10582;s:15:"notveryunnerved";i:10583;s:12:"notunnerving";i:10584;s:16:"notveryunnerving";i:10585;s:14:"notunnervingly";i:10586;s:18:"notveryunnervingly";i:10587;s:12:"notunnoticed";i:10588;s:16:"notveryunnoticed";i:10589;s:13:"notunobserved";i:10590;s:17:"notveryunobserved";i:10591;s:13:"notunorthodox";i:10592;s:17:"notveryunorthodox";i:10593;s:14:"notunorthodoxy";i:10594;s:18:"notveryunorthodoxy";i:10595;s:13:"notunpleasant";i:10596;s:17:"notveryunpleasant";i:10597;s:17:"notunpleasantries";i:10598;s:21:"notveryunpleasantries";i:10599;s:12:"notunpopular";i:10600;s:16:"notveryunpopular";i:10601;s:14:"notunprecedent";i:10602;s:18:"notveryunprecedent";i:10603;s:16:"notunprecedented";i:10604;s:20:"notveryunprecedented";i:10605;s:16:"notunpredictable";i:10606;s:20:"notveryunpredictable";i:10607;s:13:"notunprepared";i:10608;s:17:"notveryunprepared";i:10609;s:15:"notunproductive";i:10610;s:19:"notveryunproductive";i:10611;s:15:"notunprofitable";i:10612;s:19:"notveryunprofitable";i:10613;s:14:"notunqualified";i:10614;s:18:"notveryunqualified";i:10615;s:10:"notunravel";i:10616;s:14:"notveryunravel";i:10617;s:12:"notunraveled";i:10618;s:16:"notveryunraveled";i:10619;s:14:"notunrealistic";i:10620;s:18:"notveryunrealistic";i:10621;s:15:"notunreasonable";i:10622;s:19:"notveryunreasonable";i:10623;s:15:"notunreasonably";i:10624;s:19:"notveryunreasonably";i:10625;s:14:"notunrelenting";i:10626;s:18:"notveryunrelenting";i:10627;s:16:"notunrelentingly";i:10628;s:20:"notveryunrelentingly";i:10629;s:16:"notunreliability";i:10630;s:20:"notveryunreliability";i:10631;s:13:"notunreliable";i:10632;s:17:"notveryunreliable";i:10633;s:13:"notunresolved";i:10634;s:17:"notveryunresolved";i:10635;s:9:"notunrest";i:10636;s:13:"notveryunrest";i:10637;s:9:"notunruly";i:10638;s:13:"notveryunruly";i:10639;s:9:"notunsafe";i:10640;s:13:"notveryunsafe";i:10641;s:17:"notunsatisfactory";i:10642;s:21:"notveryunsatisfactory";i:10643;s:11:"notunsavory";i:10644;s:15:"notveryunsavory";i:10645;s:15:"notunscrupulous";i:10646;s:19:"notveryunscrupulous";i:10647;s:17:"notunscrupulously";i:10648;s:21:"notveryunscrupulously";i:10649;s:11:"notunseemly";i:10650;s:15:"notveryunseemly";i:10651;s:11:"notunsettle";i:10652;s:15:"notveryunsettle";i:10653;s:12:"notunsettled";i:10654;s:16:"notveryunsettled";i:10655;s:13:"notunsettling";i:10656;s:17:"notveryunsettling";i:10657;s:15:"notunsettlingly";i:10658;s:19:"notveryunsettlingly";i:10659;s:12:"notunskilled";i:10660;s:16:"notveryunskilled";i:10661;s:18:"notunsophisticated";i:10662;s:22:"notveryunsophisticated";i:10663;s:10:"notunsound";i:10664;s:14:"notveryunsound";i:10665;s:14:"notunspeakable";i:10666;s:18:"notveryunspeakable";i:10667;s:16:"notunspeakablely";i:10668;s:20:"notveryunspeakablely";i:10669;s:14:"notunspecified";i:10670;s:18:"notveryunspecified";i:10671;s:11:"notunstable";i:10672;s:15:"notveryunstable";i:10673;s:13:"notunsteadily";i:10674;s:17:"notveryunsteadily";i:10675;s:15:"notunsteadiness";i:10676;s:19:"notveryunsteadiness";i:10677;s:11:"notunsteady";i:10678;s:15:"notveryunsteady";i:10679;s:15:"notunsuccessful";i:10680;s:19:"notveryunsuccessful";i:10681;s:17:"notunsuccessfully";i:10682;s:21:"notveryunsuccessfully";i:10683;s:14:"notunsupported";i:10684;s:18:"notveryunsupported";i:10685;s:9:"notunsure";i:10686;s:13:"notveryunsure";i:10687;s:15:"notunsuspecting";i:10688;s:19:"notveryunsuspecting";i:10689;s:16:"notunsustainable";i:10690;s:20:"notveryunsustainable";i:10691;s:12:"notuntenable";i:10692;s:16:"notveryuntenable";i:10693;s:11:"notuntested";i:10694;s:15:"notveryuntested";i:10695;s:14:"notunthinkable";i:10696;s:18:"notveryunthinkable";i:10697;s:14:"notunthinkably";i:10698;s:18:"notveryunthinkably";i:10699;s:11:"notuntimely";i:10700;s:15:"notveryuntimely";i:10701;s:9:"notuntrue";i:10702;s:13:"notveryuntrue";i:10703;s:16:"notuntrustworthy";i:10704;s:20:"notveryuntrustworthy";i:10705;s:13:"notuntruthful";i:10706;s:17:"notveryuntruthful";i:10707;s:10:"notunusual";i:10708;s:14:"notveryunusual";i:10709;s:12:"notunusually";i:10710;s:16:"notveryunusually";i:10711;s:11:"notunwanted";i:10712;s:15:"notveryunwanted";i:10713;s:14:"notunwarranted";i:10714;s:18:"notveryunwarranted";i:10715;s:12:"notunwelcome";i:10716;s:16:"notveryunwelcome";i:10717;s:11:"notunwieldy";i:10718;s:15:"notveryunwieldy";i:10719;s:12:"notunwilling";i:10720;s:16:"notveryunwilling";i:10721;s:14:"notunwillingly";i:10722;s:18:"notveryunwillingly";i:10723;s:16:"notunwillingness";i:10724;s:20:"notveryunwillingness";i:10725;s:9:"notunwise";i:10726;s:13:"notveryunwise";i:10727;s:11:"notunwisely";i:10728;s:15:"notveryunwisely";i:10729;s:13:"notunworkable";i:10730;s:17:"notveryunworkable";i:10731;s:11:"notunworthy";i:10732;s:15:"notveryunworthy";i:10733;s:13:"notunyielding";i:10734;s:17:"notveryunyielding";i:10735;s:10:"notupbraid";i:10736;s:14:"notveryupbraid";i:10737;s:11:"notupheaval";i:10738;s:15:"notveryupheaval";i:10739;s:11:"notuprising";i:10740;s:15:"notveryuprising";i:10741;s:9:"notuproar";i:10742;s:13:"notveryuproar";i:10743;s:13:"notuproarious";i:10744;s:17:"notveryuproarious";i:10745;s:15:"notuproariously";i:10746;s:19:"notveryuproariously";i:10747;s:12:"notuproarous";i:10748;s:16:"notveryuproarous";i:10749;s:14:"notuproarously";i:10750;s:18:"notveryuproarously";i:10751;s:9:"notuproot";i:10752;s:13:"notveryuproot";i:10753;s:8:"notupset";i:10754;s:12:"notveryupset";i:10755;s:12:"notupsetting";i:10756;s:16:"notveryupsetting";i:10757;s:14:"notupsettingly";i:10758;s:18:"notveryupsettingly";i:10759;s:10:"noturgency";i:10760;s:14:"notveryurgency";i:10761;s:9:"noturgent";i:10762;s:13:"notveryurgent";i:10763;s:11:"noturgently";i:10764;s:15:"notveryurgently";i:10765;s:10:"notuseless";i:10766;s:14:"notveryuseless";i:10767;s:8:"notusurp";i:10768;s:12:"notveryusurp";i:10769;s:10:"notusurper";i:10770;s:14:"notveryusurper";i:10771;s:8:"notutter";i:10772;s:12:"notveryutter";i:10773;s:10:"notutterly";i:10774;s:14:"notveryutterly";i:10775;s:10:"notvagrant";i:10776;s:14:"notveryvagrant";i:10777;s:8:"notvague";i:10778;s:12:"notveryvague";i:10779;s:12:"notvagueness";i:10780;s:16:"notveryvagueness";i:10781;s:7:"notvain";i:10782;s:11:"notveryvain";i:10783;s:9:"notvainly";i:10784;s:13:"notveryvainly";i:10785;s:9:"notvanish";i:10786;s:13:"notveryvanish";i:10787;s:9:"notvanity";i:10788;s:13:"notveryvanity";i:10789;s:11:"notvehement";i:10790;s:15:"notveryvehement";i:10791;s:13:"notvehemently";i:10792;s:17:"notveryvehemently";i:10793;s:12:"notvengeance";i:10794;s:16:"notveryvengeance";i:10795;s:11:"notvengeful";i:10796;s:15:"notveryvengeful";i:10797;s:13:"notvengefully";i:10798;s:17:"notveryvengefully";i:10799;s:15:"notvengefulness";i:10800;s:19:"notveryvengefulness";i:10801;s:8:"notvenom";i:10802;s:12:"notveryvenom";i:10803;s:11:"notvenomous";i:10804;s:15:"notveryvenomous";i:10805;s:13:"notvenomously";i:10806;s:17:"notveryvenomously";i:10807;s:7:"notvent";i:10808;s:11:"notveryvent";i:10809;s:11:"notvestiges";i:10810;s:15:"notveryvestiges";i:10811;s:7:"notveto";i:10812;s:11:"notveryveto";i:10813;s:6:"notvex";i:10814;s:10:"notveryvex";i:10815;s:11:"notvexation";i:10816;s:15:"notveryvexation";i:10817;s:9:"notvexing";i:10818;s:13:"notveryvexing";i:10819;s:11:"notvexingly";i:10820;s:15:"notveryvexingly";i:10821;s:7:"notvice";i:10822;s:11:"notveryvice";i:10823;s:10:"notvicious";i:10824;s:14:"notveryvicious";i:10825;s:12:"notviciously";i:10826;s:16:"notveryviciously";i:10827;s:14:"notviciousness";i:10828;s:18:"notveryviciousness";i:10829;s:12:"notvictimize";i:10830;s:16:"notveryvictimize";i:10831;s:6:"notvie";i:10832;s:10:"notveryvie";i:10833;s:7:"notvile";i:10834;s:11:"notveryvile";i:10835;s:11:"notvileness";i:10836;s:15:"notveryvileness";i:10837;s:9:"notvilify";i:10838;s:13:"notveryvilify";i:10839;s:13:"notvillainous";i:10840;s:17:"notveryvillainous";i:10841;s:15:"notvillainously";i:10842;s:19:"notveryvillainously";i:10843;s:11:"notvillains";i:10844;s:15:"notveryvillains";i:10845;s:10:"notvillian";i:10846;s:14:"notveryvillian";i:10847;s:13:"notvillianous";i:10848;s:17:"notveryvillianous";i:10849;s:15:"notvillianously";i:10850;s:19:"notveryvillianously";i:10851;s:10:"notvillify";i:10852;s:14:"notveryvillify";i:10853;s:13:"notvindictive";i:10854;s:17:"notveryvindictive";i:10855;s:15:"notvindictively";i:10856;s:19:"notveryvindictively";i:10857;s:17:"notvindictiveness";i:10858;s:21:"notveryvindictiveness";i:10859;s:10:"notviolate";i:10860;s:14:"notveryviolate";i:10861;s:12:"notviolation";i:10862;s:16:"notveryviolation";i:10863;s:11:"notviolator";i:10864;s:15:"notveryviolator";i:10865;s:10:"notviolent";i:10866;s:14:"notveryviolent";i:10867;s:12:"notviolently";i:10868;s:16:"notveryviolently";i:10869;s:8:"notviper";i:10870;s:12:"notveryviper";i:10871;s:12:"notvirulence";i:10872;s:16:"notveryvirulence";i:10873;s:11:"notvirulent";i:10874;s:15:"notveryvirulent";i:10875;s:13:"notvirulently";i:10876;s:17:"notveryvirulently";i:10877;s:8:"notvirus";i:10878;s:12:"notveryvirus";i:10879;s:10:"notvocally";i:10880;s:14:"notveryvocally";i:10881;s:13:"notvociferous";i:10882;s:17:"notveryvociferous";i:10883;s:15:"notvociferously";i:10884;s:19:"notveryvociferously";i:10885;s:7:"notvoid";i:10886;s:11:"notveryvoid";i:10887;s:11:"notvolatile";i:10888;s:15:"notveryvolatile";i:10889;s:13:"notvolatility";i:10890;s:17:"notveryvolatility";i:10891;s:8:"notvomit";i:10892;s:12:"notveryvomit";i:10893;s:9:"notvulgar";i:10894;s:13:"notveryvulgar";i:10895;s:7:"notwail";i:10896;s:11:"notverywail";i:10897;s:9:"notwallow";i:10898;s:13:"notverywallow";i:10899;s:7:"notwane";i:10900;s:11:"notverywane";i:10901;s:9:"notwaning";i:10902;s:13:"notverywaning";i:10903;s:9:"notwanton";i:10904;s:13:"notverywanton";i:10905;s:6:"notwar";i:10906;s:10:"notverywar";i:10907;s:11:"notwar-like";i:10908;s:15:"notverywar-like";i:10909;s:10:"notwarfare";i:10910;s:14:"notverywarfare";i:10911;s:10:"notwarlike";i:10912;s:14:"notverywarlike";i:10913;s:10:"notwarning";i:10914;s:14:"notverywarning";i:10915;s:7:"notwarp";i:10916;s:11:"notverywarp";i:10917;s:9:"notwarped";i:10918;s:13:"notverywarped";i:10919;s:7:"notwary";i:10920;s:11:"notverywary";i:10921;s:9:"notwarily";i:10922;s:13:"notverywarily";i:10923;s:11:"notwariness";i:10924;s:15:"notverywariness";i:10925;s:8:"notwaste";i:10926;s:12:"notverywaste";i:10927;s:11:"notwasteful";i:10928;s:15:"notverywasteful";i:10929;s:15:"notwastefulness";i:10930;s:19:"notverywastefulness";i:10931;s:11:"notwatchdog";i:10932;s:15:"notverywatchdog";i:10933;s:10:"notwayward";i:10934;s:14:"notverywayward";i:10935;s:7:"notweak";i:10936;s:11:"notveryweak";i:10937;s:9:"notweaken";i:10938;s:13:"notveryweaken";i:10939;s:12:"notweakening";i:10940;s:16:"notveryweakening";i:10941;s:11:"notweakness";i:10942;s:15:"notveryweakness";i:10943;s:13:"notweaknesses";i:10944;s:17:"notveryweaknesses";i:10945;s:12:"notweariness";i:10946;s:16:"notveryweariness";i:10947;s:12:"notwearisome";i:10948;s:16:"notverywearisome";i:10949;s:8:"notweary";i:10950;s:12:"notveryweary";i:10951;s:8:"notwedge";i:10952;s:12:"notverywedge";i:10953;s:6:"notwee";i:10954;s:10:"notverywee";i:10955;s:7:"notweed";i:10956;s:11:"notveryweed";i:10957;s:7:"notweep";i:10958;s:11:"notveryweep";i:10959;s:8:"notweird";i:10960;s:12:"notveryweird";i:10961;s:10:"notweirdly";i:10962;s:14:"notveryweirdly";i:10963;s:10:"notwheedle";i:10964;s:14:"notverywheedle";i:10965;s:10:"notwhimper";i:10966;s:14:"notverywhimper";i:10967;s:8:"notwhine";i:10968;s:12:"notverywhine";i:10969;s:8:"notwhips";i:10970;s:12:"notverywhips";i:10971;s:9:"notwicked";i:10972;s:13:"notverywicked";i:10973;s:11:"notwickedly";i:10974;s:15:"notverywickedly";i:10975;s:13:"notwickedness";i:10976;s:17:"notverywickedness";i:10977;s:13:"notwidespread";i:10978;s:17:"notverywidespread";i:10979;s:7:"notwild";i:10980;s:11:"notverywild";i:10981;s:9:"notwildly";i:10982;s:13:"notverywildly";i:10983;s:8:"notwiles";i:10984;s:12:"notverywiles";i:10985;s:7:"notwilt";i:10986;s:11:"notverywilt";i:10987;s:7:"notwily";i:10988;s:11:"notverywily";i:10989;s:8:"notwince";i:10990;s:12:"notverywince";i:10991;s:11:"notwithheld";i:10992;s:15:"notverywithheld";i:10993;s:11:"notwithhold";i:10994;s:15:"notverywithhold";i:10995;s:6:"notwoe";i:10996;s:10:"notverywoe";i:10997;s:12:"notwoebegone";i:10998;s:16:"notverywoebegone";i:10999;s:9:"notwoeful";i:11000;s:13:"notverywoeful";i:11001;s:11:"notwoefully";i:11002;s:15:"notverywoefully";i:11003;s:7:"notworn";i:11004;s:11:"notveryworn";i:11005;s:10:"notworried";i:11006;s:14:"notveryworried";i:11007;s:12:"notworriedly";i:11008;s:16:"notveryworriedly";i:11009;s:10:"notworrier";i:11010;s:14:"notveryworrier";i:11011;s:10:"notworries";i:11012;s:14:"notveryworries";i:11013;s:12:"notworrisome";i:11014;s:16:"notveryworrisome";i:11015;s:8:"notworry";i:11016;s:12:"notveryworry";i:11017;s:11:"notworrying";i:11018;s:15:"notveryworrying";i:11019;s:13:"notworryingly";i:11020;s:17:"notveryworryingly";i:11021;s:8:"notworse";i:11022;s:12:"notveryworse";i:11023;s:9:"notworsen";i:11024;s:13:"notveryworsen";i:11025;s:12:"notworsening";i:11026;s:16:"notveryworsening";i:11027;s:8:"notworst";i:11028;s:12:"notveryworst";i:11029;s:12:"notworthless";i:11030;s:16:"notveryworthless";i:11031;s:14:"notworthlessly";i:11032;s:18:"notveryworthlessly";i:11033;s:16:"notworthlessness";i:11034;s:20:"notveryworthlessness";i:11035;s:8:"notwound";i:11036;s:12:"notverywound";i:11037;s:9:"notwounds";i:11038;s:13:"notverywounds";i:11039;s:8:"notwreck";i:11040;s:12:"notverywreck";i:11041;s:10:"notwrangle";i:11042;s:14:"notverywrangle";i:11043;s:8:"notwrath";i:11044;s:12:"notverywrath";i:11045;s:8:"notwrest";i:11046;s:12:"notverywrest";i:11047;s:10:"notwrestle";i:11048;s:14:"notverywrestle";i:11049;s:9:"notwretch";i:11050;s:13:"notverywretch";i:11051;s:11:"notwretched";i:11052;s:15:"notverywretched";i:11053;s:13:"notwretchedly";i:11054;s:17:"notverywretchedly";i:11055;s:15:"notwretchedness";i:11056;s:19:"notverywretchedness";i:11057;s:9:"notwrithe";i:11058;s:13:"notverywrithe";i:11059;s:8:"notwrong";i:11060;s:12:"notverywrong";i:11061;s:11:"notwrongful";i:11062;s:15:"notverywrongful";i:11063;s:10:"notwrongly";i:11064;s:14:"notverywrongly";i:11065;s:10:"notwrought";i:11066;s:14:"notverywrought";i:11067;s:7:"notyawn";i:11068;s:11:"notveryyawn";i:11069;s:7:"notyelp";i:11070;s:11:"notveryyelp";i:11071;s:9:"notzealot";i:11072;s:13:"notveryzealot";i:11073;s:10:"notzealous";i:11074;s:14:"notveryzealous";i:11075;s:12:"notzealously";i:11076;s:16:"notveryzealously";i:11077;s:4:"nice";} jwhennessey/phpinsight/lib/PHPInsight/data/data.prefix.php 0000644 00000000066 15153553404 0017644 0 ustar 00 a:3:{i:0;s:5:"isn't";i:1;s:6:"aren't";i:2;s:3:"not";}
jwhennessey/phpinsight/lib/PHPInsight/dictionaries/source.ign.php 0000644 00000015025 15153553404 0021260 0 ustar 00 <?php
$ign = array(
'able',
'about',
'above',
'according',
'accordingly',
'acirc',
'across',
'actually',
'acute',
'aelig',
'after',
'afterwards',
'again',
'against',
'agrave',
'ain\'t',
'all',
'allow',
'allows',
'almost',
'alone',
'along',
'already',
'also',
'although',
'always',
'am',
'among',
'amongst',
'amp',
'an',
'and',
'another',
'any',
'anybody',
'anyhow',
'anyone',
'anything',
'anyway',
'anyways',
'anywhere',
'apart',
'appear',
'appreciate',
'appropriate',
'are',
'aring',
'around',
'as',
'aside',
'ask',
'asking',
'associated',
'at',
'atilde',
'auml',
'available',
'away',
'awfully',
'be',
'became',
'because',
'become',
'becomes',
'becoming',
'been',
'before',
'beforehand',
'behind',
'being',
'believe',
'below',
'beside',
'besides',
'best',
'better',
'between',
'beyond',
'bit',
'both',
'brief',
'brvbar',
'but',
'by',
'c\'mon',
'c\'s',
'came',
'can',
'can\'t',
'cannot',
'cant',
'cause',
'causes',
'ccedil',
'cedil',
'cent',
'certain',
'certainly',
'changes',
'clearly',
'co',
'com',
'come',
'comes',
'como',
'concerning',
'consequently',
'consider',
'considering',
'contain',
'containing',
'contains',
'corresponding',
'could',
'couldn\'t',
'course',
'currently',
'definitely',
'described',
'despite',
'did',
'didn\'t',
'different',
'dlvr',
'do',
'does',
'doesn\'t',
'doing',
'don\'t',
'done',
'down',
'downwards',
'during',
'each',
'eacute',
'edu',
'eg',
'egrave',
'eight',
'either',
'else',
'elsewhere',
'enough',
'entirely',
'especially',
'et',
'etc',
'ETH',
'even',
'ever',
'every',
'everybody',
'everyone',
'everything',
'everywhere',
'ex',
'exactly',
'example',
'except',
'far',
'few',
'fifth',
'filhos',
'first',
'five',
'followed',
'following',
'follows',
'for',
'former',
'formerly',
'forth',
'four',
'frac',
'from',
'further',
'furthermore',
'get',
'gets',
'getting',
'given',
'gives',
'go',
'goes',
'going',
'gone',
'goo',
'got',
'gotten',
'greetings',
'had',
'hadn\'t',
'happens',
'hardly',
'has',
'hasn\'t',
'have',
'haven\'t',
'having',
'he',
'he\'s',
'hello',
'help',
'hence',
'her',
'here',
'here\'s',
'hereafter',
'hereby',
'herein',
'hereupon',
'hers',
'herself',
'hi',
'him',
'himself',
'his',
'hither',
'hopefully',
'how',
'howbeit',
'however',
'http',
'https',
'i\'d',
'i\'ll',
'i\'m',
'i\'ve',
'Icirc',
'ie',
'iexcl',
'if',
'ignored',
'immediate',
'in',
'inasmuch',
'inc',
'indeed',
'indicate',
'indicated',
'indicates',
'inner',
'insofar',
'instead',
'into',
'inward',
'is',
'it',
'it\'d',
'it\'ll',
'it\'s',
'its',
'itself',
'iuml',
'just',
'keep',
'keeps',
'kept',
'know',
'known',
'knows',
'laquo',
'last',
'lately',
'later',
'latter',
'latterly',
'least',
'less',
'lest',
'let',
'let\'s',
'liked',
'likely',
'little',
'look',
'looking',
'looks',
'ltd',
'macr',
'mainly',
'many',
'may',
'maybe',
'me',
'mean',
'meanwhile',
'merely',
'might',
'more',
'moreover',
'most',
'mostly',
'much',
'must',
'my',
'myself',
'name',
'namely',
'nbsp',
'nd',
'near',
'nearly',
'necessary',
'need',
'needs',
'neither',
'never',
'nevertheless',
'new',
'next',
'nine',
'no',
'nobody',
'non',
'none',
'noone',
'nor',
'normally',
'nothing',
'novel',
'now',
'nowhere',
'ntilde',
'obviously',
'of',
'off',
'often',
'oh',
'ok',
'okay',
'old',
'on',
'once',
'one',
'ones',
'only',
'onto',
'or',
'ordf',
'ordm',
'other',
'others',
'otherwise',
'ought',
'our',
'ours',
'ourselves',
'out',
'outside',
'over',
'overall',
'own',
'para',
'particular',
'particularly',
'per',
'perhaps',
'placed',
'please',
'plus',
'plusmn',
'possible',
'presumably',
'probably',
'provides',
'que',
'quite',
'quot',
'qv',
'rather',
'rd',
're',
'really',
'reg',
'regarding',
'regardless',
'regards',
'relatively',
'respectively',
'right',
'said',
'same',
'saw',
'say',
'saying',
'says',
'second',
'secondly',
'sect',
'see',
'seeing',
'seem',
'seemed',
'seeming',
'seems',
'seen',
'self',
'selves',
'sensible',
'sent',
'ser',
'serious',
'seriously',
'seu',
'seven',
'several',
'shall',
'she',
'should',
'shouldn\'t',
'since',
'six',
'sLZjpNxJtx',
'so',
'some',
'somebody',
'somehow',
'someone',
'something',
'sometime',
'sometimes',
'somewhat',
'somewhere',
'soon',
'sorry',
'specified',
'specify',
'specifying',
'still',
'sub',
'such',
'sup',
'sure',
'take',
'taken',
'tell',
'tends',
'th',
'than',
'thank',
'thanks',
'thanx',
'that',
'that\'s',
'thats',
'the',
'their',
'theirs',
'them',
'themselves',
'then',
'thence',
'there',
'there\'s',
'thereafter',
'thereby',
'therefore',
'therein',
'theres',
'thereupon',
'these',
'they',
'they\'d',
'they\'ll',
'they\'re',
'they\'ve',
'think',
'third',
'this',
'thorough',
'thoroughly',
'those',
'though',
'three',
'through',
'throughout',
'thru',
'thus',
'to',
'together',
'too',
'took',
'toward',
'towards',
'tried',
'tries',
'truly',
'try',
'trying',
'twice',
'two',
'Ugrave',
'un',
'under',
'unfortunately',
'unless',
'unlikely',
'until',
'unto',
'up',
'upon',
'us',
'use',
'used',
'uses',
'using',
'usually',
'value',
'various',
'very',
'via',
'viz',
'vs',
'want',
'wants',
'was',
'wasn\'t',
'way',
'we',
'we\'d',
'we\'ll',
'we\'re',
'we\'ve',
'welcome',
'well',
'went',
'were',
'weren\'t',
'what',
'what\'s',
'whatever',
'when',
'whence',
'whenever',
'where',
'where\'s',
'whereafter',
'whereas',
'whereby',
'wherein',
'whereupon',
'wherever',
'whether',
'which',
'while',
'whither',
'who',
'who\'s',
'whoever',
'whole',
'whom',
'whose',
'why',
'will',
'willing',
'wish',
'with',
'within',
'without',
'won\'t',
'wonder',
'would',
'wouldn\'t',
'www',
'yes',
'yet',
'you',
'you\'d',
'you\'ll',
'you\'re',
'you\'ve',
'your',
'yours',
'yourself',
'yourselves',
'zero',
'zynga',
);
jwhennessey/phpinsight/lib/PHPInsight/dictionaries/source.neg.php 0000644 00000456407 15153553404 0021271 0 ustar 00 <?php
$neg = array(
"%-(",
")-:",
"):",
")o:",
"38*",
"8",
"8-0",
"8/",
"8c",
":",
":#",
":(",
":*(",
":,(",
":-",
":-&",
":-(",
":-(o)",
":-/",
":-s",
":-|",
":/",
":?¢‚Ǩ¬¶(",
":[",
":_(",
":e",
":f",
":o",
":o(",
":s",
":|",
"=[",
">",
">/",
">:(",
">:l",
">:o",
">[",
">o>",
"^o)",
"abandon",
"abandoned",
"abandonment",
"abase",
"abasement",
"abash",
"abate",
"abdicate",
"aberration",
"abhor",
"abhorred",
"abhorrence",
"abhorrent",
"abhorrently",
"abhors",
"abject",
"abjectly",
"abjure",
"abnormal",
"abolish",
"abominable",
"abominably",
"abominate",
"abomination",
"abrade",
"abrasive",
"abrupt",
"abscond",
"absence",
"absent-minded",
"absentee",
"absurd",
"absurdity",
"absurdly",
"absurdness",
"abuse",
"abused",
"abuses",
"abusive",
"abysmal",
"abysmally",
"abyss",
"accidental",
"accost",
"accursed",
"accusation",
"accusations",
"accuse",
"accused",
"accuses",
"accusing",
"accusingly",
"acerbate",
"acerbic",
"acerbically",
"ache",
"acrid",
"acridly",
"acridness",
"acrimonious",
"acrimoniously",
"acrimony",
"adamant",
"adamantly",
"addict",
"addicted",
"addiction",
"admonish",
"admonisher",
"admonishingly",
"admonishment",
"admonition",
"adrift",
"adulterate",
"adulterated",
"adulteration",
"adversarial",
"adversary",
"adverse",
"adversity",
"affectation",
"afflict",
"affliction",
"afflictive",
"affront",
"afraid",
"aggravate",
"aggravated",
"aggravating",
"aggravation",
"aggression",
"aggressive",
"aggressiveness",
"aggressor",
"aggrieve",
"aggrieved",
"aghast",
"agitate",
"agitated",
"agitation",
"agitator",
"agonies",
"agonize",
"agonizing",
"agonizingly",
"agony",
"ail",
"ailment",
"aimless",
"airs",
"alarm",
"alarmed",
"alarming",
"alarmingly",
"alas",
"alienate",
"alienated",
"alienation",
"allegation",
"allegations",
"allege",
"allergic",
"alone",
"aloof",
"altercation",
"ambiguity",
"ambiguous",
"ambivalence",
"ambivalent",
"ambush",
"amiss",
"amputate",
"anarchism",
"anarchist",
"anarchistic",
"anarchy",
"anemic",
"anger",
"angrily",
"angriness",
"angry",
"anguish",
"animosity",
"annihilate",
"annihilation",
"annoy",
"annoyance",
"annoyed",
"annoying",
"annoyingly",
"anomalous",
"anomaly",
"antagonism",
"antagonist",
"antagonistic",
"antagonize",
"anti-",
"anti-american",
"anti-israeli",
"anti-occupation",
"anti-proliferation",
"anti-semites",
"anti-social",
"anti-us",
"anti-white",
"antipathy",
"antiquated",
"antithetical",
"anxieties",
"anxiety",
"anxious",
"anxiously",
"anxiousness",
"apathetic",
"apathetically",
"apathy",
"ape",
"apocalypse",
"apocalyptic",
"apologist",
"apologists",
"appal",
"appall",
"appalled",
"appalling",
"appallingly",
"apprehension",
"apprehensions",
"apprehensive",
"apprehensively",
"arbitrary",
"arcane",
"archaic",
"arduous",
"arduously",
"aren'tgood",
"argue",
"argument",
"argumentative",
"arguments",
"arrogance",
"arrogant",
"arrogantly",
"artificial",
"ashamed",
"asinine",
"asininely",
"asinininity",
"askance",
"asperse",
"aspersion",
"aspersions",
"assail",
"assassin",
"assassinate",
"assault",
"assaulted",
"astray",
"asunder",
"atrocious",
"atrocities",
"atrocity",
"atrophy",
"attack",
"attacked",
"audacious",
"audaciously",
"audaciousness",
"audacity",
"austere",
"authoritarian",
"autocrat",
"autocratic",
"avalanche",
"avarice",
"avaricious",
"avariciously",
"avenge",
"averse",
"aversion",
"avoid",
"avoidance",
"avoided",
"awful",
"awfulness",
"awkward",
"awkwardness",
"ax",
"b(",
"babble",
"backbite",
"backbiting",
"backward",
"backwardness",
"bad",
"badgered",
"badly",
"baffle",
"baffled",
"bafflement",
"baffling",
"bait",
"balk",
"banal",
"banalize",
"bane",
"banish",
"banishment",
"bankrupt",
"banned",
"bar",
"barbarian",
"barbaric",
"barbarically",
"barbarity",
"barbarous",
"barbarously",
"barely",
"barren",
"baseless",
"bashful",
"bastard",
"battered",
"battering",
"battle",
"battle-lines",
"battlefield",
"battleground",
"batty",
"bd",
"bearish",
"beast",
"beastly",
"beat",
"beaten",
"bedlam",
"bedlamite",
"befoul",
"beg",
"beggar",
"beggarly",
"begging",
"beguile",
"belabor",
"belated",
"beleaguer",
"belie",
"belittle",
"belittled",
"belittling",
"bellicose",
"belligerence",
"belligerent",
"belligerently",
"bemoan",
"bemoaning",
"bemused",
"bent",
"berate",
"berated",
"bereave",
"bereavement",
"bereft",
"berserk",
"beseech",
"beset",
"besiege",
"besmirch",
"bestial",
"betray",
"betrayal",
"betrayals",
"betrayed",
"betrayer",
"bewail",
"beware",
"bewilder",
"bewildered",
"bewildering",
"bewilderingly",
"bewilderment",
"bewitch",
"bias",
"biased",
"biases",
"bicker",
"bickering",
"bid-rigging",
"bitch",
"bitchy",
"biting",
"bitingly",
"bitter",
"bitterly",
"bitterness",
"bizarre",
"bizzare",
"blab",
"blabber",
"black",
"blacklisted",
"blackmail",
"blackmailed",
"blah",
"blame",
"blamed",
"blameworthy",
"bland",
"blandish",
"blaspheme",
"blasphemous",
"blasphemy",
"blast",
"blasted",
"blatant",
"blatantly",
"blather",
"bleak",
"bleakly",
"bleakness",
"bleed",
"blemish",
"blind",
"blinding",
"blindingly",
"blindness",
"blindside",
"blister",
"blistering",
"bloated",
"block",
"blockhead",
"blood",
"bloodshed",
"bloodthirsty",
"bloody",
"blow",
"blunder",
"blundering",
"blunders",
"blunt",
"blur",
"blurt",
"boast",
"boastful",
"boggle",
"bogus",
"boil",
"boiling",
"boisterous",
"bomb",
"bombard",
"bombardment",
"bombastic",
"bondage",
"bonkers",
"bore",
"bored",
"boredom",
"boring",
"botch",
"bother",
"bothered",
"bothersome",
"bounded",
"bowdlerize",
"boycott",
"braggart",
"bragger",
"brainwash",
"brash",
"brashly",
"brashness",
"brat",
"bravado",
"brazen",
"brazenly",
"brazenness",
"breach",
"break",
"break-point",
"breakdown",
"brimstone",
"bristle",
"brittle",
"broke",
"broken",
"broken-hearted",
"brood",
"browbeat",
"bruise",
"bruised",
"brusque",
"brutal",
"brutalising",
"brutalities",
"brutality",
"brutalize",
"brutalizing",
"brutally",
"brute",
"brutish",
"buckle",
"bug",
"bugged",
"bulky",
"bullied",
"bullies",
"bully",
"bullyingly",
"bum",
"bummed",
"bumpy",
"bungle",
"bungler",
"bunk",
"burden",
"burdened",
"burdensome",
"burdensomely",
"burn",
"burned",
"busy",
"busybody",
"butcher",
"butchery",
"byzantine",
"cackle",
"caged",
"cajole",
"calamities",
"calamitous",
"calamitously",
"calamity",
"callous",
"calumniate",
"calumniation",
"calumnies",
"calumnious",
"calumniously",
"calumny",
"cancer",
"cancerous",
"cannibal",
"cannibalize",
"capitulate",
"capricious",
"capriciously",
"capriciousness",
"capsize",
"captive",
"careless",
"carelessness",
"caricature",
"carnage",
"carp",
"cartoon",
"cartoonish",
"cash-strapped",
"castigate",
"casualty",
"cataclysm",
"cataclysmal",
"cataclysmic",
"cataclysmically",
"catastrophe",
"catastrophes",
"catastrophic",
"catastrophically",
"caustic",
"caustically",
"cautionary",
"cautious",
"cave",
"censure",
"chafe",
"chaff",
"chagrin",
"challenge",
"challenging",
"chaos",
"chaotic",
"charisma",
"chased",
"chasten",
"chastise",
"chastisement",
"chatter",
"chatterbox",
"cheap",
"cheapen",
"cheat",
"cheated",
"cheater",
"cheerless",
"chicken",
"chide",
"childish",
"chill",
"chilly",
"chit",
"choke",
"choppy",
"chore",
"chronic",
"clamor",
"clamorous",
"clash",
"claustrophobic",
"cliche",
"cliched",
"clingy",
"clique",
"clog",
"close",
"closed",
"cloud",
"clueless",
"clumsy",
"coarse",
"coaxed",
"cocky",
"codependent",
"coerce",
"coerced",
"coercion",
"coercive",
"cold",
"coldly",
"collapse",
"collide",
"collude",
"collusion",
"combative",
"comedy",
"comical",
"commanded",
"commiserate",
"commonplace",
"commotion",
"compared",
"compel",
"competitive",
"complacent",
"complain",
"complaining",
"complaint",
"complaints",
"complicate",
"complicated",
"complication",
"complicit",
"compulsion",
"compulsive",
"compulsory",
"concede",
"conceit",
"conceited",
"concern",
"concerned",
"concerns",
"concession",
"concessions",
"condemn",
"condemnable",
"condemnation",
"condescend",
"condescending",
"condescendingly",
"condescension",
"condolence",
"condolences",
"confess",
"confession",
"confessions",
"confined",
"conflict",
"conflicted",
"confound",
"confounded",
"confounding",
"confront",
"confrontation",
"confrontational",
"confronted",
"confuse",
"confused",
"confusing",
"confusion",
"congested",
"congestion",
"conned",
"conspicuous",
"conspicuously",
"conspiracies",
"conspiracy",
"conspirator",
"conspiratorial",
"conspire",
"consternation",
"constrain",
"constraint",
"consume",
"consumed",
"contagious",
"contaminate",
"contamination",
"contemplative",
"contempt",
"contemptible",
"contemptuous",
"contemptuously",
"contend",
"contention",
"contentious",
"contort",
"contortions",
"contradict",
"contradiction",
"contradictory",
"contrariness",
"contrary",
"contravene",
"contrive",
"contrived",
"controlled",
"controversial",
"controversy",
"convicted",
"convoluted",
"coping",
"cornered",
"corralled",
"corrode",
"corrosion",
"corrosive",
"corrupt",
"corruption",
"costly",
"counterproductive",
"coupists",
"covetous",
"cow",
"coward",
"cowardly",
"crabby",
"crackdown",
"crafty",
"cramped",
"cranky",
"crap",
"crappy",
"crass",
"craven",
"cravenly",
"craze",
"crazily",
"craziness",
"crazy",
"credulous",
"creepy",
"crime",
"criminal",
"cringe",
"cripple",
"crippling",
"crisis",
"critic",
"critical",
"criticism",
"criticisms",
"criticize",
"criticized",
"critics",
"crook",
"crooked",
"cross",
"crowded",
"cruddy",
"crude",
"cruel",
"cruelties",
"cruelty",
"crumble",
"crummy",
"crumple",
"crush",
"crushed",
"crushing",
"cry",
"culpable",
"cumbersome",
"cuplrit",
"curse",
"cursed",
"curses",
"cursory",
"curt",
"cuss",
"cut",
"cutthroat",
"cynical",
"cynicism",
"d:",
"damage",
"damaged",
"damaging",
"damn",
"damnable",
"damnably",
"damnation",
"damned",
"damning",
"danger",
"dangerous",
"dangerousness",
"dangle",
"dark",
"darken",
"darkness",
"darn",
"dash",
"dastard",
"dastardly",
"daunt",
"daunting",
"dauntingly",
"dawdle",
"daze",
"dazed",
"dead",
"deadbeat",
"deadlock",
"deadly",
"deadweight",
"deaf",
"dearth",
"death",
"debacle",
"debase",
"debasement",
"debaser",
"debatable",
"debate",
"debauch",
"debaucher",
"debauchery",
"debilitate",
"debilitating",
"debility",
"decadence",
"decadent",
"decay",
"decayed",
"deceit",
"deceitful",
"deceitfully",
"deceitfulness",
"deceive",
"deceived",
"deceiver",
"deceivers",
"deceiving",
"deception",
"deceptive",
"deceptively",
"declaim",
"decline",
"declining",
"decrease",
"decreasing",
"decrement",
"decrepit",
"decrepitude",
"decry",
"deep",
"deepening",
"defamation",
"defamations",
"defamatory",
"defame",
"defamed",
"defeat",
"defeated",
"defect",
"defective",
"defenseless",
"defensive",
"defiance",
"defiant",
"defiantly",
"deficiency",
"deficient",
"defile",
"defiler",
"deflated",
"deform",
"deformed",
"defrauding",
"defunct",
"defy",
"degenerate",
"degenerately",
"degeneration",
"degradation",
"degrade",
"degraded",
"degrading",
"degradingly",
"dehumanization",
"dehumanize",
"dehumanized",
"deign",
"deject",
"dejected",
"dejectedly",
"dejection",
"delicate",
"delinquency",
"delinquent",
"delirious",
"delirium",
"delude",
"deluded",
"deluge",
"delusion",
"delusional",
"delusions",
"demanding",
"demean",
"demeaned",
"demeaning",
"demented",
"demise",
"demolish",
"demolisher",
"demon",
"demonic",
"demonize",
"demoralize",
"demoralized",
"demoralizing",
"demoralizingly",
"demotivated",
"denial",
"denigrate",
"denounce",
"denunciate",
"denunciation",
"denunciations",
"deny",
"dependent",
"deplete",
"depleted",
"deplorable",
"deplorably",
"deplore",
"deploring",
"deploringly",
"deprave",
"depraved",
"depravedly",
"deprecate",
"depress",
"depressed",
"depressing",
"depressingly",
"depression",
"deprive",
"deprived",
"deride",
"derision",
"derisive",
"derisively",
"derisiveness",
"derogatory",
"desecrate",
"desert",
"deserted",
"desertion",
"desiccate",
"desiccated",
"desolate",
"desolately",
"desolation",
"despair",
"despairing",
"despairingly",
"desperate",
"desperately",
"desperation",
"despicable",
"despicably",
"despise",
"despised",
"despoil",
"despoiler",
"despondence",
"despondency",
"despondent",
"despondently",
"despot",
"despotic",
"despotism",
"destabilisation",
"destitute",
"destitution",
"destroy",
"destroyed",
"destroyer",
"destruction",
"destructive",
"desultory",
"detached",
"deter",
"deteriorate",
"deteriorating",
"deterioration",
"deterrent",
"detest",
"detestable",
"detestably",
"detested",
"detract",
"detraction",
"detriment",
"detrimental",
"devalued",
"devastate",
"devastated",
"devastating",
"devastatingly",
"devastation",
"deviant",
"deviate",
"deviation",
"devil",
"devilish",
"devilishly",
"devilment",
"devilry",
"devious",
"deviously",
"deviousness",
"devoid",
"diabolic",
"diabolical",
"diabolically",
"diagnosed",
"diametrically",
"diatribe",
"diatribes",
"dictator",
"dictatorial",
"differ",
"different",
"difficult",
"difficulties",
"difficulty",
"diffidence",
"dig",
"digress",
"dilapidated",
"dilemma",
"dilly-dally",
"dim",
"diminish",
"diminishing",
"din",
"dinky",
"dire",
"directionless",
"direly",
"direness",
"dirt",
"dirty",
"disable",
"disabled",
"disaccord",
"disadvantage",
"disadvantaged",
"disadvantageous",
"disaffect",
"disaffected",
"disaffirm",
"disagree",
"disagreeable",
"disagreeably",
"disagreement",
"disallow",
"disappoint",
"disappointed",
"disappointing",
"disappointingly",
"disappointment",
"disapprobation",
"disapproval",
"disapprove",
"disapproving",
"disarm",
"disarray",
"disaster",
"disastrous",
"disastrously",
"disavow",
"disavowal",
"disbelief",
"disbelieve",
"disbelieved",
"disbeliever",
"discardable",
"discarded",
"disclaim",
"discombobulate",
"discomfit",
"discomfititure",
"discomfort",
"discompose",
"disconcert",
"disconcerted",
"disconcerting",
"disconcertingly",
"disconnected",
"disconsolate",
"disconsolately",
"disconsolation",
"discontent",
"discontented",
"discontentedly",
"discontinuity",
"discord",
"discordance",
"discordant",
"discountenance",
"discourage",
"discouraged",
"discouragement",
"discouraging",
"discouragingly",
"discourteous",
"discourteously",
"discredit",
"discrepant",
"discriminate",
"discriminated",
"discrimination",
"discriminatory",
"disdain",
"disdainful",
"disdainfully",
"disease",
"diseased",
"disempowered",
"disenchanted",
"disfavor",
"disgrace",
"disgraced",
"disgraceful",
"disgracefully",
"disgruntle",
"disgruntled",
"disgust",
"disgusted",
"disgustedly",
"disgustful",
"disgustfully",
"disgusting",
"disgustingly",
"dishearten",
"disheartened",
"disheartening",
"dishearteningly",
"dishonest",
"dishonestly",
"dishonesty",
"dishonor",
"dishonorable",
"dishonorablely",
"disillusion",
"disillusioned",
"disinclination",
"disinclined",
"disingenuous",
"disingenuously",
"disintegrate",
"disintegration",
"disinterest",
"disinterested",
"dislike",
"disliked",
"dislocated",
"disloyal",
"disloyalty",
"dismal",
"dismally",
"dismalness",
"dismay",
"dismayed",
"dismaying",
"dismayingly",
"dismissive",
"dismissively",
"disobedience",
"disobedient",
"disobey",
"disorder",
"disordered",
"disorderly",
"disorganized",
"disorient",
"disoriented",
"disown",
"disowned",
"disparage",
"disparaging",
"disparagingly",
"dispensable",
"dispirit",
"dispirited",
"dispiritedly",
"dispiriting",
"displace",
"displaced",
"displease",
"displeased",
"displeasing",
"displeasure",
"disposable",
"disproportionate",
"disprove",
"disputable",
"dispute",
"disputed",
"disquiet",
"disquieting",
"disquietingly",
"disquietude",
"disregard",
"disregarded",
"disregardful",
"disreputable",
"disrepute",
"disrespect",
"disrespectable",
"disrespectablity",
"disrespected",
"disrespectful",
"disrespectfully",
"disrespectfulness",
"disrespecting",
"disrupt",
"disruption",
"disruptive",
"dissatisfaction",
"dissatisfactory",
"dissatisfied",
"dissatisfy",
"dissatisfying",
"dissemble",
"dissembler",
"dissension",
"dissent",
"dissenter",
"dissention",
"disservice",
"dissidence",
"dissident",
"dissidents",
"dissocial",
"dissolute",
"dissolution",
"dissonance",
"dissonant",
"dissonantly",
"dissuade",
"dissuasive",
"distant",
"distaste",
"distasteful",
"distastefully",
"distort",
"distortion",
"distract",
"distracted",
"distracting",
"distraction",
"distraught",
"distraughtly",
"distraughtness",
"distress",
"distressed",
"distressing",
"distressingly",
"distrust",
"distrustful",
"distrusting",
"disturb",
"disturbed",
"disturbed-let",
"disturbing",
"disturbingly",
"disunity",
"disvalue",
"divergent",
"divide",
"divided",
"division",
"divisive",
"divisively",
"divisiveness",
"divorce",
"divorced",
"dizzing",
"dizzingly",
"dizzy",
"doddering",
"dodgey",
"dogged",
"doggedly",
"dogmatic",
"doldrums",
"dominance",
"dominate",
"dominated",
"domination",
"domineer",
"domineering",
"doom",
"doomed",
"doomsday",
"dope",
"doubt",
"doubted",
"doubtful",
"doubtfully",
"doubts",
"down",
"downbeat",
"downcast",
"downer",
"downfall",
"downfallen",
"downgrade",
"downhearted",
"downheartedly",
"downside",
"downtrodden",
"drab",
"draconian",
"draconic",
"dragon",
"dragons",
"dragoon",
"drain",
"drained",
"drama",
"dramatic",
"drastic",
"drastically",
"dread",
"dreadful",
"dreadfully",
"dreadfulness",
"dreary",
"drones",
"droop",
"dropped",
"drought",
"drowning",
"drunk",
"drunkard",
"drunken",
"dry",
"dubious",
"dubiously",
"dubitable",
"dud",
"dull",
"dullard",
"dumb",
"dumbfound",
"dumbfounded",
"dummy",
"dump",
"dumped",
"dunce",
"dungeon",
"dungeons",
"dupe",
"duped",
"dusty",
"dwindle",
"dwindling",
"dying",
"earsplitting",
"eccentric",
"eccentricity",
"edgy",
"effigy",
"effrontery",
"ego",
"egocentric",
"egomania",
"egotism",
"egotistic",
"egotistical",
"egotistically",
"egregious",
"egregiously",
"ejaculate",
"election-rigger",
"eliminate",
"elimination",
"elusive",
"emaciated",
"emancipated",
"emasculate",
"emasculated",
"embarrass",
"embarrassed",
"embarrassing",
"embarrassingly",
"embarrassment",
"embattled",
"embroil",
"embroiled",
"embroilment",
"emotional",
"emotionless",
"empathize",
"empathy",
"emphatic",
"emphatically",
"emptiness",
"empty",
"encroach",
"encroachment",
"encumbered",
"endanger",
"endangered",
"endless",
"enemies",
"enemy",
"enervate",
"enfeeble",
"enflame",
"engulf",
"enjoin",
"enmity",
"enormities",
"enormity",
"enormous",
"enormously",
"enrage",
"enraged",
"enslave",
"enslaved",
"entangle",
"entangled",
"entanglement",
"entrap",
"entrapment",
"envious",
"enviously",
"enviousness",
"envy",
"epidemic",
"equivocal",
"eradicate",
"erase",
"erode",
"erosion",
"err",
"errant",
"erratic",
"erratically",
"erroneous",
"erroneously",
"error",
"escapade",
"eschew",
"esoteric",
"estranged",
"eternal",
"evade",
"evaded",
"evasion",
"evasive",
"evicted",
"evil",
"evildoer",
"evils",
"eviscerate",
"exacerbate",
"exacting",
"exaggerate",
"exaggeration",
"exasperate",
"exasperating",
"exasperatingly",
"exasperation",
"excessive",
"excessively",
"exclaim",
"exclude",
"excluded",
"exclusion",
"excoriate",
"excruciating",
"excruciatingly",
"excuse",
"excuses",
"execrate",
"exhaust",
"exhausted",
"exhaustion",
"exhort",
"exile",
"exorbitant",
"exorbitantance",
"exorbitantly",
"expediencies",
"expedient",
"expel",
"expensive",
"expire",
"explode",
"exploit",
"exploitation",
"explosive",
"expose",
"exposed",
"expropriate",
"expropriation",
"expulse",
"expunge",
"exterminate",
"extermination",
"extinguish",
"extort",
"extortion",
"extraneous",
"extravagance",
"extravagant",
"extravagantly",
"extreme",
"extremely",
"extremism",
"extremist",
"extremists",
"fabricate",
"fabrication",
"facetious",
"facetiously",
"fading",
"fail",
"failful",
"failing",
"failure",
"failures",
"faint",
"fainthearted",
"faithless",
"fake",
"fall",
"fallacies",
"fallacious",
"fallaciously",
"fallaciousness",
"fallacy",
"fallout",
"false",
"falsehood",
"falsely",
"falsify",
"falter",
"famine",
"famished",
"fanatic",
"fanatical",
"fanatically",
"fanaticism",
"fanatics",
"fanciful",
"far-fetched",
"farce",
"farcical",
"farcical-yet-provocative",
"farcically",
"farfetched",
"fascism",
"fascist",
"fastidious",
"fastidiously",
"fastuous",
"fat",
"fatal",
"fatalistic",
"fatalistically",
"fatally",
"fateful",
"fatefully",
"fathomless",
"fatigue",
"fatty",
"fatuity",
"fatuous",
"fatuously",
"fault",
"faulty",
"fawningly",
"faze",
"fear",
"fearful",
"fearfully",
"fears",
"fearsome",
"feckless",
"feeble",
"feeblely",
"feebleminded",
"feign",
"feint",
"fell",
"felon",
"felonious",
"ferocious",
"ferociously",
"ferocity",
"fetid",
"fever",
"feverish",
"fiasco",
"fiat",
"fib",
"fibber",
"fickle",
"fiction",
"fictional",
"fictitious",
"fidget",
"fidgety",
"fiend",
"fiendish",
"fierce",
"fight",
"figurehead",
"filth",
"filthy",
"finagle",
"fissures",
"fist",
"flabbergast",
"flabbergasted",
"flagging",
"flagrant",
"flagrantly",
"flak",
"flake",
"flakey",
"flaky",
"flash",
"flashy",
"flat-out",
"flaunt",
"flaw",
"flawed",
"flaws",
"fleer",
"fleeting",
"flighty",
"flimflam",
"flimsy",
"flirt",
"flirty",
"floored",
"flounder",
"floundering",
"flout",
"fluster",
"foe",
"fool",
"foolhardy",
"foolish",
"foolishly",
"foolishness",
"forbid",
"forbidden",
"forbidding",
"force",
"forced",
"forceful",
"foreboding",
"forebodingly",
"forfeit",
"forged",
"forget",
"forgetful",
"forgetfully",
"forgetfulness",
"forgettable",
"forgotten",
"forlorn",
"forlornly",
"formidable",
"forsake",
"forsaken",
"forswear",
"foul",
"foully",
"foulness",
"fractious",
"fractiously",
"fracture",
"fragile",
"fragmented",
"frail",
"frantic",
"frantically",
"franticly",
"fraternize",
"fraud",
"fraudulent",
"fraught",
"frazzle",
"frazzled",
"freak",
"freakish",
"freakishly",
"frenetic",
"frenetically",
"frenzied",
"frenzy",
"fret",
"fretful",
"friction",
"frictions",
"friggin",
"fright",
"frighten",
"frightened",
"frightening",
"frighteningly",
"frightful",
"frightfully",
"frigid",
"frivolous",
"frown",
"frozen",
"fruitless",
"fruitlessly",
"frustrate",
"frustrated",
"frustrating",
"frustratingly",
"frustration",
"fudge",
"fugitive",
"full-blown",
"fulminate",
"fumble",
"fume",
"fundamentalism",
"furious",
"furiously",
"furor",
"fury",
"fuss",
"fussy",
"fustigate",
"fusty",
"futile",
"futilely",
"futility",
"fuzzy",
"gabble",
"gaff",
"gaffe",
"gaga",
"gaggle",
"gainsay",
"gainsayer",
"gall",
"galling",
"gallingly",
"gamble",
"game",
"gape",
"garbage",
"garish",
"gasp",
"gauche",
"gaudy",
"gawk",
"gawky",
"geezer",
"genocide",
"get-rich",
"ghastly",
"ghetto",
"gibber",
"gibberish",
"gibe",
"glare",
"glaring",
"glaringly",
"glib",
"glibly",
"glitch",
"gloatingly",
"gloom",
"gloomy",
"gloss",
"glower",
"glum",
"glut",
"gnawing",
"goad",
"goading",
"god-awful",
"goddam",
"goddamn",
"goof",
"gossip",
"gothic",
"graceless",
"gracelessly",
"graft",
"grandiose",
"grapple",
"grate",
"grating",
"gratuitous",
"gratuitously",
"grave",
"gravely",
"greed",
"greedy",
"grey",
"grief",
"grievance",
"grievances",
"grieve",
"grieving",
"grievous",
"grievously",
"grill",
"grim",
"grimace",
"grind",
"gripe",
"grisly",
"gritty",
"gross",
"grossly",
"grotesque",
"grouch",
"grouchy",
"grounded",
"groundless",
"grouse",
"growl",
"grudge",
"grudges",
"grudging",
"grudgingly",
"gruesome",
"gruesomely",
"gruff",
"grumble",
"grumpy",
"guile",
"guilt",
"guiltily",
"guilty",
"gullible",
"haggard",
"haggle",
"halfhearted",
"halfheartedly",
"hallucinate",
"hallucination",
"hamper",
"hamstring",
"hamstrung",
"handicapped",
"haphazard",
"hapless",
"harangue",
"harass",
"harassment",
"harboring",
"harbors",
"hard",
"hard-hit",
"hard-line",
"hard-liner",
"hardball",
"harden",
"hardened",
"hardheaded",
"hardhearted",
"hardliner",
"hardliners",
"hardship",
"hardships",
"harm",
"harmful",
"harms",
"harpy",
"harridan",
"harried",
"harrow",
"harsh",
"harshly",
"hassle",
"haste",
"hasty",
"hate",
"hateful",
"hatefully",
"hatefulness",
"hater",
"hatred",
"haughtily",
"haughty",
"haunt",
"haunting",
"havoc",
"hawkish",
"hazard",
"hazardous",
"hazy",
"headache",
"headaches",
"heartbreak",
"heartbreaker",
"heartbreaking",
"heartbreakingly",
"heartless",
"heartrending",
"heathen",
"heavily",
"heavy-handed",
"heavyhearted",
"heck",
"heckle",
"hectic",
"hedge",
"hedonistic",
"heedless",
"hegemonism",
"hegemonistic",
"hegemony",
"heinous",
"hell",
"hell-bent",
"hellion",
"helpless",
"helplessly",
"helplessness",
"heresy",
"heretic",
"heretical",
"hesitant",
"hideous",
"hideously",
"hideousness",
"hinder",
"hindrance",
"hoard",
"hoax",
"hobble",
"hole",
"hollow",
"hoodwink",
"hopeless",
"hopelessly",
"hopelessness",
"horde",
"horrendous",
"horrendously",
"horrible",
"horribly",
"horrid",
"horrific",
"horrifically",
"horrify",
"horrifying",
"horrifyingly",
"horror",
"horrors",
"hostage",
"hostile",
"hostilities",
"hostility",
"hotbeds",
"hothead",
"hotheaded",
"hothouse",
"hubris",
"huckster",
"humbling",
"humiliate",
"humiliating",
"humiliation",
"hunger",
"hungry",
"hurt",
"hurtful",
"hustler",
"hypocrisy",
"hypocrite",
"hypocrites",
"hypocritical",
"hypocritically",
"hysteria",
"hysteric",
"hysterical",
"hysterically",
"hysterics",
"icy",
"idiocies",
"idiocy",
"idiot",
"idiotic",
"idiotically",
"idiots",
"idle",
"ignoble",
"ignominious",
"ignominiously",
"ignominy",
"ignorance",
"ignorant",
"ignore",
"ignored",
"ill",
"ill-advised",
"ill-conceived",
"ill-fated",
"ill-favored",
"ill-mannered",
"ill-natured",
"ill-sorted",
"ill-tempered",
"ill-treated",
"ill-treatment",
"ill-usage",
"ill-used",
"illegal",
"illegally",
"illegitimate",
"illicit",
"illiquid",
"illiterate",
"illness",
"illogic",
"illogical",
"illogically",
"illusion",
"illusions",
"illusory",
"imaginary",
"imbalance",
"imbalanced",
"imbecile",
"imbroglio",
"immaterial",
"immature",
"imminence",
"imminent",
"imminently",
"immobilized",
"immoderate",
"immoderately",
"immodest",
"immoral",
"immorality",
"immorally",
"immovable",
"impair",
"impaired",
"impasse",
"impassive",
"impatience",
"impatient",
"impatiently",
"impeach",
"impedance",
"impede",
"impediment",
"impending",
"impenitent",
"imperfect",
"imperfectly",
"imperialist",
"imperil",
"imperious",
"imperiously",
"impermissible",
"impersonal",
"impertinent",
"impetuous",
"impetuously",
"impiety",
"impinge",
"impious",
"implacable",
"implausible",
"implausibly",
"implicate",
"implication",
"implode",
"impolite",
"impolitely",
"impolitic",
"importunate",
"importune",
"impose",
"imposers",
"imposing",
"imposition",
"impossible",
"impossiblity",
"impossibly",
"impotent",
"impoverish",
"impoverished",
"impractical",
"imprecate",
"imprecise",
"imprecisely",
"imprecision",
"imprison",
"imprisoned",
"imprisonment",
"improbability",
"improbable",
"improbably",
"improper",
"improperly",
"impropriety",
"imprudence",
"imprudent",
"impudence",
"impudent",
"impudently",
"impugn",
"impulsive",
"impulsively",
"impunity",
"impure",
"impurity",
"in",
"inability",
"inaccessible",
"inaccuracies",
"inaccuracy",
"inaccurate",
"inaccurately",
"inaction",
"inactive",
"inadequacy",
"inadequate",
"inadequately",
"inadverent",
"inadverently",
"inadvisable",
"inadvisably",
"inane",
"inanely",
"inappropriate",
"inappropriately",
"inapt",
"inaptitude",
"inarticulate",
"inattentive",
"incapable",
"incapably",
"incautious",
"incendiary",
"incense",
"incessant",
"incessantly",
"incite",
"incitement",
"incivility",
"inclement",
"incognizant",
"incoherence",
"incoherent",
"incoherently",
"incommensurate",
"incommunicative",
"incomparable",
"incomparably",
"incompatibility",
"incompatible",
"incompetence",
"incompetent",
"incompetently",
"incomplete",
"incompliant",
"incomprehensible",
"incomprehension",
"inconceivable",
"inconceivably",
"inconclusive",
"incongruous",
"incongruously",
"inconsequent",
"inconsequential",
"inconsequentially",
"inconsequently",
"inconsiderate",
"inconsiderately",
"inconsistence",
"inconsistencies",
"inconsistency",
"inconsistent",
"inconsolable",
"inconsolably",
"inconstant",
"inconvenience",
"inconvenient",
"inconveniently",
"incorrect",
"incorrectly",
"incorrigible",
"incorrigibly",
"incredulous",
"incredulously",
"inculcate",
"indecency",
"indecent",
"indecently",
"indecision",
"indecisive",
"indecisively",
"indecorum",
"indefensible",
"indefinite",
"indefinitely",
"indelicate",
"indeterminable",
"indeterminably",
"indeterminate",
"indifference",
"indifferent",
"indigent",
"indignant",
"indignantly",
"indignation",
"indignity",
"indiscernible",
"indiscreet",
"indiscreetly",
"indiscretion",
"indiscriminate",
"indiscriminately",
"indiscriminating",
"indisposed",
"indistinct",
"indistinctive",
"indoctrinate",
"indoctrinated",
"indoctrination",
"indolent",
"indulge",
"inebriated",
"ineffective",
"ineffectively",
"ineffectiveness",
"ineffectual",
"ineffectually",
"ineffectualness",
"inefficacious",
"inefficacy",
"inefficiency",
"inefficient",
"inefficiently",
"inelegance",
"inelegant",
"ineligible",
"ineloquent",
"ineloquently",
"inept",
"ineptitude",
"ineptly",
"inequalities",
"inequality",
"inequitable",
"inequitably",
"inequities",
"inertia",
"inescapable",
"inescapably",
"inessential",
"inevitable",
"inevitably",
"inexact",
"inexcusable",
"inexcusably",
"inexorable",
"inexorably",
"inexperience",
"inexperienced",
"inexpert",
"inexpertly",
"inexpiable",
"inexplainable",
"inexplicable",
"inextricable",
"inextricably",
"infamous",
"infamously",
"infamy",
"infected",
"inferior",
"inferiority",
"infernal",
"infest",
"infested",
"infidel",
"infidels",
"infiltrator",
"infiltrators",
"infirm",
"inflame",
"inflammatory",
"inflated",
"inflationary",
"inflexible",
"inflict",
"infraction",
"infringe",
"infringement",
"infringements",
"infuriate",
"infuriated",
"infuriating",
"infuriatingly",
"inglorious",
"ingrate",
"ingratitude",
"inhibit",
"inhibited",
"inhibition",
"inhospitable",
"inhospitality",
"inhuman",
"inhumane",
"inhumanity",
"inimical",
"inimically",
"iniquitous",
"iniquity",
"injudicious",
"injure",
"injured",
"injurious",
"injury",
"injustice",
"injusticed",
"injustices",
"innuendo",
"inopportune",
"inordinate",
"inordinately",
"insane",
"insanely",
"insanity",
"insatiable",
"insecure",
"insecurity",
"insensible",
"insensitive",
"insensitively",
"insensitivity",
"insidious",
"insidiously",
"insignificance",
"insignificant",
"insignificantly",
"insincere",
"insincerely",
"insincerity",
"insinuate",
"insinuating",
"insinuation",
"insociable",
"insolence",
"insolent",
"insolently",
"insolvent",
"insouciance",
"instability",
"instable",
"instigate",
"instigator",
"instigators",
"insubordinate",
"insubstantial",
"insubstantially",
"insufferable",
"insufferably",
"insufficiency",
"insufficient",
"insufficiently",
"insular",
"insult",
"insulted",
"insulting",
"insultingly",
"insupportable",
"insupportably",
"insurmountable",
"insurmountably",
"insurrection",
"intense",
"interfere",
"interference",
"intermittent",
"interrogated",
"interrupt",
"interrupted",
"interruption",
"intimidate",
"intimidated",
"intimidating",
"intimidatingly",
"intimidation",
"intolerable",
"intolerablely",
"intolerance",
"intolerant",
"intoxicate",
"intoxicated",
"intractable",
"intransigence",
"intransigent",
"intrude",
"intrusion",
"intrusive",
"inundate",
"inundated",
"invader",
"invalid",
"invalidate",
"invalidated",
"invalidity",
"invasive",
"invective",
"inveigle",
"invidious",
"invidiously",
"invidiousness",
"invisible",
"involuntarily",
"involuntary",
"irate",
"irately",
"ire",
"irk",
"irksome",
"ironic",
"ironies",
"irony",
"irrational",
"irrationality",
"irrationally",
"irreconcilable",
"irredeemable",
"irredeemably",
"irreformable",
"irregular",
"irregularity",
"irrelevance",
"irrelevant",
"irreparable",
"irreplacible",
"irrepressible",
"irresolute",
"irresolvable",
"irresponsible",
"irresponsibly",
"irretrievable",
"irreverence",
"irreverent",
"irreverently",
"irreversible",
"irritable",
"irritably",
"irritant",
"irritate",
"irritated",
"irritating",
"irritation",
"isn'tgood",
"isn'tverygood",
"isn\'tgood",
"isolate",
"isolated",
"isolation",
"itch",
"jabber",
"jaded",
"jam",
"jar",
"jaundiced",
"jealous",
"jealously",
"jealousness",
"jealousy",
"jeer",
"jeering",
"jeeringly",
"jeers",
"jeopardize",
"jeopardy",
"jerk",
"jittery",
"jobless",
"joker",
"jolt",
"joyless",
"judged",
"jumpy",
"junk",
"junky",
"juvenile",
"kaput",
"kick",
"kill",
"killer",
"killjoy",
"knave",
"knife",
"knock",
"kook",
"kooky",
"labeled",
"lack",
"lackadaisical",
"lackey",
"lackeys",
"lacking",
"lackluster",
"laconic",
"lag",
"lambast",
"lambaste",
"lame",
"lame-duck",
"lament",
"lamentable",
"lamentably",
"languid",
"languish",
"languor",
"languorous",
"languorously",
"lanky",
"lapse",
"lascivious",
"last-ditch",
"laugh",
"laughable",
"laughably",
"laughingstock",
"laughter",
"lawbreaker",
"lawbreaking",
"lawless",
"lawlessness",
"lax",
"lazy",
"leak",
"leakage",
"leaky",
"lech",
"lecher",
"lecherous",
"lechery",
"lecture",
"leech",
"leer",
"leery",
"left-leaning",
"less-developed",
"lessen",
"lesser",
"lesser-known",
"letch",
"lethal",
"lethargic",
"lethargy",
"lewd",
"lewdly",
"lewdness",
"liability",
"liable",
"liar",
"liars",
"licentious",
"licentiously",
"licentiousness",
"lie",
"lier",
"lies",
"life-threatening",
"lifeless",
"limit",
"limitation",
"limited",
"limp",
"listless",
"litigious",
"little-known",
"livid",
"lividly",
"loath",
"loathe",
"loathing",
"loathly",
"loathsome",
"loathsomely",
"lone",
"loneliness",
"lonely",
"lonesome",
"long",
"longing",
"longingly",
"loophole",
"loopholes",
"loot",
"lorn",
"lose",
"loser",
"losing",
"loss",
"lost",
"lousy",
"loveless",
"lovelorn",
"low",
"low-rated",
"lowly",
"ludicrous",
"ludicrously",
"lugubrious",
"lukewarm",
"lull",
"lunatic",
"lunaticism",
"lurch",
"lure",
"lurid",
"lurk",
"lurking",
"lying",
"macabre",
"mad",
"madden",
"maddening",
"maddeningly",
"madder",
"madly",
"madman",
"madness",
"maladjusted",
"maladjustment",
"malady",
"malaise",
"malcontent",
"malcontented",
"maledict",
"malevolence",
"malevolent",
"malevolently",
"malice",
"malicious",
"maliciously",
"maliciousness",
"malign",
"malignant",
"malodorous",
"maltreatment",
"maneuver",
"mangle",
"mania",
"maniac",
"maniacal",
"manic",
"manipulate",
"manipulated",
"manipulation",
"manipulative",
"manipulators",
"mar",
"marginal",
"marginally",
"martyrdom",
"martyrdom-seeking",
"masochistic",
"massacre",
"massacres",
"maverick",
"mawkish",
"mawkishly",
"mawkishness",
"maxi-devaluation",
"meager",
"meaningless",
"meanness",
"meddle",
"meddlesome",
"mediocrity",
"melancholy",
"melodramatic",
"melodramatically",
"menace",
"menacing",
"menacingly",
"mendacious",
"mendacity",
"menial",
"merciless",
"mercilessly",
"mere",
"mess",
"messy",
"midget",
"miff",
"miffed",
"militancy",
"mind",
"mindless",
"mindlessly",
"mirage",
"mire",
"misapprehend",
"misbecome",
"misbecoming",
"misbegotten",
"misbehave",
"misbehavior",
"miscalculate",
"miscalculation",
"mischief",
"mischievous",
"mischievously",
"misconception",
"misconceptions",
"miscreant",
"miscreants",
"misdirection",
"miser",
"miserable",
"miserableness",
"miserably",
"miseries",
"miserly",
"misery",
"misfit",
"misfortune",
"misgiving",
"misgivings",
"misguidance",
"misguide",
"misguided",
"mishandle",
"mishap",
"misinform",
"misinformed",
"misinterpret",
"misjudge",
"misjudgment",
"mislead",
"misleading",
"misleadingly",
"misled",
"mislike",
"mismanage",
"misread",
"misreading",
"misrepresent",
"misrepresentation",
"miss",
"misstatement",
"mistake",
"mistaken",
"mistakenly",
"mistakes",
"mistified",
"mistreated",
"mistrust",
"mistrusted",
"mistrustful",
"mistrustfully",
"misunderstand",
"misunderstanding",
"misunderstandings",
"misunderstood",
"misuse",
"moan",
"mock",
"mocked",
"mockeries",
"mockery",
"mocking",
"mockingly",
"molest",
"molestation",
"molested",
"monotonous",
"monotony",
"monster",
"monstrosities",
"monstrosity",
"monstrous",
"monstrously",
"moody",
"moon",
"moot",
"mope",
"morbid",
"morbidly",
"mordant",
"mordantly",
"moribund",
"mortification",
"mortified",
"mortify",
"mortifying",
"motionless",
"motley",
"mourn",
"mourner",
"mournful",
"mournfully",
"muddle",
"muddy",
"mudslinger",
"mudslinging",
"mulish",
"multi-polarization",
"mundane",
"murder",
"murderous",
"murderously",
"murky",
"muscle-flexing",
"mysterious",
"mysteriously",
"mystery",
"mystify",
"myth",
"nag",
"nagged",
"nagging",
"naive",
"naively",
"narrow",
"narrower",
"nastily",
"nastiness",
"nasty",
"nationalism",
"naughty",
"nauseate",
"nauseating",
"nauseatingly",
"nebulous",
"nebulously",
"needless",
"needlessly",
"needy",
"nefarious",
"nefariously",
"negate",
"negation",
"negative",
"neglect",
"neglected",
"negligence",
"negligent",
"negligible",
"nemesis",
"nervous",
"nervously",
"nervousness",
"nettle",
"nettlesome",
"neurotic",
"neurotically",
"niggle",
"nightmare",
"nightmarish",
"nightmarishly",
"nix",
"noisy",
"non-confidence",
"nonconforming",
"nonexistent",
"nonsense",
"nosey",
"notabidance",
"notabide",
"notabilities",
"notability",
"notabound",
"notabove-average",
"notabsolve",
"notabundance",
"notabundant",
"notaccede",
"notaccept",
"notacceptable",
"notacceptance",
"notaccessible",
"notacclaim",
"notacclaimed",
"notacclamation",
"notaccolade",
"notaccolades",
"notaccommodating",
"notaccommodative",
"notaccomplish",
"notaccomplished",
"notaccomplishment",
"notaccomplishments",
"notaccord",
"notaccordance",
"notaccordantly",
"notaccountable",
"notaccurate",
"notaccurately",
"notachievable",
"notachieve",
"notachievement",
"notachievements",
"notacknowledge",
"notacknowledgement",
"notacquit",
"notactive",
"notacumen",
"notadaptability",
"notadaptable",
"notadaptive",
"notadept",
"notadeptly",
"notadequate",
"notadherence",
"notadherent",
"notadhesion",
"notadmirable",
"notadmirably",
"notadmiration",
"notadmire",
"notadmirer",
"notadmiring",
"notadmiringly",
"notadmission",
"notadmit",
"notadmittedly",
"notadorable",
"notadore",
"notadored",
"notadorer",
"notadoring",
"notadoringly",
"notadroit",
"notadroitly",
"notadulate",
"notadulation",
"notadulatory",
"notadvanced",
"notadvantage",
"notadvantageous",
"notadvantages",
"notadventure",
"notadventuresome",
"notadventurism",
"notadventurous",
"notadvice",
"notadvisable",
"notadvocacy",
"notadvocate",
"notaffability",
"notaffable",
"notaffably",
"notaffection",
"notaffectionate",
"notaffinity",
"notaffirm",
"notaffirmation",
"notaffirmative",
"notaffluence",
"notaffluent",
"notafford",
"notaffordable",
"notafloat",
"notagile",
"notagilely",
"notagility",
"notagree",
"notagreeability",
"notagreeable",
"notagreeableness",
"notagreeably",
"notagreement",
"notairy",
"notalive",
"notallay",
"notalleviate",
"notallowable",
"notallure",
"notalluring",
"notalluringly",
"notally",
"notalmighty",
"notaltruist",
"notaltruistic",
"notaltruistically",
"notamaze",
"notamazed",
"notamazement",
"notamazing",
"notamazingly",
"notambitious",
"notambitiously",
"notameliorate",
"notamenable",
"notamenity",
"notamiability",
"notamiabily",
"notamiable",
"notamicability",
"notamicable",
"notamicably",
"notamity",
"notamnesty",
"notamorous",
"notamour",
"notample",
"notamply",
"notamuse",
"notamusement",
"notamusing",
"notamusingly",
"notangel",
"notangelic",
"notanimated",
"notapostle",
"notapotheosis",
"notappeal",
"notappealing",
"notappease",
"notapplaud",
"notappreciable",
"notappreciation",
"notappreciative",
"notappreciatively",
"notappreciativeness",
"notapproachable",
"notappropriate",
"notapproval",
"notapprove",
"notapt",
"notaptitude",
"notaptly",
"notardent",
"notardently",
"notardor",
"notaristocratic",
"notarousal",
"notarouse",
"notarousing",
"notarresting",
"notarticulate",
"notartistic",
"notascendant",
"notascertainable",
"notaspiration",
"notaspirations",
"notaspire",
"notassent",
"notassertions",
"notassertive",
"notasset",
"notassiduous",
"notassiduously",
"notassuage",
"notassurance",
"notassurances",
"notassure",
"notassured",
"notassuredly",
"notastonish",
"notastonished",
"notastonishing",
"notastonishingly",
"notastonishment",
"notastound",
"notastounded",
"notastounding",
"notastoundingly",
"notastute",
"notastutely",
"notasylum",
"notathletic",
"notattain",
"notattainable",
"notattentive",
"notattest",
"notattraction",
"notattractive",
"notattractively",
"notattune",
"notauspicious",
"notauthentic",
"notauthoritative",
"notautonomous",
"notaver",
"notavid",
"notavidly",
"notaward",
"notawe",
"notawed",
"notawesome",
"notawesomely",
"notawesomeness",
"notawestruck",
"notback",
"notbackbone",
"notbalanced",
"notbargain",
"notbasic",
"notbask",
"notbeacon",
"notbeatify",
"notbeauteous",
"notbeautiful",
"notbeautifully",
"notbeautify",
"notbeauty",
"notbefit",
"notbefitting",
"notbefriend",
"notbelievable",
"notbeloved",
"notbenefactor",
"notbeneficent",
"notbeneficial",
"notbeneficially",
"notbeneficiary",
"notbenefit",
"notbenefits",
"notbenevolence",
"notbenevolent",
"notbenign",
"notbest-known",
"notbest-performing",
"notbest-selling",
"notbetter-known",
"notbetter-than-expected",
"notblameless",
"notbless",
"notblessed",
"notblessing",
"notbliss",
"notblissful",
"notblissfully",
"notblithe",
"notbloom",
"notblossom",
"notboast",
"notbold",
"notboldly",
"notboldness",
"notbolster",
"notbonny",
"notbonus",
"notboom",
"notbooming",
"notboost",
"notboundless",
"notbountiful",
"notbrains",
"notbrainy",
"notbrave",
"notbravery",
"notbreakthrough",
"notbreakthroughs",
"notbreathlessness",
"notbreathtaking",
"notbreathtakingly",
"notbright",
"notbrighten",
"notbrightness",
"notbrilliance",
"notbrilliant",
"notbrilliantly",
"notbrisk",
"notbroad",
"notbrook",
"notbrotherly",
"notbull",
"notbullish",
"notbuoyant",
"notcalm",
"notcalming",
"notcalmness",
"notcandid",
"notcandor",
"notcapability",
"notcapable",
"notcapably",
"notcapitalize",
"notcaptivate",
"notcaptivating",
"notcaptivation",
"notcare",
"notcarefree",
"notcareful",
"notcaring",
"notcasual",
"notcatalyst",
"notcatchy",
"notcelebrate",
"notcelebrated",
"notcelebration",
"notcelebratory",
"notcelebrity",
"notcerebral",
"notchamp",
"notchampion",
"notcharismatic",
"notcharitable",
"notcharity",
"notcharm",
"notcharming",
"notcharmingly",
"notchaste",
"notchatty",
"notcheer",
"notcheerful",
"notcheery",
"notcherish",
"notcherished",
"notcherub",
"notchic",
"notchivalrous",
"notchivalry",
"notchum",
"notcivil",
"notcivility",
"notcivilization",
"notcivilize",
"notclarity",
"notclassic",
"notclean",
"notcleanliness",
"notcleanse",
"notclear",
"notclear-cut",
"notclearer",
"notclearheaded",
"notclever",
"notcloseness",
"notclout",
"notco-operation",
"notcoax",
"notcoddle",
"notcogent",
"notcognizant",
"notcohere",
"notcoherence",
"notcoherent",
"notcohesion",
"notcohesive",
"notcolorful",
"notcolossal",
"notcomeback",
"notcomedic",
"notcomely",
"notcomfort",
"notcomfortable",
"notcomfortably",
"notcomforting",
"notcommend",
"notcommendable",
"notcommendably",
"notcommensurate",
"notcommitment",
"notcommodious",
"notcommonsense",
"notcommonsensible",
"notcommonsensibly",
"notcommonsensical",
"notcompact",
"notcompanionable",
"notcompassion",
"notcompassionate",
"notcompatible",
"notcompelling",
"notcompensate",
"notcompetence",
"notcompetency",
"notcompetent",
"notcompetitiveness",
"notcomplement",
"notcomplex",
"notcompliant",
"notcompliment",
"notcomplimentary",
"notcomprehensive",
"notcompromise",
"notcompromises",
"notcomrades",
"notconceivable",
"notconciliate",
"notconciliatory",
"notconcise",
"notconclusive",
"notconcrete",
"notconcur",
"notcondone",
"notconducive",
"notconfer",
"notconfidence",
"notconfident",
"notconfute",
"notcongenial",
"notcongratulate",
"notcongratulations",
"notcongratulatory",
"notconquer",
"notconscience",
"notconscientious",
"notconsensus",
"notconsent",
"notconsiderate",
"notconsistent",
"notconsole",
"notconstancy",
"notconstant",
"notconstructive",
"notconsummate",
"notcontent",
"notcontentment",
"notcontinuity",
"notcontribution",
"notconvenient",
"notconveniently",
"notconviction",
"notconvince",
"notconvincing",
"notconvincingly",
"notconvivial",
"notconvulsive",
"notcooperate",
"notcooperation",
"notcooperative",
"notcooperatively",
"notcordial",
"notcornerstone",
"notcorrect",
"notcorrectly",
"notcost-effective",
"notcost-saving",
"notcourage",
"notcourageous",
"notcourageously",
"notcourageousness",
"notcourt",
"notcourteous",
"notcourtesy",
"notcourtly",
"notcovenant",
"notcovet",
"notcoveting",
"notcovetingly",
"notcozy",
"notcrave",
"notcraving",
"notcreative",
"notcredence",
"notcredible",
"notcrisp",
"notcrusade",
"notcrusader",
"notcure-all",
"notcurious",
"notcuriously",
"notcute",
"notdance",
"notdare",
"notdaring",
"notdaringly",
"notdarling",
"notdashing",
"notdauntless",
"notdawn",
"notdaydream",
"notdaydreamer",
"notdazzle",
"notdazzled",
"notdazzling",
"notdeal",
"notdear",
"notdecency",
"notdecent",
"notdecisive",
"notdecisiveness",
"notdedicated",
"notdeep",
"notdefend",
"notdefender",
"notdefense",
"notdeference",
"notdefined",
"notdefinite",
"notdefinitive",
"notdefinitively",
"notdeflationary",
"notdeft",
"notdelectable",
"notdeliberate",
"notdelicacy",
"notdelicious",
"notdelight",
"notdelighted",
"notdelightful",
"notdelightfully",
"notdelightfulness",
"notdemocratic",
"notdemystify",
"notdependable",
"notdeserve",
"notdeserved",
"notdeservedly",
"notdeserving",
"notdesirable",
"notdesire",
"notdesirous",
"notdestine",
"notdestined",
"notdestinies",
"notdestiny",
"notdetermination",
"notdetermined",
"notdevote",
"notdevoted",
"notdevotee",
"notdevotion",
"notdevout",
"notdexterity",
"notdexterous",
"notdexterously",
"notdextrous",
"notdig",
"notdignified",
"notdignify",
"notdignity",
"notdiligence",
"notdiligent",
"notdiligently",
"notdiplomatic",
"notdirect",
"notdisarming",
"notdiscerning",
"notdiscreet",
"notdiscrete",
"notdiscretion",
"notdiscriminating",
"notdiscriminatingly",
"notdistinct",
"notdistinction",
"notdistinctive",
"notdistinguish",
"notdistinguished",
"notdiversified",
"notdivine",
"notdivinely",
"notdodge",
"notdote",
"notdotingly",
"notdoubtless",
"notdream",
"notdreamland",
"notdreams",
"notdreamy",
"notdrive",
"notdriven",
"notdurability",
"notdurable",
"notdutiful",
"notdynamic",
"noteager",
"noteagerly",
"noteagerness",
"notearnest",
"notearnestly",
"notearnestness",
"notease",
"noteasier",
"noteasiest",
"noteasily",
"noteasiness",
"noteasy",
"noteasygoing",
"notebullience",
"notebullient",
"notebulliently",
"noteclectic",
"noteconomical",
"notecstasies",
"notecstasy",
"notecstatic",
"notecstatically",
"notedify",
"noteducable",
"noteducated",
"noteducational",
"noteffective",
"noteffectiveness",
"noteffectual",
"notefficacious",
"notefficiency",
"notefficient",
"noteffortless",
"noteffortlessly",
"noteffusion",
"noteffusive",
"noteffusively",
"noteffusiveness",
"notegalitarian",
"notelan",
"notelate",
"notelated",
"notelatedly",
"notelation",
"notelectrification",
"notelectrify",
"notelegance",
"notelegant",
"notelegantly",
"notelevate",
"notelevated",
"noteligible",
"notelite",
"noteloquence",
"noteloquent",
"noteloquently",
"notemancipate",
"notembellish",
"notembolden",
"notembrace",
"noteminence",
"noteminent",
"notempower",
"notempowerment",
"notenable",
"notenchant",
"notenchanted",
"notenchanting",
"notenchantingly",
"notencourage",
"notencouragement",
"notencouraging",
"notencouragingly",
"notendear",
"notendearing",
"notendorse",
"notendorsement",
"notendorser",
"notendurable",
"notendure",
"notenduring",
"notenergetic",
"notenergize",
"notengaging",
"notengrossing",
"notenhance",
"notenhanced",
"notenhancement",
"notenjoy",
"notenjoyable",
"notenjoyably",
"notenjoyment",
"notenlighten",
"notenlightened",
"notenlightenment",
"notenliven",
"notennoble",
"notenrapt",
"notenrapture",
"notenraptured",
"notenrich",
"notenrichment",
"notensure",
"notenterprising",
"notentertain",
"notentertaining",
"notenthral",
"notenthrall",
"notenthralled",
"notenthuse",
"notenthusiasm",
"notenthusiast",
"notenthusiastic",
"notenthusiastically",
"notentice",
"notenticing",
"notenticingly",
"notentrance",
"notentranced",
"notentrancing",
"notentreat",
"notentreatingly",
"notentrust",
"notenviable",
"notenviably",
"notenvision",
"notenvisions",
"notepic",
"notepitome",
"notequality",
"notequitable",
"noterudite",
"notessential",
"notestablished",
"notesteem",
"noteternity",
"notethical",
"noteulogize",
"noteuphoria",
"noteuphoric",
"noteuphorically",
"notevenly",
"noteventful",
"noteverlasting",
"notevident",
"notevidently",
"notevocative",
"notexact",
"notexalt",
"notexaltation",
"notexalted",
"notexaltedly",
"notexalting",
"notexaltingly",
"notexceed",
"notexceeding",
"notexceedingly",
"notexcel",
"notexcellence",
"notexcellency",
"notexcellent",
"notexcellently",
"notexceptional",
"notexceptionally",
"notexcite",
"notexcited",
"notexcitedly",
"notexcitedness",
"notexcitement",
"notexciting",
"notexcitingly",
"notexclusive",
"notexcusable",
"notexcuse",
"notexemplar",
"notexemplary",
"notexhaustive",
"notexhaustively",
"notexhilarate",
"notexhilarating",
"notexhilaratingly",
"notexhilaration",
"notexonerate",
"notexpansive",
"notexperienced",
"notexpert",
"notexpertly",
"notexplicit",
"notexplicitly",
"notexpressive",
"notexquisite",
"notexquisitely",
"notextol",
"notextoll",
"notextraordinarily",
"notextraordinary",
"notexuberance",
"notexuberant",
"notexuberantly",
"notexult",
"notexultant",
"notexultation",
"notexultingly",
"notfabulous",
"notfabulously",
"notfacilitate",
"notfair",
"notfairly",
"notfairness",
"notfaith",
"notfaithful",
"notfaithfully",
"notfaithfulness",
"notfame",
"notfamed",
"notfamous",
"notfamously",
"notfancy",
"notfanfare",
"notfantastic",
"notfantastically",
"notfantasy",
"notfarsighted",
"notfascinate",
"notfascinating",
"notfascinatingly",
"notfascination",
"notfashionable",
"notfashionably",
"notfast-growing",
"notfast-paced",
"notfastest-growing",
"notfathom",
"notfavor",
"notfavorable",
"notfavored",
"notfavorite",
"notfavour",
"notfawn",
"notfearless",
"notfearlessly",
"notfeasible",
"notfeasibly",
"notfeat",
"notfeatly",
"notfeisty",
"notfelicitate",
"notfelicitous",
"notfelicity",
"notfertile",
"notfervent",
"notfervently",
"notfervid",
"notfervidly",
"notfervor",
"notfestive",
"notfidelity",
"notfiery",
"notfine",
"notfinely",
"notfirst-class",
"notfirst-rate",
"notfit",
"notfitting",
"notflair",
"notflame",
"notflatter",
"notflattering",
"notflatteringly",
"notflawless",
"notflawlessly",
"notflexible",
"notflourish",
"notflourishing",
"notfluent",
"notfocused",
"notfond",
"notfondly",
"notfondness",
"notfoolproof",
"notforbearing",
"notforemost",
"notforesight",
"notforgave",
"notforgive",
"notforgiven",
"notforgiveness",
"notforgiving",
"notforgivingly",
"notforthright",
"notfortitude",
"notfortuitous",
"notfortuitously",
"notfortunate",
"notfortunately",
"notfortune",
"notfragrant",
"notfrank",
"notfree",
"notfreedom",
"notfreedoms",
"notfresh",
"notfriend",
"notfriendliness",
"notfriendly",
"notfriends",
"notfriendship",
"notfrolic",
"notfruitful",
"notfulfillment",
"notfull-fledged",
"notfun",
"notfunctional",
"notfunny",
"notgaiety",
"notgaily",
"notgain",
"notgainful",
"notgainfully",
"notgallant",
"notgallantly",
"notgalore",
"notgem",
"notgems",
"notgenerosity",
"notgenerous",
"notgenerously",
"notgenial",
"notgenius",
"notgenteel",
"notgentle",
"notgenuine",
"notgermane",
"notgiddy",
"notgifted",
"notglad",
"notgladden",
"notgladly",
"notgladness",
"notglamorous",
"notglee",
"notgleeful",
"notgleefully",
"notglimmer",
"notglimmering",
"notglisten",
"notglistening",
"notglitter",
"notgloat",
"notglorify",
"notglorious",
"notgloriously",
"notglory",
"notglossy",
"notglow",
"notglowing",
"notglowingly",
"notgo-ahead",
"notgod-given",
"notgodlike",
"notgodly",
"notgold",
"notgolden",
"notgood",
"notgoodhearted",
"notgoodly",
"notgoodness",
"notgoodwill",
"notgorgeous",
"notgorgeously",
"notgrace",
"notgraceful",
"notgracefully",
"notgracious",
"notgraciously",
"notgraciousness",
"notgrail",
"notgrand",
"notgrandeur",
"notgrateful",
"notgratefully",
"notgratification",
"notgratify",
"notgratifying",
"notgratifyingly",
"notgratitude",
"notgreat",
"notgreatest",
"notgreatness",
"notgreet",
"notgregarious",
"notgrin",
"notgrit",
"notgroove",
"notgroundbreaking",
"notgrounded",
"notguarantee",
"notguardian",
"notguidance",
"notguiltless",
"notgumption",
"notgush",
"notgusto",
"notgutsy",
"nothail",
"nothalcyon",
"nothale",
"nothallowed",
"nothandily",
"nothandsome",
"nothandy",
"nothanker",
"nothappily",
"nothappiness",
"nothappy",
"nothard-working",
"nothardier",
"nothardy",
"notharmless",
"notharmonious",
"notharmoniously",
"notharmonize",
"notharmony",
"nothaven",
"notheadway",
"notheady",
"notheal",
"nothealthful",
"nothealthy",
"notheart",
"nothearten",
"notheartening",
"notheartfelt",
"notheartily",
"notheartwarming",
"notheaven",
"notheavenly",
"notheedful",
"nothelpful",
"notherald",
"nothero",
"notheroic",
"notheroically",
"notheroine",
"notheroize",
"notheros",
"nothigh-quality",
"nothighlight",
"nothilarious",
"nothilariously",
"nothilariousness",
"nothilarity",
"nothistoric",
"notholy",
"nothomage",
"nothonest",
"nothonestly",
"nothonesty",
"nothoneymoon",
"nothonor",
"nothonorable",
"nothope",
"nothopeful",
"nothopefulness",
"nothopes",
"nothospitable",
"nothot",
"nothug",
"nothumane",
"nothumanists",
"nothumanity",
"nothumankind",
"nothumble",
"nothumility",
"nothumor",
"nothumorous",
"nothumorously",
"nothumour",
"nothumourous",
"notideal",
"notidealism",
"notidealist",
"notidealize",
"notideally",
"notidol",
"notidolize",
"notidolized",
"notidyllic",
"notilluminate",
"notilluminati",
"notilluminating",
"notillumine",
"notillustrious",
"notimaginative",
"notimmaculate",
"notimmaculately",
"notimpartial",
"notimpartiality",
"notimpartially",
"notimpassioned",
"notimpeccable",
"notimpeccably",
"notimpel",
"notimperial",
"notimperturbable",
"notimpervious",
"notimpetus",
"notimportance",
"notimportant",
"notimportantly",
"notimpregnable",
"notimpress",
"notimpression",
"notimpressions",
"notimpressive",
"notimpressively",
"notimpressiveness",
"notimprove",
"notimproved",
"notimprovement",
"notimproving",
"notimprovise",
"notinalienable",
"notincisive",
"notincisively",
"notincisiveness",
"notinclination",
"notinclinations",
"notinclined",
"notinclusive",
"notincontestable",
"notincontrovertible",
"notincorruptible",
"notincredible",
"notincredibly",
"notindebted",
"notindefatigable",
"notindelible",
"notindelibly",
"notindependence",
"notindependent",
"notindescribable",
"notindescribably",
"notindestructible",
"notindispensability",
"notindispensable",
"notindisputable",
"notindividuality",
"notindomitable",
"notindomitably",
"notindubitable",
"notindubitably",
"notindulgence",
"notindulgent",
"notindustrious",
"notinestimable",
"notinestimably",
"notinexpensive",
"notinfallibility",
"notinfallible",
"notinfallibly",
"notinfluential",
"notinformative",
"notingenious",
"notingeniously",
"notingenuity",
"notingenuous",
"notingenuously",
"notingratiate",
"notingratiating",
"notingratiatingly",
"notinnocence",
"notinnocent",
"notinnocently",
"notinnocuous",
"notinnovation",
"notinnovative",
"notinoffensive",
"notinquisitive",
"notinsight",
"notinsightful",
"notinsightfully",
"notinsist",
"notinsistence",
"notinsistent",
"notinsistently",
"notinspiration",
"notinspirational",
"notinspire",
"notinspired",
"notinspiring",
"notinstructive",
"notinstrumental",
"notintact",
"notintegral",
"notintegrity",
"notintelligence",
"notintelligent",
"notintelligible",
"notintercede",
"notinterest",
"notinterested",
"notinteresting",
"notinterests",
"notintimacy",
"notintimate",
"notintricate",
"notintrigue",
"notintriguing",
"notintriguingly",
"notintuitive",
"notinvaluable",
"notinvaluablely",
"notinventive",
"notinvigorate",
"notinvigorating",
"notinvincibility",
"notinvincible",
"notinviolable",
"notinviolate",
"notinvulnerable",
"notirrefutable",
"notirrefutably",
"notirreproachable",
"notirresistible",
"notirresistibly",
"notjauntily",
"notjaunty",
"notjest",
"notjoke",
"notjollify",
"notjolly",
"notjovial",
"notjoy",
"notjoyful",
"notjoyfully",
"notjoyous",
"notjoyously",
"notjubilant",
"notjubilantly",
"notjubilate",
"notjubilation",
"notjudicious",
"notjust",
"notjustice",
"notjustifiable",
"notjustifiably",
"notjustification",
"notjustify",
"notjustly",
"notkeen",
"notkeenly",
"notkeenness",
"notkemp",
"notkid",
"notkind",
"notkindliness",
"notkindly",
"notkindness",
"notkingmaker",
"notkiss",
"notkissable",
"notknowledgeable",
"notlarge",
"notlark",
"notlaud",
"notlaudable",
"notlaudably",
"notlavish",
"notlavishly",
"notlaw-abiding",
"notlawful",
"notlawfully",
"notleading",
"notlean",
"notlearned",
"notlearning",
"notlegendary",
"notlegitimacy",
"notlegitimate",
"notlegitimately",
"notlenient",
"notleniently",
"notless-expensive",
"notleverage",
"notlevity",
"notliberal",
"notliberalism",
"notliberally",
"notliberate",
"notliberation",
"notliberty",
"notlifeblood",
"notlifelong",
"notlight",
"notlight-hearted",
"notlighten",
"notlikable",
"notlike",
"notlikeable",
"notliking",
"notlionhearted",
"notliterate",
"notlive",
"notlively",
"notlofty",
"notlogical",
"notlooking",
"notlovable",
"notlovably",
"notlove",
"notlovee",
"notloveliness",
"notlovely",
"notlover",
"notlow-cost",
"notlow-risk",
"notlower-priced",
"notloyal",
"notloyalty",
"notlucid",
"notlucidly",
"notluck",
"notluckier",
"notluckiest",
"notluckily",
"notluckiness",
"notlucky",
"notlucrative",
"notluminous",
"notlush",
"notlust",
"notluster",
"notlustrous",
"notluxuriant",
"notluxuriate",
"notluxurious",
"notluxuriously",
"notluxury",
"notlyrical",
"notmagic",
"notmagical",
"notmagnanimous",
"notmagnanimously",
"notmagnetic",
"notmagnificence",
"notmagnificent",
"notmagnificently",
"notmagnify",
"notmajestic",
"notmajesty",
"notmanageable",
"notmanifest",
"notmanly",
"notmannered",
"notmannerly",
"notmarvel",
"notmarvellous",
"notmarvelous",
"notmarvelously",
"notmarvelousness",
"notmarvels",
"notmaster",
"notmasterful",
"notmasterfully",
"notmasterly",
"notmasterpiece",
"notmasterpieces",
"notmasters",
"notmastery",
"notmatchless",
"notmature",
"notmaturely",
"notmaturity",
"notmaximize",
"notmeaningful",
"notmeek",
"notmellow",
"notmemorable",
"notmemorialize",
"notmend",
"notmentor",
"notmerciful",
"notmercifully",
"notmercy",
"notmerit",
"notmeritorious",
"notmerrily",
"notmerriment",
"notmerriness",
"notmerry",
"notmesmerize",
"notmesmerizing",
"notmesmerizingly",
"notmeticulous",
"notmeticulously",
"notmightily",
"notmighty",
"notmild",
"notmindful",
"notminister",
"notmiracle",
"notmiracles",
"notmiraculous",
"notmiraculously",
"notmiraculousness",
"notmirth",
"notmoderate",
"notmoderation",
"notmodern",
"notmodest",
"notmodesty",
"notmollify",
"notmomentous",
"notmonumental",
"notmonumentally",
"notmoral",
"notmorality",
"notmoralize",
"notmotivate",
"notmotivated",
"notmotivation",
"notmoving",
"notmyriad",
"notnatural",
"notnaturally",
"notnavigable",
"notneat",
"notneatly",
"notnecessarily",
"notneighborly",
"notneutralize",
"notnice",
"notnicely",
"notnifty",
"notnimble",
"notnoble",
"notnobly",
"notnon-violence",
"notnon-violent",
"notnormal",
"notnotable",
"notnotably",
"notnoteworthy",
"notnoticeable",
"notnourish",
"notnourishing",
"notnourishment",
"notnurture",
"notnurturing",
"notoasis",
"notobedience",
"notobedient",
"notobediently",
"notobey",
"notobjective",
"notobjectively",
"notobliged",
"notobviate",
"notoffbeat",
"notoffset",
"notonward",
"notopen",
"notopenhanded",
"notopenly",
"notopenness",
"notopportune",
"notopportunity",
"notoptimal",
"notoptimism",
"notoptimistic",
"notopulent",
"notorderly",
"notoriginal",
"notoriginality",
"notorious",
"notoriously",
"notoutdo",
"notoutgoing",
"notoutshine",
"notoutsmart",
"notoutstanding",
"notoutstandingly",
"notoutstrip",
"notoutwit",
"notovation",
"notoverachiever",
"notoverjoyed",
"notoverture",
"notpacifist",
"notpacifists",
"notpainless",
"notpainlessly",
"notpainstaking",
"notpainstakingly",
"notpalatable",
"notpalatial",
"notpalliate",
"notpamper",
"notparadise",
"notparamount",
"notpardon",
"notpassion",
"notpassionate",
"notpassionately",
"notpatience",
"notpatient",
"notpatiently",
"notpatriot",
"notpatriotic",
"notpeace",
"notpeaceable",
"notpeaceful",
"notpeacefully",
"notpeacekeepers",
"notpeerless",
"notpenetrating",
"notpenitent",
"notperceptive",
"notperfect",
"notperfection",
"notperfectly",
"notpermissible",
"notperseverance",
"notpersevere",
"notpersistent",
"notpersonable",
"notpersonages",
"notpersonality",
"notperspicuous",
"notperspicuously",
"notpersuade",
"notpersuasive",
"notpersuasively",
"notpertinent",
"notphenomenal",
"notphenomenally",
"notphilanthropic",
"notphilosophical",
"notpicturesque",
"notpiety",
"notpillar",
"notpinnacle",
"notpious",
"notpithy",
"notplacate",
"notplacid",
"notplainly",
"notplausibility",
"notplausible",
"notplayful",
"notplayfully",
"notpleasant",
"notpleasantly",
"notpleased",
"notpleasing",
"notpleasingly",
"notpleasurable",
"notpleasurably",
"notpleasure",
"notpledge",
"notpledges",
"notplentiful",
"notplenty",
"notplush",
"notpoetic",
"notpoeticize",
"notpoignant",
"notpoise",
"notpoised",
"notpolished",
"notpolite",
"notpoliteness",
"notpopular",
"notpopularity",
"notportable",
"notposh",
"notpositive",
"notpositively",
"notpositiveness",
"notposterity",
"notpotent",
"notpotential",
"notpowerful",
"notpowerfully",
"notpracticable",
"notpractical",
"notpragmatic",
"notpraise",
"notpraiseworthy",
"notpraising",
"notpre-eminent",
"notpreach",
"notpreaching",
"notprecaution",
"notprecautions",
"notprecedent",
"notprecious",
"notprecise",
"notprecisely",
"notprecision",
"notpreeminent",
"notpreemptive",
"notprefer",
"notpreferable",
"notpreferably",
"notpreference",
"notpreferences",
"notpremier",
"notpremium",
"notprepared",
"notpreponderance",
"notpress",
"notprestige",
"notprestigious",
"notprettily",
"notpretty",
"notpriceless",
"notpride",
"notprinciple",
"notprincipled",
"notprivilege",
"notprivileged",
"notprize",
"notpro",
"notpro-american",
"notpro-beijing",
"notpro-cuba",
"notpro-peace",
"notproactive",
"notprodigious",
"notprodigiously",
"notprodigy",
"notproductive",
"notprofess",
"notprofessional",
"notproficient",
"notproficiently",
"notprofit",
"notprofitable",
"notprofound",
"notprofoundly",
"notprofuse",
"notprofusely",
"notprofusion",
"notprogress",
"notprogressive",
"notprolific",
"notprominence",
"notprominent",
"notpromise",
"notpromising",
"notpromoter",
"notprompt",
"notpromptly",
"notproper",
"notproperly",
"notpropitious",
"notpropitiously",
"notprospect",
"notprospects",
"notprosper",
"notprosperity",
"notprosperous",
"notprotect",
"notprotection",
"notprotective",
"notprotector",
"notproud",
"notprovidence",
"notprovident",
"notprowess",
"notprudence",
"notprudent",
"notprudently",
"notpunctual",
"notpundits",
"notpure",
"notpurification",
"notpurify",
"notpurity",
"notpurposeful",
"notquaint",
"notqualified",
"notqualify",
"notquasi-ally",
"notquench",
"notquicken",
"notradiance",
"notradiant",
"notrally",
"notrapport",
"notrapprochement",
"notrapt",
"notrapture",
"notraptureous",
"notraptureously",
"notrapturous",
"notrapturously",
"notrational",
"notrationality",
"notrave",
"notre-conquest",
"notreadily",
"notready",
"notreaffirm",
"notreaffirmation",
"notreal",
"notrealist",
"notrealistic",
"notrealistically",
"notreason",
"notreasonable",
"notreasonably",
"notreasoned",
"notreassurance",
"notreassure",
"notreceptive",
"notreclaim",
"notrecognition",
"notrecommend",
"notrecommendation",
"notrecommendations",
"notrecommended",
"notrecompense",
"notreconcile",
"notreconciliation",
"notrecord-setting",
"notrecover",
"notrectification",
"notrectify",
"notrectifying",
"notredeem",
"notredeeming",
"notredemption",
"notreestablish",
"notrefine",
"notrefined",
"notrefinement",
"notreflective",
"notreform",
"notrefresh",
"notrefreshing",
"notrefuge",
"notregal",
"notregally",
"notregard",
"notrehabilitate",
"notrehabilitation",
"notreinforce",
"notreinforcement",
"notrejoice",
"notrejoicing",
"notrejoicingly",
"notrelax",
"notrelaxed",
"notrelent",
"notrelevance",
"notrelevant",
"notreliability",
"notreliable",
"notreliably",
"notrelief",
"notrelieve",
"notrelish",
"notremarkable",
"notremarkably",
"notremedy",
"notreminiscent",
"notremunerate",
"notrenaissance",
"notrenewal",
"notrenovate",
"notrenovation",
"notrenown",
"notrenowned",
"notrepair",
"notreparation",
"notrepay",
"notrepent",
"notrepentance",
"notreposed",
"notreputable",
"notrescue",
"notresilient",
"notresolute",
"notresolve",
"notresolved",
"notresound",
"notresounding",
"notresourceful",
"notresourcefulness",
"notrespect",
"notrespectable",
"notrespectful",
"notrespectfully",
"notrespite",
"notresplendent",
"notresponsibility",
"notresponsible",
"notresponsibly",
"notresponsive",
"notrestful",
"notrestoration",
"notrestore",
"notrestrained",
"notrestraint",
"notresurgent",
"notreunite",
"notrevel",
"notrevelation",
"notrevere",
"notreverence",
"notreverent",
"notreverently",
"notrevitalize",
"notrevival",
"notrevive",
"notrevolution",
"notreward",
"notrewarding",
"notrewardingly",
"notrich",
"notriches",
"notrichly",
"notrichness",
"notright",
"notrighten",
"notrighteous",
"notrighteously",
"notrighteousness",
"notrightful",
"notrightfully",
"notrightly",
"notrightness",
"notrights",
"notripe",
"notrisk-free",
"notrobust",
"notromantic",
"notromantically",
"notromanticize",
"notrosy",
"notrousing",
"notsacred",
"notsafe",
"notsafeguard",
"notsagacious",
"notsagacity",
"notsage",
"notsagely",
"notsaint",
"notsaintliness",
"notsaintly",
"notsalable",
"notsalivate",
"notsalutary",
"notsalute",
"notsalvation",
"notsanctify",
"notsanction",
"notsanctity",
"notsanctuary",
"notsane",
"notsanguine",
"notsanity",
"notsatisfaction",
"notsatisfactorily",
"notsatisfactory",
"notsatisfied",
"notsatisfy",
"notsatisfying",
"notsavor",
"notsavvy",
"notscenic",
"notscholarly",
"notscruples",
"notscrupulous",
"notscrupulously",
"notseamless",
"notseasoned",
"notsecure",
"notsecurely",
"notsecurity",
"notseductive",
"notseemly",
"notselective",
"notself-determination",
"notself-respect",
"notself-satisfaction",
"notself-sufficiency",
"notself-sufficient",
"notsemblance",
"notsensation",
"notsensational",
"notsensationally",
"notsensations",
"notsense",
"notsensible",
"notsensibly",
"notsensitively",
"notsensitivity",
"notsensual",
"notsentiment",
"notsentimental",
"notsentimentality",
"notsentimentally",
"notsentiments",
"notserene",
"notserenity",
"notsettle",
"notsexy",
"notsharp",
"notshelter",
"notshield",
"notshimmer",
"notshimmering",
"notshimmeringly",
"notshine",
"notshiny",
"notshrewd",
"notshrewdly",
"notshrewdness",
"notsignificance",
"notsignificant",
"notsignify",
"notsimple",
"notsimplicity",
"notsimplified",
"notsimplify",
"notsincere",
"notsincerely",
"notsincerity",
"notskill",
"notskilled",
"notskillful",
"notskillfully",
"notsleek",
"notslender",
"notslim",
"notsmart",
"notsmarter",
"notsmartest",
"notsmartly",
"notsmile",
"notsmiling",
"notsmilingly",
"notsmitten",
"notsmooth",
"notsociable",
"notsoft-spoken",
"notsoften",
"notsolace",
"notsolicitous",
"notsolicitously",
"notsolicitude",
"notsolid",
"notsolidarity",
"notsoothe",
"notsoothingly",
"notsophisticated",
"notsoulful",
"notsound",
"notsoundness",
"notspacious",
"notspare",
"notsparing",
"notsparingly",
"notsparkle",
"notsparkling",
"notspecial",
"notspectacular",
"notspectacularly",
"notspeedy",
"notspellbind",
"notspellbinding",
"notspellbindingly",
"notspellbound",
"notspirit",
"notspirited",
"notspiritual",
"notsplendid",
"notsplendidly",
"notsplendor",
"notspontaneous",
"notspotless",
"notsprightly",
"notsprite",
"notspry",
"notspur",
"notsquarely",
"notstability",
"notstabilize",
"notstable",
"notstainless",
"notstand",
"notstar",
"notstars",
"notstately",
"notstatuesque",
"notstaunch",
"notstaunchly",
"notstaunchness",
"notsteadfast",
"notsteadfastly",
"notsteadfastness",
"notsteadiness",
"notsteady",
"notstellar",
"notstellarly",
"notstimulate",
"notstimulating",
"notstimulative",
"notstirring",
"notstirringly",
"notstood",
"notstraight",
"notstraightforward",
"notstreamlined",
"notstride",
"notstrides",
"notstriking",
"notstrikingly",
"notstriving",
"notstrong",
"notstudious",
"notstudiously",
"notstunned",
"notstunning",
"notstunningly",
"notstupendous",
"notstupendously",
"notsturdy",
"notstylish",
"notstylishly",
"notsuave",
"notsublime",
"notsubscribe",
"notsubstantial",
"notsubstantially",
"notsubstantive",
"notsubtle",
"notsucceed",
"notsuccess",
"notsuccessful",
"notsuccessfully",
"notsuffice",
"notsufficient",
"notsufficiently",
"notsuggest",
"notsuggestions",
"notsuit",
"notsuitable",
"notsumptuous",
"notsumptuously",
"notsumptuousness",
"notsunny",
"notsuper",
"notsuperb",
"notsuperbly",
"notsuperior",
"notsuperlative",
"notsupport",
"notsupporter",
"notsupportive",
"notsupreme",
"notsupremely",
"notsupurb",
"notsupurbly",
"notsurely",
"notsurge",
"notsurging",
"notsurmise",
"notsurmount",
"notsurpass",
"notsurvival",
"notsurvive",
"notsurvivor",
"notsustainability",
"notsustainable",
"notsustained",
"notsweeping",
"notsweet",
"notsweeten",
"notsweetheart",
"notsweetly",
"notsweetness",
"notswell",
"notswift",
"notswiftness",
"notsworn",
"notsympathetic",
"notsystematic",
"nottact",
"nottalent",
"nottalented",
"nottantalize",
"nottantalizing",
"nottantalizingly",
"nottaste",
"nottemperance",
"nottemperate",
"nottempt",
"nottempting",
"nottemptingly",
"nottenacious",
"nottenaciously",
"nottenacity",
"nottender",
"nottenderly",
"nottenderness",
"notterrific",
"notterrifically",
"notterrified",
"notterrify",
"notterrifying",
"notterrifyingly",
"notthankful",
"notthankfully",
"notthanks",
"notthinkable",
"notthorough",
"notthoughtful",
"notthoughtfully",
"notthoughtfulness",
"notthrift",
"notthrifty",
"notthrill",
"notthrilling",
"notthrillingly",
"notthrills",
"notthrive",
"notthriving",
"nottickle",
"nottidy",
"nottime-honored",
"nottimely",
"nottingle",
"nottitillate",
"nottitillating",
"nottitillatingly",
"nottoast",
"nottogetherness",
"nottolerable",
"nottolerably",
"nottolerance",
"nottolerant",
"nottolerantly",
"nottolerate",
"nottoleration",
"nottop",
"nottorrid",
"nottorridly",
"nottough",
"nottradition",
"nottraditional",
"nottranquil",
"nottranquility",
"nottreasure",
"nottreat",
"nottremendous",
"nottremendously",
"nottrendy",
"nottrepidation",
"nottribute",
"nottrim",
"nottriumph",
"nottriumphal",
"nottriumphant",
"nottriumphantly",
"nottruculent",
"nottruculently",
"nottrue",
"nottrump",
"nottrumpet",
"nottrust",
"nottrusting",
"nottrustingly",
"nottrustworthiness",
"nottrustworthy",
"nottruth",
"nottruthful",
"nottruthfully",
"nottruthfulness",
"nottwinkly",
"notultimate",
"notultimately",
"notultra",
"notunabashed",
"notunabashedly",
"notunanimous",
"notunassailable",
"notunbiased",
"notunbosom",
"notunbound",
"notunbroken",
"notuncommon",
"notuncommonly",
"notunconcerned",
"notunconditional",
"notunconventional",
"notundaunted",
"notunderstand",
"notunderstandable",
"notunderstanding",
"notunderstate",
"notunderstated",
"notunderstatedly",
"notunderstood",
"notundisputable",
"notundisputably",
"notundisputed",
"notundoubted",
"notundoubtedly",
"notunencumbered",
"notunequivocal",
"notunequivocally",
"notunfazed",
"notunfettered",
"notunforgettable",
"notuniform",
"notuniformly",
"notunique",
"notunity",
"notuniversal",
"notunlimited",
"notunparalleled",
"notunpretentious",
"notunquestionable",
"notunquestionably",
"notunrestricted",
"notunscathed",
"notunselfish",
"notuntouched",
"notuntrained",
"notupbeat",
"notupfront",
"notupgrade",
"notupheld",
"notuphold",
"notuplift",
"notuplifting",
"notupliftingly",
"notupliftment",
"notupright",
"notupscale",
"notupside",
"notupward",
"noturge",
"notusable",
"notuseful",
"notusefulness",
"notutilitarian",
"notutmost",
"notuttermost",
"notvaliant",
"notvaliantly",
"notvalid",
"notvalidity",
"notvalor",
"notvaluable",
"notvalues",
"notvanquish",
"notvast",
"notvastly",
"notvastness",
"notvenerable",
"notvenerably",
"notvenerate",
"notverifiable",
"notveritable",
"notversatile",
"notversatility",
"notveryabidance",
"notveryabide",
"notveryabilities",
"notveryability",
"notveryabound",
"notveryabove-average",
"notveryabsolve",
"notveryabundance",
"notveryabundant",
"notveryaccede",
"notveryaccept",
"notveryacceptable",
"notveryacceptance",
"notveryaccessible",
"notveryacclaim",
"notveryacclaimed",
"notveryacclamation",
"notveryaccolade",
"notveryaccolades",
"notveryaccommodating",
"notveryaccommodative",
"notveryaccomplish",
"notveryaccomplished",
"notveryaccomplishment",
"notveryaccomplishments",
"notveryaccord",
"notveryaccordance",
"notveryaccordantly",
"notveryaccountable",
"notveryaccurate",
"notveryaccurately",
"notveryachievable",
"notveryachieve",
"notveryachievement",
"notveryachievements",
"notveryacknowledge",
"notveryacknowledgement",
"notveryacquit",
"notveryactive",
"notveryacumen",
"notveryadaptability",
"notveryadaptable",
"notveryadaptive",
"notveryadept",
"notveryadeptly",
"notveryadequate",
"notveryadherence",
"notveryadherent",
"notveryadhesion",
"notveryadmirable",
"notveryadmirably",
"notveryadmiration",
"notveryadmire",
"notveryadmirer",
"notveryadmiring",
"notveryadmiringly",
"notveryadmission",
"notveryadmit",
"notveryadmittedly",
"notveryadorable",
"notveryadore",
"notveryadored",
"notveryadorer",
"notveryadoring",
"notveryadoringly",
"notveryadroit",
"notveryadroitly",
"notveryadulate",
"notveryadulation",
"notveryadulatory",
"notveryadvanced",
"notveryadvantage",
"notveryadvantageous",
"notveryadvantages",
"notveryadventure",
"notveryadventuresome",
"notveryadventurism",
"notveryadventurous",
"notveryadvice",
"notveryadvisable",
"notveryadvocacy",
"notveryadvocate",
"notveryaffability",
"notveryaffable",
"notveryaffably",
"notveryaffection",
"notveryaffectionate",
"notveryaffinity",
"notveryaffirm",
"notveryaffirmation",
"notveryaffirmative",
"notveryaffluence",
"notveryaffluent",
"notveryafford",
"notveryaffordable",
"notveryafloat",
"notveryagile",
"notveryagilely",
"notveryagility",
"notveryagree",
"notveryagreeability",
"notveryagreeable",
"notveryagreeableness",
"notveryagreeably",
"notveryagreement",
"notveryairy",
"notveryalive",
"notveryallay",
"notveryalleviate",
"notveryallowable",
"notveryallure",
"notveryalluring",
"notveryalluringly",
"notveryally",
"notveryalmighty",
"notveryaltruist",
"notveryaltruistic",
"notveryaltruistically",
"notveryamaze",
"notveryamazed",
"notveryamazement",
"notveryamazing",
"notveryamazingly",
"notveryambitious",
"notveryambitiously",
"notveryameliorate",
"notveryamenable",
"notveryamenity",
"notveryamiability",
"notveryamiabily",
"notveryamiable",
"notveryamicability",
"notveryamicable",
"notveryamicably",
"notveryamity",
"notveryamnesty",
"notveryamorous",
"notveryamour",
"notveryample",
"notveryamply",
"notveryamuse",
"notveryamusement",
"notveryamusing",
"notveryamusingly",
"notveryangel",
"notveryangelic",
"notveryanimated",
"notveryapostle",
"notveryapotheosis",
"notveryappeal",
"notveryappealing",
"notveryappease",
"notveryapplaud",
"notveryappreciable",
"notveryappreciation",
"notveryappreciative",
"notveryappreciatively",
"notveryappreciativeness",
"notveryapproachable",
"notveryappropriate",
"notveryapproval",
"notveryapprove",
"notveryapt",
"notveryaptitude",
"notveryaptly",
"notveryardent",
"notveryardently",
"notveryardor",
"notveryaristocratic",
"notveryarousal",
"notveryarouse",
"notveryarousing",
"notveryarresting",
"notveryarticulate",
"notveryartistic",
"notveryascendant",
"notveryascertainable",
"notveryaspiration",
"notveryaspirations",
"notveryaspire",
"notveryassent",
"notveryassertions",
"notveryassertive",
"notveryasset",
"notveryassiduous",
"notveryassiduously",
"notveryassuage",
"notveryassurance",
"notveryassurances",
"notveryassure",
"notveryassured",
"notveryassuredly",
"notveryastonish",
"notveryastonished",
"notveryastonishing",
"notveryastonishingly",
"notveryastonishment",
"notveryastound",
"notveryastounded",
"notveryastounding",
"notveryastoundingly",
"notveryastute",
"notveryastutely",
"notveryasylum",
"notveryathletic",
"notveryattain",
"notveryattainable",
"notveryattentive",
"notveryattest",
"notveryattraction",
"notveryattractive",
"notveryattractively",
"notveryattune",
"notveryauspicious",
"notveryauthentic",
"notveryauthoritative",
"notveryautonomous",
"notveryaver",
"notveryavid",
"notveryavidly",
"notveryaward",
"notveryawe",
"notveryawed",
"notveryawesome",
"notveryawesomely",
"notveryawesomeness",
"notveryawestruck",
"notveryback",
"notverybackbone",
"notverybalanced",
"notverybargain",
"notverybasic",
"notverybask",
"notverybeacon",
"notverybeatify",
"notverybeauteous",
"notverybeautiful",
"notverybeautifully",
"notverybeautify",
"notverybeauty",
"notverybefit",
"notverybefitting",
"notverybefriend",
"notverybelievable",
"notverybeloved",
"notverybenefactor",
"notverybeneficent",
"notverybeneficial",
"notverybeneficially",
"notverybeneficiary",
"notverybenefit",
"notverybenefits",
"notverybenevolence",
"notverybenevolent",
"notverybenign",
"notverybest-known",
"notverybest-performing",
"notverybest-selling",
"notverybetter-known",
"notverybetter-than-expected",
"notveryblameless",
"notverybless",
"notveryblessed",
"notveryblessing",
"notverybliss",
"notveryblissful",
"notveryblissfully",
"notveryblithe",
"notverybloom",
"notveryblossom",
"notveryboast",
"notverybold",
"notveryboldly",
"notveryboldness",
"notverybolster",
"notverybonny",
"notverybonus",
"notveryboom",
"notverybooming",
"notveryboost",
"notveryboundless",
"notverybountiful",
"notverybrains",
"notverybrainy",
"notverybrave",
"notverybravery",
"notverybreakthrough",
"notverybreakthroughs",
"notverybreathlessness",
"notverybreathtaking",
"notverybreathtakingly",
"notverybright",
"notverybrighten",
"notverybrightness",
"notverybrilliance",
"notverybrilliant",
"notverybrilliantly",
"notverybrisk",
"notverybroad",
"notverybrook",
"notverybrotherly",
"notverybull",
"notverybullish",
"notverybuoyant",
"notverycalm",
"notverycalming",
"notverycalmness",
"notverycandid",
"notverycandor",
"notverycapability",
"notverycapable",
"notverycapably",
"notverycapitalize",
"notverycaptivate",
"notverycaptivating",
"notverycaptivation",
"notverycare",
"notverycarefree",
"notverycareful",
"notverycaring",
"notverycasual",
"notverycatalyst",
"notverycatchy",
"notverycelebrate",
"notverycelebrated",
"notverycelebration",
"notverycelebratory",
"notverycelebrity",
"notverycerebral",
"notverychamp",
"notverychampion",
"notverycharismatic",
"notverycharitable",
"notverycharity",
"notverycharm",
"notverycharming",
"notverycharmingly",
"notverychaste",
"notverychatty",
"notverycheer",
"notverycheerful",
"notverycheery",
"notverycherish",
"notverycherished",
"notverycherub",
"notverychic",
"notverychivalrous",
"notverychivalry",
"notverychum",
"notverycivil",
"notverycivility",
"notverycivilization",
"notverycivilize",
"notveryclarity",
"notveryclassic",
"notveryclean",
"notverycleanliness",
"notverycleanse",
"notveryclear",
"notveryclear-cut",
"notveryclearer",
"notveryclearheaded",
"notveryclever",
"notverycloseness",
"notveryclout",
"notveryco-operation",
"notverycoax",
"notverycoddle",
"notverycogent",
"notverycognizant",
"notverycohere",
"notverycoherence",
"notverycoherent",
"notverycohesion",
"notverycohesive",
"notverycolorful",
"notverycolossal",
"notverycomeback",
"notverycomedic",
"notverycomely",
"notverycomfort",
"notverycomfortable",
"notverycomfortably",
"notverycomforting",
"notverycommend",
"notverycommendable",
"notverycommendably",
"notverycommensurate",
"notverycommitment",
"notverycommodious",
"notverycommonsense",
"notverycommonsensible",
"notverycommonsensibly",
"notverycommonsensical",
"notverycompact",
"notverycompanionable",
"notverycompassion",
"notverycompassionate",
"notverycompatible",
"notverycompelling",
"notverycompensate",
"notverycompetence",
"notverycompetency",
"notverycompetent",
"notverycompetitiveness",
"notverycomplement",
"notverycomplex",
"notverycompliant",
"notverycompliment",
"notverycomplimentary",
"notverycomprehensive",
"notverycompromise",
"notverycompromises",
"notverycomrades",
"notveryconceivable",
"notveryconciliate",
"notveryconciliatory",
"notveryconcise",
"notveryconclusive",
"notveryconcrete",
"notveryconcur",
"notverycondone",
"notveryconducive",
"notveryconfer",
"notveryconfidence",
"notveryconfident",
"notveryconfute",
"notverycongenial",
"notverycongratulate",
"notverycongratulations",
"notverycongratulatory",
"notveryconquer",
"notveryconscience",
"notveryconscientious",
"notveryconsensus",
"notveryconsent",
"notveryconsiderate",
"notveryconsistent",
"notveryconsole",
"notveryconstancy",
"notveryconstant",
"notveryconstructive",
"notveryconsummate",
"notverycontent",
"notverycontentment",
"notverycontinuity",
"notverycontribution",
"notveryconvenient",
"notveryconveniently",
"notveryconviction",
"notveryconvince",
"notveryconvincing",
"notveryconvincingly",
"notveryconvivial",
"notveryconvulsive",
"notverycooperate",
"notverycooperation",
"notverycooperative",
"notverycooperatively",
"notverycordial",
"notverycornerstone",
"notverycorrect",
"notverycorrectly",
"notverycost-effective",
"notverycost-saving",
"notverycourage",
"notverycourageous",
"notverycourageously",
"notverycourageousness",
"notverycourt",
"notverycourteous",
"notverycourtesy",
"notverycourtly",
"notverycovenant",
"notverycovet",
"notverycoveting",
"notverycovetingly",
"notverycozy",
"notverycrave",
"notverycraving",
"notverycreative",
"notverycredence",
"notverycredible",
"notverycrisp",
"notverycrusade",
"notverycrusader",
"notverycure-all",
"notverycurious",
"notverycuriously",
"notverycute",
"notverydance",
"notverydare",
"notverydaring",
"notverydaringly",
"notverydarling",
"notverydashing",
"notverydauntless",
"notverydawn",
"notverydaydream",
"notverydaydreamer",
"notverydazzle",
"notverydazzled",
"notverydazzling",
"notverydeal",
"notverydear",
"notverydecency",
"notverydecent",
"notverydecisive",
"notverydecisiveness",
"notverydedicated",
"notverydeep",
"notverydefend",
"notverydefender",
"notverydefense",
"notverydeference",
"notverydefined",
"notverydefinite",
"notverydefinitive",
"notverydefinitively",
"notverydeflationary",
"notverydeft",
"notverydelectable",
"notverydeliberate",
"notverydelicacy",
"notverydelicious",
"notverydelight",
"notverydelighted",
"notverydelightful",
"notverydelightfully",
"notverydelightfulness",
"notverydemocratic",
"notverydemystify",
"notverydependable",
"notverydeserve",
"notverydeserved",
"notverydeservedly",
"notverydeserving",
"notverydesirable",
"notverydesire",
"notverydesirous",
"notverydestine",
"notverydestined",
"notverydestinies",
"notverydestiny",
"notverydetermination",
"notverydetermined",
"notverydevote",
"notverydevoted",
"notverydevotee",
"notverydevotion",
"notverydevout",
"notverydexterity",
"notverydexterous",
"notverydexterously",
"notverydextrous",
"notverydig",
"notverydignified",
"notverydignify",
"notverydignity",
"notverydiligence",
"notverydiligent",
"notverydiligently",
"notverydiplomatic",
"notverydirect",
"notverydisarming",
"notverydiscerning",
"notverydiscreet",
"notverydiscrete",
"notverydiscretion",
"notverydiscriminating",
"notverydiscriminatingly",
"notverydistinct",
"notverydistinction",
"notverydistinctive",
"notverydistinguish",
"notverydistinguished",
"notverydiversified",
"notverydivine",
"notverydivinely",
"notverydodge",
"notverydote",
"notverydotingly",
"notverydoubtless",
"notverydream",
"notverydreamland",
"notverydreams",
"notverydreamy",
"notverydrive",
"notverydriven",
"notverydurability",
"notverydurable",
"notverydutiful",
"notverydynamic",
"notveryeager",
"notveryeagerly",
"notveryeagerness",
"notveryearnest",
"notveryearnestly",
"notveryearnestness",
"notveryease",
"notveryeasier",
"notveryeasiest",
"notveryeasily",
"notveryeasiness",
"notveryeasy",
"notveryeasygoing",
"notveryebullience",
"notveryebullient",
"notveryebulliently",
"notveryeclectic",
"notveryeconomical",
"notveryecstasies",
"notveryecstasy",
"notveryecstatic",
"notveryecstatically",
"notveryedify",
"notveryeducable",
"notveryeducated",
"notveryeducational",
"notveryeffective",
"notveryeffectiveness",
"notveryeffectual",
"notveryefficacious",
"notveryefficiency",
"notveryefficient",
"notveryeffortless",
"notveryeffortlessly",
"notveryeffusion",
"notveryeffusive",
"notveryeffusively",
"notveryeffusiveness",
"notveryegalitarian",
"notveryelan",
"notveryelate",
"notveryelated",
"notveryelatedly",
"notveryelation",
"notveryelectrification",
"notveryelectrify",
"notveryelegance",
"notveryelegant",
"notveryelegantly",
"notveryelevate",
"notveryelevated",
"notveryeligible",
"notveryelite",
"notveryeloquence",
"notveryeloquent",
"notveryeloquently",
"notveryemancipate",
"notveryembellish",
"notveryembolden",
"notveryembrace",
"notveryeminence",
"notveryeminent",
"notveryempower",
"notveryempowerment",
"notveryenable",
"notveryenchant",
"notveryenchanted",
"notveryenchanting",
"notveryenchantingly",
"notveryencourage",
"notveryencouragement",
"notveryencouraging",
"notveryencouragingly",
"notveryendear",
"notveryendearing",
"notveryendorse",
"notveryendorsement",
"notveryendorser",
"notveryendurable",
"notveryendure",
"notveryenduring",
"notveryenergetic",
"notveryenergize",
"notveryengaging",
"notveryengrossing",
"notveryenhance",
"notveryenhanced",
"notveryenhancement",
"notveryenjoy",
"notveryenjoyable",
"notveryenjoyably",
"notveryenjoyment",
"notveryenlighten",
"notveryenlightened",
"notveryenlightenment",
"notveryenliven",
"notveryennoble",
"notveryenrapt",
"notveryenrapture",
"notveryenraptured",
"notveryenrich",
"notveryenrichment",
"notveryensure",
"notveryenterprising",
"notveryentertain",
"notveryentertaining",
"notveryenthral",
"notveryenthrall",
"notveryenthralled",
"notveryenthuse",
"notveryenthusiasm",
"notveryenthusiast",
"notveryenthusiastic",
"notveryenthusiastically",
"notveryentice",
"notveryenticing",
"notveryenticingly",
"notveryentrance",
"notveryentranced",
"notveryentrancing",
"notveryentreat",
"notveryentreatingly",
"notveryentrust",
"notveryenviable",
"notveryenviably",
"notveryenvision",
"notveryenvisions",
"notveryepic",
"notveryepitome",
"notveryequality",
"notveryequitable",
"notveryerudite",
"notveryessential",
"notveryestablished",
"notveryesteem",
"notveryeternity",
"notveryethical",
"notveryeulogize",
"notveryeuphoria",
"notveryeuphoric",
"notveryeuphorically",
"notveryevenly",
"notveryeventful",
"notveryeverlasting",
"notveryevident",
"notveryevidently",
"notveryevocative",
"notveryexact",
"notveryexalt",
"notveryexaltation",
"notveryexalted",
"notveryexaltedly",
"notveryexalting",
"notveryexaltingly",
"notveryexceed",
"notveryexceeding",
"notveryexceedingly",
"notveryexcel",
"notveryexcellence",
"notveryexcellency",
"notveryexcellent",
"notveryexcellently",
"notveryexceptional",
"notveryexceptionally",
"notveryexcite",
"notveryexcited",
"notveryexcitedly",
"notveryexcitedness",
"notveryexcitement",
"notveryexciting",
"notveryexcitingly",
"notveryexclusive",
"notveryexcusable",
"notveryexcuse",
"notveryexemplar",
"notveryexemplary",
"notveryexhaustive",
"notveryexhaustively",
"notveryexhilarate",
"notveryexhilarating",
"notveryexhilaratingly",
"notveryexhilaration",
"notveryexonerate",
"notveryexpansive",
"notveryexperienced",
"notveryexpert",
"notveryexpertly",
"notveryexplicit",
"notveryexplicitly",
"notveryexpressive",
"notveryexquisite",
"notveryexquisitely",
"notveryextol",
"notveryextoll",
"notveryextraordinarily",
"notveryextraordinary",
"notveryexuberance",
"notveryexuberant",
"notveryexuberantly",
"notveryexult",
"notveryexultant",
"notveryexultation",
"notveryexultingly",
"notveryfabulous",
"notveryfabulously",
"notveryfacilitate",
"notveryfair",
"notveryfairly",
"notveryfairness",
"notveryfaith",
"notveryfaithful",
"notveryfaithfully",
"notveryfaithfulness",
"notveryfame",
"notveryfamed",
"notveryfamous",
"notveryfamously",
"notveryfancy",
"notveryfanfare",
"notveryfantastic",
"notveryfantastically",
"notveryfantasy",
"notveryfarsighted",
"notveryfascinate",
"notveryfascinating",
"notveryfascinatingly",
"notveryfascination",
"notveryfashionable",
"notveryfashionably",
"notveryfast-growing",
"notveryfast-paced",
"notveryfastest-growing",
"notveryfathom",
"notveryfavor",
"notveryfavorable",
"notveryfavored",
"notveryfavorite",
"notveryfavour",
"notveryfawn",
"notveryfearless",
"notveryfearlessly",
"notveryfeasible",
"notveryfeasibly",
"notveryfeat",
"notveryfeatly",
"notveryfeisty",
"notveryfelicitate",
"notveryfelicitous",
"notveryfelicity",
"notveryfertile",
"notveryfervent",
"notveryfervently",
"notveryfervid",
"notveryfervidly",
"notveryfervor",
"notveryfestive",
"notveryfidelity",
"notveryfiery",
"notveryfine",
"notveryfinely",
"notveryfirst-class",
"notveryfirst-rate",
"notveryfit",
"notveryfitting",
"notveryflair",
"notveryflame",
"notveryflatter",
"notveryflattering",
"notveryflatteringly",
"notveryflawless",
"notveryflawlessly",
"notveryflexible",
"notveryflourish",
"notveryflourishing",
"notveryfluent",
"notveryfocused",
"notveryfond",
"notveryfondly",
"notveryfondness",
"notveryfoolproof",
"notveryforbearing",
"notveryforemost",
"notveryforesight",
"notveryforgave",
"notveryforgive",
"notveryforgiven",
"notveryforgiveness",
"notveryforgiving",
"notveryforgivingly",
"notveryforthright",
"notveryfortitude",
"notveryfortuitous",
"notveryfortuitously",
"notveryfortunate",
"notveryfortunately",
"notveryfortune",
"notveryfragrant",
"notveryfrank",
"notveryfree",
"notveryfreedom",
"notveryfreedoms",
"notveryfresh",
"notveryfriend",
"notveryfriendliness",
"notveryfriendly",
"notveryfriends",
"notveryfriendship",
"notveryfrolic",
"notveryfruitful",
"notveryfulfillment",
"notveryfull-fledged",
"notveryfun",
"notveryfunctional",
"notveryfunny",
"notverygaiety",
"notverygaily",
"notverygain",
"notverygainful",
"notverygainfully",
"notverygallant",
"notverygallantly",
"notverygalore",
"notverygem",
"notverygems",
"notverygenerosity",
"notverygenerous",
"notverygenerously",
"notverygenial",
"notverygenius",
"notverygenteel",
"notverygentle",
"notverygenuine",
"notverygermane",
"notverygiddy",
"notverygifted",
"notveryglad",
"notverygladden",
"notverygladly",
"notverygladness",
"notveryglamorous",
"notveryglee",
"notverygleeful",
"notverygleefully",
"notveryglimmer",
"notveryglimmering",
"notveryglisten",
"notveryglistening",
"notveryglitter",
"notverygloat",
"notveryglorify",
"notveryglorious",
"notverygloriously",
"notveryglory",
"notveryglossy",
"notveryglow",
"notveryglowing",
"notveryglowingly",
"notverygo-ahead",
"notverygod-given",
"notverygodlike",
"notverygodly",
"notverygold",
"notverygolden",
"notverygood",
"notverygoodhearted",
"notverygoodly",
"notverygoodness",
"notverygoodwill",
"notverygorgeous",
"notverygorgeously",
"notverygrace",
"notverygraceful",
"notverygracefully",
"notverygracious",
"notverygraciously",
"notverygraciousness",
"notverygrail",
"notverygrand",
"notverygrandeur",
"notverygrateful",
"notverygratefully",
"notverygratification",
"notverygratify",
"notverygratifying",
"notverygratifyingly",
"notverygratitude",
"notverygreat",
"notverygreatest",
"notverygreatness",
"notverygreet",
"notverygregarious",
"notverygrin",
"notverygrit",
"notverygroove",
"notverygroundbreaking",
"notverygrounded",
"notveryguarantee",
"notveryguardian",
"notveryguidance",
"notveryguiltless",
"notverygumption",
"notverygush",
"notverygusto",
"notverygutsy",
"notveryhail",
"notveryhalcyon",
"notveryhale",
"notveryhallowed",
"notveryhandily",
"notveryhandsome",
"notveryhandy",
"notveryhanker",
"notveryhappily",
"notveryhappiness",
"notveryhappy",
"notveryhard-working",
"notveryhardier",
"notveryhardy",
"notveryharmless",
"notveryharmonious",
"notveryharmoniously",
"notveryharmonize",
"notveryharmony",
"notveryhaven",
"notveryheadway",
"notveryheady",
"notveryheal",
"notveryhealthful",
"notveryhealthy",
"notveryheart",
"notveryhearten",
"notveryheartening",
"notveryheartfelt",
"notveryheartily",
"notveryheartwarming",
"notveryheaven",
"notveryheavenly",
"notveryheedful",
"notveryhelpful",
"notveryherald",
"notveryhero",
"notveryheroic",
"notveryheroically",
"notveryheroine",
"notveryheroize",
"notveryheros",
"notveryhigh-quality",
"notveryhighlight",
"notveryhilarious",
"notveryhilariously",
"notveryhilariousness",
"notveryhilarity",
"notveryhistoric",
"notveryholy",
"notveryhomage",
"notveryhonest",
"notveryhonestly",
"notveryhonesty",
"notveryhoneymoon",
"notveryhonor",
"notveryhonorable",
"notveryhope",
"notveryhopeful",
"notveryhopefulness",
"notveryhopes",
"notveryhospitable",
"notveryhot",
"notveryhug",
"notveryhumane",
"notveryhumanists",
"notveryhumanity",
"notveryhumankind",
"notveryhumble",
"notveryhumility",
"notveryhumor",
"notveryhumorous",
"notveryhumorously",
"notveryhumour",
"notveryhumourous",
"notveryideal",
"notveryidealism",
"notveryidealist",
"notveryidealize",
"notveryideally",
"notveryidol",
"notveryidolize",
"notveryidolized",
"notveryidyllic",
"notveryilluminate",
"notveryilluminati",
"notveryilluminating",
"notveryillumine",
"notveryillustrious",
"notveryimaginative",
"notveryimmaculate",
"notveryimmaculately",
"notveryimpartial",
"notveryimpartiality",
"notveryimpartially",
"notveryimpassioned",
"notveryimpeccable",
"notveryimpeccably",
"notveryimpel",
"notveryimperial",
"notveryimperturbable",
"notveryimpervious",
"notveryimpetus",
"notveryimportance",
"notveryimportant",
"notveryimportantly",
"notveryimpregnable",
"notveryimpress",
"notveryimpression",
"notveryimpressions",
"notveryimpressive",
"notveryimpressively",
"notveryimpressiveness",
"notveryimprove",
"notveryimproved",
"notveryimprovement",
"notveryimproving",
"notveryimprovise",
"notveryinalienable",
"notveryincisive",
"notveryincisively",
"notveryincisiveness",
"notveryinclination",
"notveryinclinations",
"notveryinclined",
"notveryinclusive",
"notveryincontestable",
"notveryincontrovertible",
"notveryincorruptible",
"notveryincredible",
"notveryincredibly",
"notveryindebted",
"notveryindefatigable",
"notveryindelible",
"notveryindelibly",
"notveryindependence",
"notveryindependent",
"notveryindescribable",
"notveryindescribably",
"notveryindestructible",
"notveryindispensability",
"notveryindispensable",
"notveryindisputable",
"notveryindividuality",
"notveryindomitable",
"notveryindomitably",
"notveryindubitable",
"notveryindubitably",
"notveryindulgence",
"notveryindulgent",
"notveryindustrious",
"notveryinestimable",
"notveryinestimably",
"notveryinexpensive",
"notveryinfallibility",
"notveryinfallible",
"notveryinfallibly",
"notveryinfluential",
"notveryinformative",
"notveryingenious",
"notveryingeniously",
"notveryingenuity",
"notveryingenuous",
"notveryingenuously",
"notveryingratiate",
"notveryingratiating",
"notveryingratiatingly",
"notveryinnocence",
"notveryinnocent",
"notveryinnocently",
"notveryinnocuous",
"notveryinnovation",
"notveryinnovative",
"notveryinoffensive",
"notveryinquisitive",
"notveryinsight",
"notveryinsightful",
"notveryinsightfully",
"notveryinsist",
"notveryinsistence",
"notveryinsistent",
"notveryinsistently",
"notveryinspiration",
"notveryinspirational",
"notveryinspire",
"notveryinspired",
"notveryinspiring",
"notveryinstructive",
"notveryinstrumental",
"notveryintact",
"notveryintegral",
"notveryintegrity",
"notveryintelligence",
"notveryintelligent",
"notveryintelligible",
"notveryintercede",
"notveryinterest",
"notveryinterested",
"notveryinteresting",
"notveryinterests",
"notveryintimacy",
"notveryintimate",
"notveryintricate",
"notveryintrigue",
"notveryintriguing",
"notveryintriguingly",
"notveryintuitive",
"notveryinvaluable",
"notveryinvaluablely",
"notveryinventive",
"notveryinvigorate",
"notveryinvigorating",
"notveryinvincibility",
"notveryinvincible",
"notveryinviolable",
"notveryinviolate",
"notveryinvulnerable",
"notveryirrefutable",
"notveryirrefutably",
"notveryirreproachable",
"notveryirresistible",
"notveryirresistibly",
"notveryjauntily",
"notveryjaunty",
"notveryjest",
"notveryjoke",
"notveryjollify",
"notveryjolly",
"notveryjovial",
"notveryjoy",
"notveryjoyful",
"notveryjoyfully",
"notveryjoyous",
"notveryjoyously",
"notveryjubilant",
"notveryjubilantly",
"notveryjubilate",
"notveryjubilation",
"notveryjudicious",
"notveryjust",
"notveryjustice",
"notveryjustifiable",
"notveryjustifiably",
"notveryjustification",
"notveryjustify",
"notveryjustly",
"notverykeen",
"notverykeenly",
"notverykeenness",
"notverykemp",
"notverykid",
"notverykind",
"notverykindliness",
"notverykindly",
"notverykindness",
"notverykingmaker",
"notverykiss",
"notverykissable",
"notveryknowledgeable",
"notverylarge",
"notverylark",
"notverylaud",
"notverylaudable",
"notverylaudably",
"notverylavish",
"notverylavishly",
"notverylaw-abiding",
"notverylawful",
"notverylawfully",
"notveryleading",
"notverylean",
"notverylearned",
"notverylearning",
"notverylegendary",
"notverylegitimacy",
"notverylegitimate",
"notverylegitimately",
"notverylenient",
"notveryleniently",
"notveryless-expensive",
"notveryleverage",
"notverylevity",
"notveryliberal",
"notveryliberalism",
"notveryliberally",
"notveryliberate",
"notveryliberation",
"notveryliberty",
"notverylifeblood",
"notverylifelong",
"notverylight",
"notverylight-hearted",
"notverylighten",
"notverylikable",
"notverylike",
"notverylikeable",
"notveryliking",
"notverylionhearted",
"notveryliterate",
"notverylive",
"notverylively",
"notverylofty",
"notverylogical",
"notverylooking",
"notverylovable",
"notverylovably",
"notverylove",
"notverylovee",
"notveryloveliness",
"notverylovely",
"notverylover",
"notverylow-cost",
"notverylow-risk",
"notverylower-priced",
"notveryloyal",
"notveryloyalty",
"notverylucid",
"notverylucidly",
"notveryluck",
"notveryluckier",
"notveryluckiest",
"notveryluckily",
"notveryluckiness",
"notverylucky",
"notverylucrative",
"notveryluminous",
"notverylush",
"notverylust",
"notveryluster",
"notverylustrous",
"notveryluxuriant",
"notveryluxuriate",
"notveryluxurious",
"notveryluxuriously",
"notveryluxury",
"notverylyrical",
"notverymagic",
"notverymagical",
"notverymagnanimous",
"notverymagnanimously",
"notverymagnetic",
"notverymagnificence",
"notverymagnificent",
"notverymagnificently",
"notverymagnify",
"notverymajestic",
"notverymajesty",
"notverymanageable",
"notverymanifest",
"notverymanly",
"notverymannered",
"notverymannerly",
"notverymarvel",
"notverymarvellous",
"notverymarvelous",
"notverymarvelously",
"notverymarvelousness",
"notverymarvels",
"notverymaster",
"notverymasterful",
"notverymasterfully",
"notverymasterly",
"notverymasterpiece",
"notverymasterpieces",
"notverymasters",
"notverymastery",
"notverymatchless",
"notverymature",
"notverymaturely",
"notverymaturity",
"notverymaximize",
"notverymeaningful",
"notverymeek",
"notverymellow",
"notverymemorable",
"notverymemorialize",
"notverymend",
"notverymentor",
"notverymerciful",
"notverymercifully",
"notverymercy",
"notverymerit",
"notverymeritorious",
"notverymerrily",
"notverymerriment",
"notverymerriness",
"notverymerry",
"notverymesmerize",
"notverymesmerizing",
"notverymesmerizingly",
"notverymeticulous",
"notverymeticulously",
"notverymightily",
"notverymighty",
"notverymild",
"notverymindful",
"notveryminister",
"notverymiracle",
"notverymiracles",
"notverymiraculous",
"notverymiraculously",
"notverymiraculousness",
"notverymirth",
"notverymoderate",
"notverymoderation",
"notverymodern",
"notverymodest",
"notverymodesty",
"notverymollify",
"notverymomentous",
"notverymonumental",
"notverymonumentally",
"notverymoral",
"notverymorality",
"notverymoralize",
"notverymotivate",
"notverymotivated",
"notverymotivation",
"notverymoving",
"notverymyriad",
"notverynatural",
"notverynaturally",
"notverynavigable",
"notveryneat",
"notveryneatly",
"notverynecessarily",
"notveryneighborly",
"notveryneutralize",
"notverynice",
"notverynicely",
"notverynifty",
"notverynimble",
"notverynoble",
"notverynobly",
"notverynon-violence",
"notverynon-violent",
"notverynormal",
"notverynotable",
"notverynotably",
"notverynoteworthy",
"notverynoticeable",
"notverynourish",
"notverynourishing",
"notverynourishment",
"notverynurture",
"notverynurturing",
"notveryoasis",
"notveryobedience",
"notveryobedient",
"notveryobediently",
"notveryobey",
"notveryobjective",
"notveryobjectively",
"notveryobliged",
"notveryobviate",
"notveryoffbeat",
"notveryoffset",
"notveryonward",
"notveryopen",
"notveryopenhanded",
"notveryopenly",
"notveryopenness",
"notveryopportune",
"notveryopportunity",
"notveryoptimal",
"notveryoptimism",
"notveryoptimistic",
"notveryopulent",
"notveryorderly",
"notveryoriginal",
"notveryoriginality",
"notveryoutdo",
"notveryoutgoing",
"notveryoutshine",
"notveryoutsmart",
"notveryoutstanding",
"notveryoutstandingly",
"notveryoutstrip",
"notveryoutwit",
"notveryovation",
"notveryoverachiever",
"notveryoverjoyed",
"notveryoverture",
"notverypacifist",
"notverypacifists",
"notverypainless",
"notverypainlessly",
"notverypainstaking",
"notverypainstakingly",
"notverypalatable",
"notverypalatial",
"notverypalliate",
"notverypamper",
"notveryparadise",
"notveryparamount",
"notverypardon",
"notverypassion",
"notverypassionate",
"notverypassionately",
"notverypatience",
"notverypatient",
"notverypatiently",
"notverypatriot",
"notverypatriotic",
"notverypeace",
"notverypeaceable",
"notverypeaceful",
"notverypeacefully",
"notverypeacekeepers",
"notverypeerless",
"notverypenetrating",
"notverypenitent",
"notveryperceptive",
"notveryperfect",
"notveryperfection",
"notveryperfectly",
"notverypermissible",
"notveryperseverance",
"notverypersevere",
"notverypersistent",
"notverypersonable",
"notverypersonages",
"notverypersonality",
"notveryperspicuous",
"notveryperspicuously",
"notverypersuade",
"notverypersuasive",
"notverypersuasively",
"notverypertinent",
"notveryphenomenal",
"notveryphenomenally",
"notveryphilanthropic",
"notveryphilosophical",
"notverypicturesque",
"notverypiety",
"notverypillar",
"notverypinnacle",
"notverypious",
"notverypithy",
"notveryplacate",
"notveryplacid",
"notveryplainly",
"notveryplausibility",
"notveryplausible",
"notveryplayful",
"notveryplayfully",
"notverypleasant",
"notverypleasantly",
"notverypleased",
"notverypleasing",
"notverypleasingly",
"notverypleasurable",
"notverypleasurably",
"notverypleasure",
"notverypledge",
"notverypledges",
"notveryplentiful",
"notveryplenty",
"notveryplush",
"notverypoetic",
"notverypoeticize",
"notverypoignant",
"notverypoise",
"notverypoised",
"notverypolished",
"notverypolite",
"notverypoliteness",
"notverypopular",
"notverypopularity",
"notveryportable",
"notveryposh",
"notverypositive",
"notverypositively",
"notverypositiveness",
"notveryposterity",
"notverypotent",
"notverypotential",
"notverypowerful",
"notverypowerfully",
"notverypracticable",
"notverypractical",
"notverypragmatic",
"notverypraise",
"notverypraiseworthy",
"notverypraising",
"notverypre-eminent",
"notverypreach",
"notverypreaching",
"notveryprecaution",
"notveryprecautions",
"notveryprecedent",
"notveryprecious",
"notveryprecise",
"notveryprecisely",
"notveryprecision",
"notverypreeminent",
"notverypreemptive",
"notveryprefer",
"notverypreferable",
"notverypreferably",
"notverypreference",
"notverypreferences",
"notverypremier",
"notverypremium",
"notveryprepared",
"notverypreponderance",
"notverypress",
"notveryprestige",
"notveryprestigious",
"notveryprettily",
"notverypretty",
"notverypriceless",
"notverypride",
"notveryprinciple",
"notveryprincipled",
"notveryprivilege",
"notveryprivileged",
"notveryprize",
"notverypro",
"notverypro-american",
"notverypro-beijing",
"notverypro-cuba",
"notverypro-peace",
"notveryproactive",
"notveryprodigious",
"notveryprodigiously",
"notveryprodigy",
"notveryproductive",
"notveryprofess",
"notveryprofessional",
"notveryproficient",
"notveryproficiently",
"notveryprofit",
"notveryprofitable",
"notveryprofound",
"notveryprofoundly",
"notveryprofuse",
"notveryprofusely",
"notveryprofusion",
"notveryprogress",
"notveryprogressive",
"notveryprolific",
"notveryprominence",
"notveryprominent",
"notverypromise",
"notverypromising",
"notverypromoter",
"notveryprompt",
"notverypromptly",
"notveryproper",
"notveryproperly",
"notverypropitious",
"notverypropitiously",
"notveryprospect",
"notveryprospects",
"notveryprosper",
"notveryprosperity",
"notveryprosperous",
"notveryprotect",
"notveryprotection",
"notveryprotective",
"notveryprotector",
"notveryproud",
"notveryprovidence",
"notveryprovident",
"notveryprowess",
"notveryprudence",
"notveryprudent",
"notveryprudently",
"notverypunctual",
"notverypundits",
"notverypure",
"notverypurification",
"notverypurify",
"notverypurity",
"notverypurposeful",
"notveryquaint",
"notveryqualified",
"notveryqualify",
"notveryquasi-ally",
"notveryquench",
"notveryquicken",
"notveryradiance",
"notveryradiant",
"notveryrally",
"notveryrapport",
"notveryrapprochement",
"notveryrapt",
"notveryrapture",
"notveryraptureous",
"notveryraptureously",
"notveryrapturous",
"notveryrapturously",
"notveryrational",
"notveryrationality",
"notveryrave",
"notveryre-conquest",
"notveryreadily",
"notveryready",
"notveryreaffirm",
"notveryreaffirmation",
"notveryreal",
"notveryrealist",
"notveryrealistic",
"notveryrealistically",
"notveryreason",
"notveryreasonable",
"notveryreasonably",
"notveryreasoned",
"notveryreassurance",
"notveryreassure",
"notveryreceptive",
"notveryreclaim",
"notveryrecognition",
"notveryrecommend",
"notveryrecommendation",
"notveryrecommendations",
"notveryrecommended",
"notveryrecompense",
"notveryreconcile",
"notveryreconciliation",
"notveryrecord-setting",
"notveryrecover",
"notveryrectification",
"notveryrectify",
"notveryrectifying",
"notveryredeem",
"notveryredeeming",
"notveryredemption",
"notveryreestablish",
"notveryrefine",
"notveryrefined",
"notveryrefinement",
"notveryreflective",
"notveryreform",
"notveryrefresh",
"notveryrefreshing",
"notveryrefuge",
"notveryregal",
"notveryregally",
"notveryregard",
"notveryrehabilitate",
"notveryrehabilitation",
"notveryreinforce",
"notveryreinforcement",
"notveryrejoice",
"notveryrejoicing",
"notveryrejoicingly",
"notveryrelax",
"notveryrelaxed",
"notveryrelent",
"notveryrelevance",
"notveryrelevant",
"notveryreliability",
"notveryreliable",
"notveryreliably",
"notveryrelief",
"notveryrelieve",
"notveryrelish",
"notveryremarkable",
"notveryremarkably",
"notveryremedy",
"notveryreminiscent",
"notveryremunerate",
"notveryrenaissance",
"notveryrenewal",
"notveryrenovate",
"notveryrenovation",
"notveryrenown",
"notveryrenowned",
"notveryrepair",
"notveryreparation",
"notveryrepay",
"notveryrepent",
"notveryrepentance",
"notveryreposed",
"notveryreputable",
"notveryrescue",
"notveryresilient",
"notveryresolute",
"notveryresolve",
"notveryresolved",
"notveryresound",
"notveryresounding",
"notveryresourceful",
"notveryresourcefulness",
"notveryrespect",
"notveryrespectable",
"notveryrespectful",
"notveryrespectfully",
"notveryrespite",
"notveryresplendent",
"notveryresponsibility",
"notveryresponsible",
"notveryresponsibly",
"notveryresponsive",
"notveryrestful",
"notveryrestoration",
"notveryrestore",
"notveryrestrained",
"notveryrestraint",
"notveryresurgent",
"notveryreunite",
"notveryrevel",
"notveryrevelation",
"notveryrevere",
"notveryreverence",
"notveryreverent",
"notveryreverently",
"notveryrevitalize",
"notveryrevival",
"notveryrevive",
"notveryrevolution",
"notveryreward",
"notveryrewarding",
"notveryrewardingly",
"notveryrich",
"notveryriches",
"notveryrichly",
"notveryrichness",
"notveryright",
"notveryrighten",
"notveryrighteous",
"notveryrighteously",
"notveryrighteousness",
"notveryrightful",
"notveryrightfully",
"notveryrightly",
"notveryrightness",
"notveryrights",
"notveryripe",
"notveryrisk-free",
"notveryrobust",
"notveryromantic",
"notveryromantically",
"notveryromanticize",
"notveryrosy",
"notveryrousing",
"notverysacred",
"notverysafe",
"notverysafeguard",
"notverysagacious",
"notverysagacity",
"notverysage",
"notverysagely",
"notverysaint",
"notverysaintliness",
"notverysaintly",
"notverysalable",
"notverysalivate",
"notverysalutary",
"notverysalute",
"notverysalvation",
"notverysanctify",
"notverysanction",
"notverysanctity",
"notverysanctuary",
"notverysane",
"notverysanguine",
"notverysanity",
"notverysatisfaction",
"notverysatisfactorily",
"notverysatisfactory",
"notverysatisfied",
"notverysatisfy",
"notverysatisfying",
"notverysavor",
"notverysavvy",
"notveryscenic",
"notveryscholarly",
"notveryscruples",
"notveryscrupulous",
"notveryscrupulously",
"notveryseamless",
"notveryseasoned",
"notverysecure",
"notverysecurely",
"notverysecurity",
"notveryseductive",
"notveryseemly",
"notveryselective",
"notveryself-determination",
"notveryself-respect",
"notveryself-satisfaction",
"notveryself-sufficiency",
"notveryself-sufficient",
"notverysemblance",
"notverysensation",
"notverysensational",
"notverysensationally",
"notverysensations",
"notverysense",
"notverysensible",
"notverysensibly",
"notverysensitively",
"notverysensitivity",
"notverysensual",
"notverysentiment",
"notverysentimental",
"notverysentimentality",
"notverysentimentally",
"notverysentiments",
"notveryserene",
"notveryserenity",
"notverysettle",
"notverysexy",
"notverysharp",
"notveryshelter",
"notveryshield",
"notveryshimmer",
"notveryshimmering",
"notveryshimmeringly",
"notveryshine",
"notveryshiny",
"notveryshrewd",
"notveryshrewdly",
"notveryshrewdness",
"notverysignificance",
"notverysignificant",
"notverysignify",
"notverysimple",
"notverysimplicity",
"notverysimplified",
"notverysimplify",
"notverysincere",
"notverysincerely",
"notverysincerity",
"notveryskill",
"notveryskilled",
"notveryskillful",
"notveryskillfully",
"notverysleek",
"notveryslender",
"notveryslim",
"notverysmart",
"notverysmarter",
"notverysmartest",
"notverysmartly",
"notverysmile",
"notverysmiling",
"notverysmilingly",
"notverysmitten",
"notverysmooth",
"notverysociable",
"notverysoft-spoken",
"notverysoften",
"notverysolace",
"notverysolicitous",
"notverysolicitously",
"notverysolicitude",
"notverysolid",
"notverysolidarity",
"notverysoothe",
"notverysoothingly",
"notverysophisticated",
"notverysoulful",
"notverysound",
"notverysoundness",
"notveryspacious",
"notveryspare",
"notverysparing",
"notverysparingly",
"notverysparkle",
"notverysparkling",
"notveryspecial",
"notveryspectacular",
"notveryspectacularly",
"notveryspeedy",
"notveryspellbind",
"notveryspellbinding",
"notveryspellbindingly",
"notveryspellbound",
"notveryspirit",
"notveryspirited",
"notveryspiritual",
"notverysplendid",
"notverysplendidly",
"notverysplendor",
"notveryspontaneous",
"notveryspotless",
"notverysprightly",
"notverysprite",
"notveryspry",
"notveryspur",
"notverysquarely",
"notverystability",
"notverystabilize",
"notverystable",
"notverystainless",
"notverystand",
"notverystar",
"notverystars",
"notverystately",
"notverystatuesque",
"notverystaunch",
"notverystaunchly",
"notverystaunchness",
"notverysteadfast",
"notverysteadfastly",
"notverysteadfastness",
"notverysteadiness",
"notverysteady",
"notverystellar",
"notverystellarly",
"notverystimulate",
"notverystimulating",
"notverystimulative",
"notverystirring",
"notverystirringly",
"notverystood",
"notverystraight",
"notverystraightforward",
"notverystreamlined",
"notverystride",
"notverystrides",
"notverystriking",
"notverystrikingly",
"notverystriving",
"notverystrong",
"notverystudious",
"notverystudiously",
"notverystunned",
"notverystunning",
"notverystunningly",
"notverystupendous",
"notverystupendously",
"notverysturdy",
"notverystylish",
"notverystylishly",
"notverysuave",
"notverysublime",
"notverysubscribe",
"notverysubstantial",
"notverysubstantially",
"notverysubstantive",
"notverysubtle",
"notverysucceed",
"notverysuccess",
"notverysuccessful",
"notverysuccessfully",
"notverysuffice",
"notverysufficient",
"notverysufficiently",
"notverysuggest",
"notverysuggestions",
"notverysuit",
"notverysuitable",
"notverysumptuous",
"notverysumptuously",
"notverysumptuousness",
"notverysunny",
"notverysuper",
"notverysuperb",
"notverysuperbly",
"notverysuperior",
"notverysuperlative",
"notverysupport",
"notverysupporter",
"notverysupportive",
"notverysupreme",
"notverysupremely",
"notverysupurb",
"notverysupurbly",
"notverysurely",
"notverysurge",
"notverysurging",
"notverysurmise",
"notverysurmount",
"notverysurpass",
"notverysurvival",
"notverysurvive",
"notverysurvivor",
"notverysustainability",
"notverysustainable",
"notverysustained",
"notverysweeping",
"notverysweet",
"notverysweeten",
"notverysweetheart",
"notverysweetly",
"notverysweetness",
"notveryswell",
"notveryswift",
"notveryswiftness",
"notverysworn",
"notverysympathetic",
"notverysystematic",
"notverytact",
"notverytalent",
"notverytalented",
"notverytantalize",
"notverytantalizing",
"notverytantalizingly",
"notverytaste",
"notverytemperance",
"notverytemperate",
"notverytempt",
"notverytempting",
"notverytemptingly",
"notverytenacious",
"notverytenaciously",
"notverytenacity",
"notverytender",
"notverytenderly",
"notverytenderness",
"notveryterrific",
"notveryterrifically",
"notveryterrified",
"notveryterrify",
"notveryterrifying",
"notveryterrifyingly",
"notverythankful",
"notverythankfully",
"notverythanks",
"notverythinkable",
"notverythorough",
"notverythoughtful",
"notverythoughtfully",
"notverythoughtfulness",
"notverythrift",
"notverythrifty",
"notverythrill",
"notverythrilling",
"notverythrillingly",
"notverythrills",
"notverythrive",
"notverythriving",
"notverytickle",
"notverytidy",
"notverytime-honored",
"notverytimely",
"notverytingle",
"notverytitillate",
"notverytitillating",
"notverytitillatingly",
"notverytoast",
"notverytogetherness",
"notverytolerable",
"notverytolerably",
"notverytolerance",
"notverytolerant",
"notverytolerantly",
"notverytolerate",
"notverytoleration",
"notverytop",
"notverytorrid",
"notverytorridly",
"notverytough",
"notverytradition",
"notverytraditional",
"notverytranquil",
"notverytranquility",
"notverytreasure",
"notverytreat",
"notverytremendous",
"notverytremendously",
"notverytrendy",
"notverytrepidation",
"notverytribute",
"notverytrim",
"notverytriumph",
"notverytriumphal",
"notverytriumphant",
"notverytriumphantly",
"notverytruculent",
"notverytruculently",
"notverytrue",
"notverytrump",
"notverytrumpet",
"notverytrust",
"notverytrusting",
"notverytrustingly",
"notverytrustworthiness",
"notverytrustworthy",
"notverytruth",
"notverytruthful",
"notverytruthfully",
"notverytruthfulness",
"notverytwinkly",
"notveryultimate",
"notveryultimately",
"notveryultra",
"notveryunabashed",
"notveryunabashedly",
"notveryunanimous",
"notveryunassailable",
"notveryunbiased",
"notveryunbosom",
"notveryunbound",
"notveryunbroken",
"notveryuncommon",
"notveryuncommonly",
"notveryunconcerned",
"notveryunconditional",
"notveryunconventional",
"notveryundaunted",
"notveryunderstand",
"notveryunderstandable",
"notveryunderstanding",
"notveryunderstate",
"notveryunderstated",
"notveryunderstatedly",
"notveryunderstood",
"notveryundisputable",
"notveryundisputably",
"notveryundisputed",
"notveryundoubted",
"notveryundoubtedly",
"notveryunencumbered",
"notveryunequivocal",
"notveryunequivocally",
"notveryunfazed",
"notveryunfettered",
"notveryunforgettable",
"notveryuniform",
"notveryuniformly",
"notveryunique",
"notveryunity",
"notveryuniversal",
"notveryunlimited",
"notveryunparalleled",
"notveryunpretentious",
"notveryunquestionable",
"notveryunquestionably",
"notveryunrestricted",
"notveryunscathed",
"notveryunselfish",
"notveryuntouched",
"notveryuntrained",
"notveryupbeat",
"notveryupfront",
"notveryupgrade",
"notveryupheld",
"notveryuphold",
"notveryuplift",
"notveryuplifting",
"notveryupliftingly",
"notveryupliftment",
"notveryupright",
"notveryupscale",
"notveryupside",
"notveryupward",
"notveryurge",
"notveryusable",
"notveryuseful",
"notveryusefulness",
"notveryutilitarian",
"notveryutmost",
"notveryuttermost",
"notveryvaliant",
"notveryvaliantly",
"notveryvalid",
"notveryvalidity",
"notveryvalor",
"notveryvaluable",
"notveryvalues",
"notveryvanquish",
"notveryvast",
"notveryvastly",
"notveryvastness",
"notveryvenerable",
"notveryvenerably",
"notveryvenerate",
"notveryverifiable",
"notveryveritable",
"notveryversatile",
"notveryversatility",
"notveryviability",
"notveryviable",
"notveryvibrant",
"notveryvibrantly",
"notveryvictorious",
"notveryvictory",
"notveryvigilance",
"notveryvigilant",
"notveryvigorous",
"notveryvigorously",
"notveryvindicate",
"notveryvintage",
"notveryvirtue",
"notveryvirtuous",
"notveryvirtuously",
"notveryvisionary",
"notveryvital",
"notveryvitality",
"notveryvivacious",
"notveryvivid",
"notveryvoluntarily",
"notveryvoluntary",
"notveryvouch",
"notveryvouchsafe",
"notveryvow",
"notveryvulnerable",
"notverywarm",
"notverywarmhearted",
"notverywarmly",
"notverywarmth",
"notverywealthy",
"notverywelfare",
"notverywell-being",
"notverywell-connected",
"notverywell-educated",
"notverywell-established",
"notverywell-informed",
"notverywell-intentioned",
"notverywell-managed",
"notverywell-positioned",
"notverywell-publicized",
"notverywell-received",
"notverywell-regarded",
"notverywell-run",
"notverywell-wishers",
"notverywellbeing",
"notverywhimsical",
"notverywhite",
"notverywholeheartedly",
"notverywholesome",
"notverywide",
"notverywide-open",
"notverywide-ranging",
"notverywillful",
"notverywillfully",
"notverywilling",
"notverywillingness",
"notverywink",
"notverywinnable",
"notverywinners",
"notverywinsome",
"notverywisdom",
"notverywise",
"notverywisely",
"notverywishes",
"notverywishing",
"notverywitty",
"notverywonderful",
"notverywonderfully",
"notverywonderous",
"notverywonderously",
"notverywondrous",
"notverywoo",
"notveryworkable",
"notveryworld-famous",
"notveryworldly",
"notveryworship",
"notveryworth",
"notveryworth-while",
"notveryworthiness",
"notveryworthwhile",
"notveryworthy",
"notverywow",
"notverywry",
"notveryyearn",
"notveryyearning",
"notveryyearningly",
"notveryyep",
"notveryyouthful",
"notveryzeal",
"notveryzenith",
"notveryzest",
"notviability",
"notviable",
"notvibrant",
"notvibrantly",
"notvictorious",
"notvictory",
"notvigilance",
"notvigilant",
"notvigorous",
"notvigorously",
"notvindicate",
"notvintage",
"notvirtue",
"notvirtuous",
"notvirtuously",
"notvisionary",
"notvital",
"notvitality",
"notvivacious",
"notvivid",
"notvoluntarily",
"notvoluntary",
"notvouch",
"notvouchsafe",
"notvow",
"notvulnerable",
"notwarm",
"notwarmhearted",
"notwarmly",
"notwarmth",
"notwealthy",
"notwelfare",
"notwell-being",
"notwell-connected",
"notwell-educated",
"notwell-established",
"notwell-informed",
"notwell-intentioned",
"notwell-managed",
"notwell-positioned",
"notwell-publicized",
"notwell-received",
"notwell-regarded",
"notwell-run",
"notwell-wishers",
"notwellbeing",
"notwhimsical",
"notwhite",
"notwholeheartedly",
"notwholesome",
"notwide",
"notwide-open",
"notwide-ranging",
"notwillful",
"notwillfully",
"notwilling",
"notwillingness",
"notwink",
"notwinnable",
"notwinners",
"notwinsome",
"notwisdom",
"notwise",
"notwisely",
"notwishes",
"notwishing",
"notwitty",
"notwonderful",
"notwonderfully",
"notwonderous",
"notwonderously",
"notwondrous",
"notwoo",
"notworkable",
"notworld-famous",
"notworldly",
"notworship",
"notworth",
"notworth-while",
"notworthiness",
"notworthwhile",
"notworthy",
"notwow",
"notwry",
"notyearn",
"notyearning",
"notyearningly",
"notyep",
"notyouthful",
"notzeal",
"notzenith",
"notzest",
"nuisance",
"numb",
"nuts",
"nutty",
"obese",
"object",
"objectified",
"objection",
"objectionable",
"objections",
"obligated",
"oblique",
"obliterate",
"obliterated",
"oblivious",
"obnoxious",
"obnoxiously",
"obscene",
"obscenely",
"obscenity",
"obscure",
"obscurity",
"obsess",
"obsessed",
"obsession",
"obsessions",
"obsessive",
"obsessively",
"obsessiveness",
"obsolete",
"obstacle",
"obstinate",
"obstinately",
"obstruct",
"obstructed",
"obstruction",
"obtrusive",
"obtuse",
"odd",
"odder",
"oddest",
"oddities",
"oddity",
"oddly",
"offence",
"offend",
"offended",
"offending",
"offenses",
"offensive",
"offensively",
"offensiveness",
"officious",
"ominous",
"ominously",
"omission",
"omit",
"one-side",
"one-sided",
"onerous",
"onerously",
"onslaught",
"opinionated",
"opponent",
"opportunistic",
"oppose",
"opposed",
"opposition",
"oppositions",
"oppress",
"oppressed",
"oppression",
"oppressive",
"oppressively",
"oppressiveness",
"oppressors",
"ordeal",
"orphan",
"ostracize",
"outbreak",
"outburst",
"outbursts",
"outcast",
"outcry",
"outdated",
"outlaw",
"outmoded",
"outrage",
"outraged",
"outrageous",
"outrageously",
"outrageousness",
"outrages",
"outsider",
"over-acted",
"over-valuation",
"overact",
"overacted",
"overawe",
"overbalance",
"overbalanced",
"overbearing",
"overbearingly",
"overblown",
"overcome",
"overdo",
"overdone",
"overdue",
"overemphasize",
"overkill",
"overlook",
"overplay",
"overpower",
"overreach",
"overrun",
"overshadow",
"oversight",
"oversimplification",
"oversimplified",
"oversimplify",
"oversized",
"overstate",
"overstatement",
"overstatements",
"overtaxed",
"overthrow",
"overturn",
"overwhelm",
"overwhelmed",
"overwhelming",
"overwhelmingly",
"overworked",
"overzealous",
"overzealously",
"pain",
"painful",
"painfully",
"pains",
"pale",
"paltry",
"pan",
"pandemonium",
"panic",
"panicky",
"paradoxical",
"paradoxically",
"paralize",
"paralyzed",
"paranoia",
"paranoid",
"parasite",
"pariah",
"parody",
"partiality",
"partisan",
"partisans",
"passe",
"passive",
"passiveness",
"pathetic",
"pathetically",
"patronize",
"paucity",
"pauper",
"paupers",
"payback",
"peculiar",
"peculiarly",
"pedantic",
"pedestrian",
"peeve",
"peeved",
"peevish",
"peevishly",
"penalize",
"penalty",
"perfidious",
"perfidity",
"perfunctory",
"peril",
"perilous",
"perilously",
"peripheral",
"perish",
"pernicious",
"perplex",
"perplexed",
"perplexing",
"perplexity",
"persecute",
"persecution",
"pertinacious",
"pertinaciously",
"pertinacity",
"perturb",
"perturbed",
"perverse",
"perversely",
"perversion",
"perversity",
"pervert",
"perverted",
"pessimism",
"pessimistic",
"pessimistically",
"pest",
"pestilent",
"petrified",
"petrify",
"pettifog",
"petty",
"phobia",
"phobic",
"phony",
"picky",
"pillage",
"pillory",
"pinch",
"pine",
"pique",
"pissed",
"pitiable",
"pitiful",
"pitifully",
"pitiless",
"pitilessly",
"pittance",
"pity",
"plagiarize",
"plague",
"plain",
"plaything",
"plea",
"pleas",
"plebeian",
"plight",
"plot",
"plotters",
"ploy",
"plunder",
"plunderer",
"pointless",
"pointlessly",
"poison",
"poisonous",
"poisonously",
"polarisation",
"polemize",
"pollute",
"polluter",
"polluters",
"polution",
"pompous",
"pooped",
"poor",
"poorly",
"posturing",
"pout",
"poverty",
"powerless",
"prate",
"pratfall",
"prattle",
"precarious",
"precariously",
"precipitate",
"precipitous",
"predatory",
"predicament",
"predjudiced",
"prejudge",
"prejudice",
"prejudicial",
"premeditated",
"preoccupied",
"preoccupy",
"preposterous",
"preposterously",
"pressing",
"pressured",
"presume",
"presumptuous",
"presumptuously",
"pretence",
"pretend",
"pretense",
"pretentious",
"pretentiously",
"prevaricate",
"pricey",
"prickle",
"prickles",
"prideful",
"primitive",
"prison",
"prisoner",
"problem",
"problematic",
"problems",
"procrastinate",
"procrastination",
"profane",
"profanity",
"prohibit",
"prohibitive",
"prohibitively",
"propaganda",
"propagandize",
"proscription",
"proscriptions",
"prosecute",
"prosecuted",
"protest",
"protests",
"protracted",
"provocation",
"provocative",
"provoke",
"provoked",
"pry",
"psychopathic",
"psychotic",
"pugnacious",
"pugnaciously",
"pugnacity",
"punch",
"punish",
"punishable",
"punished",
"punitive",
"puny",
"puppet",
"puppets",
"pushed",
"puzzle",
"puzzled",
"puzzlement",
"puzzling",
"quack",
"qualms",
"quandary",
"quarrel",
"quarrellous",
"quarrellously",
"quarrels",
"quarrelsome",
"quash",
"queer",
"questionable",
"questioned",
"quibble",
"quiet",
"quit",
"quitter",
"racism",
"racist",
"racists",
"rack",
"radical",
"radicalization",
"radically",
"radicals",
"rage",
"ragged",
"raging",
"rail",
"rampage",
"rampant",
"ramshackle",
"rancor",
"rank",
"rankle",
"rant",
"ranting",
"rantingly",
"raped",
"rascal",
"rash",
"rat",
"rationalize",
"rattle",
"rattled",
"ravage",
"raving",
"reactionary",
"rebellious",
"rebuff",
"rebuke",
"recalcitrant",
"recant",
"recession",
"recessionary",
"reckless",
"recklessly",
"recklessness",
"recoil",
"recourses",
"redundancy",
"redundant",
"refusal",
"refuse",
"refutation",
"refute",
"regress",
"regression",
"regressive",
"regret",
"regretful",
"regretfully",
"regrettable",
"regrettably",
"reject",
"rejected",
"rejection",
"relapse",
"relentless",
"relentlessly",
"relentlessness",
"reluctance",
"reluctant",
"reluctantly",
"remorse",
"remorseful",
"remorsefully",
"remorseless",
"remorselessly",
"remorselessness",
"renounce",
"renunciation",
"repel",
"repetitive",
"reprehensible",
"reprehensibly",
"reprehension",
"reprehensive",
"repress",
"repression",
"repressive",
"reprimand",
"reproach",
"reproachful",
"reprove",
"reprovingly",
"repudiate",
"repudiation",
"repugn",
"repugnance",
"repugnant",
"repugnantly",
"repulse",
"repulsed",
"repulsing",
"repulsive",
"repulsively",
"repulsiveness",
"resent",
"resented",
"resentful",
"resentment",
"reservations",
"resignation",
"resigned",
"resistance",
"resistant",
"responsible",
"restless",
"restlessness",
"restrict",
"restricted",
"restriction",
"restrictive",
"retaliate",
"retaliatory",
"retard",
"retarded",
"reticent",
"retire",
"retract",
"retreat",
"revenge",
"revengeful",
"revengefully",
"revert",
"revile",
"reviled",
"revoke",
"revolt",
"revolting",
"revoltingly",
"revulsion",
"revulsive",
"rhapsodize",
"rhetoric",
"rhetorical",
"rid",
"ridicule",
"ridiculed",
"ridiculous",
"ridiculously",
"rife",
"rift",
"rifts",
"rigid",
"rigor",
"rigorous",
"rile",
"riled",
"risk",
"risky",
"rival",
"rivalry",
"roadblocks",
"robbed",
"rocky",
"rogue",
"rollercoaster",
"rot",
"rotten",
"rough",
"rubbish",
"rude",
"rue",
"ruffian",
"ruffle",
"ruin",
"ruinous",
"rumbling",
"rumor",
"rumors",
"rumours",
"rumple",
"run-down",
"runaway",
"rupture",
"rusty",
"ruthless",
"ruthlessly",
"ruthlessness",
"sabotage",
"sacrifice",
"sad",
"sadden",
"sadistic",
"sadly",
"sadness",
"sag",
"salacious",
"sanctimonious",
"sap",
"sarcasm",
"sarcastic",
"sarcastically",
"sardonic",
"sardonically",
"sass",
"satirical",
"satirize",
"savage",
"savaged",
"savagely",
"savagery",
"savages",
"scandal",
"scandalize",
"scandalized",
"scandalous",
"scandalously",
"scandals",
"scant",
"scapegoat",
"scar",
"scarce",
"scarcely",
"scarcity",
"scare",
"scared",
"scarier",
"scariest",
"scarily",
"scarred",
"scars",
"scary",
"scathing",
"scathingly",
"scheme",
"scheming",
"scoff",
"scoffingly",
"scold",
"scolding",
"scoldingly",
"scorching",
"scorchingly",
"scorn",
"scornful",
"scornfully",
"scoundrel",
"scourge",
"scowl",
"scream",
"screech",
"screw",
"screwed",
"scum",
"scummy",
"second-class",
"second-tier",
"secretive",
"sedentary",
"seedy",
"seethe",
"seething",
"self-coup",
"self-criticism",
"self-defeating",
"self-destructive",
"self-humiliation",
"self-interest",
"self-interested",
"self-serving",
"selfinterested",
"selfish",
"selfishly",
"selfishness",
"senile",
"sensationalize",
"senseless",
"senselessly",
"sensitive",
"seriousness",
"sermonize",
"servitude",
"set-up",
"sever",
"severe",
"severely",
"severity",
"shabby",
"shadow",
"shadowy",
"shady",
"shake",
"shaky",
"shallow",
"sham",
"shambles",
"shame",
"shameful",
"shamefully",
"shamefulness",
"shameless",
"shamelessly",
"shamelessness",
"shark",
"sharply",
"shatter",
"sheer",
"shipwreck",
"shirk",
"shirker",
"shiver",
"shock",
"shocking",
"shockingly",
"shoddy",
"short-lived",
"shortage",
"shortchange",
"shortcoming",
"shortcomings",
"shortsighted",
"shortsightedness",
"showdown",
"shred",
"shrew",
"shriek",
"shrill",
"shrilly",
"shrivel",
"shroud",
"shrouded",
"shrug",
"shun",
"shunned",
"shy",
"shyly",
"shyness",
"sick",
"sicken",
"sickening",
"sickeningly",
"sickly",
"sickness",
"sidetrack",
"sidetracked",
"siege",
"sillily",
"silly",
"simmer",
"simplistic",
"simplistically",
"sin",
"sinful",
"sinfully",
"sinister",
"sinisterly",
"sinking",
"skeletons",
"skeptical",
"skeptically",
"skepticism",
"sketchy",
"skimpy",
"skittish",
"skittishly",
"skulk",
"slack",
"slander",
"slanderer",
"slanderous",
"slanderously",
"slanders",
"slap",
"slashing",
"slaughter",
"slaughtered",
"slaves",
"sleazy",
"slight",
"slightly",
"slime",
"sloppily",
"sloppy",
"sloth",
"slothful",
"slow",
"slow-moving",
"slowly",
"slug",
"sluggish",
"slump",
"slur",
"sly",
"smack",
"small",
"smash",
"smear",
"smelling",
"smokescreen",
"smolder",
"smoldering",
"smother",
"smothered",
"smoulder",
"smouldering",
"smug",
"smugly",
"smut",
"smuttier",
"smuttiest",
"smutty",
"snare",
"snarl",
"snatch",
"sneak",
"sneakily",
"sneaky",
"sneer",
"sneering",
"sneeringly",
"snub",
"so-cal",
"so-called",
"sob",
"sober",
"sobering",
"solemn",
"somber",
"sore",
"sorely",
"soreness",
"sorrow",
"sorrowful",
"sorrowfully",
"sounding",
"sour",
"sourly",
"spade",
"spank",
"spilling",
"spinster",
"spiritless",
"spite",
"spiteful",
"spitefully",
"spitefulness",
"split",
"splitting",
"spoil",
"spook",
"spookier",
"spookiest",
"spookily",
"spooky",
"spoon-fed",
"spoon-feed",
"spoonfed",
"sporadic",
"spot",
"spotty",
"spurious",
"spurn",
"sputter",
"squabble",
"squabbling",
"squander",
"squash",
"squirm",
"stab",
"stagger",
"staggering",
"staggeringly",
"stagnant",
"stagnate",
"stagnation",
"staid",
"stain",
"stake",
"stale",
"stalemate",
"stammer",
"stampede",
"standstill",
"stark",
"starkly",
"startle",
"startling",
"startlingly",
"starvation",
"starve",
"static",
"steal",
"stealing",
"steep",
"steeply",
"stench",
"stereotype",
"stereotyped",
"stereotypical",
"stereotypically",
"stern",
"stew",
"sticky",
"stiff",
"stifle",
"stifling",
"stiflingly",
"stigma",
"stigmatize",
"sting",
"stinging",
"stingingly",
"stink",
"stinking",
"stodgy",
"stole",
"stolen",
"stooge",
"stooges",
"storm",
"stormy",
"straggle",
"straggler",
"strain",
"strained",
"strange",
"strangely",
"stranger",
"strangest",
"strangle",
"strenuous",
"stress",
"stressed",
"stressful",
"stressfully",
"stretched",
"stricken",
"strict",
"strictly",
"strident",
"stridently",
"strife",
"strike",
"stringent",
"stringently",
"struck",
"struggle",
"strut",
"stubborn",
"stubbornly",
"stubbornness",
"stuck",
"stuffy",
"stumble",
"stump",
"stun",
"stunt",
"stunted",
"stupid",
"stupidity",
"stupidly",
"stupified",
"stupify",
"stupor",
"sty",
"subdued",
"subjected",
"subjection",
"subjugate",
"subjugation",
"submissive",
"subordinate",
"subservience",
"subservient",
"subside",
"substandard",
"subtract",
"subversion",
"subversive",
"subversively",
"subvert",
"succumb",
"sucker",
"suffer",
"sufferer",
"sufferers",
"suffering",
"suffocate",
"suffocated",
"sugar-coat",
"sugar-coated",
"sugarcoated",
"suicidal",
"suicide",
"sulk",
"sullen",
"sully",
"sunder",
"superficial",
"superficiality",
"superficially",
"superfluous",
"superiority",
"superstition",
"superstitious",
"supposed",
"suppress",
"suppressed",
"suppression",
"supremacy",
"surrender",
"susceptible",
"suspect",
"suspicion",
"suspicions",
"suspicious",
"suspiciously",
"swagger",
"swamped",
"swear",
"swindle",
"swipe",
"swoon",
"swore",
"sympathetically",
"sympathies",
"sympathize",
"sympathy",
"symptom",
"syndrome",
"taboo",
"taint",
"tainted",
"tamper",
"tangled",
"tantrum",
"tardy",
"tarnish",
"tattered",
"taunt",
"taunting",
"tauntingly",
"taunts",
"tawdry",
"taxing",
"tease",
"teasingly",
"tedious",
"tediously",
"temerity",
"temper",
"tempest",
"temptation",
"tense",
"tension",
"tentative",
"tentatively",
"tenuous",
"tenuously",
"tepid",
"terrible",
"terribleness",
"terribly",
"terror",
"terror-genic",
"terrorism",
"terrorize",
"thankless",
"thirst",
"thorny",
"thoughtless",
"thoughtlessly",
"thoughtlessness",
"thrash",
"threat",
"threaten",
"threatening",
"threats",
"throttle",
"throw",
"thumb",
"thumbs",
"thwart",
"timid",
"timidity",
"timidly",
"timidness",
"tiny",
"tire",
"tired",
"tiresome",
"tiring",
"tiringly",
"toil",
"toll",
"topple",
"torment",
"tormented",
"torrent",
"tortuous",
"torture",
"tortured",
"torturous",
"torturously",
"totalitarian",
"touchy",
"toughness",
"toxic",
"traduce",
"tragedy",
"tragic",
"tragically",
"traitor",
"traitorous",
"traitorously",
"tramp",
"trample",
"transgress",
"transgression",
"trauma",
"traumatic",
"traumatically",
"traumatize",
"traumatized",
"travesties",
"travesty",
"treacherous",
"treacherously",
"treachery",
"treason",
"treasonous",
"trial",
"trick",
"trickery",
"tricky",
"trivial",
"trivialize",
"trivially",
"trouble",
"troublemaker",
"troublesome",
"troublesomely",
"troubling",
"troublingly",
"truant",
"tumultuous",
"turbulent",
"turmoil",
"twist",
"twisted",
"twists",
"tyrannical",
"tyrannically",
"tyranny",
"tyrant",
"ugh",
"ugliness",
"ugly",
"ulterior",
"ultimatum",
"ultimatums",
"ultra-hardline",
"unable",
"unacceptable",
"unacceptablely",
"unaccustomed",
"unattractive",
"unauthentic",
"unavailable",
"unavoidable",
"unavoidably",
"unbearable",
"unbearablely",
"unbelievable",
"unbelievably",
"uncertain",
"uncivil",
"uncivilized",
"unclean",
"unclear",
"uncollectible",
"uncomfortable",
"uncompetitive",
"uncompromising",
"uncompromisingly",
"unconfirmed",
"unconstitutional",
"uncontrolled",
"unconvincing",
"unconvincingly",
"uncouth",
"undecided",
"undefined",
"undependability",
"undependable",
"underdog",
"underestimate",
"underlings",
"undermine",
"underpaid",
"undesirable",
"undetermined",
"undid",
"undignified",
"undo",
"undocumented",
"undone",
"undue",
"unease",
"uneasily",
"uneasiness",
"uneasy",
"uneconomical",
"unequal",
"unethical",
"uneven",
"uneventful",
"unexpected",
"unexpectedly",
"unexplained",
"unfair",
"unfairly",
"unfaithful",
"unfaithfully",
"unfamiliar",
"unfavorable",
"unfeeling",
"unfinished",
"unfit",
"unforeseen",
"unfortunate",
"unfounded",
"unfriendly",
"unfulfilled",
"unfunded",
"ungovernable",
"ungrateful",
"unhappily",
"unhappiness",
"unhappy",
"unhealthy",
"unilateralism",
"unimaginable",
"unimaginably",
"unimportant",
"uninformed",
"uninsured",
"unipolar",
"unjust",
"unjustifiable",
"unjustifiably",
"unjustified",
"unjustly",
"unkind",
"unkindly",
"unlamentable",
"unlamentably",
"unlawful",
"unlawfully",
"unlawfulness",
"unleash",
"unlicensed",
"unlucky",
"unmoved",
"unnatural",
"unnaturally",
"unnecessary",
"unneeded",
"unnerve",
"unnerved",
"unnerving",
"unnervingly",
"unnoticed",
"unobserved",
"unorthodox",
"unorthodoxy",
"unpleasant",
"unpleasantries",
"unpopular",
"unprecedent",
"unprecedented",
"unpredictable",
"unprepared",
"unproductive",
"unprofitable",
"unqualified",
"unravel",
"unraveled",
"unrealistic",
"unreasonable",
"unreasonably",
"unrelenting",
"unrelentingly",
"unreliability",
"unreliable",
"unresolved",
"unrest",
"unruly",
"unsafe",
"unsatisfactory",
"unsavory",
"unscrupulous",
"unscrupulously",
"unseemly",
"unsettle",
"unsettled",
"unsettling",
"unsettlingly",
"unskilled",
"unsophisticated",
"unsound",
"unspeakable",
"unspeakablely",
"unspecified",
"unstable",
"unsteadily",
"unsteadiness",
"unsteady",
"unsuccessful",
"unsuccessfully",
"unsupported",
"unsure",
"unsuspecting",
"unsustainable",
"untenable",
"untested",
"unthinkable",
"unthinkably",
"untimely",
"untrue",
"untrustworthy",
"untruthful",
"unusual",
"unusually",
"unwanted",
"unwarranted",
"unwelcome",
"unwieldy",
"unwilling",
"unwillingly",
"unwillingness",
"unwise",
"unwisely",
"unworkable",
"unworthy",
"unyielding",
"upbraid",
"upheaval",
"uprising",
"uproar",
"uproarious",
"uproariously",
"uproarous",
"uproarously",
"uproot",
"upset",
"upsetting",
"upsettingly",
"urgency",
"urgent",
"urgently",
"useless",
"usurp",
"usurper",
"utter",
"utterly",
"vagrant",
"vague",
"vagueness",
"vain",
"vainly",
"vanish",
"vanity",
"vehement",
"vehemently",
"vengeance",
"vengeful",
"vengefully",
"vengefulness",
"venom",
"venomous",
"venomously",
"vent",
"vestiges",
"veto",
"vex",
"vexation",
"vexing",
"vexingly",
"vice",
"vicious",
"viciously",
"viciousness",
"victimize",
"vie",
"vile",
"vileness",
"vilify",
"villainous",
"villainously",
"villains",
"villian",
"villianous",
"villianously",
"villify",
"vindictive",
"vindictively",
"vindictiveness",
"violate",
"violation",
"violator",
"violent",
"violently",
"viper",
"virulence",
"virulent",
"virulently",
"virus",
"vocally",
"vociferous",
"vociferously",
"void",
"volatile",
"volatility",
"vomit",
"vulgar",
"wail",
"wallow",
"wane",
"waning",
"wanton",
"war",
"war-like",
"warfare",
"warily",
"wariness",
"warlike",
"warning",
"warp",
"warped",
"wary",
"waste",
"wasteful",
"wastefulness",
"watchdog",
"wayward",
"weak",
"weaken",
"weakening",
"weakness",
"weaknesses",
"weariness",
"wearisome",
"weary",
"wedge",
"wee",
"weed",
"weep",
"weird",
"weirdly",
"wheedle",
"whimper",
"whine",
"whips",
"wicked",
"wickedly",
"wickedness",
"widespread",
"wild",
"wildly",
"wiles",
"wilt",
"wily",
"wince",
"withheld",
"withhold",
"woe",
"woebegone",
"woeful",
"woefully",
"worn",
"worried",
"worriedly",
"worrier",
"worries",
"worrisome",
"worry",
"worrying",
"worryingly",
"worse",
"worsen",
"worsening",
"worst",
"worthless",
"worthlessly",
"worthlessness",
"wound",
"wounds",
"wrangle",
"wrath",
"wreck",
"wrest",
"wrestle",
"wretch",
"wretched",
"wretchedly",
"wretchedness",
"writhe",
"wrong",
"wrongful",
"wrongly",
"wrought",
"x(",
"x-(",
"xo",
"xp",
"yawn",
"yelp",
"zealot",
"zealous",
"zealously",
"|8c",
' " "=(',
);
jwhennessey/phpinsight/lib/PHPInsight/dictionaries/source.neu.php 0000644 00000012141 15153553404 0021266 0 ustar 00 <?php
$neu = array(
'(o;',
'*)',
'8-)',
':-',
':-\\',
':-o',
':0->-<|:',
':l',
':|',
';)',
';o)',
'<:}',
'absolute',
'absolutely',
'absorbed',
'accentuate',
'activist',
'actual',
'actuality',
'adolescents',
'affect',
'affected',
'aha',
'air',
'alert',
'all-time',
'allegorize',
'alliance',
'alliances',
'allusion',
'allusions',
'alright',
'altogether',
'amplify',
'analytical',
'apparent',
'apparently',
'appearance',
'apprehend',
'assess',
'assessment',
'assessments',
'assumption',
'astronomic',
'astronomical',
'astronomically',
'attitude',
'attitudes',
'average',
'aware',
'awareness',
'baby',
'basically',
'batons',
'belief',
'beliefs',
'big',
'blood',
'broad-based',
'ceaseless',
'central',
'certified',
'chant',
'claim',
'clandestine',
'cogitate',
'cognizance',
'comment',
'commentator',
'complete',
'completely',
'comprehend',
'concerted',
'confide',
'conjecture',
'conscience',
'consciousness',
'considerable',
'considerably',
'consideration',
'constitutions',
'contemplate',
'continuous',
'corrective',
'covert',
'decide',
'deduce',
'deeply',
'destiny',
'difference',
'diplomacy',
'discern',
'disposition',
'distinctly',
'dominant',
'downright',
'dramatically',
'duty',
'effectively',
'elaborate',
'embodiment',
'emotion',
'emotions',
'emphasise',
'engage',
'engross',
'entire',
'entrenchment',
'evaluate',
'evaluation',
'exclusively',
'expectation',
'expound',
'expression',
'expressions',
'extemporize',
'extensive',
'extensively',
'eyebrows',
'fact',
'facts',
'factual',
'familiar',
'far-reaching',
'fast',
'feel',
'feeling',
'feelings',
'feels',
'felt',
'finally',
'firm',
'firmly',
'fixer',
'floor',
'foretell',
'forsee',
'fortress',
'frankly',
'frequent',
'full',
'full-scale',
'fully',
'fundamental',
'fundamentally',
'funded',
'galvanize',
'gestures',
'giant',
'giants',
'gigantic',
'glean',
'greatly',
'growing',
'halfway',
'halt',
'heavy-duty',
'hefty',
'high',
'high-powered',
'hm',
'hmm',
'huge',
'hypnotize',
'idea',
'ignite',
'imagination',
'imagine',
'immediately',
'immense',
'immensely',
'immensity',
'immensurable',
'immune',
'imperative',
'imperatively',
'implicit',
'imply',
'inarguable',
'inarguably',
'increasing',
'increasingly',
'indication',
'indicative',
'indirect',
'infectious',
'infer',
'inference',
'influence',
'informational',
'inherent',
'inkling',
'inklings',
'innumerable',
'innumerably',
'innumerous',
'insights',
'intend',
'intensive',
'intensively',
'intent',
'intention',
'intentions',
'intents',
'intimate',
'intrigue',
'irregardless',
'judgement',
'judgements',
'judgment',
'judgments',
'key',
'knew',
'knowing',
'knowingly',
'knowledge',
'large',
'large-scale',
'largely',
'lastly',
'learn',
'legacies',
'legacy',
'legalistic',
'likelihood',
'likewise',
'limitless',
'major',
'mantra',
'massive',
'matter',
'mediocre',
'memories',
'mentality',
'metaphorize',
'minor',
'mm',
'motive',
'move',
'mum',
'nap',
'nascent',
'nature',
'needful',
'needfully',
'nonviolent',
'notion',
'nuance',
'nuances',
'obligation',
'obvious',
'ok',
'olympic',
'open-ended',
'opinion',
'opinions',
'orthodoxy',
'outlook',
'outright',
'outspoken',
'overt',
'overtures',
'pacify',
'perceptions',
'persistence',
'perspective',
'philosophize',
'pivotal',
'player',
'plenary',
'point',
'ponder',
'position',
'possibility',
'possibly',
'posture',
'power',
'practically',
'pray',
'predictable',
'predictablely',
'predominant',
'pressure',
'pressures',
'prevalent',
'primarily',
'primary',
'prime',
'proclaim',
'prognosticate',
'prophesy',
'proportionate',
'proportionately',
'prove',
'quick',
'rapid',
'rare',
'rarely',
'react',
'reaction',
'reactions',
'readiness',
'realization',
'recognizable',
'reflecting',
'regard',
'regardlessly',
'reiterate',
'reiterated',
'reiterates',
'relations',
'remark',
'renewable',
'replete',
'reputed',
'reveal',
'revealing',
'revelatory',
'screaming',
'screamingly',
'scrutinize',
'scrutiny',
'seemingly',
'self-examination',
'show',
'signals',
'simply',
'sleepy',
'soliloquize',
'sovereignty',
'specific',
'specifically',
'speculate',
'speculation',
'splayed-finger',
'stance',
'stances',
'stands',
'statements',
'stir',
'strength',
'stronger-than-expected',
'stuffed',
'stupefy',
'suppose',
'supposing',
'surprise',
'surprising',
'surprisingly',
'swing',
'tale',
'tall',
'tantamount',
'taste',
'tendency',
'theoretize',
'thinking',
'thought',
'thusly',
'tint',
'touch',
'touches',
'transparency',
'transparent',
'transport',
'unaudited',
'utterances',
'view',
'viewpoints',
'views',
'vocal',
'whiff',
'yeah',
);
jwhennessey/phpinsight/lib/PHPInsight/dictionaries/source.pos.php 0000644 00000616240 15153553404 0021312 0 ustar 00 <?php
$pos = array(
'%-)',
'(-:',
'(:',
'(^',
'(^-^)',
'(^.^)',
'(^_^)',
'(o:',
'*\\o/*',
'--^--@',
'0:)',
'8)',
':)',
':-)',
':-))',
':-)))',
':-*',
':-d',
':-p',
':-}',
':3',
':9',
':\'de',
':]',
':b)',
':d',
':o)',
':p',
':x',
';^)',
'<3',
'<33',
'<333',
'<3333',
'<33333',
'=)',
'=))',
'=]',
'>:)',
'>:d',
'>=d',
'@}->--',
'^)',
'^_^',
'abidance',
'abide',
'abilities',
'ability',
'abound',
'above-average',
'absolve',
'absolved',
'absolving',
'abundance',
'abundant',
'accede',
'accept',
'accepted',
'accepting',
'acceptable',
'acceptance',
'accessible',
'acclaim',
'acclaimed',
'acclamation',
'accolade',
'accolades',
'accommodating',
'accommodative',
'accomplish',
'accomplished',
'accomplishes',
'accomplishment',
'accomplishments',
'accord',
'accordance',
'accordantly',
'accountable',
'accurate',
'accurately',
'achievable',
'achieve',
'achieved',
'achieves',
'achievement',
'achievements',
'acknowledge',
'acknowledged',
'acknowledgement',
'acquit',
'active',
'acumen',
'adaptability',
'adaptable',
'adaptive',
'adept',
'adeptly',
'adequate',
'adherence',
'adherent',
'adhesion',
'admirable',
'admirably',
'admiration',
'admire',
'admirer',
'admiring',
'admiringly',
'admission',
'admit',
'admittedly',
'adopt',
'adopts',
'adorable',
'adoration',
'adore',
'adored',
'adores',
'adorer',
'adoring',
'adoringly',
'adroit',
'adroitly',
'adulate',
'adulation',
'adulatory',
'advanced',
'advantage',
'advantageous',
'advantages',
'adventure',
'adventures',
'adventurous',
'adventuresome',
'adventurism',
'adventurous',
'advice',
'advisable',
'advocacy',
'advocate',
'affability',
'affable',
'affably',
'affection',
'affectionate',
'affectionateness',
'affinity',
'affirm',
'affirmation',
'affirmative',
'affluence',
'affluent',
'afford',
'affordable',
'aficionados',
'afloat',
'agile',
'agilely',
'agility',
'agree',
'agreed',
'agrees',
'agreeability',
'agreeable',
'agreeableness',
'agreeably',
'agreement',
'airy',
'alive',
'allay',
'alleviate',
'allow',
'allowable',
'allure',
'alluring',
'alluringly',
'ally',
'almighty',
'altruist',
'altruistic',
'altruistically',
'amaze',
'amazed',
'amazes',
'amazement',
'amazing',
'amazingly',
'ambitious',
'ambitiously',
'ameliorate',
'amenable',
'amenity',
'amiability',
'amiabily',
'amiable',
'amicability',
'amicable',
'amicably',
'amity',
'amnesty',
'amorous',
'amour',
'ample',
'amply',
'amuse',
'amused',
'amuses',
'amusement',
'amusements',
'amusing',
'amusingly',
'angel',
'angelic',
'animated',
'apostle',
'apotheosis',
'appeal',
'appealing',
'appease',
'applaud',
'applauded',
'applauding',
'applauds',
'applause',
'appreciable',
'appreciabled',
'appreciation',
'appreciative',
'appreciatively',
'appreciativeness',
'approachable',
'appropriate',
'approval',
'approve',
'apt',
'aptitude',
'aptly',
'ardent',
'ardently',
'ardor',
'aristocratic',
'arousal',
'arouse',
'arousing',
'arresting',
'articulate',
'artistic',
'ascendant',
'ascertainable',
'aspiration',
'aspirations',
'aspire',
'assent',
'assertions',
'assertive',
'asset',
'assiduous',
'assiduously',
'assuage',
'assurance',
'assurances',
'assure',
'assured',
'assuredly',
'astonish',
'astonished',
'astonishing',
'astonishingly',
'astonishment',
'astound',
'astounded',
'astounding',
'astoundingly',
'astute',
'astutely',
'asylum',
'athletic',
'attain',
'attainable',
'attentive',
'attest',
'attraction',
'attractive',
'attractively',
'attune',
'auspicious',
'authentic',
'authoritative',
'autonomous',
'aver',
'avid',
'avidly',
'award',
'awe',
'awed',
'awesome',
'awesomely',
'awesomeness',
'awestruck',
'back',
'backbone',
'balanced',
'bargain',
'basic',
'bask',
'beacon',
'beatify',
'beauteous',
'beautiful',
'beautifully',
'beautify',
'beauty',
'befit',
'befitting',
'befriend',
'believable',
'beloved',
'benefactor',
'beneficent',
'beneficial',
'beneficially',
'beneficiary',
'benefit',
'benefits',
'benevolence',
'benevolent',
'benign',
'best-known',
'best-performing',
'best-selling',
'better-known',
'better-than-expected',
'blameless',
'bless',
'blessed',
'blessing',
'bliss',
'blissful',
'blissfully',
'blithe',
'bloom',
'blossom',
'boast',
'bold',
'boldly',
'boldness',
'bolster',
'bonny',
'bonus',
'boom',
'booming',
'boost',
'boundless',
'bountiful',
'brains',
'brainy',
'brave',
'bravery',
'breakthrough',
'breakthroughs',
'breathlessness',
'breathtaking',
'breathtakingly',
'bright',
'brighten',
'brightness',
'brilliance',
'brilliant',
'brilliantly',
'brisk',
'broad',
'brook',
'brotherly',
'bull',
'bullish',
'buoyant',
'calm',
'calming',
'calmness',
'candid',
'candor',
'capability',
'capable',
'capably',
'capitalize',
'captivate',
'captivating',
'captivation',
'care',
'carefree',
'careful',
'caring',
'casual',
'catalyst',
'catchy',
'celebrate',
'celebrated',
'celebration',
'celebratory',
'celebrity',
'cerebral',
'champ',
'champion',
'charismatic',
'charitable',
'charity',
'charm',
'charming',
'charmingly',
'chaste',
'chatty',
'cheer',
'cheerful',
'cheery',
'cherish',
'cherished',
'cherub',
'chic',
'chivalrous',
'chivalry',
'chum',
'civil',
'civility',
'civilization',
'civilize',
'clarity',
'classic',
'clean',
'cleanliness',
'cleanse',
'clear',
'clear-cut',
'clearer',
'clearheaded',
'clever',
'closeness',
'clout',
'co-operation',
'coax',
'coddle',
'cogent',
'cognizant',
'cohere',
'coherence',
'coherent',
'cohesion',
'cohesive',
'colorful',
'colossal',
'comeback',
'comedic',
'comely',
'comfort',
'comfortable',
'comfortably',
'comforting',
'commend',
'commendable',
'commendably',
'commensurate',
'commitment',
'commodious',
'commonsense',
'commonsensible',
'commonsensibly',
'commonsensical',
'compact',
'companionable',
'compassion',
'compassionate',
'compatible',
'compelling',
'compensate',
'competence',
'competency',
'competent',
'competitiveness',
'complement',
'complex',
'compliant',
'compliment',
'complimentary',
'comprehensive',
'compromise',
'compromises',
'comrades',
'conceivable',
'conciliate',
'conciliatory',
'concise',
'conclusive',
'concrete',
'concur',
'condone',
'conducive',
'confer',
'confidence',
'confident',
'confute',
'congenial',
'congratulate',
'congratulations',
'congratulatory',
'conquer',
'conscience',
'conscientious',
'consensus',
'consent',
'considerate',
'consistent',
'console',
'constancy',
'constant',
'constructive',
'consummate',
'content',
'contentment',
'continuity',
'contribution',
'convenient',
'conveniently',
'conviction',
'convince',
'convincing',
'convincingly',
'convivial',
'convulsive',
'cooperate',
'cooperation',
'cooperative',
'cooperatively',
'cordial',
'cornerstone',
'correct',
'correctly',
'cost-effective',
'cost-saving',
'courage',
'courageous',
'courageously',
'courageousness',
'court',
'courteous',
'courtesy',
'courtly',
'covenant',
'cozy',
'crave',
'craving',
'creative',
'credence',
'credible',
'crisp',
'crusade',
'crusader',
'cure-all',
'curious',
'curiously',
'cute',
'dance',
'dare',
'daring',
'daringly',
'darling',
'dashing',
'dauntless',
'dawn',
'daydream',
'daydreamer',
'dazzle',
'dazzled',
'dazzling',
'deal',
'dear',
'decency',
'decent',
'decisive',
'decisiveness',
'dedicated',
'deep',
'defend',
'defender',
'defense',
'deference',
'defined',
'definite',
'definitive',
'definitively',
'deflationary',
'deft',
'delectable',
'deliberate',
'delicacy',
'delicious',
'delight',
'delighted',
'delightful',
'delightfully',
'delightfulness',
'democratic',
'demystify',
'dependable',
'deserve',
'deserved',
'deservedly',
'deserving',
'desirable',
'desire',
'desirous',
'destine',
'destined',
'destinies',
'destiny',
'determination',
'determined',
'devote',
'devoted',
'devotee',
'devotion',
'devout',
'dexterity',
'dexterous',
'dexterously',
'dextrous',
'dig',
'dignified',
'dignify',
'dignity',
'diligence',
'diligent',
'diligently',
'diplomatic',
'direct',
'disarming',
'discerning',
'discreet',
'discrete',
'discretion',
'discriminating',
'discriminatingly',
'distinct',
'distinction',
'distinctive',
'distinguish',
'distinguished',
'diversified',
'divine',
'divinely',
'dodge',
'dote',
'dotingly',
'doubtless',
'dream',
'dreamland',
'dreams',
'dreamy',
'drive',
'driven',
'durability',
'durable',
'dutiful',
'dynamic',
'eager',
'eagerly',
'eagerness',
'earnest',
'earnestly',
'earnestness',
'ease',
'easier',
'easiest',
'easily',
'easiness',
'easy',
'easygoing',
'ebullience',
'ebullient',
'ebulliently',
'eclectic',
'economical',
'ecstasies',
'ecstasy',
'ecstatic',
'ecstatically',
'edify',
'educable',
'educated',
'educational',
'effective',
'effectiveness',
'effectual',
'efficacious',
'efficiency',
'efficient',
'effortless',
'effortlessly',
'effusion',
'effusive',
'effusively',
'effusiveness',
'egalitarian',
'elan',
'elate',
'elated',
'elatedly',
'elation',
'electrification',
'electrify',
'elegance',
'elegant',
'elegantly',
'elevate',
'elevated',
'eligible',
'elite',
'eloquence',
'eloquent',
'eloquently',
'emancipate',
'embellish',
'embolden',
'embrace',
'eminence',
'eminent',
'empower',
'empowerment',
'enable',
'enchant',
'enchanted',
'enchanting',
'enchantingly',
'encourage',
'encouragement',
'encouraging',
'encouragingly',
'endear',
'endearing',
'endorse',
'endorsement',
'endorser',
'endurable',
'endure',
'enduring',
'energetic',
'energize',
'engaging',
'engrossing',
'enhance',
'enhanced',
'enhancement',
'enjoy',
'enjoyable',
'enjoyably',
'enjoyment',
'enlighten',
'enlightened',
'enlightenment',
'enliven',
'ennoble',
'enrapt',
'enrapture',
'enraptured',
'enrich',
'enrichment',
'ensure',
'enterprising',
'entertain',
'entertaining',
'enthral',
'enthrall',
'enthralled',
'enthuse',
'enthusiasm',
'enthusiast',
'enthusiastic',
'enthusiastically',
'entice',
'enticing',
'enticingly',
'entrance',
'entranced',
'entrancing',
'entreat',
'entreatingly',
'entrust',
'enviable',
'enviably',
'envision',
'envisions',
'epic',
'epitome',
'equality',
'equitable',
'erudite',
'essential',
'established',
'esteem',
'eternity',
'ethical',
'eulogize',
'euphoria',
'euphoric',
'euphorically',
'evenly',
'eventful',
'everlasting',
'evident',
'evidently',
'evocative',
'exact',
'exalt',
'exaltation',
'exalted',
'exaltedly',
'exalting',
'exaltingly',
'exceed',
'exceeding',
'exceedingly',
'excel',
'excellence',
'excellency',
'excellent',
'excellently',
'exceptional',
'exceptionally',
'excite',
'excited',
'excitedly',
'excitedness',
'excitement',
'exciting',
'excitingly',
'exclusive',
'excusable',
'excuse',
'exemplar',
'exemplary',
'exhaustive',
'exhaustively',
'exhilarate',
'exhilarating',
'exhilaratingly',
'exhilaration',
'exonerate',
'expansive',
'experienced',
'expert',
'expertly',
'explicit',
'explicitly',
'expressive',
'exquisite',
'exquisitely',
'extol',
'extoll',
'extraordinarily',
'extraordinary',
'exuberance',
'exuberant',
'exuberantly',
'exult',
'exultant',
'exultation',
'exultingly',
'fabulous',
'fabulously',
'facilitate',
'fair',
'fairly',
'fairness',
'faith',
'faithful',
'faithfully',
'faithfulness',
'fame',
'famed',
'famous',
'famously',
'fancy',
'fanfare',
'fantastic',
'fantastically',
'fantasy',
'farsighted',
'fascinate',
'fascinating',
'fascinatingly',
'fascination',
'fashionable',
'fashionably',
'fast-growing',
'fast-paced',
'fastest-growing',
'fathom',
'favor',
'favorable',
'favored',
'favorite',
'favour',
'fearless',
'fearlessly',
'feasible',
'feasibly',
'feat',
'featly',
'feisty',
'felicitate',
'felicitous',
'felicity',
'fertile',
'fervent',
'fervently',
'fervid',
'fervidly',
'fervor',
'festive',
'fidelity',
'fiery',
'fine',
'finely',
'first-class',
'first-rate',
'fit',
'fitting',
'flair',
'flame',
'flatter',
'flattering',
'flatteringly',
'flawless',
'flawlessly',
'flexible',
'flourish',
'flourishing',
'fluent',
'focused',
'fond',
'fondly',
'fondness',
'foolproof',
'forbearing',
'foremost',
'foresight',
'forgave',
'forgive',
'forgiven',
'forgiveness',
'forgiving',
'forgivingly',
'forthright',
'fortitude',
'fortuitous',
'fortuitously',
'fortunate',
'fortunately',
'fortune',
'fragrant',
'frank',
'free',
'freedom',
'freedoms',
'fresh',
'friend',
'friendliness',
'friendly',
'friends',
'friendship',
'frolic',
'fruitful',
'fulfillment',
'full-fledged',
'fun',
'functional',
'funny',
'gaiety',
'gaily',
'gain',
'gainful',
'gainfully',
'gallant',
'gallantly',
'galore',
'gem',
'gems',
'generosity',
'generous',
'generously',
'genial',
'genius',
'genteel',
'gentle',
'genuine',
'germane',
'giddy',
'gifted',
'glad',
'gladden',
'gladly',
'gladness',
'glamorous',
'glee',
'gleeful',
'gleefully',
'glimmer',
'glimmering',
'glisten',
'glistening',
'glitter',
'glorify',
'glorious',
'gloriously',
'glory',
'glossy',
'glow',
'glowing',
'glowingly',
'go-ahead',
'god-given',
'godlike',
'godly',
'gold',
'golden',
'good',
'good',
'goodhearted',
'goodly',
'goodness',
'goodwill',
'gorgeous',
'gorgeously',
'grace',
'graceful',
'gracefully',
'gracious',
'graciously',
'graciousness',
'grail',
'grand',
'grandeur',
'grateful',
'gratefully',
'gratification',
'gratify',
'gratifying',
'gratifyingly',
'gratitude',
'great',
'greatest',
'greatness',
'greet',
'gregarious',
'grin',
'grit',
'groove',
'groundbreaking',
'grounded',
'guarantee',
'guardian',
'guidance',
'guiltless',
'gumption',
'gush',
'gusto',
'gutsy',
'hail',
'halcyon',
'hale',
'hallowed',
'handily',
'handsome',
'handy',
'hanker',
'happily',
'happiness',
'happy',
'hard-working',
'hardier',
'hardy',
'harmless',
'harmonious',
'harmoniously',
'harmonize',
'harmony',
'haven',
'headway',
'heady',
'heal',
'healthful',
'healthy',
'heart',
'hearten',
'heartening',
'heartfelt',
'heartily',
'heartwarming',
'heaven',
'heavenly',
'heedful',
'helpful',
'herald',
'hero',
'heroic',
'heroically',
'heroine',
'heroize',
'heros',
'high-quality',
'highlight',
'hilarious',
'hilariously',
'hilariousness',
'hilarity',
'historic',
'holy',
'homage',
'honest',
'honestly',
'honesty',
'honeymoon',
'honor',
'honorable',
'hope',
'hopeful',
'hopefulness',
'hopes',
'hospitable',
'hot',
'hug',
'humane',
'humanists',
'humanity',
'humankind',
'humble',
'humility',
'humor',
'humorous',
'humorously',
'humour',
'humourous',
'ideal',
'idealism',
'idealist',
'idealize',
'ideally',
'idol',
'idolize',
'idolized',
'idyllic',
'illuminate',
'illuminati',
'illuminating',
'illumine',
'illustrious',
'imaginative',
'immaculate',
'immaculately',
'impartial',
'impartiality',
'impartially',
'impassioned',
'impeccable',
'impeccably',
'impel',
'imperial',
'imperturbable',
'impervious',
'impetus',
'importance',
'important',
'importantly',
'impregnable',
'impress',
'impression',
'impressions',
'impressive',
'impressively',
'impressiveness',
'improve',
'improved',
'improvement',
'improving',
'improvise',
'inalienable',
'incisive',
'incisively',
'incisiveness',
'inclination',
'inclinations',
'inclined',
'inclusive',
'incontestable',
'incontrovertible',
'incorruptible',
'incredible',
'incredibly',
'indebted',
'indefatigable',
'indelible',
'indelibly',
'independence',
'independent',
'indescribable',
'indescribably',
'indestructible',
'indispensability',
'indispensable',
'indisputable',
'individuality',
'indomitable',
'indomitably',
'indubitable',
'indubitably',
'indulgence',
'indulgent',
'industrious',
'inestimable',
'inestimably',
'inexpensive',
'infallibility',
'infallible',
'infallibly',
'influential',
'informative',
'ingenious',
'ingeniously',
'ingenuity',
'ingenuous',
'ingenuously',
'ingratiate',
'ingratiating',
'ingratiatingly',
'innocence',
'innocent',
'innocently',
'innocuous',
'innovation',
'innovative',
'inoffensive',
'inquisitive',
'insight',
'insightful',
'insightfully',
'insist',
'insistence',
'insistent',
'insistently',
'inspiration',
'inspirational',
'inspire',
'inspired',
'inspiring',
'instructive',
'instrumental',
'intact',
'integral',
'integrity',
'intelligence',
'intelligent',
'intelligible',
'intercede',
'interest',
'interested',
'interesting',
'interests',
'intimacy',
'intimate',
'intricate',
'intrigue',
'intriguing',
'intriguingly',
'intuitive',
'invaluable',
'invaluablely',
'inventive',
'invigorate',
'invigorating',
'invincibility',
'invincible',
'inviolable',
'inviolate',
'invulnerable',
'irrefutable',
'irrefutably',
'irreproachable',
'irresistible',
'irresistibly',
'jauntily',
'jaunty',
'jest',
'joke',
'jollify',
'jolly',
'jovial',
'joy',
'joyful',
'joyfully',
'joyous',
'joyously',
'jubilant',
'jubilantly',
'jubilate',
'jubilation',
'judicious',
'just',
'justice',
'justifiable',
'justifiably',
'justification',
'justify',
'justly',
'keen',
'keenly',
'keenness',
'kemp',
'kid',
'kind',
'kindliness',
'kindly',
'kindness',
'kingmaker',
'kiss',
'kissable',
'knowledgeable',
'large',
'lark',
'laud',
'laudable',
'laudably',
'lavish',
'lavishly',
'law-abiding',
'lawful',
'lawfully',
'leading',
'lean',
'learned',
'learning',
'legendary',
'legitimacy',
'legitimate',
'legitimately',
'lenient',
'leniently',
'less-expensive',
'leverage',
'levity',
'liberal',
'liberalism',
'liberally',
'liberate',
'liberation',
'liberty',
'lifeblood',
'lifelong',
'light',
'light-hearted',
'lighten',
'likable',
'like',
'likeable',
'liking',
'lionhearted',
'literate',
'live',
'lively',
'lofty',
'logical',
'looking',
'lovable',
'lovably',
'love',
'lovee',
'loveliness',
'lovely',
'lover',
'low-cost',
'low-risk',
'lower-priced',
'loyal',
'loyalty',
'lucid',
'lucidly',
'luck',
'luckier',
'luckiest',
'luckily',
'luckiness',
'lucky',
'lucrative',
'luminous',
'lush',
'luster',
'lustrous',
'luxuriant',
'luxuriate',
'luxurious',
'luxuriously',
'luxury',
'lyrical',
'magic',
'magical',
'magnanimous',
'magnanimously',
'magnetic',
'magnificence',
'magnificent',
'magnificently',
'magnify',
'majestic',
'majesty',
'manageable',
'manifest',
'manly',
'mannered',
'mannerly',
'marvel',
'marvellous',
'marvelous',
'marvelously',
'marvelousness',
'marvels',
'master',
'masterful',
'masterfully',
'masterly',
'masterpiece',
'masterpieces',
'masters',
'mastery',
'matchless',
'mature',
'maturely',
'maturity',
'maximize',
'meaningful',
'meek',
'mellow',
'memorable',
'memorialize',
'mend',
'mentor',
'merciful',
'mercifully',
'mercy',
'merit',
'meritorious',
'merrily',
'merriment',
'merriness',
'merry',
'mesmerize',
'mesmerizing',
'mesmerizingly',
'meticulous',
'meticulously',
'mightily',
'mighty',
'mild',
'mindful',
'minister',
'miracle',
'miracles',
'miraculous',
'miraculously',
'miraculousness',
'mirth',
'moderate',
'moderation',
'modern',
'modest',
'modesty',
'mollify',
'momentous',
'monumental',
'monumentally',
'moral',
'morality',
'moralize',
'motivate',
'motivated',
'motivation',
'moving',
'myriad',
'natural',
'naturally',
'navigable',
'neat',
'neatly',
'necessarily',
'neighborly',
'neutralize',
'nice',
'nice',
'nicely',
'nifty',
'nimble',
'nobly',
'non-violence',
'non-violent',
'normal',
'notabandon',
'notabandoned',
'notabandonment',
'notabase',
'notabasement',
'notabash',
'notabate',
'notabdicate',
'notaberration',
'notabhor',
'notabhorred',
'notabhorrence',
'notabhorrent',
'notabhorrently',
'notabhors',
'notabject',
'notabjectly',
'notabjure',
'notable',
'notably',
'notabnormal',
'notabolish',
'notabominable',
'notabominably',
'notabominate',
'notabomination',
'notabrade',
'notabrasive',
'notabrupt',
'notabscond',
'notabsence',
'notabsent-minded',
'notabsentee',
'notabsurd',
'notabsurdity',
'notabsurdly',
'notabsurdness',
'notabuse',
'notabused',
'notabuses',
'notabusive',
'notabysmal',
'notabysmally',
'notabyss',
'notaccidental',
'notaccost',
'notaccursed',
'notaccusation',
'notaccusations',
'notaccuse',
'notaccused',
'notaccuses',
'notaccusing',
'notaccusingly',
'notacerbate',
'notacerbic',
'notacerbically',
'notache',
'notacrid',
'notacridly',
'notacridness',
'notacrimonious',
'notacrimoniously',
'notacrimony',
'notadamant',
'notadamantly',
'notaddict',
'notaddicted',
'notaddiction',
'notadmonish',
'notadmonisher',
'notadmonishingly',
'notadmonishment',
'notadmonition',
'notadrift',
'notadulterate',
'notadulterated',
'notadulteration',
'notadversarial',
'notadversary',
'notadverse',
'notadversity',
'notaffectation',
'notafflict',
'notaffliction',
'notafflictive',
'notaffront',
'notafraid',
'notaggravate',
'notaggravated',
'notaggravating',
'notaggravation',
'notaggression',
'notaggressive',
'notaggressiveness',
'notaggressor',
'notaggrieve',
'notaggrieved',
'notaghast',
'notagitate',
'notagitated',
'notagitation',
'notagitator',
'notagonies',
'notagonize',
'notagonizing',
'notagonizingly',
'notagony',
'notail',
'notailment',
'notaimless',
'notairs',
'notalarm',
'notalarmed',
'notalarming',
'notalarmingly',
'notalas',
'notalienate',
'notalienated',
'notalienation',
'notallegation',
'notallegations',
'notallege',
'notallergic',
'notalone',
'notaloof',
'notaltercation',
'notambiguity',
'notambiguous',
'notambivalence',
'notambivalent',
'notambush',
'notamiss',
'notamputate',
'notanarchism',
'notanarchist',
'notanarchistic',
'notanarchy',
'notanemic',
'notanger',
'notangrily',
'notangriness',
'notangry',
'notanguish',
'notanimosity',
'notannihilate',
'notannihilation',
'notannoy',
'notannoyance',
'notannoyed',
'notannoying',
'notannoyingly',
'notanomalous',
'notanomaly',
'notantagonism',
'notantagonist',
'notantagonistic',
'notantagonize',
'notanti-',
'notanti-american',
'notanti-israeli',
'notanti-occupation',
'notanti-proliferation',
'notanti-semites',
'notanti-social',
'notanti-us',
'notanti-white',
'notantipathy',
'notantiquated',
'notantithetical',
'notanxieties',
'notanxiety',
'notanxious',
'notanxiously',
'notanxiousness',
'notapathetic',
'notapathetically',
'notapathy',
'notape',
'notapocalypse',
'notapocalyptic',
'notapologist',
'notapologists',
'notappal',
'notappall',
'notappalled',
'notappalling',
'notappallingly',
'notapprehension',
'notapprehensions',
'notapprehensive',
'notapprehensively',
'notarbitrary',
'notarcane',
'notarchaic',
'notarduous',
'notarduously',
'notargue',
'notargument',
'notargumentative',
'notarguments',
'notarrogance',
'notarrogant',
'notarrogantly',
'notartificial',
'notashamed',
'notasinine',
'notasininely',
'notasinininity',
'notaskance',
'notasperse',
'notaspersion',
'notaspersions',
'notassail',
'notassassin',
'notassassinate',
'notassault',
'notassaulted',
'notastray',
'notasunder',
'notatrocious',
'notatrocities',
'notatrocity',
'notatrophy',
'notattack',
'notattacked',
'notaudacious',
'notaudaciously',
'notaudaciousness',
'notaudacity',
'notaustere',
'notauthoritarian',
'notautocrat',
'notautocratic',
'notavalanche',
'notavarice',
'notavaricious',
'notavariciously',
'notavenge',
'notaverse',
'notaversion',
'notavoid',
'notavoidance',
'notavoided',
'notawful',
'notawfulness',
'notawkward',
'notawkwardness',
'notax',
'notbabble',
'notbackbite',
'notbackbiting',
'notbackward',
'notbackwardness',
'notbad',
'notbadgered',
'notbadly',
'notbaffle',
'notbaffled',
'notbafflement',
'notbaffling',
'notbait',
'notbalk',
'notbanal',
'notbanalize',
'notbane',
'notbanish',
'notbanishment',
'notbankrupt',
'notbanned',
'notbar',
'notbarbarian',
'notbarbaric',
'notbarbarically',
'notbarbarity',
'notbarbarous',
'notbarbarously',
'notbarely',
'notbarren',
'notbaseless',
'notbashful',
'notbastard',
'notbattered',
'notbattering',
'notbattle',
'notbattle-lines',
'notbattlefield',
'notbattleground',
'notbatty',
'notbearish',
'notbeast',
'notbeastly',
'notbeat',
'notbeaten',
'notbedlam',
'notbedlamite',
'notbefoul',
'notbeg',
'notbeggar',
'notbeggarly',
'notbegging',
'notbeguile',
'notbelabor',
'notbelated',
'notbeleaguer',
'notbelie',
'notbelittle',
'notbelittled',
'notbelittling',
'notbellicose',
'notbelligerence',
'notbelligerent',
'notbelligerently',
'notbemoan',
'notbemoaning',
'notbemused',
'notbent',
'notberate',
'notberated',
'notbereave',
'notbereavement',
'notbereft',
'notberserk',
'notbeseech',
'notbeset',
'notbesiege',
'notbesmirch',
'notbestial',
'notbetray',
'notbetrayal',
'notbetrayals',
'notbetrayed',
'notbetrayer',
'notbewail',
'notbeware',
'notbewilder',
'notbewildered',
'notbewildering',
'notbewilderingly',
'notbewilderment',
'notbewitch',
'notbias',
'notbiased',
'notbiases',
'notbicker',
'notbickering',
'notbid-rigging',
'notbitch',
'notbitchy',
'notbiting',
'notbitingly',
'notbitter',
'notbitterly',
'notbitterness',
'notbizarre',
'notbizzare',
'notblab',
'notblabber',
'notblack',
'notblacklisted',
'notblackmail',
'notblackmailed',
'notblah',
'notblame',
'notblamed',
'notblameworthy',
'notbland',
'notblandish',
'notblaspheme',
'notblasphemous',
'notblasphemy',
'notblast',
'notblasted',
'notblatant',
'notblatantly',
'notblather',
'notbleak',
'notbleakly',
'notbleakness',
'notbleed',
'notblemish',
'notblind',
'notblinding',
'notblindingly',
'notblindness',
'notblindside',
'notblister',
'notblistering',
'notbloated',
'notblock',
'notblockhead',
'notblood',
'notbloodshed',
'notbloodthirsty',
'notbloody',
'notblow',
'notblunder',
'notblundering',
'notblunders',
'notblunt',
'notblur',
'notblurt',
'notboast',
'notboastful',
'notboggle',
'notbogus',
'notboil',
'notboiling',
'notboisterous',
'notbomb',
'notbombard',
'notbombardment',
'notbombastic',
'notbondage',
'notbonkers',
'notbore',
'notbored',
'notboredom',
'notboring',
'notbotch',
'notbother',
'notbothered',
'notbothersome',
'notbounded',
'notbowdlerize',
'notboycott',
'notbrag',
'notbraggart',
'notbragger',
'notbrainwash',
'notbrash',
'notbrashly',
'notbrashness',
'notbrat',
'notbravado',
'notbrazen',
'notbrazenly',
'notbrazenness',
'notbreach',
'notbreak',
'notbreak-point',
'notbreakdown',
'notbrimstone',
'notbristle',
'notbrittle',
'notbroke',
'notbroken',
'notbroken-hearted',
'notbrood',
'notbrowbeat',
'notbruise',
'notbruised',
'notbrusque',
'notbrutal',
'notbrutalising',
'notbrutalities',
'notbrutality',
'notbrutalize',
'notbrutalizing',
'notbrutally',
'notbrute',
'notbrutish',
'notbuckle',
'notbug',
'notbugged',
'notbulky',
'notbullied',
'notbullies',
'notbully',
'notbullyingly',
'notbum',
'notbummed',
'notbumpy',
'notbungle',
'notbungler',
'notbunk',
'notburden',
'notburdened',
'notburdensome',
'notburdensomely',
'notburn',
'notburned',
'notbusy',
'notbusybody',
'notbutcher',
'notbutchery',
'notbyzantine',
'notcackle',
'notcaged',
'notcajole',
'notcalamities',
'notcalamitous',
'notcalamitously',
'notcalamity',
'notcallous',
'notcalumniate',
'notcalumniation',
'notcalumnies',
'notcalumnious',
'notcalumniously',
'notcalumny',
'notcancer',
'notcancerous',
'notcannibal',
'notcannibalize',
'notcapitulate',
'notcapricious',
'notcapriciously',
'notcapriciousness',
'notcapsize',
'notcaptive',
'notcareless',
'notcarelessness',
'notcaricature',
'notcarnage',
'notcarp',
'notcartoon',
'notcartoonish',
'notcash-strapped',
'notcastigate',
'notcasualty',
'notcataclysm',
'notcataclysmal',
'notcataclysmic',
'notcataclysmically',
'notcatastrophe',
'notcatastrophes',
'notcatastrophic',
'notcatastrophically',
'notcaustic',
'notcaustically',
'notcautionary',
'notcautious',
'notcave',
'notcensure',
'notchafe',
'notchaff',
'notchagrin',
'notchallenge',
'notchallenging',
'notchaos',
'notchaotic',
'notcharisma',
'notchased',
'notchasten',
'notchastise',
'notchastisement',
'notchatter',
'notchatterbox',
'notcheap',
'notcheapen',
'notcheat',
'notcheated',
'notcheater',
'notcheerless',
'notchicken',
'notchide',
'notchildish',
'notchill',
'notchilly',
'notchit',
'notchoke',
'notchoppy',
'notchore',
'notchronic',
'notclamor',
'notclamorous',
'notclash',
'notclaustrophobic',
'notcliche',
'notcliched',
'notclingy',
'notclique',
'notclog',
'notclose',
'notclosed',
'notcloud',
'notclueless',
'notclumsy',
'notcoarse',
'notcoaxed',
'notcocky',
'notcodependent',
'notcoerce',
'notcoerced',
'notcoercion',
'notcoercive',
'notcold',
'notcoldly',
'notcollapse',
'notcollide',
'notcollude',
'notcollusion',
'notcombative',
'notcomedy',
'notcomical',
'notcommanded',
'notcommiserate',
'notcommonplace',
'notcommotion',
'notcompared',
'notcompel',
'notcompetitive',
'notcomplacent',
'notcomplain',
'notcomplaining',
'notcomplaint',
'notcomplaints',
'notcomplicate',
'notcomplicated',
'notcomplication',
'notcomplicit',
'notcompulsion',
'notcompulsive',
'notcompulsory',
'notconcede',
'notconceit',
'notconceited',
'notconcern',
'notconcerned',
'notconcerns',
'notconcession',
'notconcessions',
'notcondemn',
'notcondemnable',
'notcondemnation',
'notcondescend',
'notcondescending',
'notcondescendingly',
'notcondescension',
'notcondolence',
'notcondolences',
'notconfess',
'notconfession',
'notconfessions',
'notconfined',
'notconflict',
'notconflicted',
'notconfound',
'notconfounded',
'notconfounding',
'notconfront',
'notconfrontation',
'notconfrontational',
'notconfronted',
'notconfuse',
'notconfused',
'notconfusing',
'notconfusion',
'notcongested',
'notcongestion',
'notconned',
'notconspicuous',
'notconspicuously',
'notconspiracies',
'notconspiracy',
'notconspirator',
'notconspiratorial',
'notconspire',
'notconsternation',
'notconstrain',
'notconstraint',
'notconsume',
'notconsumed',
'notcontagious',
'notcontaminate',
'notcontamination',
'notcontemplative',
'notcontempt',
'notcontemptible',
'notcontemptuous',
'notcontemptuously',
'notcontend',
'notcontention',
'notcontentious',
'notcontort',
'notcontortions',
'notcontradict',
'notcontradiction',
'notcontradictory',
'notcontrariness',
'notcontrary',
'notcontravene',
'notcontrive',
'notcontrived',
'notcontrolled',
'notcontroversial',
'notcontroversy',
'notconvicted',
'notconvoluted',
'notcoping',
'notcornered',
'notcorralled',
'notcorrode',
'notcorrosion',
'notcorrosive',
'notcorrupt',
'notcorruption',
'notcostly',
'notcounterproductive',
'notcoupists',
'notcovetous',
'notcovetously',
'notcow',
'notcoward',
'notcowardly',
'notcrabby',
'notcrackdown',
'notcrafty',
'notcramped',
'notcranky',
'notcrap',
'notcrappy',
'notcrass',
'notcraven',
'notcravenly',
'notcraze',
'notcrazily',
'notcraziness',
'notcrazy',
'notcredulous',
'notcreepy',
'notcrime',
'notcriminal',
'notcringe',
'notcripple',
'notcrippling',
'notcrisis',
'notcritic',
'notcritical',
'notcriticism',
'notcriticisms',
'notcriticize',
'notcriticized',
'notcritics',
'notcrook',
'notcrooked',
'notcross',
'notcrowded',
'notcruddy',
'notcrude',
'notcruel',
'notcruelties',
'notcruelty',
'notcrumble',
'notcrummy',
'notcrumple',
'notcrush',
'notcrushed',
'notcrushing',
'notcry',
'notculpable',
'notcumbersome',
'notcuplrit',
'notcurse',
'notcursed',
'notcurses',
'notcursory',
'notcurt',
'notcuss',
'notcut',
'notcutthroat',
'notcynical',
'notcynicism',
'notdamage',
'notdamaged',
'notdamaging',
'notdamn',
'notdamnable',
'notdamnably',
'notdamnation',
'notdamned',
'notdamning',
'notdanger',
'notdangerous',
'notdangerousness',
'notdangle',
'notdark',
'notdarken',
'notdarkness',
'notdarn',
'notdash',
'notdastard',
'notdastardly',
'notdaunt',
'notdaunting',
'notdauntingly',
'notdawdle',
'notdaze',
'notdazed',
'notdead',
'notdeadbeat',
'notdeadlock',
'notdeadly',
'notdeadweight',
'notdeaf',
'notdearth',
'notdeath',
'notdebacle',
'notdebase',
'notdebasement',
'notdebaser',
'notdebatable',
'notdebate',
'notdebauch',
'notdebaucher',
'notdebauchery',
'notdebilitate',
'notdebilitating',
'notdebility',
'notdecadence',
'notdecadent',
'notdecay',
'notdecayed',
'notdeceit',
'notdeceitful',
'notdeceitfully',
'notdeceitfulness',
'notdeceive',
'notdeceived',
'notdeceiver',
'notdeceivers',
'notdeceiving',
'notdeception',
'notdeceptive',
'notdeceptively',
'notdeclaim',
'notdecline',
'notdeclining',
'notdecrease',
'notdecreasing',
'notdecrement',
'notdecrepit',
'notdecrepitude',
'notdecry',
'notdeep',
'notdeepening',
'notdefamation',
'notdefamations',
'notdefamatory',
'notdefame',
'notdefamed',
'notdefeat',
'notdefeated',
'notdefect',
'notdefective',
'notdefenseless',
'notdefensive',
'notdefiance',
'notdefiant',
'notdefiantly',
'notdeficiency',
'notdeficient',
'notdefile',
'notdefiler',
'notdeflated',
'notdeform',
'notdeformed',
'notdefrauding',
'notdefunct',
'notdefy',
'notdegenerate',
'notdegenerately',
'notdegeneration',
'notdegradation',
'notdegrade',
'notdegraded',
'notdegrading',
'notdegradingly',
'notdehumanization',
'notdehumanize',
'notdehumanized',
'notdeign',
'notdeject',
'notdejected',
'notdejectedly',
'notdejection',
'notdelicate',
'notdelinquency',
'notdelinquent',
'notdelirious',
'notdelirium',
'notdelude',
'notdeluded',
'notdeluge',
'notdelusion',
'notdelusional',
'notdelusions',
'notdemand',
'notdemanding',
'notdemands',
'notdemean',
'notdemeaned',
'notdemeaning',
'notdemented',
'notdemise',
'notdemolish',
'notdemolisher',
'notdemon',
'notdemonic',
'notdemonize',
'notdemoralize',
'notdemoralized',
'notdemoralizing',
'notdemoralizingly',
'notdemotivated',
'notdenial',
'notdenigrate',
'notdenounce',
'notdenunciate',
'notdenunciation',
'notdenunciations',
'notdeny',
'notdependent',
'notdeplete',
'notdepleted',
'notdeplorable',
'notdeplorably',
'notdeplore',
'notdeploring',
'notdeploringly',
'notdeprave',
'notdepraved',
'notdepravedly',
'notdeprecate',
'notdepress',
'notdepressed',
'notdepressing',
'notdepressingly',
'notdepression',
'notdeprive',
'notdeprived',
'notderide',
'notderision',
'notderisive',
'notderisively',
'notderisiveness',
'notderogatory',
'notdesecrate',
'notdesert',
'notdeserted',
'notdesertion',
'notdesiccate',
'notdesiccated',
'notdesolate',
'notdesolately',
'notdesolation',
'notdespair',
'notdespairing',
'notdespairingly',
'notdesperate',
'notdesperately',
'notdesperation',
'notdespicable',
'notdespicably',
'notdespise',
'notdespised',
'notdespoil',
'notdespoiler',
'notdespondence',
'notdespondency',
'notdespondent',
'notdespondently',
'notdespot',
'notdespotic',
'notdespotism',
'notdestabilisation',
'notdestitute',
'notdestitution',
'notdestroy',
'notdestroyed',
'notdestroyer',
'notdestruction',
'notdestructive',
'notdesultory',
'notdetached',
'notdeter',
'notdeteriorate',
'notdeteriorating',
'notdeterioration',
'notdeterrent',
'notdetest',
'notdetestable',
'notdetestably',
'notdetested',
'notdetract',
'notdetraction',
'notdetriment',
'notdetrimental',
'notdevalued',
'notdevastate',
'notdevastated',
'notdevastating',
'notdevastatingly',
'notdevastation',
'notdeviant',
'notdeviate',
'notdeviation',
'notdevil',
'notdevilish',
'notdevilishly',
'notdevilment',
'notdevilry',
'notdevious',
'notdeviously',
'notdeviousness',
'notdevoid',
'notdiabolic',
'notdiabolical',
'notdiabolically',
'notdiagnosed',
'notdiametrically',
'notdiatribe',
'notdiatribes',
'notdictator',
'notdictatorial',
'notdiffer',
'notdifferent',
'notdifficult',
'notdifficulties',
'notdifficulty',
'notdiffidence',
'notdig',
'notdigress',
'notdilapidated',
'notdilemma',
'notdilly-dally',
'notdim',
'notdiminish',
'notdiminishing',
'notdin',
'notdinky',
'notdire',
'notdirectionless',
'notdirely',
'notdireness',
'notdirt',
'notdirty',
'notdisable',
'notdisabled',
'notdisaccord',
'notdisadvantage',
'notdisadvantaged',
'notdisadvantageous',
'notdisaffect',
'notdisaffected',
'notdisaffirm',
'notdisagree',
'notdisagreeable',
'notdisagreeably',
'notdisagreement',
'notdisallow',
'notdisappoint',
'notdisappointed',
'notdisappointing',
'notdisappointingly',
'notdisappointment',
'notdisapprobation',
'notdisapproval',
'notdisapprove',
'notdisapproving',
'notdisarm',
'notdisarray',
'notdisaster',
'notdisastrous',
'notdisastrously',
'notdisavow',
'notdisavowal',
'notdisbelief',
'notdisbelieve',
'notdisbelieved',
'notdisbeliever',
'notdiscardable',
'notdiscarded',
'notdisclaim',
'notdiscombobulate',
'notdiscomfit',
'notdiscomfititure',
'notdiscomfort',
'notdiscompose',
'notdisconcert',
'notdisconcerted',
'notdisconcerting',
'notdisconcertingly',
'notdisconnected',
'notdisconsolate',
'notdisconsolately',
'notdisconsolation',
'notdiscontent',
'notdiscontented',
'notdiscontentedly',
'notdiscontinuity',
'notdiscord',
'notdiscordance',
'notdiscordant',
'notdiscountenance',
'notdiscourage',
'notdiscouraged',
'notdiscouragement',
'notdiscouraging',
'notdiscouragingly',
'notdiscourteous',
'notdiscourteously',
'notdiscredit',
'notdiscrepant',
'notdiscriminate',
'notdiscriminated',
'notdiscrimination',
'notdiscriminatory',
'notdisdain',
'notdisdainful',
'notdisdainfully',
'notdisease',
'notdiseased',
'notdisempowered',
'notdisenchanted',
'notdisfavor',
'notdisgrace',
'notdisgraced',
'notdisgraceful',
'notdisgracefully',
'notdisgruntle',
'notdisgruntled',
'notdisgust',
'notdisgusted',
'notdisgustedly',
'notdisgustful',
'notdisgustfully',
'notdisgusting',
'notdisgustingly',
'notdishearten',
'notdisheartened',
'notdisheartening',
'notdishearteningly',
'notdishonest',
'notdishonestly',
'notdishonesty',
'notdishonor',
'notdishonorable',
'notdishonorablely',
'notdisillusion',
'notdisillusioned',
'notdisinclination',
'notdisinclined',
'notdisingenuous',
'notdisingenuously',
'notdisintegrate',
'notdisintegration',
'notdisinterest',
'notdisinterested',
'notdislike',
'notdisliked',
'notdislocated',
'notdisloyal',
'notdisloyalty',
'notdismal',
'notdismally',
'notdismalness',
'notdismay',
'notdismayed',
'notdismaying',
'notdismayingly',
'notdismissive',
'notdismissively',
'notdisobedience',
'notdisobedient',
'notdisobey',
'notdisorder',
'notdisordered',
'notdisorderly',
'notdisorganized',
'notdisorient',
'notdisoriented',
'notdisown',
'notdisowned',
'notdisparage',
'notdisparaging',
'notdisparagingly',
'notdispensable',
'notdispirit',
'notdispirited',
'notdispiritedly',
'notdispiriting',
'notdisplace',
'notdisplaced',
'notdisplease',
'notdispleased',
'notdispleasing',
'notdispleasure',
'notdisposable',
'notdisproportionate',
'notdisprove',
'notdisputable',
'notdispute',
'notdisputed',
'notdisquiet',
'notdisquieting',
'notdisquietingly',
'notdisquietude',
'notdisregard',
'notdisregarded',
'notdisregardful',
'notdisreputable',
'notdisrepute',
'notdisrespect',
'notdisrespectable',
'notdisrespectablity',
'notdisrespected',
'notdisrespectful',
'notdisrespectfully',
'notdisrespectfulness',
'notdisrespecting',
'notdisrupt',
'notdisruption',
'notdisruptive',
'notdissatisfaction',
'notdissatisfactory',
'notdissatisfied',
'notdissatisfy',
'notdissatisfying',
'notdissemble',
'notdissembler',
'notdissension',
'notdissent',
'notdissenter',
'notdissention',
'notdisservice',
'notdissidence',
'notdissident',
'notdissidents',
'notdissocial',
'notdissolute',
'notdissolution',
'notdissonance',
'notdissonant',
'notdissonantly',
'notdissuade',
'notdissuasive',
'notdistant',
'notdistaste',
'notdistasteful',
'notdistastefully',
'notdistort',
'notdistortion',
'notdistract',
'notdistracted',
'notdistracting',
'notdistraction',
'notdistraught',
'notdistraughtly',
'notdistraughtness',
'notdistress',
'notdistressed',
'notdistressing',
'notdistressingly',
'notdistrust',
'notdistrustful',
'notdistrusting',
'notdisturb',
'notdisturbed',
'notdisturbed-let',
'notdisturbing',
'notdisturbingly',
'notdisunity',
'notdisvalue',
'notdivergent',
'notdivide',
'notdivided',
'notdivision',
'notdivisive',
'notdivisively',
'notdivisiveness',
'notdivorce',
'notdivorced',
'notdizzing',
'notdizzingly',
'notdizzy',
'notdoddering',
'notdodgey',
'notdogged',
'notdoggedly',
'notdogmatic',
'notdoldrums',
'notdominance',
'notdominate',
'notdominated',
'notdomination',
'notdomineer',
'notdomineering',
'notdoom',
'notdoomed',
'notdoomsday',
'notdope',
'notdoubt',
'notdoubted',
'notdoubtful',
'notdoubtfully',
'notdoubts',
'notdown',
'notdownbeat',
'notdowncast',
'notdowner',
'notdownfall',
'notdownfallen',
'notdowngrade',
'notdownhearted',
'notdownheartedly',
'notdownside',
'notdowntrodden',
'notdrab',
'notdraconian',
'notdraconic',
'notdragon',
'notdragons',
'notdragoon',
'notdrain',
'notdrained',
'notdrama',
'notdramatic',
'notdrastic',
'notdrastically',
'notdread',
'notdreadful',
'notdreadfully',
'notdreadfulness',
'notdreary',
'notdrones',
'notdroop',
'notdropped',
'notdrought',
'notdrowning',
'notdrunk',
'notdrunkard',
'notdrunken',
'notdry',
'notdubious',
'notdubiously',
'notdubitable',
'notdud',
'notdull',
'notdullard',
'notdumb',
'notdumbfound',
'notdumbfounded',
'notdummy',
'notdump',
'notdumped',
'notdunce',
'notdungeon',
'notdungeons',
'notdupe',
'notduped',
'notdusty',
'notdwindle',
'notdwindling',
'notdying',
'notearsplitting',
'noteccentric',
'noteccentricity',
'notedgy',
'noteffigy',
'noteffrontery',
'notego',
'notegocentric',
'notegomania',
'notegotism',
'notegotistic',
'notegotistical',
'notegotistically',
'notegregious',
'notegregiously',
'notejaculate',
'notelection-rigger',
'noteliminate',
'notelimination',
'notelusive',
'notemaciated',
'notemancipated',
'notemasculate',
'notemasculated',
'notembarrass',
'notembarrassed',
'notembarrassing',
'notembarrassingly',
'notembarrassment',
'notembattled',
'notembroil',
'notembroiled',
'notembroilment',
'notemotional',
'notemotionless',
'notempathize',
'notempathy',
'notemphatic',
'notemphatically',
'notemptiness',
'notempty',
'notencroach',
'notencroachment',
'notencumbered',
'notendanger',
'notendangered',
'notendless',
'notenemies',
'notenemy',
'notenervate',
'notenfeeble',
'notenflame',
'notengulf',
'notenjoin',
'notenmity',
'notenormities',
'notenormity',
'notenormous',
'notenormously',
'notenrage',
'notenraged',
'notenslave',
'notenslaved',
'notentangle',
'notentangled',
'notentanglement',
'notentrap',
'notentrapment',
'notenvious',
'notenviously',
'notenviousness',
'notenvy',
'notepidemic',
'notequivocal',
'noteradicate',
'noterase',
'noterode',
'noterosion',
'noterr',
'noterrant',
'noterratic',
'noterratically',
'noterroneous',
'noterroneously',
'noterror',
'notescapade',
'noteschew',
'notesoteric',
'notestranged',
'noteternal',
'notevade',
'notevaded',
'notevasion',
'notevasive',
'notevicted',
'notevil',
'notevildoer',
'notevils',
'noteviscerate',
'noteworthy',
'notexacerbate',
'notexacting',
'notexaggerate',
'notexaggeration',
'notexasperate',
'notexasperating',
'notexasperatingly',
'notexasperation',
'notexcessive',
'notexcessively',
'notexclaim',
'notexclude',
'notexcluded',
'notexclusion',
'notexcoriate',
'notexcruciating',
'notexcruciatingly',
'notexcuse',
'notexcuses',
'notexecrate',
'notexhaust',
'notexhausted',
'notexhaustion',
'notexhort',
'notexile',
'notexorbitant',
'notexorbitantance',
'notexorbitantly',
'notexpediencies',
'notexpedient',
'notexpel',
'notexpensive',
'notexpire',
'notexplode',
'notexploit',
'notexploitation',
'notexplosive',
'notexpose',
'notexposed',
'notexpropriate',
'notexpropriation',
'notexpulse',
'notexpunge',
'notexterminate',
'notextermination',
'notextinguish',
'notextort',
'notextortion',
'notextraneous',
'notextravagance',
'notextravagant',
'notextravagantly',
'notextreme',
'notextremely',
'notextremism',
'notextremist',
'notextremists',
'notfabricate',
'notfabrication',
'notfacetious',
'notfacetiously',
'notfading',
'notfail',
'notfailful',
'notfailing',
'notfailure',
'notfailures',
'notfaint',
'notfainthearted',
'notfaithless',
'notfake',
'notfall',
'notfallacies',
'notfallacious',
'notfallaciously',
'notfallaciousness',
'notfallacy',
'notfallout',
'notfalse',
'notfalsehood',
'notfalsely',
'notfalsify',
'notfalter',
'notfamine',
'notfamished',
'notfanatic',
'notfanatical',
'notfanatically',
'notfanaticism',
'notfanatics',
'notfanciful',
'notfar-fetched',
'notfarce',
'notfarcical',
'notfarcical-yet-provocative',
'notfarcically',
'notfarfetched',
'notfascism',
'notfascist',
'notfastidious',
'notfastidiously',
'notfastuous',
'notfat',
'notfatal',
'notfatalistic',
'notfatalistically',
'notfatally',
'notfateful',
'notfatefully',
'notfathomless',
'notfatigue',
'notfatty',
'notfatuity',
'notfatuous',
'notfatuously',
'notfault',
'notfaulty',
'notfawningly',
'notfaze',
'notfear',
'notfearful',
'notfearfully',
'notfears',
'notfearsome',
'notfeckless',
'notfeeble',
'notfeeblely',
'notfeebleminded',
'notfeign',
'notfeint',
'notfell',
'notfelon',
'notfelonious',
'notferocious',
'notferociously',
'notferocity',
'notfetid',
'notfever',
'notfeverish',
'notfiasco',
'notfiat',
'notfib',
'notfibber',
'notfickle',
'notfiction',
'notfictional',
'notfictitious',
'notfidget',
'notfidgety',
'notfiend',
'notfiendish',
'notfierce',
'notfight',
'notfigurehead',
'notfilth',
'notfilthy',
'notfinagle',
'notfissures',
'notfist',
'notflabbergast',
'notflabbergasted',
'notflagging',
'notflagrant',
'notflagrantly',
'notflak',
'notflake',
'notflakey',
'notflaky',
'notflash',
'notflashy',
'notflat-out',
'notflaunt',
'notflaw',
'notflawed',
'notflaws',
'notfleer',
'notfleeting',
'notflighty',
'notflimflam',
'notflimsy',
'notflirt',
'notflirty',
'notfloored',
'notflounder',
'notfloundering',
'notflout',
'notfluster',
'notfoe',
'notfool',
'notfoolhardy',
'notfoolish',
'notfoolishly',
'notfoolishness',
'notforbid',
'notforbidden',
'notforbidding',
'notforce',
'notforced',
'notforceful',
'notforeboding',
'notforebodingly',
'notforfeit',
'notforged',
'notforget',
'notforgetful',
'notforgetfully',
'notforgetfulness',
'notforgettable',
'notforgotten',
'notforlorn',
'notforlornly',
'notformidable',
'notforsake',
'notforsaken',
'notforswear',
'notfoul',
'notfoully',
'notfoulness',
'notfractious',
'notfractiously',
'notfracture',
'notfragile',
'notfragmented',
'notfrail',
'notfrantic',
'notfrantically',
'notfranticly',
'notfraternize',
'notfraud',
'notfraudulent',
'notfraught',
'notfrazzle',
'notfrazzled',
'notfreak',
'notfreakish',
'notfreakishly',
'notfrenetic',
'notfrenetically',
'notfrenzied',
'notfrenzy',
'notfret',
'notfretful',
'notfriction',
'notfrictions',
'notfriggin',
'notfright',
'notfrighten',
'notfrightened',
'notfrightening',
'notfrighteningly',
'notfrightful',
'notfrightfully',
'notfrigid',
'notfrivolous',
'notfrown',
'notfrozen',
'notfruitless',
'notfruitlessly',
'notfrustrate',
'notfrustrated',
'notfrustrating',
'notfrustratingly',
'notfrustration',
'notfudge',
'notfugitive',
'notfull-blown',
'notfulminate',
'notfumble',
'notfume',
'notfundamentalism',
'notfurious',
'notfuriously',
'notfuror',
'notfury',
'notfuss',
'notfussy',
'notfustigate',
'notfusty',
'notfutile',
'notfutilely',
'notfutility',
'notfuzzy',
'notgabble',
'notgaff',
'notgaffe',
'notgaga',
'notgaggle',
'notgainsay',
'notgainsayer',
'notgall',
'notgalling',
'notgallingly',
'notgamble',
'notgame',
'notgape',
'notgarbage',
'notgarish',
'notgasp',
'notgauche',
'notgaudy',
'notgawk',
'notgawky',
'notgeezer',
'notgenocide',
'notget-rich',
'notghastly',
'notghetto',
'notgibber',
'notgibberish',
'notgibe',
'notglare',
'notglaring',
'notglaringly',
'notglib',
'notglibly',
'notglitch',
'notgloatingly',
'notgloom',
'notgloomy',
'notgloss',
'notglower',
'notglum',
'notglut',
'notgnawing',
'notgoad',
'notgoading',
'notgod-awful',
'notgoddam',
'notgoddamn',
'notgoof',
'notgossip',
'notgothic',
'notgraceless',
'notgracelessly',
'notgraft',
'notgrandiose',
'notgrapple',
'notgrate',
'notgrating',
'notgratuitous',
'notgratuitously',
'notgrave',
'notgravely',
'notgreed',
'notgreedy',
'notgrey',
'notgrief',
'notgrievance',
'notgrievances',
'notgrieve',
'notgrieving',
'notgrievous',
'notgrievously',
'notgrill',
'notgrim',
'notgrimace',
'notgrind',
'notgripe',
'notgrisly',
'notgritty',
'notgross',
'notgrossly',
'notgrotesque',
'notgrouch',
'notgrouchy',
'notgrounded',
'notgroundless',
'notgrouse',
'notgrowl',
'notgrudge',
'notgrudges',
'notgrudging',
'notgrudgingly',
'notgruesome',
'notgruesomely',
'notgruff',
'notgrumble',
'notgrumpy',
'notguile',
'notguilt',
'notguiltily',
'notguilty',
'notgullible',
'nothaggard',
'nothaggle',
'nothalfhearted',
'nothalfheartedly',
'nothallucinate',
'nothallucination',
'nothamper',
'nothamstring',
'nothamstrung',
'nothandicapped',
'nothaphazard',
'nothapless',
'notharangue',
'notharass',
'notharassment',
'notharboring',
'notharbors',
'nothard',
'nothard-hit',
'nothard-line',
'nothard-liner',
'nothardball',
'notharden',
'nothardened',
'nothardheaded',
'nothardhearted',
'nothardliner',
'nothardliners',
'nothardship',
'nothardships',
'notharm',
'notharmful',
'notharms',
'notharpy',
'notharridan',
'notharried',
'notharrow',
'notharsh',
'notharshly',
'nothassle',
'nothaste',
'nothasty',
'nothate',
'nothateful',
'nothatefully',
'nothatefulness',
'nothater',
'nothatred',
'nothaughtily',
'nothaughty',
'nothaunt',
'nothaunting',
'nothavoc',
'nothawkish',
'nothazard',
'nothazardous',
'nothazy',
'notheadache',
'notheadaches',
'notheartbreak',
'notheartbreaker',
'notheartbreaking',
'notheartbreakingly',
'notheartless',
'notheartrending',
'notheathen',
'notheavily',
'notheavy-handed',
'notheavyhearted',
'notheck',
'notheckle',
'nothectic',
'nothedge',
'nothedonistic',
'notheedless',
'nothegemonism',
'nothegemonistic',
'nothegemony',
'notheinous',
'nothell',
'nothell-bent',
'nothellion',
'nothelpless',
'nothelplessly',
'nothelplessness',
'notheresy',
'notheretic',
'notheretical',
'nothesitant',
'nothideous',
'nothideously',
'nothideousness',
'nothinder',
'nothindrance',
'nothoard',
'nothoax',
'nothobble',
'nothole',
'nothollow',
'nothoodwink',
'nothopeless',
'nothopelessly',
'nothopelessness',
'nothorde',
'nothorrendous',
'nothorrendously',
'nothorrible',
'nothorribly',
'nothorrid',
'nothorrific',
'nothorrifically',
'nothorrify',
'nothorrifying',
'nothorrifyingly',
'nothorror',
'nothorrors',
'nothostage',
'nothostile',
'nothostilities',
'nothostility',
'nothotbeds',
'nothothead',
'nothotheaded',
'nothothouse',
'nothubris',
'nothuckster',
'nothumbling',
'nothumiliate',
'nothumiliating',
'nothumiliation',
'nothunger',
'nothungry',
'nothurt',
'nothurtful',
'nothustler',
'nothypocrisy',
'nothypocrite',
'nothypocrites',
'nothypocritical',
'nothypocritically',
'nothysteria',
'nothysteric',
'nothysterical',
'nothysterically',
'nothysterics',
'noticeable',
'noticy',
'notidiocies',
'notidiocy',
'notidiot',
'notidiotic',
'notidiotically',
'notidiots',
'notidle',
'notignoble',
'notignominious',
'notignominiously',
'notignominy',
'notignorance',
'notignorant',
'notignore',
'notignored',
'notill',
'notill-advised',
'notill-conceived',
'notill-fated',
'notill-favored',
'notill-mannered',
'notill-natured',
'notill-sorted',
'notill-tempered',
'notill-treated',
'notill-treatment',
'notill-usage',
'notill-used',
'notillegal',
'notillegally',
'notillegitimate',
'notillicit',
'notilliquid',
'notilliterate',
'notillness',
'notillogic',
'notillogical',
'notillogically',
'notillusion',
'notillusions',
'notillusory',
'notimaginary',
'notimbalance',
'notimbalanced',
'notimbecile',
'notimbroglio',
'notimmaterial',
'notimmature',
'notimminence',
'notimminent',
'notimminently',
'notimmobilized',
'notimmoderate',
'notimmoderately',
'notimmodest',
'notimmoral',
'notimmorality',
'notimmorally',
'notimmovable',
'notimpair',
'notimpaired',
'notimpasse',
'notimpassive',
'notimpatience',
'notimpatient',
'notimpatiently',
'notimpeach',
'notimpedance',
'notimpede',
'notimpediment',
'notimpending',
'notimpenitent',
'notimperfect',
'notimperfectly',
'notimperialist',
'notimperil',
'notimperious',
'notimperiously',
'notimpermissible',
'notimpersonal',
'notimpertinent',
'notimpetuous',
'notimpetuously',
'notimpiety',
'notimpinge',
'notimpious',
'notimplacable',
'notimplausible',
'notimplausibly',
'notimplicate',
'notimplication',
'notimplode',
'notimplore',
'notimploring',
'notimploringly',
'notimpolite',
'notimpolitely',
'notimpolitic',
'notimportunate',
'notimportune',
'notimpose',
'notimposers',
'notimposing',
'notimposition',
'notimpossible',
'notimpossiblity',
'notimpossibly',
'notimpotent',
'notimpoverish',
'notimpoverished',
'notimpractical',
'notimprecate',
'notimprecise',
'notimprecisely',
'notimprecision',
'notimprison',
'notimprisoned',
'notimprisonment',
'notimprobability',
'notimprobable',
'notimprobably',
'notimproper',
'notimproperly',
'notimpropriety',
'notimprudence',
'notimprudent',
'notimpudence',
'notimpudent',
'notimpudently',
'notimpugn',
'notimpulsive',
'notimpulsively',
'notimpunity',
'notimpure',
'notimpurity',
'notin',
'notinability',
'notinaccessible',
'notinaccuracies',
'notinaccuracy',
'notinaccurate',
'notinaccurately',
'notinaction',
'notinactive',
'notinadequacy',
'notinadequate',
'notinadequately',
'notinadverent',
'notinadverently',
'notinadvisable',
'notinadvisably',
'notinane',
'notinanely',
'notinappropriate',
'notinappropriately',
'notinapt',
'notinaptitude',
'notinarticulate',
'notinattentive',
'notincapable',
'notincapably',
'notincautious',
'notincendiary',
'notincense',
'notincessant',
'notincessantly',
'notincite',
'notincitement',
'notincivility',
'notinclement',
'notincognizant',
'notincoherence',
'notincoherent',
'notincoherently',
'notincommensurate',
'notincommunicative',
'notincomparable',
'notincomparably',
'notincompatibility',
'notincompatible',
'notincompetence',
'notincompetent',
'notincompetently',
'notincomplete',
'notincompliant',
'notincomprehensible',
'notincomprehension',
'notinconceivable',
'notinconceivably',
'notinconclusive',
'notincongruous',
'notincongruously',
'notinconsequent',
'notinconsequential',
'notinconsequentially',
'notinconsequently',
'notinconsiderate',
'notinconsiderately',
'notinconsistence',
'notinconsistencies',
'notinconsistency',
'notinconsistent',
'notinconsolable',
'notinconsolably',
'notinconstant',
'notinconvenience',
'notinconvenient',
'notinconveniently',
'notincorrect',
'notincorrectly',
'notincorrigible',
'notincorrigibly',
'notincredulous',
'notincredulously',
'notinculcate',
'notindecency',
'notindecent',
'notindecently',
'notindecision',
'notindecisive',
'notindecisively',
'notindecorum',
'notindefensible',
'notindefinite',
'notindefinitely',
'notindelicate',
'notindeterminable',
'notindeterminably',
'notindeterminate',
'notindifference',
'notindifferent',
'notindigent',
'notindignant',
'notindignantly',
'notindignation',
'notindignity',
'notindiscernible',
'notindiscreet',
'notindiscreetly',
'notindiscretion',
'notindiscriminate',
'notindiscriminately',
'notindiscriminating',
'notindisposed',
'notindistinct',
'notindistinctive',
'notindoctrinate',
'notindoctrinated',
'notindoctrination',
'notindolent',
'notindulge',
'notinebriated',
'notineffective',
'notineffectively',
'notineffectiveness',
'notineffectual',
'notineffectually',
'notineffectualness',
'notinefficacious',
'notinefficacy',
'notinefficiency',
'notinefficient',
'notinefficiently',
'notinelegance',
'notinelegant',
'notineligible',
'notineloquent',
'notineloquently',
'notinept',
'notineptitude',
'notineptly',
'notinequalities',
'notinequality',
'notinequitable',
'notinequitably',
'notinequities',
'notinertia',
'notinescapable',
'notinescapably',
'notinessential',
'notinevitable',
'notinevitably',
'notinexact',
'notinexcusable',
'notinexcusably',
'notinexorable',
'notinexorably',
'notinexperience',
'notinexperienced',
'notinexpert',
'notinexpertly',
'notinexpiable',
'notinexplainable',
'notinexplicable',
'notinextricable',
'notinextricably',
'notinfamous',
'notinfamously',
'notinfamy',
'notinfatuated',
'notinfected',
'notinferior',
'notinferiority',
'notinfernal',
'notinfest',
'notinfested',
'notinfidel',
'notinfidels',
'notinfiltrator',
'notinfiltrators',
'notinfirm',
'notinflame',
'notinflammatory',
'notinflated',
'notinflationary',
'notinflexible',
'notinflict',
'notinfraction',
'notinfringe',
'notinfringement',
'notinfringements',
'notinfuriate',
'notinfuriated',
'notinfuriating',
'notinfuriatingly',
'notinglorious',
'notingrate',
'notingratitude',
'notinhibit',
'notinhibited',
'notinhibition',
'notinhospitable',
'notinhospitality',
'notinhuman',
'notinhumane',
'notinhumanity',
'notinimical',
'notinimically',
'notiniquitous',
'notiniquity',
'notinjudicious',
'notinjure',
'notinjured',
'notinjurious',
'notinjury',
'notinjustice',
'notinjusticed',
'notinjustices',
'notinnuendo',
'notinopportune',
'notinordinate',
'notinordinately',
'notinsane',
'notinsanely',
'notinsanity',
'notinsatiable',
'notinsecure',
'notinsecurity',
'notinsensible',
'notinsensitive',
'notinsensitively',
'notinsensitivity',
'notinsidious',
'notinsidiously',
'notinsignificance',
'notinsignificant',
'notinsignificantly',
'notinsincere',
'notinsincerely',
'notinsincerity',
'notinsinuate',
'notinsinuating',
'notinsinuation',
'notinsociable',
'notinsolence',
'notinsolent',
'notinsolently',
'notinsolvent',
'notinsouciance',
'notinstability',
'notinstable',
'notinstigate',
'notinstigator',
'notinstigators',
'notinsubordinate',
'notinsubstantial',
'notinsubstantially',
'notinsufferable',
'notinsufferably',
'notinsufficiency',
'notinsufficient',
'notinsufficiently',
'notinsular',
'notinsult',
'notinsulted',
'notinsulting',
'notinsultingly',
'notinsupportable',
'notinsupportably',
'notinsurmountable',
'notinsurmountably',
'notinsurrection',
'notintense',
'notinterfere',
'notinterference',
'notintermittent',
'notinterrogated',
'notinterrupt',
'notinterrupted',
'notinterruption',
'notintimidate',
'notintimidated',
'notintimidating',
'notintimidatingly',
'notintimidation',
'notintolerable',
'notintolerablely',
'notintolerance',
'notintolerant',
'notintoxicate',
'notintoxicated',
'notintractable',
'notintransigence',
'notintransigent',
'notintrude',
'notintrusion',
'notintrusive',
'notinundate',
'notinundated',
'notinvader',
'notinvalid',
'notinvalidate',
'notinvalidated',
'notinvalidity',
'notinvasive',
'notinvective',
'notinveigle',
'notinvidious',
'notinvidiously',
'notinvidiousness',
'notinvisible',
'notinvoluntarily',
'notinvoluntary',
'notirate',
'notirately',
'notire',
'notirk',
'notirksome',
'notironic',
'notironies',
'notirony',
'notirrational',
'notirrationality',
'notirrationally',
'notirreconcilable',
'notirredeemable',
'notirredeemably',
'notirreformable',
'notirregular',
'notirregularity',
'notirrelevance',
'notirrelevant',
'notirreparable',
'notirreplacible',
'notirrepressible',
'notirresolute',
'notirresolvable',
'notirresponsible',
'notirresponsibly',
'notirretrievable',
'notirreverence',
'notirreverent',
'notirreverently',
'notirreversible',
'notirritable',
'notirritably',
'notirritant',
'notirritate',
'notirritated',
'notirritating',
'notirritation',
'notisolate',
'notisolated',
'notisolation',
'notitch',
'notjabber',
'notjaded',
'notjam',
'notjar',
'notjaundiced',
'notjealous',
'notjealously',
'notjealousness',
'notjealousy',
'notjeer',
'notjeering',
'notjeeringly',
'notjeers',
'notjeopardize',
'notjeopardy',
'notjerk',
'notjittery',
'notjobless',
'notjoker',
'notjolt',
'notjoyless',
'notjudged',
'notjumpy',
'notjunk',
'notjunky',
'notjuvenile',
'notkaput',
'notkick',
'notkill',
'notkiller',
'notkilljoy',
'notknave',
'notknife',
'notknock',
'notkook',
'notkooky',
'notlabeled',
'notlack',
'notlackadaisical',
'notlackey',
'notlackeys',
'notlacking',
'notlackluster',
'notlaconic',
'notlag',
'notlambast',
'notlambaste',
'notlame',
'notlame-duck',
'notlament',
'notlamentable',
'notlamentably',
'notlanguid',
'notlanguish',
'notlanguor',
'notlanguorous',
'notlanguorously',
'notlanky',
'notlapse',
'notlascivious',
'notlast-ditch',
'notlaugh',
'notlaughable',
'notlaughably',
'notlaughingstock',
'notlaughter',
'notlawbreaker',
'notlawbreaking',
'notlawless',
'notlawlessness',
'notlax',
'notlazy',
'notleak',
'notleakage',
'notleaky',
'notlech',
'notlecher',
'notlecherous',
'notlechery',
'notlecture',
'notleech',
'notleer',
'notleery',
'notleft-leaning',
'notless-developed',
'notlessen',
'notlesser',
'notlesser-known',
'notletch',
'notlethal',
'notlethargic',
'notlethargy',
'notlewd',
'notlewdly',
'notlewdness',
'notliability',
'notliable',
'notliar',
'notliars',
'notlicentious',
'notlicentiously',
'notlicentiousness',
'notlie',
'notlier',
'notlies',
'notlife-threatening',
'notlifeless',
'notlimit',
'notlimitation',
'notlimited',
'notlimp',
'notlistless',
'notlitigious',
'notlittle',
'notlittle-known',
'notlivid',
'notlividly',
'notloath',
'notloathe',
'notloathing',
'notloathly',
'notloathsome',
'notloathsomely',
'notlone',
'notloneliness',
'notlonely',
'notlonesome',
'notlong',
'notlonging',
'notlongingly',
'notloophole',
'notloopholes',
'notloot',
'notlorn',
'notlose',
'notloser',
'notlosing',
'notloss',
'notlost',
'notlousy',
'notloveless',
'notlovelorn',
'notlow',
'notlow-rated',
'notlowly',
'notludicrous',
'notludicrously',
'notlugubrious',
'notlukewarm',
'notlull',
'notlunatic',
'notlunaticism',
'notlurch',
'notlure',
'notlurid',
'notlurk',
'notlurking',
'notlying',
'notmacabre',
'notmad',
'notmadden',
'notmaddening',
'notmaddeningly',
'notmadder',
'notmadly',
'notmadman',
'notmadness',
'notmaladjusted',
'notmaladjustment',
'notmalady',
'notmalaise',
'notmalcontent',
'notmalcontented',
'notmaledict',
'notmalevolence',
'notmalevolent',
'notmalevolently',
'notmalice',
'notmalicious',
'notmaliciously',
'notmaliciousness',
'notmalign',
'notmalignant',
'notmalodorous',
'notmaltreatment',
'notmaneuver',
'notmangle',
'notmania',
'notmaniac',
'notmaniacal',
'notmanic',
'notmanipulate',
'notmanipulated',
'notmanipulation',
'notmanipulative',
'notmanipulators',
'notmar',
'notmarginal',
'notmarginally',
'notmartyrdom',
'notmartyrdom-seeking',
'notmasochistic',
'notmassacre',
'notmassacres',
'notmaverick',
'notmawkish',
'notmawkishly',
'notmawkishness',
'notmaxi-devaluation',
'notmeager',
'notmeaningless',
'notmeanness',
'notmeddle',
'notmeddlesome',
'notmediocrity',
'notmelancholy',
'notmelodramatic',
'notmelodramatically',
'notmenace',
'notmenacing',
'notmenacingly',
'notmendacious',
'notmendacity',
'notmenial',
'notmerciless',
'notmercilessly',
'notmere',
'notmess',
'notmessy',
'notmidget',
'notmiff',
'notmiffed',
'notmilitancy',
'notmind',
'notmindless',
'notmindlessly',
'notmirage',
'notmire',
'notmisapprehend',
'notmisbecome',
'notmisbecoming',
'notmisbegotten',
'notmisbehave',
'notmisbehavior',
'notmiscalculate',
'notmiscalculation',
'notmischief',
'notmischievous',
'notmischievously',
'notmisconception',
'notmisconceptions',
'notmiscreant',
'notmiscreants',
'notmisdirection',
'notmiser',
'notmiserable',
'notmiserableness',
'notmiserably',
'notmiseries',
'notmiserly',
'notmisery',
'notmisfit',
'notmisfortune',
'notmisgiving',
'notmisgivings',
'notmisguidance',
'notmisguide',
'notmisguided',
'notmishandle',
'notmishap',
'notmisinform',
'notmisinformed',
'notmisinterpret',
'notmisjudge',
'notmisjudgment',
'notmislead',
'notmisleading',
'notmisleadingly',
'notmisled',
'notmislike',
'notmismanage',
'notmisread',
'notmisreading',
'notmisrepresent',
'notmisrepresentation',
'notmiss',
'notmisstatement',
'notmistake',
'notmistaken',
'notmistakenly',
'notmistakes',
'notmistified',
'notmistreated',
'notmistrust',
'notmistrusted',
'notmistrustful',
'notmistrustfully',
'notmisunderstand',
'notmisunderstanding',
'notmisunderstandings',
'notmisunderstood',
'notmisuse',
'notmoan',
'notmock',
'notmocked',
'notmockeries',
'notmockery',
'notmocking',
'notmockingly',
'notmolest',
'notmolestation',
'notmolested',
'notmonotonous',
'notmonotony',
'notmonster',
'notmonstrosities',
'notmonstrosity',
'notmonstrous',
'notmonstrously',
'notmoody',
'notmoon',
'notmoot',
'notmope',
'notmorbid',
'notmorbidly',
'notmordant',
'notmordantly',
'notmoribund',
'notmortification',
'notmortified',
'notmortify',
'notmortifying',
'notmotionless',
'notmotley',
'notmourn',
'notmourner',
'notmournful',
'notmournfully',
'notmuddle',
'notmuddy',
'notmudslinger',
'notmudslinging',
'notmulish',
'notmulti-polarization',
'notmundane',
'notmurder',
'notmurderous',
'notmurderously',
'notmurky',
'notmuscle-flexing',
'notmysterious',
'notmysteriously',
'notmystery',
'notmystify',
'notmyth',
'notnag',
'notnagged',
'notnagging',
'notnaive',
'notnaively',
'notnarrow',
'notnarrower',
'notnastily',
'notnastiness',
'notnasty',
'notnationalism',
'notnaughty',
'notnauseate',
'notnauseating',
'notnauseatingly',
'notnebulous',
'notnebulously',
'notneedless',
'notneedlessly',
'notneedy',
'notnefarious',
'notnefariously',
'notnegate',
'notnegation',
'notnegative',
'notneglect',
'notneglected',
'notnegligence',
'notnegligent',
'notnegligible',
'notnemesis',
'notnervous',
'notnervously',
'notnervousness',
'notnettle',
'notnettlesome',
'notneurotic',
'notneurotically',
'notniggle',
'notnightmare',
'notnightmarish',
'notnightmarishly',
'notnix',
'notnoisy',
'notnon-confidence',
'notnonconforming',
'notnonexistent',
'notnonsense',
'notnosey',
'notnotorious',
'notnotoriously',
'notnuisance',
'notnumb',
'notnuts',
'notnutty',
'notobese',
'notobject',
'notobjectified',
'notobjection',
'notobjectionable',
'notobjections',
'notobligated',
'notoblique',
'notobliterate',
'notobliterated',
'notoblivious',
'notobnoxious',
'notobnoxiously',
'notobscene',
'notobscenely',
'notobscenity',
'notobscure',
'notobscurity',
'notobsess',
'notobsessed',
'notobsession',
'notobsessions',
'notobsessive',
'notobsessively',
'notobsessiveness',
'notobsolete',
'notobstacle',
'notobstinate',
'notobstinately',
'notobstruct',
'notobstructed',
'notobstruction',
'notobtrusive',
'notobtuse',
'notodd',
'notodder',
'notoddest',
'notoddities',
'notoddity',
'notoddly',
'notoffence',
'notoffend',
'notoffended',
'notoffending',
'notoffenses',
'notoffensive',
'notoffensively',
'notoffensiveness',
'notofficious',
'notominous',
'notominously',
'notomission',
'notomit',
'notone-side',
'notone-sided',
'notonerous',
'notonerously',
'notonslaught',
'notopinionated',
'notopponent',
'notopportunistic',
'notoppose',
'notopposed',
'notopposition',
'notoppositions',
'notoppress',
'notoppressed',
'notoppression',
'notoppressive',
'notoppressively',
'notoppressiveness',
'notoppressors',
'notordeal',
'notorphan',
'notostracize',
'notoutbreak',
'notoutburst',
'notoutbursts',
'notoutcast',
'notoutcry',
'notoutdated',
'notoutlaw',
'notoutmoded',
'notoutrage',
'notoutraged',
'notoutrageous',
'notoutrageously',
'notoutrageousness',
'notoutrages',
'notoutsider',
'notover-acted',
'notover-valuation',
'notoveract',
'notoveracted',
'notoverawe',
'notoverbalance',
'notoverbalanced',
'notoverbearing',
'notoverbearingly',
'notoverblown',
'notovercome',
'notoverdo',
'notoverdone',
'notoverdue',
'notoveremphasize',
'notoverkill',
'notoverlook',
'notoverplay',
'notoverpower',
'notoverreach',
'notoverrun',
'notovershadow',
'notoversight',
'notoversimplification',
'notoversimplified',
'notoversimplify',
'notoversized',
'notoverstate',
'notoverstatement',
'notoverstatements',
'notovertaxed',
'notoverthrow',
'notoverturn',
'notoverwhelm',
'notoverwhelmed',
'notoverwhelming',
'notoverwhelmingly',
'notoverworked',
'notoverzealous',
'notoverzealously',
'notpain',
'notpainful',
'notpainfully',
'notpains',
'notpale',
'notpaltry',
'notpan',
'notpandemonium',
'notpanic',
'notpanicky',
'notparadoxical',
'notparadoxically',
'notparalize',
'notparalyzed',
'notparanoia',
'notparanoid',
'notparasite',
'notpariah',
'notparody',
'notpartiality',
'notpartisan',
'notpartisans',
'notpasse',
'notpassive',
'notpassiveness',
'notpathetic',
'notpathetically',
'notpatronize',
'notpaucity',
'notpauper',
'notpaupers',
'notpayback',
'notpeculiar',
'notpeculiarly',
'notpedantic',
'notpedestrian',
'notpeeve',
'notpeeved',
'notpeevish',
'notpeevishly',
'notpenalize',
'notpenalty',
'notperfidious',
'notperfidity',
'notperfunctory',
'notperil',
'notperilous',
'notperilously',
'notperipheral',
'notperish',
'notpernicious',
'notperplex',
'notperplexed',
'notperplexing',
'notperplexity',
'notpersecute',
'notpersecution',
'notpertinacious',
'notpertinaciously',
'notpertinacity',
'notperturb',
'notperturbed',
'notperverse',
'notperversely',
'notperversion',
'notperversity',
'notpervert',
'notperverted',
'notpessimism',
'notpessimistic',
'notpessimistically',
'notpest',
'notpestilent',
'notpetrified',
'notpetrify',
'notpettifog',
'notpetty',
'notphobia',
'notphobic',
'notphony',
'notpicky',
'notpillage',
'notpillory',
'notpinch',
'notpine',
'notpique',
'notpissed',
'notpitiable',
'notpitiful',
'notpitifully',
'notpitiless',
'notpitilessly',
'notpittance',
'notpity',
'notplagiarize',
'notplague',
'notplain',
'notplaything',
'notplea',
'notplead',
'notpleading',
'notpleadingly',
'notpleas',
'notplebeian',
'notplight',
'notplot',
'notplotters',
'notploy',
'notplunder',
'notplunderer',
'notpointless',
'notpointlessly',
'notpoison',
'notpoisonous',
'notpoisonously',
'notpolarisation',
'notpolemize',
'notpollute',
'notpolluter',
'notpolluters',
'notpolution',
'notpompous',
'notpooped',
'notpoor',
'notpoorly',
'notposturing',
'notpout',
'notpoverty',
'notpowerless',
'notprate',
'notpratfall',
'notprattle',
'notprecarious',
'notprecariously',
'notprecipitate',
'notprecipitous',
'notpredatory',
'notpredicament',
'notpredjudiced',
'notprejudge',
'notprejudice',
'notprejudicial',
'notpremeditated',
'notpreoccupied',
'notpreoccupy',
'notpreposterous',
'notpreposterously',
'notpressing',
'notpressured',
'notpresume',
'notpresumptuous',
'notpresumptuously',
'notpretence',
'notpretend',
'notpretense',
'notpretentious',
'notpretentiously',
'notprevaricate',
'notpricey',
'notprickle',
'notprickles',
'notprideful',
'notprimitive',
'notprison',
'notprisoner',
'notproblem',
'notproblematic',
'notproblems',
'notprocrastinate',
'notprocrastination',
'notprofane',
'notprofanity',
'notprohibit',
'notprohibitive',
'notprohibitively',
'notpropaganda',
'notpropagandize',
'notproscription',
'notproscriptions',
'notprosecute',
'notprosecuted',
'notprotest',
'notprotests',
'notprotracted',
'notprovocation',
'notprovocative',
'notprovoke',
'notprovoked',
'notpry',
'notpsychopathic',
'notpsychotic',
'notpugnacious',
'notpugnaciously',
'notpugnacity',
'notpunch',
'notpunish',
'notpunishable',
'notpunished',
'notpunitive',
'notpuny',
'notpuppet',
'notpuppets',
'notpushed',
'notpuzzle',
'notpuzzled',
'notpuzzlement',
'notpuzzling',
'notquack',
'notqualms',
'notquandary',
'notquarrel',
'notquarrellous',
'notquarrellously',
'notquarrels',
'notquarrelsome',
'notquash',
'notqueer',
'notquestionable',
'notquestioned',
'notquibble',
'notquiet',
'notquit',
'notquitter',
'notracism',
'notracist',
'notracists',
'notrack',
'notradical',
'notradicalization',
'notradically',
'notradicals',
'notrage',
'notragged',
'notraging',
'notrail',
'notrampage',
'notrampant',
'notramshackle',
'notrancor',
'notrank',
'notrankle',
'notrant',
'notranting',
'notrantingly',
'notraped',
'notrascal',
'notrash',
'notrat',
'notrationalize',
'notrattle',
'notrattled',
'notravage',
'notraving',
'notreactionary',
'notrebellious',
'notrebuff',
'notrebuke',
'notrecalcitrant',
'notrecant',
'notrecession',
'notrecessionary',
'notreckless',
'notrecklessly',
'notrecklessness',
'notrecoil',
'notrecourses',
'notredundancy',
'notredundant',
'notrefusal',
'notrefuse',
'notrefutation',
'notrefute',
'notregress',
'notregression',
'notregressive',
'notregret',
'notregretful',
'notregretfully',
'notregrettable',
'notregrettably',
'notreject',
'notrejected',
'notrejection',
'notrelapse',
'notrelentless',
'notrelentlessly',
'notrelentlessness',
'notreluctance',
'notreluctant',
'notreluctantly',
'notremorse',
'notremorseful',
'notremorsefully',
'notremorseless',
'notremorselessly',
'notremorselessness',
'notrenounce',
'notrenunciation',
'notrepel',
'notrepetitive',
'notreprehensible',
'notreprehensibly',
'notreprehension',
'notreprehensive',
'notrepress',
'notrepression',
'notrepressive',
'notreprimand',
'notreproach',
'notreproachful',
'notreprove',
'notreprovingly',
'notrepudiate',
'notrepudiation',
'notrepugn',
'notrepugnance',
'notrepugnant',
'notrepugnantly',
'notrepulse',
'notrepulsed',
'notrepulsing',
'notrepulsive',
'notrepulsively',
'notrepulsiveness',
'notresent',
'notresented',
'notresentful',
'notresentment',
'notreservations',
'notresignation',
'notresigned',
'notresistance',
'notresistant',
'notrestless',
'notrestlessness',
'notrestrict',
'notrestricted',
'notrestriction',
'notrestrictive',
'notretaliate',
'notretaliatory',
'notretard',
'notretarded',
'notreticent',
'notretire',
'notretract',
'notretreat',
'notrevenge',
'notrevengeful',
'notrevengefully',
'notrevert',
'notrevile',
'notreviled',
'notrevoke',
'notrevolt',
'notrevolting',
'notrevoltingly',
'notrevulsion',
'notrevulsive',
'notrhapsodize',
'notrhetoric',
'notrhetorical',
'notrid',
'notridicule',
'notridiculed',
'notridiculous',
'notridiculously',
'notrife',
'notrift',
'notrifts',
'notrigid',
'notrigor',
'notrigorous',
'notrile',
'notriled',
'notrisk',
'notrisky',
'notrival',
'notrivalry',
'notroadblocks',
'notrobbed',
'notrocky',
'notrogue',
'notrollercoaster',
'notrot',
'notrotten',
'notrough',
'notrubbish',
'notrude',
'notrue',
'notruffian',
'notruffle',
'notruin',
'notruinous',
'notrumbling',
'notrumor',
'notrumors',
'notrumours',
'notrumple',
'notrun-down',
'notrunaway',
'notrupture',
'notrusty',
'notruthless',
'notruthlessly',
'notruthlessness',
'notsabotage',
'notsacrifice',
'notsad',
'notsadden',
'notsadistic',
'notsadly',
'notsadness',
'notsag',
'notsalacious',
'notsanctimonious',
'notsap',
'notsarcasm',
'notsarcastic',
'notsarcastically',
'notsardonic',
'notsardonically',
'notsass',
'notsatirical',
'notsatirize',
'notsavage',
'notsavaged',
'notsavagely',
'notsavagery',
'notsavages',
'notscandal',
'notscandalize',
'notscandalized',
'notscandalous',
'notscandalously',
'notscandals',
'notscant',
'notscapegoat',
'notscar',
'notscarce',
'notscarcely',
'notscarcity',
'notscare',
'notscared',
'notscarier',
'notscariest',
'notscarily',
'notscarred',
'notscars',
'notscary',
'notscathing',
'notscathingly',
'notscheme',
'notscheming',
'notscoff',
'notscoffingly',
'notscold',
'notscolding',
'notscoldingly',
'notscorching',
'notscorchingly',
'notscorn',
'notscornful',
'notscornfully',
'notscoundrel',
'notscourge',
'notscowl',
'notscream',
'notscreech',
'notscrew',
'notscrewed',
'notscum',
'notscummy',
'notsecond-class',
'notsecond-tier',
'notsecretive',
'notsedentary',
'notseedy',
'notseethe',
'notseething',
'notself-coup',
'notself-criticism',
'notself-defeating',
'notself-destructive',
'notself-humiliation',
'notself-interest',
'notself-interested',
'notself-serving',
'notselfinterested',
'notselfish',
'notselfishly',
'notselfishness',
'notsenile',
'notsensationalize',
'notsenseless',
'notsenselessly',
'notsensitive',
'notseriousness',
'notsermonize',
'notservitude',
'notset-up',
'notsever',
'notsevere',
'notseverely',
'notseverity',
'notshabby',
'notshadow',
'notshadowy',
'notshady',
'notshake',
'notshaky',
'notshallow',
'notsham',
'notshambles',
'notshame',
'notshameful',
'notshamefully',
'notshamefulness',
'notshameless',
'notshamelessly',
'notshamelessness',
'notshark',
'notsharply',
'notshatter',
'notsheer',
'notshipwreck',
'notshirk',
'notshirker',
'notshiver',
'notshock',
'notshocking',
'notshockingly',
'notshoddy',
'notshort-lived',
'notshortage',
'notshortchange',
'notshortcoming',
'notshortcomings',
'notshortsighted',
'notshortsightedness',
'notshowdown',
'notshred',
'notshrew',
'notshriek',
'notshrill',
'notshrilly',
'notshrivel',
'notshroud',
'notshrouded',
'notshrug',
'notshun',
'notshunned',
'notshy',
'notshyly',
'notshyness',
'notsick',
'notsicken',
'notsickening',
'notsickeningly',
'notsickly',
'notsickness',
'notsidetrack',
'notsidetracked',
'notsiege',
'notsillily',
'notsilly',
'notsimmer',
'notsimplistic',
'notsimplistically',
'notsin',
'notsinful',
'notsinfully',
'notsinister',
'notsinisterly',
'notsinking',
'notskeletons',
'notskeptical',
'notskeptically',
'notskepticism',
'notsketchy',
'notskimpy',
'notskittish',
'notskittishly',
'notskulk',
'notslack',
'notslander',
'notslanderer',
'notslanderous',
'notslanderously',
'notslanders',
'notslap',
'notslashing',
'notslaughter',
'notslaughtered',
'notslaves',
'notsleazy',
'notslight',
'notslightly',
'notslime',
'notsloppily',
'notsloppy',
'notsloth',
'notslothful',
'notslow',
'notslow-moving',
'notslowly',
'notslug',
'notsluggish',
'notslump',
'notslur',
'notsly',
'notsmack',
'notsmall',
'notsmash',
'notsmear',
'notsmelling',
'notsmokescreen',
'notsmolder',
'notsmoldering',
'notsmother',
'notsmothered',
'notsmoulder',
'notsmouldering',
'notsmug',
'notsmugly',
'notsmut',
'notsmuttier',
'notsmuttiest',
'notsmutty',
'notsnare',
'notsnarl',
'notsnatch',
'notsneak',
'notsneakily',
'notsneaky',
'notsneer',
'notsneering',
'notsneeringly',
'notsnub',
'notso-cal',
'notso-called',
'notsob',
'notsober',
'notsobering',
'notsolemn',
'notsomber',
'notsore',
'notsorely',
'notsoreness',
'notsorrow',
'notsorrowful',
'notsorrowfully',
'notsounding',
'notsour',
'notsourly',
'notspade',
'notspank',
'notspilling',
'notspinster',
'notspiritless',
'notspite',
'notspiteful',
'notspitefully',
'notspitefulness',
'notsplit',
'notsplitting',
'notspoil',
'notspook',
'notspookier',
'notspookiest',
'notspookily',
'notspooky',
'notspoon-fed',
'notspoon-feed',
'notspoonfed',
'notsporadic',
'notspot',
'notspotty',
'notspurious',
'notspurn',
'notsputter',
'notsquabble',
'notsquabbling',
'notsquander',
'notsquash',
'notsquirm',
'notstab',
'notstagger',
'notstaggering',
'notstaggeringly',
'notstagnant',
'notstagnate',
'notstagnation',
'notstaid',
'notstain',
'notstake',
'notstale',
'notstalemate',
'notstammer',
'notstampede',
'notstandstill',
'notstark',
'notstarkly',
'notstartle',
'notstartling',
'notstartlingly',
'notstarvation',
'notstarve',
'notstatic',
'notsteal',
'notstealing',
'notsteep',
'notsteeply',
'notstench',
'notstereotype',
'notstereotyped',
'notstereotypical',
'notstereotypically',
'notstern',
'notstew',
'notsticky',
'notstiff',
'notstifle',
'notstifling',
'notstiflingly',
'notstigma',
'notstigmatize',
'notsting',
'notstinging',
'notstingingly',
'notstink',
'notstinking',
'notstodgy',
'notstole',
'notstolen',
'notstooge',
'notstooges',
'notstorm',
'notstormy',
'notstraggle',
'notstraggler',
'notstrain',
'notstrained',
'notstrange',
'notstrangely',
'notstranger',
'notstrangest',
'notstrangle',
'notstrenuous',
'notstress',
'notstressed',
'notstressful',
'notstressfully',
'notstretched',
'notstricken',
'notstrict',
'notstrictly',
'notstrident',
'notstridently',
'notstrife',
'notstrike',
'notstringent',
'notstringently',
'notstruck',
'notstruggle',
'notstrut',
'notstubborn',
'notstubbornly',
'notstubbornness',
'notstuck',
'notstuffy',
'notstumble',
'notstump',
'notstun',
'notstunt',
'notstunted',
'notstupid',
'notstupidity',
'notstupidly',
'notstupified',
'notstupify',
'notstupor',
'notsty',
'notsubdued',
'notsubjected',
'notsubjection',
'notsubjugate',
'notsubjugation',
'notsubmissive',
'notsubordinate',
'notsubservience',
'notsubservient',
'notsubside',
'notsubstandard',
'notsubtract',
'notsubversion',
'notsubversive',
'notsubversively',
'notsubvert',
'notsuccumb',
'notsucker',
'notsuffer',
'notsufferer',
'notsufferers',
'notsuffering',
'notsuffocate',
'notsuffocated',
'notsugar-coat',
'notsugar-coated',
'notsugarcoated',
'notsuicidal',
'notsuicide',
'notsulk',
'notsullen',
'notsully',
'notsunder',
'notsuperficial',
'notsuperficiality',
'notsuperficially',
'notsuperfluous',
'notsuperiority',
'notsuperstition',
'notsuperstitious',
'notsupposed',
'notsuppress',
'notsuppressed',
'notsuppression',
'notsupremacy',
'notsurrender',
'notsusceptible',
'notsuspect',
'notsuspicion',
'notsuspicions',
'notsuspicious',
'notsuspiciously',
'notswagger',
'notswamped',
'notswear',
'notswindle',
'notswipe',
'notswoon',
'notswore',
'notsympathetically',
'notsympathies',
'notsympathize',
'notsympathy',
'notsymptom',
'notsyndrome',
'nottaboo',
'nottaint',
'nottainted',
'nottamper',
'nottangled',
'nottantrum',
'nottardy',
'nottarnish',
'nottattered',
'nottaunt',
'nottaunting',
'nottauntingly',
'nottaunts',
'nottawdry',
'nottaxing',
'nottease',
'notteasingly',
'nottedious',
'nottediously',
'nottemerity',
'nottemper',
'nottempest',
'nottemptation',
'nottense',
'nottension',
'nottentative',
'nottentatively',
'nottenuous',
'nottenuously',
'nottepid',
'notterrible',
'notterribleness',
'notterribly',
'notterror',
'notterror-genic',
'notterrorism',
'notterrorize',
'notthankless',
'notthirst',
'notthorny',
'notthoughtless',
'notthoughtlessly',
'notthoughtlessness',
'notthrash',
'notthreat',
'notthreaten',
'notthreatening',
'notthreats',
'notthrottle',
'notthrow',
'notthumb',
'notthumbs',
'notthwart',
'nottimid',
'nottimidity',
'nottimidly',
'nottimidness',
'nottiny',
'nottire',
'nottired',
'nottiresome',
'nottiring',
'nottiringly',
'nottoil',
'nottoll',
'nottopple',
'nottorment',
'nottormented',
'nottorrent',
'nottortuous',
'nottorture',
'nottortured',
'nottorturous',
'nottorturously',
'nottotalitarian',
'nottouchy',
'nottoughness',
'nottoxic',
'nottraduce',
'nottragedy',
'nottragic',
'nottragically',
'nottraitor',
'nottraitorous',
'nottraitorously',
'nottramp',
'nottrample',
'nottransgress',
'nottransgression',
'nottrauma',
'nottraumatic',
'nottraumatically',
'nottraumatize',
'nottraumatized',
'nottravesties',
'nottravesty',
'nottreacherous',
'nottreacherously',
'nottreachery',
'nottreason',
'nottreasonous',
'nottrial',
'nottrick',
'nottrickery',
'nottricky',
'nottrivial',
'nottrivialize',
'nottrivially',
'nottrouble',
'nottroublemaker',
'nottroublesome',
'nottroublesomely',
'nottroubling',
'nottroublingly',
'nottruant',
'nottumultuous',
'notturbulent',
'notturmoil',
'nottwist',
'nottwisted',
'nottwists',
'nottyrannical',
'nottyrannically',
'nottyranny',
'nottyrant',
'notugh',
'notugliness',
'notugly',
'notulterior',
'notultimatum',
'notultimatums',
'notultra-hardline',
'notunable',
'notunacceptable',
'notunacceptablely',
'notunaccustomed',
'notunattractive',
'notunauthentic',
'notunavailable',
'notunavoidable',
'notunavoidably',
'notunbearable',
'notunbearablely',
'notunbelievable',
'notunbelievably',
'notuncertain',
'notuncivil',
'notuncivilized',
'notunclean',
'notunclear',
'notuncollectible',
'notuncomfortable',
'notuncompetitive',
'notuncompromising',
'notuncompromisingly',
'notunconfirmed',
'notunconstitutional',
'notuncontrolled',
'notunconvincing',
'notunconvincingly',
'notuncouth',
'notundecided',
'notundefined',
'notundependability',
'notundependable',
'notunderdog',
'notunderestimate',
'notunderlings',
'notundermine',
'notunderpaid',
'notundesirable',
'notundetermined',
'notundid',
'notundignified',
'notundo',
'notundocumented',
'notundone',
'notundue',
'notunease',
'notuneasily',
'notuneasiness',
'notuneasy',
'notuneconomical',
'notunequal',
'notunethical',
'notuneven',
'notuneventful',
'notunexpected',
'notunexpectedly',
'notunexplained',
'notunfair',
'notunfairly',
'notunfaithful',
'notunfaithfully',
'notunfamiliar',
'notunfavorable',
'notunfeeling',
'notunfinished',
'notunfit',
'notunforeseen',
'notunfortunate',
'notunfounded',
'notunfriendly',
'notunfulfilled',
'notunfunded',
'notungovernable',
'notungrateful',
'notunhappily',
'notunhappiness',
'notunhappy',
'notunhealthy',
'notunilateralism',
'notunimaginable',
'notunimaginably',
'notunimportant',
'notuninformed',
'notuninsured',
'notunipolar',
'notunjust',
'notunjustifiable',
'notunjustifiably',
'notunjustified',
'notunjustly',
'notunkind',
'notunkindly',
'notunlamentable',
'notunlamentably',
'notunlawful',
'notunlawfully',
'notunlawfulness',
'notunleash',
'notunlicensed',
'notunlucky',
'notunmoved',
'notunnatural',
'notunnaturally',
'notunnecessary',
'notunneeded',
'notunnerve',
'notunnerved',
'notunnerving',
'notunnervingly',
'notunnoticed',
'notunobserved',
'notunorthodox',
'notunorthodoxy',
'notunpleasant',
'notunpleasantries',
'notunpopular',
'notunprecedent',
'notunprecedented',
'notunpredictable',
'notunprepared',
'notunproductive',
'notunprofitable',
'notunqualified',
'notunravel',
'notunraveled',
'notunrealistic',
'notunreasonable',
'notunreasonably',
'notunrelenting',
'notunrelentingly',
'notunreliability',
'notunreliable',
'notunresolved',
'notunrest',
'notunruly',
'notunsafe',
'notunsatisfactory',
'notunsavory',
'notunscrupulous',
'notunscrupulously',
'notunseemly',
'notunsettle',
'notunsettled',
'notunsettling',
'notunsettlingly',
'notunskilled',
'notunsophisticated',
'notunsound',
'notunspeakable',
'notunspeakablely',
'notunspecified',
'notunstable',
'notunsteadily',
'notunsteadiness',
'notunsteady',
'notunsuccessful',
'notunsuccessfully',
'notunsupported',
'notunsure',
'notunsuspecting',
'notunsustainable',
'notuntenable',
'notuntested',
'notunthinkable',
'notunthinkably',
'notuntimely',
'notuntrue',
'notuntrustworthy',
'notuntruthful',
'notunusual',
'notunusually',
'notunwanted',
'notunwarranted',
'notunwelcome',
'notunwieldy',
'notunwilling',
'notunwillingly',
'notunwillingness',
'notunwise',
'notunwisely',
'notunworkable',
'notunworthy',
'notunyielding',
'notupbraid',
'notupheaval',
'notuprising',
'notuproar',
'notuproarious',
'notuproariously',
'notuproarous',
'notuproarously',
'notuproot',
'notupset',
'notupsetting',
'notupsettingly',
'noturgency',
'noturgent',
'noturgently',
'notuseless',
'notusurp',
'notusurper',
'notutter',
'notutterly',
'notvagrant',
'notvague',
'notvagueness',
'notvain',
'notvainly',
'notvanish',
'notvanity',
'notvehement',
'notvehemently',
'notvengeance',
'notvengeful',
'notvengefully',
'notvengefulness',
'notvenom',
'notvenomous',
'notvenomously',
'notvent',
'notveryabandon',
'notveryabandoned',
'notveryabandonment',
'notveryabase',
'notveryabasement',
'notveryabash',
'notveryabate',
'notveryabdicate',
'notveryaberration',
'notveryabhor',
'notveryabhorred',
'notveryabhorrence',
'notveryabhorrent',
'notveryabhorrently',
'notveryabhors',
'notveryabject',
'notveryabjectly',
'notveryabjure',
'notveryabnormal',
'notveryabolish',
'notveryabominable',
'notveryabominably',
'notveryabominate',
'notveryabomination',
'notveryabrade',
'notveryabrasive',
'notveryabrupt',
'notveryabscond',
'notveryabsence',
'notveryabsent-minded',
'notveryabsentee',
'notveryabsurd',
'notveryabsurdity',
'notveryabsurdly',
'notveryabsurdness',
'notveryabuse',
'notveryabused',
'notveryabuses',
'notveryabusive',
'notveryabysmal',
'notveryabysmally',
'notveryabyss',
'notveryaccidental',
'notveryaccost',
'notveryaccursed',
'notveryaccusation',
'notveryaccusations',
'notveryaccuse',
'notveryaccused',
'notveryaccuses',
'notveryaccusing',
'notveryaccusingly',
'notveryacerbate',
'notveryacerbic',
'notveryacerbically',
'notveryache',
'notveryacrid',
'notveryacridly',
'notveryacridness',
'notveryacrimonious',
'notveryacrimoniously',
'notveryacrimony',
'notveryadamant',
'notveryadamantly',
'notveryaddict',
'notveryaddicted',
'notveryaddiction',
'notveryadmonish',
'notveryadmonisher',
'notveryadmonishingly',
'notveryadmonishment',
'notveryadmonition',
'notveryadrift',
'notveryadulterate',
'notveryadulterated',
'notveryadulteration',
'notveryadversarial',
'notveryadversary',
'notveryadverse',
'notveryadversity',
'notveryaffectation',
'notveryafflict',
'notveryaffliction',
'notveryafflictive',
'notveryaffront',
'notveryafraid',
'notveryaggravate',
'notveryaggravated',
'notveryaggravating',
'notveryaggravation',
'notveryaggression',
'notveryaggressive',
'notveryaggressiveness',
'notveryaggressor',
'notveryaggrieve',
'notveryaggrieved',
'notveryaghast',
'notveryagitate',
'notveryagitated',
'notveryagitation',
'notveryagitator',
'notveryagonies',
'notveryagonize',
'notveryagonizing',
'notveryagonizingly',
'notveryagony',
'notveryail',
'notveryailment',
'notveryaimless',
'notveryairs',
'notveryalarm',
'notveryalarmed',
'notveryalarming',
'notveryalarmingly',
'notveryalas',
'notveryalienate',
'notveryalienated',
'notveryalienation',
'notveryallegation',
'notveryallegations',
'notveryallege',
'notveryallergic',
'notveryalone',
'notveryaloof',
'notveryaltercation',
'notveryambiguity',
'notveryambiguous',
'notveryambivalence',
'notveryambivalent',
'notveryambush',
'notveryamiss',
'notveryamputate',
'notveryanarchism',
'notveryanarchist',
'notveryanarchistic',
'notveryanarchy',
'notveryanemic',
'notveryanger',
'notveryangrily',
'notveryangriness',
'notveryangry',
'notveryanguish',
'notveryanimosity',
'notveryannihilate',
'notveryannihilation',
'notveryannoy',
'notveryannoyance',
'notveryannoyed',
'notveryannoying',
'notveryannoyingly',
'notveryanomalous',
'notveryanomaly',
'notveryantagonism',
'notveryantagonist',
'notveryantagonistic',
'notveryantagonize',
'notveryanti-',
'notveryanti-american',
'notveryanti-israeli',
'notveryanti-occupation',
'notveryanti-proliferation',
'notveryanti-semites',
'notveryanti-social',
'notveryanti-us',
'notveryanti-white',
'notveryantipathy',
'notveryantiquated',
'notveryantithetical',
'notveryanxieties',
'notveryanxiety',
'notveryanxious',
'notveryanxiously',
'notveryanxiousness',
'notveryapathetic',
'notveryapathetically',
'notveryapathy',
'notveryape',
'notveryapocalypse',
'notveryapocalyptic',
'notveryapologist',
'notveryapologists',
'notveryappal',
'notveryappall',
'notveryappalled',
'notveryappalling',
'notveryappallingly',
'notveryapprehension',
'notveryapprehensions',
'notveryapprehensive',
'notveryapprehensively',
'notveryarbitrary',
'notveryarcane',
'notveryarchaic',
'notveryarduous',
'notveryarduously',
'notveryargue',
'notveryargument',
'notveryargumentative',
'notveryarguments',
'notveryarrogance',
'notveryarrogant',
'notveryarrogantly',
'notveryartificial',
'notveryashamed',
'notveryasinine',
'notveryasininely',
'notveryasinininity',
'notveryaskance',
'notveryasperse',
'notveryaspersion',
'notveryaspersions',
'notveryassail',
'notveryassassin',
'notveryassassinate',
'notveryassault',
'notveryassaulted',
'notveryastray',
'notveryasunder',
'notveryatrocious',
'notveryatrocities',
'notveryatrocity',
'notveryatrophy',
'notveryattack',
'notveryattacked',
'notveryaudacious',
'notveryaudaciously',
'notveryaudaciousness',
'notveryaudacity',
'notveryaustere',
'notveryauthoritarian',
'notveryautocrat',
'notveryautocratic',
'notveryavalanche',
'notveryavarice',
'notveryavaricious',
'notveryavariciously',
'notveryavenge',
'notveryaverse',
'notveryaversion',
'notveryavoid',
'notveryavoidance',
'notveryavoided',
'notveryawful',
'notveryawfulness',
'notveryawkward',
'notveryawkwardness',
'notveryax',
'notverybabble',
'notverybackbite',
'notverybackbiting',
'notverybackward',
'notverybackwardness',
'notverybad',
'notverybadgered',
'notverybadly',
'notverybaffle',
'notverybaffled',
'notverybafflement',
'notverybaffling',
'notverybait',
'notverybalk',
'notverybanal',
'notverybanalize',
'notverybane',
'notverybanish',
'notverybanishment',
'notverybankrupt',
'notverybanned',
'notverybar',
'notverybarbarian',
'notverybarbaric',
'notverybarbarically',
'notverybarbarity',
'notverybarbarous',
'notverybarbarously',
'notverybarely',
'notverybarren',
'notverybaseless',
'notverybashful',
'notverybastard',
'notverybattered',
'notverybattering',
'notverybattle',
'notverybattle-lines',
'notverybattlefield',
'notverybattleground',
'notverybatty',
'notverybearish',
'notverybeast',
'notverybeastly',
'notverybeat',
'notverybeaten',
'notverybedlam',
'notverybedlamite',
'notverybefoul',
'notverybeg',
'notverybeggar',
'notverybeggarly',
'notverybegging',
'notverybeguile',
'notverybelabor',
'notverybelated',
'notverybeleaguer',
'notverybelie',
'notverybelittle',
'notverybelittled',
'notverybelittling',
'notverybellicose',
'notverybelligerence',
'notverybelligerent',
'notverybelligerently',
'notverybemoan',
'notverybemoaning',
'notverybemused',
'notverybent',
'notveryberate',
'notveryberated',
'notverybereave',
'notverybereavement',
'notverybereft',
'notveryberserk',
'notverybeseech',
'notverybeset',
'notverybesiege',
'notverybesmirch',
'notverybestial',
'notverybetray',
'notverybetrayal',
'notverybetrayals',
'notverybetrayed',
'notverybetrayer',
'notverybewail',
'notverybeware',
'notverybewilder',
'notverybewildered',
'notverybewildering',
'notverybewilderingly',
'notverybewilderment',
'notverybewitch',
'notverybias',
'notverybiased',
'notverybiases',
'notverybicker',
'notverybickering',
'notverybid-rigging',
'notverybitch',
'notverybitchy',
'notverybiting',
'notverybitingly',
'notverybitter',
'notverybitterly',
'notverybitterness',
'notverybizarre',
'notverybizzare',
'notveryblab',
'notveryblabber',
'notveryblack',
'notveryblacklisted',
'notveryblackmail',
'notveryblackmailed',
'notveryblah',
'notveryblame',
'notveryblamed',
'notveryblameworthy',
'notverybland',
'notveryblandish',
'notveryblaspheme',
'notveryblasphemous',
'notveryblasphemy',
'notveryblast',
'notveryblasted',
'notveryblatant',
'notveryblatantly',
'notveryblather',
'notverybleak',
'notverybleakly',
'notverybleakness',
'notverybleed',
'notveryblemish',
'notveryblind',
'notveryblinding',
'notveryblindingly',
'notveryblindness',
'notveryblindside',
'notveryblister',
'notveryblistering',
'notverybloated',
'notveryblock',
'notveryblockhead',
'notveryblood',
'notverybloodshed',
'notverybloodthirsty',
'notverybloody',
'notveryblow',
'notveryblunder',
'notveryblundering',
'notveryblunders',
'notveryblunt',
'notveryblur',
'notveryblurt',
'notveryboast',
'notveryboastful',
'notveryboggle',
'notverybogus',
'notveryboil',
'notveryboiling',
'notveryboisterous',
'notverybomb',
'notverybombard',
'notverybombardment',
'notverybombastic',
'notverybondage',
'notverybonkers',
'notverybore',
'notverybored',
'notveryboredom',
'notveryboring',
'notverybotch',
'notverybother',
'notverybothered',
'notverybothersome',
'notverybounded',
'notverybowdlerize',
'notveryboycott',
'notverybrag',
'notverybraggart',
'notverybragger',
'notverybrainwash',
'notverybrash',
'notverybrashly',
'notverybrashness',
'notverybrat',
'notverybravado',
'notverybrazen',
'notverybrazenly',
'notverybrazenness',
'notverybreach',
'notverybreak',
'notverybreak-point',
'notverybreakdown',
'notverybrimstone',
'notverybristle',
'notverybrittle',
'notverybroke',
'notverybroken',
'notverybroken-hearted',
'notverybrood',
'notverybrowbeat',
'notverybruise',
'notverybruised',
'notverybrusque',
'notverybrutal',
'notverybrutalising',
'notverybrutalities',
'notverybrutality',
'notverybrutalize',
'notverybrutalizing',
'notverybrutally',
'notverybrute',
'notverybrutish',
'notverybuckle',
'notverybug',
'notverybugged',
'notverybulky',
'notverybullied',
'notverybullies',
'notverybully',
'notverybullyingly',
'notverybum',
'notverybummed',
'notverybumpy',
'notverybungle',
'notverybungler',
'notverybunk',
'notveryburden',
'notveryburdened',
'notveryburdensome',
'notveryburdensomely',
'notveryburn',
'notveryburned',
'notverybusy',
'notverybusybody',
'notverybutcher',
'notverybutchery',
'notverybyzantine',
'notverycackle',
'notverycaged',
'notverycajole',
'notverycalamities',
'notverycalamitous',
'notverycalamitously',
'notverycalamity',
'notverycallous',
'notverycalumniate',
'notverycalumniation',
'notverycalumnies',
'notverycalumnious',
'notverycalumniously',
'notverycalumny',
'notverycancer',
'notverycancerous',
'notverycannibal',
'notverycannibalize',
'notverycapitulate',
'notverycapricious',
'notverycapriciously',
'notverycapriciousness',
'notverycapsize',
'notverycaptive',
'notverycareless',
'notverycarelessness',
'notverycaricature',
'notverycarnage',
'notverycarp',
'notverycartoon',
'notverycartoonish',
'notverycash-strapped',
'notverycastigate',
'notverycasualty',
'notverycataclysm',
'notverycataclysmal',
'notverycataclysmic',
'notverycataclysmically',
'notverycatastrophe',
'notverycatastrophes',
'notverycatastrophic',
'notverycatastrophically',
'notverycaustic',
'notverycaustically',
'notverycautionary',
'notverycautious',
'notverycave',
'notverycensure',
'notverychafe',
'notverychaff',
'notverychagrin',
'notverychallenge',
'notverychallenging',
'notverychaos',
'notverychaotic',
'notverycharisma',
'notverychased',
'notverychasten',
'notverychastise',
'notverychastisement',
'notverychatter',
'notverychatterbox',
'notverycheap',
'notverycheapen',
'notverycheat',
'notverycheated',
'notverycheater',
'notverycheerless',
'notverychicken',
'notverychide',
'notverychildish',
'notverychill',
'notverychilly',
'notverychit',
'notverychoke',
'notverychoppy',
'notverychore',
'notverychronic',
'notveryclamor',
'notveryclamorous',
'notveryclash',
'notveryclaustrophobic',
'notverycliche',
'notverycliched',
'notveryclingy',
'notveryclique',
'notveryclog',
'notveryclose',
'notveryclosed',
'notverycloud',
'notveryclueless',
'notveryclumsy',
'notverycoarse',
'notverycoaxed',
'notverycocky',
'notverycodependent',
'notverycoerce',
'notverycoerced',
'notverycoercion',
'notverycoercive',
'notverycold',
'notverycoldly',
'notverycollapse',
'notverycollide',
'notverycollude',
'notverycollusion',
'notverycombative',
'notverycomedy',
'notverycomical',
'notverycommanded',
'notverycommiserate',
'notverycommonplace',
'notverycommotion',
'notverycompared',
'notverycompel',
'notverycompetitive',
'notverycomplacent',
'notverycomplain',
'notverycomplaining',
'notverycomplaint',
'notverycomplaints',
'notverycomplicate',
'notverycomplicated',
'notverycomplication',
'notverycomplicit',
'notverycompulsion',
'notverycompulsive',
'notverycompulsory',
'notveryconcede',
'notveryconceit',
'notveryconceited',
'notveryconcern',
'notveryconcerned',
'notveryconcerns',
'notveryconcession',
'notveryconcessions',
'notverycondemn',
'notverycondemnable',
'notverycondemnation',
'notverycondescend',
'notverycondescending',
'notverycondescendingly',
'notverycondescension',
'notverycondolence',
'notverycondolences',
'notveryconfess',
'notveryconfession',
'notveryconfessions',
'notveryconfined',
'notveryconflict',
'notveryconflicted',
'notveryconfound',
'notveryconfounded',
'notveryconfounding',
'notveryconfront',
'notveryconfrontation',
'notveryconfrontational',
'notveryconfronted',
'notveryconfuse',
'notveryconfused',
'notveryconfusing',
'notveryconfusion',
'notverycongested',
'notverycongestion',
'notveryconned',
'notveryconspicuous',
'notveryconspicuously',
'notveryconspiracies',
'notveryconspiracy',
'notveryconspirator',
'notveryconspiratorial',
'notveryconspire',
'notveryconsternation',
'notveryconstrain',
'notveryconstraint',
'notveryconsume',
'notveryconsumed',
'notverycontagious',
'notverycontaminate',
'notverycontamination',
'notverycontemplative',
'notverycontempt',
'notverycontemptible',
'notverycontemptuous',
'notverycontemptuously',
'notverycontend',
'notverycontention',
'notverycontentious',
'notverycontort',
'notverycontortions',
'notverycontradict',
'notverycontradiction',
'notverycontradictory',
'notverycontrariness',
'notverycontrary',
'notverycontravene',
'notverycontrive',
'notverycontrived',
'notverycontrolled',
'notverycontroversial',
'notverycontroversy',
'notveryconvicted',
'notveryconvoluted',
'notverycoping',
'notverycornered',
'notverycorralled',
'notverycorrode',
'notverycorrosion',
'notverycorrosive',
'notverycorrupt',
'notverycorruption',
'notverycostly',
'notverycounterproductive',
'notverycoupists',
'notverycovetous',
'notverycovetously',
'notverycow',
'notverycoward',
'notverycowardly',
'notverycrabby',
'notverycrackdown',
'notverycrafty',
'notverycramped',
'notverycranky',
'notverycrap',
'notverycrappy',
'notverycrass',
'notverycraven',
'notverycravenly',
'notverycraze',
'notverycrazily',
'notverycraziness',
'notverycrazy',
'notverycredulous',
'notverycreepy',
'notverycrime',
'notverycriminal',
'notverycringe',
'notverycripple',
'notverycrippling',
'notverycrisis',
'notverycritic',
'notverycritical',
'notverycriticism',
'notverycriticisms',
'notverycriticize',
'notverycriticized',
'notverycritics',
'notverycrook',
'notverycrooked',
'notverycross',
'notverycrowded',
'notverycruddy',
'notverycrude',
'notverycruel',
'notverycruelties',
'notverycruelty',
'notverycrumble',
'notverycrummy',
'notverycrumple',
'notverycrush',
'notverycrushed',
'notverycrushing',
'notverycry',
'notveryculpable',
'notverycumbersome',
'notverycuplrit',
'notverycurse',
'notverycursed',
'notverycurses',
'notverycursory',
'notverycurt',
'notverycuss',
'notverycut',
'notverycutthroat',
'notverycynical',
'notverycynicism',
'notverydamage',
'notverydamaged',
'notverydamaging',
'notverydamn',
'notverydamnable',
'notverydamnably',
'notverydamnation',
'notverydamned',
'notverydamning',
'notverydanger',
'notverydangerous',
'notverydangerousness',
'notverydangle',
'notverydark',
'notverydarken',
'notverydarkness',
'notverydarn',
'notverydash',
'notverydastard',
'notverydastardly',
'notverydaunt',
'notverydaunting',
'notverydauntingly',
'notverydawdle',
'notverydaze',
'notverydazed',
'notverydead',
'notverydeadbeat',
'notverydeadlock',
'notverydeadly',
'notverydeadweight',
'notverydeaf',
'notverydearth',
'notverydeath',
'notverydebacle',
'notverydebase',
'notverydebasement',
'notverydebaser',
'notverydebatable',
'notverydebate',
'notverydebauch',
'notverydebaucher',
'notverydebauchery',
'notverydebilitate',
'notverydebilitating',
'notverydebility',
'notverydecadence',
'notverydecadent',
'notverydecay',
'notverydecayed',
'notverydeceit',
'notverydeceitful',
'notverydeceitfully',
'notverydeceitfulness',
'notverydeceive',
'notverydeceived',
'notverydeceiver',
'notverydeceivers',
'notverydeceiving',
'notverydeception',
'notverydeceptive',
'notverydeceptively',
'notverydeclaim',
'notverydecline',
'notverydeclining',
'notverydecrease',
'notverydecreasing',
'notverydecrement',
'notverydecrepit',
'notverydecrepitude',
'notverydecry',
'notverydeep',
'notverydeepening',
'notverydefamation',
'notverydefamations',
'notverydefamatory',
'notverydefame',
'notverydefamed',
'notverydefeat',
'notverydefeated',
'notverydefect',
'notverydefective',
'notverydefenseless',
'notverydefensive',
'notverydefiance',
'notverydefiant',
'notverydefiantly',
'notverydeficiency',
'notverydeficient',
'notverydefile',
'notverydefiler',
'notverydeflated',
'notverydeform',
'notverydeformed',
'notverydefrauding',
'notverydefunct',
'notverydefy',
'notverydegenerate',
'notverydegenerately',
'notverydegeneration',
'notverydegradation',
'notverydegrade',
'notverydegraded',
'notverydegrading',
'notverydegradingly',
'notverydehumanization',
'notverydehumanize',
'notverydehumanized',
'notverydeign',
'notverydeject',
'notverydejected',
'notverydejectedly',
'notverydejection',
'notverydelicate',
'notverydelinquency',
'notverydelinquent',
'notverydelirious',
'notverydelirium',
'notverydelude',
'notverydeluded',
'notverydeluge',
'notverydelusion',
'notverydelusional',
'notverydelusions',
'notverydemand',
'notverydemanding',
'notverydemands',
'notverydemean',
'notverydemeaned',
'notverydemeaning',
'notverydemented',
'notverydemise',
'notverydemolish',
'notverydemolisher',
'notverydemon',
'notverydemonic',
'notverydemonize',
'notverydemoralize',
'notverydemoralized',
'notverydemoralizing',
'notverydemoralizingly',
'notverydemotivated',
'notverydenial',
'notverydenigrate',
'notverydenounce',
'notverydenunciate',
'notverydenunciation',
'notverydenunciations',
'notverydeny',
'notverydependent',
'notverydeplete',
'notverydepleted',
'notverydeplorable',
'notverydeplorably',
'notverydeplore',
'notverydeploring',
'notverydeploringly',
'notverydeprave',
'notverydepraved',
'notverydepravedly',
'notverydeprecate',
'notverydepress',
'notverydepressed',
'notverydepressing',
'notverydepressingly',
'notverydepression',
'notverydeprive',
'notverydeprived',
'notveryderide',
'notveryderision',
'notveryderisive',
'notveryderisively',
'notveryderisiveness',
'notveryderogatory',
'notverydesecrate',
'notverydesert',
'notverydeserted',
'notverydesertion',
'notverydesiccate',
'notverydesiccated',
'notverydesolate',
'notverydesolately',
'notverydesolation',
'notverydespair',
'notverydespairing',
'notverydespairingly',
'notverydesperate',
'notverydesperately',
'notverydesperation',
'notverydespicable',
'notverydespicably',
'notverydespise',
'notverydespised',
'notverydespoil',
'notverydespoiler',
'notverydespondence',
'notverydespondency',
'notverydespondent',
'notverydespondently',
'notverydespot',
'notverydespotic',
'notverydespotism',
'notverydestabilisation',
'notverydestitute',
'notverydestitution',
'notverydestroy',
'notverydestroyed',
'notverydestroyer',
'notverydestruction',
'notverydestructive',
'notverydesultory',
'notverydetached',
'notverydeter',
'notverydeteriorate',
'notverydeteriorating',
'notverydeterioration',
'notverydeterrent',
'notverydetest',
'notverydetestable',
'notverydetestably',
'notverydetested',
'notverydetract',
'notverydetraction',
'notverydetriment',
'notverydetrimental',
'notverydevalued',
'notverydevastate',
'notverydevastated',
'notverydevastating',
'notverydevastatingly',
'notverydevastation',
'notverydeviant',
'notverydeviate',
'notverydeviation',
'notverydevil',
'notverydevilish',
'notverydevilishly',
'notverydevilment',
'notverydevilry',
'notverydevious',
'notverydeviously',
'notverydeviousness',
'notverydevoid',
'notverydiabolic',
'notverydiabolical',
'notverydiabolically',
'notverydiagnosed',
'notverydiametrically',
'notverydiatribe',
'notverydiatribes',
'notverydictator',
'notverydictatorial',
'notverydiffer',
'notverydifferent',
'notverydifficult',
'notverydifficulties',
'notverydifficulty',
'notverydiffidence',
'notverydig',
'notverydigress',
'notverydilapidated',
'notverydilemma',
'notverydilly-dally',
'notverydim',
'notverydiminish',
'notverydiminishing',
'notverydin',
'notverydinky',
'notverydire',
'notverydirectionless',
'notverydirely',
'notverydireness',
'notverydirt',
'notverydirty',
'notverydisable',
'notverydisabled',
'notverydisaccord',
'notverydisadvantage',
'notverydisadvantaged',
'notverydisadvantageous',
'notverydisaffect',
'notverydisaffected',
'notverydisaffirm',
'notverydisagree',
'notverydisagreeable',
'notverydisagreeably',
'notverydisagreement',
'notverydisallow',
'notverydisappoint',
'notverydisappointed',
'notverydisappointing',
'notverydisappointingly',
'notverydisappointment',
'notverydisapprobation',
'notverydisapproval',
'notverydisapprove',
'notverydisapproving',
'notverydisarm',
'notverydisarray',
'notverydisaster',
'notverydisastrous',
'notverydisastrously',
'notverydisavow',
'notverydisavowal',
'notverydisbelief',
'notverydisbelieve',
'notverydisbelieved',
'notverydisbeliever',
'notverydiscardable',
'notverydiscarded',
'notverydisclaim',
'notverydiscombobulate',
'notverydiscomfit',
'notverydiscomfititure',
'notverydiscomfort',
'notverydiscompose',
'notverydisconcert',
'notverydisconcerted',
'notverydisconcerting',
'notverydisconcertingly',
'notverydisconnected',
'notverydisconsolate',
'notverydisconsolately',
'notverydisconsolation',
'notverydiscontent',
'notverydiscontented',
'notverydiscontentedly',
'notverydiscontinuity',
'notverydiscord',
'notverydiscordance',
'notverydiscordant',
'notverydiscountenance',
'notverydiscourage',
'notverydiscouraged',
'notverydiscouragement',
'notverydiscouraging',
'notverydiscouragingly',
'notverydiscourteous',
'notverydiscourteously',
'notverydiscredit',
'notverydiscrepant',
'notverydiscriminate',
'notverydiscriminated',
'notverydiscrimination',
'notverydiscriminatory',
'notverydisdain',
'notverydisdainful',
'notverydisdainfully',
'notverydisease',
'notverydiseased',
'notverydisempowered',
'notverydisenchanted',
'notverydisfavor',
'notverydisgrace',
'notverydisgraced',
'notverydisgraceful',
'notverydisgracefully',
'notverydisgruntle',
'notverydisgruntled',
'notverydisgust',
'notverydisgusted',
'notverydisgustedly',
'notverydisgustful',
'notverydisgustfully',
'notverydisgusting',
'notverydisgustingly',
'notverydishearten',
'notverydisheartened',
'notverydisheartening',
'notverydishearteningly',
'notverydishonest',
'notverydishonestly',
'notverydishonesty',
'notverydishonor',
'notverydishonorable',
'notverydishonorablely',
'notverydisillusion',
'notverydisillusioned',
'notverydisinclination',
'notverydisinclined',
'notverydisingenuous',
'notverydisingenuously',
'notverydisintegrate',
'notverydisintegration',
'notverydisinterest',
'notverydisinterested',
'notverydislike',
'notverydisliked',
'notverydislocated',
'notverydisloyal',
'notverydisloyalty',
'notverydismal',
'notverydismally',
'notverydismalness',
'notverydismay',
'notverydismayed',
'notverydismaying',
'notverydismayingly',
'notverydismissive',
'notverydismissively',
'notverydisobedience',
'notverydisobedient',
'notverydisobey',
'notverydisorder',
'notverydisordered',
'notverydisorderly',
'notverydisorganized',
'notverydisorient',
'notverydisoriented',
'notverydisown',
'notverydisowned',
'notverydisparage',
'notverydisparaging',
'notverydisparagingly',
'notverydispensable',
'notverydispirit',
'notverydispirited',
'notverydispiritedly',
'notverydispiriting',
'notverydisplace',
'notverydisplaced',
'notverydisplease',
'notverydispleased',
'notverydispleasing',
'notverydispleasure',
'notverydisposable',
'notverydisproportionate',
'notverydisprove',
'notverydisputable',
'notverydispute',
'notverydisputed',
'notverydisquiet',
'notverydisquieting',
'notverydisquietingly',
'notverydisquietude',
'notverydisregard',
'notverydisregarded',
'notverydisregardful',
'notverydisreputable',
'notverydisrepute',
'notverydisrespect',
'notverydisrespectable',
'notverydisrespectablity',
'notverydisrespected',
'notverydisrespectful',
'notverydisrespectfully',
'notverydisrespectfulness',
'notverydisrespecting',
'notverydisrupt',
'notverydisruption',
'notverydisruptive',
'notverydissatisfaction',
'notverydissatisfactory',
'notverydissatisfied',
'notverydissatisfy',
'notverydissatisfying',
'notverydissemble',
'notverydissembler',
'notverydissension',
'notverydissent',
'notverydissenter',
'notverydissention',
'notverydisservice',
'notverydissidence',
'notverydissident',
'notverydissidents',
'notverydissocial',
'notverydissolute',
'notverydissolution',
'notverydissonance',
'notverydissonant',
'notverydissonantly',
'notverydissuade',
'notverydissuasive',
'notverydistant',
'notverydistaste',
'notverydistasteful',
'notverydistastefully',
'notverydistort',
'notverydistortion',
'notverydistract',
'notverydistracted',
'notverydistracting',
'notverydistraction',
'notverydistraught',
'notverydistraughtly',
'notverydistraughtness',
'notverydistress',
'notverydistressed',
'notverydistressing',
'notverydistressingly',
'notverydistrust',
'notverydistrustful',
'notverydistrusting',
'notverydisturb',
'notverydisturbed',
'notverydisturbed-let',
'notverydisturbing',
'notverydisturbingly',
'notverydisunity',
'notverydisvalue',
'notverydivergent',
'notverydivide',
'notverydivided',
'notverydivision',
'notverydivisive',
'notverydivisively',
'notverydivisiveness',
'notverydivorce',
'notverydivorced',
'notverydizzing',
'notverydizzingly',
'notverydizzy',
'notverydoddering',
'notverydodgey',
'notverydogged',
'notverydoggedly',
'notverydogmatic',
'notverydoldrums',
'notverydominance',
'notverydominate',
'notverydominated',
'notverydomination',
'notverydomineer',
'notverydomineering',
'notverydoom',
'notverydoomed',
'notverydoomsday',
'notverydope',
'notverydoubt',
'notverydoubted',
'notverydoubtful',
'notverydoubtfully',
'notverydoubts',
'notverydown',
'notverydownbeat',
'notverydowncast',
'notverydowner',
'notverydownfall',
'notverydownfallen',
'notverydowngrade',
'notverydownhearted',
'notverydownheartedly',
'notverydownside',
'notverydowntrodden',
'notverydrab',
'notverydraconian',
'notverydraconic',
'notverydragon',
'notverydragons',
'notverydragoon',
'notverydrain',
'notverydrained',
'notverydrama',
'notverydramatic',
'notverydrastic',
'notverydrastically',
'notverydread',
'notverydreadful',
'notverydreadfully',
'notverydreadfulness',
'notverydreary',
'notverydrones',
'notverydroop',
'notverydropped',
'notverydrought',
'notverydrowning',
'notverydrunk',
'notverydrunkard',
'notverydrunken',
'notverydry',
'notverydubious',
'notverydubiously',
'notverydubitable',
'notverydud',
'notverydull',
'notverydullard',
'notverydumb',
'notverydumbfound',
'notverydumbfounded',
'notverydummy',
'notverydump',
'notverydumped',
'notverydunce',
'notverydungeon',
'notverydungeons',
'notverydupe',
'notveryduped',
'notverydusty',
'notverydwindle',
'notverydwindling',
'notverydying',
'notveryearsplitting',
'notveryeccentric',
'notveryeccentricity',
'notveryedgy',
'notveryeffigy',
'notveryeffrontery',
'notveryego',
'notveryegocentric',
'notveryegomania',
'notveryegotism',
'notveryegotistic',
'notveryegotistical',
'notveryegotistically',
'notveryegregious',
'notveryegregiously',
'notveryejaculate',
'notveryelection-rigger',
'notveryeliminate',
'notveryelimination',
'notveryelusive',
'notveryemaciated',
'notveryemancipated',
'notveryemasculate',
'notveryemasculated',
'notveryembarrass',
'notveryembarrassed',
'notveryembarrassing',
'notveryembarrassingly',
'notveryembarrassment',
'notveryembattled',
'notveryembroil',
'notveryembroiled',
'notveryembroilment',
'notveryemotional',
'notveryemotionless',
'notveryempathize',
'notveryempathy',
'notveryemphatic',
'notveryemphatically',
'notveryemptiness',
'notveryempty',
'notveryencroach',
'notveryencroachment',
'notveryencumbered',
'notveryendanger',
'notveryendangered',
'notveryendless',
'notveryenemies',
'notveryenemy',
'notveryenervate',
'notveryenfeeble',
'notveryenflame',
'notveryengulf',
'notveryenjoin',
'notveryenmity',
'notveryenormities',
'notveryenormity',
'notveryenormous',
'notveryenormously',
'notveryenrage',
'notveryenraged',
'notveryenslave',
'notveryenslaved',
'notveryentangle',
'notveryentangled',
'notveryentanglement',
'notveryentrap',
'notveryentrapment',
'notveryenvious',
'notveryenviously',
'notveryenviousness',
'notveryenvy',
'notveryepidemic',
'notveryequivocal',
'notveryeradicate',
'notveryerase',
'notveryerode',
'notveryerosion',
'notveryerr',
'notveryerrant',
'notveryerratic',
'notveryerratically',
'notveryerroneous',
'notveryerroneously',
'notveryerror',
'notveryescapade',
'notveryeschew',
'notveryesoteric',
'notveryestranged',
'notveryeternal',
'notveryevade',
'notveryevaded',
'notveryevasion',
'notveryevasive',
'notveryevicted',
'notveryevil',
'notveryevildoer',
'notveryevils',
'notveryeviscerate',
'notveryexacerbate',
'notveryexacting',
'notveryexaggerate',
'notveryexaggeration',
'notveryexasperate',
'notveryexasperating',
'notveryexasperatingly',
'notveryexasperation',
'notveryexcessive',
'notveryexcessively',
'notveryexclaim',
'notveryexclude',
'notveryexcluded',
'notveryexclusion',
'notveryexcoriate',
'notveryexcruciating',
'notveryexcruciatingly',
'notveryexcuse',
'notveryexcuses',
'notveryexecrate',
'notveryexhaust',
'notveryexhausted',
'notveryexhaustion',
'notveryexhort',
'notveryexile',
'notveryexorbitant',
'notveryexorbitantance',
'notveryexorbitantly',
'notveryexpediencies',
'notveryexpedient',
'notveryexpel',
'notveryexpensive',
'notveryexpire',
'notveryexplode',
'notveryexploit',
'notveryexploitation',
'notveryexplosive',
'notveryexpose',
'notveryexposed',
'notveryexpropriate',
'notveryexpropriation',
'notveryexpulse',
'notveryexpunge',
'notveryexterminate',
'notveryextermination',
'notveryextinguish',
'notveryextort',
'notveryextortion',
'notveryextraneous',
'notveryextravagance',
'notveryextravagant',
'notveryextravagantly',
'notveryextreme',
'notveryextremely',
'notveryextremism',
'notveryextremist',
'notveryextremists',
'notveryfabricate',
'notveryfabrication',
'notveryfacetious',
'notveryfacetiously',
'notveryfading',
'notveryfail',
'notveryfailful',
'notveryfailing',
'notveryfailure',
'notveryfailures',
'notveryfaint',
'notveryfainthearted',
'notveryfaithless',
'notveryfake',
'notveryfall',
'notveryfallacies',
'notveryfallacious',
'notveryfallaciously',
'notveryfallaciousness',
'notveryfallacy',
'notveryfallout',
'notveryfalse',
'notveryfalsehood',
'notveryfalsely',
'notveryfalsify',
'notveryfalter',
'notveryfamine',
'notveryfamished',
'notveryfanatic',
'notveryfanatical',
'notveryfanatically',
'notveryfanaticism',
'notveryfanatics',
'notveryfanciful',
'notveryfar-fetched',
'notveryfarce',
'notveryfarcical',
'notveryfarcical-yet-provocative',
'notveryfarcically',
'notveryfarfetched',
'notveryfascism',
'notveryfascist',
'notveryfastidious',
'notveryfastidiously',
'notveryfastuous',
'notveryfat',
'notveryfatal',
'notveryfatalistic',
'notveryfatalistically',
'notveryfatally',
'notveryfateful',
'notveryfatefully',
'notveryfathomless',
'notveryfatigue',
'notveryfatty',
'notveryfatuity',
'notveryfatuous',
'notveryfatuously',
'notveryfault',
'notveryfaulty',
'notveryfawningly',
'notveryfaze',
'notveryfear',
'notveryfearful',
'notveryfearfully',
'notveryfears',
'notveryfearsome',
'notveryfeckless',
'notveryfeeble',
'notveryfeeblely',
'notveryfeebleminded',
'notveryfeign',
'notveryfeint',
'notveryfell',
'notveryfelon',
'notveryfelonious',
'notveryferocious',
'notveryferociously',
'notveryferocity',
'notveryfetid',
'notveryfever',
'notveryfeverish',
'notveryfiasco',
'notveryfiat',
'notveryfib',
'notveryfibber',
'notveryfickle',
'notveryfiction',
'notveryfictional',
'notveryfictitious',
'notveryfidget',
'notveryfidgety',
'notveryfiend',
'notveryfiendish',
'notveryfierce',
'notveryfight',
'notveryfigurehead',
'notveryfilth',
'notveryfilthy',
'notveryfinagle',
'notveryfissures',
'notveryfist',
'notveryflabbergast',
'notveryflabbergasted',
'notveryflagging',
'notveryflagrant',
'notveryflagrantly',
'notveryflak',
'notveryflake',
'notveryflakey',
'notveryflaky',
'notveryflash',
'notveryflashy',
'notveryflat-out',
'notveryflaunt',
'notveryflaw',
'notveryflawed',
'notveryflaws',
'notveryfleer',
'notveryfleeting',
'notveryflighty',
'notveryflimflam',
'notveryflimsy',
'notveryflirt',
'notveryflirty',
'notveryfloored',
'notveryflounder',
'notveryfloundering',
'notveryflout',
'notveryfluster',
'notveryfoe',
'notveryfool',
'notveryfoolhardy',
'notveryfoolish',
'notveryfoolishly',
'notveryfoolishness',
'notveryforbid',
'notveryforbidden',
'notveryforbidding',
'notveryforce',
'notveryforced',
'notveryforceful',
'notveryforeboding',
'notveryforebodingly',
'notveryforfeit',
'notveryforged',
'notveryforget',
'notveryforgetful',
'notveryforgetfully',
'notveryforgetfulness',
'notveryforgettable',
'notveryforgotten',
'notveryforlorn',
'notveryforlornly',
'notveryformidable',
'notveryforsake',
'notveryforsaken',
'notveryforswear',
'notveryfoul',
'notveryfoully',
'notveryfoulness',
'notveryfractious',
'notveryfractiously',
'notveryfracture',
'notveryfragile',
'notveryfragmented',
'notveryfrail',
'notveryfrantic',
'notveryfrantically',
'notveryfranticly',
'notveryfraternize',
'notveryfraud',
'notveryfraudulent',
'notveryfraught',
'notveryfrazzle',
'notveryfrazzled',
'notveryfreak',
'notveryfreakish',
'notveryfreakishly',
'notveryfrenetic',
'notveryfrenetically',
'notveryfrenzied',
'notveryfrenzy',
'notveryfret',
'notveryfretful',
'notveryfriction',
'notveryfrictions',
'notveryfriggin',
'notveryfright',
'notveryfrighten',
'notveryfrightened',
'notveryfrightening',
'notveryfrighteningly',
'notveryfrightful',
'notveryfrightfully',
'notveryfrigid',
'notveryfrivolous',
'notveryfrown',
'notveryfrozen',
'notveryfruitless',
'notveryfruitlessly',
'notveryfrustrate',
'notveryfrustrated',
'notveryfrustrating',
'notveryfrustratingly',
'notveryfrustration',
'notveryfudge',
'notveryfugitive',
'notveryfull-blown',
'notveryfulminate',
'notveryfumble',
'notveryfume',
'notveryfundamentalism',
'notveryfurious',
'notveryfuriously',
'notveryfuror',
'notveryfury',
'notveryfuss',
'notveryfussy',
'notveryfustigate',
'notveryfusty',
'notveryfutile',
'notveryfutilely',
'notveryfutility',
'notveryfuzzy',
'notverygabble',
'notverygaff',
'notverygaffe',
'notverygaga',
'notverygaggle',
'notverygainsay',
'notverygainsayer',
'notverygall',
'notverygalling',
'notverygallingly',
'notverygamble',
'notverygame',
'notverygape',
'notverygarbage',
'notverygarish',
'notverygasp',
'notverygauche',
'notverygaudy',
'notverygawk',
'notverygawky',
'notverygeezer',
'notverygenocide',
'notveryget-rich',
'notveryghastly',
'notveryghetto',
'notverygibber',
'notverygibberish',
'notverygibe',
'notveryglare',
'notveryglaring',
'notveryglaringly',
'notveryglib',
'notveryglibly',
'notveryglitch',
'notverygloatingly',
'notverygloom',
'notverygloomy',
'notverygloss',
'notveryglower',
'notveryglum',
'notveryglut',
'notverygnawing',
'notverygoad',
'notverygoading',
'notverygod-awful',
'notverygoddam',
'notverygoddamn',
'notverygoof',
'notverygossip',
'notverygothic',
'notverygraceless',
'notverygracelessly',
'notverygraft',
'notverygrandiose',
'notverygrapple',
'notverygrate',
'notverygrating',
'notverygratuitous',
'notverygratuitously',
'notverygrave',
'notverygravely',
'notverygreed',
'notverygreedy',
'notverygrey',
'notverygrief',
'notverygrievance',
'notverygrievances',
'notverygrieve',
'notverygrieving',
'notverygrievous',
'notverygrievously',
'notverygrill',
'notverygrim',
'notverygrimace',
'notverygrind',
'notverygripe',
'notverygrisly',
'notverygritty',
'notverygross',
'notverygrossly',
'notverygrotesque',
'notverygrouch',
'notverygrouchy',
'notverygrounded',
'notverygroundless',
'notverygrouse',
'notverygrowl',
'notverygrudge',
'notverygrudges',
'notverygrudging',
'notverygrudgingly',
'notverygruesome',
'notverygruesomely',
'notverygruff',
'notverygrumble',
'notverygrumpy',
'notveryguile',
'notveryguilt',
'notveryguiltily',
'notveryguilty',
'notverygullible',
'notveryhaggard',
'notveryhaggle',
'notveryhalfhearted',
'notveryhalfheartedly',
'notveryhallucinate',
'notveryhallucination',
'notveryhamper',
'notveryhamstring',
'notveryhamstrung',
'notveryhandicapped',
'notveryhaphazard',
'notveryhapless',
'notveryharangue',
'notveryharass',
'notveryharassment',
'notveryharboring',
'notveryharbors',
'notveryhard',
'notveryhard-hit',
'notveryhard-line',
'notveryhard-liner',
'notveryhardball',
'notveryharden',
'notveryhardened',
'notveryhardheaded',
'notveryhardhearted',
'notveryhardliner',
'notveryhardliners',
'notveryhardship',
'notveryhardships',
'notveryharm',
'notveryharmful',
'notveryharms',
'notveryharpy',
'notveryharridan',
'notveryharried',
'notveryharrow',
'notveryharsh',
'notveryharshly',
'notveryhassle',
'notveryhaste',
'notveryhasty',
'notveryhate',
'notveryhateful',
'notveryhatefully',
'notveryhatefulness',
'notveryhater',
'notveryhatred',
'notveryhaughtily',
'notveryhaughty',
'notveryhaunt',
'notveryhaunting',
'notveryhavoc',
'notveryhawkish',
'notveryhazard',
'notveryhazardous',
'notveryhazy',
'notveryheadache',
'notveryheadaches',
'notveryheartbreak',
'notveryheartbreaker',
'notveryheartbreaking',
'notveryheartbreakingly',
'notveryheartless',
'notveryheartrending',
'notveryheathen',
'notveryheavily',
'notveryheavy-handed',
'notveryheavyhearted',
'notveryheck',
'notveryheckle',
'notveryhectic',
'notveryhedge',
'notveryhedonistic',
'notveryheedless',
'notveryhegemonism',
'notveryhegemonistic',
'notveryhegemony',
'notveryheinous',
'notveryhell',
'notveryhell-bent',
'notveryhellion',
'notveryhelpless',
'notveryhelplessly',
'notveryhelplessness',
'notveryheresy',
'notveryheretic',
'notveryheretical',
'notveryhesitant',
'notveryhideous',
'notveryhideously',
'notveryhideousness',
'notveryhinder',
'notveryhindrance',
'notveryhoard',
'notveryhoax',
'notveryhobble',
'notveryhole',
'notveryhollow',
'notveryhoodwink',
'notveryhopeless',
'notveryhopelessly',
'notveryhopelessness',
'notveryhorde',
'notveryhorrendous',
'notveryhorrendously',
'notveryhorrible',
'notveryhorribly',
'notveryhorrid',
'notveryhorrific',
'notveryhorrifically',
'notveryhorrify',
'notveryhorrifying',
'notveryhorrifyingly',
'notveryhorror',
'notveryhorrors',
'notveryhostage',
'notveryhostile',
'notveryhostilities',
'notveryhostility',
'notveryhotbeds',
'notveryhothead',
'notveryhotheaded',
'notveryhothouse',
'notveryhubris',
'notveryhuckster',
'notveryhumbling',
'notveryhumiliate',
'notveryhumiliating',
'notveryhumiliation',
'notveryhunger',
'notveryhungry',
'notveryhurt',
'notveryhurtful',
'notveryhustler',
'notveryhypocrisy',
'notveryhypocrite',
'notveryhypocrites',
'notveryhypocritical',
'notveryhypocritically',
'notveryhysteria',
'notveryhysteric',
'notveryhysterical',
'notveryhysterically',
'notveryhysterics',
'notveryicy',
'notveryidiocies',
'notveryidiocy',
'notveryidiot',
'notveryidiotic',
'notveryidiotically',
'notveryidiots',
'notveryidle',
'notveryignoble',
'notveryignominious',
'notveryignominiously',
'notveryignominy',
'notveryignorance',
'notveryignorant',
'notveryignore',
'notveryignored',
'notveryill',
'notveryill-advised',
'notveryill-conceived',
'notveryill-fated',
'notveryill-favored',
'notveryill-mannered',
'notveryill-natured',
'notveryill-sorted',
'notveryill-tempered',
'notveryill-treated',
'notveryill-treatment',
'notveryill-usage',
'notveryill-used',
'notveryillegal',
'notveryillegally',
'notveryillegitimate',
'notveryillicit',
'notveryilliquid',
'notveryilliterate',
'notveryillness',
'notveryillogic',
'notveryillogical',
'notveryillogically',
'notveryillusion',
'notveryillusions',
'notveryillusory',
'notveryimaginary',
'notveryimbalance',
'notveryimbalanced',
'notveryimbecile',
'notveryimbroglio',
'notveryimmaterial',
'notveryimmature',
'notveryimminence',
'notveryimminent',
'notveryimminently',
'notveryimmobilized',
'notveryimmoderate',
'notveryimmoderately',
'notveryimmodest',
'notveryimmoral',
'notveryimmorality',
'notveryimmorally',
'notveryimmovable',
'notveryimpair',
'notveryimpaired',
'notveryimpasse',
'notveryimpassive',
'notveryimpatience',
'notveryimpatient',
'notveryimpatiently',
'notveryimpeach',
'notveryimpedance',
'notveryimpede',
'notveryimpediment',
'notveryimpending',
'notveryimpenitent',
'notveryimperfect',
'notveryimperfectly',
'notveryimperialist',
'notveryimperil',
'notveryimperious',
'notveryimperiously',
'notveryimpermissible',
'notveryimpersonal',
'notveryimpertinent',
'notveryimpetuous',
'notveryimpetuously',
'notveryimpiety',
'notveryimpinge',
'notveryimpious',
'notveryimplacable',
'notveryimplausible',
'notveryimplausibly',
'notveryimplicate',
'notveryimplication',
'notveryimplode',
'notveryimplore',
'notveryimploring',
'notveryimploringly',
'notveryimpolite',
'notveryimpolitely',
'notveryimpolitic',
'notveryimportunate',
'notveryimportune',
'notveryimpose',
'notveryimposers',
'notveryimposing',
'notveryimposition',
'notveryimpossible',
'notveryimpossiblity',
'notveryimpossibly',
'notveryimpotent',
'notveryimpoverish',
'notveryimpoverished',
'notveryimpractical',
'notveryimprecate',
'notveryimprecise',
'notveryimprecisely',
'notveryimprecision',
'notveryimprison',
'notveryimprisoned',
'notveryimprisonment',
'notveryimprobability',
'notveryimprobable',
'notveryimprobably',
'notveryimproper',
'notveryimproperly',
'notveryimpropriety',
'notveryimprudence',
'notveryimprudent',
'notveryimpudence',
'notveryimpudent',
'notveryimpudently',
'notveryimpugn',
'notveryimpulsive',
'notveryimpulsively',
'notveryimpunity',
'notveryimpure',
'notveryimpurity',
'notveryin',
'notveryinability',
'notveryinaccessible',
'notveryinaccuracies',
'notveryinaccuracy',
'notveryinaccurate',
'notveryinaccurately',
'notveryinaction',
'notveryinactive',
'notveryinadequacy',
'notveryinadequate',
'notveryinadequately',
'notveryinadverent',
'notveryinadverently',
'notveryinadvisable',
'notveryinadvisably',
'notveryinane',
'notveryinanely',
'notveryinappropriate',
'notveryinappropriately',
'notveryinapt',
'notveryinaptitude',
'notveryinarticulate',
'notveryinattentive',
'notveryincapable',
'notveryincapably',
'notveryincautious',
'notveryincendiary',
'notveryincense',
'notveryincessant',
'notveryincessantly',
'notveryincite',
'notveryincitement',
'notveryincivility',
'notveryinclement',
'notveryincognizant',
'notveryincoherence',
'notveryincoherent',
'notveryincoherently',
'notveryincommensurate',
'notveryincommunicative',
'notveryincomparable',
'notveryincomparably',
'notveryincompatibility',
'notveryincompatible',
'notveryincompetence',
'notveryincompetent',
'notveryincompetently',
'notveryincomplete',
'notveryincompliant',
'notveryincomprehensible',
'notveryincomprehension',
'notveryinconceivable',
'notveryinconceivably',
'notveryinconclusive',
'notveryincongruous',
'notveryincongruously',
'notveryinconsequent',
'notveryinconsequential',
'notveryinconsequentially',
'notveryinconsequently',
'notveryinconsiderate',
'notveryinconsiderately',
'notveryinconsistence',
'notveryinconsistencies',
'notveryinconsistency',
'notveryinconsistent',
'notveryinconsolable',
'notveryinconsolably',
'notveryinconstant',
'notveryinconvenience',
'notveryinconvenient',
'notveryinconveniently',
'notveryincorrect',
'notveryincorrectly',
'notveryincorrigible',
'notveryincorrigibly',
'notveryincredulous',
'notveryincredulously',
'notveryinculcate',
'notveryindecency',
'notveryindecent',
'notveryindecently',
'notveryindecision',
'notveryindecisive',
'notveryindecisively',
'notveryindecorum',
'notveryindefensible',
'notveryindefinite',
'notveryindefinitely',
'notveryindelicate',
'notveryindeterminable',
'notveryindeterminably',
'notveryindeterminate',
'notveryindifference',
'notveryindifferent',
'notveryindigent',
'notveryindignant',
'notveryindignantly',
'notveryindignation',
'notveryindignity',
'notveryindiscernible',
'notveryindiscreet',
'notveryindiscreetly',
'notveryindiscretion',
'notveryindiscriminate',
'notveryindiscriminately',
'notveryindiscriminating',
'notveryindisposed',
'notveryindistinct',
'notveryindistinctive',
'notveryindoctrinate',
'notveryindoctrinated',
'notveryindoctrination',
'notveryindolent',
'notveryindulge',
'notveryinebriated',
'notveryineffective',
'notveryineffectively',
'notveryineffectiveness',
'notveryineffectual',
'notveryineffectually',
'notveryineffectualness',
'notveryinefficacious',
'notveryinefficacy',
'notveryinefficiency',
'notveryinefficient',
'notveryinefficiently',
'notveryinelegance',
'notveryinelegant',
'notveryineligible',
'notveryineloquent',
'notveryineloquently',
'notveryinept',
'notveryineptitude',
'notveryineptly',
'notveryinequalities',
'notveryinequality',
'notveryinequitable',
'notveryinequitably',
'notveryinequities',
'notveryinertia',
'notveryinescapable',
'notveryinescapably',
'notveryinessential',
'notveryinevitable',
'notveryinevitably',
'notveryinexact',
'notveryinexcusable',
'notveryinexcusably',
'notveryinexorable',
'notveryinexorably',
'notveryinexperience',
'notveryinexperienced',
'notveryinexpert',
'notveryinexpertly',
'notveryinexpiable',
'notveryinexplainable',
'notveryinexplicable',
'notveryinextricable',
'notveryinextricably',
'notveryinfamous',
'notveryinfamously',
'notveryinfamy',
'notveryinfatuated',
'notveryinfected',
'notveryinferior',
'notveryinferiority',
'notveryinfernal',
'notveryinfest',
'notveryinfested',
'notveryinfidel',
'notveryinfidels',
'notveryinfiltrator',
'notveryinfiltrators',
'notveryinfirm',
'notveryinflame',
'notveryinflammatory',
'notveryinflated',
'notveryinflationary',
'notveryinflexible',
'notveryinflict',
'notveryinfraction',
'notveryinfringe',
'notveryinfringement',
'notveryinfringements',
'notveryinfuriate',
'notveryinfuriated',
'notveryinfuriating',
'notveryinfuriatingly',
'notveryinglorious',
'notveryingrate',
'notveryingratitude',
'notveryinhibit',
'notveryinhibited',
'notveryinhibition',
'notveryinhospitable',
'notveryinhospitality',
'notveryinhuman',
'notveryinhumane',
'notveryinhumanity',
'notveryinimical',
'notveryinimically',
'notveryiniquitous',
'notveryiniquity',
'notveryinjudicious',
'notveryinjure',
'notveryinjured',
'notveryinjurious',
'notveryinjury',
'notveryinjustice',
'notveryinjusticed',
'notveryinjustices',
'notveryinnuendo',
'notveryinopportune',
'notveryinordinate',
'notveryinordinately',
'notveryinsane',
'notveryinsanely',
'notveryinsanity',
'notveryinsatiable',
'notveryinsecure',
'notveryinsecurity',
'notveryinsensible',
'notveryinsensitive',
'notveryinsensitively',
'notveryinsensitivity',
'notveryinsidious',
'notveryinsidiously',
'notveryinsignificance',
'notveryinsignificant',
'notveryinsignificantly',
'notveryinsincere',
'notveryinsincerely',
'notveryinsincerity',
'notveryinsinuate',
'notveryinsinuating',
'notveryinsinuation',
'notveryinsociable',
'notveryinsolence',
'notveryinsolent',
'notveryinsolently',
'notveryinsolvent',
'notveryinsouciance',
'notveryinstability',
'notveryinstable',
'notveryinstigate',
'notveryinstigator',
'notveryinstigators',
'notveryinsubordinate',
'notveryinsubstantial',
'notveryinsubstantially',
'notveryinsufferable',
'notveryinsufferably',
'notveryinsufficiency',
'notveryinsufficient',
'notveryinsufficiently',
'notveryinsular',
'notveryinsult',
'notveryinsulted',
'notveryinsulting',
'notveryinsultingly',
'notveryinsupportable',
'notveryinsupportably',
'notveryinsurmountable',
'notveryinsurmountably',
'notveryinsurrection',
'notveryintense',
'notveryinterfere',
'notveryinterference',
'notveryintermittent',
'notveryinterrogated',
'notveryinterrupt',
'notveryinterrupted',
'notveryinterruption',
'notveryintimidate',
'notveryintimidated',
'notveryintimidating',
'notveryintimidatingly',
'notveryintimidation',
'notveryintolerable',
'notveryintolerablely',
'notveryintolerance',
'notveryintolerant',
'notveryintoxicate',
'notveryintoxicated',
'notveryintractable',
'notveryintransigence',
'notveryintransigent',
'notveryintrude',
'notveryintrusion',
'notveryintrusive',
'notveryinundate',
'notveryinundated',
'notveryinvader',
'notveryinvalid',
'notveryinvalidate',
'notveryinvalidated',
'notveryinvalidity',
'notveryinvasive',
'notveryinvective',
'notveryinveigle',
'notveryinvidious',
'notveryinvidiously',
'notveryinvidiousness',
'notveryinvisible',
'notveryinvoluntarily',
'notveryinvoluntary',
'notveryirate',
'notveryirately',
'notveryire',
'notveryirk',
'notveryirksome',
'notveryironic',
'notveryironies',
'notveryirony',
'notveryirrational',
'notveryirrationality',
'notveryirrationally',
'notveryirreconcilable',
'notveryirredeemable',
'notveryirredeemably',
'notveryirreformable',
'notveryirregular',
'notveryirregularity',
'notveryirrelevance',
'notveryirrelevant',
'notveryirreparable',
'notveryirreplacible',
'notveryirrepressible',
'notveryirresolute',
'notveryirresolvable',
'notveryirresponsible',
'notveryirresponsibly',
'notveryirretrievable',
'notveryirreverence',
'notveryirreverent',
'notveryirreverently',
'notveryirreversible',
'notveryirritable',
'notveryirritably',
'notveryirritant',
'notveryirritate',
'notveryirritated',
'notveryirritating',
'notveryirritation',
'notveryisolate',
'notveryisolated',
'notveryisolation',
'notveryitch',
'notveryjabber',
'notveryjaded',
'notveryjam',
'notveryjar',
'notveryjaundiced',
'notveryjealous',
'notveryjealously',
'notveryjealousness',
'notveryjealousy',
'notveryjeer',
'notveryjeering',
'notveryjeeringly',
'notveryjeers',
'notveryjeopardize',
'notveryjeopardy',
'notveryjerk',
'notveryjittery',
'notveryjobless',
'notveryjoker',
'notveryjolt',
'notveryjoyless',
'notveryjudged',
'notveryjumpy',
'notveryjunk',
'notveryjunky',
'notveryjuvenile',
'notverykaput',
'notverykick',
'notverykill',
'notverykiller',
'notverykilljoy',
'notveryknave',
'notveryknife',
'notveryknock',
'notverykook',
'notverykooky',
'notverylabeled',
'notverylack',
'notverylackadaisical',
'notverylackey',
'notverylackeys',
'notverylacking',
'notverylackluster',
'notverylaconic',
'notverylag',
'notverylambast',
'notverylambaste',
'notverylame',
'notverylame-duck',
'notverylament',
'notverylamentable',
'notverylamentably',
'notverylanguid',
'notverylanguish',
'notverylanguor',
'notverylanguorous',
'notverylanguorously',
'notverylanky',
'notverylapse',
'notverylascivious',
'notverylast-ditch',
'notverylaugh',
'notverylaughable',
'notverylaughably',
'notverylaughingstock',
'notverylaughter',
'notverylawbreaker',
'notverylawbreaking',
'notverylawless',
'notverylawlessness',
'notverylax',
'notverylazy',
'notveryleak',
'notveryleakage',
'notveryleaky',
'notverylech',
'notverylecher',
'notverylecherous',
'notverylechery',
'notverylecture',
'notveryleech',
'notveryleer',
'notveryleery',
'notveryleft-leaning',
'notveryless-developed',
'notverylessen',
'notverylesser',
'notverylesser-known',
'notveryletch',
'notverylethal',
'notverylethargic',
'notverylethargy',
'notverylewd',
'notverylewdly',
'notverylewdness',
'notveryliability',
'notveryliable',
'notveryliar',
'notveryliars',
'notverylicentious',
'notverylicentiously',
'notverylicentiousness',
'notverylie',
'notverylier',
'notverylies',
'notverylife-threatening',
'notverylifeless',
'notverylimit',
'notverylimitation',
'notverylimited',
'notverylimp',
'notverylistless',
'notverylitigious',
'notverylittle',
'notverylittle-known',
'notverylivid',
'notverylividly',
'notveryloath',
'notveryloathe',
'notveryloathing',
'notveryloathly',
'notveryloathsome',
'notveryloathsomely',
'notverylone',
'notveryloneliness',
'notverylonely',
'notverylonesome',
'notverylong',
'notverylonging',
'notverylongingly',
'notveryloophole',
'notveryloopholes',
'notveryloot',
'notverylorn',
'notverylose',
'notveryloser',
'notverylosing',
'notveryloss',
'notverylost',
'notverylousy',
'notveryloveless',
'notverylovelorn',
'notverylow',
'notverylow-rated',
'notverylowly',
'notveryludicrous',
'notveryludicrously',
'notverylugubrious',
'notverylukewarm',
'notverylull',
'notverylunatic',
'notverylunaticism',
'notverylurch',
'notverylure',
'notverylurid',
'notverylurk',
'notverylurking',
'notverylying',
'notverymacabre',
'notverymad',
'notverymadden',
'notverymaddening',
'notverymaddeningly',
'notverymadder',
'notverymadly',
'notverymadman',
'notverymadness',
'notverymaladjusted',
'notverymaladjustment',
'notverymalady',
'notverymalaise',
'notverymalcontent',
'notverymalcontented',
'notverymaledict',
'notverymalevolence',
'notverymalevolent',
'notverymalevolently',
'notverymalice',
'notverymalicious',
'notverymaliciously',
'notverymaliciousness',
'notverymalign',
'notverymalignant',
'notverymalodorous',
'notverymaltreatment',
'notverymaneuver',
'notverymangle',
'notverymania',
'notverymaniac',
'notverymaniacal',
'notverymanic',
'notverymanipulate',
'notverymanipulated',
'notverymanipulation',
'notverymanipulative',
'notverymanipulators',
'notverymar',
'notverymarginal',
'notverymarginally',
'notverymartyrdom',
'notverymartyrdom-seeking',
'notverymasochistic',
'notverymassacre',
'notverymassacres',
'notverymaverick',
'notverymawkish',
'notverymawkishly',
'notverymawkishness',
'notverymaxi-devaluation',
'notverymeager',
'notverymeaningless',
'notverymeanness',
'notverymeddle',
'notverymeddlesome',
'notverymediocrity',
'notverymelancholy',
'notverymelodramatic',
'notverymelodramatically',
'notverymenace',
'notverymenacing',
'notverymenacingly',
'notverymendacious',
'notverymendacity',
'notverymenial',
'notverymerciless',
'notverymercilessly',
'notverymere',
'notverymess',
'notverymessy',
'notverymidget',
'notverymiff',
'notverymiffed',
'notverymilitancy',
'notverymind',
'notverymindless',
'notverymindlessly',
'notverymirage',
'notverymire',
'notverymisapprehend',
'notverymisbecome',
'notverymisbecoming',
'notverymisbegotten',
'notverymisbehave',
'notverymisbehavior',
'notverymiscalculate',
'notverymiscalculation',
'notverymischief',
'notverymischievous',
'notverymischievously',
'notverymisconception',
'notverymisconceptions',
'notverymiscreant',
'notverymiscreants',
'notverymisdirection',
'notverymiser',
'notverymiserable',
'notverymiserableness',
'notverymiserably',
'notverymiseries',
'notverymiserly',
'notverymisery',
'notverymisfit',
'notverymisfortune',
'notverymisgiving',
'notverymisgivings',
'notverymisguidance',
'notverymisguide',
'notverymisguided',
'notverymishandle',
'notverymishap',
'notverymisinform',
'notverymisinformed',
'notverymisinterpret',
'notverymisjudge',
'notverymisjudgment',
'notverymislead',
'notverymisleading',
'notverymisleadingly',
'notverymisled',
'notverymislike',
'notverymismanage',
'notverymisread',
'notverymisreading',
'notverymisrepresent',
'notverymisrepresentation',
'notverymiss',
'notverymisstatement',
'notverymistake',
'notverymistaken',
'notverymistakenly',
'notverymistakes',
'notverymistified',
'notverymistreated',
'notverymistrust',
'notverymistrusted',
'notverymistrustful',
'notverymistrustfully',
'notverymisunderstand',
'notverymisunderstanding',
'notverymisunderstandings',
'notverymisunderstood',
'notverymisuse',
'notverymoan',
'notverymock',
'notverymocked',
'notverymockeries',
'notverymockery',
'notverymocking',
'notverymockingly',
'notverymolest',
'notverymolestation',
'notverymolested',
'notverymonotonous',
'notverymonotony',
'notverymonster',
'notverymonstrosities',
'notverymonstrosity',
'notverymonstrous',
'notverymonstrously',
'notverymoody',
'notverymoon',
'notverymoot',
'notverymope',
'notverymorbid',
'notverymorbidly',
'notverymordant',
'notverymordantly',
'notverymoribund',
'notverymortification',
'notverymortified',
'notverymortify',
'notverymortifying',
'notverymotionless',
'notverymotley',
'notverymourn',
'notverymourner',
'notverymournful',
'notverymournfully',
'notverymuddle',
'notverymuddy',
'notverymudslinger',
'notverymudslinging',
'notverymulish',
'notverymulti-polarization',
'notverymundane',
'notverymurder',
'notverymurderous',
'notverymurderously',
'notverymurky',
'notverymuscle-flexing',
'notverymysterious',
'notverymysteriously',
'notverymystery',
'notverymystify',
'notverymyth',
'notverynag',
'notverynagged',
'notverynagging',
'notverynaive',
'notverynaively',
'notverynarrow',
'notverynarrower',
'notverynastily',
'notverynastiness',
'notverynasty',
'notverynationalism',
'notverynaughty',
'notverynauseate',
'notverynauseating',
'notverynauseatingly',
'notverynebulous',
'notverynebulously',
'notveryneedless',
'notveryneedlessly',
'notveryneedy',
'notverynefarious',
'notverynefariously',
'notverynegate',
'notverynegation',
'notverynegative',
'notveryneglect',
'notveryneglected',
'notverynegligence',
'notverynegligent',
'notverynegligible',
'notverynemesis',
'notverynervous',
'notverynervously',
'notverynervousness',
'notverynettle',
'notverynettlesome',
'notveryneurotic',
'notveryneurotically',
'notveryniggle',
'notverynightmare',
'notverynightmarish',
'notverynightmarishly',
'notverynix',
'notverynoisy',
'notverynon-confidence',
'notverynonconforming',
'notverynonexistent',
'notverynonsense',
'notverynosey',
'notverynotorious',
'notverynotoriously',
'notverynuisance',
'notverynumb',
'notverynuts',
'notverynutty',
'notveryobese',
'notveryobject',
'notveryobjectified',
'notveryobjection',
'notveryobjectionable',
'notveryobjections',
'notveryobligated',
'notveryoblique',
'notveryobliterate',
'notveryobliterated',
'notveryoblivious',
'notveryobnoxious',
'notveryobnoxiously',
'notveryobscene',
'notveryobscenely',
'notveryobscenity',
'notveryobscure',
'notveryobscurity',
'notveryobsess',
'notveryobsessed',
'notveryobsession',
'notveryobsessions',
'notveryobsessive',
'notveryobsessively',
'notveryobsessiveness',
'notveryobsolete',
'notveryobstacle',
'notveryobstinate',
'notveryobstinately',
'notveryobstruct',
'notveryobstructed',
'notveryobstruction',
'notveryobtrusive',
'notveryobtuse',
'notveryodd',
'notveryodder',
'notveryoddest',
'notveryoddities',
'notveryoddity',
'notveryoddly',
'notveryoffence',
'notveryoffend',
'notveryoffended',
'notveryoffending',
'notveryoffenses',
'notveryoffensive',
'notveryoffensively',
'notveryoffensiveness',
'notveryofficious',
'notveryominous',
'notveryominously',
'notveryomission',
'notveryomit',
'notveryone-side',
'notveryone-sided',
'notveryonerous',
'notveryonerously',
'notveryonslaught',
'notveryopinionated',
'notveryopponent',
'notveryopportunistic',
'notveryoppose',
'notveryopposed',
'notveryopposition',
'notveryoppositions',
'notveryoppress',
'notveryoppressed',
'notveryoppression',
'notveryoppressive',
'notveryoppressively',
'notveryoppressiveness',
'notveryoppressors',
'notveryordeal',
'notveryorphan',
'notveryostracize',
'notveryoutbreak',
'notveryoutburst',
'notveryoutbursts',
'notveryoutcast',
'notveryoutcry',
'notveryoutdated',
'notveryoutlaw',
'notveryoutmoded',
'notveryoutrage',
'notveryoutraged',
'notveryoutrageous',
'notveryoutrageously',
'notveryoutrageousness',
'notveryoutrages',
'notveryoutsider',
'notveryover-acted',
'notveryover-valuation',
'notveryoveract',
'notveryoveracted',
'notveryoverawe',
'notveryoverbalance',
'notveryoverbalanced',
'notveryoverbearing',
'notveryoverbearingly',
'notveryoverblown',
'notveryovercome',
'notveryoverdo',
'notveryoverdone',
'notveryoverdue',
'notveryoveremphasize',
'notveryoverkill',
'notveryoverlook',
'notveryoverplay',
'notveryoverpower',
'notveryoverreach',
'notveryoverrun',
'notveryovershadow',
'notveryoversight',
'notveryoversimplification',
'notveryoversimplified',
'notveryoversimplify',
'notveryoversized',
'notveryoverstate',
'notveryoverstatement',
'notveryoverstatements',
'notveryovertaxed',
'notveryoverthrow',
'notveryoverturn',
'notveryoverwhelm',
'notveryoverwhelmed',
'notveryoverwhelming',
'notveryoverwhelmingly',
'notveryoverworked',
'notveryoverzealous',
'notveryoverzealously',
'notverypain',
'notverypainful',
'notverypainfully',
'notverypains',
'notverypale',
'notverypaltry',
'notverypan',
'notverypandemonium',
'notverypanic',
'notverypanicky',
'notveryparadoxical',
'notveryparadoxically',
'notveryparalize',
'notveryparalyzed',
'notveryparanoia',
'notveryparanoid',
'notveryparasite',
'notverypariah',
'notveryparody',
'notverypartiality',
'notverypartisan',
'notverypartisans',
'notverypasse',
'notverypassive',
'notverypassiveness',
'notverypathetic',
'notverypathetically',
'notverypatronize',
'notverypaucity',
'notverypauper',
'notverypaupers',
'notverypayback',
'notverypeculiar',
'notverypeculiarly',
'notverypedantic',
'notverypedestrian',
'notverypeeve',
'notverypeeved',
'notverypeevish',
'notverypeevishly',
'notverypenalize',
'notverypenalty',
'notveryperfidious',
'notveryperfidity',
'notveryperfunctory',
'notveryperil',
'notveryperilous',
'notveryperilously',
'notveryperipheral',
'notveryperish',
'notverypernicious',
'notveryperplex',
'notveryperplexed',
'notveryperplexing',
'notveryperplexity',
'notverypersecute',
'notverypersecution',
'notverypertinacious',
'notverypertinaciously',
'notverypertinacity',
'notveryperturb',
'notveryperturbed',
'notveryperverse',
'notveryperversely',
'notveryperversion',
'notveryperversity',
'notverypervert',
'notveryperverted',
'notverypessimism',
'notverypessimistic',
'notverypessimistically',
'notverypest',
'notverypestilent',
'notverypetrified',
'notverypetrify',
'notverypettifog',
'notverypetty',
'notveryphobia',
'notveryphobic',
'notveryphony',
'notverypicky',
'notverypillage',
'notverypillory',
'notverypinch',
'notverypine',
'notverypique',
'notverypissed',
'notverypitiable',
'notverypitiful',
'notverypitifully',
'notverypitiless',
'notverypitilessly',
'notverypittance',
'notverypity',
'notveryplagiarize',
'notveryplague',
'notveryplain',
'notveryplaything',
'notveryplea',
'notveryplead',
'notverypleading',
'notverypleadingly',
'notverypleas',
'notveryplebeian',
'notveryplight',
'notveryplot',
'notveryplotters',
'notveryploy',
'notveryplunder',
'notveryplunderer',
'notverypointless',
'notverypointlessly',
'notverypoison',
'notverypoisonous',
'notverypoisonously',
'notverypolarisation',
'notverypolemize',
'notverypollute',
'notverypolluter',
'notverypolluters',
'notverypolution',
'notverypompous',
'notverypooped',
'notverypoor',
'notverypoorly',
'notveryposturing',
'notverypout',
'notverypoverty',
'notverypowerless',
'notveryprate',
'notverypratfall',
'notveryprattle',
'notveryprecarious',
'notveryprecariously',
'notveryprecipitate',
'notveryprecipitous',
'notverypredatory',
'notverypredicament',
'notverypredjudiced',
'notveryprejudge',
'notveryprejudice',
'notveryprejudicial',
'notverypremeditated',
'notverypreoccupied',
'notverypreoccupy',
'notverypreposterous',
'notverypreposterously',
'notverypressing',
'notverypressured',
'notverypresume',
'notverypresumptuous',
'notverypresumptuously',
'notverypretence',
'notverypretend',
'notverypretense',
'notverypretentious',
'notverypretentiously',
'notveryprevaricate',
'notverypricey',
'notveryprickle',
'notveryprickles',
'notveryprideful',
'notveryprimitive',
'notveryprison',
'notveryprisoner',
'notveryproblem',
'notveryproblematic',
'notveryproblems',
'notveryprocrastinate',
'notveryprocrastination',
'notveryprofane',
'notveryprofanity',
'notveryprohibit',
'notveryprohibitive',
'notveryprohibitively',
'notverypropaganda',
'notverypropagandize',
'notveryproscription',
'notveryproscriptions',
'notveryprosecute',
'notveryprosecuted',
'notveryprotest',
'notveryprotests',
'notveryprotracted',
'notveryprovocation',
'notveryprovocative',
'notveryprovoke',
'notveryprovoked',
'notverypry',
'notverypsychopathic',
'notverypsychotic',
'notverypugnacious',
'notverypugnaciously',
'notverypugnacity',
'notverypunch',
'notverypunish',
'notverypunishable',
'notverypunished',
'notverypunitive',
'notverypuny',
'notverypuppet',
'notverypuppets',
'notverypushed',
'notverypuzzle',
'notverypuzzled',
'notverypuzzlement',
'notverypuzzling',
'notveryquack',
'notveryqualms',
'notveryquandary',
'notveryquarrel',
'notveryquarrellous',
'notveryquarrellously',
'notveryquarrels',
'notveryquarrelsome',
'notveryquash',
'notveryqueer',
'notveryquestionable',
'notveryquestioned',
'notveryquibble',
'notveryquiet',
'notveryquit',
'notveryquitter',
'notveryracism',
'notveryracist',
'notveryracists',
'notveryrack',
'notveryradical',
'notveryradicalization',
'notveryradically',
'notveryradicals',
'notveryrage',
'notveryragged',
'notveryraging',
'notveryrail',
'notveryrampage',
'notveryrampant',
'notveryramshackle',
'notveryrancor',
'notveryrank',
'notveryrankle',
'notveryrant',
'notveryranting',
'notveryrantingly',
'notveryraped',
'notveryrascal',
'notveryrash',
'notveryrat',
'notveryrationalize',
'notveryrattle',
'notveryrattled',
'notveryravage',
'notveryraving',
'notveryreactionary',
'notveryrebellious',
'notveryrebuff',
'notveryrebuke',
'notveryrecalcitrant',
'notveryrecant',
'notveryrecession',
'notveryrecessionary',
'notveryreckless',
'notveryrecklessly',
'notveryrecklessness',
'notveryrecoil',
'notveryrecourses',
'notveryredundancy',
'notveryredundant',
'notveryrefusal',
'notveryrefuse',
'notveryrefutation',
'notveryrefute',
'notveryregress',
'notveryregression',
'notveryregressive',
'notveryregret',
'notveryregretful',
'notveryregretfully',
'notveryregrettable',
'notveryregrettably',
'notveryreject',
'notveryrejected',
'notveryrejection',
'notveryrelapse',
'notveryrelentless',
'notveryrelentlessly',
'notveryrelentlessness',
'notveryreluctance',
'notveryreluctant',
'notveryreluctantly',
'notveryremorse',
'notveryremorseful',
'notveryremorsefully',
'notveryremorseless',
'notveryremorselessly',
'notveryremorselessness',
'notveryrenounce',
'notveryrenunciation',
'notveryrepel',
'notveryrepetitive',
'notveryreprehensible',
'notveryreprehensibly',
'notveryreprehension',
'notveryreprehensive',
'notveryrepress',
'notveryrepression',
'notveryrepressive',
'notveryreprimand',
'notveryreproach',
'notveryreproachful',
'notveryreprove',
'notveryreprovingly',
'notveryrepudiate',
'notveryrepudiation',
'notveryrepugn',
'notveryrepugnance',
'notveryrepugnant',
'notveryrepugnantly',
'notveryrepulse',
'notveryrepulsed',
'notveryrepulsing',
'notveryrepulsive',
'notveryrepulsively',
'notveryrepulsiveness',
'notveryresent',
'notveryresented',
'notveryresentful',
'notveryresentment',
'notveryreservations',
'notveryresignation',
'notveryresigned',
'notveryresistance',
'notveryresistant',
'notveryrestless',
'notveryrestlessness',
'notveryrestrict',
'notveryrestricted',
'notveryrestriction',
'notveryrestrictive',
'notveryretaliate',
'notveryretaliatory',
'notveryretard',
'notveryretarded',
'notveryreticent',
'notveryretire',
'notveryretract',
'notveryretreat',
'notveryrevenge',
'notveryrevengeful',
'notveryrevengefully',
'notveryrevert',
'notveryrevile',
'notveryreviled',
'notveryrevoke',
'notveryrevolt',
'notveryrevolting',
'notveryrevoltingly',
'notveryrevulsion',
'notveryrevulsive',
'notveryrhapsodize',
'notveryrhetoric',
'notveryrhetorical',
'notveryrid',
'notveryridicule',
'notveryridiculed',
'notveryridiculous',
'notveryridiculously',
'notveryrife',
'notveryrift',
'notveryrifts',
'notveryrigid',
'notveryrigor',
'notveryrigorous',
'notveryrile',
'notveryriled',
'notveryrisk',
'notveryrisky',
'notveryrival',
'notveryrivalry',
'notveryroadblocks',
'notveryrobbed',
'notveryrocky',
'notveryrogue',
'notveryrollercoaster',
'notveryrot',
'notveryrotten',
'notveryrough',
'notveryrubbish',
'notveryrude',
'notveryrue',
'notveryruffian',
'notveryruffle',
'notveryruin',
'notveryruinous',
'notveryrumbling',
'notveryrumor',
'notveryrumors',
'notveryrumours',
'notveryrumple',
'notveryrun-down',
'notveryrunaway',
'notveryrupture',
'notveryrusty',
'notveryruthless',
'notveryruthlessly',
'notveryruthlessness',
'notverysabotage',
'notverysacrifice',
'notverysad',
'notverysadden',
'notverysadistic',
'notverysadly',
'notverysadness',
'notverysag',
'notverysalacious',
'notverysanctimonious',
'notverysap',
'notverysarcasm',
'notverysarcastic',
'notverysarcastically',
'notverysardonic',
'notverysardonically',
'notverysass',
'notverysatirical',
'notverysatirize',
'notverysavage',
'notverysavaged',
'notverysavagely',
'notverysavagery',
'notverysavages',
'notveryscandal',
'notveryscandalize',
'notveryscandalized',
'notveryscandalous',
'notveryscandalously',
'notveryscandals',
'notveryscant',
'notveryscapegoat',
'notveryscar',
'notveryscarce',
'notveryscarcely',
'notveryscarcity',
'notveryscare',
'notveryscared',
'notveryscarier',
'notveryscariest',
'notveryscarily',
'notveryscarred',
'notveryscars',
'notveryscary',
'notveryscathing',
'notveryscathingly',
'notveryscheme',
'notveryscheming',
'notveryscoff',
'notveryscoffingly',
'notveryscold',
'notveryscolding',
'notveryscoldingly',
'notveryscorching',
'notveryscorchingly',
'notveryscorn',
'notveryscornful',
'notveryscornfully',
'notveryscoundrel',
'notveryscourge',
'notveryscowl',
'notveryscream',
'notveryscreech',
'notveryscrew',
'notveryscrewed',
'notveryscum',
'notveryscummy',
'notverysecond-class',
'notverysecond-tier',
'notverysecretive',
'notverysedentary',
'notveryseedy',
'notveryseethe',
'notveryseething',
'notveryself-coup',
'notveryself-criticism',
'notveryself-defeating',
'notveryself-destructive',
'notveryself-humiliation',
'notveryself-interest',
'notveryself-interested',
'notveryself-serving',
'notveryselfinterested',
'notveryselfish',
'notveryselfishly',
'notveryselfishness',
'notverysenile',
'notverysensationalize',
'notverysenseless',
'notverysenselessly',
'notverysensitive',
'notveryseriousness',
'notverysermonize',
'notveryservitude',
'notveryset-up',
'notverysever',
'notverysevere',
'notveryseverely',
'notveryseverity',
'notveryshabby',
'notveryshadow',
'notveryshadowy',
'notveryshady',
'notveryshake',
'notveryshaky',
'notveryshallow',
'notverysham',
'notveryshambles',
'notveryshame',
'notveryshameful',
'notveryshamefully',
'notveryshamefulness',
'notveryshameless',
'notveryshamelessly',
'notveryshamelessness',
'notveryshark',
'notverysharply',
'notveryshatter',
'notverysheer',
'notveryshipwreck',
'notveryshirk',
'notveryshirker',
'notveryshiver',
'notveryshock',
'notveryshocking',
'notveryshockingly',
'notveryshoddy',
'notveryshort-lived',
'notveryshortage',
'notveryshortchange',
'notveryshortcoming',
'notveryshortcomings',
'notveryshortsighted',
'notveryshortsightedness',
'notveryshowdown',
'notveryshred',
'notveryshrew',
'notveryshriek',
'notveryshrill',
'notveryshrilly',
'notveryshrivel',
'notveryshroud',
'notveryshrouded',
'notveryshrug',
'notveryshun',
'notveryshunned',
'notveryshy',
'notveryshyly',
'notveryshyness',
'notverysick',
'notverysicken',
'notverysickening',
'notverysickeningly',
'notverysickly',
'notverysickness',
'notverysidetrack',
'notverysidetracked',
'notverysiege',
'notverysillily',
'notverysilly',
'notverysimmer',
'notverysimplistic',
'notverysimplistically',
'notverysin',
'notverysinful',
'notverysinfully',
'notverysinister',
'notverysinisterly',
'notverysinking',
'notveryskeletons',
'notveryskeptical',
'notveryskeptically',
'notveryskepticism',
'notverysketchy',
'notveryskimpy',
'notveryskittish',
'notveryskittishly',
'notveryskulk',
'notveryslack',
'notveryslander',
'notveryslanderer',
'notveryslanderous',
'notveryslanderously',
'notveryslanders',
'notveryslap',
'notveryslashing',
'notveryslaughter',
'notveryslaughtered',
'notveryslaves',
'notverysleazy',
'notveryslight',
'notveryslightly',
'notveryslime',
'notverysloppily',
'notverysloppy',
'notverysloth',
'notveryslothful',
'notveryslow',
'notveryslow-moving',
'notveryslowly',
'notveryslug',
'notverysluggish',
'notveryslump',
'notveryslur',
'notverysly',
'notverysmack',
'notverysmall',
'notverysmash',
'notverysmear',
'notverysmelling',
'notverysmokescreen',
'notverysmolder',
'notverysmoldering',
'notverysmother',
'notverysmothered',
'notverysmoulder',
'notverysmouldering',
'notverysmug',
'notverysmugly',
'notverysmut',
'notverysmuttier',
'notverysmuttiest',
'notverysmutty',
'notverysnare',
'notverysnarl',
'notverysnatch',
'notverysneak',
'notverysneakily',
'notverysneaky',
'notverysneer',
'notverysneering',
'notverysneeringly',
'notverysnub',
'notveryso-cal',
'notveryso-called',
'notverysob',
'notverysober',
'notverysobering',
'notverysolemn',
'notverysomber',
'notverysore',
'notverysorely',
'notverysoreness',
'notverysorrow',
'notverysorrowful',
'notverysorrowfully',
'notverysounding',
'notverysour',
'notverysourly',
'notveryspade',
'notveryspank',
'notveryspilling',
'notveryspinster',
'notveryspiritless',
'notveryspite',
'notveryspiteful',
'notveryspitefully',
'notveryspitefulness',
'notverysplit',
'notverysplitting',
'notveryspoil',
'notveryspook',
'notveryspookier',
'notveryspookiest',
'notveryspookily',
'notveryspooky',
'notveryspoon-fed',
'notveryspoon-feed',
'notveryspoonfed',
'notverysporadic',
'notveryspot',
'notveryspotty',
'notveryspurious',
'notveryspurn',
'notverysputter',
'notverysquabble',
'notverysquabbling',
'notverysquander',
'notverysquash',
'notverysquirm',
'notverystab',
'notverystagger',
'notverystaggering',
'notverystaggeringly',
'notverystagnant',
'notverystagnate',
'notverystagnation',
'notverystaid',
'notverystain',
'notverystake',
'notverystale',
'notverystalemate',
'notverystammer',
'notverystampede',
'notverystandstill',
'notverystark',
'notverystarkly',
'notverystartle',
'notverystartling',
'notverystartlingly',
'notverystarvation',
'notverystarve',
'notverystatic',
'notverysteal',
'notverystealing',
'notverysteep',
'notverysteeply',
'notverystench',
'notverystereotype',
'notverystereotyped',
'notverystereotypical',
'notverystereotypically',
'notverystern',
'notverystew',
'notverysticky',
'notverystiff',
'notverystifle',
'notverystifling',
'notverystiflingly',
'notverystigma',
'notverystigmatize',
'notverysting',
'notverystinging',
'notverystingingly',
'notverystink',
'notverystinking',
'notverystodgy',
'notverystole',
'notverystolen',
'notverystooge',
'notverystooges',
'notverystorm',
'notverystormy',
'notverystraggle',
'notverystraggler',
'notverystrain',
'notverystrained',
'notverystrange',
'notverystrangely',
'notverystranger',
'notverystrangest',
'notverystrangle',
'notverystrenuous',
'notverystress',
'notverystressed',
'notverystressful',
'notverystressfully',
'notverystretched',
'notverystricken',
'notverystrict',
'notverystrictly',
'notverystrident',
'notverystridently',
'notverystrife',
'notverystrike',
'notverystringent',
'notverystringently',
'notverystruck',
'notverystruggle',
'notverystrut',
'notverystubborn',
'notverystubbornly',
'notverystubbornness',
'notverystuck',
'notverystuffy',
'notverystumble',
'notverystump',
'notverystun',
'notverystunt',
'notverystunted',
'notverystupid',
'notverystupidity',
'notverystupidly',
'notverystupified',
'notverystupify',
'notverystupor',
'notverysty',
'notverysubdued',
'notverysubjected',
'notverysubjection',
'notverysubjugate',
'notverysubjugation',
'notverysubmissive',
'notverysubordinate',
'notverysubservience',
'notverysubservient',
'notverysubside',
'notverysubstandard',
'notverysubtract',
'notverysubversion',
'notverysubversive',
'notverysubversively',
'notverysubvert',
'notverysuccumb',
'notverysucker',
'notverysuffer',
'notverysufferer',
'notverysufferers',
'notverysuffering',
'notverysuffocate',
'notverysuffocated',
'notverysugar-coat',
'notverysugar-coated',
'notverysugarcoated',
'notverysuicidal',
'notverysuicide',
'notverysulk',
'notverysullen',
'notverysully',
'notverysunder',
'notverysuperficial',
'notverysuperficiality',
'notverysuperficially',
'notverysuperfluous',
'notverysuperiority',
'notverysuperstition',
'notverysuperstitious',
'notverysupposed',
'notverysuppress',
'notverysuppressed',
'notverysuppression',
'notverysupremacy',
'notverysurrender',
'notverysusceptible',
'notverysuspect',
'notverysuspicion',
'notverysuspicions',
'notverysuspicious',
'notverysuspiciously',
'notveryswagger',
'notveryswamped',
'notveryswear',
'notveryswindle',
'notveryswipe',
'notveryswoon',
'notveryswore',
'notverysympathetically',
'notverysympathies',
'notverysympathize',
'notverysympathy',
'notverysymptom',
'notverysyndrome',
'notverytaboo',
'notverytaint',
'notverytainted',
'notverytamper',
'notverytangled',
'notverytantrum',
'notverytardy',
'notverytarnish',
'notverytattered',
'notverytaunt',
'notverytaunting',
'notverytauntingly',
'notverytaunts',
'notverytawdry',
'notverytaxing',
'notverytease',
'notveryteasingly',
'notverytedious',
'notverytediously',
'notverytemerity',
'notverytemper',
'notverytempest',
'notverytemptation',
'notverytense',
'notverytension',
'notverytentative',
'notverytentatively',
'notverytenuous',
'notverytenuously',
'notverytepid',
'notveryterrible',
'notveryterribleness',
'notveryterribly',
'notveryterror',
'notveryterror-genic',
'notveryterrorism',
'notveryterrorize',
'notverythankless',
'notverythirst',
'notverythorny',
'notverythoughtless',
'notverythoughtlessly',
'notverythoughtlessness',
'notverythrash',
'notverythreat',
'notverythreaten',
'notverythreatening',
'notverythreats',
'notverythrottle',
'notverythrow',
'notverythumb',
'notverythumbs',
'notverythwart',
'notverytimid',
'notverytimidity',
'notverytimidly',
'notverytimidness',
'notverytiny',
'notverytire',
'notverytired',
'notverytiresome',
'notverytiring',
'notverytiringly',
'notverytoil',
'notverytoll',
'notverytopple',
'notverytorment',
'notverytormented',
'notverytorrent',
'notverytortuous',
'notverytorture',
'notverytortured',
'notverytorturous',
'notverytorturously',
'notverytotalitarian',
'notverytouchy',
'notverytoughness',
'notverytoxic',
'notverytraduce',
'notverytragedy',
'notverytragic',
'notverytragically',
'notverytraitor',
'notverytraitorous',
'notverytraitorously',
'notverytramp',
'notverytrample',
'notverytransgress',
'notverytransgression',
'notverytrauma',
'notverytraumatic',
'notverytraumatically',
'notverytraumatize',
'notverytraumatized',
'notverytravesties',
'notverytravesty',
'notverytreacherous',
'notverytreacherously',
'notverytreachery',
'notverytreason',
'notverytreasonous',
'notverytrial',
'notverytrick',
'notverytrickery',
'notverytricky',
'notverytrivial',
'notverytrivialize',
'notverytrivially',
'notverytrouble',
'notverytroublemaker',
'notverytroublesome',
'notverytroublesomely',
'notverytroubling',
'notverytroublingly',
'notverytruant',
'notverytumultuous',
'notveryturbulent',
'notveryturmoil',
'notverytwist',
'notverytwisted',
'notverytwists',
'notverytyrannical',
'notverytyrannically',
'notverytyranny',
'notverytyrant',
'notveryugh',
'notveryugliness',
'notveryugly',
'notveryulterior',
'notveryultimatum',
'notveryultimatums',
'notveryultra-hardline',
'notveryunable',
'notveryunacceptable',
'notveryunacceptablely',
'notveryunaccustomed',
'notveryunattractive',
'notveryunauthentic',
'notveryunavailable',
'notveryunavoidable',
'notveryunavoidably',
'notveryunbearable',
'notveryunbearablely',
'notveryunbelievable',
'notveryunbelievably',
'notveryuncertain',
'notveryuncivil',
'notveryuncivilized',
'notveryunclean',
'notveryunclear',
'notveryuncollectible',
'notveryuncomfortable',
'notveryuncompetitive',
'notveryuncompromising',
'notveryuncompromisingly',
'notveryunconfirmed',
'notveryunconstitutional',
'notveryuncontrolled',
'notveryunconvincing',
'notveryunconvincingly',
'notveryuncouth',
'notveryundecided',
'notveryundefined',
'notveryundependability',
'notveryundependable',
'notveryunderdog',
'notveryunderestimate',
'notveryunderlings',
'notveryundermine',
'notveryunderpaid',
'notveryundesirable',
'notveryundetermined',
'notveryundid',
'notveryundignified',
'notveryundo',
'notveryundocumented',
'notveryundone',
'notveryundue',
'notveryunease',
'notveryuneasily',
'notveryuneasiness',
'notveryuneasy',
'notveryuneconomical',
'notveryunequal',
'notveryunethical',
'notveryuneven',
'notveryuneventful',
'notveryunexpected',
'notveryunexpectedly',
'notveryunexplained',
'notveryunfair',
'notveryunfairly',
'notveryunfaithful',
'notveryunfaithfully',
'notveryunfamiliar',
'notveryunfavorable',
'notveryunfeeling',
'notveryunfinished',
'notveryunfit',
'notveryunforeseen',
'notveryunfortunate',
'notveryunfounded',
'notveryunfriendly',
'notveryunfulfilled',
'notveryunfunded',
'notveryungovernable',
'notveryungrateful',
'notveryunhappily',
'notveryunhappiness',
'notveryunhappy',
'notveryunhealthy',
'notveryunilateralism',
'notveryunimaginable',
'notveryunimaginably',
'notveryunimportant',
'notveryuninformed',
'notveryuninsured',
'notveryunipolar',
'notveryunjust',
'notveryunjustifiable',
'notveryunjustifiably',
'notveryunjustified',
'notveryunjustly',
'notveryunkind',
'notveryunkindly',
'notveryunlamentable',
'notveryunlamentably',
'notveryunlawful',
'notveryunlawfully',
'notveryunlawfulness',
'notveryunleash',
'notveryunlicensed',
'notveryunlucky',
'notveryunmoved',
'notveryunnatural',
'notveryunnaturally',
'notveryunnecessary',
'notveryunneeded',
'notveryunnerve',
'notveryunnerved',
'notveryunnerving',
'notveryunnervingly',
'notveryunnoticed',
'notveryunobserved',
'notveryunorthodox',
'notveryunorthodoxy',
'notveryunpleasant',
'notveryunpleasantries',
'notveryunpopular',
'notveryunprecedent',
'notveryunprecedented',
'notveryunpredictable',
'notveryunprepared',
'notveryunproductive',
'notveryunprofitable',
'notveryunqualified',
'notveryunravel',
'notveryunraveled',
'notveryunrealistic',
'notveryunreasonable',
'notveryunreasonably',
'notveryunrelenting',
'notveryunrelentingly',
'notveryunreliability',
'notveryunreliable',
'notveryunresolved',
'notveryunrest',
'notveryunruly',
'notveryunsafe',
'notveryunsatisfactory',
'notveryunsavory',
'notveryunscrupulous',
'notveryunscrupulously',
'notveryunseemly',
'notveryunsettle',
'notveryunsettled',
'notveryunsettling',
'notveryunsettlingly',
'notveryunskilled',
'notveryunsophisticated',
'notveryunsound',
'notveryunspeakable',
'notveryunspeakablely',
'notveryunspecified',
'notveryunstable',
'notveryunsteadily',
'notveryunsteadiness',
'notveryunsteady',
'notveryunsuccessful',
'notveryunsuccessfully',
'notveryunsupported',
'notveryunsure',
'notveryunsuspecting',
'notveryunsustainable',
'notveryuntenable',
'notveryuntested',
'notveryunthinkable',
'notveryunthinkably',
'notveryuntimely',
'notveryuntrue',
'notveryuntrustworthy',
'notveryuntruthful',
'notveryunusual',
'notveryunusually',
'notveryunwanted',
'notveryunwarranted',
'notveryunwelcome',
'notveryunwieldy',
'notveryunwilling',
'notveryunwillingly',
'notveryunwillingness',
'notveryunwise',
'notveryunwisely',
'notveryunworkable',
'notveryunworthy',
'notveryunyielding',
'notveryupbraid',
'notveryupheaval',
'notveryuprising',
'notveryuproar',
'notveryuproarious',
'notveryuproariously',
'notveryuproarous',
'notveryuproarously',
'notveryuproot',
'notveryupset',
'notveryupsetting',
'notveryupsettingly',
'notveryurgency',
'notveryurgent',
'notveryurgently',
'notveryuseless',
'notveryusurp',
'notveryusurper',
'notveryutter',
'notveryutterly',
'notveryvagrant',
'notveryvague',
'notveryvagueness',
'notveryvain',
'notveryvainly',
'notveryvanish',
'notveryvanity',
'notveryvehement',
'notveryvehemently',
'notveryvengeance',
'notveryvengeful',
'notveryvengefully',
'notveryvengefulness',
'notveryvenom',
'notveryvenomous',
'notveryvenomously',
'notveryvent',
'notveryvestiges',
'notveryveto',
'notveryvex',
'notveryvexation',
'notveryvexing',
'notveryvexingly',
'notveryvice',
'notveryvicious',
'notveryviciously',
'notveryviciousness',
'notveryvictimize',
'notveryvie',
'notveryvile',
'notveryvileness',
'notveryvilify',
'notveryvillainous',
'notveryvillainously',
'notveryvillains',
'notveryvillian',
'notveryvillianous',
'notveryvillianously',
'notveryvillify',
'notveryvindictive',
'notveryvindictively',
'notveryvindictiveness',
'notveryviolate',
'notveryviolation',
'notveryviolator',
'notveryviolent',
'notveryviolently',
'notveryviper',
'notveryvirulence',
'notveryvirulent',
'notveryvirulently',
'notveryvirus',
'notveryvocally',
'notveryvociferous',
'notveryvociferously',
'notveryvoid',
'notveryvolatile',
'notveryvolatility',
'notveryvomit',
'notveryvulgar',
'notverywail',
'notverywallow',
'notverywane',
'notverywaning',
'notverywanton',
'notverywar',
'notverywar-like',
'notverywarfare',
'notverywarily',
'notverywariness',
'notverywarlike',
'notverywarning',
'notverywarp',
'notverywarped',
'notverywary',
'notverywaste',
'notverywasteful',
'notverywastefulness',
'notverywatchdog',
'notverywayward',
'notveryweak',
'notveryweaken',
'notveryweakening',
'notveryweakness',
'notveryweaknesses',
'notveryweariness',
'notverywearisome',
'notveryweary',
'notverywedge',
'notverywee',
'notveryweed',
'notveryweep',
'notveryweird',
'notveryweirdly',
'notverywheedle',
'notverywhimper',
'notverywhine',
'notverywhips',
'notverywicked',
'notverywickedly',
'notverywickedness',
'notverywidespread',
'notverywild',
'notverywildly',
'notverywiles',
'notverywilt',
'notverywily',
'notverywince',
'notverywithheld',
'notverywithhold',
'notverywoe',
'notverywoebegone',
'notverywoeful',
'notverywoefully',
'notveryworn',
'notveryworried',
'notveryworriedly',
'notveryworrier',
'notveryworries',
'notveryworrisome',
'notveryworry',
'notveryworrying',
'notveryworryingly',
'notveryworse',
'notveryworsen',
'notveryworsening',
'notveryworst',
'notveryworthless',
'notveryworthlessly',
'notveryworthlessness',
'notverywound',
'notverywounds',
'notverywrangle',
'notverywrath',
'notverywreck',
'notverywrest',
'notverywrestle',
'notverywretch',
'notverywretched',
'notverywretchedly',
'notverywretchedness',
'notverywrithe',
'notverywrong',
'notverywrongful',
'notverywrongly',
'notverywrought',
'notveryyawn',
'notveryyelp',
'notveryzealot',
'notveryzealous',
'notveryzealously',
'notvestiges',
'notveto',
'notvex',
'notvexation',
'notvexing',
'notvexingly',
'notvice',
'notvicious',
'notviciously',
'notviciousness',
'notvictimize',
'notvie',
'notvile',
'notvileness',
'notvilify',
'notvillainous',
'notvillainously',
'notvillains',
'notvillian',
'notvillianous',
'notvillianously',
'notvillify',
'notvindictive',
'notvindictively',
'notvindictiveness',
'notviolate',
'notviolation',
'notviolator',
'notviolent',
'notviolently',
'notviper',
'notvirulence',
'notvirulent',
'notvirulently',
'notvirus',
'notvocally',
'notvociferous',
'notvociferously',
'notvoid',
'notvolatile',
'notvolatility',
'notvomit',
'notvulgar',
'notwail',
'notwallow',
'notwane',
'notwaning',
'notwanton',
'notwar',
'notwar-like',
'notwarfare',
'notwarily',
'notwariness',
'notwarlike',
'notwarning',
'notwarp',
'notwarped',
'notwary',
'notwaste',
'notwasteful',
'notwastefulness',
'notwatchdog',
'notwayward',
'notweak',
'notweaken',
'notweakening',
'notweakness',
'notweaknesses',
'notweariness',
'notwearisome',
'notweary',
'notwedge',
'notwee',
'notweed',
'notweep',
'notweird',
'notweirdly',
'notwheedle',
'notwhimper',
'notwhine',
'notwhips',
'notwicked',
'notwickedly',
'notwickedness',
'notwidespread',
'notwild',
'notwildly',
'notwiles',
'notwilt',
'notwily',
'notwince',
'notwithheld',
'notwithhold',
'notwoe',
'notwoebegone',
'notwoeful',
'notwoefully',
'notworn',
'notworried',
'notworriedly',
'notworrier',
'notworries',
'notworrisome',
'notworry',
'notworrying',
'notworryingly',
'notworse',
'notworsen',
'notworsening',
'notworst',
'notworthless',
'notworthlessly',
'notworthlessness',
'notwound',
'notwounds',
'notwrangle',
'notwrath',
'notwreck',
'notwrest',
'notwrestle',
'notwretch',
'notwretched',
'notwretchedly',
'notwretchedness',
'notwrithe',
'notwrong',
'notwrongful',
'notwrongly',
'notwrought',
'notyawn',
'notyelp',
'notzealot',
'notzealous',
'notzealously',
'nourish',
'nourishing',
'nourishment',
'nurture',
'nurturing',
'oasis',
'obedience',
'obedient',
'obediently',
'obey',
'objective',
'objectively',
'obliged',
'obviate',
'offbeat',
'offset',
'onward',
'open',
'openhanded',
'openly',
'openness',
'opportune',
'opportunity',
'optimal',
'optimism',
'optimistic',
'opulent',
'orderly',
'original',
'originality',
'outdo',
'outgoing',
'outshine',
'outsmart',
'outstanding',
'outstandingly',
'outstrip',
'outwit',
'ovation',
'overachiever',
'overjoyed',
'overture',
'pacifist',
'pacifists',
'painless',
'painlessly',
'painstaking',
'painstakingly',
'palatable',
'palatial',
'palliate',
'pamper',
'paradise',
'paramount',
'pardon',
'passion',
'passionate',
'passionately',
'patience',
'patient',
'patiently',
'patriot',
'patriotic',
'peace',
'peaceable',
'peaceful',
'peacefully',
'peacekeepers',
'peerless',
'penetrating',
'penitent',
'perceptive',
'perfect',
'perfection',
'perfectly',
'permissible',
'perseverance',
'persevere',
'persistent',
'personable',
'personages',
'personality',
'perspicuous',
'perspicuously',
'persuade',
'persuasive',
'persuasively',
'pertinent',
'phenomenal',
'phenomenally',
'philanthropic',
'philosophical',
'picturesque',
'piety',
'pillar',
'pinnacle',
'pious',
'pithy',
'placate',
'placid',
'plainly',
'plausibility',
'plausible',
'playful',
'playfully',
'pleasant',
'pleasantly',
'pleased',
'pleasing',
'pleasingly',
'pleasurable',
'pleasurably',
'pleasure',
'pledge',
'pledges',
'plentiful',
'plenty',
'plush',
'poetic',
'poeticize',
'poignant',
'poise',
'poised',
'polished',
'polite',
'politeness',
'popular',
'popularity',
'portable',
'posh',
'positive',
'positively',
'positiveness',
'posterity',
'potent',
'potential',
'powerful',
'powerfully',
'practicable',
'practical',
'pragmatic',
'praise',
'praiseworthy',
'praising',
'pre-eminent',
'preach',
'preaching',
'precaution',
'precautions',
'precedent',
'precious',
'precise',
'precisely',
'precision',
'preeminent',
'preemptive',
'prefer',
'preferable',
'preferably',
'preference',
'preferences',
'premier',
'premium',
'prepared',
'preponderance',
'press',
'prestige',
'prestigious',
'prettily',
'pretty',
'priceless',
'pride',
'principle',
'principled',
'privilege',
'privileged',
'prize',
'pro',
'pro-american',
'pro-beijing',
'pro-cuba',
'pro-peace',
'proactive',
'prodigious',
'prodigiously',
'prodigy',
'productive',
'profess',
'professional',
'proficient',
'proficiently',
'profit',
'profitable',
'profound',
'profoundly',
'profuse',
'profusely',
'profusion',
'progress',
'progressive',
'prolific',
'prominence',
'prominent',
'promise',
'promising',
'promoter',
'prompt',
'promptly',
'proper',
'properly',
'propitious',
'propitiously',
'prospect',
'prospects',
'prosper',
'prosperity',
'prosperous',
'protect',
'protection',
'protective',
'protector',
'proud',
'providence',
'provident',
'prowess',
'prudence',
'prudent',
'prudently',
'punctual',
'pundits',
'pure',
'purification',
'purify',
'purity',
'purposeful',
'quaint',
'qualified',
'qualify',
'quasi-ally',
'quench',
'quicken',
'radiance',
'radiant',
'rally',
'rapport',
'rapprochement',
'rapt',
'rapture',
'raptureous',
'raptureously',
'rapturous',
'rapturously',
'rational',
'rationality',
'rave',
're-conquest',
'readily',
'ready',
'reaffirm',
'reaffirmation',
'real',
'realist',
'realistic',
'realistically',
'reason',
'reasonable',
'reasonably',
'reasoned',
'reassurance',
'reassure',
'receptive',
'reclaim',
'recognition',
'recommend',
'recommendation',
'recommendations',
'recommended',
'recompense',
'reconcile',
'reconciliation',
'record-setting',
'recover',
'rectification',
'rectify',
'rectifying',
'redeem',
'redeeming',
'redemption',
'reestablish',
'refine',
'refined',
'refinement',
'reflective',
'reform',
'refresh',
'refreshing',
'refuge',
'regal',
'regally',
'regard',
'rehabilitate',
'rehabilitation',
'reinforce',
'reinforcement',
'rejoice',
'rejoicing',
'rejoicingly',
'relax',
'relaxed',
'relent',
'relevance',
'relevant',
'reliability',
'reliable',
'reliably',
'relief',
'relieve',
'relish',
'remarkable',
'remarkably',
'remedy',
'reminiscent',
'remunerate',
'renaissance',
'renewal',
'renovate',
'renovation',
'renown',
'renowned',
'repair',
'reparation',
'repay',
'repent',
'repentance',
'reposed',
'reputable',
'rescue',
'resilient',
'resolute',
'resolve',
'resolved',
'resound',
'resounding',
'resourceful',
'resourcefulness',
'respect',
'respectable',
'respectful',
'respectfully',
'respite',
'resplendent',
'responsibility',
'responsible',
'responsibly',
'responsive',
'restful',
'restoration',
'restore',
'restrained',
'restraint',
'resurgent',
'reunite',
'revel',
'revelation',
'revere',
'reverence',
'reverent',
'reverently',
'revitalize',
'revival',
'revive',
'revolution',
'reward',
'rewarding',
'rewardingly',
'rich',
'riches',
'richly',
'richness',
'right',
'righten',
'righteous',
'righteously',
'righteousness',
'rightful',
'rightfully',
'rightly',
'rightness',
'rights',
'ripe',
'risk-free',
'robust',
'romantic',
'romantically',
'romanticize',
'rosy',
'rousing',
'sacred',
'safe',
'safeguard',
'sagacious',
'sagacity',
'sage',
'sagely',
'saint',
'saintliness',
'saintly',
'salable',
'salivate',
'salutary',
'salute',
'salvation',
'sanctify',
'sanction',
'sanctity',
'sanctuary',
'sane',
'sanguine',
'sanity',
'satisfaction',
'satisfactorily',
'satisfactory',
'satisfied',
'satisfy',
'satisfying',
'savor',
'savvy',
'scenic',
'scholarly',
'scruples',
'scrupulous',
'scrupulously',
'seamless',
'seasoned',
'secure',
'securely',
'security',
'seductive',
'seemly',
'selective',
'self-determination',
'self-respect',
'self-satisfaction',
'self-sufficiency',
'self-sufficient',
'semblance',
'sensation',
'sensational',
'sensationally',
'sensations',
'sense',
'sensible',
'sensibly',
'sensitively',
'sensitivity',
'sensual',
'sentiment',
'sentimental',
'sentimentality',
'sentimentally',
'sentiments',
'serene',
'serenity',
'settle',
'sexy',
'sharp',
'shelter',
'shield',
'shimmer',
'shimmering',
'shimmeringly',
'shine',
'shiny',
'shrewd',
'shrewdly',
'shrewdness',
'significance',
'significant',
'signify',
'simple',
'simplicity',
'simplified',
'simplify',
'sincere',
'sincerely',
'sincerity',
'skill',
'skilled',
'skillful',
'skillfully',
'sleek',
'slender',
'slim',
'smart',
'smarter',
'smartest',
'smartly',
'smile',
'smiling',
'smilingly',
'smitten',
'smooth',
'sociable',
'soft-spoken',
'soften',
'solace',
'solicitous',
'solicitously',
'solicitude',
'solid',
'solidarity',
'soothe',
'soothingly',
'sophisticated',
'soulful',
'sound',
'soundness',
'spacious',
'spare',
'sparing',
'sparingly',
'sparkle',
'sparkling',
'special',
'spectacular',
'spectacularly',
'speedy',
'spellbind',
'spellbinding',
'spellbindingly',
'spellbound',
'spirit',
'spirited',
'spiritual',
'splendid',
'splendidly',
'splendor',
'spontaneous',
'spotless',
'sprightly',
'sprite',
'spry',
'spur',
'squarely',
'stability',
'stabilize',
'stable',
'stainless',
'stand',
'star',
'stars',
'stately',
'statuesque',
'staunch',
'staunchly',
'staunchness',
'steadfast',
'steadfastly',
'steadfastness',
'steadiness',
'steady',
'stellar',
'stellarly',
'stimulate',
'stimulating',
'stimulative',
'stirring',
'stirringly',
'stood',
'straight',
'straightforward',
'streamlined',
'stride',
'strides',
'striking',
'strikingly',
'striving',
'strong',
'studious',
'studiously',
'stunned',
'stunning',
'stunningly',
'stupendous',
'stupendously',
'sturdy',
'stylish',
'stylishly',
'suave',
'sublime',
'subscribe',
'substantial',
'substantially',
'substantive',
'subtle',
'succeed',
'success',
'successful',
'successfully',
'suffice',
'sufficient',
'sufficiently',
'suggest',
'suggestions',
'suit',
'suitable',
'sumptuous',
'sumptuously',
'sumptuousness',
'sunny',
'super',
'superb',
'superbly',
'superior',
'superlative',
'support',
'supporter',
'supportive',
'supreme',
'supremely',
'supurb',
'supurbly',
'surely',
'surge',
'surging',
'surmise',
'surmount',
'surpass',
'survival',
'survive',
'survivor',
'sustainability',
'sustainable',
'sustained',
'sweeping',
'sweet',
'sweeten',
'sweetheart',
'sweetly',
'sweetness',
'swell',
'swift',
'swiftness',
'sworn',
'sympathetic',
'systematic',
'tact',
'talent',
'talented',
'tantalize',
'tantalizing',
'tantalizingly',
'taste',
'temperance',
'temperate',
'tempt',
'tempting',
'temptingly',
'tenacious',
'tenaciously',
'tenacity',
'tender',
'tenderly',
'tenderness',
'terrific',
'terrifically',
'terrified',
'terrify',
'terrifying',
'terrifyingly',
'thankful',
'thankfully',
'thanks',
'thinkable',
'thorough',
'thoughtful',
'thoughtfully',
'thoughtfulness',
'thrift',
'thrifty',
'thrill',
'thrilling',
'thrillingly',
'thrills',
'thrive',
'thriving',
'tickle',
'tidy',
'time-honored',
'timely',
'tingle',
'titillate',
'titillating',
'titillatingly',
'toast',
'togetherness',
'tolerable',
'tolerably',
'tolerance',
'tolerant',
'tolerantly',
'tolerate',
'toleration',
'top',
'torrid',
'torridly',
'tough',
'tradition',
'traditional',
'tranquil',
'tranquility',
'treasure',
'treat',
'tremendous',
'tremendously',
'trendy',
'trepidation',
'tribute',
'trim',
'triumph',
'triumphal',
'triumphant',
'triumphantly',
'truculent',
'truculently',
'true',
'trump',
'trumpet',
'trust',
'trusting',
'trustingly',
'trustworthiness',
'trustworthy',
'truth',
'truthful',
'truthfully',
'truthfulness',
'twinkly',
'ultimate',
'ultimately',
'ultra',
'unabashed',
'unabashedly',
'unanimous',
'unassailable',
'unbiased',
'unbosom',
'unbound',
'unbroken',
'uncommon',
'uncommonly',
'unconcerned',
'unconditional',
'unconventional',
'undaunted',
'understand',
'understandable',
'understanding',
'understate',
'understated',
'understatedly',
'understood',
'undisputable',
'undisputably',
'undisputed',
'undoubted',
'undoubtedly',
'unencumbered',
'unequivocal',
'unequivocally',
'unfazed',
'unfettered',
'unforgettable',
'uniform',
'uniformly',
'unique',
'unity',
'universal',
'unlimited',
'unparalleled',
'unpretentious',
'unquestionable',
'unquestionably',
'unrestricted',
'unscathed',
'unselfish',
'untouched',
'untrained',
'upbeat',
'upfront',
'upgrade',
'upheld',
'uphold',
'uplift',
'uplifting',
'upliftingly',
'upliftment',
'upright',
'upscale',
'upside',
'upward',
'urge',
'usable',
'useful',
'usefulness',
'utilitarian',
'utmost',
'uttermost',
'valiant',
'valiantly',
'valid',
'validity',
'valor',
'valuable',
'values',
'vanquish',
'vast',
'vastly',
'vastness',
'venerable',
'venerably',
'venerate',
'verifiable',
'veritable',
'versatile',
'versatility',
'viability',
'viable',
'vibrant',
'vibrantly',
'victorious',
'victory',
'vigilance',
'vigilant',
'vigorous',
'vigorously',
'vindicate',
'vintage',
'virtue',
'virtuous',
'virtuously',
'visionary',
'vital',
'vitality',
'vivacious',
'vivid',
'voluntarily',
'voluntary',
'vouch',
'vouchsafe',
'vow',
'vulnerable',
'warm',
'warmhearted',
'warmly',
'warmth',
'wealthy',
'welfare',
'well-being',
'well-connected',
'well-educated',
'well-established',
'well-informed',
'well-intentioned',
'well-managed',
'well-positioned',
'well-publicized',
'well-received',
'well-regarded',
'well-run',
'well-wishers',
'wellbeing',
'whimsical',
'white',
'wholeheartedly',
'wholesome',
'wide',
'wide-open',
'wide-ranging',
'willful',
'willfully',
'willing',
'willingness',
'wink',
'winnable',
'winners',
'winsome',
'wisdom',
'wise',
'wisely',
'wishes',
'wishing',
'witty',
'wonderful',
'wonderfully',
'wonderous',
'wonderously',
'wondrous',
'woo',
'workable',
'world-famous',
'worldly',
'worship',
'worth',
'worth-while',
'worthiness',
'worthwhile',
'worthy',
'wow',
'wry',
'x3?',
'xd',
'xp',
'yearn',
'yearning',
'yearningly',
'yep',
'youthful',
'zeal',
'zenith',
'zest',
'|d',
'}:)}',
);
jwhennessey/phpinsight/lib/PHPInsight/dictionaries/source.prefix.php 0000644 00000000073 15153553404 0021775 0 ustar 00 <?php
$prefix = array(
'aren\'t',
'isn\'t',
'not'
);
jwhennessey/phpinsight/lib/bootstrap.php 0000644 00000000132 15153553404 0014560 0 ustar 00 <?php
require __DIR__ . '/PHPInsight/Autoloader.php';
PHPInsight_Autoloader::register();
woocommerce/action-scheduler/README.md 0000644 00000005357 15153553404 0013612 0 ustar 00 # Action Scheduler - Job Queue for WordPress [](https://travis-ci.org/woocommerce/action-scheduler) [](https://codecov.io/gh/woocommerce/action-scheduler)
Action Scheduler is a scalable, traceable job queue for background processing large sets of actions in WordPress. It's specially designed to be distributed in WordPress plugins.
Action Scheduler works by triggering an action hook to run at some time in the future. Each hook can be scheduled with unique data, to allow callbacks to perform operations on that data. The hook can also be scheduled to run on one or more occasions.
Think of it like an extension to `do_action()` which adds the ability to delay and repeat a hook.
## Battle-Tested Background Processing
Every month, Action Scheduler processes millions of payments for [Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/), webhooks for [WooCommerce](https://wordpress.org/plugins/woocommerce/), as well as emails and other events for a range of other plugins.
It's been seen on live sites processing queues in excess of 50,000 jobs and doing resource intensive operations, like processing payments and creating orders, at a sustained rate of over 10,000 / hour without negatively impacting normal site operations.
This is all on infrastructure and WordPress sites outside the control of the plugin author.
If your plugin needs background processing, especially of large sets of tasks, Action Scheduler can help.
## Learn More
To learn more about how to Action Scheduler works, and how to use it in your plugin, check out the docs on [ActionScheduler.org](https://actionscheduler.org).
There you will find:
* [Usage guide](https://actionscheduler.org/usage/): instructions on installing and using Action Scheduler
* [WP CLI guide](https://actionscheduler.org/wp-cli/): instructions on running Action Scheduler at scale via WP CLI
* [API Reference](https://actionscheduler.org/api/): complete reference guide for all API functions
* [Administration Guide](https://actionscheduler.org/admin/): guide to managing scheduled actions via the administration screen
* [Guide to Background Processing at Scale](https://actionscheduler.org/perf/): instructions for running Action Scheduler at scale via the default WP Cron queue runner
## Credits
Action Scheduler is developed and maintained by [Automattic](http://automattic.com/) with significant early development completed by [Flightless](https://flightless.us/).
Collaboration is cool. We'd love to work with you to improve Action Scheduler. [Pull Requests](https://github.com/woocommerce/action-scheduler/pulls) welcome.
woocommerce/action-scheduler/action-scheduler.php 0000644 00000005717 15153553404 0016275 0 ustar 00 <?php
/**
* Plugin Name: Action Scheduler
* Plugin URI: https://actionscheduler.org
* Description: A robust scheduling library for use in WordPress plugins.
* Author: Automattic
* Author URI: https://automattic.com/
* Version: 3.9.2
* License: GPLv3
* Requires at least: 6.5
* Tested up to: 6.7
* Requires PHP: 7.1
*
* Copyright 2019 Automattic, Inc. (https://automattic.com/contact/)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* @package ActionScheduler
*/
if ( ! function_exists( 'action_scheduler_register_3_dot_9_dot_2' ) && function_exists( 'add_action' ) ) { // WRCS: DEFINED_VERSION.
if ( ! class_exists( 'ActionScheduler_Versions', false ) ) {
require_once __DIR__ . '/classes/ActionScheduler_Versions.php';
add_action( 'plugins_loaded', array( 'ActionScheduler_Versions', 'initialize_latest_version' ), 1, 0 );
}
add_action( 'plugins_loaded', 'action_scheduler_register_3_dot_9_dot_2', 0, 0 ); // WRCS: DEFINED_VERSION.
// phpcs:disable Generic.Functions.OpeningFunctionBraceKernighanRitchie.ContentAfterBrace
/**
* Registers this version of Action Scheduler.
*/
function action_scheduler_register_3_dot_9_dot_2() { // WRCS: DEFINED_VERSION.
$versions = ActionScheduler_Versions::instance();
$versions->register( '3.9.2', 'action_scheduler_initialize_3_dot_9_dot_2' ); // WRCS: DEFINED_VERSION.
}
// phpcs:disable Generic.Functions.OpeningFunctionBraceKernighanRitchie.ContentAfterBrace
/**
* Initializes this version of Action Scheduler.
*/
function action_scheduler_initialize_3_dot_9_dot_2() { // WRCS: DEFINED_VERSION.
// A final safety check is required even here, because historic versions of Action Scheduler
// followed a different pattern (in some unusual cases, we could reach this point and the
// ActionScheduler class is already defined—so we need to guard against that).
if ( ! class_exists( 'ActionScheduler', false ) ) {
require_once __DIR__ . '/classes/abstracts/ActionScheduler.php';
ActionScheduler::init( __FILE__ );
}
}
// Support usage in themes - load this version if no plugin has loaded a version yet.
if ( did_action( 'plugins_loaded' ) && ! doing_action( 'plugins_loaded' ) && ! class_exists( 'ActionScheduler', false ) ) {
action_scheduler_initialize_3_dot_9_dot_2(); // WRCS: DEFINED_VERSION.
do_action( 'action_scheduler_pre_theme_init' );
ActionScheduler_Versions::initialize_latest_version();
}
}
woocommerce/action-scheduler/changelog.txt 0000644 00000021307 15153553404 0015014 0 ustar 00 *** Changelog ***
= 3.9.2 - 2025-02-03 =
* Fixed fatal errors by moving version info methods to a new class and deprecating conflicting ones in ActionScheduler_Versions
= 3.9.1 - 2025-01-21 =
* A number of new WP CLI commands have been added, making it easier to manage actions in the terminal and from scripts.
* New wp action-scheduler source command to help determine how Action Scheduler is being loaded.
* Additional information about the active instance of Action Scheduler is now available in the Help pull-down drawer.
* Make some other nullable parameters explicitly nullable.
* Set option value to `no` rather than deleting.
= 3.9.0 - 2024-11-14 =
* Minimum required version of PHP is now 7.1.
* Performance improvements for the `as_pending_actions_due()` function.
* Existing filter hook `action_scheduler_claim_actions_order_by` enhanced to provide callbacks with additional information.
* Improved compatibility with PHP 8.4, specifically by making implicitly nullable parameters explicitly nullable.
* A large number of coding standards-enhancements, to help reduce friction when submitting plugins to marketplaces and plugin directories. Special props @crstauf for this effort.
* Minor documentation tweaks and improvements.
= 3.8.2 - 2024-09-12 =
* Add missing parameter to the `pre_as_enqueue_async_action` hook.
* Bump minimum PHP version to 7.0.
* Bump minimum WordPress version to 6.4.
* Make the batch size adjustable during processing.
= 3.8.1 - 2024-06-20 =
* Fix typos.
* Improve the messaging in our unidentified action exceptions.
= 3.8.0 - 2024-05-22 =
* Documentation - Fixed typos in perf.md.
* Update - We now require WordPress 6.3 or higher.
* Update - We now require PHP 7.0 or higher.
= 3.7.4 - 2024-04-05 =
* Give a clear description of how the $unique parameter works.
* Preserve the tab field if set.
* Tweak - WP 6.5 compatibility.
= 3.7.3 - 2024-03-20 =
* Do not iterate over all of GET when building form in list table.
* Fix a few issues reported by PCP (Plugin Check Plugin).
* Try to save actions as unique even when the store doesn't support it.
* Tweak - WP 6.4 compatibility.
* Update "Tested up to" tag to WordPress 6.5.
* update version in package-lock.json.
= 3.7.2 - 2024-02-14 =
* No longer user variables in `_n()` translation function.
= 3.7.1 - 2023-12-13 =
* update semver to 5.7.2 because of a security vulnerability in 5.7.1.
= 3.7.0 - 2023-11-20 =
* Important: starting with this release, Action Scheduler follows an L-2 version policy (WordPress, and consequently PHP).
* Add extended indexes for hook_status_scheduled_date_gmt and status_scheduled_date_gmt.
* Catch and log exceptions thrown when actions can't be created, e.g. under a corrupt database schema.
* Tweak - WP 6.4 compatibility.
* Update unit tests for upcoming dependency version policy.
* make sure hook action_scheduler_failed_execution can access original exception object.
* mention dependency version policy in usage.md.
= 3.6.4 - 2023-10-11 =
* Performance improvements when bulk cancelling actions.
* Dev-related fixes.
= 3.6.3 - 2023-09-13 =
* Use `_doing_it_wrong` in initialization check.
= 3.6.2 - 2023-08-09 =
* Add guidance about passing arguments.
* Atomic option locking.
* Improve bulk delete handling.
* Include database error in the exception message.
* Tweak - WP 6.3 compatibility.
= 3.6.1 - 2023-06-14 =
* Document new optional `$priority` arg for various API functions.
* Document the new `--exclude-groups` WP CLI option.
* Document the new `action_scheduler_init` hook.
* Ensure actions within each claim are executed in the expected order.
* Fix incorrect text domain.
* Remove SHOW TABLES usage when checking if tables exist.
= 3.6.0 - 2023-05-10 =
* Add $unique parameter to function signatures.
* Add a cast-to-int for extra safety before forming new DateTime object.
* Add a hook allowing exceptions for consistently failing recurring actions.
* Add action priorities.
* Add init hook.
* Always raise the time limit.
* Bump minimatch from 3.0.4 to 3.0.8.
* Bump yaml from 2.2.1 to 2.2.2.
* Defensive coding relating to gaps in declared schedule types.
* Do not process an action if it cannot be set to `in-progress`.
* Filter view labels (status names) should be translatable | #919.
* Fix WPCLI progress messages.
* Improve data-store initialization flow.
* Improve error handling across all supported PHP versions.
* Improve logic for flushing the runtime cache.
* Support exclusion of multiple groups.
* Update lint-staged and Node/NPM requirements.
* add CLI clean command.
* add CLI exclude-group filter.
* exclude past-due from list table all filter count.
* throwing an exception if as_schedule_recurring_action interval param is not of type integer.
= 3.5.4 - 2023-01-17 =
* Add pre filters during action registration.
* Async scheduling.
* Calculate timeouts based on total actions.
* Correctly order the parameters for `ActionScheduler_ActionFactory`'s calls to `single_unique`.
* Fetch action in memory first before releasing claim to avoid deadlock.
* PHP 8.2: declare property to fix creation of dynamic property warning.
* PHP 8.2: fix "Using ${var} in strings is deprecated, use {$var} instead".
* Prevent `undefined variable` warning for `$num_pastdue_actions`.
= 3.5.3 - 2022-11-09 =
* Query actions with partial match.
= 3.5.2 - 2022-09-16 =
* Fix - erroneous 3.5.1 release.
= 3.5.1 - 2022-09-13 =
* Maintenance on A/S docs.
* fix: PHP 8.2 deprecated notice.
= 3.5.0 - 2022-08-25 =
* Add - The active view link within the "Tools > Scheduled Actions" screen is now clickable.
* Add - A warning when there are past-due actions.
* Enhancement - Added the ability to schedule unique actions via an atomic operation.
* Enhancement - Improvements to cache invalidation when processing batches (when running on WordPress 6.0+).
* Enhancement - If a recurring action is found to be consistently failing, it will stop being rescheduled.
* Enhancement - Adds a new "Past Due" view to the scheduled actions list table.
= 3.4.2 - 2022-06-08 =
* Fix - Change the include for better linting.
* Fix - update: Added Action scheduler completed action hook.
= 3.4.1 - 2022-05-24 =
* Fix - Change the include for better linting.
* Fix - Fix the documented return type.
= 3.4.0 - 2021-10-29 =
* Enhancement - Number of items per page can now be set for the Scheduled Actions view (props @ovidiul). #771
* Fix - Do not lower the max_execution_time if it is already set to 0 (unlimited) (props @barryhughes). #755
* Fix - Avoid triggering autoloaders during the version resolution process (props @olegabr). #731 & #776
* Dev - ActionScheduler_wcSystemStatus PHPCS fixes (props @ovidiul). #761
* Dev - ActionScheduler_DBLogger.php PHPCS fixes (props @ovidiul). #768
* Dev - Fixed phpcs for ActionScheduler_Schedule_Deprecated (props @ovidiul). #762
* Dev - Improve actions table indices (props @glagonikas). #774 & #777
* Dev - PHPCS fixes for ActionScheduler_DBStore.php (props @ovidiul). #769 & #778
* Dev - PHPCS Fixes for ActionScheduler_Abstract_ListTable (props @ovidiul). #763 & #779
* Dev - Adds new filter action_scheduler_claim_actions_order_by to allow tuning of the claim query (props @glagonikas). #773
* Dev - PHPCS fixes for ActionScheduler_WpPostStore class (props @ovidiul). #780
= 3.3.0 - 2021-09-15 =
* Enhancement - Adds as_has_scheduled_action() to provide a performant way to test for existing actions. #645
* Fix - Improves compatibility with environments where NO_ZERO_DATE is enabled. #519
* Fix - Adds safety checks to guard against errors when our database tables cannot be created. #645
* Dev - Now supports queries that use multiple statuses. #649
* Dev - Minimum requirements for WordPress and PHP bumped (to 5.2 and 5.6 respectively). #723
= 3.2.1 - 2021-06-21 =
* Fix - Add extra safety/account for different versions of AS and different loading patterns. #714
* Fix - Handle hidden columns (Tools → Scheduled Actions) | #600.
= 3.2.0 - 2021-06-03 =
* Fix - Add "no ordering" option to as_next_scheduled_action().
* Fix - Add secondary scheduled date checks when claiming actions (DBStore) | #634.
* Fix - Add secondary scheduled date checks when claiming actions (wpPostStore) | #634.
* Fix - Adds a new index to the action table, reducing the potential for deadlocks (props: @glagonikas).
* Fix - Fix unit tests infrastructure and adapt tests to PHP 8.
* Fix - Identify in-use data store.
* Fix - Improve test_migration_is_scheduled.
* Fix - PHP notice on list table.
* Fix - Speed up clean up and batch selects.
* Fix - Update pending dependencies.
* Fix - [PHP 8.0] Only pass action arg values through to do_action_ref_array().
* Fix - [PHP 8] Set the PHP version to 7.1 in composer.json for PHP 8 compatibility.
* Fix - add is_initialized() to docs.
* Fix - fix file permissions.
* Fix - fixes #664 by replacing __ with esc_html__.
= 3.1.6 - 2020-05-12 =
* Change log starts.
woocommerce/action-scheduler/classes/ActionScheduler_ActionClaim.php 0000644 00000001214 15153553404 0022004 0 ustar 00 <?php
/**
* Class ActionScheduler_ActionClaim
*/
class ActionScheduler_ActionClaim {
/**
* Claim ID.
*
* @var string
*/
private $id = '';
/**
* Claimed action IDs.
*
* @var int[]
*/
private $action_ids = array();
/**
* Construct.
*
* @param string $id Claim ID.
* @param int[] $action_ids Action IDs.
*/
public function __construct( $id, array $action_ids ) {
$this->id = $id;
$this->action_ids = $action_ids;
}
/**
* Get claim ID.
*/
public function get_id() {
return $this->id;
}
/**
* Get IDs of claimed actions.
*/
public function get_actions() {
return $this->action_ids;
}
}
woocommerce/action-scheduler/classes/ActionScheduler_ActionFactory.php 0000644 00000037657 15153553404 0022412 0 ustar 00 <?php
/**
* Class ActionScheduler_ActionFactory
*/
class ActionScheduler_ActionFactory {
/**
* Return stored actions for given params.
*
* @param string $status The action's status in the data store.
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass to callbacks when the hook is triggered.
* @param ActionScheduler_Schedule|null $schedule The action's schedule.
* @param string $group A group to put the action in.
* phpcs:ignore Squiz.Commenting.FunctionComment.ExtraParamComment
* @param int $priority The action priority.
*
* @return ActionScheduler_Action An instance of the stored action.
*/
public function get_stored_action( $status, $hook, array $args = array(), ?ActionScheduler_Schedule $schedule = null, $group = '' ) {
// The 6th parameter ($priority) is not formally declared in the method signature to maintain compatibility with
// third-party subclasses created before this param was added.
$priority = func_num_args() >= 6 ? (int) func_get_arg( 5 ) : 10;
switch ( $status ) {
case ActionScheduler_Store::STATUS_PENDING:
$action_class = 'ActionScheduler_Action';
break;
case ActionScheduler_Store::STATUS_CANCELED:
$action_class = 'ActionScheduler_CanceledAction';
if ( ! is_null( $schedule ) && ! is_a( $schedule, 'ActionScheduler_CanceledSchedule' ) && ! is_a( $schedule, 'ActionScheduler_NullSchedule' ) ) {
$schedule = new ActionScheduler_CanceledSchedule( $schedule->get_date() );
}
break;
default:
$action_class = 'ActionScheduler_FinishedAction';
break;
}
$action_class = apply_filters( 'action_scheduler_stored_action_class', $action_class, $status, $hook, $args, $schedule, $group );
$action = new $action_class( $hook, $args, $schedule, $group );
$action->set_priority( $priority );
/**
* Allow 3rd party code to change the instantiated action for a given hook, args, schedule and group.
*
* @param ActionScheduler_Action $action The instantiated action.
* @param string $hook The instantiated action's hook.
* @param array $args The instantiated action's args.
* @param ActionScheduler_Schedule $schedule The instantiated action's schedule.
* @param string $group The instantiated action's group.
* @param int $priority The action priority.
*/
return apply_filters( 'action_scheduler_stored_action_instance', $action, $hook, $args, $schedule, $group, $priority );
}
/**
* Enqueue an action to run one time, as soon as possible (rather a specific scheduled time).
*
* This method creates a new action using the NullSchedule. In practice, this results in an action scheduled to
* execute "now". Therefore, it will generally run as soon as possible but is not prioritized ahead of other actions
* that are already past-due.
*
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass when the hook is triggered.
* @param string $group A group to put the action in.
*
* @return int The ID of the stored action.
*/
public function async( $hook, $args = array(), $group = '' ) {
return $this->async_unique( $hook, $args, $group, false );
}
/**
* Same as async, but also supports $unique param.
*
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass when the hook is triggered.
* @param string $group A group to put the action in.
* @param bool $unique Whether to ensure the action is unique.
*
* @return int The ID of the stored action.
*/
public function async_unique( $hook, $args = array(), $group = '', $unique = true ) {
$schedule = new ActionScheduler_NullSchedule();
$action = new ActionScheduler_Action( $hook, $args, $schedule, $group );
return $unique ? $this->store_unique_action( $action, $unique ) : $this->store( $action );
}
/**
* Create single action.
*
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass when the hook is triggered.
* @param int $when Unix timestamp when the action will run.
* @param string $group A group to put the action in.
*
* @return int The ID of the stored action.
*/
public function single( $hook, $args = array(), $when = null, $group = '' ) {
return $this->single_unique( $hook, $args, $when, $group, false );
}
/**
* Create single action only if there is no pending or running action with same name and params.
*
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass when the hook is triggered.
* @param int $when Unix timestamp when the action will run.
* @param string $group A group to put the action in.
* @param bool $unique Whether action scheduled should be unique.
*
* @return int The ID of the stored action.
*/
public function single_unique( $hook, $args = array(), $when = null, $group = '', $unique = true ) {
$date = as_get_datetime_object( $when );
$schedule = new ActionScheduler_SimpleSchedule( $date );
$action = new ActionScheduler_Action( $hook, $args, $schedule, $group );
return $unique ? $this->store_unique_action( $action ) : $this->store( $action );
}
/**
* Create the first instance of an action recurring on a given interval.
*
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass when the hook is triggered.
* @param int $first Unix timestamp for the first run.
* @param int $interval Seconds between runs.
* @param string $group A group to put the action in.
*
* @return int The ID of the stored action.
*/
public function recurring( $hook, $args = array(), $first = null, $interval = null, $group = '' ) {
return $this->recurring_unique( $hook, $args, $first, $interval, $group, false );
}
/**
* Create the first instance of an action recurring on a given interval only if there is no pending or running action with same name and params.
*
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass when the hook is triggered.
* @param int $first Unix timestamp for the first run.
* @param int $interval Seconds between runs.
* @param string $group A group to put the action in.
* @param bool $unique Whether action scheduled should be unique.
*
* @return int The ID of the stored action.
*/
public function recurring_unique( $hook, $args = array(), $first = null, $interval = null, $group = '', $unique = true ) {
if ( empty( $interval ) ) {
return $this->single_unique( $hook, $args, $first, $group, $unique );
}
$date = as_get_datetime_object( $first );
$schedule = new ActionScheduler_IntervalSchedule( $date, $interval );
$action = new ActionScheduler_Action( $hook, $args, $schedule, $group );
return $unique ? $this->store_unique_action( $action ) : $this->store( $action );
}
/**
* Create the first instance of an action recurring on a Cron schedule.
*
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass when the hook is triggered.
* @param int $base_timestamp The first instance of the action will be scheduled
* to run at a time calculated after this timestamp matching the cron
* expression. This can be used to delay the first instance of the action.
* @param int $schedule A cron definition string.
* @param string $group A group to put the action in.
*
* @return int The ID of the stored action.
*/
public function cron( $hook, $args = array(), $base_timestamp = null, $schedule = null, $group = '' ) {
return $this->cron_unique( $hook, $args, $base_timestamp, $schedule, $group, false );
}
/**
* Create the first instance of an action recurring on a Cron schedule only if there is no pending or running action with same name and params.
*
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass when the hook is triggered.
* @param int $base_timestamp The first instance of the action will be scheduled
* to run at a time calculated after this timestamp matching the cron
* expression. This can be used to delay the first instance of the action.
* @param int $schedule A cron definition string.
* @param string $group A group to put the action in.
* @param bool $unique Whether action scheduled should be unique.
*
* @return int The ID of the stored action.
**/
public function cron_unique( $hook, $args = array(), $base_timestamp = null, $schedule = null, $group = '', $unique = true ) {
if ( empty( $schedule ) ) {
return $this->single_unique( $hook, $args, $base_timestamp, $group, $unique );
}
$date = as_get_datetime_object( $base_timestamp );
$cron = CronExpression::factory( $schedule );
$schedule = new ActionScheduler_CronSchedule( $date, $cron );
$action = new ActionScheduler_Action( $hook, $args, $schedule, $group );
return $unique ? $this->store_unique_action( $action ) : $this->store( $action );
}
/**
* Create a successive instance of a recurring or cron action.
*
* Importantly, the action will be rescheduled to run based on the current date/time.
* That means when the action is scheduled to run in the past, the next scheduled date
* will be pushed forward. For example, if a recurring action set to run every hour
* was scheduled to run 5 seconds ago, it will be next scheduled for 1 hour in the
* future, which is 1 hour and 5 seconds from when it was last scheduled to run.
*
* Alternatively, if the action is scheduled to run in the future, and is run early,
* likely via manual intervention, then its schedule will change based on the time now.
* For example, if a recurring action set to run every day, and is run 12 hours early,
* it will run again in 24 hours, not 36 hours.
*
* This slippage is less of an issue with Cron actions, as the specific run time can
* be set for them to run, e.g. 1am each day. In those cases, and entire period would
* need to be missed before there was any change is scheduled, e.g. in the case of an
* action scheduled for 1am each day, the action would need to run an entire day late.
*
* @param ActionScheduler_Action $action The existing action.
*
* @return string The ID of the stored action
* @throws InvalidArgumentException If $action is not a recurring action.
*/
public function repeat( $action ) {
$schedule = $action->get_schedule();
$next = $schedule->get_next( as_get_datetime_object() );
if ( is_null( $next ) || ! $schedule->is_recurring() ) {
throw new InvalidArgumentException( __( 'Invalid action - must be a recurring action.', 'action-scheduler' ) );
}
$schedule_class = get_class( $schedule );
$new_schedule = new $schedule( $next, $schedule->get_recurrence(), $schedule->get_first_date() );
$new_action = new ActionScheduler_Action( $action->get_hook(), $action->get_args(), $new_schedule, $action->get_group() );
$new_action->set_priority( $action->get_priority() );
return $this->store( $new_action );
}
/**
* Creates a scheduled action.
*
* This general purpose method can be used in place of specific methods such as async(),
* async_unique(), single() or single_unique(), etc.
*
* @internal Not intended for public use, should not be overridden by subclasses.
*
* @param array $options {
* Describes the action we wish to schedule.
*
* @type string $type Must be one of 'async', 'cron', 'recurring', or 'single'.
* @type string $hook The hook to be executed.
* @type array $arguments Arguments to be passed to the callback.
* @type string $group The action group.
* @type bool $unique If the action should be unique.
* @type int $when Timestamp. Indicates when the action, or first instance of the action in the case
* of recurring or cron actions, becomes due.
* @type int|string $pattern Recurrence pattern. This is either an interval in seconds for recurring actions
* or a cron expression for cron actions.
* @type int $priority Lower values means higher priority. Should be in the range 0-255.
* }
*
* @return int The action ID. Zero if there was an error scheduling the action.
*/
public function create( array $options = array() ) {
$defaults = array(
'type' => 'single',
'hook' => '',
'arguments' => array(),
'group' => '',
'unique' => false,
'when' => time(),
'pattern' => null,
'priority' => 10,
);
$options = array_merge( $defaults, $options );
// Cron/recurring actions without a pattern are treated as single actions (this gives calling code the ability
// to use functions like as_schedule_recurring_action() to schedule recurring as well as single actions).
if ( ( 'cron' === $options['type'] || 'recurring' === $options['type'] ) && empty( $options['pattern'] ) ) {
$options['type'] = 'single';
}
switch ( $options['type'] ) {
case 'async':
$schedule = new ActionScheduler_NullSchedule();
break;
case 'cron':
$date = as_get_datetime_object( $options['when'] );
$cron = CronExpression::factory( $options['pattern'] );
$schedule = new ActionScheduler_CronSchedule( $date, $cron );
break;
case 'recurring':
$date = as_get_datetime_object( $options['when'] );
$schedule = new ActionScheduler_IntervalSchedule( $date, $options['pattern'] );
break;
case 'single':
$date = as_get_datetime_object( $options['when'] );
$schedule = new ActionScheduler_SimpleSchedule( $date );
break;
default:
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
error_log( "Unknown action type '{$options['type']}' specified when trying to create an action for '{$options['hook']}'." );
return 0;
}
$action = new ActionScheduler_Action( $options['hook'], $options['arguments'], $schedule, $options['group'] );
$action->set_priority( $options['priority'] );
$action_id = 0;
try {
$action_id = $options['unique'] ? $this->store_unique_action( $action ) : $this->store( $action );
} catch ( Exception $e ) {
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
error_log(
sprintf(
/* translators: %1$s is the name of the hook to be enqueued, %2$s is the exception message. */
__( 'Caught exception while enqueuing action "%1$s": %2$s', 'action-scheduler' ),
$options['hook'],
$e->getMessage()
)
);
}
return $action_id;
}
/**
* Save action to database.
*
* @param ActionScheduler_Action $action Action object to save.
*
* @return int The ID of the stored action
*/
protected function store( ActionScheduler_Action $action ) {
$store = ActionScheduler_Store::instance();
return $store->save_action( $action );
}
/**
* Store action if it's unique.
*
* @param ActionScheduler_Action $action Action object to store.
*
* @return int ID of the created action. Will be 0 if action was not created.
*/
protected function store_unique_action( ActionScheduler_Action $action ) {
$store = ActionScheduler_Store::instance();
if ( method_exists( $store, 'save_unique_action' ) ) {
return $store->save_unique_action( $action );
} else {
/**
* Fallback to non-unique action if the store doesn't support unique actions.
* We try to save the action as unique, accepting that there might be a race condition.
* This is likely still better than giving up on unique actions entirely.
*/
$existing_action_id = (int) $store->find_action(
$action->get_hook(),
array(
'args' => $action->get_args(),
'status' => ActionScheduler_Store::STATUS_PENDING,
'group' => $action->get_group(),
)
);
if ( $existing_action_id > 0 ) {
return 0;
}
return $store->save_action( $action );
}
}
}
woocommerce/action-scheduler/classes/ActionScheduler_AdminView.php 0000644 00000024603 15153553404 0021513 0 ustar 00 <?php
/**
* Class ActionScheduler_AdminView
*
* @codeCoverageIgnore
*/
class ActionScheduler_AdminView extends ActionScheduler_AdminView_Deprecated {
/**
* Instance.
*
* @var null|self
*/
private static $admin_view = null;
/**
* Screen ID.
*
* @var string
*/
private static $screen_id = 'tools_page_action-scheduler';
/**
* ActionScheduler_ListTable instance.
*
* @var ActionScheduler_ListTable
*/
protected $list_table;
/**
* Get instance.
*
* @return ActionScheduler_AdminView
* @codeCoverageIgnore
*/
public static function instance() {
if ( empty( self::$admin_view ) ) {
$class = apply_filters( 'action_scheduler_admin_view_class', 'ActionScheduler_AdminView' );
self::$admin_view = new $class();
}
return self::$admin_view;
}
/**
* Initialize.
*
* @codeCoverageIgnore
*/
public function init() {
if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
if ( class_exists( 'WooCommerce' ) ) {
add_action( 'woocommerce_admin_status_content_action-scheduler', array( $this, 'render_admin_ui' ) );
add_action( 'woocommerce_system_status_report', array( $this, 'system_status_report' ) );
add_filter( 'woocommerce_admin_status_tabs', array( $this, 'register_system_status_tab' ) );
}
add_action( 'admin_menu', array( $this, 'register_menu' ) );
add_action( 'admin_notices', array( $this, 'maybe_check_pastdue_actions' ) );
add_action( 'current_screen', array( $this, 'add_help_tabs' ) );
}
}
/**
* Print system status report.
*/
public function system_status_report() {
$table = new ActionScheduler_wcSystemStatus( ActionScheduler::store() );
$table->render();
}
/**
* Registers action-scheduler into WooCommerce > System status.
*
* @param array $tabs An associative array of tab key => label.
* @return array $tabs An associative array of tab key => label, including Action Scheduler's tabs
*/
public function register_system_status_tab( array $tabs ) {
$tabs['action-scheduler'] = __( 'Scheduled Actions', 'action-scheduler' );
return $tabs;
}
/**
* Include Action Scheduler's administration under the Tools menu.
*
* A menu under the Tools menu is important for backward compatibility (as that's
* where it started), and also provides more convenient access than the WooCommerce
* System Status page, and for sites where WooCommerce isn't active.
*/
public function register_menu() {
$hook_suffix = add_submenu_page(
'tools.php',
__( 'Scheduled Actions', 'action-scheduler' ),
__( 'Scheduled Actions', 'action-scheduler' ),
'manage_options',
'action-scheduler',
array( $this, 'render_admin_ui' )
);
add_action( 'load-' . $hook_suffix, array( $this, 'process_admin_ui' ) );
}
/**
* Triggers processing of any pending actions.
*/
public function process_admin_ui() {
$this->get_list_table();
}
/**
* Renders the Admin UI
*/
public function render_admin_ui() {
$table = $this->get_list_table();
$table->display_page();
}
/**
* Get the admin UI object and process any requested actions.
*
* @return ActionScheduler_ListTable
*/
protected function get_list_table() {
if ( null === $this->list_table ) {
$this->list_table = new ActionScheduler_ListTable( ActionScheduler::store(), ActionScheduler::logger(), ActionScheduler::runner() );
$this->list_table->process_actions();
}
return $this->list_table;
}
/**
* Action: admin_notices
*
* Maybe check past-due actions, and print notice.
*
* @uses $this->check_pastdue_actions()
*/
public function maybe_check_pastdue_actions() {
// Filter to prevent checking actions (ex: inappropriate user).
if ( ! apply_filters( 'action_scheduler_check_pastdue_actions', current_user_can( 'manage_options' ) ) ) {
return;
}
// Get last check transient.
$last_check = get_transient( 'action_scheduler_last_pastdue_actions_check' );
// If transient exists, we're within interval, so bail.
if ( ! empty( $last_check ) ) {
return;
}
// Perform the check.
$this->check_pastdue_actions();
}
/**
* Check past-due actions, and print notice.
*/
protected function check_pastdue_actions() {
// Set thresholds.
$threshold_seconds = (int) apply_filters( 'action_scheduler_pastdue_actions_seconds', DAY_IN_SECONDS );
$threshold_min = (int) apply_filters( 'action_scheduler_pastdue_actions_min', 1 );
// Set fallback value for past-due actions count.
$num_pastdue_actions = 0;
// Allow third-parties to preempt the default check logic.
$check = apply_filters( 'action_scheduler_pastdue_actions_check_pre', null );
// If no third-party preempted and there are no past-due actions, return early.
if ( ! is_null( $check ) ) {
return;
}
// Scheduled actions query arguments.
$query_args = array(
'date' => as_get_datetime_object( time() - $threshold_seconds ),
'status' => ActionScheduler_Store::STATUS_PENDING,
'per_page' => $threshold_min,
);
// If no third-party preempted, run default check.
if ( is_null( $check ) ) {
$store = ActionScheduler_Store::instance();
$num_pastdue_actions = (int) $store->query_actions( $query_args, 'count' );
// Check if past-due actions count is greater than or equal to threshold.
$check = ( $num_pastdue_actions >= $threshold_min );
$check = (bool) apply_filters( 'action_scheduler_pastdue_actions_check', $check, $num_pastdue_actions, $threshold_seconds, $threshold_min );
}
// If check failed, set transient and abort.
if ( ! boolval( $check ) ) {
$interval = apply_filters( 'action_scheduler_pastdue_actions_check_interval', round( $threshold_seconds / 4 ), $threshold_seconds );
set_transient( 'action_scheduler_last_pastdue_actions_check', time(), $interval );
return;
}
$actions_url = add_query_arg(
array(
'page' => 'action-scheduler',
'status' => 'past-due',
'order' => 'asc',
),
admin_url( 'tools.php' )
);
// Print notice.
echo '<div class="notice notice-warning"><p>';
printf(
wp_kses(
// translators: 1) is the number of affected actions, 2) is a link to an admin screen.
_n(
'<strong>Action Scheduler:</strong> %1$d <a href="%2$s">past-due action</a> found; something may be wrong. <a href="https://actionscheduler.org/faq/#my-site-has-past-due-actions-what-can-i-do" target="_blank">Read documentation »</a>',
'<strong>Action Scheduler:</strong> %1$d <a href="%2$s">past-due actions</a> found; something may be wrong. <a href="https://actionscheduler.org/faq/#my-site-has-past-due-actions-what-can-i-do" target="_blank">Read documentation »</a>',
$num_pastdue_actions,
'action-scheduler'
),
array(
'strong' => array(),
'a' => array(
'href' => true,
'target' => true,
),
)
),
absint( $num_pastdue_actions ),
esc_attr( esc_url( $actions_url ) )
);
echo '</p></div>';
// Facilitate third-parties to evaluate and print notices.
do_action( 'action_scheduler_pastdue_actions_extra_notices', $query_args );
}
/**
* Provide more information about the screen and its data in the help tab.
*/
public function add_help_tabs() {
$screen = get_current_screen();
if ( ! $screen || self::$screen_id !== $screen->id ) {
return;
}
$as_version = ActionScheduler_Versions::instance()->latest_version();
$as_source = ActionScheduler_SystemInformation::active_source();
$as_source_path = ActionScheduler_SystemInformation::active_source_path();
$as_source_markup = sprintf( '<code>%s</code>', esc_html( $as_source_path ) );
if ( ! empty( $as_source ) ) {
$as_source_markup = sprintf(
'%s: <abbr title="%s">%s</abbr>',
ucfirst( $as_source['type'] ),
esc_attr( $as_source_path ),
esc_html( $as_source['name'] )
);
}
$screen->add_help_tab(
array(
'id' => 'action_scheduler_about',
'title' => __( 'About', 'action-scheduler' ),
'content' =>
// translators: %s is the Action Scheduler version.
'<h2>' . sprintf( __( 'About Action Scheduler %s', 'action-scheduler' ), $as_version ) . '</h2>' .
'<p>' .
__( 'Action Scheduler is a scalable, traceable job queue for background processing large sets of actions. Action Scheduler works by triggering an action hook to run at some time in the future. Scheduled actions can also be scheduled to run on a recurring schedule.', 'action-scheduler' ) .
'</p>' .
'<h3>' . esc_html__( 'Source', 'action-scheduler' ) . '</h3>' .
'<p>' .
esc_html__( 'Action Scheduler is currently being loaded from the following location. This can be useful when debugging, or if requested by the support team.', 'action-scheduler' ) .
'</p>' .
'<p>' . $as_source_markup . '</p>' .
'<h3>' . esc_html__( 'WP CLI', 'action-scheduler' ) . '</h3>' .
'<p>' .
sprintf(
/* translators: %1$s is WP CLI command (not translatable) */
esc_html__( 'WP CLI commands are available: execute %1$s for a list of available commands.', 'action-scheduler' ),
'<code>wp help action-scheduler</code>'
) .
'</p>',
)
);
$screen->add_help_tab(
array(
'id' => 'action_scheduler_columns',
'title' => __( 'Columns', 'action-scheduler' ),
'content' =>
'<h2>' . __( 'Scheduled Action Columns', 'action-scheduler' ) . '</h2>' .
'<ul>' .
sprintf( '<li><strong>%1$s</strong>: %2$s</li>', __( 'Hook', 'action-scheduler' ), __( 'Name of the action hook that will be triggered.', 'action-scheduler' ) ) .
sprintf( '<li><strong>%1$s</strong>: %2$s</li>', __( 'Status', 'action-scheduler' ), __( 'Action statuses are Pending, Complete, Canceled, Failed', 'action-scheduler' ) ) .
sprintf( '<li><strong>%1$s</strong>: %2$s</li>', __( 'Arguments', 'action-scheduler' ), __( 'Optional data array passed to the action hook.', 'action-scheduler' ) ) .
sprintf( '<li><strong>%1$s</strong>: %2$s</li>', __( 'Group', 'action-scheduler' ), __( 'Optional action group.', 'action-scheduler' ) ) .
sprintf( '<li><strong>%1$s</strong>: %2$s</li>', __( 'Recurrence', 'action-scheduler' ), __( 'The action\'s schedule frequency.', 'action-scheduler' ) ) .
sprintf( '<li><strong>%1$s</strong>: %2$s</li>', __( 'Scheduled', 'action-scheduler' ), __( 'The date/time the action is/was scheduled to run.', 'action-scheduler' ) ) .
sprintf( '<li><strong>%1$s</strong>: %2$s</li>', __( 'Log', 'action-scheduler' ), __( 'Activity log for the action.', 'action-scheduler' ) ) .
'</ul>',
)
);
}
}
woocommerce/action-scheduler/classes/ActionScheduler_AsyncRequest_QueueRunner.php 0000644 00000004163 15153553404 0024613 0 ustar 00 <?php
defined( 'ABSPATH' ) || exit;
/**
* ActionScheduler_AsyncRequest_QueueRunner class.
*/
class ActionScheduler_AsyncRequest_QueueRunner extends WP_Async_Request {
/**
* Data store for querying actions
*
* @var ActionScheduler_Store
*/
protected $store;
/**
* Prefix for ajax hooks
*
* @var string
*/
protected $prefix = 'as';
/**
* Action for ajax hooks
*
* @var string
*/
protected $action = 'async_request_queue_runner';
/**
* Initiate new async request.
*
* @param ActionScheduler_Store $store Store object.
*/
public function __construct( ActionScheduler_Store $store ) {
parent::__construct();
$this->store = $store;
}
/**
* Handle async requests
*
* Run a queue, and maybe dispatch another async request to run another queue
* if there are still pending actions after completing a queue in this request.
*/
protected function handle() {
do_action( 'action_scheduler_run_queue', 'Async Request' ); // run a queue in the same way as WP Cron, but declare the Async Request context.
$sleep_seconds = $this->get_sleep_seconds();
if ( $sleep_seconds ) {
sleep( $sleep_seconds );
}
$this->maybe_dispatch();
}
/**
* If the async request runner is needed and allowed to run, dispatch a request.
*/
public function maybe_dispatch() {
if ( ! $this->allow() ) {
return;
}
$this->dispatch();
ActionScheduler_QueueRunner::instance()->unhook_dispatch_async_request();
}
/**
* Only allow async requests when needed.
*
* Also allow 3rd party code to disable running actions via async requests.
*/
protected function allow() {
if ( ! has_action( 'action_scheduler_run_queue' ) || ActionScheduler::runner()->has_maximum_concurrent_batches() || ! $this->store->has_pending_actions_due() ) {
$allow = false;
} else {
$allow = true;
}
return apply_filters( 'action_scheduler_allow_async_request_runner', $allow );
}
/**
* Chaining async requests can crash MySQL. A brief sleep call in PHP prevents that.
*/
protected function get_sleep_seconds() {
return apply_filters( 'action_scheduler_async_request_sleep_seconds', 5, $this );
}
}
woocommerce/action-scheduler/classes/ActionScheduler_Compatibility.php 0000644 00000007500 15153553404 0022436 0 ustar 00 <?php
/**
* Class ActionScheduler_Compatibility
*/
class ActionScheduler_Compatibility {
/**
* Converts a shorthand byte value to an integer byte value.
*
* Wrapper for wp_convert_hr_to_bytes(), moved to load.php in WordPress 4.6 from media.php
*
* @link https://secure.php.net/manual/en/function.ini-get.php
* @link https://secure.php.net/manual/en/faq.using.php#faq.using.shorthandbytes
*
* @param string $value A (PHP ini) byte value, either shorthand or ordinary.
* @return int An integer byte value.
*/
public static function convert_hr_to_bytes( $value ) {
if ( function_exists( 'wp_convert_hr_to_bytes' ) ) {
return wp_convert_hr_to_bytes( $value );
}
$value = strtolower( trim( $value ) );
$bytes = (int) $value;
if ( false !== strpos( $value, 'g' ) ) {
$bytes *= GB_IN_BYTES;
} elseif ( false !== strpos( $value, 'm' ) ) {
$bytes *= MB_IN_BYTES;
} elseif ( false !== strpos( $value, 'k' ) ) {
$bytes *= KB_IN_BYTES;
}
// Deal with large (float) values which run into the maximum integer size.
return min( $bytes, PHP_INT_MAX );
}
/**
* Attempts to raise the PHP memory limit for memory intensive processes.
*
* Only allows raising the existing limit and prevents lowering it.
*
* Wrapper for wp_raise_memory_limit(), added in WordPress v4.6.0
*
* @return bool|int|string The limit that was set or false on failure.
*/
public static function raise_memory_limit() {
if ( function_exists( 'wp_raise_memory_limit' ) ) {
return wp_raise_memory_limit( 'admin' );
}
$current_limit = @ini_get( 'memory_limit' ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
$current_limit_int = self::convert_hr_to_bytes( $current_limit );
if ( -1 === $current_limit_int ) {
return false;
}
$wp_max_limit = WP_MAX_MEMORY_LIMIT;
$wp_max_limit_int = self::convert_hr_to_bytes( $wp_max_limit );
$filtered_limit = apply_filters( 'admin_memory_limit', $wp_max_limit );
$filtered_limit_int = self::convert_hr_to_bytes( $filtered_limit );
// phpcs:disable WordPress.PHP.IniSet.memory_limit_Blacklisted
// phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged
if ( -1 === $filtered_limit_int || ( $filtered_limit_int > $wp_max_limit_int && $filtered_limit_int > $current_limit_int ) ) {
if ( false !== @ini_set( 'memory_limit', $filtered_limit ) ) {
return $filtered_limit;
} else {
return false;
}
} elseif ( -1 === $wp_max_limit_int || $wp_max_limit_int > $current_limit_int ) {
if ( false !== @ini_set( 'memory_limit', $wp_max_limit ) ) {
return $wp_max_limit;
} else {
return false;
}
}
// phpcs:enable
return false;
}
/**
* Attempts to raise the PHP timeout for time intensive processes.
*
* Only allows raising the existing limit and prevents lowering it. Wrapper for wc_set_time_limit(), when available.
*
* @param int $limit The time limit in seconds.
*/
public static function raise_time_limit( $limit = 0 ) {
$limit = (int) $limit;
$max_execution_time = (int) ini_get( 'max_execution_time' );
// If the max execution time is already set to zero (unlimited), there is no reason to make a further change.
if ( 0 === $max_execution_time ) {
return;
}
// Whichever of $max_execution_time or $limit is higher is the amount by which we raise the time limit.
$raise_by = 0 === $limit || $limit > $max_execution_time ? $limit : $max_execution_time;
if ( function_exists( 'wc_set_time_limit' ) ) {
wc_set_time_limit( $raise_by );
} elseif ( function_exists( 'set_time_limit' ) && false === strpos( ini_get( 'disable_functions' ), 'set_time_limit' ) && ! ini_get( 'safe_mode' ) ) { // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.safe_modeDeprecatedRemoved
@set_time_limit( $raise_by ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
}
}
}
woocommerce/action-scheduler/classes/ActionScheduler_DataController.php 0000644 00000012445 15153553404 0022546 0 ustar 00 <?php
use Action_Scheduler\Migration\Controller;
/**
* Class ActionScheduler_DataController
*
* The main plugin/initialization class for the data stores.
*
* Responsible for hooking everything up with WordPress.
*
* @package Action_Scheduler
*
* @since 3.0.0
*/
class ActionScheduler_DataController {
/** Action data store class name. */
const DATASTORE_CLASS = 'ActionScheduler_DBStore';
/** Logger data store class name. */
const LOGGER_CLASS = 'ActionScheduler_DBLogger';
/** Migration status option name. */
const STATUS_FLAG = 'action_scheduler_migration_status';
/** Migration status option value. */
const STATUS_COMPLETE = 'complete';
/** Migration minimum required PHP version. */
const MIN_PHP_VERSION = '5.5';
/**
* Instance.
*
* @var ActionScheduler_DataController
*/
private static $instance;
/**
* Sleep time in seconds.
*
* @var int
*/
private static $sleep_time = 0;
/**
* Tick count required for freeing memory.
*
* @var int
*/
private static $free_ticks = 50;
/**
* Get a flag indicating whether the migration environment dependencies are met.
*
* @return bool
*/
public static function dependencies_met() {
$php_support = version_compare( PHP_VERSION, self::MIN_PHP_VERSION, '>=' );
return $php_support && apply_filters( 'action_scheduler_migration_dependencies_met', true );
}
/**
* Get a flag indicating whether the migration is complete.
*
* @return bool Whether the flag has been set marking the migration as complete
*/
public static function is_migration_complete() {
return get_option( self::STATUS_FLAG ) === self::STATUS_COMPLETE;
}
/**
* Mark the migration as complete.
*/
public static function mark_migration_complete() {
update_option( self::STATUS_FLAG, self::STATUS_COMPLETE );
}
/**
* Unmark migration when a plugin is de-activated. Will not work in case of silent activation, for example in an update.
* We do this to mitigate the bug of lost actions which happens if there was an AS 2.x to AS 3.x migration in the past, but that plugin is now
* deactivated and the site was running on AS 2.x again.
*/
public static function mark_migration_incomplete() {
delete_option( self::STATUS_FLAG );
}
/**
* Set the action store class name.
*
* @param string $class Classname of the store class.
*
* @return string
*/
public static function set_store_class( $class ) {
return self::DATASTORE_CLASS;
}
/**
* Set the action logger class name.
*
* @param string $class Classname of the logger class.
*
* @return string
*/
public static function set_logger_class( $class ) {
return self::LOGGER_CLASS;
}
/**
* Set the sleep time in seconds.
*
* @param integer $sleep_time The number of seconds to pause before resuming operation.
*/
public static function set_sleep_time( $sleep_time ) {
self::$sleep_time = (int) $sleep_time;
}
/**
* Set the tick count required for freeing memory.
*
* @param integer $free_ticks The number of ticks to free memory on.
*/
public static function set_free_ticks( $free_ticks ) {
self::$free_ticks = (int) $free_ticks;
}
/**
* Free memory if conditions are met.
*
* @param int $ticks Current tick count.
*/
public static function maybe_free_memory( $ticks ) {
if ( self::$free_ticks && 0 === $ticks % self::$free_ticks ) {
self::free_memory();
}
}
/**
* Reduce memory footprint by clearing the database query and object caches.
*/
public static function free_memory() {
if ( 0 < self::$sleep_time ) {
/* translators: %d: amount of time */
\WP_CLI::warning( sprintf( _n( 'Stopped the insanity for %d second', 'Stopped the insanity for %d seconds', self::$sleep_time, 'action-scheduler' ), self::$sleep_time ) );
sleep( self::$sleep_time );
}
\WP_CLI::warning( __( 'Attempting to reduce used memory...', 'action-scheduler' ) );
/**
* Globals.
*
* @var $wpdb \wpdb
* @var $wp_object_cache \WP_Object_Cache
*/
global $wpdb, $wp_object_cache;
$wpdb->queries = array();
if ( ! is_a( $wp_object_cache, 'WP_Object_Cache' ) ) {
return;
}
$wp_object_cache->group_ops = array();
$wp_object_cache->stats = array();
$wp_object_cache->memcache_debug = array();
$wp_object_cache->cache = array();
if ( is_callable( array( $wp_object_cache, '__remoteset' ) ) ) {
call_user_func( array( $wp_object_cache, '__remoteset' ) ); // important!
}
}
/**
* Connect to table datastores if migration is complete.
* Otherwise, proceed with the migration if the dependencies have been met.
*/
public static function init() {
if ( self::is_migration_complete() ) {
add_filter( 'action_scheduler_store_class', array( 'ActionScheduler_DataController', 'set_store_class' ), 100 );
add_filter( 'action_scheduler_logger_class', array( 'ActionScheduler_DataController', 'set_logger_class' ), 100 );
add_action( 'deactivate_plugin', array( 'ActionScheduler_DataController', 'mark_migration_incomplete' ) );
} elseif ( self::dependencies_met() ) {
Controller::init();
}
add_action( 'action_scheduler/progress_tick', array( 'ActionScheduler_DataController', 'maybe_free_memory' ) );
}
/**
* Singleton factory.
*/
public static function instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new static();
}
return self::$instance;
}
}
woocommerce/action-scheduler/classes/ActionScheduler_DateTime.php 0000644 00000004014 15153553404 0021316 0 ustar 00 <?php
/**
* ActionScheduler DateTime class.
*
* This is a custom extension to DateTime that
*/
class ActionScheduler_DateTime extends DateTime {
/**
* UTC offset.
*
* Only used when a timezone is not set. When a timezone string is
* used, this will be set to 0.
*
* @var int
*/
protected $utcOffset = 0; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase
/**
* Get the unix timestamp of the current object.
*
* Missing in PHP 5.2 so just here so it can be supported consistently.
*
* @return int
*/
#[\ReturnTypeWillChange]
public function getTimestamp() {
return method_exists( 'DateTime', 'getTimestamp' ) ? parent::getTimestamp() : $this->format( 'U' );
}
/**
* Set the UTC offset.
*
* This represents a fixed offset instead of a timezone setting.
*
* @param string|int $offset UTC offset value.
*/
public function setUtcOffset( $offset ) {
$this->utcOffset = intval( $offset ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
}
/**
* Returns the timezone offset.
*
* @return int
* @link http://php.net/manual/en/datetime.getoffset.php
*/
#[\ReturnTypeWillChange]
public function getOffset() {
return $this->utcOffset ? $this->utcOffset : parent::getOffset(); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
}
/**
* Set the TimeZone associated with the DateTime
*
* @param DateTimeZone $timezone Timezone object.
*
* @return static
* @link http://php.net/manual/en/datetime.settimezone.php
*/
#[\ReturnTypeWillChange]
public function setTimezone( $timezone ) {
$this->utcOffset = 0; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
parent::setTimezone( $timezone );
return $this;
}
/**
* Get the timestamp with the WordPress timezone offset added or subtracted.
*
* @since 3.0.0
* @return int
*/
public function getOffsetTimestamp() {
return $this->getTimestamp() + $this->getOffset();
}
}
woocommerce/action-scheduler/classes/ActionScheduler_Exception.php 0000644 00000000317 15153553404 0021562 0 ustar 00 <?php
/**
* ActionScheduler Exception Interface.
*
* Facilitates catching Exceptions unique to Action Scheduler.
*
* @package ActionScheduler
* @since 2.1.0
*/
interface ActionScheduler_Exception {}
woocommerce/action-scheduler/classes/ActionScheduler_FatalErrorMonitor.php 0000644 00000005005 15153553404 0023234 0 ustar 00 <?php
/**
* Class ActionScheduler_FatalErrorMonitor
*/
class ActionScheduler_FatalErrorMonitor {
/**
* ActionScheduler_ActionClaim instance.
*
* @var ActionScheduler_ActionClaim
*/
private $claim = null;
/**
* ActionScheduler_Store instance.
*
* @var ActionScheduler_Store
*/
private $store = null;
/**
* Current action's ID.
*
* @var int
*/
private $action_id = 0;
/**
* Construct.
*
* @param ActionScheduler_Store $store Action store.
*/
public function __construct( ActionScheduler_Store $store ) {
$this->store = $store;
}
/**
* Start monitoring.
*
* @param ActionScheduler_ActionClaim $claim Claimed actions.
*/
public function attach( ActionScheduler_ActionClaim $claim ) {
$this->claim = $claim;
add_action( 'shutdown', array( $this, 'handle_unexpected_shutdown' ) );
add_action( 'action_scheduler_before_execute', array( $this, 'track_current_action' ), 0, 1 );
add_action( 'action_scheduler_after_execute', array( $this, 'untrack_action' ), 0, 0 );
add_action( 'action_scheduler_execution_ignored', array( $this, 'untrack_action' ), 0, 0 );
add_action( 'action_scheduler_failed_execution', array( $this, 'untrack_action' ), 0, 0 );
}
/**
* Stop monitoring.
*/
public function detach() {
$this->claim = null;
$this->untrack_action();
remove_action( 'shutdown', array( $this, 'handle_unexpected_shutdown' ) );
remove_action( 'action_scheduler_before_execute', array( $this, 'track_current_action' ), 0 );
remove_action( 'action_scheduler_after_execute', array( $this, 'untrack_action' ), 0 );
remove_action( 'action_scheduler_execution_ignored', array( $this, 'untrack_action' ), 0 );
remove_action( 'action_scheduler_failed_execution', array( $this, 'untrack_action' ), 0 );
}
/**
* Track specified action.
*
* @param int $action_id Action ID to track.
*/
public function track_current_action( $action_id ) {
$this->action_id = $action_id;
}
/**
* Un-track action.
*/
public function untrack_action() {
$this->action_id = 0;
}
/**
* Handle unexpected shutdown.
*/
public function handle_unexpected_shutdown() {
$error = error_get_last();
if ( $error ) {
if ( in_array( $error['type'], array( E_ERROR, E_PARSE, E_COMPILE_ERROR, E_USER_ERROR, E_RECOVERABLE_ERROR ), true ) ) {
if ( ! empty( $this->action_id ) ) {
$this->store->mark_failure( $this->action_id );
do_action( 'action_scheduler_unexpected_shutdown', $this->action_id, $error );
}
}
$this->store->release_claim( $this->claim );
}
}
}
woocommerce/action-scheduler/classes/ActionScheduler_InvalidActionException.php 0000644 00000002717 15153553404 0024235 0 ustar 00 <?php
/**
* InvalidAction Exception.
*
* Used for identifying actions that are invalid in some way.
*
* @package ActionScheduler
*/
class ActionScheduler_InvalidActionException extends \InvalidArgumentException implements ActionScheduler_Exception {
/**
* Create a new exception when the action's schedule cannot be fetched.
*
* @param string $action_id The action ID with bad args.
* @param mixed $schedule Passed schedule.
* @return static
*/
public static function from_schedule( $action_id, $schedule ) {
$message = sprintf(
/* translators: 1: action ID 2: schedule */
__( 'Action [%1$s] has an invalid schedule: %2$s', 'action-scheduler' ),
$action_id,
var_export( $schedule, true ) // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export
);
return new static( $message );
}
/**
* Create a new exception when the action's args cannot be decoded to an array.
*
* @param string $action_id The action ID with bad args.
* @param mixed $args Passed arguments.
* @return static
*/
public static function from_decoding_args( $action_id, $args = array() ) {
$message = sprintf(
/* translators: 1: action ID 2: arguments */
__( 'Action [%1$s] has invalid arguments. It cannot be JSON decoded to an array. $args = %2$s', 'action-scheduler' ),
$action_id,
var_export( $args, true ) // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export
);
return new static( $message );
}
}
woocommerce/action-scheduler/classes/ActionScheduler_ListTable.php 0000644 00000052166 15153553404 0021520 0 ustar 00 <?php
/**
* Implements the admin view of the actions.
*
* @codeCoverageIgnore
*/
class ActionScheduler_ListTable extends ActionScheduler_Abstract_ListTable {
/**
* The package name.
*
* @var string
*/
protected $package = 'action-scheduler';
/**
* Columns to show (name => label).
*
* @var array
*/
protected $columns = array();
/**
* Actions (name => label).
*
* @var array
*/
protected $row_actions = array();
/**
* The active data stores
*
* @var ActionScheduler_Store
*/
protected $store;
/**
* A logger to use for getting action logs to display
*
* @var ActionScheduler_Logger
*/
protected $logger;
/**
* A ActionScheduler_QueueRunner runner instance (or child class)
*
* @var ActionScheduler_QueueRunner
*/
protected $runner;
/**
* Bulk actions. The key of the array is the method name of the implementation.
* Example: bulk_<key>(array $ids, string $sql_in).
*
* See the comments in the parent class for further details
*
* @var array
*/
protected $bulk_actions = array();
/**
* Flag variable to render our notifications, if any, once.
*
* @var bool
*/
protected static $did_notification = false;
/**
* Array of seconds for common time periods, like week or month, alongside an internationalised string representation, i.e. "Day" or "Days"
*
* @var array
*/
private static $time_periods;
/**
* Sets the current data store object into `store->action` and initialises the object.
*
* @param ActionScheduler_Store $store Store object.
* @param ActionScheduler_Logger $logger Logger object.
* @param ActionScheduler_QueueRunner $runner Runner object.
*/
public function __construct( ActionScheduler_Store $store, ActionScheduler_Logger $logger, ActionScheduler_QueueRunner $runner ) {
$this->store = $store;
$this->logger = $logger;
$this->runner = $runner;
$this->table_header = __( 'Scheduled Actions', 'action-scheduler' );
$this->bulk_actions = array(
'delete' => __( 'Delete', 'action-scheduler' ),
);
$this->columns = array(
'hook' => __( 'Hook', 'action-scheduler' ),
'status' => __( 'Status', 'action-scheduler' ),
'args' => __( 'Arguments', 'action-scheduler' ),
'group' => __( 'Group', 'action-scheduler' ),
'recurrence' => __( 'Recurrence', 'action-scheduler' ),
'schedule' => __( 'Scheduled Date', 'action-scheduler' ),
'log_entries' => __( 'Log', 'action-scheduler' ),
);
$this->sort_by = array(
'schedule',
'hook',
'group',
);
$this->search_by = array(
'hook',
'args',
'claim_id',
);
$request_status = $this->get_request_status();
if ( empty( $request_status ) ) {
$this->sort_by[] = 'status';
} elseif ( in_array( $request_status, array( 'in-progress', 'failed' ), true ) ) {
$this->columns += array( 'claim_id' => __( 'Claim ID', 'action-scheduler' ) );
$this->sort_by[] = 'claim_id';
}
$this->row_actions = array(
'hook' => array(
'run' => array(
'name' => __( 'Run', 'action-scheduler' ),
'desc' => __( 'Process the action now as if it were run as part of a queue', 'action-scheduler' ),
),
'cancel' => array(
'name' => __( 'Cancel', 'action-scheduler' ),
'desc' => __( 'Cancel the action now to avoid it being run in future', 'action-scheduler' ),
'class' => 'cancel trash',
),
),
);
self::$time_periods = array(
array(
'seconds' => YEAR_IN_SECONDS,
/* translators: %s: amount of time */
'names' => _n_noop( '%s year', '%s years', 'action-scheduler' ),
),
array(
'seconds' => MONTH_IN_SECONDS,
/* translators: %s: amount of time */
'names' => _n_noop( '%s month', '%s months', 'action-scheduler' ),
),
array(
'seconds' => WEEK_IN_SECONDS,
/* translators: %s: amount of time */
'names' => _n_noop( '%s week', '%s weeks', 'action-scheduler' ),
),
array(
'seconds' => DAY_IN_SECONDS,
/* translators: %s: amount of time */
'names' => _n_noop( '%s day', '%s days', 'action-scheduler' ),
),
array(
'seconds' => HOUR_IN_SECONDS,
/* translators: %s: amount of time */
'names' => _n_noop( '%s hour', '%s hours', 'action-scheduler' ),
),
array(
'seconds' => MINUTE_IN_SECONDS,
/* translators: %s: amount of time */
'names' => _n_noop( '%s minute', '%s minutes', 'action-scheduler' ),
),
array(
'seconds' => 1,
/* translators: %s: amount of time */
'names' => _n_noop( '%s second', '%s seconds', 'action-scheduler' ),
),
);
parent::__construct(
array(
'singular' => 'action-scheduler',
'plural' => 'action-scheduler',
'ajax' => false,
)
);
add_screen_option(
'per_page',
array(
'default' => $this->items_per_page,
)
);
add_filter( 'set_screen_option_' . $this->get_per_page_option_name(), array( $this, 'set_items_per_page_option' ), 10, 3 );
set_screen_options();
}
/**
* Handles setting the items_per_page option for this screen.
*
* @param mixed $status Default false (to skip saving the current option).
* @param string $option Screen option name.
* @param int $value Screen option value.
* @return int
*/
public function set_items_per_page_option( $status, $option, $value ) {
return $value;
}
/**
* Convert an interval of seconds into a two part human friendly string.
*
* The WordPress human_time_diff() function only calculates the time difference to one degree, meaning
* even if an action is 1 day and 11 hours away, it will display "1 day". This function goes one step
* further to display two degrees of accuracy.
*
* Inspired by the Crontrol::interval() function by Edward Dale: https://wordpress.org/plugins/wp-crontrol/
*
* @param int $interval A interval in seconds.
* @param int $periods_to_include Depth of time periods to include, e.g. for an interval of 70, and $periods_to_include of 2, both minutes and seconds would be included. With a value of 1, only minutes would be included.
* @return string A human friendly string representation of the interval.
*/
private static function human_interval( $interval, $periods_to_include = 2 ) {
if ( $interval <= 0 ) {
return __( 'Now!', 'action-scheduler' );
}
$output = '';
$num_time_periods = count( self::$time_periods );
for ( $time_period_index = 0, $periods_included = 0, $seconds_remaining = $interval; $time_period_index < $num_time_periods && $seconds_remaining > 0 && $periods_included < $periods_to_include; $time_period_index++ ) {
$periods_in_interval = floor( $seconds_remaining / self::$time_periods[ $time_period_index ]['seconds'] );
if ( $periods_in_interval > 0 ) {
if ( ! empty( $output ) ) {
$output .= ' ';
}
$output .= sprintf( translate_nooped_plural( self::$time_periods[ $time_period_index ]['names'], $periods_in_interval, 'action-scheduler' ), $periods_in_interval );
$seconds_remaining -= $periods_in_interval * self::$time_periods[ $time_period_index ]['seconds'];
$periods_included++;
}
}
return $output;
}
/**
* Returns the recurrence of an action or 'Non-repeating'. The output is human readable.
*
* @param ActionScheduler_Action $action Action object.
*
* @return string
*/
protected function get_recurrence( $action ) {
$schedule = $action->get_schedule();
if ( $schedule->is_recurring() && method_exists( $schedule, 'get_recurrence' ) ) {
$recurrence = $schedule->get_recurrence();
if ( is_numeric( $recurrence ) ) {
/* translators: %s: time interval */
return sprintf( __( 'Every %s', 'action-scheduler' ), self::human_interval( $recurrence ) );
} else {
return $recurrence;
}
}
return __( 'Non-repeating', 'action-scheduler' );
}
/**
* Serializes the argument of an action to render it in a human friendly format.
*
* @param array $row The array representation of the current row of the table.
*
* @return string
*/
public function column_args( array $row ) {
if ( empty( $row['args'] ) ) {
return apply_filters( 'action_scheduler_list_table_column_args', '', $row );
}
$row_html = '<ul>';
foreach ( $row['args'] as $key => $value ) {
$row_html .= sprintf( '<li><code>%s => %s</code></li>', esc_html( var_export( $key, true ) ), esc_html( var_export( $value, true ) ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export
}
$row_html .= '</ul>';
return apply_filters( 'action_scheduler_list_table_column_args', $row_html, $row );
}
/**
* Prints the logs entries inline. We do so to avoid loading Javascript and other hacks to show it in a modal.
*
* @param array $row Action array.
* @return string
*/
public function column_log_entries( array $row ) {
$log_entries_html = '<ol>';
$timezone = new DateTimezone( 'UTC' );
foreach ( $row['log_entries'] as $log_entry ) {
$log_entries_html .= $this->get_log_entry_html( $log_entry, $timezone );
}
$log_entries_html .= '</ol>';
return $log_entries_html;
}
/**
* Prints the logs entries inline. We do so to avoid loading Javascript and other hacks to show it in a modal.
*
* @param ActionScheduler_LogEntry $log_entry Log entry object.
* @param DateTimezone $timezone Timestamp.
* @return string
*/
protected function get_log_entry_html( ActionScheduler_LogEntry $log_entry, DateTimezone $timezone ) {
$date = $log_entry->get_date();
$date->setTimezone( $timezone );
return sprintf( '<li><strong>%s</strong><br/>%s</li>', esc_html( $date->format( 'Y-m-d H:i:s O' ) ), esc_html( $log_entry->get_message() ) );
}
/**
* Only display row actions for pending actions.
*
* @param array $row Row to render.
* @param string $column_name Current row.
*
* @return string
*/
protected function maybe_render_actions( $row, $column_name ) {
if ( 'pending' === strtolower( $row['status_name'] ) ) {
return parent::maybe_render_actions( $row, $column_name );
}
return '';
}
/**
* Renders admin notifications
*
* Notifications:
* 1. When the maximum number of tasks are being executed simultaneously.
* 2. Notifications when a task is manually executed.
* 3. Tables are missing.
*/
public function display_admin_notices() {
global $wpdb;
if ( ( is_a( $this->store, 'ActionScheduler_HybridStore' ) || is_a( $this->store, 'ActionScheduler_DBStore' ) ) && apply_filters( 'action_scheduler_enable_recreate_data_store', true ) ) {
$table_list = array(
'actionscheduler_actions',
'actionscheduler_logs',
'actionscheduler_groups',
'actionscheduler_claims',
);
$found_tables = $wpdb->get_col( "SHOW TABLES LIKE '{$wpdb->prefix}actionscheduler%'" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
foreach ( $table_list as $table_name ) {
if ( ! in_array( $wpdb->prefix . $table_name, $found_tables, true ) ) {
$this->admin_notices[] = array(
'class' => 'error',
'message' => __( 'It appears one or more database tables were missing. Attempting to re-create the missing table(s).', 'action-scheduler' ),
);
$this->recreate_tables();
parent::display_admin_notices();
return;
}
}
}
if ( $this->runner->has_maximum_concurrent_batches() ) {
$claim_count = $this->store->get_claim_count();
$this->admin_notices[] = array(
'class' => 'updated',
'message' => sprintf(
/* translators: %s: amount of claims */
_n(
'Maximum simultaneous queues already in progress (%s queue). No additional queues will begin processing until the current queues are complete.',
'Maximum simultaneous queues already in progress (%s queues). No additional queues will begin processing until the current queues are complete.',
$claim_count,
'action-scheduler'
),
$claim_count
),
);
} elseif ( $this->store->has_pending_actions_due() ) {
$async_request_lock_expiration = ActionScheduler::lock()->get_expiration( 'async-request-runner' );
// No lock set or lock expired.
if ( false === $async_request_lock_expiration || $async_request_lock_expiration < time() ) {
$in_progress_url = add_query_arg( 'status', 'in-progress', remove_query_arg( 'status' ) );
/* translators: %s: process URL */
$async_request_message = sprintf( __( 'A new queue has begun processing. <a href="%s">View actions in-progress »</a>', 'action-scheduler' ), esc_url( $in_progress_url ) );
} else {
/* translators: %d: seconds */
$async_request_message = sprintf( __( 'The next queue will begin processing in approximately %d seconds.', 'action-scheduler' ), $async_request_lock_expiration - time() );
}
$this->admin_notices[] = array(
'class' => 'notice notice-info',
'message' => $async_request_message,
);
}
$notification = get_transient( 'action_scheduler_admin_notice' );
if ( is_array( $notification ) ) {
delete_transient( 'action_scheduler_admin_notice' );
$action = $this->store->fetch_action( $notification['action_id'] );
$action_hook_html = '<strong><code>' . $action->get_hook() . '</code></strong>';
if ( 1 === absint( $notification['success'] ) ) {
$class = 'updated';
switch ( $notification['row_action_type'] ) {
case 'run':
/* translators: %s: action HTML */
$action_message_html = sprintf( __( 'Successfully executed action: %s', 'action-scheduler' ), $action_hook_html );
break;
case 'cancel':
/* translators: %s: action HTML */
$action_message_html = sprintf( __( 'Successfully canceled action: %s', 'action-scheduler' ), $action_hook_html );
break;
default:
/* translators: %s: action HTML */
$action_message_html = sprintf( __( 'Successfully processed change for action: %s', 'action-scheduler' ), $action_hook_html );
break;
}
} else {
$class = 'error';
/* translators: 1: action HTML 2: action ID 3: error message */
$action_message_html = sprintf( __( 'Could not process change for action: "%1$s" (ID: %2$d). Error: %3$s', 'action-scheduler' ), $action_hook_html, esc_html( $notification['action_id'] ), esc_html( $notification['error_message'] ) );
}
$action_message_html = apply_filters( 'action_scheduler_admin_notice_html', $action_message_html, $action, $notification );
$this->admin_notices[] = array(
'class' => $class,
'message' => $action_message_html,
);
}
parent::display_admin_notices();
}
/**
* Prints the scheduled date in a human friendly format.
*
* @param array $row The array representation of the current row of the table.
*
* @return string
*/
public function column_schedule( $row ) {
return $this->get_schedule_display_string( $row['schedule'] );
}
/**
* Get the scheduled date in a human friendly format.
*
* @param ActionScheduler_Schedule $schedule Action's schedule.
* @return string
*/
protected function get_schedule_display_string( ActionScheduler_Schedule $schedule ) {
$schedule_display_string = '';
if ( is_a( $schedule, 'ActionScheduler_NullSchedule' ) ) {
return __( 'async', 'action-scheduler' );
}
if ( ! method_exists( $schedule, 'get_date' ) || ! $schedule->get_date() ) {
return '0000-00-00 00:00:00';
}
$next_timestamp = $schedule->get_date()->getTimestamp();
$schedule_display_string .= $schedule->get_date()->format( 'Y-m-d H:i:s O' );
$schedule_display_string .= '<br/>';
if ( gmdate( 'U' ) > $next_timestamp ) {
/* translators: %s: date interval */
$schedule_display_string .= sprintf( __( ' (%s ago)', 'action-scheduler' ), self::human_interval( gmdate( 'U' ) - $next_timestamp ) );
} else {
/* translators: %s: date interval */
$schedule_display_string .= sprintf( __( ' (%s)', 'action-scheduler' ), self::human_interval( $next_timestamp - gmdate( 'U' ) ) );
}
return $schedule_display_string;
}
/**
* Bulk delete.
*
* Deletes actions based on their ID. This is the handler for the bulk delete. It assumes the data
* properly validated by the callee and it will delete the actions without any extra validation.
*
* @param int[] $ids Action IDs.
* @param string $ids_sql Inherited and unused.
*/
protected function bulk_delete( array $ids, $ids_sql ) {
foreach ( $ids as $id ) {
try {
$this->store->delete_action( $id );
} catch ( Exception $e ) {
// A possible reason for an exception would include a scenario where the same action is deleted by a
// concurrent request.
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
error_log(
sprintf(
/* translators: 1: action ID 2: exception message. */
__( 'Action Scheduler was unable to delete action %1$d. Reason: %2$s', 'action-scheduler' ),
$id,
$e->getMessage()
)
);
}
}
}
/**
* Implements the logic behind running an action. ActionScheduler_Abstract_ListTable validates the request and their
* parameters are valid.
*
* @param int $action_id Action ID.
*/
protected function row_action_cancel( $action_id ) {
$this->process_row_action( $action_id, 'cancel' );
}
/**
* Implements the logic behind running an action. ActionScheduler_Abstract_ListTable validates the request and their
* parameters are valid.
*
* @param int $action_id Action ID.
*/
protected function row_action_run( $action_id ) {
$this->process_row_action( $action_id, 'run' );
}
/**
* Force the data store schema updates.
*/
protected function recreate_tables() {
if ( is_a( $this->store, 'ActionScheduler_HybridStore' ) ) {
$store = $this->store;
} else {
$store = new ActionScheduler_HybridStore();
}
add_action( 'action_scheduler/created_table', array( $store, 'set_autoincrement' ), 10, 2 );
$store_schema = new ActionScheduler_StoreSchema();
$logger_schema = new ActionScheduler_LoggerSchema();
$store_schema->register_tables( true );
$logger_schema->register_tables( true );
remove_action( 'action_scheduler/created_table', array( $store, 'set_autoincrement' ), 10 );
}
/**
* Implements the logic behind processing an action once an action link is clicked on the list table.
*
* @param int $action_id Action ID.
* @param string $row_action_type The type of action to perform on the action.
*/
protected function process_row_action( $action_id, $row_action_type ) {
try {
switch ( $row_action_type ) {
case 'run':
$this->runner->process_action( $action_id, 'Admin List Table' );
break;
case 'cancel':
$this->store->cancel_action( $action_id );
break;
}
$success = 1;
$error_message = '';
} catch ( Exception $e ) {
$success = 0;
$error_message = $e->getMessage();
}
set_transient( 'action_scheduler_admin_notice', compact( 'action_id', 'success', 'error_message', 'row_action_type' ), 30 );
}
/**
* {@inheritDoc}
*/
public function prepare_items() {
$this->prepare_column_headers();
$per_page = $this->get_items_per_page( $this->get_per_page_option_name(), $this->items_per_page );
$query = array(
'per_page' => $per_page,
'offset' => $this->get_items_offset(),
'status' => $this->get_request_status(),
'orderby' => $this->get_request_orderby(),
'order' => $this->get_request_order(),
'search' => $this->get_request_search_query(),
);
/**
* Change query arguments to query for past-due actions.
* Past-due actions have the 'pending' status and are in the past.
* This is needed because registering 'past-due' as a status is overkill.
*/
if ( 'past-due' === $this->get_request_status() ) {
$query['status'] = ActionScheduler_Store::STATUS_PENDING;
$query['date'] = as_get_datetime_object();
}
$this->items = array();
$total_items = $this->store->query_actions( $query, 'count' );
$status_labels = $this->store->get_status_labels();
foreach ( $this->store->query_actions( $query ) as $action_id ) {
try {
$action = $this->store->fetch_action( $action_id );
} catch ( Exception $e ) {
continue;
}
if ( is_a( $action, 'ActionScheduler_NullAction' ) ) {
continue;
}
$this->items[ $action_id ] = array(
'ID' => $action_id,
'hook' => $action->get_hook(),
'status_name' => $this->store->get_status( $action_id ),
'status' => $status_labels[ $this->store->get_status( $action_id ) ],
'args' => $action->get_args(),
'group' => $action->get_group(),
'log_entries' => $this->logger->get_logs( $action_id ),
'claim_id' => $this->store->get_claim_id( $action_id ),
'recurrence' => $this->get_recurrence( $action ),
'schedule' => $action->get_schedule(),
);
}
$this->set_pagination_args(
array(
'total_items' => $total_items,
'per_page' => $per_page,
'total_pages' => ceil( $total_items / $per_page ),
)
);
}
/**
* Prints the available statuses so the user can click to filter.
*/
protected function display_filter_by_status() {
$this->status_counts = $this->store->action_counts() + $this->store->extra_action_counts();
parent::display_filter_by_status();
}
/**
* Get the text to display in the search box on the list table.
*/
protected function get_search_box_button_text() {
return __( 'Search hook, args and claim ID', 'action-scheduler' );
}
/**
* {@inheritDoc}
*/
protected function get_per_page_option_name() {
return str_replace( '-', '_', $this->screen->id ) . '_per_page';
}
}
woocommerce/action-scheduler/classes/ActionScheduler_LogEntry.php 0000644 00000003626 15153553404 0021375 0 ustar 00 <?php
/**
* Class ActionScheduler_LogEntry
*/
class ActionScheduler_LogEntry {
/**
* Action's ID for log entry.
*
* @var int $action_id
*/
protected $action_id = '';
/**
* Log entry's message.
*
* @var string $message
*/
protected $message = '';
/**
* Log entry's date.
*
* @var Datetime $date
*/
protected $date;
/**
* Constructor
*
* @param mixed $action_id Action ID.
* @param string $message Message.
* @param Datetime $date Datetime object with the time when this log entry was created. If this parameter is
* not provided a new Datetime object (with current time) will be created.
*/
public function __construct( $action_id, $message, $date = null ) {
/*
* ActionScheduler_wpCommentLogger::get_entry() previously passed a 3rd param of $comment->comment_type
* to ActionScheduler_LogEntry::__construct(), goodness knows why, and the Follow-up Emails plugin
* hard-codes loading its own version of ActionScheduler_wpCommentLogger with that out-dated method,
* goodness knows why, so we need to guard against that here instead of using a DateTime type declaration
* for the constructor's 3rd param of $date and causing a fatal error with older versions of FUE.
*/
if ( null !== $date && ! is_a( $date, 'DateTime' ) ) {
_doing_it_wrong( __METHOD__, 'The third parameter must be a valid DateTime instance, or null.', '2.0.0' );
$date = null;
}
$this->action_id = $action_id;
$this->message = $message;
$this->date = $date ? $date : new Datetime();
}
/**
* Returns the date when this log entry was created
*
* @return Datetime
*/
public function get_date() {
return $this->date;
}
/**
* Get action ID of log entry.
*/
public function get_action_id() {
return $this->action_id;
}
/**
* Get log entry message.
*/
public function get_message() {
return $this->message;
}
}
woocommerce/action-scheduler/classes/ActionScheduler_NullLogEntry.php 0000644 00000000512 15153553404 0022217 0 ustar 00 <?php
/**
* Class ActionScheduler_NullLogEntry
*/
class ActionScheduler_NullLogEntry extends ActionScheduler_LogEntry {
/**
* Construct.
*
* @param string $action_id Action ID.
* @param string $message Log entry.
*/
public function __construct( $action_id = '', $message = '' ) {
// nothing to see here.
}
}
woocommerce/action-scheduler/classes/ActionScheduler_OptionLock.php 0000644 00000007754 15153553404 0021721 0 ustar 00 <?php
/**
* Provide a way to set simple transient locks to block behaviour
* for up-to a given duration.
*
* Class ActionScheduler_OptionLock
*
* @since 3.0.0
*/
class ActionScheduler_OptionLock extends ActionScheduler_Lock {
/**
* Set a lock using options for a given amount of time (60 seconds by default).
*
* Using an autoloaded option avoids running database queries or other resource intensive tasks
* on frequently triggered hooks, like 'init' or 'shutdown'.
*
* For example, ActionScheduler_QueueRunner->maybe_dispatch_async_request() uses a lock to avoid
* calling ActionScheduler_QueueRunner->has_maximum_concurrent_batches() every time the 'shutdown',
* hook is triggered, because that method calls ActionScheduler_QueueRunner->store->get_claim_count()
* to find the current number of claims in the database.
*
* @param string $lock_type A string to identify different lock types.
* @bool True if lock value has changed, false if not or if set failed.
*/
public function set( $lock_type ) {
global $wpdb;
$lock_key = $this->get_key( $lock_type );
$existing_lock_value = $this->get_existing_lock( $lock_type );
$new_lock_value = $this->new_lock_value( $lock_type );
// The lock may not exist yet, or may have been deleted.
if ( empty( $existing_lock_value ) ) {
return (bool) $wpdb->insert(
$wpdb->options,
array(
'option_name' => $lock_key,
'option_value' => $new_lock_value,
'autoload' => 'no',
)
);
}
if ( $this->get_expiration_from( $existing_lock_value ) >= time() ) {
return false;
}
// Otherwise, try to obtain the lock.
return (bool) $wpdb->update(
$wpdb->options,
array( 'option_value' => $new_lock_value ),
array(
'option_name' => $lock_key,
'option_value' => $existing_lock_value,
)
);
}
/**
* If a lock is set, return the timestamp it was set to expiry.
*
* @param string $lock_type A string to identify different lock types.
* @return bool|int False if no lock is set, otherwise the timestamp for when the lock is set to expire.
*/
public function get_expiration( $lock_type ) {
return $this->get_expiration_from( $this->get_existing_lock( $lock_type ) );
}
/**
* Given the lock string, derives the lock expiration timestamp (or false if it cannot be determined).
*
* @param string $lock_value String containing a timestamp, or pipe-separated combination of unique value and timestamp.
*
* @return false|int
*/
private function get_expiration_from( $lock_value ) {
$lock_string = explode( '|', $lock_value );
// Old style lock?
if ( count( $lock_string ) === 1 && is_numeric( $lock_string[0] ) ) {
return (int) $lock_string[0];
}
// New style lock?
if ( count( $lock_string ) === 2 && is_numeric( $lock_string[1] ) ) {
return (int) $lock_string[1];
}
return false;
}
/**
* Get the key to use for storing the lock in the transient
*
* @param string $lock_type A string to identify different lock types.
* @return string
*/
protected function get_key( $lock_type ) {
return sprintf( 'action_scheduler_lock_%s', $lock_type );
}
/**
* Supplies the existing lock value, or an empty string if not set.
*
* @param string $lock_type A string to identify different lock types.
*
* @return string
*/
private function get_existing_lock( $lock_type ) {
global $wpdb;
// Now grab the existing lock value, if there is one.
return (string) $wpdb->get_var(
$wpdb->prepare(
"SELECT option_value FROM $wpdb->options WHERE option_name = %s",
$this->get_key( $lock_type )
)
);
}
/**
* Supplies a lock value consisting of a unique value and the current timestamp, which are separated by a pipe
* character.
*
* Example: (string) "649de012e6b262.09774912|1688068114"
*
* @param string $lock_type A string to identify different lock types.
*
* @return string
*/
private function new_lock_value( $lock_type ) {
return uniqid( '', true ) . '|' . ( time() + $this->get_duration( $lock_type ) );
}
}
woocommerce/action-scheduler/classes/ActionScheduler_QueueCleaner.php 0000644 00000017607 15153553404 0022214 0 ustar 00 <?php
/**
* Class ActionScheduler_QueueCleaner
*/
class ActionScheduler_QueueCleaner {
/**
* The batch size.
*
* @var int
*/
protected $batch_size;
/**
* ActionScheduler_Store instance.
*
* @var ActionScheduler_Store
*/
private $store = null;
/**
* 31 days in seconds.
*
* @var int
*/
private $month_in_seconds = 2678400;
/**
* Default list of statuses purged by the cleaner process.
*
* @var string[]
*/
private $default_statuses_to_purge = array(
ActionScheduler_Store::STATUS_COMPLETE,
ActionScheduler_Store::STATUS_CANCELED,
);
/**
* ActionScheduler_QueueCleaner constructor.
*
* @param ActionScheduler_Store|null $store The store instance.
* @param int $batch_size The batch size.
*/
public function __construct( ?ActionScheduler_Store $store = null, $batch_size = 20 ) {
$this->store = $store ? $store : ActionScheduler_Store::instance();
$this->batch_size = $batch_size;
}
/**
* Default queue cleaner process used by queue runner.
*
* @return array
*/
public function delete_old_actions() {
/**
* Filter the minimum scheduled date age for action deletion.
*
* @param int $retention_period Minimum scheduled age in seconds of the actions to be deleted.
*/
$lifespan = apply_filters( 'action_scheduler_retention_period', $this->month_in_seconds );
try {
$cutoff = as_get_datetime_object( $lifespan . ' seconds ago' );
} catch ( Exception $e ) {
_doing_it_wrong(
__METHOD__,
sprintf(
/* Translators: %s is the exception message. */
esc_html__( 'It was not possible to determine a valid cut-off time: %s.', 'action-scheduler' ),
esc_html( $e->getMessage() )
),
'3.5.5'
);
return array();
}
/**
* Filter the statuses when cleaning the queue.
*
* @param string[] $default_statuses_to_purge Action statuses to clean.
*/
$statuses_to_purge = (array) apply_filters( 'action_scheduler_default_cleaner_statuses', $this->default_statuses_to_purge );
return $this->clean_actions( $statuses_to_purge, $cutoff, $this->get_batch_size() );
}
/**
* Delete selected actions limited by status and date.
*
* @param string[] $statuses_to_purge List of action statuses to purge. Defaults to canceled, complete.
* @param DateTime $cutoff_date Date limit for selecting actions. Defaults to 31 days ago.
* @param int|null $batch_size Maximum number of actions per status to delete. Defaults to 20.
* @param string $context Calling process context. Defaults to `old`.
* @return array Actions deleted.
*/
public function clean_actions( array $statuses_to_purge, DateTime $cutoff_date, $batch_size = null, $context = 'old' ) {
$batch_size = ! is_null( $batch_size ) ? $batch_size : $this->batch_size;
$cutoff = ! is_null( $cutoff_date ) ? $cutoff_date : as_get_datetime_object( $this->month_in_seconds . ' seconds ago' );
$lifespan = time() - $cutoff->getTimestamp();
if ( empty( $statuses_to_purge ) ) {
$statuses_to_purge = $this->default_statuses_to_purge;
}
$deleted_actions = array();
foreach ( $statuses_to_purge as $status ) {
$actions_to_delete = $this->store->query_actions(
array(
'status' => $status,
'modified' => $cutoff,
'modified_compare' => '<=',
'per_page' => $batch_size,
'orderby' => 'none',
)
);
$deleted_actions = array_merge( $deleted_actions, $this->delete_actions( $actions_to_delete, $lifespan, $context ) );
}
return $deleted_actions;
}
/**
* Delete actions.
*
* @param int[] $actions_to_delete List of action IDs to delete.
* @param int $lifespan Minimum scheduled age in seconds of the actions being deleted.
* @param string $context Context of the delete request.
* @return array Deleted action IDs.
*/
private function delete_actions( array $actions_to_delete, $lifespan = null, $context = 'old' ) {
$deleted_actions = array();
if ( is_null( $lifespan ) ) {
$lifespan = $this->month_in_seconds;
}
foreach ( $actions_to_delete as $action_id ) {
try {
$this->store->delete_action( $action_id );
$deleted_actions[] = $action_id;
} catch ( Exception $e ) {
/**
* Notify 3rd party code of exceptions when deleting a completed action older than the retention period
*
* This hook provides a way for 3rd party code to log or otherwise handle exceptions relating to their
* actions.
*
* @param int $action_id The scheduled actions ID in the data store
* @param Exception $e The exception thrown when attempting to delete the action from the data store
* @param int $lifespan The retention period, in seconds, for old actions
* @param int $count_of_actions_to_delete The number of old actions being deleted in this batch
* @since 2.0.0
*/
do_action( "action_scheduler_failed_{$context}_action_deletion", $action_id, $e, $lifespan, count( $actions_to_delete ) );
}
}
return $deleted_actions;
}
/**
* Unclaim pending actions that have not been run within a given time limit.
*
* When called by ActionScheduler_Abstract_QueueRunner::run_cleanup(), the time limit passed
* as a parameter is 10x the time limit used for queue processing.
*
* @param int $time_limit The number of seconds to allow a queue to run before unclaiming its pending actions. Default 300 (5 minutes).
*/
public function reset_timeouts( $time_limit = 300 ) {
$timeout = apply_filters( 'action_scheduler_timeout_period', $time_limit );
if ( $timeout < 0 ) {
return;
}
$cutoff = as_get_datetime_object( $timeout . ' seconds ago' );
$actions_to_reset = $this->store->query_actions(
array(
'status' => ActionScheduler_Store::STATUS_PENDING,
'modified' => $cutoff,
'modified_compare' => '<=',
'claimed' => true,
'per_page' => $this->get_batch_size(),
'orderby' => 'none',
)
);
foreach ( $actions_to_reset as $action_id ) {
$this->store->unclaim_action( $action_id );
do_action( 'action_scheduler_reset_action', $action_id );
}
}
/**
* Mark actions that have been running for more than a given time limit as failed, based on
* the assumption some uncatchable and unloggable fatal error occurred during processing.
*
* When called by ActionScheduler_Abstract_QueueRunner::run_cleanup(), the time limit passed
* as a parameter is 10x the time limit used for queue processing.
*
* @param int $time_limit The number of seconds to allow an action to run before it is considered to have failed. Default 300 (5 minutes).
*/
public function mark_failures( $time_limit = 300 ) {
$timeout = apply_filters( 'action_scheduler_failure_period', $time_limit );
if ( $timeout < 0 ) {
return;
}
$cutoff = as_get_datetime_object( $timeout . ' seconds ago' );
$actions_to_reset = $this->store->query_actions(
array(
'status' => ActionScheduler_Store::STATUS_RUNNING,
'modified' => $cutoff,
'modified_compare' => '<=',
'per_page' => $this->get_batch_size(),
'orderby' => 'none',
)
);
foreach ( $actions_to_reset as $action_id ) {
$this->store->mark_failure( $action_id );
do_action( 'action_scheduler_failed_action', $action_id, $timeout );
}
}
/**
* Do all of the cleaning actions.
*
* @param int $time_limit The number of seconds to use as the timeout and failure period. Default 300 (5 minutes).
*/
public function clean( $time_limit = 300 ) {
$this->delete_old_actions();
$this->reset_timeouts( $time_limit );
$this->mark_failures( $time_limit );
}
/**
* Get the batch size for cleaning the queue.
*
* @return int
*/
protected function get_batch_size() {
/**
* Filter the batch size when cleaning the queue.
*
* @param int $batch_size The number of actions to clean in one batch.
*/
return absint( apply_filters( 'action_scheduler_cleanup_batch_size', $this->batch_size ) );
}
}
woocommerce/action-scheduler/classes/ActionScheduler_QueueRunner.php 0000644 00000022770 15153553404 0022111 0 ustar 00 <?php
/**
* Class ActionScheduler_QueueRunner
*/
class ActionScheduler_QueueRunner extends ActionScheduler_Abstract_QueueRunner {
const WP_CRON_HOOK = 'action_scheduler_run_queue';
const WP_CRON_SCHEDULE = 'every_minute';
/**
* ActionScheduler_AsyncRequest_QueueRunner instance.
*
* @var ActionScheduler_AsyncRequest_QueueRunner
*/
protected $async_request;
/**
* ActionScheduler_QueueRunner instance.
*
* @var ActionScheduler_QueueRunner
*/
private static $runner = null;
/**
* Number of processed actions.
*
* @var int
*/
private $processed_actions_count = 0;
/**
* Get instance.
*
* @return ActionScheduler_QueueRunner
* @codeCoverageIgnore
*/
public static function instance() {
if ( empty( self::$runner ) ) {
$class = apply_filters( 'action_scheduler_queue_runner_class', 'ActionScheduler_QueueRunner' );
self::$runner = new $class();
}
return self::$runner;
}
/**
* ActionScheduler_QueueRunner constructor.
*
* @param ActionScheduler_Store|null $store Store object.
* @param ActionScheduler_FatalErrorMonitor|null $monitor Monitor object.
* @param ActionScheduler_QueueCleaner|null $cleaner Cleaner object.
* @param ActionScheduler_AsyncRequest_QueueRunner|null $async_request Async request runner object.
*/
public function __construct( ?ActionScheduler_Store $store = null, ?ActionScheduler_FatalErrorMonitor $monitor = null, ?ActionScheduler_QueueCleaner $cleaner = null, ?ActionScheduler_AsyncRequest_QueueRunner $async_request = null ) {
parent::__construct( $store, $monitor, $cleaner );
if ( is_null( $async_request ) ) {
$async_request = new ActionScheduler_AsyncRequest_QueueRunner( $this->store );
}
$this->async_request = $async_request;
}
/**
* Initialize.
*
* @codeCoverageIgnore
*/
public function init() {
add_filter( 'cron_schedules', array( self::instance(), 'add_wp_cron_schedule' ) ); // phpcs:ignore WordPress.WP.CronInterval.CronSchedulesInterval
// Check for and remove any WP Cron hook scheduled by Action Scheduler < 3.0.0, which didn't include the $context param.
$next_timestamp = wp_next_scheduled( self::WP_CRON_HOOK );
if ( $next_timestamp ) {
wp_unschedule_event( $next_timestamp, self::WP_CRON_HOOK );
}
$cron_context = array( 'WP Cron' );
if ( ! wp_next_scheduled( self::WP_CRON_HOOK, $cron_context ) ) {
$schedule = apply_filters( 'action_scheduler_run_schedule', self::WP_CRON_SCHEDULE );
wp_schedule_event( time(), $schedule, self::WP_CRON_HOOK, $cron_context );
}
add_action( self::WP_CRON_HOOK, array( self::instance(), 'run' ) );
$this->hook_dispatch_async_request();
}
/**
* Hook check for dispatching an async request.
*/
public function hook_dispatch_async_request() {
add_action( 'shutdown', array( $this, 'maybe_dispatch_async_request' ) );
}
/**
* Unhook check for dispatching an async request.
*/
public function unhook_dispatch_async_request() {
remove_action( 'shutdown', array( $this, 'maybe_dispatch_async_request' ) );
}
/**
* Check if we should dispatch an async request to process actions.
*
* This method is attached to 'shutdown', so is called frequently. To avoid slowing down
* the site, it mitigates the work performed in each request by:
* 1. checking if it's in the admin context and then
* 2. haven't run on the 'shutdown' hook within the lock time (60 seconds by default)
* 3. haven't exceeded the number of allowed batches.
*
* The order of these checks is important, because they run from a check on a value:
* 1. in memory - is_admin() maps to $GLOBALS or the WP_ADMIN constant
* 2. in memory - transients use autoloaded options by default
* 3. from a database query - has_maximum_concurrent_batches() run the query
* $this->store->get_claim_count() to find the current number of claims in the DB.
*
* If all of these conditions are met, then we request an async runner check whether it
* should dispatch a request to process pending actions.
*/
public function maybe_dispatch_async_request() {
// Only start an async queue at most once every 60 seconds.
if (
is_admin()
&& ! ActionScheduler::lock()->is_locked( 'async-request-runner' )
&& ActionScheduler::lock()->set( 'async-request-runner' )
) {
$this->async_request->maybe_dispatch();
}
}
/**
* Process actions in the queue. Attached to self::WP_CRON_HOOK i.e. 'action_scheduler_run_queue'
*
* The $context param of this method defaults to 'WP Cron', because prior to Action Scheduler 3.0.0
* that was the only context in which this method was run, and the self::WP_CRON_HOOK hook had no context
* passed along with it. New code calling this method directly, or by triggering the self::WP_CRON_HOOK,
* should set a context as the first parameter. For an example of this, refer to the code seen in
*
* @see ActionScheduler_AsyncRequest_QueueRunner::handle()
*
* @param string $context Optional identifier for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron'
* Generally, this should be capitalised and not localised as it's a proper noun.
* @return int The number of actions processed.
*/
public function run( $context = 'WP Cron' ) {
ActionScheduler_Compatibility::raise_memory_limit();
ActionScheduler_Compatibility::raise_time_limit( $this->get_time_limit() );
do_action( 'action_scheduler_before_process_queue' );
$this->run_cleanup();
$this->processed_actions_count = 0;
if ( false === $this->has_maximum_concurrent_batches() ) {
do {
$batch_size = apply_filters( 'action_scheduler_queue_runner_batch_size', 25 );
$processed_actions_in_batch = $this->do_batch( $batch_size, $context );
$this->processed_actions_count += $processed_actions_in_batch;
} while ( $processed_actions_in_batch > 0 && ! $this->batch_limits_exceeded( $this->processed_actions_count ) ); // keep going until we run out of actions, time, or memory.
}
do_action( 'action_scheduler_after_process_queue' );
return $this->processed_actions_count;
}
/**
* Process a batch of actions pending in the queue.
*
* Actions are processed by claiming a set of pending actions then processing each one until either the batch
* size is completed, or memory or time limits are reached, defined by @see $this->batch_limits_exceeded().
*
* @param int $size The maximum number of actions to process in the batch.
* @param string $context Optional identifier for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron'
* Generally, this should be capitalised and not localised as it's a proper noun.
* @return int The number of actions processed.
*/
protected function do_batch( $size = 100, $context = '' ) {
$claim = $this->store->stake_claim( $size );
$this->monitor->attach( $claim );
$processed_actions = 0;
foreach ( $claim->get_actions() as $action_id ) {
// bail if we lost the claim.
if ( ! in_array( $action_id, $this->store->find_actions_by_claim_id( $claim->get_id() ), true ) ) {
break;
}
$this->process_action( $action_id, $context );
$processed_actions++;
if ( $this->batch_limits_exceeded( $processed_actions + $this->processed_actions_count ) ) {
break;
}
}
$this->store->release_claim( $claim );
$this->monitor->detach();
$this->clear_caches();
return $processed_actions;
}
/**
* Flush the cache if possible (intended for use after a batch of actions has been processed).
*
* This is useful because running large batches can eat up memory and because invalid data can accrue in the
* runtime cache, which may lead to unexpected results.
*/
protected function clear_caches() {
/*
* Calling wp_cache_flush_runtime() lets us clear the runtime cache without invalidating the external object
* cache, so we will always prefer this method (as compared to calling wp_cache_flush()) when it is available.
*
* However, this function was only introduced in WordPress 6.0. Additionally, the preferred way of detecting if
* it is supported changed in WordPress 6.1 so we use two different methods to decide if we should utilize it.
*/
$flushing_runtime_cache_explicitly_supported = function_exists( 'wp_cache_supports' ) && wp_cache_supports( 'flush_runtime' );
$flushing_runtime_cache_implicitly_supported = ! function_exists( 'wp_cache_supports' ) && function_exists( 'wp_cache_flush_runtime' );
if ( $flushing_runtime_cache_explicitly_supported || $flushing_runtime_cache_implicitly_supported ) {
wp_cache_flush_runtime();
} elseif (
! wp_using_ext_object_cache()
/**
* When an external object cache is in use, and when wp_cache_flush_runtime() is not available, then
* normally the cache will not be flushed after processing a batch of actions (to avoid a performance
* penalty for other processes).
*
* This filter makes it possible to override this behavior and always flush the cache, even if an external
* object cache is in use.
*
* @since 1.0
*
* @param bool $flush_cache If the cache should be flushed.
*/
|| apply_filters( 'action_scheduler_queue_runner_flush_cache', false )
) {
wp_cache_flush();
}
}
/**
* Add schedule to WP cron.
*
* @param array<string, array<string, int|string>> $schedules Schedules.
* @return array<string, array<string, int|string>>
*/
public function add_wp_cron_schedule( $schedules ) {
$schedules['every_minute'] = array(
'interval' => 60, // in seconds.
'display' => __( 'Every minute', 'action-scheduler' ),
);
return $schedules;
}
}
woocommerce/action-scheduler/classes/ActionScheduler_SystemInformation.php 0000644 00000004701 15153553404 0023317 0 ustar 00 <?php
/**
* Provides information about active and registered instances of Action Scheduler.
*/
class ActionScheduler_SystemInformation {
/**
* Returns information about the plugin or theme which contains the current active version
* of Action Scheduler.
*
* If this cannot be determined, or if Action Scheduler is being loaded via some other
* method, then it will return an empty array. Otherwise, if populated, the array will
* look like the following:
*
* [
* 'type' => 'plugin', # or 'theme'
* 'name' => 'Name',
* ]
*
* @return array
*/
public static function active_source(): array {
$plugins = get_plugins();
$plugin_files = array_keys( $plugins );
foreach ( $plugin_files as $plugin_file ) {
$plugin_path = trailingslashit( WP_PLUGIN_DIR ) . dirname( $plugin_file );
$plugin_file = trailingslashit( WP_PLUGIN_DIR ) . $plugin_file;
if ( 0 !== strpos( dirname( __DIR__ ), $plugin_path ) ) {
continue;
}
$plugin_data = get_plugin_data( $plugin_file );
if ( ! is_array( $plugin_data ) || empty( $plugin_data['Name'] ) ) {
continue;
}
return array(
'type' => 'plugin',
'name' => $plugin_data['Name'],
);
}
$themes = (array) search_theme_directories();
foreach ( $themes as $slug => $data ) {
$needle = trailingslashit( $data['theme_root'] ) . $slug . '/';
if ( 0 !== strpos( __FILE__, $needle ) ) {
continue;
}
$theme = wp_get_theme( $slug );
if ( ! is_object( $theme ) || ! is_a( $theme, \WP_Theme::class ) ) {
continue;
}
return array(
'type' => 'theme',
// phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
'name' => $theme->Name,
);
}
return array();
}
/**
* Returns the directory path for the currently active installation of Action Scheduler.
*
* @return string
*/
public static function active_source_path(): string {
return trailingslashit( dirname( __DIR__ ) );
}
/**
* Get registered sources.
*
* It is not always possible to obtain this information. For instance, if earlier versions (<=3.9.0) of
* Action Scheduler register themselves first, then the necessary data about registered sources will
* not be available.
*
* @return array<string, string>
*/
public static function get_sources() {
$versions = ActionScheduler_Versions::instance();
return method_exists( $versions, 'get_sources' ) ? $versions->get_sources() : array();
}
}
woocommerce/action-scheduler/classes/ActionScheduler_Versions.php 0000644 00000007152 15153553404 0021440 0 ustar 00 <?php
/**
* Class ActionScheduler_Versions
*/
class ActionScheduler_Versions {
/**
* ActionScheduler_Versions instance.
*
* @var ActionScheduler_Versions
*/
private static $instance = null;
/**
* Versions.
*
* @var array<string, callable>
*/
private $versions = array();
/**
* Registered sources.
*
* @var array<string, string>
*/
private $sources = array();
/**
* Register version's callback.
*
* @param string $version_string Action Scheduler version.
* @param callable $initialization_callback Callback to initialize the version.
*/
public function register( $version_string, $initialization_callback ) {
if ( isset( $this->versions[ $version_string ] ) ) {
return false;
}
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace
$backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS );
$source = $backtrace[0]['file'];
$this->versions[ $version_string ] = $initialization_callback;
$this->sources[ $source ] = $version_string;
return true;
}
/**
* Get all versions.
*/
public function get_versions() {
return $this->versions;
}
/**
* Get registered sources.
*
* Use with caution: this method is only available as of Action Scheduler's 3.9.1
* release and, owing to the way Action Scheduler is loaded, it's possible that the
* class definition used at runtime will belong to an earlier version.
*
* @since 3.9.1
*
* @return array<string, string>
*/
public function get_sources() {
return $this->sources;
}
/**
* Get latest version registered.
*/
public function latest_version() {
$keys = array_keys( $this->versions );
if ( empty( $keys ) ) {
return false;
}
uasort( $keys, 'version_compare' );
return end( $keys );
}
/**
* Get callback for latest registered version.
*/
public function latest_version_callback() {
$latest = $this->latest_version();
if ( empty( $latest ) || ! isset( $this->versions[ $latest ] ) ) {
return '__return_null';
}
return $this->versions[ $latest ];
}
/**
* Get instance.
*
* @return ActionScheduler_Versions
* @codeCoverageIgnore
*/
public static function instance() {
if ( empty( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Initialize.
*
* @codeCoverageIgnore
*/
public static function initialize_latest_version() {
$self = self::instance();
call_user_func( $self->latest_version_callback() );
}
/**
* Returns information about the plugin or theme which contains the current active version
* of Action Scheduler.
*
* If this cannot be determined, or if Action Scheduler is being loaded via some other
* method, then it will return an empty array. Otherwise, if populated, the array will
* look like the following:
*
* [
* 'type' => 'plugin', # or 'theme'
* 'name' => 'Name',
* ]
*
* @deprecated 3.9.2 Use ActionScheduler_SystemInformation::active_source().
*
* @return array
*/
public function active_source(): array {
_deprecated_function( __METHOD__, '3.9.2', 'ActionScheduler_SystemInformation::active_source()' );
return ActionScheduler_SystemInformation::active_source();
}
/**
* Returns the directory path for the currently active installation of Action Scheduler.
*
* @deprecated 3.9.2 Use ActionScheduler_SystemInformation::active_source_path().
*
* @return string
*/
public function active_source_path(): string {
_deprecated_function( __METHOD__, '3.9.2', 'ActionScheduler_SystemInformation::active_source_path()' );
return ActionScheduler_SystemInformation::active_source_path();
}
}
woocommerce/action-scheduler/classes/ActionScheduler_WPCommentCleaner.php 0000644 00000010661 15153553404 0022772 0 ustar 00 <?php
/**
* Class ActionScheduler_WPCommentCleaner
*
* @since 3.0.0
*/
class ActionScheduler_WPCommentCleaner {
/**
* Post migration hook used to cleanup the WP comment table.
*
* @var string
*/
protected static $cleanup_hook = 'action_scheduler/cleanup_wp_comment_logs';
/**
* An instance of the ActionScheduler_wpCommentLogger class to interact with the comments table.
*
* This instance should only be used as an interface. It should not be initialized.
*
* @var ActionScheduler_wpCommentLogger
*/
protected static $wp_comment_logger = null;
/**
* The key used to store the cached value of whether there are logs in the WP comment table.
*
* @var string
*/
protected static $has_logs_option_key = 'as_has_wp_comment_logs';
/**
* Initialize the class and attach callbacks.
*/
public static function init() {
if ( empty( self::$wp_comment_logger ) ) {
self::$wp_comment_logger = new ActionScheduler_wpCommentLogger();
}
add_action( self::$cleanup_hook, array( __CLASS__, 'delete_all_action_comments' ) );
// While there are orphaned logs left in the comments table, we need to attach the callbacks which filter comment counts.
add_action( 'pre_get_comments', array( self::$wp_comment_logger, 'filter_comment_queries' ), 10, 1 );
add_action( 'wp_count_comments', array( self::$wp_comment_logger, 'filter_comment_count' ), 20, 2 ); // run after WC_Comments::wp_count_comments() to make sure we exclude order notes and action logs.
add_action( 'comment_feed_where', array( self::$wp_comment_logger, 'filter_comment_feed' ), 10, 2 );
// Action Scheduler may be displayed as a Tools screen or WooCommerce > Status administration screen.
add_action( 'load-tools_page_action-scheduler', array( __CLASS__, 'register_admin_notice' ) );
add_action( 'load-woocommerce_page_wc-status', array( __CLASS__, 'register_admin_notice' ) );
}
/**
* Determines if there are log entries in the wp comments table.
*
* Uses the flag set on migration completion set by @see self::maybe_schedule_cleanup().
*
* @return boolean Whether there are scheduled action comments in the comments table.
*/
public static function has_logs() {
return 'yes' === get_option( self::$has_logs_option_key );
}
/**
* Schedules the WP Post comment table cleanup to run in 6 months if it's not already scheduled.
* Attached to the migration complete hook 'action_scheduler/migration_complete'.
*/
public static function maybe_schedule_cleanup() {
$has_logs = 'no';
$args = array(
'type' => ActionScheduler_wpCommentLogger::TYPE,
'number' => 1,
'fields' => 'ids',
);
if ( (bool) get_comments( $args ) ) {
$has_logs = 'yes';
if ( ! as_next_scheduled_action( self::$cleanup_hook ) ) {
as_schedule_single_action( gmdate( 'U' ) + ( 6 * MONTH_IN_SECONDS ), self::$cleanup_hook );
}
}
update_option( self::$has_logs_option_key, $has_logs, true );
}
/**
* Delete all action comments from the WP Comments table.
*/
public static function delete_all_action_comments() {
global $wpdb;
$wpdb->delete(
$wpdb->comments,
array(
'comment_type' => ActionScheduler_wpCommentLogger::TYPE,
'comment_agent' => ActionScheduler_wpCommentLogger::AGENT,
)
);
update_option( self::$has_logs_option_key, 'no', true );
}
/**
* Registers admin notices about the orphaned action logs.
*/
public static function register_admin_notice() {
add_action( 'admin_notices', array( __CLASS__, 'print_admin_notice' ) );
}
/**
* Prints details about the orphaned action logs and includes information on where to learn more.
*/
public static function print_admin_notice() {
$next_cleanup_message = '';
$next_scheduled_cleanup_hook = as_next_scheduled_action( self::$cleanup_hook );
if ( $next_scheduled_cleanup_hook ) {
/* translators: %s: date interval */
$next_cleanup_message = sprintf( __( 'This data will be deleted in %s.', 'action-scheduler' ), human_time_diff( gmdate( 'U' ), $next_scheduled_cleanup_hook ) );
}
$notice = sprintf(
/* translators: 1: next cleanup message 2: github issue URL */
__( 'Action Scheduler has migrated data to custom tables; however, orphaned log entries exist in the WordPress Comments table. %1$s <a href="%2$s">Learn more »</a>', 'action-scheduler' ),
$next_cleanup_message,
'https://github.com/woocommerce/action-scheduler/issues/368'
);
echo '<div class="notice notice-warning"><p>' . wp_kses_post( $notice ) . '</p></div>';
}
}
woocommerce/action-scheduler/classes/ActionScheduler_wcSystemStatus.php 0000644 00000012270 15153553404 0022647 0 ustar 00 <?php
/**
* Class ActionScheduler_wcSystemStatus
*/
class ActionScheduler_wcSystemStatus {
/**
* The active data stores
*
* @var ActionScheduler_Store
*/
protected $store;
/**
* Constructor method for ActionScheduler_wcSystemStatus.
*
* @param ActionScheduler_Store $store Active store object.
*
* @return void
*/
public function __construct( $store ) {
$this->store = $store;
}
/**
* Display action data, including number of actions grouped by status and the oldest & newest action in each status.
*
* Helpful to identify issues, like a clogged queue.
*/
public function render() {
$action_counts = $this->store->action_counts();
$status_labels = $this->store->get_status_labels();
$oldest_and_newest = $this->get_oldest_and_newest( array_keys( $status_labels ) );
$this->get_template( $status_labels, $action_counts, $oldest_and_newest );
}
/**
* Get oldest and newest scheduled dates for a given set of statuses.
*
* @param array $status_keys Set of statuses to find oldest & newest action for.
* @return array
*/
protected function get_oldest_and_newest( $status_keys ) {
$oldest_and_newest = array();
foreach ( $status_keys as $status ) {
$oldest_and_newest[ $status ] = array(
'oldest' => '–',
'newest' => '–',
);
if ( 'in-progress' === $status ) {
continue;
}
$oldest_and_newest[ $status ]['oldest'] = $this->get_action_status_date( $status, 'oldest' );
$oldest_and_newest[ $status ]['newest'] = $this->get_action_status_date( $status, 'newest' );
}
return $oldest_and_newest;
}
/**
* Get oldest or newest scheduled date for a given status.
*
* @param string $status Action status label/name string.
* @param string $date_type Oldest or Newest.
* @return DateTime
*/
protected function get_action_status_date( $status, $date_type = 'oldest' ) {
$order = 'oldest' === $date_type ? 'ASC' : 'DESC';
$action = $this->store->query_actions(
array(
'claimed' => false,
'status' => $status,
'per_page' => 1,
'order' => $order,
)
);
if ( ! empty( $action ) ) {
$date_object = $this->store->get_date( $action[0] );
$action_date = $date_object->format( 'Y-m-d H:i:s O' );
} else {
$action_date = '–';
}
return $action_date;
}
/**
* Get oldest or newest scheduled date for a given status.
*
* @param array $status_labels Set of statuses to find oldest & newest action for.
* @param array $action_counts Number of actions grouped by status.
* @param array $oldest_and_newest Date of the oldest and newest action with each status.
*/
protected function get_template( $status_labels, $action_counts, $oldest_and_newest ) {
$as_version = ActionScheduler_Versions::instance()->latest_version();
$as_datastore = get_class( ActionScheduler_Store::instance() );
?>
<table class="wc_status_table widefat" cellspacing="0">
<thead>
<tr>
<th colspan="5" data-export-label="Action Scheduler"><h2><?php esc_html_e( 'Action Scheduler', 'action-scheduler' ); ?><?php echo wc_help_tip( esc_html__( 'This section shows details of Action Scheduler.', 'action-scheduler' ) ); ?></h2></th>
</tr>
<tr>
<td colspan="2" data-export-label="Version"><?php esc_html_e( 'Version:', 'action-scheduler' ); ?></td>
<td colspan="3"><?php echo esc_html( $as_version ); ?></td>
</tr>
<tr>
<td colspan="2" data-export-label="Data store"><?php esc_html_e( 'Data store:', 'action-scheduler' ); ?></td>
<td colspan="3"><?php echo esc_html( $as_datastore ); ?></td>
</tr>
<tr>
<td><strong><?php esc_html_e( 'Action Status', 'action-scheduler' ); ?></strong></td>
<td class="help"> </td>
<td><strong><?php esc_html_e( 'Count', 'action-scheduler' ); ?></strong></td>
<td><strong><?php esc_html_e( 'Oldest Scheduled Date', 'action-scheduler' ); ?></strong></td>
<td><strong><?php esc_html_e( 'Newest Scheduled Date', 'action-scheduler' ); ?></strong></td>
</tr>
</thead>
<tbody>
<?php
foreach ( $action_counts as $status => $count ) {
// WC uses the 3rd column for export, so we need to display more data in that (hidden when viewed as part of the table) and add an empty 2nd column.
printf(
'<tr><td>%1$s</td><td> </td><td>%2$s<span style="display: none;">, Oldest: %3$s, Newest: %4$s</span></td><td>%3$s</td><td>%4$s</td></tr>',
esc_html( $status_labels[ $status ] ),
esc_html( number_format_i18n( $count ) ),
esc_html( $oldest_and_newest[ $status ]['oldest'] ),
esc_html( $oldest_and_newest[ $status ]['newest'] )
);
}
?>
</tbody>
</table>
<?php
}
/**
* Is triggered when invoking inaccessible methods in an object context.
*
* @param string $name Name of method called.
* @param array $arguments Parameters to invoke the method with.
*
* @return mixed
* @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.methods
*/
public function __call( $name, $arguments ) {
switch ( $name ) {
case 'print':
_deprecated_function( __CLASS__ . '::print()', '2.2.4', __CLASS__ . '::render()' );
return call_user_func_array( array( $this, 'render' ), $arguments );
}
return null;
}
}
woocommerce/action-scheduler/classes/WP_CLI/Action/Cancel_Command.php 0000644 00000006410 15153553404 0021545 0 ustar 00 <?php
namespace Action_Scheduler\WP_CLI\Action;
use function \WP_CLI\Utils\get_flag_value;
/**
* WP-CLI command: action-scheduler action cancel
*/
class Cancel_Command extends \ActionScheduler_WPCLI_Command {
/**
* Execute command.
*
* @return void
*/
public function execute() {
$hook = '';
$group = get_flag_value( $this->assoc_args, 'group', '' );
$callback_args = get_flag_value( $this->assoc_args, 'args', null );
$all = get_flag_value( $this->assoc_args, 'all', false );
if ( ! empty( $this->args[0] ) ) {
$hook = $this->args[0];
}
if ( ! empty( $callback_args ) ) {
$callback_args = json_decode( $callback_args, true );
}
if ( $all ) {
$this->cancel_all( $hook, $callback_args, $group );
return;
}
$this->cancel_single( $hook, $callback_args, $group );
}
/**
* Cancel single action.
*
* @param string $hook The hook that the job will trigger.
* @param array $callback_args Args that would have been passed to the job.
* @param string $group The group the job is assigned to.
* @return void
*/
protected function cancel_single( $hook, $callback_args, $group ) {
if ( empty( $hook ) ) {
\WP_CLI::error( __( 'Please specify hook of action to cancel.', 'action-scheduler' ) );
}
try {
$result = as_unschedule_action( $hook, $callback_args, $group );
} catch ( \Exception $e ) {
$this->print_error( $e, false );
}
if ( null === $result ) {
$e = new \Exception( __( 'Unable to cancel scheduled action: check the logs.', 'action-scheduler' ) );
$this->print_error( $e, false );
}
$this->print_success( false );
}
/**
* Cancel all actions.
*
* @param string $hook The hook that the job will trigger.
* @param array $callback_args Args that would have been passed to the job.
* @param string $group The group the job is assigned to.
* @return void
*/
protected function cancel_all( $hook, $callback_args, $group ) {
if ( empty( $hook ) && empty( $group ) ) {
\WP_CLI::error( __( 'Please specify hook and/or group of actions to cancel.', 'action-scheduler' ) );
}
try {
$result = as_unschedule_all_actions( $hook, $callback_args, $group );
} catch ( \Exception $e ) {
$this->print_error( $e, $multiple );
}
/**
* Because as_unschedule_all_actions() does not provide a result,
* neither confirm or deny actions cancelled.
*/
\WP_CLI::success( __( 'Request to cancel scheduled actions completed.', 'action-scheduler' ) );
}
/**
* Print a success message.
*
* @return void
*/
protected function print_success() {
\WP_CLI::success( __( 'Scheduled action cancelled.', 'action-scheduler' ) );
}
/**
* Convert an exception into a WP CLI error.
*
* @param \Exception $e The error object.
* @param bool $multiple Boolean if multiple actions.
* @throws \WP_CLI\ExitException When an error occurs.
* @return void
*/
protected function print_error( \Exception $e, $multiple ) {
\WP_CLI::error(
sprintf(
/* translators: %1$s: singular or plural %2$s: refers to the exception error message. */
__( 'There was an error cancelling the %1$s: %2$s', 'action-scheduler' ),
$multiple ? __( 'scheduled actions', 'action-scheduler' ) : __( 'scheduled action', 'action-scheduler' ),
$e->getMessage()
)
);
}
}
woocommerce/action-scheduler/classes/WP_CLI/Action/Create_Command.php 0000644 00000010476 15153553404 0021572 0 ustar 00 <?php
namespace Action_Scheduler\WP_CLI\Action;
/**
* WP-CLI command: action-scheduler action create
*/
class Create_Command extends \ActionScheduler_WPCLI_Command {
const ASYNC_OPTS = array( 'async', 0 );
/**
* Execute command.
*
* @return void
*/
public function execute() {
$hook = $this->args[0];
$schedule_start = $this->args[1];
$callback_args = get_flag_value( $this->assoc_args, 'args', array() );
$group = get_flag_value( $this->assoc_args, 'group', '' );
$interval = absint( get_flag_value( $this->assoc_args, 'interval', 0 ) );
$cron = get_flag_value( $this->assoc_args, 'cron', '' );
$unique = get_flag_value( $this->assoc_args, 'unique', false );
$priority = absint( get_flag_value( $this->assoc_args, 'priority', 10 ) );
if ( ! empty( $callback_args ) ) {
$callback_args = json_decode( $callback_args, true );
}
$function_args = array(
'start' => $schedule_start,
'cron' => $cron,
'interval' => $interval,
'hook' => $hook,
'callback_args' => $callback_args,
'group' => $group,
'unique' => $unique,
'priority' => $priority,
);
try {
// Generate schedule start if appropriate.
if ( ! in_array( $schedule_start, static::ASYNC_OPTS, true ) ) {
$schedule_start = as_get_datetime_object( $schedule_start );
$function_args['start'] = $schedule_start->format( 'U' );
}
} catch ( \Exception $e ) {
\WP_CLI::error( $e->getMessage() );
}
// Default to creating single action.
$action_type = 'single';
$function = 'as_schedule_single_action';
if ( ! empty( $interval ) ) { // Creating recurring action.
$action_type = 'recurring';
$function = 'as_schedule_recurring_action';
$function_args = array_filter(
$function_args,
static function( $key ) {
return in_array( $key, array( 'start', 'interval', 'hook', 'callback_args', 'group', 'unique', 'priority' ), true );
},
ARRAY_FILTER_USE_KEY
);
} elseif ( ! empty( $cron ) ) { // Creating cron action.
$action_type = 'cron';
$function = 'as_schedule_cron_action';
$function_args = array_filter(
$function_args,
static function( $key ) {
return in_array( $key, array( 'start', 'cron', 'hook', 'callback_args', 'group', 'unique', 'priority' ), true );
},
ARRAY_FILTER_USE_KEY
);
} elseif ( in_array( $function_args['start'], static::ASYNC_OPTS, true ) ) { // Enqueue async action.
$action_type = 'async';
$function = 'as_enqueue_async_action';
$function_args = array_filter(
$function_args,
static function( $key ) {
return in_array( $key, array( 'hook', 'callback_args', 'group', 'unique', 'priority' ), true );
},
ARRAY_FILTER_USE_KEY
);
} else { // Enqueue single action.
$function_args = array_filter(
$function_args,
static function( $key ) {
return in_array( $key, array( 'start', 'hook', 'callback_args', 'group', 'unique', 'priority' ), true );
},
ARRAY_FILTER_USE_KEY
);
}
$function_args = array_values( $function_args );
try {
$action_id = call_user_func_array( $function, $function_args );
} catch ( \Exception $e ) {
$this->print_error( $e );
}
if ( 0 === $action_id ) {
$e = new \Exception( __( 'Unable to create a scheduled action.', 'action-scheduler' ) );
$this->print_error( $e );
}
$this->print_success( $action_id, $action_type );
}
/**
* Print a success message with the action ID.
*
* @param int $action_id Created action ID.
* @param string $action_type Type of action.
*
* @return void
*/
protected function print_success( $action_id, $action_type ) {
\WP_CLI::success(
sprintf(
/* translators: %1$s: type of action, %2$d: ID of the created action */
__( '%1$s action (%2$d) scheduled.', 'action-scheduler' ),
ucfirst( $action_type ),
$action_id
)
);
}
/**
* Convert an exception into a WP CLI error.
*
* @param \Exception $e The error object.
* @throws \WP_CLI\ExitException When an error occurs.
* @return void
*/
protected function print_error( \Exception $e ) {
\WP_CLI::error(
sprintf(
/* translators: %s refers to the exception error message. */
__( 'There was an error creating the scheduled action: %s', 'action-scheduler' ),
$e->getMessage()
)
);
}
}
woocommerce/action-scheduler/classes/WP_CLI/Action/Delete_Command.php 0000644 00000005145 15153553404 0021566 0 ustar 00 <?php
namespace Action_Scheduler\WP_CLI\Action;
/**
* WP-CLI command: action-scheduler action delete
*/
class Delete_Command extends \ActionScheduler_WPCLI_Command {
/**
* Array of action IDs to delete.
*
* @var int[]
*/
protected $action_ids = array();
/**
* Number of deleted, failed, and total actions deleted.
*
* @var array<string, int>
*/
protected $action_counts = array(
'deleted' => 0,
'failed' => 0,
'total' => 0,
);
/**
* Construct.
*
* @param string[] $args Positional arguments.
* @param array<string, string> $assoc_args Keyed arguments.
*/
public function __construct( array $args, array $assoc_args ) {
parent::__construct( $args, $assoc_args );
$this->action_ids = array_map( 'absint', $args );
$this->action_counts['total'] = count( $this->action_ids );
add_action( 'action_scheduler_deleted_action', array( $this, 'on_action_deleted' ) );
}
/**
* Execute.
*
* @return void
*/
public function execute() {
$store = \ActionScheduler::store();
$progress_bar = \WP_CLI\Utils\make_progress_bar(
sprintf(
/* translators: %d: number of actions to be deleted */
_n( 'Deleting %d action', 'Deleting %d actions', $this->action_counts['total'], 'action-scheduler' ),
number_format_i18n( $this->action_counts['total'] )
),
$this->action_counts['total']
);
foreach ( $this->action_ids as $action_id ) {
try {
$store->delete_action( $action_id );
} catch ( \Exception $e ) {
$this->action_counts['failed']++;
\WP_CLI::warning( $e->getMessage() );
}
$progress_bar->tick();
}
$progress_bar->finish();
/* translators: %1$d: number of actions deleted */
$format = _n( 'Deleted %1$d action', 'Deleted %1$d actions', $this->action_counts['deleted'], 'action-scheduler' ) . ', ';
/* translators: %2$d: number of actions deletions failed */
$format .= _n( '%2$d failure.', '%2$d failures.', $this->action_counts['failed'], 'action-scheduler' );
\WP_CLI::success(
sprintf(
$format,
number_format_i18n( $this->action_counts['deleted'] ),
number_format_i18n( $this->action_counts['failed'] )
)
);
}
/**
* Action: action_scheduler_deleted_action
*
* @param int $action_id Action ID.
* @return void
*/
public function on_action_deleted( $action_id ) {
if ( 'action_scheduler_deleted_action' !== current_action() ) {
return;
}
$action_id = absint( $action_id );
if ( ! in_array( $action_id, $this->action_ids, true ) ) {
return;
}
$this->action_counts['deleted']++;
\WP_CLI::debug( sprintf( 'Action %d was deleted.', $action_id ) );
}
}
woocommerce/action-scheduler/classes/WP_CLI/Action/Generate_Command.php 0000644 00000006737 15153553404 0022126 0 ustar 00 <?php
namespace Action_Scheduler\WP_CLI\Action;
use function \WP_CLI\Utils\get_flag_value;
/**
* WP-CLI command: action-scheduler action generate
*/
class Generate_Command extends \ActionScheduler_WPCLI_Command {
/**
* Execute command.
*
* @return void
*/
public function execute() {
$hook = $this->args[0];
$schedule_start = $this->args[1];
$callback_args = get_flag_value( $this->assoc_args, 'args', array() );
$group = get_flag_value( $this->assoc_args, 'group', '' );
$interval = (int) get_flag_value( $this->assoc_args, 'interval', 0 ); // avoid absint() to support negative intervals
$count = absint( get_flag_value( $this->assoc_args, 'count', 1 ) );
if ( ! empty( $callback_args ) ) {
$callback_args = json_decode( $callback_args, true );
}
$schedule_start = as_get_datetime_object( $schedule_start );
$function_args = array(
'start' => absint( $schedule_start->format( 'U' ) ),
'interval' => $interval,
'count' => $count,
'hook' => $hook,
'callback_args' => $callback_args,
'group' => $group,
);
$function_args = array_values( $function_args );
try {
$actions_added = $this->generate( ...$function_args );
} catch ( \Exception $e ) {
$this->print_error( $e );
}
$num_actions_added = count( (array) $actions_added );
$this->print_success( $num_actions_added, 'single' );
}
/**
* Schedule multiple single actions.
*
* @param int $schedule_start Starting timestamp of first action.
* @param int $interval How long to wait between runs.
* @param int $count Limit number of actions to schedule.
* @param string $hook The hook to trigger.
* @param array $args Arguments to pass when the hook triggers.
* @param string $group The group to assign this job to.
* @return int[] IDs of actions added.
*/
protected function generate( $schedule_start, $interval, $count, $hook, array $args = array(), $group = '' ) {
$actions_added = array();
$progress_bar = \WP_CLI\Utils\make_progress_bar(
sprintf(
/* translators: %d is number of actions to create */
_n( 'Creating %d action', 'Creating %d actions', $count, 'action-scheduler' ),
number_format_i18n( $count )
),
$count
);
for ( $i = 0; $i < $count; $i++ ) {
$actions_added[] = as_schedule_single_action( $schedule_start + ( $i * $interval ), $hook, $args, $group );
$progress_bar->tick();
}
$progress_bar->finish();
return $actions_added;
}
/**
* Print a success message with the action ID.
*
* @param int $actions_added Number of actions generated.
* @param string $action_type Type of actions scheduled.
* @return void
*/
protected function print_success( $actions_added, $action_type ) {
\WP_CLI::success(
sprintf(
/* translators: %1$d refers to the total number of tasks added, %2$s is the action type */
_n( '%1$d %2$s action scheduled.', '%1$d %2$s actions scheduled.', $actions_added, 'action-scheduler' ),
number_format_i18n( $actions_added ),
$action_type
)
);
}
/**
* Convert an exception into a WP CLI error.
*
* @param \Exception $e The error object.
* @throws \WP_CLI\ExitException When an error occurs.
* @return void
*/
protected function print_error( \Exception $e ) {
\WP_CLI::error(
sprintf(
/* translators: %s refers to the exception error message. */
__( 'There was an error creating the scheduled action: %s', 'action-scheduler' ),
$e->getMessage()
)
);
}
}
woocommerce/action-scheduler/classes/WP_CLI/Action/Get_Command.php 0000644 00000004240 15153553404 0021076 0 ustar 00 <?php
namespace Action_Scheduler\WP_CLI\Action;
/**
* WP-CLI command: action-scheduler action get
*/
class Get_Command extends \ActionScheduler_WPCLI_Command {
/**
* Execute command.
*
* @return void
*/
public function execute() {
$action_id = $this->args[0];
$store = \ActionScheduler::store();
$logger = \ActionScheduler::logger();
$action = $store->fetch_action( $action_id );
if ( is_a( $action, ActionScheduler_NullAction::class ) ) {
/* translators: %d is action ID. */
\WP_CLI::error( sprintf( esc_html__( 'Unable to retrieve action %d.', 'action-scheduler' ), $action_id ) );
}
$only_logs = ! empty( $this->assoc_args['field'] ) && 'log_entries' === $this->assoc_args['field'];
$only_logs = $only_logs || ( ! empty( $this->assoc_args['fields'] && 'log_entries' === $this->assoc_args['fields'] ) );
$log_entries = array();
foreach ( $logger->get_logs( $action_id ) as $log_entry ) {
$log_entries[] = array(
'date' => $log_entry->get_date()->format( static::DATE_FORMAT ),
'message' => $log_entry->get_message(),
);
}
if ( $only_logs ) {
$args = array(
'format' => \WP_CLI\Utils\get_flag_value( $this->assoc_args, 'format', 'table' ),
);
$formatter = new \WP_CLI\Formatter( $args, array( 'date', 'message' ) );
$formatter->display_items( $log_entries );
return;
}
try {
$status = $store->get_status( $action_id );
} catch ( \Exception $e ) {
\WP_CLI::error( $e->getMessage() );
}
$action_arr = array(
'id' => $this->args[0],
'hook' => $action->get_hook(),
'status' => $status,
'args' => $action->get_args(),
'group' => $action->get_group(),
'recurring' => $action->get_schedule()->is_recurring() ? 'yes' : 'no',
'scheduled_date' => $this->get_schedule_display_string( $action->get_schedule() ),
'log_entries' => $log_entries,
);
$fields = array_keys( $action_arr );
if ( ! empty( $this->assoc_args['fields'] ) ) {
$fields = explode( ',', $this->assoc_args['fields'] );
}
$formatter = new \WP_CLI\Formatter( $this->assoc_args, $fields );
$formatter->display_item( $action_arr );
}
}
woocommerce/action-scheduler/classes/WP_CLI/Action/List_Command.php 0000644 00000006067 15153553404 0021303 0 ustar 00 <?php
namespace Action_Scheduler\WP_CLI\Action;
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaping output is not necessary in WP CLI.
/**
* WP-CLI command: action-scheduler action list
*/
class List_Command extends \ActionScheduler_WPCLI_Command {
const PARAMETERS = array(
'hook',
'args',
'date',
'date_compare',
'modified',
'modified_compare',
'group',
'status',
'claimed',
'per_page',
'offset',
'orderby',
'order',
);
/**
* Execute command.
*
* @return void
*/
public function execute() {
$store = \ActionScheduler::store();
$logger = \ActionScheduler::logger();
$fields = array(
'id',
'hook',
'status',
'group',
'recurring',
'scheduled_date',
);
$this->process_csv_arguments_to_arrays();
if ( ! empty( $this->assoc_args['fields'] ) ) {
$fields = $this->assoc_args['fields'];
}
$formatter = new \WP_CLI\Formatter( $this->assoc_args, $fields );
$query_args = $this->assoc_args;
/**
* The `claimed` parameter expects a boolean or integer:
* check for string 'false', and set explicitly to `false` boolean.
*/
if ( array_key_exists( 'claimed', $query_args ) && 'false' === strtolower( $query_args['claimed'] ) ) {
$query_args['claimed'] = false;
}
$return_format = 'OBJECT';
if ( in_array( $formatter->format, array( 'ids', 'count' ), true ) ) {
$return_format = '\'ids\'';
}
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export
$params = var_export( $query_args, true );
if ( empty( $query_args ) ) {
$params = 'array()';
}
\WP_CLI::debug(
sprintf(
'as_get_scheduled_actions( %s, %s )',
$params,
$return_format
)
);
if ( ! empty( $query_args['args'] ) ) {
$query_args['args'] = json_decode( $query_args['args'], true );
}
switch ( $formatter->format ) {
case 'ids':
$actions = as_get_scheduled_actions( $query_args, 'ids' );
echo implode( ' ', $actions );
break;
case 'count':
$actions = as_get_scheduled_actions( $query_args, 'ids' );
$formatter->display_items( $actions );
break;
default:
$actions = as_get_scheduled_actions( $query_args, OBJECT );
$actions_arr = array();
foreach ( $actions as $action_id => $action ) {
$action_arr = array(
'id' => $action_id,
'hook' => $action->get_hook(),
'status' => $store->get_status( $action_id ),
'args' => $action->get_args(),
'group' => $action->get_group(),
'recurring' => $action->get_schedule()->is_recurring() ? 'yes' : 'no',
'scheduled_date' => $this->get_schedule_display_string( $action->get_schedule() ),
'log_entries' => array(),
);
foreach ( $logger->get_logs( $action_id ) as $log_entry ) {
$action_arr['log_entries'][] = array(
'date' => $log_entry->get_date()->format( static::DATE_FORMAT ),
'message' => $log_entry->get_message(),
);
}
$actions_arr[] = $action_arr;
}
$formatter->display_items( $actions_arr );
break;
}
}
}
woocommerce/action-scheduler/classes/WP_CLI/Action/Next_Command.php 0000644 00000003503 15153553404 0021276 0 ustar 00 <?php
namespace Action_Scheduler\WP_CLI\Action;
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaping output is not necessary in WP CLI.
use function \WP_CLI\Utils\get_flag_value;
/**
* WP-CLI command: action-scheduler action next
*/
class Next_Command extends \ActionScheduler_WPCLI_Command {
/**
* Execute command.
*
* @return void
*/
public function execute() {
$hook = $this->args[0];
$group = get_flag_value( $this->assoc_args, 'group', '' );
$callback_args = get_flag_value( $this->assoc_args, 'args', null );
$raw = (bool) get_flag_value( $this->assoc_args, 'raw', false );
if ( ! empty( $callback_args ) ) {
$callback_args = json_decode( $callback_args, true );
}
if ( $raw ) {
\WP_CLI::line( as_next_scheduled_action( $hook, $callback_args, $group ) );
return;
}
$params = array(
'hook' => $hook,
'orderby' => 'date',
'order' => 'ASC',
'group' => $group,
);
if ( is_array( $callback_args ) ) {
$params['args'] = $callback_args;
}
$params['status'] = \ActionScheduler_Store::STATUS_RUNNING;
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export
\WP_CLI::debug( 'ActionScheduler()::store()->query_action( ' . var_export( $params, true ) . ' )' );
$store = \ActionScheduler::store();
$action_id = $store->query_action( $params );
if ( $action_id ) {
echo $action_id;
return;
}
$params['status'] = \ActionScheduler_Store::STATUS_PENDING;
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export
\WP_CLI::debug( 'ActionScheduler()::store()->query_action( ' . var_export( $params, true ) . ' )' );
$action_id = $store->query_action( $params );
if ( $action_id ) {
echo $action_id;
return;
}
\WP_CLI::warning( 'No matching next action.' );
}
}
woocommerce/action-scheduler/classes/WP_CLI/Action/Run_Command.php 0000644 00000011161 15153553404 0021123 0 ustar 00 <?php
namespace Action_Scheduler\WP_CLI\Action;
/**
* WP-CLI command: action-scheduler action run
*/
class Run_Command extends \ActionScheduler_WPCLI_Command {
/**
* Array of action IDs to execute.
*
* @var int[]
*/
protected $action_ids = array();
/**
* Number of executed, failed, ignored, invalid, and total actions.
*
* @var array<string, int>
*/
protected $action_counts = array(
'executed' => 0,
'failed' => 0,
'ignored' => 0,
'invalid' => 0,
'total' => 0,
);
/**
* Construct.
*
* @param string[] $args Positional arguments.
* @param array<string, string> $assoc_args Keyed arguments.
*/
public function __construct( array $args, array $assoc_args ) {
parent::__construct( $args, $assoc_args );
$this->action_ids = array_map( 'absint', $args );
$this->action_counts['total'] = count( $this->action_ids );
add_action( 'action_scheduler_execution_ignored', array( $this, 'on_action_ignored' ) );
add_action( 'action_scheduler_after_execute', array( $this, 'on_action_executed' ) );
add_action( 'action_scheduler_failed_execution', array( $this, 'on_action_failed' ), 10, 2 );
add_action( 'action_scheduler_failed_validation', array( $this, 'on_action_invalid' ), 10, 2 );
}
/**
* Execute.
*
* @return void
*/
public function execute() {
$runner = \ActionScheduler::runner();
$progress_bar = \WP_CLI\Utils\make_progress_bar(
sprintf(
/* translators: %d: number of actions */
_n( 'Executing %d action', 'Executing %d actions', $this->action_counts['total'], 'action-scheduler' ),
number_format_i18n( $this->action_counts['total'] )
),
$this->action_counts['total']
);
foreach ( $this->action_ids as $action_id ) {
$runner->process_action( $action_id, 'Action Scheduler CLI' );
$progress_bar->tick();
}
$progress_bar->finish();
foreach ( array(
'ignored',
'invalid',
'failed',
) as $type ) {
$count = $this->action_counts[ $type ];
if ( empty( $count ) ) {
continue;
}
/*
* translators:
* %1$d: count of actions evaluated.
* %2$s: type of action evaluated.
*/
$format = _n( '%1$d action %2$s.', '%1$d actions %2$s.', $count, 'action-scheduler' );
\WP_CLI::warning(
sprintf(
$format,
number_format_i18n( $count ),
$type
)
);
}
\WP_CLI::success(
sprintf(
/* translators: %d: number of executed actions */
_n( 'Executed %d action.', 'Executed %d actions.', $this->action_counts['executed'], 'action-scheduler' ),
number_format_i18n( $this->action_counts['executed'] )
)
);
}
/**
* Action: action_scheduler_execution_ignored
*
* @param int $action_id Action ID.
* @return void
*/
public function on_action_ignored( $action_id ) {
if ( 'action_scheduler_execution_ignored' !== current_action() ) {
return;
}
$action_id = absint( $action_id );
if ( ! in_array( $action_id, $this->action_ids, true ) ) {
return;
}
$this->action_counts['ignored']++;
\WP_CLI::debug( sprintf( 'Action %d was ignored.', $action_id ) );
}
/**
* Action: action_scheduler_after_execute
*
* @param int $action_id Action ID.
* @return void
*/
public function on_action_executed( $action_id ) {
if ( 'action_scheduler_after_execute' !== current_action() ) {
return;
}
$action_id = absint( $action_id );
if ( ! in_array( $action_id, $this->action_ids, true ) ) {
return;
}
$this->action_counts['executed']++;
\WP_CLI::debug( sprintf( 'Action %d was executed.', $action_id ) );
}
/**
* Action: action_scheduler_failed_execution
*
* @param int $action_id Action ID.
* @param \Exception $e Exception.
* @return void
*/
public function on_action_failed( $action_id, \Exception $e ) {
if ( 'action_scheduler_failed_execution' !== current_action() ) {
return;
}
$action_id = absint( $action_id );
if ( ! in_array( $action_id, $this->action_ids, true ) ) {
return;
}
$this->action_counts['failed']++;
\WP_CLI::debug( sprintf( 'Action %d failed execution: %s', $action_id, $e->getMessage() ) );
}
/**
* Action: action_scheduler_failed_validation
*
* @param int $action_id Action ID.
* @param \Exception $e Exception.
* @return void
*/
public function on_action_invalid( $action_id, \Exception $e ) {
if ( 'action_scheduler_failed_validation' !== current_action() ) {
return;
}
$action_id = absint( $action_id );
if ( ! in_array( $action_id, $this->action_ids, true ) ) {
return;
}
$this->action_counts['invalid']++;
\WP_CLI::debug( sprintf( 'Action %d failed validation: %s', $action_id, $e->getMessage() ) );
}
}
woocommerce/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Clean_Command.php 0000644 00000007363 15153553404 0024267 0 ustar 00 <?php
/**
* Commands for Action Scheduler.
*/
class ActionScheduler_WPCLI_Clean_Command extends WP_CLI_Command {
/**
* Run the Action Scheduler Queue Cleaner
*
* ## OPTIONS
*
* [--batch-size=<size>]
* : The maximum number of actions to delete per batch. Defaults to 20.
*
* [--batches=<size>]
* : Limit execution to a number of batches. Defaults to 0, meaning batches will continue all eligible actions are deleted.
*
* [--status=<status>]
* : Only clean actions with the specified status. Defaults to Canceled, Completed. Define multiple statuses as a comma separated string (without spaces), e.g. `--status=complete,failed,canceled`
*
* [--before=<datestring>]
* : Only delete actions with scheduled date older than this. Defaults to 31 days. e.g `--before='7 days ago'`, `--before='02-Feb-2020 20:20:20'`
*
* [--pause=<seconds>]
* : The number of seconds to pause between batches. Default no pause.
*
* @param array $args Positional arguments.
* @param array $assoc_args Keyed arguments.
* @throws \WP_CLI\ExitException When an error occurs.
*
* @subcommand clean
*/
public function clean( $args, $assoc_args ) {
// Handle passed arguments.
$batch = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'batch-size', 20 ) );
$batches = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'batches', 0 ) );
$status = explode( ',', WP_CLI\Utils\get_flag_value( $assoc_args, 'status', '' ) );
$status = array_filter( array_map( 'trim', $status ) );
$before = \WP_CLI\Utils\get_flag_value( $assoc_args, 'before', '' );
$sleep = \WP_CLI\Utils\get_flag_value( $assoc_args, 'pause', 0 );
$batches_completed = 0;
$actions_deleted = 0;
$unlimited = 0 === $batches;
try {
$lifespan = as_get_datetime_object( $before );
} catch ( Exception $e ) {
$lifespan = null;
}
try {
// Custom queue cleaner instance.
$cleaner = new ActionScheduler_QueueCleaner( null, $batch );
// Clean actions for as long as possible.
while ( $unlimited || $batches_completed < $batches ) {
if ( $sleep && $batches_completed > 0 ) {
sleep( $sleep );
}
$deleted = count( $cleaner->clean_actions( $status, $lifespan, null, 'CLI' ) );
if ( $deleted <= 0 ) {
break;
}
$actions_deleted += $deleted;
$batches_completed++;
$this->print_success( $deleted );
}
} catch ( Exception $e ) {
$this->print_error( $e );
}
$this->print_total_batches( $batches_completed );
if ( $batches_completed > 1 ) {
$this->print_success( $actions_deleted );
}
}
/**
* Print WP CLI message about how many batches of actions were processed.
*
* @param int $batches_processed Number of batches processed.
*/
protected function print_total_batches( int $batches_processed ) {
WP_CLI::log(
sprintf(
/* translators: %d refers to the total number of batches processed */
_n( '%d batch processed.', '%d batches processed.', $batches_processed, 'action-scheduler' ),
$batches_processed
)
);
}
/**
* Convert an exception into a WP CLI error.
*
* @param Exception $e The error object.
*/
protected function print_error( Exception $e ) {
WP_CLI::error(
sprintf(
/* translators: %s refers to the exception error message */
__( 'There was an error deleting an action: %s', 'action-scheduler' ),
$e->getMessage()
)
);
}
/**
* Print a success message with the number of completed actions.
*
* @param int $actions_deleted Number of deleted actions.
*/
protected function print_success( int $actions_deleted ) {
WP_CLI::success(
sprintf(
/* translators: %d refers to the total number of actions deleted */
_n( '%d action deleted.', '%d actions deleted.', $actions_deleted, 'action-scheduler' ),
$actions_deleted
)
);
}
}
woocommerce/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_QueueRunner.php 0000644 00000014331 15153553404 0024056 0 ustar 00 <?php
use Action_Scheduler\WP_CLI\ProgressBar;
/**
* WP CLI Queue runner.
*
* This class can only be called from within a WP CLI instance.
*/
class ActionScheduler_WPCLI_QueueRunner extends ActionScheduler_Abstract_QueueRunner {
/**
* Claimed actions.
*
* @var array
*/
protected $actions;
/**
* ActionScheduler_ActionClaim instance.
*
* @var ActionScheduler_ActionClaim
*/
protected $claim;
/**
* Progress bar instance.
*
* @var \cli\progress\Bar
*/
protected $progress_bar;
/**
* ActionScheduler_WPCLI_QueueRunner constructor.
*
* @param ActionScheduler_Store|null $store Store object.
* @param ActionScheduler_FatalErrorMonitor|null $monitor Monitor object.
* @param ActionScheduler_QueueCleaner|null $cleaner Cleaner object.
*
* @throws Exception When this is not run within WP CLI.
*/
public function __construct( ?ActionScheduler_Store $store = null, ?ActionScheduler_FatalErrorMonitor $monitor = null, ?ActionScheduler_QueueCleaner $cleaner = null ) {
if ( ! ( defined( 'WP_CLI' ) && WP_CLI ) ) {
/* translators: %s php class name */
throw new Exception( sprintf( __( 'The %s class can only be run within WP CLI.', 'action-scheduler' ), __CLASS__ ) );
}
parent::__construct( $store, $monitor, $cleaner );
}
/**
* Set up the Queue before processing.
*
* @param int $batch_size The batch size to process.
* @param array $hooks The hooks being used to filter the actions claimed in this batch.
* @param string $group The group of actions to claim with this batch.
* @param bool $force Whether to force running even with too many concurrent processes.
*
* @return int The number of actions that will be run.
* @throws \WP_CLI\ExitException When there are too many concurrent batches.
*/
public function setup( $batch_size, $hooks = array(), $group = '', $force = false ) {
$this->run_cleanup();
$this->add_hooks();
// Check to make sure there aren't too many concurrent processes running.
if ( $this->has_maximum_concurrent_batches() ) {
if ( $force ) {
WP_CLI::warning( __( 'There are too many concurrent batches, but the run is forced to continue.', 'action-scheduler' ) );
} else {
WP_CLI::error( __( 'There are too many concurrent batches.', 'action-scheduler' ) );
}
}
// Stake a claim and store it.
$this->claim = $this->store->stake_claim( $batch_size, null, $hooks, $group );
$this->monitor->attach( $this->claim );
$this->actions = $this->claim->get_actions();
return count( $this->actions );
}
/**
* Add our hooks to the appropriate actions.
*/
protected function add_hooks() {
add_action( 'action_scheduler_before_execute', array( $this, 'before_execute' ) );
add_action( 'action_scheduler_after_execute', array( $this, 'after_execute' ), 10, 2 );
add_action( 'action_scheduler_failed_execution', array( $this, 'action_failed' ), 10, 2 );
}
/**
* Set up the WP CLI progress bar.
*/
protected function setup_progress_bar() {
$count = count( $this->actions );
$this->progress_bar = new ProgressBar(
/* translators: %d: amount of actions */
sprintf( _n( 'Running %d action', 'Running %d actions', $count, 'action-scheduler' ), $count ),
$count
);
}
/**
* Process actions in the queue.
*
* @param string $context Optional runner context. Default 'WP CLI'.
*
* @return int The number of actions processed.
*/
public function run( $context = 'WP CLI' ) {
do_action( 'action_scheduler_before_process_queue' );
$this->setup_progress_bar();
foreach ( $this->actions as $action_id ) {
// Error if we lost the claim.
if ( ! in_array( $action_id, $this->store->find_actions_by_claim_id( $this->claim->get_id() ), true ) ) {
WP_CLI::warning( __( 'The claim has been lost. Aborting current batch.', 'action-scheduler' ) );
break;
}
$this->process_action( $action_id, $context );
$this->progress_bar->tick();
}
$completed = $this->progress_bar->current();
$this->progress_bar->finish();
$this->store->release_claim( $this->claim );
do_action( 'action_scheduler_after_process_queue' );
return $completed;
}
/**
* Handle WP CLI message when the action is starting.
*
* @param int $action_id Action ID.
*/
public function before_execute( $action_id ) {
/* translators: %s refers to the action ID */
WP_CLI::log( sprintf( __( 'Started processing action %s', 'action-scheduler' ), $action_id ) );
}
/**
* Handle WP CLI message when the action has completed.
*
* @param int $action_id ActionID.
* @param null|ActionScheduler_Action $action The instance of the action. Default to null for backward compatibility.
*/
public function after_execute( $action_id, $action = null ) {
// backward compatibility.
if ( null === $action ) {
$action = $this->store->fetch_action( $action_id );
}
/* translators: 1: action ID 2: hook name */
WP_CLI::log( sprintf( __( 'Completed processing action %1$s with hook: %2$s', 'action-scheduler' ), $action_id, $action->get_hook() ) );
}
/**
* Handle WP CLI message when the action has failed.
*
* @param int $action_id Action ID.
* @param Exception $exception Exception.
* @throws \WP_CLI\ExitException With failure message.
*/
public function action_failed( $action_id, $exception ) {
WP_CLI::error(
/* translators: 1: action ID 2: exception message */
sprintf( __( 'Error processing action %1$s: %2$s', 'action-scheduler' ), $action_id, $exception->getMessage() ),
false
);
}
/**
* Sleep and help avoid hitting memory limit
*
* @param int $sleep_time Amount of seconds to sleep.
* @deprecated 3.0.0
*/
protected function stop_the_insanity( $sleep_time = 0 ) {
_deprecated_function( 'ActionScheduler_WPCLI_QueueRunner::stop_the_insanity', '3.0.0', 'ActionScheduler_DataController::free_memory' );
ActionScheduler_DataController::free_memory();
}
/**
* Maybe trigger the stop_the_insanity() method to free up memory.
*/
protected function maybe_stop_the_insanity() {
// The value returned by progress_bar->current() might be padded. Remove padding, and convert to int.
$current_iteration = intval( trim( $this->progress_bar->current() ) );
if ( 0 === $current_iteration % 50 ) {
$this->stop_the_insanity();
}
}
}
woocommerce/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php 0000644 00000015307 15153553404 0025220 0 ustar 00 <?php
/**
* Commands for Action Scheduler.
*/
class ActionScheduler_WPCLI_Scheduler_command extends WP_CLI_Command {
/**
* Force tables schema creation for Action Scheduler
*
* ## OPTIONS
*
* @param array $args Positional arguments.
* @param array $assoc_args Keyed arguments.
*
* @subcommand fix-schema
*/
public function fix_schema( $args, $assoc_args ) {
$schema_classes = array( ActionScheduler_LoggerSchema::class, ActionScheduler_StoreSchema::class );
foreach ( $schema_classes as $classname ) {
if ( is_subclass_of( $classname, ActionScheduler_Abstract_Schema::class ) ) {
$obj = new $classname();
$obj->init();
$obj->register_tables( true );
WP_CLI::success(
sprintf(
/* translators: %s refers to the schema name*/
__( 'Registered schema for %s', 'action-scheduler' ),
$classname
)
);
}
}
}
/**
* Run the Action Scheduler
*
* ## OPTIONS
*
* [--batch-size=<size>]
* : The maximum number of actions to run. Defaults to 100.
*
* [--batches=<size>]
* : Limit execution to a number of batches. Defaults to 0, meaning batches will continue being executed until all actions are complete.
*
* [--cleanup-batch-size=<size>]
* : The maximum number of actions to clean up. Defaults to the value of --batch-size.
*
* [--hooks=<hooks>]
* : Only run actions with the specified hook. Omitting this option runs actions with any hook. Define multiple hooks as a comma separated string (without spaces), e.g. `--hooks=hook_one,hook_two,hook_three`
*
* [--group=<group>]
* : Only run actions from the specified group. Omitting this option runs actions from all groups.
*
* [--exclude-groups=<groups>]
* : Run actions from all groups except the specified group(s). Define multiple groups as a comma separated string (without spaces), e.g. '--group_a,group_b'. This option is ignored when `--group` is used.
*
* [--free-memory-on=<count>]
* : The number of actions to process between freeing memory. 0 disables freeing memory. Default 50.
*
* [--pause=<seconds>]
* : The number of seconds to pause when freeing memory. Default no pause.
*
* [--force]
* : Whether to force execution despite the maximum number of concurrent processes being exceeded.
*
* @param array $args Positional arguments.
* @param array $assoc_args Keyed arguments.
* @throws \WP_CLI\ExitException When an error occurs.
*
* @subcommand run
*/
public function run( $args, $assoc_args ) {
// Handle passed arguments.
$batch = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'batch-size', 100 ) );
$batches = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'batches', 0 ) );
$clean = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'cleanup-batch-size', $batch ) );
$hooks = explode( ',', WP_CLI\Utils\get_flag_value( $assoc_args, 'hooks', '' ) );
$hooks = array_filter( array_map( 'trim', $hooks ) );
$group = \WP_CLI\Utils\get_flag_value( $assoc_args, 'group', '' );
$exclude_groups = \WP_CLI\Utils\get_flag_value( $assoc_args, 'exclude-groups', '' );
$free_on = \WP_CLI\Utils\get_flag_value( $assoc_args, 'free-memory-on', 50 );
$sleep = \WP_CLI\Utils\get_flag_value( $assoc_args, 'pause', 0 );
$force = \WP_CLI\Utils\get_flag_value( $assoc_args, 'force', false );
ActionScheduler_DataController::set_free_ticks( $free_on );
ActionScheduler_DataController::set_sleep_time( $sleep );
$batches_completed = 0;
$actions_completed = 0;
$unlimited = 0 === $batches;
if ( is_callable( array( ActionScheduler::store(), 'set_claim_filter' ) ) ) {
$exclude_groups = $this->parse_comma_separated_string( $exclude_groups );
if ( ! empty( $exclude_groups ) ) {
ActionScheduler::store()->set_claim_filter( 'exclude-groups', $exclude_groups );
}
}
try {
// Custom queue cleaner instance.
$cleaner = new ActionScheduler_QueueCleaner( null, $clean );
// Get the queue runner instance.
$runner = new ActionScheduler_WPCLI_QueueRunner( null, null, $cleaner );
// Determine how many tasks will be run in the first batch.
$total = $runner->setup( $batch, $hooks, $group, $force );
// Run actions for as long as possible.
while ( $total > 0 ) {
$this->print_total_actions( $total );
$actions_completed += $runner->run();
$batches_completed++;
// Maybe set up tasks for the next batch.
$total = ( $unlimited || $batches_completed < $batches ) ? $runner->setup( $batch, $hooks, $group, $force ) : 0;
}
} catch ( Exception $e ) {
$this->print_error( $e );
}
$this->print_total_batches( $batches_completed );
$this->print_success( $actions_completed );
}
/**
* Converts a string of comma-separated values into an array of those same values.
*
* @param string $string The string of one or more comma separated values.
*
* @return array
*/
private function parse_comma_separated_string( $string ): array {
return array_filter( str_getcsv( $string ) );
}
/**
* Print WP CLI message about how many actions are about to be processed.
*
* @param int $total Number of actions found.
*/
protected function print_total_actions( $total ) {
WP_CLI::log(
sprintf(
/* translators: %d refers to how many scheduled tasks were found to run */
_n( 'Found %d scheduled task', 'Found %d scheduled tasks', $total, 'action-scheduler' ),
$total
)
);
}
/**
* Print WP CLI message about how many batches of actions were processed.
*
* @param int $batches_completed Number of completed batches.
*/
protected function print_total_batches( $batches_completed ) {
WP_CLI::log(
sprintf(
/* translators: %d refers to the total number of batches executed */
_n( '%d batch executed.', '%d batches executed.', $batches_completed, 'action-scheduler' ),
$batches_completed
)
);
}
/**
* Convert an exception into a WP CLI error.
*
* @param Exception $e The error object.
*
* @throws \WP_CLI\ExitException Under some conditions WP CLI may throw an exception.
*/
protected function print_error( Exception $e ) {
WP_CLI::error(
sprintf(
/* translators: %s refers to the exception error message */
__( 'There was an error running the action scheduler: %s', 'action-scheduler' ),
$e->getMessage()
)
);
}
/**
* Print a success message with the number of completed actions.
*
* @param int $actions_completed Number of completed actions.
*/
protected function print_success( $actions_completed ) {
WP_CLI::success(
sprintf(
/* translators: %d refers to the total number of tasks completed */
_n( '%d scheduled task completed.', '%d scheduled tasks completed.', $actions_completed, 'action-scheduler' ),
$actions_completed
)
);
}
}
woocommerce/action-scheduler/classes/WP_CLI/Action_Command.php 0000644 00000020224 15153553404 0020357 0 ustar 00 <?php
namespace Action_Scheduler\WP_CLI;
/**
* Action command for Action Scheduler.
*/
class Action_Command extends \WP_CLI_Command {
/**
* Cancel the next occurrence or all occurrences of a scheduled action.
*
* ## OPTIONS
*
* [<hook>]
* : Name of the action hook.
*
* [--group=<group>]
* : The group the job is assigned to.
*
* [--args=<args>]
* : JSON object of arguments assigned to the job.
* ---
* default: []
* ---
*
* [--all]
* : Cancel all occurrences of a scheduled action.
*
* @param array $args Positional arguments.
* @param array $assoc_args Keyed arguments.
* @return void
*/
public function cancel( array $args, array $assoc_args ) {
require_once 'Action/Cancel_Command.php';
$command = new Action\Cancel_Command( $args, $assoc_args );
$command->execute();
}
/**
* Creates a new scheduled action.
*
* ## OPTIONS
*
* <hook>
* : Name of the action hook.
*
* <start>
* : A unix timestamp representing the date you want the action to start. Also 'async' or 'now' to enqueue an async action.
*
* [--args=<args>]
* : JSON object of arguments to pass to callbacks when the hook triggers.
* ---
* default: []
* ---
*
* [--cron=<cron>]
* : A cron-like schedule string (https://crontab.guru/).
* ---
* default: ''
* ---
*
* [--group=<group>]
* : The group to assign this job to.
* ---
* default: ''
* ---
*
* [--interval=<interval>]
* : Number of seconds to wait between runs.
* ---
* default: 0
* ---
*
* ## EXAMPLES
*
* wp action-scheduler action create hook_async async
* wp action-scheduler action create hook_single 1627147598
* wp action-scheduler action create hook_recurring 1627148188 --interval=5
* wp action-scheduler action create hook_cron 1627147655 --cron='5 4 * * *'
*
* @param array $args Positional arguments.
* @param array $assoc_args Keyed arguments.
* @return void
*/
public function create( array $args, array $assoc_args ) {
require_once 'Action/Create_Command.php';
$command = new Action\Create_Command( $args, $assoc_args );
$command->execute();
}
/**
* Delete existing scheduled action(s).
*
* ## OPTIONS
*
* <id>...
* : One or more IDs of actions to delete.
* ---
* default: 0
* ---
*
* ## EXAMPLES
*
* # Delete the action with id 100
* $ wp action-scheduler action delete 100
*
* # Delete the actions with ids 100 and 200
* $ wp action-scheduler action delete 100 200
*
* # Delete the first five pending actions in 'action-scheduler' group
* $ wp action-scheduler action delete $( wp action-scheduler action list --status=pending --group=action-scheduler --format=ids )
*
* @param array $args Positional arguments.
* @param array $assoc_args Keyed arguments.
* @return void
*/
public function delete( array $args, array $assoc_args ) {
require_once 'Action/Delete_Command.php';
$command = new Action\Delete_Command( $args, $assoc_args );
$command->execute();
}
/**
* Generates some scheduled actions.
*
* ## OPTIONS
*
* <hook>
* : Name of the action hook.
*
* <start>
* : The Unix timestamp representing the date you want the action to start.
*
* [--count=<count>]
* : Number of actions to create.
* ---
* default: 1
* ---
*
* [--interval=<interval>]
* : Number of seconds to wait between runs.
* ---
* default: 0
* ---
*
* [--args=<args>]
* : JSON object of arguments to pass to callbacks when the hook triggers.
* ---
* default: []
* ---
*
* [--group=<group>]
* : The group to assign this job to.
* ---
* default: ''
* ---
*
* ## EXAMPLES
*
* wp action-scheduler action generate test_multiple 1627147598 --count=5 --interval=5
*
* @param array $args Positional arguments.
* @param array $assoc_args Keyed arguments.
* @return void
*/
public function generate( array $args, array $assoc_args ) {
require_once 'Action/Generate_Command.php';
$command = new Action\Generate_Command( $args, $assoc_args );
$command->execute();
}
/**
* Get details about a scheduled action.
*
* ## OPTIONS
*
* <id>
* : The ID of the action to get.
* ---
* default: 0
* ---
*
* [--field=<field>]
* : Instead of returning the whole action, returns the value of a single field.
*
* [--fields=<fields>]
* : Limit the output to specific fields (comma-separated). Defaults to all fields.
*
* [--format=<format>]
* : Render output in a particular format.
* ---
* default: table
* options:
* - table
* - csv
* - json
* - yaml
* ---
*
* @param array $args Positional arguments.
* @param array $assoc_args Keyed arguments.
* @return void
*/
public function get( array $args, array $assoc_args ) {
require_once 'Action/Get_Command.php';
$command = new Action\Get_Command( $args, $assoc_args );
$command->execute();
}
/**
* Get a list of scheduled actions.
*
* Display actions based on all arguments supported by
* [as_get_scheduled_actions()](https://actionscheduler.org/api/#function-reference--as_get_scheduled_actions).
*
* ## OPTIONS
*
* [--<field>=<value>]
* : One or more arguments to pass to as_get_scheduled_actions().
*
* [--field=<field>]
* : Prints the value of a single property for each action.
*
* [--fields=<fields>]
* : Limit the output to specific object properties.
*
* [--format=<format>]
* : Render output in a particular format.
* ---
* default: table
* options:
* - table
* - csv
* - ids
* - json
* - count
* - yaml
* ---
*
* ## AVAILABLE FIELDS
*
* These fields will be displayed by default for each action:
*
* * id
* * hook
* * status
* * group
* * recurring
* * scheduled_date
*
* These fields are optionally available:
*
* * args
* * log_entries
*
* @param array $args Positional arguments.
* @param array $assoc_args Keyed arguments.
* @return void
*
* @subcommand list
*/
public function subcommand_list( array $args, array $assoc_args ) {
require_once 'Action/List_Command.php';
$command = new Action\List_Command( $args, $assoc_args );
$command->execute();
}
/**
* Get logs for a scheduled action.
*
* ## OPTIONS
*
* <id>
* : The ID of the action to get.
* ---
* default: 0
* ---
*
* @param array $args Positional arguments.
* @return void
*/
public function logs( array $args ) {
$command = sprintf( 'action-scheduler action get %d --field=log_entries', $args[0] );
WP_CLI::runcommand( $command );
}
/**
* Get the ID or timestamp of the next scheduled action.
*
* ## OPTIONS
*
* <hook>
* : The hook of the next scheduled action.
*
* [--args=<args>]
* : JSON object of arguments to search for next scheduled action.
* ---
* default: []
* ---
*
* [--group=<group>]
* : The group to which the next scheduled action is assigned.
* ---
* default: ''
* ---
*
* [--raw]
* : Display the raw output of as_next_scheduled_action() (timestamp or boolean).
*
* @param array $args Positional arguments.
* @param array $assoc_args Keyed arguments.
* @return void
*/
public function next( array $args, array $assoc_args ) {
require_once 'Action/Next_Command.php';
$command = new Action\Next_Command( $args, $assoc_args );
$command->execute();
}
/**
* Run existing scheduled action(s).
*
* ## OPTIONS
*
* <id>...
* : One or more IDs of actions to run.
* ---
* default: 0
* ---
*
* ## EXAMPLES
*
* # Run the action with id 100
* $ wp action-scheduler action run 100
*
* # Run the actions with ids 100 and 200
* $ wp action-scheduler action run 100 200
*
* # Run the first five pending actions in 'action-scheduler' group
* $ wp action-scheduler action run $( wp action-scheduler action list --status=pending --group=action-scheduler --format=ids )
*
* @param array $args Positional arguments.
* @param array $assoc_args Keyed arguments.
* @return void
*/
public function run( array $args, array $assoc_args ) {
require_once 'Action/Run_Command.php';
$command = new Action\Run_Command( $args, $assoc_args );
$command->execute();
}
}
woocommerce/action-scheduler/classes/WP_CLI/Migration_Command.php 0000644 00000011670 15153553404 0021100 0 ustar 00 <?php
namespace Action_Scheduler\WP_CLI;
use Action_Scheduler\Migration\Config;
use Action_Scheduler\Migration\Runner;
use Action_Scheduler\Migration\Scheduler;
use Action_Scheduler\Migration\Controller;
use WP_CLI;
use WP_CLI_Command;
/**
* Class Migration_Command
*
* @package Action_Scheduler\WP_CLI
*
* @since 3.0.0
*
* @codeCoverageIgnore
*/
class Migration_Command extends WP_CLI_Command {
/**
* Number of actions migrated.
*
* @var int
*/
private $total_processed = 0;
/**
* Register the command with WP-CLI
*/
public function register() {
if ( ! defined( 'WP_CLI' ) || ! WP_CLI ) {
return;
}
WP_CLI::add_command(
'action-scheduler migrate',
array( $this, 'migrate' ),
array(
'shortdesc' => 'Migrates actions to the DB tables store',
'synopsis' => array(
array(
'type' => 'assoc',
'name' => 'batch-size',
'optional' => true,
'default' => 100,
'description' => 'The number of actions to process in each batch',
),
array(
'type' => 'assoc',
'name' => 'free-memory-on',
'optional' => true,
'default' => 50,
'description' => 'The number of actions to process between freeing memory. 0 disables freeing memory',
),
array(
'type' => 'assoc',
'name' => 'pause',
'optional' => true,
'default' => 0,
'description' => 'The number of seconds to pause when freeing memory',
),
array(
'type' => 'flag',
'name' => 'dry-run',
'optional' => true,
'description' => 'Reports on the actions that would have been migrated, but does not change any data',
),
),
)
);
}
/**
* Process the data migration.
*
* @param array $positional_args Required for WP CLI. Not used in migration.
* @param array $assoc_args Optional arguments.
*
* @return void
*/
public function migrate( $positional_args, $assoc_args ) {
$this->init_logging();
$config = $this->get_migration_config( $assoc_args );
$runner = new Runner( $config );
$runner->init_destination();
$batch_size = isset( $assoc_args['batch-size'] ) ? (int) $assoc_args['batch-size'] : 100;
$free_on = isset( $assoc_args['free-memory-on'] ) ? (int) $assoc_args['free-memory-on'] : 50;
$sleep = isset( $assoc_args['pause'] ) ? (int) $assoc_args['pause'] : 0;
\ActionScheduler_DataController::set_free_ticks( $free_on );
\ActionScheduler_DataController::set_sleep_time( $sleep );
do {
$actions_processed = $runner->run( $batch_size );
$this->total_processed += $actions_processed;
} while ( $actions_processed > 0 );
if ( ! $config->get_dry_run() ) {
// let the scheduler know that there's nothing left to do.
$scheduler = new Scheduler();
$scheduler->mark_complete();
}
WP_CLI::success( sprintf( '%s complete. %d actions processed.', $config->get_dry_run() ? 'Dry run' : 'Migration', $this->total_processed ) );
}
/**
* Build the config object used to create the Runner
*
* @param array $args Optional arguments.
*
* @return ActionScheduler\Migration\Config
*/
private function get_migration_config( $args ) {
$args = wp_parse_args(
$args,
array(
'dry-run' => false,
)
);
$config = Controller::instance()->get_migration_config_object();
$config->set_dry_run( ! empty( $args['dry-run'] ) );
return $config;
}
/**
* Hook command line logging into migration actions.
*/
private function init_logging() {
add_action(
'action_scheduler/migrate_action_dry_run',
function ( $action_id ) {
WP_CLI::debug( sprintf( 'Dry-run: migrated action %d', $action_id ) );
}
);
add_action(
'action_scheduler/no_action_to_migrate',
function ( $action_id ) {
WP_CLI::debug( sprintf( 'No action found to migrate for ID %d', $action_id ) );
}
);
add_action(
'action_scheduler/migrate_action_failed',
function ( $action_id ) {
WP_CLI::warning( sprintf( 'Failed migrating action with ID %d', $action_id ) );
}
);
add_action(
'action_scheduler/migrate_action_incomplete',
function ( $source_id, $destination_id ) {
WP_CLI::warning( sprintf( 'Unable to remove source action with ID %d after migrating to new ID %d', $source_id, $destination_id ) );
},
10,
2
);
add_action(
'action_scheduler/migrated_action',
function ( $source_id, $destination_id ) {
WP_CLI::debug( sprintf( 'Migrated source action with ID %d to new store with ID %d', $source_id, $destination_id ) );
},
10,
2
);
add_action(
'action_scheduler/migration_batch_starting',
function ( $batch ) {
WP_CLI::debug( 'Beginning migration of batch: ' . print_r( $batch, true ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r
}
);
add_action(
'action_scheduler/migration_batch_complete',
function ( $batch ) {
WP_CLI::log( sprintf( 'Completed migration of %d actions', count( $batch ) ) );
}
);
}
}
woocommerce/action-scheduler/classes/WP_CLI/ProgressBar.php 0000644 00000005316 15153553404 0017742 0 ustar 00 <?php
namespace Action_Scheduler\WP_CLI;
/**
* WP_CLI progress bar for Action Scheduler.
*/
/**
* Class ProgressBar
*
* @package Action_Scheduler\WP_CLI
*
* @since 3.0.0
*
* @codeCoverageIgnore
*/
class ProgressBar {
/**
* Current number of ticks.
*
* @var integer
*/
protected $total_ticks;
/**
* Total number of ticks.
*
* @var integer
*/
protected $count;
/**
* Progress bar update interval.
*
* @var integer
*/
protected $interval;
/**
* Progress bar message.
*
* @var string
*/
protected $message;
/**
* Instance.
*
* @var \cli\progress\Bar
*/
protected $progress_bar;
/**
* ProgressBar constructor.
*
* @param string $message Text to display before the progress bar.
* @param integer $count Total number of ticks to be performed.
* @param integer $interval Optional. The interval in milliseconds between updates. Default 100.
*
* @throws \Exception When this is not run within WP CLI.
*/
public function __construct( $message, $count, $interval = 100 ) {
if ( ! ( defined( 'WP_CLI' ) && WP_CLI ) ) {
/* translators: %s php class name */
throw new \Exception( sprintf( __( 'The %s class can only be run within WP CLI.', 'action-scheduler' ), __CLASS__ ) );
}
$this->total_ticks = 0;
$this->message = $message;
$this->count = $count;
$this->interval = $interval;
}
/**
* Increment the progress bar ticks.
*/
public function tick() {
if ( null === $this->progress_bar ) {
$this->setup_progress_bar();
}
$this->progress_bar->tick();
$this->total_ticks++;
do_action( 'action_scheduler/progress_tick', $this->total_ticks ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}
/**
* Get the progress bar tick count.
*
* @return int
*/
public function current() {
return $this->progress_bar ? $this->progress_bar->current() : 0;
}
/**
* Finish the current progress bar.
*/
public function finish() {
if ( null !== $this->progress_bar ) {
$this->progress_bar->finish();
}
$this->progress_bar = null;
}
/**
* Set the message used when creating the progress bar.
*
* @param string $message The message to be used when the next progress bar is created.
*/
public function set_message( $message ) {
$this->message = $message;
}
/**
* Set the count for a new progress bar.
*
* @param integer $count The total number of ticks expected to complete.
*/
public function set_count( $count ) {
$this->count = $count;
$this->finish();
}
/**
* Set up the progress bar.
*/
protected function setup_progress_bar() {
$this->progress_bar = \WP_CLI\Utils\make_progress_bar(
$this->message,
$this->count,
$this->interval
);
}
}
woocommerce/action-scheduler/classes/WP_CLI/System_Command.php 0000644 00000016135 15153553404 0020434 0 ustar 00 <?php
namespace Action_Scheduler\WP_CLI;
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaping output is not necessary in WP CLI.
use ActionScheduler_SystemInformation;
use WP_CLI;
use function \WP_CLI\Utils\get_flag_value;
/**
* System info WP-CLI commands for Action Scheduler.
*/
class System_Command {
/**
* Data store for querying actions
*
* @var ActionScheduler_Store
*/
protected $store;
/**
* Construct.
*/
public function __construct() {
$this->store = \ActionScheduler::store();
}
/**
* Print in-use data store class.
*
* @param array $args Positional args.
* @param array $assoc_args Keyed args.
* @return void
*
* @subcommand data-store
*/
public function datastore( array $args, array $assoc_args ) {
echo $this->get_current_datastore();
}
/**
* Print in-use runner class.
*
* @param array $args Positional args.
* @param array $assoc_args Keyed args.
* @return void
*/
public function runner( array $args, array $assoc_args ) {
echo $this->get_current_runner();
}
/**
* Get system status.
*
* @param array $args Positional args.
* @param array $assoc_args Keyed args.
* @return void
*/
public function status( array $args, array $assoc_args ) {
/**
* Get runner status.
*
* @link https://github.com/woocommerce/action-scheduler-disable-default-runner
*/
$runner_enabled = has_action( 'action_scheduler_run_queue', array( \ActionScheduler::runner(), 'run' ) );
\WP_CLI::line( sprintf( 'Data store: %s', $this->get_current_datastore() ) );
\WP_CLI::line( sprintf( 'Runner: %s%s', $this->get_current_runner(), ( $runner_enabled ? '' : ' (disabled)' ) ) );
\WP_CLI::line( sprintf( 'Version: %s', $this->get_latest_version() ) );
$rows = array();
$action_counts = $this->store->action_counts();
$oldest_and_newest = $this->get_oldest_and_newest( array_keys( $action_counts ) );
foreach ( $action_counts as $status => $count ) {
$rows[] = array(
'status' => $status,
'count' => $count,
'oldest' => $oldest_and_newest[ $status ]['oldest'],
'newest' => $oldest_and_newest[ $status ]['newest'],
);
}
$formatter = new \WP_CLI\Formatter( $assoc_args, array( 'status', 'count', 'oldest', 'newest' ) );
$formatter->display_items( $rows );
}
/**
* Display the active version, or all registered versions.
*
* ## OPTIONS
*
* [--all]
* : List all registered versions.
*
* @param array $args Positional args.
* @param array $assoc_args Keyed args.
* @return void
*/
public function version( array $args, array $assoc_args ) {
$all = (bool) get_flag_value( $assoc_args, 'all' );
$latest = $this->get_latest_version();
if ( ! $all ) {
echo $latest;
\WP_CLI::halt( 0 );
}
$instance = \ActionScheduler_Versions::instance();
$versions = $instance->get_versions();
$rows = array();
foreach ( $versions as $version => $callback ) {
$active = $version === $latest;
$rows[ $version ] = array(
'version' => $version,
'callback' => $callback,
'active' => $active ? 'yes' : 'no',
);
}
uksort( $rows, 'version_compare' );
$formatter = new \WP_CLI\Formatter( $assoc_args, array( 'version', 'callback', 'active' ) );
$formatter->display_items( $rows );
}
/**
* Display the current source, or all registered sources.
*
* ## OPTIONS
*
* [--all]
* : List all registered sources.
*
* [--fullpath]
* : List full path of source(s).
*
* @param array $args Positional args.
* @param array $assoc_args Keyed args.
* @uses ActionScheduler_SystemInformation::active_source_path()
* @uses \WP_CLI\Formatter::display_items()
* @uses $this->get_latest_version()
* @return void
*/
public function source( array $args, array $assoc_args ) {
$all = (bool) get_flag_value( $assoc_args, 'all' );
$fullpath = (bool) get_flag_value( $assoc_args, 'fullpath' );
$source = ActionScheduler_SystemInformation::active_source_path();
$path = $source;
if ( ! $fullpath ) {
$path = str_replace( ABSPATH, '', $path );
}
if ( ! $all ) {
echo $path;
\WP_CLI::halt( 0 );
}
$sources = ActionScheduler_SystemInformation::get_sources();
if ( empty( $sources ) ) {
WP_CLI::log( __( 'Detailed information about registered sources is not currently available.', 'action-scheduler' ) );
return;
}
$rows = array();
foreach ( $sources as $check_source => $version ) {
$active = dirname( $check_source ) === $source;
$path = $check_source;
if ( ! $fullpath ) {
$path = str_replace( ABSPATH, '', $path );
}
$rows[ $check_source ] = array(
'source' => $path,
'version' => $version,
'active' => $active ? 'yes' : 'no',
);
}
ksort( $rows );
\WP_CLI::log( PHP_EOL . 'Please note there can only be one unique registered instance of Action Scheduler per ' . PHP_EOL . 'version number, so this list may not include all the currently present copies of ' . PHP_EOL . 'Action Scheduler.' . PHP_EOL );
$formatter = new \WP_CLI\Formatter( $assoc_args, array( 'source', 'version', 'active' ) );
$formatter->display_items( $rows );
}
/**
* Get current data store.
*
* @return string
*/
protected function get_current_datastore() {
return get_class( $this->store );
}
/**
* Get latest version.
*
* @param null|\ActionScheduler_Versions $instance Versions.
* @return string
*/
protected function get_latest_version( $instance = null ) {
if ( is_null( $instance ) ) {
$instance = \ActionScheduler_Versions::instance();
}
return $instance->latest_version();
}
/**
* Get current runner.
*
* @return string
*/
protected function get_current_runner() {
return get_class( \ActionScheduler::runner() );
}
/**
* Get oldest and newest scheduled dates for a given set of statuses.
*
* @param array $status_keys Set of statuses to find oldest & newest action for.
* @return array
*/
protected function get_oldest_and_newest( $status_keys ) {
$oldest_and_newest = array();
foreach ( $status_keys as $status ) {
$oldest_and_newest[ $status ] = array(
'oldest' => '–',
'newest' => '–',
);
if ( 'in-progress' === $status ) {
continue;
}
$oldest_and_newest[ $status ]['oldest'] = $this->get_action_status_date( $status, 'oldest' );
$oldest_and_newest[ $status ]['newest'] = $this->get_action_status_date( $status, 'newest' );
}
return $oldest_and_newest;
}
/**
* Get oldest or newest scheduled date for a given status.
*
* @param string $status Action status label/name string.
* @param string $date_type Oldest or Newest.
* @return string
*/
protected function get_action_status_date( $status, $date_type = 'oldest' ) {
$order = 'oldest' === $date_type ? 'ASC' : 'DESC';
$args = array(
'claimed' => false,
'status' => $status,
'per_page' => 1,
'order' => $order,
);
$action = $this->store->query_actions( $args );
if ( ! empty( $action ) ) {
$date_object = $this->store->get_date( $action[0] );
$action_date = $date_object->format( 'Y-m-d H:i:s O' );
} else {
$action_date = '–';
}
return $action_date;
}
}
woocommerce/action-scheduler/classes/abstracts/ActionScheduler.php 0000644 00000025610 15153553404 0021535 0 ustar 00 <?php
use Action_Scheduler\WP_CLI\Migration_Command;
use Action_Scheduler\Migration\Controller;
/**
* Class ActionScheduler
*
* @codeCoverageIgnore
*/
abstract class ActionScheduler {
/**
* Plugin file path.
*
* @var string
*/
private static $plugin_file = '';
/**
* ActionScheduler_ActionFactory instance.
*
* @var ActionScheduler_ActionFactory
*/
private static $factory = null;
/**
* Data store is initialized.
*
* @var bool
*/
private static $data_store_initialized = false;
/**
* Factory.
*/
public static function factory() {
if ( ! isset( self::$factory ) ) {
self::$factory = new ActionScheduler_ActionFactory();
}
return self::$factory;
}
/**
* Get Store instance.
*/
public static function store() {
return ActionScheduler_Store::instance();
}
/**
* Get Lock instance.
*/
public static function lock() {
return ActionScheduler_Lock::instance();
}
/**
* Get Logger instance.
*/
public static function logger() {
return ActionScheduler_Logger::instance();
}
/**
* Get QueueRunner instance.
*/
public static function runner() {
return ActionScheduler_QueueRunner::instance();
}
/**
* Get AdminView instance.
*/
public static function admin_view() {
return ActionScheduler_AdminView::instance();
}
/**
* Get the absolute system path to the plugin directory, or a file therein
*
* @static
* @param string $path Path relative to plugin directory.
* @return string
*/
public static function plugin_path( $path ) {
$base = dirname( self::$plugin_file );
if ( $path ) {
return trailingslashit( $base ) . $path;
} else {
return untrailingslashit( $base );
}
}
/**
* Get the absolute URL to the plugin directory, or a file therein
*
* @static
* @param string $path Path relative to plugin directory.
* @return string
*/
public static function plugin_url( $path ) {
return plugins_url( $path, self::$plugin_file );
}
/**
* Autoload.
*
* @param string $class Class name.
*/
public static function autoload( $class ) {
$d = DIRECTORY_SEPARATOR;
$classes_dir = self::plugin_path( 'classes' . $d );
$separator = strrpos( $class, '\\' );
if ( false !== $separator ) {
if ( 0 !== strpos( $class, 'Action_Scheduler' ) ) {
return;
}
$class = substr( $class, $separator + 1 );
}
if ( 'Deprecated' === substr( $class, -10 ) ) {
$dir = self::plugin_path( 'deprecated' . $d );
} elseif ( self::is_class_abstract( $class ) ) {
$dir = $classes_dir . 'abstracts' . $d;
} elseif ( self::is_class_migration( $class ) ) {
$dir = $classes_dir . 'migration' . $d;
} elseif ( 'Schedule' === substr( $class, -8 ) ) {
$dir = $classes_dir . 'schedules' . $d;
} elseif ( 'Action' === substr( $class, -6 ) ) {
$dir = $classes_dir . 'actions' . $d;
} elseif ( 'Schema' === substr( $class, -6 ) ) {
$dir = $classes_dir . 'schema' . $d;
} elseif ( strpos( $class, 'ActionScheduler' ) === 0 ) {
$segments = explode( '_', $class );
$type = isset( $segments[1] ) ? $segments[1] : '';
switch ( $type ) {
case 'WPCLI':
$dir = $classes_dir . 'WP_CLI' . $d;
break;
case 'DBLogger':
case 'DBStore':
case 'HybridStore':
case 'wpPostStore':
case 'wpCommentLogger':
$dir = $classes_dir . 'data-stores' . $d;
break;
default:
$dir = $classes_dir;
break;
}
} elseif ( self::is_class_cli( $class ) ) {
$dir = $classes_dir . 'WP_CLI' . $d;
} elseif ( strpos( $class, 'CronExpression' ) === 0 ) {
$dir = self::plugin_path( 'lib' . $d . 'cron-expression' . $d );
} elseif ( strpos( $class, 'WP_Async_Request' ) === 0 ) {
$dir = self::plugin_path( 'lib' . $d );
} else {
return;
}
if ( file_exists( $dir . "{$class}.php" ) ) {
include $dir . "{$class}.php";
return;
}
}
/**
* Initialize the plugin
*
* @static
* @param string $plugin_file Plugin file path.
*/
public static function init( $plugin_file ) {
self::$plugin_file = $plugin_file;
spl_autoload_register( array( __CLASS__, 'autoload' ) );
/**
* Fires in the early stages of Action Scheduler init hook.
*/
do_action( 'action_scheduler_pre_init' );
require_once self::plugin_path( 'functions.php' );
ActionScheduler_DataController::init();
$store = self::store();
$logger = self::logger();
$runner = self::runner();
$admin_view = self::admin_view();
// Ensure initialization on plugin activation.
if ( ! did_action( 'init' ) ) {
// phpcs:ignore Squiz.PHP.CommentedOutCode
add_action( 'init', array( $admin_view, 'init' ), 0, 0 ); // run before $store::init().
add_action( 'init', array( $store, 'init' ), 1, 0 );
add_action( 'init', array( $logger, 'init' ), 1, 0 );
add_action( 'init', array( $runner, 'init' ), 1, 0 );
add_action(
'init',
/**
* Runs after the active store's init() method has been called.
*
* It would probably be preferable to have $store->init() (or it's parent method) set this itself,
* once it has initialized, however that would cause problems in cases where a custom data store is in
* use and it has not yet been updated to follow that same logic.
*/
function () {
self::$data_store_initialized = true;
/**
* Fires when Action Scheduler is ready: it is safe to use the procedural API after this point.
*
* @since 3.5.5
*/
do_action( 'action_scheduler_init' );
},
1
);
} else {
$admin_view->init();
$store->init();
$logger->init();
$runner->init();
self::$data_store_initialized = true;
/**
* Fires when Action Scheduler is ready: it is safe to use the procedural API after this point.
*
* @since 3.5.5
*/
do_action( 'action_scheduler_init' );
}
if ( apply_filters( 'action_scheduler_load_deprecated_functions', true ) ) {
require_once self::plugin_path( 'deprecated/functions.php' );
}
if ( defined( 'WP_CLI' ) && WP_CLI ) {
WP_CLI::add_command( 'action-scheduler', 'ActionScheduler_WPCLI_Scheduler_command' );
WP_CLI::add_command( 'action-scheduler', 'ActionScheduler_WPCLI_Clean_Command' );
WP_CLI::add_command( 'action-scheduler action', '\Action_Scheduler\WP_CLI\Action_Command' );
WP_CLI::add_command( 'action-scheduler', '\Action_Scheduler\WP_CLI\System_Command' );
if ( ! ActionScheduler_DataController::is_migration_complete() && Controller::instance()->allow_migration() ) {
$command = new Migration_Command();
$command->register();
}
}
/**
* Handle WP comment cleanup after migration.
*/
if ( is_a( $logger, 'ActionScheduler_DBLogger' ) && ActionScheduler_DataController::is_migration_complete() && ActionScheduler_WPCommentCleaner::has_logs() ) {
ActionScheduler_WPCommentCleaner::init();
}
add_action( 'action_scheduler/migration_complete', 'ActionScheduler_WPCommentCleaner::maybe_schedule_cleanup' );
}
/**
* Check whether the AS data store has been initialized.
*
* @param string $function_name The name of the function being called. Optional. Default `null`.
* @return bool
*/
public static function is_initialized( $function_name = null ) {
if ( ! self::$data_store_initialized && ! empty( $function_name ) ) {
$message = sprintf(
/* translators: %s function name. */
__( '%s() was called before the Action Scheduler data store was initialized', 'action-scheduler' ),
esc_attr( $function_name )
);
_doing_it_wrong( esc_html( $function_name ), esc_html( $message ), '3.1.6' );
}
return self::$data_store_initialized;
}
/**
* Determine if the class is one of our abstract classes.
*
* @since 3.0.0
*
* @param string $class The class name.
*
* @return bool
*/
protected static function is_class_abstract( $class ) {
static $abstracts = array(
'ActionScheduler' => true,
'ActionScheduler_Abstract_ListTable' => true,
'ActionScheduler_Abstract_QueueRunner' => true,
'ActionScheduler_Abstract_Schedule' => true,
'ActionScheduler_Abstract_RecurringSchedule' => true,
'ActionScheduler_Lock' => true,
'ActionScheduler_Logger' => true,
'ActionScheduler_Abstract_Schema' => true,
'ActionScheduler_Store' => true,
'ActionScheduler_TimezoneHelper' => true,
'ActionScheduler_WPCLI_Command' => true,
);
return isset( $abstracts[ $class ] ) && $abstracts[ $class ];
}
/**
* Determine if the class is one of our migration classes.
*
* @since 3.0.0
*
* @param string $class The class name.
*
* @return bool
*/
protected static function is_class_migration( $class ) {
static $migration_segments = array(
'ActionMigrator' => true,
'BatchFetcher' => true,
'DBStoreMigrator' => true,
'DryRun' => true,
'LogMigrator' => true,
'Config' => true,
'Controller' => true,
'Runner' => true,
'Scheduler' => true,
);
$segments = explode( '_', $class );
$segment = isset( $segments[1] ) ? $segments[1] : $class;
return isset( $migration_segments[ $segment ] ) && $migration_segments[ $segment ];
}
/**
* Determine if the class is one of our WP CLI classes.
*
* @since 3.0.0
*
* @param string $class The class name.
*
* @return bool
*/
protected static function is_class_cli( $class ) {
static $cli_segments = array(
'QueueRunner' => true,
'Command' => true,
'ProgressBar' => true,
'\Action_Scheduler\WP_CLI\Action_Command' => true,
'\Action_Scheduler\WP_CLI\System_Command' => true,
);
$segments = explode( '_', $class );
$segment = isset( $segments[1] ) ? $segments[1] : $class;
return isset( $cli_segments[ $segment ] ) && $cli_segments[ $segment ];
}
/**
* Clone.
*/
final public function __clone() {
trigger_error( 'Singleton. No cloning allowed!', E_USER_ERROR ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error
}
/**
* Wakeup.
*/
final public function __wakeup() {
trigger_error( 'Singleton. No serialization allowed!', E_USER_ERROR ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error
}
/**
* Construct.
*/
final private function __construct() {}
/** Deprecated **/
/**
* Get DateTime object.
*
* @param null|string $when Date/time string.
* @param string $timezone Timezone string.
*/
public static function get_datetime_object( $when = null, $timezone = 'UTC' ) {
_deprecated_function( __METHOD__, '2.0', 'wcs_add_months()' );
return as_get_datetime_object( $when, $timezone );
}
/**
* Issue deprecated warning if an Action Scheduler function is called in the shutdown hook.
*
* @param string $function_name The name of the function being called.
* @deprecated 3.1.6.
*/
public static function check_shutdown_hook( $function_name ) {
_deprecated_function( __FUNCTION__, '3.1.6' );
}
}
woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php 0000644 00000061057 15153553404 0025330 0 ustar 00 <?php
if ( ! class_exists( 'WP_List_Table' ) ) {
require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
}
/**
* Action Scheduler Abstract List Table class
*
* This abstract class enhances WP_List_Table making it ready to use.
*
* By extending this class we can focus on describing how our table looks like,
* which columns needs to be shown, filter, ordered by and more and forget about the details.
*
* This class supports:
* - Bulk actions
* - Search
* - Sortable columns
* - Automatic translations of the columns
*
* @codeCoverageIgnore
* @since 2.0.0
*/
abstract class ActionScheduler_Abstract_ListTable extends WP_List_Table {
/**
* The table name
*
* @var string
*/
protected $table_name;
/**
* Package name, used to get options from WP_List_Table::get_items_per_page.
*
* @var string
*/
protected $package;
/**
* How many items do we render per page?
*
* @var int
*/
protected $items_per_page = 10;
/**
* Enables search in this table listing. If this array
* is empty it means the listing is not searchable.
*
* @var array
*/
protected $search_by = array();
/**
* Columns to show in the table listing. It is a key => value pair. The
* key must much the table column name and the value is the label, which is
* automatically translated.
*
* @var array
*/
protected $columns = array();
/**
* Defines the row-actions. It expects an array where the key
* is the column name and the value is an array of actions.
*
* The array of actions are key => value, where key is the method name
* (with the prefix row_action_<key>) and the value is the label
* and title.
*
* @var array
*/
protected $row_actions = array();
/**
* The Primary key of our table
*
* @var string
*/
protected $ID = 'ID';
/**
* Enables sorting, it expects an array
* of columns (the column names are the values)
*
* @var array
*/
protected $sort_by = array();
/**
* The default sort order
*
* @var string
*/
protected $filter_by = array();
/**
* The status name => count combinations for this table's items. Used to display status filters.
*
* @var array
*/
protected $status_counts = array();
/**
* Notices to display when loading the table. Array of arrays of form array( 'class' => {updated|error}, 'message' => 'This is the notice text display.' ).
*
* @var array
*/
protected $admin_notices = array();
/**
* Localised string displayed in the <h1> element above the able.
*
* @var string
*/
protected $table_header;
/**
* Enables bulk actions. It must be an array where the key is the action name
* and the value is the label (which is translated automatically). It is important
* to notice that it will check that the method exists (`bulk_$name`) and will throw
* an exception if it does not exists.
*
* This class will automatically check if the current request has a bulk action, will do the
* validations and afterwards will execute the bulk method, with two arguments. The first argument
* is the array with primary keys, the second argument is a string with a list of the primary keys,
* escaped and ready to use (with `IN`).
*
* @var array
*/
protected $bulk_actions = array();
/**
* Makes translation easier, it basically just wraps
* `_x` with some default (the package name).
*
* @param string $text The new text to translate.
* @param string $context The context of the text.
* @return string|void The translated text.
*
* @deprecated 3.0.0 Use `_x()` instead.
*/
protected function translate( $text, $context = '' ) {
return $text;
}
/**
* Reads `$this->bulk_actions` and returns an array that WP_List_Table understands. It
* also validates that the bulk method handler exists. It throws an exception because
* this is a library meant for developers and missing a bulk method is a development-time error.
*
* @return array
*
* @throws RuntimeException Throws RuntimeException when the bulk action does not have a callback method.
*/
protected function get_bulk_actions() {
$actions = array();
foreach ( $this->bulk_actions as $action => $label ) {
if ( ! is_callable( array( $this, 'bulk_' . $action ) ) ) {
throw new RuntimeException( "The bulk action $action does not have a callback method" );
}
$actions[ $action ] = $label;
}
return $actions;
}
/**
* Checks if the current request has a bulk action. If that is the case it will validate and will
* execute the bulk method handler. Regardless if the action is valid or not it will redirect to
* the previous page removing the current arguments that makes this request a bulk action.
*/
protected function process_bulk_action() {
global $wpdb;
// Detect when a bulk action is being triggered.
$action = $this->current_action();
if ( ! $action ) {
return;
}
check_admin_referer( 'bulk-' . $this->_args['plural'] );
$method = 'bulk_' . $action;
if ( array_key_exists( $action, $this->bulk_actions ) && is_callable( array( $this, $method ) ) && ! empty( $_GET['ID'] ) && is_array( $_GET['ID'] ) ) {
$ids_sql = '(' . implode( ',', array_fill( 0, count( $_GET['ID'] ), '%s' ) ) . ')';
$id = array_map( 'absint', $_GET['ID'] );
$this->$method( $id, $wpdb->prepare( $ids_sql, $id ) ); //phpcs:ignore WordPress.DB.PreparedSQL
}
if ( isset( $_SERVER['REQUEST_URI'] ) ) {
wp_safe_redirect(
remove_query_arg(
array( '_wp_http_referer', '_wpnonce', 'ID', 'action', 'action2' ),
esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) )
)
);
exit;
}
}
/**
* Default code for deleting entries.
* validated already by process_bulk_action()
*
* @param array $ids ids of the items to delete.
* @param string $ids_sql the sql for the ids.
* @return void
*/
protected function bulk_delete( array $ids, $ids_sql ) {
$store = ActionScheduler::store();
foreach ( $ids as $action_id ) {
$store->delete( $action_id );
}
}
/**
* Prepares the _column_headers property which is used by WP_Table_List at rendering.
* It merges the columns and the sortable columns.
*/
protected function prepare_column_headers() {
$this->_column_headers = array(
$this->get_columns(),
get_hidden_columns( $this->screen ),
$this->get_sortable_columns(),
);
}
/**
* Reads $this->sort_by and returns the columns name in a format that WP_Table_List
* expects
*/
public function get_sortable_columns() {
$sort_by = array();
foreach ( $this->sort_by as $column ) {
$sort_by[ $column ] = array( $column, true );
}
return $sort_by;
}
/**
* Returns the columns names for rendering. It adds a checkbox for selecting everything
* as the first column
*/
public function get_columns() {
$columns = array_merge(
array( 'cb' => '<input type="checkbox" />' ),
$this->columns
);
return $columns;
}
/**
* Get prepared LIMIT clause for items query
*
* @global wpdb $wpdb
*
* @return string Prepared LIMIT clause for items query.
*/
protected function get_items_query_limit() {
global $wpdb;
$per_page = $this->get_items_per_page( $this->get_per_page_option_name(), $this->items_per_page );
return $wpdb->prepare( 'LIMIT %d', $per_page );
}
/**
* Returns the number of items to offset/skip for this current view.
*
* @return int
*/
protected function get_items_offset() {
$per_page = $this->get_items_per_page( $this->get_per_page_option_name(), $this->items_per_page );
$current_page = $this->get_pagenum();
if ( 1 < $current_page ) {
$offset = $per_page * ( $current_page - 1 );
} else {
$offset = 0;
}
return $offset;
}
/**
* Get prepared OFFSET clause for items query
*
* @global wpdb $wpdb
*
* @return string Prepared OFFSET clause for items query.
*/
protected function get_items_query_offset() {
global $wpdb;
return $wpdb->prepare( 'OFFSET %d', $this->get_items_offset() );
}
/**
* Prepares the ORDER BY sql statement. It uses `$this->sort_by` to know which
* columns are sortable. This requests validates the orderby $_GET parameter is a valid
* column and sortable. It will also use order (ASC|DESC) using DESC by default.
*/
protected function get_items_query_order() {
if ( empty( $this->sort_by ) ) {
return '';
}
$orderby = esc_sql( $this->get_request_orderby() );
$order = esc_sql( $this->get_request_order() );
return "ORDER BY {$orderby} {$order}";
}
/**
* Querystring arguments to persist between form submissions.
*
* @since 3.7.3
*
* @return string[]
*/
protected function get_request_query_args_to_persist() {
return array_merge(
$this->sort_by,
array(
'page',
'status',
'tab',
)
);
}
/**
* Return the sortable column specified for this request to order the results by, if any.
*
* @return string
*/
protected function get_request_orderby() {
$valid_sortable_columns = array_values( $this->sort_by );
if ( ! empty( $_GET['orderby'] ) && in_array( $_GET['orderby'], $valid_sortable_columns, true ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
$orderby = sanitize_text_field( wp_unslash( $_GET['orderby'] ) ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended
} else {
$orderby = $valid_sortable_columns[0];
}
return $orderby;
}
/**
* Return the sortable column order specified for this request.
*
* @return string
*/
protected function get_request_order() {
if ( ! empty( $_GET['order'] ) && 'desc' === strtolower( sanitize_text_field( wp_unslash( $_GET['order'] ) ) ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
$order = 'DESC';
} else {
$order = 'ASC';
}
return $order;
}
/**
* Return the status filter for this request, if any.
*
* @return string
*/
protected function get_request_status() {
$status = ( ! empty( $_GET['status'] ) ) ? sanitize_text_field( wp_unslash( $_GET['status'] ) ) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended
return $status;
}
/**
* Return the search filter for this request, if any.
*
* @return string
*/
protected function get_request_search_query() {
$search_query = ( ! empty( $_GET['s'] ) ) ? sanitize_text_field( wp_unslash( $_GET['s'] ) ) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended
return $search_query;
}
/**
* Process and return the columns name. This is meant for using with SQL, this means it
* always includes the primary key.
*
* @return array
*/
protected function get_table_columns() {
$columns = array_keys( $this->columns );
if ( ! in_array( $this->ID, $columns, true ) ) {
$columns[] = $this->ID;
}
return $columns;
}
/**
* Check if the current request is doing a "full text" search. If that is the case
* prepares the SQL to search texts using LIKE.
*
* If the current request does not have any search or if this list table does not support
* that feature it will return an empty string.
*
* @return string
*/
protected function get_items_query_search() {
global $wpdb;
if ( empty( $_GET['s'] ) || empty( $this->search_by ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
return '';
}
$search_string = sanitize_text_field( wp_unslash( $_GET['s'] ) ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended
$filter = array();
foreach ( $this->search_by as $column ) {
$wild = '%';
$sql_like = $wild . $wpdb->esc_like( $search_string ) . $wild;
$filter[] = $wpdb->prepare( '`' . $column . '` LIKE %s', $sql_like ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.DB.PreparedSQL.NotPrepared
}
return implode( ' OR ', $filter );
}
/**
* Prepares the SQL to filter rows by the options defined at `$this->filter_by`. Before trusting
* any data sent by the user it validates that it is a valid option.
*/
protected function get_items_query_filters() {
global $wpdb;
if ( ! $this->filter_by || empty( $_GET['filter_by'] ) || ! is_array( $_GET['filter_by'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
return '';
}
$filter = array();
foreach ( $this->filter_by as $column => $options ) {
if ( empty( $_GET['filter_by'][ $column ] ) || empty( $options[ $_GET['filter_by'][ $column ] ] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
continue;
}
$filter[] = $wpdb->prepare( "`$column` = %s", sanitize_text_field( wp_unslash( $_GET['filter_by'][ $column ] ) ) ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
}
return implode( ' AND ', $filter );
}
/**
* Prepares the data to feed WP_Table_List.
*
* This has the core for selecting, sorting and filtering data. To keep the code simple
* its logic is split among many methods (get_items_query_*).
*
* Beside populating the items this function will also count all the records that matches
* the filtering criteria and will do fill the pagination variables.
*/
public function prepare_items() {
global $wpdb;
$this->process_bulk_action();
$this->process_row_actions();
if ( ! empty( $_REQUEST['_wp_http_referer'] && ! empty( $_SERVER['REQUEST_URI'] ) ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
// _wp_http_referer is used only on bulk actions, we remove it to keep the $_GET shorter
wp_safe_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) );
exit;
}
$this->prepare_column_headers();
$limit = $this->get_items_query_limit();
$offset = $this->get_items_query_offset();
$order = $this->get_items_query_order();
$where = array_filter(
array(
$this->get_items_query_search(),
$this->get_items_query_filters(),
)
);
$columns = '`' . implode( '`, `', $this->get_table_columns() ) . '`';
if ( ! empty( $where ) ) {
$where = 'WHERE (' . implode( ') AND (', $where ) . ')';
} else {
$where = '';
}
$sql = "SELECT $columns FROM {$this->table_name} {$where} {$order} {$limit} {$offset}";
$this->set_items( $wpdb->get_results( $sql, ARRAY_A ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
$query_count = "SELECT COUNT({$this->ID}) FROM {$this->table_name} {$where}";
$total_items = $wpdb->get_var( $query_count ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
$per_page = $this->get_items_per_page( $this->get_per_page_option_name(), $this->items_per_page );
$this->set_pagination_args(
array(
'total_items' => $total_items,
'per_page' => $per_page,
'total_pages' => ceil( $total_items / $per_page ),
)
);
}
/**
* Display the table.
*
* @param string $which The name of the table.
*/
public function extra_tablenav( $which ) {
if ( ! $this->filter_by || 'top' !== $which ) {
return;
}
echo '<div class="alignleft actions">';
foreach ( $this->filter_by as $id => $options ) {
$default = ! empty( $_GET['filter_by'][ $id ] ) ? sanitize_text_field( wp_unslash( $_GET['filter_by'][ $id ] ) ) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( empty( $options[ $default ] ) ) {
$default = '';
}
echo '<select name="filter_by[' . esc_attr( $id ) . ']" class="first" id="filter-by-' . esc_attr( $id ) . '">';
foreach ( $options as $value => $label ) {
echo '<option value="' . esc_attr( $value ) . '" ' . esc_html( $value === $default ? 'selected' : '' ) . '>'
. esc_html( $label )
. '</option>';
}
echo '</select>';
}
submit_button( esc_html__( 'Filter', 'action-scheduler' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
echo '</div>';
}
/**
* Set the data for displaying. It will attempt to unserialize (There is a chance that some columns
* are serialized). This can be override in child classes for further data transformation.
*
* @param array $items Items array.
*/
protected function set_items( array $items ) {
$this->items = array();
foreach ( $items as $item ) {
$this->items[ $item[ $this->ID ] ] = array_map( 'maybe_unserialize', $item );
}
}
/**
* Renders the checkbox for each row, this is the first column and it is named ID regardless
* of how the primary key is named (to keep the code simpler). The bulk actions will do the proper
* name transformation though using `$this->ID`.
*
* @param array $row The row to render.
*/
public function column_cb( $row ) {
return '<input name="ID[]" type="checkbox" value="' . esc_attr( $row[ $this->ID ] ) . '" />';
}
/**
* Renders the row-actions.
*
* This method renders the action menu, it reads the definition from the $row_actions property,
* and it checks that the row action method exists before rendering it.
*
* @param array $row Row to be rendered.
* @param string $column_name Column name.
* @return string
*/
protected function maybe_render_actions( $row, $column_name ) {
if ( empty( $this->row_actions[ $column_name ] ) ) {
return;
}
$row_id = $row[ $this->ID ];
$actions = '<div class="row-actions">';
$action_count = 0;
foreach ( $this->row_actions[ $column_name ] as $action_key => $action ) {
$action_count++;
if ( ! method_exists( $this, 'row_action_' . $action_key ) ) {
continue;
}
$action_link = ! empty( $action['link'] ) ? $action['link'] : add_query_arg(
array(
'row_action' => $action_key,
'row_id' => $row_id,
'nonce' => wp_create_nonce( $action_key . '::' . $row_id ),
)
);
$span_class = ! empty( $action['class'] ) ? $action['class'] : $action_key;
$separator = ( $action_count < count( $this->row_actions[ $column_name ] ) ) ? ' | ' : '';
$actions .= sprintf( '<span class="%s">', esc_attr( $span_class ) );
$actions .= sprintf( '<a href="%1$s" title="%2$s">%3$s</a>', esc_url( $action_link ), esc_attr( $action['desc'] ), esc_html( $action['name'] ) );
$actions .= sprintf( '%s</span>', $separator );
}
$actions .= '</div>';
return $actions;
}
/**
* Process the bulk actions.
*
* @return void
*/
protected function process_row_actions() {
$parameters = array( 'row_action', 'row_id', 'nonce' );
foreach ( $parameters as $parameter ) {
if ( empty( $_REQUEST[ $parameter ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
return;
}
}
$action = sanitize_text_field( wp_unslash( $_REQUEST['row_action'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotValidated
$row_id = sanitize_text_field( wp_unslash( $_REQUEST['row_id'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotValidated
$nonce = sanitize_text_field( wp_unslash( $_REQUEST['nonce'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotValidated
$method = 'row_action_' . $action; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( wp_verify_nonce( $nonce, $action . '::' . $row_id ) && method_exists( $this, $method ) ) {
$this->$method( sanitize_text_field( wp_unslash( $row_id ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
}
if ( isset( $_SERVER['REQUEST_URI'] ) ) {
wp_safe_redirect(
remove_query_arg(
array( 'row_id', 'row_action', 'nonce' ),
esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) )
)
);
exit;
}
}
/**
* Default column formatting, it will escape everything for security.
*
* @param array $item The item array.
* @param string $column_name Column name to display.
*
* @return string
*/
public function column_default( $item, $column_name ) {
$column_html = esc_html( $item[ $column_name ] );
$column_html .= $this->maybe_render_actions( $item, $column_name );
return $column_html;
}
/**
* Display the table heading and search query, if any
*/
protected function display_header() {
echo '<h1 class="wp-heading-inline">' . esc_attr( $this->table_header ) . '</h1>';
if ( $this->get_request_search_query() ) {
/* translators: %s: search query */
echo '<span class="subtitle">' . esc_attr( sprintf( __( 'Search results for "%s"', 'action-scheduler' ), $this->get_request_search_query() ) ) . '</span>';
}
echo '<hr class="wp-header-end">';
}
/**
* Display the table heading and search query, if any
*/
protected function display_admin_notices() {
foreach ( $this->admin_notices as $notice ) {
echo '<div id="message" class="' . esc_attr( $notice['class'] ) . '">';
echo ' <p>' . wp_kses_post( $notice['message'] ) . '</p>';
echo '</div>';
}
}
/**
* Prints the available statuses so the user can click to filter.
*/
protected function display_filter_by_status() {
$status_list_items = array();
$request_status = $this->get_request_status();
// Helper to set 'all' filter when not set on status counts passed in.
if ( ! isset( $this->status_counts['all'] ) ) {
$all_count = array_sum( $this->status_counts );
if ( isset( $this->status_counts['past-due'] ) ) {
$all_count -= $this->status_counts['past-due'];
}
$this->status_counts = array( 'all' => $all_count ) + $this->status_counts;
}
// Translated status labels.
$status_labels = ActionScheduler_Store::instance()->get_status_labels();
$status_labels['all'] = esc_html_x( 'All', 'status labels', 'action-scheduler' );
$status_labels['past-due'] = esc_html_x( 'Past-due', 'status labels', 'action-scheduler' );
foreach ( $this->status_counts as $status_slug => $count ) {
if ( 0 === $count ) {
continue;
}
if ( $status_slug === $request_status || ( empty( $request_status ) && 'all' === $status_slug ) ) {
$status_list_item = '<li class="%1$s"><a href="%2$s" class="current">%3$s</a> (%4$d)</li>';
} else {
$status_list_item = '<li class="%1$s"><a href="%2$s">%3$s</a> (%4$d)</li>';
}
$status_name = isset( $status_labels[ $status_slug ] ) ? $status_labels[ $status_slug ] : ucfirst( $status_slug );
$status_filter_url = ( 'all' === $status_slug ) ? remove_query_arg( 'status' ) : add_query_arg( 'status', $status_slug );
$status_filter_url = remove_query_arg( array( 'paged', 's' ), $status_filter_url );
$status_list_items[] = sprintf( $status_list_item, esc_attr( $status_slug ), esc_url( $status_filter_url ), esc_html( $status_name ), absint( $count ) );
}
if ( $status_list_items ) {
echo '<ul class="subsubsub">';
echo implode( " | \n", $status_list_items ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo '</ul>';
}
}
/**
* Renders the table list, we override the original class to render the table inside a form
* and to render any needed HTML (like the search box). By doing so the callee of a function can simple
* forget about any extra HTML.
*/
protected function display_table() {
echo '<form id="' . esc_attr( $this->_args['plural'] ) . '-filter" method="get">';
foreach ( $this->get_request_query_args_to_persist() as $arg ) {
$arg_value = isset( $_GET[ $arg ] ) ? sanitize_text_field( wp_unslash( $_GET[ $arg ] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( ! $arg_value ) {
continue;
}
echo '<input type="hidden" name="' . esc_attr( $arg ) . '" value="' . esc_attr( $arg_value ) . '" />';
}
if ( ! empty( $this->search_by ) ) {
echo $this->search_box( $this->get_search_box_button_text(), 'plugin' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
parent::display();
echo '</form>';
}
/**
* Process any pending actions.
*/
public function process_actions() {
$this->process_bulk_action();
$this->process_row_actions();
if ( ! empty( $_REQUEST['_wp_http_referer'] ) && ! empty( $_SERVER['REQUEST_URI'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
// _wp_http_referer is used only on bulk actions, we remove it to keep the $_GET shorter
wp_safe_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) );
exit;
}
}
/**
* Render the list table page, including header, notices, status filters and table.
*/
public function display_page() {
$this->prepare_items();
echo '<div class="wrap">';
$this->display_header();
$this->display_admin_notices();
$this->display_filter_by_status();
$this->display_table();
echo '</div>';
}
/**
* Get the text to display in the search box on the list table.
*/
protected function get_search_box_placeholder() {
return esc_html__( 'Search', 'action-scheduler' );
}
/**
* Gets the screen per_page option name.
*
* @return string
*/
protected function get_per_page_option_name() {
return $this->package . '_items_per_page';
}
}
woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php 0000644 00000032710 15153553404 0025715 0 ustar 00 <?php
/**
* Abstract class with common Queue Cleaner functionality.
*/
abstract class ActionScheduler_Abstract_QueueRunner extends ActionScheduler_Abstract_QueueRunner_Deprecated {
/**
* ActionScheduler_QueueCleaner instance.
*
* @var ActionScheduler_QueueCleaner
*/
protected $cleaner;
/**
* ActionScheduler_FatalErrorMonitor instance.
*
* @var ActionScheduler_FatalErrorMonitor
*/
protected $monitor;
/**
* ActionScheduler_Store instance.
*
* @var ActionScheduler_Store
*/
protected $store;
/**
* The created time.
*
* Represents when the queue runner was constructed and used when calculating how long a PHP request has been running.
* For this reason it should be as close as possible to the PHP request start time.
*
* @var int
*/
private $created_time;
/**
* ActionScheduler_Abstract_QueueRunner constructor.
*
* @param ActionScheduler_Store|null $store Store object.
* @param ActionScheduler_FatalErrorMonitor|null $monitor Monitor object.
* @param ActionScheduler_QueueCleaner|null $cleaner Cleaner object.
*/
public function __construct( ?ActionScheduler_Store $store = null, ?ActionScheduler_FatalErrorMonitor $monitor = null, ?ActionScheduler_QueueCleaner $cleaner = null ) {
$this->created_time = microtime( true );
$this->store = $store ? $store : ActionScheduler_Store::instance();
$this->monitor = $monitor ? $monitor : new ActionScheduler_FatalErrorMonitor( $this->store );
$this->cleaner = $cleaner ? $cleaner : new ActionScheduler_QueueCleaner( $this->store );
}
/**
* Process an individual action.
*
* @param int $action_id The action ID to process.
* @param string $context Optional identifier for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron'
* Generally, this should be capitalised and not localised as it's a proper noun.
* @throws \Exception When error running action.
*/
public function process_action( $action_id, $context = '' ) {
// Temporarily override the error handler while we process the current action.
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler
set_error_handler(
/**
* Temporary error handler which can catch errors and convert them into exceptions. This facilitates more
* robust error handling across all supported PHP versions.
*
* @throws Exception
*
* @param int $type Error level expressed as an integer.
* @param string $message Error message.
*/
function ( $type, $message ) {
throw new Exception( $message );
},
E_USER_ERROR | E_RECOVERABLE_ERROR
);
/*
* The nested try/catch structure is required because we potentially need to convert thrown errors into
* exceptions (and an exception thrown from a catch block cannot be caught by a later catch block in the *same*
* structure).
*/
try {
try {
$valid_action = false;
do_action( 'action_scheduler_before_execute', $action_id, $context );
if ( ActionScheduler_Store::STATUS_PENDING !== $this->store->get_status( $action_id ) ) {
do_action( 'action_scheduler_execution_ignored', $action_id, $context );
return;
}
$valid_action = true;
do_action( 'action_scheduler_begin_execute', $action_id, $context );
$action = $this->store->fetch_action( $action_id );
$this->store->log_execution( $action_id );
$action->execute();
do_action( 'action_scheduler_after_execute', $action_id, $action, $context );
$this->store->mark_complete( $action_id );
} catch ( Throwable $e ) {
// Throwable is defined when executing under PHP 7.0 and up. We convert it to an exception, for
// compatibility with ActionScheduler_Logger.
throw new Exception( $e->getMessage(), $e->getCode(), $e );
}
} catch ( Exception $e ) {
// This catch block exists for compatibility with PHP 5.6.
$this->handle_action_error( $action_id, $e, $context, $valid_action );
} finally {
restore_error_handler();
}
if ( isset( $action ) && is_a( $action, 'ActionScheduler_Action' ) && $action->get_schedule()->is_recurring() ) {
$this->schedule_next_instance( $action, $action_id );
}
}
/**
* Marks actions as either having failed execution or failed validation, as appropriate.
*
* @param int $action_id Action ID.
* @param Exception $e Exception instance.
* @param string $context Execution context.
* @param bool $valid_action If the action is valid.
*
* @return void
*/
private function handle_action_error( $action_id, $e, $context, $valid_action ) {
if ( $valid_action ) {
$this->store->mark_failure( $action_id );
/**
* Runs when action execution fails.
*
* @param int $action_id Action ID.
* @param Exception $e Exception instance.
* @param string $context Execution context.
*/
do_action( 'action_scheduler_failed_execution', $action_id, $e, $context );
} else {
/**
* Runs when action validation fails.
*
* @param int $action_id Action ID.
* @param Exception $e Exception instance.
* @param string $context Execution context.
*/
do_action( 'action_scheduler_failed_validation', $action_id, $e, $context );
}
}
/**
* Schedule the next instance of the action if necessary.
*
* @param ActionScheduler_Action $action Action.
* @param int $action_id Action ID.
*/
protected function schedule_next_instance( ActionScheduler_Action $action, $action_id ) {
// If a recurring action has been consistently failing, we may wish to stop rescheduling it.
if (
ActionScheduler_Store::STATUS_FAILED === $this->store->get_status( $action_id )
&& $this->recurring_action_is_consistently_failing( $action, $action_id )
) {
ActionScheduler_Logger::instance()->log(
$action_id,
__( 'This action appears to be consistently failing. A new instance will not be scheduled.', 'action-scheduler' )
);
return;
}
try {
ActionScheduler::factory()->repeat( $action );
} catch ( Exception $e ) {
do_action( 'action_scheduler_failed_to_schedule_next_instance', $action_id, $e, $action );
}
}
/**
* Determine if the specified recurring action has been consistently failing.
*
* @param ActionScheduler_Action $action The recurring action to be rescheduled.
* @param int $action_id The ID of the recurring action.
*
* @return bool
*/
private function recurring_action_is_consistently_failing( ActionScheduler_Action $action, $action_id ) {
/**
* Controls the failure threshold for recurring actions.
*
* Before rescheduling a recurring action, we look at its status. If it failed, we then check if all of the most
* recent actions (upto the threshold set by this filter) sharing the same hook have also failed: if they have,
* that is considered consistent failure and a new instance of the action will not be scheduled.
*
* @param int $failure_threshold Number of actions of the same hook to examine for failure. Defaults to 5.
*/
$consistent_failure_threshold = (int) apply_filters( 'action_scheduler_recurring_action_failure_threshold', 5 );
// This query should find the earliest *failing* action (for the hook we are interested in) within our threshold.
$query_args = array(
'hook' => $action->get_hook(),
'status' => ActionScheduler_Store::STATUS_FAILED,
'date' => date_create( 'now', timezone_open( 'UTC' ) )->format( 'Y-m-d H:i:s' ),
'date_compare' => '<',
'per_page' => 1,
'offset' => $consistent_failure_threshold - 1,
);
$first_failing_action_id = $this->store->query_actions( $query_args );
// If we didn't retrieve an action ID, then there haven't been enough failures for us to worry about.
if ( empty( $first_failing_action_id ) ) {
return false;
}
// Now let's fetch the first action (having the same hook) of *any status* within the same window.
unset( $query_args['status'] );
$first_action_id_with_the_same_hook = $this->store->query_actions( $query_args );
/**
* If a recurring action is assessed as consistently failing, it will not be rescheduled. This hook provides a
* way to observe and optionally override that assessment.
*
* @param bool $is_consistently_failing If the action is considered to be consistently failing.
* @param ActionScheduler_Action $action The action being assessed.
*/
return (bool) apply_filters(
'action_scheduler_recurring_action_is_consistently_failing',
$first_action_id_with_the_same_hook === $first_failing_action_id,
$action
);
}
/**
* Run the queue cleaner.
*/
protected function run_cleanup() {
$this->cleaner->clean( 10 * $this->get_time_limit() );
}
/**
* Get the number of concurrent batches a runner allows.
*
* @return int
*/
public function get_allowed_concurrent_batches() {
return apply_filters( 'action_scheduler_queue_runner_concurrent_batches', 1 );
}
/**
* Check if the number of allowed concurrent batches is met or exceeded.
*
* @return bool
*/
public function has_maximum_concurrent_batches() {
return $this->store->get_claim_count() >= $this->get_allowed_concurrent_batches();
}
/**
* Get the maximum number of seconds a batch can run for.
*
* @return int The number of seconds.
*/
protected function get_time_limit() {
$time_limit = 30;
// Apply deprecated filter from deprecated get_maximum_execution_time() method.
if ( has_filter( 'action_scheduler_maximum_execution_time' ) ) {
_deprecated_function( 'action_scheduler_maximum_execution_time', '2.1.1', 'action_scheduler_queue_runner_time_limit' );
$time_limit = apply_filters( 'action_scheduler_maximum_execution_time', $time_limit );
}
return absint( apply_filters( 'action_scheduler_queue_runner_time_limit', $time_limit ) );
}
/**
* Get the number of seconds the process has been running.
*
* @return int The number of seconds.
*/
protected function get_execution_time() {
$execution_time = microtime( true ) - $this->created_time;
// Get the CPU time if the hosting environment uses it rather than wall-clock time to calculate a process's execution time.
if ( function_exists( 'getrusage' ) && apply_filters( 'action_scheduler_use_cpu_execution_time', defined( 'PANTHEON_ENVIRONMENT' ) ) ) {
$resource_usages = getrusage();
if ( isset( $resource_usages['ru_stime.tv_usec'], $resource_usages['ru_stime.tv_usec'] ) ) {
$execution_time = $resource_usages['ru_stime.tv_sec'] + ( $resource_usages['ru_stime.tv_usec'] / 1000000 );
}
}
return $execution_time;
}
/**
* Check if the host's max execution time is (likely) to be exceeded if processing more actions.
*
* @param int $processed_actions The number of actions processed so far - used to determine the likelihood of exceeding the time limit if processing another action.
* @return bool
*/
protected function time_likely_to_be_exceeded( $processed_actions ) {
$execution_time = $this->get_execution_time();
$max_execution_time = $this->get_time_limit();
// Safety against division by zero errors.
if ( 0 === $processed_actions ) {
return $execution_time >= $max_execution_time;
}
$time_per_action = $execution_time / $processed_actions;
$estimated_time = $execution_time + ( $time_per_action * 3 );
$likely_to_be_exceeded = $estimated_time > $max_execution_time;
return apply_filters( 'action_scheduler_maximum_execution_time_likely_to_be_exceeded', $likely_to_be_exceeded, $this, $processed_actions, $execution_time, $max_execution_time );
}
/**
* Get memory limit
*
* Based on WP_Background_Process::get_memory_limit()
*
* @return int
*/
protected function get_memory_limit() {
if ( function_exists( 'ini_get' ) ) {
$memory_limit = ini_get( 'memory_limit' );
} else {
$memory_limit = '128M'; // Sensible default, and minimum required by WooCommerce.
}
if ( ! $memory_limit || -1 === $memory_limit || '-1' === $memory_limit ) {
// Unlimited, set to 32GB.
$memory_limit = '32G';
}
return ActionScheduler_Compatibility::convert_hr_to_bytes( $memory_limit );
}
/**
* Memory exceeded
*
* Ensures the batch process never exceeds 90% of the maximum WordPress memory.
*
* Based on WP_Background_Process::memory_exceeded()
*
* @return bool
*/
protected function memory_exceeded() {
$memory_limit = $this->get_memory_limit() * 0.90;
$current_memory = memory_get_usage( true );
$memory_exceeded = $current_memory >= $memory_limit;
return apply_filters( 'action_scheduler_memory_exceeded', $memory_exceeded, $this );
}
/**
* See if the batch limits have been exceeded, which is when memory usage is almost at
* the maximum limit, or the time to process more actions will exceed the max time limit.
*
* Based on WC_Background_Process::batch_limits_exceeded()
*
* @param int $processed_actions The number of actions processed so far - used to determine the likelihood of exceeding the time limit if processing another action.
* @return bool
*/
protected function batch_limits_exceeded( $processed_actions ) {
return $this->memory_exceeded() || $this->time_likely_to_be_exceeded( $processed_actions );
}
/**
* Process actions in the queue.
*
* @param string $context Optional identifier for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron'
* Generally, this should be capitalised and not localised as it's a proper noun.
* @return int The number of actions processed.
*/
abstract public function run( $context = '' );
}
woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_RecurringSchedule.php 0000644 00000006346 15153553404 0027062 0 ustar 00 <?php
/**
* Class ActionScheduler_Abstract_RecurringSchedule
*/
abstract class ActionScheduler_Abstract_RecurringSchedule extends ActionScheduler_Abstract_Schedule {
/**
* The date & time the first instance of this schedule was setup to run (which may not be this instance).
*
* Schedule objects are attached to an action object. Each schedule stores the run date for that
* object as the start date - @see $this->start - and logic to calculate the next run date after
* that - @see $this->calculate_next(). The $first_date property also keeps a record of when the very
* first instance of this chain of schedules ran.
*
* @var DateTime
*/
private $first_date = null;
/**
* Timestamp equivalent of @see $this->first_date
*
* @var int
*/
protected $first_timestamp = null;
/**
* The recurrence between each time an action is run using this schedule.
* Used to calculate the start date & time. Can be a number of seconds, in the
* case of ActionScheduler_IntervalSchedule, or a cron expression, as in the
* case of ActionScheduler_CronSchedule. Or something else.
*
* @var mixed
*/
protected $recurrence;
/**
* Construct.
*
* @param DateTime $date The date & time to run the action.
* @param mixed $recurrence The data used to determine the schedule's recurrence.
* @param DateTime|null $first (Optional) The date & time the first instance of this interval schedule ran. Default null, meaning this is the first instance.
*/
public function __construct( DateTime $date, $recurrence, ?DateTime $first = null ) {
parent::__construct( $date );
$this->first_date = empty( $first ) ? $date : $first;
$this->recurrence = $recurrence;
}
/**
* Schedule is recurring.
*
* @return bool
*/
public function is_recurring() {
return true;
}
/**
* Get the date & time of the first schedule in this recurring series.
*
* @return DateTime|null
*/
public function get_first_date() {
return clone $this->first_date;
}
/**
* Get the schedule's recurrence.
*
* @return string
*/
public function get_recurrence() {
return $this->recurrence;
}
/**
* For PHP 5.2 compat, since DateTime objects can't be serialized
*
* @return array
*/
public function __sleep() {
$sleep_params = parent::__sleep();
$this->first_timestamp = $this->first_date->getTimestamp();
return array_merge(
$sleep_params,
array(
'first_timestamp',
'recurrence',
)
);
}
/**
* Unserialize recurring schedules serialized/stored prior to AS 3.0.0
*
* Prior to Action Scheduler 3.0.0, schedules used different property names to refer
* to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp
* was the same as ActionScheduler_SimpleSchedule::timestamp. This was addressed in
* Action Scheduler 3.0.0, where properties and property names were aligned for better
* inheritance. To maintain backward compatibility with scheduled serialized and stored
* prior to 3.0, we need to correctly map the old property names.
*/
public function __wakeup() {
parent::__wakeup();
if ( $this->first_timestamp > 0 ) {
$this->first_date = as_get_datetime_object( $this->first_timestamp );
} else {
$this->first_date = $this->get_date();
}
}
}
woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schedule.php 0000644 00000003547 15153553404 0025201 0 ustar 00 <?php
/**
* Class ActionScheduler_Abstract_Schedule
*/
abstract class ActionScheduler_Abstract_Schedule extends ActionScheduler_Schedule_Deprecated {
/**
* The date & time the schedule is set to run.
*
* @var DateTime
*/
private $scheduled_date = null;
/**
* Timestamp equivalent of @see $this->scheduled_date
*
* @var int
*/
protected $scheduled_timestamp = null;
/**
* Construct.
*
* @param DateTime $date The date & time to run the action.
*/
public function __construct( DateTime $date ) {
$this->scheduled_date = $date;
}
/**
* Check if a schedule should recur.
*
* @return bool
*/
abstract public function is_recurring();
/**
* Calculate when the next instance of this schedule would run based on a given date & time.
*
* @param DateTime $after Start timestamp.
* @return DateTime
*/
abstract protected function calculate_next( DateTime $after );
/**
* Get the next date & time when this schedule should run after a given date & time.
*
* @param DateTime $after Start timestamp.
* @return DateTime|null
*/
public function get_next( DateTime $after ) {
$after = clone $after;
if ( $after > $this->scheduled_date ) {
$after = $this->calculate_next( $after );
return $after;
}
return clone $this->scheduled_date;
}
/**
* Get the date & time the schedule is set to run.
*
* @return DateTime|null
*/
public function get_date() {
return $this->scheduled_date;
}
/**
* For PHP 5.2 compat, because DateTime objects can't be serialized
*
* @return array
*/
public function __sleep() {
$this->scheduled_timestamp = $this->scheduled_date->getTimestamp();
return array(
'scheduled_timestamp',
);
}
/**
* Wakeup.
*/
public function __wakeup() {
$this->scheduled_date = as_get_datetime_object( $this->scheduled_timestamp );
unset( $this->scheduled_timestamp );
}
}
woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schema.php 0000644 00000011443 15153553404 0024637 0 ustar 00 <?php
/**
* Class ActionScheduler_Abstract_Schema
*
* @package Action_Scheduler
*
* @codeCoverageIgnore
*
* Utility class for creating/updating custom tables
*/
abstract class ActionScheduler_Abstract_Schema {
/**
* Increment this value in derived class to trigger a schema update.
*
* @var int
*/
protected $schema_version = 1;
/**
* Schema version stored in database.
*
* @var string
*/
protected $db_version;
/**
* Names of tables that will be registered by this class.
*
* @var array
*/
protected $tables = array();
/**
* Can optionally be used by concrete classes to carry out additional initialization work
* as needed.
*/
public function init() {}
/**
* Register tables with WordPress, and create them if needed.
*
* @param bool $force_update Optional. Default false. Use true to always run the schema update.
*
* @return void
*/
public function register_tables( $force_update = false ) {
global $wpdb;
// make WP aware of our tables.
foreach ( $this->tables as $table ) {
$wpdb->tables[] = $table;
$name = $this->get_full_table_name( $table );
$wpdb->$table = $name;
}
// create the tables.
if ( $this->schema_update_required() || $force_update ) {
foreach ( $this->tables as $table ) {
/**
* Allow custom processing before updating a table schema.
*
* @param string $table Name of table being updated.
* @param string $db_version Existing version of the table being updated.
*/
do_action( 'action_scheduler_before_schema_update', $table, $this->db_version );
$this->update_table( $table );
}
$this->mark_schema_update_complete();
}
}
/**
* Get table definition.
*
* @param string $table The name of the table.
*
* @return string The CREATE TABLE statement, suitable for passing to dbDelta
*/
abstract protected function get_table_definition( $table );
/**
* Determine if the database schema is out of date
* by comparing the integer found in $this->schema_version
* with the option set in the WordPress options table
*
* @return bool
*/
private function schema_update_required() {
$option_name = 'schema-' . static::class;
$this->db_version = get_option( $option_name, 0 );
// Check for schema option stored by the Action Scheduler Custom Tables plugin in case site has migrated from that plugin with an older schema.
if ( 0 === $this->db_version ) {
$plugin_option_name = 'schema-';
switch ( static::class ) {
case 'ActionScheduler_StoreSchema':
$plugin_option_name .= 'Action_Scheduler\Custom_Tables\DB_Store_Table_Maker';
break;
case 'ActionScheduler_LoggerSchema':
$plugin_option_name .= 'Action_Scheduler\Custom_Tables\DB_Logger_Table_Maker';
break;
}
$this->db_version = get_option( $plugin_option_name, 0 );
delete_option( $plugin_option_name );
}
return version_compare( $this->db_version, $this->schema_version, '<' );
}
/**
* Update the option in WordPress to indicate that
* our schema is now up to date
*
* @return void
*/
private function mark_schema_update_complete() {
$option_name = 'schema-' . static::class;
// work around race conditions and ensure that our option updates.
$value_to_save = (string) $this->schema_version . '.0.' . time();
update_option( $option_name, $value_to_save );
}
/**
* Update the schema for the given table
*
* @param string $table The name of the table to update.
*
* @return void
*/
private function update_table( $table ) {
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
$definition = $this->get_table_definition( $table );
if ( $definition ) {
$updated = dbDelta( $definition );
foreach ( $updated as $updated_table => $update_description ) {
if ( strpos( $update_description, 'Created table' ) === 0 ) {
do_action( 'action_scheduler/created_table', $updated_table, $table ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}
}
}
}
/**
* Get full table name.
*
* @param string $table Table name.
*
* @return string The full name of the table, including the
* table prefix for the current blog
*/
protected function get_full_table_name( $table ) {
return $GLOBALS['wpdb']->prefix . $table;
}
/**
* Confirms that all of the tables registered by this schema class have been created.
*
* @return bool
*/
public function tables_exist() {
global $wpdb;
$tables_exist = true;
foreach ( $this->tables as $table_name ) {
$table_name = $wpdb->prefix . $table_name;
$pattern = str_replace( '_', '\\_', $table_name );
$existing_table = $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $pattern ) );
if ( $existing_table !== $table_name ) {
$tables_exist = false;
break;
}
}
return $tables_exist;
}
}
woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Lock.php 0000644 00000003437 15153553404 0022510 0 ustar 00 <?php
/**
* Abstract class for setting a basic lock to throttle some action.
*
* Class ActionScheduler_Lock
*/
abstract class ActionScheduler_Lock {
/**
* Instance.
*
* @var ActionScheduler_Lock
*/
private static $locker = null;
/**
* Duration of lock.
*
* @var int
*/
protected static $lock_duration = MINUTE_IN_SECONDS;
/**
* Check if a lock is set for a given lock type.
*
* @param string $lock_type A string to identify different lock types.
* @return bool
*/
public function is_locked( $lock_type ) {
return ( $this->get_expiration( $lock_type ) >= time() );
}
/**
* Set a lock.
*
* To prevent race conditions, implementations should avoid setting the lock if the lock is already held.
*
* @param string $lock_type A string to identify different lock types.
* @return bool
*/
abstract public function set( $lock_type );
/**
* If a lock is set, return the timestamp it was set to expiry.
*
* @param string $lock_type A string to identify different lock types.
* @return bool|int False if no lock is set, otherwise the timestamp for when the lock is set to expire.
*/
abstract public function get_expiration( $lock_type );
/**
* Get the amount of time to set for a given lock. 60 seconds by default.
*
* @param string $lock_type A string to identify different lock types.
* @return int
*/
protected function get_duration( $lock_type ) {
return apply_filters( 'action_scheduler_lock_duration', self::$lock_duration, $lock_type );
}
/**
* Get instance.
*
* @return ActionScheduler_Lock
*/
public static function instance() {
if ( empty( self::$locker ) ) {
$class = apply_filters( 'action_scheduler_lock_class', 'ActionScheduler_OptionLock' );
self::$locker = new $class();
}
return self::$locker;
}
}
woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Logger.php 0000644 00000017525 15153553404 0023042 0 ustar 00 <?php
/**
* Class ActionScheduler_Logger
*
* @codeCoverageIgnore
*/
abstract class ActionScheduler_Logger {
/**
* Instance.
*
* @var null|self
*/
private static $logger = null;
/**
* Get instance.
*
* @return ActionScheduler_Logger
*/
public static function instance() {
if ( empty( self::$logger ) ) {
$class = apply_filters( 'action_scheduler_logger_class', 'ActionScheduler_wpCommentLogger' );
self::$logger = new $class();
}
return self::$logger;
}
/**
* Create log entry.
*
* @param string $action_id Action ID.
* @param string $message Log message.
* @param DateTime|null $date Log date.
*
* @return string The log entry ID
*/
abstract public function log( $action_id, $message, ?DateTime $date = null );
/**
* Get action's log entry.
*
* @param string $entry_id Entry ID.
*
* @return ActionScheduler_LogEntry
*/
abstract public function get_entry( $entry_id );
/**
* Get action's logs.
*
* @param string $action_id Action ID.
*
* @return ActionScheduler_LogEntry[]
*/
abstract public function get_logs( $action_id );
/**
* Initialize.
*
* @codeCoverageIgnore
*/
public function init() {
$this->hook_stored_action();
add_action( 'action_scheduler_canceled_action', array( $this, 'log_canceled_action' ), 10, 1 );
add_action( 'action_scheduler_begin_execute', array( $this, 'log_started_action' ), 10, 2 );
add_action( 'action_scheduler_after_execute', array( $this, 'log_completed_action' ), 10, 3 );
add_action( 'action_scheduler_failed_execution', array( $this, 'log_failed_action' ), 10, 3 );
add_action( 'action_scheduler_failed_action', array( $this, 'log_timed_out_action' ), 10, 2 );
add_action( 'action_scheduler_unexpected_shutdown', array( $this, 'log_unexpected_shutdown' ), 10, 2 );
add_action( 'action_scheduler_reset_action', array( $this, 'log_reset_action' ), 10, 1 );
add_action( 'action_scheduler_execution_ignored', array( $this, 'log_ignored_action' ), 10, 2 );
add_action( 'action_scheduler_failed_fetch_action', array( $this, 'log_failed_fetch_action' ), 10, 2 );
add_action( 'action_scheduler_failed_to_schedule_next_instance', array( $this, 'log_failed_schedule_next_instance' ), 10, 2 );
add_action( 'action_scheduler_bulk_cancel_actions', array( $this, 'bulk_log_cancel_actions' ), 10, 1 );
}
/**
* Register callback for storing action.
*/
public function hook_stored_action() {
add_action( 'action_scheduler_stored_action', array( $this, 'log_stored_action' ) );
}
/**
* Unhook callback for storing action.
*/
public function unhook_stored_action() {
remove_action( 'action_scheduler_stored_action', array( $this, 'log_stored_action' ) );
}
/**
* Log action stored.
*
* @param int $action_id Action ID.
*/
public function log_stored_action( $action_id ) {
$this->log( $action_id, __( 'action created', 'action-scheduler' ) );
}
/**
* Log action cancellation.
*
* @param int $action_id Action ID.
*/
public function log_canceled_action( $action_id ) {
$this->log( $action_id, __( 'action canceled', 'action-scheduler' ) );
}
/**
* Log action start.
*
* @param int $action_id Action ID.
* @param string $context Action execution context.
*/
public function log_started_action( $action_id, $context = '' ) {
if ( ! empty( $context ) ) {
/* translators: %s: context */
$message = sprintf( __( 'action started via %s', 'action-scheduler' ), $context );
} else {
$message = __( 'action started', 'action-scheduler' );
}
$this->log( $action_id, $message );
}
/**
* Log action completion.
*
* @param int $action_id Action ID.
* @param null|ActionScheduler_Action $action Action.
* @param string $context Action execution context.
*/
public function log_completed_action( $action_id, $action = null, $context = '' ) {
if ( ! empty( $context ) ) {
/* translators: %s: context */
$message = sprintf( __( 'action complete via %s', 'action-scheduler' ), $context );
} else {
$message = __( 'action complete', 'action-scheduler' );
}
$this->log( $action_id, $message );
}
/**
* Log action failure.
*
* @param int $action_id Action ID.
* @param Exception $exception Exception.
* @param string $context Action execution context.
*/
public function log_failed_action( $action_id, Exception $exception, $context = '' ) {
if ( ! empty( $context ) ) {
/* translators: 1: context 2: exception message */
$message = sprintf( __( 'action failed via %1$s: %2$s', 'action-scheduler' ), $context, $exception->getMessage() );
} else {
/* translators: %s: exception message */
$message = sprintf( __( 'action failed: %s', 'action-scheduler' ), $exception->getMessage() );
}
$this->log( $action_id, $message );
}
/**
* Log action timeout.
*
* @param int $action_id Action ID.
* @param string $timeout Timeout.
*/
public function log_timed_out_action( $action_id, $timeout ) {
/* translators: %s: amount of time */
$this->log( $action_id, sprintf( __( 'action marked as failed after %s seconds. Unknown error occurred. Check server, PHP and database error logs to diagnose cause.', 'action-scheduler' ), $timeout ) );
}
/**
* Log unexpected shutdown.
*
* @param int $action_id Action ID.
* @param mixed[] $error Error.
*/
public function log_unexpected_shutdown( $action_id, $error ) {
if ( ! empty( $error ) ) {
/* translators: 1: error message 2: filename 3: line */
$this->log( $action_id, sprintf( __( 'unexpected shutdown: PHP Fatal error %1$s in %2$s on line %3$s', 'action-scheduler' ), $error['message'], $error['file'], $error['line'] ) );
}
}
/**
* Log action reset.
*
* @param int $action_id Action ID.
*/
public function log_reset_action( $action_id ) {
$this->log( $action_id, __( 'action reset', 'action-scheduler' ) );
}
/**
* Log ignored action.
*
* @param int $action_id Action ID.
* @param string $context Action execution context.
*/
public function log_ignored_action( $action_id, $context = '' ) {
if ( ! empty( $context ) ) {
/* translators: %s: context */
$message = sprintf( __( 'action ignored via %s', 'action-scheduler' ), $context );
} else {
$message = __( 'action ignored', 'action-scheduler' );
}
$this->log( $action_id, $message );
}
/**
* Log the failure of fetching the action.
*
* @param string $action_id Action ID.
* @param null|Exception $exception The exception which occurred when fetching the action. NULL by default for backward compatibility.
*/
public function log_failed_fetch_action( $action_id, ?Exception $exception = null ) {
if ( ! is_null( $exception ) ) {
/* translators: %s: exception message */
$log_message = sprintf( __( 'There was a failure fetching this action: %s', 'action-scheduler' ), $exception->getMessage() );
} else {
$log_message = __( 'There was a failure fetching this action', 'action-scheduler' );
}
$this->log( $action_id, $log_message );
}
/**
* Log the failure of scheduling the action's next instance.
*
* @param int $action_id Action ID.
* @param Exception $exception Exception object.
*/
public function log_failed_schedule_next_instance( $action_id, Exception $exception ) {
/* translators: %s: exception message */
$this->log( $action_id, sprintf( __( 'There was a failure scheduling the next instance of this action: %s', 'action-scheduler' ), $exception->getMessage() ) );
}
/**
* Bulk add cancel action log entries.
*
* Implemented here for backward compatibility. Should be implemented in parent loggers
* for more performant bulk logging.
*
* @param array $action_ids List of action ID.
*/
public function bulk_log_cancel_actions( $action_ids ) {
if ( empty( $action_ids ) ) {
return;
}
foreach ( $action_ids as $action_id ) {
$this->log_canceled_action( $action_id );
}
}
}
woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Store.php 0000644 00000034071 15153553404 0022712 0 ustar 00 <?php
/**
* Class ActionScheduler_Store
*
* @codeCoverageIgnore
*/
abstract class ActionScheduler_Store extends ActionScheduler_Store_Deprecated {
const STATUS_COMPLETE = 'complete';
const STATUS_PENDING = 'pending';
const STATUS_RUNNING = 'in-progress';
const STATUS_FAILED = 'failed';
const STATUS_CANCELED = 'canceled';
const DEFAULT_CLASS = 'ActionScheduler_wpPostStore';
/**
* ActionScheduler_Store instance.
*
* @var ActionScheduler_Store
*/
private static $store = null;
/**
* Maximum length of args.
*
* @var int
*/
protected static $max_args_length = 191;
/**
* Save action.
*
* @param ActionScheduler_Action $action Action to save.
* @param null|DateTime $scheduled_date Optional Date of the first instance
* to store. Otherwise uses the first date of the action's
* schedule.
*
* @return int The action ID
*/
abstract public function save_action( ActionScheduler_Action $action, ?DateTime $scheduled_date = null );
/**
* Get action.
*
* @param string $action_id Action ID.
*
* @return ActionScheduler_Action
*/
abstract public function fetch_action( $action_id );
/**
* Find an action.
*
* Note: the query ordering changes based on the passed 'status' value.
*
* @param string $hook Action hook.
* @param array $params Parameters of the action to find.
*
* @return string|null ID of the next action matching the criteria or NULL if not found.
*/
public function find_action( $hook, $params = array() ) {
$params = wp_parse_args(
$params,
array(
'args' => null,
'status' => self::STATUS_PENDING,
'group' => '',
)
);
// These params are fixed for this method.
$params['hook'] = $hook;
$params['orderby'] = 'date';
$params['per_page'] = 1;
if ( ! empty( $params['status'] ) ) {
if ( self::STATUS_PENDING === $params['status'] ) {
$params['order'] = 'ASC'; // Find the next action that matches.
} else {
$params['order'] = 'DESC'; // Find the most recent action that matches.
}
}
$results = $this->query_actions( $params );
return empty( $results ) ? null : $results[0];
}
/**
* Query for action count or list of action IDs.
*
* @since 3.3.0 $query['status'] accepts array of statuses instead of a single status.
*
* @param array $query {
* Query filtering options.
*
* @type string $hook The name of the actions. Optional.
* @type string|array $status The status or statuses of the actions. Optional.
* @type array $args The args array of the actions. Optional.
* @type DateTime $date The scheduled date of the action. Used in UTC timezone. Optional.
* @type string $date_compare Operator for selecting by $date param. Accepted values are '!=', '>', '>=', '<', '<=', '='. Defaults to '<='.
* @type DateTime $modified The last modified date of the action. Used in UTC timezone. Optional.
* @type string $modified_compare Operator for comparing $modified param. Accepted values are '!=', '>', '>=', '<', '<=', '='. Defaults to '<='.
* @type string $group The group the action belongs to. Optional.
* @type bool|int $claimed TRUE to find claimed actions, FALSE to find unclaimed actions, an int to find a specific claim ID. Optional.
* @type int $per_page Number of results to return. Defaults to 5.
* @type int $offset The query pagination offset. Defaults to 0.
* @type int $orderby Accepted values are 'hook', 'group', 'modified', 'date' or 'none'. Defaults to 'date'.
* @type string $order Accepted values are 'ASC' or 'DESC'. Defaults to 'ASC'.
* }
* @param string $query_type Whether to select or count the results. Default, select.
*
* @return string|array|null The IDs of actions matching the query. Null on failure.
*/
abstract public function query_actions( $query = array(), $query_type = 'select' );
/**
* Run query to get a single action ID.
*
* @since 3.3.0
*
* @see ActionScheduler_Store::query_actions for $query arg usage but 'per_page' and 'offset' can't be used.
*
* @param array $query Query parameters.
*
* @return int|null
*/
public function query_action( $query ) {
$query['per_page'] = 1;
$query['offset'] = 0;
$results = $this->query_actions( $query );
if ( empty( $results ) ) {
return null;
} else {
return (int) $results[0];
}
}
/**
* Get a count of all actions in the store, grouped by status
*
* @return array
*/
abstract public function action_counts();
/**
* Get additional action counts.
*
* - add past-due actions
*
* @return array
*/
public function extra_action_counts() {
$extra_actions = array();
$pastdue_action_counts = (int) $this->query_actions(
array(
'status' => self::STATUS_PENDING,
'date' => as_get_datetime_object(),
),
'count'
);
if ( $pastdue_action_counts ) {
$extra_actions['past-due'] = $pastdue_action_counts;
}
/**
* Allows 3rd party code to add extra action counts (used in filters in the list table).
*
* @since 3.5.0
* @param $extra_actions array Array with format action_count_identifier => action count.
*/
return apply_filters( 'action_scheduler_extra_action_counts', $extra_actions );
}
/**
* Cancel action.
*
* @param string $action_id Action ID.
*/
abstract public function cancel_action( $action_id );
/**
* Delete action.
*
* @param string $action_id Action ID.
*/
abstract public function delete_action( $action_id );
/**
* Get action's schedule or run timestamp.
*
* @param string $action_id Action ID.
*
* @return DateTime The date the action is schedule to run, or the date that it ran.
*/
abstract public function get_date( $action_id );
/**
* Make a claim.
*
* @param int $max_actions Maximum number of actions to claim.
* @param DateTime|null $before_date Claim only actions schedule before the given date. Defaults to now.
* @param array $hooks Claim only actions with a hook or hooks.
* @param string $group Claim only actions in the given group.
*
* @return ActionScheduler_ActionClaim
*/
abstract public function stake_claim( $max_actions = 10, ?DateTime $before_date = null, $hooks = array(), $group = '' );
/**
* Get claim count.
*
* @return int
*/
abstract public function get_claim_count();
/**
* Release the claim.
*
* @param ActionScheduler_ActionClaim $claim Claim object.
*/
abstract public function release_claim( ActionScheduler_ActionClaim $claim );
/**
* Un-claim the action.
*
* @param string $action_id Action ID.
*/
abstract public function unclaim_action( $action_id );
/**
* Mark action as failed.
*
* @param string $action_id Action ID.
*/
abstract public function mark_failure( $action_id );
/**
* Log action's execution.
*
* @param string $action_id Actoin ID.
*/
abstract public function log_execution( $action_id );
/**
* Mark action as complete.
*
* @param string $action_id Action ID.
*/
abstract public function mark_complete( $action_id );
/**
* Get action's status.
*
* @param string $action_id Action ID.
* @return string
*/
abstract public function get_status( $action_id );
/**
* Get action's claim ID.
*
* @param string $action_id Action ID.
* @return mixed
*/
abstract public function get_claim_id( $action_id );
/**
* Find actions by claim ID.
*
* @param string $claim_id Claim ID.
* @return array
*/
abstract public function find_actions_by_claim_id( $claim_id );
/**
* Validate SQL operator.
*
* @param string $comparison_operator Operator.
* @return string
*/
protected function validate_sql_comparator( $comparison_operator ) {
if ( in_array( $comparison_operator, array( '!=', '>', '>=', '<', '<=', '=' ), true ) ) {
return $comparison_operator;
}
return '=';
}
/**
* Get the time MySQL formatted date/time string for an action's (next) scheduled date.
*
* @param ActionScheduler_Action $action Action.
* @param null|DateTime $scheduled_date Action's schedule date (optional).
* @return string
*/
protected function get_scheduled_date_string( ActionScheduler_Action $action, ?DateTime $scheduled_date = null ) {
$next = is_null( $scheduled_date ) ? $action->get_schedule()->get_date() : $scheduled_date;
if ( ! $next ) {
$next = date_create();
}
$next->setTimezone( new DateTimeZone( 'UTC' ) );
return $next->format( 'Y-m-d H:i:s' );
}
/**
* Get the time MySQL formatted date/time string for an action's (next) scheduled date.
*
* @param ActionScheduler_Action|null $action Action.
* @param null|DateTime $scheduled_date Action's scheduled date (optional).
* @return string
*/
protected function get_scheduled_date_string_local( ActionScheduler_Action $action, ?DateTime $scheduled_date = null ) {
$next = is_null( $scheduled_date ) ? $action->get_schedule()->get_date() : $scheduled_date;
if ( ! $next ) {
$next = date_create();
}
ActionScheduler_TimezoneHelper::set_local_timezone( $next );
return $next->format( 'Y-m-d H:i:s' );
}
/**
* Validate that we could decode action arguments.
*
* @param mixed $args The decoded arguments.
* @param int $action_id The action ID.
*
* @throws ActionScheduler_InvalidActionException When the decoded arguments are invalid.
*/
protected function validate_args( $args, $action_id ) {
// Ensure we have an array of args.
if ( ! is_array( $args ) ) {
throw ActionScheduler_InvalidActionException::from_decoding_args( $action_id );
}
// Validate JSON decoding if possible.
if ( function_exists( 'json_last_error' ) && JSON_ERROR_NONE !== json_last_error() ) {
throw ActionScheduler_InvalidActionException::from_decoding_args( $action_id, $args );
}
}
/**
* Validate a ActionScheduler_Schedule object.
*
* @param mixed $schedule The unserialized ActionScheduler_Schedule object.
* @param int $action_id The action ID.
*
* @throws ActionScheduler_InvalidActionException When the schedule is invalid.
*/
protected function validate_schedule( $schedule, $action_id ) {
if ( empty( $schedule ) || ! is_a( $schedule, 'ActionScheduler_Schedule' ) ) {
throw ActionScheduler_InvalidActionException::from_schedule( $action_id, $schedule );
}
}
/**
* InnoDB indexes have a maximum size of 767 bytes by default, which is only 191 characters with utf8mb4.
*
* Previously, AS wasn't concerned about args length, as we used the (unindex) post_content column. However,
* with custom tables, we use an indexed VARCHAR column instead.
*
* @param ActionScheduler_Action $action Action to be validated.
* @throws InvalidArgumentException When json encoded args is too long.
*/
protected function validate_action( ActionScheduler_Action $action ) {
if ( strlen( wp_json_encode( $action->get_args() ) ) > static::$max_args_length ) {
// translators: %d is a number (maximum length of action arguments).
throw new InvalidArgumentException( sprintf( __( 'ActionScheduler_Action::$args too long. To ensure the args column can be indexed, action args should not be more than %d characters when encoded as JSON.', 'action-scheduler' ), static::$max_args_length ) );
}
}
/**
* Cancel pending actions by hook.
*
* @since 3.0.0
*
* @param string $hook Hook name.
*
* @return void
*/
public function cancel_actions_by_hook( $hook ) {
$action_ids = true;
while ( ! empty( $action_ids ) ) {
$action_ids = $this->query_actions(
array(
'hook' => $hook,
'status' => self::STATUS_PENDING,
'per_page' => 1000,
'orderby' => 'none',
)
);
$this->bulk_cancel_actions( $action_ids );
}
}
/**
* Cancel pending actions by group.
*
* @since 3.0.0
*
* @param string $group Group slug.
*
* @return void
*/
public function cancel_actions_by_group( $group ) {
$action_ids = true;
while ( ! empty( $action_ids ) ) {
$action_ids = $this->query_actions(
array(
'group' => $group,
'status' => self::STATUS_PENDING,
'per_page' => 1000,
'orderby' => 'none',
)
);
$this->bulk_cancel_actions( $action_ids );
}
}
/**
* Cancel a set of action IDs.
*
* @since 3.0.0
*
* @param int[] $action_ids List of action IDs.
*
* @return void
*/
private function bulk_cancel_actions( $action_ids ) {
foreach ( $action_ids as $action_id ) {
$this->cancel_action( $action_id );
}
do_action( 'action_scheduler_bulk_cancel_actions', $action_ids );
}
/**
* Get status labels.
*
* @return array<string, string>
*/
public function get_status_labels() {
return array(
self::STATUS_COMPLETE => __( 'Complete', 'action-scheduler' ),
self::STATUS_PENDING => __( 'Pending', 'action-scheduler' ),
self::STATUS_RUNNING => __( 'In-progress', 'action-scheduler' ),
self::STATUS_FAILED => __( 'Failed', 'action-scheduler' ),
self::STATUS_CANCELED => __( 'Canceled', 'action-scheduler' ),
);
}
/**
* Check if there are any pending scheduled actions due to run.
*
* @return string
*/
public function has_pending_actions_due() {
$pending_actions = $this->query_actions(
array(
'per_page' => 1,
'date' => as_get_datetime_object(),
'status' => self::STATUS_PENDING,
'orderby' => 'none',
),
'count'
);
return ! empty( $pending_actions );
}
/**
* Callable initialization function optionally overridden in derived classes.
*/
public function init() {}
/**
* Callable function to mark an action as migrated optionally overridden in derived classes.
*
* @param int $action_id Action ID.
*/
public function mark_migrated( $action_id ) {}
/**
* Get instance.
*
* @return ActionScheduler_Store
*/
public static function instance() {
if ( empty( self::$store ) ) {
$class = apply_filters( 'action_scheduler_store_class', self::DEFAULT_CLASS );
self::$store = new $class();
}
return self::$store;
}
}
woocommerce/action-scheduler/classes/abstracts/ActionScheduler_TimezoneHelper.php 0000644 00000011415 15153553404 0024545 0 ustar 00 <?php
/**
* Class ActionScheduler_TimezoneHelper
*/
abstract class ActionScheduler_TimezoneHelper {
/**
* DateTimeZone object.
*
* @var null|DateTimeZone
*/
private static $local_timezone = null;
/**
* Set a DateTime's timezone to the WordPress site's timezone, or a UTC offset
* if no timezone string is available.
*
* @since 2.1.0
*
* @param DateTime $date Timestamp.
* @return ActionScheduler_DateTime
*/
public static function set_local_timezone( DateTime $date ) {
// Accept a DateTime for easier backward compatibility, even though we require methods on ActionScheduler_DateTime.
if ( ! is_a( $date, 'ActionScheduler_DateTime' ) ) {
$date = as_get_datetime_object( $date->format( 'U' ) );
}
if ( get_option( 'timezone_string' ) ) {
$date->setTimezone( new DateTimeZone( self::get_local_timezone_string() ) );
} else {
$date->setUtcOffset( self::get_local_timezone_offset() );
}
return $date;
}
/**
* Helper to retrieve the timezone string for a site until a WP core method exists
* (see https://core.trac.wordpress.org/ticket/24730).
*
* Adapted from wc_timezone_string() and https://secure.php.net/manual/en/function.timezone-name-from-abbr.php#89155.
*
* If no timezone string is set, and its not possible to match the UTC offset set for the site to a timezone
* string, then an empty string will be returned, and the UTC offset should be used to set a DateTime's
* timezone.
*
* @since 2.1.0
* @param bool $reset Unused.
* @return string PHP timezone string for the site or empty if no timezone string is available.
*/
protected static function get_local_timezone_string( $reset = false ) {
// If site timezone string exists, return it.
$timezone = get_option( 'timezone_string' );
if ( $timezone ) {
return $timezone;
}
// Get UTC offset, if it isn't set then return UTC.
$utc_offset = intval( get_option( 'gmt_offset', 0 ) );
if ( 0 === $utc_offset ) {
return 'UTC';
}
// Adjust UTC offset from hours to seconds.
$utc_offset *= 3600;
// Attempt to guess the timezone string from the UTC offset.
$timezone = timezone_name_from_abbr( '', $utc_offset );
if ( $timezone ) {
return $timezone;
}
// Last try, guess timezone string manually.
foreach ( timezone_abbreviations_list() as $abbr ) {
foreach ( $abbr as $city ) {
if ( (bool) date( 'I' ) === (bool) $city['dst'] && $city['timezone_id'] && intval( $city['offset'] ) === $utc_offset ) { // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date -- we are actually interested in the runtime timezone.
return $city['timezone_id'];
}
}
}
// No timezone string.
return '';
}
/**
* Get timezone offset in seconds.
*
* @since 2.1.0
* @return float
*/
protected static function get_local_timezone_offset() {
$timezone = get_option( 'timezone_string' );
if ( $timezone ) {
$timezone_object = new DateTimeZone( $timezone );
return $timezone_object->getOffset( new DateTime( 'now' ) );
} else {
return floatval( get_option( 'gmt_offset', 0 ) ) * HOUR_IN_SECONDS;
}
}
/**
* Get local timezone.
*
* @param bool $reset Toggle to discard stored value.
* @deprecated 2.1.0
*/
public static function get_local_timezone( $reset = false ) {
_deprecated_function( __FUNCTION__, '2.1.0', 'ActionScheduler_TimezoneHelper::set_local_timezone()' );
if ( $reset ) {
self::$local_timezone = null;
}
if ( ! isset( self::$local_timezone ) ) {
$tzstring = get_option( 'timezone_string' );
if ( empty( $tzstring ) ) {
$gmt_offset = absint( get_option( 'gmt_offset' ) );
if ( 0 === $gmt_offset ) {
$tzstring = 'UTC';
} else {
$gmt_offset *= HOUR_IN_SECONDS;
$tzstring = timezone_name_from_abbr( '', $gmt_offset, 1 );
// If there's no timezone string, try again with no DST.
if ( false === $tzstring ) {
$tzstring = timezone_name_from_abbr( '', $gmt_offset, 0 );
}
// Try mapping to the first abbreviation we can find.
if ( false === $tzstring ) {
$is_dst = date( 'I' ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date -- we are actually interested in the runtime timezone.
foreach ( timezone_abbreviations_list() as $abbr ) {
foreach ( $abbr as $city ) {
if ( $city['dst'] === $is_dst && $city['offset'] === $gmt_offset ) {
// If there's no valid timezone ID, keep looking.
if ( is_null( $city['timezone_id'] ) ) {
continue;
}
$tzstring = $city['timezone_id'];
break 2;
}
}
}
}
// If we still have no valid string, then fall back to UTC.
if ( false === $tzstring ) {
$tzstring = 'UTC';
}
}
}
self::$local_timezone = new DateTimeZone( $tzstring );
}
return self::$local_timezone;
}
}
woocommerce/action-scheduler/classes/abstracts/ActionScheduler_WPCLI_Command.php 0000644 00000004073 15153553404 0024131 0 ustar 00 <?php
/**
* Abstract for WP-CLI commands.
*/
abstract class ActionScheduler_WPCLI_Command extends \WP_CLI_Command {
const DATE_FORMAT = 'Y-m-d H:i:s O';
/**
* Keyed arguments.
*
* @var string[]
*/
protected $args;
/**
* Positional arguments.
*
* @var array<string, string>
*/
protected $assoc_args;
/**
* Construct.
*
* @param string[] $args Positional arguments.
* @param array<string, string> $assoc_args Keyed arguments.
* @throws \Exception When loading a CLI command file outside of WP CLI context.
*/
public function __construct( array $args, array $assoc_args ) {
if ( ! defined( 'WP_CLI' ) || ! constant( 'WP_CLI' ) ) {
/* translators: %s php class name */
throw new \Exception( sprintf( __( 'The %s class can only be run within WP CLI.', 'action-scheduler' ), get_class( $this ) ) );
}
$this->args = $args;
$this->assoc_args = $assoc_args;
}
/**
* Execute command.
*/
abstract public function execute();
/**
* Get the scheduled date in a human friendly format.
*
* @see ActionScheduler_ListTable::get_schedule_display_string()
* @param ActionScheduler_Schedule $schedule Schedule.
* @return string
*/
protected function get_schedule_display_string( ActionScheduler_Schedule $schedule ) {
$schedule_display_string = '';
if ( ! $schedule->get_date() ) {
return '0000-00-00 00:00:00';
}
$next_timestamp = $schedule->get_date()->getTimestamp();
$schedule_display_string .= $schedule->get_date()->format( static::DATE_FORMAT );
return $schedule_display_string;
}
/**
* Transforms arguments with '__' from CSV into expected arrays.
*
* @see \WP_CLI\CommandWithDBObject::process_csv_arguments_to_arrays()
* @link https://github.com/wp-cli/entity-command/blob/c270cc9a2367cb8f5845f26a6b5e203397c91392/src/WP_CLI/CommandWithDBObject.php#L99
* @return void
*/
protected function process_csv_arguments_to_arrays() {
foreach ( $this->assoc_args as $k => $v ) {
if ( false !== strpos( $k, '__' ) ) {
$this->assoc_args[ $k ] = explode( ',', $v );
}
}
}
}
woocommerce/action-scheduler/classes/actions/ActionScheduler_Action.php 0000644 00000007510 15153553404 0022503 0 ustar 00 <?php
/**
* Class ActionScheduler_Action
*/
class ActionScheduler_Action {
/**
* Action's hook.
*
* @var string
*/
protected $hook = '';
/**
* Action's args.
*
* @var array<string, mixed>
*/
protected $args = array();
/**
* Action's schedule.
*
* @var ActionScheduler_Schedule
*/
protected $schedule = null;
/**
* Action's group.
*
* @var string
*/
protected $group = '';
/**
* Priorities are conceptually similar to those used for regular WordPress actions.
* Like those, a lower priority takes precedence over a higher priority and the default
* is 10.
*
* Unlike regular WordPress actions, the priority of a scheduled action is strictly an
* integer and should be kept within the bounds 0-255 (anything outside the bounds will
* be brought back into the acceptable range).
*
* @var int
*/
protected $priority = 10;
/**
* Construct.
*
* @param string $hook Action's hook.
* @param mixed[] $args Action's arguments.
* @param null|ActionScheduler_Schedule $schedule Action's schedule.
* @param string $group Action's group.
*/
public function __construct( $hook, array $args = array(), ?ActionScheduler_Schedule $schedule = null, $group = '' ) {
$schedule = empty( $schedule ) ? new ActionScheduler_NullSchedule() : $schedule;
$this->set_hook( $hook );
$this->set_schedule( $schedule );
$this->set_args( $args );
$this->set_group( $group );
}
/**
* Executes the action.
*
* If no callbacks are registered, an exception will be thrown and the action will not be
* fired. This is useful to help detect cases where the code responsible for setting up
* a scheduled action no longer exists.
*
* @throws Exception If no callbacks are registered for this action.
*/
public function execute() {
$hook = $this->get_hook();
if ( ! has_action( $hook ) ) {
throw new Exception(
sprintf(
/* translators: 1: action hook. */
__( 'Scheduled action for %1$s will not be executed as no callbacks are registered.', 'action-scheduler' ),
$hook
)
);
}
do_action_ref_array( $hook, array_values( $this->get_args() ) );
}
/**
* Set action's hook.
*
* @param string $hook Action's hook.
*/
protected function set_hook( $hook ) {
$this->hook = $hook;
}
/**
* Get action's hook.
*/
public function get_hook() {
return $this->hook;
}
/**
* Set action's schedule.
*
* @param ActionScheduler_Schedule $schedule Action's schedule.
*/
protected function set_schedule( ActionScheduler_Schedule $schedule ) {
$this->schedule = $schedule;
}
/**
* Action's schedule.
*
* @return ActionScheduler_Schedule
*/
public function get_schedule() {
return $this->schedule;
}
/**
* Set action's args.
*
* @param mixed[] $args Action's arguments.
*/
protected function set_args( array $args ) {
$this->args = $args;
}
/**
* Get action's args.
*/
public function get_args() {
return $this->args;
}
/**
* Section action's group.
*
* @param string $group Action's group.
*/
protected function set_group( $group ) {
$this->group = $group;
}
/**
* Action's group.
*
* @return string
*/
public function get_group() {
return $this->group;
}
/**
* Action has not finished.
*
* @return bool
*/
public function is_finished() {
return false;
}
/**
* Sets the priority of the action.
*
* @param int $priority Priority level (lower is higher priority). Should be in the range 0-255.
*
* @return void
*/
public function set_priority( $priority ) {
if ( $priority < 0 ) {
$priority = 0;
} elseif ( $priority > 255 ) {
$priority = 255;
}
$this->priority = (int) $priority;
}
/**
* Gets the action priority.
*
* @return int
*/
public function get_priority() {
return $this->priority;
}
}
woocommerce/action-scheduler/classes/actions/ActionScheduler_CanceledAction.php 0000644 00000001563 15153553404 0024124 0 ustar 00 <?php
/**
* Class ActionScheduler_CanceledAction
*
* Stored action which was canceled and therefore acts like a finished action but should always return a null schedule,
* regardless of schedule passed to its constructor.
*/
class ActionScheduler_CanceledAction extends ActionScheduler_FinishedAction {
/**
* Construct.
*
* @param string $hook Action's hook.
* @param array $args Action's arguments.
* @param null|ActionScheduler_Schedule $schedule Action's schedule.
* @param string $group Action's group.
*/
public function __construct( $hook, array $args = array(), ?ActionScheduler_Schedule $schedule = null, $group = '' ) {
parent::__construct( $hook, $args, $schedule, $group );
if ( is_null( $schedule ) ) {
$this->set_schedule( new ActionScheduler_NullSchedule() );
}
}
}
woocommerce/action-scheduler/classes/actions/ActionScheduler_FinishedAction.php 0000644 00000000450 15153553404 0024151 0 ustar 00 <?php
/**
* Class ActionScheduler_FinishedAction
*/
class ActionScheduler_FinishedAction extends ActionScheduler_Action {
/**
* Execute action.
*/
public function execute() {
// don't execute.
}
/**
* Get finished state.
*/
public function is_finished() {
return true;
}
}
woocommerce/action-scheduler/classes/actions/ActionScheduler_NullAction.php 0000644 00000001131 15153553404 0023327 0 ustar 00 <?php
/**
* Class ActionScheduler_NullAction
*/
class ActionScheduler_NullAction extends ActionScheduler_Action {
/**
* Construct.
*
* @param string $hook Action hook.
* @param mixed[] $args Action arguments.
* @param null|ActionScheduler_Schedule $schedule Action schedule.
*/
public function __construct( $hook = '', array $args = array(), ?ActionScheduler_Schedule $schedule = null ) {
$this->set_schedule( new ActionScheduler_NullSchedule() );
}
/**
* Execute action.
*/
public function execute() {
// don't execute.
}
}
woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBLogger.php 0000644 00000010620 15153553404 0023475 0 ustar 00 <?php
/**
* Class ActionScheduler_DBLogger
*
* Action logs data table data store.
*
* @since 3.0.0
*/
class ActionScheduler_DBLogger extends ActionScheduler_Logger {
/**
* Add a record to an action log.
*
* @param int $action_id Action ID.
* @param string $message Message to be saved in the log entry.
* @param DateTime|null $date Timestamp of the log entry.
*
* @return int The log entry ID.
*/
public function log( $action_id, $message, ?DateTime $date = null ) {
if ( empty( $date ) ) {
$date = as_get_datetime_object();
} else {
$date = clone $date;
}
$date_gmt = $date->format( 'Y-m-d H:i:s' );
ActionScheduler_TimezoneHelper::set_local_timezone( $date );
$date_local = $date->format( 'Y-m-d H:i:s' );
/** @var \wpdb $wpdb */ //phpcs:ignore Generic.Commenting.DocComment.MissingShort
global $wpdb;
$wpdb->insert(
$wpdb->actionscheduler_logs,
array(
'action_id' => $action_id,
'message' => $message,
'log_date_gmt' => $date_gmt,
'log_date_local' => $date_local,
),
array( '%d', '%s', '%s', '%s' )
);
return $wpdb->insert_id;
}
/**
* Retrieve an action log entry.
*
* @param int $entry_id Log entry ID.
*
* @return ActionScheduler_LogEntry
*/
public function get_entry( $entry_id ) {
/** @var \wpdb $wpdb */ //phpcs:ignore Generic.Commenting.DocComment.MissingShort
global $wpdb;
$entry = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->actionscheduler_logs} WHERE log_id=%d", $entry_id ) );
return $this->create_entry_from_db_record( $entry );
}
/**
* Create an action log entry from a database record.
*
* @param object $record Log entry database record object.
*
* @return ActionScheduler_LogEntry
*/
private function create_entry_from_db_record( $record ) {
if ( empty( $record ) ) {
return new ActionScheduler_NullLogEntry();
}
if ( is_null( $record->log_date_gmt ) ) {
$date = as_get_datetime_object( ActionScheduler_StoreSchema::DEFAULT_DATE );
} else {
$date = as_get_datetime_object( $record->log_date_gmt );
}
return new ActionScheduler_LogEntry( $record->action_id, $record->message, $date );
}
/**
* Retrieve an action's log entries from the database.
*
* @param int $action_id Action ID.
*
* @return ActionScheduler_LogEntry[]
*/
public function get_logs( $action_id ) {
/** @var \wpdb $wpdb */ //phpcs:ignore Generic.Commenting.DocComment.MissingShort
global $wpdb;
$records = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->actionscheduler_logs} WHERE action_id=%d", $action_id ) );
return array_map( array( $this, 'create_entry_from_db_record' ), $records );
}
/**
* Initialize the data store.
*
* @codeCoverageIgnore
*/
public function init() {
$table_maker = new ActionScheduler_LoggerSchema();
$table_maker->init();
$table_maker->register_tables();
parent::init();
add_action( 'action_scheduler_deleted_action', array( $this, 'clear_deleted_action_logs' ), 10, 1 );
}
/**
* Delete the action logs for an action.
*
* @param int $action_id Action ID.
*/
public function clear_deleted_action_logs( $action_id ) {
/** @var \wpdb $wpdb */ //phpcs:ignore Generic.Commenting.DocComment.MissingShort
global $wpdb;
$wpdb->delete( $wpdb->actionscheduler_logs, array( 'action_id' => $action_id ), array( '%d' ) );
}
/**
* Bulk add cancel action log entries.
*
* @param array $action_ids List of action ID.
*/
public function bulk_log_cancel_actions( $action_ids ) {
if ( empty( $action_ids ) ) {
return;
}
/** @var \wpdb $wpdb */ //phpcs:ignore Generic.Commenting.DocComment.MissingShort
global $wpdb;
$date = as_get_datetime_object();
$date_gmt = $date->format( 'Y-m-d H:i:s' );
ActionScheduler_TimezoneHelper::set_local_timezone( $date );
$date_local = $date->format( 'Y-m-d H:i:s' );
$message = __( 'action canceled', 'action-scheduler' );
$format = '(%d, ' . $wpdb->prepare( '%s, %s, %s', $message, $date_gmt, $date_local ) . ')';
$sql_query = "INSERT {$wpdb->actionscheduler_logs} (action_id, message, log_date_gmt, log_date_local) VALUES ";
$value_rows = array();
foreach ( $action_ids as $action_id ) {
$value_rows[] = $wpdb->prepare( $format, $action_id ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
}
$sql_query .= implode( ',', $value_rows );
$wpdb->query( $sql_query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
}
}
woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php 0000644 00000114765 15153553404 0023371 0 ustar 00 <?php
/**
* Class ActionScheduler_DBStore
*
* Action data table data store.
*
* @since 3.0.0
*/
class ActionScheduler_DBStore extends ActionScheduler_Store {
/**
* Used to share information about the before_date property of claims internally.
*
* This is used in preference to passing the same information as a method param
* for backwards-compatibility reasons.
*
* @var DateTime|null
*/
private $claim_before_date = null;
/**
* Maximum length of args.
*
* @var int
*/
protected static $max_args_length = 8000;
/**
* Maximum length of index.
*
* @var int
*/
protected static $max_index_length = 191;
/**
* List of claim filters.
*
* @var array
*/
protected $claim_filters = array(
'group' => '',
'hooks' => '',
'exclude-groups' => '',
);
/**
* Initialize the data store
*
* @codeCoverageIgnore
*/
public function init() {
$table_maker = new ActionScheduler_StoreSchema();
$table_maker->init();
$table_maker->register_tables();
}
/**
* Save an action, checks if this is a unique action before actually saving.
*
* @param ActionScheduler_Action $action Action object.
* @param DateTime|null $scheduled_date Optional schedule date. Default null.
*
* @return int Action ID.
* @throws RuntimeException Throws exception when saving the action fails.
*/
public function save_unique_action( ActionScheduler_Action $action, ?DateTime $scheduled_date = null ) {
return $this->save_action_to_db( $action, $scheduled_date, true );
}
/**
* Save an action. Can save duplicate action as well, prefer using `save_unique_action` instead.
*
* @param ActionScheduler_Action $action Action object.
* @param DateTime|null $scheduled_date Optional schedule date. Default null.
*
* @return int Action ID.
* @throws RuntimeException Throws exception when saving the action fails.
*/
public function save_action( ActionScheduler_Action $action, ?DateTime $scheduled_date = null ) {
return $this->save_action_to_db( $action, $scheduled_date, false );
}
/**
* Save an action.
*
* @param ActionScheduler_Action $action Action object.
* @param ?DateTime $date Optional schedule date. Default null.
* @param bool $unique Whether the action should be unique.
*
* @return int Action ID.
* @throws \RuntimeException Throws exception when saving the action fails.
*/
private function save_action_to_db( ActionScheduler_Action $action, ?DateTime $date = null, $unique = false ) {
global $wpdb;
try {
$this->validate_action( $action );
$data = array(
'hook' => $action->get_hook(),
'status' => ( $action->is_finished() ? self::STATUS_COMPLETE : self::STATUS_PENDING ),
'scheduled_date_gmt' => $this->get_scheduled_date_string( $action, $date ),
'scheduled_date_local' => $this->get_scheduled_date_string_local( $action, $date ),
'schedule' => serialize( $action->get_schedule() ), // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize
'group_id' => current( $this->get_group_ids( $action->get_group() ) ),
'priority' => $action->get_priority(),
);
$args = wp_json_encode( $action->get_args() );
if ( strlen( $args ) <= static::$max_index_length ) {
$data['args'] = $args;
} else {
$data['args'] = $this->hash_args( $args );
$data['extended_args'] = $args;
}
$insert_sql = $this->build_insert_sql( $data, $unique );
// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- $insert_sql should be already prepared.
$wpdb->query( $insert_sql );
$action_id = $wpdb->insert_id;
if ( is_wp_error( $action_id ) ) {
throw new \RuntimeException( $action_id->get_error_message() );
} elseif ( empty( $action_id ) ) {
if ( $unique ) {
return 0;
}
throw new \RuntimeException( $wpdb->last_error ? $wpdb->last_error : __( 'Database error.', 'action-scheduler' ) );
}
do_action( 'action_scheduler_stored_action', $action_id );
return $action_id;
} catch ( \Exception $e ) {
/* translators: %s: error message */
throw new \RuntimeException( sprintf( __( 'Error saving action: %s', 'action-scheduler' ), $e->getMessage() ), 0 );
}
}
/**
* Helper function to build insert query.
*
* @param array $data Row data for action.
* @param bool $unique Whether the action should be unique.
*
* @return string Insert query.
*/
private function build_insert_sql( array $data, $unique ) {
global $wpdb;
$columns = array_keys( $data );
$values = array_values( $data );
$placeholders = array_map( array( $this, 'get_placeholder_for_column' ), $columns );
$table_name = ! empty( $wpdb->actionscheduler_actions ) ? $wpdb->actionscheduler_actions : $wpdb->prefix . 'actionscheduler_actions';
$column_sql = '`' . implode( '`, `', $columns ) . '`';
$placeholder_sql = implode( ', ', $placeholders );
$where_clause = $this->build_where_clause_for_insert( $data, $table_name, $unique );
// phpcs:disable WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- $column_sql and $where_clause are already prepared. $placeholder_sql is hardcoded.
$insert_query = $wpdb->prepare(
"
INSERT INTO $table_name ( $column_sql )
SELECT $placeholder_sql FROM DUAL
WHERE ( $where_clause ) IS NULL",
$values
);
// phpcs:enable
return $insert_query;
}
/**
* Helper method to build where clause for action insert statement.
*
* @param array $data Row data for action.
* @param string $table_name Action table name.
* @param bool $unique Where action should be unique.
*
* @return string Where clause to be used with insert.
*/
private function build_where_clause_for_insert( $data, $table_name, $unique ) {
global $wpdb;
if ( ! $unique ) {
return 'SELECT NULL FROM DUAL';
}
$pending_statuses = array(
ActionScheduler_Store::STATUS_PENDING,
ActionScheduler_Store::STATUS_RUNNING,
);
$pending_status_placeholders = implode( ', ', array_fill( 0, count( $pending_statuses ), '%s' ) );
// phpcs:disable WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber -- $pending_status_placeholders is hardcoded.
$where_clause = $wpdb->prepare(
"
SELECT action_id FROM $table_name
WHERE status IN ( $pending_status_placeholders )
AND hook = %s
AND `group_id` = %d
",
array_merge(
$pending_statuses,
array(
$data['hook'],
$data['group_id'],
)
)
);
// phpcs:enable
return "$where_clause" . ' LIMIT 1';
}
/**
* Helper method to get $wpdb->prepare placeholder for a given column name.
*
* @param string $column_name Name of column in actions table.
*
* @return string Placeholder to use for given column.
*/
private function get_placeholder_for_column( $column_name ) {
$string_columns = array(
'hook',
'status',
'scheduled_date_gmt',
'scheduled_date_local',
'args',
'schedule',
'last_attempt_gmt',
'last_attempt_local',
'extended_args',
);
return in_array( $column_name, $string_columns, true ) ? '%s' : '%d';
}
/**
* Generate a hash from json_encoded $args using MD5 as this isn't for security.
*
* @param string $args JSON encoded action args.
* @return string
*/
protected function hash_args( $args ) {
return md5( $args );
}
/**
* Get action args query param value from action args.
*
* @param array $args Action args.
* @return string
*/
protected function get_args_for_query( $args ) {
$encoded = wp_json_encode( $args );
if ( strlen( $encoded ) <= static::$max_index_length ) {
return $encoded;
}
return $this->hash_args( $encoded );
}
/**
* Get a group's ID based on its name/slug.
*
* @param string|array $slugs The string name of a group, or names for several groups.
* @param bool $create_if_not_exists Whether to create the group if it does not already exist. Default, true - create the group.
*
* @return array The group IDs, if they exist or were successfully created. May be empty.
*/
protected function get_group_ids( $slugs, $create_if_not_exists = true ) {
$slugs = (array) $slugs;
$group_ids = array();
if ( empty( $slugs ) ) {
return array();
}
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
foreach ( $slugs as $slug ) {
$group_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT group_id FROM {$wpdb->actionscheduler_groups} WHERE slug=%s", $slug ) );
if ( empty( $group_id ) && $create_if_not_exists ) {
$group_id = $this->create_group( $slug );
}
if ( $group_id ) {
$group_ids[] = $group_id;
}
}
return $group_ids;
}
/**
* Create an action group.
*
* @param string $slug Group slug.
*
* @return int Group ID.
*/
protected function create_group( $slug ) {
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
$wpdb->insert( $wpdb->actionscheduler_groups, array( 'slug' => $slug ) );
return (int) $wpdb->insert_id;
}
/**
* Retrieve an action.
*
* @param int $action_id Action ID.
*
* @return ActionScheduler_Action
*/
public function fetch_action( $action_id ) {
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
$data = $wpdb->get_row(
$wpdb->prepare(
"SELECT a.*, g.slug AS `group` FROM {$wpdb->actionscheduler_actions} a LEFT JOIN {$wpdb->actionscheduler_groups} g ON a.group_id=g.group_id WHERE a.action_id=%d",
$action_id
)
);
if ( empty( $data ) ) {
return $this->get_null_action();
}
if ( ! empty( $data->extended_args ) ) {
$data->args = $data->extended_args;
unset( $data->extended_args );
}
// Convert NULL dates to zero dates.
$date_fields = array(
'scheduled_date_gmt',
'scheduled_date_local',
'last_attempt_gmt',
'last_attempt_gmt',
);
foreach ( $date_fields as $date_field ) {
if ( is_null( $data->$date_field ) ) {
$data->$date_field = ActionScheduler_StoreSchema::DEFAULT_DATE;
}
}
try {
$action = $this->make_action_from_db_record( $data );
} catch ( ActionScheduler_InvalidActionException $exception ) {
do_action( 'action_scheduler_failed_fetch_action', $action_id, $exception );
return $this->get_null_action();
}
return $action;
}
/**
* Create a null action.
*
* @return ActionScheduler_NullAction
*/
protected function get_null_action() {
return new ActionScheduler_NullAction();
}
/**
* Create an action from a database record.
*
* @param object $data Action database record.
*
* @return ActionScheduler_Action|ActionScheduler_CanceledAction|ActionScheduler_FinishedAction
*/
protected function make_action_from_db_record( $data ) {
$hook = $data->hook;
$args = json_decode( $data->args, true );
$schedule = unserialize( $data->schedule ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_unserialize
$this->validate_args( $args, $data->action_id );
$this->validate_schedule( $schedule, $data->action_id );
if ( empty( $schedule ) ) {
$schedule = new ActionScheduler_NullSchedule();
}
$group = $data->group ? $data->group : '';
return ActionScheduler::factory()->get_stored_action( $data->status, $data->hook, $args, $schedule, $group, $data->priority );
}
/**
* Returns the SQL statement to query (or count) actions.
*
* @since 3.3.0 $query['status'] accepts array of statuses instead of a single status.
*
* @param array $query Filtering options.
* @param string $select_or_count Whether the SQL should select and return the IDs or just the row count.
*
* @return string SQL statement already properly escaped.
* @throws \InvalidArgumentException If the query is invalid.
* @throws \RuntimeException When "unknown partial args matching value".
*/
protected function get_query_actions_sql( array $query, $select_or_count = 'select' ) {
if ( ! in_array( $select_or_count, array( 'select', 'count' ), true ) ) {
throw new InvalidArgumentException( __( 'Invalid value for select or count parameter. Cannot query actions.', 'action-scheduler' ) );
}
$query = wp_parse_args(
$query,
array(
'hook' => '',
'args' => null,
'partial_args_matching' => 'off', // can be 'like' or 'json'.
'date' => null,
'date_compare' => '<=',
'modified' => null,
'modified_compare' => '<=',
'group' => '',
'status' => '',
'claimed' => null,
'per_page' => 5,
'offset' => 0,
'orderby' => 'date',
'order' => 'ASC',
)
);
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
$db_server_info = is_callable( array( $wpdb, 'db_server_info' ) ) ? $wpdb->db_server_info() : $wpdb->db_version();
if ( false !== strpos( $db_server_info, 'MariaDB' ) ) {
$supports_json = version_compare(
PHP_VERSION_ID >= 80016 ? $wpdb->db_version() : preg_replace( '/[^0-9.].*/', '', str_replace( '5.5.5-', '', $db_server_info ) ),
'10.2',
'>='
);
} else {
$supports_json = version_compare( $wpdb->db_version(), '5.7', '>=' );
}
$sql = ( 'count' === $select_or_count ) ? 'SELECT count(a.action_id)' : 'SELECT a.action_id';
$sql .= " FROM {$wpdb->actionscheduler_actions} a";
$sql_params = array();
if ( ! empty( $query['group'] ) || 'group' === $query['orderby'] ) {
$sql .= " LEFT JOIN {$wpdb->actionscheduler_groups} g ON g.group_id=a.group_id";
}
$sql .= ' WHERE 1=1';
if ( ! empty( $query['group'] ) ) {
$sql .= ' AND g.slug=%s';
$sql_params[] = $query['group'];
}
if ( ! empty( $query['hook'] ) ) {
$sql .= ' AND a.hook=%s';
$sql_params[] = $query['hook'];
}
if ( ! is_null( $query['args'] ) ) {
switch ( $query['partial_args_matching'] ) {
case 'json':
if ( ! $supports_json ) {
throw new \RuntimeException( __( 'JSON partial matching not supported in your environment. Please check your MySQL/MariaDB version.', 'action-scheduler' ) );
}
$supported_types = array(
'integer' => '%d',
'boolean' => '%s',
'double' => '%f',
'string' => '%s',
);
foreach ( $query['args'] as $key => $value ) {
$value_type = gettype( $value );
if ( 'boolean' === $value_type ) {
$value = $value ? 'true' : 'false';
}
$placeholder = isset( $supported_types[ $value_type ] ) ? $supported_types[ $value_type ] : false;
if ( ! $placeholder ) {
throw new \RuntimeException(
sprintf(
/* translators: %s: provided value type */
__( 'The value type for the JSON partial matching is not supported. Must be either integer, boolean, double or string. %s type provided.', 'action-scheduler' ),
$value_type
)
);
}
$sql .= ' AND JSON_EXTRACT(a.args, %s)=' . $placeholder;
$sql_params[] = '$.' . $key;
$sql_params[] = $value;
}
break;
case 'like':
foreach ( $query['args'] as $key => $value ) {
$sql .= ' AND a.args LIKE %s';
$json_partial = $wpdb->esc_like( trim( wp_json_encode( array( $key => $value ) ), '{}' ) );
$sql_params[] = "%{$json_partial}%";
}
break;
case 'off':
$sql .= ' AND a.args=%s';
$sql_params[] = $this->get_args_for_query( $query['args'] );
break;
default:
throw new \RuntimeException( __( 'Unknown partial args matching value.', 'action-scheduler' ) );
}
}
if ( $query['status'] ) {
$statuses = (array) $query['status'];
$placeholders = array_fill( 0, count( $statuses ), '%s' );
$sql .= ' AND a.status IN (' . join( ', ', $placeholders ) . ')';
$sql_params = array_merge( $sql_params, array_values( $statuses ) );
}
if ( $query['date'] instanceof \DateTime ) {
$date = clone $query['date'];
$date->setTimezone( new \DateTimeZone( 'UTC' ) );
$date_string = $date->format( 'Y-m-d H:i:s' );
$comparator = $this->validate_sql_comparator( $query['date_compare'] );
$sql .= " AND a.scheduled_date_gmt $comparator %s";
$sql_params[] = $date_string;
}
if ( $query['modified'] instanceof \DateTime ) {
$modified = clone $query['modified'];
$modified->setTimezone( new \DateTimeZone( 'UTC' ) );
$date_string = $modified->format( 'Y-m-d H:i:s' );
$comparator = $this->validate_sql_comparator( $query['modified_compare'] );
$sql .= " AND a.last_attempt_gmt $comparator %s";
$sql_params[] = $date_string;
}
if ( true === $query['claimed'] ) {
$sql .= ' AND a.claim_id != 0';
} elseif ( false === $query['claimed'] ) {
$sql .= ' AND a.claim_id = 0';
} elseif ( ! is_null( $query['claimed'] ) ) {
$sql .= ' AND a.claim_id = %d';
$sql_params[] = $query['claimed'];
}
if ( ! empty( $query['search'] ) ) {
$sql .= ' AND (a.hook LIKE %s OR (a.extended_args IS NULL AND a.args LIKE %s) OR a.extended_args LIKE %s';
for ( $i = 0; $i < 3; $i++ ) {
$sql_params[] = sprintf( '%%%s%%', $query['search'] );
}
$search_claim_id = (int) $query['search'];
if ( $search_claim_id ) {
$sql .= ' OR a.claim_id = %d';
$sql_params[] = $search_claim_id;
}
$sql .= ')';
}
if ( 'select' === $select_or_count ) {
if ( 'ASC' === strtoupper( $query['order'] ) ) {
$order = 'ASC';
} else {
$order = 'DESC';
}
switch ( $query['orderby'] ) {
case 'hook':
$sql .= " ORDER BY a.hook $order";
break;
case 'group':
$sql .= " ORDER BY g.slug $order";
break;
case 'modified':
$sql .= " ORDER BY a.last_attempt_gmt $order";
break;
case 'none':
break;
case 'action_id':
$sql .= " ORDER BY a.action_id $order";
break;
case 'date':
default:
$sql .= " ORDER BY a.scheduled_date_gmt $order";
break;
}
if ( $query['per_page'] > 0 ) {
$sql .= ' LIMIT %d, %d';
$sql_params[] = $query['offset'];
$sql_params[] = $query['per_page'];
}
}
if ( ! empty( $sql_params ) ) {
$sql = $wpdb->prepare( $sql, $sql_params ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
}
return $sql;
}
/**
* Query for action count or list of action IDs.
*
* @since 3.3.0 $query['status'] accepts array of statuses instead of a single status.
*
* @see ActionScheduler_Store::query_actions for $query arg usage.
*
* @param array $query Query filtering options.
* @param string $query_type Whether to select or count the results. Defaults to select.
*
* @return string|array|null The IDs of actions matching the query. Null on failure.
*/
public function query_actions( $query = array(), $query_type = 'select' ) {
/**
* Global.
*
* @var wpdb $wpdb
*/
global $wpdb;
$sql = $this->get_query_actions_sql( $query, $query_type );
return ( 'count' === $query_type ) ? $wpdb->get_var( $sql ) : $wpdb->get_col( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.NoSql, WordPress.DB.DirectDatabaseQuery.NoCaching
}
/**
* Get a count of all actions in the store, grouped by status.
*
* @return array Set of 'status' => int $count pairs for statuses with 1 or more actions of that status.
*/
public function action_counts() {
global $wpdb;
$sql = "SELECT a.status, count(a.status) as 'count'";
$sql .= " FROM {$wpdb->actionscheduler_actions} a";
$sql .= ' GROUP BY a.status';
$actions_count_by_status = array();
$action_stati_and_labels = $this->get_status_labels();
foreach ( $wpdb->get_results( $sql ) as $action_data ) { // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
// Ignore any actions with invalid status.
if ( array_key_exists( $action_data->status, $action_stati_and_labels ) ) {
$actions_count_by_status[ $action_data->status ] = $action_data->count;
}
}
return $actions_count_by_status;
}
/**
* Cancel an action.
*
* @param int $action_id Action ID.
*
* @return void
* @throws \InvalidArgumentException If the action update failed.
*/
public function cancel_action( $action_id ) {
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
$updated = $wpdb->update(
$wpdb->actionscheduler_actions,
array( 'status' => self::STATUS_CANCELED ),
array( 'action_id' => $action_id ),
array( '%s' ),
array( '%d' )
);
if ( false === $updated ) {
/* translators: %s: action ID */
throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to cancel this action. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) );
}
do_action( 'action_scheduler_canceled_action', $action_id );
}
/**
* Cancel pending actions by hook.
*
* @since 3.0.0
*
* @param string $hook Hook name.
*
* @return void
*/
public function cancel_actions_by_hook( $hook ) {
$this->bulk_cancel_actions( array( 'hook' => $hook ) );
}
/**
* Cancel pending actions by group.
*
* @param string $group Group slug.
*
* @return void
*/
public function cancel_actions_by_group( $group ) {
$this->bulk_cancel_actions( array( 'group' => $group ) );
}
/**
* Bulk cancel actions.
*
* @since 3.0.0
*
* @param array $query_args Query parameters.
*/
protected function bulk_cancel_actions( $query_args ) {
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
if ( ! is_array( $query_args ) ) {
return;
}
// Don't cancel actions that are already canceled.
if ( isset( $query_args['status'] ) && self::STATUS_CANCELED === $query_args['status'] ) {
return;
}
$action_ids = true;
$query_args = wp_parse_args(
$query_args,
array(
'per_page' => 1000,
'status' => self::STATUS_PENDING,
'orderby' => 'none',
)
);
while ( $action_ids ) {
$action_ids = $this->query_actions( $query_args );
if ( empty( $action_ids ) ) {
break;
}
$format = array_fill( 0, count( $action_ids ), '%d' );
$query_in = '(' . implode( ',', $format ) . ')';
$parameters = $action_ids;
array_unshift( $parameters, self::STATUS_CANCELED );
$wpdb->query(
$wpdb->prepare(
"UPDATE {$wpdb->actionscheduler_actions} SET status = %s WHERE action_id IN {$query_in}", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
$parameters
)
);
do_action( 'action_scheduler_bulk_cancel_actions', $action_ids );
}
}
/**
* Delete an action.
*
* @param int $action_id Action ID.
* @throws \InvalidArgumentException If the action deletion failed.
*/
public function delete_action( $action_id ) {
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
$deleted = $wpdb->delete( $wpdb->actionscheduler_actions, array( 'action_id' => $action_id ), array( '%d' ) );
if ( empty( $deleted ) ) {
/* translators: %s is the action ID */
throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to delete this action. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) );
}
do_action( 'action_scheduler_deleted_action', $action_id );
}
/**
* Get the schedule date for an action.
*
* @param string $action_id Action ID.
*
* @return \DateTime The local date the action is scheduled to run, or the date that it ran.
*/
public function get_date( $action_id ) {
$date = $this->get_date_gmt( $action_id );
ActionScheduler_TimezoneHelper::set_local_timezone( $date );
return $date;
}
/**
* Get the GMT schedule date for an action.
*
* @param int $action_id Action ID.
*
* @throws \InvalidArgumentException If action cannot be identified.
* @return \DateTime The GMT date the action is scheduled to run, or the date that it ran.
*/
protected function get_date_gmt( $action_id ) {
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
$record = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->actionscheduler_actions} WHERE action_id=%d", $action_id ) );
if ( empty( $record ) ) {
/* translators: %s is the action ID */
throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to determine the date of this action. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) );
}
if ( self::STATUS_PENDING === $record->status ) {
return as_get_datetime_object( $record->scheduled_date_gmt );
} else {
return as_get_datetime_object( $record->last_attempt_gmt );
}
}
/**
* Stake a claim on actions.
*
* @param int $max_actions Maximum number of action to include in claim.
* @param DateTime|null $before_date Jobs must be schedule before this date. Defaults to now.
* @param array $hooks Hooks to filter for.
* @param string $group Group to filter for.
*
* @return ActionScheduler_ActionClaim
*/
public function stake_claim( $max_actions = 10, ?DateTime $before_date = null, $hooks = array(), $group = '' ) {
$claim_id = $this->generate_claim_id();
$this->claim_before_date = $before_date;
$this->claim_actions( $claim_id, $max_actions, $before_date, $hooks, $group );
$action_ids = $this->find_actions_by_claim_id( $claim_id );
$this->claim_before_date = null;
return new ActionScheduler_ActionClaim( $claim_id, $action_ids );
}
/**
* Generate a new action claim.
*
* @return int Claim ID.
*/
protected function generate_claim_id() {
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
$now = as_get_datetime_object();
$wpdb->insert( $wpdb->actionscheduler_claims, array( 'date_created_gmt' => $now->format( 'Y-m-d H:i:s' ) ) );
return $wpdb->insert_id;
}
/**
* Set a claim filter.
*
* @param string $filter_name Claim filter name.
* @param mixed $filter_values Values to filter.
* @return void
*/
public function set_claim_filter( $filter_name, $filter_values ) {
if ( isset( $this->claim_filters[ $filter_name ] ) ) {
$this->claim_filters[ $filter_name ] = $filter_values;
}
}
/**
* Get the claim filter value.
*
* @param string $filter_name Claim filter name.
* @return mixed
*/
public function get_claim_filter( $filter_name ) {
if ( isset( $this->claim_filters[ $filter_name ] ) ) {
return $this->claim_filters[ $filter_name ];
}
return '';
}
/**
* Mark actions claimed.
*
* @param string $claim_id Claim Id.
* @param int $limit Number of action to include in claim.
* @param DateTime|null $before_date Should use UTC timezone.
* @param array $hooks Hooks to filter for.
* @param string $group Group to filter for.
*
* @return int The number of actions that were claimed.
* @throws \InvalidArgumentException Throws InvalidArgumentException if group doesn't exist.
* @throws \RuntimeException Throws RuntimeException if unable to claim action.
*/
protected function claim_actions( $claim_id, $limit, ?DateTime $before_date = null, $hooks = array(), $group = '' ) {
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
$now = as_get_datetime_object();
$date = is_null( $before_date ) ? $now : clone $before_date;
// can't use $wpdb->update() because of the <= condition.
$update = "UPDATE {$wpdb->actionscheduler_actions} SET claim_id=%d, last_attempt_gmt=%s, last_attempt_local=%s";
$params = array(
$claim_id,
$now->format( 'Y-m-d H:i:s' ),
current_time( 'mysql' ),
);
// Set claim filters.
if ( ! empty( $hooks ) ) {
$this->set_claim_filter( 'hooks', $hooks );
} else {
$hooks = $this->get_claim_filter( 'hooks' );
}
if ( ! empty( $group ) ) {
$this->set_claim_filter( 'group', $group );
} else {
$group = $this->get_claim_filter( 'group' );
}
$where = 'WHERE claim_id = 0 AND scheduled_date_gmt <= %s AND status=%s';
$params[] = $date->format( 'Y-m-d H:i:s' );
$params[] = self::STATUS_PENDING;
if ( ! empty( $hooks ) ) {
$placeholders = array_fill( 0, count( $hooks ), '%s' );
$where .= ' AND hook IN (' . join( ', ', $placeholders ) . ')';
$params = array_merge( $params, array_values( $hooks ) );
}
$group_operator = 'IN';
if ( empty( $group ) ) {
$group = $this->get_claim_filter( 'exclude-groups' );
$group_operator = 'NOT IN';
}
if ( ! empty( $group ) ) {
$group_ids = $this->get_group_ids( $group, false );
// throw exception if no matching group(s) found, this matches ActionScheduler_wpPostStore's behaviour.
if ( empty( $group_ids ) ) {
throw new InvalidArgumentException(
sprintf(
/* translators: %s: group name(s) */
_n(
'The group "%s" does not exist.',
'The groups "%s" do not exist.',
is_array( $group ) ? count( $group ) : 1,
'action-scheduler'
),
$group
)
);
}
$id_list = implode( ',', array_map( 'intval', $group_ids ) );
$where .= " AND group_id {$group_operator} ( $id_list )";
}
/**
* Sets the order-by clause used in the action claim query.
*
* @since 3.4.0
* @since 3.8.3 Made $claim_id and $hooks available.
*
* @param string $order_by_sql
* @param string $claim_id Claim Id.
* @param array $hooks Hooks to filter for.
*/
$order = apply_filters( 'action_scheduler_claim_actions_order_by', 'ORDER BY priority ASC, attempts ASC, scheduled_date_gmt ASC, action_id ASC', $claim_id, $hooks );
$params[] = $limit;
$sql = $wpdb->prepare( "{$update} {$where} {$order} LIMIT %d", $params ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders
$rows_affected = $wpdb->query( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
if ( false === $rows_affected ) {
$error = empty( $wpdb->last_error )
? _x( 'unknown', 'database error', 'action-scheduler' )
: $wpdb->last_error;
throw new \RuntimeException(
sprintf(
/* translators: %s database error. */
__( 'Unable to claim actions. Database error: %s.', 'action-scheduler' ),
$error
)
);
}
return (int) $rows_affected;
}
/**
* Get the number of active claims.
*
* @return int
*/
public function get_claim_count() {
global $wpdb;
$sql = "SELECT COUNT(DISTINCT claim_id) FROM {$wpdb->actionscheduler_actions} WHERE claim_id != 0 AND status IN ( %s, %s)";
$sql = $wpdb->prepare( $sql, array( self::STATUS_PENDING, self::STATUS_RUNNING ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
return (int) $wpdb->get_var( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
}
/**
* Return an action's claim ID, as stored in the claim_id column.
*
* @param string $action_id Action ID.
* @return mixed
*/
public function get_claim_id( $action_id ) {
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
$sql = "SELECT claim_id FROM {$wpdb->actionscheduler_actions} WHERE action_id=%d";
$sql = $wpdb->prepare( $sql, $action_id ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
return (int) $wpdb->get_var( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
}
/**
* Retrieve the action IDs of action in a claim.
*
* @param int $claim_id Claim ID.
* @return int[]
*/
public function find_actions_by_claim_id( $claim_id ) {
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
$action_ids = array();
$before_date = isset( $this->claim_before_date ) ? $this->claim_before_date : as_get_datetime_object();
$cut_off = $before_date->format( 'Y-m-d H:i:s' );
$sql = $wpdb->prepare(
"SELECT action_id, scheduled_date_gmt FROM {$wpdb->actionscheduler_actions} WHERE claim_id = %d ORDER BY priority ASC, attempts ASC, scheduled_date_gmt ASC, action_id ASC",
$claim_id
);
// Verify that the scheduled date for each action is within the expected bounds (in some unusual
// cases, we cannot depend on MySQL to honor all of the WHERE conditions we specify).
foreach ( $wpdb->get_results( $sql ) as $claimed_action ) { // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
if ( $claimed_action->scheduled_date_gmt <= $cut_off ) {
$action_ids[] = absint( $claimed_action->action_id );
}
}
return $action_ids;
}
/**
* Release actions from a claim and delete the claim.
*
* @param ActionScheduler_ActionClaim $claim Claim object.
* @throws \RuntimeException When unable to release actions from claim.
*/
public function release_claim( ActionScheduler_ActionClaim $claim ) {
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
/**
* Deadlock warning: This function modifies actions to release them from claims that have been processed. Earlier, we used to it in a atomic query, i.e. we would update all actions belonging to a particular claim_id with claim_id = 0.
* While this was functionally correct, it would cause deadlock, since this update query will hold a lock on the claim_id_.. index on the action table.
* This allowed the possibility of a race condition, where the claimer query is also running at the same time, then the claimer query will also try to acquire a lock on the claim_id_.. index, and in this case if claim release query has already progressed to the point of acquiring the lock, but have not updated yet, it would cause a deadlock.
*
* We resolve this by getting all the actions_id that we want to release claim from in a separate query, and then releasing the claim on each of them. This way, our lock is acquired on the action_id index instead of the claim_id index. Note that the lock on claim_id will still be acquired, but it will only when we actually make the update, rather than when we select the actions.
*/
$action_ids = $wpdb->get_col( $wpdb->prepare( "SELECT action_id FROM {$wpdb->actionscheduler_actions} WHERE claim_id = %d", $claim->get_id() ) );
$row_updates = 0;
if ( count( $action_ids ) > 0 ) {
$action_id_string = implode( ',', array_map( 'absint', $action_ids ) );
$row_updates = $wpdb->query( "UPDATE {$wpdb->actionscheduler_actions} SET claim_id = 0 WHERE action_id IN ({$action_id_string})" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
}
$wpdb->delete( $wpdb->actionscheduler_claims, array( 'claim_id' => $claim->get_id() ), array( '%d' ) );
if ( $row_updates < count( $action_ids ) ) {
throw new RuntimeException(
sprintf(
// translators: %d is an id.
__( 'Unable to release actions from claim id %d.', 'action-scheduler' ),
$claim->get_id()
)
);
}
}
/**
* Remove the claim from an action.
*
* @param int $action_id Action ID.
*
* @return void
*/
public function unclaim_action( $action_id ) {
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
$wpdb->update(
$wpdb->actionscheduler_actions,
array( 'claim_id' => 0 ),
array( 'action_id' => $action_id ),
array( '%s' ),
array( '%d' )
);
}
/**
* Mark an action as failed.
*
* @param int $action_id Action ID.
* @throws \InvalidArgumentException Throw an exception if action was not updated.
*/
public function mark_failure( $action_id ) {
/**
* Global.
* @var \wpdb $wpdb
*/
global $wpdb;
$updated = $wpdb->update(
$wpdb->actionscheduler_actions,
array( 'status' => self::STATUS_FAILED ),
array( 'action_id' => $action_id ),
array( '%s' ),
array( '%d' )
);
if ( empty( $updated ) ) {
/* translators: %s is the action ID */
throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to mark this action as having failed. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) );
}
}
/**
* Add execution message to action log.
*
* @throws Exception If the action status cannot be updated to self::STATUS_RUNNING ('in-progress').
*
* @param int $action_id Action ID.
*
* @return void
*/
public function log_execution( $action_id ) {
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
$sql = "UPDATE {$wpdb->actionscheduler_actions} SET attempts = attempts+1, status=%s, last_attempt_gmt = %s, last_attempt_local = %s WHERE action_id = %d";
$sql = $wpdb->prepare( $sql, self::STATUS_RUNNING, current_time( 'mysql', true ), current_time( 'mysql' ), $action_id ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
$status_updated = $wpdb->query( $sql );
if ( ! $status_updated ) {
throw new Exception(
sprintf(
/* translators: 1: action ID. 2: status slug. */
__( 'Unable to update the status of action %1$d to %2$s.', 'action-scheduler' ),
$action_id,
self::STATUS_RUNNING
)
);
}
}
/**
* Mark an action as complete.
*
* @param int $action_id Action ID.
*
* @return void
* @throws \InvalidArgumentException Throw an exception if action was not updated.
*/
public function mark_complete( $action_id ) {
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
$updated = $wpdb->update(
$wpdb->actionscheduler_actions,
array(
'status' => self::STATUS_COMPLETE,
'last_attempt_gmt' => current_time( 'mysql', true ),
'last_attempt_local' => current_time( 'mysql' ),
),
array( 'action_id' => $action_id ),
array( '%s' ),
array( '%d' )
);
if ( empty( $updated ) ) {
/* translators: %s is the action ID */
throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to mark this action as having completed. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) );
}
/**
* Fires after a scheduled action has been completed.
*
* @since 3.4.2
*
* @param int $action_id Action ID.
*/
do_action( 'action_scheduler_completed_action', $action_id );
}
/**
* Get an action's status.
*
* @param int $action_id Action ID.
*
* @return string
* @throws \InvalidArgumentException Throw an exception if not status was found for action_id.
* @throws \RuntimeException Throw an exception if action status could not be retrieved.
*/
public function get_status( $action_id ) {
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
$sql = "SELECT status FROM {$wpdb->actionscheduler_actions} WHERE action_id=%d";
$sql = $wpdb->prepare( $sql, $action_id ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
$status = $wpdb->get_var( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
if ( is_null( $status ) ) {
throw new \InvalidArgumentException( __( 'Invalid action ID. No status found.', 'action-scheduler' ) );
} elseif ( empty( $status ) ) {
throw new \RuntimeException( __( 'Unknown status found for action.', 'action-scheduler' ) );
} else {
return $status;
}
}
}
woocommerce/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php 0000644 00000030557 15153553404 0024321 0 ustar 00 <?php
use ActionScheduler_Store as Store;
use Action_Scheduler\Migration\Runner;
use Action_Scheduler\Migration\Config;
use Action_Scheduler\Migration\Controller;
/**
* Class ActionScheduler_HybridStore
*
* A wrapper around multiple stores that fetches data from both.
*
* @since 3.0.0
*/
class ActionScheduler_HybridStore extends Store {
const DEMARKATION_OPTION = 'action_scheduler_hybrid_store_demarkation';
/**
* Primary store instance.
*
* @var ActionScheduler_Store
*/
private $primary_store;
/**
* Secondary store instance.
*
* @var ActionScheduler_Store
*/
private $secondary_store;
/**
* Runner instance.
*
* @var Action_Scheduler\Migration\Runner
*/
private $migration_runner;
/**
* The dividing line between IDs of actions created
* by the primary and secondary stores.
*
* @var int
*
* Methods that accept an action ID will compare the ID against
* this to determine which store will contain that ID. In almost
* all cases, the ID should come from the primary store, but if
* client code is bypassing the API functions and fetching IDs
* from elsewhere, then there is a chance that an unmigrated ID
* might be requested.
*/
private $demarkation_id = 0;
/**
* ActionScheduler_HybridStore constructor.
*
* @param Config|null $config Migration config object.
*/
public function __construct( ?Config $config = null ) {
$this->demarkation_id = (int) get_option( self::DEMARKATION_OPTION, 0 );
if ( empty( $config ) ) {
$config = Controller::instance()->get_migration_config_object();
}
$this->primary_store = $config->get_destination_store();
$this->secondary_store = $config->get_source_store();
$this->migration_runner = new Runner( $config );
}
/**
* Initialize the table data store tables.
*
* @codeCoverageIgnore
*/
public function init() {
add_action( 'action_scheduler/created_table', array( $this, 'set_autoincrement' ), 10, 2 );
$this->primary_store->init();
$this->secondary_store->init();
remove_action( 'action_scheduler/created_table', array( $this, 'set_autoincrement' ), 10 );
}
/**
* When the actions table is created, set its autoincrement
* value to be one higher than the posts table to ensure that
* there are no ID collisions.
*
* @param string $table_name Table name.
* @param string $table_suffix Suffix of table name.
*
* @return void
* @codeCoverageIgnore
*/
public function set_autoincrement( $table_name, $table_suffix ) {
if ( ActionScheduler_StoreSchema::ACTIONS_TABLE === $table_suffix ) {
if ( empty( $this->demarkation_id ) ) {
$this->demarkation_id = $this->set_demarkation_id();
}
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
/**
* A default date of '0000-00-00 00:00:00' is invalid in MySQL 5.7 when configured with
* sql_mode including both STRICT_TRANS_TABLES and NO_ZERO_DATE.
*/
$default_date = new DateTime( 'tomorrow' );
$null_action = new ActionScheduler_NullAction();
$date_gmt = $this->get_scheduled_date_string( $null_action, $default_date );
$date_local = $this->get_scheduled_date_string_local( $null_action, $default_date );
$row_count = $wpdb->insert(
$wpdb->{ActionScheduler_StoreSchema::ACTIONS_TABLE},
array(
'action_id' => $this->demarkation_id,
'hook' => '',
'status' => '',
'scheduled_date_gmt' => $date_gmt,
'scheduled_date_local' => $date_local,
'last_attempt_gmt' => $date_gmt,
'last_attempt_local' => $date_local,
)
);
if ( $row_count > 0 ) {
$wpdb->delete(
$wpdb->{ActionScheduler_StoreSchema::ACTIONS_TABLE},
array( 'action_id' => $this->demarkation_id )
);
}
}
}
/**
* Store the demarkation id in WP options.
*
* @param int $id The ID to set as the demarkation point between the two stores
* Leave null to use the next ID from the WP posts table.
*
* @return int The new ID.
*
* @codeCoverageIgnore
*/
private function set_demarkation_id( $id = null ) {
if ( empty( $id ) ) {
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
$id = (int) $wpdb->get_var( "SELECT MAX(ID) FROM $wpdb->posts" );
$id++;
}
update_option( self::DEMARKATION_OPTION, $id );
return $id;
}
/**
* Find the first matching action from the secondary store.
* If it exists, migrate it to the primary store immediately.
* After it migrates, the secondary store will logically contain
* the next matching action, so return the result thence.
*
* @param string $hook Action's hook.
* @param array $params Action's arguments.
*
* @return string
*/
public function find_action( $hook, $params = array() ) {
$found_unmigrated_action = $this->secondary_store->find_action( $hook, $params );
if ( ! empty( $found_unmigrated_action ) ) {
$this->migrate( array( $found_unmigrated_action ) );
}
return $this->primary_store->find_action( $hook, $params );
}
/**
* Find actions matching the query in the secondary source first.
* If any are found, migrate them immediately. Then the secondary
* store will contain the canonical results.
*
* @param array $query Query arguments.
* @param string $query_type Whether to select or count the results. Default, select.
*
* @return int[]
*/
public function query_actions( $query = array(), $query_type = 'select' ) {
$found_unmigrated_actions = $this->secondary_store->query_actions( $query, 'select' );
if ( ! empty( $found_unmigrated_actions ) ) {
$this->migrate( $found_unmigrated_actions );
}
return $this->primary_store->query_actions( $query, $query_type );
}
/**
* Get a count of all actions in the store, grouped by status
*
* @return array Set of 'status' => int $count pairs for statuses with 1 or more actions of that status.
*/
public function action_counts() {
$unmigrated_actions_count = $this->secondary_store->action_counts();
$migrated_actions_count = $this->primary_store->action_counts();
$actions_count_by_status = array();
foreach ( $this->get_status_labels() as $status_key => $status_label ) {
$count = 0;
if ( isset( $unmigrated_actions_count[ $status_key ] ) ) {
$count += $unmigrated_actions_count[ $status_key ];
}
if ( isset( $migrated_actions_count[ $status_key ] ) ) {
$count += $migrated_actions_count[ $status_key ];
}
$actions_count_by_status[ $status_key ] = $count;
}
$actions_count_by_status = array_filter( $actions_count_by_status );
return $actions_count_by_status;
}
/**
* If any actions would have been claimed by the secondary store,
* migrate them immediately, then ask the primary store for the
* canonical claim.
*
* @param int $max_actions Maximum number of actions to claim.
* @param null|DateTime $before_date Latest timestamp of actions to claim.
* @param string[] $hooks Hook of actions to claim.
* @param string $group Group of actions to claim.
*
* @return ActionScheduler_ActionClaim
*/
public function stake_claim( $max_actions = 10, ?DateTime $before_date = null, $hooks = array(), $group = '' ) {
$claim = $this->secondary_store->stake_claim( $max_actions, $before_date, $hooks, $group );
$claimed_actions = $claim->get_actions();
if ( ! empty( $claimed_actions ) ) {
$this->migrate( $claimed_actions );
}
$this->secondary_store->release_claim( $claim );
return $this->primary_store->stake_claim( $max_actions, $before_date, $hooks, $group );
}
/**
* Migrate a list of actions to the table data store.
*
* @param array $action_ids List of action IDs.
*/
private function migrate( $action_ids ) {
$this->migration_runner->migrate_actions( $action_ids );
}
/**
* Save an action to the primary store.
*
* @param ActionScheduler_Action $action Action object to be saved.
* @param DateTime|null $date Optional. Schedule date. Default null.
*
* @return int The action ID
*/
public function save_action( ActionScheduler_Action $action, ?DateTime $date = null ) {
return $this->primary_store->save_action( $action, $date );
}
/**
* Retrieve an existing action whether migrated or not.
*
* @param int $action_id Action ID.
*/
public function fetch_action( $action_id ) {
$store = $this->get_store_from_action_id( $action_id, true );
if ( $store ) {
return $store->fetch_action( $action_id );
} else {
return new ActionScheduler_NullAction();
}
}
/**
* Cancel an existing action whether migrated or not.
*
* @param int $action_id Action ID.
*/
public function cancel_action( $action_id ) {
$store = $this->get_store_from_action_id( $action_id );
if ( $store ) {
$store->cancel_action( $action_id );
}
}
/**
* Delete an existing action whether migrated or not.
*
* @param int $action_id Action ID.
*/
public function delete_action( $action_id ) {
$store = $this->get_store_from_action_id( $action_id );
if ( $store ) {
$store->delete_action( $action_id );
}
}
/**
* Get the schedule date an existing action whether migrated or not.
*
* @param int $action_id Action ID.
*/
public function get_date( $action_id ) {
$store = $this->get_store_from_action_id( $action_id );
if ( $store ) {
return $store->get_date( $action_id );
} else {
return null;
}
}
/**
* Mark an existing action as failed whether migrated or not.
*
* @param int $action_id Action ID.
*/
public function mark_failure( $action_id ) {
$store = $this->get_store_from_action_id( $action_id );
if ( $store ) {
$store->mark_failure( $action_id );
}
}
/**
* Log the execution of an existing action whether migrated or not.
*
* @param int $action_id Action ID.
*/
public function log_execution( $action_id ) {
$store = $this->get_store_from_action_id( $action_id );
if ( $store ) {
$store->log_execution( $action_id );
}
}
/**
* Mark an existing action complete whether migrated or not.
*
* @param int $action_id Action ID.
*/
public function mark_complete( $action_id ) {
$store = $this->get_store_from_action_id( $action_id );
if ( $store ) {
$store->mark_complete( $action_id );
}
}
/**
* Get an existing action status whether migrated or not.
*
* @param int $action_id Action ID.
*/
public function get_status( $action_id ) {
$store = $this->get_store_from_action_id( $action_id );
if ( $store ) {
return $store->get_status( $action_id );
}
return null;
}
/**
* Return which store an action is stored in.
*
* @param int $action_id ID of the action.
* @param bool $primary_first Optional flag indicating search the primary store first.
* @return ActionScheduler_Store
*/
protected function get_store_from_action_id( $action_id, $primary_first = false ) {
if ( $primary_first ) {
$stores = array(
$this->primary_store,
$this->secondary_store,
);
} elseif ( $action_id < $this->demarkation_id ) {
$stores = array(
$this->secondary_store,
$this->primary_store,
);
} else {
$stores = array(
$this->primary_store,
);
}
foreach ( $stores as $store ) {
$action = $store->fetch_action( $action_id );
if ( ! is_a( $action, 'ActionScheduler_NullAction' ) ) {
return $store;
}
}
return null;
}
/**
* * * * * * * * * * * * * * * * * * * * * * * * * * *
* All claim-related functions should operate solely
* on the primary store.
* * * * * * * * * * * * * * * * * * * * * * * * * * *
*/
/**
* Get the claim count from the table data store.
*/
public function get_claim_count() {
return $this->primary_store->get_claim_count();
}
/**
* Retrieve the claim ID for an action from the table data store.
*
* @param int $action_id Action ID.
*/
public function get_claim_id( $action_id ) {
return $this->primary_store->get_claim_id( $action_id );
}
/**
* Release a claim in the table data store.
*
* @param ActionScheduler_ActionClaim $claim Claim object.
*/
public function release_claim( ActionScheduler_ActionClaim $claim ) {
$this->primary_store->release_claim( $claim );
}
/**
* Release claims on an action in the table data store.
*
* @param int $action_id Action ID.
*/
public function unclaim_action( $action_id ) {
$this->primary_store->unclaim_action( $action_id );
}
/**
* Retrieve a list of action IDs by claim.
*
* @param int $claim_id Claim ID.
*/
public function find_actions_by_claim_id( $claim_id ) {
return $this->primary_store->find_actions_by_claim_id( $claim_id );
}
}
woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpCommentLogger.php 0000644 00000017033 15153553404 0025166 0 ustar 00 <?php
/**
* Class ActionScheduler_wpCommentLogger
*/
class ActionScheduler_wpCommentLogger extends ActionScheduler_Logger {
const AGENT = 'ActionScheduler';
const TYPE = 'action_log';
/**
* Create log entry.
*
* @param string $action_id Action ID.
* @param string $message Action log's message.
* @param DateTime|null $date Action log's timestamp.
*
* @return string The log entry ID
*/
public function log( $action_id, $message, ?DateTime $date = null ) {
if ( empty( $date ) ) {
$date = as_get_datetime_object();
} else {
$date = as_get_datetime_object( clone $date );
}
$comment_id = $this->create_wp_comment( $action_id, $message, $date );
return $comment_id;
}
/**
* Create comment.
*
* @param int $action_id Action ID.
* @param string $message Action log's message.
* @param DateTime $date Action log entry's timestamp.
*/
protected function create_wp_comment( $action_id, $message, DateTime $date ) {
$comment_date_gmt = $date->format( 'Y-m-d H:i:s' );
ActionScheduler_TimezoneHelper::set_local_timezone( $date );
$comment_data = array(
'comment_post_ID' => $action_id,
'comment_date' => $date->format( 'Y-m-d H:i:s' ),
'comment_date_gmt' => $comment_date_gmt,
'comment_author' => self::AGENT,
'comment_content' => $message,
'comment_agent' => self::AGENT,
'comment_type' => self::TYPE,
);
return wp_insert_comment( $comment_data );
}
/**
* Get single log entry for action.
*
* @param string $entry_id Entry ID.
*
* @return ActionScheduler_LogEntry
*/
public function get_entry( $entry_id ) {
$comment = $this->get_comment( $entry_id );
if ( empty( $comment ) || self::TYPE !== $comment->comment_type ) {
return new ActionScheduler_NullLogEntry();
}
$date = as_get_datetime_object( $comment->comment_date_gmt );
ActionScheduler_TimezoneHelper::set_local_timezone( $date );
return new ActionScheduler_LogEntry( $comment->comment_post_ID, $comment->comment_content, $date );
}
/**
* Get action's logs.
*
* @param string $action_id Action ID.
*
* @return ActionScheduler_LogEntry[]
*/
public function get_logs( $action_id ) {
$status = 'all';
$logs = array();
if ( get_post_status( $action_id ) === 'trash' ) {
$status = 'post-trashed';
}
$comments = get_comments(
array(
'post_id' => $action_id,
'orderby' => 'comment_date_gmt',
'order' => 'ASC',
'type' => self::TYPE,
'status' => $status,
)
);
foreach ( $comments as $c ) {
$entry = $this->get_entry( $c );
if ( ! empty( $entry ) ) {
$logs[] = $entry;
}
}
return $logs;
}
/**
* Get comment.
*
* @param int $comment_id Comment ID.
*/
protected function get_comment( $comment_id ) {
return get_comment( $comment_id );
}
/**
* Filter comment queries.
*
* @param WP_Comment_Query $query Comment query object.
*/
public function filter_comment_queries( $query ) {
foreach ( array( 'ID', 'parent', 'post_author', 'post_name', 'post_parent', 'type', 'post_type', 'post_id', 'post_ID' ) as $key ) {
if ( ! empty( $query->query_vars[ $key ] ) ) {
return; // don't slow down queries that wouldn't include action_log comments anyway.
}
}
$query->query_vars['action_log_filter'] = true;
add_filter( 'comments_clauses', array( $this, 'filter_comment_query_clauses' ), 10, 2 );
}
/**
* Filter comment queries.
*
* @param array $clauses Query's clauses.
* @param WP_Comment_Query $query Query object.
*
* @return array
*/
public function filter_comment_query_clauses( $clauses, $query ) {
if ( ! empty( $query->query_vars['action_log_filter'] ) ) {
$clauses['where'] .= $this->get_where_clause();
}
return $clauses;
}
/**
* Make sure Action Scheduler logs are excluded from comment feeds, which use WP_Query, not
* the WP_Comment_Query class handled by @see self::filter_comment_queries().
*
* @param string $where Query's `where` clause.
* @param WP_Query $query Query object.
*
* @return string
*/
public function filter_comment_feed( $where, $query ) {
if ( is_comment_feed() ) {
$where .= $this->get_where_clause();
}
return $where;
}
/**
* Return a SQL clause to exclude Action Scheduler comments.
*
* @return string
*/
protected function get_where_clause() {
global $wpdb;
return sprintf( " AND {$wpdb->comments}.comment_type != '%s'", self::TYPE );
}
/**
* Remove action log entries from wp_count_comments()
*
* @param array $stats Comment count.
* @param int $post_id Post ID.
*
* @return object
*/
public function filter_comment_count( $stats, $post_id ) {
global $wpdb;
if ( 0 === $post_id ) {
$stats = $this->get_comment_count();
}
return $stats;
}
/**
* Retrieve the comment counts from our cache, or the database if the cached version isn't set.
*
* @return object
*/
protected function get_comment_count() {
global $wpdb;
$stats = get_transient( 'as_comment_count' );
if ( ! $stats ) {
$stats = array();
$count = $wpdb->get_results( "SELECT comment_approved, COUNT( * ) AS num_comments FROM {$wpdb->comments} WHERE comment_type NOT IN('order_note','action_log') GROUP BY comment_approved", ARRAY_A );
$total = 0;
$stats = array();
$approved = array(
'0' => 'moderated',
'1' => 'approved',
'spam' => 'spam',
'trash' => 'trash',
'post-trashed' => 'post-trashed',
);
foreach ( (array) $count as $row ) {
// Don't count post-trashed toward totals.
if ( 'post-trashed' !== $row['comment_approved'] && 'trash' !== $row['comment_approved'] ) {
$total += $row['num_comments'];
}
if ( isset( $approved[ $row['comment_approved'] ] ) ) {
$stats[ $approved[ $row['comment_approved'] ] ] = $row['num_comments'];
}
}
$stats['total_comments'] = $total;
$stats['all'] = $total;
foreach ( $approved as $key ) {
if ( empty( $stats[ $key ] ) ) {
$stats[ $key ] = 0;
}
}
$stats = (object) $stats;
set_transient( 'as_comment_count', $stats );
}
return $stats;
}
/**
* Delete comment count cache whenever there is new comment or the status of a comment changes. Cache
* will be regenerated next time ActionScheduler_wpCommentLogger::filter_comment_count() is called.
*/
public function delete_comment_count_cache() {
delete_transient( 'as_comment_count' );
}
/**
* Initialize.
*
* @codeCoverageIgnore
*/
public function init() {
add_action( 'action_scheduler_before_process_queue', array( $this, 'disable_comment_counting' ), 10, 0 );
add_action( 'action_scheduler_after_process_queue', array( $this, 'enable_comment_counting' ), 10, 0 );
parent::init();
add_action( 'pre_get_comments', array( $this, 'filter_comment_queries' ), 10, 1 );
add_action( 'wp_count_comments', array( $this, 'filter_comment_count' ), 20, 2 ); // run after WC_Comments::wp_count_comments() to make sure we exclude order notes and action logs.
add_action( 'comment_feed_where', array( $this, 'filter_comment_feed' ), 10, 2 );
// Delete comments count cache whenever there is a new comment or a comment status changes.
add_action( 'wp_insert_comment', array( $this, 'delete_comment_count_cache' ) );
add_action( 'wp_set_comment_status', array( $this, 'delete_comment_count_cache' ) );
}
/**
* Defer comment counting.
*/
public function disable_comment_counting() {
wp_defer_comment_counting( true );
}
/**
* Enable comment counting.
*/
public function enable_comment_counting() {
wp_defer_comment_counting( false );
}
}
woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php 0000644 00000106256 15153553404 0024374 0 ustar 00 <?php
/**
* Class ActionScheduler_wpPostStore
*/
class ActionScheduler_wpPostStore extends ActionScheduler_Store {
const POST_TYPE = 'scheduled-action';
const GROUP_TAXONOMY = 'action-group';
const SCHEDULE_META_KEY = '_action_manager_schedule';
const DEPENDENCIES_MET = 'as-post-store-dependencies-met';
/**
* Used to share information about the before_date property of claims internally.
*
* This is used in preference to passing the same information as a method param
* for backwards-compatibility reasons.
*
* @var DateTime|null
*/
private $claim_before_date = null;
/**
* Local Timezone.
*
* @var DateTimeZone
*/
protected $local_timezone = null;
/**
* Save action.
*
* @param ActionScheduler_Action $action Scheduled Action.
* @param DateTime|null $scheduled_date Scheduled Date.
*
* @throws RuntimeException Throws an exception if the action could not be saved.
* @return int
*/
public function save_action( ActionScheduler_Action $action, ?DateTime $scheduled_date = null ) {
try {
$this->validate_action( $action );
$post_array = $this->create_post_array( $action, $scheduled_date );
$post_id = $this->save_post_array( $post_array );
$this->save_post_schedule( $post_id, $action->get_schedule() );
$this->save_action_group( $post_id, $action->get_group() );
do_action( 'action_scheduler_stored_action', $post_id );
return $post_id;
} catch ( Exception $e ) {
/* translators: %s: action error message */
throw new RuntimeException( sprintf( __( 'Error saving action: %s', 'action-scheduler' ), $e->getMessage() ), 0 );
}
}
/**
* Create post array.
*
* @param ActionScheduler_Action $action Scheduled Action.
* @param DateTime|null $scheduled_date Scheduled Date.
*
* @return array Returns an array of post data.
*/
protected function create_post_array( ActionScheduler_Action $action, ?DateTime $scheduled_date = null ) {
$post = array(
'post_type' => self::POST_TYPE,
'post_title' => $action->get_hook(),
'post_content' => wp_json_encode( $action->get_args() ),
'post_status' => ( $action->is_finished() ? 'publish' : 'pending' ),
'post_date_gmt' => $this->get_scheduled_date_string( $action, $scheduled_date ),
'post_date' => $this->get_scheduled_date_string_local( $action, $scheduled_date ),
);
return $post;
}
/**
* Save post array.
*
* @param array $post_array Post array.
* @return int Returns the post ID.
* @throws RuntimeException Throws an exception if the action could not be saved.
*/
protected function save_post_array( $post_array ) {
add_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10, 1 );
add_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10, 5 );
$has_kses = false !== has_filter( 'content_save_pre', 'wp_filter_post_kses' );
if ( $has_kses ) {
// Prevent KSES from corrupting JSON in post_content.
kses_remove_filters();
}
$post_id = wp_insert_post( $post_array );
if ( $has_kses ) {
kses_init_filters();
}
remove_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10 );
remove_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10 );
if ( is_wp_error( $post_id ) || empty( $post_id ) ) {
throw new RuntimeException( __( 'Unable to save action.', 'action-scheduler' ) );
}
return $post_id;
}
/**
* Filter insert post data.
*
* @param array $postdata Post data to filter.
*
* @return array
*/
public function filter_insert_post_data( $postdata ) {
if ( self::POST_TYPE === $postdata['post_type'] ) {
$postdata['post_author'] = 0;
if ( 'future' === $postdata['post_status'] ) {
$postdata['post_status'] = 'publish';
}
}
return $postdata;
}
/**
* Create a (probably unique) post name for scheduled actions in a more performant manner than wp_unique_post_slug().
*
* When an action's post status is transitioned to something other than 'draft', 'pending' or 'auto-draft, like 'publish'
* or 'failed' or 'trash', WordPress will find a unique slug (stored in post_name column) using the wp_unique_post_slug()
* function. This is done to ensure URL uniqueness. The approach taken by wp_unique_post_slug() is to iterate over existing
* post_name values that match, and append a number 1 greater than the largest. This makes sense when manually creating a
* post from the Edit Post screen. It becomes a bottleneck when automatically processing thousands of actions, with a
* database containing thousands of related post_name values.
*
* WordPress 5.1 introduces the 'pre_wp_unique_post_slug' filter for plugins to address this issue.
*
* We can short-circuit WordPress's wp_unique_post_slug() approach using the 'pre_wp_unique_post_slug' filter. This
* method is available to be used as a callback on that filter. It provides a more scalable approach to generating a
* post_name/slug that is probably unique. Because Action Scheduler never actually uses the post_name field, or an
* action's slug, being probably unique is good enough.
*
* For more backstory on this issue, see:
* - https://github.com/woocommerce/action-scheduler/issues/44 and
* - https://core.trac.wordpress.org/ticket/21112
*
* @param string $override_slug Short-circuit return value.
* @param string $slug The desired slug (post_name).
* @param int $post_ID Post ID.
* @param string $post_status The post status.
* @param string $post_type Post type.
* @return string
*/
public function set_unique_post_slug( $override_slug, $slug, $post_ID, $post_status, $post_type ) {
if ( self::POST_TYPE === $post_type ) {
$override_slug = uniqid( self::POST_TYPE . '-', true ) . '-' . wp_generate_password( 32, false );
}
return $override_slug;
}
/**
* Save post schedule.
*
* @param int $post_id Post ID of the scheduled action.
* @param string $schedule Schedule to save.
*
* @return void
*/
protected function save_post_schedule( $post_id, $schedule ) {
update_post_meta( $post_id, self::SCHEDULE_META_KEY, $schedule );
}
/**
* Save action group.
*
* @param int $post_id Post ID.
* @param string $group Group to save.
* @return void
*/
protected function save_action_group( $post_id, $group ) {
if ( empty( $group ) ) {
wp_set_object_terms( $post_id, array(), self::GROUP_TAXONOMY, false );
} else {
wp_set_object_terms( $post_id, array( $group ), self::GROUP_TAXONOMY, false );
}
}
/**
* Fetch actions.
*
* @param int $action_id Action ID.
* @return object
*/
public function fetch_action( $action_id ) {
$post = $this->get_post( $action_id );
if ( empty( $post ) || self::POST_TYPE !== $post->post_type ) {
return $this->get_null_action();
}
try {
$action = $this->make_action_from_post( $post );
} catch ( ActionScheduler_InvalidActionException $exception ) {
do_action( 'action_scheduler_failed_fetch_action', $post->ID, $exception );
return $this->get_null_action();
}
return $action;
}
/**
* Get post.
*
* @param string $action_id - Action ID.
* @return WP_Post|null
*/
protected function get_post( $action_id ) {
if ( empty( $action_id ) ) {
return null;
}
return get_post( $action_id );
}
/**
* Get NULL action.
*
* @return ActionScheduler_NullAction
*/
protected function get_null_action() {
return new ActionScheduler_NullAction();
}
/**
* Make action from post.
*
* @param WP_Post $post Post object.
* @return WP_Post
*/
protected function make_action_from_post( $post ) {
$hook = $post->post_title;
$args = json_decode( $post->post_content, true );
$this->validate_args( $args, $post->ID );
$schedule = get_post_meta( $post->ID, self::SCHEDULE_META_KEY, true );
$this->validate_schedule( $schedule, $post->ID );
$group = wp_get_object_terms( $post->ID, self::GROUP_TAXONOMY, array( 'fields' => 'names' ) );
$group = empty( $group ) ? '' : reset( $group );
return ActionScheduler::factory()->get_stored_action( $this->get_action_status_by_post_status( $post->post_status ), $hook, $args, $schedule, $group );
}
/**
* Get action status by post status.
*
* @param string $post_status Post status.
*
* @throws InvalidArgumentException Throw InvalidArgumentException if $post_status not in known status fields returned by $this->get_status_labels().
* @return string
*/
protected function get_action_status_by_post_status( $post_status ) {
switch ( $post_status ) {
case 'publish':
$action_status = self::STATUS_COMPLETE;
break;
case 'trash':
$action_status = self::STATUS_CANCELED;
break;
default:
if ( ! array_key_exists( $post_status, $this->get_status_labels() ) ) {
throw new InvalidArgumentException( sprintf( 'Invalid post status: "%s". No matching action status available.', $post_status ) );
}
$action_status = $post_status;
break;
}
return $action_status;
}
/**
* Get post status by action status.
*
* @param string $action_status Action status.
*
* @throws InvalidArgumentException Throws InvalidArgumentException if $post_status not in known status fields returned by $this->get_status_labels().
* @return string
*/
protected function get_post_status_by_action_status( $action_status ) {
switch ( $action_status ) {
case self::STATUS_COMPLETE:
$post_status = 'publish';
break;
case self::STATUS_CANCELED:
$post_status = 'trash';
break;
default:
if ( ! array_key_exists( $action_status, $this->get_status_labels() ) ) {
throw new InvalidArgumentException( sprintf( 'Invalid action status: "%s".', $action_status ) );
}
$post_status = $action_status;
break;
}
return $post_status;
}
/**
* Returns the SQL statement to query (or count) actions.
*
* @param array $query - Filtering options.
* @param string $select_or_count - Whether the SQL should select and return the IDs or just the row count.
*
* @throws InvalidArgumentException - Throw InvalidArgumentException if $select_or_count not count or select.
* @return string SQL statement. The returned SQL is already properly escaped.
*/
protected function get_query_actions_sql( array $query, $select_or_count = 'select' ) {
if ( ! in_array( $select_or_count, array( 'select', 'count' ), true ) ) {
throw new InvalidArgumentException( __( 'Invalid schedule. Cannot save action.', 'action-scheduler' ) );
}
$query = wp_parse_args(
$query,
array(
'hook' => '',
'args' => null,
'date' => null,
'date_compare' => '<=',
'modified' => null,
'modified_compare' => '<=',
'group' => '',
'status' => '',
'claimed' => null,
'per_page' => 5,
'offset' => 0,
'orderby' => 'date',
'order' => 'ASC',
'search' => '',
)
);
/**
* Global wpdb object.
*
* @var wpdb $wpdb
*/
global $wpdb;
$sql = ( 'count' === $select_or_count ) ? 'SELECT count(p.ID)' : 'SELECT p.ID ';
$sql .= "FROM {$wpdb->posts} p";
$sql_params = array();
if ( empty( $query['group'] ) && 'group' === $query['orderby'] ) {
$sql .= " LEFT JOIN {$wpdb->term_relationships} tr ON tr.object_id=p.ID";
$sql .= " LEFT JOIN {$wpdb->term_taxonomy} tt ON tr.term_taxonomy_id=tt.term_taxonomy_id";
$sql .= " LEFT JOIN {$wpdb->terms} t ON tt.term_id=t.term_id";
} elseif ( ! empty( $query['group'] ) ) {
$sql .= " INNER JOIN {$wpdb->term_relationships} tr ON tr.object_id=p.ID";
$sql .= " INNER JOIN {$wpdb->term_taxonomy} tt ON tr.term_taxonomy_id=tt.term_taxonomy_id";
$sql .= " INNER JOIN {$wpdb->terms} t ON tt.term_id=t.term_id";
$sql .= ' AND t.slug=%s';
$sql_params[] = $query['group'];
}
$sql .= ' WHERE post_type=%s';
$sql_params[] = self::POST_TYPE;
if ( $query['hook'] ) {
$sql .= ' AND p.post_title=%s';
$sql_params[] = $query['hook'];
}
if ( ! is_null( $query['args'] ) ) {
$sql .= ' AND p.post_content=%s';
$sql_params[] = wp_json_encode( $query['args'] );
}
if ( $query['status'] ) {
$post_statuses = array_map( array( $this, 'get_post_status_by_action_status' ), (array) $query['status'] );
$placeholders = array_fill( 0, count( $post_statuses ), '%s' );
$sql .= ' AND p.post_status IN (' . join( ', ', $placeholders ) . ')';
$sql_params = array_merge( $sql_params, array_values( $post_statuses ) );
}
if ( $query['date'] instanceof DateTime ) {
$date = clone $query['date'];
$date->setTimezone( new DateTimeZone( 'UTC' ) );
$date_string = $date->format( 'Y-m-d H:i:s' );
$comparator = $this->validate_sql_comparator( $query['date_compare'] );
$sql .= " AND p.post_date_gmt $comparator %s";
$sql_params[] = $date_string;
}
if ( $query['modified'] instanceof DateTime ) {
$modified = clone $query['modified'];
$modified->setTimezone( new DateTimeZone( 'UTC' ) );
$date_string = $modified->format( 'Y-m-d H:i:s' );
$comparator = $this->validate_sql_comparator( $query['modified_compare'] );
$sql .= " AND p.post_modified_gmt $comparator %s";
$sql_params[] = $date_string;
}
if ( true === $query['claimed'] ) {
$sql .= " AND p.post_password != ''";
} elseif ( false === $query['claimed'] ) {
$sql .= " AND p.post_password = ''";
} elseif ( ! is_null( $query['claimed'] ) ) {
$sql .= ' AND p.post_password = %s';
$sql_params[] = $query['claimed'];
}
if ( ! empty( $query['search'] ) ) {
$sql .= ' AND (p.post_title LIKE %s OR p.post_content LIKE %s OR p.post_password LIKE %s)';
for ( $i = 0; $i < 3; $i++ ) {
$sql_params[] = sprintf( '%%%s%%', $query['search'] );
}
}
if ( 'select' === $select_or_count ) {
switch ( $query['orderby'] ) {
case 'hook':
$orderby = 'p.post_title';
break;
case 'group':
$orderby = 't.name';
break;
case 'status':
$orderby = 'p.post_status';
break;
case 'modified':
$orderby = 'p.post_modified';
break;
case 'claim_id':
$orderby = 'p.post_password';
break;
case 'schedule':
case 'date':
default:
$orderby = 'p.post_date_gmt';
break;
}
if ( 'ASC' === strtoupper( $query['order'] ) ) {
$order = 'ASC';
} else {
$order = 'DESC';
}
$sql .= " ORDER BY $orderby $order";
if ( $query['per_page'] > 0 ) {
$sql .= ' LIMIT %d, %d';
$sql_params[] = $query['offset'];
$sql_params[] = $query['per_page'];
}
}
return $wpdb->prepare( $sql, $sql_params ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
}
/**
* Query for action count or list of action IDs.
*
* @since 3.3.0 $query['status'] accepts array of statuses instead of a single status.
*
* @see ActionScheduler_Store::query_actions for $query arg usage.
*
* @param array $query Query filtering options.
* @param string $query_type Whether to select or count the results. Defaults to select.
*
* @return string|array|null The IDs of actions matching the query. Null on failure.
*/
public function query_actions( $query = array(), $query_type = 'select' ) {
/**
* Global $wpdb object.
*
* @var wpdb $wpdb
*/
global $wpdb;
$sql = $this->get_query_actions_sql( $query, $query_type );
return ( 'count' === $query_type ) ? $wpdb->get_var( $sql ) : $wpdb->get_col( $sql ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.NotPrepared
}
/**
* Get a count of all actions in the store, grouped by status
*
* @return array
*/
public function action_counts() {
$action_counts_by_status = array();
$action_stati_and_labels = $this->get_status_labels();
$posts_count_by_status = (array) wp_count_posts( self::POST_TYPE, 'readable' );
foreach ( $posts_count_by_status as $post_status_name => $count ) {
try {
$action_status_name = $this->get_action_status_by_post_status( $post_status_name );
} catch ( Exception $e ) {
// Ignore any post statuses that aren't for actions.
continue;
}
if ( array_key_exists( $action_status_name, $action_stati_and_labels ) ) {
$action_counts_by_status[ $action_status_name ] = $count;
}
}
return $action_counts_by_status;
}
/**
* Cancel action.
*
* @param int $action_id Action ID.
*
* @throws InvalidArgumentException If $action_id is not identified.
*/
public function cancel_action( $action_id ) {
$post = get_post( $action_id );
if ( empty( $post ) || ( self::POST_TYPE !== $post->post_type ) ) {
/* translators: %s is the action ID */
throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to cancel this action. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) );
}
do_action( 'action_scheduler_canceled_action', $action_id );
add_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10, 5 );
wp_trash_post( $action_id );
remove_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10 );
}
/**
* Delete action.
*
* @param int $action_id Action ID.
* @return void
* @throws InvalidArgumentException If action is not identified.
*/
public function delete_action( $action_id ) {
$post = get_post( $action_id );
if ( empty( $post ) || ( self::POST_TYPE !== $post->post_type ) ) {
/* translators: %s is the action ID */
throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to delete this action. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) );
}
do_action( 'action_scheduler_deleted_action', $action_id );
wp_delete_post( $action_id, true );
}
/**
* Get date for claim id.
*
* @param int $action_id Action ID.
* @return ActionScheduler_DateTime The date the action is schedule to run, or the date that it ran.
*/
public function get_date( $action_id ) {
$next = $this->get_date_gmt( $action_id );
return ActionScheduler_TimezoneHelper::set_local_timezone( $next );
}
/**
* Get Date GMT.
*
* @param int $action_id Action ID.
*
* @throws InvalidArgumentException If $action_id is not identified.
* @return ActionScheduler_DateTime The date the action is schedule to run, or the date that it ran.
*/
public function get_date_gmt( $action_id ) {
$post = get_post( $action_id );
if ( empty( $post ) || ( self::POST_TYPE !== $post->post_type ) ) {
/* translators: %s is the action ID */
throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to determine the date of this action. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) );
}
if ( 'publish' === $post->post_status ) {
return as_get_datetime_object( $post->post_modified_gmt );
} else {
return as_get_datetime_object( $post->post_date_gmt );
}
}
/**
* Stake claim.
*
* @param int $max_actions Maximum number of actions.
* @param DateTime|null $before_date Jobs must be schedule before this date. Defaults to now.
* @param array $hooks Claim only actions with a hook or hooks.
* @param string $group Claim only actions in the given group.
*
* @return ActionScheduler_ActionClaim
* @throws RuntimeException When there is an error staking a claim.
* @throws InvalidArgumentException When the given group is not valid.
*/
public function stake_claim( $max_actions = 10, ?DateTime $before_date = null, $hooks = array(), $group = '' ) {
$this->claim_before_date = $before_date;
$claim_id = $this->generate_claim_id();
$this->claim_actions( $claim_id, $max_actions, $before_date, $hooks, $group );
$action_ids = $this->find_actions_by_claim_id( $claim_id );
$this->claim_before_date = null;
return new ActionScheduler_ActionClaim( $claim_id, $action_ids );
}
/**
* Get claim count.
*
* @return int
*/
public function get_claim_count() {
global $wpdb;
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching
return $wpdb->get_var(
$wpdb->prepare(
"SELECT COUNT(DISTINCT post_password) FROM {$wpdb->posts} WHERE post_password != '' AND post_type = %s AND post_status IN ('in-progress','pending')",
array( self::POST_TYPE )
)
);
}
/**
* Generate claim id.
*
* @return string
*/
protected function generate_claim_id() {
$claim_id = md5( microtime( true ) . wp_rand( 0, 1000 ) );
return substr( $claim_id, 0, 20 ); // to fit in db field with 20 char limit.
}
/**
* Claim actions.
*
* @param string $claim_id Claim ID.
* @param int $limit Limit.
* @param DateTime|null $before_date Should use UTC timezone.
* @param array $hooks Claim only actions with a hook or hooks.
* @param string $group Claim only actions in the given group.
*
* @return int The number of actions that were claimed.
* @throws RuntimeException When there is a database error.
*/
protected function claim_actions( $claim_id, $limit, ?DateTime $before_date = null, $hooks = array(), $group = '' ) {
// Set up initial variables.
$date = null === $before_date ? as_get_datetime_object() : clone $before_date;
$limit_ids = ! empty( $group );
$ids = $limit_ids ? $this->get_actions_by_group( $group, $limit, $date ) : array();
// If limiting by IDs and no posts found, then return early since we have nothing to update.
if ( $limit_ids && 0 === count( $ids ) ) {
return 0;
}
/**
* Global wpdb object.
*
* @var wpdb $wpdb
*/
global $wpdb;
/*
* Build up custom query to update the affected posts. Parameters are built as a separate array
* to make it easier to identify where they are in the query.
*
* We can't use $wpdb->update() here because of the "ID IN ..." clause.
*/
$update = "UPDATE {$wpdb->posts} SET post_password = %s, post_modified_gmt = %s, post_modified = %s";
$params = array(
$claim_id,
current_time( 'mysql', true ),
current_time( 'mysql' ),
);
// Build initial WHERE clause.
$where = "WHERE post_type = %s AND post_status = %s AND post_password = ''";
$params[] = self::POST_TYPE;
$params[] = ActionScheduler_Store::STATUS_PENDING;
if ( ! empty( $hooks ) ) {
$placeholders = array_fill( 0, count( $hooks ), '%s' );
$where .= ' AND post_title IN (' . join( ', ', $placeholders ) . ')';
$params = array_merge( $params, array_values( $hooks ) );
}
/*
* Add the IDs to the WHERE clause. IDs not escaped because they came directly from a prior DB query.
*
* If we're not limiting by IDs, then include the post_date_gmt clause.
*/
if ( $limit_ids ) {
$where .= ' AND ID IN (' . join( ',', $ids ) . ')';
} else {
$where .= ' AND post_date_gmt <= %s';
$params[] = $date->format( 'Y-m-d H:i:s' );
}
// Add the ORDER BY clause and,ms limit.
$order = 'ORDER BY menu_order ASC, post_date_gmt ASC, ID ASC LIMIT %d';
$params[] = $limit;
// Run the query and gather results.
$rows_affected = $wpdb->query( $wpdb->prepare( "{$update} {$where} {$order}", $params ) ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare
if ( false === $rows_affected ) {
throw new RuntimeException( __( 'Unable to claim actions. Database error.', 'action-scheduler' ) );
}
return (int) $rows_affected;
}
/**
* Get IDs of actions within a certain group and up to a certain date/time.
*
* @param string $group The group to use in finding actions.
* @param int $limit The number of actions to retrieve.
* @param DateTime $date DateTime object representing cutoff time for actions. Actions retrieved will be
* up to and including this DateTime.
*
* @return array IDs of actions in the appropriate group and before the appropriate time.
* @throws InvalidArgumentException When the group does not exist.
*/
protected function get_actions_by_group( $group, $limit, DateTime $date ) {
// Ensure the group exists before continuing.
if ( ! term_exists( $group, self::GROUP_TAXONOMY ) ) {
/* translators: %s is the group name */
throw new InvalidArgumentException( sprintf( __( 'The group "%s" does not exist.', 'action-scheduler' ), $group ) );
}
// Set up a query for post IDs to use later.
$query = new WP_Query();
$query_args = array(
'fields' => 'ids',
'post_type' => self::POST_TYPE,
'post_status' => ActionScheduler_Store::STATUS_PENDING,
'has_password' => false,
'posts_per_page' => $limit * 3,
'suppress_filters' => true, // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.SuppressFilters_suppress_filters
'no_found_rows' => true,
'orderby' => array(
'menu_order' => 'ASC',
'date' => 'ASC',
'ID' => 'ASC',
),
'date_query' => array(
'column' => 'post_date_gmt',
'before' => $date->format( 'Y-m-d H:i' ),
'inclusive' => true,
),
'tax_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery
array(
'taxonomy' => self::GROUP_TAXONOMY,
'field' => 'slug',
'terms' => $group,
'include_children' => false,
),
),
);
return $query->query( $query_args );
}
/**
* Find actions by claim ID.
*
* @param string $claim_id Claim ID.
* @return array
*/
public function find_actions_by_claim_id( $claim_id ) {
/**
* Global wpdb object.
*
* @var wpdb $wpdb
*/
global $wpdb;
$action_ids = array();
$before_date = isset( $this->claim_before_date ) ? $this->claim_before_date : as_get_datetime_object();
$cut_off = $before_date->format( 'Y-m-d H:i:s' );
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
$results = $wpdb->get_results(
$wpdb->prepare(
"SELECT ID, post_date_gmt FROM {$wpdb->posts} WHERE post_type = %s AND post_password = %s",
array(
self::POST_TYPE,
$claim_id,
)
)
);
// Verify that the scheduled date for each action is within the expected bounds (in some unusual
// cases, we cannot depend on MySQL to honor all of the WHERE conditions we specify).
foreach ( $results as $claimed_action ) {
if ( $claimed_action->post_date_gmt <= $cut_off ) {
$action_ids[] = absint( $claimed_action->ID );
}
}
return $action_ids;
}
/**
* Release claim.
*
* @param ActionScheduler_ActionClaim $claim Claim object to release.
* @return void
* @throws RuntimeException When the claim is not unlocked.
*/
public function release_claim( ActionScheduler_ActionClaim $claim ) {
$action_ids = $this->find_actions_by_claim_id( $claim->get_id() );
if ( empty( $action_ids ) ) {
return; // nothing to do.
}
$action_id_string = implode( ',', array_map( 'intval', $action_ids ) );
/**
* Global wpdb object.
*
* @var wpdb $wpdb
*/
global $wpdb;
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
$result = $wpdb->query(
$wpdb->prepare(
"UPDATE {$wpdb->posts} SET post_password = '' WHERE ID IN ($action_id_string) AND post_password = %s", //phpcs:ignore
array(
$claim->get_id(),
)
)
);
if ( false === $result ) {
/* translators: %s: claim ID */
throw new RuntimeException( sprintf( __( 'Unable to unlock claim %s. Database error.', 'action-scheduler' ), $claim->get_id() ) );
}
}
/**
* Unclaim action.
*
* @param string $action_id Action ID.
* @throws RuntimeException When unable to unlock claim on action ID.
*/
public function unclaim_action( $action_id ) {
/**
* Global wpdb object.
*
* @var wpdb $wpdb
*/
global $wpdb;
//phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
$result = $wpdb->query(
$wpdb->prepare(
"UPDATE {$wpdb->posts} SET post_password = '' WHERE ID = %d AND post_type = %s",
$action_id,
self::POST_TYPE
)
);
if ( false === $result ) {
/* translators: %s: action ID */
throw new RuntimeException( sprintf( __( 'Unable to unlock claim on action %s. Database error.', 'action-scheduler' ), $action_id ) );
}
}
/**
* Mark failure on action.
*
* @param int $action_id Action ID.
*
* @return void
* @throws RuntimeException When unable to mark failure on action ID.
*/
public function mark_failure( $action_id ) {
/**
* Global wpdb object.
*
* @var wpdb $wpdb
*/
global $wpdb;
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
$result = $wpdb->query(
$wpdb->prepare( "UPDATE {$wpdb->posts} SET post_status = %s WHERE ID = %d AND post_type = %s", self::STATUS_FAILED, $action_id, self::POST_TYPE )
);
if ( false === $result ) {
/* translators: %s: action ID */
throw new RuntimeException( sprintf( __( 'Unable to mark failure on action %s. Database error.', 'action-scheduler' ), $action_id ) );
}
}
/**
* Return an action's claim ID, as stored in the post password column
*
* @param int $action_id Action ID.
* @return mixed
*/
public function get_claim_id( $action_id ) {
return $this->get_post_column( $action_id, 'post_password' );
}
/**
* Return an action's status, as stored in the post status column
*
* @param int $action_id Action ID.
*
* @return mixed
* @throws InvalidArgumentException When the action ID is invalid.
*/
public function get_status( $action_id ) {
$status = $this->get_post_column( $action_id, 'post_status' );
if ( null === $status ) {
throw new InvalidArgumentException( __( 'Invalid action ID. No status found.', 'action-scheduler' ) );
}
return $this->get_action_status_by_post_status( $status );
}
/**
* Get post column
*
* @param string $action_id Action ID.
* @param string $column_name Column Name.
*
* @return string|null
*/
private function get_post_column( $action_id, $column_name ) {
/**
* Global wpdb object.
*
* @var wpdb $wpdb
*/
global $wpdb;
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
return $wpdb->get_var(
$wpdb->prepare(
"SELECT {$column_name} FROM {$wpdb->posts} WHERE ID=%d AND post_type=%s", // phpcs:ignore
$action_id,
self::POST_TYPE
)
);
}
/**
* Log Execution.
*
* @throws Exception If the action status cannot be updated to self::STATUS_RUNNING ('in-progress').
*
* @param string $action_id Action ID.
*/
public function log_execution( $action_id ) {
/**
* Global wpdb object.
*
* @var wpdb $wpdb
*/
global $wpdb;
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
$status_updated = $wpdb->query(
$wpdb->prepare(
"UPDATE {$wpdb->posts} SET menu_order = menu_order+1, post_status=%s, post_modified_gmt = %s, post_modified = %s WHERE ID = %d AND post_type = %s",
self::STATUS_RUNNING,
current_time( 'mysql', true ),
current_time( 'mysql' ),
$action_id,
self::POST_TYPE
)
);
if ( ! $status_updated ) {
throw new Exception(
sprintf(
/* translators: 1: action ID. 2: status slug. */
__( 'Unable to update the status of action %1$d to %2$s.', 'action-scheduler' ),
$action_id,
self::STATUS_RUNNING
)
);
}
}
/**
* Record that an action was completed.
*
* @param string $action_id ID of the completed action.
*
* @throws InvalidArgumentException When the action ID is invalid.
* @throws RuntimeException When there was an error executing the action.
*/
public function mark_complete( $action_id ) {
$post = get_post( $action_id );
if ( empty( $post ) || ( self::POST_TYPE !== $post->post_type ) ) {
/* translators: %s is the action ID */
throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to mark this action as having completed. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) );
}
add_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10, 1 );
add_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10, 5 );
$result = wp_update_post(
array(
'ID' => $action_id,
'post_status' => 'publish',
),
true
);
remove_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10 );
remove_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10 );
if ( is_wp_error( $result ) ) {
throw new RuntimeException( $result->get_error_message() );
}
/**
* Fires after a scheduled action has been completed.
*
* @since 3.4.2
*
* @param int $action_id Action ID.
*/
do_action( 'action_scheduler_completed_action', $action_id );
}
/**
* Mark action as migrated when there is an error deleting the action.
*
* @param int $action_id Action ID.
*/
public function mark_migrated( $action_id ) {
wp_update_post(
array(
'ID' => $action_id,
'post_status' => 'migrated',
)
);
}
/**
* Determine whether the post store can be migrated.
*
* @param [type] $setting - Setting value.
* @return bool
*/
public function migration_dependencies_met( $setting ) {
global $wpdb;
$dependencies_met = get_transient( self::DEPENDENCIES_MET );
if ( empty( $dependencies_met ) ) {
$maximum_args_length = apply_filters( 'action_scheduler_maximum_args_length', 191 );
$found_action = $wpdb->get_var( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
$wpdb->prepare(
"SELECT ID FROM {$wpdb->posts} WHERE post_type = %s AND CHAR_LENGTH(post_content) > %d LIMIT 1",
$maximum_args_length,
self::POST_TYPE
)
);
$dependencies_met = $found_action ? 'no' : 'yes';
set_transient( self::DEPENDENCIES_MET, $dependencies_met, DAY_IN_SECONDS );
}
return 'yes' === $dependencies_met ? $setting : false;
}
/**
* InnoDB indexes have a maximum size of 767 bytes by default, which is only 191 characters with utf8mb4.
*
* Previously, AS wasn't concerned about args length, as we used the (unindex) post_content column. However,
* as we prepare to move to custom tables, and can use an indexed VARCHAR column instead, we want to warn
* developers of this impending requirement.
*
* @param ActionScheduler_Action $action Action object.
*/
protected function validate_action( ActionScheduler_Action $action ) {
try {
parent::validate_action( $action );
} catch ( Exception $e ) {
/* translators: %s is the error message */
$message = sprintf( __( '%s Support for strings longer than this will be removed in a future version.', 'action-scheduler' ), $e->getMessage() );
_doing_it_wrong( 'ActionScheduler_Action::$args', esc_html( $message ), '2.1.0' );
}
}
/**
* (@codeCoverageIgnore)
*/
public function init() {
add_filter( 'action_scheduler_migration_dependencies_met', array( $this, 'migration_dependencies_met' ) );
$post_type_registrar = new ActionScheduler_wpPostStore_PostTypeRegistrar();
$post_type_registrar->register();
$post_status_registrar = new ActionScheduler_wpPostStore_PostStatusRegistrar();
$post_status_registrar->register();
$taxonomy_registrar = new ActionScheduler_wpPostStore_TaxonomyRegistrar();
$taxonomy_registrar->register();
}
}
woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostStatusRegistrar.php0000644 00000003502 15153553405 0030457 0 ustar 00 <?php
/**
* Class ActionScheduler_wpPostStore_PostStatusRegistrar
*
* @codeCoverageIgnore
*/
class ActionScheduler_wpPostStore_PostStatusRegistrar {
/**
* Registrar.
*/
public function register() {
register_post_status( ActionScheduler_Store::STATUS_RUNNING, array_merge( $this->post_status_args(), $this->post_status_running_labels() ) );
register_post_status( ActionScheduler_Store::STATUS_FAILED, array_merge( $this->post_status_args(), $this->post_status_failed_labels() ) );
}
/**
* Build the args array for the post type definition
*
* @return array
*/
protected function post_status_args() {
$args = array(
'public' => false,
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
);
return apply_filters( 'action_scheduler_post_status_args', $args );
}
/**
* Build the args array for the post type definition
*
* @return array
*/
protected function post_status_failed_labels() {
$labels = array(
'label' => _x( 'Failed', 'post', 'action-scheduler' ),
/* translators: %s: count */
'label_count' => _n_noop( 'Failed <span class="count">(%s)</span>', 'Failed <span class="count">(%s)</span>', 'action-scheduler' ),
);
return apply_filters( 'action_scheduler_post_status_failed_labels', $labels );
}
/**
* Build the args array for the post type definition
*
* @return array
*/
protected function post_status_running_labels() {
$labels = array(
'label' => _x( 'In-Progress', 'post', 'action-scheduler' ),
/* translators: %s: count */
'label_count' => _n_noop( 'In-Progress <span class="count">(%s)</span>', 'In-Progress <span class="count">(%s)</span>', 'action-scheduler' ),
);
return apply_filters( 'action_scheduler_post_status_running_labels', $labels );
}
}
woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostTypeRegistrar.php 0000644 00000003711 15153553405 0030117 0 ustar 00 <?php
/**
* Class ActionScheduler_wpPostStore_PostTypeRegistrar
*
* @codeCoverageIgnore
*/
class ActionScheduler_wpPostStore_PostTypeRegistrar {
/**
* Registrar.
*/
public function register() {
register_post_type( ActionScheduler_wpPostStore::POST_TYPE, $this->post_type_args() );
}
/**
* Build the args array for the post type definition
*
* @return array
*/
protected function post_type_args() {
$args = array(
'label' => __( 'Scheduled Actions', 'action-scheduler' ),
'description' => __( 'Scheduled actions are hooks triggered on a certain date and time.', 'action-scheduler' ),
'public' => false,
'map_meta_cap' => true,
'hierarchical' => false,
'supports' => array( 'title', 'editor', 'comments' ),
'rewrite' => false,
'query_var' => false,
'can_export' => true,
'ep_mask' => EP_NONE,
'labels' => array(
'name' => __( 'Scheduled Actions', 'action-scheduler' ),
'singular_name' => __( 'Scheduled Action', 'action-scheduler' ),
'menu_name' => _x( 'Scheduled Actions', 'Admin menu name', 'action-scheduler' ),
'add_new' => __( 'Add', 'action-scheduler' ),
'add_new_item' => __( 'Add New Scheduled Action', 'action-scheduler' ),
'edit' => __( 'Edit', 'action-scheduler' ),
'edit_item' => __( 'Edit Scheduled Action', 'action-scheduler' ),
'new_item' => __( 'New Scheduled Action', 'action-scheduler' ),
'view' => __( 'View Action', 'action-scheduler' ),
'view_item' => __( 'View Action', 'action-scheduler' ),
'search_items' => __( 'Search Scheduled Actions', 'action-scheduler' ),
'not_found' => __( 'No actions found', 'action-scheduler' ),
'not_found_in_trash' => __( 'No actions found in trash', 'action-scheduler' ),
),
);
$args = apply_filters( 'action_scheduler_post_type_args', $args );
return $args;
}
}
woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_TaxonomyRegistrar.php 0000644 00000001372 15153553405 0030147 0 ustar 00 <?php
/**
* Class ActionScheduler_wpPostStore_TaxonomyRegistrar
*
* @codeCoverageIgnore
*/
class ActionScheduler_wpPostStore_TaxonomyRegistrar {
/**
* Registrar.
*/
public function register() {
register_taxonomy( ActionScheduler_wpPostStore::GROUP_TAXONOMY, ActionScheduler_wpPostStore::POST_TYPE, $this->taxonomy_args() );
}
/**
* Get taxonomy arguments.
*/
protected function taxonomy_args() {
$args = array(
'label' => __( 'Action Group', 'action-scheduler' ),
'public' => false,
'hierarchical' => false,
'show_admin_column' => true,
'query_var' => false,
'rewrite' => false,
);
$args = apply_filters( 'action_scheduler_taxonomy_args', $args );
return $args;
}
}
woocommerce/action-scheduler/classes/migration/ActionMigrator.php 0000644 00000010253 15153553405 0021404 0 ustar 00 <?php
namespace Action_Scheduler\Migration;
/**
* Class ActionMigrator
*
* @package Action_Scheduler\Migration
*
* @since 3.0.0
*
* @codeCoverageIgnore
*/
class ActionMigrator {
/**
* Source store instance.
*
* @var ActionScheduler_Store
*/
private $source;
/**
* Destination store instance.
*
* @var ActionScheduler_Store
*/
private $destination;
/**
* LogMigrator instance.
*
* @var LogMigrator
*/
private $log_migrator;
/**
* ActionMigrator constructor.
*
* @param \ActionScheduler_Store $source_store Source store object.
* @param \ActionScheduler_Store $destination_store Destination store object.
* @param LogMigrator $log_migrator Log migrator object.
*/
public function __construct( \ActionScheduler_Store $source_store, \ActionScheduler_Store $destination_store, LogMigrator $log_migrator ) {
$this->source = $source_store;
$this->destination = $destination_store;
$this->log_migrator = $log_migrator;
}
/**
* Migrate an action.
*
* @param int $source_action_id Action ID.
*
* @return int 0|new action ID
* @throws \RuntimeException When unable to delete action from the source store.
*/
public function migrate( $source_action_id ) {
try {
$action = $this->source->fetch_action( $source_action_id );
$status = $this->source->get_status( $source_action_id );
} catch ( \Exception $e ) {
$action = null;
$status = '';
}
if ( is_null( $action ) || empty( $status ) || ! $action->get_schedule()->get_date() ) {
// null action or empty status means the fetch operation failed or the action didn't exist.
// null schedule means it's missing vital data.
// delete it and move on.
try {
$this->source->delete_action( $source_action_id );
} catch ( \Exception $e ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch
// nothing to do, it didn't exist in the first place.
}
do_action( 'action_scheduler/no_action_to_migrate', $source_action_id, $this->source, $this->destination ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
return 0;
}
try {
// Make sure the last attempt date is set correctly for completed and failed actions.
$last_attempt_date = ( \ActionScheduler_Store::STATUS_PENDING !== $status ) ? $this->source->get_date( $source_action_id ) : null;
$destination_action_id = $this->destination->save_action( $action, null, $last_attempt_date );
} catch ( \Exception $e ) {
do_action( 'action_scheduler/migrate_action_failed', $source_action_id, $this->source, $this->destination ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
return 0; // could not save the action in the new store.
}
try {
switch ( $status ) {
case \ActionScheduler_Store::STATUS_FAILED:
$this->destination->mark_failure( $destination_action_id );
break;
case \ActionScheduler_Store::STATUS_CANCELED:
$this->destination->cancel_action( $destination_action_id );
break;
}
$this->log_migrator->migrate( $source_action_id, $destination_action_id );
$this->source->delete_action( $source_action_id );
$test_action = $this->source->fetch_action( $source_action_id );
if ( ! is_a( $test_action, 'ActionScheduler_NullAction' ) ) {
// translators: %s is an action ID.
throw new \RuntimeException( sprintf( __( 'Unable to remove source migrated action %s', 'action-scheduler' ), $source_action_id ) );
}
do_action( 'action_scheduler/migrated_action', $source_action_id, $destination_action_id, $this->source, $this->destination ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
return $destination_action_id;
} catch ( \Exception $e ) {
// could not delete from the old store.
$this->source->mark_migrated( $source_action_id );
// phpcs:disable WordPress.NamingConventions.ValidHookName.UseUnderscores
do_action( 'action_scheduler/migrate_action_incomplete', $source_action_id, $destination_action_id, $this->source, $this->destination );
do_action( 'action_scheduler/migrated_action', $source_action_id, $destination_action_id, $this->source, $this->destination );
// phpcs:enable
return $destination_action_id;
}
}
}
woocommerce/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php 0000644 00000003453 15153553405 0024631 0 ustar 00 <?php
/**
* Class ActionScheduler_DBStoreMigrator
*
* A class for direct saving of actions to the table data store during migration.
*
* @since 3.0.0
*/
class ActionScheduler_DBStoreMigrator extends ActionScheduler_DBStore {
/**
* Save an action with optional last attempt date.
*
* Normally, saving an action sets its attempted date to 0000-00-00 00:00:00 because when an action is first saved,
* it can't have been attempted yet, but migrated completed actions will have an attempted date, so we need to save
* that when first saving the action.
*
* @param ActionScheduler_Action $action Action to migrate.
* @param null|DateTime $scheduled_date Optional date of the first instance to store.
* @param null|DateTime $last_attempt_date Optional date the action was last attempted.
*
* @return string The action ID
* @throws \RuntimeException When the action is not saved.
*/
public function save_action( ActionScheduler_Action $action, ?DateTime $scheduled_date = null, ?DateTime $last_attempt_date = null ) {
try {
/**
* Global.
*
* @var \wpdb $wpdb
*/
global $wpdb;
$action_id = parent::save_action( $action, $scheduled_date );
if ( null !== $last_attempt_date ) {
$data = array(
'last_attempt_gmt' => $this->get_scheduled_date_string( $action, $last_attempt_date ),
'last_attempt_local' => $this->get_scheduled_date_string_local( $action, $last_attempt_date ),
);
$wpdb->update( $wpdb->actionscheduler_actions, $data, array( 'action_id' => $action_id ), array( '%s', '%s' ), array( '%d' ) );
}
return $action_id;
} catch ( \Exception $e ) {
// translators: %s is an error message.
throw new \RuntimeException( sprintf( __( 'Error saving action: %s', 'action-scheduler' ), $e->getMessage() ), 0 );
}
}
}
woocommerce/action-scheduler/classes/migration/BatchFetcher.php 0000644 00000003350 15153553405 0021004 0 ustar 00 <?php
namespace Action_Scheduler\Migration;
use ActionScheduler_Store as Store;
/**
* Class BatchFetcher
*
* @package Action_Scheduler\Migration
*
* @since 3.0.0
*
* @codeCoverageIgnore
*/
class BatchFetcher {
/**
* Store instance.
*
* @var ActionScheduler_Store
*/
private $store;
/**
* BatchFetcher constructor.
*
* @param ActionScheduler_Store $source_store Source store object.
*/
public function __construct( Store $source_store ) {
$this->store = $source_store;
}
/**
* Retrieve a list of actions.
*
* @param int $count The number of actions to retrieve.
*
* @return int[] A list of action IDs
*/
public function fetch( $count = 10 ) {
foreach ( $this->get_query_strategies( $count ) as $query ) {
$action_ids = $this->store->query_actions( $query );
if ( ! empty( $action_ids ) ) {
return $action_ids;
}
}
return array();
}
/**
* Generate a list of prioritized of action search parameters.
*
* @param int $count Number of actions to find.
*
* @return array
*/
private function get_query_strategies( $count ) {
$now = as_get_datetime_object();
$args = array(
'date' => $now,
'per_page' => $count,
'offset' => 0,
'orderby' => 'date',
'order' => 'ASC',
);
$priorities = array(
Store::STATUS_PENDING,
Store::STATUS_FAILED,
Store::STATUS_CANCELED,
Store::STATUS_COMPLETE,
Store::STATUS_RUNNING,
'', // any other unanticipated status.
);
foreach ( $priorities as $status ) {
yield wp_parse_args(
array(
'status' => $status,
'date_compare' => '<=',
),
$args
);
yield wp_parse_args(
array(
'status' => $status,
'date_compare' => '>=',
),
$args
);
}
}
}
woocommerce/action-scheduler/classes/migration/Config.php 0000644 00000010156 15153553405 0017671 0 ustar 00 <?php
namespace Action_Scheduler\Migration;
use Action_Scheduler\WP_CLI\ProgressBar;
use ActionScheduler_Logger as Logger;
use ActionScheduler_Store as Store;
/**
* Class Config
*
* @package Action_Scheduler\Migration
*
* @since 3.0.0
*
* A config builder for the ActionScheduler\Migration\Runner class
*/
class Config {
/**
* Source store instance.
*
* @var ActionScheduler_Store
*/
private $source_store;
/**
* Source logger instance.
*
* @var ActionScheduler_Logger
*/
private $source_logger;
/**
* Destination store instance.
*
* @var ActionScheduler_Store
*/
private $destination_store;
/**
* Destination logger instance.
*
* @var ActionScheduler_Logger
*/
private $destination_logger;
/**
* Progress bar object.
*
* @var Action_Scheduler\WP_CLI\ProgressBar
*/
private $progress_bar;
/**
* Flag indicating a dryrun.
*
* @var bool
*/
private $dry_run = false;
/**
* Config constructor.
*/
public function __construct() {
}
/**
* Get the configured source store.
*
* @return ActionScheduler_Store
* @throws \RuntimeException When source store is not configured.
*/
public function get_source_store() {
if ( empty( $this->source_store ) ) {
throw new \RuntimeException( __( 'Source store must be configured before running a migration', 'action-scheduler' ) );
}
return $this->source_store;
}
/**
* Set the configured source store.
*
* @param ActionScheduler_Store $store Source store object.
*/
public function set_source_store( Store $store ) {
$this->source_store = $store;
}
/**
* Get the configured source logger.
*
* @return ActionScheduler_Logger
* @throws \RuntimeException When source logger is not configured.
*/
public function get_source_logger() {
if ( empty( $this->source_logger ) ) {
throw new \RuntimeException( __( 'Source logger must be configured before running a migration', 'action-scheduler' ) );
}
return $this->source_logger;
}
/**
* Set the configured source logger.
*
* @param ActionScheduler_Logger $logger Logger object.
*/
public function set_source_logger( Logger $logger ) {
$this->source_logger = $logger;
}
/**
* Get the configured destination store.
*
* @return ActionScheduler_Store
* @throws \RuntimeException When destination store is not configured.
*/
public function get_destination_store() {
if ( empty( $this->destination_store ) ) {
throw new \RuntimeException( __( 'Destination store must be configured before running a migration', 'action-scheduler' ) );
}
return $this->destination_store;
}
/**
* Set the configured destination store.
*
* @param ActionScheduler_Store $store Action store object.
*/
public function set_destination_store( Store $store ) {
$this->destination_store = $store;
}
/**
* Get the configured destination logger.
*
* @return ActionScheduler_Logger
* @throws \RuntimeException When destination logger is not configured.
*/
public function get_destination_logger() {
if ( empty( $this->destination_logger ) ) {
throw new \RuntimeException( __( 'Destination logger must be configured before running a migration', 'action-scheduler' ) );
}
return $this->destination_logger;
}
/**
* Set the configured destination logger.
*
* @param ActionScheduler_Logger $logger Logger object.
*/
public function set_destination_logger( Logger $logger ) {
$this->destination_logger = $logger;
}
/**
* Get flag indicating whether it's a dry run.
*
* @return bool
*/
public function get_dry_run() {
return $this->dry_run;
}
/**
* Set flag indicating whether it's a dry run.
*
* @param bool $dry_run Dry run toggle.
*/
public function set_dry_run( $dry_run ) {
$this->dry_run = (bool) $dry_run;
}
/**
* Get progress bar object.
*
* @return ActionScheduler\WPCLI\ProgressBar
*/
public function get_progress_bar() {
return $this->progress_bar;
}
/**
* Set progress bar object.
*
* @param ActionScheduler\WPCLI\ProgressBar $progress_bar Progress bar object.
*/
public function set_progress_bar( ProgressBar $progress_bar ) {
$this->progress_bar = $progress_bar;
}
}
woocommerce/action-scheduler/classes/migration/Controller.php 0000644 00000014574 15153553405 0020617 0 ustar 00 <?php
namespace Action_Scheduler\Migration;
use ActionScheduler_DataController;
use ActionScheduler_LoggerSchema;
use ActionScheduler_StoreSchema;
use Action_Scheduler\WP_CLI\ProgressBar;
/**
* Class Controller
*
* The main plugin/initialization class for migration to custom tables.
*
* @package Action_Scheduler\Migration
*
* @since 3.0.0
*
* @codeCoverageIgnore
*/
class Controller {
/**
* Instance.
*
* @var self
*/
private static $instance;
/**
* Scheduler instance.
*
* @var Action_Scheduler\Migration\Scheduler
*/
private $migration_scheduler;
/**
* Class name of the store object.
*
* @var string
*/
private $store_classname;
/**
* Class name of the logger object.
*
* @var string
*/
private $logger_classname;
/**
* Flag to indicate migrating custom store.
*
* @var bool
*/
private $migrate_custom_store;
/**
* Controller constructor.
*
* @param Scheduler $migration_scheduler Migration scheduler object.
*/
protected function __construct( Scheduler $migration_scheduler ) {
$this->migration_scheduler = $migration_scheduler;
$this->store_classname = '';
}
/**
* Set the action store class name.
*
* @param string $class Classname of the store class.
*
* @return string
*/
public function get_store_class( $class ) {
if ( \ActionScheduler_DataController::is_migration_complete() ) {
return \ActionScheduler_DataController::DATASTORE_CLASS;
} elseif ( \ActionScheduler_Store::DEFAULT_CLASS !== $class ) {
$this->store_classname = $class;
return $class;
} else {
return 'ActionScheduler_HybridStore';
}
}
/**
* Set the action logger class name.
*
* @param string $class Classname of the logger class.
*
* @return string
*/
public function get_logger_class( $class ) {
\ActionScheduler_Store::instance();
if ( $this->has_custom_datastore() ) {
$this->logger_classname = $class;
return $class;
} else {
return \ActionScheduler_DataController::LOGGER_CLASS;
}
}
/**
* Get flag indicating whether a custom datastore is in use.
*
* @return bool
*/
public function has_custom_datastore() {
return (bool) $this->store_classname;
}
/**
* Set up the background migration process.
*
* @return void
*/
public function schedule_migration() {
$logging_tables = new ActionScheduler_LoggerSchema();
$store_tables = new ActionScheduler_StoreSchema();
/*
* In some unusual cases, the expected tables may not have been created. In such cases
* we do not schedule a migration as doing so will lead to fatal error conditions.
*
* In such cases the user will likely visit the Tools > Scheduled Actions screen to
* investigate, and will see appropriate messaging (this step also triggers an attempt
* to rebuild any missing tables).
*
* @see https://github.com/woocommerce/action-scheduler/issues/653
*/
if (
ActionScheduler_DataController::is_migration_complete()
|| $this->migration_scheduler->is_migration_scheduled()
|| ! $store_tables->tables_exist()
|| ! $logging_tables->tables_exist()
) {
return;
}
$this->migration_scheduler->schedule_migration();
}
/**
* Get the default migration config object
*
* @return ActionScheduler\Migration\Config
*/
public function get_migration_config_object() {
static $config = null;
if ( ! $config ) {
$source_store = $this->store_classname ? new $this->store_classname() : new \ActionScheduler_wpPostStore();
$source_logger = $this->logger_classname ? new $this->logger_classname() : new \ActionScheduler_wpCommentLogger();
$config = new Config();
$config->set_source_store( $source_store );
$config->set_source_logger( $source_logger );
$config->set_destination_store( new \ActionScheduler_DBStoreMigrator() );
$config->set_destination_logger( new \ActionScheduler_DBLogger() );
if ( defined( 'WP_CLI' ) && WP_CLI ) {
$config->set_progress_bar( new ProgressBar( '', 0 ) );
}
}
return apply_filters( 'action_scheduler/migration_config', $config ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}
/**
* Hook dashboard migration notice.
*/
public function hook_admin_notices() {
if ( ! $this->allow_migration() || \ActionScheduler_DataController::is_migration_complete() ) {
return;
}
add_action( 'admin_notices', array( $this, 'display_migration_notice' ), 10, 0 );
}
/**
* Show a dashboard notice that migration is in progress.
*/
public function display_migration_notice() {
printf( '<div class="notice notice-warning"><p>%s</p></div>', esc_html__( 'Action Scheduler migration in progress. The list of scheduled actions may be incomplete.', 'action-scheduler' ) );
}
/**
* Add store classes. Hook migration.
*/
private function hook() {
add_filter( 'action_scheduler_store_class', array( $this, 'get_store_class' ), 100, 1 );
add_filter( 'action_scheduler_logger_class', array( $this, 'get_logger_class' ), 100, 1 );
add_action( 'init', array( $this, 'maybe_hook_migration' ) );
add_action( 'wp_loaded', array( $this, 'schedule_migration' ) );
// Action Scheduler may be displayed as a Tools screen or WooCommerce > Status administration screen.
add_action( 'load-tools_page_action-scheduler', array( $this, 'hook_admin_notices' ), 10, 0 );
add_action( 'load-woocommerce_page_wc-status', array( $this, 'hook_admin_notices' ), 10, 0 );
}
/**
* Possibly hook the migration scheduler action.
*/
public function maybe_hook_migration() {
if ( ! $this->allow_migration() || \ActionScheduler_DataController::is_migration_complete() ) {
return;
}
$this->migration_scheduler->hook();
}
/**
* Allow datastores to enable migration to AS tables.
*/
public function allow_migration() {
if ( ! \ActionScheduler_DataController::dependencies_met() ) {
return false;
}
if ( null === $this->migrate_custom_store ) {
$this->migrate_custom_store = apply_filters( 'action_scheduler_migrate_data_store', false );
}
return ( ! $this->has_custom_datastore() ) || $this->migrate_custom_store;
}
/**
* Proceed with the migration if the dependencies have been met.
*/
public static function init() {
if ( \ActionScheduler_DataController::dependencies_met() ) {
self::instance()->hook();
}
}
/**
* Singleton factory.
*/
public static function instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new static( new Scheduler() );
}
return self::$instance;
}
}
woocommerce/action-scheduler/classes/migration/DryRun_ActionMigrator.php 0000644 00000001052 15153553405 0022704 0 ustar 00 <?php
namespace Action_Scheduler\Migration;
/**
* Class DryRun_ActionMigrator
*
* @package Action_Scheduler\Migration
*
* @since 3.0.0
*
* @codeCoverageIgnore
*/
class DryRun_ActionMigrator extends ActionMigrator {
/**
* Simulate migrating an action.
*
* @param int $source_action_id Action ID.
*
* @return int
*/
public function migrate( $source_action_id ) {
do_action( 'action_scheduler/migrate_action_dry_run', $source_action_id ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
return 0;
}
}
woocommerce/action-scheduler/classes/migration/DryRun_LogMigrator.php 0000644 00000000713 15153553405 0022213 0 ustar 00 <?php
namespace Action_Scheduler\Migration;
/**
* Class DryRun_LogMigrator
*
* @package Action_Scheduler\Migration
*
* @codeCoverageIgnore
*/
class DryRun_LogMigrator extends LogMigrator {
/**
* Simulate migrating an action log.
*
* @param int $source_action_id Source logger object.
* @param int $destination_action_id Destination logger object.
*/
public function migrate( $source_action_id, $destination_action_id ) {
// no-op.
}
}
woocommerce/action-scheduler/classes/migration/LogMigrator.php 0000644 00000002441 15153553405 0020710 0 ustar 00 <?php
namespace Action_Scheduler\Migration;
use ActionScheduler_Logger;
/**
* Class LogMigrator
*
* @package Action_Scheduler\Migration
*
* @since 3.0.0
*
* @codeCoverageIgnore
*/
class LogMigrator {
/**
* Source logger instance.
*
* @var ActionScheduler_Logger
*/
private $source;
/**
* Destination logger instance.
*
* @var ActionScheduler_Logger
*/
private $destination;
/**
* ActionMigrator constructor.
*
* @param ActionScheduler_Logger $source_logger Source logger object.
* @param ActionScheduler_Logger $destination_logger Destination logger object.
*/
public function __construct( ActionScheduler_Logger $source_logger, ActionScheduler_Logger $destination_logger ) {
$this->source = $source_logger;
$this->destination = $destination_logger;
}
/**
* Migrate an action log.
*
* @param int $source_action_id Source logger object.
* @param int $destination_action_id Destination logger object.
*/
public function migrate( $source_action_id, $destination_action_id ) {
$logs = $this->source->get_logs( $source_action_id );
foreach ( $logs as $log ) {
if ( absint( $log->get_action_id() ) === absint( $source_action_id ) ) {
$this->destination->log( $destination_action_id, $log->get_message(), $log->get_date() );
}
}
}
}
woocommerce/action-scheduler/classes/migration/Runner.php 0000644 00000010174 15153553405 0017735 0 ustar 00 <?php
namespace Action_Scheduler\Migration;
/**
* Class Runner
*
* @package Action_Scheduler\Migration
*
* @since 3.0.0
*
* @codeCoverageIgnore
*/
class Runner {
/**
* Source store instance.
*
* @var ActionScheduler_Store
*/
private $source_store;
/**
* Destination store instance.
*
* @var ActionScheduler_Store
*/
private $destination_store;
/**
* Source logger instance.
*
* @var ActionScheduler_Logger
*/
private $source_logger;
/**
* Destination logger instance.
*
* @var ActionScheduler_Logger
*/
private $destination_logger;
/**
* Batch fetcher instance.
*
* @var BatchFetcher
*/
private $batch_fetcher;
/**
* Action migrator instance.
*
* @var ActionMigrator
*/
private $action_migrator;
/**
* Log migrator instance.
*
* @var LogMigrator
*/
private $log_migrator;
/**
* Progress bar instance.
*
* @var ProgressBar
*/
private $progress_bar;
/**
* Runner constructor.
*
* @param Config $config Migration configuration object.
*/
public function __construct( Config $config ) {
$this->source_store = $config->get_source_store();
$this->destination_store = $config->get_destination_store();
$this->source_logger = $config->get_source_logger();
$this->destination_logger = $config->get_destination_logger();
$this->batch_fetcher = new BatchFetcher( $this->source_store );
if ( $config->get_dry_run() ) {
$this->log_migrator = new DryRun_LogMigrator( $this->source_logger, $this->destination_logger );
$this->action_migrator = new DryRun_ActionMigrator( $this->source_store, $this->destination_store, $this->log_migrator );
} else {
$this->log_migrator = new LogMigrator( $this->source_logger, $this->destination_logger );
$this->action_migrator = new ActionMigrator( $this->source_store, $this->destination_store, $this->log_migrator );
}
if ( defined( 'WP_CLI' ) && WP_CLI ) {
$this->progress_bar = $config->get_progress_bar();
}
}
/**
* Run migration batch.
*
* @param int $batch_size Optional batch size. Default 10.
*
* @return int Size of batch processed.
*/
public function run( $batch_size = 10 ) {
$batch = $this->batch_fetcher->fetch( $batch_size );
$batch_size = count( $batch );
if ( ! $batch_size ) {
return 0;
}
if ( $this->progress_bar ) {
/* translators: %d: amount of actions */
$this->progress_bar->set_message( sprintf( _n( 'Migrating %d action', 'Migrating %d actions', $batch_size, 'action-scheduler' ), $batch_size ) );
$this->progress_bar->set_count( $batch_size );
}
$this->migrate_actions( $batch );
return $batch_size;
}
/**
* Migration a batch of actions.
*
* @param array $action_ids List of action IDs to migrate.
*/
public function migrate_actions( array $action_ids ) {
do_action( 'action_scheduler/migration_batch_starting', $action_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
\ActionScheduler::logger()->unhook_stored_action();
$this->destination_logger->unhook_stored_action();
foreach ( $action_ids as $source_action_id ) {
$destination_action_id = $this->action_migrator->migrate( $source_action_id );
if ( $destination_action_id ) {
$this->destination_logger->log(
$destination_action_id,
sprintf(
/* translators: 1: source action ID 2: source store class 3: destination action ID 4: destination store class */
__( 'Migrated action with ID %1$d in %2$s to ID %3$d in %4$s', 'action-scheduler' ),
$source_action_id,
get_class( $this->source_store ),
$destination_action_id,
get_class( $this->destination_store )
)
);
}
if ( $this->progress_bar ) {
$this->progress_bar->tick();
}
}
if ( $this->progress_bar ) {
$this->progress_bar->finish();
}
\ActionScheduler::logger()->hook_stored_action();
do_action( 'action_scheduler/migration_batch_complete', $action_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}
/**
* Initialize destination store and logger.
*/
public function init_destination() {
$this->destination_store->init();
$this->destination_logger->init();
}
}
woocommerce/action-scheduler/classes/migration/Scheduler.php 0000644 00000006050 15153553405 0020400 0 ustar 00 <?php
namespace Action_Scheduler\Migration;
/**
* Class Scheduler
*
* @package Action_Scheduler\WP_CLI
*
* @since 3.0.0
*
* @codeCoverageIgnore
*/
class Scheduler {
/** Migration action hook. */
const HOOK = 'action_scheduler/migration_hook';
/** Migration action group. */
const GROUP = 'action-scheduler-migration';
/**
* Set up the callback for the scheduled job.
*/
public function hook() {
add_action( self::HOOK, array( $this, 'run_migration' ), 10, 0 );
}
/**
* Remove the callback for the scheduled job.
*/
public function unhook() {
remove_action( self::HOOK, array( $this, 'run_migration' ), 10 );
}
/**
* The migration callback.
*/
public function run_migration() {
$migration_runner = $this->get_migration_runner();
$count = $migration_runner->run( $this->get_batch_size() );
if ( 0 === $count ) {
$this->mark_complete();
} else {
$this->schedule_migration( time() + $this->get_schedule_interval() );
}
}
/**
* Mark the migration complete.
*/
public function mark_complete() {
$this->unschedule_migration();
\ActionScheduler_DataController::mark_migration_complete();
do_action( 'action_scheduler/migration_complete' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}
/**
* Get a flag indicating whether the migration is scheduled.
*
* @return bool Whether there is a pending action in the store to handle the migration
*/
public function is_migration_scheduled() {
$next = as_next_scheduled_action( self::HOOK );
return ! empty( $next );
}
/**
* Schedule the migration.
*
* @param int $when Optional timestamp to run the next migration batch. Defaults to now.
*
* @return string The action ID
*/
public function schedule_migration( $when = 0 ) {
$next = as_next_scheduled_action( self::HOOK );
if ( ! empty( $next ) ) {
return $next;
}
if ( empty( $when ) ) {
$when = time() + MINUTE_IN_SECONDS;
}
return as_schedule_single_action( $when, self::HOOK, array(), self::GROUP );
}
/**
* Remove the scheduled migration action.
*/
public function unschedule_migration() {
as_unschedule_action( self::HOOK, null, self::GROUP );
}
/**
* Get migration batch schedule interval.
*
* @return int Seconds between migration runs. Defaults to 0 seconds to allow chaining migration via Async Runners.
*/
private function get_schedule_interval() {
return (int) apply_filters( 'action_scheduler/migration_interval', 0 ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}
/**
* Get migration batch size.
*
* @return int Number of actions to migrate in each batch. Defaults to 250.
*/
private function get_batch_size() {
return (int) apply_filters( 'action_scheduler/migration_batch_size', 250 ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}
/**
* Get migration runner object.
*
* @return Runner
*/
private function get_migration_runner() {
$config = Controller::instance()->get_migration_config_object();
return new Runner( $config );
}
}
woocommerce/action-scheduler/classes/schedules/ActionScheduler_CanceledSchedule.php 0000644 00000003157 15153553405 0024764 0 ustar 00 <?php
/**
* Class ActionScheduler_SimpleSchedule
*/
class ActionScheduler_CanceledSchedule extends ActionScheduler_SimpleSchedule {
/**
* Deprecated property @see $this->__wakeup() for details.
*
* @var null
*/
private $timestamp = null;
/**
* Calculate when the next instance of this schedule would run based on a given date & time.
*
* @param DateTime $after Timestamp.
*
* @return DateTime|null
*/
public function calculate_next( DateTime $after ) {
return null;
}
/**
* Cancelled actions should never have a next schedule, even if get_next()
* is called with $after < $this->scheduled_date.
*
* @param DateTime $after Timestamp.
* @return DateTime|null
*/
public function get_next( DateTime $after ) {
return null;
}
/**
* Action is not recurring.
*
* @return bool
*/
public function is_recurring() {
return false;
}
/**
* Unserialize recurring schedules serialized/stored prior to AS 3.0.0
*
* Prior to Action Scheduler 3.0.0, schedules used different property names to refer
* to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp
* was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0
* aligned properties and property names for better inheritance. To maintain backward
* compatibility with schedules serialized and stored prior to 3.0, we need to correctly
* map the old property names with matching visibility.
*/
public function __wakeup() {
if ( ! is_null( $this->timestamp ) ) {
$this->scheduled_timestamp = $this->timestamp;
unset( $this->timestamp );
}
parent::__wakeup();
}
}
woocommerce/action-scheduler/classes/schedules/ActionScheduler_CronSchedule.php 0000644 00000007367 15153553405 0024176 0 ustar 00 <?php
/**
* Class ActionScheduler_CronSchedule
*/
class ActionScheduler_CronSchedule extends ActionScheduler_Abstract_RecurringSchedule implements ActionScheduler_Schedule {
/**
* Deprecated property @see $this->__wakeup() for details.
*
* @var null
*/
private $start_timestamp = null;
/**
* Deprecated property @see $this->__wakeup() for details.
*
* @var null
*/
private $cron = null;
/**
* Wrapper for parent constructor to accept a cron expression string and map it to a CronExpression for this
* objects $recurrence property.
*
* @param DateTime $start The date & time to run the action at or after. If $start aligns with the CronSchedule passed via $recurrence, it will be used. If it does not align, the first matching date after it will be used.
* @param CronExpression|string $recurrence The CronExpression used to calculate the schedule's next instance.
* @param DateTime|null $first (Optional) The date & time the first instance of this interval schedule ran. Default null, meaning this is the first instance.
*/
public function __construct( DateTime $start, $recurrence, ?DateTime $first = null ) {
if ( ! is_a( $recurrence, 'CronExpression' ) ) {
$recurrence = CronExpression::factory( $recurrence );
}
// For backward compatibility, we need to make sure the date is set to the first matching cron date, not whatever date is passed in. Importantly, by passing true as the 3rd param, if $start matches the cron expression, then it will be used. This was previously handled in the now deprecated next() method.
$date = $recurrence->getNextRunDate( $start, 0, true );
// parent::__construct() will set this to $date by default, but that may be different to $start now.
$first = empty( $first ) ? $start : $first;
parent::__construct( $date, $recurrence, $first );
}
/**
* Calculate when an instance of this schedule would start based on a given
* date & time using its the CronExpression.
*
* @param DateTime $after Timestamp.
* @return DateTime
*/
protected function calculate_next( DateTime $after ) {
return $this->recurrence->getNextRunDate( $after, 0, false );
}
/**
* Get the schedule's recurrence.
*
* @return string
*/
public function get_recurrence() {
return strval( $this->recurrence );
}
/**
* Serialize cron schedules with data required prior to AS 3.0.0
*
* Prior to Action Scheduler 3.0.0, recurring schedules used different property names to
* refer to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp
* was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0
* aligned properties and property names for better inheritance. To guard against the
* possibility of infinite loops if downgrading to Action Scheduler < 3.0.0, we need to
* also store the data with the old property names so if it's unserialized in AS < 3.0,
* the schedule doesn't end up with a null recurrence.
*
* @return array
*/
public function __sleep() {
$sleep_params = parent::__sleep();
$this->start_timestamp = $this->scheduled_timestamp;
$this->cron = $this->recurrence;
return array_merge(
$sleep_params,
array(
'start_timestamp',
'cron',
)
);
}
/**
* Unserialize cron schedules serialized/stored prior to AS 3.0.0
*
* For more background, @see ActionScheduler_Abstract_RecurringSchedule::__wakeup().
*/
public function __wakeup() {
if ( is_null( $this->scheduled_timestamp ) && ! is_null( $this->start_timestamp ) ) {
$this->scheduled_timestamp = $this->start_timestamp;
unset( $this->start_timestamp );
}
if ( is_null( $this->recurrence ) && ! is_null( $this->cron ) ) {
$this->recurrence = $this->cron;
unset( $this->cron );
}
parent::__wakeup();
}
}
woocommerce/action-scheduler/classes/schedules/ActionScheduler_IntervalSchedule.php 0000644 00000005111 15153553405 0025042 0 ustar 00 <?php
/**
* Class ActionScheduler_IntervalSchedule
*/
class ActionScheduler_IntervalSchedule extends ActionScheduler_Abstract_RecurringSchedule implements ActionScheduler_Schedule {
/**
* Deprecated property @see $this->__wakeup() for details.
*
* @var null
*/
private $start_timestamp = null;
/**
* Deprecated property @see $this->__wakeup() for details.
*
* @var null
*/
private $interval_in_seconds = null;
/**
* Calculate when this schedule should start after a given date & time using
* the number of seconds between recurrences.
*
* @param DateTime $after Timestamp.
* @return DateTime
*/
protected function calculate_next( DateTime $after ) {
$after->modify( '+' . (int) $this->get_recurrence() . ' seconds' );
return $after;
}
/**
* Schedule interval in seconds.
*
* @return int
*/
public function interval_in_seconds() {
_deprecated_function( __METHOD__, '3.0.0', '(int)ActionScheduler_Abstract_RecurringSchedule::get_recurrence()' );
return (int) $this->get_recurrence();
}
/**
* Serialize interval schedules with data required prior to AS 3.0.0
*
* Prior to Action Scheduler 3.0.0, recurring schedules used different property names to
* refer to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp
* was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0
* aligned properties and property names for better inheritance. To guard against the
* possibility of infinite loops if downgrading to Action Scheduler < 3.0.0, we need to
* also store the data with the old property names so if it's unserialized in AS < 3.0,
* the schedule doesn't end up with a null/false/0 recurrence.
*
* @return array
*/
public function __sleep() {
$sleep_params = parent::__sleep();
$this->start_timestamp = $this->scheduled_timestamp;
$this->interval_in_seconds = $this->recurrence;
return array_merge(
$sleep_params,
array(
'start_timestamp',
'interval_in_seconds',
)
);
}
/**
* Unserialize interval schedules serialized/stored prior to AS 3.0.0
*
* For more background, @see ActionScheduler_Abstract_RecurringSchedule::__wakeup().
*/
public function __wakeup() {
if ( is_null( $this->scheduled_timestamp ) && ! is_null( $this->start_timestamp ) ) {
$this->scheduled_timestamp = $this->start_timestamp;
unset( $this->start_timestamp );
}
if ( is_null( $this->recurrence ) && ! is_null( $this->interval_in_seconds ) ) {
$this->recurrence = $this->interval_in_seconds;
unset( $this->interval_in_seconds );
}
parent::__wakeup();
}
}
woocommerce/action-scheduler/classes/schedules/ActionScheduler_NullSchedule.php 0000644 00000001305 15153553405 0024171 0 ustar 00 <?php
/**
* Class ActionScheduler_NullSchedule
*/
class ActionScheduler_NullSchedule extends ActionScheduler_SimpleSchedule {
/**
* DateTime instance.
*
* @var DateTime|null
*/
protected $scheduled_date;
/**
* Make the $date param optional and default to null.
*
* @param null|DateTime $date The date & time to run the action.
*/
public function __construct( ?DateTime $date = null ) {
$this->scheduled_date = null;
}
/**
* This schedule has no scheduled DateTime, so we need to override the parent __sleep().
*
* @return array
*/
public function __sleep() {
return array();
}
/**
* Wakeup.
*/
public function __wakeup() {
$this->scheduled_date = null;
}
}
woocommerce/action-scheduler/classes/schedules/ActionScheduler_Schedule.php 0000644 00000000710 15153553405 0023335 0 ustar 00 <?php
/**
* Class ActionScheduler_Schedule
*/
interface ActionScheduler_Schedule {
/**
* Get the date & time this schedule was created to run, or calculate when it should be run
* after a given date & time.
*
* @param null|DateTime $after Timestamp.
* @return DateTime|null
*/
public function next( ?DateTime $after = null );
/**
* Identify the schedule as (not) recurring.
*
* @return bool
*/
public function is_recurring();
}
woocommerce/action-scheduler/classes/schedules/ActionScheduler_SimpleSchedule.php 0000644 00000004477 15153553405 0024525 0 ustar 00 <?php
/**
* Class ActionScheduler_SimpleSchedule
*/
class ActionScheduler_SimpleSchedule extends ActionScheduler_Abstract_Schedule {
/**
* Deprecated property @see $this->__wakeup() for details.
*
* @var null|DateTime
*/
private $timestamp = null;
/**
* Calculate when this schedule should start after a given date & time using
* the number of seconds between recurrences.
*
* @param DateTime $after Timestamp.
*
* @return DateTime|null
*/
public function calculate_next( DateTime $after ) {
return null;
}
/**
* Schedule is not recurring.
*
* @return bool
*/
public function is_recurring() {
return false;
}
/**
* Serialize schedule with data required prior to AS 3.0.0
*
* Prior to Action Scheduler 3.0.0, schedules used different property names to refer
* to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp
* was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0
* aligned properties and property names for better inheritance. To guard against the
* scheduled date for single actions always being seen as "now" if downgrading to
* Action Scheduler < 3.0.0, we need to also store the data with the old property names
* so if it's unserialized in AS < 3.0, the schedule doesn't end up with a null recurrence.
*
* @return array
*/
public function __sleep() {
$sleep_params = parent::__sleep();
$this->timestamp = $this->scheduled_timestamp;
return array_merge(
$sleep_params,
array(
'timestamp',
)
);
}
/**
* Unserialize recurring schedules serialized/stored prior to AS 3.0.0
*
* Prior to Action Scheduler 3.0.0, schedules used different property names to refer
* to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp
* was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0
* aligned properties and property names for better inheritance. To maintain backward
* compatibility with schedules serialized and stored prior to 3.0, we need to correctly
* map the old property names with matching visibility.
*/
public function __wakeup() {
if ( is_null( $this->scheduled_timestamp ) && ! is_null( $this->timestamp ) ) {
$this->scheduled_timestamp = $this->timestamp;
unset( $this->timestamp );
}
parent::__wakeup();
}
}
woocommerce/action-scheduler/classes/schema/ActionScheduler_LoggerSchema.php 0000644 00000005672 15153553405 0023436 0 ustar 00 <?php
/**
* Class ActionScheduler_LoggerSchema
*
* @codeCoverageIgnore
*
* Creates a custom table for storing action logs
*/
class ActionScheduler_LoggerSchema extends ActionScheduler_Abstract_Schema {
const LOG_TABLE = 'actionscheduler_logs';
/**
* Schema version.
*
* Increment this value to trigger a schema update.
*
* @var int
*/
protected $schema_version = 3;
/**
* Construct.
*/
public function __construct() {
$this->tables = array(
self::LOG_TABLE,
);
}
/**
* Performs additional setup work required to support this schema.
*/
public function init() {
add_action( 'action_scheduler_before_schema_update', array( $this, 'update_schema_3_0' ), 10, 2 );
}
/**
* Get table definition.
*
* @param string $table Table name.
*/
protected function get_table_definition( $table ) {
global $wpdb;
$table_name = $wpdb->$table;
$charset_collate = $wpdb->get_charset_collate();
switch ( $table ) {
case self::LOG_TABLE:
$default_date = ActionScheduler_StoreSchema::DEFAULT_DATE;
return "CREATE TABLE $table_name (
log_id bigint(20) unsigned NOT NULL auto_increment,
action_id bigint(20) unsigned NOT NULL,
message text NOT NULL,
log_date_gmt datetime NULL default '{$default_date}',
log_date_local datetime NULL default '{$default_date}',
PRIMARY KEY (log_id),
KEY action_id (action_id),
KEY log_date_gmt (log_date_gmt)
) $charset_collate";
default:
return '';
}
}
/**
* Update the logs table schema, allowing datetime fields to be NULL.
*
* This is needed because the NOT NULL constraint causes a conflict with some versions of MySQL
* configured with sql_mode=NO_ZERO_DATE, which can for instance lead to tables not being created.
*
* Most other schema updates happen via ActionScheduler_Abstract_Schema::update_table(), however
* that method relies on dbDelta() and this change is not possible when using that function.
*
* @param string $table Name of table being updated.
* @param string $db_version The existing schema version of the table.
*/
public function update_schema_3_0( $table, $db_version ) {
global $wpdb;
if ( 'actionscheduler_logs' !== $table || version_compare( $db_version, '3', '>=' ) ) {
return;
}
// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
$table_name = $wpdb->prefix . 'actionscheduler_logs';
$table_list = $wpdb->get_col( "SHOW TABLES LIKE '{$table_name}'" );
$default_date = ActionScheduler_StoreSchema::DEFAULT_DATE;
if ( ! empty( $table_list ) ) {
$query = "
ALTER TABLE {$table_name}
MODIFY COLUMN log_date_gmt datetime NULL default '{$default_date}',
MODIFY COLUMN log_date_local datetime NULL default '{$default_date}'
";
$wpdb->query( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
}
// phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
}
}
woocommerce/action-scheduler/classes/schema/ActionScheduler_StoreSchema.php 0000644 00000011773 15153553405 0023312 0 ustar 00 <?php
/**
* Class ActionScheduler_StoreSchema
*
* @codeCoverageIgnore
*
* Creates custom tables for storing scheduled actions
*/
class ActionScheduler_StoreSchema extends ActionScheduler_Abstract_Schema {
const ACTIONS_TABLE = 'actionscheduler_actions';
const CLAIMS_TABLE = 'actionscheduler_claims';
const GROUPS_TABLE = 'actionscheduler_groups';
const DEFAULT_DATE = '0000-00-00 00:00:00';
/**
* Schema version.
*
* Increment this value to trigger a schema update.
*
* @var int
*/
protected $schema_version = 7;
/**
* Construct.
*/
public function __construct() {
$this->tables = array(
self::ACTIONS_TABLE,
self::CLAIMS_TABLE,
self::GROUPS_TABLE,
);
}
/**
* Performs additional setup work required to support this schema.
*/
public function init() {
add_action( 'action_scheduler_before_schema_update', array( $this, 'update_schema_5_0' ), 10, 2 );
}
/**
* Get table definition.
*
* @param string $table Table name.
*/
protected function get_table_definition( $table ) {
global $wpdb;
$table_name = $wpdb->$table;
$charset_collate = $wpdb->get_charset_collate();
$default_date = self::DEFAULT_DATE;
// phpcs:ignore Squiz.PHP.CommentedOutCode
$max_index_length = 191; // @see wp_get_db_schema()
$hook_status_scheduled_date_gmt_max_index_length = $max_index_length - 20 - 8; // - status, - scheduled_date_gmt
switch ( $table ) {
case self::ACTIONS_TABLE:
return "CREATE TABLE {$table_name} (
action_id bigint(20) unsigned NOT NULL auto_increment,
hook varchar(191) NOT NULL,
status varchar(20) NOT NULL,
scheduled_date_gmt datetime NULL default '{$default_date}',
scheduled_date_local datetime NULL default '{$default_date}',
priority tinyint unsigned NOT NULL default '10',
args varchar($max_index_length),
schedule longtext,
group_id bigint(20) unsigned NOT NULL default '0',
attempts int(11) NOT NULL default '0',
last_attempt_gmt datetime NULL default '{$default_date}',
last_attempt_local datetime NULL default '{$default_date}',
claim_id bigint(20) unsigned NOT NULL default '0',
extended_args varchar(8000) DEFAULT NULL,
PRIMARY KEY (action_id),
KEY hook_status_scheduled_date_gmt (hook($hook_status_scheduled_date_gmt_max_index_length), status, scheduled_date_gmt),
KEY status_scheduled_date_gmt (status, scheduled_date_gmt),
KEY scheduled_date_gmt (scheduled_date_gmt),
KEY args (args($max_index_length)),
KEY group_id (group_id),
KEY last_attempt_gmt (last_attempt_gmt),
KEY `claim_id_status_scheduled_date_gmt` (`claim_id`, `status`, `scheduled_date_gmt`)
) $charset_collate";
case self::CLAIMS_TABLE:
return "CREATE TABLE {$table_name} (
claim_id bigint(20) unsigned NOT NULL auto_increment,
date_created_gmt datetime NULL default '{$default_date}',
PRIMARY KEY (claim_id),
KEY date_created_gmt (date_created_gmt)
) $charset_collate";
case self::GROUPS_TABLE:
return "CREATE TABLE {$table_name} (
group_id bigint(20) unsigned NOT NULL auto_increment,
slug varchar(255) NOT NULL,
PRIMARY KEY (group_id),
KEY slug (slug($max_index_length))
) $charset_collate";
default:
return '';
}
}
/**
* Update the actions table schema, allowing datetime fields to be NULL.
*
* This is needed because the NOT NULL constraint causes a conflict with some versions of MySQL
* configured with sql_mode=NO_ZERO_DATE, which can for instance lead to tables not being created.
*
* Most other schema updates happen via ActionScheduler_Abstract_Schema::update_table(), however
* that method relies on dbDelta() and this change is not possible when using that function.
*
* @param string $table Name of table being updated.
* @param string $db_version The existing schema version of the table.
*/
public function update_schema_5_0( $table, $db_version ) {
global $wpdb;
if ( 'actionscheduler_actions' !== $table || version_compare( $db_version, '5', '>=' ) ) {
return;
}
// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
$table_name = $wpdb->prefix . 'actionscheduler_actions';
$table_list = $wpdb->get_col( "SHOW TABLES LIKE '{$table_name}'" );
$default_date = self::DEFAULT_DATE;
if ( ! empty( $table_list ) ) {
$query = "
ALTER TABLE {$table_name}
MODIFY COLUMN scheduled_date_gmt datetime NULL default '{$default_date}',
MODIFY COLUMN scheduled_date_local datetime NULL default '{$default_date}',
MODIFY COLUMN last_attempt_gmt datetime NULL default '{$default_date}',
MODIFY COLUMN last_attempt_local datetime NULL default '{$default_date}'
";
$wpdb->query( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
}
// phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
}
}
woocommerce/action-scheduler/deprecated/ActionScheduler_Abstract_QueueRunner_Deprecated.php 0000644 00000001524 15153553405 0026512 0 ustar 00 <?php
/**
* Abstract class with common Queue Cleaner functionality.
*/
abstract class ActionScheduler_Abstract_QueueRunner_Deprecated {
/**
* Get the maximum number of seconds a batch can run for.
*
* @deprecated 2.1.1
* @return int The number of seconds.
*/
protected function get_maximum_execution_time() {
_deprecated_function( __METHOD__, '2.1.1', 'ActionScheduler_Abstract_QueueRunner::get_time_limit()' );
$maximum_execution_time = 30;
// Apply deprecated filter.
if ( has_filter( 'action_scheduler_maximum_execution_time' ) ) {
_deprecated_function( 'action_scheduler_maximum_execution_time', '2.1.1', 'action_scheduler_queue_runner_time_limit' );
$maximum_execution_time = apply_filters( 'action_scheduler_maximum_execution_time', $maximum_execution_time );
}
return absint( $maximum_execution_time );
}
}
woocommerce/action-scheduler/deprecated/ActionScheduler_AdminView_Deprecated.php 0000644 00000012532 15153553405 0024275 0 ustar 00 <?php
/**
* Class ActionScheduler_AdminView_Deprecated
*
* Store deprecated public functions previously found in the ActionScheduler_AdminView class.
* Keeps them out of the way of the main class.
*
* @codeCoverageIgnore
*/
class ActionScheduler_AdminView_Deprecated {
/**
* Adjust parameters for custom post type.
*
* @param array $args Args.
*/
public function action_scheduler_post_type_args( $args ) {
_deprecated_function( __METHOD__, '2.0.0' );
return $args;
}
/**
* Customise the post status related views displayed on the Scheduled Actions administration screen.
*
* @param array $views An associative array of views and view labels which can be used to filter the 'scheduled-action' posts displayed on the Scheduled Actions administration screen.
* @return array $views An associative array of views and view labels which can be used to filter the 'scheduled-action' posts displayed on the Scheduled Actions administration screen.
*/
public function list_table_views( $views ) {
_deprecated_function( __METHOD__, '2.0.0' );
return $views;
}
/**
* Do not include the "Edit" action for the Scheduled Actions administration screen.
*
* Hooked to the 'bulk_actions-edit-action-scheduler' filter.
*
* @param array $actions An associative array of actions which can be performed on the 'scheduled-action' post type.
* @return array $actions An associative array of actions which can be performed on the 'scheduled-action' post type.
*/
public function bulk_actions( $actions ) {
_deprecated_function( __METHOD__, '2.0.0' );
return $actions;
}
/**
* Completely customer the columns displayed on the Scheduled Actions administration screen.
*
* Because we can't filter the content of the default title and date columns, we need to recreate our own
* custom columns for displaying those post fields. For the column content, @see self::list_table_column_content().
*
* @param array $columns An associative array of columns that are use for the table on the Scheduled Actions administration screen.
* @return array $columns An associative array of columns that are use for the table on the Scheduled Actions administration screen.
*/
public function list_table_columns( $columns ) {
_deprecated_function( __METHOD__, '2.0.0' );
return $columns;
}
/**
* Make our custom title & date columns use defaulting title & date sorting.
*
* @param array $columns An associative array of columns that can be used to sort the table on the Scheduled Actions administration screen.
* @return array $columns An associative array of columns that can be used to sort the table on the Scheduled Actions administration screen.
*/
public static function list_table_sortable_columns( $columns ) {
_deprecated_function( __METHOD__, '2.0.0' );
return $columns;
}
/**
* Print the content for our custom columns.
*
* @param string $column_name The key for the column for which we should output our content.
* @param int $post_id The ID of the 'scheduled-action' post for which this row relates.
*/
public static function list_table_column_content( $column_name, $post_id ) {
_deprecated_function( __METHOD__, '2.0.0' );
}
/**
* Hide the inline "Edit" action for all 'scheduled-action' posts.
*
* Hooked to the 'post_row_actions' filter.
*
* @param array $actions An associative array of actions which can be performed on the 'scheduled-action' post type.
* @param WP_Post $post The 'scheduled-action' post object.
* @return array $actions An associative array of actions which can be performed on the 'scheduled-action' post type.
*/
public static function row_actions( $actions, $post ) {
_deprecated_function( __METHOD__, '2.0.0' );
return $actions;
}
/**
* Run an action when triggered from the Action Scheduler administration screen.
*
* @codeCoverageIgnore
*/
public static function maybe_execute_action() {
_deprecated_function( __METHOD__, '2.0.0' );
}
/**
* Convert an interval of seconds into a two part human friendly string.
*
* The WordPress human_time_diff() function only calculates the time difference to one degree, meaning
* even if an action is 1 day and 11 hours away, it will display "1 day". This function goes one step
* further to display two degrees of accuracy.
*
* Based on Crontrol::interval() function by Edward Dale: https://wordpress.org/plugins/wp-crontrol/
*
* @return void
*/
public static function admin_notices() {
_deprecated_function( __METHOD__, '2.0.0' );
}
/**
* Filter search queries to allow searching by Claim ID (i.e. post_password).
*
* @param string $orderby MySQL orderby string.
* @param WP_Query $query Instance of a WP_Query object.
* @return void
*/
public function custom_orderby( $orderby, $query ) {
_deprecated_function( __METHOD__, '2.0.0' );
}
/**
* Filter search queries to allow searching by Claim ID (i.e. post_password).
*
* @param string $search MySQL search string.
* @param WP_Query $query Instance of a WP_Query object.
* @return void
*/
public function search_post_password( $search, $query ) {
_deprecated_function( __METHOD__, '2.0.0' );
}
/**
* Change messages when a scheduled action is updated.
*
* @param array $messages Messages.
* @return array
*/
public function post_updated_messages( $messages ) {
_deprecated_function( __METHOD__, '2.0.0' );
return $messages;
}
}
woocommerce/action-scheduler/deprecated/ActionScheduler_Schedule_Deprecated.php 0000644 00000001500 15153553405 0024137 0 ustar 00 <?php
/**
* Class ActionScheduler_Abstract_Schedule
*/
abstract class ActionScheduler_Schedule_Deprecated implements ActionScheduler_Schedule {
/**
* Get the date & time this schedule was created to run, or calculate when it should be run
* after a given date & time.
*
* @param DateTime $after DateTime to calculate against.
*
* @return DateTime|null
*/
public function next( ?DateTime $after = null ) {
if ( empty( $after ) ) {
$return_value = $this->get_date();
$replacement_method = 'get_date()';
} else {
$return_value = $this->get_next( $after );
$replacement_method = 'get_next( $after )';
}
_deprecated_function( __METHOD__, '3.0.0', __CLASS__ . '::' . $replacement_method ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
return $return_value;
}
}
woocommerce/action-scheduler/deprecated/ActionScheduler_Store_Deprecated.php 0000644 00000002043 15153553405 0023502 0 ustar 00 <?php
/**
* Class ActionScheduler_Store_Deprecated
*
* @codeCoverageIgnore
*/
abstract class ActionScheduler_Store_Deprecated {
/**
* Mark an action that failed to fetch correctly as failed.
*
* @since 2.2.6
*
* @param int $action_id The ID of the action.
*/
public function mark_failed_fetch_action( $action_id ) {
_deprecated_function( __METHOD__, '3.0.0', 'ActionScheduler_Store::mark_failure()' );
self::$store->mark_failure( $action_id );
}
/**
* Add base hooks
*
* @since 2.2.6
*/
protected static function hook() {
_deprecated_function( __METHOD__, '3.0.0' );
}
/**
* Remove base hooks
*
* @since 2.2.6
*/
protected static function unhook() {
_deprecated_function( __METHOD__, '3.0.0' );
}
/**
* Get the site's local time.
*
* @deprecated 2.1.0
* @return DateTimeZone
*/
protected function get_local_timezone() {
_deprecated_function( __FUNCTION__, '2.1.0', 'ActionScheduler_TimezoneHelper::set_local_timezone()' );
return ActionScheduler_TimezoneHelper::get_local_timezone();
}
}
woocommerce/action-scheduler/deprecated/functions.php 0000644 00000012231 15153553405 0017142 0 ustar 00 <?php
/**
* Deprecated API functions for scheduling actions
*
* Functions with the wc prefix were deprecated to avoid confusion with
* Action Scheduler being included in WooCommerce core, and it providing
* a different set of APIs for working with the action queue.
*
* @package ActionScheduler
*/
/**
* Schedule an action to run one time.
*
* @param int $timestamp When the job will run.
* @param string $hook The hook to trigger.
* @param array $args Arguments to pass when the hook triggers.
* @param string $group The group to assign this job to.
*
* @return string The job ID
*/
function wc_schedule_single_action( $timestamp, $hook, $args = array(), $group = '' ) {
_deprecated_function( __FUNCTION__, '2.1.0', 'as_schedule_single_action()' );
return as_schedule_single_action( $timestamp, $hook, $args, $group );
}
/**
* Schedule a recurring action.
*
* @param int $timestamp When the first instance of the job will run.
* @param int $interval_in_seconds How long to wait between runs.
* @param string $hook The hook to trigger.
* @param array $args Arguments to pass when the hook triggers.
* @param string $group The group to assign this job to.
*
* @deprecated 2.1.0
*
* @return string The job ID
*/
function wc_schedule_recurring_action( $timestamp, $interval_in_seconds, $hook, $args = array(), $group = '' ) {
_deprecated_function( __FUNCTION__, '2.1.0', 'as_schedule_recurring_action()' );
return as_schedule_recurring_action( $timestamp, $interval_in_seconds, $hook, $args, $group );
}
/**
* Schedule an action that recurs on a cron-like schedule.
*
* @param int $timestamp The schedule will start on or after this time.
* @param string $schedule A cron-link schedule string.
* @see http://en.wikipedia.org/wiki/Cron
* * * * * * *
* ┬ ┬ ┬ ┬ ┬ ┬
* | | | | | |
* | | | | | + year [optional]
* | | | | +----- day of week (0 - 7) (Sunday=0 or 7)
* | | | +---------- month (1 - 12)
* | | +--------------- day of month (1 - 31)
* | +-------------------- hour (0 - 23)
* +------------------------- min (0 - 59)
* @param string $hook The hook to trigger.
* @param array $args Arguments to pass when the hook triggers.
* @param string $group The group to assign this job to.
*
* @deprecated 2.1.0
*
* @return string The job ID
*/
function wc_schedule_cron_action( $timestamp, $schedule, $hook, $args = array(), $group = '' ) {
_deprecated_function( __FUNCTION__, '2.1.0', 'as_schedule_cron_action()' );
return as_schedule_cron_action( $timestamp, $schedule, $hook, $args, $group );
}
/**
* Cancel the next occurrence of a job.
*
* @param string $hook The hook that the job will trigger.
* @param array $args Args that would have been passed to the job.
* @param string $group Action's group.
*
* @deprecated 2.1.0
*/
function wc_unschedule_action( $hook, $args = array(), $group = '' ) {
_deprecated_function( __FUNCTION__, '2.1.0', 'as_unschedule_action()' );
as_unschedule_action( $hook, $args, $group );
}
/**
* Get next scheduled action.
*
* @param string $hook Action's hook.
* @param array $args Action's args.
* @param string $group Action's group.
*
* @deprecated 2.1.0
*
* @return int|bool The timestamp for the next occurrence, or false if nothing was found
*/
function wc_next_scheduled_action( $hook, $args = null, $group = '' ) {
_deprecated_function( __FUNCTION__, '2.1.0', 'as_next_scheduled_action()' );
return as_next_scheduled_action( $hook, $args, $group );
}
/**
* Find scheduled actions
*
* @param array $args Possible arguments, with their default values:
* 'hook' => '' - the name of the action that will be triggered
* 'args' => NULL - the args array that will be passed with the action
* 'date' => NULL - the scheduled date of the action. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone.
* 'date_compare' => '<=' - operator for testing "date". accepted values are '!=', '>', '>=', '<', '<=', '='
* 'modified' => NULL - the date the action was last updated. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone.
* 'modified_compare' => '<=' - operator for testing "modified". accepted values are '!=', '>', '>=', '<', '<=', '='
* 'group' => '' - the group the action belongs to
* 'status' => '' - ActionScheduler_Store::STATUS_COMPLETE or ActionScheduler_Store::STATUS_PENDING
* 'claimed' => NULL - TRUE to find claimed actions, FALSE to find unclaimed actions, a string to find a specific claim ID
* 'per_page' => 5 - Number of results to return
* 'offset' => 0
* 'orderby' => 'date' - accepted values are 'hook', 'group', 'modified', or 'date'
* 'order' => 'ASC'.
* @param string $return_format OBJECT, ARRAY_A, or ids.
*
* @deprecated 2.1.0
*
* @return array
*/
function wc_get_scheduled_actions( $args = array(), $return_format = OBJECT ) {
_deprecated_function( __FUNCTION__, '2.1.0', 'as_get_scheduled_actions()' );
return as_get_scheduled_actions( $args, $return_format );
}
woocommerce/action-scheduler/functions.php 0000644 00000045301 15153553405 0015046 0 ustar 00 <?php
/**
* General API functions for scheduling actions
*
* @package ActionScheduler.
*/
/**
* Enqueue an action to run one time, as soon as possible
*
* @param string $hook The hook to trigger.
* @param array $args Arguments to pass when the hook triggers.
* @param string $group The group to assign this job to.
* @param bool $unique Whether the action should be unique. It will not be scheduled if another pending or running action has the same hook and group parameters.
* @param int $priority Lower values take precedence over higher values. Defaults to 10, with acceptable values falling in the range 0-255.
*
* @return int The action ID. Zero if there was an error scheduling the action.
*/
function as_enqueue_async_action( $hook, $args = array(), $group = '', $unique = false, $priority = 10 ) {
if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) {
return 0;
}
/**
* Provides an opportunity to short-circuit the default process for enqueuing async
* actions.
*
* Returning a value other than null from the filter will short-circuit the normal
* process. The expectation in such a scenario is that callbacks will return an integer
* representing the enqueued action ID (enqueued using some alternative process) or else
* zero.
*
* @param int|null $pre_option The value to return instead of the option value.
* @param string $hook Action hook.
* @param array $args Action arguments.
* @param string $group Action group.
* @param int $priority Action priority.
* @param bool $unique Unique action.
*/
$pre = apply_filters( 'pre_as_enqueue_async_action', null, $hook, $args, $group, $priority, $unique );
if ( null !== $pre ) {
return is_int( $pre ) ? $pre : 0;
}
return ActionScheduler::factory()->create(
array(
'type' => 'async',
'hook' => $hook,
'arguments' => $args,
'group' => $group,
'unique' => $unique,
'priority' => $priority,
)
);
}
/**
* Schedule an action to run one time
*
* @param int $timestamp When the job will run.
* @param string $hook The hook to trigger.
* @param array $args Arguments to pass when the hook triggers.
* @param string $group The group to assign this job to.
* @param bool $unique Whether the action should be unique. It will not be scheduled if another pending or running action has the same hook and group parameters.
* @param int $priority Lower values take precedence over higher values. Defaults to 10, with acceptable values falling in the range 0-255.
*
* @return int The action ID. Zero if there was an error scheduling the action.
*/
function as_schedule_single_action( $timestamp, $hook, $args = array(), $group = '', $unique = false, $priority = 10 ) {
if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) {
return 0;
}
/**
* Provides an opportunity to short-circuit the default process for enqueuing single
* actions.
*
* Returning a value other than null from the filter will short-circuit the normal
* process. The expectation in such a scenario is that callbacks will return an integer
* representing the scheduled action ID (scheduled using some alternative process) or else
* zero.
*
* @param int|null $pre_option The value to return instead of the option value.
* @param int $timestamp When the action will run.
* @param string $hook Action hook.
* @param array $args Action arguments.
* @param string $group Action group.
* @param int $priorities Action priority.
*/
$pre = apply_filters( 'pre_as_schedule_single_action', null, $timestamp, $hook, $args, $group, $priority );
if ( null !== $pre ) {
return is_int( $pre ) ? $pre : 0;
}
return ActionScheduler::factory()->create(
array(
'type' => 'single',
'hook' => $hook,
'arguments' => $args,
'when' => $timestamp,
'group' => $group,
'unique' => $unique,
'priority' => $priority,
)
);
}
/**
* Schedule a recurring action
*
* @param int $timestamp When the first instance of the job will run.
* @param int $interval_in_seconds How long to wait between runs.
* @param string $hook The hook to trigger.
* @param array $args Arguments to pass when the hook triggers.
* @param string $group The group to assign this job to.
* @param bool $unique Whether the action should be unique. It will not be scheduled if another pending or running action has the same hook and group parameters.
* @param int $priority Lower values take precedence over higher values. Defaults to 10, with acceptable values falling in the range 0-255.
*
* @return int The action ID. Zero if there was an error scheduling the action.
*/
function as_schedule_recurring_action( $timestamp, $interval_in_seconds, $hook, $args = array(), $group = '', $unique = false, $priority = 10 ) {
if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) {
return 0;
}
$interval = (int) $interval_in_seconds;
// We expect an integer and allow it to be passed using float and string types, but otherwise
// should reject unexpected values.
// phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
if ( ! is_numeric( $interval_in_seconds ) || $interval_in_seconds != $interval ) {
_doing_it_wrong(
__METHOD__,
sprintf(
/* translators: 1: provided value 2: provided type. */
esc_html__( 'An integer was expected but "%1$s" (%2$s) was received.', 'action-scheduler' ),
esc_html( $interval_in_seconds ),
esc_html( gettype( $interval_in_seconds ) )
),
'3.6.0'
);
return 0;
}
/**
* Provides an opportunity to short-circuit the default process for enqueuing recurring
* actions.
*
* Returning a value other than null from the filter will short-circuit the normal
* process. The expectation in such a scenario is that callbacks will return an integer
* representing the scheduled action ID (scheduled using some alternative process) or else
* zero.
*
* @param int|null $pre_option The value to return instead of the option value.
* @param int $timestamp When the action will run.
* @param int $interval_in_seconds How long to wait between runs.
* @param string $hook Action hook.
* @param array $args Action arguments.
* @param string $group Action group.
* @param int $priority Action priority.
*/
$pre = apply_filters( 'pre_as_schedule_recurring_action', null, $timestamp, $interval_in_seconds, $hook, $args, $group, $priority );
if ( null !== $pre ) {
return is_int( $pre ) ? $pre : 0;
}
return ActionScheduler::factory()->create(
array(
'type' => 'recurring',
'hook' => $hook,
'arguments' => $args,
'when' => $timestamp,
'pattern' => $interval_in_seconds,
'group' => $group,
'unique' => $unique,
'priority' => $priority,
)
);
}
/**
* Schedule an action that recurs on a cron-like schedule.
*
* @param int $timestamp The first instance of the action will be scheduled
* to run at a time calculated after this timestamp matching the cron
* expression. This can be used to delay the first instance of the action.
* @param string $schedule A cron-link schedule string.
* @see http://en.wikipedia.org/wiki/Cron
* * * * * * *
* ┬ ┬ ┬ ┬ ┬ ┬
* | | | | | |
* | | | | | + year [optional]
* | | | | +----- day of week (0 - 7) (Sunday=0 or 7)
* | | | +---------- month (1 - 12)
* | | +--------------- day of month (1 - 31)
* | +-------------------- hour (0 - 23)
* +------------------------- min (0 - 59)
* @param string $hook The hook to trigger.
* @param array $args Arguments to pass when the hook triggers.
* @param string $group The group to assign this job to.
* @param bool $unique Whether the action should be unique. It will not be scheduled if another pending or running action has the same hook and group parameters.
* @param int $priority Lower values take precedence over higher values. Defaults to 10, with acceptable values falling in the range 0-255.
*
* @return int The action ID. Zero if there was an error scheduling the action.
*/
function as_schedule_cron_action( $timestamp, $schedule, $hook, $args = array(), $group = '', $unique = false, $priority = 10 ) {
if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) {
return 0;
}
/**
* Provides an opportunity to short-circuit the default process for enqueuing cron
* actions.
*
* Returning a value other than null from the filter will short-circuit the normal
* process. The expectation in such a scenario is that callbacks will return an integer
* representing the scheduled action ID (scheduled using some alternative process) or else
* zero.
*
* @param int|null $pre_option The value to return instead of the option value.
* @param int $timestamp When the action will run.
* @param string $schedule Cron-like schedule string.
* @param string $hook Action hook.
* @param array $args Action arguments.
* @param string $group Action group.
* @param int $priority Action priority.
*/
$pre = apply_filters( 'pre_as_schedule_cron_action', null, $timestamp, $schedule, $hook, $args, $group, $priority );
if ( null !== $pre ) {
return is_int( $pre ) ? $pre : 0;
}
return ActionScheduler::factory()->create(
array(
'type' => 'cron',
'hook' => $hook,
'arguments' => $args,
'when' => $timestamp,
'pattern' => $schedule,
'group' => $group,
'unique' => $unique,
'priority' => $priority,
)
);
}
/**
* Cancel the next occurrence of a scheduled action.
*
* While only the next instance of a recurring or cron action is unscheduled by this method, that will also prevent
* all future instances of that recurring or cron action from being run. Recurring and cron actions are scheduled in
* a sequence instead of all being scheduled at once. Each successive occurrence of a recurring action is scheduled
* only after the former action is run. If the next instance is never run, because it's unscheduled by this function,
* then the following instance will never be scheduled (or exist), which is effectively the same as being unscheduled
* by this method also.
*
* @param string $hook The hook that the job will trigger.
* @param array $args Args that would have been passed to the job.
* @param string $group The group the job is assigned to.
*
* @return int|null The scheduled action ID if a scheduled action was found, or null if no matching action found.
*/
function as_unschedule_action( $hook, $args = array(), $group = '' ) {
if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) {
return 0;
}
$params = array(
'hook' => $hook,
'status' => ActionScheduler_Store::STATUS_PENDING,
'orderby' => 'date',
'order' => 'ASC',
'group' => $group,
);
if ( is_array( $args ) ) {
$params['args'] = $args;
}
$action_id = ActionScheduler::store()->query_action( $params );
if ( $action_id ) {
try {
ActionScheduler::store()->cancel_action( $action_id );
} catch ( Exception $exception ) {
ActionScheduler::logger()->log(
$action_id,
sprintf(
/* translators: %1$s is the name of the hook to be cancelled, %2$s is the exception message. */
__( 'Caught exception while cancelling action "%1$s": %2$s', 'action-scheduler' ),
$hook,
$exception->getMessage()
)
);
$action_id = null;
}
}
return $action_id;
}
/**
* Cancel all occurrences of a scheduled action.
*
* @param string $hook The hook that the job will trigger.
* @param array $args Args that would have been passed to the job.
* @param string $group The group the job is assigned to.
*/
function as_unschedule_all_actions( $hook, $args = array(), $group = '' ) {
if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) {
return;
}
if ( empty( $args ) ) {
if ( ! empty( $hook ) && empty( $group ) ) {
ActionScheduler_Store::instance()->cancel_actions_by_hook( $hook );
return;
}
if ( ! empty( $group ) && empty( $hook ) ) {
ActionScheduler_Store::instance()->cancel_actions_by_group( $group );
return;
}
}
do {
$unscheduled_action = as_unschedule_action( $hook, $args, $group );
} while ( ! empty( $unscheduled_action ) );
}
/**
* Check if there is an existing action in the queue with a given hook, args and group combination.
*
* An action in the queue could be pending, in-progress or async. If the is pending for a time in
* future, its scheduled date will be returned as a timestamp. If it is currently being run, or an
* async action sitting in the queue waiting to be processed, in which case boolean true will be
* returned. Or there may be no async, in-progress or pending action for this hook, in which case,
* boolean false will be the return value.
*
* @param string $hook Name of the hook to search for.
* @param array $args Arguments of the action to be searched.
* @param string $group Group of the action to be searched.
*
* @return int|bool The timestamp for the next occurrence of a pending scheduled action, true for an async or in-progress action or false if there is no matching action.
*/
function as_next_scheduled_action( $hook, $args = null, $group = '' ) {
if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) {
return false;
}
$params = array(
'hook' => $hook,
'orderby' => 'date',
'order' => 'ASC',
'group' => $group,
);
if ( is_array( $args ) ) {
$params['args'] = $args;
}
$params['status'] = ActionScheduler_Store::STATUS_RUNNING;
$action_id = ActionScheduler::store()->query_action( $params );
if ( $action_id ) {
return true;
}
$params['status'] = ActionScheduler_Store::STATUS_PENDING;
$action_id = ActionScheduler::store()->query_action( $params );
if ( null === $action_id ) {
return false;
}
$action = ActionScheduler::store()->fetch_action( $action_id );
$scheduled_date = $action->get_schedule()->get_date();
if ( $scheduled_date ) {
return (int) $scheduled_date->format( 'U' );
} elseif ( null === $scheduled_date ) { // pending async action with NullSchedule.
return true;
}
return false;
}
/**
* Check if there is a scheduled action in the queue but more efficiently than as_next_scheduled_action().
*
* It's recommended to use this function when you need to know whether a specific action is currently scheduled
* (pending or in-progress).
*
* @since 3.3.0
*
* @param string $hook The hook of the action.
* @param array $args Args that have been passed to the action. Null will matches any args.
* @param string $group The group the job is assigned to.
*
* @return bool True if a matching action is pending or in-progress, false otherwise.
*/
function as_has_scheduled_action( $hook, $args = null, $group = '' ) {
if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) {
return false;
}
$query_args = array(
'hook' => $hook,
'status' => array( ActionScheduler_Store::STATUS_RUNNING, ActionScheduler_Store::STATUS_PENDING ),
'group' => $group,
'orderby' => 'none',
);
if ( null !== $args ) {
$query_args['args'] = $args;
}
$action_id = ActionScheduler::store()->query_action( $query_args );
return null !== $action_id;
}
/**
* Find scheduled actions
*
* @param array $args Possible arguments, with their default values.
* 'hook' => '' - the name of the action that will be triggered.
* 'args' => NULL - the args array that will be passed with the action.
* 'date' => NULL - the scheduled date of the action. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone.
* 'date_compare' => '<=' - operator for testing "date". accepted values are '!=', '>', '>=', '<', '<=', '='.
* 'modified' => NULL - the date the action was last updated. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone.
* 'modified_compare' => '<=' - operator for testing "modified". accepted values are '!=', '>', '>=', '<', '<=', '='.
* 'group' => '' - the group the action belongs to.
* 'status' => '' - ActionScheduler_Store::STATUS_COMPLETE or ActionScheduler_Store::STATUS_PENDING.
* 'claimed' => NULL - TRUE to find claimed actions, FALSE to find unclaimed actions, a string to find a specific claim ID.
* 'per_page' => 5 - Number of results to return.
* 'offset' => 0.
* 'orderby' => 'date' - accepted values are 'hook', 'group', 'modified', 'date' or 'none'.
* 'order' => 'ASC'.
*
* @param string $return_format OBJECT, ARRAY_A, or ids.
*
* @return array
*/
function as_get_scheduled_actions( $args = array(), $return_format = OBJECT ) {
if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) {
return array();
}
$store = ActionScheduler::store();
foreach ( array( 'date', 'modified' ) as $key ) {
if ( isset( $args[ $key ] ) ) {
$args[ $key ] = as_get_datetime_object( $args[ $key ] );
}
}
$ids = $store->query_actions( $args );
if ( 'ids' === $return_format || 'int' === $return_format ) {
return $ids;
}
$actions = array();
foreach ( $ids as $action_id ) {
$actions[ $action_id ] = $store->fetch_action( $action_id );
}
if ( ARRAY_A === $return_format ) {
foreach ( $actions as $action_id => $action_object ) {
$actions[ $action_id ] = get_object_vars( $action_object );
}
}
return $actions;
}
/**
* Helper function to create an instance of DateTime based on a given
* string and timezone. By default, will return the current date/time
* in the UTC timezone.
*
* Needed because new DateTime() called without an explicit timezone
* will create a date/time in PHP's timezone, but we need to have
* assurance that a date/time uses the right timezone (which we almost
* always want to be UTC), which means we need to always include the
* timezone when instantiating datetimes rather than leaving it up to
* the PHP default.
*
* @param mixed $date_string A date/time string. Valid formats are explained in http://php.net/manual/en/datetime.formats.php.
* @param string $timezone A timezone identifier, like UTC or Europe/Lisbon. The list of valid identifiers is available http://php.net/manual/en/timezones.php.
*
* @return ActionScheduler_DateTime
*/
function as_get_datetime_object( $date_string = null, $timezone = 'UTC' ) {
if ( is_object( $date_string ) && $date_string instanceof DateTime ) {
$date = new ActionScheduler_DateTime( $date_string->format( 'Y-m-d H:i:s' ), new DateTimeZone( $timezone ) );
} elseif ( is_numeric( $date_string ) ) {
$date = new ActionScheduler_DateTime( '@' . $date_string, new DateTimeZone( $timezone ) );
} else {
$date = new ActionScheduler_DateTime( null === $date_string ? 'now' : $date_string, new DateTimeZone( $timezone ) );
}
return $date;
}
woocommerce/action-scheduler/lib/WP_Async_Request.php 0000644 00000007206 15153553405 0017001 0 ustar 00 <?php
/**
* WP Async Request
*
* @package WP-Background-Processing
*/
/*
Library URI: https://github.com/deliciousbrains/wp-background-processing/blob/fbbc56f2480910d7959972ec9ec0819a13c6150a/classes/wp-async-request.php
Author: Delicious Brains Inc.
Author URI: https://deliciousbrains.com/
License: GNU General Public License v2.0
License URI: https://github.com/deliciousbrains/wp-background-processing/commit/126d7945dd3d39f39cb6488ca08fe1fb66cb351a
*/
if ( ! class_exists( 'WP_Async_Request' ) ) {
/**
* Abstract WP_Async_Request class.
*
* @abstract
*/
abstract class WP_Async_Request {
/**
* Prefix
*
* (default value: 'wp')
*
* @var string
*/
protected $prefix = 'wp';
/**
* Action
*
* (default value: 'async_request')
*
* @var string
*/
protected $action = 'async_request';
/**
* Identifier
*
* @var mixed
*/
protected $identifier;
/**
* Data
*
* (default value: array())
*
* @var array
*/
protected $data = array();
/**
* Initiate new async request
*/
public function __construct() {
$this->identifier = $this->prefix . '_' . $this->action;
add_action( 'wp_ajax_' . $this->identifier, array( $this, 'maybe_handle' ) );
add_action( 'wp_ajax_nopriv_' . $this->identifier, array( $this, 'maybe_handle' ) );
}
/**
* Set data used during the request
*
* @param array $data Data.
*
* @return $this
*/
public function data( $data ) {
$this->data = $data;
return $this;
}
/**
* Dispatch the async request
*
* @return array|WP_Error
*/
public function dispatch() {
$url = add_query_arg( $this->get_query_args(), $this->get_query_url() );
$args = $this->get_post_args();
return wp_remote_post( esc_url_raw( $url ), $args );
}
/**
* Get query args
*
* @return array
*/
protected function get_query_args() {
if ( property_exists( $this, 'query_args' ) ) {
return $this->query_args;
}
$args = array(
'action' => $this->identifier,
'nonce' => wp_create_nonce( $this->identifier ),
);
/**
* Filters the post arguments used during an async request.
*
* @param array $url
*/
return apply_filters( $this->identifier . '_query_args', $args );
}
/**
* Get query URL
*
* @return string
*/
protected function get_query_url() {
if ( property_exists( $this, 'query_url' ) ) {
return $this->query_url;
}
$url = admin_url( 'admin-ajax.php' );
/**
* Filters the post arguments used during an async request.
*
* @param string $url
*/
return apply_filters( $this->identifier . '_query_url', $url );
}
/**
* Get post args
*
* @return array
*/
protected function get_post_args() {
if ( property_exists( $this, 'post_args' ) ) {
return $this->post_args;
}
$args = array(
'timeout' => 0.01,
'blocking' => false,
'body' => $this->data,
'cookies' => $_COOKIE,
'sslverify' => apply_filters( 'https_local_ssl_verify', false ),
);
/**
* Filters the post arguments used during an async request.
*
* @param array $args
*/
return apply_filters( $this->identifier . '_post_args', $args );
}
/**
* Maybe handle
*
* Check for correct nonce and pass to handler.
*/
public function maybe_handle() {
// Don't lock up other requests while processing.
session_write_close();
check_ajax_referer( $this->identifier, 'nonce' );
$this->handle();
wp_die();
}
/**
* Handle
*
* Override this method to perform any actions required
* during the async request.
*/
abstract protected function handle();
}
}
woocommerce/action-scheduler/lib/cron-expression/CronExpression.php 0000644 00000026537 15153553405 0021735 0 ustar 00 <?php
/**
* CRON expression parser that can determine whether or not a CRON expression is
* due to run, the next run date and previous run date of a CRON expression.
* The determinations made by this class are accurate if checked run once per
* minute (seconds are dropped from date time comparisons).
*
* Schedule parts must map to:
* minute [0-59], hour [0-23], day of month, month [1-12|JAN-DEC], day of week
* [1-7|MON-SUN], and an optional year.
*
* @author Michael Dowling <mtdowling@gmail.com>
* @link http://en.wikipedia.org/wiki/Cron
*/
class CronExpression
{
const MINUTE = 0;
const HOUR = 1;
const DAY = 2;
const MONTH = 3;
const WEEKDAY = 4;
const YEAR = 5;
/**
* @var array CRON expression parts
*/
private $cronParts;
/**
* @var CronExpression_FieldFactory CRON field factory
*/
private $fieldFactory;
/**
* @var array Order in which to test of cron parts
*/
private static $order = array(self::YEAR, self::MONTH, self::DAY, self::WEEKDAY, self::HOUR, self::MINUTE);
/**
* Factory method to create a new CronExpression.
*
* @param string $expression The CRON expression to create. There are
* several special predefined values which can be used to substitute the
* CRON expression:
*
* @yearly, @annually) - Run once a year, midnight, Jan. 1 - 0 0 1 1 *
* @monthly - Run once a month, midnight, first of month - 0 0 1 * *
* @weekly - Run once a week, midnight on Sun - 0 0 * * 0
* @daily - Run once a day, midnight - 0 0 * * *
* @hourly - Run once an hour, first minute - 0 * * * *
*
*@param CronExpression_FieldFactory $fieldFactory (optional) Field factory to use
*
* @return CronExpression
*/
public static function factory($expression, ?CronExpression_FieldFactory $fieldFactory = null)
{
$mappings = array(
'@yearly' => '0 0 1 1 *',
'@annually' => '0 0 1 1 *',
'@monthly' => '0 0 1 * *',
'@weekly' => '0 0 * * 0',
'@daily' => '0 0 * * *',
'@hourly' => '0 * * * *'
);
if (isset($mappings[$expression])) {
$expression = $mappings[$expression];
}
return new self($expression, $fieldFactory ? $fieldFactory : new CronExpression_FieldFactory());
}
/**
* Parse a CRON expression
*
* @param string $expression CRON expression (e.g. '8 * * * *')
* @param CronExpression_FieldFactory $fieldFactory Factory to create cron fields
*/
public function __construct($expression, CronExpression_FieldFactory $fieldFactory)
{
$this->fieldFactory = $fieldFactory;
$this->setExpression($expression);
}
/**
* Set or change the CRON expression
*
* @param string $value CRON expression (e.g. 8 * * * *)
*
* @return CronExpression
* @throws InvalidArgumentException if not a valid CRON expression
*/
public function setExpression($value)
{
$this->cronParts = preg_split('/\s/', $value, -1, PREG_SPLIT_NO_EMPTY);
if (count($this->cronParts) < 5) {
throw new InvalidArgumentException(
$value . ' is not a valid CRON expression'
);
}
foreach ($this->cronParts as $position => $part) {
$this->setPart($position, $part);
}
return $this;
}
/**
* Set part of the CRON expression
*
* @param int $position The position of the CRON expression to set
* @param string $value The value to set
*
* @return CronExpression
* @throws InvalidArgumentException if the value is not valid for the part
*/
public function setPart($position, $value)
{
if (!$this->fieldFactory->getField($position)->validate($value)) {
throw new InvalidArgumentException(
'Invalid CRON field value ' . $value . ' as position ' . $position
);
}
$this->cronParts[$position] = $value;
return $this;
}
/**
* Get a next run date relative to the current date or a specific date
*
* @param string|DateTime $currentTime (optional) Relative calculation date
* @param int $nth (optional) Number of matches to skip before returning a
* matching next run date. 0, the default, will return the current
* date and time if the next run date falls on the current date and
* time. Setting this value to 1 will skip the first match and go to
* the second match. Setting this value to 2 will skip the first 2
* matches and so on.
* @param bool $allowCurrentDate (optional) Set to TRUE to return the
* current date if it matches the cron expression
*
* @return DateTime
* @throws RuntimeException on too many iterations
*/
public function getNextRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false)
{
return $this->getRunDate($currentTime, $nth, false, $allowCurrentDate);
}
/**
* Get a previous run date relative to the current date or a specific date
*
* @param string|DateTime $currentTime (optional) Relative calculation date
* @param int $nth (optional) Number of matches to skip before returning
* @param bool $allowCurrentDate (optional) Set to TRUE to return the
* current date if it matches the cron expression
*
* @return DateTime
* @throws RuntimeException on too many iterations
* @see CronExpression::getNextRunDate
*/
public function getPreviousRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false)
{
return $this->getRunDate($currentTime, $nth, true, $allowCurrentDate);
}
/**
* Get multiple run dates starting at the current date or a specific date
*
* @param int $total Set the total number of dates to calculate
* @param string|DateTime $currentTime (optional) Relative calculation date
* @param bool $invert (optional) Set to TRUE to retrieve previous dates
* @param bool $allowCurrentDate (optional) Set to TRUE to return the
* current date if it matches the cron expression
*
* @return array Returns an array of run dates
*/
public function getMultipleRunDates($total, $currentTime = 'now', $invert = false, $allowCurrentDate = false)
{
$matches = array();
for ($i = 0; $i < max(0, $total); $i++) {
$matches[] = $this->getRunDate($currentTime, $i, $invert, $allowCurrentDate);
}
return $matches;
}
/**
* Get all or part of the CRON expression
*
* @param string $part (optional) Specify the part to retrieve or NULL to
* get the full cron schedule string.
*
* @return string|null Returns the CRON expression, a part of the
* CRON expression, or NULL if the part was specified but not found
*/
public function getExpression($part = null)
{
if (null === $part) {
return implode(' ', $this->cronParts);
} elseif (array_key_exists($part, $this->cronParts)) {
return $this->cronParts[$part];
}
return null;
}
/**
* Helper method to output the full expression.
*
* @return string Full CRON expression
*/
public function __toString()
{
return $this->getExpression();
}
/**
* Determine if the cron is due to run based on the current date or a
* specific date. This method assumes that the current number of
* seconds are irrelevant, and should be called once per minute.
*
* @param string|DateTime $currentTime (optional) Relative calculation date
*
* @return bool Returns TRUE if the cron is due to run or FALSE if not
*/
public function isDue($currentTime = 'now')
{
if ('now' === $currentTime) {
$currentDate = date('Y-m-d H:i');
$currentTime = strtotime($currentDate);
} elseif ($currentTime instanceof DateTime) {
$currentDate = $currentTime->format('Y-m-d H:i');
$currentTime = strtotime($currentDate);
} else {
$currentTime = new DateTime($currentTime);
$currentTime->setTime($currentTime->format('H'), $currentTime->format('i'), 0);
$currentDate = $currentTime->format('Y-m-d H:i');
$currentTime = (int)($currentTime->getTimestamp());
}
return $this->getNextRunDate($currentDate, 0, true)->getTimestamp() == $currentTime;
}
/**
* Get the next or previous run date of the expression relative to a date
*
* @param string|DateTime $currentTime (optional) Relative calculation date
* @param int $nth (optional) Number of matches to skip before returning
* @param bool $invert (optional) Set to TRUE to go backwards in time
* @param bool $allowCurrentDate (optional) Set to TRUE to return the
* current date if it matches the cron expression
*
* @return DateTime
* @throws RuntimeException on too many iterations
*/
protected function getRunDate($currentTime = null, $nth = 0, $invert = false, $allowCurrentDate = false)
{
if ($currentTime instanceof DateTime) {
$currentDate = $currentTime;
} else {
$currentDate = new DateTime($currentTime ? $currentTime : 'now');
$currentDate->setTimezone(new DateTimeZone(date_default_timezone_get()));
}
$currentDate->setTime($currentDate->format('H'), $currentDate->format('i'), 0);
$nextRun = clone $currentDate;
$nth = (int) $nth;
// Set a hard limit to bail on an impossible date
for ($i = 0; $i < 1000; $i++) {
foreach (self::$order as $position) {
$part = $this->getExpression($position);
if (null === $part) {
continue;
}
$satisfied = false;
// Get the field object used to validate this part
$field = $this->fieldFactory->getField($position);
// Check if this is singular or a list
if (strpos($part, ',') === false) {
$satisfied = $field->isSatisfiedBy($nextRun, $part);
} else {
foreach (array_map('trim', explode(',', $part)) as $listPart) {
if ($field->isSatisfiedBy($nextRun, $listPart)) {
$satisfied = true;
break;
}
}
}
// If the field is not satisfied, then start over
if (!$satisfied) {
$field->increment($nextRun, $invert);
continue 2;
}
}
// Skip this match if needed
if ((!$allowCurrentDate && $nextRun == $currentDate) || --$nth > -1) {
$this->fieldFactory->getField(0)->increment($nextRun, $invert);
continue;
}
return $nextRun;
}
// @codeCoverageIgnoreStart
throw new RuntimeException('Impossible CRON expression');
// @codeCoverageIgnoreEnd
}
}
woocommerce/action-scheduler/lib/cron-expression/CronExpression_AbstractField.php 0000644 00000005020 15153553405 0024504 0 ustar 00 <?php
/**
* Abstract CRON expression field
*
* @author Michael Dowling <mtdowling@gmail.com>
*/
abstract class CronExpression_AbstractField implements CronExpression_FieldInterface
{
/**
* Check to see if a field is satisfied by a value
*
* @param string $dateValue Date value to check
* @param string $value Value to test
*
* @return bool
*/
public function isSatisfied($dateValue, $value)
{
if ($this->isIncrementsOfRanges($value)) {
return $this->isInIncrementsOfRanges($dateValue, $value);
} elseif ($this->isRange($value)) {
return $this->isInRange($dateValue, $value);
}
return $value == '*' || $dateValue == $value;
}
/**
* Check if a value is a range
*
* @param string $value Value to test
*
* @return bool
*/
public function isRange($value)
{
return strpos($value, '-') !== false;
}
/**
* Check if a value is an increments of ranges
*
* @param string $value Value to test
*
* @return bool
*/
public function isIncrementsOfRanges($value)
{
return strpos($value, '/') !== false;
}
/**
* Test if a value is within a range
*
* @param string $dateValue Set date value
* @param string $value Value to test
*
* @return bool
*/
public function isInRange($dateValue, $value)
{
$parts = array_map('trim', explode('-', $value, 2));
return $dateValue >= $parts[0] && $dateValue <= $parts[1];
}
/**
* Test if a value is within an increments of ranges (offset[-to]/step size)
*
* @param string $dateValue Set date value
* @param string $value Value to test
*
* @return bool
*/
public function isInIncrementsOfRanges($dateValue, $value)
{
$parts = array_map('trim', explode('/', $value, 2));
$stepSize = isset($parts[1]) ? $parts[1] : 0;
if ($parts[0] == '*' || $parts[0] === '0') {
return (int) $dateValue % $stepSize == 0;
}
$range = explode('-', $parts[0], 2);
$offset = $range[0];
$to = isset($range[1]) ? $range[1] : $dateValue;
// Ensure that the date value is within the range
if ($dateValue < $offset || $dateValue > $to) {
return false;
}
for ($i = $offset; $i <= $to; $i+= $stepSize) {
if ($i == $dateValue) {
return true;
}
}
return false;
}
}
woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfMonthField.php 0000644 00000007014 15153553405 0024756 0 ustar 00 <?php
/**
* Day of month field. Allows: * , / - ? L W
*
* 'L' stands for "last" and specifies the last day of the month.
*
* The 'W' character is used to specify the weekday (Monday-Friday) nearest the
* given day. As an example, if you were to specify "15W" as the value for the
* day-of-month field, the meaning is: "the nearest weekday to the 15th of the
* month". So if the 15th is a Saturday, the trigger will fire on Friday the
* 14th. If the 15th is a Sunday, the trigger will fire on Monday the 16th. If
* the 15th is a Tuesday, then it will fire on Tuesday the 15th. However if you
* specify "1W" as the value for day-of-month, and the 1st is a Saturday, the
* trigger will fire on Monday the 3rd, as it will not 'jump' over the boundary
* of a month's days. The 'W' character can only be specified when the
* day-of-month is a single day, not a range or list of days.
*
* @author Michael Dowling <mtdowling@gmail.com>
*/
class CronExpression_DayOfMonthField extends CronExpression_AbstractField
{
/**
* Get the nearest day of the week for a given day in a month
*
* @param int $currentYear Current year
* @param int $currentMonth Current month
* @param int $targetDay Target day of the month
*
* @return DateTime Returns the nearest date
*/
private static function getNearestWeekday($currentYear, $currentMonth, $targetDay)
{
$tday = str_pad($targetDay, 2, '0', STR_PAD_LEFT);
$target = new DateTime("$currentYear-$currentMonth-$tday");
$currentWeekday = (int) $target->format('N');
if ($currentWeekday < 6) {
return $target;
}
$lastDayOfMonth = $target->format('t');
foreach (array(-1, 1, -2, 2) as $i) {
$adjusted = $targetDay + $i;
if ($adjusted > 0 && $adjusted <= $lastDayOfMonth) {
$target->setDate($currentYear, $currentMonth, $adjusted);
if ($target->format('N') < 6 && $target->format('m') == $currentMonth) {
return $target;
}
}
}
}
/**
* {@inheritdoc}
*/
public function isSatisfiedBy(DateTime $date, $value)
{
// ? states that the field value is to be skipped
if ($value == '?') {
return true;
}
$fieldValue = $date->format('d');
// Check to see if this is the last day of the month
if ($value == 'L') {
return $fieldValue == $date->format('t');
}
// Check to see if this is the nearest weekday to a particular value
if (strpos($value, 'W')) {
// Parse the target day
$targetDay = substr($value, 0, strpos($value, 'W'));
// Find out if the current day is the nearest day of the week
return $date->format('j') == self::getNearestWeekday(
$date->format('Y'),
$date->format('m'),
$targetDay
)->format('j');
}
return $this->isSatisfied($date->format('d'), $value);
}
/**
* {@inheritdoc}
*/
public function increment(DateTime $date, $invert = false)
{
if ($invert) {
$date->modify('previous day');
$date->setTime(23, 59);
} else {
$date->modify('next day');
$date->setTime(0, 0);
}
return $this;
}
/**
* {@inheritdoc}
*/
public function validate($value)
{
return (bool) preg_match('/[\*,\/\-\?LW0-9A-Za-z]+/', $value);
}
}
woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php 0000644 00000007521 15153553405 0024567 0 ustar 00 <?php
/**
* Day of week field. Allows: * / , - ? L #
*
* Days of the week can be represented as a number 0-7 (0|7 = Sunday)
* or as a three letter string: SUN, MON, TUE, WED, THU, FRI, SAT.
*
* 'L' stands for "last". It allows you to specify constructs such as
* "the last Friday" of a given month.
*
* '#' is allowed for the day-of-week field, and must be followed by a
* number between one and five. It allows you to specify constructs such as
* "the second Friday" of a given month.
*
* @author Michael Dowling <mtdowling@gmail.com>
*/
class CronExpression_DayOfWeekField extends CronExpression_AbstractField
{
/**
* {@inheritdoc}
*/
public function isSatisfiedBy(DateTime $date, $value)
{
if ($value == '?') {
return true;
}
// Convert text day of the week values to integers
$value = str_ireplace(
array('SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'),
range(0, 6),
$value
);
$currentYear = $date->format('Y');
$currentMonth = $date->format('m');
$lastDayOfMonth = $date->format('t');
// Find out if this is the last specific weekday of the month
if (strpos($value, 'L')) {
$weekday = str_replace('7', '0', substr($value, 0, strpos($value, 'L')));
$tdate = clone $date;
$tdate->setDate($currentYear, $currentMonth, $lastDayOfMonth);
while ($tdate->format('w') != $weekday) {
$tdate->setDate($currentYear, $currentMonth, --$lastDayOfMonth);
}
return $date->format('j') == $lastDayOfMonth;
}
// Handle # hash tokens
if (strpos($value, '#')) {
list($weekday, $nth) = explode('#', $value);
// Validate the hash fields
if ($weekday < 1 || $weekday > 5) {
throw new InvalidArgumentException("Weekday must be a value between 1 and 5. {$weekday} given");
}
if ($nth > 5) {
throw new InvalidArgumentException('There are never more than 5 of a given weekday in a month');
}
// The current weekday must match the targeted weekday to proceed
if ($date->format('N') != $weekday) {
return false;
}
$tdate = clone $date;
$tdate->setDate($currentYear, $currentMonth, 1);
$dayCount = 0;
$currentDay = 1;
while ($currentDay < $lastDayOfMonth + 1) {
if ($tdate->format('N') == $weekday) {
if (++$dayCount >= $nth) {
break;
}
}
$tdate->setDate($currentYear, $currentMonth, ++$currentDay);
}
return $date->format('j') == $currentDay;
}
// Handle day of the week values
if (strpos($value, '-')) {
$parts = explode('-', $value);
if ($parts[0] == '7') {
$parts[0] = '0';
} elseif ($parts[1] == '0') {
$parts[1] = '7';
}
$value = implode('-', $parts);
}
// Test to see which Sunday to use -- 0 == 7 == Sunday
$format = in_array(7, str_split($value)) ? 'N' : 'w';
$fieldValue = $date->format($format);
return $this->isSatisfied($fieldValue, $value);
}
/**
* {@inheritdoc}
*/
public function increment(DateTime $date, $invert = false)
{
if ($invert) {
$date->modify('-1 day');
$date->setTime(23, 59, 0);
} else {
$date->modify('+1 day');
$date->setTime(0, 0, 0);
}
return $this;
}
/**
* {@inheritdoc}
*/
public function validate($value)
{
return (bool) preg_match('/[\*,\/\-0-9A-Z]+/', $value);
}
}
woocommerce/action-scheduler/lib/cron-expression/CronExpression_FieldFactory.php 0000644 00000003321 15153553405 0024352 0 ustar 00 <?php
/**
* CRON field factory implementing a flyweight factory
*
* @author Michael Dowling <mtdowling@gmail.com>
* @link http://en.wikipedia.org/wiki/Cron
*/
class CronExpression_FieldFactory
{
/**
* @var array Cache of instantiated fields
*/
private $fields = array();
/**
* Get an instance of a field object for a cron expression position
*
* @param int $position CRON expression position value to retrieve
*
* @return CronExpression_FieldInterface
* @throws InvalidArgumentException if a position is not valid
*/
public function getField($position)
{
if (!isset($this->fields[$position])) {
switch ($position) {
case 0:
$this->fields[$position] = new CronExpression_MinutesField();
break;
case 1:
$this->fields[$position] = new CronExpression_HoursField();
break;
case 2:
$this->fields[$position] = new CronExpression_DayOfMonthField();
break;
case 3:
$this->fields[$position] = new CronExpression_MonthField();
break;
case 4:
$this->fields[$position] = new CronExpression_DayOfWeekField();
break;
case 5:
$this->fields[$position] = new CronExpression_YearField();
break;
default:
throw new InvalidArgumentException(
$position . ' is not a valid position'
);
}
}
return $this->fields[$position];
}
}
woocommerce/action-scheduler/lib/cron-expression/CronExpression_FieldInterface.php 0000644 00000002162 15153553405 0024645 0 ustar 00 <?php
/**
* CRON field interface
*
* @author Michael Dowling <mtdowling@gmail.com>
*/
interface CronExpression_FieldInterface
{
/**
* Check if the respective value of a DateTime field satisfies a CRON exp
*
* @param DateTime $date DateTime object to check
* @param string $value CRON expression to test against
*
* @return bool Returns TRUE if satisfied, FALSE otherwise
*/
public function isSatisfiedBy(DateTime $date, $value);
/**
* When a CRON expression is not satisfied, this method is used to increment
* or decrement a DateTime object by the unit of the cron field
*
* @param DateTime $date DateTime object to change
* @param bool $invert (optional) Set to TRUE to decrement
*
* @return CronExpression_FieldInterface
*/
public function increment(DateTime $date, $invert = false);
/**
* Validates a CRON expression for a given field
*
* @param string $value CRON expression value to validate
*
* @return bool Returns TRUE if valid, FALSE otherwise
*/
public function validate($value);
}
woocommerce/action-scheduler/lib/cron-expression/CronExpression_HoursField.php 0000644 00000002205 15153553405 0024043 0 ustar 00 <?php
/**
* Hours field. Allows: * , / -
*
* @author Michael Dowling <mtdowling@gmail.com>
*/
class CronExpression_HoursField extends CronExpression_AbstractField
{
/**
* {@inheritdoc}
*/
public function isSatisfiedBy(DateTime $date, $value)
{
return $this->isSatisfied($date->format('H'), $value);
}
/**
* {@inheritdoc}
*/
public function increment(DateTime $date, $invert = false)
{
// Change timezone to UTC temporarily. This will
// allow us to go back or forwards and hour even
// if DST will be changed between the hours.
$timezone = $date->getTimezone();
$date->setTimezone(new DateTimeZone('UTC'));
if ($invert) {
$date->modify('-1 hour');
$date->setTime($date->format('H'), 59);
} else {
$date->modify('+1 hour');
$date->setTime($date->format('H'), 0);
}
$date->setTimezone($timezone);
return $this;
}
/**
* {@inheritdoc}
*/
public function validate($value)
{
return (bool) preg_match('/[\*,\/\-0-9]+/', $value);
}
}
woocommerce/action-scheduler/lib/cron-expression/CronExpression_MinutesField.php 0000644 00000001371 15153553405 0024372 0 ustar 00 <?php
/**
* Minutes field. Allows: * , / -
*
* @author Michael Dowling <mtdowling@gmail.com>
*/
class CronExpression_MinutesField extends CronExpression_AbstractField
{
/**
* {@inheritdoc}
*/
public function isSatisfiedBy(DateTime $date, $value)
{
return $this->isSatisfied($date->format('i'), $value);
}
/**
* {@inheritdoc}
*/
public function increment(DateTime $date, $invert = false)
{
if ($invert) {
$date->modify('-1 minute');
} else {
$date->modify('+1 minute');
}
return $this;
}
/**
* {@inheritdoc}
*/
public function validate($value)
{
return (bool) preg_match('/[\*,\/\-0-9]+/', $value);
}
}
woocommerce/action-scheduler/lib/cron-expression/CronExpression_MonthField.php 0000644 00000002567 15153553405 0024043 0 ustar 00 <?php
/**
* Month field. Allows: * , / -
*
* @author Michael Dowling <mtdowling@gmail.com>
*/
class CronExpression_MonthField extends CronExpression_AbstractField
{
/**
* {@inheritdoc}
*/
public function isSatisfiedBy(DateTime $date, $value)
{
// Convert text month values to integers
$value = str_ireplace(
array(
'JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN',
'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'
),
range(1, 12),
$value
);
return $this->isSatisfied($date->format('m'), $value);
}
/**
* {@inheritdoc}
*/
public function increment(DateTime $date, $invert = false)
{
if ($invert) {
// $date->modify('last day of previous month'); // remove for php 5.2 compat
$date->modify('previous month');
$date->modify($date->format('Y-m-t'));
$date->setTime(23, 59);
} else {
//$date->modify('first day of next month'); // remove for php 5.2 compat
$date->modify('next month');
$date->modify($date->format('Y-m-01'));
$date->setTime(0, 0);
}
return $this;
}
/**
* {@inheritdoc}
*/
public function validate($value)
{
return (bool) preg_match('/[\*,\/\-0-9A-Z]+/', $value);
}
}
woocommerce/action-scheduler/lib/cron-expression/CronExpression_YearField.php 0000644 00000001651 15153553405 0023647 0 ustar 00 <?php
/**
* Year field. Allows: * , / -
*
* @author Michael Dowling <mtdowling@gmail.com>
*/
class CronExpression_YearField extends CronExpression_AbstractField
{
/**
* {@inheritdoc}
*/
public function isSatisfiedBy(DateTime $date, $value)
{
return $this->isSatisfied($date->format('Y'), $value);
}
/**
* {@inheritdoc}
*/
public function increment(DateTime $date, $invert = false)
{
if ($invert) {
$date->modify('-1 year');
$date->setDate($date->format('Y'), 12, 31);
$date->setTime(23, 59, 0);
} else {
$date->modify('+1 year');
$date->setDate($date->format('Y'), 1, 1);
$date->setTime(0, 0, 0);
}
return $this;
}
/**
* {@inheritdoc}
*/
public function validate($value)
{
return (bool) preg_match('/[\*,\/\-0-9]+/', $value);
}
}
woocommerce/action-scheduler/lib/cron-expression/LICENSE 0000644 00000002112 15153553405 0017227 0 ustar 00 Copyright (c) 2011 Michael Dowling <mtdowling@gmail.com> and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
woocommerce/action-scheduler/lib/cron-expression/README.md 0000644 00000006277 15153553405 0017521 0 ustar 00 PHP Cron Expression Parser
==========================
[](https://packagist.org/packages/mtdowling/cron-expression) [](https://packagist.org/packages/mtdowling/cron-expression) [](http://travis-ci.org/mtdowling/cron-expression)
The PHP cron expression parser can parse a CRON expression, determine if it is
due to run, calculate the next run date of the expression, and calculate the previous
run date of the expression. You can calculate dates far into the future or past by
skipping n number of matching dates.
The parser can handle increments of ranges (e.g. */12, 2-59/3), intervals (e.g. 0-9),
lists (e.g. 1,2,3), W to find the nearest weekday for a given day of the month, L to
find the last day of the month, L to find the last given weekday of a month, and hash
(#) to find the nth weekday of a given month.
Credits
==========
Created by Micheal Dowling. Ported to PHP 5.2 by Flightless, Inc.
Based on version 1.0.3: https://github.com/mtdowling/cron-expression/tree/v1.0.3
Installing
==========
Add the following to your project's composer.json:
```javascript
{
"require": {
"mtdowling/cron-expression": "1.0.*"
}
}
```
Usage
=====
```php
<?php
require_once '/vendor/autoload.php';
// Works with predefined scheduling definitions
$cron = Cron\CronExpression::factory('@daily');
$cron->isDue();
echo $cron->getNextRunDate()->format('Y-m-d H:i:s');
echo $cron->getPreviousRunDate()->format('Y-m-d H:i:s');
// Works with complex expressions
$cron = Cron\CronExpression::factory('3-59/15 2,6-12 */15 1 2-5');
echo $cron->getNextRunDate()->format('Y-m-d H:i:s');
// Calculate a run date two iterations into the future
$cron = Cron\CronExpression::factory('@daily');
echo $cron->getNextRunDate(null, 2)->format('Y-m-d H:i:s');
// Calculate a run date relative to a specific time
$cron = Cron\CronExpression::factory('@monthly');
echo $cron->getNextRunDate('2010-01-12 00:00:00')->format('Y-m-d H:i:s');
```
CRON Expressions
================
A CRON expression is a string representing the schedule for a particular command to execute. The parts of a CRON schedule are as follows:
* * * * * *
- - - - - -
| | | | | |
| | | | | + year [optional]
| | | | +----- day of week (0 - 7) (Sunday=0 or 7)
| | | +---------- month (1 - 12)
| | +--------------- day of month (1 - 31)
| +-------------------- hour (0 - 23)
+------------------------- min (0 - 59)
Requirements
============
- PHP 5.3+
- PHPUnit is required to run the unit tests
- Composer is required to run the unit tests
CHANGELOG
=========
1.0.3 (2013-11-23)
------------------
* Only set default timezone if the given $currentTime is not a DateTime instance (#34)
* Fixes issue #28 where PHP increments of ranges were failing due to PHP casting hyphens to 0
* Now supports expressions with any number of extra spaces, tabs, or newlines
* Using static instead of self in `CronExpression::factory`
woocommerce/action-scheduler/license.txt 0000644 00000104515 15153553405 0014513 0 ustar 00 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
woocommerce/action-scheduler/readme.txt 0000644 00000026632 15153553405 0014331 0 ustar 00 === Action Scheduler ===
Contributors: Automattic, wpmuguru, claudiosanches, peterfabian1000, vedjain, jamosova, obliviousharmony, konamiman, sadowski, royho, barryhughes-1
Tags: scheduler, cron
Stable tag: 3.9.2
License: GPLv3
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.1
Action Scheduler - Job Queue for WordPress
== Description ==
Action Scheduler is a scalable, traceable job queue for background processing large sets of actions in WordPress. It's specially designed to be distributed in WordPress plugins.
Action Scheduler works by triggering an action hook to run at some time in the future. Each hook can be scheduled with unique data, to allow callbacks to perform operations on that data. The hook can also be scheduled to run on one or more occasions.
Think of it like an extension to `do_action()` which adds the ability to delay and repeat a hook.
## Battle-Tested Background Processing
Every month, Action Scheduler processes millions of payments for [Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/), webhooks for [WooCommerce](https://wordpress.org/plugins/woocommerce/), as well as emails and other events for a range of other plugins.
It's been seen on live sites processing queues in excess of 50,000 jobs and doing resource intensive operations, like processing payments and creating orders, at a sustained rate of over 10,000 / hour without negatively impacting normal site operations.
This is all on infrastructure and WordPress sites outside the control of the plugin author.
If your plugin needs background processing, especially of large sets of tasks, Action Scheduler can help.
## Learn More
To learn more about how to Action Scheduler works, and how to use it in your plugin, check out the docs on [ActionScheduler.org](https://actionscheduler.org).
There you will find:
* [Usage guide](https://actionscheduler.org/usage/): instructions on installing and using Action Scheduler
* [WP CLI guide](https://actionscheduler.org/wp-cli/): instructions on running Action Scheduler at scale via WP CLI
* [API Reference](https://actionscheduler.org/api/): complete reference guide for all API functions
* [Administration Guide](https://actionscheduler.org/admin/): guide to managing scheduled actions via the administration screen
* [Guide to Background Processing at Scale](https://actionscheduler.org/perf/): instructions for running Action Scheduler at scale via the default WP Cron queue runner
## Credits
Action Scheduler is developed and maintained by [Automattic](http://automattic.com/) with significant early development completed by [Flightless](https://flightless.us/).
Collaboration is cool. We'd love to work with you to improve Action Scheduler. [Pull Requests](https://github.com/woocommerce/action-scheduler/pulls) welcome.
== Changelog ==
= 3.9.2 - 2025-02-03 =
* Fixed fatal errors by moving version info methods to a new class and deprecating conflicting ones in ActionScheduler_Versions
= 3.9.1 - 2025-01-21 =
* A number of new WP CLI commands have been added, making it easier to manage actions in the terminal and from scripts.
* New wp action-scheduler source command to help determine how Action Scheduler is being loaded.
* Additional information about the active instance of Action Scheduler is now available in the Help pull-down drawer.
* Make some other nullable parameters explicitly nullable.
* Set option value to `no` rather than deleting.
= 3.9.0 - 2024-11-14 =
* Minimum required version of PHP is now 7.1.
* Performance improvements for the `as_pending_actions_due()` function.
* Existing filter hook `action_scheduler_claim_actions_order_by` enhanced to provide callbacks with additional information.
* Improved compatibility with PHP 8.4, specifically by making implicitly nullable parameters explicitly nullable.
* A large number of coding standards-enhancements, to help reduce friction when submitting plugins to marketplaces and plugin directories. Special props @crstauf for this effort.
* Minor documentation tweaks and improvements.
= 3.8.2 - 2024-09-12 =
* Add missing parameter to the `pre_as_enqueue_async_action` hook.
* Bump minimum PHP version to 7.0.
* Bump minimum WordPress version to 6.4.
* Make the batch size adjustable during processing.
= 3.8.1 - 2024-06-20 =
* Fix typos.
* Improve the messaging in our unidentified action exceptions.
= 3.8.0 - 2024-05-22 =
* Documentation - Fixed typos in perf.md.
* Update - We now require WordPress 6.3 or higher.
* Update - We now require PHP 7.0 or higher.
= 3.7.4 - 2024-04-05 =
* Give a clear description of how the $unique parameter works.
* Preserve the tab field if set.
* Tweak - WP 6.5 compatibility.
= 3.7.3 - 2024-03-20 =
* Do not iterate over all of GET when building form in list table.
* Fix a few issues reported by PCP (Plugin Check Plugin).
* Try to save actions as unique even when the store doesn't support it.
* Tweak - WP 6.4 compatibility.
* Update "Tested up to" tag to WordPress 6.5.
* update version in package-lock.json.
= 3.7.2 - 2024-02-14 =
* No longer user variables in `_n()` translation function.
= 3.7.1 - 2023-12-13 =
* update semver to 5.7.2 because of a security vulnerability in 5.7.1.
= 3.7.0 - 2023-11-20 =
* Important: starting with this release, Action Scheduler follows an L-2 version policy (WordPress, and consequently PHP).
* Add extended indexes for hook_status_scheduled_date_gmt and status_scheduled_date_gmt.
* Catch and log exceptions thrown when actions can't be created, e.g. under a corrupt database schema.
* Tweak - WP 6.4 compatibility.
* Update unit tests for upcoming dependency version policy.
* make sure hook action_scheduler_failed_execution can access original exception object.
* mention dependency version policy in usage.md.
= 3.6.4 - 2023-10-11 =
* Performance improvements when bulk cancelling actions.
* Dev-related fixes.
= 3.6.3 - 2023-09-13 =
* Use `_doing_it_wrong` in initialization check.
= 3.6.2 - 2023-08-09 =
* Add guidance about passing arguments.
* Atomic option locking.
* Improve bulk delete handling.
* Include database error in the exception message.
* Tweak - WP 6.3 compatibility.
= 3.6.1 - 2023-06-14 =
* Document new optional `$priority` arg for various API functions.
* Document the new `--exclude-groups` WP CLI option.
* Document the new `action_scheduler_init` hook.
* Ensure actions within each claim are executed in the expected order.
* Fix incorrect text domain.
* Remove SHOW TABLES usage when checking if tables exist.
= 3.6.0 - 2023-05-10 =
* Add $unique parameter to function signatures.
* Add a cast-to-int for extra safety before forming new DateTime object.
* Add a hook allowing exceptions for consistently failing recurring actions.
* Add action priorities.
* Add init hook.
* Always raise the time limit.
* Bump minimatch from 3.0.4 to 3.0.8.
* Bump yaml from 2.2.1 to 2.2.2.
* Defensive coding relating to gaps in declared schedule types.
* Do not process an action if it cannot be set to `in-progress`.
* Filter view labels (status names) should be translatable | #919.
* Fix WPCLI progress messages.
* Improve data-store initialization flow.
* Improve error handling across all supported PHP versions.
* Improve logic for flushing the runtime cache.
* Support exclusion of multiple groups.
* Update lint-staged and Node/NPM requirements.
* add CLI clean command.
* add CLI exclude-group filter.
* exclude past-due from list table all filter count.
* throwing an exception if as_schedule_recurring_action interval param is not of type integer.
= 3.5.4 - 2023-01-17 =
* Add pre filters during action registration.
* Async scheduling.
* Calculate timeouts based on total actions.
* Correctly order the parameters for `ActionScheduler_ActionFactory`'s calls to `single_unique`.
* Fetch action in memory first before releasing claim to avoid deadlock.
* PHP 8.2: declare property to fix creation of dynamic property warning.
* PHP 8.2: fix "Using ${var} in strings is deprecated, use {$var} instead".
* Prevent `undefined variable` warning for `$num_pastdue_actions`.
= 3.5.3 - 2022-11-09 =
* Query actions with partial match.
= 3.5.2 - 2022-09-16 =
* Fix - erroneous 3.5.1 release.
= 3.5.1 - 2022-09-13 =
* Maintenance on A/S docs.
* fix: PHP 8.2 deprecated notice.
= 3.5.0 - 2022-08-25 =
* Add - The active view link within the "Tools > Scheduled Actions" screen is now clickable.
* Add - A warning when there are past-due actions.
* Enhancement - Added the ability to schedule unique actions via an atomic operation.
* Enhancement - Improvements to cache invalidation when processing batches (when running on WordPress 6.0+).
* Enhancement - If a recurring action is found to be consistently failing, it will stop being rescheduled.
* Enhancement - Adds a new "Past Due" view to the scheduled actions list table.
= 3.4.2 - 2022-06-08 =
* Fix - Change the include for better linting.
* Fix - update: Added Action scheduler completed action hook.
= 3.4.1 - 2022-05-24 =
* Fix - Change the include for better linting.
* Fix - Fix the documented return type.
= 3.4.0 - 2021-10-29 =
* Enhancement - Number of items per page can now be set for the Scheduled Actions view (props @ovidiul). #771
* Fix - Do not lower the max_execution_time if it is already set to 0 (unlimited) (props @barryhughes). #755
* Fix - Avoid triggering autoloaders during the version resolution process (props @olegabr). #731 & #776
* Dev - ActionScheduler_wcSystemStatus PHPCS fixes (props @ovidiul). #761
* Dev - ActionScheduler_DBLogger.php PHPCS fixes (props @ovidiul). #768
* Dev - Fixed phpcs for ActionScheduler_Schedule_Deprecated (props @ovidiul). #762
* Dev - Improve actions table indices (props @glagonikas). #774 & #777
* Dev - PHPCS fixes for ActionScheduler_DBStore.php (props @ovidiul). #769 & #778
* Dev - PHPCS Fixes for ActionScheduler_Abstract_ListTable (props @ovidiul). #763 & #779
* Dev - Adds new filter action_scheduler_claim_actions_order_by to allow tuning of the claim query (props @glagonikas). #773
* Dev - PHPCS fixes for ActionScheduler_WpPostStore class (props @ovidiul). #780
= 3.3.0 - 2021-09-15 =
* Enhancement - Adds as_has_scheduled_action() to provide a performant way to test for existing actions. #645
* Fix - Improves compatibility with environments where NO_ZERO_DATE is enabled. #519
* Fix - Adds safety checks to guard against errors when our database tables cannot be created. #645
* Dev - Now supports queries that use multiple statuses. #649
* Dev - Minimum requirements for WordPress and PHP bumped (to 5.2 and 5.6 respectively). #723
= 3.2.1 - 2021-06-21 =
* Fix - Add extra safety/account for different versions of AS and different loading patterns. #714
* Fix - Handle hidden columns (Tools → Scheduled Actions) | #600.
= 3.2.0 - 2021-06-03 =
* Fix - Add "no ordering" option to as_next_scheduled_action().
* Fix - Add secondary scheduled date checks when claiming actions (DBStore) | #634.
* Fix - Add secondary scheduled date checks when claiming actions (wpPostStore) | #634.
* Fix - Adds a new index to the action table, reducing the potential for deadlocks (props: @glagonikas).
* Fix - Fix unit tests infrastructure and adapt tests to PHP 8.
* Fix - Identify in-use data store.
* Fix - Improve test_migration_is_scheduled.
* Fix - PHP notice on list table.
* Fix - Speed up clean up and batch selects.
* Fix - Update pending dependencies.
* Fix - [PHP 8.0] Only pass action arg values through to do_action_ref_array().
* Fix - [PHP 8] Set the PHP version to 7.1 in composer.json for PHP 8 compatibility.
* Fix - add is_initialized() to docs.
* Fix - fix file permissions.
* Fix - fixes #664 by replacing __ with esc_html__.
lodash.js 0000644 00002046542 15153765737 0006414 0 ustar 00 /**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
;(function() {
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
var undefined;
/** Used as the semantic version number. */
var VERSION = '4.17.21';
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/** Error message constants. */
var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
FUNC_ERROR_TEXT = 'Expected a function',
INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/** Used as the maximum memoize cache size. */
var MAX_MEMOIZE_SIZE = 500;
/** Used as the internal argument placeholder. */
var PLACEHOLDER = '__lodash_placeholder__';
/** Used to compose bitmasks for cloning. */
var CLONE_DEEP_FLAG = 1,
CLONE_FLAT_FLAG = 2,
CLONE_SYMBOLS_FLAG = 4;
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
COMPARE_UNORDERED_FLAG = 2;
/** Used to compose bitmasks for function metadata. */
var WRAP_BIND_FLAG = 1,
WRAP_BIND_KEY_FLAG = 2,
WRAP_CURRY_BOUND_FLAG = 4,
WRAP_CURRY_FLAG = 8,
WRAP_CURRY_RIGHT_FLAG = 16,
WRAP_PARTIAL_FLAG = 32,
WRAP_PARTIAL_RIGHT_FLAG = 64,
WRAP_ARY_FLAG = 128,
WRAP_REARG_FLAG = 256,
WRAP_FLIP_FLAG = 512;
/** Used as default options for `_.truncate`. */
var DEFAULT_TRUNC_LENGTH = 30,
DEFAULT_TRUNC_OMISSION = '...';
/** Used to detect hot functions by number of calls within a span of milliseconds. */
var HOT_COUNT = 800,
HOT_SPAN = 16;
/** Used to indicate the type of lazy iteratees. */
var LAZY_FILTER_FLAG = 1,
LAZY_MAP_FLAG = 2,
LAZY_WHILE_FLAG = 3;
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
MAX_SAFE_INTEGER = 9007199254740991,
MAX_INTEGER = 1.7976931348623157e+308,
NAN = 0 / 0;
/** Used as references for the maximum length and index of an array. */
var MAX_ARRAY_LENGTH = 4294967295,
MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
/** Used to associate wrap methods with their bit flags. */
var wrapFlags = [
['ary', WRAP_ARY_FLAG],
['bind', WRAP_BIND_FLAG],
['bindKey', WRAP_BIND_KEY_FLAG],
['curry', WRAP_CURRY_FLAG],
['curryRight', WRAP_CURRY_RIGHT_FLAG],
['flip', WRAP_FLIP_FLAG],
['partial', WRAP_PARTIAL_FLAG],
['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
['rearg', WRAP_REARG_FLAG]
];
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
asyncTag = '[object AsyncFunction]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
domExcTag = '[object DOMException]',
errorTag = '[object Error]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
mapTag = '[object Map]',
numberTag = '[object Number]',
nullTag = '[object Null]',
objectTag = '[object Object]',
promiseTag = '[object Promise]',
proxyTag = '[object Proxy]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]',
undefinedTag = '[object Undefined]',
weakMapTag = '[object WeakMap]',
weakSetTag = '[object WeakSet]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/** Used to match empty string literals in compiled template source. */
var reEmptyStringLeading = /\b__p \+= '';/g,
reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
/** Used to match HTML entities and HTML characters. */
var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
reUnescapedHtml = /[&<>"']/g,
reHasEscapedHtml = RegExp(reEscapedHtml.source),
reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
/** Used to match template delimiters. */
var reEscape = /<%-([\s\S]+?)%>/g,
reEvaluate = /<%([\s\S]+?)%>/g,
reInterpolate = /<%=([\s\S]+?)%>/g;
/** Used to match property names within property paths. */
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
reIsPlainProp = /^\w*$/,
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
reHasRegExpChar = RegExp(reRegExpChar.source);
/** Used to match leading whitespace. */
var reTrimStart = /^\s+/;
/** Used to match a single whitespace character. */
var reWhitespace = /\s/;
/** Used to match wrap detail comments. */
var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
reSplitDetails = /,? & /;
/** Used to match words composed of alphanumeric characters. */
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
/**
* Used to validate the `validate` option in `_.template` variable.
*
* Forbids characters which could potentially change the meaning of the function argument definition:
* - "()," (modification of function parameters)
* - "=" (default value)
* - "[]{}" (destructuring of function parameters)
* - "/" (beginning of a comment)
* - whitespace
*/
var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
/**
* Used to match
* [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
*/
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
/** Used to match `RegExp` flags from their coerced string values. */
var reFlags = /\w*$/;
/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
/** Used to detect binary string values. */
var reIsBinary = /^0b[01]+$/i;
/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used to detect octal string values. */
var reIsOctal = /^0o[0-7]+$/i;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
/** Used to match Latin Unicode letters (excluding mathematical operators). */
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
/** Used to ensure capturing order of template delimiters. */
var reNoMatch = /($^)/;
/** Used to match unescaped characters in compiled string literals. */
var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
/** Used to compose unicode character classes. */
var rsAstralRange = '\\ud800-\\udfff',
rsComboMarksRange = '\\u0300-\\u036f',
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
rsComboSymbolsRange = '\\u20d0-\\u20ff',
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
rsDingbatRange = '\\u2700-\\u27bf',
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
rsPunctuationRange = '\\u2000-\\u206f',
rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
rsVarRange = '\\ufe0e\\ufe0f',
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
/** Used to compose unicode capture groups. */
var rsApos = "['\u2019]",
rsAstral = '[' + rsAstralRange + ']',
rsBreak = '[' + rsBreakRange + ']',
rsCombo = '[' + rsComboRange + ']',
rsDigits = '\\d+',
rsDingbat = '[' + rsDingbatRange + ']',
rsLower = '[' + rsLowerRange + ']',
rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
rsFitz = '\\ud83c[\\udffb-\\udfff]',
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
rsNonAstral = '[^' + rsAstralRange + ']',
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
rsUpper = '[' + rsUpperRange + ']',
rsZWJ = '\\u200d';
/** Used to compose unicode regexes. */
var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
reOptMod = rsModifier + '?',
rsOptVar = '[' + rsVarRange + ']?',
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
rsSeq = rsOptVar + reOptMod + rsOptJoin,
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
/** Used to match apostrophes. */
var reApos = RegExp(rsApos, 'g');
/**
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
*/
var reComboMark = RegExp(rsCombo, 'g');
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
/** Used to match complex or compound words. */
var reUnicodeWord = RegExp([
rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
rsUpper + '+' + rsOptContrUpper,
rsOrdUpper,
rsOrdLower,
rsDigits,
rsEmoji
].join('|'), 'g');
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
/** Used to detect strings that need a more robust regexp to match words. */
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
/** Used to assign default `context` object properties. */
var contextProps = [
'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
'_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
];
/** Used to make template sourceURLs easier to identify. */
var templateCounter = -1;
/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;
/** Used to identify `toStringTag` values supported by `_.clone`. */
var cloneableTags = {};
cloneableTags[argsTag] = cloneableTags[arrayTag] =
cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
cloneableTags[boolTag] = cloneableTags[dateTag] =
cloneableTags[float32Tag] = cloneableTags[float64Tag] =
cloneableTags[int8Tag] = cloneableTags[int16Tag] =
cloneableTags[int32Tag] = cloneableTags[mapTag] =
cloneableTags[numberTag] = cloneableTags[objectTag] =
cloneableTags[regexpTag] = cloneableTags[setTag] =
cloneableTags[stringTag] = cloneableTags[symbolTag] =
cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[weakMapTag] = false;
/** Used to map Latin Unicode letters to basic Latin letters. */
var deburredLetters = {
// Latin-1 Supplement block.
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
'\xc7': 'C', '\xe7': 'c',
'\xd0': 'D', '\xf0': 'd',
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
'\xd1': 'N', '\xf1': 'n',
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
'\xc6': 'Ae', '\xe6': 'ae',
'\xde': 'Th', '\xfe': 'th',
'\xdf': 'ss',
// Latin Extended-A block.
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
'\u0134': 'J', '\u0135': 'j',
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
'\u0163': 't', '\u0165': 't', '\u0167': 't',
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
'\u0174': 'W', '\u0175': 'w',
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
'\u0132': 'IJ', '\u0133': 'ij',
'\u0152': 'Oe', '\u0153': 'oe',
'\u0149': "'n", '\u017f': 's'
};
/** Used to map characters to HTML entities. */
var htmlEscapes = {
'&': '&',
'<': '<',
'>': '>',
'"': '"',
"'": '''
};
/** Used to map HTML entities to characters. */
var htmlUnescapes = {
'&': '&',
'<': '<',
'>': '>',
'"': '"',
''': "'"
};
/** Used to escape characters for inclusion in compiled string literals. */
var stringEscapes = {
'\\': '\\',
"'": "'",
'\n': 'n',
'\r': 'r',
'\u2028': 'u2028',
'\u2029': 'u2029'
};
/** Built-in method references without a dependency on `root`. */
var freeParseFloat = parseFloat,
freeParseInt = parseInt;
/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();
/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;
/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports && freeGlobal.process;
/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
try {
// Use `util.types` for Node.js 10+.
var types = freeModule && freeModule.require && freeModule.require('util').types;
if (types) {
return types;
}
// Legacy `process.binding('util')` for Node.js < 10.
return freeProcess && freeProcess.binding && freeProcess.binding('util');
} catch (e) {}
}());
/* Node.js helper references. */
var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
nodeIsDate = nodeUtil && nodeUtil.isDate,
nodeIsMap = nodeUtil && nodeUtil.isMap,
nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
nodeIsSet = nodeUtil && nodeUtil.isSet,
nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
/*--------------------------------------------------------------------------*/
/**
* A faster alternative to `Function#apply`, this function invokes `func`
* with the `this` binding of `thisArg` and the arguments of `args`.
*
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
* @param {Array} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
switch (args.length) {
case 0: return func.call(thisArg);
case 1: return func.call(thisArg, args[0]);
case 2: return func.call(thisArg, args[0], args[1]);
case 3: return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
/**
* A specialized version of `baseAggregator` for arrays.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} setter The function to set `accumulator` values.
* @param {Function} iteratee The iteratee to transform keys.
* @param {Object} accumulator The initial aggregated object.
* @returns {Function} Returns `accumulator`.
*/
function arrayAggregator(array, setter, iteratee, accumulator) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
var value = array[index];
setter(accumulator, value, iteratee(value), array);
}
return accumulator;
}
/**
* A specialized version of `_.forEach` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns `array`.
*/
function arrayEach(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (iteratee(array[index], index, array) === false) {
break;
}
}
return array;
}
/**
* A specialized version of `_.forEachRight` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns `array`.
*/
function arrayEachRight(array, iteratee) {
var length = array == null ? 0 : array.length;
while (length--) {
if (iteratee(array[length], length, array) === false) {
break;
}
}
return array;
}
/**
* A specialized version of `_.every` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if all elements pass the predicate check,
* else `false`.
*/
function arrayEvery(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (!predicate(array[index], index, array)) {
return false;
}
}
return true;
}
/**
* A specialized version of `_.filter` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function arrayFilter(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result[resIndex++] = value;
}
}
return result;
}
/**
* A specialized version of `_.includes` for arrays without support for
* specifying an index to search from.
*
* @private
* @param {Array} [array] The array to inspect.
* @param {*} target The value to search for.
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludes(array, value) {
var length = array == null ? 0 : array.length;
return !!length && baseIndexOf(array, value, 0) > -1;
}
/**
* This function is like `arrayIncludes` except that it accepts a comparator.
*
* @private
* @param {Array} [array] The array to inspect.
* @param {*} target The value to search for.
* @param {Function} comparator The comparator invoked per element.
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludesWith(array, value, comparator) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (comparator(value, array[index])) {
return true;
}
}
return false;
}
/**
* A specialized version of `_.map` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function arrayMap(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length,
result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
/**
* Appends the elements of `values` to `array`.
*
* @private
* @param {Array} array The array to modify.
* @param {Array} values The values to append.
* @returns {Array} Returns `array`.
*/
function arrayPush(array, values) {
var index = -1,
length = values.length,
offset = array.length;
while (++index < length) {
array[offset + index] = values[index];
}
return array;
}
/**
* A specialized version of `_.reduce` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @param {boolean} [initAccum] Specify using the first element of `array` as
* the initial value.
* @returns {*} Returns the accumulated value.
*/
function arrayReduce(array, iteratee, accumulator, initAccum) {
var index = -1,
length = array == null ? 0 : array.length;
if (initAccum && length) {
accumulator = array[++index];
}
while (++index < length) {
accumulator = iteratee(accumulator, array[index], index, array);
}
return accumulator;
}
/**
* A specialized version of `_.reduceRight` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @param {boolean} [initAccum] Specify using the last element of `array` as
* the initial value.
* @returns {*} Returns the accumulated value.
*/
function arrayReduceRight(array, iteratee, accumulator, initAccum) {
var length = array == null ? 0 : array.length;
if (initAccum && length) {
accumulator = array[--length];
}
while (length--) {
accumulator = iteratee(accumulator, array[length], length, array);
}
return accumulator;
}
/**
* A specialized version of `_.some` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if any element passes the predicate check,
* else `false`.
*/
function arraySome(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (predicate(array[index], index, array)) {
return true;
}
}
return false;
}
/**
* Gets the size of an ASCII `string`.
*
* @private
* @param {string} string The string inspect.
* @returns {number} Returns the string size.
*/
var asciiSize = baseProperty('length');
/**
* Converts an ASCII `string` to an array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the converted array.
*/
function asciiToArray(string) {
return string.split('');
}
/**
* Splits an ASCII `string` into an array of its words.
*
* @private
* @param {string} The string to inspect.
* @returns {Array} Returns the words of `string`.
*/
function asciiWords(string) {
return string.match(reAsciiWord) || [];
}
/**
* The base implementation of methods like `_.findKey` and `_.findLastKey`,
* without support for iteratee shorthands, which iterates over `collection`
* using `eachFunc`.
*
* @private
* @param {Array|Object} collection The collection to inspect.
* @param {Function} predicate The function invoked per iteration.
* @param {Function} eachFunc The function to iterate over `collection`.
* @returns {*} Returns the found element or its key, else `undefined`.
*/
function baseFindKey(collection, predicate, eachFunc) {
var result;
eachFunc(collection, function(value, key, collection) {
if (predicate(value, key, collection)) {
result = key;
return false;
}
});
return result;
}
/**
* The base implementation of `_.findIndex` and `_.findLastIndex` without
* support for iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Function} predicate The function invoked per iteration.
* @param {number} fromIndex The index to search from.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseFindIndex(array, predicate, fromIndex, fromRight) {
var length = array.length,
index = fromIndex + (fromRight ? 1 : -1);
while ((fromRight ? index-- : ++index < length)) {
if (predicate(array[index], index, array)) {
return index;
}
}
return -1;
}
/**
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseIndexOf(array, value, fromIndex) {
return value === value
? strictIndexOf(array, value, fromIndex)
: baseFindIndex(array, baseIsNaN, fromIndex);
}
/**
* This function is like `baseIndexOf` except that it accepts a comparator.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @param {Function} comparator The comparator invoked per element.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseIndexOfWith(array, value, fromIndex, comparator) {
var index = fromIndex - 1,
length = array.length;
while (++index < length) {
if (comparator(array[index], value)) {
return index;
}
}
return -1;
}
/**
* The base implementation of `_.isNaN` without support for number objects.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
*/
function baseIsNaN(value) {
return value !== value;
}
/**
* The base implementation of `_.mean` and `_.meanBy` without support for
* iteratee shorthands.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {number} Returns the mean.
*/
function baseMean(array, iteratee) {
var length = array == null ? 0 : array.length;
return length ? (baseSum(array, iteratee) / length) : NAN;
}
/**
* The base implementation of `_.property` without support for deep paths.
*
* @private
* @param {string} key The key of the property to get.
* @returns {Function} Returns the new accessor function.
*/
function baseProperty(key) {
return function(object) {
return object == null ? undefined : object[key];
};
}
/**
* The base implementation of `_.propertyOf` without support for deep paths.
*
* @private
* @param {Object} object The object to query.
* @returns {Function} Returns the new accessor function.
*/
function basePropertyOf(object) {
return function(key) {
return object == null ? undefined : object[key];
};
}
/**
* The base implementation of `_.reduce` and `_.reduceRight`, without support
* for iteratee shorthands, which iterates over `collection` using `eachFunc`.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {*} accumulator The initial value.
* @param {boolean} initAccum Specify using the first or last element of
* `collection` as the initial value.
* @param {Function} eachFunc The function to iterate over `collection`.
* @returns {*} Returns the accumulated value.
*/
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
eachFunc(collection, function(value, index, collection) {
accumulator = initAccum
? (initAccum = false, value)
: iteratee(accumulator, value, index, collection);
});
return accumulator;
}
/**
* The base implementation of `_.sortBy` which uses `comparer` to define the
* sort order of `array` and replaces criteria objects with their corresponding
* values.
*
* @private
* @param {Array} array The array to sort.
* @param {Function} comparer The function to define sort order.
* @returns {Array} Returns `array`.
*/
function baseSortBy(array, comparer) {
var length = array.length;
array.sort(comparer);
while (length--) {
array[length] = array[length].value;
}
return array;
}
/**
* The base implementation of `_.sum` and `_.sumBy` without support for
* iteratee shorthands.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {number} Returns the sum.
*/
function baseSum(array, iteratee) {
var result,
index = -1,
length = array.length;
while (++index < length) {
var current = iteratee(array[index]);
if (current !== undefined) {
result = result === undefined ? current : (result + current);
}
}
return result;
}
/**
* The base implementation of `_.times` without support for iteratee shorthands
* or max array length checks.
*
* @private
* @param {number} n The number of times to invoke `iteratee`.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the array of results.
*/
function baseTimes(n, iteratee) {
var index = -1,
result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
/**
* The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
* of key-value pairs for `object` corresponding to the property names of `props`.
*
* @private
* @param {Object} object The object to query.
* @param {Array} props The property names to get values for.
* @returns {Object} Returns the key-value pairs.
*/
function baseToPairs(object, props) {
return arrayMap(props, function(key) {
return [key, object[key]];
});
}
/**
* The base implementation of `_.trim`.
*
* @private
* @param {string} string The string to trim.
* @returns {string} Returns the trimmed string.
*/
function baseTrim(string) {
return string
? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
: string;
}
/**
* The base implementation of `_.unary` without support for storing metadata.
*
* @private
* @param {Function} func The function to cap arguments for.
* @returns {Function} Returns the new capped function.
*/
function baseUnary(func) {
return function(value) {
return func(value);
};
}
/**
* The base implementation of `_.values` and `_.valuesIn` which creates an
* array of `object` property values corresponding to the property names
* of `props`.
*
* @private
* @param {Object} object The object to query.
* @param {Array} props The property names to get values for.
* @returns {Object} Returns the array of property values.
*/
function baseValues(object, props) {
return arrayMap(props, function(key) {
return object[key];
});
}
/**
* Checks if a `cache` value for `key` exists.
*
* @private
* @param {Object} cache The cache to query.
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function cacheHas(cache, key) {
return cache.has(key);
}
/**
* Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
* that is not found in the character symbols.
*
* @private
* @param {Array} strSymbols The string symbols to inspect.
* @param {Array} chrSymbols The character symbols to find.
* @returns {number} Returns the index of the first unmatched string symbol.
*/
function charsStartIndex(strSymbols, chrSymbols) {
var index = -1,
length = strSymbols.length;
while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
return index;
}
/**
* Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
* that is not found in the character symbols.
*
* @private
* @param {Array} strSymbols The string symbols to inspect.
* @param {Array} chrSymbols The character symbols to find.
* @returns {number} Returns the index of the last unmatched string symbol.
*/
function charsEndIndex(strSymbols, chrSymbols) {
var index = strSymbols.length;
while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
return index;
}
/**
* Gets the number of `placeholder` occurrences in `array`.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} placeholder The placeholder to search for.
* @returns {number} Returns the placeholder count.
*/
function countHolders(array, placeholder) {
var length = array.length,
result = 0;
while (length--) {
if (array[length] === placeholder) {
++result;
}
}
return result;
}
/**
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
* letters to basic Latin letters.
*
* @private
* @param {string} letter The matched letter to deburr.
* @returns {string} Returns the deburred letter.
*/
var deburrLetter = basePropertyOf(deburredLetters);
/**
* Used by `_.escape` to convert characters to HTML entities.
*
* @private
* @param {string} chr The matched character to escape.
* @returns {string} Returns the escaped character.
*/
var escapeHtmlChar = basePropertyOf(htmlEscapes);
/**
* Used by `_.template` to escape characters for inclusion in compiled string literals.
*
* @private
* @param {string} chr The matched character to escape.
* @returns {string} Returns the escaped character.
*/
function escapeStringChar(chr) {
return '\\' + stringEscapes[chr];
}
/**
* Gets the value at `key` of `object`.
*
* @private
* @param {Object} [object] The object to query.
* @param {string} key The key of the property to get.
* @returns {*} Returns the property value.
*/
function getValue(object, key) {
return object == null ? undefined : object[key];
}
/**
* Checks if `string` contains Unicode symbols.
*
* @private
* @param {string} string The string to inspect.
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
*/
function hasUnicode(string) {
return reHasUnicode.test(string);
}
/**
* Checks if `string` contains a word composed of Unicode symbols.
*
* @private
* @param {string} string The string to inspect.
* @returns {boolean} Returns `true` if a word is found, else `false`.
*/
function hasUnicodeWord(string) {
return reHasUnicodeWord.test(string);
}
/**
* Converts `iterator` to an array.
*
* @private
* @param {Object} iterator The iterator to convert.
* @returns {Array} Returns the converted array.
*/
function iteratorToArray(iterator) {
var data,
result = [];
while (!(data = iterator.next()).done) {
result.push(data.value);
}
return result;
}
/**
* Converts `map` to its key-value pairs.
*
* @private
* @param {Object} map The map to convert.
* @returns {Array} Returns the key-value pairs.
*/
function mapToArray(map) {
var index = -1,
result = Array(map.size);
map.forEach(function(value, key) {
result[++index] = [key, value];
});
return result;
}
/**
* Creates a unary function that invokes `func` with its argument transformed.
*
* @private
* @param {Function} func The function to wrap.
* @param {Function} transform The argument transform.
* @returns {Function} Returns the new function.
*/
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
/**
* Replaces all `placeholder` elements in `array` with an internal placeholder
* and returns an array of their indexes.
*
* @private
* @param {Array} array The array to modify.
* @param {*} placeholder The placeholder to replace.
* @returns {Array} Returns the new array of placeholder indexes.
*/
function replaceHolders(array, placeholder) {
var index = -1,
length = array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index];
if (value === placeholder || value === PLACEHOLDER) {
array[index] = PLACEHOLDER;
result[resIndex++] = index;
}
}
return result;
}
/**
* Converts `set` to an array of its values.
*
* @private
* @param {Object} set The set to convert.
* @returns {Array} Returns the values.
*/
function setToArray(set) {
var index = -1,
result = Array(set.size);
set.forEach(function(value) {
result[++index] = value;
});
return result;
}
/**
* Converts `set` to its value-value pairs.
*
* @private
* @param {Object} set The set to convert.
* @returns {Array} Returns the value-value pairs.
*/
function setToPairs(set) {
var index = -1,
result = Array(set.size);
set.forEach(function(value) {
result[++index] = [value, value];
});
return result;
}
/**
* A specialized version of `_.indexOf` which performs strict equality
* comparisons of values, i.e. `===`.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function strictIndexOf(array, value, fromIndex) {
var index = fromIndex - 1,
length = array.length;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
}
/**
* A specialized version of `_.lastIndexOf` which performs strict equality
* comparisons of values, i.e. `===`.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function strictLastIndexOf(array, value, fromIndex) {
var index = fromIndex + 1;
while (index--) {
if (array[index] === value) {
return index;
}
}
return index;
}
/**
* Gets the number of symbols in `string`.
*
* @private
* @param {string} string The string to inspect.
* @returns {number} Returns the string size.
*/
function stringSize(string) {
return hasUnicode(string)
? unicodeSize(string)
: asciiSize(string);
}
/**
* Converts `string` to an array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the converted array.
*/
function stringToArray(string) {
return hasUnicode(string)
? unicodeToArray(string)
: asciiToArray(string);
}
/**
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
* character of `string`.
*
* @private
* @param {string} string The string to inspect.
* @returns {number} Returns the index of the last non-whitespace character.
*/
function trimmedEndIndex(string) {
var index = string.length;
while (index-- && reWhitespace.test(string.charAt(index))) {}
return index;
}
/**
* Used by `_.unescape` to convert HTML entities to characters.
*
* @private
* @param {string} chr The matched character to unescape.
* @returns {string} Returns the unescaped character.
*/
var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
/**
* Gets the size of a Unicode `string`.
*
* @private
* @param {string} string The string inspect.
* @returns {number} Returns the string size.
*/
function unicodeSize(string) {
var result = reUnicode.lastIndex = 0;
while (reUnicode.test(string)) {
++result;
}
return result;
}
/**
* Converts a Unicode `string` to an array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the converted array.
*/
function unicodeToArray(string) {
return string.match(reUnicode) || [];
}
/**
* Splits a Unicode `string` into an array of its words.
*
* @private
* @param {string} The string to inspect.
* @returns {Array} Returns the words of `string`.
*/
function unicodeWords(string) {
return string.match(reUnicodeWord) || [];
}
/*--------------------------------------------------------------------------*/
/**
* Create a new pristine `lodash` function using the `context` object.
*
* @static
* @memberOf _
* @since 1.1.0
* @category Util
* @param {Object} [context=root] The context object.
* @returns {Function} Returns a new `lodash` function.
* @example
*
* _.mixin({ 'foo': _.constant('foo') });
*
* var lodash = _.runInContext();
* lodash.mixin({ 'bar': lodash.constant('bar') });
*
* _.isFunction(_.foo);
* // => true
* _.isFunction(_.bar);
* // => false
*
* lodash.isFunction(lodash.foo);
* // => false
* lodash.isFunction(lodash.bar);
* // => true
*
* // Create a suped-up `defer` in Node.js.
* var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
*/
var runInContext = (function runInContext(context) {
context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
/** Built-in constructor references. */
var Array = context.Array,
Date = context.Date,
Error = context.Error,
Function = context.Function,
Math = context.Math,
Object = context.Object,
RegExp = context.RegExp,
String = context.String,
TypeError = context.TypeError;
/** Used for built-in method references. */
var arrayProto = Array.prototype,
funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */
var coreJsData = context['__core-js_shared__'];
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to generate unique IDs. */
var idCounter = 0;
/** Used to detect methods masquerading as native. */
var maskSrcKey = (function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
return uid ? ('Symbol(src)_1.' + uid) : '';
}());
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var nativeObjectToString = objectProto.toString;
/** Used to infer the `Object` constructor. */
var objectCtorString = funcToString.call(Object);
/** Used to restore the original `_` reference in `_.noConflict`. */
var oldDash = root._;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);
/** Built-in value references. */
var Buffer = moduleExports ? context.Buffer : undefined,
Symbol = context.Symbol,
Uint8Array = context.Uint8Array,
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
getPrototype = overArg(Object.getPrototypeOf, Object),
objectCreate = Object.create,
propertyIsEnumerable = objectProto.propertyIsEnumerable,
splice = arrayProto.splice,
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
symIterator = Symbol ? Symbol.iterator : undefined,
symToStringTag = Symbol ? Symbol.toStringTag : undefined;
var defineProperty = (function() {
try {
var func = getNative(Object, 'defineProperty');
func({}, '', {});
return func;
} catch (e) {}
}());
/** Mocked built-ins. */
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
ctxNow = Date && Date.now !== root.Date.now && Date.now,
ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math.ceil,
nativeFloor = Math.floor,
nativeGetSymbols = Object.getOwnPropertySymbols,
nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
nativeIsFinite = context.isFinite,
nativeJoin = arrayProto.join,
nativeKeys = overArg(Object.keys, Object),
nativeMax = Math.max,
nativeMin = Math.min,
nativeNow = Date.now,
nativeParseInt = context.parseInt,
nativeRandom = Math.random,
nativeReverse = arrayProto.reverse;
/* Built-in method references that are verified to be native. */
var DataView = getNative(context, 'DataView'),
Map = getNative(context, 'Map'),
Promise = getNative(context, 'Promise'),
Set = getNative(context, 'Set'),
WeakMap = getNative(context, 'WeakMap'),
nativeCreate = getNative(Object, 'create');
/** Used to store function metadata. */
var metaMap = WeakMap && new WeakMap;
/** Used to lookup unminified function names. */
var realNames = {};
/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = toSource(DataView),
mapCtorString = toSource(Map),
promiseCtorString = toSource(Promise),
setCtorString = toSource(Set),
weakMapCtorString = toSource(WeakMap);
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
symbolToString = symbolProto ? symbolProto.toString : undefined;
/*------------------------------------------------------------------------*/
/**
* Creates a `lodash` object which wraps `value` to enable implicit method
* chain sequences. Methods that operate on and return arrays, collections,
* and functions can be chained together. Methods that retrieve a single value
* or may return a primitive value will automatically end the chain sequence
* and return the unwrapped value. Otherwise, the value must be unwrapped
* with `_#value`.
*
* Explicit chain sequences, which must be unwrapped with `_#value`, may be
* enabled using `_.chain`.
*
* The execution of chained methods is lazy, that is, it's deferred until
* `_#value` is implicitly or explicitly called.
*
* Lazy evaluation allows several methods to support shortcut fusion.
* Shortcut fusion is an optimization to merge iteratee calls; this avoids
* the creation of intermediate arrays and can greatly reduce the number of
* iteratee executions. Sections of a chain sequence qualify for shortcut
* fusion if the section is applied to an array and iteratees accept only
* one argument. The heuristic for whether a section qualifies for shortcut
* fusion is subject to change.
*
* Chaining is supported in custom builds as long as the `_#value` method is
* directly or indirectly included in the build.
*
* In addition to lodash methods, wrappers have `Array` and `String` methods.
*
* The wrapper `Array` methods are:
* `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
*
* The wrapper `String` methods are:
* `replace` and `split`
*
* The wrapper methods that support shortcut fusion are:
* `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
* `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
* `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
*
* The chainable wrapper methods are:
* `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
* `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
* `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
* `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
* `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
* `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
* `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
* `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
* `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
* `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
* `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
* `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
* `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
* `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
* `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
* `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
* `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
* `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
* `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
* `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
* `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
* `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
* `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
* `zipObject`, `zipObjectDeep`, and `zipWith`
*
* The wrapper methods that are **not** chainable by default are:
* `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
* `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
* `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
* `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
* `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
* `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
* `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
* `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
* `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
* `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
* `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
* `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
* `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
* `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
* `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
* `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
* `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
* `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
* `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
* `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
* `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
* `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
* `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
* `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
* `upperFirst`, `value`, and `words`
*
* @name _
* @constructor
* @category Seq
* @param {*} value The value to wrap in a `lodash` instance.
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* function square(n) {
* return n * n;
* }
*
* var wrapped = _([1, 2, 3]);
*
* // Returns an unwrapped value.
* wrapped.reduce(_.add);
* // => 6
*
* // Returns a wrapped value.
* var squares = wrapped.map(square);
*
* _.isArray(squares);
* // => false
*
* _.isArray(squares.value());
* // => true
*/
function lodash(value) {
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
if (value instanceof LodashWrapper) {
return value;
}
if (hasOwnProperty.call(value, '__wrapped__')) {
return wrapperClone(value);
}
}
return new LodashWrapper(value);
}
/**
* The base implementation of `_.create` without support for assigning
* properties to the created object.
*
* @private
* @param {Object} proto The object to inherit from.
* @returns {Object} Returns the new object.
*/
var baseCreate = (function() {
function object() {}
return function(proto) {
if (!isObject(proto)) {
return {};
}
if (objectCreate) {
return objectCreate(proto);
}
object.prototype = proto;
var result = new object;
object.prototype = undefined;
return result;
};
}());
/**
* The function whose prototype chain sequence wrappers inherit from.
*
* @private
*/
function baseLodash() {
// No operation performed.
}
/**
* The base constructor for creating `lodash` wrapper objects.
*
* @private
* @param {*} value The value to wrap.
* @param {boolean} [chainAll] Enable explicit method chain sequences.
*/
function LodashWrapper(value, chainAll) {
this.__wrapped__ = value;
this.__actions__ = [];
this.__chain__ = !!chainAll;
this.__index__ = 0;
this.__values__ = undefined;
}
/**
* By default, the template delimiters used by lodash are like those in
* embedded Ruby (ERB) as well as ES2015 template strings. Change the
* following template settings to use alternative delimiters.
*
* @static
* @memberOf _
* @type {Object}
*/
lodash.templateSettings = {
/**
* Used to detect `data` property values to be HTML-escaped.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
'escape': reEscape,
/**
* Used to detect code to be evaluated.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
'evaluate': reEvaluate,
/**
* Used to detect `data` property values to inject.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
'interpolate': reInterpolate,
/**
* Used to reference the data object in the template text.
*
* @memberOf _.templateSettings
* @type {string}
*/
'variable': '',
/**
* Used to import variables into the compiled template.
*
* @memberOf _.templateSettings
* @type {Object}
*/
'imports': {
/**
* A reference to the `lodash` function.
*
* @memberOf _.templateSettings.imports
* @type {Function}
*/
'_': lodash
}
};
// Ensure wrappers are instances of `baseLodash`.
lodash.prototype = baseLodash.prototype;
lodash.prototype.constructor = lodash;
LodashWrapper.prototype = baseCreate(baseLodash.prototype);
LodashWrapper.prototype.constructor = LodashWrapper;
/*------------------------------------------------------------------------*/
/**
* Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
*
* @private
* @constructor
* @param {*} value The value to wrap.
*/
function LazyWrapper(value) {
this.__wrapped__ = value;
this.__actions__ = [];
this.__dir__ = 1;
this.__filtered__ = false;
this.__iteratees__ = [];
this.__takeCount__ = MAX_ARRAY_LENGTH;
this.__views__ = [];
}
/**
* Creates a clone of the lazy wrapper object.
*
* @private
* @name clone
* @memberOf LazyWrapper
* @returns {Object} Returns the cloned `LazyWrapper` object.
*/
function lazyClone() {
var result = new LazyWrapper(this.__wrapped__);
result.__actions__ = copyArray(this.__actions__);
result.__dir__ = this.__dir__;
result.__filtered__ = this.__filtered__;
result.__iteratees__ = copyArray(this.__iteratees__);
result.__takeCount__ = this.__takeCount__;
result.__views__ = copyArray(this.__views__);
return result;
}
/**
* Reverses the direction of lazy iteration.
*
* @private
* @name reverse
* @memberOf LazyWrapper
* @returns {Object} Returns the new reversed `LazyWrapper` object.
*/
function lazyReverse() {
if (this.__filtered__) {
var result = new LazyWrapper(this);
result.__dir__ = -1;
result.__filtered__ = true;
} else {
result = this.clone();
result.__dir__ *= -1;
}
return result;
}
/**
* Extracts the unwrapped value from its lazy wrapper.
*
* @private
* @name value
* @memberOf LazyWrapper
* @returns {*} Returns the unwrapped value.
*/
function lazyValue() {
var array = this.__wrapped__.value(),
dir = this.__dir__,
isArr = isArray(array),
isRight = dir < 0,
arrLength = isArr ? array.length : 0,
view = getView(0, arrLength, this.__views__),
start = view.start,
end = view.end,
length = end - start,
index = isRight ? end : (start - 1),
iteratees = this.__iteratees__,
iterLength = iteratees.length,
resIndex = 0,
takeCount = nativeMin(length, this.__takeCount__);
if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
return baseWrapperValue(array, this.__actions__);
}
var result = [];
outer:
while (length-- && resIndex < takeCount) {
index += dir;
var iterIndex = -1,
value = array[index];
while (++iterIndex < iterLength) {
var data = iteratees[iterIndex],
iteratee = data.iteratee,
type = data.type,
computed = iteratee(value);
if (type == LAZY_MAP_FLAG) {
value = computed;
} else if (!computed) {
if (type == LAZY_FILTER_FLAG) {
continue outer;
} else {
break outer;
}
}
}
result[resIndex++] = value;
}
return result;
}
// Ensure `LazyWrapper` is an instance of `baseLodash`.
LazyWrapper.prototype = baseCreate(baseLodash.prototype);
LazyWrapper.prototype.constructor = LazyWrapper;
/*------------------------------------------------------------------------*/
/**
* Creates a hash object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Hash(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
/**
* Removes all key-value entries from the hash.
*
* @private
* @name clear
* @memberOf Hash
*/
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
this.size = 0;
}
/**
* Removes `key` and its value from the hash.
*
* @private
* @name delete
* @memberOf Hash
* @param {Object} hash The hash to modify.
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
this.size -= result ? 1 : 0;
return result;
}
/**
* Gets the hash value for `key`.
*
* @private
* @name get
* @memberOf Hash
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? undefined : result;
}
return hasOwnProperty.call(data, key) ? data[key] : undefined;
}
/**
* Checks if a hash value for `key` exists.
*
* @private
* @name has
* @memberOf Hash
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
}
/**
* Sets the hash `key` to `value`.
*
* @private
* @name set
* @memberOf Hash
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the hash instance.
*/
function hashSet(key, value) {
var data = this.__data__;
this.size += this.has(key) ? 0 : 1;
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
return this;
}
// Add methods to `Hash`.
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
/*------------------------------------------------------------------------*/
/**
* Creates an list cache object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function ListCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
/**
* Removes all key-value entries from the list cache.
*
* @private
* @name clear
* @memberOf ListCache
*/
function listCacheClear() {
this.__data__ = [];
this.size = 0;
}
/**
* Removes `key` and its value from the list cache.
*
* @private
* @name delete
* @memberOf ListCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function listCacheDelete(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
--this.size;
return true;
}
/**
* Gets the list cache value for `key`.
*
* @private
* @name get
* @memberOf ListCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function listCacheGet(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
return index < 0 ? undefined : data[index][1];
}
/**
* Checks if a list cache value for `key` exists.
*
* @private
* @name has
* @memberOf ListCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
/**
* Sets the list cache `key` to `value`.
*
* @private
* @name set
* @memberOf ListCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the list cache instance.
*/
function listCacheSet(key, value) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
/*------------------------------------------------------------------------*/
/**
* Creates a map cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function MapCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
/**
* Removes all key-value entries from the map.
*
* @private
* @name clear
* @memberOf MapCache
*/
function mapCacheClear() {
this.size = 0;
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
'string': new Hash
};
}
/**
* Removes `key` and its value from the map.
*
* @private
* @name delete
* @memberOf MapCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function mapCacheDelete(key) {
var result = getMapData(this, key)['delete'](key);
this.size -= result ? 1 : 0;
return result;
}
/**
* Gets the map value for `key`.
*
* @private
* @name get
* @memberOf MapCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
/**
* Checks if a map value for `key` exists.
*
* @private
* @name has
* @memberOf MapCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
/**
* Sets the map `key` to `value`.
*
* @private
* @name set
* @memberOf MapCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the map cache instance.
*/
function mapCacheSet(key, value) {
var data = getMapData(this, key),
size = data.size;
data.set(key, value);
this.size += data.size == size ? 0 : 1;
return this;
}
// Add methods to `MapCache`.
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
/*------------------------------------------------------------------------*/
/**
*
* Creates an array cache object to store unique values.
*
* @private
* @constructor
* @param {Array} [values] The values to cache.
*/
function SetCache(values) {
var index = -1,
length = values == null ? 0 : values.length;
this.__data__ = new MapCache;
while (++index < length) {
this.add(values[index]);
}
}
/**
* Adds `value` to the array cache.
*
* @private
* @name add
* @memberOf SetCache
* @alias push
* @param {*} value The value to cache.
* @returns {Object} Returns the cache instance.
*/
function setCacheAdd(value) {
this.__data__.set(value, HASH_UNDEFINED);
return this;
}
/**
* Checks if `value` is in the array cache.
*
* @private
* @name has
* @memberOf SetCache
* @param {*} value The value to search for.
* @returns {number} Returns `true` if `value` is found, else `false`.
*/
function setCacheHas(value) {
return this.__data__.has(value);
}
// Add methods to `SetCache`.
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
/*------------------------------------------------------------------------*/
/**
* Creates a stack cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Stack(entries) {
var data = this.__data__ = new ListCache(entries);
this.size = data.size;
}
/**
* Removes all key-value entries from the stack.
*
* @private
* @name clear
* @memberOf Stack
*/
function stackClear() {
this.__data__ = new ListCache;
this.size = 0;
}
/**
* Removes `key` and its value from the stack.
*
* @private
* @name delete
* @memberOf Stack
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function stackDelete(key) {
var data = this.__data__,
result = data['delete'](key);
this.size = data.size;
return result;
}
/**
* Gets the stack value for `key`.
*
* @private
* @name get
* @memberOf Stack
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function stackGet(key) {
return this.__data__.get(key);
}
/**
* Checks if a stack value for `key` exists.
*
* @private
* @name has
* @memberOf Stack
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function stackHas(key) {
return this.__data__.has(key);
}
/**
* Sets the stack `key` to `value`.
*
* @private
* @name set
* @memberOf Stack
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the stack cache instance.
*/
function stackSet(key, value) {
var data = this.__data__;
if (data instanceof ListCache) {
var pairs = data.__data__;
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
pairs.push([key, value]);
this.size = ++data.size;
return this;
}
data = this.__data__ = new MapCache(pairs);
}
data.set(key, value);
this.size = data.size;
return this;
}
// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
/*------------------------------------------------------------------------*/
/**
* Creates an array of the enumerable property names of the array-like `value`.
*
* @private
* @param {*} value The value to query.
* @param {boolean} inherited Specify returning inherited property names.
* @returns {Array} Returns the array of property names.
*/
function arrayLikeKeys(value, inherited) {
var isArr = isArray(value),
isArg = !isArr && isArguments(value),
isBuff = !isArr && !isArg && isBuffer(value),
isType = !isArr && !isArg && !isBuff && isTypedArray(value),
skipIndexes = isArr || isArg || isBuff || isType,
result = skipIndexes ? baseTimes(value.length, String) : [],
length = result.length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) &&
!(skipIndexes && (
// Safari 9 has enumerable `arguments.length` in strict mode.
key == 'length' ||
// Node.js 0.10 has enumerable non-index properties on buffers.
(isBuff && (key == 'offset' || key == 'parent')) ||
// PhantomJS 2 has enumerable non-index properties on typed arrays.
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
// Skip index properties.
isIndex(key, length)
))) {
result.push(key);
}
}
return result;
}
/**
* A specialized version of `_.sample` for arrays.
*
* @private
* @param {Array} array The array to sample.
* @returns {*} Returns the random element.
*/
function arraySample(array) {
var length = array.length;
return length ? array[baseRandom(0, length - 1)] : undefined;
}
/**
* A specialized version of `_.sampleSize` for arrays.
*
* @private
* @param {Array} array The array to sample.
* @param {number} n The number of elements to sample.
* @returns {Array} Returns the random elements.
*/
function arraySampleSize(array, n) {
return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
}
/**
* A specialized version of `_.shuffle` for arrays.
*
* @private
* @param {Array} array The array to shuffle.
* @returns {Array} Returns the new shuffled array.
*/
function arrayShuffle(array) {
return shuffleSelf(copyArray(array));
}
/**
* This function is like `assignValue` except that it doesn't assign
* `undefined` values.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignMergeValue(object, key, value) {
if ((value !== undefined && !eq(object[key], value)) ||
(value === undefined && !(key in object))) {
baseAssignValue(object, key, value);
}
}
/**
* Assigns `value` to `key` of `object` if the existing value is not equivalent
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
(value === undefined && !(key in object))) {
baseAssignValue(object, key, value);
}
}
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
/**
* Aggregates elements of `collection` on `accumulator` with keys transformed
* by `iteratee` and values set by `setter`.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} setter The function to set `accumulator` values.
* @param {Function} iteratee The iteratee to transform keys.
* @param {Object} accumulator The initial aggregated object.
* @returns {Function} Returns `accumulator`.
*/
function baseAggregator(collection, setter, iteratee, accumulator) {
baseEach(collection, function(value, key, collection) {
setter(accumulator, value, iteratee(value), collection);
});
return accumulator;
}
/**
* The base implementation of `_.assign` without support for multiple sources
* or `customizer` functions.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @returns {Object} Returns `object`.
*/
function baseAssign(object, source) {
return object && copyObject(source, keys(source), object);
}
/**
* The base implementation of `_.assignIn` without support for multiple sources
* or `customizer` functions.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @returns {Object} Returns `object`.
*/
function baseAssignIn(object, source) {
return object && copyObject(source, keysIn(source), object);
}
/**
* The base implementation of `assignValue` and `assignMergeValue` without
* value checks.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function baseAssignValue(object, key, value) {
if (key == '__proto__' && defineProperty) {
defineProperty(object, key, {
'configurable': true,
'enumerable': true,
'value': value,
'writable': true
});
} else {
object[key] = value;
}
}
/**
* The base implementation of `_.at` without support for individual paths.
*
* @private
* @param {Object} object The object to iterate over.
* @param {string[]} paths The property paths to pick.
* @returns {Array} Returns the picked elements.
*/
function baseAt(object, paths) {
var index = -1,
length = paths.length,
result = Array(length),
skip = object == null;
while (++index < length) {
result[index] = skip ? undefined : get(object, paths[index]);
}
return result;
}
/**
* The base implementation of `_.clamp` which doesn't coerce arguments.
*
* @private
* @param {number} number The number to clamp.
* @param {number} [lower] The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the clamped number.
*/
function baseClamp(number, lower, upper) {
if (number === number) {
if (upper !== undefined) {
number = number <= upper ? number : upper;
}
if (lower !== undefined) {
number = number >= lower ? number : lower;
}
}
return number;
}
/**
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
* traversed objects.
*
* @private
* @param {*} value The value to clone.
* @param {boolean} bitmask The bitmask flags.
* 1 - Deep clone
* 2 - Flatten inherited properties
* 4 - Clone symbols
* @param {Function} [customizer] The function to customize cloning.
* @param {string} [key] The key of `value`.
* @param {Object} [object] The parent object of `value`.
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
* @returns {*} Returns the cloned value.
*/
function baseClone(value, bitmask, customizer, key, object, stack) {
var result,
isDeep = bitmask & CLONE_DEEP_FLAG,
isFlat = bitmask & CLONE_FLAT_FLAG,
isFull = bitmask & CLONE_SYMBOLS_FLAG;
if (customizer) {
result = object ? customizer(value, key, object, stack) : customizer(value);
}
if (result !== undefined) {
return result;
}
if (!isObject(value)) {
return value;
}
var isArr = isArray(value);
if (isArr) {
result = initCloneArray(value);
if (!isDeep) {
return copyArray(value, result);
}
} else {
var tag = getTag(value),
isFunc = tag == funcTag || tag == genTag;
if (isBuffer(value)) {
return cloneBuffer(value, isDeep);
}
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
result = (isFlat || isFunc) ? {} : initCloneObject(value);
if (!isDeep) {
return isFlat
? copySymbolsIn(value, baseAssignIn(result, value))
: copySymbols(value, baseAssign(result, value));
}
} else {
if (!cloneableTags[tag]) {
return object ? value : {};
}
result = initCloneByTag(value, tag, isDeep);
}
}
// Check for circular references and return its corresponding clone.
stack || (stack = new Stack);
var stacked = stack.get(value);
if (stacked) {
return stacked;
}
stack.set(value, result);
if (isSet(value)) {
value.forEach(function(subValue) {
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
});
} else if (isMap(value)) {
value.forEach(function(subValue, key) {
result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
});
}
var keysFunc = isFull
? (isFlat ? getAllKeysIn : getAllKeys)
: (isFlat ? keysIn : keys);
var props = isArr ? undefined : keysFunc(value);
arrayEach(props || value, function(subValue, key) {
if (props) {
key = subValue;
subValue = value[key];
}
// Recursively populate clone (susceptible to call stack limits).
assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
});
return result;
}
/**
* The base implementation of `_.conforms` which doesn't clone `source`.
*
* @private
* @param {Object} source The object of property predicates to conform to.
* @returns {Function} Returns the new spec function.
*/
function baseConforms(source) {
var props = keys(source);
return function(object) {
return baseConformsTo(object, source, props);
};
}
/**
* The base implementation of `_.conformsTo` which accepts `props` to check.
*
* @private
* @param {Object} object The object to inspect.
* @param {Object} source The object of property predicates to conform to.
* @returns {boolean} Returns `true` if `object` conforms, else `false`.
*/
function baseConformsTo(object, source, props) {
var length = props.length;
if (object == null) {
return !length;
}
object = Object(object);
while (length--) {
var key = props[length],
predicate = source[key],
value = object[key];
if ((value === undefined && !(key in object)) || !predicate(value)) {
return false;
}
}
return true;
}
/**
* The base implementation of `_.delay` and `_.defer` which accepts `args`
* to provide to `func`.
*
* @private
* @param {Function} func The function to delay.
* @param {number} wait The number of milliseconds to delay invocation.
* @param {Array} args The arguments to provide to `func`.
* @returns {number|Object} Returns the timer id or timeout object.
*/
function baseDelay(func, wait, args) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
return setTimeout(function() { func.apply(undefined, args); }, wait);
}
/**
* The base implementation of methods like `_.difference` without support
* for excluding multiple arrays or iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Array} values The values to exclude.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of filtered values.
*/
function baseDifference(array, values, iteratee, comparator) {
var index = -1,
includes = arrayIncludes,
isCommon = true,
length = array.length,
result = [],
valuesLength = values.length;
if (!length) {
return result;
}
if (iteratee) {
values = arrayMap(values, baseUnary(iteratee));
}
if (comparator) {
includes = arrayIncludesWith;
isCommon = false;
}
else if (values.length >= LARGE_ARRAY_SIZE) {
includes = cacheHas;
isCommon = false;
values = new SetCache(values);
}
outer:
while (++index < length) {
var value = array[index],
computed = iteratee == null ? value : iteratee(value);
value = (comparator || value !== 0) ? value : 0;
if (isCommon && computed === computed) {
var valuesIndex = valuesLength;
while (valuesIndex--) {
if (values[valuesIndex] === computed) {
continue outer;
}
}
result.push(value);
}
else if (!includes(values, computed, comparator)) {
result.push(value);
}
}
return result;
}
/**
* The base implementation of `_.forEach` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
*/
var baseEach = createBaseEach(baseForOwn);
/**
* The base implementation of `_.forEachRight` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
*/
var baseEachRight = createBaseEach(baseForOwnRight, true);
/**
* The base implementation of `_.every` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if all elements pass the predicate check,
* else `false`
*/
function baseEvery(collection, predicate) {
var result = true;
baseEach(collection, function(value, index, collection) {
result = !!predicate(value, index, collection);
return result;
});
return result;
}
/**
* The base implementation of methods like `_.max` and `_.min` which accepts a
* `comparator` to determine the extremum value.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The iteratee invoked per iteration.
* @param {Function} comparator The comparator used to compare values.
* @returns {*} Returns the extremum value.
*/
function baseExtremum(array, iteratee, comparator) {
var index = -1,
length = array.length;
while (++index < length) {
var value = array[index],
current = iteratee(value);
if (current != null && (computed === undefined
? (current === current && !isSymbol(current))
: comparator(current, computed)
)) {
var computed = current,
result = value;
}
}
return result;
}
/**
* The base implementation of `_.fill` without an iteratee call guard.
*
* @private
* @param {Array} array The array to fill.
* @param {*} value The value to fill `array` with.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns `array`.
*/
function baseFill(array, value, start, end) {
var length = array.length;
start = toInteger(start);
if (start < 0) {
start = -start > length ? 0 : (length + start);
}
end = (end === undefined || end > length) ? length : toInteger(end);
if (end < 0) {
end += length;
}
end = start > end ? 0 : toLength(end);
while (start < end) {
array[start++] = value;
}
return array;
}
/**
* The base implementation of `_.filter` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function baseFilter(collection, predicate) {
var result = [];
baseEach(collection, function(value, index, collection) {
if (predicate(value, index, collection)) {
result.push(value);
}
});
return result;
}
/**
* The base implementation of `_.flatten` with support for restricting flattening.
*
* @private
* @param {Array} array The array to flatten.
* @param {number} depth The maximum recursion depth.
* @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
* @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
* @param {Array} [result=[]] The initial result value.
* @returns {Array} Returns the new flattened array.
*/
function baseFlatten(array, depth, predicate, isStrict, result) {
var index = -1,
length = array.length;
predicate || (predicate = isFlattenable);
result || (result = []);
while (++index < length) {
var value = array[index];
if (depth > 0 && predicate(value)) {
if (depth > 1) {
// Recursively flatten arrays (susceptible to call stack limits).
baseFlatten(value, depth - 1, predicate, isStrict, result);
} else {
arrayPush(result, value);
}
} else if (!isStrict) {
result[result.length] = value;
}
}
return result;
}
/**
* The base implementation of `baseForOwn` which iterates over `object`
* properties returned by `keysFunc` and invokes `iteratee` for each property.
* Iteratee functions may exit iteration early by explicitly returning `false`.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {Function} keysFunc The function to get the keys of `object`.
* @returns {Object} Returns `object`.
*/
var baseFor = createBaseFor();
/**
* This function is like `baseFor` except that it iterates over properties
* in the opposite order.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {Function} keysFunc The function to get the keys of `object`.
* @returns {Object} Returns `object`.
*/
var baseForRight = createBaseFor(true);
/**
* The base implementation of `_.forOwn` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
*/
function baseForOwn(object, iteratee) {
return object && baseFor(object, iteratee, keys);
}
/**
* The base implementation of `_.forOwnRight` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
*/
function baseForOwnRight(object, iteratee) {
return object && baseForRight(object, iteratee, keys);
}
/**
* The base implementation of `_.functions` which creates an array of
* `object` function property names filtered from `props`.
*
* @private
* @param {Object} object The object to inspect.
* @param {Array} props The property names to filter.
* @returns {Array} Returns the function names.
*/
function baseFunctions(object, props) {
return arrayFilter(props, function(key) {
return isFunction(object[key]);
});
}
/**
* The base implementation of `_.get` without support for default values.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @returns {*} Returns the resolved value.
*/
function baseGet(object, path) {
path = castPath(path, object);
var index = 0,
length = path.length;
while (object != null && index < length) {
object = object[toKey(path[index++])];
}
return (index && index == length) ? object : undefined;
}
/**
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
* symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Function} keysFunc The function to get the keys of `object`.
* @param {Function} symbolsFunc The function to get the symbols of `object`.
* @returns {Array} Returns the array of property names and symbols.
*/
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
var result = keysFunc(object);
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
}
/**
* The base implementation of `getTag` without fallbacks for buggy environments.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
function baseGetTag(value) {
if (value == null) {
return value === undefined ? undefinedTag : nullTag;
}
return (symToStringTag && symToStringTag in Object(value))
? getRawTag(value)
: objectToString(value);
}
/**
* The base implementation of `_.gt` which doesn't coerce arguments.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is greater than `other`,
* else `false`.
*/
function baseGt(value, other) {
return value > other;
}
/**
* The base implementation of `_.has` without support for deep paths.
*
* @private
* @param {Object} [object] The object to query.
* @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHas(object, key) {
return object != null && hasOwnProperty.call(object, key);
}
/**
* The base implementation of `_.hasIn` without support for deep paths.
*
* @private
* @param {Object} [object] The object to query.
* @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHasIn(object, key) {
return object != null && key in Object(object);
}
/**
* The base implementation of `_.inRange` which doesn't coerce arguments.
*
* @private
* @param {number} number The number to check.
* @param {number} start The start of the range.
* @param {number} end The end of the range.
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
*/
function baseInRange(number, start, end) {
return number >= nativeMin(start, end) && number < nativeMax(start, end);
}
/**
* The base implementation of methods like `_.intersection`, without support
* for iteratee shorthands, that accepts an array of arrays to inspect.
*
* @private
* @param {Array} arrays The arrays to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of shared values.
*/
function baseIntersection(arrays, iteratee, comparator) {
var includes = comparator ? arrayIncludesWith : arrayIncludes,
length = arrays[0].length,
othLength = arrays.length,
othIndex = othLength,
caches = Array(othLength),
maxLength = Infinity,
result = [];
while (othIndex--) {
var array = arrays[othIndex];
if (othIndex && iteratee) {
array = arrayMap(array, baseUnary(iteratee));
}
maxLength = nativeMin(array.length, maxLength);
caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
? new SetCache(othIndex && array)
: undefined;
}
array = arrays[0];
var index = -1,
seen = caches[0];
outer:
while (++index < length && result.length < maxLength) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
value = (comparator || value !== 0) ? value : 0;
if (!(seen
? cacheHas(seen, computed)
: includes(result, computed, comparator)
)) {
othIndex = othLength;
while (--othIndex) {
var cache = caches[othIndex];
if (!(cache
? cacheHas(cache, computed)
: includes(arrays[othIndex], computed, comparator))
) {
continue outer;
}
}
if (seen) {
seen.push(computed);
}
result.push(value);
}
}
return result;
}
/**
* The base implementation of `_.invert` and `_.invertBy` which inverts
* `object` with values transformed by `iteratee` and set by `setter`.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} setter The function to set `accumulator` values.
* @param {Function} iteratee The iteratee to transform values.
* @param {Object} accumulator The initial inverted object.
* @returns {Function} Returns `accumulator`.
*/
function baseInverter(object, setter, iteratee, accumulator) {
baseForOwn(object, function(value, key, object) {
setter(accumulator, iteratee(value), key, object);
});
return accumulator;
}
/**
* The base implementation of `_.invoke` without support for individual
* method arguments.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path of the method to invoke.
* @param {Array} args The arguments to invoke the method with.
* @returns {*} Returns the result of the invoked method.
*/
function baseInvoke(object, path, args) {
path = castPath(path, object);
object = parent(object, path);
var func = object == null ? object : object[toKey(last(path))];
return func == null ? undefined : apply(func, object, args);
}
/**
* The base implementation of `_.isArguments`.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
*/
function baseIsArguments(value) {
return isObjectLike(value) && baseGetTag(value) == argsTag;
}
/**
* The base implementation of `_.isArrayBuffer` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
*/
function baseIsArrayBuffer(value) {
return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
}
/**
* The base implementation of `_.isDate` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a date object, else `false`.
*/
function baseIsDate(value) {
return isObjectLike(value) && baseGetTag(value) == dateTag;
}
/**
* The base implementation of `_.isEqual` which supports partial comparisons
* and tracks traversed objects.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @param {boolean} bitmask The bitmask flags.
* 1 - Unordered comparison
* 2 - Partial comparison
* @param {Function} [customizer] The function to customize comparisons.
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*/
function baseIsEqual(value, other, bitmask, customizer, stack) {
if (value === other) {
return true;
}
if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
}
/**
* A specialized version of `baseIsEqual` for arrays and objects which performs
* deep comparisons and tracks traversed objects enabling objects with circular
* references to be compared.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
var objIsArr = isArray(object),
othIsArr = isArray(other),
objTag = objIsArr ? arrayTag : getTag(object),
othTag = othIsArr ? arrayTag : getTag(other);
objTag = objTag == argsTag ? objectTag : objTag;
othTag = othTag == argsTag ? objectTag : othTag;
var objIsObj = objTag == objectTag,
othIsObj = othTag == objectTag,
isSameTag = objTag == othTag;
if (isSameTag && isBuffer(object)) {
if (!isBuffer(other)) {
return false;
}
objIsArr = true;
objIsObj = false;
}
if (isSameTag && !objIsObj) {
stack || (stack = new Stack);
return (objIsArr || isTypedArray(object))
? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
: equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
}
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
if (objIsWrapped || othIsWrapped) {
var objUnwrapped = objIsWrapped ? object.value() : object,
othUnwrapped = othIsWrapped ? other.value() : other;
stack || (stack = new Stack);
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
}
}
if (!isSameTag) {
return false;
}
stack || (stack = new Stack);
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
}
/**
* The base implementation of `_.isMap` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
*/
function baseIsMap(value) {
return isObjectLike(value) && getTag(value) == mapTag;
}
/**
* The base implementation of `_.isMatch` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to inspect.
* @param {Object} source The object of property values to match.
* @param {Array} matchData The property names, values, and compare flags to match.
* @param {Function} [customizer] The function to customize comparisons.
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
*/
function baseIsMatch(object, source, matchData, customizer) {
var index = matchData.length,
length = index,
noCustomizer = !customizer;
if (object == null) {
return !length;
}
object = Object(object);
while (index--) {
var data = matchData[index];
if ((noCustomizer && data[2])
? data[1] !== object[data[0]]
: !(data[0] in object)
) {
return false;
}
}
while (++index < length) {
data = matchData[index];
var key = data[0],
objValue = object[key],
srcValue = data[1];
if (noCustomizer && data[2]) {
if (objValue === undefined && !(key in object)) {
return false;
}
} else {
var stack = new Stack;
if (customizer) {
var result = customizer(objValue, srcValue, key, object, source, stack);
}
if (!(result === undefined
? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
: result
)) {
return false;
}
}
}
return true;
}
/**
* The base implementation of `_.isNative` without bad shim checks.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function,
* else `false`.
*/
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
/**
* The base implementation of `_.isRegExp` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
*/
function baseIsRegExp(value) {
return isObjectLike(value) && baseGetTag(value) == regexpTag;
}
/**
* The base implementation of `_.isSet` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
*/
function baseIsSet(value) {
return isObjectLike(value) && getTag(value) == setTag;
}
/**
* The base implementation of `_.isTypedArray` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
*/
function baseIsTypedArray(value) {
return isObjectLike(value) &&
isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}
/**
* The base implementation of `_.iteratee`.
*
* @private
* @param {*} [value=_.identity] The value to convert to an iteratee.
* @returns {Function} Returns the iteratee.
*/
function baseIteratee(value) {
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
if (typeof value == 'function') {
return value;
}
if (value == null) {
return identity;
}
if (typeof value == 'object') {
return isArray(value)
? baseMatchesProperty(value[0], value[1])
: baseMatches(value);
}
return property(value);
}
/**
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function baseKeys(object) {
if (!isPrototype(object)) {
return nativeKeys(object);
}
var result = [];
for (var key in Object(object)) {
if (hasOwnProperty.call(object, key) && key != 'constructor') {
result.push(key);
}
}
return result;
}
/**
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function baseKeysIn(object) {
if (!isObject(object)) {
return nativeKeysIn(object);
}
var isProto = isPrototype(object),
result = [];
for (var key in object) {
if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
result.push(key);
}
}
return result;
}
/**
* The base implementation of `_.lt` which doesn't coerce arguments.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is less than `other`,
* else `false`.
*/
function baseLt(value, other) {
return value < other;
}
/**
* The base implementation of `_.map` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function baseMap(collection, iteratee) {
var index = -1,
result = isArrayLike(collection) ? Array(collection.length) : [];
baseEach(collection, function(value, key, collection) {
result[++index] = iteratee(value, key, collection);
});
return result;
}
/**
* The base implementation of `_.matches` which doesn't clone `source`.
*
* @private
* @param {Object} source The object of property values to match.
* @returns {Function} Returns the new spec function.
*/
function baseMatches(source) {
var matchData = getMatchData(source);
if (matchData.length == 1 && matchData[0][2]) {
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
}
return function(object) {
return object === source || baseIsMatch(object, source, matchData);
};
}
/**
* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
*
* @private
* @param {string} path The path of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new spec function.
*/
function baseMatchesProperty(path, srcValue) {
if (isKey(path) && isStrictComparable(srcValue)) {
return matchesStrictComparable(toKey(path), srcValue);
}
return function(object) {
var objValue = get(object, path);
return (objValue === undefined && objValue === srcValue)
? hasIn(object, path)
: baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
};
}
/**
* The base implementation of `_.merge` without support for multiple sources.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @param {number} srcIndex The index of `source`.
* @param {Function} [customizer] The function to customize merged values.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
*/
function baseMerge(object, source, srcIndex, customizer, stack) {
if (object === source) {
return;
}
baseFor(source, function(srcValue, key) {
stack || (stack = new Stack);
if (isObject(srcValue)) {
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
}
else {
var newValue = customizer
? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
: undefined;
if (newValue === undefined) {
newValue = srcValue;
}
assignMergeValue(object, key, newValue);
}
}, keysIn);
}
/**
* A specialized version of `baseMerge` for arrays and objects which performs
* deep merges and tracks traversed objects enabling objects with circular
* references to be merged.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @param {string} key The key of the value to merge.
* @param {number} srcIndex The index of `source`.
* @param {Function} mergeFunc The function to merge values.
* @param {Function} [customizer] The function to customize assigned values.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
*/
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
var objValue = safeGet(object, key),
srcValue = safeGet(source, key),
stacked = stack.get(srcValue);
if (stacked) {
assignMergeValue(object, key, stacked);
return;
}
var newValue = customizer
? customizer(objValue, srcValue, (key + ''), object, source, stack)
: undefined;
var isCommon = newValue === undefined;
if (isCommon) {
var isArr = isArray(srcValue),
isBuff = !isArr && isBuffer(srcValue),
isTyped = !isArr && !isBuff && isTypedArray(srcValue);
newValue = srcValue;
if (isArr || isBuff || isTyped) {
if (isArray(objValue)) {
newValue = objValue;
}
else if (isArrayLikeObject(objValue)) {
newValue = copyArray(objValue);
}
else if (isBuff) {
isCommon = false;
newValue = cloneBuffer(srcValue, true);
}
else if (isTyped) {
isCommon = false;
newValue = cloneTypedArray(srcValue, true);
}
else {
newValue = [];
}
}
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
newValue = objValue;
if (isArguments(objValue)) {
newValue = toPlainObject(objValue);
}
else if (!isObject(objValue) || isFunction(objValue)) {
newValue = initCloneObject(srcValue);
}
}
else {
isCommon = false;
}
}
if (isCommon) {
// Recursively merge objects and arrays (susceptible to call stack limits).
stack.set(srcValue, newValue);
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
stack['delete'](srcValue);
}
assignMergeValue(object, key, newValue);
}
/**
* The base implementation of `_.nth` which doesn't coerce arguments.
*
* @private
* @param {Array} array The array to query.
* @param {number} n The index of the element to return.
* @returns {*} Returns the nth element of `array`.
*/
function baseNth(array, n) {
var length = array.length;
if (!length) {
return;
}
n += n < 0 ? length : 0;
return isIndex(n, length) ? array[n] : undefined;
}
/**
* The base implementation of `_.orderBy` without param guards.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
* @param {string[]} orders The sort orders of `iteratees`.
* @returns {Array} Returns the new sorted array.
*/
function baseOrderBy(collection, iteratees, orders) {
if (iteratees.length) {
iteratees = arrayMap(iteratees, function(iteratee) {
if (isArray(iteratee)) {
return function(value) {
return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
}
}
return iteratee;
});
} else {
iteratees = [identity];
}
var index = -1;
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
var result = baseMap(collection, function(value, key, collection) {
var criteria = arrayMap(iteratees, function(iteratee) {
return iteratee(value);
});
return { 'criteria': criteria, 'index': ++index, 'value': value };
});
return baseSortBy(result, function(object, other) {
return compareMultiple(object, other, orders);
});
}
/**
* The base implementation of `_.pick` without support for individual
* property identifiers.
*
* @private
* @param {Object} object The source object.
* @param {string[]} paths The property paths to pick.
* @returns {Object} Returns the new object.
*/
function basePick(object, paths) {
return basePickBy(object, paths, function(value, path) {
return hasIn(object, path);
});
}
/**
* The base implementation of `_.pickBy` without support for iteratee shorthands.
*
* @private
* @param {Object} object The source object.
* @param {string[]} paths The property paths to pick.
* @param {Function} predicate The function invoked per property.
* @returns {Object} Returns the new object.
*/
function basePickBy(object, paths, predicate) {
var index = -1,
length = paths.length,
result = {};
while (++index < length) {
var path = paths[index],
value = baseGet(object, path);
if (predicate(value, path)) {
baseSet(result, castPath(path, object), value);
}
}
return result;
}
/**
* A specialized version of `baseProperty` which supports deep paths.
*
* @private
* @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new accessor function.
*/
function basePropertyDeep(path) {
return function(object) {
return baseGet(object, path);
};
}
/**
* The base implementation of `_.pullAllBy` without support for iteratee
* shorthands.
*
* @private
* @param {Array} array The array to modify.
* @param {Array} values The values to remove.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns `array`.
*/
function basePullAll(array, values, iteratee, comparator) {
var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
index = -1,
length = values.length,
seen = array;
if (array === values) {
values = copyArray(values);
}
if (iteratee) {
seen = arrayMap(array, baseUnary(iteratee));
}
while (++index < length) {
var fromIndex = 0,
value = values[index],
computed = iteratee ? iteratee(value) : value;
while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
if (seen !== array) {
splice.call(seen, fromIndex, 1);
}
splice.call(array, fromIndex, 1);
}
}
return array;
}
/**
* The base implementation of `_.pullAt` without support for individual
* indexes or capturing the removed elements.
*
* @private
* @param {Array} array The array to modify.
* @param {number[]} indexes The indexes of elements to remove.
* @returns {Array} Returns `array`.
*/
function basePullAt(array, indexes) {
var length = array ? indexes.length : 0,
lastIndex = length - 1;
while (length--) {
var index = indexes[length];
if (length == lastIndex || index !== previous) {
var previous = index;
if (isIndex(index)) {
splice.call(array, index, 1);
} else {
baseUnset(array, index);
}
}
}
return array;
}
/**
* The base implementation of `_.random` without support for returning
* floating-point numbers.
*
* @private
* @param {number} lower The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the random number.
*/
function baseRandom(lower, upper) {
return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
}
/**
* The base implementation of `_.range` and `_.rangeRight` which doesn't
* coerce arguments.
*
* @private
* @param {number} start The start of the range.
* @param {number} end The end of the range.
* @param {number} step The value to increment or decrement by.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Array} Returns the range of numbers.
*/
function baseRange(start, end, step, fromRight) {
var index = -1,
length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
result = Array(length);
while (length--) {
result[fromRight ? length : ++index] = start;
start += step;
}
return result;
}
/**
* The base implementation of `_.repeat` which doesn't coerce arguments.
*
* @private
* @param {string} string The string to repeat.
* @param {number} n The number of times to repeat the string.
* @returns {string} Returns the repeated string.
*/
function baseRepeat(string, n) {
var result = '';
if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
return result;
}
// Leverage the exponentiation by squaring algorithm for a faster repeat.
// See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
do {
if (n % 2) {
result += string;
}
n = nativeFloor(n / 2);
if (n) {
string += string;
}
} while (n);
return result;
}
/**
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @returns {Function} Returns the new function.
*/
function baseRest(func, start) {
return setToString(overRest(func, start, identity), func + '');
}
/**
* The base implementation of `_.sample`.
*
* @private
* @param {Array|Object} collection The collection to sample.
* @returns {*} Returns the random element.
*/
function baseSample(collection) {
return arraySample(values(collection));
}
/**
* The base implementation of `_.sampleSize` without param guards.
*
* @private
* @param {Array|Object} collection The collection to sample.
* @param {number} n The number of elements to sample.
* @returns {Array} Returns the random elements.
*/
function baseSampleSize(collection, n) {
var array = values(collection);
return shuffleSelf(array, baseClamp(n, 0, array.length));
}
/**
* The base implementation of `_.set`.
*
* @private
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to set.
* @param {*} value The value to set.
* @param {Function} [customizer] The function to customize path creation.
* @returns {Object} Returns `object`.
*/
function baseSet(object, path, value, customizer) {
if (!isObject(object)) {
return object;
}
path = castPath(path, object);
var index = -1,
length = path.length,
lastIndex = length - 1,
nested = object;
while (nested != null && ++index < length) {
var key = toKey(path[index]),
newValue = value;
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
return object;
}
if (index != lastIndex) {
var objValue = nested[key];
newValue = customizer ? customizer(objValue, key, nested) : undefined;
if (newValue === undefined) {
newValue = isObject(objValue)
? objValue
: (isIndex(path[index + 1]) ? [] : {});
}
}
assignValue(nested, key, newValue);
nested = nested[key];
}
return object;
}
/**
* The base implementation of `setData` without support for hot loop shorting.
*
* @private
* @param {Function} func The function to associate metadata with.
* @param {*} data The metadata.
* @returns {Function} Returns `func`.
*/
var baseSetData = !metaMap ? identity : function(func, data) {
metaMap.set(func, data);
return func;
};
/**
* The base implementation of `setToString` without support for hot loop shorting.
*
* @private
* @param {Function} func The function to modify.
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
var baseSetToString = !defineProperty ? identity : function(func, string) {
return defineProperty(func, 'toString', {
'configurable': true,
'enumerable': false,
'value': constant(string),
'writable': true
});
};
/**
* The base implementation of `_.shuffle`.
*
* @private
* @param {Array|Object} collection The collection to shuffle.
* @returns {Array} Returns the new shuffled array.
*/
function baseShuffle(collection) {
return shuffleSelf(values(collection));
}
/**
* The base implementation of `_.slice` without an iteratee call guard.
*
* @private
* @param {Array} array The array to slice.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the slice of `array`.
*/
function baseSlice(array, start, end) {
var index = -1,
length = array.length;
if (start < 0) {
start = -start > length ? 0 : (length + start);
}
end = end > length ? length : end;
if (end < 0) {
end += length;
}
length = start > end ? 0 : ((end - start) >>> 0);
start >>>= 0;
var result = Array(length);
while (++index < length) {
result[index] = array[index + start];
}
return result;
}
/**
* The base implementation of `_.some` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if any element passes the predicate check,
* else `false`.
*/
function baseSome(collection, predicate) {
var result;
baseEach(collection, function(value, index, collection) {
result = predicate(value, index, collection);
return !result;
});
return !!result;
}
/**
* The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
* performs a binary search of `array` to determine the index at which `value`
* should be inserted into `array` in order to maintain its sort order.
*
* @private
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @param {boolean} [retHighest] Specify returning the highest qualified index.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
*/
function baseSortedIndex(array, value, retHighest) {
var low = 0,
high = array == null ? low : array.length;
if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
while (low < high) {
var mid = (low + high) >>> 1,
computed = array[mid];
if (computed !== null && !isSymbol(computed) &&
(retHighest ? (computed <= value) : (computed < value))) {
low = mid + 1;
} else {
high = mid;
}
}
return high;
}
return baseSortedIndexBy(array, value, identity, retHighest);
}
/**
* The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
* which invokes `iteratee` for `value` and each element of `array` to compute
* their sort ranking. The iteratee is invoked with one argument; (value).
*
* @private
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @param {Function} iteratee The iteratee invoked per element.
* @param {boolean} [retHighest] Specify returning the highest qualified index.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
*/
function baseSortedIndexBy(array, value, iteratee, retHighest) {
var low = 0,
high = array == null ? 0 : array.length;
if (high === 0) {
return 0;
}
value = iteratee(value);
var valIsNaN = value !== value,
valIsNull = value === null,
valIsSymbol = isSymbol(value),
valIsUndefined = value === undefined;
while (low < high) {
var mid = nativeFloor((low + high) / 2),
computed = iteratee(array[mid]),
othIsDefined = computed !== undefined,
othIsNull = computed === null,
othIsReflexive = computed === computed,
othIsSymbol = isSymbol(computed);
if (valIsNaN) {
var setLow = retHighest || othIsReflexive;
} else if (valIsUndefined) {
setLow = othIsReflexive && (retHighest || othIsDefined);
} else if (valIsNull) {
setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
} else if (valIsSymbol) {
setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
} else if (othIsNull || othIsSymbol) {
setLow = false;
} else {
setLow = retHighest ? (computed <= value) : (computed < value);
}
if (setLow) {
low = mid + 1;
} else {
high = mid;
}
}
return nativeMin(high, MAX_ARRAY_INDEX);
}
/**
* The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
* support for iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @returns {Array} Returns the new duplicate free array.
*/
function baseSortedUniq(array, iteratee) {
var index = -1,
length = array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
if (!index || !eq(computed, seen)) {
var seen = computed;
result[resIndex++] = value === 0 ? 0 : value;
}
}
return result;
}
/**
* The base implementation of `_.toNumber` which doesn't ensure correct
* conversions of binary, hexadecimal, or octal string values.
*
* @private
* @param {*} value The value to process.
* @returns {number} Returns the number.
*/
function baseToNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
return +value;
}
/**
* The base implementation of `_.toString` which doesn't convert nullish
* values to empty strings.
*
* @private
* @param {*} value The value to process.
* @returns {string} Returns the string.
*/
function baseToString(value) {
// Exit early for strings to avoid a performance hit in some environments.
if (typeof value == 'string') {
return value;
}
if (isArray(value)) {
// Recursively convert values (susceptible to call stack limits).
return arrayMap(value, baseToString) + '';
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
/**
* The base implementation of `_.uniqBy` without support for iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new duplicate free array.
*/
function baseUniq(array, iteratee, comparator) {
var index = -1,
includes = arrayIncludes,
length = array.length,
isCommon = true,
result = [],
seen = result;
if (comparator) {
isCommon = false;
includes = arrayIncludesWith;
}
else if (length >= LARGE_ARRAY_SIZE) {
var set = iteratee ? null : createSet(array);
if (set) {
return setToArray(set);
}
isCommon = false;
includes = cacheHas;
seen = new SetCache;
}
else {
seen = iteratee ? [] : result;
}
outer:
while (++index < length) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
value = (comparator || value !== 0) ? value : 0;
if (isCommon && computed === computed) {
var seenIndex = seen.length;
while (seenIndex--) {
if (seen[seenIndex] === computed) {
continue outer;
}
}
if (iteratee) {
seen.push(computed);
}
result.push(value);
}
else if (!includes(seen, computed, comparator)) {
if (seen !== result) {
seen.push(computed);
}
result.push(value);
}
}
return result;
}
/**
* The base implementation of `_.unset`.
*
* @private
* @param {Object} object The object to modify.
* @param {Array|string} path The property path to unset.
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
*/
function baseUnset(object, path) {
path = castPath(path, object);
object = parent(object, path);
return object == null || delete object[toKey(last(path))];
}
/**
* The base implementation of `_.update`.
*
* @private
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to update.
* @param {Function} updater The function to produce the updated value.
* @param {Function} [customizer] The function to customize path creation.
* @returns {Object} Returns `object`.
*/
function baseUpdate(object, path, updater, customizer) {
return baseSet(object, path, updater(baseGet(object, path)), customizer);
}
/**
* The base implementation of methods like `_.dropWhile` and `_.takeWhile`
* without support for iteratee shorthands.
*
* @private
* @param {Array} array The array to query.
* @param {Function} predicate The function invoked per iteration.
* @param {boolean} [isDrop] Specify dropping elements instead of taking them.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Array} Returns the slice of `array`.
*/
function baseWhile(array, predicate, isDrop, fromRight) {
var length = array.length,
index = fromRight ? length : -1;
while ((fromRight ? index-- : ++index < length) &&
predicate(array[index], index, array)) {}
return isDrop
? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
: baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
}
/**
* The base implementation of `wrapperValue` which returns the result of
* performing a sequence of actions on the unwrapped `value`, where each
* successive action is supplied the return value of the previous.
*
* @private
* @param {*} value The unwrapped value.
* @param {Array} actions Actions to perform to resolve the unwrapped value.
* @returns {*} Returns the resolved value.
*/
function baseWrapperValue(value, actions) {
var result = value;
if (result instanceof LazyWrapper) {
result = result.value();
}
return arrayReduce(actions, function(result, action) {
return action.func.apply(action.thisArg, arrayPush([result], action.args));
}, result);
}
/**
* The base implementation of methods like `_.xor`, without support for
* iteratee shorthands, that accepts an array of arrays to inspect.
*
* @private
* @param {Array} arrays The arrays to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of values.
*/
function baseXor(arrays, iteratee, comparator) {
var length = arrays.length;
if (length < 2) {
return length ? baseUniq(arrays[0]) : [];
}
var index = -1,
result = Array(length);
while (++index < length) {
var array = arrays[index],
othIndex = -1;
while (++othIndex < length) {
if (othIndex != index) {
result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
}
}
}
return baseUniq(baseFlatten(result, 1), iteratee, comparator);
}
/**
* This base implementation of `_.zipObject` which assigns values using `assignFunc`.
*
* @private
* @param {Array} props The property identifiers.
* @param {Array} values The property values.
* @param {Function} assignFunc The function to assign values.
* @returns {Object} Returns the new object.
*/
function baseZipObject(props, values, assignFunc) {
var index = -1,
length = props.length,
valsLength = values.length,
result = {};
while (++index < length) {
var value = index < valsLength ? values[index] : undefined;
assignFunc(result, props[index], value);
}
return result;
}
/**
* Casts `value` to an empty array if it's not an array like object.
*
* @private
* @param {*} value The value to inspect.
* @returns {Array|Object} Returns the cast array-like object.
*/
function castArrayLikeObject(value) {
return isArrayLikeObject(value) ? value : [];
}
/**
* Casts `value` to `identity` if it's not a function.
*
* @private
* @param {*} value The value to inspect.
* @returns {Function} Returns cast function.
*/
function castFunction(value) {
return typeof value == 'function' ? value : identity;
}
/**
* Casts `value` to a path array if it's not one.
*
* @private
* @param {*} value The value to inspect.
* @param {Object} [object] The object to query keys on.
* @returns {Array} Returns the cast property path array.
*/
function castPath(value, object) {
if (isArray(value)) {
return value;
}
return isKey(value, object) ? [value] : stringToPath(toString(value));
}
/**
* A `baseRest` alias which can be replaced with `identity` by module
* replacement plugins.
*
* @private
* @type {Function}
* @param {Function} func The function to apply a rest parameter to.
* @returns {Function} Returns the new function.
*/
var castRest = baseRest;
/**
* Casts `array` to a slice if it's needed.
*
* @private
* @param {Array} array The array to inspect.
* @param {number} start The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the cast slice.
*/
function castSlice(array, start, end) {
var length = array.length;
end = end === undefined ? length : end;
return (!start && end >= length) ? array : baseSlice(array, start, end);
}
/**
* A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
*
* @private
* @param {number|Object} id The timer id or timeout object of the timer to clear.
*/
var clearTimeout = ctxClearTimeout || function(id) {
return root.clearTimeout(id);
};
/**
* Creates a clone of `buffer`.
*
* @private
* @param {Buffer} buffer The buffer to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Buffer} Returns the cloned buffer.
*/
function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
var length = buffer.length,
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
buffer.copy(result);
return result;
}
/**
* Creates a clone of `arrayBuffer`.
*
* @private
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
* @returns {ArrayBuffer} Returns the cloned array buffer.
*/
function cloneArrayBuffer(arrayBuffer) {
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
return result;
}
/**
* Creates a clone of `dataView`.
*
* @private
* @param {Object} dataView The data view to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned data view.
*/
function cloneDataView(dataView, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
}
/**
* Creates a clone of `regexp`.
*
* @private
* @param {Object} regexp The regexp to clone.
* @returns {Object} Returns the cloned regexp.
*/
function cloneRegExp(regexp) {
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
result.lastIndex = regexp.lastIndex;
return result;
}
/**
* Creates a clone of the `symbol` object.
*
* @private
* @param {Object} symbol The symbol object to clone.
* @returns {Object} Returns the cloned symbol object.
*/
function cloneSymbol(symbol) {
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}
/**
* Creates a clone of `typedArray`.
*
* @private
* @param {Object} typedArray The typed array to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned typed array.
*/
function cloneTypedArray(typedArray, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
/**
* Compares values to sort them in ascending order.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {number} Returns the sort order indicator for `value`.
*/
function compareAscending(value, other) {
if (value !== other) {
var valIsDefined = value !== undefined,
valIsNull = value === null,
valIsReflexive = value === value,
valIsSymbol = isSymbol(value);
var othIsDefined = other !== undefined,
othIsNull = other === null,
othIsReflexive = other === other,
othIsSymbol = isSymbol(other);
if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
(valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
(valIsNull && othIsDefined && othIsReflexive) ||
(!valIsDefined && othIsReflexive) ||
!valIsReflexive) {
return 1;
}
if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
(othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
(othIsNull && valIsDefined && valIsReflexive) ||
(!othIsDefined && valIsReflexive) ||
!othIsReflexive) {
return -1;
}
}
return 0;
}
/**
* Used by `_.orderBy` to compare multiple properties of a value to another
* and stable sort them.
*
* If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
* specify an order of "desc" for descending or "asc" for ascending sort order
* of corresponding values.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {boolean[]|string[]} orders The order to sort by for each property.
* @returns {number} Returns the sort order indicator for `object`.
*/
function compareMultiple(object, other, orders) {
var index = -1,
objCriteria = object.criteria,
othCriteria = other.criteria,
length = objCriteria.length,
ordersLength = orders.length;
while (++index < length) {
var result = compareAscending(objCriteria[index], othCriteria[index]);
if (result) {
if (index >= ordersLength) {
return result;
}
var order = orders[index];
return result * (order == 'desc' ? -1 : 1);
}
}
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
// that causes it, under certain circumstances, to provide the same value for
// `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
// for more details.
//
// This also ensures a stable sort in V8 and other engines.
// See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
return object.index - other.index;
}
/**
* Creates an array that is the composition of partially applied arguments,
* placeholders, and provided arguments into a single array of arguments.
*
* @private
* @param {Array} args The provided arguments.
* @param {Array} partials The arguments to prepend to those provided.
* @param {Array} holders The `partials` placeholder indexes.
* @params {boolean} [isCurried] Specify composing for a curried function.
* @returns {Array} Returns the new array of composed arguments.
*/
function composeArgs(args, partials, holders, isCurried) {
var argsIndex = -1,
argsLength = args.length,
holdersLength = holders.length,
leftIndex = -1,
leftLength = partials.length,
rangeLength = nativeMax(argsLength - holdersLength, 0),
result = Array(leftLength + rangeLength),
isUncurried = !isCurried;
while (++leftIndex < leftLength) {
result[leftIndex] = partials[leftIndex];
}
while (++argsIndex < holdersLength) {
if (isUncurried || argsIndex < argsLength) {
result[holders[argsIndex]] = args[argsIndex];
}
}
while (rangeLength--) {
result[leftIndex++] = args[argsIndex++];
}
return result;
}
/**
* This function is like `composeArgs` except that the arguments composition
* is tailored for `_.partialRight`.
*
* @private
* @param {Array} args The provided arguments.
* @param {Array} partials The arguments to append to those provided.
* @param {Array} holders The `partials` placeholder indexes.
* @params {boolean} [isCurried] Specify composing for a curried function.
* @returns {Array} Returns the new array of composed arguments.
*/
function composeArgsRight(args, partials, holders, isCurried) {
var argsIndex = -1,
argsLength = args.length,
holdersIndex = -1,
holdersLength = holders.length,
rightIndex = -1,
rightLength = partials.length,
rangeLength = nativeMax(argsLength - holdersLength, 0),
result = Array(rangeLength + rightLength),
isUncurried = !isCurried;
while (++argsIndex < rangeLength) {
result[argsIndex] = args[argsIndex];
}
var offset = argsIndex;
while (++rightIndex < rightLength) {
result[offset + rightIndex] = partials[rightIndex];
}
while (++holdersIndex < holdersLength) {
if (isUncurried || argsIndex < argsLength) {
result[offset + holders[holdersIndex]] = args[argsIndex++];
}
}
return result;
}
/**
* Copies the values of `source` to `array`.
*
* @private
* @param {Array} source The array to copy values from.
* @param {Array} [array=[]] The array to copy values to.
* @returns {Array} Returns `array`.
*/
function copyArray(source, array) {
var index = -1,
length = source.length;
array || (array = Array(length));
while (++index < length) {
array[index] = source[index];
}
return array;
}
/**
* Copies properties of `source` to `object`.
*
* @private
* @param {Object} source The object to copy properties from.
* @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to.
* @param {Function} [customizer] The function to customize copied values.
* @returns {Object} Returns `object`.
*/
function copyObject(source, props, object, customizer) {
var isNew = !object;
object || (object = {});
var index = -1,
length = props.length;
while (++index < length) {
var key = props[index];
var newValue = customizer
? customizer(object[key], source[key], key, object, source)
: undefined;
if (newValue === undefined) {
newValue = source[key];
}
if (isNew) {
baseAssignValue(object, key, newValue);
} else {
assignValue(object, key, newValue);
}
}
return object;
}
/**
* Copies own symbols of `source` to `object`.
*
* @private
* @param {Object} source The object to copy symbols from.
* @param {Object} [object={}] The object to copy symbols to.
* @returns {Object} Returns `object`.
*/
function copySymbols(source, object) {
return copyObject(source, getSymbols(source), object);
}
/**
* Copies own and inherited symbols of `source` to `object`.
*
* @private
* @param {Object} source The object to copy symbols from.
* @param {Object} [object={}] The object to copy symbols to.
* @returns {Object} Returns `object`.
*/
function copySymbolsIn(source, object) {
return copyObject(source, getSymbolsIn(source), object);
}
/**
* Creates a function like `_.groupBy`.
*
* @private
* @param {Function} setter The function to set accumulator values.
* @param {Function} [initializer] The accumulator object initializer.
* @returns {Function} Returns the new aggregator function.
*/
function createAggregator(setter, initializer) {
return function(collection, iteratee) {
var func = isArray(collection) ? arrayAggregator : baseAggregator,
accumulator = initializer ? initializer() : {};
return func(collection, setter, getIteratee(iteratee, 2), accumulator);
};
}
/**
* Creates a function like `_.assign`.
*
* @private
* @param {Function} assigner The function to assign values.
* @returns {Function} Returns the new assigner function.
*/
function createAssigner(assigner) {
return baseRest(function(object, sources) {
var index = -1,
length = sources.length,
customizer = length > 1 ? sources[length - 1] : undefined,
guard = length > 2 ? sources[2] : undefined;
customizer = (assigner.length > 3 && typeof customizer == 'function')
? (length--, customizer)
: undefined;
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
customizer = length < 3 ? undefined : customizer;
length = 1;
}
object = Object(object);
while (++index < length) {
var source = sources[index];
if (source) {
assigner(object, source, index, customizer);
}
}
return object;
});
}
/**
* Creates a `baseEach` or `baseEachRight` function.
*
* @private
* @param {Function} eachFunc The function to iterate over a collection.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new base function.
*/
function createBaseEach(eachFunc, fromRight) {
return function(collection, iteratee) {
if (collection == null) {
return collection;
}
if (!isArrayLike(collection)) {
return eachFunc(collection, iteratee);
}
var length = collection.length,
index = fromRight ? length : -1,
iterable = Object(collection);
while ((fromRight ? index-- : ++index < length)) {
if (iteratee(iterable[index], index, iterable) === false) {
break;
}
}
return collection;
};
}
/**
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
*
* @private
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new base function.
*/
function createBaseFor(fromRight) {
return function(object, iteratee, keysFunc) {
var index = -1,
iterable = Object(object),
props = keysFunc(object),
length = props.length;
while (length--) {
var key = props[fromRight ? length : ++index];
if (iteratee(iterable[key], key, iterable) === false) {
break;
}
}
return object;
};
}
/**
* Creates a function that wraps `func` to invoke it with the optional `this`
* binding of `thisArg`.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {*} [thisArg] The `this` binding of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createBind(func, bitmask, thisArg) {
var isBind = bitmask & WRAP_BIND_FLAG,
Ctor = createCtor(func);
function wrapper() {
var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
return fn.apply(isBind ? thisArg : this, arguments);
}
return wrapper;
}
/**
* Creates a function like `_.lowerFirst`.
*
* @private
* @param {string} methodName The name of the `String` case method to use.
* @returns {Function} Returns the new case function.
*/
function createCaseFirst(methodName) {
return function(string) {
string = toString(string);
var strSymbols = hasUnicode(string)
? stringToArray(string)
: undefined;
var chr = strSymbols
? strSymbols[0]
: string.charAt(0);
var trailing = strSymbols
? castSlice(strSymbols, 1).join('')
: string.slice(1);
return chr[methodName]() + trailing;
};
}
/**
* Creates a function like `_.camelCase`.
*
* @private
* @param {Function} callback The function to combine each word.
* @returns {Function} Returns the new compounder function.
*/
function createCompounder(callback) {
return function(string) {
return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
};
}
/**
* Creates a function that produces an instance of `Ctor` regardless of
* whether it was invoked as part of a `new` expression or by `call` or `apply`.
*
* @private
* @param {Function} Ctor The constructor to wrap.
* @returns {Function} Returns the new wrapped function.
*/
function createCtor(Ctor) {
return function() {
// Use a `switch` statement to work with class constructors. See
// http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
// for more details.
var args = arguments;
switch (args.length) {
case 0: return new Ctor;
case 1: return new Ctor(args[0]);
case 2: return new Ctor(args[0], args[1]);
case 3: return new Ctor(args[0], args[1], args[2]);
case 4: return new Ctor(args[0], args[1], args[2], args[3]);
case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
}
var thisBinding = baseCreate(Ctor.prototype),
result = Ctor.apply(thisBinding, args);
// Mimic the constructor's `return` behavior.
// See https://es5.github.io/#x13.2.2 for more details.
return isObject(result) ? result : thisBinding;
};
}
/**
* Creates a function that wraps `func` to enable currying.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {number} arity The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createCurry(func, bitmask, arity) {
var Ctor = createCtor(func);
function wrapper() {
var length = arguments.length,
args = Array(length),
index = length,
placeholder = getHolder(wrapper);
while (index--) {
args[index] = arguments[index];
}
var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
? []
: replaceHolders(args, placeholder);
length -= holders.length;
if (length < arity) {
return createRecurry(
func, bitmask, createHybrid, wrapper.placeholder, undefined,
args, holders, undefined, undefined, arity - length);
}
var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
return apply(fn, this, args);
}
return wrapper;
}
/**
* Creates a `_.find` or `_.findLast` function.
*
* @private
* @param {Function} findIndexFunc The function to find the collection index.
* @returns {Function} Returns the new find function.
*/
function createFind(findIndexFunc) {
return function(collection, predicate, fromIndex) {
var iterable = Object(collection);
if (!isArrayLike(collection)) {
var iteratee = getIteratee(predicate, 3);
collection = keys(collection);
predicate = function(key) { return iteratee(iterable[key], key, iterable); };
}
var index = findIndexFunc(collection, predicate, fromIndex);
return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
};
}
/**
* Creates a `_.flow` or `_.flowRight` function.
*
* @private
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new flow function.
*/
function createFlow(fromRight) {
return flatRest(function(funcs) {
var length = funcs.length,
index = length,
prereq = LodashWrapper.prototype.thru;
if (fromRight) {
funcs.reverse();
}
while (index--) {
var func = funcs[index];
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
var wrapper = new LodashWrapper([], true);
}
}
index = wrapper ? index : length;
while (++index < length) {
func = funcs[index];
var funcName = getFuncName(func),
data = funcName == 'wrapper' ? getData(func) : undefined;
if (data && isLaziable(data[0]) &&
data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
!data[4].length && data[9] == 1
) {
wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
} else {
wrapper = (func.length == 1 && isLaziable(func))
? wrapper[funcName]()
: wrapper.thru(func);
}
}
return function() {
var args = arguments,
value = args[0];
if (wrapper && args.length == 1 && isArray(value)) {
return wrapper.plant(value).value();
}
var index = 0,
result = length ? funcs[index].apply(this, args) : value;
while (++index < length) {
result = funcs[index].call(this, result);
}
return result;
};
});
}
/**
* Creates a function that wraps `func` to invoke it with optional `this`
* binding of `thisArg`, partial application, and currying.
*
* @private
* @param {Function|string} func The function or method name to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {*} [thisArg] The `this` binding of `func`.
* @param {Array} [partials] The arguments to prepend to those provided to
* the new function.
* @param {Array} [holders] The `partials` placeholder indexes.
* @param {Array} [partialsRight] The arguments to append to those provided
* to the new function.
* @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
* @param {Array} [argPos] The argument positions of the new function.
* @param {number} [ary] The arity cap of `func`.
* @param {number} [arity] The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
var isAry = bitmask & WRAP_ARY_FLAG,
isBind = bitmask & WRAP_BIND_FLAG,
isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
isFlip = bitmask & WRAP_FLIP_FLAG,
Ctor = isBindKey ? undefined : createCtor(func);
function wrapper() {
var length = arguments.length,
args = Array(length),
index = length;
while (index--) {
args[index] = arguments[index];
}
if (isCurried) {
var placeholder = getHolder(wrapper),
holdersCount = countHolders(args, placeholder);
}
if (partials) {
args = composeArgs(args, partials, holders, isCurried);
}
if (partialsRight) {
args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
}
length -= holdersCount;
if (isCurried && length < arity) {
var newHolders = replaceHolders(args, placeholder);
return createRecurry(
func, bitmask, createHybrid, wrapper.placeholder, thisArg,
args, newHolders, argPos, ary, arity - length
);
}
var thisBinding = isBind ? thisArg : this,
fn = isBindKey ? thisBinding[func] : func;
length = args.length;
if (argPos) {
args = reorder(args, argPos);
} else if (isFlip && length > 1) {
args.reverse();
}
if (isAry && ary < length) {
args.length = ary;
}
if (this && this !== root && this instanceof wrapper) {
fn = Ctor || createCtor(fn);
}
return fn.apply(thisBinding, args);
}
return wrapper;
}
/**
* Creates a function like `_.invertBy`.
*
* @private
* @param {Function} setter The function to set accumulator values.
* @param {Function} toIteratee The function to resolve iteratees.
* @returns {Function} Returns the new inverter function.
*/
function createInverter(setter, toIteratee) {
return function(object, iteratee) {
return baseInverter(object, setter, toIteratee(iteratee), {});
};
}
/**
* Creates a function that performs a mathematical operation on two values.
*
* @private
* @param {Function} operator The function to perform the operation.
* @param {number} [defaultValue] The value used for `undefined` arguments.
* @returns {Function} Returns the new mathematical operation function.
*/
function createMathOperation(operator, defaultValue) {
return function(value, other) {
var result;
if (value === undefined && other === undefined) {
return defaultValue;
}
if (value !== undefined) {
result = value;
}
if (other !== undefined) {
if (result === undefined) {
return other;
}
if (typeof value == 'string' || typeof other == 'string') {
value = baseToString(value);
other = baseToString(other);
} else {
value = baseToNumber(value);
other = baseToNumber(other);
}
result = operator(value, other);
}
return result;
};
}
/**
* Creates a function like `_.over`.
*
* @private
* @param {Function} arrayFunc The function to iterate over iteratees.
* @returns {Function} Returns the new over function.
*/
function createOver(arrayFunc) {
return flatRest(function(iteratees) {
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
return baseRest(function(args) {
var thisArg = this;
return arrayFunc(iteratees, function(iteratee) {
return apply(iteratee, thisArg, args);
});
});
});
}
/**
* Creates the padding for `string` based on `length`. The `chars` string
* is truncated if the number of characters exceeds `length`.
*
* @private
* @param {number} length The padding length.
* @param {string} [chars=' '] The string used as padding.
* @returns {string} Returns the padding for `string`.
*/
function createPadding(length, chars) {
chars = chars === undefined ? ' ' : baseToString(chars);
var charsLength = chars.length;
if (charsLength < 2) {
return charsLength ? baseRepeat(chars, length) : chars;
}
var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
return hasUnicode(chars)
? castSlice(stringToArray(result), 0, length).join('')
: result.slice(0, length);
}
/**
* Creates a function that wraps `func` to invoke it with the `this` binding
* of `thisArg` and `partials` prepended to the arguments it receives.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {*} thisArg The `this` binding of `func`.
* @param {Array} partials The arguments to prepend to those provided to
* the new function.
* @returns {Function} Returns the new wrapped function.
*/
function createPartial(func, bitmask, thisArg, partials) {
var isBind = bitmask & WRAP_BIND_FLAG,
Ctor = createCtor(func);
function wrapper() {
var argsIndex = -1,
argsLength = arguments.length,
leftIndex = -1,
leftLength = partials.length,
args = Array(leftLength + argsLength),
fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
while (++leftIndex < leftLength) {
args[leftIndex] = partials[leftIndex];
}
while (argsLength--) {
args[leftIndex++] = arguments[++argsIndex];
}
return apply(fn, isBind ? thisArg : this, args);
}
return wrapper;
}
/**
* Creates a `_.range` or `_.rangeRight` function.
*
* @private
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new range function.
*/
function createRange(fromRight) {
return function(start, end, step) {
if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
end = step = undefined;
}
// Ensure the sign of `-0` is preserved.
start = toFinite(start);
if (end === undefined) {
end = start;
start = 0;
} else {
end = toFinite(end);
}
step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
return baseRange(start, end, step, fromRight);
};
}
/**
* Creates a function that performs a relational operation on two values.
*
* @private
* @param {Function} operator The function to perform the operation.
* @returns {Function} Returns the new relational operation function.
*/
function createRelationalOperation(operator) {
return function(value, other) {
if (!(typeof value == 'string' && typeof other == 'string')) {
value = toNumber(value);
other = toNumber(other);
}
return operator(value, other);
};
}
/**
* Creates a function that wraps `func` to continue currying.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {Function} wrapFunc The function to create the `func` wrapper.
* @param {*} placeholder The placeholder value.
* @param {*} [thisArg] The `this` binding of `func`.
* @param {Array} [partials] The arguments to prepend to those provided to
* the new function.
* @param {Array} [holders] The `partials` placeholder indexes.
* @param {Array} [argPos] The argument positions of the new function.
* @param {number} [ary] The arity cap of `func`.
* @param {number} [arity] The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
var isCurry = bitmask & WRAP_CURRY_FLAG,
newHolders = isCurry ? holders : undefined,
newHoldersRight = isCurry ? undefined : holders,
newPartials = isCurry ? partials : undefined,
newPartialsRight = isCurry ? undefined : partials;
bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
}
var newData = [
func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
newHoldersRight, argPos, ary, arity
];
var result = wrapFunc.apply(undefined, newData);
if (isLaziable(func)) {
setData(result, newData);
}
result.placeholder = placeholder;
return setWrapToString(result, func, bitmask);
}
/**
* Creates a function like `_.round`.
*
* @private
* @param {string} methodName The name of the `Math` method to use when rounding.
* @returns {Function} Returns the new round function.
*/
function createRound(methodName) {
var func = Math[methodName];
return function(number, precision) {
number = toNumber(number);
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
if (precision && nativeIsFinite(number)) {
// Shift with exponential notation to avoid floating-point issues.
// See [MDN](https://mdn.io/round#Examples) for more details.
var pair = (toString(number) + 'e').split('e'),
value = func(pair[0] + 'e' + (+pair[1] + precision));
pair = (toString(value) + 'e').split('e');
return +(pair[0] + 'e' + (+pair[1] - precision));
}
return func(number);
};
}
/**
* Creates a set object of `values`.
*
* @private
* @param {Array} values The values to add to the set.
* @returns {Object} Returns the new set.
*/
var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
return new Set(values);
};
/**
* Creates a `_.toPairs` or `_.toPairsIn` function.
*
* @private
* @param {Function} keysFunc The function to get the keys of a given object.
* @returns {Function} Returns the new pairs function.
*/
function createToPairs(keysFunc) {
return function(object) {
var tag = getTag(object);
if (tag == mapTag) {
return mapToArray(object);
}
if (tag == setTag) {
return setToPairs(object);
}
return baseToPairs(object, keysFunc(object));
};
}
/**
* Creates a function that either curries or invokes `func` with optional
* `this` binding and partially applied arguments.
*
* @private
* @param {Function|string} func The function or method name to wrap.
* @param {number} bitmask The bitmask flags.
* 1 - `_.bind`
* 2 - `_.bindKey`
* 4 - `_.curry` or `_.curryRight` of a bound function
* 8 - `_.curry`
* 16 - `_.curryRight`
* 32 - `_.partial`
* 64 - `_.partialRight`
* 128 - `_.rearg`
* 256 - `_.ary`
* 512 - `_.flip`
* @param {*} [thisArg] The `this` binding of `func`.
* @param {Array} [partials] The arguments to be partially applied.
* @param {Array} [holders] The `partials` placeholder indexes.
* @param {Array} [argPos] The argument positions of the new function.
* @param {number} [ary] The arity cap of `func`.
* @param {number} [arity] The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
if (!isBindKey && typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
var length = partials ? partials.length : 0;
if (!length) {
bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
partials = holders = undefined;
}
ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
arity = arity === undefined ? arity : toInteger(arity);
length -= holders ? holders.length : 0;
if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
var partialsRight = partials,
holdersRight = holders;
partials = holders = undefined;
}
var data = isBindKey ? undefined : getData(func);
var newData = [
func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
argPos, ary, arity
];
if (data) {
mergeData(newData, data);
}
func = newData[0];
bitmask = newData[1];
thisArg = newData[2];
partials = newData[3];
holders = newData[4];
arity = newData[9] = newData[9] === undefined
? (isBindKey ? 0 : func.length)
: nativeMax(newData[9] - length, 0);
if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
}
if (!bitmask || bitmask == WRAP_BIND_FLAG) {
var result = createBind(func, bitmask, thisArg);
} else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
result = createCurry(func, bitmask, arity);
} else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
result = createPartial(func, bitmask, thisArg, partials);
} else {
result = createHybrid.apply(undefined, newData);
}
var setter = data ? baseSetData : setData;
return setWrapToString(setter(result, newData), func, bitmask);
}
/**
* Used by `_.defaults` to customize its `_.assignIn` use to assign properties
* of source objects to the destination object for all destination properties
* that resolve to `undefined`.
*
* @private
* @param {*} objValue The destination value.
* @param {*} srcValue The source value.
* @param {string} key The key of the property to assign.
* @param {Object} object The parent object of `objValue`.
* @returns {*} Returns the value to assign.
*/
function customDefaultsAssignIn(objValue, srcValue, key, object) {
if (objValue === undefined ||
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
return srcValue;
}
return objValue;
}
/**
* Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
* objects into destination objects that are passed thru.
*
* @private
* @param {*} objValue The destination value.
* @param {*} srcValue The source value.
* @param {string} key The key of the property to merge.
* @param {Object} object The parent object of `objValue`.
* @param {Object} source The parent object of `srcValue`.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
* @returns {*} Returns the value to assign.
*/
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
if (isObject(objValue) && isObject(srcValue)) {
// Recursively merge objects and arrays (susceptible to call stack limits).
stack.set(srcValue, objValue);
baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
stack['delete'](srcValue);
}
return objValue;
}
/**
* Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
* objects.
*
* @private
* @param {*} value The value to inspect.
* @param {string} key The key of the property to inspect.
* @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
*/
function customOmitClone(value) {
return isPlainObject(value) ? undefined : value;
}
/**
* A specialized version of `baseIsEqualDeep` for arrays with support for
* partial deep comparisons.
*
* @private
* @param {Array} array The array to compare.
* @param {Array} other The other array to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `array` and `other` objects.
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
*/
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
arrLength = array.length,
othLength = other.length;
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
return false;
}
// Check that cyclic values are equal.
var arrStacked = stack.get(array);
var othStacked = stack.get(other);
if (arrStacked && othStacked) {
return arrStacked == other && othStacked == array;
}
var index = -1,
result = true,
seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
stack.set(array, other);
stack.set(other, array);
// Ignore non-index properties.
while (++index < arrLength) {
var arrValue = array[index],
othValue = other[index];
if (customizer) {
var compared = isPartial
? customizer(othValue, arrValue, index, other, array, stack)
: customizer(arrValue, othValue, index, array, other, stack);
}
if (compared !== undefined) {
if (compared) {
continue;
}
result = false;
break;
}
// Recursively compare arrays (susceptible to call stack limits).
if (seen) {
if (!arraySome(other, function(othValue, othIndex) {
if (!cacheHas(seen, othIndex) &&
(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
return seen.push(othIndex);
}
})) {
result = false;
break;
}
} else if (!(
arrValue === othValue ||
equalFunc(arrValue, othValue, bitmask, customizer, stack)
)) {
result = false;
break;
}
}
stack['delete'](array);
stack['delete'](other);
return result;
}
/**
* A specialized version of `baseIsEqualDeep` for comparing objects of
* the same `toStringTag`.
*
* **Note:** This function only supports comparing values with tags of
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {string} tag The `toStringTag` of the objects to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
switch (tag) {
case dataViewTag:
if ((object.byteLength != other.byteLength) ||
(object.byteOffset != other.byteOffset)) {
return false;
}
object = object.buffer;
other = other.buffer;
case arrayBufferTag:
if ((object.byteLength != other.byteLength) ||
!equalFunc(new Uint8Array(object), new Uint8Array(other))) {
return false;
}
return true;
case boolTag:
case dateTag:
case numberTag:
// Coerce booleans to `1` or `0` and dates to milliseconds.
// Invalid dates are coerced to `NaN`.
return eq(+object, +other);
case errorTag:
return object.name == other.name && object.message == other.message;
case regexpTag:
case stringTag:
// Coerce regexes to strings and treat strings, primitives and objects,
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
// for more details.
return object == (other + '');
case mapTag:
var convert = mapToArray;
case setTag:
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
convert || (convert = setToArray);
if (object.size != other.size && !isPartial) {
return false;
}
// Assume cyclic values are equal.
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
bitmask |= COMPARE_UNORDERED_FLAG;
// Recursively compare objects (susceptible to call stack limits).
stack.set(object, other);
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
stack['delete'](object);
return result;
case symbolTag:
if (symbolValueOf) {
return symbolValueOf.call(object) == symbolValueOf.call(other);
}
}
return false;
}
/**
* A specialized version of `baseIsEqualDeep` for objects with support for
* partial deep comparisons.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
objProps = getAllKeys(object),
objLength = objProps.length,
othProps = getAllKeys(other),
othLength = othProps.length;
if (objLength != othLength && !isPartial) {
return false;
}
var index = objLength;
while (index--) {
var key = objProps[index];
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
return false;
}
}
// Check that cyclic values are equal.
var objStacked = stack.get(object);
var othStacked = stack.get(other);
if (objStacked && othStacked) {
return objStacked == other && othStacked == object;
}
var result = true;
stack.set(object, other);
stack.set(other, object);
var skipCtor = isPartial;
while (++index < objLength) {
key = objProps[index];
var objValue = object[key],
othValue = other[key];
if (customizer) {
var compared = isPartial
? customizer(othValue, objValue, key, other, object, stack)
: customizer(objValue, othValue, key, object, other, stack);
}
// Recursively compare objects (susceptible to call stack limits).
if (!(compared === undefined
? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
: compared
)) {
result = false;
break;
}
skipCtor || (skipCtor = key == 'constructor');
}
if (result && !skipCtor) {
var objCtor = object.constructor,
othCtor = other.constructor;
// Non `Object` object instances with different constructors are not equal.
if (objCtor != othCtor &&
('constructor' in object && 'constructor' in other) &&
!(typeof objCtor == 'function' && objCtor instanceof objCtor &&
typeof othCtor == 'function' && othCtor instanceof othCtor)) {
result = false;
}
}
stack['delete'](object);
stack['delete'](other);
return result;
}
/**
* A specialized version of `baseRest` which flattens the rest array.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @returns {Function} Returns the new function.
*/
function flatRest(func) {
return setToString(overRest(func, undefined, flatten), func + '');
}
/**
* Creates an array of own enumerable property names and symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names and symbols.
*/
function getAllKeys(object) {
return baseGetAllKeys(object, keys, getSymbols);
}
/**
* Creates an array of own and inherited enumerable property names and
* symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names and symbols.
*/
function getAllKeysIn(object) {
return baseGetAllKeys(object, keysIn, getSymbolsIn);
}
/**
* Gets metadata for `func`.
*
* @private
* @param {Function} func The function to query.
* @returns {*} Returns the metadata for `func`.
*/
var getData = !metaMap ? noop : function(func) {
return metaMap.get(func);
};
/**
* Gets the name of `func`.
*
* @private
* @param {Function} func The function to query.
* @returns {string} Returns the function name.
*/
function getFuncName(func) {
var result = (func.name + ''),
array = realNames[result],
length = hasOwnProperty.call(realNames, result) ? array.length : 0;
while (length--) {
var data = array[length],
otherFunc = data.func;
if (otherFunc == null || otherFunc == func) {
return data.name;
}
}
return result;
}
/**
* Gets the argument placeholder value for `func`.
*
* @private
* @param {Function} func The function to inspect.
* @returns {*} Returns the placeholder value.
*/
function getHolder(func) {
var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
return object.placeholder;
}
/**
* Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
* this function returns the custom method, otherwise it returns `baseIteratee`.
* If arguments are provided, the chosen function is invoked with them and
* its result is returned.
*
* @private
* @param {*} [value] The value to convert to an iteratee.
* @param {number} [arity] The arity of the created iteratee.
* @returns {Function} Returns the chosen function or its result.
*/
function getIteratee() {
var result = lodash.iteratee || iteratee;
result = result === iteratee ? baseIteratee : result;
return arguments.length ? result(arguments[0], arguments[1]) : result;
}
/**
* Gets the data for `map`.
*
* @private
* @param {Object} map The map to query.
* @param {string} key The reference key.
* @returns {*} Returns the map data.
*/
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key)
? data[typeof key == 'string' ? 'string' : 'hash']
: data.map;
}
/**
* Gets the property names, values, and compare flags of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the match data of `object`.
*/
function getMatchData(object) {
var result = keys(object),
length = result.length;
while (length--) {
var key = result[length],
value = object[key];
result[length] = [key, value, isStrictComparable(value)];
}
return result;
}
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : undefined;
}
/**
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the raw `toStringTag`.
*/
function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag),
tag = value[symToStringTag];
try {
value[symToStringTag] = undefined;
var unmasked = true;
} catch (e) {}
var result = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag] = tag;
} else {
delete value[symToStringTag];
}
}
return result;
}
/**
* Creates an array of the own enumerable symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
if (object == null) {
return [];
}
object = Object(object);
return arrayFilter(nativeGetSymbols(object), function(symbol) {
return propertyIsEnumerable.call(object, symbol);
});
};
/**
* Creates an array of the own and inherited enumerable symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
var result = [];
while (object) {
arrayPush(result, getSymbols(object));
object = getPrototype(object);
}
return result;
};
/**
* Gets the `toStringTag` of `value`.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
var getTag = baseGetTag;
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
(Map && getTag(new Map) != mapTag) ||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
(Set && getTag(new Set) != setTag) ||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
getTag = function(value) {
var result = baseGetTag(value),
Ctor = result == objectTag ? value.constructor : undefined,
ctorString = Ctor ? toSource(Ctor) : '';
if (ctorString) {
switch (ctorString) {
case dataViewCtorString: return dataViewTag;
case mapCtorString: return mapTag;
case promiseCtorString: return promiseTag;
case setCtorString: return setTag;
case weakMapCtorString: return weakMapTag;
}
}
return result;
};
}
/**
* Gets the view, applying any `transforms` to the `start` and `end` positions.
*
* @private
* @param {number} start The start of the view.
* @param {number} end The end of the view.
* @param {Array} transforms The transformations to apply to the view.
* @returns {Object} Returns an object containing the `start` and `end`
* positions of the view.
*/
function getView(start, end, transforms) {
var index = -1,
length = transforms.length;
while (++index < length) {
var data = transforms[index],
size = data.size;
switch (data.type) {
case 'drop': start += size; break;
case 'dropRight': end -= size; break;
case 'take': end = nativeMin(end, start + size); break;
case 'takeRight': start = nativeMax(start, end - size); break;
}
}
return { 'start': start, 'end': end };
}
/**
* Extracts wrapper details from the `source` body comment.
*
* @private
* @param {string} source The source to inspect.
* @returns {Array} Returns the wrapper details.
*/
function getWrapDetails(source) {
var match = source.match(reWrapDetails);
return match ? match[1].split(reSplitDetails) : [];
}
/**
* Checks if `path` exists on `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @param {Function} hasFunc The function to check properties.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
*/
function hasPath(object, path, hasFunc) {
path = castPath(path, object);
var index = -1,
length = path.length,
result = false;
while (++index < length) {
var key = toKey(path[index]);
if (!(result = object != null && hasFunc(object, key))) {
break;
}
object = object[key];
}
if (result || ++index != length) {
return result;
}
length = object == null ? 0 : object.length;
return !!length && isLength(length) && isIndex(key, length) &&
(isArray(object) || isArguments(object));
}
/**
* Initializes an array clone.
*
* @private
* @param {Array} array The array to clone.
* @returns {Array} Returns the initialized clone.
*/
function initCloneArray(array) {
var length = array.length,
result = new array.constructor(length);
// Add properties assigned by `RegExp#exec`.
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
result.index = array.index;
result.input = array.input;
}
return result;
}
/**
* Initializes an object clone.
*
* @private
* @param {Object} object The object to clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
return (typeof object.constructor == 'function' && !isPrototype(object))
? baseCreate(getPrototype(object))
: {};
}
/**
* Initializes an object clone based on its `toStringTag`.
*
* **Note:** This function only supports cloning values with tags of
* `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
*
* @private
* @param {Object} object The object to clone.
* @param {string} tag The `toStringTag` of the object to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneByTag(object, tag, isDeep) {
var Ctor = object.constructor;
switch (tag) {
case arrayBufferTag:
return cloneArrayBuffer(object);
case boolTag:
case dateTag:
return new Ctor(+object);
case dataViewTag:
return cloneDataView(object, isDeep);
case float32Tag: case float64Tag:
case int8Tag: case int16Tag: case int32Tag:
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
return cloneTypedArray(object, isDeep);
case mapTag:
return new Ctor;
case numberTag:
case stringTag:
return new Ctor(object);
case regexpTag:
return cloneRegExp(object);
case setTag:
return new Ctor;
case symbolTag:
return cloneSymbol(object);
}
}
/**
* Inserts wrapper `details` in a comment at the top of the `source` body.
*
* @private
* @param {string} source The source to modify.
* @returns {Array} details The details to insert.
* @returns {string} Returns the modified source.
*/
function insertWrapDetails(source, details) {
var length = details.length;
if (!length) {
return source;
}
var lastIndex = length - 1;
details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
details = details.join(length > 2 ? ', ' : ' ');
return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
}
/**
* Checks if `value` is a flattenable `arguments` object or array.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
*/
function isFlattenable(value) {
return isArray(value) || isArguments(value) ||
!!(spreadableSymbol && value && value[spreadableSymbol]);
}
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
var type = typeof value;
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length &&
(type == 'number' ||
(type != 'symbol' && reIsUint.test(value))) &&
(value > -1 && value % 1 == 0 && value < length);
}
/**
* Checks if the given arguments are from an iteratee call.
*
* @private
* @param {*} value The potential iteratee value argument.
* @param {*} index The potential iteratee index or key argument.
* @param {*} object The potential iteratee object argument.
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
* else `false`.
*/
function isIterateeCall(value, index, object) {
if (!isObject(object)) {
return false;
}
var type = typeof index;
if (type == 'number'
? (isArrayLike(object) && isIndex(index, object.length))
: (type == 'string' && index in object)
) {
return eq(object[index], value);
}
return false;
}
/**
* Checks if `value` is a property name and not a property path.
*
* @private
* @param {*} value The value to check.
* @param {Object} [object] The object to query keys on.
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
*/
function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
(object != null && value in Object(object));
}
/**
* Checks if `value` is suitable for use as unique object key.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
*/
function isKeyable(value) {
var type = typeof value;
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
? (value !== '__proto__')
: (value === null);
}
/**
* Checks if `func` has a lazy counterpart.
*
* @private
* @param {Function} func The function to check.
* @returns {boolean} Returns `true` if `func` has a lazy counterpart,
* else `false`.
*/
function isLaziable(func) {
var funcName = getFuncName(func),
other = lodash[funcName];
if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
return false;
}
if (func === other) {
return true;
}
var data = getData(other);
return !!data && func === data[0];
}
/**
* Checks if `func` has its source masked.
*
* @private
* @param {Function} func The function to check.
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
*/
function isMasked(func) {
return !!maskSrcKey && (maskSrcKey in func);
}
/**
* Checks if `func` is capable of being masked.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `func` is maskable, else `false`.
*/
var isMaskable = coreJsData ? isFunction : stubFalse;
/**
* Checks if `value` is likely a prototype object.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
*/
function isPrototype(value) {
var Ctor = value && value.constructor,
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
return value === proto;
}
/**
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` if suitable for strict
* equality comparisons, else `false`.
*/
function isStrictComparable(value) {
return value === value && !isObject(value);
}
/**
* A specialized version of `matchesProperty` for source values suitable
* for strict equality comparisons, i.e. `===`.
*
* @private
* @param {string} key The key of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new spec function.
*/
function matchesStrictComparable(key, srcValue) {
return function(object) {
if (object == null) {
return false;
}
return object[key] === srcValue &&
(srcValue !== undefined || (key in Object(object)));
};
}
/**
* A specialized version of `_.memoize` which clears the memoized function's
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
*
* @private
* @param {Function} func The function to have its output memoized.
* @returns {Function} Returns the new memoized function.
*/
function memoizeCapped(func) {
var result = memoize(func, function(key) {
if (cache.size === MAX_MEMOIZE_SIZE) {
cache.clear();
}
return key;
});
var cache = result.cache;
return result;
}
/**
* Merges the function metadata of `source` into `data`.
*
* Merging metadata reduces the number of wrappers used to invoke a function.
* This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
* may be applied regardless of execution order. Methods like `_.ary` and
* `_.rearg` modify function arguments, making the order in which they are
* executed important, preventing the merging of metadata. However, we make
* an exception for a safe combined case where curried functions have `_.ary`
* and or `_.rearg` applied.
*
* @private
* @param {Array} data The destination metadata.
* @param {Array} source The source metadata.
* @returns {Array} Returns `data`.
*/
function mergeData(data, source) {
var bitmask = data[1],
srcBitmask = source[1],
newBitmask = bitmask | srcBitmask,
isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
var isCombo =
((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
// Exit early if metadata can't be merged.
if (!(isCommon || isCombo)) {
return data;
}
// Use source `thisArg` if available.
if (srcBitmask & WRAP_BIND_FLAG) {
data[2] = source[2];
// Set when currying a bound function.
newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
}
// Compose partial arguments.
var value = source[3];
if (value) {
var partials = data[3];
data[3] = partials ? composeArgs(partials, value, source[4]) : value;
data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
}
// Compose partial right arguments.
value = source[5];
if (value) {
partials = data[5];
data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
}
// Use source `argPos` if available.
value = source[7];
if (value) {
data[7] = value;
}
// Use source `ary` if it's smaller.
if (srcBitmask & WRAP_ARY_FLAG) {
data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
}
// Use source `arity` if one is not provided.
if (data[9] == null) {
data[9] = source[9];
}
// Use source `func` and merge bitmasks.
data[0] = source[0];
data[1] = newBitmask;
return data;
}
/**
* This function is like
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
* except that it includes inherited enumerable properties.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function nativeKeysIn(object) {
var result = [];
if (object != null) {
for (var key in Object(object)) {
result.push(key);
}
}
return result;
}
/**
* Converts `value` to a string using `Object.prototype.toString`.
*
* @private
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
*/
function objectToString(value) {
return nativeObjectToString.call(value);
}
/**
* A specialized version of `baseRest` which transforms the rest array.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @param {Function} transform The rest array transform.
* @returns {Function} Returns the new function.
*/
function overRest(func, start, transform) {
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
return function() {
var args = arguments,
index = -1,
length = nativeMax(args.length - start, 0),
array = Array(length);
while (++index < length) {
array[index] = args[start + index];
}
index = -1;
var otherArgs = Array(start + 1);
while (++index < start) {
otherArgs[index] = args[index];
}
otherArgs[start] = transform(array);
return apply(func, this, otherArgs);
};
}
/**
* Gets the parent value at `path` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Array} path The path to get the parent value of.
* @returns {*} Returns the parent value.
*/
function parent(object, path) {
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
}
/**
* Reorder `array` according to the specified indexes where the element at
* the first index is assigned as the first element, the element at
* the second index is assigned as the second element, and so on.
*
* @private
* @param {Array} array The array to reorder.
* @param {Array} indexes The arranged array indexes.
* @returns {Array} Returns `array`.
*/
function reorder(array, indexes) {
var arrLength = array.length,
length = nativeMin(indexes.length, arrLength),
oldArray = copyArray(array);
while (length--) {
var index = indexes[length];
array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
}
return array;
}
/**
* Gets the value at `key`, unless `key` is "__proto__" or "constructor".
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the property to get.
* @returns {*} Returns the property value.
*/
function safeGet(object, key) {
if (key === 'constructor' && typeof object[key] === 'function') {
return;
}
if (key == '__proto__') {
return;
}
return object[key];
}
/**
* Sets metadata for `func`.
*
* **Note:** If this function becomes hot, i.e. is invoked a lot in a short
* period of time, it will trip its breaker and transition to an identity
* function to avoid garbage collection pauses in V8. See
* [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
* for more details.
*
* @private
* @param {Function} func The function to associate metadata with.
* @param {*} data The metadata.
* @returns {Function} Returns `func`.
*/
var setData = shortOut(baseSetData);
/**
* A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
*
* @private
* @param {Function} func The function to delay.
* @param {number} wait The number of milliseconds to delay invocation.
* @returns {number|Object} Returns the timer id or timeout object.
*/
var setTimeout = ctxSetTimeout || function(func, wait) {
return root.setTimeout(func, wait);
};
/**
* Sets the `toString` method of `func` to return `string`.
*
* @private
* @param {Function} func The function to modify.
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
var setToString = shortOut(baseSetToString);
/**
* Sets the `toString` method of `wrapper` to mimic the source of `reference`
* with wrapper details in a comment at the top of the source body.
*
* @private
* @param {Function} wrapper The function to modify.
* @param {Function} reference The reference function.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @returns {Function} Returns `wrapper`.
*/
function setWrapToString(wrapper, reference, bitmask) {
var source = (reference + '');
return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
}
/**
* Creates a function that'll short out and invoke `identity` instead
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
* milliseconds.
*
* @private
* @param {Function} func The function to restrict.
* @returns {Function} Returns the new shortable function.
*/
function shortOut(func) {
var count = 0,
lastCalled = 0;
return function() {
var stamp = nativeNow(),
remaining = HOT_SPAN - (stamp - lastCalled);
lastCalled = stamp;
if (remaining > 0) {
if (++count >= HOT_COUNT) {
return arguments[0];
}
} else {
count = 0;
}
return func.apply(undefined, arguments);
};
}
/**
* A specialized version of `_.shuffle` which mutates and sets the size of `array`.
*
* @private
* @param {Array} array The array to shuffle.
* @param {number} [size=array.length] The size of `array`.
* @returns {Array} Returns `array`.
*/
function shuffleSelf(array, size) {
var index = -1,
length = array.length,
lastIndex = length - 1;
size = size === undefined ? length : size;
while (++index < size) {
var rand = baseRandom(index, lastIndex),
value = array[rand];
array[rand] = array[index];
array[index] = value;
}
array.length = size;
return array;
}
/**
* Converts `string` to a property path array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the property path array.
*/
var stringToPath = memoizeCapped(function(string) {
var result = [];
if (string.charCodeAt(0) === 46 /* . */) {
result.push('');
}
string.replace(rePropName, function(match, number, quote, subString) {
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
});
return result;
});
/**
* Converts `value` to a string key if it's not a string or symbol.
*
* @private
* @param {*} value The value to inspect.
* @returns {string|symbol} Returns the key.
*/
function toKey(value) {
if (typeof value == 'string' || isSymbol(value)) {
return value;
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to convert.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return (func + '');
} catch (e) {}
}
return '';
}
/**
* Updates wrapper `details` based on `bitmask` flags.
*
* @private
* @returns {Array} details The details to modify.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @returns {Array} Returns `details`.
*/
function updateWrapDetails(details, bitmask) {
arrayEach(wrapFlags, function(pair) {
var value = '_.' + pair[0];
if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
details.push(value);
}
});
return details.sort();
}
/**
* Creates a clone of `wrapper`.
*
* @private
* @param {Object} wrapper The wrapper to clone.
* @returns {Object} Returns the cloned wrapper.
*/
function wrapperClone(wrapper) {
if (wrapper instanceof LazyWrapper) {
return wrapper.clone();
}
var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
result.__actions__ = copyArray(wrapper.__actions__);
result.__index__ = wrapper.__index__;
result.__values__ = wrapper.__values__;
return result;
}
/*------------------------------------------------------------------------*/
/**
* Creates an array of elements split into groups the length of `size`.
* If `array` can't be split evenly, the final chunk will be the remaining
* elements.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to process.
* @param {number} [size=1] The length of each chunk
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the new array of chunks.
* @example
*
* _.chunk(['a', 'b', 'c', 'd'], 2);
* // => [['a', 'b'], ['c', 'd']]
*
* _.chunk(['a', 'b', 'c', 'd'], 3);
* // => [['a', 'b', 'c'], ['d']]
*/
function chunk(array, size, guard) {
if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
size = 1;
} else {
size = nativeMax(toInteger(size), 0);
}
var length = array == null ? 0 : array.length;
if (!length || size < 1) {
return [];
}
var index = 0,
resIndex = 0,
result = Array(nativeCeil(length / size));
while (index < length) {
result[resIndex++] = baseSlice(array, index, (index += size));
}
return result;
}
/**
* Creates an array with all falsey values removed. The values `false`, `null`,
* `0`, `""`, `undefined`, and `NaN` are falsey.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to compact.
* @returns {Array} Returns the new array of filtered values.
* @example
*
* _.compact([0, 1, false, 2, '', 3]);
* // => [1, 2, 3]
*/
function compact(array) {
var index = -1,
length = array == null ? 0 : array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index];
if (value) {
result[resIndex++] = value;
}
}
return result;
}
/**
* Creates a new array concatenating `array` with any additional arrays
* and/or values.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to concatenate.
* @param {...*} [values] The values to concatenate.
* @returns {Array} Returns the new concatenated array.
* @example
*
* var array = [1];
* var other = _.concat(array, 2, [3], [[4]]);
*
* console.log(other);
* // => [1, 2, 3, [4]]
*
* console.log(array);
* // => [1]
*/
function concat() {
var length = arguments.length;
if (!length) {
return [];
}
var args = Array(length - 1),
array = arguments[0],
index = length;
while (index--) {
args[index - 1] = arguments[index];
}
return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
}
/**
* Creates an array of `array` values not included in the other given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons. The order and references of result values are
* determined by the first array.
*
* **Note:** Unlike `_.pullAll`, this method returns a new array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {...Array} [values] The values to exclude.
* @returns {Array} Returns the new array of filtered values.
* @see _.without, _.xor
* @example
*
* _.difference([2, 1], [2, 3]);
* // => [1]
*/
var difference = baseRest(function(array, values) {
return isArrayLikeObject(array)
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
: [];
});
/**
* This method is like `_.difference` except that it accepts `iteratee` which
* is invoked for each element of `array` and `values` to generate the criterion
* by which they're compared. The order and references of result values are
* determined by the first array. The iteratee is invoked with one argument:
* (value).
*
* **Note:** Unlike `_.pullAllBy`, this method returns a new array.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {...Array} [values] The values to exclude.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Array} Returns the new array of filtered values.
* @example
*
* _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
* // => [1.2]
*
* // The `_.property` iteratee shorthand.
* _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
* // => [{ 'x': 2 }]
*/
var differenceBy = baseRest(function(array, values) {
var iteratee = last(values);
if (isArrayLikeObject(iteratee)) {
iteratee = undefined;
}
return isArrayLikeObject(array)
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
: [];
});
/**
* This method is like `_.difference` except that it accepts `comparator`
* which is invoked to compare elements of `array` to `values`. The order and
* references of result values are determined by the first array. The comparator
* is invoked with two arguments: (arrVal, othVal).
*
* **Note:** Unlike `_.pullAllWith`, this method returns a new array.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {...Array} [values] The values to exclude.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of filtered values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
*
* _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
* // => [{ 'x': 2, 'y': 1 }]
*/
var differenceWith = baseRest(function(array, values) {
var comparator = last(values);
if (isArrayLikeObject(comparator)) {
comparator = undefined;
}
return isArrayLikeObject(array)
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
: [];
});
/**
* Creates a slice of `array` with `n` elements dropped from the beginning.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to drop.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.drop([1, 2, 3]);
* // => [2, 3]
*
* _.drop([1, 2, 3], 2);
* // => [3]
*
* _.drop([1, 2, 3], 5);
* // => []
*
* _.drop([1, 2, 3], 0);
* // => [1, 2, 3]
*/
function drop(array, n, guard) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
n = (guard || n === undefined) ? 1 : toInteger(n);
return baseSlice(array, n < 0 ? 0 : n, length);
}
/**
* Creates a slice of `array` with `n` elements dropped from the end.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to drop.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.dropRight([1, 2, 3]);
* // => [1, 2]
*
* _.dropRight([1, 2, 3], 2);
* // => [1]
*
* _.dropRight([1, 2, 3], 5);
* // => []
*
* _.dropRight([1, 2, 3], 0);
* // => [1, 2, 3]
*/
function dropRight(array, n, guard) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
n = (guard || n === undefined) ? 1 : toInteger(n);
n = length - n;
return baseSlice(array, 0, n < 0 ? 0 : n);
}
/**
* Creates a slice of `array` excluding elements dropped from the end.
* Elements are dropped until `predicate` returns falsey. The predicate is
* invoked with three arguments: (value, index, array).
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the slice of `array`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': true },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': false }
* ];
*
* _.dropRightWhile(users, function(o) { return !o.active; });
* // => objects for ['barney']
*
* // The `_.matches` iteratee shorthand.
* _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
* // => objects for ['barney', 'fred']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.dropRightWhile(users, ['active', false]);
* // => objects for ['barney']
*
* // The `_.property` iteratee shorthand.
* _.dropRightWhile(users, 'active');
* // => objects for ['barney', 'fred', 'pebbles']
*/
function dropRightWhile(array, predicate) {
return (array && array.length)
? baseWhile(array, getIteratee(predicate, 3), true, true)
: [];
}
/**
* Creates a slice of `array` excluding elements dropped from the beginning.
* Elements are dropped until `predicate` returns falsey. The predicate is
* invoked with three arguments: (value, index, array).
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the slice of `array`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': false },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': true }
* ];
*
* _.dropWhile(users, function(o) { return !o.active; });
* // => objects for ['pebbles']
*
* // The `_.matches` iteratee shorthand.
* _.dropWhile(users, { 'user': 'barney', 'active': false });
* // => objects for ['fred', 'pebbles']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.dropWhile(users, ['active', false]);
* // => objects for ['pebbles']
*
* // The `_.property` iteratee shorthand.
* _.dropWhile(users, 'active');
* // => objects for ['barney', 'fred', 'pebbles']
*/
function dropWhile(array, predicate) {
return (array && array.length)
? baseWhile(array, getIteratee(predicate, 3), true)
: [];
}
/**
* Fills elements of `array` with `value` from `start` up to, but not
* including, `end`.
*
* **Note:** This method mutates `array`.
*
* @static
* @memberOf _
* @since 3.2.0
* @category Array
* @param {Array} array The array to fill.
* @param {*} value The value to fill `array` with.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns `array`.
* @example
*
* var array = [1, 2, 3];
*
* _.fill(array, 'a');
* console.log(array);
* // => ['a', 'a', 'a']
*
* _.fill(Array(3), 2);
* // => [2, 2, 2]
*
* _.fill([4, 6, 8, 10], '*', 1, 3);
* // => [4, '*', '*', 10]
*/
function fill(array, value, start, end) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
start = 0;
end = length;
}
return baseFill(array, value, start, end);
}
/**
* This method is like `_.find` except that it returns the index of the first
* element `predicate` returns truthy for instead of the element itself.
*
* @static
* @memberOf _
* @since 1.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param {number} [fromIndex=0] The index to search from.
* @returns {number} Returns the index of the found element, else `-1`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': false },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': true }
* ];
*
* _.findIndex(users, function(o) { return o.user == 'barney'; });
* // => 0
*
* // The `_.matches` iteratee shorthand.
* _.findIndex(users, { 'user': 'fred', 'active': false });
* // => 1
*
* // The `_.matchesProperty` iteratee shorthand.
* _.findIndex(users, ['active', false]);
* // => 0
*
* // The `_.property` iteratee shorthand.
* _.findIndex(users, 'active');
* // => 2
*/
function findIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = fromIndex == null ? 0 : toInteger(fromIndex);
if (index < 0) {
index = nativeMax(length + index, 0);
}
return baseFindIndex(array, getIteratee(predicate, 3), index);
}
/**
* This method is like `_.findIndex` except that it iterates over elements
* of `collection` from right to left.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param {number} [fromIndex=array.length-1] The index to search from.
* @returns {number} Returns the index of the found element, else `-1`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': true },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': false }
* ];
*
* _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
* // => 2
*
* // The `_.matches` iteratee shorthand.
* _.findLastIndex(users, { 'user': 'barney', 'active': true });
* // => 0
*
* // The `_.matchesProperty` iteratee shorthand.
* _.findLastIndex(users, ['active', false]);
* // => 2
*
* // The `_.property` iteratee shorthand.
* _.findLastIndex(users, 'active');
* // => 0
*/
function findLastIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = length - 1;
if (fromIndex !== undefined) {
index = toInteger(fromIndex);
index = fromIndex < 0
? nativeMax(length + index, 0)
: nativeMin(index, length - 1);
}
return baseFindIndex(array, getIteratee(predicate, 3), index, true);
}
/**
* Flattens `array` a single level deep.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to flatten.
* @returns {Array} Returns the new flattened array.
* @example
*
* _.flatten([1, [2, [3, [4]], 5]]);
* // => [1, 2, [3, [4]], 5]
*/
function flatten(array) {
var length = array == null ? 0 : array.length;
return length ? baseFlatten(array, 1) : [];
}
/**
* Recursively flattens `array`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to flatten.
* @returns {Array} Returns the new flattened array.
* @example
*
* _.flattenDeep([1, [2, [3, [4]], 5]]);
* // => [1, 2, 3, 4, 5]
*/
function flattenDeep(array) {
var length = array == null ? 0 : array.length;
return length ? baseFlatten(array, INFINITY) : [];
}
/**
* Recursively flatten `array` up to `depth` times.
*
* @static
* @memberOf _
* @since 4.4.0
* @category Array
* @param {Array} array The array to flatten.
* @param {number} [depth=1] The maximum recursion depth.
* @returns {Array} Returns the new flattened array.
* @example
*
* var array = [1, [2, [3, [4]], 5]];
*
* _.flattenDepth(array, 1);
* // => [1, 2, [3, [4]], 5]
*
* _.flattenDepth(array, 2);
* // => [1, 2, 3, [4], 5]
*/
function flattenDepth(array, depth) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
depth = depth === undefined ? 1 : toInteger(depth);
return baseFlatten(array, depth);
}
/**
* The inverse of `_.toPairs`; this method returns an object composed
* from key-value `pairs`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} pairs The key-value pairs.
* @returns {Object} Returns the new object.
* @example
*
* _.fromPairs([['a', 1], ['b', 2]]);
* // => { 'a': 1, 'b': 2 }
*/
function fromPairs(pairs) {
var index = -1,
length = pairs == null ? 0 : pairs.length,
result = {};
while (++index < length) {
var pair = pairs[index];
result[pair[0]] = pair[1];
}
return result;
}
/**
* Gets the first element of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @alias first
* @category Array
* @param {Array} array The array to query.
* @returns {*} Returns the first element of `array`.
* @example
*
* _.head([1, 2, 3]);
* // => 1
*
* _.head([]);
* // => undefined
*/
function head(array) {
return (array && array.length) ? array[0] : undefined;
}
/**
* Gets the index at which the first occurrence of `value` is found in `array`
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons. If `fromIndex` is negative, it's used as the
* offset from the end of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} [fromIndex=0] The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
* @example
*
* _.indexOf([1, 2, 1, 2], 2);
* // => 1
*
* // Search from the `fromIndex`.
* _.indexOf([1, 2, 1, 2], 2, 2);
* // => 3
*/
function indexOf(array, value, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = fromIndex == null ? 0 : toInteger(fromIndex);
if (index < 0) {
index = nativeMax(length + index, 0);
}
return baseIndexOf(array, value, index);
}
/**
* Gets all but the last element of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to query.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.initial([1, 2, 3]);
* // => [1, 2]
*/
function initial(array) {
var length = array == null ? 0 : array.length;
return length ? baseSlice(array, 0, -1) : [];
}
/**
* Creates an array of unique values that are included in all given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons. The order and references of result values are
* determined by the first array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @returns {Array} Returns the new array of intersecting values.
* @example
*
* _.intersection([2, 1], [2, 3]);
* // => [2]
*/
var intersection = baseRest(function(arrays) {
var mapped = arrayMap(arrays, castArrayLikeObject);
return (mapped.length && mapped[0] === arrays[0])
? baseIntersection(mapped)
: [];
});
/**
* This method is like `_.intersection` except that it accepts `iteratee`
* which is invoked for each element of each `arrays` to generate the criterion
* by which they're compared. The order and references of result values are
* determined by the first array. The iteratee is invoked with one argument:
* (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Array} Returns the new array of intersecting values.
* @example
*
* _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
* // => [2.1]
*
* // The `_.property` iteratee shorthand.
* _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 1 }]
*/
var intersectionBy = baseRest(function(arrays) {
var iteratee = last(arrays),
mapped = arrayMap(arrays, castArrayLikeObject);
if (iteratee === last(mapped)) {
iteratee = undefined;
} else {
mapped.pop();
}
return (mapped.length && mapped[0] === arrays[0])
? baseIntersection(mapped, getIteratee(iteratee, 2))
: [];
});
/**
* This method is like `_.intersection` except that it accepts `comparator`
* which is invoked to compare elements of `arrays`. The order and references
* of result values are determined by the first array. The comparator is
* invoked with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of intersecting values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.intersectionWith(objects, others, _.isEqual);
* // => [{ 'x': 1, 'y': 2 }]
*/
var intersectionWith = baseRest(function(arrays) {
var comparator = last(arrays),
mapped = arrayMap(arrays, castArrayLikeObject);
comparator = typeof comparator == 'function' ? comparator : undefined;
if (comparator) {
mapped.pop();
}
return (mapped.length && mapped[0] === arrays[0])
? baseIntersection(mapped, undefined, comparator)
: [];
});
/**
* Converts all elements in `array` into a string separated by `separator`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to convert.
* @param {string} [separator=','] The element separator.
* @returns {string} Returns the joined string.
* @example
*
* _.join(['a', 'b', 'c'], '~');
* // => 'a~b~c'
*/
function join(array, separator) {
return array == null ? '' : nativeJoin.call(array, separator);
}
/**
* Gets the last element of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to query.
* @returns {*} Returns the last element of `array`.
* @example
*
* _.last([1, 2, 3]);
* // => 3
*/
function last(array) {
var length = array == null ? 0 : array.length;
return length ? array[length - 1] : undefined;
}
/**
* This method is like `_.indexOf` except that it iterates over elements of
* `array` from right to left.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} [fromIndex=array.length-1] The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
* @example
*
* _.lastIndexOf([1, 2, 1, 2], 2);
* // => 3
*
* // Search from the `fromIndex`.
* _.lastIndexOf([1, 2, 1, 2], 2, 2);
* // => 1
*/
function lastIndexOf(array, value, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = length;
if (fromIndex !== undefined) {
index = toInteger(fromIndex);
index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
}
return value === value
? strictLastIndexOf(array, value, index)
: baseFindIndex(array, baseIsNaN, index, true);
}
/**
* Gets the element at index `n` of `array`. If `n` is negative, the nth
* element from the end is returned.
*
* @static
* @memberOf _
* @since 4.11.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=0] The index of the element to return.
* @returns {*} Returns the nth element of `array`.
* @example
*
* var array = ['a', 'b', 'c', 'd'];
*
* _.nth(array, 1);
* // => 'b'
*
* _.nth(array, -2);
* // => 'c';
*/
function nth(array, n) {
return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
}
/**
* Removes all given values from `array` using
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
* to remove elements from an array by predicate.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Array
* @param {Array} array The array to modify.
* @param {...*} [values] The values to remove.
* @returns {Array} Returns `array`.
* @example
*
* var array = ['a', 'b', 'c', 'a', 'b', 'c'];
*
* _.pull(array, 'a', 'c');
* console.log(array);
* // => ['b', 'b']
*/
var pull = baseRest(pullAll);
/**
* This method is like `_.pull` except that it accepts an array of values to remove.
*
* **Note:** Unlike `_.difference`, this method mutates `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to modify.
* @param {Array} values The values to remove.
* @returns {Array} Returns `array`.
* @example
*
* var array = ['a', 'b', 'c', 'a', 'b', 'c'];
*
* _.pullAll(array, ['a', 'c']);
* console.log(array);
* // => ['b', 'b']
*/
function pullAll(array, values) {
return (array && array.length && values && values.length)
? basePullAll(array, values)
: array;
}
/**
* This method is like `_.pullAll` except that it accepts `iteratee` which is
* invoked for each element of `array` and `values` to generate the criterion
* by which they're compared. The iteratee is invoked with one argument: (value).
*
* **Note:** Unlike `_.differenceBy`, this method mutates `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to modify.
* @param {Array} values The values to remove.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Array} Returns `array`.
* @example
*
* var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
*
* _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
* console.log(array);
* // => [{ 'x': 2 }]
*/
function pullAllBy(array, values, iteratee) {
return (array && array.length && values && values.length)
? basePullAll(array, values, getIteratee(iteratee, 2))
: array;
}
/**
* This method is like `_.pullAll` except that it accepts `comparator` which
* is invoked to compare elements of `array` to `values`. The comparator is
* invoked with two arguments: (arrVal, othVal).
*
* **Note:** Unlike `_.differenceWith`, this method mutates `array`.
*
* @static
* @memberOf _
* @since 4.6.0
* @category Array
* @param {Array} array The array to modify.
* @param {Array} values The values to remove.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns `array`.
* @example
*
* var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
*
* _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
* console.log(array);
* // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
*/
function pullAllWith(array, values, comparator) {
return (array && array.length && values && values.length)
? basePullAll(array, values, undefined, comparator)
: array;
}
/**
* Removes elements from `array` corresponding to `indexes` and returns an
* array of removed elements.
*
* **Note:** Unlike `_.at`, this method mutates `array`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to modify.
* @param {...(number|number[])} [indexes] The indexes of elements to remove.
* @returns {Array} Returns the new array of removed elements.
* @example
*
* var array = ['a', 'b', 'c', 'd'];
* var pulled = _.pullAt(array, [1, 3]);
*
* console.log(array);
* // => ['a', 'c']
*
* console.log(pulled);
* // => ['b', 'd']
*/
var pullAt = flatRest(function(array, indexes) {
var length = array == null ? 0 : array.length,
result = baseAt(array, indexes);
basePullAt(array, arrayMap(indexes, function(index) {
return isIndex(index, length) ? +index : index;
}).sort(compareAscending));
return result;
});
/**
* Removes all elements from `array` that `predicate` returns truthy for
* and returns an array of the removed elements. The predicate is invoked
* with three arguments: (value, index, array).
*
* **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
* to pull elements from an array by value.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Array
* @param {Array} array The array to modify.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new array of removed elements.
* @example
*
* var array = [1, 2, 3, 4];
* var evens = _.remove(array, function(n) {
* return n % 2 == 0;
* });
*
* console.log(array);
* // => [1, 3]
*
* console.log(evens);
* // => [2, 4]
*/
function remove(array, predicate) {
var result = [];
if (!(array && array.length)) {
return result;
}
var index = -1,
indexes = [],
length = array.length;
predicate = getIteratee(predicate, 3);
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result.push(value);
indexes.push(index);
}
}
basePullAt(array, indexes);
return result;
}
/**
* Reverses `array` so that the first element becomes the last, the second
* element becomes the second to last, and so on.
*
* **Note:** This method mutates `array` and is based on
* [`Array#reverse`](https://mdn.io/Array/reverse).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to modify.
* @returns {Array} Returns `array`.
* @example
*
* var array = [1, 2, 3];
*
* _.reverse(array);
* // => [3, 2, 1]
*
* console.log(array);
* // => [3, 2, 1]
*/
function reverse(array) {
return array == null ? array : nativeReverse.call(array);
}
/**
* Creates a slice of `array` from `start` up to, but not including, `end`.
*
* **Note:** This method is used instead of
* [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
* returned.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to slice.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the slice of `array`.
*/
function slice(array, start, end) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
start = 0;
end = length;
}
else {
start = start == null ? 0 : toInteger(start);
end = end === undefined ? length : toInteger(end);
}
return baseSlice(array, start, end);
}
/**
* Uses a binary search to determine the lowest index at which `value`
* should be inserted into `array` in order to maintain its sort order.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
* @example
*
* _.sortedIndex([30, 50], 40);
* // => 1
*/
function sortedIndex(array, value) {
return baseSortedIndex(array, value);
}
/**
* This method is like `_.sortedIndex` except that it accepts `iteratee`
* which is invoked for `value` and each element of `array` to compute their
* sort ranking. The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
* @example
*
* var objects = [{ 'x': 4 }, { 'x': 5 }];
*
* _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
* // => 0
*
* // The `_.property` iteratee shorthand.
* _.sortedIndexBy(objects, { 'x': 4 }, 'x');
* // => 0
*/
function sortedIndexBy(array, value, iteratee) {
return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
}
/**
* This method is like `_.indexOf` except that it performs a binary
* search on a sorted `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
* @example
*
* _.sortedIndexOf([4, 5, 5, 5, 6], 5);
* // => 1
*/
function sortedIndexOf(array, value) {
var length = array == null ? 0 : array.length;
if (length) {
var index = baseSortedIndex(array, value);
if (index < length && eq(array[index], value)) {
return index;
}
}
return -1;
}
/**
* This method is like `_.sortedIndex` except that it returns the highest
* index at which `value` should be inserted into `array` in order to
* maintain its sort order.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
* @example
*
* _.sortedLastIndex([4, 5, 5, 5, 6], 5);
* // => 4
*/
function sortedLastIndex(array, value) {
return baseSortedIndex(array, value, true);
}
/**
* This method is like `_.sortedLastIndex` except that it accepts `iteratee`
* which is invoked for `value` and each element of `array` to compute their
* sort ranking. The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
* @example
*
* var objects = [{ 'x': 4 }, { 'x': 5 }];
*
* _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
* // => 1
*
* // The `_.property` iteratee shorthand.
* _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
* // => 1
*/
function sortedLastIndexBy(array, value, iteratee) {
return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
}
/**
* This method is like `_.lastIndexOf` except that it performs a binary
* search on a sorted `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
* @example
*
* _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
* // => 3
*/
function sortedLastIndexOf(array, value) {
var length = array == null ? 0 : array.length;
if (length) {
var index = baseSortedIndex(array, value, true) - 1;
if (eq(array[index], value)) {
return index;
}
}
return -1;
}
/**
* This method is like `_.uniq` except that it's designed and optimized
* for sorted arrays.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @returns {Array} Returns the new duplicate free array.
* @example
*
* _.sortedUniq([1, 1, 2]);
* // => [1, 2]
*/
function sortedUniq(array) {
return (array && array.length)
? baseSortedUniq(array)
: [];
}
/**
* This method is like `_.uniqBy` except that it's designed and optimized
* for sorted arrays.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @returns {Array} Returns the new duplicate free array.
* @example
*
* _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
* // => [1.1, 2.3]
*/
function sortedUniqBy(array, iteratee) {
return (array && array.length)
? baseSortedUniq(array, getIteratee(iteratee, 2))
: [];
}
/**
* Gets all but the first element of `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to query.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.tail([1, 2, 3]);
* // => [2, 3]
*/
function tail(array) {
var length = array == null ? 0 : array.length;
return length ? baseSlice(array, 1, length) : [];
}
/**
* Creates a slice of `array` with `n` elements taken from the beginning.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to take.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.take([1, 2, 3]);
* // => [1]
*
* _.take([1, 2, 3], 2);
* // => [1, 2]
*
* _.take([1, 2, 3], 5);
* // => [1, 2, 3]
*
* _.take([1, 2, 3], 0);
* // => []
*/
function take(array, n, guard) {
if (!(array && array.length)) {
return [];
}
n = (guard || n === undefined) ? 1 : toInteger(n);
return baseSlice(array, 0, n < 0 ? 0 : n);
}
/**
* Creates a slice of `array` with `n` elements taken from the end.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to take.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.takeRight([1, 2, 3]);
* // => [3]
*
* _.takeRight([1, 2, 3], 2);
* // => [2, 3]
*
* _.takeRight([1, 2, 3], 5);
* // => [1, 2, 3]
*
* _.takeRight([1, 2, 3], 0);
* // => []
*/
function takeRight(array, n, guard) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
n = (guard || n === undefined) ? 1 : toInteger(n);
n = length - n;
return baseSlice(array, n < 0 ? 0 : n, length);
}
/**
* Creates a slice of `array` with elements taken from the end. Elements are
* taken until `predicate` returns falsey. The predicate is invoked with
* three arguments: (value, index, array).
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the slice of `array`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': true },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': false }
* ];
*
* _.takeRightWhile(users, function(o) { return !o.active; });
* // => objects for ['fred', 'pebbles']
*
* // The `_.matches` iteratee shorthand.
* _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
* // => objects for ['pebbles']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.takeRightWhile(users, ['active', false]);
* // => objects for ['fred', 'pebbles']
*
* // The `_.property` iteratee shorthand.
* _.takeRightWhile(users, 'active');
* // => []
*/
function takeRightWhile(array, predicate) {
return (array && array.length)
? baseWhile(array, getIteratee(predicate, 3), false, true)
: [];
}
/**
* Creates a slice of `array` with elements taken from the beginning. Elements
* are taken until `predicate` returns falsey. The predicate is invoked with
* three arguments: (value, index, array).
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the slice of `array`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': false },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': true }
* ];
*
* _.takeWhile(users, function(o) { return !o.active; });
* // => objects for ['barney', 'fred']
*
* // The `_.matches` iteratee shorthand.
* _.takeWhile(users, { 'user': 'barney', 'active': false });
* // => objects for ['barney']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.takeWhile(users, ['active', false]);
* // => objects for ['barney', 'fred']
*
* // The `_.property` iteratee shorthand.
* _.takeWhile(users, 'active');
* // => []
*/
function takeWhile(array, predicate) {
return (array && array.length)
? baseWhile(array, getIteratee(predicate, 3))
: [];
}
/**
* Creates an array of unique values, in order, from all given arrays using
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @returns {Array} Returns the new array of combined values.
* @example
*
* _.union([2], [1, 2]);
* // => [2, 1]
*/
var union = baseRest(function(arrays) {
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
});
/**
* This method is like `_.union` except that it accepts `iteratee` which is
* invoked for each element of each `arrays` to generate the criterion by
* which uniqueness is computed. Result values are chosen from the first
* array in which the value occurs. The iteratee is invoked with one argument:
* (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Array} Returns the new array of combined values.
* @example
*
* _.unionBy([2.1], [1.2, 2.3], Math.floor);
* // => [2.1, 1.2]
*
* // The `_.property` iteratee shorthand.
* _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 1 }, { 'x': 2 }]
*/
var unionBy = baseRest(function(arrays) {
var iteratee = last(arrays);
if (isArrayLikeObject(iteratee)) {
iteratee = undefined;
}
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
});
/**
* This method is like `_.union` except that it accepts `comparator` which
* is invoked to compare elements of `arrays`. Result values are chosen from
* the first array in which the value occurs. The comparator is invoked
* with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of combined values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.unionWith(objects, others, _.isEqual);
* // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
*/
var unionWith = baseRest(function(arrays) {
var comparator = last(arrays);
comparator = typeof comparator == 'function' ? comparator : undefined;
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
});
/**
* Creates a duplicate-free version of an array, using
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons, in which only the first occurrence of each element
* is kept. The order of result values is determined by the order they occur
* in the array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @returns {Array} Returns the new duplicate free array.
* @example
*
* _.uniq([2, 1, 2]);
* // => [2, 1]
*/
function uniq(array) {
return (array && array.length) ? baseUniq(array) : [];
}
/**
* This method is like `_.uniq` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the criterion by which
* uniqueness is computed. The order of result values is determined by the
* order they occur in the array. The iteratee is invoked with one argument:
* (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Array} Returns the new duplicate free array.
* @example
*
* _.uniqBy([2.1, 1.2, 2.3], Math.floor);
* // => [2.1, 1.2]
*
* // The `_.property` iteratee shorthand.
* _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 1 }, { 'x': 2 }]
*/
function uniqBy(array, iteratee) {
return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
}
/**
* This method is like `_.uniq` except that it accepts `comparator` which
* is invoked to compare elements of `array`. The order of result values is
* determined by the order they occur in the array.The comparator is invoked
* with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new duplicate free array.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.uniqWith(objects, _.isEqual);
* // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
*/
function uniqWith(array, comparator) {
comparator = typeof comparator == 'function' ? comparator : undefined;
return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
}
/**
* This method is like `_.zip` except that it accepts an array of grouped
* elements and creates an array regrouping the elements to their pre-zip
* configuration.
*
* @static
* @memberOf _
* @since 1.2.0
* @category Array
* @param {Array} array The array of grouped elements to process.
* @returns {Array} Returns the new array of regrouped elements.
* @example
*
* var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
* // => [['a', 1, true], ['b', 2, false]]
*
* _.unzip(zipped);
* // => [['a', 'b'], [1, 2], [true, false]]
*/
function unzip(array) {
if (!(array && array.length)) {
return [];
}
var length = 0;
array = arrayFilter(array, function(group) {
if (isArrayLikeObject(group)) {
length = nativeMax(group.length, length);
return true;
}
});
return baseTimes(length, function(index) {
return arrayMap(array, baseProperty(index));
});
}
/**
* This method is like `_.unzip` except that it accepts `iteratee` to specify
* how regrouped values should be combined. The iteratee is invoked with the
* elements of each group: (...group).
*
* @static
* @memberOf _
* @since 3.8.0
* @category Array
* @param {Array} array The array of grouped elements to process.
* @param {Function} [iteratee=_.identity] The function to combine
* regrouped values.
* @returns {Array} Returns the new array of regrouped elements.
* @example
*
* var zipped = _.zip([1, 2], [10, 20], [100, 200]);
* // => [[1, 10, 100], [2, 20, 200]]
*
* _.unzipWith(zipped, _.add);
* // => [3, 30, 300]
*/
function unzipWith(array, iteratee) {
if (!(array && array.length)) {
return [];
}
var result = unzip(array);
if (iteratee == null) {
return result;
}
return arrayMap(result, function(group) {
return apply(iteratee, undefined, group);
});
}
/**
* Creates an array excluding all given values using
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* **Note:** Unlike `_.pull`, this method returns a new array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {...*} [values] The values to exclude.
* @returns {Array} Returns the new array of filtered values.
* @see _.difference, _.xor
* @example
*
* _.without([2, 1, 2, 3], 1, 2);
* // => [3]
*/
var without = baseRest(function(array, values) {
return isArrayLikeObject(array)
? baseDifference(array, values)
: [];
});
/**
* Creates an array of unique values that is the
* [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
* of the given arrays. The order of result values is determined by the order
* they occur in the arrays.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @returns {Array} Returns the new array of filtered values.
* @see _.difference, _.without
* @example
*
* _.xor([2, 1], [2, 3]);
* // => [1, 3]
*/
var xor = baseRest(function(arrays) {
return baseXor(arrayFilter(arrays, isArrayLikeObject));
});
/**
* This method is like `_.xor` except that it accepts `iteratee` which is
* invoked for each element of each `arrays` to generate the criterion by
* which by which they're compared. The order of result values is determined
* by the order they occur in the arrays. The iteratee is invoked with one
* argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Array} Returns the new array of filtered values.
* @example
*
* _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
* // => [1.2, 3.4]
*
* // The `_.property` iteratee shorthand.
* _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 2 }]
*/
var xorBy = baseRest(function(arrays) {
var iteratee = last(arrays);
if (isArrayLikeObject(iteratee)) {
iteratee = undefined;
}
return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
});
/**
* This method is like `_.xor` except that it accepts `comparator` which is
* invoked to compare elements of `arrays`. The order of result values is
* determined by the order they occur in the arrays. The comparator is invoked
* with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of filtered values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.xorWith(objects, others, _.isEqual);
* // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
*/
var xorWith = baseRest(function(arrays) {
var comparator = last(arrays);
comparator = typeof comparator == 'function' ? comparator : undefined;
return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
});
/**
* Creates an array of grouped elements, the first of which contains the
* first elements of the given arrays, the second of which contains the
* second elements of the given arrays, and so on.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {...Array} [arrays] The arrays to process.
* @returns {Array} Returns the new array of grouped elements.
* @example
*
* _.zip(['a', 'b'], [1, 2], [true, false]);
* // => [['a', 1, true], ['b', 2, false]]
*/
var zip = baseRest(unzip);
/**
* This method is like `_.fromPairs` except that it accepts two arrays,
* one of property identifiers and one of corresponding values.
*
* @static
* @memberOf _
* @since 0.4.0
* @category Array
* @param {Array} [props=[]] The property identifiers.
* @param {Array} [values=[]] The property values.
* @returns {Object} Returns the new object.
* @example
*
* _.zipObject(['a', 'b'], [1, 2]);
* // => { 'a': 1, 'b': 2 }
*/
function zipObject(props, values) {
return baseZipObject(props || [], values || [], assignValue);
}
/**
* This method is like `_.zipObject` except that it supports property paths.
*
* @static
* @memberOf _
* @since 4.1.0
* @category Array
* @param {Array} [props=[]] The property identifiers.
* @param {Array} [values=[]] The property values.
* @returns {Object} Returns the new object.
* @example
*
* _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
* // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
*/
function zipObjectDeep(props, values) {
return baseZipObject(props || [], values || [], baseSet);
}
/**
* This method is like `_.zip` except that it accepts `iteratee` to specify
* how grouped values should be combined. The iteratee is invoked with the
* elements of each group: (...group).
*
* @static
* @memberOf _
* @since 3.8.0
* @category Array
* @param {...Array} [arrays] The arrays to process.
* @param {Function} [iteratee=_.identity] The function to combine
* grouped values.
* @returns {Array} Returns the new array of grouped elements.
* @example
*
* _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
* return a + b + c;
* });
* // => [111, 222]
*/
var zipWith = baseRest(function(arrays) {
var length = arrays.length,
iteratee = length > 1 ? arrays[length - 1] : undefined;
iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
return unzipWith(arrays, iteratee);
});
/*------------------------------------------------------------------------*/
/**
* Creates a `lodash` wrapper instance that wraps `value` with explicit method
* chain sequences enabled. The result of such sequences must be unwrapped
* with `_#value`.
*
* @static
* @memberOf _
* @since 1.3.0
* @category Seq
* @param {*} value The value to wrap.
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36 },
* { 'user': 'fred', 'age': 40 },
* { 'user': 'pebbles', 'age': 1 }
* ];
*
* var youngest = _
* .chain(users)
* .sortBy('age')
* .map(function(o) {
* return o.user + ' is ' + o.age;
* })
* .head()
* .value();
* // => 'pebbles is 1'
*/
function chain(value) {
var result = lodash(value);
result.__chain__ = true;
return result;
}
/**
* This method invokes `interceptor` and returns `value`. The interceptor
* is invoked with one argument; (value). The purpose of this method is to
* "tap into" a method chain sequence in order to modify intermediate results.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Seq
* @param {*} value The value to provide to `interceptor`.
* @param {Function} interceptor The function to invoke.
* @returns {*} Returns `value`.
* @example
*
* _([1, 2, 3])
* .tap(function(array) {
* // Mutate input array.
* array.pop();
* })
* .reverse()
* .value();
* // => [2, 1]
*/
function tap(value, interceptor) {
interceptor(value);
return value;
}
/**
* This method is like `_.tap` except that it returns the result of `interceptor`.
* The purpose of this method is to "pass thru" values replacing intermediate
* results in a method chain sequence.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Seq
* @param {*} value The value to provide to `interceptor`.
* @param {Function} interceptor The function to invoke.
* @returns {*} Returns the result of `interceptor`.
* @example
*
* _(' abc ')
* .chain()
* .trim()
* .thru(function(value) {
* return [value];
* })
* .value();
* // => ['abc']
*/
function thru(value, interceptor) {
return interceptor(value);
}
/**
* This method is the wrapper version of `_.at`.
*
* @name at
* @memberOf _
* @since 1.0.0
* @category Seq
* @param {...(string|string[])} [paths] The property paths to pick.
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
*
* _(object).at(['a[0].b.c', 'a[1]']).value();
* // => [3, 4]
*/
var wrapperAt = flatRest(function(paths) {
var length = paths.length,
start = length ? paths[0] : 0,
value = this.__wrapped__,
interceptor = function(object) { return baseAt(object, paths); };
if (length > 1 || this.__actions__.length ||
!(value instanceof LazyWrapper) || !isIndex(start)) {
return this.thru(interceptor);
}
value = value.slice(start, +start + (length ? 1 : 0));
value.__actions__.push({
'func': thru,
'args': [interceptor],
'thisArg': undefined
});
return new LodashWrapper(value, this.__chain__).thru(function(array) {
if (length && !array.length) {
array.push(undefined);
}
return array;
});
});
/**
* Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
*
* @name chain
* @memberOf _
* @since 0.1.0
* @category Seq
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36 },
* { 'user': 'fred', 'age': 40 }
* ];
*
* // A sequence without explicit chaining.
* _(users).head();
* // => { 'user': 'barney', 'age': 36 }
*
* // A sequence with explicit chaining.
* _(users)
* .chain()
* .head()
* .pick('user')
* .value();
* // => { 'user': 'barney' }
*/
function wrapperChain() {
return chain(this);
}
/**
* Executes the chain sequence and returns the wrapped result.
*
* @name commit
* @memberOf _
* @since 3.2.0
* @category Seq
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* var array = [1, 2];
* var wrapped = _(array).push(3);
*
* console.log(array);
* // => [1, 2]
*
* wrapped = wrapped.commit();
* console.log(array);
* // => [1, 2, 3]
*
* wrapped.last();
* // => 3
*
* console.log(array);
* // => [1, 2, 3]
*/
function wrapperCommit() {
return new LodashWrapper(this.value(), this.__chain__);
}
/**
* Gets the next value on a wrapped object following the
* [iterator protocol](https://mdn.io/iteration_protocols#iterator).
*
* @name next
* @memberOf _
* @since 4.0.0
* @category Seq
* @returns {Object} Returns the next iterator value.
* @example
*
* var wrapped = _([1, 2]);
*
* wrapped.next();
* // => { 'done': false, 'value': 1 }
*
* wrapped.next();
* // => { 'done': false, 'value': 2 }
*
* wrapped.next();
* // => { 'done': true, 'value': undefined }
*/
function wrapperNext() {
if (this.__values__ === undefined) {
this.__values__ = toArray(this.value());
}
var done = this.__index__ >= this.__values__.length,
value = done ? undefined : this.__values__[this.__index__++];
return { 'done': done, 'value': value };
}
/**
* Enables the wrapper to be iterable.
*
* @name Symbol.iterator
* @memberOf _
* @since 4.0.0
* @category Seq
* @returns {Object} Returns the wrapper object.
* @example
*
* var wrapped = _([1, 2]);
*
* wrapped[Symbol.iterator]() === wrapped;
* // => true
*
* Array.from(wrapped);
* // => [1, 2]
*/
function wrapperToIterator() {
return this;
}
/**
* Creates a clone of the chain sequence planting `value` as the wrapped value.
*
* @name plant
* @memberOf _
* @since 3.2.0
* @category Seq
* @param {*} value The value to plant.
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* function square(n) {
* return n * n;
* }
*
* var wrapped = _([1, 2]).map(square);
* var other = wrapped.plant([3, 4]);
*
* other.value();
* // => [9, 16]
*
* wrapped.value();
* // => [1, 4]
*/
function wrapperPlant(value) {
var result,
parent = this;
while (parent instanceof baseLodash) {
var clone = wrapperClone(parent);
clone.__index__ = 0;
clone.__values__ = undefined;
if (result) {
previous.__wrapped__ = clone;
} else {
result = clone;
}
var previous = clone;
parent = parent.__wrapped__;
}
previous.__wrapped__ = value;
return result;
}
/**
* This method is the wrapper version of `_.reverse`.
*
* **Note:** This method mutates the wrapped array.
*
* @name reverse
* @memberOf _
* @since 0.1.0
* @category Seq
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* var array = [1, 2, 3];
*
* _(array).reverse().value()
* // => [3, 2, 1]
*
* console.log(array);
* // => [3, 2, 1]
*/
function wrapperReverse() {
var value = this.__wrapped__;
if (value instanceof LazyWrapper) {
var wrapped = value;
if (this.__actions__.length) {
wrapped = new LazyWrapper(this);
}
wrapped = wrapped.reverse();
wrapped.__actions__.push({
'func': thru,
'args': [reverse],
'thisArg': undefined
});
return new LodashWrapper(wrapped, this.__chain__);
}
return this.thru(reverse);
}
/**
* Executes the chain sequence to resolve the unwrapped value.
*
* @name value
* @memberOf _
* @since 0.1.0
* @alias toJSON, valueOf
* @category Seq
* @returns {*} Returns the resolved unwrapped value.
* @example
*
* _([1, 2, 3]).value();
* // => [1, 2, 3]
*/
function wrapperValue() {
return baseWrapperValue(this.__wrapped__, this.__actions__);
}
/*------------------------------------------------------------------------*/
/**
* Creates an object composed of keys generated from the results of running
* each element of `collection` thru `iteratee`. The corresponding value of
* each key is the number of times the key was returned by `iteratee`. The
* iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 0.5.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
* @returns {Object} Returns the composed aggregate object.
* @example
*
* _.countBy([6.1, 4.2, 6.3], Math.floor);
* // => { '4': 1, '6': 2 }
*
* // The `_.property` iteratee shorthand.
* _.countBy(['one', 'two', 'three'], 'length');
* // => { '3': 2, '5': 1 }
*/
var countBy = createAggregator(function(result, value, key) {
if (hasOwnProperty.call(result, key)) {
++result[key];
} else {
baseAssignValue(result, key, 1);
}
});
/**
* Checks if `predicate` returns truthy for **all** elements of `collection`.
* Iteration is stopped once `predicate` returns falsey. The predicate is
* invoked with three arguments: (value, index|key, collection).
*
* **Note:** This method returns `true` for
* [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
* [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
* elements of empty collections.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {boolean} Returns `true` if all elements pass the predicate check,
* else `false`.
* @example
*
* _.every([true, 1, null, 'yes'], Boolean);
* // => false
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': false },
* { 'user': 'fred', 'age': 40, 'active': false }
* ];
*
* // The `_.matches` iteratee shorthand.
* _.every(users, { 'user': 'barney', 'active': false });
* // => false
*
* // The `_.matchesProperty` iteratee shorthand.
* _.every(users, ['active', false]);
* // => true
*
* // The `_.property` iteratee shorthand.
* _.every(users, 'active');
* // => false
*/
function every(collection, predicate, guard) {
var func = isArray(collection) ? arrayEvery : baseEvery;
if (guard && isIterateeCall(collection, predicate, guard)) {
predicate = undefined;
}
return func(collection, getIteratee(predicate, 3));
}
/**
* Iterates over elements of `collection`, returning an array of all elements
* `predicate` returns truthy for. The predicate is invoked with three
* arguments: (value, index|key, collection).
*
* **Note:** Unlike `_.remove`, this method returns a new array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
* @see _.reject
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': true },
* { 'user': 'fred', 'age': 40, 'active': false }
* ];
*
* _.filter(users, function(o) { return !o.active; });
* // => objects for ['fred']
*
* // The `_.matches` iteratee shorthand.
* _.filter(users, { 'age': 36, 'active': true });
* // => objects for ['barney']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.filter(users, ['active', false]);
* // => objects for ['fred']
*
* // The `_.property` iteratee shorthand.
* _.filter(users, 'active');
* // => objects for ['barney']
*
* // Combining several predicates using `_.overEvery` or `_.overSome`.
* _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
* // => objects for ['fred', 'barney']
*/
function filter(collection, predicate) {
var func = isArray(collection) ? arrayFilter : baseFilter;
return func(collection, getIteratee(predicate, 3));
}
/**
* Iterates over elements of `collection`, returning the first element
* `predicate` returns truthy for. The predicate is invoked with three
* arguments: (value, index|key, collection).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param {number} [fromIndex=0] The index to search from.
* @returns {*} Returns the matched element, else `undefined`.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': true },
* { 'user': 'fred', 'age': 40, 'active': false },
* { 'user': 'pebbles', 'age': 1, 'active': true }
* ];
*
* _.find(users, function(o) { return o.age < 40; });
* // => object for 'barney'
*
* // The `_.matches` iteratee shorthand.
* _.find(users, { 'age': 1, 'active': true });
* // => object for 'pebbles'
*
* // The `_.matchesProperty` iteratee shorthand.
* _.find(users, ['active', false]);
* // => object for 'fred'
*
* // The `_.property` iteratee shorthand.
* _.find(users, 'active');
* // => object for 'barney'
*/
var find = createFind(findIndex);
/**
* This method is like `_.find` except that it iterates over elements of
* `collection` from right to left.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Collection
* @param {Array|Object} collection The collection to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param {number} [fromIndex=collection.length-1] The index to search from.
* @returns {*} Returns the matched element, else `undefined`.
* @example
*
* _.findLast([1, 2, 3, 4], function(n) {
* return n % 2 == 1;
* });
* // => 3
*/
var findLast = createFind(findLastIndex);
/**
* Creates a flattened array of values by running each element in `collection`
* thru `iteratee` and flattening the mapped results. The iteratee is invoked
* with three arguments: (value, index|key, collection).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new flattened array.
* @example
*
* function duplicate(n) {
* return [n, n];
* }
*
* _.flatMap([1, 2], duplicate);
* // => [1, 1, 2, 2]
*/
function flatMap(collection, iteratee) {
return baseFlatten(map(collection, iteratee), 1);
}
/**
* This method is like `_.flatMap` except that it recursively flattens the
* mapped results.
*
* @static
* @memberOf _
* @since 4.7.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new flattened array.
* @example
*
* function duplicate(n) {
* return [[[n, n]]];
* }
*
* _.flatMapDeep([1, 2], duplicate);
* // => [1, 1, 2, 2]
*/
function flatMapDeep(collection, iteratee) {
return baseFlatten(map(collection, iteratee), INFINITY);
}
/**
* This method is like `_.flatMap` except that it recursively flattens the
* mapped results up to `depth` times.
*
* @static
* @memberOf _
* @since 4.7.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @param {number} [depth=1] The maximum recursion depth.
* @returns {Array} Returns the new flattened array.
* @example
*
* function duplicate(n) {
* return [[[n, n]]];
* }
*
* _.flatMapDepth([1, 2], duplicate, 2);
* // => [[1, 1], [2, 2]]
*/
function flatMapDepth(collection, iteratee, depth) {
depth = depth === undefined ? 1 : toInteger(depth);
return baseFlatten(map(collection, iteratee), depth);
}
/**
* Iterates over elements of `collection` and invokes `iteratee` for each element.
* The iteratee is invoked with three arguments: (value, index|key, collection).
* Iteratee functions may exit iteration early by explicitly returning `false`.
*
* **Note:** As with other "Collections" methods, objects with a "length"
* property are iterated like arrays. To avoid this behavior use `_.forIn`
* or `_.forOwn` for object iteration.
*
* @static
* @memberOf _
* @since 0.1.0
* @alias each
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
* @see _.forEachRight
* @example
*
* _.forEach([1, 2], function(value) {
* console.log(value);
* });
* // => Logs `1` then `2`.
*
* _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
* console.log(key);
* });
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
*/
function forEach(collection, iteratee) {
var func = isArray(collection) ? arrayEach : baseEach;
return func(collection, getIteratee(iteratee, 3));
}
/**
* This method is like `_.forEach` except that it iterates over elements of
* `collection` from right to left.
*
* @static
* @memberOf _
* @since 2.0.0
* @alias eachRight
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
* @see _.forEach
* @example
*
* _.forEachRight([1, 2], function(value) {
* console.log(value);
* });
* // => Logs `2` then `1`.
*/
function forEachRight(collection, iteratee) {
var func = isArray(collection) ? arrayEachRight : baseEachRight;
return func(collection, getIteratee(iteratee, 3));
}
/**
* Creates an object composed of keys generated from the results of running
* each element of `collection` thru `iteratee`. The order of grouped values
* is determined by the order they occur in `collection`. The corresponding
* value of each key is an array of elements responsible for generating the
* key. The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
* @returns {Object} Returns the composed aggregate object.
* @example
*
* _.groupBy([6.1, 4.2, 6.3], Math.floor);
* // => { '4': [4.2], '6': [6.1, 6.3] }
*
* // The `_.property` iteratee shorthand.
* _.groupBy(['one', 'two', 'three'], 'length');
* // => { '3': ['one', 'two'], '5': ['three'] }
*/
var groupBy = createAggregator(function(result, value, key) {
if (hasOwnProperty.call(result, key)) {
result[key].push(value);
} else {
baseAssignValue(result, key, [value]);
}
});
/**
* Checks if `value` is in `collection`. If `collection` is a string, it's
* checked for a substring of `value`, otherwise
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* is used for equality comparisons. If `fromIndex` is negative, it's used as
* the offset from the end of `collection`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object|string} collection The collection to inspect.
* @param {*} value The value to search for.
* @param {number} [fromIndex=0] The index to search from.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
* @returns {boolean} Returns `true` if `value` is found, else `false`.
* @example
*
* _.includes([1, 2, 3], 1);
* // => true
*
* _.includes([1, 2, 3], 1, 2);
* // => false
*
* _.includes({ 'a': 1, 'b': 2 }, 1);
* // => true
*
* _.includes('abcd', 'bc');
* // => true
*/
function includes(collection, value, fromIndex, guard) {
collection = isArrayLike(collection) ? collection : values(collection);
fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
var length = collection.length;
if (fromIndex < 0) {
fromIndex = nativeMax(length + fromIndex, 0);
}
return isString(collection)
? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
: (!!length && baseIndexOf(collection, value, fromIndex) > -1);
}
/**
* Invokes the method at `path` of each element in `collection`, returning
* an array of the results of each invoked method. Any additional arguments
* are provided to each invoked method. If `path` is a function, it's invoked
* for, and `this` bound to, each element in `collection`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Array|Function|string} path The path of the method to invoke or
* the function invoked per iteration.
* @param {...*} [args] The arguments to invoke each method with.
* @returns {Array} Returns the array of results.
* @example
*
* _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
* // => [[1, 5, 7], [1, 2, 3]]
*
* _.invokeMap([123, 456], String.prototype.split, '');
* // => [['1', '2', '3'], ['4', '5', '6']]
*/
var invokeMap = baseRest(function(collection, path, args) {
var index = -1,
isFunc = typeof path == 'function',
result = isArrayLike(collection) ? Array(collection.length) : [];
baseEach(collection, function(value) {
result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
});
return result;
});
/**
* Creates an object composed of keys generated from the results of running
* each element of `collection` thru `iteratee`. The corresponding value of
* each key is the last element responsible for generating the key. The
* iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
* @returns {Object} Returns the composed aggregate object.
* @example
*
* var array = [
* { 'dir': 'left', 'code': 97 },
* { 'dir': 'right', 'code': 100 }
* ];
*
* _.keyBy(array, function(o) {
* return String.fromCharCode(o.code);
* });
* // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
*
* _.keyBy(array, 'dir');
* // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
*/
var keyBy = createAggregator(function(result, value, key) {
baseAssignValue(result, key, value);
});
/**
* Creates an array of values by running each element in `collection` thru
* `iteratee`. The iteratee is invoked with three arguments:
* (value, index|key, collection).
*
* Many lodash methods are guarded to work as iteratees for methods like
* `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
*
* The guarded methods are:
* `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
* `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
* `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
* `template`, `trim`, `trimEnd`, `trimStart`, and `words`
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
* @example
*
* function square(n) {
* return n * n;
* }
*
* _.map([4, 8], square);
* // => [16, 64]
*
* _.map({ 'a': 4, 'b': 8 }, square);
* // => [16, 64] (iteration order is not guaranteed)
*
* var users = [
* { 'user': 'barney' },
* { 'user': 'fred' }
* ];
*
* // The `_.property` iteratee shorthand.
* _.map(users, 'user');
* // => ['barney', 'fred']
*/
function map(collection, iteratee) {
var func = isArray(collection) ? arrayMap : baseMap;
return func(collection, getIteratee(iteratee, 3));
}
/**
* This method is like `_.sortBy` except that it allows specifying the sort
* orders of the iteratees to sort by. If `orders` is unspecified, all values
* are sorted in ascending order. Otherwise, specify an order of "desc" for
* descending or "asc" for ascending sort order of corresponding values.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
* The iteratees to sort by.
* @param {string[]} [orders] The sort orders of `iteratees`.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
* @returns {Array} Returns the new sorted array.
* @example
*
* var users = [
* { 'user': 'fred', 'age': 48 },
* { 'user': 'barney', 'age': 34 },
* { 'user': 'fred', 'age': 40 },
* { 'user': 'barney', 'age': 36 }
* ];
*
* // Sort by `user` in ascending order and by `age` in descending order.
* _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
*/
function orderBy(collection, iteratees, orders, guard) {
if (collection == null) {
return [];
}
if (!isArray(iteratees)) {
iteratees = iteratees == null ? [] : [iteratees];
}
orders = guard ? undefined : orders;
if (!isArray(orders)) {
orders = orders == null ? [] : [orders];
}
return baseOrderBy(collection, iteratees, orders);
}
/**
* Creates an array of elements split into two groups, the first of which
* contains elements `predicate` returns truthy for, the second of which
* contains elements `predicate` returns falsey for. The predicate is
* invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 3.0.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the array of grouped elements.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': false },
* { 'user': 'fred', 'age': 40, 'active': true },
* { 'user': 'pebbles', 'age': 1, 'active': false }
* ];
*
* _.partition(users, function(o) { return o.active; });
* // => objects for [['fred'], ['barney', 'pebbles']]
*
* // The `_.matches` iteratee shorthand.
* _.partition(users, { 'age': 1, 'active': false });
* // => objects for [['pebbles'], ['barney', 'fred']]
*
* // The `_.matchesProperty` iteratee shorthand.
* _.partition(users, ['active', false]);
* // => objects for [['barney', 'pebbles'], ['fred']]
*
* // The `_.property` iteratee shorthand.
* _.partition(users, 'active');
* // => objects for [['fred'], ['barney', 'pebbles']]
*/
var partition = createAggregator(function(result, value, key) {
result[key ? 0 : 1].push(value);
}, function() { return [[], []]; });
/**
* Reduces `collection` to a value which is the accumulated result of running
* each element in `collection` thru `iteratee`, where each successive
* invocation is supplied the return value of the previous. If `accumulator`
* is not given, the first element of `collection` is used as the initial
* value. The iteratee is invoked with four arguments:
* (accumulator, value, index|key, collection).
*
* Many lodash methods are guarded to work as iteratees for methods like
* `_.reduce`, `_.reduceRight`, and `_.transform`.
*
* The guarded methods are:
* `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
* and `sortBy`
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @returns {*} Returns the accumulated value.
* @see _.reduceRight
* @example
*
* _.reduce([1, 2], function(sum, n) {
* return sum + n;
* }, 0);
* // => 3
*
* _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
* (result[value] || (result[value] = [])).push(key);
* return result;
* }, {});
* // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
*/
function reduce(collection, iteratee, accumulator) {
var func = isArray(collection) ? arrayReduce : baseReduce,
initAccum = arguments.length < 3;
return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
}
/**
* This method is like `_.reduce` except that it iterates over elements of
* `collection` from right to left.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @returns {*} Returns the accumulated value.
* @see _.reduce
* @example
*
* var array = [[0, 1], [2, 3], [4, 5]];
*
* _.reduceRight(array, function(flattened, other) {
* return flattened.concat(other);
* }, []);
* // => [4, 5, 2, 3, 0, 1]
*/
function reduceRight(collection, iteratee, accumulator) {
var func = isArray(collection) ? arrayReduceRight : baseReduce,
initAccum = arguments.length < 3;
return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
}
/**
* The opposite of `_.filter`; this method returns the elements of `collection`
* that `predicate` does **not** return truthy for.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
* @see _.filter
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': false },
* { 'user': 'fred', 'age': 40, 'active': true }
* ];
*
* _.reject(users, function(o) { return !o.active; });
* // => objects for ['fred']
*
* // The `_.matches` iteratee shorthand.
* _.reject(users, { 'age': 40, 'active': true });
* // => objects for ['barney']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.reject(users, ['active', false]);
* // => objects for ['fred']
*
* // The `_.property` iteratee shorthand.
* _.reject(users, 'active');
* // => objects for ['barney']
*/
function reject(collection, predicate) {
var func = isArray(collection) ? arrayFilter : baseFilter;
return func(collection, negate(getIteratee(predicate, 3)));
}
/**
* Gets a random element from `collection`.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Collection
* @param {Array|Object} collection The collection to sample.
* @returns {*} Returns the random element.
* @example
*
* _.sample([1, 2, 3, 4]);
* // => 2
*/
function sample(collection) {
var func = isArray(collection) ? arraySample : baseSample;
return func(collection);
}
/**
* Gets `n` random elements at unique keys from `collection` up to the
* size of `collection`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Collection
* @param {Array|Object} collection The collection to sample.
* @param {number} [n=1] The number of elements to sample.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the random elements.
* @example
*
* _.sampleSize([1, 2, 3], 2);
* // => [3, 1]
*
* _.sampleSize([1, 2, 3], 4);
* // => [2, 3, 1]
*/
function sampleSize(collection, n, guard) {
if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
n = 1;
} else {
n = toInteger(n);
}
var func = isArray(collection) ? arraySampleSize : baseSampleSize;
return func(collection, n);
}
/**
* Creates an array of shuffled values, using a version of the
* [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to shuffle.
* @returns {Array} Returns the new shuffled array.
* @example
*
* _.shuffle([1, 2, 3, 4]);
* // => [4, 1, 3, 2]
*/
function shuffle(collection) {
var func = isArray(collection) ? arrayShuffle : baseShuffle;
return func(collection);
}
/**
* Gets the size of `collection` by returning its length for array-like
* values or the number of own enumerable string keyed properties for objects.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object|string} collection The collection to inspect.
* @returns {number} Returns the collection size.
* @example
*
* _.size([1, 2, 3]);
* // => 3
*
* _.size({ 'a': 1, 'b': 2 });
* // => 2
*
* _.size('pebbles');
* // => 7
*/
function size(collection) {
if (collection == null) {
return 0;
}
if (isArrayLike(collection)) {
return isString(collection) ? stringSize(collection) : collection.length;
}
var tag = getTag(collection);
if (tag == mapTag || tag == setTag) {
return collection.size;
}
return baseKeys(collection).length;
}
/**
* Checks if `predicate` returns truthy for **any** element of `collection`.
* Iteration is stopped once `predicate` returns truthy. The predicate is
* invoked with three arguments: (value, index|key, collection).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {boolean} Returns `true` if any element passes the predicate check,
* else `false`.
* @example
*
* _.some([null, 0, 'yes', false], Boolean);
* // => true
*
* var users = [
* { 'user': 'barney', 'active': true },
* { 'user': 'fred', 'active': false }
* ];
*
* // The `_.matches` iteratee shorthand.
* _.some(users, { 'user': 'barney', 'active': false });
* // => false
*
* // The `_.matchesProperty` iteratee shorthand.
* _.some(users, ['active', false]);
* // => true
*
* // The `_.property` iteratee shorthand.
* _.some(users, 'active');
* // => true
*/
function some(collection, predicate, guard) {
var func = isArray(collection) ? arraySome : baseSome;
if (guard && isIterateeCall(collection, predicate, guard)) {
predicate = undefined;
}
return func(collection, getIteratee(predicate, 3));
}
/**
* Creates an array of elements, sorted in ascending order by the results of
* running each element in a collection thru each iteratee. This method
* performs a stable sort, that is, it preserves the original sort order of
* equal elements. The iteratees are invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {...(Function|Function[])} [iteratees=[_.identity]]
* The iteratees to sort by.
* @returns {Array} Returns the new sorted array.
* @example
*
* var users = [
* { 'user': 'fred', 'age': 48 },
* { 'user': 'barney', 'age': 36 },
* { 'user': 'fred', 'age': 30 },
* { 'user': 'barney', 'age': 34 }
* ];
*
* _.sortBy(users, [function(o) { return o.user; }]);
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
*
* _.sortBy(users, ['user', 'age']);
* // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
*/
var sortBy = baseRest(function(collection, iteratees) {
if (collection == null) {
return [];
}
var length = iteratees.length;
if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
iteratees = [];
} else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
iteratees = [iteratees[0]];
}
return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
});
/*------------------------------------------------------------------------*/
/**
* Gets the timestamp of the number of milliseconds that have elapsed since
* the Unix epoch (1 January 1970 00:00:00 UTC).
*
* @static
* @memberOf _
* @since 2.4.0
* @category Date
* @returns {number} Returns the timestamp.
* @example
*
* _.defer(function(stamp) {
* console.log(_.now() - stamp);
* }, _.now());
* // => Logs the number of milliseconds it took for the deferred invocation.
*/
var now = ctxNow || function() {
return root.Date.now();
};
/*------------------------------------------------------------------------*/
/**
* The opposite of `_.before`; this method creates a function that invokes
* `func` once it's called `n` or more times.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {number} n The number of calls before `func` is invoked.
* @param {Function} func The function to restrict.
* @returns {Function} Returns the new restricted function.
* @example
*
* var saves = ['profile', 'settings'];
*
* var done = _.after(saves.length, function() {
* console.log('done saving!');
* });
*
* _.forEach(saves, function(type) {
* asyncSave({ 'type': type, 'complete': done });
* });
* // => Logs 'done saving!' after the two async saves have completed.
*/
function after(n, func) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
n = toInteger(n);
return function() {
if (--n < 1) {
return func.apply(this, arguments);
}
};
}
/**
* Creates a function that invokes `func`, with up to `n` arguments,
* ignoring any additional arguments.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Function
* @param {Function} func The function to cap arguments for.
* @param {number} [n=func.length] The arity cap.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Function} Returns the new capped function.
* @example
*
* _.map(['6', '8', '10'], _.ary(parseInt, 1));
* // => [6, 8, 10]
*/
function ary(func, n, guard) {
n = guard ? undefined : n;
n = (func && n == null) ? func.length : n;
return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
}
/**
* Creates a function that invokes `func`, with the `this` binding and arguments
* of the created function, while it's called less than `n` times. Subsequent
* calls to the created function return the result of the last `func` invocation.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Function
* @param {number} n The number of calls at which `func` is no longer invoked.
* @param {Function} func The function to restrict.
* @returns {Function} Returns the new restricted function.
* @example
*
* jQuery(element).on('click', _.before(5, addContactToList));
* // => Allows adding up to 4 contacts to the list.
*/
function before(n, func) {
var result;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
n = toInteger(n);
return function() {
if (--n > 0) {
result = func.apply(this, arguments);
}
if (n <= 1) {
func = undefined;
}
return result;
};
}
/**
* Creates a function that invokes `func` with the `this` binding of `thisArg`
* and `partials` prepended to the arguments it receives.
*
* The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
* may be used as a placeholder for partially applied arguments.
*
* **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
* property of bound functions.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to bind.
* @param {*} thisArg The `this` binding of `func`.
* @param {...*} [partials] The arguments to be partially applied.
* @returns {Function} Returns the new bound function.
* @example
*
* function greet(greeting, punctuation) {
* return greeting + ' ' + this.user + punctuation;
* }
*
* var object = { 'user': 'fred' };
*
* var bound = _.bind(greet, object, 'hi');
* bound('!');
* // => 'hi fred!'
*
* // Bound with placeholders.
* var bound = _.bind(greet, object, _, '!');
* bound('hi');
* // => 'hi fred!'
*/
var bind = baseRest(function(func, thisArg, partials) {
var bitmask = WRAP_BIND_FLAG;
if (partials.length) {
var holders = replaceHolders(partials, getHolder(bind));
bitmask |= WRAP_PARTIAL_FLAG;
}
return createWrap(func, bitmask, thisArg, partials, holders);
});
/**
* Creates a function that invokes the method at `object[key]` with `partials`
* prepended to the arguments it receives.
*
* This method differs from `_.bind` by allowing bound functions to reference
* methods that may be redefined or don't yet exist. See
* [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
* for more details.
*
* The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
* builds, may be used as a placeholder for partially applied arguments.
*
* @static
* @memberOf _
* @since 0.10.0
* @category Function
* @param {Object} object The object to invoke the method on.
* @param {string} key The key of the method.
* @param {...*} [partials] The arguments to be partially applied.
* @returns {Function} Returns the new bound function.
* @example
*
* var object = {
* 'user': 'fred',
* 'greet': function(greeting, punctuation) {
* return greeting + ' ' + this.user + punctuation;
* }
* };
*
* var bound = _.bindKey(object, 'greet', 'hi');
* bound('!');
* // => 'hi fred!'
*
* object.greet = function(greeting, punctuation) {
* return greeting + 'ya ' + this.user + punctuation;
* };
*
* bound('!');
* // => 'hiya fred!'
*
* // Bound with placeholders.
* var bound = _.bindKey(object, 'greet', _, '!');
* bound('hi');
* // => 'hiya fred!'
*/
var bindKey = baseRest(function(object, key, partials) {
var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
if (partials.length) {
var holders = replaceHolders(partials, getHolder(bindKey));
bitmask |= WRAP_PARTIAL_FLAG;
}
return createWrap(key, bitmask, object, partials, holders);
});
/**
* Creates a function that accepts arguments of `func` and either invokes
* `func` returning its result, if at least `arity` number of arguments have
* been provided, or returns a function that accepts the remaining `func`
* arguments, and so on. The arity of `func` may be specified if `func.length`
* is not sufficient.
*
* The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
* may be used as a placeholder for provided arguments.
*
* **Note:** This method doesn't set the "length" property of curried functions.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Function
* @param {Function} func The function to curry.
* @param {number} [arity=func.length] The arity of `func`.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Function} Returns the new curried function.
* @example
*
* var abc = function(a, b, c) {
* return [a, b, c];
* };
*
* var curried = _.curry(abc);
*
* curried(1)(2)(3);
* // => [1, 2, 3]
*
* curried(1, 2)(3);
* // => [1, 2, 3]
*
* curried(1, 2, 3);
* // => [1, 2, 3]
*
* // Curried with placeholders.
* curried(1)(_, 3)(2);
* // => [1, 2, 3]
*/
function curry(func, arity, guard) {
arity = guard ? undefined : arity;
var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
result.placeholder = curry.placeholder;
return result;
}
/**
* This method is like `_.curry` except that arguments are applied to `func`
* in the manner of `_.partialRight` instead of `_.partial`.
*
* The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
* builds, may be used as a placeholder for provided arguments.
*
* **Note:** This method doesn't set the "length" property of curried functions.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Function
* @param {Function} func The function to curry.
* @param {number} [arity=func.length] The arity of `func`.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Function} Returns the new curried function.
* @example
*
* var abc = function(a, b, c) {
* return [a, b, c];
* };
*
* var curried = _.curryRight(abc);
*
* curried(3)(2)(1);
* // => [1, 2, 3]
*
* curried(2, 3)(1);
* // => [1, 2, 3]
*
* curried(1, 2, 3);
* // => [1, 2, 3]
*
* // Curried with placeholders.
* curried(3)(1, _)(2);
* // => [1, 2, 3]
*/
function curryRight(func, arity, guard) {
arity = guard ? undefined : arity;
var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
result.placeholder = curryRight.placeholder;
return result;
}
/**
* Creates a debounced function that delays invoking `func` until after `wait`
* milliseconds have elapsed since the last time the debounced function was
* invoked. The debounced function comes with a `cancel` method to cancel
* delayed `func` invocations and a `flush` method to immediately invoke them.
* Provide `options` to indicate whether `func` should be invoked on the
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
* with the last arguments provided to the debounced function. Subsequent
* calls to the debounced function return the result of the last `func`
* invocation.
*
* **Note:** If `leading` and `trailing` options are `true`, `func` is
* invoked on the trailing edge of the timeout only if the debounced function
* is invoked more than once during the `wait` timeout.
*
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
*
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
* for details over the differences between `_.debounce` and `_.throttle`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to debounce.
* @param {number} [wait=0] The number of milliseconds to delay.
* @param {Object} [options={}] The options object.
* @param {boolean} [options.leading=false]
* Specify invoking on the leading edge of the timeout.
* @param {number} [options.maxWait]
* The maximum time `func` is allowed to be delayed before it's invoked.
* @param {boolean} [options.trailing=true]
* Specify invoking on the trailing edge of the timeout.
* @returns {Function} Returns the new debounced function.
* @example
*
* // Avoid costly calculations while the window size is in flux.
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
*
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
* jQuery(element).on('click', _.debounce(sendMail, 300, {
* 'leading': true,
* 'trailing': false
* }));
*
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
* var source = new EventSource('/stream');
* jQuery(source).on('message', debounced);
*
* // Cancel the trailing debounced invocation.
* jQuery(window).on('popstate', debounced.cancel);
*/
function debounce(func, wait, options) {
var lastArgs,
lastThis,
maxWait,
result,
timerId,
lastCallTime,
lastInvokeTime = 0,
leading = false,
maxing = false,
trailing = true;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
wait = toNumber(wait) || 0;
if (isObject(options)) {
leading = !!options.leading;
maxing = 'maxWait' in options;
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
trailing = 'trailing' in options ? !!options.trailing : trailing;
}
function invokeFunc(time) {
var args = lastArgs,
thisArg = lastThis;
lastArgs = lastThis = undefined;
lastInvokeTime = time;
result = func.apply(thisArg, args);
return result;
}
function leadingEdge(time) {
// Reset any `maxWait` timer.
lastInvokeTime = time;
// Start the timer for the trailing edge.
timerId = setTimeout(timerExpired, wait);
// Invoke the leading edge.
return leading ? invokeFunc(time) : result;
}
function remainingWait(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime,
timeWaiting = wait - timeSinceLastCall;
return maxing
? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
: timeWaiting;
}
function shouldInvoke(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime;
// Either this is the first call, activity has stopped and we're at the
// trailing edge, the system time has gone backwards and we're treating
// it as the trailing edge, or we've hit the `maxWait` limit.
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
}
function timerExpired() {
var time = now();
if (shouldInvoke(time)) {
return trailingEdge(time);
}
// Restart the timer.
timerId = setTimeout(timerExpired, remainingWait(time));
}
function trailingEdge(time) {
timerId = undefined;
// Only invoke if we have `lastArgs` which means `func` has been
// debounced at least once.
if (trailing && lastArgs) {
return invokeFunc(time);
}
lastArgs = lastThis = undefined;
return result;
}
function cancel() {
if (timerId !== undefined) {
clearTimeout(timerId);
}
lastInvokeTime = 0;
lastArgs = lastCallTime = lastThis = timerId = undefined;
}
function flush() {
return timerId === undefined ? result : trailingEdge(now());
}
function debounced() {
var time = now(),
isInvoking = shouldInvoke(time);
lastArgs = arguments;
lastThis = this;
lastCallTime = time;
if (isInvoking) {
if (timerId === undefined) {
return leadingEdge(lastCallTime);
}
if (maxing) {
// Handle invocations in a tight loop.
clearTimeout(timerId);
timerId = setTimeout(timerExpired, wait);
return invokeFunc(lastCallTime);
}
}
if (timerId === undefined) {
timerId = setTimeout(timerExpired, wait);
}
return result;
}
debounced.cancel = cancel;
debounced.flush = flush;
return debounced;
}
/**
* Defers invoking the `func` until the current call stack has cleared. Any
* additional arguments are provided to `func` when it's invoked.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to defer.
* @param {...*} [args] The arguments to invoke `func` with.
* @returns {number} Returns the timer id.
* @example
*
* _.defer(function(text) {
* console.log(text);
* }, 'deferred');
* // => Logs 'deferred' after one millisecond.
*/
var defer = baseRest(function(func, args) {
return baseDelay(func, 1, args);
});
/**
* Invokes `func` after `wait` milliseconds. Any additional arguments are
* provided to `func` when it's invoked.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to delay.
* @param {number} wait The number of milliseconds to delay invocation.
* @param {...*} [args] The arguments to invoke `func` with.
* @returns {number} Returns the timer id.
* @example
*
* _.delay(function(text) {
* console.log(text);
* }, 1000, 'later');
* // => Logs 'later' after one second.
*/
var delay = baseRest(function(func, wait, args) {
return baseDelay(func, toNumber(wait) || 0, args);
});
/**
* Creates a function that invokes `func` with arguments reversed.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Function
* @param {Function} func The function to flip arguments for.
* @returns {Function} Returns the new flipped function.
* @example
*
* var flipped = _.flip(function() {
* return _.toArray(arguments);
* });
*
* flipped('a', 'b', 'c', 'd');
* // => ['d', 'c', 'b', 'a']
*/
function flip(func) {
return createWrap(func, WRAP_FLIP_FLAG);
}
/**
* Creates a function that memoizes the result of `func`. If `resolver` is
* provided, it determines the cache key for storing the result based on the
* arguments provided to the memoized function. By default, the first argument
* provided to the memoized function is used as the map cache key. The `func`
* is invoked with the `this` binding of the memoized function.
*
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to have its output memoized.
* @param {Function} [resolver] The function to resolve the cache key.
* @returns {Function} Returns the new memoized function.
* @example
*
* var object = { 'a': 1, 'b': 2 };
* var other = { 'c': 3, 'd': 4 };
*
* var values = _.memoize(_.values);
* values(object);
* // => [1, 2]
*
* values(other);
* // => [3, 4]
*
* object.a = 2;
* values(object);
* // => [1, 2]
*
* // Modify the result cache.
* values.cache.set(object, ['a', 'b']);
* values(object);
* // => ['a', 'b']
*
* // Replace `_.memoize.Cache`.
* _.memoize.Cache = WeakMap;
*/
function memoize(func, resolver) {
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function() {
var args = arguments,
key = resolver ? resolver.apply(this, args) : args[0],
cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result) || cache;
return result;
};
memoized.cache = new (memoize.Cache || MapCache);
return memoized;
}
// Expose `MapCache`.
memoize.Cache = MapCache;
/**
* Creates a function that negates the result of the predicate `func`. The
* `func` predicate is invoked with the `this` binding and arguments of the
* created function.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Function
* @param {Function} predicate The predicate to negate.
* @returns {Function} Returns the new negated function.
* @example
*
* function isEven(n) {
* return n % 2 == 0;
* }
*
* _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
* // => [1, 3, 5]
*/
function negate(predicate) {
if (typeof predicate != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
return function() {
var args = arguments;
switch (args.length) {
case 0: return !predicate.call(this);
case 1: return !predicate.call(this, args[0]);
case 2: return !predicate.call(this, args[0], args[1]);
case 3: return !predicate.call(this, args[0], args[1], args[2]);
}
return !predicate.apply(this, args);
};
}
/**
* Creates a function that is restricted to invoking `func` once. Repeat calls
* to the function return the value of the first invocation. The `func` is
* invoked with the `this` binding and arguments of the created function.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to restrict.
* @returns {Function} Returns the new restricted function.
* @example
*
* var initialize = _.once(createApplication);
* initialize();
* initialize();
* // => `createApplication` is invoked once
*/
function once(func) {
return before(2, func);
}
/**
* Creates a function that invokes `func` with its arguments transformed.
*
* @static
* @since 4.0.0
* @memberOf _
* @category Function
* @param {Function} func The function to wrap.
* @param {...(Function|Function[])} [transforms=[_.identity]]
* The argument transforms.
* @returns {Function} Returns the new function.
* @example
*
* function doubled(n) {
* return n * 2;
* }
*
* function square(n) {
* return n * n;
* }
*
* var func = _.overArgs(function(x, y) {
* return [x, y];
* }, [square, doubled]);
*
* func(9, 3);
* // => [81, 6]
*
* func(10, 5);
* // => [100, 10]
*/
var overArgs = castRest(function(func, transforms) {
transforms = (transforms.length == 1 && isArray(transforms[0]))
? arrayMap(transforms[0], baseUnary(getIteratee()))
: arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
var funcsLength = transforms.length;
return baseRest(function(args) {
var index = -1,
length = nativeMin(args.length, funcsLength);
while (++index < length) {
args[index] = transforms[index].call(this, args[index]);
}
return apply(func, this, args);
});
});
/**
* Creates a function that invokes `func` with `partials` prepended to the
* arguments it receives. This method is like `_.bind` except it does **not**
* alter the `this` binding.
*
* The `_.partial.placeholder` value, which defaults to `_` in monolithic
* builds, may be used as a placeholder for partially applied arguments.
*
* **Note:** This method doesn't set the "length" property of partially
* applied functions.
*
* @static
* @memberOf _
* @since 0.2.0
* @category Function
* @param {Function} func The function to partially apply arguments to.
* @param {...*} [partials] The arguments to be partially applied.
* @returns {Function} Returns the new partially applied function.
* @example
*
* function greet(greeting, name) {
* return greeting + ' ' + name;
* }
*
* var sayHelloTo = _.partial(greet, 'hello');
* sayHelloTo('fred');
* // => 'hello fred'
*
* // Partially applied with placeholders.
* var greetFred = _.partial(greet, _, 'fred');
* greetFred('hi');
* // => 'hi fred'
*/
var partial = baseRest(function(func, partials) {
var holders = replaceHolders(partials, getHolder(partial));
return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
});
/**
* This method is like `_.partial` except that partially applied arguments
* are appended to the arguments it receives.
*
* The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
* builds, may be used as a placeholder for partially applied arguments.
*
* **Note:** This method doesn't set the "length" property of partially
* applied functions.
*
* @static
* @memberOf _
* @since 1.0.0
* @category Function
* @param {Function} func The function to partially apply arguments to.
* @param {...*} [partials] The arguments to be partially applied.
* @returns {Function} Returns the new partially applied function.
* @example
*
* function greet(greeting, name) {
* return greeting + ' ' + name;
* }
*
* var greetFred = _.partialRight(greet, 'fred');
* greetFred('hi');
* // => 'hi fred'
*
* // Partially applied with placeholders.
* var sayHelloTo = _.partialRight(greet, 'hello', _);
* sayHelloTo('fred');
* // => 'hello fred'
*/
var partialRight = baseRest(function(func, partials) {
var holders = replaceHolders(partials, getHolder(partialRight));
return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
});
/**
* Creates a function that invokes `func` with arguments arranged according
* to the specified `indexes` where the argument value at the first index is
* provided as the first argument, the argument value at the second index is
* provided as the second argument, and so on.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Function
* @param {Function} func The function to rearrange arguments for.
* @param {...(number|number[])} indexes The arranged argument indexes.
* @returns {Function} Returns the new function.
* @example
*
* var rearged = _.rearg(function(a, b, c) {
* return [a, b, c];
* }, [2, 0, 1]);
*
* rearged('b', 'c', 'a')
* // => ['a', 'b', 'c']
*/
var rearg = flatRest(function(func, indexes) {
return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
});
/**
* Creates a function that invokes `func` with the `this` binding of the
* created function and arguments from `start` and beyond provided as
* an array.
*
* **Note:** This method is based on the
* [rest parameter](https://mdn.io/rest_parameters).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Function
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @returns {Function} Returns the new function.
* @example
*
* var say = _.rest(function(what, names) {
* return what + ' ' + _.initial(names).join(', ') +
* (_.size(names) > 1 ? ', & ' : '') + _.last(names);
* });
*
* say('hello', 'fred', 'barney', 'pebbles');
* // => 'hello fred, barney, & pebbles'
*/
function rest(func, start) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
start = start === undefined ? start : toInteger(start);
return baseRest(func, start);
}
/**
* Creates a function that invokes `func` with the `this` binding of the
* create function and an array of arguments much like
* [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
*
* **Note:** This method is based on the
* [spread operator](https://mdn.io/spread_operator).
*
* @static
* @memberOf _
* @since 3.2.0
* @category Function
* @param {Function} func The function to spread arguments over.
* @param {number} [start=0] The start position of the spread.
* @returns {Function} Returns the new function.
* @example
*
* var say = _.spread(function(who, what) {
* return who + ' says ' + what;
* });
*
* say(['fred', 'hello']);
* // => 'fred says hello'
*
* var numbers = Promise.all([
* Promise.resolve(40),
* Promise.resolve(36)
* ]);
*
* numbers.then(_.spread(function(x, y) {
* return x + y;
* }));
* // => a Promise of 76
*/
function spread(func, start) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
start = start == null ? 0 : nativeMax(toInteger(start), 0);
return baseRest(function(args) {
var array = args[start],
otherArgs = castSlice(args, 0, start);
if (array) {
arrayPush(otherArgs, array);
}
return apply(func, this, otherArgs);
});
}
/**
* Creates a throttled function that only invokes `func` at most once per
* every `wait` milliseconds. The throttled function comes with a `cancel`
* method to cancel delayed `func` invocations and a `flush` method to
* immediately invoke them. Provide `options` to indicate whether `func`
* should be invoked on the leading and/or trailing edge of the `wait`
* timeout. The `func` is invoked with the last arguments provided to the
* throttled function. Subsequent calls to the throttled function return the
* result of the last `func` invocation.
*
* **Note:** If `leading` and `trailing` options are `true`, `func` is
* invoked on the trailing edge of the timeout only if the throttled function
* is invoked more than once during the `wait` timeout.
*
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
*
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
* for details over the differences between `_.throttle` and `_.debounce`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to throttle.
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
* @param {Object} [options={}] The options object.
* @param {boolean} [options.leading=true]
* Specify invoking on the leading edge of the timeout.
* @param {boolean} [options.trailing=true]
* Specify invoking on the trailing edge of the timeout.
* @returns {Function} Returns the new throttled function.
* @example
*
* // Avoid excessively updating the position while scrolling.
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
*
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
* jQuery(element).on('click', throttled);
*
* // Cancel the trailing throttled invocation.
* jQuery(window).on('popstate', throttled.cancel);
*/
function throttle(func, wait, options) {
var leading = true,
trailing = true;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
if (isObject(options)) {
leading = 'leading' in options ? !!options.leading : leading;
trailing = 'trailing' in options ? !!options.trailing : trailing;
}
return debounce(func, wait, {
'leading': leading,
'maxWait': wait,
'trailing': trailing
});
}
/**
* Creates a function that accepts up to one argument, ignoring any
* additional arguments.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Function
* @param {Function} func The function to cap arguments for.
* @returns {Function} Returns the new capped function.
* @example
*
* _.map(['6', '8', '10'], _.unary(parseInt));
* // => [6, 8, 10]
*/
function unary(func) {
return ary(func, 1);
}
/**
* Creates a function that provides `value` to `wrapper` as its first
* argument. Any additional arguments provided to the function are appended
* to those provided to the `wrapper`. The wrapper is invoked with the `this`
* binding of the created function.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {*} value The value to wrap.
* @param {Function} [wrapper=identity] The wrapper function.
* @returns {Function} Returns the new function.
* @example
*
* var p = _.wrap(_.escape, function(func, text) {
* return '<p>' + func(text) + '</p>';
* });
*
* p('fred, barney, & pebbles');
* // => '<p>fred, barney, & pebbles</p>'
*/
function wrap(value, wrapper) {
return partial(castFunction(wrapper), value);
}
/*------------------------------------------------------------------------*/
/**
* Casts `value` as an array if it's not one.
*
* @static
* @memberOf _
* @since 4.4.0
* @category Lang
* @param {*} value The value to inspect.
* @returns {Array} Returns the cast array.
* @example
*
* _.castArray(1);
* // => [1]
*
* _.castArray({ 'a': 1 });
* // => [{ 'a': 1 }]
*
* _.castArray('abc');
* // => ['abc']
*
* _.castArray(null);
* // => [null]
*
* _.castArray(undefined);
* // => [undefined]
*
* _.castArray();
* // => []
*
* var array = [1, 2, 3];
* console.log(_.castArray(array) === array);
* // => true
*/
function castArray() {
if (!arguments.length) {
return [];
}
var value = arguments[0];
return isArray(value) ? value : [value];
}
/**
* Creates a shallow clone of `value`.
*
* **Note:** This method is loosely based on the
* [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
* and supports cloning arrays, array buffers, booleans, date objects, maps,
* numbers, `Object` objects, regexes, sets, strings, symbols, and typed
* arrays. The own enumerable properties of `arguments` objects are cloned
* as plain objects. An empty object is returned for uncloneable values such
* as error objects, functions, DOM nodes, and WeakMaps.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to clone.
* @returns {*} Returns the cloned value.
* @see _.cloneDeep
* @example
*
* var objects = [{ 'a': 1 }, { 'b': 2 }];
*
* var shallow = _.clone(objects);
* console.log(shallow[0] === objects[0]);
* // => true
*/
function clone(value) {
return baseClone(value, CLONE_SYMBOLS_FLAG);
}
/**
* This method is like `_.clone` except that it accepts `customizer` which
* is invoked to produce the cloned value. If `customizer` returns `undefined`,
* cloning is handled by the method instead. The `customizer` is invoked with
* up to four arguments; (value [, index|key, object, stack]).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to clone.
* @param {Function} [customizer] The function to customize cloning.
* @returns {*} Returns the cloned value.
* @see _.cloneDeepWith
* @example
*
* function customizer(value) {
* if (_.isElement(value)) {
* return value.cloneNode(false);
* }
* }
*
* var el = _.cloneWith(document.body, customizer);
*
* console.log(el === document.body);
* // => false
* console.log(el.nodeName);
* // => 'BODY'
* console.log(el.childNodes.length);
* // => 0
*/
function cloneWith(value, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
}
/**
* This method is like `_.clone` except that it recursively clones `value`.
*
* @static
* @memberOf _
* @since 1.0.0
* @category Lang
* @param {*} value The value to recursively clone.
* @returns {*} Returns the deep cloned value.
* @see _.clone
* @example
*
* var objects = [{ 'a': 1 }, { 'b': 2 }];
*
* var deep = _.cloneDeep(objects);
* console.log(deep[0] === objects[0]);
* // => false
*/
function cloneDeep(value) {
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
}
/**
* This method is like `_.cloneWith` except that it recursively clones `value`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to recursively clone.
* @param {Function} [customizer] The function to customize cloning.
* @returns {*} Returns the deep cloned value.
* @see _.cloneWith
* @example
*
* function customizer(value) {
* if (_.isElement(value)) {
* return value.cloneNode(true);
* }
* }
*
* var el = _.cloneDeepWith(document.body, customizer);
*
* console.log(el === document.body);
* // => false
* console.log(el.nodeName);
* // => 'BODY'
* console.log(el.childNodes.length);
* // => 20
*/
function cloneDeepWith(value, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
}
/**
* Checks if `object` conforms to `source` by invoking the predicate
* properties of `source` with the corresponding property values of `object`.
*
* **Note:** This method is equivalent to `_.conforms` when `source` is
* partially applied.
*
* @static
* @memberOf _
* @since 4.14.0
* @category Lang
* @param {Object} object The object to inspect.
* @param {Object} source The object of property predicates to conform to.
* @returns {boolean} Returns `true` if `object` conforms, else `false`.
* @example
*
* var object = { 'a': 1, 'b': 2 };
*
* _.conformsTo(object, { 'b': function(n) { return n > 1; } });
* // => true
*
* _.conformsTo(object, { 'b': function(n) { return n > 2; } });
* // => false
*/
function conformsTo(object, source) {
return source == null || baseConformsTo(object, source, keys(source));
}
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'a': 1 };
* var other = { 'a': 1 };
*
* _.eq(object, object);
* // => true
*
* _.eq(object, other);
* // => false
*
* _.eq('a', 'a');
* // => true
*
* _.eq('a', Object('a'));
* // => false
*
* _.eq(NaN, NaN);
* // => true
*/
function eq(value, other) {
return value === other || (value !== value && other !== other);
}
/**
* Checks if `value` is greater than `other`.
*
* @static
* @memberOf _
* @since 3.9.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is greater than `other`,
* else `false`.
* @see _.lt
* @example
*
* _.gt(3, 1);
* // => true
*
* _.gt(3, 3);
* // => false
*
* _.gt(1, 3);
* // => false
*/
var gt = createRelationalOperation(baseGt);
/**
* Checks if `value` is greater than or equal to `other`.
*
* @static
* @memberOf _
* @since 3.9.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is greater than or equal to
* `other`, else `false`.
* @see _.lte
* @example
*
* _.gte(3, 1);
* // => true
*
* _.gte(3, 3);
* // => true
*
* _.gte(1, 3);
* // => false
*/
var gte = createRelationalOperation(function(value, other) {
return value >= other;
});
/**
* Checks if `value` is likely an `arguments` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
* else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
!propertyIsEnumerable.call(value, 'callee');
};
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
/**
* Checks if `value` is classified as an `ArrayBuffer` object.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
* @example
*
* _.isArrayBuffer(new ArrayBuffer(2));
* // => true
*
* _.isArrayBuffer(new Array(2));
* // => false
*/
var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
/**
* Checks if `value` is array-like. A value is considered array-like if it's
* not a function and has a `value.length` that's an integer greater than or
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
* @example
*
* _.isArrayLike([1, 2, 3]);
* // => true
*
* _.isArrayLike(document.body.children);
* // => true
*
* _.isArrayLike('abc');
* // => true
*
* _.isArrayLike(_.noop);
* // => false
*/
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
/**
* This method is like `_.isArrayLike` except that it also checks if `value`
* is an object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array-like object,
* else `false`.
* @example
*
* _.isArrayLikeObject([1, 2, 3]);
* // => true
*
* _.isArrayLikeObject(document.body.children);
* // => true
*
* _.isArrayLikeObject('abc');
* // => false
*
* _.isArrayLikeObject(_.noop);
* // => false
*/
function isArrayLikeObject(value) {
return isObjectLike(value) && isArrayLike(value);
}
/**
* Checks if `value` is classified as a boolean primitive or object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
* @example
*
* _.isBoolean(false);
* // => true
*
* _.isBoolean(null);
* // => false
*/
function isBoolean(value) {
return value === true || value === false ||
(isObjectLike(value) && baseGetTag(value) == boolTag);
}
/**
* Checks if `value` is a buffer.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
* @example
*
* _.isBuffer(new Buffer(2));
* // => true
*
* _.isBuffer(new Uint8Array(2));
* // => false
*/
var isBuffer = nativeIsBuffer || stubFalse;
/**
* Checks if `value` is classified as a `Date` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a date object, else `false`.
* @example
*
* _.isDate(new Date);
* // => true
*
* _.isDate('Mon April 23 2012');
* // => false
*/
var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
/**
* Checks if `value` is likely a DOM element.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
* @example
*
* _.isElement(document.body);
* // => true
*
* _.isElement('<body>');
* // => false
*/
function isElement(value) {
return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
}
/**
* Checks if `value` is an empty object, collection, map, or set.
*
* Objects are considered empty if they have no own enumerable string keyed
* properties.
*
* Array-like values such as `arguments` objects, arrays, buffers, strings, or
* jQuery-like collections are considered empty if they have a `length` of `0`.
* Similarly, maps and sets are considered empty if they have a `size` of `0`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
* @example
*
* _.isEmpty(null);
* // => true
*
* _.isEmpty(true);
* // => true
*
* _.isEmpty(1);
* // => true
*
* _.isEmpty([1, 2, 3]);
* // => false
*
* _.isEmpty({ 'a': 1 });
* // => false
*/
function isEmpty(value) {
if (value == null) {
return true;
}
if (isArrayLike(value) &&
(isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
isBuffer(value) || isTypedArray(value) || isArguments(value))) {
return !value.length;
}
var tag = getTag(value);
if (tag == mapTag || tag == setTag) {
return !value.size;
}
if (isPrototype(value)) {
return !baseKeys(value).length;
}
for (var key in value) {
if (hasOwnProperty.call(value, key)) {
return false;
}
}
return true;
}
/**
* Performs a deep comparison between two values to determine if they are
* equivalent.
*
* **Note:** This method supports comparing arrays, array buffers, booleans,
* date objects, error objects, maps, numbers, `Object` objects, regexes,
* sets, strings, symbols, and typed arrays. `Object` objects are compared
* by their own, not inherited, enumerable properties. Functions and DOM
* nodes are compared by strict equality, i.e. `===`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'a': 1 };
* var other = { 'a': 1 };
*
* _.isEqual(object, other);
* // => true
*
* object === other;
* // => false
*/
function isEqual(value, other) {
return baseIsEqual(value, other);
}
/**
* This method is like `_.isEqual` except that it accepts `customizer` which
* is invoked to compare values. If `customizer` returns `undefined`, comparisons
* are handled by the method instead. The `customizer` is invoked with up to
* six arguments: (objValue, othValue [, index|key, object, other, stack]).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @param {Function} [customizer] The function to customize comparisons.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* function isGreeting(value) {
* return /^h(?:i|ello)$/.test(value);
* }
*
* function customizer(objValue, othValue) {
* if (isGreeting(objValue) && isGreeting(othValue)) {
* return true;
* }
* }
*
* var array = ['hello', 'goodbye'];
* var other = ['hi', 'goodbye'];
*
* _.isEqualWith(array, other, customizer);
* // => true
*/
function isEqualWith(value, other, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
var result = customizer ? customizer(value, other) : undefined;
return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
}
/**
* Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
* `SyntaxError`, `TypeError`, or `URIError` object.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an error object, else `false`.
* @example
*
* _.isError(new Error);
* // => true
*
* _.isError(Error);
* // => false
*/
function isError(value) {
if (!isObjectLike(value)) {
return false;
}
var tag = baseGetTag(value);
return tag == errorTag || tag == domExcTag ||
(typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
}
/**
* Checks if `value` is a finite primitive number.
*
* **Note:** This method is based on
* [`Number.isFinite`](https://mdn.io/Number/isFinite).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
* @example
*
* _.isFinite(3);
* // => true
*
* _.isFinite(Number.MIN_VALUE);
* // => true
*
* _.isFinite(Infinity);
* // => false
*
* _.isFinite('3');
* // => false
*/
function isFinite(value) {
return typeof value == 'number' && nativeIsFinite(value);
}
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value) {
if (!isObject(value)) {
return false;
}
// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 9 which returns 'object' for typed arrays and other constructors.
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
/**
* Checks if `value` is an integer.
*
* **Note:** This method is based on
* [`Number.isInteger`](https://mdn.io/Number/isInteger).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an integer, else `false`.
* @example
*
* _.isInteger(3);
* // => true
*
* _.isInteger(Number.MIN_VALUE);
* // => false
*
* _.isInteger(Infinity);
* // => false
*
* _.isInteger('3');
* // => false
*/
function isInteger(value) {
return typeof value == 'number' && value == toInteger(value);
}
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This method is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
* @example
*
* _.isLength(3);
* // => true
*
* _.isLength(Number.MIN_VALUE);
* // => false
*
* _.isLength(Infinity);
* // => false
*
* _.isLength('3');
* // => false
*/
function isLength(value) {
return typeof value == 'number' &&
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject(value) {
var type = typeof value;
return value != null && (type == 'object' || type == 'function');
}
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return value != null && typeof value == 'object';
}
/**
* Checks if `value` is classified as a `Map` object.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
* @example
*
* _.isMap(new Map);
* // => true
*
* _.isMap(new WeakMap);
* // => false
*/
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
/**
* Performs a partial deep comparison between `object` and `source` to
* determine if `object` contains equivalent property values.
*
* **Note:** This method is equivalent to `_.matches` when `source` is
* partially applied.
*
* Partial comparisons will match empty array and empty object `source`
* values against any array or object value, respectively. See `_.isEqual`
* for a list of supported value comparisons.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {Object} object The object to inspect.
* @param {Object} source The object of property values to match.
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
* @example
*
* var object = { 'a': 1, 'b': 2 };
*
* _.isMatch(object, { 'b': 2 });
* // => true
*
* _.isMatch(object, { 'b': 1 });
* // => false
*/
function isMatch(object, source) {
return object === source || baseIsMatch(object, source, getMatchData(source));
}
/**
* This method is like `_.isMatch` except that it accepts `customizer` which
* is invoked to compare values. If `customizer` returns `undefined`, comparisons
* are handled by the method instead. The `customizer` is invoked with five
* arguments: (objValue, srcValue, index|key, object, source).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {Object} object The object to inspect.
* @param {Object} source The object of property values to match.
* @param {Function} [customizer] The function to customize comparisons.
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
* @example
*
* function isGreeting(value) {
* return /^h(?:i|ello)$/.test(value);
* }
*
* function customizer(objValue, srcValue) {
* if (isGreeting(objValue) && isGreeting(srcValue)) {
* return true;
* }
* }
*
* var object = { 'greeting': 'hello' };
* var source = { 'greeting': 'hi' };
*
* _.isMatchWith(object, source, customizer);
* // => true
*/
function isMatchWith(object, source, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
return baseIsMatch(object, source, getMatchData(source), customizer);
}
/**
* Checks if `value` is `NaN`.
*
* **Note:** This method is based on
* [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
* global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
* `undefined` and other non-number values.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
* @example
*
* _.isNaN(NaN);
* // => true
*
* _.isNaN(new Number(NaN));
* // => true
*
* isNaN(undefined);
* // => true
*
* _.isNaN(undefined);
* // => false
*/
function isNaN(value) {
// An `NaN` primitive is the only value that is not equal to itself.
// Perform the `toStringTag` check first to avoid errors with some
// ActiveX objects in IE.
return isNumber(value) && value != +value;
}
/**
* Checks if `value` is a pristine native function.
*
* **Note:** This method can't reliably detect native functions in the presence
* of the core-js package because core-js circumvents this kind of detection.
* Despite multiple requests, the core-js maintainer has made it clear: any
* attempt to fix the detection will be obstructed. As a result, we're left
* with little choice but to throw an error. Unfortunately, this also affects
* packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
* which rely on core-js.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function,
* else `false`.
* @example
*
* _.isNative(Array.prototype.push);
* // => true
*
* _.isNative(_);
* // => false
*/
function isNative(value) {
if (isMaskable(value)) {
throw new Error(CORE_ERROR_TEXT);
}
return baseIsNative(value);
}
/**
* Checks if `value` is `null`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `null`, else `false`.
* @example
*
* _.isNull(null);
* // => true
*
* _.isNull(void 0);
* // => false
*/
function isNull(value) {
return value === null;
}
/**
* Checks if `value` is `null` or `undefined`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is nullish, else `false`.
* @example
*
* _.isNil(null);
* // => true
*
* _.isNil(void 0);
* // => true
*
* _.isNil(NaN);
* // => false
*/
function isNil(value) {
return value == null;
}
/**
* Checks if `value` is classified as a `Number` primitive or object.
*
* **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
* classified as numbers, use the `_.isFinite` method.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a number, else `false`.
* @example
*
* _.isNumber(3);
* // => true
*
* _.isNumber(Number.MIN_VALUE);
* // => true
*
* _.isNumber(Infinity);
* // => true
*
* _.isNumber('3');
* // => false
*/
function isNumber(value) {
return typeof value == 'number' ||
(isObjectLike(value) && baseGetTag(value) == numberTag);
}
/**
* Checks if `value` is a plain object, that is, an object created by the
* `Object` constructor or one with a `[[Prototype]]` of `null`.
*
* @static
* @memberOf _
* @since 0.8.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
* @example
*
* function Foo() {
* this.a = 1;
* }
*
* _.isPlainObject(new Foo);
* // => false
*
* _.isPlainObject([1, 2, 3]);
* // => false
*
* _.isPlainObject({ 'x': 0, 'y': 0 });
* // => true
*
* _.isPlainObject(Object.create(null));
* // => true
*/
function isPlainObject(value) {
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
return false;
}
var proto = getPrototype(value);
if (proto === null) {
return true;
}
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
funcToString.call(Ctor) == objectCtorString;
}
/**
* Checks if `value` is classified as a `RegExp` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
* @example
*
* _.isRegExp(/abc/);
* // => true
*
* _.isRegExp('/abc/');
* // => false
*/
var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
/**
* Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
* double precision number which isn't the result of a rounded unsafe integer.
*
* **Note:** This method is based on
* [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
* @example
*
* _.isSafeInteger(3);
* // => true
*
* _.isSafeInteger(Number.MIN_VALUE);
* // => false
*
* _.isSafeInteger(Infinity);
* // => false
*
* _.isSafeInteger('3');
* // => false
*/
function isSafeInteger(value) {
return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
}
/**
* Checks if `value` is classified as a `Set` object.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
* @example
*
* _.isSet(new Set);
* // => true
*
* _.isSet(new WeakSet);
* // => false
*/
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
/**
* Checks if `value` is classified as a `String` primitive or object.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
* @example
*
* _.isString('abc');
* // => true
*
* _.isString(1);
* // => false
*/
function isString(value) {
return typeof value == 'string' ||
(!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
}
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
* // => true
*
* _.isSymbol('abc');
* // => false
*/
function isSymbol(value) {
return typeof value == 'symbol' ||
(isObjectLike(value) && baseGetTag(value) == symbolTag);
}
/**
* Checks if `value` is classified as a typed array.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
* @example
*
* _.isTypedArray(new Uint8Array);
* // => true
*
* _.isTypedArray([]);
* // => false
*/
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
/**
* Checks if `value` is `undefined`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
* @example
*
* _.isUndefined(void 0);
* // => true
*
* _.isUndefined(null);
* // => false
*/
function isUndefined(value) {
return value === undefined;
}
/**
* Checks if `value` is classified as a `WeakMap` object.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
* @example
*
* _.isWeakMap(new WeakMap);
* // => true
*
* _.isWeakMap(new Map);
* // => false
*/
function isWeakMap(value) {
return isObjectLike(value) && getTag(value) == weakMapTag;
}
/**
* Checks if `value` is classified as a `WeakSet` object.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
* @example
*
* _.isWeakSet(new WeakSet);
* // => true
*
* _.isWeakSet(new Set);
* // => false
*/
function isWeakSet(value) {
return isObjectLike(value) && baseGetTag(value) == weakSetTag;
}
/**
* Checks if `value` is less than `other`.
*
* @static
* @memberOf _
* @since 3.9.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is less than `other`,
* else `false`.
* @see _.gt
* @example
*
* _.lt(1, 3);
* // => true
*
* _.lt(3, 3);
* // => false
*
* _.lt(3, 1);
* // => false
*/
var lt = createRelationalOperation(baseLt);
/**
* Checks if `value` is less than or equal to `other`.
*
* @static
* @memberOf _
* @since 3.9.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is less than or equal to
* `other`, else `false`.
* @see _.gte
* @example
*
* _.lte(1, 3);
* // => true
*
* _.lte(3, 3);
* // => true
*
* _.lte(3, 1);
* // => false
*/
var lte = createRelationalOperation(function(value, other) {
return value <= other;
});
/**
* Converts `value` to an array.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Lang
* @param {*} value The value to convert.
* @returns {Array} Returns the converted array.
* @example
*
* _.toArray({ 'a': 1, 'b': 2 });
* // => [1, 2]
*
* _.toArray('abc');
* // => ['a', 'b', 'c']
*
* _.toArray(1);
* // => []
*
* _.toArray(null);
* // => []
*/
function toArray(value) {
if (!value) {
return [];
}
if (isArrayLike(value)) {
return isString(value) ? stringToArray(value) : copyArray(value);
}
if (symIterator && value[symIterator]) {
return iteratorToArray(value[symIterator]());
}
var tag = getTag(value),
func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
return func(value);
}
/**
* Converts `value` to a finite number.
*
* @static
* @memberOf _
* @since 4.12.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted number.
* @example
*
* _.toFinite(3.2);
* // => 3.2
*
* _.toFinite(Number.MIN_VALUE);
* // => 5e-324
*
* _.toFinite(Infinity);
* // => 1.7976931348623157e+308
*
* _.toFinite('3.2');
* // => 3.2
*/
function toFinite(value) {
if (!value) {
return value === 0 ? value : 0;
}
value = toNumber(value);
if (value === INFINITY || value === -INFINITY) {
var sign = (value < 0 ? -1 : 1);
return sign * MAX_INTEGER;
}
return value === value ? value : 0;
}
/**
* Converts `value` to an integer.
*
* **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
* @example
*
* _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
* // => 0
*
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
* _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
var result = toFinite(value),
remainder = result % 1;
return result === result ? (remainder ? result - remainder : result) : 0;
}
/**
* Converts `value` to an integer suitable for use as the length of an
* array-like object.
*
* **Note:** This method is based on
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
* @example
*
* _.toLength(3.2);
* // => 3
*
* _.toLength(Number.MIN_VALUE);
* // => 0
*
* _.toLength(Infinity);
* // => 4294967295
*
* _.toLength('3.2');
* // => 3
*/
function toLength(value) {
return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
}
/**
* Converts `value` to a number.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
* @example
*
* _.toNumber(3.2);
* // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
*
* _.toNumber(Infinity);
* // => Infinity
*
* _.toNumber('3.2');
* // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
if (isObject(value)) {
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
}
if (typeof value != 'string') {
return value === 0 ? value : +value;
}
value = baseTrim(value);
var isBinary = reIsBinary.test(value);
return (isBinary || reIsOctal.test(value))
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
: (reIsBadHex.test(value) ? NAN : +value);
}
/**
* Converts `value` to a plain object flattening inherited enumerable string
* keyed properties of `value` to own properties of the plain object.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {Object} Returns the converted plain object.
* @example
*
* function Foo() {
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.assign({ 'a': 1 }, new Foo);
* // => { 'a': 1, 'b': 2 }
*
* _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
* // => { 'a': 1, 'b': 2, 'c': 3 }
*/
function toPlainObject(value) {
return copyObject(value, keysIn(value));
}
/**
* Converts `value` to a safe integer. A safe integer can be compared and
* represented correctly.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
* @example
*
* _.toSafeInteger(3.2);
* // => 3
*
* _.toSafeInteger(Number.MIN_VALUE);
* // => 0
*
* _.toSafeInteger(Infinity);
* // => 9007199254740991
*
* _.toSafeInteger('3.2');
* // => 3
*/
function toSafeInteger(value) {
return value
? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
: (value === 0 ? value : 0);
}
/**
* Converts `value` to a string. An empty string is returned for `null`
* and `undefined` values. The sign of `-0` is preserved.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
* @example
*
* _.toString(null);
* // => ''
*
* _.toString(-0);
* // => '-0'
*
* _.toString([1, 2, 3]);
* // => '1,2,3'
*/
function toString(value) {
return value == null ? '' : baseToString(value);
}
/*------------------------------------------------------------------------*/
/**
* Assigns own enumerable string keyed properties of source objects to the
* destination object. Source objects are applied from left to right.
* Subsequent sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object` and is loosely based on
* [`Object.assign`](https://mdn.io/Object/assign).
*
* @static
* @memberOf _
* @since 0.10.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @see _.assignIn
* @example
*
* function Foo() {
* this.a = 1;
* }
*
* function Bar() {
* this.c = 3;
* }
*
* Foo.prototype.b = 2;
* Bar.prototype.d = 4;
*
* _.assign({ 'a': 0 }, new Foo, new Bar);
* // => { 'a': 1, 'c': 3 }
*/
var assign = createAssigner(function(object, source) {
if (isPrototype(source) || isArrayLike(source)) {
copyObject(source, keys(source), object);
return;
}
for (var key in source) {
if (hasOwnProperty.call(source, key)) {
assignValue(object, key, source[key]);
}
}
});
/**
* This method is like `_.assign` except that it iterates over own and
* inherited source properties.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @alias extend
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @see _.assign
* @example
*
* function Foo() {
* this.a = 1;
* }
*
* function Bar() {
* this.c = 3;
* }
*
* Foo.prototype.b = 2;
* Bar.prototype.d = 4;
*
* _.assignIn({ 'a': 0 }, new Foo, new Bar);
* // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
*/
var assignIn = createAssigner(function(object, source) {
copyObject(source, keysIn(source), object);
});
/**
* This method is like `_.assignIn` except that it accepts `customizer`
* which is invoked to produce the assigned values. If `customizer` returns
* `undefined`, assignment is handled by the method instead. The `customizer`
* is invoked with five arguments: (objValue, srcValue, key, object, source).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @alias extendWith
* @category Object
* @param {Object} object The destination object.
* @param {...Object} sources The source objects.
* @param {Function} [customizer] The function to customize assigned values.
* @returns {Object} Returns `object`.
* @see _.assignWith
* @example
*
* function customizer(objValue, srcValue) {
* return _.isUndefined(objValue) ? srcValue : objValue;
* }
*
* var defaults = _.partialRight(_.assignInWith, customizer);
*
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
copyObject(source, keysIn(source), object, customizer);
});
/**
* This method is like `_.assign` except that it accepts `customizer`
* which is invoked to produce the assigned values. If `customizer` returns
* `undefined`, assignment is handled by the method instead. The `customizer`
* is invoked with five arguments: (objValue, srcValue, key, object, source).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} sources The source objects.
* @param {Function} [customizer] The function to customize assigned values.
* @returns {Object} Returns `object`.
* @see _.assignInWith
* @example
*
* function customizer(objValue, srcValue) {
* return _.isUndefined(objValue) ? srcValue : objValue;
* }
*
* var defaults = _.partialRight(_.assignWith, customizer);
*
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
copyObject(source, keys(source), object, customizer);
});
/**
* Creates an array of values corresponding to `paths` of `object`.
*
* @static
* @memberOf _
* @since 1.0.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {...(string|string[])} [paths] The property paths to pick.
* @returns {Array} Returns the picked values.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
*
* _.at(object, ['a[0].b.c', 'a[1]']);
* // => [3, 4]
*/
var at = flatRest(baseAt);
/**
* Creates an object that inherits from the `prototype` object. If a
* `properties` object is given, its own enumerable string keyed properties
* are assigned to the created object.
*
* @static
* @memberOf _
* @since 2.3.0
* @category Object
* @param {Object} prototype The object to inherit from.
* @param {Object} [properties] The properties to assign to the object.
* @returns {Object} Returns the new object.
* @example
*
* function Shape() {
* this.x = 0;
* this.y = 0;
* }
*
* function Circle() {
* Shape.call(this);
* }
*
* Circle.prototype = _.create(Shape.prototype, {
* 'constructor': Circle
* });
*
* var circle = new Circle;
* circle instanceof Circle;
* // => true
*
* circle instanceof Shape;
* // => true
*/
function create(prototype, properties) {
var result = baseCreate(prototype);
return properties == null ? result : baseAssign(result, properties);
}
/**
* Assigns own and inherited enumerable string keyed properties of source
* objects to the destination object for all destination properties that
* resolve to `undefined`. Source objects are applied from left to right.
* Once a property is set, additional values of the same property are ignored.
*
* **Note:** This method mutates `object`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @see _.defaultsDeep
* @example
*
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
var defaults = baseRest(function(object, sources) {
object = Object(object);
var index = -1;
var length = sources.length;
var guard = length > 2 ? sources[2] : undefined;
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
length = 1;
}
while (++index < length) {
var source = sources[index];
var props = keysIn(source);
var propsIndex = -1;
var propsLength = props.length;
while (++propsIndex < propsLength) {
var key = props[propsIndex];
var value = object[key];
if (value === undefined ||
(eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
object[key] = source[key];
}
}
}
return object;
});
/**
* This method is like `_.defaults` except that it recursively assigns
* default properties.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 3.10.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @see _.defaults
* @example
*
* _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
* // => { 'a': { 'b': 2, 'c': 3 } }
*/
var defaultsDeep = baseRest(function(args) {
args.push(undefined, customDefaultsMerge);
return apply(mergeWith, undefined, args);
});
/**
* This method is like `_.find` except that it returns the key of the first
* element `predicate` returns truthy for instead of the element itself.
*
* @static
* @memberOf _
* @since 1.1.0
* @category Object
* @param {Object} object The object to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {string|undefined} Returns the key of the matched element,
* else `undefined`.
* @example
*
* var users = {
* 'barney': { 'age': 36, 'active': true },
* 'fred': { 'age': 40, 'active': false },
* 'pebbles': { 'age': 1, 'active': true }
* };
*
* _.findKey(users, function(o) { return o.age < 40; });
* // => 'barney' (iteration order is not guaranteed)
*
* // The `_.matches` iteratee shorthand.
* _.findKey(users, { 'age': 1, 'active': true });
* // => 'pebbles'
*
* // The `_.matchesProperty` iteratee shorthand.
* _.findKey(users, ['active', false]);
* // => 'fred'
*
* // The `_.property` iteratee shorthand.
* _.findKey(users, 'active');
* // => 'barney'
*/
function findKey(object, predicate) {
return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
}
/**
* This method is like `_.findKey` except that it iterates over elements of
* a collection in the opposite order.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Object
* @param {Object} object The object to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {string|undefined} Returns the key of the matched element,
* else `undefined`.
* @example
*
* var users = {
* 'barney': { 'age': 36, 'active': true },
* 'fred': { 'age': 40, 'active': false },
* 'pebbles': { 'age': 1, 'active': true }
* };
*
* _.findLastKey(users, function(o) { return o.age < 40; });
* // => returns 'pebbles' assuming `_.findKey` returns 'barney'
*
* // The `_.matches` iteratee shorthand.
* _.findLastKey(users, { 'age': 36, 'active': true });
* // => 'barney'
*
* // The `_.matchesProperty` iteratee shorthand.
* _.findLastKey(users, ['active', false]);
* // => 'fred'
*
* // The `_.property` iteratee shorthand.
* _.findLastKey(users, 'active');
* // => 'pebbles'
*/
function findLastKey(object, predicate) {
return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
}
/**
* Iterates over own and inherited enumerable string keyed properties of an
* object and invokes `iteratee` for each property. The iteratee is invoked
* with three arguments: (value, key, object). Iteratee functions may exit
* iteration early by explicitly returning `false`.
*
* @static
* @memberOf _
* @since 0.3.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns `object`.
* @see _.forInRight
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.forIn(new Foo, function(value, key) {
* console.log(key);
* });
* // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
*/
function forIn(object, iteratee) {
return object == null
? object
: baseFor(object, getIteratee(iteratee, 3), keysIn);
}
/**
* This method is like `_.forIn` except that it iterates over properties of
* `object` in the opposite order.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns `object`.
* @see _.forIn
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.forInRight(new Foo, function(value, key) {
* console.log(key);
* });
* // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
*/
function forInRight(object, iteratee) {
return object == null
? object
: baseForRight(object, getIteratee(iteratee, 3), keysIn);
}
/**
* Iterates over own enumerable string keyed properties of an object and
* invokes `iteratee` for each property. The iteratee is invoked with three
* arguments: (value, key, object). Iteratee functions may exit iteration
* early by explicitly returning `false`.
*
* @static
* @memberOf _
* @since 0.3.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns `object`.
* @see _.forOwnRight
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.forOwn(new Foo, function(value, key) {
* console.log(key);
* });
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
*/
function forOwn(object, iteratee) {
return object && baseForOwn(object, getIteratee(iteratee, 3));
}
/**
* This method is like `_.forOwn` except that it iterates over properties of
* `object` in the opposite order.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns `object`.
* @see _.forOwn
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.forOwnRight(new Foo, function(value, key) {
* console.log(key);
* });
* // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
*/
function forOwnRight(object, iteratee) {
return object && baseForOwnRight(object, getIteratee(iteratee, 3));
}
/**
* Creates an array of function property names from own enumerable properties
* of `object`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to inspect.
* @returns {Array} Returns the function names.
* @see _.functionsIn
* @example
*
* function Foo() {
* this.a = _.constant('a');
* this.b = _.constant('b');
* }
*
* Foo.prototype.c = _.constant('c');
*
* _.functions(new Foo);
* // => ['a', 'b']
*/
function functions(object) {
return object == null ? [] : baseFunctions(object, keys(object));
}
/**
* Creates an array of function property names from own and inherited
* enumerable properties of `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to inspect.
* @returns {Array} Returns the function names.
* @see _.functions
* @example
*
* function Foo() {
* this.a = _.constant('a');
* this.b = _.constant('b');
* }
*
* Foo.prototype.c = _.constant('c');
*
* _.functionsIn(new Foo);
* // => ['a', 'b', 'c']
*/
function functionsIn(object) {
return object == null ? [] : baseFunctions(object, keysIn(object));
}
/**
* Gets the value at `path` of `object`. If the resolved value is
* `undefined`, the `defaultValue` is returned in its place.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
* @returns {*} Returns the resolved value.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
*
* _.get(object, 'a[0].b.c');
* // => 3
*
* _.get(object, ['a', '0', 'b', 'c']);
* // => 3
*
* _.get(object, 'a.b.c', 'default');
* // => 'default'
*/
function get(object, path, defaultValue) {
var result = object == null ? undefined : baseGet(object, path);
return result === undefined ? defaultValue : result;
}
/**
* Checks if `path` is a direct property of `object`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
* @example
*
* var object = { 'a': { 'b': 2 } };
* var other = _.create({ 'a': _.create({ 'b': 2 }) });
*
* _.has(object, 'a');
* // => true
*
* _.has(object, 'a.b');
* // => true
*
* _.has(object, ['a', 'b']);
* // => true
*
* _.has(other, 'a');
* // => false
*/
function has(object, path) {
return object != null && hasPath(object, path, baseHas);
}
/**
* Checks if `path` is a direct or inherited property of `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
* @example
*
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
*
* _.hasIn(object, 'a');
* // => true
*
* _.hasIn(object, 'a.b');
* // => true
*
* _.hasIn(object, ['a', 'b']);
* // => true
*
* _.hasIn(object, 'b');
* // => false
*/
function hasIn(object, path) {
return object != null && hasPath(object, path, baseHasIn);
}
/**
* Creates an object composed of the inverted keys and values of `object`.
* If `object` contains duplicate values, subsequent values overwrite
* property assignments of previous values.
*
* @static
* @memberOf _
* @since 0.7.0
* @category Object
* @param {Object} object The object to invert.
* @returns {Object} Returns the new inverted object.
* @example
*
* var object = { 'a': 1, 'b': 2, 'c': 1 };
*
* _.invert(object);
* // => { '1': 'c', '2': 'b' }
*/
var invert = createInverter(function(result, value, key) {
if (value != null &&
typeof value.toString != 'function') {
value = nativeObjectToString.call(value);
}
result[value] = key;
}, constant(identity));
/**
* This method is like `_.invert` except that the inverted object is generated
* from the results of running each element of `object` thru `iteratee`. The
* corresponding inverted value of each inverted key is an array of keys
* responsible for generating the inverted value. The iteratee is invoked
* with one argument: (value).
*
* @static
* @memberOf _
* @since 4.1.0
* @category Object
* @param {Object} object The object to invert.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Object} Returns the new inverted object.
* @example
*
* var object = { 'a': 1, 'b': 2, 'c': 1 };
*
* _.invertBy(object);
* // => { '1': ['a', 'c'], '2': ['b'] }
*
* _.invertBy(object, function(value) {
* return 'group' + value;
* });
* // => { 'group1': ['a', 'c'], 'group2': ['b'] }
*/
var invertBy = createInverter(function(result, value, key) {
if (value != null &&
typeof value.toString != 'function') {
value = nativeObjectToString.call(value);
}
if (hasOwnProperty.call(result, value)) {
result[value].push(key);
} else {
result[value] = [key];
}
}, getIteratee);
/**
* Invokes the method at `path` of `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path of the method to invoke.
* @param {...*} [args] The arguments to invoke the method with.
* @returns {*} Returns the result of the invoked method.
* @example
*
* var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
*
* _.invoke(object, 'a[0].b.c.slice', 1, 3);
* // => [2, 3]
*/
var invoke = baseRest(baseInvoke);
/**
* Creates an array of the own enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects. See the
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
* for more details.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keys(new Foo);
* // => ['a', 'b'] (iteration order is not guaranteed)
*
* _.keys('hi');
* // => ['0', '1']
*/
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
/**
* Creates an array of the own and inherited enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keysIn(new Foo);
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
*/
function keysIn(object) {
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
}
/**
* The opposite of `_.mapValues`; this method creates an object with the
* same values as `object` and keys generated by running each own enumerable
* string keyed property of `object` thru `iteratee`. The iteratee is invoked
* with three arguments: (value, key, object).
*
* @static
* @memberOf _
* @since 3.8.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns the new mapped object.
* @see _.mapValues
* @example
*
* _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
* return key + value;
* });
* // => { 'a1': 1, 'b2': 2 }
*/
function mapKeys(object, iteratee) {
var result = {};
iteratee = getIteratee(iteratee, 3);
baseForOwn(object, function(value, key, object) {
baseAssignValue(result, iteratee(value, key, object), value);
});
return result;
}
/**
* Creates an object with the same keys as `object` and values generated
* by running each own enumerable string keyed property of `object` thru
* `iteratee`. The iteratee is invoked with three arguments:
* (value, key, object).
*
* @static
* @memberOf _
* @since 2.4.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns the new mapped object.
* @see _.mapKeys
* @example
*
* var users = {
* 'fred': { 'user': 'fred', 'age': 40 },
* 'pebbles': { 'user': 'pebbles', 'age': 1 }
* };
*
* _.mapValues(users, function(o) { return o.age; });
* // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
*
* // The `_.property` iteratee shorthand.
* _.mapValues(users, 'age');
* // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
*/
function mapValues(object, iteratee) {
var result = {};
iteratee = getIteratee(iteratee, 3);
baseForOwn(object, function(value, key, object) {
baseAssignValue(result, key, iteratee(value, key, object));
});
return result;
}
/**
* This method is like `_.assign` except that it recursively merges own and
* inherited enumerable string keyed properties of source objects into the
* destination object. Source properties that resolve to `undefined` are
* skipped if a destination value exists. Array and plain object properties
* are merged recursively. Other objects and value types are overridden by
* assignment. Source objects are applied from left to right. Subsequent
* sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* var object = {
* 'a': [{ 'b': 2 }, { 'd': 4 }]
* };
*
* var other = {
* 'a': [{ 'c': 3 }, { 'e': 5 }]
* };
*
* _.merge(object, other);
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
*/
var merge = createAssigner(function(object, source, srcIndex) {
baseMerge(object, source, srcIndex);
});
/**
* This method is like `_.merge` except that it accepts `customizer` which
* is invoked to produce the merged values of the destination and source
* properties. If `customizer` returns `undefined`, merging is handled by the
* method instead. The `customizer` is invoked with six arguments:
* (objValue, srcValue, key, object, source, stack).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} sources The source objects.
* @param {Function} customizer The function to customize assigned values.
* @returns {Object} Returns `object`.
* @example
*
* function customizer(objValue, srcValue) {
* if (_.isArray(objValue)) {
* return objValue.concat(srcValue);
* }
* }
*
* var object = { 'a': [1], 'b': [2] };
* var other = { 'a': [3], 'b': [4] };
*
* _.mergeWith(object, other, customizer);
* // => { 'a': [1, 3], 'b': [2, 4] }
*/
var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
baseMerge(object, source, srcIndex, customizer);
});
/**
* The opposite of `_.pick`; this method creates an object composed of the
* own and inherited enumerable property paths of `object` that are not omitted.
*
* **Note:** This method is considerably slower than `_.pick`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The source object.
* @param {...(string|string[])} [paths] The property paths to omit.
* @returns {Object} Returns the new object.
* @example
*
* var object = { 'a': 1, 'b': '2', 'c': 3 };
*
* _.omit(object, ['a', 'c']);
* // => { 'b': '2' }
*/
var omit = flatRest(function(object, paths) {
var result = {};
if (object == null) {
return result;
}
var isDeep = false;
paths = arrayMap(paths, function(path) {
path = castPath(path, object);
isDeep || (isDeep = path.length > 1);
return path;
});
copyObject(object, getAllKeysIn(object), result);
if (isDeep) {
result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
}
var length = paths.length;
while (length--) {
baseUnset(result, paths[length]);
}
return result;
});
/**
* The opposite of `_.pickBy`; this method creates an object composed of
* the own and inherited enumerable string keyed properties of `object` that
* `predicate` doesn't return truthy for. The predicate is invoked with two
* arguments: (value, key).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The source object.
* @param {Function} [predicate=_.identity] The function invoked per property.
* @returns {Object} Returns the new object.
* @example
*
* var object = { 'a': 1, 'b': '2', 'c': 3 };
*
* _.omitBy(object, _.isNumber);
* // => { 'b': '2' }
*/
function omitBy(object, predicate) {
return pickBy(object, negate(getIteratee(predicate)));
}
/**
* Creates an object composed of the picked `object` properties.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The source object.
* @param {...(string|string[])} [paths] The property paths to pick.
* @returns {Object} Returns the new object.
* @example
*
* var object = { 'a': 1, 'b': '2', 'c': 3 };
*
* _.pick(object, ['a', 'c']);
* // => { 'a': 1, 'c': 3 }
*/
var pick = flatRest(function(object, paths) {
return object == null ? {} : basePick(object, paths);
});
/**
* Creates an object composed of the `object` properties `predicate` returns
* truthy for. The predicate is invoked with two arguments: (value, key).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The source object.
* @param {Function} [predicate=_.identity] The function invoked per property.
* @returns {Object} Returns the new object.
* @example
*
* var object = { 'a': 1, 'b': '2', 'c': 3 };
*
* _.pickBy(object, _.isNumber);
* // => { 'a': 1, 'c': 3 }
*/
function pickBy(object, predicate) {
if (object == null) {
return {};
}
var props = arrayMap(getAllKeysIn(object), function(prop) {
return [prop];
});
predicate = getIteratee(predicate);
return basePickBy(object, props, function(value, path) {
return predicate(value, path[0]);
});
}
/**
* This method is like `_.get` except that if the resolved value is a
* function it's invoked with the `this` binding of its parent object and
* its result is returned.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to resolve.
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
* @returns {*} Returns the resolved value.
* @example
*
* var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
*
* _.result(object, 'a[0].b.c1');
* // => 3
*
* _.result(object, 'a[0].b.c2');
* // => 4
*
* _.result(object, 'a[0].b.c3', 'default');
* // => 'default'
*
* _.result(object, 'a[0].b.c3', _.constant('default'));
* // => 'default'
*/
function result(object, path, defaultValue) {
path = castPath(path, object);
var index = -1,
length = path.length;
// Ensure the loop is entered when path is empty.
if (!length) {
length = 1;
object = undefined;
}
while (++index < length) {
var value = object == null ? undefined : object[toKey(path[index])];
if (value === undefined) {
index = length;
value = defaultValue;
}
object = isFunction(value) ? value.call(object) : value;
}
return object;
}
/**
* Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
* it's created. Arrays are created for missing index properties while objects
* are created for all other missing properties. Use `_.setWith` to customize
* `path` creation.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Object
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to set.
* @param {*} value The value to set.
* @returns {Object} Returns `object`.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
*
* _.set(object, 'a[0].b.c', 4);
* console.log(object.a[0].b.c);
* // => 4
*
* _.set(object, ['x', '0', 'y', 'z'], 5);
* console.log(object.x[0].y.z);
* // => 5
*/
function set(object, path, value) {
return object == null ? object : baseSet(object, path, value);
}
/**
* This method is like `_.set` except that it accepts `customizer` which is
* invoked to produce the objects of `path`. If `customizer` returns `undefined`
* path creation is handled by the method instead. The `customizer` is invoked
* with three arguments: (nsValue, key, nsObject).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to set.
* @param {*} value The value to set.
* @param {Function} [customizer] The function to customize assigned values.
* @returns {Object} Returns `object`.
* @example
*
* var object = {};
*
* _.setWith(object, '[0][1]', 'a', Object);
* // => { '0': { '1': 'a' } }
*/
function setWith(object, path, value, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
return object == null ? object : baseSet(object, path, value, customizer);
}
/**
* Creates an array of own enumerable string keyed-value pairs for `object`
* which can be consumed by `_.fromPairs`. If `object` is a map or set, its
* entries are returned.
*
* @static
* @memberOf _
* @since 4.0.0
* @alias entries
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the key-value pairs.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.toPairs(new Foo);
* // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
*/
var toPairs = createToPairs(keys);
/**
* Creates an array of own and inherited enumerable string keyed-value pairs
* for `object` which can be consumed by `_.fromPairs`. If `object` is a map
* or set, its entries are returned.
*
* @static
* @memberOf _
* @since 4.0.0
* @alias entriesIn
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the key-value pairs.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.toPairsIn(new Foo);
* // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
*/
var toPairsIn = createToPairs(keysIn);
/**
* An alternative to `_.reduce`; this method transforms `object` to a new
* `accumulator` object which is the result of running each of its own
* enumerable string keyed properties thru `iteratee`, with each invocation
* potentially mutating the `accumulator` object. If `accumulator` is not
* provided, a new object with the same `[[Prototype]]` will be used. The
* iteratee is invoked with four arguments: (accumulator, value, key, object).
* Iteratee functions may exit iteration early by explicitly returning `false`.
*
* @static
* @memberOf _
* @since 1.3.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @param {*} [accumulator] The custom accumulator value.
* @returns {*} Returns the accumulated value.
* @example
*
* _.transform([2, 3, 4], function(result, n) {
* result.push(n *= n);
* return n % 2 == 0;
* }, []);
* // => [4, 9]
*
* _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
* (result[value] || (result[value] = [])).push(key);
* }, {});
* // => { '1': ['a', 'c'], '2': ['b'] }
*/
function transform(object, iteratee, accumulator) {
var isArr = isArray(object),
isArrLike = isArr || isBuffer(object) || isTypedArray(object);
iteratee = getIteratee(iteratee, 4);
if (accumulator == null) {
var Ctor = object && object.constructor;
if (isArrLike) {
accumulator = isArr ? new Ctor : [];
}
else if (isObject(object)) {
accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
}
else {
accumulator = {};
}
}
(isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
return iteratee(accumulator, value, index, object);
});
return accumulator;
}
/**
* Removes the property at `path` of `object`.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to unset.
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 7 } }] };
* _.unset(object, 'a[0].b.c');
* // => true
*
* console.log(object);
* // => { 'a': [{ 'b': {} }] };
*
* _.unset(object, ['a', '0', 'b', 'c']);
* // => true
*
* console.log(object);
* // => { 'a': [{ 'b': {} }] };
*/
function unset(object, path) {
return object == null ? true : baseUnset(object, path);
}
/**
* This method is like `_.set` except that accepts `updater` to produce the
* value to set. Use `_.updateWith` to customize `path` creation. The `updater`
* is invoked with one argument: (value).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.6.0
* @category Object
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to set.
* @param {Function} updater The function to produce the updated value.
* @returns {Object} Returns `object`.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
*
* _.update(object, 'a[0].b.c', function(n) { return n * n; });
* console.log(object.a[0].b.c);
* // => 9
*
* _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
* console.log(object.x[0].y.z);
* // => 0
*/
function update(object, path, updater) {
return object == null ? object : baseUpdate(object, path, castFunction(updater));
}
/**
* This method is like `_.update` except that it accepts `customizer` which is
* invoked to produce the objects of `path`. If `customizer` returns `undefined`
* path creation is handled by the method instead. The `customizer` is invoked
* with three arguments: (nsValue, key, nsObject).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.6.0
* @category Object
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to set.
* @param {Function} updater The function to produce the updated value.
* @param {Function} [customizer] The function to customize assigned values.
* @returns {Object} Returns `object`.
* @example
*
* var object = {};
*
* _.updateWith(object, '[0][1]', _.constant('a'), Object);
* // => { '0': { '1': 'a' } }
*/
function updateWith(object, path, updater, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
}
/**
* Creates an array of the own enumerable string keyed property values of `object`.
*
* **Note:** Non-object values are coerced to objects.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property values.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.values(new Foo);
* // => [1, 2] (iteration order is not guaranteed)
*
* _.values('hi');
* // => ['h', 'i']
*/
function values(object) {
return object == null ? [] : baseValues(object, keys(object));
}
/**
* Creates an array of the own and inherited enumerable string keyed property
* values of `object`.
*
* **Note:** Non-object values are coerced to objects.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property values.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.valuesIn(new Foo);
* // => [1, 2, 3] (iteration order is not guaranteed)
*/
function valuesIn(object) {
return object == null ? [] : baseValues(object, keysIn(object));
}
/*------------------------------------------------------------------------*/
/**
* Clamps `number` within the inclusive `lower` and `upper` bounds.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Number
* @param {number} number The number to clamp.
* @param {number} [lower] The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the clamped number.
* @example
*
* _.clamp(-10, -5, 5);
* // => -5
*
* _.clamp(10, -5, 5);
* // => 5
*/
function clamp(number, lower, upper) {
if (upper === undefined) {
upper = lower;
lower = undefined;
}
if (upper !== undefined) {
upper = toNumber(upper);
upper = upper === upper ? upper : 0;
}
if (lower !== undefined) {
lower = toNumber(lower);
lower = lower === lower ? lower : 0;
}
return baseClamp(toNumber(number), lower, upper);
}
/**
* Checks if `n` is between `start` and up to, but not including, `end`. If
* `end` is not specified, it's set to `start` with `start` then set to `0`.
* If `start` is greater than `end` the params are swapped to support
* negative ranges.
*
* @static
* @memberOf _
* @since 3.3.0
* @category Number
* @param {number} number The number to check.
* @param {number} [start=0] The start of the range.
* @param {number} end The end of the range.
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
* @see _.range, _.rangeRight
* @example
*
* _.inRange(3, 2, 4);
* // => true
*
* _.inRange(4, 8);
* // => true
*
* _.inRange(4, 2);
* // => false
*
* _.inRange(2, 2);
* // => false
*
* _.inRange(1.2, 2);
* // => true
*
* _.inRange(5.2, 4);
* // => false
*
* _.inRange(-3, -2, -6);
* // => true
*/
function inRange(number, start, end) {
start = toFinite(start);
if (end === undefined) {
end = start;
start = 0;
} else {
end = toFinite(end);
}
number = toNumber(number);
return baseInRange(number, start, end);
}
/**
* Produces a random number between the inclusive `lower` and `upper` bounds.
* If only one argument is provided a number between `0` and the given number
* is returned. If `floating` is `true`, or either `lower` or `upper` are
* floats, a floating-point number is returned instead of an integer.
*
* **Note:** JavaScript follows the IEEE-754 standard for resolving
* floating-point values which can produce unexpected results.
*
* @static
* @memberOf _
* @since 0.7.0
* @category Number
* @param {number} [lower=0] The lower bound.
* @param {number} [upper=1] The upper bound.
* @param {boolean} [floating] Specify returning a floating-point number.
* @returns {number} Returns the random number.
* @example
*
* _.random(0, 5);
* // => an integer between 0 and 5
*
* _.random(5);
* // => also an integer between 0 and 5
*
* _.random(5, true);
* // => a floating-point number between 0 and 5
*
* _.random(1.2, 5.2);
* // => a floating-point number between 1.2 and 5.2
*/
function random(lower, upper, floating) {
if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
upper = floating = undefined;
}
if (floating === undefined) {
if (typeof upper == 'boolean') {
floating = upper;
upper = undefined;
}
else if (typeof lower == 'boolean') {
floating = lower;
lower = undefined;
}
}
if (lower === undefined && upper === undefined) {
lower = 0;
upper = 1;
}
else {
lower = toFinite(lower);
if (upper === undefined) {
upper = lower;
lower = 0;
} else {
upper = toFinite(upper);
}
}
if (lower > upper) {
var temp = lower;
lower = upper;
upper = temp;
}
if (floating || lower % 1 || upper % 1) {
var rand = nativeRandom();
return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
}
return baseRandom(lower, upper);
}
/*------------------------------------------------------------------------*/
/**
* Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the camel cased string.
* @example
*
* _.camelCase('Foo Bar');
* // => 'fooBar'
*
* _.camelCase('--foo-bar--');
* // => 'fooBar'
*
* _.camelCase('__FOO_BAR__');
* // => 'fooBar'
*/
var camelCase = createCompounder(function(result, word, index) {
word = word.toLowerCase();
return result + (index ? capitalize(word) : word);
});
/**
* Converts the first character of `string` to upper case and the remaining
* to lower case.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to capitalize.
* @returns {string} Returns the capitalized string.
* @example
*
* _.capitalize('FRED');
* // => 'Fred'
*/
function capitalize(string) {
return upperFirst(toString(string).toLowerCase());
}
/**
* Deburrs `string` by converting
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
* letters to basic Latin letters and removing
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to deburr.
* @returns {string} Returns the deburred string.
* @example
*
* _.deburr('déjà vu');
* // => 'deja vu'
*/
function deburr(string) {
string = toString(string);
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
}
/**
* Checks if `string` ends with the given target string.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to inspect.
* @param {string} [target] The string to search for.
* @param {number} [position=string.length] The position to search up to.
* @returns {boolean} Returns `true` if `string` ends with `target`,
* else `false`.
* @example
*
* _.endsWith('abc', 'c');
* // => true
*
* _.endsWith('abc', 'b');
* // => false
*
* _.endsWith('abc', 'b', 2);
* // => true
*/
function endsWith(string, target, position) {
string = toString(string);
target = baseToString(target);
var length = string.length;
position = position === undefined
? length
: baseClamp(toInteger(position), 0, length);
var end = position;
position -= target.length;
return position >= 0 && string.slice(position, end) == target;
}
/**
* Converts the characters "&", "<", ">", '"', and "'" in `string` to their
* corresponding HTML entities.
*
* **Note:** No other characters are escaped. To escape additional
* characters use a third-party library like [_he_](https://mths.be/he).
*
* Though the ">" character is escaped for symmetry, characters like
* ">" and "/" don't need escaping in HTML and have no special meaning
* unless they're part of a tag or unquoted attribute value. See
* [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
* (under "semi-related fun fact") for more details.
*
* When working with HTML you should always
* [quote attribute values](http://wonko.com/post/html-escaping) to reduce
* XSS vectors.
*
* @static
* @since 0.1.0
* @memberOf _
* @category String
* @param {string} [string=''] The string to escape.
* @returns {string} Returns the escaped string.
* @example
*
* _.escape('fred, barney, & pebbles');
* // => 'fred, barney, & pebbles'
*/
function escape(string) {
string = toString(string);
return (string && reHasUnescapedHtml.test(string))
? string.replace(reUnescapedHtml, escapeHtmlChar)
: string;
}
/**
* Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
* "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to escape.
* @returns {string} Returns the escaped string.
* @example
*
* _.escapeRegExp('[lodash](https://lodash.com/)');
* // => '\[lodash\]\(https://lodash\.com/\)'
*/
function escapeRegExp(string) {
string = toString(string);
return (string && reHasRegExpChar.test(string))
? string.replace(reRegExpChar, '\\$&')
: string;
}
/**
* Converts `string` to
* [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the kebab cased string.
* @example
*
* _.kebabCase('Foo Bar');
* // => 'foo-bar'
*
* _.kebabCase('fooBar');
* // => 'foo-bar'
*
* _.kebabCase('__FOO_BAR__');
* // => 'foo-bar'
*/
var kebabCase = createCompounder(function(result, word, index) {
return result + (index ? '-' : '') + word.toLowerCase();
});
/**
* Converts `string`, as space separated words, to lower case.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the lower cased string.
* @example
*
* _.lowerCase('--Foo-Bar--');
* // => 'foo bar'
*
* _.lowerCase('fooBar');
* // => 'foo bar'
*
* _.lowerCase('__FOO_BAR__');
* // => 'foo bar'
*/
var lowerCase = createCompounder(function(result, word, index) {
return result + (index ? ' ' : '') + word.toLowerCase();
});
/**
* Converts the first character of `string` to lower case.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the converted string.
* @example
*
* _.lowerFirst('Fred');
* // => 'fred'
*
* _.lowerFirst('FRED');
* // => 'fRED'
*/
var lowerFirst = createCaseFirst('toLowerCase');
/**
* Pads `string` on the left and right sides if it's shorter than `length`.
* Padding characters are truncated if they can't be evenly divided by `length`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to pad.
* @param {number} [length=0] The padding length.
* @param {string} [chars=' '] The string used as padding.
* @returns {string} Returns the padded string.
* @example
*
* _.pad('abc', 8);
* // => ' abc '
*
* _.pad('abc', 8, '_-');
* // => '_-abc_-_'
*
* _.pad('abc', 3);
* // => 'abc'
*/
function pad(string, length, chars) {
string = toString(string);
length = toInteger(length);
var strLength = length ? stringSize(string) : 0;
if (!length || strLength >= length) {
return string;
}
var mid = (length - strLength) / 2;
return (
createPadding(nativeFloor(mid), chars) +
string +
createPadding(nativeCeil(mid), chars)
);
}
/**
* Pads `string` on the right side if it's shorter than `length`. Padding
* characters are truncated if they exceed `length`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to pad.
* @param {number} [length=0] The padding length.
* @param {string} [chars=' '] The string used as padding.
* @returns {string} Returns the padded string.
* @example
*
* _.padEnd('abc', 6);
* // => 'abc '
*
* _.padEnd('abc', 6, '_-');
* // => 'abc_-_'
*
* _.padEnd('abc', 3);
* // => 'abc'
*/
function padEnd(string, length, chars) {
string = toString(string);
length = toInteger(length);
var strLength = length ? stringSize(string) : 0;
return (length && strLength < length)
? (string + createPadding(length - strLength, chars))
: string;
}
/**
* Pads `string` on the left side if it's shorter than `length`. Padding
* characters are truncated if they exceed `length`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to pad.
* @param {number} [length=0] The padding length.
* @param {string} [chars=' '] The string used as padding.
* @returns {string} Returns the padded string.
* @example
*
* _.padStart('abc', 6);
* // => ' abc'
*
* _.padStart('abc', 6, '_-');
* // => '_-_abc'
*
* _.padStart('abc', 3);
* // => 'abc'
*/
function padStart(string, length, chars) {
string = toString(string);
length = toInteger(length);
var strLength = length ? stringSize(string) : 0;
return (length && strLength < length)
? (createPadding(length - strLength, chars) + string)
: string;
}
/**
* Converts `string` to an integer of the specified radix. If `radix` is
* `undefined` or `0`, a `radix` of `10` is used unless `value` is a
* hexadecimal, in which case a `radix` of `16` is used.
*
* **Note:** This method aligns with the
* [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
*
* @static
* @memberOf _
* @since 1.1.0
* @category String
* @param {string} string The string to convert.
* @param {number} [radix=10] The radix to interpret `value` by.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {number} Returns the converted integer.
* @example
*
* _.parseInt('08');
* // => 8
*
* _.map(['6', '08', '10'], _.parseInt);
* // => [6, 8, 10]
*/
function parseInt(string, radix, guard) {
if (guard || radix == null) {
radix = 0;
} else if (radix) {
radix = +radix;
}
return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
}
/**
* Repeats the given string `n` times.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to repeat.
* @param {number} [n=1] The number of times to repeat the string.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {string} Returns the repeated string.
* @example
*
* _.repeat('*', 3);
* // => '***'
*
* _.repeat('abc', 2);
* // => 'abcabc'
*
* _.repeat('abc', 0);
* // => ''
*/
function repeat(string, n, guard) {
if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
n = 1;
} else {
n = toInteger(n);
}
return baseRepeat(toString(string), n);
}
/**
* Replaces matches for `pattern` in `string` with `replacement`.
*
* **Note:** This method is based on
* [`String#replace`](https://mdn.io/String/replace).
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to modify.
* @param {RegExp|string} pattern The pattern to replace.
* @param {Function|string} replacement The match replacement.
* @returns {string} Returns the modified string.
* @example
*
* _.replace('Hi Fred', 'Fred', 'Barney');
* // => 'Hi Barney'
*/
function replace() {
var args = arguments,
string = toString(args[0]);
return args.length < 3 ? string : string.replace(args[1], args[2]);
}
/**
* Converts `string` to
* [snake case](https://en.wikipedia.org/wiki/Snake_case).
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the snake cased string.
* @example
*
* _.snakeCase('Foo Bar');
* // => 'foo_bar'
*
* _.snakeCase('fooBar');
* // => 'foo_bar'
*
* _.snakeCase('--FOO-BAR--');
* // => 'foo_bar'
*/
var snakeCase = createCompounder(function(result, word, index) {
return result + (index ? '_' : '') + word.toLowerCase();
});
/**
* Splits `string` by `separator`.
*
* **Note:** This method is based on
* [`String#split`](https://mdn.io/String/split).
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to split.
* @param {RegExp|string} separator The separator pattern to split by.
* @param {number} [limit] The length to truncate results to.
* @returns {Array} Returns the string segments.
* @example
*
* _.split('a-b-c', '-', 2);
* // => ['a', 'b']
*/
function split(string, separator, limit) {
if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
separator = limit = undefined;
}
limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
if (!limit) {
return [];
}
string = toString(string);
if (string && (
typeof separator == 'string' ||
(separator != null && !isRegExp(separator))
)) {
separator = baseToString(separator);
if (!separator && hasUnicode(string)) {
return castSlice(stringToArray(string), 0, limit);
}
}
return string.split(separator, limit);
}
/**
* Converts `string` to
* [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
*
* @static
* @memberOf _
* @since 3.1.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the start cased string.
* @example
*
* _.startCase('--foo-bar--');
* // => 'Foo Bar'
*
* _.startCase('fooBar');
* // => 'Foo Bar'
*
* _.startCase('__FOO_BAR__');
* // => 'FOO BAR'
*/
var startCase = createCompounder(function(result, word, index) {
return result + (index ? ' ' : '') + upperFirst(word);
});
/**
* Checks if `string` starts with the given target string.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to inspect.
* @param {string} [target] The string to search for.
* @param {number} [position=0] The position to search from.
* @returns {boolean} Returns `true` if `string` starts with `target`,
* else `false`.
* @example
*
* _.startsWith('abc', 'a');
* // => true
*
* _.startsWith('abc', 'b');
* // => false
*
* _.startsWith('abc', 'b', 1);
* // => true
*/
function startsWith(string, target, position) {
string = toString(string);
position = position == null
? 0
: baseClamp(toInteger(position), 0, string.length);
target = baseToString(target);
return string.slice(position, position + target.length) == target;
}
/**
* Creates a compiled template function that can interpolate data properties
* in "interpolate" delimiters, HTML-escape interpolated data properties in
* "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
* properties may be accessed as free variables in the template. If a setting
* object is given, it takes precedence over `_.templateSettings` values.
*
* **Note:** In the development build `_.template` utilizes
* [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
* for easier debugging.
*
* For more information on precompiling templates see
* [lodash's custom builds documentation](https://lodash.com/custom-builds).
*
* For more information on Chrome extension sandboxes see
* [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
*
* @static
* @since 0.1.0
* @memberOf _
* @category String
* @param {string} [string=''] The template string.
* @param {Object} [options={}] The options object.
* @param {RegExp} [options.escape=_.templateSettings.escape]
* The HTML "escape" delimiter.
* @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
* The "evaluate" delimiter.
* @param {Object} [options.imports=_.templateSettings.imports]
* An object to import into the template as free variables.
* @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
* The "interpolate" delimiter.
* @param {string} [options.sourceURL='lodash.templateSources[n]']
* The sourceURL of the compiled template.
* @param {string} [options.variable='obj']
* The data object variable name.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Function} Returns the compiled template function.
* @example
*
* // Use the "interpolate" delimiter to create a compiled template.
* var compiled = _.template('hello <%= user %>!');
* compiled({ 'user': 'fred' });
* // => 'hello fred!'
*
* // Use the HTML "escape" delimiter to escape data property values.
* var compiled = _.template('<b><%- value %></b>');
* compiled({ 'value': '<script>' });
* // => '<b><script></b>'
*
* // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
* var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
* compiled({ 'users': ['fred', 'barney'] });
* // => '<li>fred</li><li>barney</li>'
*
* // Use the internal `print` function in "evaluate" delimiters.
* var compiled = _.template('<% print("hello " + user); %>!');
* compiled({ 'user': 'barney' });
* // => 'hello barney!'
*
* // Use the ES template literal delimiter as an "interpolate" delimiter.
* // Disable support by replacing the "interpolate" delimiter.
* var compiled = _.template('hello ${ user }!');
* compiled({ 'user': 'pebbles' });
* // => 'hello pebbles!'
*
* // Use backslashes to treat delimiters as plain text.
* var compiled = _.template('<%= "\\<%- value %\\>" %>');
* compiled({ 'value': 'ignored' });
* // => '<%- value %>'
*
* // Use the `imports` option to import `jQuery` as `jq`.
* var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
* var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
* compiled({ 'users': ['fred', 'barney'] });
* // => '<li>fred</li><li>barney</li>'
*
* // Use the `sourceURL` option to specify a custom sourceURL for the template.
* var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
* compiled(data);
* // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
*
* // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
* var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
* compiled.source;
* // => function(data) {
* // var __t, __p = '';
* // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
* // return __p;
* // }
*
* // Use custom template delimiters.
* _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
* var compiled = _.template('hello {{ user }}!');
* compiled({ 'user': 'mustache' });
* // => 'hello mustache!'
*
* // Use the `source` property to inline compiled templates for meaningful
* // line numbers in error messages and stack traces.
* fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
* var JST = {\
* "main": ' + _.template(mainText).source + '\
* };\
* ');
*/
function template(string, options, guard) {
// Based on John Resig's `tmpl` implementation
// (http://ejohn.org/blog/javascript-micro-templating/)
// and Laura Doktorova's doT.js (https://github.com/olado/doT).
var settings = lodash.templateSettings;
if (guard && isIterateeCall(string, options, guard)) {
options = undefined;
}
string = toString(string);
options = assignInWith({}, options, settings, customDefaultsAssignIn);
var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
importsKeys = keys(imports),
importsValues = baseValues(imports, importsKeys);
var isEscaping,
isEvaluating,
index = 0,
interpolate = options.interpolate || reNoMatch,
source = "__p += '";
// Compile the regexp to match each delimiter.
var reDelimiters = RegExp(
(options.escape || reNoMatch).source + '|' +
interpolate.source + '|' +
(interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
(options.evaluate || reNoMatch).source + '|$'
, 'g');
// Use a sourceURL for easier debugging.
// The sourceURL gets injected into the source that's eval-ed, so be careful
// to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
// and escape the comment, thus injecting code that gets evaled.
var sourceURL = '//# sourceURL=' +
(hasOwnProperty.call(options, 'sourceURL')
? (options.sourceURL + '').replace(/\s/g, ' ')
: ('lodash.templateSources[' + (++templateCounter) + ']')
) + '\n';
string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
interpolateValue || (interpolateValue = esTemplateValue);
// Escape characters that can't be included in string literals.
source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
// Replace delimiters with snippets.
if (escapeValue) {
isEscaping = true;
source += "' +\n__e(" + escapeValue + ") +\n'";
}
if (evaluateValue) {
isEvaluating = true;
source += "';\n" + evaluateValue + ";\n__p += '";
}
if (interpolateValue) {
source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
}
index = offset + match.length;
// The JS engine embedded in Adobe products needs `match` returned in
// order to produce the correct `offset` value.
return match;
});
source += "';\n";
// If `variable` is not specified wrap a with-statement around the generated
// code to add the data object to the top of the scope chain.
var variable = hasOwnProperty.call(options, 'variable') && options.variable;
if (!variable) {
source = 'with (obj) {\n' + source + '\n}\n';
}
// Throw an error if a forbidden character was found in `variable`, to prevent
// potential command injection attacks.
else if (reForbiddenIdentifierChars.test(variable)) {
throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
}
// Cleanup code by stripping empty strings.
source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
.replace(reEmptyStringMiddle, '$1')
.replace(reEmptyStringTrailing, '$1;');
// Frame code as the function body.
source = 'function(' + (variable || 'obj') + ') {\n' +
(variable
? ''
: 'obj || (obj = {});\n'
) +
"var __t, __p = ''" +
(isEscaping
? ', __e = _.escape'
: ''
) +
(isEvaluating
? ', __j = Array.prototype.join;\n' +
"function print() { __p += __j.call(arguments, '') }\n"
: ';\n'
) +
source +
'return __p\n}';
var result = attempt(function() {
return Function(importsKeys, sourceURL + 'return ' + source)
.apply(undefined, importsValues);
});
// Provide the compiled function's source by its `toString` method or
// the `source` property as a convenience for inlining compiled templates.
result.source = source;
if (isError(result)) {
throw result;
}
return result;
}
/**
* Converts `string`, as a whole, to lower case just like
* [String#toLowerCase](https://mdn.io/toLowerCase).
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the lower cased string.
* @example
*
* _.toLower('--Foo-Bar--');
* // => '--foo-bar--'
*
* _.toLower('fooBar');
* // => 'foobar'
*
* _.toLower('__FOO_BAR__');
* // => '__foo_bar__'
*/
function toLower(value) {
return toString(value).toLowerCase();
}
/**
* Converts `string`, as a whole, to upper case just like
* [String#toUpperCase](https://mdn.io/toUpperCase).
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the upper cased string.
* @example
*
* _.toUpper('--foo-bar--');
* // => '--FOO-BAR--'
*
* _.toUpper('fooBar');
* // => 'FOOBAR'
*
* _.toUpper('__foo_bar__');
* // => '__FOO_BAR__'
*/
function toUpper(value) {
return toString(value).toUpperCase();
}
/**
* Removes leading and trailing whitespace or specified characters from `string`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to trim.
* @param {string} [chars=whitespace] The characters to trim.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {string} Returns the trimmed string.
* @example
*
* _.trim(' abc ');
* // => 'abc'
*
* _.trim('-_-abc-_-', '_-');
* // => 'abc'
*
* _.map([' foo ', ' bar '], _.trim);
* // => ['foo', 'bar']
*/
function trim(string, chars, guard) {
string = toString(string);
if (string && (guard || chars === undefined)) {
return baseTrim(string);
}
if (!string || !(chars = baseToString(chars))) {
return string;
}
var strSymbols = stringToArray(string),
chrSymbols = stringToArray(chars),
start = charsStartIndex(strSymbols, chrSymbols),
end = charsEndIndex(strSymbols, chrSymbols) + 1;
return castSlice(strSymbols, start, end).join('');
}
/**
* Removes trailing whitespace or specified characters from `string`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to trim.
* @param {string} [chars=whitespace] The characters to trim.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {string} Returns the trimmed string.
* @example
*
* _.trimEnd(' abc ');
* // => ' abc'
*
* _.trimEnd('-_-abc-_-', '_-');
* // => '-_-abc'
*/
function trimEnd(string, chars, guard) {
string = toString(string);
if (string && (guard || chars === undefined)) {
return string.slice(0, trimmedEndIndex(string) + 1);
}
if (!string || !(chars = baseToString(chars))) {
return string;
}
var strSymbols = stringToArray(string),
end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
return castSlice(strSymbols, 0, end).join('');
}
/**
* Removes leading whitespace or specified characters from `string`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to trim.
* @param {string} [chars=whitespace] The characters to trim.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {string} Returns the trimmed string.
* @example
*
* _.trimStart(' abc ');
* // => 'abc '
*
* _.trimStart('-_-abc-_-', '_-');
* // => 'abc-_-'
*/
function trimStart(string, chars, guard) {
string = toString(string);
if (string && (guard || chars === undefined)) {
return string.replace(reTrimStart, '');
}
if (!string || !(chars = baseToString(chars))) {
return string;
}
var strSymbols = stringToArray(string),
start = charsStartIndex(strSymbols, stringToArray(chars));
return castSlice(strSymbols, start).join('');
}
/**
* Truncates `string` if it's longer than the given maximum string length.
* The last characters of the truncated string are replaced with the omission
* string which defaults to "...".
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to truncate.
* @param {Object} [options={}] The options object.
* @param {number} [options.length=30] The maximum string length.
* @param {string} [options.omission='...'] The string to indicate text is omitted.
* @param {RegExp|string} [options.separator] The separator pattern to truncate to.
* @returns {string} Returns the truncated string.
* @example
*
* _.truncate('hi-diddly-ho there, neighborino');
* // => 'hi-diddly-ho there, neighbo...'
*
* _.truncate('hi-diddly-ho there, neighborino', {
* 'length': 24,
* 'separator': ' '
* });
* // => 'hi-diddly-ho there,...'
*
* _.truncate('hi-diddly-ho there, neighborino', {
* 'length': 24,
* 'separator': /,? +/
* });
* // => 'hi-diddly-ho there...'
*
* _.truncate('hi-diddly-ho there, neighborino', {
* 'omission': ' [...]'
* });
* // => 'hi-diddly-ho there, neig [...]'
*/
function truncate(string, options) {
var length = DEFAULT_TRUNC_LENGTH,
omission = DEFAULT_TRUNC_OMISSION;
if (isObject(options)) {
var separator = 'separator' in options ? options.separator : separator;
length = 'length' in options ? toInteger(options.length) : length;
omission = 'omission' in options ? baseToString(options.omission) : omission;
}
string = toString(string);
var strLength = string.length;
if (hasUnicode(string)) {
var strSymbols = stringToArray(string);
strLength = strSymbols.length;
}
if (length >= strLength) {
return string;
}
var end = length - stringSize(omission);
if (end < 1) {
return omission;
}
var result = strSymbols
? castSlice(strSymbols, 0, end).join('')
: string.slice(0, end);
if (separator === undefined) {
return result + omission;
}
if (strSymbols) {
end += (result.length - end);
}
if (isRegExp(separator)) {
if (string.slice(end).search(separator)) {
var match,
substring = result;
if (!separator.global) {
separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
}
separator.lastIndex = 0;
while ((match = separator.exec(substring))) {
var newEnd = match.index;
}
result = result.slice(0, newEnd === undefined ? end : newEnd);
}
} else if (string.indexOf(baseToString(separator), end) != end) {
var index = result.lastIndexOf(separator);
if (index > -1) {
result = result.slice(0, index);
}
}
return result + omission;
}
/**
* The inverse of `_.escape`; this method converts the HTML entities
* `&`, `<`, `>`, `"`, and `'` in `string` to
* their corresponding characters.
*
* **Note:** No other HTML entities are unescaped. To unescape additional
* HTML entities use a third-party library like [_he_](https://mths.be/he).
*
* @static
* @memberOf _
* @since 0.6.0
* @category String
* @param {string} [string=''] The string to unescape.
* @returns {string} Returns the unescaped string.
* @example
*
* _.unescape('fred, barney, & pebbles');
* // => 'fred, barney, & pebbles'
*/
function unescape(string) {
string = toString(string);
return (string && reHasEscapedHtml.test(string))
? string.replace(reEscapedHtml, unescapeHtmlChar)
: string;
}
/**
* Converts `string`, as space separated words, to upper case.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the upper cased string.
* @example
*
* _.upperCase('--foo-bar');
* // => 'FOO BAR'
*
* _.upperCase('fooBar');
* // => 'FOO BAR'
*
* _.upperCase('__foo_bar__');
* // => 'FOO BAR'
*/
var upperCase = createCompounder(function(result, word, index) {
return result + (index ? ' ' : '') + word.toUpperCase();
});
/**
* Converts the first character of `string` to upper case.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the converted string.
* @example
*
* _.upperFirst('fred');
* // => 'Fred'
*
* _.upperFirst('FRED');
* // => 'FRED'
*/
var upperFirst = createCaseFirst('toUpperCase');
/**
* Splits `string` into an array of its words.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to inspect.
* @param {RegExp|string} [pattern] The pattern to match words.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the words of `string`.
* @example
*
* _.words('fred, barney, & pebbles');
* // => ['fred', 'barney', 'pebbles']
*
* _.words('fred, barney, & pebbles', /[^, ]+/g);
* // => ['fred', 'barney', '&', 'pebbles']
*/
function words(string, pattern, guard) {
string = toString(string);
pattern = guard ? undefined : pattern;
if (pattern === undefined) {
return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
}
return string.match(pattern) || [];
}
/*------------------------------------------------------------------------*/
/**
* Attempts to invoke `func`, returning either the result or the caught error
* object. Any additional arguments are provided to `func` when it's invoked.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Util
* @param {Function} func The function to attempt.
* @param {...*} [args] The arguments to invoke `func` with.
* @returns {*} Returns the `func` result or error object.
* @example
*
* // Avoid throwing errors for invalid selectors.
* var elements = _.attempt(function(selector) {
* return document.querySelectorAll(selector);
* }, '>_>');
*
* if (_.isError(elements)) {
* elements = [];
* }
*/
var attempt = baseRest(function(func, args) {
try {
return apply(func, undefined, args);
} catch (e) {
return isError(e) ? e : new Error(e);
}
});
/**
* Binds methods of an object to the object itself, overwriting the existing
* method.
*
* **Note:** This method doesn't set the "length" property of bound functions.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {Object} object The object to bind and assign the bound methods to.
* @param {...(string|string[])} methodNames The object method names to bind.
* @returns {Object} Returns `object`.
* @example
*
* var view = {
* 'label': 'docs',
* 'click': function() {
* console.log('clicked ' + this.label);
* }
* };
*
* _.bindAll(view, ['click']);
* jQuery(element).on('click', view.click);
* // => Logs 'clicked docs' when clicked.
*/
var bindAll = flatRest(function(object, methodNames) {
arrayEach(methodNames, function(key) {
key = toKey(key);
baseAssignValue(object, key, bind(object[key], object));
});
return object;
});
/**
* Creates a function that iterates over `pairs` and invokes the corresponding
* function of the first predicate to return truthy. The predicate-function
* pairs are invoked with the `this` binding and arguments of the created
* function.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {Array} pairs The predicate-function pairs.
* @returns {Function} Returns the new composite function.
* @example
*
* var func = _.cond([
* [_.matches({ 'a': 1 }), _.constant('matches A')],
* [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
* [_.stubTrue, _.constant('no match')]
* ]);
*
* func({ 'a': 1, 'b': 2 });
* // => 'matches A'
*
* func({ 'a': 0, 'b': 1 });
* // => 'matches B'
*
* func({ 'a': '1', 'b': '2' });
* // => 'no match'
*/
function cond(pairs) {
var length = pairs == null ? 0 : pairs.length,
toIteratee = getIteratee();
pairs = !length ? [] : arrayMap(pairs, function(pair) {
if (typeof pair[1] != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
return [toIteratee(pair[0]), pair[1]];
});
return baseRest(function(args) {
var index = -1;
while (++index < length) {
var pair = pairs[index];
if (apply(pair[0], this, args)) {
return apply(pair[1], this, args);
}
}
});
}
/**
* Creates a function that invokes the predicate properties of `source` with
* the corresponding property values of a given object, returning `true` if
* all predicates return truthy, else `false`.
*
* **Note:** The created function is equivalent to `_.conformsTo` with
* `source` partially applied.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {Object} source The object of property predicates to conform to.
* @returns {Function} Returns the new spec function.
* @example
*
* var objects = [
* { 'a': 2, 'b': 1 },
* { 'a': 1, 'b': 2 }
* ];
*
* _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
* // => [{ 'a': 1, 'b': 2 }]
*/
function conforms(source) {
return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
}
/**
* Creates a function that returns `value`.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Util
* @param {*} value The value to return from the new function.
* @returns {Function} Returns the new constant function.
* @example
*
* var objects = _.times(2, _.constant({ 'a': 1 }));
*
* console.log(objects);
* // => [{ 'a': 1 }, { 'a': 1 }]
*
* console.log(objects[0] === objects[1]);
* // => true
*/
function constant(value) {
return function() {
return value;
};
}
/**
* Checks `value` to determine whether a default value should be returned in
* its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
* or `undefined`.
*
* @static
* @memberOf _
* @since 4.14.0
* @category Util
* @param {*} value The value to check.
* @param {*} defaultValue The default value.
* @returns {*} Returns the resolved value.
* @example
*
* _.defaultTo(1, 10);
* // => 1
*
* _.defaultTo(undefined, 10);
* // => 10
*/
function defaultTo(value, defaultValue) {
return (value == null || value !== value) ? defaultValue : value;
}
/**
* Creates a function that returns the result of invoking the given functions
* with the `this` binding of the created function, where each successive
* invocation is supplied the return value of the previous.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Util
* @param {...(Function|Function[])} [funcs] The functions to invoke.
* @returns {Function} Returns the new composite function.
* @see _.flowRight
* @example
*
* function square(n) {
* return n * n;
* }
*
* var addSquare = _.flow([_.add, square]);
* addSquare(1, 2);
* // => 9
*/
var flow = createFlow();
/**
* This method is like `_.flow` except that it creates a function that
* invokes the given functions from right to left.
*
* @static
* @since 3.0.0
* @memberOf _
* @category Util
* @param {...(Function|Function[])} [funcs] The functions to invoke.
* @returns {Function} Returns the new composite function.
* @see _.flow
* @example
*
* function square(n) {
* return n * n;
* }
*
* var addSquare = _.flowRight([square, _.add]);
* addSquare(1, 2);
* // => 9
*/
var flowRight = createFlow(true);
/**
* This method returns the first argument it receives.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {*} value Any value.
* @returns {*} Returns `value`.
* @example
*
* var object = { 'a': 1 };
*
* console.log(_.identity(object) === object);
* // => true
*/
function identity(value) {
return value;
}
/**
* Creates a function that invokes `func` with the arguments of the created
* function. If `func` is a property name, the created function returns the
* property value for a given element. If `func` is an array or object, the
* created function returns `true` for elements that contain the equivalent
* source properties, otherwise it returns `false`.
*
* @static
* @since 4.0.0
* @memberOf _
* @category Util
* @param {*} [func=_.identity] The value to convert to a callback.
* @returns {Function} Returns the callback.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': true },
* { 'user': 'fred', 'age': 40, 'active': false }
* ];
*
* // The `_.matches` iteratee shorthand.
* _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
* // => [{ 'user': 'barney', 'age': 36, 'active': true }]
*
* // The `_.matchesProperty` iteratee shorthand.
* _.filter(users, _.iteratee(['user', 'fred']));
* // => [{ 'user': 'fred', 'age': 40 }]
*
* // The `_.property` iteratee shorthand.
* _.map(users, _.iteratee('user'));
* // => ['barney', 'fred']
*
* // Create custom iteratee shorthands.
* _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
* return !_.isRegExp(func) ? iteratee(func) : function(string) {
* return func.test(string);
* };
* });
*
* _.filter(['abc', 'def'], /ef/);
* // => ['def']
*/
function iteratee(func) {
return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
}
/**
* Creates a function that performs a partial deep comparison between a given
* object and `source`, returning `true` if the given object has equivalent
* property values, else `false`.
*
* **Note:** The created function is equivalent to `_.isMatch` with `source`
* partially applied.
*
* Partial comparisons will match empty array and empty object `source`
* values against any array or object value, respectively. See `_.isEqual`
* for a list of supported value comparisons.
*
* **Note:** Multiple values can be checked by combining several matchers
* using `_.overSome`
*
* @static
* @memberOf _
* @since 3.0.0
* @category Util
* @param {Object} source The object of property values to match.
* @returns {Function} Returns the new spec function.
* @example
*
* var objects = [
* { 'a': 1, 'b': 2, 'c': 3 },
* { 'a': 4, 'b': 5, 'c': 6 }
* ];
*
* _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
* // => [{ 'a': 4, 'b': 5, 'c': 6 }]
*
* // Checking for several possible values
* _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
* // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
*/
function matches(source) {
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
}
/**
* Creates a function that performs a partial deep comparison between the
* value at `path` of a given object to `srcValue`, returning `true` if the
* object value is equivalent, else `false`.
*
* **Note:** Partial comparisons will match empty array and empty object
* `srcValue` values against any array or object value, respectively. See
* `_.isEqual` for a list of supported value comparisons.
*
* **Note:** Multiple values can be checked by combining several matchers
* using `_.overSome`
*
* @static
* @memberOf _
* @since 3.2.0
* @category Util
* @param {Array|string} path The path of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new spec function.
* @example
*
* var objects = [
* { 'a': 1, 'b': 2, 'c': 3 },
* { 'a': 4, 'b': 5, 'c': 6 }
* ];
*
* _.find(objects, _.matchesProperty('a', 4));
* // => { 'a': 4, 'b': 5, 'c': 6 }
*
* // Checking for several possible values
* _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
* // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
*/
function matchesProperty(path, srcValue) {
return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
}
/**
* Creates a function that invokes the method at `path` of a given object.
* Any additional arguments are provided to the invoked method.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Util
* @param {Array|string} path The path of the method to invoke.
* @param {...*} [args] The arguments to invoke the method with.
* @returns {Function} Returns the new invoker function.
* @example
*
* var objects = [
* { 'a': { 'b': _.constant(2) } },
* { 'a': { 'b': _.constant(1) } }
* ];
*
* _.map(objects, _.method('a.b'));
* // => [2, 1]
*
* _.map(objects, _.method(['a', 'b']));
* // => [2, 1]
*/
var method = baseRest(function(path, args) {
return function(object) {
return baseInvoke(object, path, args);
};
});
/**
* The opposite of `_.method`; this method creates a function that invokes
* the method at a given path of `object`. Any additional arguments are
* provided to the invoked method.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Util
* @param {Object} object The object to query.
* @param {...*} [args] The arguments to invoke the method with.
* @returns {Function} Returns the new invoker function.
* @example
*
* var array = _.times(3, _.constant),
* object = { 'a': array, 'b': array, 'c': array };
*
* _.map(['a[2]', 'c[0]'], _.methodOf(object));
* // => [2, 0]
*
* _.map([['a', '2'], ['c', '0']], _.methodOf(object));
* // => [2, 0]
*/
var methodOf = baseRest(function(object, args) {
return function(path) {
return baseInvoke(object, path, args);
};
});
/**
* Adds all own enumerable string keyed function properties of a source
* object to the destination object. If `object` is a function, then methods
* are added to its prototype as well.
*
* **Note:** Use `_.runInContext` to create a pristine `lodash` function to
* avoid conflicts caused by modifying the original.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {Function|Object} [object=lodash] The destination object.
* @param {Object} source The object of functions to add.
* @param {Object} [options={}] The options object.
* @param {boolean} [options.chain=true] Specify whether mixins are chainable.
* @returns {Function|Object} Returns `object`.
* @example
*
* function vowels(string) {
* return _.filter(string, function(v) {
* return /[aeiou]/i.test(v);
* });
* }
*
* _.mixin({ 'vowels': vowels });
* _.vowels('fred');
* // => ['e']
*
* _('fred').vowels().value();
* // => ['e']
*
* _.mixin({ 'vowels': vowels }, { 'chain': false });
* _('fred').vowels();
* // => ['e']
*/
function mixin(object, source, options) {
var props = keys(source),
methodNames = baseFunctions(source, props);
if (options == null &&
!(isObject(source) && (methodNames.length || !props.length))) {
options = source;
source = object;
object = this;
methodNames = baseFunctions(source, keys(source));
}
var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
isFunc = isFunction(object);
arrayEach(methodNames, function(methodName) {
var func = source[methodName];
object[methodName] = func;
if (isFunc) {
object.prototype[methodName] = function() {
var chainAll = this.__chain__;
if (chain || chainAll) {
var result = object(this.__wrapped__),
actions = result.__actions__ = copyArray(this.__actions__);
actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
result.__chain__ = chainAll;
return result;
}
return func.apply(object, arrayPush([this.value()], arguments));
};
}
});
return object;
}
/**
* Reverts the `_` variable to its previous value and returns a reference to
* the `lodash` function.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @returns {Function} Returns the `lodash` function.
* @example
*
* var lodash = _.noConflict();
*/
function noConflict() {
if (root._ === this) {
root._ = oldDash;
}
return this;
}
/**
* This method returns `undefined`.
*
* @static
* @memberOf _
* @since 2.3.0
* @category Util
* @example
*
* _.times(2, _.noop);
* // => [undefined, undefined]
*/
function noop() {
// No operation performed.
}
/**
* Creates a function that gets the argument at index `n`. If `n` is negative,
* the nth argument from the end is returned.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {number} [n=0] The index of the argument to return.
* @returns {Function} Returns the new pass-thru function.
* @example
*
* var func = _.nthArg(1);
* func('a', 'b', 'c', 'd');
* // => 'b'
*
* var func = _.nthArg(-2);
* func('a', 'b', 'c', 'd');
* // => 'c'
*/
function nthArg(n) {
n = toInteger(n);
return baseRest(function(args) {
return baseNth(args, n);
});
}
/**
* Creates a function that invokes `iteratees` with the arguments it receives
* and returns their results.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {...(Function|Function[])} [iteratees=[_.identity]]
* The iteratees to invoke.
* @returns {Function} Returns the new function.
* @example
*
* var func = _.over([Math.max, Math.min]);
*
* func(1, 2, 3, 4);
* // => [4, 1]
*/
var over = createOver(arrayMap);
/**
* Creates a function that checks if **all** of the `predicates` return
* truthy when invoked with the arguments it receives.
*
* Following shorthands are possible for providing predicates.
* Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
* Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {...(Function|Function[])} [predicates=[_.identity]]
* The predicates to check.
* @returns {Function} Returns the new function.
* @example
*
* var func = _.overEvery([Boolean, isFinite]);
*
* func('1');
* // => true
*
* func(null);
* // => false
*
* func(NaN);
* // => false
*/
var overEvery = createOver(arrayEvery);
/**
* Creates a function that checks if **any** of the `predicates` return
* truthy when invoked with the arguments it receives.
*
* Following shorthands are possible for providing predicates.
* Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
* Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {...(Function|Function[])} [predicates=[_.identity]]
* The predicates to check.
* @returns {Function} Returns the new function.
* @example
*
* var func = _.overSome([Boolean, isFinite]);
*
* func('1');
* // => true
*
* func(null);
* // => true
*
* func(NaN);
* // => false
*
* var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
* var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
*/
var overSome = createOver(arraySome);
/**
* Creates a function that returns the value at `path` of a given object.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Util
* @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new accessor function.
* @example
*
* var objects = [
* { 'a': { 'b': 2 } },
* { 'a': { 'b': 1 } }
* ];
*
* _.map(objects, _.property('a.b'));
* // => [2, 1]
*
* _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
* // => [1, 2]
*/
function property(path) {
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
}
/**
* The opposite of `_.property`; this method creates a function that returns
* the value at a given path of `object`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Util
* @param {Object} object The object to query.
* @returns {Function} Returns the new accessor function.
* @example
*
* var array = [0, 1, 2],
* object = { 'a': array, 'b': array, 'c': array };
*
* _.map(['a[2]', 'c[0]'], _.propertyOf(object));
* // => [2, 0]
*
* _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
* // => [2, 0]
*/
function propertyOf(object) {
return function(path) {
return object == null ? undefined : baseGet(object, path);
};
}
/**
* Creates an array of numbers (positive and/or negative) progressing from
* `start` up to, but not including, `end`. A step of `-1` is used if a negative
* `start` is specified without an `end` or `step`. If `end` is not specified,
* it's set to `start` with `start` then set to `0`.
*
* **Note:** JavaScript follows the IEEE-754 standard for resolving
* floating-point values which can produce unexpected results.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {number} [start=0] The start of the range.
* @param {number} end The end of the range.
* @param {number} [step=1] The value to increment or decrement by.
* @returns {Array} Returns the range of numbers.
* @see _.inRange, _.rangeRight
* @example
*
* _.range(4);
* // => [0, 1, 2, 3]
*
* _.range(-4);
* // => [0, -1, -2, -3]
*
* _.range(1, 5);
* // => [1, 2, 3, 4]
*
* _.range(0, 20, 5);
* // => [0, 5, 10, 15]
*
* _.range(0, -4, -1);
* // => [0, -1, -2, -3]
*
* _.range(1, 4, 0);
* // => [1, 1, 1]
*
* _.range(0);
* // => []
*/
var range = createRange();
/**
* This method is like `_.range` except that it populates values in
* descending order.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {number} [start=0] The start of the range.
* @param {number} end The end of the range.
* @param {number} [step=1] The value to increment or decrement by.
* @returns {Array} Returns the range of numbers.
* @see _.inRange, _.range
* @example
*
* _.rangeRight(4);
* // => [3, 2, 1, 0]
*
* _.rangeRight(-4);
* // => [-3, -2, -1, 0]
*
* _.rangeRight(1, 5);
* // => [4, 3, 2, 1]
*
* _.rangeRight(0, 20, 5);
* // => [15, 10, 5, 0]
*
* _.rangeRight(0, -4, -1);
* // => [-3, -2, -1, 0]
*
* _.rangeRight(1, 4, 0);
* // => [1, 1, 1]
*
* _.rangeRight(0);
* // => []
*/
var rangeRight = createRange(true);
/**
* This method returns a new empty array.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {Array} Returns the new empty array.
* @example
*
* var arrays = _.times(2, _.stubArray);
*
* console.log(arrays);
* // => [[], []]
*
* console.log(arrays[0] === arrays[1]);
* // => false
*/
function stubArray() {
return [];
}
/**
* This method returns `false`.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {boolean} Returns `false`.
* @example
*
* _.times(2, _.stubFalse);
* // => [false, false]
*/
function stubFalse() {
return false;
}
/**
* This method returns a new empty object.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {Object} Returns the new empty object.
* @example
*
* var objects = _.times(2, _.stubObject);
*
* console.log(objects);
* // => [{}, {}]
*
* console.log(objects[0] === objects[1]);
* // => false
*/
function stubObject() {
return {};
}
/**
* This method returns an empty string.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {string} Returns the empty string.
* @example
*
* _.times(2, _.stubString);
* // => ['', '']
*/
function stubString() {
return '';
}
/**
* This method returns `true`.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {boolean} Returns `true`.
* @example
*
* _.times(2, _.stubTrue);
* // => [true, true]
*/
function stubTrue() {
return true;
}
/**
* Invokes the iteratee `n` times, returning an array of the results of
* each invocation. The iteratee is invoked with one argument; (index).
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {number} n The number of times to invoke `iteratee`.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array} Returns the array of results.
* @example
*
* _.times(3, String);
* // => ['0', '1', '2']
*
* _.times(4, _.constant(0));
* // => [0, 0, 0, 0]
*/
function times(n, iteratee) {
n = toInteger(n);
if (n < 1 || n > MAX_SAFE_INTEGER) {
return [];
}
var index = MAX_ARRAY_LENGTH,
length = nativeMin(n, MAX_ARRAY_LENGTH);
iteratee = getIteratee(iteratee);
n -= MAX_ARRAY_LENGTH;
var result = baseTimes(length, iteratee);
while (++index < n) {
iteratee(index);
}
return result;
}
/**
* Converts `value` to a property path array.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {*} value The value to convert.
* @returns {Array} Returns the new property path array.
* @example
*
* _.toPath('a.b.c');
* // => ['a', 'b', 'c']
*
* _.toPath('a[0].b.c');
* // => ['a', '0', 'b', 'c']
*/
function toPath(value) {
if (isArray(value)) {
return arrayMap(value, toKey);
}
return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
}
/**
* Generates a unique ID. If `prefix` is given, the ID is appended to it.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {string} [prefix=''] The value to prefix the ID with.
* @returns {string} Returns the unique ID.
* @example
*
* _.uniqueId('contact_');
* // => 'contact_104'
*
* _.uniqueId();
* // => '105'
*/
function uniqueId(prefix) {
var id = ++idCounter;
return toString(prefix) + id;
}
/*------------------------------------------------------------------------*/
/**
* Adds two numbers.
*
* @static
* @memberOf _
* @since 3.4.0
* @category Math
* @param {number} augend The first number in an addition.
* @param {number} addend The second number in an addition.
* @returns {number} Returns the total.
* @example
*
* _.add(6, 4);
* // => 10
*/
var add = createMathOperation(function(augend, addend) {
return augend + addend;
}, 0);
/**
* Computes `number` rounded up to `precision`.
*
* @static
* @memberOf _
* @since 3.10.0
* @category Math
* @param {number} number The number to round up.
* @param {number} [precision=0] The precision to round up to.
* @returns {number} Returns the rounded up number.
* @example
*
* _.ceil(4.006);
* // => 5
*
* _.ceil(6.004, 2);
* // => 6.01
*
* _.ceil(6040, -2);
* // => 6100
*/
var ceil = createRound('ceil');
/**
* Divide two numbers.
*
* @static
* @memberOf _
* @since 4.7.0
* @category Math
* @param {number} dividend The first number in a division.
* @param {number} divisor The second number in a division.
* @returns {number} Returns the quotient.
* @example
*
* _.divide(6, 4);
* // => 1.5
*/
var divide = createMathOperation(function(dividend, divisor) {
return dividend / divisor;
}, 1);
/**
* Computes `number` rounded down to `precision`.
*
* @static
* @memberOf _
* @since 3.10.0
* @category Math
* @param {number} number The number to round down.
* @param {number} [precision=0] The precision to round down to.
* @returns {number} Returns the rounded down number.
* @example
*
* _.floor(4.006);
* // => 4
*
* _.floor(0.046, 2);
* // => 0.04
*
* _.floor(4060, -2);
* // => 4000
*/
var floor = createRound('floor');
/**
* Computes the maximum value of `array`. If `array` is empty or falsey,
* `undefined` is returned.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Math
* @param {Array} array The array to iterate over.
* @returns {*} Returns the maximum value.
* @example
*
* _.max([4, 2, 8, 6]);
* // => 8
*
* _.max([]);
* // => undefined
*/
function max(array) {
return (array && array.length)
? baseExtremum(array, identity, baseGt)
: undefined;
}
/**
* This method is like `_.max` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the criterion by which
* the value is ranked. The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Math
* @param {Array} array The array to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {*} Returns the maximum value.
* @example
*
* var objects = [{ 'n': 1 }, { 'n': 2 }];
*
* _.maxBy(objects, function(o) { return o.n; });
* // => { 'n': 2 }
*
* // The `_.property` iteratee shorthand.
* _.maxBy(objects, 'n');
* // => { 'n': 2 }
*/
function maxBy(array, iteratee) {
return (array && array.length)
? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
: undefined;
}
/**
* Computes the mean of the values in `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Math
* @param {Array} array The array to iterate over.
* @returns {number} Returns the mean.
* @example
*
* _.mean([4, 2, 8, 6]);
* // => 5
*/
function mean(array) {
return baseMean(array, identity);
}
/**
* This method is like `_.mean` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the value to be averaged.
* The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.7.0
* @category Math
* @param {Array} array The array to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {number} Returns the mean.
* @example
*
* var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
*
* _.meanBy(objects, function(o) { return o.n; });
* // => 5
*
* // The `_.property` iteratee shorthand.
* _.meanBy(objects, 'n');
* // => 5
*/
function meanBy(array, iteratee) {
return baseMean(array, getIteratee(iteratee, 2));
}
/**
* Computes the minimum value of `array`. If `array` is empty or falsey,
* `undefined` is returned.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Math
* @param {Array} array The array to iterate over.
* @returns {*} Returns the minimum value.
* @example
*
* _.min([4, 2, 8, 6]);
* // => 2
*
* _.min([]);
* // => undefined
*/
function min(array) {
return (array && array.length)
? baseExtremum(array, identity, baseLt)
: undefined;
}
/**
* This method is like `_.min` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the criterion by which
* the value is ranked. The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Math
* @param {Array} array The array to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {*} Returns the minimum value.
* @example
*
* var objects = [{ 'n': 1 }, { 'n': 2 }];
*
* _.minBy(objects, function(o) { return o.n; });
* // => { 'n': 1 }
*
* // The `_.property` iteratee shorthand.
* _.minBy(objects, 'n');
* // => { 'n': 1 }
*/
function minBy(array, iteratee) {
return (array && array.length)
? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
: undefined;
}
/**
* Multiply two numbers.
*
* @static
* @memberOf _
* @since 4.7.0
* @category Math
* @param {number} multiplier The first number in a multiplication.
* @param {number} multiplicand The second number in a multiplication.
* @returns {number} Returns the product.
* @example
*
* _.multiply(6, 4);
* // => 24
*/
var multiply = createMathOperation(function(multiplier, multiplicand) {
return multiplier * multiplicand;
}, 1);
/**
* Computes `number` rounded to `precision`.
*
* @static
* @memberOf _
* @since 3.10.0
* @category Math
* @param {number} number The number to round.
* @param {number} [precision=0] The precision to round to.
* @returns {number} Returns the rounded number.
* @example
*
* _.round(4.006);
* // => 4
*
* _.round(4.006, 2);
* // => 4.01
*
* _.round(4060, -2);
* // => 4100
*/
var round = createRound('round');
/**
* Subtract two numbers.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Math
* @param {number} minuend The first number in a subtraction.
* @param {number} subtrahend The second number in a subtraction.
* @returns {number} Returns the difference.
* @example
*
* _.subtract(6, 4);
* // => 2
*/
var subtract = createMathOperation(function(minuend, subtrahend) {
return minuend - subtrahend;
}, 0);
/**
* Computes the sum of the values in `array`.
*
* @static
* @memberOf _
* @since 3.4.0
* @category Math
* @param {Array} array The array to iterate over.
* @returns {number} Returns the sum.
* @example
*
* _.sum([4, 2, 8, 6]);
* // => 20
*/
function sum(array) {
return (array && array.length)
? baseSum(array, identity)
: 0;
}
/**
* This method is like `_.sum` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the value to be summed.
* The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Math
* @param {Array} array The array to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {number} Returns the sum.
* @example
*
* var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
*
* _.sumBy(objects, function(o) { return o.n; });
* // => 20
*
* // The `_.property` iteratee shorthand.
* _.sumBy(objects, 'n');
* // => 20
*/
function sumBy(array, iteratee) {
return (array && array.length)
? baseSum(array, getIteratee(iteratee, 2))
: 0;
}
/*------------------------------------------------------------------------*/
// Add methods that return wrapped values in chain sequences.
lodash.after = after;
lodash.ary = ary;
lodash.assign = assign;
lodash.assignIn = assignIn;
lodash.assignInWith = assignInWith;
lodash.assignWith = assignWith;
lodash.at = at;
lodash.before = before;
lodash.bind = bind;
lodash.bindAll = bindAll;
lodash.bindKey = bindKey;
lodash.castArray = castArray;
lodash.chain = chain;
lodash.chunk = chunk;
lodash.compact = compact;
lodash.concat = concat;
lodash.cond = cond;
lodash.conforms = conforms;
lodash.constant = constant;
lodash.countBy = countBy;
lodash.create = create;
lodash.curry = curry;
lodash.curryRight = curryRight;
lodash.debounce = debounce;
lodash.defaults = defaults;
lodash.defaultsDeep = defaultsDeep;
lodash.defer = defer;
lodash.delay = delay;
lodash.difference = difference;
lodash.differenceBy = differenceBy;
lodash.differenceWith = differenceWith;
lodash.drop = drop;
lodash.dropRight = dropRight;
lodash.dropRightWhile = dropRightWhile;
lodash.dropWhile = dropWhile;
lodash.fill = fill;
lodash.filter = filter;
lodash.flatMap = flatMap;
lodash.flatMapDeep = flatMapDeep;
lodash.flatMapDepth = flatMapDepth;
lodash.flatten = flatten;
lodash.flattenDeep = flattenDeep;
lodash.flattenDepth = flattenDepth;
lodash.flip = flip;
lodash.flow = flow;
lodash.flowRight = flowRight;
lodash.fromPairs = fromPairs;
lodash.functions = functions;
lodash.functionsIn = functionsIn;
lodash.groupBy = groupBy;
lodash.initial = initial;
lodash.intersection = intersection;
lodash.intersectionBy = intersectionBy;
lodash.intersectionWith = intersectionWith;
lodash.invert = invert;
lodash.invertBy = invertBy;
lodash.invokeMap = invokeMap;
lodash.iteratee = iteratee;
lodash.keyBy = keyBy;
lodash.keys = keys;
lodash.keysIn = keysIn;
lodash.map = map;
lodash.mapKeys = mapKeys;
lodash.mapValues = mapValues;
lodash.matches = matches;
lodash.matchesProperty = matchesProperty;
lodash.memoize = memoize;
lodash.merge = merge;
lodash.mergeWith = mergeWith;
lodash.method = method;
lodash.methodOf = methodOf;
lodash.mixin = mixin;
lodash.negate = negate;
lodash.nthArg = nthArg;
lodash.omit = omit;
lodash.omitBy = omitBy;
lodash.once = once;
lodash.orderBy = orderBy;
lodash.over = over;
lodash.overArgs = overArgs;
lodash.overEvery = overEvery;
lodash.overSome = overSome;
lodash.partial = partial;
lodash.partialRight = partialRight;
lodash.partition = partition;
lodash.pick = pick;
lodash.pickBy = pickBy;
lodash.property = property;
lodash.propertyOf = propertyOf;
lodash.pull = pull;
lodash.pullAll = pullAll;
lodash.pullAllBy = pullAllBy;
lodash.pullAllWith = pullAllWith;
lodash.pullAt = pullAt;
lodash.range = range;
lodash.rangeRight = rangeRight;
lodash.rearg = rearg;
lodash.reject = reject;
lodash.remove = remove;
lodash.rest = rest;
lodash.reverse = reverse;
lodash.sampleSize = sampleSize;
lodash.set = set;
lodash.setWith = setWith;
lodash.shuffle = shuffle;
lodash.slice = slice;
lodash.sortBy = sortBy;
lodash.sortedUniq = sortedUniq;
lodash.sortedUniqBy = sortedUniqBy;
lodash.split = split;
lodash.spread = spread;
lodash.tail = tail;
lodash.take = take;
lodash.takeRight = takeRight;
lodash.takeRightWhile = takeRightWhile;
lodash.takeWhile = takeWhile;
lodash.tap = tap;
lodash.throttle = throttle;
lodash.thru = thru;
lodash.toArray = toArray;
lodash.toPairs = toPairs;
lodash.toPairsIn = toPairsIn;
lodash.toPath = toPath;
lodash.toPlainObject = toPlainObject;
lodash.transform = transform;
lodash.unary = unary;
lodash.union = union;
lodash.unionBy = unionBy;
lodash.unionWith = unionWith;
lodash.uniq = uniq;
lodash.uniqBy = uniqBy;
lodash.uniqWith = uniqWith;
lodash.unset = unset;
lodash.unzip = unzip;
lodash.unzipWith = unzipWith;
lodash.update = update;
lodash.updateWith = updateWith;
lodash.values = values;
lodash.valuesIn = valuesIn;
lodash.without = without;
lodash.words = words;
lodash.wrap = wrap;
lodash.xor = xor;
lodash.xorBy = xorBy;
lodash.xorWith = xorWith;
lodash.zip = zip;
lodash.zipObject = zipObject;
lodash.zipObjectDeep = zipObjectDeep;
lodash.zipWith = zipWith;
// Add aliases.
lodash.entries = toPairs;
lodash.entriesIn = toPairsIn;
lodash.extend = assignIn;
lodash.extendWith = assignInWith;
// Add methods to `lodash.prototype`.
mixin(lodash, lodash);
/*------------------------------------------------------------------------*/
// Add methods that return unwrapped values in chain sequences.
lodash.add = add;
lodash.attempt = attempt;
lodash.camelCase = camelCase;
lodash.capitalize = capitalize;
lodash.ceil = ceil;
lodash.clamp = clamp;
lodash.clone = clone;
lodash.cloneDeep = cloneDeep;
lodash.cloneDeepWith = cloneDeepWith;
lodash.cloneWith = cloneWith;
lodash.conformsTo = conformsTo;
lodash.deburr = deburr;
lodash.defaultTo = defaultTo;
lodash.divide = divide;
lodash.endsWith = endsWith;
lodash.eq = eq;
lodash.escape = escape;
lodash.escapeRegExp = escapeRegExp;
lodash.every = every;
lodash.find = find;
lodash.findIndex = findIndex;
lodash.findKey = findKey;
lodash.findLast = findLast;
lodash.findLastIndex = findLastIndex;
lodash.findLastKey = findLastKey;
lodash.floor = floor;
lodash.forEach = forEach;
lodash.forEachRight = forEachRight;
lodash.forIn = forIn;
lodash.forInRight = forInRight;
lodash.forOwn = forOwn;
lodash.forOwnRight = forOwnRight;
lodash.get = get;
lodash.gt = gt;
lodash.gte = gte;
lodash.has = has;
lodash.hasIn = hasIn;
lodash.head = head;
lodash.identity = identity;
lodash.includes = includes;
lodash.indexOf = indexOf;
lodash.inRange = inRange;
lodash.invoke = invoke;
lodash.isArguments = isArguments;
lodash.isArray = isArray;
lodash.isArrayBuffer = isArrayBuffer;
lodash.isArrayLike = isArrayLike;
lodash.isArrayLikeObject = isArrayLikeObject;
lodash.isBoolean = isBoolean;
lodash.isBuffer = isBuffer;
lodash.isDate = isDate;
lodash.isElement = isElement;
lodash.isEmpty = isEmpty;
lodash.isEqual = isEqual;
lodash.isEqualWith = isEqualWith;
lodash.isError = isError;
lodash.isFinite = isFinite;
lodash.isFunction = isFunction;
lodash.isInteger = isInteger;
lodash.isLength = isLength;
lodash.isMap = isMap;
lodash.isMatch = isMatch;
lodash.isMatchWith = isMatchWith;
lodash.isNaN = isNaN;
lodash.isNative = isNative;
lodash.isNil = isNil;
lodash.isNull = isNull;
lodash.isNumber = isNumber;
lodash.isObject = isObject;
lodash.isObjectLike = isObjectLike;
lodash.isPlainObject = isPlainObject;
lodash.isRegExp = isRegExp;
lodash.isSafeInteger = isSafeInteger;
lodash.isSet = isSet;
lodash.isString = isString;
lodash.isSymbol = isSymbol;
lodash.isTypedArray = isTypedArray;
lodash.isUndefined = isUndefined;
lodash.isWeakMap = isWeakMap;
lodash.isWeakSet = isWeakSet;
lodash.join = join;
lodash.kebabCase = kebabCase;
lodash.last = last;
lodash.lastIndexOf = lastIndexOf;
lodash.lowerCase = lowerCase;
lodash.lowerFirst = lowerFirst;
lodash.lt = lt;
lodash.lte = lte;
lodash.max = max;
lodash.maxBy = maxBy;
lodash.mean = mean;
lodash.meanBy = meanBy;
lodash.min = min;
lodash.minBy = minBy;
lodash.stubArray = stubArray;
lodash.stubFalse = stubFalse;
lodash.stubObject = stubObject;
lodash.stubString = stubString;
lodash.stubTrue = stubTrue;
lodash.multiply = multiply;
lodash.nth = nth;
lodash.noConflict = noConflict;
lodash.noop = noop;
lodash.now = now;
lodash.pad = pad;
lodash.padEnd = padEnd;
lodash.padStart = padStart;
lodash.parseInt = parseInt;
lodash.random = random;
lodash.reduce = reduce;
lodash.reduceRight = reduceRight;
lodash.repeat = repeat;
lodash.replace = replace;
lodash.result = result;
lodash.round = round;
lodash.runInContext = runInContext;
lodash.sample = sample;
lodash.size = size;
lodash.snakeCase = snakeCase;
lodash.some = some;
lodash.sortedIndex = sortedIndex;
lodash.sortedIndexBy = sortedIndexBy;
lodash.sortedIndexOf = sortedIndexOf;
lodash.sortedLastIndex = sortedLastIndex;
lodash.sortedLastIndexBy = sortedLastIndexBy;
lodash.sortedLastIndexOf = sortedLastIndexOf;
lodash.startCase = startCase;
lodash.startsWith = startsWith;
lodash.subtract = subtract;
lodash.sum = sum;
lodash.sumBy = sumBy;
lodash.template = template;
lodash.times = times;
lodash.toFinite = toFinite;
lodash.toInteger = toInteger;
lodash.toLength = toLength;
lodash.toLower = toLower;
lodash.toNumber = toNumber;
lodash.toSafeInteger = toSafeInteger;
lodash.toString = toString;
lodash.toUpper = toUpper;
lodash.trim = trim;
lodash.trimEnd = trimEnd;
lodash.trimStart = trimStart;
lodash.truncate = truncate;
lodash.unescape = unescape;
lodash.uniqueId = uniqueId;
lodash.upperCase = upperCase;
lodash.upperFirst = upperFirst;
// Add aliases.
lodash.each = forEach;
lodash.eachRight = forEachRight;
lodash.first = head;
mixin(lodash, (function() {
var source = {};
baseForOwn(lodash, function(func, methodName) {
if (!hasOwnProperty.call(lodash.prototype, methodName)) {
source[methodName] = func;
}
});
return source;
}()), { 'chain': false });
/*------------------------------------------------------------------------*/
/**
* The semantic version number.
*
* @static
* @memberOf _
* @type {string}
*/
lodash.VERSION = VERSION;
// Assign default placeholders.
arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
lodash[methodName].placeholder = lodash;
});
// Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
arrayEach(['drop', 'take'], function(methodName, index) {
LazyWrapper.prototype[methodName] = function(n) {
n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
var result = (this.__filtered__ && !index)
? new LazyWrapper(this)
: this.clone();
if (result.__filtered__) {
result.__takeCount__ = nativeMin(n, result.__takeCount__);
} else {
result.__views__.push({
'size': nativeMin(n, MAX_ARRAY_LENGTH),
'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
});
}
return result;
};
LazyWrapper.prototype[methodName + 'Right'] = function(n) {
return this.reverse()[methodName](n).reverse();
};
});
// Add `LazyWrapper` methods that accept an `iteratee` value.
arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
var type = index + 1,
isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
LazyWrapper.prototype[methodName] = function(iteratee) {
var result = this.clone();
result.__iteratees__.push({
'iteratee': getIteratee(iteratee, 3),
'type': type
});
result.__filtered__ = result.__filtered__ || isFilter;
return result;
};
});
// Add `LazyWrapper` methods for `_.head` and `_.last`.
arrayEach(['head', 'last'], function(methodName, index) {
var takeName = 'take' + (index ? 'Right' : '');
LazyWrapper.prototype[methodName] = function() {
return this[takeName](1).value()[0];
};
});
// Add `LazyWrapper` methods for `_.initial` and `_.tail`.
arrayEach(['initial', 'tail'], function(methodName, index) {
var dropName = 'drop' + (index ? '' : 'Right');
LazyWrapper.prototype[methodName] = function() {
return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
};
});
LazyWrapper.prototype.compact = function() {
return this.filter(identity);
};
LazyWrapper.prototype.find = function(predicate) {
return this.filter(predicate).head();
};
LazyWrapper.prototype.findLast = function(predicate) {
return this.reverse().find(predicate);
};
LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
if (typeof path == 'function') {
return new LazyWrapper(this);
}
return this.map(function(value) {
return baseInvoke(value, path, args);
});
});
LazyWrapper.prototype.reject = function(predicate) {
return this.filter(negate(getIteratee(predicate)));
};
LazyWrapper.prototype.slice = function(start, end) {
start = toInteger(start);
var result = this;
if (result.__filtered__ && (start > 0 || end < 0)) {
return new LazyWrapper(result);
}
if (start < 0) {
result = result.takeRight(-start);
} else if (start) {
result = result.drop(start);
}
if (end !== undefined) {
end = toInteger(end);
result = end < 0 ? result.dropRight(-end) : result.take(end - start);
}
return result;
};
LazyWrapper.prototype.takeRightWhile = function(predicate) {
return this.reverse().takeWhile(predicate).reverse();
};
LazyWrapper.prototype.toArray = function() {
return this.take(MAX_ARRAY_LENGTH);
};
// Add `LazyWrapper` methods to `lodash.prototype`.
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
isTaker = /^(?:head|last)$/.test(methodName),
lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
retUnwrapped = isTaker || /^find/.test(methodName);
if (!lodashFunc) {
return;
}
lodash.prototype[methodName] = function() {
var value = this.__wrapped__,
args = isTaker ? [1] : arguments,
isLazy = value instanceof LazyWrapper,
iteratee = args[0],
useLazy = isLazy || isArray(value);
var interceptor = function(value) {
var result = lodashFunc.apply(lodash, arrayPush([value], args));
return (isTaker && chainAll) ? result[0] : result;
};
if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
// Avoid lazy use if the iteratee has a "length" value other than `1`.
isLazy = useLazy = false;
}
var chainAll = this.__chain__,
isHybrid = !!this.__actions__.length,
isUnwrapped = retUnwrapped && !chainAll,
onlyLazy = isLazy && !isHybrid;
if (!retUnwrapped && useLazy) {
value = onlyLazy ? value : new LazyWrapper(this);
var result = func.apply(value, args);
result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
return new LodashWrapper(result, chainAll);
}
if (isUnwrapped && onlyLazy) {
return func.apply(this, args);
}
result = this.thru(interceptor);
return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
};
});
// Add `Array` methods to `lodash.prototype`.
arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
var func = arrayProto[methodName],
chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
retUnwrapped = /^(?:pop|shift)$/.test(methodName);
lodash.prototype[methodName] = function() {
var args = arguments;
if (retUnwrapped && !this.__chain__) {
var value = this.value();
return func.apply(isArray(value) ? value : [], args);
}
return this[chainName](function(value) {
return func.apply(isArray(value) ? value : [], args);
});
};
});
// Map minified method names to their real names.
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
var lodashFunc = lodash[methodName];
if (lodashFunc) {
var key = lodashFunc.name + '';
if (!hasOwnProperty.call(realNames, key)) {
realNames[key] = [];
}
realNames[key].push({ 'name': methodName, 'func': lodashFunc });
}
});
realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
'name': 'wrapper',
'func': undefined
}];
// Add methods to `LazyWrapper`.
LazyWrapper.prototype.clone = lazyClone;
LazyWrapper.prototype.reverse = lazyReverse;
LazyWrapper.prototype.value = lazyValue;
// Add chain sequence methods to the `lodash` wrapper.
lodash.prototype.at = wrapperAt;
lodash.prototype.chain = wrapperChain;
lodash.prototype.commit = wrapperCommit;
lodash.prototype.next = wrapperNext;
lodash.prototype.plant = wrapperPlant;
lodash.prototype.reverse = wrapperReverse;
lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
// Add lazy aliases.
lodash.prototype.first = lodash.prototype.head;
if (symIterator) {
lodash.prototype[symIterator] = wrapperToIterator;
}
return lodash;
});
/*--------------------------------------------------------------------------*/
// Export lodash.
var _ = runInContext();
// Some AMD build optimizers, like r.js, check for condition patterns like:
if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
// Expose Lodash on the global object to prevent errors when Lodash is
// loaded by a script tag in the presence of an AMD loader.
// See http://requirejs.org/docs/errors.html#mismatch for more details.
// Use `_.noConflict` to remove Lodash from the global object.
root._ = _;
// Define as an anonymous module so, through path mapping, it can be
// referenced as the "underscore" module.
define(function() {
return _;
});
}
// Check for `exports` after `define` in case a build optimizer adds it.
else if (freeModule) {
// Export for Node.js.
(freeModule.exports = _)._ = _;
// Export for CommonJS support.
freeExports._ = _;
}
else {
// Export to the global object.
root._ = _;
}
}.call(this));
lodash.min.js 0000644 00000212061 15153765737 0007163 0 ustar 00 /**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function r(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&!1!==t(n[r],r,n););return n}function e(n,t){for(var r=null==n?0:n.length;r--&&!1!==t(n[r],r,n););return n}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return!1;return!0}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function o(n,t){return!(null==n||!n.length)&&g(n,t,0)>-1}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return!0;return!1}function c(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function h(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function p(n){return n.match(Jn)||[]}function _(n,t,r){var e;return r(n,(function(n,r,u){if(t(n,r,u))return e=r,!1})),e}function v(n,t,r,e){for(var u=n.length,i=r+(e?1:-1);e?i--:++i<u;)if(t(n[i],i,n))return i;return-1}function g(n,t,r){return t==t?function(n,t,r){for(var e=r-1,u=n.length;++e<u;)if(n[e]===t)return e;return-1}(n,t,r):v(n,d,r)}function y(n,t,r,e){for(var u=r-1,i=n.length;++u<i;)if(e(n[u],t))return u;return-1}function d(n){return n!=n}function b(n,t){var r=null==n?0:n.length;return r?j(n,t)/r:X}function w(n){return function(t){return null==t?N:t[n]}}function m(n){return function(t){return null==n?N:n[t]}}function x(n,t,r,e,u){return u(n,(function(n,u,i){r=e?(e=!1,n):t(r,n,u,i)})),r}function j(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==N&&(r=r===N?i:r+i)}return r}function A(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function k(n){return n?n.slice(0,M(n)+1).replace(Zn,""):n}function O(n){return function(t){return n(t)}}function I(n,t){return c(t,(function(t){return n[t]}))}function R(n,t){return n.has(t)}function z(n,t){for(var r=-1,e=n.length;++r<e&&g(t,n[r],0)>-1;);return r}function E(n,t){for(var r=n.length;r--&&g(t,n[r],0)>-1;);return r}function S(n){return"\\"+Ht[n]}function W(n){return Pt.test(n)}function L(n){return qt.test(n)}function C(n){var t=-1,r=Array(n.size);return n.forEach((function(n,e){r[++t]=[e,n]})),r}function U(n,t){return function(r){return n(t(r))}}function B(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&o!==Z||(n[r]=Z,i[u++]=r)}return i}function T(n){var t=-1,r=Array(n.size);return n.forEach((function(n){r[++t]=n})),r}function $(n){return W(n)?function(n){for(var t=Ft.lastIndex=0;Ft.test(n);)++t;return t}(n):hr(n)}function D(n){return W(n)?function(n){return n.match(Ft)||[]}(n):function(n){return n.split("")}(n)}function M(n){for(var t=n.length;t--&&Kn.test(n.charAt(t)););return t}function F(n){return n.match(Nt)||[]}var N,P="Expected a function",q="__lodash_hash_undefined__",Z="__lodash_placeholder__",K=16,V=32,G=64,H=128,J=256,Y=1/0,Q=9007199254740991,X=NaN,nn=4294967295,tn=[["ary",H],["bind",1],["bindKey",2],["curry",8],["curryRight",K],["flip",512],["partial",V],["partialRight",G],["rearg",J]],rn="[object Arguments]",en="[object Array]",un="[object Boolean]",on="[object Date]",fn="[object Error]",cn="[object Function]",an="[object GeneratorFunction]",ln="[object Map]",sn="[object Number]",hn="[object Object]",pn="[object Promise]",_n="[object RegExp]",vn="[object Set]",gn="[object String]",yn="[object Symbol]",dn="[object WeakMap]",bn="[object ArrayBuffer]",wn="[object DataView]",mn="[object Float32Array]",xn="[object Float64Array]",jn="[object Int8Array]",An="[object Int16Array]",kn="[object Int32Array]",On="[object Uint8Array]",In="[object Uint8ClampedArray]",Rn="[object Uint16Array]",zn="[object Uint32Array]",En=/\b__p \+= '';/g,Sn=/\b(__p \+=) '' \+/g,Wn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ln=/&(?:amp|lt|gt|quot|#39);/g,Cn=/[&<>"']/g,Un=RegExp(Ln.source),Bn=RegExp(Cn.source),Tn=/<%-([\s\S]+?)%>/g,$n=/<%([\s\S]+?)%>/g,Dn=/<%=([\s\S]+?)%>/g,Mn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fn=/^\w*$/,Nn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pn=/[\\^$.*+?()[\]{}|]/g,qn=RegExp(Pn.source),Zn=/^\s+/,Kn=/\s/,Vn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Gn=/\{\n\/\* \[wrapped with (.+)\] \*/,Hn=/,? & /,Jn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Yn=/[()=,{}\[\]\/\s]/,Qn=/\\(\\)?/g,Xn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,nt=/\w*$/,tt=/^[-+]0x[0-9a-f]+$/i,rt=/^0b[01]+$/i,et=/^\[object .+?Constructor\]$/,ut=/^0o[0-7]+$/i,it=/^(?:0|[1-9]\d*)$/,ot=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ft=/($^)/,ct=/['\n\r\u2028\u2029\\]/g,at="\\ud800-\\udfff",lt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",st="\\u2700-\\u27bf",ht="a-z\\xdf-\\xf6\\xf8-\\xff",pt="A-Z\\xc0-\\xd6\\xd8-\\xde",_t="\\ufe0e\\ufe0f",vt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",gt="['’]",yt="["+at+"]",dt="["+vt+"]",bt="["+lt+"]",wt="\\d+",mt="["+st+"]",xt="["+ht+"]",jt="[^"+at+vt+wt+st+ht+pt+"]",At="\\ud83c[\\udffb-\\udfff]",kt="[^"+at+"]",Ot="(?:\\ud83c[\\udde6-\\uddff]){2}",It="[\\ud800-\\udbff][\\udc00-\\udfff]",Rt="["+pt+"]",zt="\\u200d",Et="(?:"+xt+"|"+jt+")",St="(?:"+Rt+"|"+jt+")",Wt="(?:['’](?:d|ll|m|re|s|t|ve))?",Lt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ct="(?:"+bt+"|"+At+")"+"?",Ut="["+_t+"]?",Bt=Ut+Ct+("(?:"+zt+"(?:"+[kt,Ot,It].join("|")+")"+Ut+Ct+")*"),Tt="(?:"+[mt,Ot,It].join("|")+")"+Bt,$t="(?:"+[kt+bt+"?",bt,Ot,It,yt].join("|")+")",Dt=RegExp(gt,"g"),Mt=RegExp(bt,"g"),Ft=RegExp(At+"(?="+At+")|"+$t+Bt,"g"),Nt=RegExp([Rt+"?"+xt+"+"+Wt+"(?="+[dt,Rt,"$"].join("|")+")",St+"+"+Lt+"(?="+[dt,Rt+Et,"$"].join("|")+")",Rt+"?"+Et+"+"+Wt,Rt+"+"+Lt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wt,Tt].join("|"),"g"),Pt=RegExp("["+zt+at+lt+_t+"]"),qt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Kt=-1,Vt={};Vt[mn]=Vt[xn]=Vt[jn]=Vt[An]=Vt[kn]=Vt[On]=Vt[In]=Vt[Rn]=Vt[zn]=!0,Vt[rn]=Vt[en]=Vt[bn]=Vt[un]=Vt[wn]=Vt[on]=Vt[fn]=Vt[cn]=Vt[ln]=Vt[sn]=Vt[hn]=Vt[_n]=Vt[vn]=Vt[gn]=Vt[dn]=!1;var Gt={};Gt[rn]=Gt[en]=Gt[bn]=Gt[wn]=Gt[un]=Gt[on]=Gt[mn]=Gt[xn]=Gt[jn]=Gt[An]=Gt[kn]=Gt[ln]=Gt[sn]=Gt[hn]=Gt[_n]=Gt[vn]=Gt[gn]=Gt[yn]=Gt[On]=Gt[In]=Gt[Rn]=Gt[zn]=!0,Gt[fn]=Gt[cn]=Gt[dn]=!1;var Ht={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Jt=parseFloat,Yt=parseInt,Qt="object"==typeof global&&global&&global.Object===Object&&global,Xt="object"==typeof self&&self&&self.Object===Object&&self,nr=Qt||Xt||Function("return this")(),tr="object"==typeof exports&&exports&&!exports.nodeType&&exports,rr=tr&&"object"==typeof module&&module&&!module.nodeType&&module,er=rr&&rr.exports===tr,ur=er&&Qt.process,ir=function(){try{var n=rr&&rr.require&&rr.require("util").types;return n||ur&&ur.binding&&ur.binding("util")}catch(n){}}(),or=ir&&ir.isArrayBuffer,fr=ir&&ir.isDate,cr=ir&&ir.isMap,ar=ir&&ir.isRegExp,lr=ir&&ir.isSet,sr=ir&&ir.isTypedArray,hr=w("length"),pr=m({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),_r=m({"&":"&","<":"<",">":">",'"':""","'":"'"}),vr=m({"&":"&","<":"<",">":">",""":'"',"'":"'"}),gr=function m(Kn){function Jn(n){if($u(n)&&!zf(n)&&!(n instanceof st)){if(n instanceof lt)return n;if(Ii.call(n,"__wrapped__"))return lu(n)}return new lt(n)}function at(){}function lt(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=N}function st(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=nn,this.__views__=[]}function ht(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function pt(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function _t(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function vt(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new _t;++t<r;)this.add(n[t])}function gt(n){this.size=(this.__data__=new pt(n)).size}function yt(n,t){var r=zf(n),e=!r&&Rf(n),u=!r&&!e&&Sf(n),i=!r&&!e&&!u&&Bf(n),o=r||e||u||i,f=o?A(n.length,wi):[],c=f.length;for(var a in n)!t&&!Ii.call(n,a)||o&&("length"==a||u&&("offset"==a||"parent"==a)||i&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||Ge(a,c))||f.push(a);return f}function dt(n){var t=n.length;return t?n[Sr(0,t-1)]:N}function bt(n,t){return ou(ce(n),Rt(t,0,n.length))}function wt(n){return ou(ce(n))}function mt(n,t,r){(r===N||Eu(n[t],r))&&(r!==N||t in n)||Ot(n,t,r)}function xt(n,t,r){var e=n[t];Ii.call(n,t)&&Eu(e,r)&&(r!==N||t in n)||Ot(n,t,r)}function jt(n,t){for(var r=n.length;r--;)if(Eu(n[r][0],t))return r;return-1}function At(n,t,r,e){return Oo(n,(function(n,u,i){t(e,n,r(n),i)})),e}function kt(n,t){return n&&ae(t,Qu(t),n)}function Ot(n,t,r){"__proto__"==t&&Zi?Zi(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r}function It(n,t){for(var r=-1,e=t.length,u=pi(e),i=null==n;++r<e;)u[r]=i?N:Ju(n,t[r]);return u}function Rt(n,t,r){return n==n&&(r!==N&&(n=n<=r?n:r),t!==N&&(n=n>=t?n:t)),n}function zt(n,t,e,u,i,o){var f,c=1&t,a=2&t,l=4&t;if(e&&(f=i?e(n,u,i,o):e(n)),f!==N)return f;if(!Tu(n))return n;var s=zf(n);if(s){if(f=function(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&Ii.call(n,"index")&&(r.index=n.index,r.input=n.input),r}(n),!c)return ce(n,f)}else{var h=$o(n),p=h==cn||h==an;if(Sf(n))return re(n,c);if(h==hn||h==rn||p&&!i){if(f=a||p?{}:Ke(n),!c)return a?function(n,t){return ae(n,To(n),t)}(n,function(n,t){return n&&ae(t,Xu(t),n)}(f,n)):function(n,t){return ae(n,Bo(n),t)}(n,kt(f,n))}else{if(!Gt[h])return i?n:{};f=function(n,t,r){var e=n.constructor;switch(t){case bn:return ee(n);case un:case on:return new e(+n);case wn:return function(n,t){return new n.constructor(t?ee(n.buffer):n.buffer,n.byteOffset,n.byteLength)}(n,r);case mn:case xn:case jn:case An:case kn:case On:case In:case Rn:case zn:return ue(n,r);case ln:return new e;case sn:case gn:return new e(n);case _n:return function(n){var t=new n.constructor(n.source,nt.exec(n));return t.lastIndex=n.lastIndex,t}(n);case vn:return new e;case yn:return function(n){return jo?di(jo.call(n)):{}}(n)}}(n,h,c)}}o||(o=new gt);var _=o.get(n);if(_)return _;o.set(n,f),Uf(n)?n.forEach((function(r){f.add(zt(r,t,e,r,n,o))})):Lf(n)&&n.forEach((function(r,u){f.set(u,zt(r,t,e,u,n,o))}));var v=s?N:(l?a?$e:Te:a?Xu:Qu)(n);return r(v||n,(function(r,u){v&&(r=n[u=r]),xt(f,u,zt(r,t,e,u,n,o))})),f}function Et(n,t,r){var e=r.length;if(null==n)return!e;for(n=di(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===N&&!(u in n)||!i(o))return!1}return!0}function St(n,t,r){if("function"!=typeof n)throw new mi(P);return Fo((function(){n.apply(N,r)}),t)}function Wt(n,t,r,e){var u=-1,i=o,a=!0,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=c(t,O(r))),e?(i=f,a=!1):t.length>=200&&(i=R,a=!1,t=new vt(t));n:for(;++u<l;){var p=n[u],_=null==r?p:r(p);if(p=e||0!==p?p:0,a&&_==_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function Lt(n,t){var r=!0;return Oo(n,(function(n,e,u){return r=!!t(n,e,u)})),r}function Ct(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===N?o==o&&!Nu(o):r(o,f)))var f=o,c=i}return c}function Ut(n,t){var r=[];return Oo(n,(function(n,e,u){t(n,e,u)&&r.push(n)})),r}function Bt(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Ve),u||(u=[]);++i<o;){var f=n[i];t>0&&r(f)?t>1?Bt(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function Tt(n,t){return n&&Ro(n,t,Qu)}function $t(n,t){return n&&zo(n,t,Qu)}function Ft(n,t){return i(t,(function(t){return Cu(n[t])}))}function Nt(n,t){for(var r=0,e=(t=ne(t,n)).length;null!=n&&r<e;)n=n[fu(t[r++])];return r&&r==e?n:N}function Pt(n,t,r){var e=t(n);return zf(n)?e:a(e,r(n))}function qt(n){return null==n?n===N?"[object Undefined]":"[object Null]":qi&&qi in di(n)?function(n){var t=Ii.call(n,qi),r=n[qi];try{n[qi]=N;var e=!0}catch(n){}var u=Ei.call(n);return e&&(t?n[qi]=r:delete n[qi]),u}(n):function(n){return Ei.call(n)}(n)}function Ht(n,t){return n>t}function Qt(n,t){return null!=n&&Ii.call(n,t)}function Xt(n,t){return null!=n&&t in di(n)}function tr(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=pi(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,O(t))),s=eo(p.length,s),l[a]=!r&&(t||u>=120&&p.length>=120)?new vt(a&&p):N}p=n[0];var _=-1,v=l[0];n:for(;++_<u&&h.length<s;){var g=p[_],y=t?t(g):g;if(g=r||0!==g?g:0,!(v?R(v,y):e(h,y,r))){for(a=i;--a;){var d=l[a];if(!(d?R(d,y):e(n[a],y,r)))continue n}v&&v.push(y),h.push(g)}}return h}function rr(t,r,e){var u=null==(t=ru(t,r=ne(r,t)))?t:t[fu(vu(r))];return null==u?N:n(u,t,e)}function ur(n){return $u(n)&&qt(n)==rn}function ir(n,t,r,e,u){return n===t||(null==n||null==t||!$u(n)&&!$u(t)?n!=n&&t!=t:function(n,t,r,e,u,i){var o=zf(n),f=zf(t),c=o?en:$o(n),a=f?en:$o(t);c=c==rn?hn:c,a=a==rn?hn:a;var l=c==hn,s=a==hn,h=c==a;if(h&&Sf(n)){if(!Sf(t))return!1;o=!0,l=!1}if(h&&!l)return i||(i=new gt),o||Bf(n)?Ue(n,t,r,e,u,i):function(n,t,r,e,u,i,o){switch(r){case wn:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;n=n.buffer,t=t.buffer;case bn:return!(n.byteLength!=t.byteLength||!i(new Bi(n),new Bi(t)));case un:case on:case sn:return Eu(+n,+t);case fn:return n.name==t.name&&n.message==t.message;case _n:case gn:return n==t+"";case ln:var f=C;case vn:var c=1&e;if(f||(f=T),n.size!=t.size&&!c)return!1;var a=o.get(n);if(a)return a==t;e|=2,o.set(n,t);var l=Ue(f(n),f(t),e,u,i,o);return o.delete(n),l;case yn:if(jo)return jo.call(n)==jo.call(t)}return!1}(n,t,c,r,e,u,i);if(!(1&r)){var p=l&&Ii.call(n,"__wrapped__"),_=s&&Ii.call(t,"__wrapped__");if(p||_){var v=p?n.value():n,g=_?t.value():t;return i||(i=new gt),u(v,g,r,e,i)}}return!!h&&(i||(i=new gt),function(n,t,r,e,u,i){var o=1&r,f=Te(n),c=f.length;if(c!=Te(t).length&&!o)return!1;for(var a=c;a--;){var l=f[a];if(!(o?l in t:Ii.call(t,l)))return!1}var s=i.get(n),h=i.get(t);if(s&&h)return s==t&&h==n;var p=!0;i.set(n,t),i.set(t,n);for(var _=o;++a<c;){var v=n[l=f[a]],g=t[l];if(e)var y=o?e(g,v,l,t,n,i):e(v,g,l,n,t,i);if(!(y===N?v===g||u(v,g,r,e,i):y)){p=!1;break}_||(_="constructor"==l)}if(p&&!_){var d=n.constructor,b=t.constructor;d!=b&&"constructor"in n&&"constructor"in t&&!("function"==typeof d&&d instanceof d&&"function"==typeof b&&b instanceof b)&&(p=!1)}return i.delete(n),i.delete(t),p}(n,t,r,e,u,i))}(n,t,r,e,ir,u))}function hr(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=di(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return!1}for(;++u<i;){var c=(f=r[u])[0],a=n[c],l=f[1];if(o&&f[2]){if(a===N&&!(c in n))return!1}else{var s=new gt;if(e)var h=e(a,l,c,n,t,s);if(!(h===N?ir(l,a,3,e,s):h))return!1}}return!0}function yr(n){return!(!Tu(n)||function(n){return!!zi&&zi in n}(n))&&(Cu(n)?Li:et).test(cu(n))}function dr(n){return"function"==typeof n?n:null==n?oi:"object"==typeof n?zf(n)?Ar(n[0],n[1]):jr(n):li(n)}function br(n){if(!Qe(n))return to(n);var t=[];for(var r in di(n))Ii.call(n,r)&&"constructor"!=r&&t.push(r);return t}function wr(n){if(!Tu(n))return function(n){var t=[];if(null!=n)for(var r in di(n))t.push(r);return t}(n);var t=Qe(n),r=[];for(var e in n)("constructor"!=e||!t&&Ii.call(n,e))&&r.push(e);return r}function mr(n,t){return n<t}function xr(n,t){var r=-1,e=Su(n)?pi(n.length):[];return Oo(n,(function(n,u,i){e[++r]=t(n,u,i)})),e}function jr(n){var t=Pe(n);return 1==t.length&&t[0][2]?nu(t[0][0],t[0][1]):function(r){return r===n||hr(r,n,t)}}function Ar(n,t){return Je(n)&&Xe(t)?nu(fu(n),t):function(r){var e=Ju(r,n);return e===N&&e===t?Yu(r,n):ir(t,e,3)}}function kr(n,t,r,e,u){n!==t&&Ro(t,(function(i,o){if(u||(u=new gt),Tu(i))!function(n,t,r,e,u,i,o){var f=eu(n,r),c=eu(t,r),a=o.get(c);if(a)return mt(n,r,a),N;var l=i?i(f,c,r+"",n,t,o):N,s=l===N;if(s){var h=zf(c),p=!h&&Sf(c),_=!h&&!p&&Bf(c);l=c,h||p||_?zf(f)?l=f:Wu(f)?l=ce(f):p?(s=!1,l=re(c,!0)):_?(s=!1,l=ue(c,!0)):l=[]:Mu(c)||Rf(c)?(l=f,Rf(f)?l=Gu(f):Tu(f)&&!Cu(f)||(l=Ke(c))):s=!1}s&&(o.set(c,l),u(l,c,e,i,o),o.delete(c)),mt(n,r,l)}(n,t,o,r,kr,e,u);else{var f=e?e(eu(n,o),i,o+"",n,t,u):N;f===N&&(f=i),mt(n,o,f)}}),Xu)}function Or(n,t){var r=n.length;if(r)return Ge(t+=t<0?r:0,r)?n[t]:N}function Ir(n,t,r){t=t.length?c(t,(function(n){return zf(n)?function(t){return Nt(t,1===n.length?n[0]:n)}:n})):[oi];var e=-1;return t=c(t,O(Fe())),function(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].value;return n}(xr(n,(function(n,r,u){return{criteria:c(t,(function(t){return t(n)})),index:++e,value:n}})),(function(n,t){return function(n,t,r){for(var e=-1,u=n.criteria,i=t.criteria,o=u.length,f=r.length;++e<o;){var c=ie(u[e],i[e]);if(c)return e>=f?c:c*("desc"==r[e]?-1:1)}return n.index-t.index}(n,t,r)}))}function Rr(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=Nt(n,o);r(f,o)&&Br(i,ne(o,n),f)}return i}function zr(n,t,r,e){var u=e?y:g,i=-1,o=t.length,f=n;for(n===t&&(t=ce(t)),r&&(f=c(n,O(r)));++i<o;)for(var a=0,l=t[i],s=r?r(l):l;(a=u(f,s,a,e))>-1;)f!==n&&Fi.call(f,a,1),Fi.call(n,a,1);return n}function Er(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(r==e||u!==i){var i=u;Ge(u)?Fi.call(n,u,1):Kr(n,u)}}return n}function Sr(n,t){return n+Ji(oo()*(t-n+1))}function Wr(n,t){var r="";if(!n||t<1||t>Q)return r;do{t%2&&(r+=n),(t=Ji(t/2))&&(n+=n)}while(t);return r}function Lr(n,t){return No(tu(n,t,oi),n+"")}function Cr(n){return dt(ti(n))}function Ur(n,t){var r=ti(n);return ou(r,Rt(t,0,r.length))}function Br(n,t,r,e){if(!Tu(n))return n;for(var u=-1,i=(t=ne(t,n)).length,o=i-1,f=n;null!=f&&++u<i;){var c=fu(t[u]),a=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return n;if(u!=o){var l=f[c];(a=e?e(l,c,f):N)===N&&(a=Tu(l)?l:Ge(t[u+1])?[]:{})}xt(f,c,a),f=f[c]}return n}function Tr(n){return ou(ti(n))}function $r(n,t,r){var e=-1,u=n.length;t<0&&(t=-t>u?0:u+t),(r=r>u?u:r)<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=pi(u);++e<u;)i[e]=n[e+t];return i}function Dr(n,t){var r;return Oo(n,(function(n,e,u){return!(r=t(n,e,u))})),!!r}function Mr(n,t,r){var e=0,u=null==n?e:n.length;if("number"==typeof t&&t==t&&u<=2147483647){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!Nu(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return Fr(n,t,oi,r)}function Fr(n,t,r,e){var u=0,i=null==n?0:n.length;if(0===i)return 0;for(var o=(t=r(t))!=t,f=null===t,c=Nu(t),a=t===N;u<i;){var l=Ji((u+i)/2),s=r(n[l]),h=s!==N,p=null===s,_=s==s,v=Nu(s);if(o)var g=e||_;else g=a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):!p&&!v&&(e?s<=t:s<t);g?u=l+1:i=l}return eo(i,4294967294)}function Nr(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r],f=t?t(o):o;if(!r||!Eu(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function Pr(n){return"number"==typeof n?n:Nu(n)?X:+n}function qr(n){if("string"==typeof n)return n;if(zf(n))return c(n,qr)+"";if(Nu(n))return Ao?Ao.call(n):"";var t=n+"";return"0"==t&&1/n==-Y?"-0":t}function Zr(n,t,r){var e=-1,u=o,i=n.length,c=!0,a=[],l=a;if(r)c=!1,u=f;else if(i>=200){var s=t?null:Co(n);if(s)return T(s);c=!1,u=R,l=new vt}else l=t?[]:a;n:for(;++e<i;){var h=n[e],p=t?t(h):h;if(h=r||0!==h?h:0,c&&p==p){for(var _=l.length;_--;)if(l[_]===p)continue n;t&&l.push(p),a.push(h)}else u(l,p,r)||(l!==a&&l.push(p),a.push(h))}return a}function Kr(n,t){return null==(n=ru(n,t=ne(t,n)))||delete n[fu(vu(t))]}function Vr(n,t,r,e){return Br(n,t,r(Nt(n,t)),e)}function Gr(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?$r(n,e?0:i,e?i+1:u):$r(n,e?i+1:0,e?u:i)}function Hr(n,t){var r=n;return r instanceof st&&(r=r.value()),l(t,(function(n,t){return t.func.apply(t.thisArg,a([n],t.args))}),r)}function Jr(n,t,r){var e=n.length;if(e<2)return e?Zr(n[0]):[];for(var u=-1,i=pi(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=Wt(i[u]||o,n[f],t,r));return Zr(Bt(i,1),t,r)}function Yr(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;)r(o,n[e],e<i?t[e]:N);return o}function Qr(n){return Wu(n)?n:[]}function Xr(n){return"function"==typeof n?n:oi}function ne(n,t){return zf(n)?n:Je(n,t)?[n]:Po(Hu(n))}function te(n,t,r){var e=n.length;return r=r===N?e:r,!t&&r>=e?n:$r(n,t,r)}function re(n,t){if(t)return n.slice();var r=n.length,e=Ti?Ti(r):new n.constructor(r);return n.copy(e),e}function ee(n){var t=new n.constructor(n.byteLength);return new Bi(t).set(new Bi(n)),t}function ue(n,t){return new n.constructor(t?ee(n.buffer):n.buffer,n.byteOffset,n.length)}function ie(n,t){if(n!==t){var r=n!==N,e=null===n,u=n==n,i=Nu(n),o=t!==N,f=null===t,c=t==t,a=Nu(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function oe(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=ro(i-o,0),l=pi(c+a),s=!e;++f<c;)l[f]=t[f];for(;++u<o;)(s||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l}function fe(n,t,r,e){for(var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=ro(i-f,0),s=pi(l+a),h=!e;++u<l;)s[u]=n[u];for(var p=u;++c<a;)s[p+c]=t[c];for(;++o<f;)(h||u<i)&&(s[p+r[o]]=n[u++]);return s}function ce(n,t){var r=-1,e=n.length;for(t||(t=pi(e));++r<e;)t[r]=n[r];return t}function ae(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):N;c===N&&(c=n[f]),u?Ot(r,f,c):xt(r,f,c)}return r}function le(n,r){return function(e,u){var i=zf(e)?t:At,o=r?r():{};return i(e,n,Fe(u,2),o)}}function se(n){return Lr((function(t,r){var e=-1,u=r.length,i=u>1?r[u-1]:N,o=u>2?r[2]:N;for(i=n.length>3&&"function"==typeof i?(u--,i):N,o&&He(r[0],r[1],o)&&(i=u<3?N:i,u=1),t=di(t);++e<u;){var f=r[e];f&&n(t,f,e,i)}return t}))}function he(n,t){return function(r,e){if(null==r)return r;if(!Su(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=di(r);(t?i--:++i<u)&&!1!==e(o[i],i,o););return r}}function pe(n){return function(t,r,e){for(var u=-1,i=di(t),o=e(t),f=o.length;f--;){var c=o[n?f:++u];if(!1===r(i[c],c,i))break}return t}}function _e(n){return function(t){var r=W(t=Hu(t))?D(t):N,e=r?r[0]:t.charAt(0),u=r?te(r,1).join(""):t.slice(1);return e[n]()+u}}function ve(n){return function(t){return l(ui(ei(t).replace(Dt,"")),n,"")}}function ge(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=ko(n.prototype),e=n.apply(r,t);return Tu(e)?e:r}}function ye(t,r,e){var u=ge(t);return function i(){for(var o=arguments.length,f=pi(o),c=o,a=Me(i);c--;)f[c]=arguments[c];var l=o<3&&f[0]!==a&&f[o-1]!==a?[]:B(f,a);return(o-=l.length)<e?Re(t,r,we,i.placeholder,N,f,l,N,N,e-o):n(this&&this!==nr&&this instanceof i?u:t,this,f)}}function de(n){return function(t,r,e){var u=di(t);if(!Su(t)){var i=Fe(r,3);t=Qu(t),r=function(n){return i(u[n],n,u)}}var o=n(t,r,e);return o>-1?u[i?t[o]:o]:N}}function be(n){return Be((function(t){var r=t.length,e=r,u=lt.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if("function"!=typeof i)throw new mi(P);if(u&&!o&&"wrapper"==De(i))var o=new lt([],!0)}for(e=o?e:r;++e<r;){var f=De(i=t[e]),c="wrapper"==f?Uo(i):N;o=c&&Ye(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?o[De(c[0])].apply(o,c[3]):1==i.length&&Ye(i)?o[f]():o.thru(i)}return function(){var n=arguments,e=n[0];if(o&&1==n.length&&zf(e))return o.plant(e).value();for(var u=0,i=r?t[u].apply(this,n):e;++u<r;)i=t[u].call(this,i);return i}}))}function we(n,t,r,e,u,i,o,f,c,a){var l=t&H,s=1&t,h=2&t,p=24&t,_=512&t,v=h?N:ge(n);return function g(){for(var y=arguments.length,d=pi(y),b=y;b--;)d[b]=arguments[b];if(p)var w=Me(g),m=function(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}(d,w);if(e&&(d=oe(d,e,u,p)),i&&(d=fe(d,i,o,p)),y-=m,p&&y<a)return Re(n,t,we,g.placeholder,r,d,B(d,w),f,c,a-y);var x=s?r:this,j=h?x[n]:n;return y=d.length,f?d=function(n,t){for(var r=n.length,e=eo(t.length,r),u=ce(n);e--;){var i=t[e];n[e]=Ge(i,r)?u[i]:N}return n}(d,f):_&&y>1&&d.reverse(),l&&c<y&&(d.length=c),this&&this!==nr&&this instanceof g&&(j=v||ge(j)),j.apply(x,d)}}function me(n,t){return function(r,e){return function(n,t,r,e){return Tt(n,(function(n,u,i){t(e,r(n),u,i)})),e}(r,n,t(e),{})}}function xe(n,t){return function(r,e){var u;if(r===N&&e===N)return t;if(r!==N&&(u=r),e!==N){if(u===N)return e;"string"==typeof r||"string"==typeof e?(r=qr(r),e=qr(e)):(r=Pr(r),e=Pr(e)),u=n(r,e)}return u}}function je(t){return Be((function(r){return r=c(r,O(Fe())),Lr((function(e){var u=this;return t(r,(function(t){return n(t,u,e)}))}))}))}function Ae(n,t){var r=(t=t===N?" ":qr(t)).length;if(r<2)return r?Wr(t,n):t;var e=Wr(t,Hi(n/$(t)));return W(t)?te(D(e),0,n).join(""):e.slice(0,n)}function ke(t,r,e,u){var i=1&r,o=ge(t);return function r(){for(var f=-1,c=arguments.length,a=-1,l=u.length,s=pi(l+c),h=this&&this!==nr&&this instanceof r?o:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++f];return n(h,i?e:this,s)}}function Oe(n){return function(t,r,e){return e&&"number"!=typeof e&&He(t,r,e)&&(r=e=N),t=qu(t),r===N?(r=t,t=0):r=qu(r),function(n,t,r,e){for(var u=-1,i=ro(Hi((t-n)/(r||1)),0),o=pi(i);i--;)o[e?i:++u]=n,n+=r;return o}(t,r,e=e===N?t<r?1:-1:qu(e),n)}}function Ie(n){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=Vu(t),r=Vu(r)),n(t,r)}}function Re(n,t,r,e,u,i,o,f,c,a){var l=8&t;t|=l?V:G,4&(t&=~(l?G:V))||(t&=-4);var s=[n,t,u,l?i:N,l?o:N,l?N:i,l?N:o,f,c,a],h=r.apply(N,s);return Ye(n)&&Mo(h,s),h.placeholder=e,uu(h,n,t)}function ze(n){var t=yi[n];return function(n,r){if(n=Vu(n),(r=null==r?0:eo(Zu(r),292))&&Xi(n)){var e=(Hu(n)+"e").split("e");return+((e=(Hu(t(e[0]+"e"+(+e[1]+r)))+"e").split("e"))[0]+"e"+(+e[1]-r))}return t(n)}}function Ee(n){return function(t){var r=$o(t);return r==ln?C(t):r==vn?function(n){var t=-1,r=Array(n.size);return n.forEach((function(n){r[++t]=[n,n]})),r}(t):function(n,t){return c(t,(function(t){return[t,n[t]]}))}(t,n(t))}}function Se(n,t,r,e,u,i,o,f){var c=2&t;if(!c&&"function"!=typeof n)throw new mi(P);var a=e?e.length:0;if(a||(t&=-97,e=u=N),o=o===N?o:ro(Zu(o),0),f=f===N?f:Zu(f),a-=u?u.length:0,t&G){var l=e,s=u;e=u=N}var h=c?N:Uo(n),p=[n,t,r,e,u,l,s,i,o,f];if(h&&function(n,t){var r=n[1],e=t[1],u=r|e,i=u<131,o=e==H&&8==r||e==H&&r==J&&n[7].length<=t[8]||384==e&&t[7].length<=t[8]&&8==r;if(!i&&!o)return n;1&e&&(n[2]=t[2],u|=1&r?0:4);var f=t[3];if(f){var c=n[3];n[3]=c?oe(c,f,t[4]):f,n[4]=c?B(n[3],Z):t[4]}f=t[5],f&&(c=n[5],n[5]=c?fe(c,f,t[6]):f,n[6]=c?B(n[5],Z):t[6]),f=t[7],f&&(n[7]=f),e&H&&(n[8]=null==n[8]?t[8]:eo(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=u}(p,h),n=p[0],t=p[1],r=p[2],e=p[3],u=p[4],!(f=p[9]=p[9]===N?c?0:n.length:ro(p[9]-a,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||t==K?ye(n,t,f):t!=V&&33!=t||u.length?we.apply(N,p):ke(n,t,r,e);else var _=function(n,t,r){var e=1&t,u=ge(n);return function t(){return(this&&this!==nr&&this instanceof t?u:n).apply(e?r:this,arguments)}}(n,t,r);return uu((h?Eo:Mo)(_,p),n,t)}function We(n,t,r,e){return n===N||Eu(n,Ai[r])&&!Ii.call(e,r)?t:n}function Le(n,t,r,e,u,i){return Tu(n)&&Tu(t)&&(i.set(t,n),kr(n,t,N,Le,i),i.delete(t)),n}function Ce(n){return Mu(n)?N:n}function Ue(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return!1;var a=i.get(n),l=i.get(t);if(a&&l)return a==t&&l==n;var s=-1,p=!0,_=2&r?new vt:N;for(i.set(n,t),i.set(t,n);++s<f;){var v=n[s],g=t[s];if(e)var y=o?e(g,v,s,t,n,i):e(v,g,s,n,t,i);if(y!==N){if(y)continue;p=!1;break}if(_){if(!h(t,(function(n,t){if(!R(_,t)&&(v===n||u(v,n,r,e,i)))return _.push(t)}))){p=!1;break}}else if(v!==g&&!u(v,g,r,e,i)){p=!1;break}}return i.delete(n),i.delete(t),p}function Be(n){return No(tu(n,N,pu),n+"")}function Te(n){return Pt(n,Qu,Bo)}function $e(n){return Pt(n,Xu,To)}function De(n){for(var t=n.name+"",r=vo[t],e=Ii.call(vo,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function Me(n){return(Ii.call(Jn,"placeholder")?Jn:n).placeholder}function Fe(){var n=Jn.iteratee||fi;return n=n===fi?dr:n,arguments.length?n(arguments[0],arguments[1]):n}function Ne(n,t){var r=n.__data__;return function(n){var t=typeof n;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==n:null===n}(t)?r["string"==typeof t?"string":"hash"]:r.map}function Pe(n){for(var t=Qu(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,Xe(u)]}return t}function qe(n,t){var r=function(n,t){return null==n?N:n[t]}(n,t);return yr(r)?r:N}function Ze(n,t,r){for(var e=-1,u=(t=ne(t,n)).length,i=!1;++e<u;){var o=fu(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:!!(u=null==n?0:n.length)&&Bu(u)&&Ge(o,u)&&(zf(n)||Rf(n))}function Ke(n){return"function"!=typeof n.constructor||Qe(n)?{}:ko($i(n))}function Ve(n){return zf(n)||Rf(n)||!!(Ni&&n&&n[Ni])}function Ge(n,t){var r=typeof n;return!!(t=null==t?Q:t)&&("number"==r||"symbol"!=r&&it.test(n))&&n>-1&&n%1==0&&n<t}function He(n,t,r){if(!Tu(r))return!1;var e=typeof t;return!!("number"==e?Su(r)&&Ge(t,r.length):"string"==e&&t in r)&&Eu(r[t],n)}function Je(n,t){if(zf(n))return!1;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!Nu(n))||Fn.test(n)||!Mn.test(n)||null!=t&&n in di(t)}function Ye(n){var t=De(n),r=Jn[t];if("function"!=typeof r||!(t in st.prototype))return!1;if(n===r)return!0;var e=Uo(r);return!!e&&n===e[0]}function Qe(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||Ai)}function Xe(n){return n==n&&!Tu(n)}function nu(n,t){return function(r){return null!=r&&r[n]===t&&(t!==N||n in di(r))}}function tu(t,r,e){return r=ro(r===N?t.length-1:r,0),function(){for(var u=arguments,i=-1,o=ro(u.length-r,0),f=pi(o);++i<o;)f[i]=u[r+i];i=-1;for(var c=pi(r+1);++i<r;)c[i]=u[i];return c[r]=e(f),n(t,this,c)}}function ru(n,t){return t.length<2?n:Nt(n,$r(t,0,-1))}function eu(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}function uu(n,t,r){var e=t+"";return No(n,function(n,t){var r=t.length;if(!r)return n;var e=r-1;return t[e]=(r>1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Vn,"{\n/* [wrapped with "+t+"] */\n")}(e,au(function(n){var t=n.match(Gn);return t?t[1].split(Hn):[]}(e),r)))}function iu(n){var t=0,r=0;return function(){var e=uo(),u=16-(e-r);if(r=e,u>0){if(++t>=800)return arguments[0]}else t=0;return n.apply(N,arguments)}}function ou(n,t){var r=-1,e=n.length,u=e-1;for(t=t===N?e:t;++r<t;){var i=Sr(r,u),o=n[i];n[i]=n[r],n[r]=o}return n.length=t,n}function fu(n){if("string"==typeof n||Nu(n))return n;var t=n+"";return"0"==t&&1/n==-Y?"-0":t}function cu(n){if(null!=n){try{return Oi.call(n)}catch(n){}try{return n+""}catch(n){}}return""}function au(n,t){return r(tn,(function(r){var e="_."+r[0];t&r[1]&&!o(n,e)&&n.push(e)})),n.sort()}function lu(n){if(n instanceof st)return n.clone();var t=new lt(n.__wrapped__,n.__chain__);return t.__actions__=ce(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function su(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:Zu(r);return u<0&&(u=ro(e+u,0)),v(n,Fe(t,3),u)}function hu(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==N&&(u=Zu(r),u=r<0?ro(e+u,0):eo(u,e-1)),v(n,Fe(t,3),u,!0)}function pu(n){return null!=n&&n.length?Bt(n,1):[]}function _u(n){return n&&n.length?n[0]:N}function vu(n){var t=null==n?0:n.length;return t?n[t-1]:N}function gu(n,t){return n&&n.length&&t&&t.length?zr(n,t):n}function yu(n){return null==n?n:fo.call(n)}function du(n){if(!n||!n.length)return[];var t=0;return n=i(n,(function(n){if(Wu(n))return t=ro(n.length,t),!0})),A(t,(function(t){return c(n,w(t))}))}function bu(t,r){if(!t||!t.length)return[];var e=du(t);return null==r?e:c(e,(function(t){return n(r,N,t)}))}function wu(n){var t=Jn(n);return t.__chain__=!0,t}function mu(n,t){return t(n)}function xu(n,t){return(zf(n)?r:Oo)(n,Fe(t,3))}function ju(n,t){return(zf(n)?e:Io)(n,Fe(t,3))}function Au(n,t){return(zf(n)?c:xr)(n,Fe(t,3))}function ku(n,t,r){return t=r?N:t,t=n&&null==t?n.length:t,Se(n,H,N,N,N,N,t)}function Ou(n,t){var r;if("function"!=typeof t)throw new mi(P);return n=Zu(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=N),r}}function Iu(n,t,r){function e(t){var r=c,e=a;return c=a=N,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return p===N||r>=t||r<0||g&&n-_>=l}function i(){var n=yf();return u(n)?o(n):(h=Fo(i,function(n){var r=t-(n-p);return g?eo(r,l-(n-_)):r}(n)),N)}function o(n){return h=N,y&&c?e(n):(c=a=N,s)}function f(){var n=yf(),r=u(n);if(c=arguments,a=this,p=n,r){if(h===N)return function(n){return _=n,h=Fo(i,t),v?e(n):s}(p);if(g)return Lo(h),h=Fo(i,t),e(p)}return h===N&&(h=Fo(i,t)),s}var c,a,l,s,h,p,_=0,v=!1,g=!1,y=!0;if("function"!=typeof n)throw new mi(P);return t=Vu(t)||0,Tu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?ro(Vu(r.maxWait)||0,t):l,y="trailing"in r?!!r.trailing:y),f.cancel=function(){h!==N&&Lo(h),_=0,c=p=a=h=N},f.flush=function(){return h===N?s:o(yf())},f}function Ru(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new mi(P);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Ru.Cache||_t),r}function zu(n){if("function"!=typeof n)throw new mi(P);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Eu(n,t){return n===t||n!=n&&t!=t}function Su(n){return null!=n&&Bu(n.length)&&!Cu(n)}function Wu(n){return $u(n)&&Su(n)}function Lu(n){if(!$u(n))return!1;var t=qt(n);return t==fn||"[object DOMException]"==t||"string"==typeof n.message&&"string"==typeof n.name&&!Mu(n)}function Cu(n){if(!Tu(n))return!1;var t=qt(n);return t==cn||t==an||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Uu(n){return"number"==typeof n&&n==Zu(n)}function Bu(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=Q}function Tu(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function $u(n){return null!=n&&"object"==typeof n}function Du(n){return"number"==typeof n||$u(n)&&qt(n)==sn}function Mu(n){if(!$u(n)||qt(n)!=hn)return!1;var t=$i(n);if(null===t)return!0;var r=Ii.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Oi.call(r)==Si}function Fu(n){return"string"==typeof n||!zf(n)&&$u(n)&&qt(n)==gn}function Nu(n){return"symbol"==typeof n||$u(n)&&qt(n)==yn}function Pu(n){if(!n)return[];if(Su(n))return Fu(n)?D(n):ce(n);if(Pi&&n[Pi])return function(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}(n[Pi]());var t=$o(n);return(t==ln?C:t==vn?T:ti)(n)}function qu(n){return n?(n=Vu(n))===Y||n===-Y?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}function Zu(n){var t=qu(n),r=t%1;return t==t?r?t-r:t:0}function Ku(n){return n?Rt(Zu(n),0,nn):0}function Vu(n){if("number"==typeof n)return n;if(Nu(n))return X;if(Tu(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=Tu(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=k(n);var r=rt.test(n);return r||ut.test(n)?Yt(n.slice(2),r?2:8):tt.test(n)?X:+n}function Gu(n){return ae(n,Xu(n))}function Hu(n){return null==n?"":qr(n)}function Ju(n,t,r){var e=null==n?N:Nt(n,t);return e===N?r:e}function Yu(n,t){return null!=n&&Ze(n,t,Xt)}function Qu(n){return Su(n)?yt(n):br(n)}function Xu(n){return Su(n)?yt(n,!0):wr(n)}function ni(n,t){if(null==n)return{};var r=c($e(n),(function(n){return[n]}));return t=Fe(t),Rr(n,r,(function(n,r){return t(n,r[0])}))}function ti(n){return null==n?[]:I(n,Qu(n))}function ri(n){return cc(Hu(n).toLowerCase())}function ei(n){return(n=Hu(n))&&n.replace(ot,pr).replace(Mt,"")}function ui(n,t,r){return n=Hu(n),(t=r?N:t)===N?L(n)?F(n):p(n):n.match(t)||[]}function ii(n){return function(){return n}}function oi(n){return n}function fi(n){return dr("function"==typeof n?n:zt(n,1))}function ci(n,t,e){var u=Qu(t),i=Ft(t,u);null!=e||Tu(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=Ft(t,Qu(t)));var o=!(Tu(e)&&"chain"in e&&!e.chain),f=Cu(n);return r(i,(function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=ce(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})})),n}function ai(){}function li(n){return Je(n)?w(fu(n)):function(n){return function(t){return Nt(t,n)}}(n)}function si(){return[]}function hi(){return!1}var pi=(Kn=null==Kn?nr:gr.defaults(nr.Object(),Kn,gr.pick(nr,Zt))).Array,_i=Kn.Date,vi=Kn.Error,gi=Kn.Function,yi=Kn.Math,di=Kn.Object,bi=Kn.RegExp,wi=Kn.String,mi=Kn.TypeError,xi=pi.prototype,ji=gi.prototype,Ai=di.prototype,ki=Kn["__core-js_shared__"],Oi=ji.toString,Ii=Ai.hasOwnProperty,Ri=0,zi=function(){var n=/[^.]+$/.exec(ki&&ki.keys&&ki.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),Ei=Ai.toString,Si=Oi.call(di),Wi=nr._,Li=bi("^"+Oi.call(Ii).replace(Pn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ci=er?Kn.Buffer:N,Ui=Kn.Symbol,Bi=Kn.Uint8Array,Ti=Ci?Ci.allocUnsafe:N,$i=U(di.getPrototypeOf,di),Di=di.create,Mi=Ai.propertyIsEnumerable,Fi=xi.splice,Ni=Ui?Ui.isConcatSpreadable:N,Pi=Ui?Ui.iterator:N,qi=Ui?Ui.toStringTag:N,Zi=function(){try{var n=qe(di,"defineProperty");return n({},"",{}),n}catch(n){}}(),Ki=Kn.clearTimeout!==nr.clearTimeout&&Kn.clearTimeout,Vi=_i&&_i.now!==nr.Date.now&&_i.now,Gi=Kn.setTimeout!==nr.setTimeout&&Kn.setTimeout,Hi=yi.ceil,Ji=yi.floor,Yi=di.getOwnPropertySymbols,Qi=Ci?Ci.isBuffer:N,Xi=Kn.isFinite,no=xi.join,to=U(di.keys,di),ro=yi.max,eo=yi.min,uo=_i.now,io=Kn.parseInt,oo=yi.random,fo=xi.reverse,co=qe(Kn,"DataView"),ao=qe(Kn,"Map"),lo=qe(Kn,"Promise"),so=qe(Kn,"Set"),ho=qe(Kn,"WeakMap"),po=qe(di,"create"),_o=ho&&new ho,vo={},go=cu(co),yo=cu(ao),bo=cu(lo),wo=cu(so),mo=cu(ho),xo=Ui?Ui.prototype:N,jo=xo?xo.valueOf:N,Ao=xo?xo.toString:N,ko=function(){function n(){}return function(t){if(!Tu(t))return{};if(Di)return Di(t);n.prototype=t;var r=new n;return n.prototype=N,r}}();Jn.templateSettings={escape:Tn,evaluate:$n,interpolate:Dn,variable:"",imports:{_:Jn}},Jn.prototype=at.prototype,Jn.prototype.constructor=Jn,lt.prototype=ko(at.prototype),lt.prototype.constructor=lt,st.prototype=ko(at.prototype),st.prototype.constructor=st,ht.prototype.clear=function(){this.__data__=po?po(null):{},this.size=0},ht.prototype.delete=function(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t},ht.prototype.get=function(n){var t=this.__data__;if(po){var r=t[n];return r===q?N:r}return Ii.call(t,n)?t[n]:N},ht.prototype.has=function(n){var t=this.__data__;return po?t[n]!==N:Ii.call(t,n)},ht.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=po&&t===N?q:t,this},pt.prototype.clear=function(){this.__data__=[],this.size=0},pt.prototype.delete=function(n){var t=this.__data__,r=jt(t,n);return!(r<0||(r==t.length-1?t.pop():Fi.call(t,r,1),--this.size,0))},pt.prototype.get=function(n){var t=this.__data__,r=jt(t,n);return r<0?N:t[r][1]},pt.prototype.has=function(n){return jt(this.__data__,n)>-1},pt.prototype.set=function(n,t){var r=this.__data__,e=jt(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this},_t.prototype.clear=function(){this.size=0,this.__data__={hash:new ht,map:new(ao||pt),string:new ht}},_t.prototype.delete=function(n){var t=Ne(this,n).delete(n);return this.size-=t?1:0,t},_t.prototype.get=function(n){return Ne(this,n).get(n)},_t.prototype.has=function(n){return Ne(this,n).has(n)},_t.prototype.set=function(n,t){var r=Ne(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},vt.prototype.add=vt.prototype.push=function(n){return this.__data__.set(n,q),this},vt.prototype.has=function(n){return this.__data__.has(n)},gt.prototype.clear=function(){this.__data__=new pt,this.size=0},gt.prototype.delete=function(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r},gt.prototype.get=function(n){return this.__data__.get(n)},gt.prototype.has=function(n){return this.__data__.has(n)},gt.prototype.set=function(n,t){var r=this.__data__;if(r instanceof pt){var e=r.__data__;if(!ao||e.length<199)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new _t(e)}return r.set(n,t),this.size=r.size,this};var Oo=he(Tt),Io=he($t,!0),Ro=pe(),zo=pe(!0),Eo=_o?function(n,t){return _o.set(n,t),n}:oi,So=Zi?function(n,t){return Zi(n,"toString",{configurable:!0,enumerable:!1,value:ii(t),writable:!0})}:oi,Wo=Lr,Lo=Ki||function(n){return nr.clearTimeout(n)},Co=so&&1/T(new so([,-0]))[1]==Y?function(n){return new so(n)}:ai,Uo=_o?function(n){return _o.get(n)}:ai,Bo=Yi?function(n){return null==n?[]:(n=di(n),i(Yi(n),(function(t){return Mi.call(n,t)})))}:si,To=Yi?function(n){for(var t=[];n;)a(t,Bo(n)),n=$i(n);return t}:si,$o=qt;(co&&$o(new co(new ArrayBuffer(1)))!=wn||ao&&$o(new ao)!=ln||lo&&$o(lo.resolve())!=pn||so&&$o(new so)!=vn||ho&&$o(new ho)!=dn)&&($o=function(n){var t=qt(n),r=t==hn?n.constructor:N,e=r?cu(r):"";if(e)switch(e){case go:return wn;case yo:return ln;case bo:return pn;case wo:return vn;case mo:return dn}return t});var Do=ki?Cu:hi,Mo=iu(Eo),Fo=Gi||function(n,t){return nr.setTimeout(n,t)},No=iu(So),Po=function(n){var t=Ru(n,(function(n){return 500===r.size&&r.clear(),n})),r=t.cache;return t}((function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(Nn,(function(n,r,e,u){t.push(e?u.replace(Qn,"$1"):r||n)})),t})),qo=Lr((function(n,t){return Wu(n)?Wt(n,Bt(t,1,Wu,!0)):[]})),Zo=Lr((function(n,t){var r=vu(t);return Wu(r)&&(r=N),Wu(n)?Wt(n,Bt(t,1,Wu,!0),Fe(r,2)):[]})),Ko=Lr((function(n,t){var r=vu(t);return Wu(r)&&(r=N),Wu(n)?Wt(n,Bt(t,1,Wu,!0),N,r):[]})),Vo=Lr((function(n){var t=c(n,Qr);return t.length&&t[0]===n[0]?tr(t):[]})),Go=Lr((function(n){var t=vu(n),r=c(n,Qr);return t===vu(r)?t=N:r.pop(),r.length&&r[0]===n[0]?tr(r,Fe(t,2)):[]})),Ho=Lr((function(n){var t=vu(n),r=c(n,Qr);return(t="function"==typeof t?t:N)&&r.pop(),r.length&&r[0]===n[0]?tr(r,N,t):[]})),Jo=Lr(gu),Yo=Be((function(n,t){var r=null==n?0:n.length,e=It(n,t);return Er(n,c(t,(function(n){return Ge(n,r)?+n:n})).sort(ie)),e})),Qo=Lr((function(n){return Zr(Bt(n,1,Wu,!0))})),Xo=Lr((function(n){var t=vu(n);return Wu(t)&&(t=N),Zr(Bt(n,1,Wu,!0),Fe(t,2))})),nf=Lr((function(n){var t=vu(n);return t="function"==typeof t?t:N,Zr(Bt(n,1,Wu,!0),N,t)})),tf=Lr((function(n,t){return Wu(n)?Wt(n,t):[]})),rf=Lr((function(n){return Jr(i(n,Wu))})),ef=Lr((function(n){var t=vu(n);return Wu(t)&&(t=N),Jr(i(n,Wu),Fe(t,2))})),uf=Lr((function(n){var t=vu(n);return t="function"==typeof t?t:N,Jr(i(n,Wu),N,t)})),of=Lr(du),ff=Lr((function(n){var t=n.length,r=t>1?n[t-1]:N;return r="function"==typeof r?(n.pop(),r):N,bu(n,r)})),cf=Be((function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return It(t,n)};return!(t>1||this.__actions__.length)&&e instanceof st&&Ge(r)?((e=e.slice(r,+r+(t?1:0))).__actions__.push({func:mu,args:[u],thisArg:N}),new lt(e,this.__chain__).thru((function(n){return t&&!n.length&&n.push(N),n}))):this.thru(u)})),af=le((function(n,t,r){Ii.call(n,r)?++n[r]:Ot(n,r,1)})),lf=de(su),sf=de(hu),hf=le((function(n,t,r){Ii.call(n,r)?n[r].push(t):Ot(n,r,[t])})),pf=Lr((function(t,r,e){var u=-1,i="function"==typeof r,o=Su(t)?pi(t.length):[];return Oo(t,(function(t){o[++u]=i?n(r,t,e):rr(t,r,e)})),o})),_f=le((function(n,t,r){Ot(n,r,t)})),vf=le((function(n,t,r){n[r?0:1].push(t)}),(function(){return[[],[]]})),gf=Lr((function(n,t){if(null==n)return[];var r=t.length;return r>1&&He(n,t[0],t[1])?t=[]:r>2&&He(t[0],t[1],t[2])&&(t=[t[0]]),Ir(n,Bt(t,1),[])})),yf=Vi||function(){return nr.Date.now()},df=Lr((function(n,t,r){var e=1;if(r.length){var u=B(r,Me(df));e|=V}return Se(n,e,t,r,u)})),bf=Lr((function(n,t,r){var e=3;if(r.length){var u=B(r,Me(bf));e|=V}return Se(t,e,n,r,u)})),wf=Lr((function(n,t){return St(n,1,t)})),mf=Lr((function(n,t,r){return St(n,Vu(t)||0,r)}));Ru.Cache=_t;var xf=Wo((function(t,r){var e=(r=1==r.length&&zf(r[0])?c(r[0],O(Fe())):c(Bt(r,1),O(Fe()))).length;return Lr((function(u){for(var i=-1,o=eo(u.length,e);++i<o;)u[i]=r[i].call(this,u[i]);return n(t,this,u)}))})),jf=Lr((function(n,t){return Se(n,V,N,t,B(t,Me(jf)))})),Af=Lr((function(n,t){return Se(n,G,N,t,B(t,Me(Af)))})),kf=Be((function(n,t){return Se(n,J,N,N,N,t)})),Of=Ie(Ht),If=Ie((function(n,t){return n>=t})),Rf=ur(function(){return arguments}())?ur:function(n){return $u(n)&&Ii.call(n,"callee")&&!Mi.call(n,"callee")},zf=pi.isArray,Ef=or?O(or):function(n){return $u(n)&&qt(n)==bn},Sf=Qi||hi,Wf=fr?O(fr):function(n){return $u(n)&&qt(n)==on},Lf=cr?O(cr):function(n){return $u(n)&&$o(n)==ln},Cf=ar?O(ar):function(n){return $u(n)&&qt(n)==_n},Uf=lr?O(lr):function(n){return $u(n)&&$o(n)==vn},Bf=sr?O(sr):function(n){return $u(n)&&Bu(n.length)&&!!Vt[qt(n)]},Tf=Ie(mr),$f=Ie((function(n,t){return n<=t})),Df=se((function(n,t){if(Qe(t)||Su(t))return ae(t,Qu(t),n),N;for(var r in t)Ii.call(t,r)&&xt(n,r,t[r])})),Mf=se((function(n,t){ae(t,Xu(t),n)})),Ff=se((function(n,t,r,e){ae(t,Xu(t),n,e)})),Nf=se((function(n,t,r,e){ae(t,Qu(t),n,e)})),Pf=Be(It),qf=Lr((function(n,t){n=di(n);var r=-1,e=t.length,u=e>2?t[2]:N;for(u&&He(t[0],t[1],u)&&(e=1);++r<e;)for(var i=t[r],o=Xu(i),f=-1,c=o.length;++f<c;){var a=o[f],l=n[a];(l===N||Eu(l,Ai[a])&&!Ii.call(n,a))&&(n[a]=i[a])}return n})),Zf=Lr((function(t){return t.push(N,Le),n(Jf,N,t)})),Kf=me((function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ei.call(t)),n[t]=r}),ii(oi)),Vf=me((function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ei.call(t)),Ii.call(n,t)?n[t].push(r):n[t]=[r]}),Fe),Gf=Lr(rr),Hf=se((function(n,t,r){kr(n,t,r)})),Jf=se((function(n,t,r,e){kr(n,t,r,e)})),Yf=Be((function(n,t){var r={};if(null==n)return r;var e=!1;t=c(t,(function(t){return t=ne(t,n),e||(e=t.length>1),t})),ae(n,$e(n),r),e&&(r=zt(r,7,Ce));for(var u=t.length;u--;)Kr(r,t[u]);return r})),Qf=Be((function(n,t){return null==n?{}:function(n,t){return Rr(n,t,(function(t,r){return Yu(n,r)}))}(n,t)})),Xf=Ee(Qu),nc=Ee(Xu),tc=ve((function(n,t,r){return t=t.toLowerCase(),n+(r?ri(t):t)})),rc=ve((function(n,t,r){return n+(r?"-":"")+t.toLowerCase()})),ec=ve((function(n,t,r){return n+(r?" ":"")+t.toLowerCase()})),uc=_e("toLowerCase"),ic=ve((function(n,t,r){return n+(r?"_":"")+t.toLowerCase()})),oc=ve((function(n,t,r){return n+(r?" ":"")+cc(t)})),fc=ve((function(n,t,r){return n+(r?" ":"")+t.toUpperCase()})),cc=_e("toUpperCase"),ac=Lr((function(t,r){try{return n(t,N,r)}catch(n){return Lu(n)?n:new vi(n)}})),lc=Be((function(n,t){return r(t,(function(t){t=fu(t),Ot(n,t,df(n[t],n))})),n})),sc=be(),hc=be(!0),pc=Lr((function(n,t){return function(r){return rr(r,n,t)}})),_c=Lr((function(n,t){return function(r){return rr(n,r,t)}})),vc=je(c),gc=je(u),yc=je(h),dc=Oe(),bc=Oe(!0),wc=xe((function(n,t){return n+t}),0),mc=ze("ceil"),xc=xe((function(n,t){return n/t}),1),jc=ze("floor"),Ac=xe((function(n,t){return n*t}),1),kc=ze("round"),Oc=xe((function(n,t){return n-t}),0);return Jn.after=function(n,t){if("function"!=typeof t)throw new mi(P);return n=Zu(n),function(){if(--n<1)return t.apply(this,arguments)}},Jn.ary=ku,Jn.assign=Df,Jn.assignIn=Mf,Jn.assignInWith=Ff,Jn.assignWith=Nf,Jn.at=Pf,Jn.before=Ou,Jn.bind=df,Jn.bindAll=lc,Jn.bindKey=bf,Jn.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return zf(n)?n:[n]},Jn.chain=wu,Jn.chunk=function(n,t,r){t=(r?He(n,t,r):t===N)?1:ro(Zu(t),0);var e=null==n?0:n.length;if(!e||t<1)return[];for(var u=0,i=0,o=pi(Hi(e/t));u<e;)o[i++]=$r(n,u,u+=t);return o},Jn.compact=function(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u},Jn.concat=function(){var n=arguments.length;if(!n)return[];for(var t=pi(n-1),r=arguments[0],e=n;e--;)t[e-1]=arguments[e];return a(zf(r)?ce(r):[r],Bt(t,1))},Jn.cond=function(t){var r=null==t?0:t.length,e=Fe();return t=r?c(t,(function(n){if("function"!=typeof n[1])throw new mi(P);return[e(n[0]),n[1]]})):[],Lr((function(e){for(var u=-1;++u<r;){var i=t[u];if(n(i[0],this,e))return n(i[1],this,e)}}))},Jn.conforms=function(n){return function(n){var t=Qu(n);return function(r){return Et(r,n,t)}}(zt(n,1))},Jn.constant=ii,Jn.countBy=af,Jn.create=function(n,t){var r=ko(n);return null==t?r:kt(r,t)},Jn.curry=function n(t,r,e){var u=Se(t,8,N,N,N,N,N,r=e?N:r);return u.placeholder=n.placeholder,u},Jn.curryRight=function n(t,r,e){var u=Se(t,K,N,N,N,N,N,r=e?N:r);return u.placeholder=n.placeholder,u},Jn.debounce=Iu,Jn.defaults=qf,Jn.defaultsDeep=Zf,Jn.defer=wf,Jn.delay=mf,Jn.difference=qo,Jn.differenceBy=Zo,Jn.differenceWith=Ko,Jn.drop=function(n,t,r){var e=null==n?0:n.length;return e?$r(n,(t=r||t===N?1:Zu(t))<0?0:t,e):[]},Jn.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?$r(n,0,(t=e-(t=r||t===N?1:Zu(t)))<0?0:t):[]},Jn.dropRightWhile=function(n,t){return n&&n.length?Gr(n,Fe(t,3),!0,!0):[]},Jn.dropWhile=function(n,t){return n&&n.length?Gr(n,Fe(t,3),!0):[]},Jn.fill=function(n,t,r,e){var u=null==n?0:n.length;return u?(r&&"number"!=typeof r&&He(n,t,r)&&(r=0,e=u),function(n,t,r,e){var u=n.length;for((r=Zu(r))<0&&(r=-r>u?0:u+r),(e=e===N||e>u?u:Zu(e))<0&&(e+=u),e=r>e?0:Ku(e);r<e;)n[r++]=t;return n}(n,t,r,e)):[]},Jn.filter=function(n,t){return(zf(n)?i:Ut)(n,Fe(t,3))},Jn.flatMap=function(n,t){return Bt(Au(n,t),1)},Jn.flatMapDeep=function(n,t){return Bt(Au(n,t),Y)},Jn.flatMapDepth=function(n,t,r){return r=r===N?1:Zu(r),Bt(Au(n,t),r)},Jn.flatten=pu,Jn.flattenDeep=function(n){return null!=n&&n.length?Bt(n,Y):[]},Jn.flattenDepth=function(n,t){return null!=n&&n.length?Bt(n,t=t===N?1:Zu(t)):[]},Jn.flip=function(n){return Se(n,512)},Jn.flow=sc,Jn.flowRight=hc,Jn.fromPairs=function(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e},Jn.functions=function(n){return null==n?[]:Ft(n,Qu(n))},Jn.functionsIn=function(n){return null==n?[]:Ft(n,Xu(n))},Jn.groupBy=hf,Jn.initial=function(n){return null!=n&&n.length?$r(n,0,-1):[]},Jn.intersection=Vo,Jn.intersectionBy=Go,Jn.intersectionWith=Ho,Jn.invert=Kf,Jn.invertBy=Vf,Jn.invokeMap=pf,Jn.iteratee=fi,Jn.keyBy=_f,Jn.keys=Qu,Jn.keysIn=Xu,Jn.map=Au,Jn.mapKeys=function(n,t){var r={};return t=Fe(t,3),Tt(n,(function(n,e,u){Ot(r,t(n,e,u),n)})),r},Jn.mapValues=function(n,t){var r={};return t=Fe(t,3),Tt(n,(function(n,e,u){Ot(r,e,t(n,e,u))})),r},Jn.matches=function(n){return jr(zt(n,1))},Jn.matchesProperty=function(n,t){return Ar(n,zt(t,1))},Jn.memoize=Ru,Jn.merge=Hf,Jn.mergeWith=Jf,Jn.method=pc,Jn.methodOf=_c,Jn.mixin=ci,Jn.negate=zu,Jn.nthArg=function(n){return n=Zu(n),Lr((function(t){return Or(t,n)}))},Jn.omit=Yf,Jn.omitBy=function(n,t){return ni(n,zu(Fe(t)))},Jn.once=function(n){return Ou(2,n)},Jn.orderBy=function(n,t,r,e){return null==n?[]:(zf(t)||(t=null==t?[]:[t]),zf(r=e?N:r)||(r=null==r?[]:[r]),Ir(n,t,r))},Jn.over=vc,Jn.overArgs=xf,Jn.overEvery=gc,Jn.overSome=yc,Jn.partial=jf,Jn.partialRight=Af,Jn.partition=vf,Jn.pick=Qf,Jn.pickBy=ni,Jn.property=li,Jn.propertyOf=function(n){return function(t){return null==n?N:Nt(n,t)}},Jn.pull=Jo,Jn.pullAll=gu,Jn.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?zr(n,t,Fe(r,2)):n},Jn.pullAllWith=function(n,t,r){return n&&n.length&&t&&t.length?zr(n,t,N,r):n},Jn.pullAt=Yo,Jn.range=dc,Jn.rangeRight=bc,Jn.rearg=kf,Jn.reject=function(n,t){return(zf(n)?i:Ut)(n,zu(Fe(t,3)))},Jn.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=Fe(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return Er(n,u),r},Jn.rest=function(n,t){if("function"!=typeof n)throw new mi(P);return Lr(n,t=t===N?t:Zu(t))},Jn.reverse=yu,Jn.sampleSize=function(n,t,r){return t=(r?He(n,t,r):t===N)?1:Zu(t),(zf(n)?bt:Ur)(n,t)},Jn.set=function(n,t,r){return null==n?n:Br(n,t,r)},Jn.setWith=function(n,t,r,e){return e="function"==typeof e?e:N,null==n?n:Br(n,t,r,e)},Jn.shuffle=function(n){return(zf(n)?wt:Tr)(n)},Jn.slice=function(n,t,r){var e=null==n?0:n.length;return e?(r&&"number"!=typeof r&&He(n,t,r)?(t=0,r=e):(t=null==t?0:Zu(t),r=r===N?e:Zu(r)),$r(n,t,r)):[]},Jn.sortBy=gf,Jn.sortedUniq=function(n){return n&&n.length?Nr(n):[]},Jn.sortedUniqBy=function(n,t){return n&&n.length?Nr(n,Fe(t,2)):[]},Jn.split=function(n,t,r){return r&&"number"!=typeof r&&He(n,t,r)&&(t=r=N),(r=r===N?nn:r>>>0)?(n=Hu(n))&&("string"==typeof t||null!=t&&!Cf(t))&&(!(t=qr(t))&&W(n))?te(D(n),0,r):n.split(t,r):[]},Jn.spread=function(t,r){if("function"!=typeof t)throw new mi(P);return r=null==r?0:ro(Zu(r),0),Lr((function(e){var u=e[r],i=te(e,0,r);return u&&a(i,u),n(t,this,i)}))},Jn.tail=function(n){var t=null==n?0:n.length;return t?$r(n,1,t):[]},Jn.take=function(n,t,r){return n&&n.length?$r(n,0,(t=r||t===N?1:Zu(t))<0?0:t):[]},Jn.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?$r(n,(t=e-(t=r||t===N?1:Zu(t)))<0?0:t,e):[]},Jn.takeRightWhile=function(n,t){return n&&n.length?Gr(n,Fe(t,3),!1,!0):[]},Jn.takeWhile=function(n,t){return n&&n.length?Gr(n,Fe(t,3)):[]},Jn.tap=function(n,t){return t(n),n},Jn.throttle=function(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new mi(P);return Tu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Iu(n,t,{leading:e,maxWait:t,trailing:u})},Jn.thru=mu,Jn.toArray=Pu,Jn.toPairs=Xf,Jn.toPairsIn=nc,Jn.toPath=function(n){return zf(n)?c(n,fu):Nu(n)?[n]:ce(Po(Hu(n)))},Jn.toPlainObject=Gu,Jn.transform=function(n,t,e){var u=zf(n),i=u||Sf(n)||Bf(n);if(t=Fe(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:Tu(n)&&Cu(o)?ko($i(n)):{}}return(i?r:Tt)(n,(function(n,r,u){return t(e,n,r,u)})),e},Jn.unary=function(n){return ku(n,1)},Jn.union=Qo,Jn.unionBy=Xo,Jn.unionWith=nf,Jn.uniq=function(n){return n&&n.length?Zr(n):[]},Jn.uniqBy=function(n,t){return n&&n.length?Zr(n,Fe(t,2)):[]},Jn.uniqWith=function(n,t){return t="function"==typeof t?t:N,n&&n.length?Zr(n,N,t):[]},Jn.unset=function(n,t){return null==n||Kr(n,t)},Jn.unzip=du,Jn.unzipWith=bu,Jn.update=function(n,t,r){return null==n?n:Vr(n,t,Xr(r))},Jn.updateWith=function(n,t,r,e){return e="function"==typeof e?e:N,null==n?n:Vr(n,t,Xr(r),e)},Jn.values=ti,Jn.valuesIn=function(n){return null==n?[]:I(n,Xu(n))},Jn.without=tf,Jn.words=ui,Jn.wrap=function(n,t){return jf(Xr(t),n)},Jn.xor=rf,Jn.xorBy=ef,Jn.xorWith=uf,Jn.zip=of,Jn.zipObject=function(n,t){return Yr(n||[],t||[],xt)},Jn.zipObjectDeep=function(n,t){return Yr(n||[],t||[],Br)},Jn.zipWith=ff,Jn.entries=Xf,Jn.entriesIn=nc,Jn.extend=Mf,Jn.extendWith=Ff,ci(Jn,Jn),Jn.add=wc,Jn.attempt=ac,Jn.camelCase=tc,Jn.capitalize=ri,Jn.ceil=mc,Jn.clamp=function(n,t,r){return r===N&&(r=t,t=N),r!==N&&(r=(r=Vu(r))==r?r:0),t!==N&&(t=(t=Vu(t))==t?t:0),Rt(Vu(n),t,r)},Jn.clone=function(n){return zt(n,4)},Jn.cloneDeep=function(n){return zt(n,5)},Jn.cloneDeepWith=function(n,t){return zt(n,5,t="function"==typeof t?t:N)},Jn.cloneWith=function(n,t){return zt(n,4,t="function"==typeof t?t:N)},Jn.conformsTo=function(n,t){return null==t||Et(n,t,Qu(t))},Jn.deburr=ei,Jn.defaultTo=function(n,t){return null==n||n!=n?t:n},Jn.divide=xc,Jn.endsWith=function(n,t,r){n=Hu(n),t=qr(t);var e=n.length,u=r=r===N?e:Rt(Zu(r),0,e);return(r-=t.length)>=0&&n.slice(r,u)==t},Jn.eq=Eu,Jn.escape=function(n){return(n=Hu(n))&&Bn.test(n)?n.replace(Cn,_r):n},Jn.escapeRegExp=function(n){return(n=Hu(n))&&qn.test(n)?n.replace(Pn,"\\$&"):n},Jn.every=function(n,t,r){var e=zf(n)?u:Lt;return r&&He(n,t,r)&&(t=N),e(n,Fe(t,3))},Jn.find=lf,Jn.findIndex=su,Jn.findKey=function(n,t){return _(n,Fe(t,3),Tt)},Jn.findLast=sf,Jn.findLastIndex=hu,Jn.findLastKey=function(n,t){return _(n,Fe(t,3),$t)},Jn.floor=jc,Jn.forEach=xu,Jn.forEachRight=ju,Jn.forIn=function(n,t){return null==n?n:Ro(n,Fe(t,3),Xu)},Jn.forInRight=function(n,t){return null==n?n:zo(n,Fe(t,3),Xu)},Jn.forOwn=function(n,t){return n&&Tt(n,Fe(t,3))},Jn.forOwnRight=function(n,t){return n&&$t(n,Fe(t,3))},Jn.get=Ju,Jn.gt=Of,Jn.gte=If,Jn.has=function(n,t){return null!=n&&Ze(n,t,Qt)},Jn.hasIn=Yu,Jn.head=_u,Jn.identity=oi,Jn.includes=function(n,t,r,e){n=Su(n)?n:ti(n),r=r&&!e?Zu(r):0;var u=n.length;return r<0&&(r=ro(u+r,0)),Fu(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&g(n,t,r)>-1},Jn.indexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:Zu(r);return u<0&&(u=ro(e+u,0)),g(n,t,u)},Jn.inRange=function(n,t,r){return t=qu(t),r===N?(r=t,t=0):r=qu(r),function(n,t,r){return n>=eo(t,r)&&n<ro(t,r)}(n=Vu(n),t,r)},Jn.invoke=Gf,Jn.isArguments=Rf,Jn.isArray=zf,Jn.isArrayBuffer=Ef,Jn.isArrayLike=Su,Jn.isArrayLikeObject=Wu,Jn.isBoolean=function(n){return!0===n||!1===n||$u(n)&&qt(n)==un},Jn.isBuffer=Sf,Jn.isDate=Wf,Jn.isElement=function(n){return $u(n)&&1===n.nodeType&&!Mu(n)},Jn.isEmpty=function(n){if(null==n)return!0;if(Su(n)&&(zf(n)||"string"==typeof n||"function"==typeof n.splice||Sf(n)||Bf(n)||Rf(n)))return!n.length;var t=$o(n);if(t==ln||t==vn)return!n.size;if(Qe(n))return!br(n).length;for(var r in n)if(Ii.call(n,r))return!1;return!0},Jn.isEqual=function(n,t){return ir(n,t)},Jn.isEqualWith=function(n,t,r){var e=(r="function"==typeof r?r:N)?r(n,t):N;return e===N?ir(n,t,N,r):!!e},Jn.isError=Lu,Jn.isFinite=function(n){return"number"==typeof n&&Xi(n)},Jn.isFunction=Cu,Jn.isInteger=Uu,Jn.isLength=Bu,Jn.isMap=Lf,Jn.isMatch=function(n,t){return n===t||hr(n,t,Pe(t))},Jn.isMatchWith=function(n,t,r){return r="function"==typeof r?r:N,hr(n,t,Pe(t),r)},Jn.isNaN=function(n){return Du(n)&&n!=+n},Jn.isNative=function(n){if(Do(n))throw new vi("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yr(n)},Jn.isNil=function(n){return null==n},Jn.isNull=function(n){return null===n},Jn.isNumber=Du,Jn.isObject=Tu,Jn.isObjectLike=$u,Jn.isPlainObject=Mu,Jn.isRegExp=Cf,Jn.isSafeInteger=function(n){return Uu(n)&&n>=-Q&&n<=Q},Jn.isSet=Uf,Jn.isString=Fu,Jn.isSymbol=Nu,Jn.isTypedArray=Bf,Jn.isUndefined=function(n){return n===N},Jn.isWeakMap=function(n){return $u(n)&&$o(n)==dn},Jn.isWeakSet=function(n){return $u(n)&&"[object WeakSet]"==qt(n)},Jn.join=function(n,t){return null==n?"":no.call(n,t)},Jn.kebabCase=rc,Jn.last=vu,Jn.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;return r!==N&&(u=(u=Zu(r))<0?ro(e+u,0):eo(u,e-1)),t==t?function(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}(n,t,u):v(n,d,u,!0)},Jn.lowerCase=ec,Jn.lowerFirst=uc,Jn.lt=Tf,Jn.lte=$f,Jn.max=function(n){return n&&n.length?Ct(n,oi,Ht):N},Jn.maxBy=function(n,t){return n&&n.length?Ct(n,Fe(t,2),Ht):N},Jn.mean=function(n){return b(n,oi)},Jn.meanBy=function(n,t){return b(n,Fe(t,2))},Jn.min=function(n){return n&&n.length?Ct(n,oi,mr):N},Jn.minBy=function(n,t){return n&&n.length?Ct(n,Fe(t,2),mr):N},Jn.stubArray=si,Jn.stubFalse=hi,Jn.stubObject=function(){return{}},Jn.stubString=function(){return""},Jn.stubTrue=function(){return!0},Jn.multiply=Ac,Jn.nth=function(n,t){return n&&n.length?Or(n,Zu(t)):N},Jn.noConflict=function(){return nr._===this&&(nr._=Wi),this},Jn.noop=ai,Jn.now=yf,Jn.pad=function(n,t,r){n=Hu(n);var e=(t=Zu(t))?$(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return Ae(Ji(u),r)+n+Ae(Hi(u),r)},Jn.padEnd=function(n,t,r){n=Hu(n);var e=(t=Zu(t))?$(n):0;return t&&e<t?n+Ae(t-e,r):n},Jn.padStart=function(n,t,r){n=Hu(n);var e=(t=Zu(t))?$(n):0;return t&&e<t?Ae(t-e,r)+n:n},Jn.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),io(Hu(n).replace(Zn,""),t||0)},Jn.random=function(n,t,r){if(r&&"boolean"!=typeof r&&He(n,t,r)&&(t=r=N),r===N&&("boolean"==typeof t?(r=t,t=N):"boolean"==typeof n&&(r=n,n=N)),n===N&&t===N?(n=0,t=1):(n=qu(n),t===N?(t=n,n=0):t=qu(t)),n>t){var e=n;n=t,t=e}if(r||n%1||t%1){var u=oo();return eo(n+u*(t-n+Jt("1e-"+((u+"").length-1))),t)}return Sr(n,t)},Jn.reduce=function(n,t,r){var e=zf(n)?l:x,u=arguments.length<3;return e(n,Fe(t,4),r,u,Oo)},Jn.reduceRight=function(n,t,r){var e=zf(n)?s:x,u=arguments.length<3;return e(n,Fe(t,4),r,u,Io)},Jn.repeat=function(n,t,r){return t=(r?He(n,t,r):t===N)?1:Zu(t),Wr(Hu(n),t)},Jn.replace=function(){var n=arguments,t=Hu(n[0]);return n.length<3?t:t.replace(n[1],n[2])},Jn.result=function(n,t,r){var e=-1,u=(t=ne(t,n)).length;for(u||(u=1,n=N);++e<u;){var i=null==n?N:n[fu(t[e])];i===N&&(e=u,i=r),n=Cu(i)?i.call(n):i}return n},Jn.round=kc,Jn.runInContext=m,Jn.sample=function(n){return(zf(n)?dt:Cr)(n)},Jn.size=function(n){if(null==n)return 0;if(Su(n))return Fu(n)?$(n):n.length;var t=$o(n);return t==ln||t==vn?n.size:br(n).length},Jn.snakeCase=ic,Jn.some=function(n,t,r){var e=zf(n)?h:Dr;return r&&He(n,t,r)&&(t=N),e(n,Fe(t,3))},Jn.sortedIndex=function(n,t){return Mr(n,t)},Jn.sortedIndexBy=function(n,t,r){return Fr(n,t,Fe(r,2))},Jn.sortedIndexOf=function(n,t){var r=null==n?0:n.length;if(r){var e=Mr(n,t);if(e<r&&Eu(n[e],t))return e}return-1},Jn.sortedLastIndex=function(n,t){return Mr(n,t,!0)},Jn.sortedLastIndexBy=function(n,t,r){return Fr(n,t,Fe(r,2),!0)},Jn.sortedLastIndexOf=function(n,t){if(null!=n&&n.length){var r=Mr(n,t,!0)-1;if(Eu(n[r],t))return r}return-1},Jn.startCase=oc,Jn.startsWith=function(n,t,r){return n=Hu(n),r=null==r?0:Rt(Zu(r),0,n.length),t=qr(t),n.slice(r,r+t.length)==t},Jn.subtract=Oc,Jn.sum=function(n){return n&&n.length?j(n,oi):0},Jn.sumBy=function(n,t){return n&&n.length?j(n,Fe(t,2)):0},Jn.template=function(n,t,r){var e=Jn.templateSettings;r&&He(n,t,r)&&(t=N),n=Hu(n),t=Ff({},t,e,We);var u,i,o=Ff({},t.imports,e.imports,We),f=Qu(o),c=I(o,f),a=0,l=t.interpolate||ft,s="__p += '",h=bi((t.escape||ft).source+"|"+l.source+"|"+(l===Dn?Xn:ft).source+"|"+(t.evaluate||ft).source+"|$","g"),p="//# sourceURL="+(Ii.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Kt+"]")+"\n";n.replace(h,(function(t,r,e,o,f,c){return e||(e=o),s+=n.slice(a,c).replace(ct,S),r&&(u=!0,s+="' +\n__e("+r+") +\n'"),f&&(i=!0,s+="';\n"+f+";\n__p += '"),e&&(s+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),a=c+t.length,t})),s+="';\n";var _=Ii.call(t,"variable")&&t.variable;if(_){if(Yn.test(_))throw new vi("Invalid `variable` option passed into `_.template`")}else s="with (obj) {\n"+s+"\n}\n";s=(i?s.replace(En,""):s).replace(Sn,"$1").replace(Wn,"$1;"),s="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+s+"return __p\n}";var v=ac((function(){return gi(f,p+"return "+s).apply(N,c)}));if(v.source=s,Lu(v))throw v;return v},Jn.times=function(n,t){if((n=Zu(n))<1||n>Q)return[];var r=nn,e=eo(n,nn);t=Fe(t),n-=nn;for(var u=A(e,t);++r<n;)t(r);return u},Jn.toFinite=qu,Jn.toInteger=Zu,Jn.toLength=Ku,Jn.toLower=function(n){return Hu(n).toLowerCase()},Jn.toNumber=Vu,Jn.toSafeInteger=function(n){return n?Rt(Zu(n),-Q,Q):0===n?n:0},Jn.toString=Hu,Jn.toUpper=function(n){return Hu(n).toUpperCase()},Jn.trim=function(n,t,r){if((n=Hu(n))&&(r||t===N))return k(n);if(!n||!(t=qr(t)))return n;var e=D(n),u=D(t);return te(e,z(e,u),E(e,u)+1).join("")},Jn.trimEnd=function(n,t,r){if((n=Hu(n))&&(r||t===N))return n.slice(0,M(n)+1);if(!n||!(t=qr(t)))return n;var e=D(n);return te(e,0,E(e,D(t))+1).join("")},Jn.trimStart=function(n,t,r){if((n=Hu(n))&&(r||t===N))return n.replace(Zn,"");if(!n||!(t=qr(t)))return n;var e=D(n);return te(e,z(e,D(t))).join("")},Jn.truncate=function(n,t){var r=30,e="...";if(Tu(t)){var u="separator"in t?t.separator:u;r="length"in t?Zu(t.length):r,e="omission"in t?qr(t.omission):e}var i=(n=Hu(n)).length;if(W(n)){var o=D(n);i=o.length}if(r>=i)return n;var f=r-$(e);if(f<1)return e;var c=o?te(o,0,f).join(""):n.slice(0,f);if(u===N)return c+e;if(o&&(f+=c.length-f),Cf(u)){if(n.slice(f).search(u)){var a,l=c;for(u.global||(u=bi(u.source,Hu(nt.exec(u))+"g")),u.lastIndex=0;a=u.exec(l);)var s=a.index;c=c.slice(0,s===N?f:s)}}else if(n.indexOf(qr(u),f)!=f){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+e},Jn.unescape=function(n){return(n=Hu(n))&&Un.test(n)?n.replace(Ln,vr):n},Jn.uniqueId=function(n){var t=++Ri;return Hu(n)+t},Jn.upperCase=fc,Jn.upperFirst=cc,Jn.each=xu,Jn.eachRight=ju,Jn.first=_u,ci(Jn,function(){var n={};return Tt(Jn,(function(t,r){Ii.call(Jn.prototype,r)||(n[r]=t)})),n}(),{chain:!1}),Jn.VERSION="4.17.21",r(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(n){Jn[n].placeholder=Jn})),r(["drop","take"],(function(n,t){st.prototype[n]=function(r){r=r===N?1:ro(Zu(r),0);var e=this.__filtered__&&!t?new st(this):this.clone();return e.__filtered__?e.__takeCount__=eo(r,e.__takeCount__):e.__views__.push({size:eo(r,nn),type:n+(e.__dir__<0?"Right":"")}),e},st.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}})),r(["filter","map","takeWhile"],(function(n,t){var r=t+1,e=1==r||3==r;st.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:Fe(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}})),r(["head","last"],(function(n,t){var r="take"+(t?"Right":"");st.prototype[n]=function(){return this[r](1).value()[0]}})),r(["initial","tail"],(function(n,t){var r="drop"+(t?"":"Right");st.prototype[n]=function(){return this.__filtered__?new st(this):this[r](1)}})),st.prototype.compact=function(){return this.filter(oi)},st.prototype.find=function(n){return this.filter(n).head()},st.prototype.findLast=function(n){return this.reverse().find(n)},st.prototype.invokeMap=Lr((function(n,t){return"function"==typeof n?new st(this):this.map((function(r){return rr(r,n,t)}))})),st.prototype.reject=function(n){return this.filter(zu(Fe(n)))},st.prototype.slice=function(n,t){n=Zu(n);var r=this;return r.__filtered__&&(n>0||t<0)?new st(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==N&&(r=(t=Zu(t))<0?r.dropRight(-t):r.take(t-n)),r)},st.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},st.prototype.toArray=function(){return this.take(nn)},Tt(st.prototype,(function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=Jn[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(Jn.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof st,c=o[0],l=f||zf(t),s=function(n){var t=u.apply(Jn,a([n],o));return e&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(f=l=!1);var h=this.__chain__,p=!!this.__actions__.length,_=i&&!h,v=f&&!p;if(!i&&l){t=v?t:new st(this);var g=n.apply(t,o);return g.__actions__.push({func:mu,args:[s],thisArg:N}),new lt(g,h)}return _&&v?n.apply(this,o):(g=this.thru(s),_?e?g.value()[0]:g.value():g)})})),r(["pop","push","shift","sort","splice","unshift"],(function(n){var t=xi[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);Jn.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(zf(u)?u:[],n)}return this[r]((function(r){return t.apply(zf(r)?r:[],n)}))}})),Tt(st.prototype,(function(n,t){var r=Jn[t];if(r){var e=r.name+"";Ii.call(vo,e)||(vo[e]=[]),vo[e].push({name:t,func:r})}})),vo[we(N,2).name]=[{name:"wrapper",func:N}],st.prototype.clone=function(){var n=new st(this.__wrapped__);return n.__actions__=ce(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=ce(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=ce(this.__views__),n},st.prototype.reverse=function(){if(this.__filtered__){var n=new st(this);n.__dir__=-1,n.__filtered__=!0}else(n=this.clone()).__dir__*=-1;return n},st.prototype.value=function(){var n=this.__wrapped__.value(),t=this.__dir__,r=zf(n),e=t<0,u=r?n.length:0,i=function(n,t,r){for(var e=-1,u=r.length;++e<u;){var i=r[e],o=i.size;switch(i.type){case"drop":n+=o;break;case"dropRight":t-=o;break;case"take":t=eo(t,n+o);break;case"takeRight":n=ro(n,t-o)}}return{start:n,end:t}}(0,u,this.__views__),o=i.start,f=i.end,c=f-o,a=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=eo(c,this.__takeCount__);if(!r||!e&&u==c&&p==c)return Hr(n,this.__actions__);var _=[];n:for(;c--&&h<p;){for(var v=-1,g=n[a+=t];++v<s;){var y=l[v],d=y.iteratee,b=y.type,w=d(g);if(2==b)g=w;else if(!w){if(1==b)continue n;break n}}_[h++]=g}return _},Jn.prototype.at=cf,Jn.prototype.chain=function(){return wu(this)},Jn.prototype.commit=function(){return new lt(this.value(),this.__chain__)},Jn.prototype.next=function(){this.__values__===N&&(this.__values__=Pu(this.value()));var n=this.__index__>=this.__values__.length;return{done:n,value:n?N:this.__values__[this.__index__++]}},Jn.prototype.plant=function(n){for(var t,r=this;r instanceof at;){var e=lu(r);e.__index__=0,e.__values__=N,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t},Jn.prototype.reverse=function(){var n=this.__wrapped__;if(n instanceof st){var t=n;return this.__actions__.length&&(t=new st(this)),(t=t.reverse()).__actions__.push({func:mu,args:[yu],thisArg:N}),new lt(t,this.__chain__)}return this.thru(yu)},Jn.prototype.toJSON=Jn.prototype.valueOf=Jn.prototype.value=function(){return Hr(this.__wrapped__,this.__actions__)},Jn.prototype.first=Jn.prototype.head,Pi&&(Jn.prototype[Pi]=function(){return this}),Jn}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(nr._=gr,define((function(){return gr}))):rr?((rr.exports=gr)._=gr,tr._=gr):nr._=gr}).call(this); moment.js 0000644 00000525014 15153765737 0006433 0 ustar 00 //! moment.js
//! version : 2.29.4
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
global.moment = factory()
}(this, (function () { 'use strict';
var hookCallback;
function hooks() {
return hookCallback.apply(null, arguments);
}
// This is done to register the method called with moment()
// without creating circular dependencies.
function setHookCallback(callback) {
hookCallback = callback;
}
function isArray(input) {
return (
input instanceof Array ||
Object.prototype.toString.call(input) === '[object Array]'
);
}
function isObject(input) {
// IE8 will treat undefined and null as object if it wasn't for
// input != null
return (
input != null &&
Object.prototype.toString.call(input) === '[object Object]'
);
}
function hasOwnProp(a, b) {
return Object.prototype.hasOwnProperty.call(a, b);
}
function isObjectEmpty(obj) {
if (Object.getOwnPropertyNames) {
return Object.getOwnPropertyNames(obj).length === 0;
} else {
var k;
for (k in obj) {
if (hasOwnProp(obj, k)) {
return false;
}
}
return true;
}
}
function isUndefined(input) {
return input === void 0;
}
function isNumber(input) {
return (
typeof input === 'number' ||
Object.prototype.toString.call(input) === '[object Number]'
);
}
function isDate(input) {
return (
input instanceof Date ||
Object.prototype.toString.call(input) === '[object Date]'
);
}
function map(arr, fn) {
var res = [],
i,
arrLen = arr.length;
for (i = 0; i < arrLen; ++i) {
res.push(fn(arr[i], i));
}
return res;
}
function extend(a, b) {
for (var i in b) {
if (hasOwnProp(b, i)) {
a[i] = b[i];
}
}
if (hasOwnProp(b, 'toString')) {
a.toString = b.toString;
}
if (hasOwnProp(b, 'valueOf')) {
a.valueOf = b.valueOf;
}
return a;
}
function createUTC(input, format, locale, strict) {
return createLocalOrUTC(input, format, locale, strict, true).utc();
}
function defaultParsingFlags() {
// We need to deep clone this object.
return {
empty: false,
unusedTokens: [],
unusedInput: [],
overflow: -2,
charsLeftOver: 0,
nullInput: false,
invalidEra: null,
invalidMonth: null,
invalidFormat: false,
userInvalidated: false,
iso: false,
parsedDateParts: [],
era: null,
meridiem: null,
rfc2822: false,
weekdayMismatch: false,
};
}
function getParsingFlags(m) {
if (m._pf == null) {
m._pf = defaultParsingFlags();
}
return m._pf;
}
var some;
if (Array.prototype.some) {
some = Array.prototype.some;
} else {
some = function (fun) {
var t = Object(this),
len = t.length >>> 0,
i;
for (i = 0; i < len; i++) {
if (i in t && fun.call(this, t[i], i, t)) {
return true;
}
}
return false;
};
}
function isValid(m) {
if (m._isValid == null) {
var flags = getParsingFlags(m),
parsedParts = some.call(flags.parsedDateParts, function (i) {
return i != null;
}),
isNowValid =
!isNaN(m._d.getTime()) &&
flags.overflow < 0 &&
!flags.empty &&
!flags.invalidEra &&
!flags.invalidMonth &&
!flags.invalidWeekday &&
!flags.weekdayMismatch &&
!flags.nullInput &&
!flags.invalidFormat &&
!flags.userInvalidated &&
(!flags.meridiem || (flags.meridiem && parsedParts));
if (m._strict) {
isNowValid =
isNowValid &&
flags.charsLeftOver === 0 &&
flags.unusedTokens.length === 0 &&
flags.bigHour === undefined;
}
if (Object.isFrozen == null || !Object.isFrozen(m)) {
m._isValid = isNowValid;
} else {
return isNowValid;
}
}
return m._isValid;
}
function createInvalid(flags) {
var m = createUTC(NaN);
if (flags != null) {
extend(getParsingFlags(m), flags);
} else {
getParsingFlags(m).userInvalidated = true;
}
return m;
}
// Plugins that add properties should also add the key here (null value),
// so we can properly clone ourselves.
var momentProperties = (hooks.momentProperties = []),
updateInProgress = false;
function copyConfig(to, from) {
var i,
prop,
val,
momentPropertiesLen = momentProperties.length;
if (!isUndefined(from._isAMomentObject)) {
to._isAMomentObject = from._isAMomentObject;
}
if (!isUndefined(from._i)) {
to._i = from._i;
}
if (!isUndefined(from._f)) {
to._f = from._f;
}
if (!isUndefined(from._l)) {
to._l = from._l;
}
if (!isUndefined(from._strict)) {
to._strict = from._strict;
}
if (!isUndefined(from._tzm)) {
to._tzm = from._tzm;
}
if (!isUndefined(from._isUTC)) {
to._isUTC = from._isUTC;
}
if (!isUndefined(from._offset)) {
to._offset = from._offset;
}
if (!isUndefined(from._pf)) {
to._pf = getParsingFlags(from);
}
if (!isUndefined(from._locale)) {
to._locale = from._locale;
}
if (momentPropertiesLen > 0) {
for (i = 0; i < momentPropertiesLen; i++) {
prop = momentProperties[i];
val = from[prop];
if (!isUndefined(val)) {
to[prop] = val;
}
}
}
return to;
}
// Moment prototype object
function Moment(config) {
copyConfig(this, config);
this._d = new Date(config._d != null ? config._d.getTime() : NaN);
if (!this.isValid()) {
this._d = new Date(NaN);
}
// Prevent infinite loop in case updateOffset creates new moment
// objects.
if (updateInProgress === false) {
updateInProgress = true;
hooks.updateOffset(this);
updateInProgress = false;
}
}
function isMoment(obj) {
return (
obj instanceof Moment || (obj != null && obj._isAMomentObject != null)
);
}
function warn(msg) {
if (
hooks.suppressDeprecationWarnings === false &&
typeof console !== 'undefined' &&
console.warn
) {
console.warn('Deprecation warning: ' + msg);
}
}
function deprecate(msg, fn) {
var firstTime = true;
return extend(function () {
if (hooks.deprecationHandler != null) {
hooks.deprecationHandler(null, msg);
}
if (firstTime) {
var args = [],
arg,
i,
key,
argLen = arguments.length;
for (i = 0; i < argLen; i++) {
arg = '';
if (typeof arguments[i] === 'object') {
arg += '\n[' + i + '] ';
for (key in arguments[0]) {
if (hasOwnProp(arguments[0], key)) {
arg += key + ': ' + arguments[0][key] + ', ';
}
}
arg = arg.slice(0, -2); // Remove trailing comma and space
} else {
arg = arguments[i];
}
args.push(arg);
}
warn(
msg +
'\nArguments: ' +
Array.prototype.slice.call(args).join('') +
'\n' +
new Error().stack
);
firstTime = false;
}
return fn.apply(this, arguments);
}, fn);
}
var deprecations = {};
function deprecateSimple(name, msg) {
if (hooks.deprecationHandler != null) {
hooks.deprecationHandler(name, msg);
}
if (!deprecations[name]) {
warn(msg);
deprecations[name] = true;
}
}
hooks.suppressDeprecationWarnings = false;
hooks.deprecationHandler = null;
function isFunction(input) {
return (
(typeof Function !== 'undefined' && input instanceof Function) ||
Object.prototype.toString.call(input) === '[object Function]'
);
}
function set(config) {
var prop, i;
for (i in config) {
if (hasOwnProp(config, i)) {
prop = config[i];
if (isFunction(prop)) {
this[i] = prop;
} else {
this['_' + i] = prop;
}
}
}
this._config = config;
// Lenient ordinal parsing accepts just a number in addition to
// number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
// TODO: Remove "ordinalParse" fallback in next major release.
this._dayOfMonthOrdinalParseLenient = new RegExp(
(this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
'|' +
/\d{1,2}/.source
);
}
function mergeConfigs(parentConfig, childConfig) {
var res = extend({}, parentConfig),
prop;
for (prop in childConfig) {
if (hasOwnProp(childConfig, prop)) {
if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
res[prop] = {};
extend(res[prop], parentConfig[prop]);
extend(res[prop], childConfig[prop]);
} else if (childConfig[prop] != null) {
res[prop] = childConfig[prop];
} else {
delete res[prop];
}
}
}
for (prop in parentConfig) {
if (
hasOwnProp(parentConfig, prop) &&
!hasOwnProp(childConfig, prop) &&
isObject(parentConfig[prop])
) {
// make sure changes to properties don't modify parent config
res[prop] = extend({}, res[prop]);
}
}
return res;
}
function Locale(config) {
if (config != null) {
this.set(config);
}
}
var keys;
if (Object.keys) {
keys = Object.keys;
} else {
keys = function (obj) {
var i,
res = [];
for (i in obj) {
if (hasOwnProp(obj, i)) {
res.push(i);
}
}
return res;
};
}
var defaultCalendar = {
sameDay: '[Today at] LT',
nextDay: '[Tomorrow at] LT',
nextWeek: 'dddd [at] LT',
lastDay: '[Yesterday at] LT',
lastWeek: '[Last] dddd [at] LT',
sameElse: 'L',
};
function calendar(key, mom, now) {
var output = this._calendar[key] || this._calendar['sameElse'];
return isFunction(output) ? output.call(mom, now) : output;
}
function zeroFill(number, targetLength, forceSign) {
var absNumber = '' + Math.abs(number),
zerosToFill = targetLength - absNumber.length,
sign = number >= 0;
return (
(sign ? (forceSign ? '+' : '') : '-') +
Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +
absNumber
);
}
var formattingTokens =
/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
formatFunctions = {},
formatTokenFunctions = {};
// token: 'M'
// padded: ['MM', 2]
// ordinal: 'Mo'
// callback: function () { this.month() + 1 }
function addFormatToken(token, padded, ordinal, callback) {
var func = callback;
if (typeof callback === 'string') {
func = function () {
return this[callback]();
};
}
if (token) {
formatTokenFunctions[token] = func;
}
if (padded) {
formatTokenFunctions[padded[0]] = function () {
return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
};
}
if (ordinal) {
formatTokenFunctions[ordinal] = function () {
return this.localeData().ordinal(
func.apply(this, arguments),
token
);
};
}
}
function removeFormattingTokens(input) {
if (input.match(/\[[\s\S]/)) {
return input.replace(/^\[|\]$/g, '');
}
return input.replace(/\\/g, '');
}
function makeFormatFunction(format) {
var array = format.match(formattingTokens),
i,
length;
for (i = 0, length = array.length; i < length; i++) {
if (formatTokenFunctions[array[i]]) {
array[i] = formatTokenFunctions[array[i]];
} else {
array[i] = removeFormattingTokens(array[i]);
}
}
return function (mom) {
var output = '',
i;
for (i = 0; i < length; i++) {
output += isFunction(array[i])
? array[i].call(mom, format)
: array[i];
}
return output;
};
}
// format date using native date object
function formatMoment(m, format) {
if (!m.isValid()) {
return m.localeData().invalidDate();
}
format = expandFormat(format, m.localeData());
formatFunctions[format] =
formatFunctions[format] || makeFormatFunction(format);
return formatFunctions[format](m);
}
function expandFormat(format, locale) {
var i = 5;
function replaceLongDateFormatTokens(input) {
return locale.longDateFormat(input) || input;
}
localFormattingTokens.lastIndex = 0;
while (i >= 0 && localFormattingTokens.test(format)) {
format = format.replace(
localFormattingTokens,
replaceLongDateFormatTokens
);
localFormattingTokens.lastIndex = 0;
i -= 1;
}
return format;
}
var defaultLongDateFormat = {
LTS: 'h:mm:ss A',
LT: 'h:mm A',
L: 'MM/DD/YYYY',
LL: 'MMMM D, YYYY',
LLL: 'MMMM D, YYYY h:mm A',
LLLL: 'dddd, MMMM D, YYYY h:mm A',
};
function longDateFormat(key) {
var format = this._longDateFormat[key],
formatUpper = this._longDateFormat[key.toUpperCase()];
if (format || !formatUpper) {
return format;
}
this._longDateFormat[key] = formatUpper
.match(formattingTokens)
.map(function (tok) {
if (
tok === 'MMMM' ||
tok === 'MM' ||
tok === 'DD' ||
tok === 'dddd'
) {
return tok.slice(1);
}
return tok;
})
.join('');
return this._longDateFormat[key];
}
var defaultInvalidDate = 'Invalid date';
function invalidDate() {
return this._invalidDate;
}
var defaultOrdinal = '%d',
defaultDayOfMonthOrdinalParse = /\d{1,2}/;
function ordinal(number) {
return this._ordinal.replace('%d', number);
}
var defaultRelativeTime = {
future: 'in %s',
past: '%s ago',
s: 'a few seconds',
ss: '%d seconds',
m: 'a minute',
mm: '%d minutes',
h: 'an hour',
hh: '%d hours',
d: 'a day',
dd: '%d days',
w: 'a week',
ww: '%d weeks',
M: 'a month',
MM: '%d months',
y: 'a year',
yy: '%d years',
};
function relativeTime(number, withoutSuffix, string, isFuture) {
var output = this._relativeTime[string];
return isFunction(output)
? output(number, withoutSuffix, string, isFuture)
: output.replace(/%d/i, number);
}
function pastFuture(diff, output) {
var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
return isFunction(format) ? format(output) : format.replace(/%s/i, output);
}
var aliases = {};
function addUnitAlias(unit, shorthand) {
var lowerCase = unit.toLowerCase();
aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
}
function normalizeUnits(units) {
return typeof units === 'string'
? aliases[units] || aliases[units.toLowerCase()]
: undefined;
}
function normalizeObjectUnits(inputObject) {
var normalizedInput = {},
normalizedProp,
prop;
for (prop in inputObject) {
if (hasOwnProp(inputObject, prop)) {
normalizedProp = normalizeUnits(prop);
if (normalizedProp) {
normalizedInput[normalizedProp] = inputObject[prop];
}
}
}
return normalizedInput;
}
var priorities = {};
function addUnitPriority(unit, priority) {
priorities[unit] = priority;
}
function getPrioritizedUnits(unitsObj) {
var units = [],
u;
for (u in unitsObj) {
if (hasOwnProp(unitsObj, u)) {
units.push({ unit: u, priority: priorities[u] });
}
}
units.sort(function (a, b) {
return a.priority - b.priority;
});
return units;
}
function isLeapYear(year) {
return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
}
function absFloor(number) {
if (number < 0) {
// -0 -> 0
return Math.ceil(number) || 0;
} else {
return Math.floor(number);
}
}
function toInt(argumentForCoercion) {
var coercedNumber = +argumentForCoercion,
value = 0;
if (coercedNumber !== 0 && isFinite(coercedNumber)) {
value = absFloor(coercedNumber);
}
return value;
}
function makeGetSet(unit, keepTime) {
return function (value) {
if (value != null) {
set$1(this, unit, value);
hooks.updateOffset(this, keepTime);
return this;
} else {
return get(this, unit);
}
};
}
function get(mom, unit) {
return mom.isValid()
? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
: NaN;
}
function set$1(mom, unit, value) {
if (mom.isValid() && !isNaN(value)) {
if (
unit === 'FullYear' &&
isLeapYear(mom.year()) &&
mom.month() === 1 &&
mom.date() === 29
) {
value = toInt(value);
mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
value,
mom.month(),
daysInMonth(value, mom.month())
);
} else {
mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
}
}
}
// MOMENTS
function stringGet(units) {
units = normalizeUnits(units);
if (isFunction(this[units])) {
return this[units]();
}
return this;
}
function stringSet(units, value) {
if (typeof units === 'object') {
units = normalizeObjectUnits(units);
var prioritized = getPrioritizedUnits(units),
i,
prioritizedLen = prioritized.length;
for (i = 0; i < prioritizedLen; i++) {
this[prioritized[i].unit](units[prioritized[i].unit]);
}
} else {
units = normalizeUnits(units);
if (isFunction(this[units])) {
return this[units](value);
}
}
return this;
}
var match1 = /\d/, // 0 - 9
match2 = /\d\d/, // 00 - 99
match3 = /\d{3}/, // 000 - 999
match4 = /\d{4}/, // 0000 - 9999
match6 = /[+-]?\d{6}/, // -999999 - 999999
match1to2 = /\d\d?/, // 0 - 99
match3to4 = /\d\d\d\d?/, // 999 - 9999
match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999
match1to3 = /\d{1,3}/, // 0 - 999
match1to4 = /\d{1,4}/, // 0 - 9999
match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
matchUnsigned = /\d+/, // 0 - inf
matchSigned = /[+-]?\d+/, // -inf - inf
matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
// any word (or two) characters or numbers including two/three word month in arabic.
// includes scottish gaelic two word and hyphenated months
matchWord =
/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
regexes;
regexes = {};
function addRegexToken(token, regex, strictRegex) {
regexes[token] = isFunction(regex)
? regex
: function (isStrict, localeData) {
return isStrict && strictRegex ? strictRegex : regex;
};
}
function getParseRegexForToken(token, config) {
if (!hasOwnProp(regexes, token)) {
return new RegExp(unescapeFormat(token));
}
return regexes[token](config._strict, config._locale);
}
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
function unescapeFormat(s) {
return regexEscape(
s
.replace('\\', '')
.replace(
/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
function (matched, p1, p2, p3, p4) {
return p1 || p2 || p3 || p4;
}
)
);
}
function regexEscape(s) {
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
}
var tokens = {};
function addParseToken(token, callback) {
var i,
func = callback,
tokenLen;
if (typeof token === 'string') {
token = [token];
}
if (isNumber(callback)) {
func = function (input, array) {
array[callback] = toInt(input);
};
}
tokenLen = token.length;
for (i = 0; i < tokenLen; i++) {
tokens[token[i]] = func;
}
}
function addWeekParseToken(token, callback) {
addParseToken(token, function (input, array, config, token) {
config._w = config._w || {};
callback(input, config._w, config, token);
});
}
function addTimeToArrayFromToken(token, input, config) {
if (input != null && hasOwnProp(tokens, token)) {
tokens[token](input, config._a, config, token);
}
}
var YEAR = 0,
MONTH = 1,
DATE = 2,
HOUR = 3,
MINUTE = 4,
SECOND = 5,
MILLISECOND = 6,
WEEK = 7,
WEEKDAY = 8;
function mod(n, x) {
return ((n % x) + x) % x;
}
var indexOf;
if (Array.prototype.indexOf) {
indexOf = Array.prototype.indexOf;
} else {
indexOf = function (o) {
// I know
var i;
for (i = 0; i < this.length; ++i) {
if (this[i] === o) {
return i;
}
}
return -1;
};
}
function daysInMonth(year, month) {
if (isNaN(year) || isNaN(month)) {
return NaN;
}
var modMonth = mod(month, 12);
year += (month - modMonth) / 12;
return modMonth === 1
? isLeapYear(year)
? 29
: 28
: 31 - ((modMonth % 7) % 2);
}
// FORMATTING
addFormatToken('M', ['MM', 2], 'Mo', function () {
return this.month() + 1;
});
addFormatToken('MMM', 0, 0, function (format) {
return this.localeData().monthsShort(this, format);
});
addFormatToken('MMMM', 0, 0, function (format) {
return this.localeData().months(this, format);
});
// ALIASES
addUnitAlias('month', 'M');
// PRIORITY
addUnitPriority('month', 8);
// PARSING
addRegexToken('M', match1to2);
addRegexToken('MM', match1to2, match2);
addRegexToken('MMM', function (isStrict, locale) {
return locale.monthsShortRegex(isStrict);
});
addRegexToken('MMMM', function (isStrict, locale) {
return locale.monthsRegex(isStrict);
});
addParseToken(['M', 'MM'], function (input, array) {
array[MONTH] = toInt(input) - 1;
});
addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
var month = config._locale.monthsParse(input, token, config._strict);
// if we didn't find a month name, mark the date as invalid.
if (month != null) {
array[MONTH] = month;
} else {
getParsingFlags(config).invalidMonth = input;
}
});
// LOCALES
var defaultLocaleMonths =
'January_February_March_April_May_June_July_August_September_October_November_December'.split(
'_'
),
defaultLocaleMonthsShort =
'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
defaultMonthsShortRegex = matchWord,
defaultMonthsRegex = matchWord;
function localeMonths(m, format) {
if (!m) {
return isArray(this._months)
? this._months
: this._months['standalone'];
}
return isArray(this._months)
? this._months[m.month()]
: this._months[
(this._months.isFormat || MONTHS_IN_FORMAT).test(format)
? 'format'
: 'standalone'
][m.month()];
}
function localeMonthsShort(m, format) {
if (!m) {
return isArray(this._monthsShort)
? this._monthsShort
: this._monthsShort['standalone'];
}
return isArray(this._monthsShort)
? this._monthsShort[m.month()]
: this._monthsShort[
MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'
][m.month()];
}
function handleStrictParse(monthName, format, strict) {
var i,
ii,
mom,
llc = monthName.toLocaleLowerCase();
if (!this._monthsParse) {
// this is not used
this._monthsParse = [];
this._longMonthsParse = [];
this._shortMonthsParse = [];
for (i = 0; i < 12; ++i) {
mom = createUTC([2000, i]);
this._shortMonthsParse[i] = this.monthsShort(
mom,
''
).toLocaleLowerCase();
this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
}
}
if (strict) {
if (format === 'MMM') {
ii = indexOf.call(this._shortMonthsParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._longMonthsParse, llc);
return ii !== -1 ? ii : null;
}
} else {
if (format === 'MMM') {
ii = indexOf.call(this._shortMonthsParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._longMonthsParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._longMonthsParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortMonthsParse, llc);
return ii !== -1 ? ii : null;
}
}
}
function localeMonthsParse(monthName, format, strict) {
var i, mom, regex;
if (this._monthsParseExact) {
return handleStrictParse.call(this, monthName, format, strict);
}
if (!this._monthsParse) {
this._monthsParse = [];
this._longMonthsParse = [];
this._shortMonthsParse = [];
}
// TODO: add sorting
// Sorting makes sure if one month (or abbr) is a prefix of another
// see sorting in computeMonthsParse
for (i = 0; i < 12; i++) {
// make the regex if we don't have it already
mom = createUTC([2000, i]);
if (strict && !this._longMonthsParse[i]) {
this._longMonthsParse[i] = new RegExp(
'^' + this.months(mom, '').replace('.', '') + '$',
'i'
);
this._shortMonthsParse[i] = new RegExp(
'^' + this.monthsShort(mom, '').replace('.', '') + '$',
'i'
);
}
if (!strict && !this._monthsParse[i]) {
regex =
'^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
}
// test the regex
if (
strict &&
format === 'MMMM' &&
this._longMonthsParse[i].test(monthName)
) {
return i;
} else if (
strict &&
format === 'MMM' &&
this._shortMonthsParse[i].test(monthName)
) {
return i;
} else if (!strict && this._monthsParse[i].test(monthName)) {
return i;
}
}
}
// MOMENTS
function setMonth(mom, value) {
var dayOfMonth;
if (!mom.isValid()) {
// No op
return mom;
}
if (typeof value === 'string') {
if (/^\d+$/.test(value)) {
value = toInt(value);
} else {
value = mom.localeData().monthsParse(value);
// TODO: Another silent failure?
if (!isNumber(value)) {
return mom;
}
}
}
dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
return mom;
}
function getSetMonth(value) {
if (value != null) {
setMonth(this, value);
hooks.updateOffset(this, true);
return this;
} else {
return get(this, 'Month');
}
}
function getDaysInMonth() {
return daysInMonth(this.year(), this.month());
}
function monthsShortRegex(isStrict) {
if (this._monthsParseExact) {
if (!hasOwnProp(this, '_monthsRegex')) {
computeMonthsParse.call(this);
}
if (isStrict) {
return this._monthsShortStrictRegex;
} else {
return this._monthsShortRegex;
}
} else {
if (!hasOwnProp(this, '_monthsShortRegex')) {
this._monthsShortRegex = defaultMonthsShortRegex;
}
return this._monthsShortStrictRegex && isStrict
? this._monthsShortStrictRegex
: this._monthsShortRegex;
}
}
function monthsRegex(isStrict) {
if (this._monthsParseExact) {
if (!hasOwnProp(this, '_monthsRegex')) {
computeMonthsParse.call(this);
}
if (isStrict) {
return this._monthsStrictRegex;
} else {
return this._monthsRegex;
}
} else {
if (!hasOwnProp(this, '_monthsRegex')) {
this._monthsRegex = defaultMonthsRegex;
}
return this._monthsStrictRegex && isStrict
? this._monthsStrictRegex
: this._monthsRegex;
}
}
function computeMonthsParse() {
function cmpLenRev(a, b) {
return b.length - a.length;
}
var shortPieces = [],
longPieces = [],
mixedPieces = [],
i,
mom;
for (i = 0; i < 12; i++) {
// make the regex if we don't have it already
mom = createUTC([2000, i]);
shortPieces.push(this.monthsShort(mom, ''));
longPieces.push(this.months(mom, ''));
mixedPieces.push(this.months(mom, ''));
mixedPieces.push(this.monthsShort(mom, ''));
}
// Sorting makes sure if one month (or abbr) is a prefix of another it
// will match the longer piece.
shortPieces.sort(cmpLenRev);
longPieces.sort(cmpLenRev);
mixedPieces.sort(cmpLenRev);
for (i = 0; i < 12; i++) {
shortPieces[i] = regexEscape(shortPieces[i]);
longPieces[i] = regexEscape(longPieces[i]);
}
for (i = 0; i < 24; i++) {
mixedPieces[i] = regexEscape(mixedPieces[i]);
}
this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._monthsShortRegex = this._monthsRegex;
this._monthsStrictRegex = new RegExp(
'^(' + longPieces.join('|') + ')',
'i'
);
this._monthsShortStrictRegex = new RegExp(
'^(' + shortPieces.join('|') + ')',
'i'
);
}
// FORMATTING
addFormatToken('Y', 0, 0, function () {
var y = this.year();
return y <= 9999 ? zeroFill(y, 4) : '+' + y;
});
addFormatToken(0, ['YY', 2], 0, function () {
return this.year() % 100;
});
addFormatToken(0, ['YYYY', 4], 0, 'year');
addFormatToken(0, ['YYYYY', 5], 0, 'year');
addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
// ALIASES
addUnitAlias('year', 'y');
// PRIORITIES
addUnitPriority('year', 1);
// PARSING
addRegexToken('Y', matchSigned);
addRegexToken('YY', match1to2, match2);
addRegexToken('YYYY', match1to4, match4);
addRegexToken('YYYYY', match1to6, match6);
addRegexToken('YYYYYY', match1to6, match6);
addParseToken(['YYYYY', 'YYYYYY'], YEAR);
addParseToken('YYYY', function (input, array) {
array[YEAR] =
input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
});
addParseToken('YY', function (input, array) {
array[YEAR] = hooks.parseTwoDigitYear(input);
});
addParseToken('Y', function (input, array) {
array[YEAR] = parseInt(input, 10);
});
// HELPERS
function daysInYear(year) {
return isLeapYear(year) ? 366 : 365;
}
// HOOKS
hooks.parseTwoDigitYear = function (input) {
return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
};
// MOMENTS
var getSetYear = makeGetSet('FullYear', true);
function getIsLeapYear() {
return isLeapYear(this.year());
}
function createDate(y, m, d, h, M, s, ms) {
// can't just apply() to create a date:
// https://stackoverflow.com/q/181348
var date;
// the date constructor remaps years 0-99 to 1900-1999
if (y < 100 && y >= 0) {
// preserve leap years using a full 400 year cycle, then reset
date = new Date(y + 400, m, d, h, M, s, ms);
if (isFinite(date.getFullYear())) {
date.setFullYear(y);
}
} else {
date = new Date(y, m, d, h, M, s, ms);
}
return date;
}
function createUTCDate(y) {
var date, args;
// the Date.UTC function remaps years 0-99 to 1900-1999
if (y < 100 && y >= 0) {
args = Array.prototype.slice.call(arguments);
// preserve leap years using a full 400 year cycle, then reset
args[0] = y + 400;
date = new Date(Date.UTC.apply(null, args));
if (isFinite(date.getUTCFullYear())) {
date.setUTCFullYear(y);
}
} else {
date = new Date(Date.UTC.apply(null, arguments));
}
return date;
}
// start-of-first-week - start-of-year
function firstWeekOffset(year, dow, doy) {
var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
fwd = 7 + dow - doy,
// first-week day local weekday -- which local weekday is fwd
fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
return -fwdlw + fwd - 1;
}
// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
var localWeekday = (7 + weekday - dow) % 7,
weekOffset = firstWeekOffset(year, dow, doy),
dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
resYear,
resDayOfYear;
if (dayOfYear <= 0) {
resYear = year - 1;
resDayOfYear = daysInYear(resYear) + dayOfYear;
} else if (dayOfYear > daysInYear(year)) {
resYear = year + 1;
resDayOfYear = dayOfYear - daysInYear(year);
} else {
resYear = year;
resDayOfYear = dayOfYear;
}
return {
year: resYear,
dayOfYear: resDayOfYear,
};
}
function weekOfYear(mom, dow, doy) {
var weekOffset = firstWeekOffset(mom.year(), dow, doy),
week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
resWeek,
resYear;
if (week < 1) {
resYear = mom.year() - 1;
resWeek = week + weeksInYear(resYear, dow, doy);
} else if (week > weeksInYear(mom.year(), dow, doy)) {
resWeek = week - weeksInYear(mom.year(), dow, doy);
resYear = mom.year() + 1;
} else {
resYear = mom.year();
resWeek = week;
}
return {
week: resWeek,
year: resYear,
};
}
function weeksInYear(year, dow, doy) {
var weekOffset = firstWeekOffset(year, dow, doy),
weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
}
// FORMATTING
addFormatToken('w', ['ww', 2], 'wo', 'week');
addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
// ALIASES
addUnitAlias('week', 'w');
addUnitAlias('isoWeek', 'W');
// PRIORITIES
addUnitPriority('week', 5);
addUnitPriority('isoWeek', 5);
// PARSING
addRegexToken('w', match1to2);
addRegexToken('ww', match1to2, match2);
addRegexToken('W', match1to2);
addRegexToken('WW', match1to2, match2);
addWeekParseToken(
['w', 'ww', 'W', 'WW'],
function (input, week, config, token) {
week[token.substr(0, 1)] = toInt(input);
}
);
// HELPERS
// LOCALES
function localeWeek(mom) {
return weekOfYear(mom, this._week.dow, this._week.doy).week;
}
var defaultLocaleWeek = {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
};
function localeFirstDayOfWeek() {
return this._week.dow;
}
function localeFirstDayOfYear() {
return this._week.doy;
}
// MOMENTS
function getSetWeek(input) {
var week = this.localeData().week(this);
return input == null ? week : this.add((input - week) * 7, 'd');
}
function getSetISOWeek(input) {
var week = weekOfYear(this, 1, 4).week;
return input == null ? week : this.add((input - week) * 7, 'd');
}
// FORMATTING
addFormatToken('d', 0, 'do', 'day');
addFormatToken('dd', 0, 0, function (format) {
return this.localeData().weekdaysMin(this, format);
});
addFormatToken('ddd', 0, 0, function (format) {
return this.localeData().weekdaysShort(this, format);
});
addFormatToken('dddd', 0, 0, function (format) {
return this.localeData().weekdays(this, format);
});
addFormatToken('e', 0, 0, 'weekday');
addFormatToken('E', 0, 0, 'isoWeekday');
// ALIASES
addUnitAlias('day', 'd');
addUnitAlias('weekday', 'e');
addUnitAlias('isoWeekday', 'E');
// PRIORITY
addUnitPriority('day', 11);
addUnitPriority('weekday', 11);
addUnitPriority('isoWeekday', 11);
// PARSING
addRegexToken('d', match1to2);
addRegexToken('e', match1to2);
addRegexToken('E', match1to2);
addRegexToken('dd', function (isStrict, locale) {
return locale.weekdaysMinRegex(isStrict);
});
addRegexToken('ddd', function (isStrict, locale) {
return locale.weekdaysShortRegex(isStrict);
});
addRegexToken('dddd', function (isStrict, locale) {
return locale.weekdaysRegex(isStrict);
});
addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
var weekday = config._locale.weekdaysParse(input, token, config._strict);
// if we didn't get a weekday name, mark the date as invalid
if (weekday != null) {
week.d = weekday;
} else {
getParsingFlags(config).invalidWeekday = input;
}
});
addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
week[token] = toInt(input);
});
// HELPERS
function parseWeekday(input, locale) {
if (typeof input !== 'string') {
return input;
}
if (!isNaN(input)) {
return parseInt(input, 10);
}
input = locale.weekdaysParse(input);
if (typeof input === 'number') {
return input;
}
return null;
}
function parseIsoWeekday(input, locale) {
if (typeof input === 'string') {
return locale.weekdaysParse(input) % 7 || 7;
}
return isNaN(input) ? null : input;
}
// LOCALES
function shiftWeekdays(ws, n) {
return ws.slice(n, 7).concat(ws.slice(0, n));
}
var defaultLocaleWeekdays =
'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
defaultWeekdaysRegex = matchWord,
defaultWeekdaysShortRegex = matchWord,
defaultWeekdaysMinRegex = matchWord;
function localeWeekdays(m, format) {
var weekdays = isArray(this._weekdays)
? this._weekdays
: this._weekdays[
m && m !== true && this._weekdays.isFormat.test(format)
? 'format'
: 'standalone'
];
return m === true
? shiftWeekdays(weekdays, this._week.dow)
: m
? weekdays[m.day()]
: weekdays;
}
function localeWeekdaysShort(m) {
return m === true
? shiftWeekdays(this._weekdaysShort, this._week.dow)
: m
? this._weekdaysShort[m.day()]
: this._weekdaysShort;
}
function localeWeekdaysMin(m) {
return m === true
? shiftWeekdays(this._weekdaysMin, this._week.dow)
: m
? this._weekdaysMin[m.day()]
: this._weekdaysMin;
}
function handleStrictParse$1(weekdayName, format, strict) {
var i,
ii,
mom,
llc = weekdayName.toLocaleLowerCase();
if (!this._weekdaysParse) {
this._weekdaysParse = [];
this._shortWeekdaysParse = [];
this._minWeekdaysParse = [];
for (i = 0; i < 7; ++i) {
mom = createUTC([2000, 1]).day(i);
this._minWeekdaysParse[i] = this.weekdaysMin(
mom,
''
).toLocaleLowerCase();
this._shortWeekdaysParse[i] = this.weekdaysShort(
mom,
''
).toLocaleLowerCase();
this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
}
}
if (strict) {
if (format === 'dddd') {
ii = indexOf.call(this._weekdaysParse, llc);
return ii !== -1 ? ii : null;
} else if (format === 'ddd') {
ii = indexOf.call(this._shortWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
}
} else {
if (format === 'dddd') {
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else if (format === 'ddd') {
ii = indexOf.call(this._shortWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._minWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortWeekdaysParse, llc);
return ii !== -1 ? ii : null;
}
}
}
function localeWeekdaysParse(weekdayName, format, strict) {
var i, mom, regex;
if (this._weekdaysParseExact) {
return handleStrictParse$1.call(this, weekdayName, format, strict);
}
if (!this._weekdaysParse) {
this._weekdaysParse = [];
this._minWeekdaysParse = [];
this._shortWeekdaysParse = [];
this._fullWeekdaysParse = [];
}
for (i = 0; i < 7; i++) {
// make the regex if we don't have it already
mom = createUTC([2000, 1]).day(i);
if (strict && !this._fullWeekdaysParse[i]) {
this._fullWeekdaysParse[i] = new RegExp(
'^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
'i'
);
this._shortWeekdaysParse[i] = new RegExp(
'^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
'i'
);
this._minWeekdaysParse[i] = new RegExp(
'^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
'i'
);
}
if (!this._weekdaysParse[i]) {
regex =
'^' +
this.weekdays(mom, '') +
'|^' +
this.weekdaysShort(mom, '') +
'|^' +
this.weekdaysMin(mom, '');
this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
}
// test the regex
if (
strict &&
format === 'dddd' &&
this._fullWeekdaysParse[i].test(weekdayName)
) {
return i;
} else if (
strict &&
format === 'ddd' &&
this._shortWeekdaysParse[i].test(weekdayName)
) {
return i;
} else if (
strict &&
format === 'dd' &&
this._minWeekdaysParse[i].test(weekdayName)
) {
return i;
} else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
return i;
}
}
}
// MOMENTS
function getSetDayOfWeek(input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
if (input != null) {
input = parseWeekday(input, this.localeData());
return this.add(input - day, 'd');
} else {
return day;
}
}
function getSetLocaleDayOfWeek(input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
return input == null ? weekday : this.add(input - weekday, 'd');
}
function getSetISODayOfWeek(input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
// behaves the same as moment#day except
// as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
// as a setter, sunday should belong to the previous week.
if (input != null) {
var weekday = parseIsoWeekday(input, this.localeData());
return this.day(this.day() % 7 ? weekday : weekday - 7);
} else {
return this.day() || 7;
}
}
function weekdaysRegex(isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysStrictRegex;
} else {
return this._weekdaysRegex;
}
} else {
if (!hasOwnProp(this, '_weekdaysRegex')) {
this._weekdaysRegex = defaultWeekdaysRegex;
}
return this._weekdaysStrictRegex && isStrict
? this._weekdaysStrictRegex
: this._weekdaysRegex;
}
}
function weekdaysShortRegex(isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysShortStrictRegex;
} else {
return this._weekdaysShortRegex;
}
} else {
if (!hasOwnProp(this, '_weekdaysShortRegex')) {
this._weekdaysShortRegex = defaultWeekdaysShortRegex;
}
return this._weekdaysShortStrictRegex && isStrict
? this._weekdaysShortStrictRegex
: this._weekdaysShortRegex;
}
}
function weekdaysMinRegex(isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysMinStrictRegex;
} else {
return this._weekdaysMinRegex;
}
} else {
if (!hasOwnProp(this, '_weekdaysMinRegex')) {
this._weekdaysMinRegex = defaultWeekdaysMinRegex;
}
return this._weekdaysMinStrictRegex && isStrict
? this._weekdaysMinStrictRegex
: this._weekdaysMinRegex;
}
}
function computeWeekdaysParse() {
function cmpLenRev(a, b) {
return b.length - a.length;
}
var minPieces = [],
shortPieces = [],
longPieces = [],
mixedPieces = [],
i,
mom,
minp,
shortp,
longp;
for (i = 0; i < 7; i++) {
// make the regex if we don't have it already
mom = createUTC([2000, 1]).day(i);
minp = regexEscape(this.weekdaysMin(mom, ''));
shortp = regexEscape(this.weekdaysShort(mom, ''));
longp = regexEscape(this.weekdays(mom, ''));
minPieces.push(minp);
shortPieces.push(shortp);
longPieces.push(longp);
mixedPieces.push(minp);
mixedPieces.push(shortp);
mixedPieces.push(longp);
}
// Sorting makes sure if one weekday (or abbr) is a prefix of another it
// will match the longer piece.
minPieces.sort(cmpLenRev);
shortPieces.sort(cmpLenRev);
longPieces.sort(cmpLenRev);
mixedPieces.sort(cmpLenRev);
this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._weekdaysShortRegex = this._weekdaysRegex;
this._weekdaysMinRegex = this._weekdaysRegex;
this._weekdaysStrictRegex = new RegExp(
'^(' + longPieces.join('|') + ')',
'i'
);
this._weekdaysShortStrictRegex = new RegExp(
'^(' + shortPieces.join('|') + ')',
'i'
);
this._weekdaysMinStrictRegex = new RegExp(
'^(' + minPieces.join('|') + ')',
'i'
);
}
// FORMATTING
function hFormat() {
return this.hours() % 12 || 12;
}
function kFormat() {
return this.hours() || 24;
}
addFormatToken('H', ['HH', 2], 0, 'hour');
addFormatToken('h', ['hh', 2], 0, hFormat);
addFormatToken('k', ['kk', 2], 0, kFormat);
addFormatToken('hmm', 0, 0, function () {
return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
});
addFormatToken('hmmss', 0, 0, function () {
return (
'' +
hFormat.apply(this) +
zeroFill(this.minutes(), 2) +
zeroFill(this.seconds(), 2)
);
});
addFormatToken('Hmm', 0, 0, function () {
return '' + this.hours() + zeroFill(this.minutes(), 2);
});
addFormatToken('Hmmss', 0, 0, function () {
return (
'' +
this.hours() +
zeroFill(this.minutes(), 2) +
zeroFill(this.seconds(), 2)
);
});
function meridiem(token, lowercase) {
addFormatToken(token, 0, 0, function () {
return this.localeData().meridiem(
this.hours(),
this.minutes(),
lowercase
);
});
}
meridiem('a', true);
meridiem('A', false);
// ALIASES
addUnitAlias('hour', 'h');
// PRIORITY
addUnitPriority('hour', 13);
// PARSING
function matchMeridiem(isStrict, locale) {
return locale._meridiemParse;
}
addRegexToken('a', matchMeridiem);
addRegexToken('A', matchMeridiem);
addRegexToken('H', match1to2);
addRegexToken('h', match1to2);
addRegexToken('k', match1to2);
addRegexToken('HH', match1to2, match2);
addRegexToken('hh', match1to2, match2);
addRegexToken('kk', match1to2, match2);
addRegexToken('hmm', match3to4);
addRegexToken('hmmss', match5to6);
addRegexToken('Hmm', match3to4);
addRegexToken('Hmmss', match5to6);
addParseToken(['H', 'HH'], HOUR);
addParseToken(['k', 'kk'], function (input, array, config) {
var kInput = toInt(input);
array[HOUR] = kInput === 24 ? 0 : kInput;
});
addParseToken(['a', 'A'], function (input, array, config) {
config._isPm = config._locale.isPM(input);
config._meridiem = input;
});
addParseToken(['h', 'hh'], function (input, array, config) {
array[HOUR] = toInt(input);
getParsingFlags(config).bigHour = true;
});
addParseToken('hmm', function (input, array, config) {
var pos = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos));
array[MINUTE] = toInt(input.substr(pos));
getParsingFlags(config).bigHour = true;
});
addParseToken('hmmss', function (input, array, config) {
var pos1 = input.length - 4,
pos2 = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos1));
array[MINUTE] = toInt(input.substr(pos1, 2));
array[SECOND] = toInt(input.substr(pos2));
getParsingFlags(config).bigHour = true;
});
addParseToken('Hmm', function (input, array, config) {
var pos = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos));
array[MINUTE] = toInt(input.substr(pos));
});
addParseToken('Hmmss', function (input, array, config) {
var pos1 = input.length - 4,
pos2 = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos1));
array[MINUTE] = toInt(input.substr(pos1, 2));
array[SECOND] = toInt(input.substr(pos2));
});
// LOCALES
function localeIsPM(input) {
// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
// Using charAt should be more compatible.
return (input + '').toLowerCase().charAt(0) === 'p';
}
var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
// Setting the hour should keep the time, because the user explicitly
// specified which hour they want. So trying to maintain the same hour (in
// a new timezone) makes sense. Adding/subtracting hours does not follow
// this rule.
getSetHour = makeGetSet('Hours', true);
function localeMeridiem(hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'pm' : 'PM';
} else {
return isLower ? 'am' : 'AM';
}
}
var baseConfig = {
calendar: defaultCalendar,
longDateFormat: defaultLongDateFormat,
invalidDate: defaultInvalidDate,
ordinal: defaultOrdinal,
dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
relativeTime: defaultRelativeTime,
months: defaultLocaleMonths,
monthsShort: defaultLocaleMonthsShort,
week: defaultLocaleWeek,
weekdays: defaultLocaleWeekdays,
weekdaysMin: defaultLocaleWeekdaysMin,
weekdaysShort: defaultLocaleWeekdaysShort,
meridiemParse: defaultLocaleMeridiemParse,
};
// internal storage for locale config files
var locales = {},
localeFamilies = {},
globalLocale;
function commonPrefix(arr1, arr2) {
var i,
minl = Math.min(arr1.length, arr2.length);
for (i = 0; i < minl; i += 1) {
if (arr1[i] !== arr2[i]) {
return i;
}
}
return minl;
}
function normalizeLocale(key) {
return key ? key.toLowerCase().replace('_', '-') : key;
}
// pick the locale from the array
// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
function chooseLocale(names) {
var i = 0,
j,
next,
locale,
split;
while (i < names.length) {
split = normalizeLocale(names[i]).split('-');
j = split.length;
next = normalizeLocale(names[i + 1]);
next = next ? next.split('-') : null;
while (j > 0) {
locale = loadLocale(split.slice(0, j).join('-'));
if (locale) {
return locale;
}
if (
next &&
next.length >= j &&
commonPrefix(split, next) >= j - 1
) {
//the next array item is better than a shallower substring of this one
break;
}
j--;
}
i++;
}
return globalLocale;
}
function isLocaleNameSane(name) {
// Prevent names that look like filesystem paths, i.e contain '/' or '\'
return name.match('^[^/\\\\]*$') != null;
}
function loadLocale(name) {
var oldLocale = null,
aliasedRequire;
// TODO: Find a better way to register and load all the locales in Node
if (
locales[name] === undefined &&
typeof module !== 'undefined' &&
module &&
module.exports &&
isLocaleNameSane(name)
) {
try {
oldLocale = globalLocale._abbr;
aliasedRequire = require;
aliasedRequire('./locale/' + name);
getSetGlobalLocale(oldLocale);
} catch (e) {
// mark as not found to avoid repeating expensive file require call causing high CPU
// when trying to find en-US, en_US, en-us for every format call
locales[name] = null; // null means not found
}
}
return locales[name];
}
// This function will load locale and then set the global locale. If
// no arguments are passed in, it will simply return the current global
// locale key.
function getSetGlobalLocale(key, values) {
var data;
if (key) {
if (isUndefined(values)) {
data = getLocale(key);
} else {
data = defineLocale(key, values);
}
if (data) {
// moment.duration._locale = moment._locale = data;
globalLocale = data;
} else {
if (typeof console !== 'undefined' && console.warn) {
//warn user if arguments are passed but the locale could not be set
console.warn(
'Locale ' + key + ' not found. Did you forget to load it?'
);
}
}
}
return globalLocale._abbr;
}
function defineLocale(name, config) {
if (config !== null) {
var locale,
parentConfig = baseConfig;
config.abbr = name;
if (locales[name] != null) {
deprecateSimple(
'defineLocaleOverride',
'use moment.updateLocale(localeName, config) to change ' +
'an existing locale. moment.defineLocale(localeName, ' +
'config) should only be used for creating a new locale ' +
'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
);
parentConfig = locales[name]._config;
} else if (config.parentLocale != null) {
if (locales[config.parentLocale] != null) {
parentConfig = locales[config.parentLocale]._config;
} else {
locale = loadLocale(config.parentLocale);
if (locale != null) {
parentConfig = locale._config;
} else {
if (!localeFamilies[config.parentLocale]) {
localeFamilies[config.parentLocale] = [];
}
localeFamilies[config.parentLocale].push({
name: name,
config: config,
});
return null;
}
}
}
locales[name] = new Locale(mergeConfigs(parentConfig, config));
if (localeFamilies[name]) {
localeFamilies[name].forEach(function (x) {
defineLocale(x.name, x.config);
});
}
// backwards compat for now: also set the locale
// make sure we set the locale AFTER all child locales have been
// created, so we won't end up with the child locale set.
getSetGlobalLocale(name);
return locales[name];
} else {
// useful for testing
delete locales[name];
return null;
}
}
function updateLocale(name, config) {
if (config != null) {
var locale,
tmpLocale,
parentConfig = baseConfig;
if (locales[name] != null && locales[name].parentLocale != null) {
// Update existing child locale in-place to avoid memory-leaks
locales[name].set(mergeConfigs(locales[name]._config, config));
} else {
// MERGE
tmpLocale = loadLocale(name);
if (tmpLocale != null) {
parentConfig = tmpLocale._config;
}
config = mergeConfigs(parentConfig, config);
if (tmpLocale == null) {
// updateLocale is called for creating a new locale
// Set abbr so it will have a name (getters return
// undefined otherwise).
config.abbr = name;
}
locale = new Locale(config);
locale.parentLocale = locales[name];
locales[name] = locale;
}
// backwards compat for now: also set the locale
getSetGlobalLocale(name);
} else {
// pass null for config to unupdate, useful for tests
if (locales[name] != null) {
if (locales[name].parentLocale != null) {
locales[name] = locales[name].parentLocale;
if (name === getSetGlobalLocale()) {
getSetGlobalLocale(name);
}
} else if (locales[name] != null) {
delete locales[name];
}
}
}
return locales[name];
}
// returns locale data
function getLocale(key) {
var locale;
if (key && key._locale && key._locale._abbr) {
key = key._locale._abbr;
}
if (!key) {
return globalLocale;
}
if (!isArray(key)) {
//short-circuit everything else
locale = loadLocale(key);
if (locale) {
return locale;
}
key = [key];
}
return chooseLocale(key);
}
function listLocales() {
return keys(locales);
}
function checkOverflow(m) {
var overflow,
a = m._a;
if (a && getParsingFlags(m).overflow === -2) {
overflow =
a[MONTH] < 0 || a[MONTH] > 11
? MONTH
: a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
? DATE
: a[HOUR] < 0 ||
a[HOUR] > 24 ||
(a[HOUR] === 24 &&
(a[MINUTE] !== 0 ||
a[SECOND] !== 0 ||
a[MILLISECOND] !== 0))
? HOUR
: a[MINUTE] < 0 || a[MINUTE] > 59
? MINUTE
: a[SECOND] < 0 || a[SECOND] > 59
? SECOND
: a[MILLISECOND] < 0 || a[MILLISECOND] > 999
? MILLISECOND
: -1;
if (
getParsingFlags(m)._overflowDayOfYear &&
(overflow < YEAR || overflow > DATE)
) {
overflow = DATE;
}
if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
overflow = WEEK;
}
if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
overflow = WEEKDAY;
}
getParsingFlags(m).overflow = overflow;
}
return m;
}
// iso 8601 regex
// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
var extendedIsoRegex =
/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
basicIsoRegex =
/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
isoDates = [
['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
['GGGG-[W]WW', /\d{4}-W\d\d/, false],
['YYYY-DDD', /\d{4}-\d{3}/],
['YYYY-MM', /\d{4}-\d\d/, false],
['YYYYYYMMDD', /[+-]\d{10}/],
['YYYYMMDD', /\d{8}/],
['GGGG[W]WWE', /\d{4}W\d{3}/],
['GGGG[W]WW', /\d{4}W\d{2}/, false],
['YYYYDDD', /\d{7}/],
['YYYYMM', /\d{6}/, false],
['YYYY', /\d{4}/, false],
],
// iso time formats and regexes
isoTimes = [
['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
['HH:mm:ss', /\d\d:\d\d:\d\d/],
['HH:mm', /\d\d:\d\d/],
['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
['HHmmss', /\d\d\d\d\d\d/],
['HHmm', /\d\d\d\d/],
['HH', /\d\d/],
],
aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
rfc2822 =
/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
obsOffsets = {
UT: 0,
GMT: 0,
EDT: -4 * 60,
EST: -5 * 60,
CDT: -5 * 60,
CST: -6 * 60,
MDT: -6 * 60,
MST: -7 * 60,
PDT: -7 * 60,
PST: -8 * 60,
};
// date from iso format
function configFromISO(config) {
var i,
l,
string = config._i,
match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
allowTime,
dateFormat,
timeFormat,
tzFormat,
isoDatesLen = isoDates.length,
isoTimesLen = isoTimes.length;
if (match) {
getParsingFlags(config).iso = true;
for (i = 0, l = isoDatesLen; i < l; i++) {
if (isoDates[i][1].exec(match[1])) {
dateFormat = isoDates[i][0];
allowTime = isoDates[i][2] !== false;
break;
}
}
if (dateFormat == null) {
config._isValid = false;
return;
}
if (match[3]) {
for (i = 0, l = isoTimesLen; i < l; i++) {
if (isoTimes[i][1].exec(match[3])) {
// match[2] should be 'T' or space
timeFormat = (match[2] || ' ') + isoTimes[i][0];
break;
}
}
if (timeFormat == null) {
config._isValid = false;
return;
}
}
if (!allowTime && timeFormat != null) {
config._isValid = false;
return;
}
if (match[4]) {
if (tzRegex.exec(match[4])) {
tzFormat = 'Z';
} else {
config._isValid = false;
return;
}
}
config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
configFromStringAndFormat(config);
} else {
config._isValid = false;
}
}
function extractFromRFC2822Strings(
yearStr,
monthStr,
dayStr,
hourStr,
minuteStr,
secondStr
) {
var result = [
untruncateYear(yearStr),
defaultLocaleMonthsShort.indexOf(monthStr),
parseInt(dayStr, 10),
parseInt(hourStr, 10),
parseInt(minuteStr, 10),
];
if (secondStr) {
result.push(parseInt(secondStr, 10));
}
return result;
}
function untruncateYear(yearStr) {
var year = parseInt(yearStr, 10);
if (year <= 49) {
return 2000 + year;
} else if (year <= 999) {
return 1900 + year;
}
return year;
}
function preprocessRFC2822(s) {
// Remove comments and folding whitespace and replace multiple-spaces with a single space
return s
.replace(/\([^()]*\)|[\n\t]/g, ' ')
.replace(/(\s\s+)/g, ' ')
.replace(/^\s\s*/, '')
.replace(/\s\s*$/, '');
}
function checkWeekday(weekdayStr, parsedInput, config) {
if (weekdayStr) {
// TODO: Replace the vanilla JS Date object with an independent day-of-week check.
var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
weekdayActual = new Date(
parsedInput[0],
parsedInput[1],
parsedInput[2]
).getDay();
if (weekdayProvided !== weekdayActual) {
getParsingFlags(config).weekdayMismatch = true;
config._isValid = false;
return false;
}
}
return true;
}
function calculateOffset(obsOffset, militaryOffset, numOffset) {
if (obsOffset) {
return obsOffsets[obsOffset];
} else if (militaryOffset) {
// the only allowed military tz is Z
return 0;
} else {
var hm = parseInt(numOffset, 10),
m = hm % 100,
h = (hm - m) / 100;
return h * 60 + m;
}
}
// date and time from ref 2822 format
function configFromRFC2822(config) {
var match = rfc2822.exec(preprocessRFC2822(config._i)),
parsedArray;
if (match) {
parsedArray = extractFromRFC2822Strings(
match[4],
match[3],
match[2],
match[5],
match[6],
match[7]
);
if (!checkWeekday(match[1], parsedArray, config)) {
return;
}
config._a = parsedArray;
config._tzm = calculateOffset(match[8], match[9], match[10]);
config._d = createUTCDate.apply(null, config._a);
config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
getParsingFlags(config).rfc2822 = true;
} else {
config._isValid = false;
}
}
// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
function configFromString(config) {
var matched = aspNetJsonRegex.exec(config._i);
if (matched !== null) {
config._d = new Date(+matched[1]);
return;
}
configFromISO(config);
if (config._isValid === false) {
delete config._isValid;
} else {
return;
}
configFromRFC2822(config);
if (config._isValid === false) {
delete config._isValid;
} else {
return;
}
if (config._strict) {
config._isValid = false;
} else {
// Final attempt, use Input Fallback
hooks.createFromInputFallback(config);
}
}
hooks.createFromInputFallback = deprecate(
'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
function (config) {
config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
}
);
// Pick the first defined of two or three arguments.
function defaults(a, b, c) {
if (a != null) {
return a;
}
if (b != null) {
return b;
}
return c;
}
function currentDateArray(config) {
// hooks is actually the exported moment object
var nowValue = new Date(hooks.now());
if (config._useUTC) {
return [
nowValue.getUTCFullYear(),
nowValue.getUTCMonth(),
nowValue.getUTCDate(),
];
}
return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
}
// convert an array to a date.
// the array should mirror the parameters below
// note: all values past the year are optional and will default to the lowest possible value.
// [year, month, day , hour, minute, second, millisecond]
function configFromArray(config) {
var i,
date,
input = [],
currentDate,
expectedWeekday,
yearToUse;
if (config._d) {
return;
}
currentDate = currentDateArray(config);
//compute day of the year from weeks and weekdays
if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
dayOfYearFromWeekInfo(config);
}
//if the day of the year is set, figure out what it is
if (config._dayOfYear != null) {
yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
if (
config._dayOfYear > daysInYear(yearToUse) ||
config._dayOfYear === 0
) {
getParsingFlags(config)._overflowDayOfYear = true;
}
date = createUTCDate(yearToUse, 0, config._dayOfYear);
config._a[MONTH] = date.getUTCMonth();
config._a[DATE] = date.getUTCDate();
}
// Default to current date.
// * if no year, month, day of month are given, default to today
// * if day of month is given, default month and year
// * if month is given, default only year
// * if year is given, don't default anything
for (i = 0; i < 3 && config._a[i] == null; ++i) {
config._a[i] = input[i] = currentDate[i];
}
// Zero out whatever was not defaulted, including time
for (; i < 7; i++) {
config._a[i] = input[i] =
config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];
}
// Check for 24:00:00.000
if (
config._a[HOUR] === 24 &&
config._a[MINUTE] === 0 &&
config._a[SECOND] === 0 &&
config._a[MILLISECOND] === 0
) {
config._nextDay = true;
config._a[HOUR] = 0;
}
config._d = (config._useUTC ? createUTCDate : createDate).apply(
null,
input
);
expectedWeekday = config._useUTC
? config._d.getUTCDay()
: config._d.getDay();
// Apply timezone offset from input. The actual utcOffset can be changed
// with parseZone.
if (config._tzm != null) {
config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
}
if (config._nextDay) {
config._a[HOUR] = 24;
}
// check for mismatching day of week
if (
config._w &&
typeof config._w.d !== 'undefined' &&
config._w.d !== expectedWeekday
) {
getParsingFlags(config).weekdayMismatch = true;
}
}
function dayOfYearFromWeekInfo(config) {
var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
w = config._w;
if (w.GG != null || w.W != null || w.E != null) {
dow = 1;
doy = 4;
// TODO: We need to take the current isoWeekYear, but that depends on
// how we interpret now (local, utc, fixed offset). So create
// a now version of current config (take local/utc/offset flags, and
// create now).
weekYear = defaults(
w.GG,
config._a[YEAR],
weekOfYear(createLocal(), 1, 4).year
);
week = defaults(w.W, 1);
weekday = defaults(w.E, 1);
if (weekday < 1 || weekday > 7) {
weekdayOverflow = true;
}
} else {
dow = config._locale._week.dow;
doy = config._locale._week.doy;
curWeek = weekOfYear(createLocal(), dow, doy);
weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
// Default to current week.
week = defaults(w.w, curWeek.week);
if (w.d != null) {
// weekday -- low day numbers are considered next week
weekday = w.d;
if (weekday < 0 || weekday > 6) {
weekdayOverflow = true;
}
} else if (w.e != null) {
// local weekday -- counting starts from beginning of week
weekday = w.e + dow;
if (w.e < 0 || w.e > 6) {
weekdayOverflow = true;
}
} else {
// default to beginning of week
weekday = dow;
}
}
if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
getParsingFlags(config)._overflowWeeks = true;
} else if (weekdayOverflow != null) {
getParsingFlags(config)._overflowWeekday = true;
} else {
temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
config._a[YEAR] = temp.year;
config._dayOfYear = temp.dayOfYear;
}
}
// constant that refers to the ISO standard
hooks.ISO_8601 = function () {};
// constant that refers to the RFC 2822 form
hooks.RFC_2822 = function () {};
// date from string and format string
function configFromStringAndFormat(config) {
// TODO: Move this to another part of the creation flow to prevent circular deps
if (config._f === hooks.ISO_8601) {
configFromISO(config);
return;
}
if (config._f === hooks.RFC_2822) {
configFromRFC2822(config);
return;
}
config._a = [];
getParsingFlags(config).empty = true;
// This array is used to make a Date, either with `new Date` or `Date.UTC`
var string = '' + config._i,
i,
parsedInput,
tokens,
token,
skipped,
stringLength = string.length,
totalParsedInputLength = 0,
era,
tokenLen;
tokens =
expandFormat(config._f, config._locale).match(formattingTokens) || [];
tokenLen = tokens.length;
for (i = 0; i < tokenLen; i++) {
token = tokens[i];
parsedInput = (string.match(getParseRegexForToken(token, config)) ||
[])[0];
if (parsedInput) {
skipped = string.substr(0, string.indexOf(parsedInput));
if (skipped.length > 0) {
getParsingFlags(config).unusedInput.push(skipped);
}
string = string.slice(
string.indexOf(parsedInput) + parsedInput.length
);
totalParsedInputLength += parsedInput.length;
}
// don't parse if it's not a known token
if (formatTokenFunctions[token]) {
if (parsedInput) {
getParsingFlags(config).empty = false;
} else {
getParsingFlags(config).unusedTokens.push(token);
}
addTimeToArrayFromToken(token, parsedInput, config);
} else if (config._strict && !parsedInput) {
getParsingFlags(config).unusedTokens.push(token);
}
}
// add remaining unparsed input length to the string
getParsingFlags(config).charsLeftOver =
stringLength - totalParsedInputLength;
if (string.length > 0) {
getParsingFlags(config).unusedInput.push(string);
}
// clear _12h flag if hour is <= 12
if (
config._a[HOUR] <= 12 &&
getParsingFlags(config).bigHour === true &&
config._a[HOUR] > 0
) {
getParsingFlags(config).bigHour = undefined;
}
getParsingFlags(config).parsedDateParts = config._a.slice(0);
getParsingFlags(config).meridiem = config._meridiem;
// handle meridiem
config._a[HOUR] = meridiemFixWrap(
config._locale,
config._a[HOUR],
config._meridiem
);
// handle era
era = getParsingFlags(config).era;
if (era !== null) {
config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
}
configFromArray(config);
checkOverflow(config);
}
function meridiemFixWrap(locale, hour, meridiem) {
var isPm;
if (meridiem == null) {
// nothing to do
return hour;
}
if (locale.meridiemHour != null) {
return locale.meridiemHour(hour, meridiem);
} else if (locale.isPM != null) {
// Fallback
isPm = locale.isPM(meridiem);
if (isPm && hour < 12) {
hour += 12;
}
if (!isPm && hour === 12) {
hour = 0;
}
return hour;
} else {
// this is not supposed to happen
return hour;
}
}
// date from string and array of format strings
function configFromStringAndArray(config) {
var tempConfig,
bestMoment,
scoreToBeat,
i,
currentScore,
validFormatFound,
bestFormatIsValid = false,
configfLen = config._f.length;
if (configfLen === 0) {
getParsingFlags(config).invalidFormat = true;
config._d = new Date(NaN);
return;
}
for (i = 0; i < configfLen; i++) {
currentScore = 0;
validFormatFound = false;
tempConfig = copyConfig({}, config);
if (config._useUTC != null) {
tempConfig._useUTC = config._useUTC;
}
tempConfig._f = config._f[i];
configFromStringAndFormat(tempConfig);
if (isValid(tempConfig)) {
validFormatFound = true;
}
// if there is any input that was not parsed add a penalty for that format
currentScore += getParsingFlags(tempConfig).charsLeftOver;
//or tokens
currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
getParsingFlags(tempConfig).score = currentScore;
if (!bestFormatIsValid) {
if (
scoreToBeat == null ||
currentScore < scoreToBeat ||
validFormatFound
) {
scoreToBeat = currentScore;
bestMoment = tempConfig;
if (validFormatFound) {
bestFormatIsValid = true;
}
}
} else {
if (currentScore < scoreToBeat) {
scoreToBeat = currentScore;
bestMoment = tempConfig;
}
}
}
extend(config, bestMoment || tempConfig);
}
function configFromObject(config) {
if (config._d) {
return;
}
var i = normalizeObjectUnits(config._i),
dayOrDate = i.day === undefined ? i.date : i.day;
config._a = map(
[i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
function (obj) {
return obj && parseInt(obj, 10);
}
);
configFromArray(config);
}
function createFromConfig(config) {
var res = new Moment(checkOverflow(prepareConfig(config)));
if (res._nextDay) {
// Adding is smart enough around DST
res.add(1, 'd');
res._nextDay = undefined;
}
return res;
}
function prepareConfig(config) {
var input = config._i,
format = config._f;
config._locale = config._locale || getLocale(config._l);
if (input === null || (format === undefined && input === '')) {
return createInvalid({ nullInput: true });
}
if (typeof input === 'string') {
config._i = input = config._locale.preparse(input);
}
if (isMoment(input)) {
return new Moment(checkOverflow(input));
} else if (isDate(input)) {
config._d = input;
} else if (isArray(format)) {
configFromStringAndArray(config);
} else if (format) {
configFromStringAndFormat(config);
} else {
configFromInput(config);
}
if (!isValid(config)) {
config._d = null;
}
return config;
}
function configFromInput(config) {
var input = config._i;
if (isUndefined(input)) {
config._d = new Date(hooks.now());
} else if (isDate(input)) {
config._d = new Date(input.valueOf());
} else if (typeof input === 'string') {
configFromString(config);
} else if (isArray(input)) {
config._a = map(input.slice(0), function (obj) {
return parseInt(obj, 10);
});
configFromArray(config);
} else if (isObject(input)) {
configFromObject(config);
} else if (isNumber(input)) {
// from milliseconds
config._d = new Date(input);
} else {
hooks.createFromInputFallback(config);
}
}
function createLocalOrUTC(input, format, locale, strict, isUTC) {
var c = {};
if (format === true || format === false) {
strict = format;
format = undefined;
}
if (locale === true || locale === false) {
strict = locale;
locale = undefined;
}
if (
(isObject(input) && isObjectEmpty(input)) ||
(isArray(input) && input.length === 0)
) {
input = undefined;
}
// object construction must be done this way.
// https://github.com/moment/moment/issues/1423
c._isAMomentObject = true;
c._useUTC = c._isUTC = isUTC;
c._l = locale;
c._i = input;
c._f = format;
c._strict = strict;
return createFromConfig(c);
}
function createLocal(input, format, locale, strict) {
return createLocalOrUTC(input, format, locale, strict, false);
}
var prototypeMin = deprecate(
'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
function () {
var other = createLocal.apply(null, arguments);
if (this.isValid() && other.isValid()) {
return other < this ? this : other;
} else {
return createInvalid();
}
}
),
prototypeMax = deprecate(
'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
function () {
var other = createLocal.apply(null, arguments);
if (this.isValid() && other.isValid()) {
return other > this ? this : other;
} else {
return createInvalid();
}
}
);
// Pick a moment m from moments so that m[fn](other) is true for all
// other. This relies on the function fn to be transitive.
//
// moments should either be an array of moment objects or an array, whose
// first element is an array of moment objects.
function pickBy(fn, moments) {
var res, i;
if (moments.length === 1 && isArray(moments[0])) {
moments = moments[0];
}
if (!moments.length) {
return createLocal();
}
res = moments[0];
for (i = 1; i < moments.length; ++i) {
if (!moments[i].isValid() || moments[i][fn](res)) {
res = moments[i];
}
}
return res;
}
// TODO: Use [].sort instead?
function min() {
var args = [].slice.call(arguments, 0);
return pickBy('isBefore', args);
}
function max() {
var args = [].slice.call(arguments, 0);
return pickBy('isAfter', args);
}
var now = function () {
return Date.now ? Date.now() : +new Date();
};
var ordering = [
'year',
'quarter',
'month',
'week',
'day',
'hour',
'minute',
'second',
'millisecond',
];
function isDurationValid(m) {
var key,
unitHasDecimal = false,
i,
orderLen = ordering.length;
for (key in m) {
if (
hasOwnProp(m, key) &&
!(
indexOf.call(ordering, key) !== -1 &&
(m[key] == null || !isNaN(m[key]))
)
) {
return false;
}
}
for (i = 0; i < orderLen; ++i) {
if (m[ordering[i]]) {
if (unitHasDecimal) {
return false; // only allow non-integers for smallest unit
}
if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
unitHasDecimal = true;
}
}
}
return true;
}
function isValid$1() {
return this._isValid;
}
function createInvalid$1() {
return createDuration(NaN);
}
function Duration(duration) {
var normalizedInput = normalizeObjectUnits(duration),
years = normalizedInput.year || 0,
quarters = normalizedInput.quarter || 0,
months = normalizedInput.month || 0,
weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
days = normalizedInput.day || 0,
hours = normalizedInput.hour || 0,
minutes = normalizedInput.minute || 0,
seconds = normalizedInput.second || 0,
milliseconds = normalizedInput.millisecond || 0;
this._isValid = isDurationValid(normalizedInput);
// representation for dateAddRemove
this._milliseconds =
+milliseconds +
seconds * 1e3 + // 1000
minutes * 6e4 + // 1000 * 60
hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
// Because of dateAddRemove treats 24 hours as different from a
// day when working around DST, we need to store them separately
this._days = +days + weeks * 7;
// It is impossible to translate months into days without knowing
// which months you are are talking about, so we have to store
// it separately.
this._months = +months + quarters * 3 + years * 12;
this._data = {};
this._locale = getLocale();
this._bubble();
}
function isDuration(obj) {
return obj instanceof Duration;
}
function absRound(number) {
if (number < 0) {
return Math.round(-1 * number) * -1;
} else {
return Math.round(number);
}
}
// compare two arrays, return the number of differences
function compareArrays(array1, array2, dontConvert) {
var len = Math.min(array1.length, array2.length),
lengthDiff = Math.abs(array1.length - array2.length),
diffs = 0,
i;
for (i = 0; i < len; i++) {
if (
(dontConvert && array1[i] !== array2[i]) ||
(!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
) {
diffs++;
}
}
return diffs + lengthDiff;
}
// FORMATTING
function offset(token, separator) {
addFormatToken(token, 0, 0, function () {
var offset = this.utcOffset(),
sign = '+';
if (offset < 0) {
offset = -offset;
sign = '-';
}
return (
sign +
zeroFill(~~(offset / 60), 2) +
separator +
zeroFill(~~offset % 60, 2)
);
});
}
offset('Z', ':');
offset('ZZ', '');
// PARSING
addRegexToken('Z', matchShortOffset);
addRegexToken('ZZ', matchShortOffset);
addParseToken(['Z', 'ZZ'], function (input, array, config) {
config._useUTC = true;
config._tzm = offsetFromString(matchShortOffset, input);
});
// HELPERS
// timezone chunker
// '+10:00' > ['10', '00']
// '-1530' > ['-15', '30']
var chunkOffset = /([\+\-]|\d\d)/gi;
function offsetFromString(matcher, string) {
var matches = (string || '').match(matcher),
chunk,
parts,
minutes;
if (matches === null) {
return null;
}
chunk = matches[matches.length - 1] || [];
parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
minutes = +(parts[1] * 60) + toInt(parts[2]);
return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
}
// Return a moment from input, that is local/utc/zone equivalent to model.
function cloneWithOffset(input, model) {
var res, diff;
if (model._isUTC) {
res = model.clone();
diff =
(isMoment(input) || isDate(input)
? input.valueOf()
: createLocal(input).valueOf()) - res.valueOf();
// Use low-level api, because this fn is low-level api.
res._d.setTime(res._d.valueOf() + diff);
hooks.updateOffset(res, false);
return res;
} else {
return createLocal(input).local();
}
}
function getDateOffset(m) {
// On Firefox.24 Date#getTimezoneOffset returns a floating point.
// https://github.com/moment/moment/pull/1871
return -Math.round(m._d.getTimezoneOffset());
}
// HOOKS
// This function will be called whenever a moment is mutated.
// It is intended to keep the offset in sync with the timezone.
hooks.updateOffset = function () {};
// MOMENTS
// keepLocalTime = true means only change the timezone, without
// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
// +0200, so we adjust the time as needed, to be valid.
//
// Keeping the time actually adds/subtracts (one hour)
// from the actual represented time. That is why we call updateOffset
// a second time. In case it wants us to change the offset again
// _changeInProgress == true case, then we have to adjust, because
// there is no such time in the given timezone.
function getSetOffset(input, keepLocalTime, keepMinutes) {
var offset = this._offset || 0,
localAdjust;
if (!this.isValid()) {
return input != null ? this : NaN;
}
if (input != null) {
if (typeof input === 'string') {
input = offsetFromString(matchShortOffset, input);
if (input === null) {
return this;
}
} else if (Math.abs(input) < 16 && !keepMinutes) {
input = input * 60;
}
if (!this._isUTC && keepLocalTime) {
localAdjust = getDateOffset(this);
}
this._offset = input;
this._isUTC = true;
if (localAdjust != null) {
this.add(localAdjust, 'm');
}
if (offset !== input) {
if (!keepLocalTime || this._changeInProgress) {
addSubtract(
this,
createDuration(input - offset, 'm'),
1,
false
);
} else if (!this._changeInProgress) {
this._changeInProgress = true;
hooks.updateOffset(this, true);
this._changeInProgress = null;
}
}
return this;
} else {
return this._isUTC ? offset : getDateOffset(this);
}
}
function getSetZone(input, keepLocalTime) {
if (input != null) {
if (typeof input !== 'string') {
input = -input;
}
this.utcOffset(input, keepLocalTime);
return this;
} else {
return -this.utcOffset();
}
}
function setOffsetToUTC(keepLocalTime) {
return this.utcOffset(0, keepLocalTime);
}
function setOffsetToLocal(keepLocalTime) {
if (this._isUTC) {
this.utcOffset(0, keepLocalTime);
this._isUTC = false;
if (keepLocalTime) {
this.subtract(getDateOffset(this), 'm');
}
}
return this;
}
function setOffsetToParsedOffset() {
if (this._tzm != null) {
this.utcOffset(this._tzm, false, true);
} else if (typeof this._i === 'string') {
var tZone = offsetFromString(matchOffset, this._i);
if (tZone != null) {
this.utcOffset(tZone);
} else {
this.utcOffset(0, true);
}
}
return this;
}
function hasAlignedHourOffset(input) {
if (!this.isValid()) {
return false;
}
input = input ? createLocal(input).utcOffset() : 0;
return (this.utcOffset() - input) % 60 === 0;
}
function isDaylightSavingTime() {
return (
this.utcOffset() > this.clone().month(0).utcOffset() ||
this.utcOffset() > this.clone().month(5).utcOffset()
);
}
function isDaylightSavingTimeShifted() {
if (!isUndefined(this._isDSTShifted)) {
return this._isDSTShifted;
}
var c = {},
other;
copyConfig(c, this);
c = prepareConfig(c);
if (c._a) {
other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
this._isDSTShifted =
this.isValid() && compareArrays(c._a, other.toArray()) > 0;
} else {
this._isDSTShifted = false;
}
return this._isDSTShifted;
}
function isLocal() {
return this.isValid() ? !this._isUTC : false;
}
function isUtcOffset() {
return this.isValid() ? this._isUTC : false;
}
function isUtc() {
return this.isValid() ? this._isUTC && this._offset === 0 : false;
}
// ASP.NET json date format regex
var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
// and further modified to allow for strings containing both week and day
isoRegex =
/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
function createDuration(input, key) {
var duration = input,
// matching against regexp is expensive, do it on demand
match = null,
sign,
ret,
diffRes;
if (isDuration(input)) {
duration = {
ms: input._milliseconds,
d: input._days,
M: input._months,
};
} else if (isNumber(input) || !isNaN(+input)) {
duration = {};
if (key) {
duration[key] = +input;
} else {
duration.milliseconds = +input;
}
} else if ((match = aspNetRegex.exec(input))) {
sign = match[1] === '-' ? -1 : 1;
duration = {
y: 0,
d: toInt(match[DATE]) * sign,
h: toInt(match[HOUR]) * sign,
m: toInt(match[MINUTE]) * sign,
s: toInt(match[SECOND]) * sign,
ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match
};
} else if ((match = isoRegex.exec(input))) {
sign = match[1] === '-' ? -1 : 1;
duration = {
y: parseIso(match[2], sign),
M: parseIso(match[3], sign),
w: parseIso(match[4], sign),
d: parseIso(match[5], sign),
h: parseIso(match[6], sign),
m: parseIso(match[7], sign),
s: parseIso(match[8], sign),
};
} else if (duration == null) {
// checks for null or undefined
duration = {};
} else if (
typeof duration === 'object' &&
('from' in duration || 'to' in duration)
) {
diffRes = momentsDifference(
createLocal(duration.from),
createLocal(duration.to)
);
duration = {};
duration.ms = diffRes.milliseconds;
duration.M = diffRes.months;
}
ret = new Duration(duration);
if (isDuration(input) && hasOwnProp(input, '_locale')) {
ret._locale = input._locale;
}
if (isDuration(input) && hasOwnProp(input, '_isValid')) {
ret._isValid = input._isValid;
}
return ret;
}
createDuration.fn = Duration.prototype;
createDuration.invalid = createInvalid$1;
function parseIso(inp, sign) {
// We'd normally use ~~inp for this, but unfortunately it also
// converts floats to ints.
// inp may be undefined, so careful calling replace on it.
var res = inp && parseFloat(inp.replace(',', '.'));
// apply sign while we're at it
return (isNaN(res) ? 0 : res) * sign;
}
function positiveMomentsDifference(base, other) {
var res = {};
res.months =
other.month() - base.month() + (other.year() - base.year()) * 12;
if (base.clone().add(res.months, 'M').isAfter(other)) {
--res.months;
}
res.milliseconds = +other - +base.clone().add(res.months, 'M');
return res;
}
function momentsDifference(base, other) {
var res;
if (!(base.isValid() && other.isValid())) {
return { milliseconds: 0, months: 0 };
}
other = cloneWithOffset(other, base);
if (base.isBefore(other)) {
res = positiveMomentsDifference(base, other);
} else {
res = positiveMomentsDifference(other, base);
res.milliseconds = -res.milliseconds;
res.months = -res.months;
}
return res;
}
// TODO: remove 'name' arg after deprecation is removed
function createAdder(direction, name) {
return function (val, period) {
var dur, tmp;
//invert the arguments, but complain about it
if (period !== null && !isNaN(+period)) {
deprecateSimple(
name,
'moment().' +
name +
'(period, number) is deprecated. Please use moment().' +
name +
'(number, period). ' +
'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'
);
tmp = val;
val = period;
period = tmp;
}
dur = createDuration(val, period);
addSubtract(this, dur, direction);
return this;
};
}
function addSubtract(mom, duration, isAdding, updateOffset) {
var milliseconds = duration._milliseconds,
days = absRound(duration._days),
months = absRound(duration._months);
if (!mom.isValid()) {
// No op
return;
}
updateOffset = updateOffset == null ? true : updateOffset;
if (months) {
setMonth(mom, get(mom, 'Month') + months * isAdding);
}
if (days) {
set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
}
if (milliseconds) {
mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
}
if (updateOffset) {
hooks.updateOffset(mom, days || months);
}
}
var add = createAdder(1, 'add'),
subtract = createAdder(-1, 'subtract');
function isString(input) {
return typeof input === 'string' || input instanceof String;
}
// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
function isMomentInput(input) {
return (
isMoment(input) ||
isDate(input) ||
isString(input) ||
isNumber(input) ||
isNumberOrStringArray(input) ||
isMomentInputObject(input) ||
input === null ||
input === undefined
);
}
function isMomentInputObject(input) {
var objectTest = isObject(input) && !isObjectEmpty(input),
propertyTest = false,
properties = [
'years',
'year',
'y',
'months',
'month',
'M',
'days',
'day',
'd',
'dates',
'date',
'D',
'hours',
'hour',
'h',
'minutes',
'minute',
'm',
'seconds',
'second',
's',
'milliseconds',
'millisecond',
'ms',
],
i,
property,
propertyLen = properties.length;
for (i = 0; i < propertyLen; i += 1) {
property = properties[i];
propertyTest = propertyTest || hasOwnProp(input, property);
}
return objectTest && propertyTest;
}
function isNumberOrStringArray(input) {
var arrayTest = isArray(input),
dataTypeTest = false;
if (arrayTest) {
dataTypeTest =
input.filter(function (item) {
return !isNumber(item) && isString(input);
}).length === 0;
}
return arrayTest && dataTypeTest;
}
function isCalendarSpec(input) {
var objectTest = isObject(input) && !isObjectEmpty(input),
propertyTest = false,
properties = [
'sameDay',
'nextDay',
'lastDay',
'nextWeek',
'lastWeek',
'sameElse',
],
i,
property;
for (i = 0; i < properties.length; i += 1) {
property = properties[i];
propertyTest = propertyTest || hasOwnProp(input, property);
}
return objectTest && propertyTest;
}
function getCalendarFormat(myMoment, now) {
var diff = myMoment.diff(now, 'days', true);
return diff < -6
? 'sameElse'
: diff < -1
? 'lastWeek'
: diff < 0
? 'lastDay'
: diff < 1
? 'sameDay'
: diff < 2
? 'nextDay'
: diff < 7
? 'nextWeek'
: 'sameElse';
}
function calendar$1(time, formats) {
// Support for single parameter, formats only overload to the calendar function
if (arguments.length === 1) {
if (!arguments[0]) {
time = undefined;
formats = undefined;
} else if (isMomentInput(arguments[0])) {
time = arguments[0];
formats = undefined;
} else if (isCalendarSpec(arguments[0])) {
formats = arguments[0];
time = undefined;
}
}
// We want to compare the start of today, vs this.
// Getting start-of-today depends on whether we're local/utc/offset or not.
var now = time || createLocal(),
sod = cloneWithOffset(now, this).startOf('day'),
format = hooks.calendarFormat(this, sod) || 'sameElse',
output =
formats &&
(isFunction(formats[format])
? formats[format].call(this, now)
: formats[format]);
return this.format(
output || this.localeData().calendar(format, this, createLocal(now))
);
}
function clone() {
return new Moment(this);
}
function isAfter(input, units) {
var localInput = isMoment(input) ? input : createLocal(input);
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(units) || 'millisecond';
if (units === 'millisecond') {
return this.valueOf() > localInput.valueOf();
} else {
return localInput.valueOf() < this.clone().startOf(units).valueOf();
}
}
function isBefore(input, units) {
var localInput = isMoment(input) ? input : createLocal(input);
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(units) || 'millisecond';
if (units === 'millisecond') {
return this.valueOf() < localInput.valueOf();
} else {
return this.clone().endOf(units).valueOf() < localInput.valueOf();
}
}
function isBetween(from, to, units, inclusivity) {
var localFrom = isMoment(from) ? from : createLocal(from),
localTo = isMoment(to) ? to : createLocal(to);
if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
return false;
}
inclusivity = inclusivity || '()';
return (
(inclusivity[0] === '('
? this.isAfter(localFrom, units)
: !this.isBefore(localFrom, units)) &&
(inclusivity[1] === ')'
? this.isBefore(localTo, units)
: !this.isAfter(localTo, units))
);
}
function isSame(input, units) {
var localInput = isMoment(input) ? input : createLocal(input),
inputMs;
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(units) || 'millisecond';
if (units === 'millisecond') {
return this.valueOf() === localInput.valueOf();
} else {
inputMs = localInput.valueOf();
return (
this.clone().startOf(units).valueOf() <= inputMs &&
inputMs <= this.clone().endOf(units).valueOf()
);
}
}
function isSameOrAfter(input, units) {
return this.isSame(input, units) || this.isAfter(input, units);
}
function isSameOrBefore(input, units) {
return this.isSame(input, units) || this.isBefore(input, units);
}
function diff(input, units, asFloat) {
var that, zoneDelta, output;
if (!this.isValid()) {
return NaN;
}
that = cloneWithOffset(input, this);
if (!that.isValid()) {
return NaN;
}
zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
units = normalizeUnits(units);
switch (units) {
case 'year':
output = monthDiff(this, that) / 12;
break;
case 'month':
output = monthDiff(this, that);
break;
case 'quarter':
output = monthDiff(this, that) / 3;
break;
case 'second':
output = (this - that) / 1e3;
break; // 1000
case 'minute':
output = (this - that) / 6e4;
break; // 1000 * 60
case 'hour':
output = (this - that) / 36e5;
break; // 1000 * 60 * 60
case 'day':
output = (this - that - zoneDelta) / 864e5;
break; // 1000 * 60 * 60 * 24, negate dst
case 'week':
output = (this - that - zoneDelta) / 6048e5;
break; // 1000 * 60 * 60 * 24 * 7, negate dst
default:
output = this - that;
}
return asFloat ? output : absFloor(output);
}
function monthDiff(a, b) {
if (a.date() < b.date()) {
// end-of-month calculations work correct when the start month has more
// days than the end month.
return -monthDiff(b, a);
}
// difference in months
var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
// b is in (anchor - 1 month, anchor + 1 month)
anchor = a.clone().add(wholeMonthDiff, 'months'),
anchor2,
adjust;
if (b - anchor < 0) {
anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
// linear across the month
adjust = (b - anchor) / (anchor - anchor2);
} else {
anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
// linear across the month
adjust = (b - anchor) / (anchor2 - anchor);
}
//check for negative zero, return zero if negative zero
return -(wholeMonthDiff + adjust) || 0;
}
hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
function toString() {
return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
}
function toISOString(keepOffset) {
if (!this.isValid()) {
return null;
}
var utc = keepOffset !== true,
m = utc ? this.clone().utc() : this;
if (m.year() < 0 || m.year() > 9999) {
return formatMoment(
m,
utc
? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'
: 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'
);
}
if (isFunction(Date.prototype.toISOString)) {
// native implementation is ~50x faster, use it when we can
if (utc) {
return this.toDate().toISOString();
} else {
return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)
.toISOString()
.replace('Z', formatMoment(m, 'Z'));
}
}
return formatMoment(
m,
utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'
);
}
/**
* Return a human readable representation of a moment that can
* also be evaluated to get a new moment which is the same
*
* @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
*/
function inspect() {
if (!this.isValid()) {
return 'moment.invalid(/* ' + this._i + ' */)';
}
var func = 'moment',
zone = '',
prefix,
year,
datetime,
suffix;
if (!this.isLocal()) {
func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
zone = 'Z';
}
prefix = '[' + func + '("]';
year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
datetime = '-MM-DD[T]HH:mm:ss.SSS';
suffix = zone + '[")]';
return this.format(prefix + year + datetime + suffix);
}
function format(inputString) {
if (!inputString) {
inputString = this.isUtc()
? hooks.defaultFormatUtc
: hooks.defaultFormat;
}
var output = formatMoment(this, inputString);
return this.localeData().postformat(output);
}
function from(time, withoutSuffix) {
if (
this.isValid() &&
((isMoment(time) && time.isValid()) || createLocal(time).isValid())
) {
return createDuration({ to: this, from: time })
.locale(this.locale())
.humanize(!withoutSuffix);
} else {
return this.localeData().invalidDate();
}
}
function fromNow(withoutSuffix) {
return this.from(createLocal(), withoutSuffix);
}
function to(time, withoutSuffix) {
if (
this.isValid() &&
((isMoment(time) && time.isValid()) || createLocal(time).isValid())
) {
return createDuration({ from: this, to: time })
.locale(this.locale())
.humanize(!withoutSuffix);
} else {
return this.localeData().invalidDate();
}
}
function toNow(withoutSuffix) {
return this.to(createLocal(), withoutSuffix);
}
// If passed a locale key, it will set the locale for this
// instance. Otherwise, it will return the locale configuration
// variables for this instance.
function locale(key) {
var newLocaleData;
if (key === undefined) {
return this._locale._abbr;
} else {
newLocaleData = getLocale(key);
if (newLocaleData != null) {
this._locale = newLocaleData;
}
return this;
}
}
var lang = deprecate(
'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
function (key) {
if (key === undefined) {
return this.localeData();
} else {
return this.locale(key);
}
}
);
function localeData() {
return this._locale;
}
var MS_PER_SECOND = 1000,
MS_PER_MINUTE = 60 * MS_PER_SECOND,
MS_PER_HOUR = 60 * MS_PER_MINUTE,
MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
// actual modulo - handles negative numbers (for dates before 1970):
function mod$1(dividend, divisor) {
return ((dividend % divisor) + divisor) % divisor;
}
function localStartOfDate(y, m, d) {
// the date constructor remaps years 0-99 to 1900-1999
if (y < 100 && y >= 0) {
// preserve leap years using a full 400 year cycle, then reset
return new Date(y + 400, m, d) - MS_PER_400_YEARS;
} else {
return new Date(y, m, d).valueOf();
}
}
function utcStartOfDate(y, m, d) {
// Date.UTC remaps years 0-99 to 1900-1999
if (y < 100 && y >= 0) {
// preserve leap years using a full 400 year cycle, then reset
return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
} else {
return Date.UTC(y, m, d);
}
}
function startOf(units) {
var time, startOfDate;
units = normalizeUnits(units);
if (units === undefined || units === 'millisecond' || !this.isValid()) {
return this;
}
startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
switch (units) {
case 'year':
time = startOfDate(this.year(), 0, 1);
break;
case 'quarter':
time = startOfDate(
this.year(),
this.month() - (this.month() % 3),
1
);
break;
case 'month':
time = startOfDate(this.year(), this.month(), 1);
break;
case 'week':
time = startOfDate(
this.year(),
this.month(),
this.date() - this.weekday()
);
break;
case 'isoWeek':
time = startOfDate(
this.year(),
this.month(),
this.date() - (this.isoWeekday() - 1)
);
break;
case 'day':
case 'date':
time = startOfDate(this.year(), this.month(), this.date());
break;
case 'hour':
time = this._d.valueOf();
time -= mod$1(
time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
MS_PER_HOUR
);
break;
case 'minute':
time = this._d.valueOf();
time -= mod$1(time, MS_PER_MINUTE);
break;
case 'second':
time = this._d.valueOf();
time -= mod$1(time, MS_PER_SECOND);
break;
}
this._d.setTime(time);
hooks.updateOffset(this, true);
return this;
}
function endOf(units) {
var time, startOfDate;
units = normalizeUnits(units);
if (units === undefined || units === 'millisecond' || !this.isValid()) {
return this;
}
startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
switch (units) {
case 'year':
time = startOfDate(this.year() + 1, 0, 1) - 1;
break;
case 'quarter':
time =
startOfDate(
this.year(),
this.month() - (this.month() % 3) + 3,
1
) - 1;
break;
case 'month':
time = startOfDate(this.year(), this.month() + 1, 1) - 1;
break;
case 'week':
time =
startOfDate(
this.year(),
this.month(),
this.date() - this.weekday() + 7
) - 1;
break;
case 'isoWeek':
time =
startOfDate(
this.year(),
this.month(),
this.date() - (this.isoWeekday() - 1) + 7
) - 1;
break;
case 'day':
case 'date':
time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
break;
case 'hour':
time = this._d.valueOf();
time +=
MS_PER_HOUR -
mod$1(
time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
MS_PER_HOUR
) -
1;
break;
case 'minute':
time = this._d.valueOf();
time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
break;
case 'second':
time = this._d.valueOf();
time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
break;
}
this._d.setTime(time);
hooks.updateOffset(this, true);
return this;
}
function valueOf() {
return this._d.valueOf() - (this._offset || 0) * 60000;
}
function unix() {
return Math.floor(this.valueOf() / 1000);
}
function toDate() {
return new Date(this.valueOf());
}
function toArray() {
var m = this;
return [
m.year(),
m.month(),
m.date(),
m.hour(),
m.minute(),
m.second(),
m.millisecond(),
];
}
function toObject() {
var m = this;
return {
years: m.year(),
months: m.month(),
date: m.date(),
hours: m.hours(),
minutes: m.minutes(),
seconds: m.seconds(),
milliseconds: m.milliseconds(),
};
}
function toJSON() {
// new Date(NaN).toJSON() === null
return this.isValid() ? this.toISOString() : null;
}
function isValid$2() {
return isValid(this);
}
function parsingFlags() {
return extend({}, getParsingFlags(this));
}
function invalidAt() {
return getParsingFlags(this).overflow;
}
function creationData() {
return {
input: this._i,
format: this._f,
locale: this._locale,
isUTC: this._isUTC,
strict: this._strict,
};
}
addFormatToken('N', 0, 0, 'eraAbbr');
addFormatToken('NN', 0, 0, 'eraAbbr');
addFormatToken('NNN', 0, 0, 'eraAbbr');
addFormatToken('NNNN', 0, 0, 'eraName');
addFormatToken('NNNNN', 0, 0, 'eraNarrow');
addFormatToken('y', ['y', 1], 'yo', 'eraYear');
addFormatToken('y', ['yy', 2], 0, 'eraYear');
addFormatToken('y', ['yyy', 3], 0, 'eraYear');
addFormatToken('y', ['yyyy', 4], 0, 'eraYear');
addRegexToken('N', matchEraAbbr);
addRegexToken('NN', matchEraAbbr);
addRegexToken('NNN', matchEraAbbr);
addRegexToken('NNNN', matchEraName);
addRegexToken('NNNNN', matchEraNarrow);
addParseToken(
['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],
function (input, array, config, token) {
var era = config._locale.erasParse(input, token, config._strict);
if (era) {
getParsingFlags(config).era = era;
} else {
getParsingFlags(config).invalidEra = input;
}
}
);
addRegexToken('y', matchUnsigned);
addRegexToken('yy', matchUnsigned);
addRegexToken('yyy', matchUnsigned);
addRegexToken('yyyy', matchUnsigned);
addRegexToken('yo', matchEraYearOrdinal);
addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
addParseToken(['yo'], function (input, array, config, token) {
var match;
if (config._locale._eraYearOrdinalRegex) {
match = input.match(config._locale._eraYearOrdinalRegex);
}
if (config._locale.eraYearOrdinalParse) {
array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
} else {
array[YEAR] = parseInt(input, 10);
}
});
function localeEras(m, format) {
var i,
l,
date,
eras = this._eras || getLocale('en')._eras;
for (i = 0, l = eras.length; i < l; ++i) {
switch (typeof eras[i].since) {
case 'string':
// truncate time
date = hooks(eras[i].since).startOf('day');
eras[i].since = date.valueOf();
break;
}
switch (typeof eras[i].until) {
case 'undefined':
eras[i].until = +Infinity;
break;
case 'string':
// truncate time
date = hooks(eras[i].until).startOf('day').valueOf();
eras[i].until = date.valueOf();
break;
}
}
return eras;
}
function localeErasParse(eraName, format, strict) {
var i,
l,
eras = this.eras(),
name,
abbr,
narrow;
eraName = eraName.toUpperCase();
for (i = 0, l = eras.length; i < l; ++i) {
name = eras[i].name.toUpperCase();
abbr = eras[i].abbr.toUpperCase();
narrow = eras[i].narrow.toUpperCase();
if (strict) {
switch (format) {
case 'N':
case 'NN':
case 'NNN':
if (abbr === eraName) {
return eras[i];
}
break;
case 'NNNN':
if (name === eraName) {
return eras[i];
}
break;
case 'NNNNN':
if (narrow === eraName) {
return eras[i];
}
break;
}
} else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
return eras[i];
}
}
}
function localeErasConvertYear(era, year) {
var dir = era.since <= era.until ? +1 : -1;
if (year === undefined) {
return hooks(era.since).year();
} else {
return hooks(era.since).year() + (year - era.offset) * dir;
}
}
function getEraName() {
var i,
l,
val,
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
// truncate time
val = this.clone().startOf('day').valueOf();
if (eras[i].since <= val && val <= eras[i].until) {
return eras[i].name;
}
if (eras[i].until <= val && val <= eras[i].since) {
return eras[i].name;
}
}
return '';
}
function getEraNarrow() {
var i,
l,
val,
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
// truncate time
val = this.clone().startOf('day').valueOf();
if (eras[i].since <= val && val <= eras[i].until) {
return eras[i].narrow;
}
if (eras[i].until <= val && val <= eras[i].since) {
return eras[i].narrow;
}
}
return '';
}
function getEraAbbr() {
var i,
l,
val,
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
// truncate time
val = this.clone().startOf('day').valueOf();
if (eras[i].since <= val && val <= eras[i].until) {
return eras[i].abbr;
}
if (eras[i].until <= val && val <= eras[i].since) {
return eras[i].abbr;
}
}
return '';
}
function getEraYear() {
var i,
l,
dir,
val,
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
dir = eras[i].since <= eras[i].until ? +1 : -1;
// truncate time
val = this.clone().startOf('day').valueOf();
if (
(eras[i].since <= val && val <= eras[i].until) ||
(eras[i].until <= val && val <= eras[i].since)
) {
return (
(this.year() - hooks(eras[i].since).year()) * dir +
eras[i].offset
);
}
}
return this.year();
}
function erasNameRegex(isStrict) {
if (!hasOwnProp(this, '_erasNameRegex')) {
computeErasParse.call(this);
}
return isStrict ? this._erasNameRegex : this._erasRegex;
}
function erasAbbrRegex(isStrict) {
if (!hasOwnProp(this, '_erasAbbrRegex')) {
computeErasParse.call(this);
}
return isStrict ? this._erasAbbrRegex : this._erasRegex;
}
function erasNarrowRegex(isStrict) {
if (!hasOwnProp(this, '_erasNarrowRegex')) {
computeErasParse.call(this);
}
return isStrict ? this._erasNarrowRegex : this._erasRegex;
}
function matchEraAbbr(isStrict, locale) {
return locale.erasAbbrRegex(isStrict);
}
function matchEraName(isStrict, locale) {
return locale.erasNameRegex(isStrict);
}
function matchEraNarrow(isStrict, locale) {
return locale.erasNarrowRegex(isStrict);
}
function matchEraYearOrdinal(isStrict, locale) {
return locale._eraYearOrdinalRegex || matchUnsigned;
}
function computeErasParse() {
var abbrPieces = [],
namePieces = [],
narrowPieces = [],
mixedPieces = [],
i,
l,
eras = this.eras();
for (i = 0, l = eras.length; i < l; ++i) {
namePieces.push(regexEscape(eras[i].name));
abbrPieces.push(regexEscape(eras[i].abbr));
narrowPieces.push(regexEscape(eras[i].narrow));
mixedPieces.push(regexEscape(eras[i].name));
mixedPieces.push(regexEscape(eras[i].abbr));
mixedPieces.push(regexEscape(eras[i].narrow));
}
this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
this._erasNarrowRegex = new RegExp(
'^(' + narrowPieces.join('|') + ')',
'i'
);
}
// FORMATTING
addFormatToken(0, ['gg', 2], 0, function () {
return this.weekYear() % 100;
});
addFormatToken(0, ['GG', 2], 0, function () {
return this.isoWeekYear() % 100;
});
function addWeekYearFormatToken(token, getter) {
addFormatToken(0, [token, token.length], 0, getter);
}
addWeekYearFormatToken('gggg', 'weekYear');
addWeekYearFormatToken('ggggg', 'weekYear');
addWeekYearFormatToken('GGGG', 'isoWeekYear');
addWeekYearFormatToken('GGGGG', 'isoWeekYear');
// ALIASES
addUnitAlias('weekYear', 'gg');
addUnitAlias('isoWeekYear', 'GG');
// PRIORITY
addUnitPriority('weekYear', 1);
addUnitPriority('isoWeekYear', 1);
// PARSING
addRegexToken('G', matchSigned);
addRegexToken('g', matchSigned);
addRegexToken('GG', match1to2, match2);
addRegexToken('gg', match1to2, match2);
addRegexToken('GGGG', match1to4, match4);
addRegexToken('gggg', match1to4, match4);
addRegexToken('GGGGG', match1to6, match6);
addRegexToken('ggggg', match1to6, match6);
addWeekParseToken(
['gggg', 'ggggg', 'GGGG', 'GGGGG'],
function (input, week, config, token) {
week[token.substr(0, 2)] = toInt(input);
}
);
addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
week[token] = hooks.parseTwoDigitYear(input);
});
// MOMENTS
function getSetWeekYear(input) {
return getSetWeekYearHelper.call(
this,
input,
this.week(),
this.weekday(),
this.localeData()._week.dow,
this.localeData()._week.doy
);
}
function getSetISOWeekYear(input) {
return getSetWeekYearHelper.call(
this,
input,
this.isoWeek(),
this.isoWeekday(),
1,
4
);
}
function getISOWeeksInYear() {
return weeksInYear(this.year(), 1, 4);
}
function getISOWeeksInISOWeekYear() {
return weeksInYear(this.isoWeekYear(), 1, 4);
}
function getWeeksInYear() {
var weekInfo = this.localeData()._week;
return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
}
function getWeeksInWeekYear() {
var weekInfo = this.localeData()._week;
return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
}
function getSetWeekYearHelper(input, week, weekday, dow, doy) {
var weeksTarget;
if (input == null) {
return weekOfYear(this, dow, doy).year;
} else {
weeksTarget = weeksInYear(input, dow, doy);
if (week > weeksTarget) {
week = weeksTarget;
}
return setWeekAll.call(this, input, week, weekday, dow, doy);
}
}
function setWeekAll(weekYear, week, weekday, dow, doy) {
var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
this.year(date.getUTCFullYear());
this.month(date.getUTCMonth());
this.date(date.getUTCDate());
return this;
}
// FORMATTING
addFormatToken('Q', 0, 'Qo', 'quarter');
// ALIASES
addUnitAlias('quarter', 'Q');
// PRIORITY
addUnitPriority('quarter', 7);
// PARSING
addRegexToken('Q', match1);
addParseToken('Q', function (input, array) {
array[MONTH] = (toInt(input) - 1) * 3;
});
// MOMENTS
function getSetQuarter(input) {
return input == null
? Math.ceil((this.month() + 1) / 3)
: this.month((input - 1) * 3 + (this.month() % 3));
}
// FORMATTING
addFormatToken('D', ['DD', 2], 'Do', 'date');
// ALIASES
addUnitAlias('date', 'D');
// PRIORITY
addUnitPriority('date', 9);
// PARSING
addRegexToken('D', match1to2);
addRegexToken('DD', match1to2, match2);
addRegexToken('Do', function (isStrict, locale) {
// TODO: Remove "ordinalParse" fallback in next major release.
return isStrict
? locale._dayOfMonthOrdinalParse || locale._ordinalParse
: locale._dayOfMonthOrdinalParseLenient;
});
addParseToken(['D', 'DD'], DATE);
addParseToken('Do', function (input, array) {
array[DATE] = toInt(input.match(match1to2)[0]);
});
// MOMENTS
var getSetDayOfMonth = makeGetSet('Date', true);
// FORMATTING
addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
// ALIASES
addUnitAlias('dayOfYear', 'DDD');
// PRIORITY
addUnitPriority('dayOfYear', 4);
// PARSING
addRegexToken('DDD', match1to3);
addRegexToken('DDDD', match3);
addParseToken(['DDD', 'DDDD'], function (input, array, config) {
config._dayOfYear = toInt(input);
});
// HELPERS
// MOMENTS
function getSetDayOfYear(input) {
var dayOfYear =
Math.round(
(this.clone().startOf('day') - this.clone().startOf('year')) / 864e5
) + 1;
return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
}
// FORMATTING
addFormatToken('m', ['mm', 2], 0, 'minute');
// ALIASES
addUnitAlias('minute', 'm');
// PRIORITY
addUnitPriority('minute', 14);
// PARSING
addRegexToken('m', match1to2);
addRegexToken('mm', match1to2, match2);
addParseToken(['m', 'mm'], MINUTE);
// MOMENTS
var getSetMinute = makeGetSet('Minutes', false);
// FORMATTING
addFormatToken('s', ['ss', 2], 0, 'second');
// ALIASES
addUnitAlias('second', 's');
// PRIORITY
addUnitPriority('second', 15);
// PARSING
addRegexToken('s', match1to2);
addRegexToken('ss', match1to2, match2);
addParseToken(['s', 'ss'], SECOND);
// MOMENTS
var getSetSecond = makeGetSet('Seconds', false);
// FORMATTING
addFormatToken('S', 0, 0, function () {
return ~~(this.millisecond() / 100);
});
addFormatToken(0, ['SS', 2], 0, function () {
return ~~(this.millisecond() / 10);
});
addFormatToken(0, ['SSS', 3], 0, 'millisecond');
addFormatToken(0, ['SSSS', 4], 0, function () {
return this.millisecond() * 10;
});
addFormatToken(0, ['SSSSS', 5], 0, function () {
return this.millisecond() * 100;
});
addFormatToken(0, ['SSSSSS', 6], 0, function () {
return this.millisecond() * 1000;
});
addFormatToken(0, ['SSSSSSS', 7], 0, function () {
return this.millisecond() * 10000;
});
addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
return this.millisecond() * 100000;
});
addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
return this.millisecond() * 1000000;
});
// ALIASES
addUnitAlias('millisecond', 'ms');
// PRIORITY
addUnitPriority('millisecond', 16);
// PARSING
addRegexToken('S', match1to3, match1);
addRegexToken('SS', match1to3, match2);
addRegexToken('SSS', match1to3, match3);
var token, getSetMillisecond;
for (token = 'SSSS'; token.length <= 9; token += 'S') {
addRegexToken(token, matchUnsigned);
}
function parseMs(input, array) {
array[MILLISECOND] = toInt(('0.' + input) * 1000);
}
for (token = 'S'; token.length <= 9; token += 'S') {
addParseToken(token, parseMs);
}
getSetMillisecond = makeGetSet('Milliseconds', false);
// FORMATTING
addFormatToken('z', 0, 0, 'zoneAbbr');
addFormatToken('zz', 0, 0, 'zoneName');
// MOMENTS
function getZoneAbbr() {
return this._isUTC ? 'UTC' : '';
}
function getZoneName() {
return this._isUTC ? 'Coordinated Universal Time' : '';
}
var proto = Moment.prototype;
proto.add = add;
proto.calendar = calendar$1;
proto.clone = clone;
proto.diff = diff;
proto.endOf = endOf;
proto.format = format;
proto.from = from;
proto.fromNow = fromNow;
proto.to = to;
proto.toNow = toNow;
proto.get = stringGet;
proto.invalidAt = invalidAt;
proto.isAfter = isAfter;
proto.isBefore = isBefore;
proto.isBetween = isBetween;
proto.isSame = isSame;
proto.isSameOrAfter = isSameOrAfter;
proto.isSameOrBefore = isSameOrBefore;
proto.isValid = isValid$2;
proto.lang = lang;
proto.locale = locale;
proto.localeData = localeData;
proto.max = prototypeMax;
proto.min = prototypeMin;
proto.parsingFlags = parsingFlags;
proto.set = stringSet;
proto.startOf = startOf;
proto.subtract = subtract;
proto.toArray = toArray;
proto.toObject = toObject;
proto.toDate = toDate;
proto.toISOString = toISOString;
proto.inspect = inspect;
if (typeof Symbol !== 'undefined' && Symbol.for != null) {
proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
return 'Moment<' + this.format() + '>';
};
}
proto.toJSON = toJSON;
proto.toString = toString;
proto.unix = unix;
proto.valueOf = valueOf;
proto.creationData = creationData;
proto.eraName = getEraName;
proto.eraNarrow = getEraNarrow;
proto.eraAbbr = getEraAbbr;
proto.eraYear = getEraYear;
proto.year = getSetYear;
proto.isLeapYear = getIsLeapYear;
proto.weekYear = getSetWeekYear;
proto.isoWeekYear = getSetISOWeekYear;
proto.quarter = proto.quarters = getSetQuarter;
proto.month = getSetMonth;
proto.daysInMonth = getDaysInMonth;
proto.week = proto.weeks = getSetWeek;
proto.isoWeek = proto.isoWeeks = getSetISOWeek;
proto.weeksInYear = getWeeksInYear;
proto.weeksInWeekYear = getWeeksInWeekYear;
proto.isoWeeksInYear = getISOWeeksInYear;
proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
proto.date = getSetDayOfMonth;
proto.day = proto.days = getSetDayOfWeek;
proto.weekday = getSetLocaleDayOfWeek;
proto.isoWeekday = getSetISODayOfWeek;
proto.dayOfYear = getSetDayOfYear;
proto.hour = proto.hours = getSetHour;
proto.minute = proto.minutes = getSetMinute;
proto.second = proto.seconds = getSetSecond;
proto.millisecond = proto.milliseconds = getSetMillisecond;
proto.utcOffset = getSetOffset;
proto.utc = setOffsetToUTC;
proto.local = setOffsetToLocal;
proto.parseZone = setOffsetToParsedOffset;
proto.hasAlignedHourOffset = hasAlignedHourOffset;
proto.isDST = isDaylightSavingTime;
proto.isLocal = isLocal;
proto.isUtcOffset = isUtcOffset;
proto.isUtc = isUtc;
proto.isUTC = isUtc;
proto.zoneAbbr = getZoneAbbr;
proto.zoneName = getZoneName;
proto.dates = deprecate(
'dates accessor is deprecated. Use date instead.',
getSetDayOfMonth
);
proto.months = deprecate(
'months accessor is deprecated. Use month instead',
getSetMonth
);
proto.years = deprecate(
'years accessor is deprecated. Use year instead',
getSetYear
);
proto.zone = deprecate(
'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
getSetZone
);
proto.isDSTShifted = deprecate(
'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
isDaylightSavingTimeShifted
);
function createUnix(input) {
return createLocal(input * 1000);
}
function createInZone() {
return createLocal.apply(null, arguments).parseZone();
}
function preParsePostFormat(string) {
return string;
}
var proto$1 = Locale.prototype;
proto$1.calendar = calendar;
proto$1.longDateFormat = longDateFormat;
proto$1.invalidDate = invalidDate;
proto$1.ordinal = ordinal;
proto$1.preparse = preParsePostFormat;
proto$1.postformat = preParsePostFormat;
proto$1.relativeTime = relativeTime;
proto$1.pastFuture = pastFuture;
proto$1.set = set;
proto$1.eras = localeEras;
proto$1.erasParse = localeErasParse;
proto$1.erasConvertYear = localeErasConvertYear;
proto$1.erasAbbrRegex = erasAbbrRegex;
proto$1.erasNameRegex = erasNameRegex;
proto$1.erasNarrowRegex = erasNarrowRegex;
proto$1.months = localeMonths;
proto$1.monthsShort = localeMonthsShort;
proto$1.monthsParse = localeMonthsParse;
proto$1.monthsRegex = monthsRegex;
proto$1.monthsShortRegex = monthsShortRegex;
proto$1.week = localeWeek;
proto$1.firstDayOfYear = localeFirstDayOfYear;
proto$1.firstDayOfWeek = localeFirstDayOfWeek;
proto$1.weekdays = localeWeekdays;
proto$1.weekdaysMin = localeWeekdaysMin;
proto$1.weekdaysShort = localeWeekdaysShort;
proto$1.weekdaysParse = localeWeekdaysParse;
proto$1.weekdaysRegex = weekdaysRegex;
proto$1.weekdaysShortRegex = weekdaysShortRegex;
proto$1.weekdaysMinRegex = weekdaysMinRegex;
proto$1.isPM = localeIsPM;
proto$1.meridiem = localeMeridiem;
function get$1(format, index, field, setter) {
var locale = getLocale(),
utc = createUTC().set(setter, index);
return locale[field](utc, format);
}
function listMonthsImpl(format, index, field) {
if (isNumber(format)) {
index = format;
format = undefined;
}
format = format || '';
if (index != null) {
return get$1(format, index, field, 'month');
}
var i,
out = [];
for (i = 0; i < 12; i++) {
out[i] = get$1(format, i, field, 'month');
}
return out;
}
// ()
// (5)
// (fmt, 5)
// (fmt)
// (true)
// (true, 5)
// (true, fmt, 5)
// (true, fmt)
function listWeekdaysImpl(localeSorted, format, index, field) {
if (typeof localeSorted === 'boolean') {
if (isNumber(format)) {
index = format;
format = undefined;
}
format = format || '';
} else {
format = localeSorted;
index = format;
localeSorted = false;
if (isNumber(format)) {
index = format;
format = undefined;
}
format = format || '';
}
var locale = getLocale(),
shift = localeSorted ? locale._week.dow : 0,
i,
out = [];
if (index != null) {
return get$1(format, (index + shift) % 7, field, 'day');
}
for (i = 0; i < 7; i++) {
out[i] = get$1(format, (i + shift) % 7, field, 'day');
}
return out;
}
function listMonths(format, index) {
return listMonthsImpl(format, index, 'months');
}
function listMonthsShort(format, index) {
return listMonthsImpl(format, index, 'monthsShort');
}
function listWeekdays(localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
}
function listWeekdaysShort(localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
}
function listWeekdaysMin(localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
}
getSetGlobalLocale('en', {
eras: [
{
since: '0001-01-01',
until: +Infinity,
offset: 1,
name: 'Anno Domini',
narrow: 'AD',
abbr: 'AD',
},
{
since: '0000-12-31',
until: -Infinity,
offset: 1,
name: 'Before Christ',
narrow: 'BC',
abbr: 'BC',
},
],
dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
ordinal: function (number) {
var b = number % 10,
output =
toInt((number % 100) / 10) === 1
? 'th'
: b === 1
? 'st'
: b === 2
? 'nd'
: b === 3
? 'rd'
: 'th';
return number + output;
},
});
// Side effect imports
hooks.lang = deprecate(
'moment.lang is deprecated. Use moment.locale instead.',
getSetGlobalLocale
);
hooks.langData = deprecate(
'moment.langData is deprecated. Use moment.localeData instead.',
getLocale
);
var mathAbs = Math.abs;
function abs() {
var data = this._data;
this._milliseconds = mathAbs(this._milliseconds);
this._days = mathAbs(this._days);
this._months = mathAbs(this._months);
data.milliseconds = mathAbs(data.milliseconds);
data.seconds = mathAbs(data.seconds);
data.minutes = mathAbs(data.minutes);
data.hours = mathAbs(data.hours);
data.months = mathAbs(data.months);
data.years = mathAbs(data.years);
return this;
}
function addSubtract$1(duration, input, value, direction) {
var other = createDuration(input, value);
duration._milliseconds += direction * other._milliseconds;
duration._days += direction * other._days;
duration._months += direction * other._months;
return duration._bubble();
}
// supports only 2.0-style add(1, 's') or add(duration)
function add$1(input, value) {
return addSubtract$1(this, input, value, 1);
}
// supports only 2.0-style subtract(1, 's') or subtract(duration)
function subtract$1(input, value) {
return addSubtract$1(this, input, value, -1);
}
function absCeil(number) {
if (number < 0) {
return Math.floor(number);
} else {
return Math.ceil(number);
}
}
function bubble() {
var milliseconds = this._milliseconds,
days = this._days,
months = this._months,
data = this._data,
seconds,
minutes,
hours,
years,
monthsFromDays;
// if we have a mix of positive and negative values, bubble down first
// check: https://github.com/moment/moment/issues/2166
if (
!(
(milliseconds >= 0 && days >= 0 && months >= 0) ||
(milliseconds <= 0 && days <= 0 && months <= 0)
)
) {
milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
days = 0;
months = 0;
}
// The following code bubbles up values, see the tests for
// examples of what that means.
data.milliseconds = milliseconds % 1000;
seconds = absFloor(milliseconds / 1000);
data.seconds = seconds % 60;
minutes = absFloor(seconds / 60);
data.minutes = minutes % 60;
hours = absFloor(minutes / 60);
data.hours = hours % 24;
days += absFloor(hours / 24);
// convert days to months
monthsFromDays = absFloor(daysToMonths(days));
months += monthsFromDays;
days -= absCeil(monthsToDays(monthsFromDays));
// 12 months -> 1 year
years = absFloor(months / 12);
months %= 12;
data.days = days;
data.months = months;
data.years = years;
return this;
}
function daysToMonths(days) {
// 400 years have 146097 days (taking into account leap year rules)
// 400 years have 12 months === 4800
return (days * 4800) / 146097;
}
function monthsToDays(months) {
// the reverse of daysToMonths
return (months * 146097) / 4800;
}
function as(units) {
if (!this.isValid()) {
return NaN;
}
var days,
months,
milliseconds = this._milliseconds;
units = normalizeUnits(units);
if (units === 'month' || units === 'quarter' || units === 'year') {
days = this._days + milliseconds / 864e5;
months = this._months + daysToMonths(days);
switch (units) {
case 'month':
return months;
case 'quarter':
return months / 3;
case 'year':
return months / 12;
}
} else {
// handle milliseconds separately because of floating point math errors (issue #1867)
days = this._days + Math.round(monthsToDays(this._months));
switch (units) {
case 'week':
return days / 7 + milliseconds / 6048e5;
case 'day':
return days + milliseconds / 864e5;
case 'hour':
return days * 24 + milliseconds / 36e5;
case 'minute':
return days * 1440 + milliseconds / 6e4;
case 'second':
return days * 86400 + milliseconds / 1000;
// Math.floor prevents floating point math errors here
case 'millisecond':
return Math.floor(days * 864e5) + milliseconds;
default:
throw new Error('Unknown unit ' + units);
}
}
}
// TODO: Use this.as('ms')?
function valueOf$1() {
if (!this.isValid()) {
return NaN;
}
return (
this._milliseconds +
this._days * 864e5 +
(this._months % 12) * 2592e6 +
toInt(this._months / 12) * 31536e6
);
}
function makeAs(alias) {
return function () {
return this.as(alias);
};
}
var asMilliseconds = makeAs('ms'),
asSeconds = makeAs('s'),
asMinutes = makeAs('m'),
asHours = makeAs('h'),
asDays = makeAs('d'),
asWeeks = makeAs('w'),
asMonths = makeAs('M'),
asQuarters = makeAs('Q'),
asYears = makeAs('y');
function clone$1() {
return createDuration(this);
}
function get$2(units) {
units = normalizeUnits(units);
return this.isValid() ? this[units + 's']() : NaN;
}
function makeGetter(name) {
return function () {
return this.isValid() ? this._data[name] : NaN;
};
}
var milliseconds = makeGetter('milliseconds'),
seconds = makeGetter('seconds'),
minutes = makeGetter('minutes'),
hours = makeGetter('hours'),
days = makeGetter('days'),
months = makeGetter('months'),
years = makeGetter('years');
function weeks() {
return absFloor(this.days() / 7);
}
var round = Math.round,
thresholds = {
ss: 44, // a few seconds to seconds
s: 45, // seconds to minute
m: 45, // minutes to hour
h: 22, // hours to day
d: 26, // days to month/week
w: null, // weeks to month
M: 11, // months to year
};
// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
}
function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
var duration = createDuration(posNegDuration).abs(),
seconds = round(duration.as('s')),
minutes = round(duration.as('m')),
hours = round(duration.as('h')),
days = round(duration.as('d')),
months = round(duration.as('M')),
weeks = round(duration.as('w')),
years = round(duration.as('y')),
a =
(seconds <= thresholds.ss && ['s', seconds]) ||
(seconds < thresholds.s && ['ss', seconds]) ||
(minutes <= 1 && ['m']) ||
(minutes < thresholds.m && ['mm', minutes]) ||
(hours <= 1 && ['h']) ||
(hours < thresholds.h && ['hh', hours]) ||
(days <= 1 && ['d']) ||
(days < thresholds.d && ['dd', days]);
if (thresholds.w != null) {
a =
a ||
(weeks <= 1 && ['w']) ||
(weeks < thresholds.w && ['ww', weeks]);
}
a = a ||
(months <= 1 && ['M']) ||
(months < thresholds.M && ['MM', months]) ||
(years <= 1 && ['y']) || ['yy', years];
a[2] = withoutSuffix;
a[3] = +posNegDuration > 0;
a[4] = locale;
return substituteTimeAgo.apply(null, a);
}
// This function allows you to set the rounding function for relative time strings
function getSetRelativeTimeRounding(roundingFunction) {
if (roundingFunction === undefined) {
return round;
}
if (typeof roundingFunction === 'function') {
round = roundingFunction;
return true;
}
return false;
}
// This function allows you to set a threshold for relative time strings
function getSetRelativeTimeThreshold(threshold, limit) {
if (thresholds[threshold] === undefined) {
return false;
}
if (limit === undefined) {
return thresholds[threshold];
}
thresholds[threshold] = limit;
if (threshold === 's') {
thresholds.ss = limit - 1;
}
return true;
}
function humanize(argWithSuffix, argThresholds) {
if (!this.isValid()) {
return this.localeData().invalidDate();
}
var withSuffix = false,
th = thresholds,
locale,
output;
if (typeof argWithSuffix === 'object') {
argThresholds = argWithSuffix;
argWithSuffix = false;
}
if (typeof argWithSuffix === 'boolean') {
withSuffix = argWithSuffix;
}
if (typeof argThresholds === 'object') {
th = Object.assign({}, thresholds, argThresholds);
if (argThresholds.s != null && argThresholds.ss == null) {
th.ss = argThresholds.s - 1;
}
}
locale = this.localeData();
output = relativeTime$1(this, !withSuffix, th, locale);
if (withSuffix) {
output = locale.pastFuture(+this, output);
}
return locale.postformat(output);
}
var abs$1 = Math.abs;
function sign(x) {
return (x > 0) - (x < 0) || +x;
}
function toISOString$1() {
// for ISO strings we do not use the normal bubbling rules:
// * milliseconds bubble up until they become hours
// * days do not bubble at all
// * months bubble up until they become years
// This is because there is no context-free conversion between hours and days
// (think of clock changes)
// and also not between days and months (28-31 days per month)
if (!this.isValid()) {
return this.localeData().invalidDate();
}
var seconds = abs$1(this._milliseconds) / 1000,
days = abs$1(this._days),
months = abs$1(this._months),
minutes,
hours,
years,
s,
total = this.asSeconds(),
totalSign,
ymSign,
daysSign,
hmsSign;
if (!total) {
// this is the same as C#'s (Noda) and python (isodate)...
// but not other JS (goog.date)
return 'P0D';
}
// 3600 seconds -> 60 minutes -> 1 hour
minutes = absFloor(seconds / 60);
hours = absFloor(minutes / 60);
seconds %= 60;
minutes %= 60;
// 12 months -> 1 year
years = absFloor(months / 12);
months %= 12;
// inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
totalSign = total < 0 ? '-' : '';
ymSign = sign(this._months) !== sign(total) ? '-' : '';
daysSign = sign(this._days) !== sign(total) ? '-' : '';
hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
return (
totalSign +
'P' +
(years ? ymSign + years + 'Y' : '') +
(months ? ymSign + months + 'M' : '') +
(days ? daysSign + days + 'D' : '') +
(hours || minutes || seconds ? 'T' : '') +
(hours ? hmsSign + hours + 'H' : '') +
(minutes ? hmsSign + minutes + 'M' : '') +
(seconds ? hmsSign + s + 'S' : '')
);
}
var proto$2 = Duration.prototype;
proto$2.isValid = isValid$1;
proto$2.abs = abs;
proto$2.add = add$1;
proto$2.subtract = subtract$1;
proto$2.as = as;
proto$2.asMilliseconds = asMilliseconds;
proto$2.asSeconds = asSeconds;
proto$2.asMinutes = asMinutes;
proto$2.asHours = asHours;
proto$2.asDays = asDays;
proto$2.asWeeks = asWeeks;
proto$2.asMonths = asMonths;
proto$2.asQuarters = asQuarters;
proto$2.asYears = asYears;
proto$2.valueOf = valueOf$1;
proto$2._bubble = bubble;
proto$2.clone = clone$1;
proto$2.get = get$2;
proto$2.milliseconds = milliseconds;
proto$2.seconds = seconds;
proto$2.minutes = minutes;
proto$2.hours = hours;
proto$2.days = days;
proto$2.weeks = weeks;
proto$2.months = months;
proto$2.years = years;
proto$2.humanize = humanize;
proto$2.toISOString = toISOString$1;
proto$2.toString = toISOString$1;
proto$2.toJSON = toISOString$1;
proto$2.locale = locale;
proto$2.localeData = localeData;
proto$2.toIsoString = deprecate(
'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
toISOString$1
);
proto$2.lang = lang;
// FORMATTING
addFormatToken('X', 0, 0, 'unix');
addFormatToken('x', 0, 0, 'valueOf');
// PARSING
addRegexToken('x', matchSigned);
addRegexToken('X', matchTimestamp);
addParseToken('X', function (input, array, config) {
config._d = new Date(parseFloat(input) * 1000);
});
addParseToken('x', function (input, array, config) {
config._d = new Date(toInt(input));
});
//! moment.js
hooks.version = '2.29.4';
setHookCallback(createLocal);
hooks.fn = proto;
hooks.min = min;
hooks.max = max;
hooks.now = now;
hooks.utc = createUTC;
hooks.unix = createUnix;
hooks.months = listMonths;
hooks.isDate = isDate;
hooks.locale = getSetGlobalLocale;
hooks.invalid = createInvalid;
hooks.duration = createDuration;
hooks.isMoment = isMoment;
hooks.weekdays = listWeekdays;
hooks.parseZone = createInZone;
hooks.localeData = getLocale;
hooks.isDuration = isDuration;
hooks.monthsShort = listMonthsShort;
hooks.weekdaysMin = listWeekdaysMin;
hooks.defineLocale = defineLocale;
hooks.updateLocale = updateLocale;
hooks.locales = listLocales;
hooks.weekdaysShort = listWeekdaysShort;
hooks.normalizeUnits = normalizeUnits;
hooks.relativeTimeRounding = getSetRelativeTimeRounding;
hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
hooks.calendarFormat = getCalendarFormat;
hooks.prototype = proto;
// currently HTML5 input type only supports 24-hour formats
hooks.HTML5_FMT = {
DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
DATE: 'YYYY-MM-DD', // <input type="date" />
TIME: 'HH:mm', // <input type="time" />
TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
WEEK: 'GGGG-[W]WW', // <input type="week" />
MONTH: 'YYYY-MM', // <input type="month" />
};
return hooks;
})));
moment.min.js 0000644 00000161105 15153765737 0007212 0 ustar 00 !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var H;function _(){return H.apply(null,arguments)}function y(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function F(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function L(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(c(e,t))return;return 1}function g(e){return void 0===e}function w(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function V(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function G(e,t){for(var n=[],s=e.length,i=0;i<s;++i)n.push(t(e[i],i));return n}function E(e,t){for(var n in t)c(t,n)&&(e[n]=t[n]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function l(e,t,n,s){return Pt(e,t,n,s,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function A(e){if(null==e._isValid){var t=p(e),n=j.call(t.parsedDateParts,function(e){return null!=e}),n=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return n;e._isValid=n}return e._isValid}function I(e){var t=l(NaN);return null!=e?E(p(t),e):p(t).userInvalidated=!0,t}var j=Array.prototype.some||function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1},Z=_.momentProperties=[],z=!1;function $(e,t){var n,s,i,r=Z.length;if(g(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),g(t._i)||(e._i=t._i),g(t._f)||(e._f=t._f),g(t._l)||(e._l=t._l),g(t._strict)||(e._strict=t._strict),g(t._tzm)||(e._tzm=t._tzm),g(t._isUTC)||(e._isUTC=t._isUTC),g(t._offset)||(e._offset=t._offset),g(t._pf)||(e._pf=p(t)),g(t._locale)||(e._locale=t._locale),0<r)for(n=0;n<r;n++)g(i=t[s=Z[n]])||(e[s]=i);return e}function q(e){$(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===z&&(z=!0,_.updateOffset(this),z=!1)}function v(e){return e instanceof q||null!=e&&null!=e._isAMomentObject}function B(e){!1===_.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function e(r,a){var o=!0;return E(function(){if(null!=_.deprecationHandler&&_.deprecationHandler(null,r),o){for(var e,t,n=[],s=arguments.length,i=0;i<s;i++){if(e="","object"==typeof arguments[i]){for(t in e+="\n["+i+"] ",arguments[0])c(arguments[0],t)&&(e+=t+": "+arguments[0][t]+", ");e=e.slice(0,-2)}else e=arguments[i];n.push(e)}B(r+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),o=!1}return a.apply(this,arguments)},a)}var J={};function Q(e,t){null!=_.deprecationHandler&&_.deprecationHandler(e,t),J[e]||(B(t),J[e]=!0)}function a(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function X(e,t){var n,s=E({},e);for(n in t)c(t,n)&&(F(e[n])&&F(t[n])?(s[n]={},E(s[n],e[n]),E(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)c(e,n)&&!c(t,n)&&F(e[n])&&(s[n]=E({},s[n]));return s}function K(e){null!=e&&this.set(e)}_.suppressDeprecationWarnings=!1,_.deprecationHandler=null;var ee=Object.keys||function(e){var t,n=[];for(t in e)c(e,t)&&n.push(t);return n};function r(e,t,n){var s=""+Math.abs(e);return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,t-s.length)).toString().substr(1)+s}var te=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ne=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,se={},ie={};function s(e,t,n,s){var i="string"==typeof s?function(){return this[s]()}:s;e&&(ie[e]=i),t&&(ie[t[0]]=function(){return r(i.apply(this,arguments),t[1],t[2])}),n&&(ie[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function re(e,t){return e.isValid()?(t=ae(t,e.localeData()),se[t]=se[t]||function(s){for(var e,i=s.match(te),t=0,r=i.length;t<r;t++)ie[i[t]]?i[t]=ie[i[t]]:i[t]=(e=i[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(e){for(var t="",n=0;n<r;n++)t+=a(i[n])?i[n].call(e,s):i[n];return t}}(t),se[t](e)):e.localeData().invalidDate()}function ae(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(ne.lastIndex=0;0<=n&&ne.test(e);)e=e.replace(ne,s),ne.lastIndex=0,--n;return e}var oe={};function t(e,t){var n=e.toLowerCase();oe[n]=oe[n+"s"]=oe[t]=e}function o(e){return"string"==typeof e?oe[e]||oe[e.toLowerCase()]:void 0}function ue(e){var t,n,s={};for(n in e)c(e,n)&&(t=o(n))&&(s[t]=e[n]);return s}var le={};function n(e,t){le[e]=t}function he(e){return e%4==0&&e%100!=0||e%400==0}function d(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function h(e){var e=+e,t=0;return t=0!=e&&isFinite(e)?d(e):t}function de(t,n){return function(e){return null!=e?(fe(this,t,e),_.updateOffset(this,n),this):ce(this,t)}}function ce(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function fe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&he(e.year())&&1===e.month()&&29===e.date()?(n=h(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),We(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var i=/\d/,u=/\d\d/,me=/\d{3}/,_e=/\d{4}/,ye=/[+-]?\d{6}/,f=/\d\d?/,ge=/\d\d\d\d?/,we=/\d\d\d\d\d\d?/,pe=/\d{1,3}/,ve=/\d{1,4}/,ke=/[+-]?\d{1,6}/,Me=/\d+/,De=/[+-]?\d+/,Se=/Z|[+-]\d\d:?\d\d/gi,Ye=/Z|[+-]\d\d(?::?\d\d)?/gi,m=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function k(e,n,s){be[e]=a(n)?n:function(e,t){return e&&s?s:n}}function Oe(e,t){return c(be,e)?be[e](t._strict,t._locale):new RegExp(M(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function M(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var be={},xe={};function D(e,n){var t,s,i=n;for("string"==typeof e&&(e=[e]),w(n)&&(i=function(e,t){t[n]=h(e)}),s=e.length,t=0;t<s;t++)xe[e[t]]=i}function Te(e,i){D(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var S,Y=0,O=1,b=2,x=3,T=4,N=5,Ne=6,Pe=7,Re=8;function We(e,t){var n;return isNaN(e)||isNaN(t)?NaN:(n=(t%(n=12)+n)%n,e+=(t-n)/12,1==n?he(e)?29:28:31-n%7%2)}S=Array.prototype.indexOf||function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1},s("M",["MM",2],"Mo",function(){return this.month()+1}),s("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),s("MMMM",0,0,function(e){return this.localeData().months(this,e)}),t("month","M"),n("month",8),k("M",f),k("MM",f,u),k("MMM",function(e,t){return t.monthsShortRegex(e)}),k("MMMM",function(e,t){return t.monthsRegex(e)}),D(["M","MM"],function(e,t){t[O]=h(e)-1}),D(["MMM","MMMM"],function(e,t,n,s){s=n._locale.monthsParse(e,s,n._strict);null!=s?t[O]=s:p(n).invalidMonth=e});var Ce="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ue="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),He=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Fe=m,Le=m;function Ve(e,t){var n;if(e.isValid()){if("string"==typeof t)if(/^\d+$/.test(t))t=h(t);else if(!w(t=e.localeData().monthsParse(t)))return;n=Math.min(e.date(),We(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n)}}function Ge(e){return null!=e?(Ve(this,e),_.updateOffset(this,!0),this):ce(this,"Month")}function Ee(){function e(e,t){return t.length-e.length}for(var t,n=[],s=[],i=[],r=0;r<12;r++)t=l([2e3,r]),n.push(this.monthsShort(t,"")),s.push(this.months(t,"")),i.push(this.months(t,"")),i.push(this.monthsShort(t,""));for(n.sort(e),s.sort(e),i.sort(e),r=0;r<12;r++)n[r]=M(n[r]),s[r]=M(s[r]);for(r=0;r<24;r++)i[r]=M(i[r]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Ae(e){return he(e)?366:365}s("Y",0,0,function(){var e=this.year();return e<=9999?r(e,4):"+"+e}),s(0,["YY",2],0,function(){return this.year()%100}),s(0,["YYYY",4],0,"year"),s(0,["YYYYY",5],0,"year"),s(0,["YYYYYY",6,!0],0,"year"),t("year","y"),n("year",1),k("Y",De),k("YY",f,u),k("YYYY",ve,_e),k("YYYYY",ke,ye),k("YYYYYY",ke,ye),D(["YYYYY","YYYYYY"],Y),D("YYYY",function(e,t){t[Y]=2===e.length?_.parseTwoDigitYear(e):h(e)}),D("YY",function(e,t){t[Y]=_.parseTwoDigitYear(e)}),D("Y",function(e,t){t[Y]=parseInt(e,10)}),_.parseTwoDigitYear=function(e){return h(e)+(68<h(e)?1900:2e3)};var Ie=de("FullYear",!0);function je(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}function Ze(e){var t;return e<100&&0<=e?((t=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,t)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function ze(e,t,n){n=7+t-n;return n-(7+Ze(e,0,n).getUTCDay()-t)%7-1}function $e(e,t,n,s,i){var r,t=1+7*(t-1)+(7+n-s)%7+ze(e,s,i),n=t<=0?Ae(r=e-1)+t:t>Ae(e)?(r=e+1,t-Ae(e)):(r=e,t);return{year:r,dayOfYear:n}}function qe(e,t,n){var s,i,r=ze(e.year(),t,n),r=Math.floor((e.dayOfYear()-r-1)/7)+1;return r<1?s=r+P(i=e.year()-1,t,n):r>P(e.year(),t,n)?(s=r-P(e.year(),t,n),i=e.year()+1):(i=e.year(),s=r),{week:s,year:i}}function P(e,t,n){var s=ze(e,t,n),t=ze(e+1,t,n);return(Ae(e)-s+t)/7}s("w",["ww",2],"wo","week"),s("W",["WW",2],"Wo","isoWeek"),t("week","w"),t("isoWeek","W"),n("week",5),n("isoWeek",5),k("w",f),k("ww",f,u),k("W",f),k("WW",f,u),Te(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=h(e)});function Be(e,t){return e.slice(t,7).concat(e.slice(0,t))}s("d",0,"do","day"),s("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),s("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),s("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),s("e",0,0,"weekday"),s("E",0,0,"isoWeekday"),t("day","d"),t("weekday","e"),t("isoWeekday","E"),n("day",11),n("weekday",11),n("isoWeekday",11),k("d",f),k("e",f),k("E",f),k("dd",function(e,t){return t.weekdaysMinRegex(e)}),k("ddd",function(e,t){return t.weekdaysShortRegex(e)}),k("dddd",function(e,t){return t.weekdaysRegex(e)}),Te(["dd","ddd","dddd"],function(e,t,n,s){s=n._locale.weekdaysParse(e,s,n._strict);null!=s?t.d=s:p(n).invalidWeekday=e}),Te(["d","e","E"],function(e,t,n,s){t[s]=h(e)});var Je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Qe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ke=m,et=m,tt=m;function nt(){function e(e,t){return t.length-e.length}for(var t,n,s,i=[],r=[],a=[],o=[],u=0;u<7;u++)s=l([2e3,1]).day(u),t=M(this.weekdaysMin(s,"")),n=M(this.weekdaysShort(s,"")),s=M(this.weekdays(s,"")),i.push(t),r.push(n),a.push(s),o.push(t),o.push(n),o.push(s);i.sort(e),r.sort(e),a.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function st(){return this.hours()%12||12}function it(e,t){s(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function rt(e,t){return t._meridiemParse}s("H",["HH",2],0,"hour"),s("h",["hh",2],0,st),s("k",["kk",2],0,function(){return this.hours()||24}),s("hmm",0,0,function(){return""+st.apply(this)+r(this.minutes(),2)}),s("hmmss",0,0,function(){return""+st.apply(this)+r(this.minutes(),2)+r(this.seconds(),2)}),s("Hmm",0,0,function(){return""+this.hours()+r(this.minutes(),2)}),s("Hmmss",0,0,function(){return""+this.hours()+r(this.minutes(),2)+r(this.seconds(),2)}),it("a",!0),it("A",!1),t("hour","h"),n("hour",13),k("a",rt),k("A",rt),k("H",f),k("h",f),k("k",f),k("HH",f,u),k("hh",f,u),k("kk",f,u),k("hmm",ge),k("hmmss",we),k("Hmm",ge),k("Hmmss",we),D(["H","HH"],x),D(["k","kk"],function(e,t,n){e=h(e);t[x]=24===e?0:e}),D(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),D(["h","hh"],function(e,t,n){t[x]=h(e),p(n).bigHour=!0}),D("hmm",function(e,t,n){var s=e.length-2;t[x]=h(e.substr(0,s)),t[T]=h(e.substr(s)),p(n).bigHour=!0}),D("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[x]=h(e.substr(0,s)),t[T]=h(e.substr(s,2)),t[N]=h(e.substr(i)),p(n).bigHour=!0}),D("Hmm",function(e,t,n){var s=e.length-2;t[x]=h(e.substr(0,s)),t[T]=h(e.substr(s))}),D("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[x]=h(e.substr(0,s)),t[T]=h(e.substr(s,2)),t[N]=h(e.substr(i))});m=de("Hours",!0);var at,ot={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ce,monthsShort:Ue,week:{dow:0,doy:6},weekdays:Je,weekdaysMin:Xe,weekdaysShort:Qe,meridiemParse:/[ap]\.?m?\.?/i},R={},ut={};function lt(e){return e&&e.toLowerCase().replace("_","-")}function ht(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=lt(e[r]).split("-")).length,n=(n=lt(e[r+1]))?n.split("-"):null;0<t;){if(s=dt(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s<n;s+=1)if(e[s]!==t[s])return s;return n}(i,n)>=t-1)break;t--}r++}return at}function dt(t){var e;if(void 0===R[t]&&"undefined"!=typeof module&&module&&module.exports&&null!=t.match("^[^/\\\\]*$"))try{e=at._abbr,require("./locale/"+t),ct(e)}catch(e){R[t]=null}return R[t]}function ct(e,t){return e&&((t=g(t)?mt(e):ft(e,t))?at=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),at._abbr}function ft(e,t){if(null===t)return delete R[e],null;var n,s=ot;if(t.abbr=e,null!=R[e])Q("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=R[e]._config;else if(null!=t.parentLocale)if(null!=R[t.parentLocale])s=R[t.parentLocale]._config;else{if(null==(n=dt(t.parentLocale)))return ut[t.parentLocale]||(ut[t.parentLocale]=[]),ut[t.parentLocale].push({name:e,config:t}),null;s=n._config}return R[e]=new K(X(s,t)),ut[e]&&ut[e].forEach(function(e){ft(e.name,e.config)}),ct(e),R[e]}function mt(e){var t;if(!(e=e&&e._locale&&e._locale._abbr?e._locale._abbr:e))return at;if(!y(e)){if(t=dt(e))return t;e=[e]}return ht(e)}function _t(e){var t=e._a;return t&&-2===p(e).overflow&&(t=t[O]<0||11<t[O]?O:t[b]<1||t[b]>We(t[Y],t[O])?b:t[x]<0||24<t[x]||24===t[x]&&(0!==t[T]||0!==t[N]||0!==t[Ne])?x:t[T]<0||59<t[T]?T:t[N]<0||59<t[N]?N:t[Ne]<0||999<t[Ne]?Ne:-1,p(e)._overflowDayOfYear&&(t<Y||b<t)&&(t=b),p(e)._overflowWeeks&&-1===t&&(t=Pe),p(e)._overflowWeekday&&-1===t&&(t=Re),p(e).overflow=t),e}var yt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],vt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],kt=/^\/?Date\((-?\d+)/i,Mt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Dt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function St(e){var t,n,s,i,r,a,o=e._i,u=yt.exec(o)||gt.exec(o),o=pt.length,l=vt.length;if(u){for(p(e).iso=!0,t=0,n=o;t<n;t++)if(pt[t][1].exec(u[1])){i=pt[t][0],s=!1!==pt[t][2];break}if(null==i)e._isValid=!1;else{if(u[3]){for(t=0,n=l;t<n;t++)if(vt[t][1].exec(u[3])){r=(u[2]||" ")+vt[t][0];break}if(null==r)return void(e._isValid=!1)}if(s||null==r){if(u[4]){if(!wt.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),Tt(e)}else e._isValid=!1}}else e._isValid=!1}function Yt(e,t,n,s,i,r){e=[function(e){e=parseInt(e,10);{if(e<=49)return 2e3+e;if(e<=999)return 1900+e}return e}(e),Ue.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&e.push(parseInt(r,10)),e}function Ot(e){var t,n,s=Mt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));s?(t=Yt(s[4],s[3],s[2],s[5],s[6],s[7]),function(e,t,n){if(!e||Qe.indexOf(e)===new Date(t[0],t[1],t[2]).getDay())return 1;p(n).weekdayMismatch=!0,n._isValid=!1}(s[1],t,e)&&(e._a=t,e._tzm=(t=s[8],n=s[9],s=s[10],t?Dt[t]:n?0:60*(((t=parseInt(s,10))-(n=t%100))/100)+n),e._d=Ze.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0)):e._isValid=!1}function bt(e,t,n){return null!=e?e:null!=t?t:n}function xt(e){var t,n,s,i,r,a,o,u,l,h,d,c=[];if(!e._d){for(s=e,i=new Date(_.now()),n=s._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()],e._w&&null==e._a[b]&&null==e._a[O]&&(null!=(i=(s=e)._w).GG||null!=i.W||null!=i.E?(u=1,l=4,r=bt(i.GG,s._a[Y],qe(W(),1,4).year),a=bt(i.W,1),((o=bt(i.E,1))<1||7<o)&&(h=!0)):(u=s._locale._week.dow,l=s._locale._week.doy,d=qe(W(),u,l),r=bt(i.gg,s._a[Y],d.year),a=bt(i.w,d.week),null!=i.d?((o=i.d)<0||6<o)&&(h=!0):null!=i.e?(o=i.e+u,(i.e<0||6<i.e)&&(h=!0)):o=u),a<1||a>P(r,u,l)?p(s)._overflowWeeks=!0:null!=h?p(s)._overflowWeekday=!0:(d=$e(r,a,o,u,l),s._a[Y]=d.year,s._dayOfYear=d.dayOfYear)),null!=e._dayOfYear&&(i=bt(e._a[Y],n[Y]),(e._dayOfYear>Ae(i)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),h=Ze(i,0,e._dayOfYear),e._a[O]=h.getUTCMonth(),e._a[b]=h.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=c[t]=n[t];for(;t<7;t++)e._a[t]=c[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[x]&&0===e._a[T]&&0===e._a[N]&&0===e._a[Ne]&&(e._nextDay=!0,e._a[x]=0),e._d=(e._useUTC?Ze:je).apply(null,c),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[x]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(p(e).weekdayMismatch=!0)}}function Tt(e){if(e._f===_.ISO_8601)St(e);else if(e._f===_.RFC_2822)Ot(e);else{e._a=[],p(e).empty=!0;for(var t,n,s,i,r,a=""+e._i,o=a.length,u=0,l=ae(e._f,e._locale).match(te)||[],h=l.length,d=0;d<h;d++)n=l[d],(t=(a.match(Oe(n,e))||[])[0])&&(0<(s=a.substr(0,a.indexOf(t))).length&&p(e).unusedInput.push(s),a=a.slice(a.indexOf(t)+t.length),u+=t.length),ie[n]?(t?p(e).empty=!1:p(e).unusedTokens.push(n),s=n,r=e,null!=(i=t)&&c(xe,s)&&xe[s](i,r._a,r,s)):e._strict&&!t&&p(e).unusedTokens.push(n);p(e).charsLeftOver=o-u,0<a.length&&p(e).unusedInput.push(a),e._a[x]<=12&&!0===p(e).bigHour&&0<e._a[x]&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[x]=function(e,t,n){if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((e=e.isPM(n))&&t<12&&(t+=12),t=e||12!==t?t:0):t}(e._locale,e._a[x],e._meridiem),null!==(o=p(e).era)&&(e._a[Y]=e._locale.erasConvertYear(o,e._a[Y])),xt(e),_t(e)}}function Nt(e){var t,n,s,i=e._i,r=e._f;if(e._locale=e._locale||mt(e._l),null===i||void 0===r&&""===i)return I({nullInput:!0});if("string"==typeof i&&(e._i=i=e._locale.preparse(i)),v(i))return new q(_t(i));if(V(i))e._d=i;else if(y(r)){var a,o,u,l,h,d,c=e,f=!1,m=c._f.length;if(0===m)p(c).invalidFormat=!0,c._d=new Date(NaN);else{for(l=0;l<m;l++)h=0,d=!1,a=$({},c),null!=c._useUTC&&(a._useUTC=c._useUTC),a._f=c._f[l],Tt(a),A(a)&&(d=!0),h=(h+=p(a).charsLeftOver)+10*p(a).unusedTokens.length,p(a).score=h,f?h<u&&(u=h,o=a):(null==u||h<u||d)&&(u=h,o=a,d)&&(f=!0);E(c,o||a)}}else if(r)Tt(e);else if(g(r=(i=e)._i))i._d=new Date(_.now());else V(r)?i._d=new Date(r.valueOf()):"string"==typeof r?(n=i,null!==(t=kt.exec(n._i))?n._d=new Date(+t[1]):(St(n),!1===n._isValid&&(delete n._isValid,Ot(n),!1===n._isValid)&&(delete n._isValid,n._strict?n._isValid=!1:_.createFromInputFallback(n)))):y(r)?(i._a=G(r.slice(0),function(e){return parseInt(e,10)}),xt(i)):F(r)?(t=i)._d||(s=void 0===(n=ue(t._i)).day?n.date:n.day,t._a=G([n.year,n.month,s,n.hour,n.minute,n.second,n.millisecond],function(e){return e&&parseInt(e,10)}),xt(t)):w(r)?i._d=new Date(r):_.createFromInputFallback(i);return A(e)||(e._d=null),e}function Pt(e,t,n,s,i){var r={};return!0!==t&&!1!==t||(s=t,t=void 0),!0!==n&&!1!==n||(s=n,n=void 0),(F(e)&&L(e)||y(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=i,r._l=n,r._i=e,r._f=t,r._strict=s,(i=new q(_t(Nt(i=r))))._nextDay&&(i.add(1,"d"),i._nextDay=void 0),i}function W(e,t,n,s){return Pt(e,t,n,s,!1)}_.createFromInputFallback=e("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),_.ISO_8601=function(){},_.RFC_2822=function(){};ge=e("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=W.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:I()}),we=e("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=W.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:I()});function Rt(e,t){var n,s;if(!(t=1===t.length&&y(t[0])?t[0]:t).length)return W();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Wt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ct(e){var e=ue(e),t=e.year||0,n=e.quarter||0,s=e.month||0,i=e.week||e.isoWeek||0,r=e.day||0,a=e.hour||0,o=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(e){var t,n,s=!1,i=Wt.length;for(t in e)if(c(e,t)&&(-1===S.call(Wt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[Wt[n]]){if(s)return!1;parseFloat(e[Wt[n]])!==h(e[Wt[n]])&&(s=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*o+1e3*a*60*60,this._days=+r+7*i,this._months=+s+3*n+12*t,this._data={},this._locale=mt(),this._bubble()}function Ut(e){return e instanceof Ct}function Ht(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){s(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+r(~~(e/60),2)+n+r(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),k("Z",Ye),k("ZZ",Ye),D(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Vt(Ye,e)});var Lt=/([\+\-]|\d\d)/gi;function Vt(e,t){var t=(t||"").match(e);return null===t?null:0===(t=60*(e=((t[t.length-1]||[])+"").match(Lt)||["-",0,0])[1]+h(e[2]))?0:"+"===e[0]?t:-t}function Gt(e,t){var n;return t._isUTC?(t=t.clone(),n=(v(e)||V(e)?e:W(e)).valueOf()-t.valueOf(),t._d.setTime(t._d.valueOf()+n),_.updateOffset(t,!1),t):W(e).local()}function Et(e){return-Math.round(e._d.getTimezoneOffset())}function At(){return!!this.isValid()&&this._isUTC&&0===this._offset}_.updateOffset=function(){};var It=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,jt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function C(e,t){var n,s=e;return Ut(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:w(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(t=It.exec(e))?(n="-"===t[1]?-1:1,s={y:0,d:h(t[b])*n,h:h(t[x])*n,m:h(t[T])*n,s:h(t[N])*n,ms:h(Ht(1e3*t[Ne]))*n}):(t=jt.exec(e))?(n="-"===t[1]?-1:1,s={y:Zt(t[2],n),M:Zt(t[3],n),w:Zt(t[4],n),d:Zt(t[5],n),h:Zt(t[6],n),m:Zt(t[7],n),s:Zt(t[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(t=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Gt(t,e),e.isBefore(t)?n=zt(e,t):((n=zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(W(s.from),W(s.to)),(s={}).ms=t.milliseconds,s.M=t.months),n=new Ct(s),Ut(e)&&c(e,"_locale")&&(n._locale=e._locale),Ut(e)&&c(e,"_isValid")&&(n._isValid=e._isValid),n}function Zt(e,t){e=e&&parseFloat(e.replace(",","."));return(isNaN(e)?0:e)*t}function zt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function $t(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(Q(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),qt(this,C(e,t),s),this}}function qt(e,t,n,s){var i=t._milliseconds,r=Ht(t._days),t=Ht(t._months);e.isValid()&&(s=null==s||s,t&&Ve(e,ce(e,"Month")+t*n),r&&fe(e,"Date",ce(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s)&&_.updateOffset(e,r||t)}C.fn=Ct.prototype,C.invalid=function(){return C(NaN)};Ce=$t(1,"add"),Je=$t(-1,"subtract");function Bt(e){return"string"==typeof e||e instanceof String}function Jt(e){return v(e)||V(e)||Bt(e)||w(e)||function(t){var e=y(t),n=!1;e&&(n=0===t.filter(function(e){return!w(e)&&Bt(t)}).length);return e&&n}(e)||function(e){var t,n,s=F(e)&&!L(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a=r.length;for(t=0;t<a;t+=1)n=r[t],i=i||c(e,n);return s&&i}(e)||null==e}function Qt(e,t){var n,s;return e.date()<t.date()?-Qt(t,e):-((n=12*(t.year()-e.year())+(t.month()-e.month()))+(t-(s=e.clone().add(n,"months"))<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(1+n,"months")-s)))||0}function Xt(e){return void 0===e?this._locale._abbr:(null!=(e=mt(e))&&(this._locale=e),this)}_.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",_.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";Xe=e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}var en=126227808e5;function tn(e,t){return(e%t+t)%t}function nn(e,t,n){return e<100&&0<=e?new Date(e+400,t,n)-en:new Date(e,t,n).valueOf()}function sn(e,t,n){return e<100&&0<=e?Date.UTC(e+400,t,n)-en:Date.UTC(e,t,n)}function rn(e,t){return t.erasAbbrRegex(e)}function an(){for(var e=[],t=[],n=[],s=[],i=this.eras(),r=0,a=i.length;r<a;++r)t.push(M(i[r].name)),e.push(M(i[r].abbr)),n.push(M(i[r].narrow)),s.push(M(i[r].name)),s.push(M(i[r].abbr)),s.push(M(i[r].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}function on(e,t){s(0,[e,e.length],0,t)}function un(e,t,n,s,i){var r;return null==e?qe(this,s,i).year:(r=P(e,s,i),function(e,t,n,s,i){e=$e(e,t,n,s,i),t=Ze(e.year,0,e.dayOfYear);return this.year(t.getUTCFullYear()),this.month(t.getUTCMonth()),this.date(t.getUTCDate()),this}.call(this,e,t=r<t?r:t,n,s,i))}s("N",0,0,"eraAbbr"),s("NN",0,0,"eraAbbr"),s("NNN",0,0,"eraAbbr"),s("NNNN",0,0,"eraName"),s("NNNNN",0,0,"eraNarrow"),s("y",["y",1],"yo","eraYear"),s("y",["yy",2],0,"eraYear"),s("y",["yyy",3],0,"eraYear"),s("y",["yyyy",4],0,"eraYear"),k("N",rn),k("NN",rn),k("NNN",rn),k("NNNN",function(e,t){return t.erasNameRegex(e)}),k("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),D(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){s=n._locale.erasParse(e,s,n._strict);s?p(n).era=s:p(n).invalidEra=e}),k("y",Me),k("yy",Me),k("yyy",Me),k("yyyy",Me),k("yo",function(e,t){return t._eraYearOrdinalRegex||Me}),D(["y","yy","yyy","yyyy"],Y),D(["yo"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Y]=n._locale.eraYearOrdinalParse(e,i):t[Y]=parseInt(e,10)}),s(0,["gg",2],0,function(){return this.weekYear()%100}),s(0,["GG",2],0,function(){return this.isoWeekYear()%100}),on("gggg","weekYear"),on("ggggg","weekYear"),on("GGGG","isoWeekYear"),on("GGGGG","isoWeekYear"),t("weekYear","gg"),t("isoWeekYear","GG"),n("weekYear",1),n("isoWeekYear",1),k("G",De),k("g",De),k("GG",f,u),k("gg",f,u),k("GGGG",ve,_e),k("gggg",ve,_e),k("GGGGG",ke,ye),k("ggggg",ke,ye),Te(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=h(e)}),Te(["gg","GG"],function(e,t,n,s){t[s]=_.parseTwoDigitYear(e)}),s("Q",0,"Qo","quarter"),t("quarter","Q"),n("quarter",7),k("Q",i),D("Q",function(e,t){t[O]=3*(h(e)-1)}),s("D",["DD",2],"Do","date"),t("date","D"),n("date",9),k("D",f),k("DD",f,u),k("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),D(["D","DD"],b),D("Do",function(e,t){t[b]=h(e.match(f)[0])});ve=de("Date",!0);s("DDD",["DDDD",3],"DDDo","dayOfYear"),t("dayOfYear","DDD"),n("dayOfYear",4),k("DDD",pe),k("DDDD",me),D(["DDD","DDDD"],function(e,t,n){n._dayOfYear=h(e)}),s("m",["mm",2],0,"minute"),t("minute","m"),n("minute",14),k("m",f),k("mm",f,u),D(["m","mm"],T);var ln,_e=de("Minutes",!1),ke=(s("s",["ss",2],0,"second"),t("second","s"),n("second",15),k("s",f),k("ss",f,u),D(["s","ss"],N),de("Seconds",!1));for(s("S",0,0,function(){return~~(this.millisecond()/100)}),s(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),s(0,["SSS",3],0,"millisecond"),s(0,["SSSS",4],0,function(){return 10*this.millisecond()}),s(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),s(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),s(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),s(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),s(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),t("millisecond","ms"),n("millisecond",16),k("S",pe,i),k("SS",pe,u),k("SSS",pe,me),ln="SSSS";ln.length<=9;ln+="S")k(ln,Me);function hn(e,t){t[Ne]=h(1e3*("0."+e))}for(ln="S";ln.length<=9;ln+="S")D(ln,hn);ye=de("Milliseconds",!1),s("z",0,0,"zoneAbbr"),s("zz",0,0,"zoneName");i=q.prototype;function dn(e){return e}i.add=Ce,i.calendar=function(e,t){1===arguments.length&&(arguments[0]?Jt(arguments[0])?(e=arguments[0],t=void 0):function(e){for(var t=F(e)&&!L(e),n=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i=0;i<s.length;i+=1)n=n||c(e,s[i]);return t&&n}(arguments[0])&&(t=arguments[0],e=void 0):t=e=void 0);var e=e||W(),n=Gt(e,this).startOf("day"),n=_.calendarFormat(this,n)||"sameElse",t=t&&(a(t[n])?t[n].call(this,e):t[n]);return this.format(t||this.localeData().calendar(n,this,W(e)))},i.clone=function(){return new q(this)},i.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Gt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=o(t)){case"year":r=Qt(this,s)/12;break;case"month":r=Qt(this,s);break;case"quarter":r=Qt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:d(r)},i.endOf=function(e){var t,n;if(void 0!==(e=o(e))&&"millisecond"!==e&&this.isValid()){switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-tn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-tn(t,1e3)-1}this._d.setTime(t),_.updateOffset(this,!0)}return this},i.format=function(e){return e=e||(this.isUtc()?_.defaultFormatUtc:_.defaultFormat),e=re(this,e),this.localeData().postformat(e)},i.from=function(e,t){return this.isValid()&&(v(e)&&e.isValid()||W(e).isValid())?C({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},i.fromNow=function(e){return this.from(W(),e)},i.to=function(e,t){return this.isValid()&&(v(e)&&e.isValid()||W(e).isValid())?C({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},i.toNow=function(e){return this.to(W(),e)},i.get=function(e){return a(this[e=o(e)])?this[e]():this},i.invalidAt=function(){return p(this).overflow},i.isAfter=function(e,t){return e=v(e)?e:W(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()>e.valueOf():e.valueOf()<this.clone().startOf(t).valueOf())},i.isBefore=function(e,t){return e=v(e)?e:W(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()<e.valueOf():this.clone().endOf(t).valueOf()<e.valueOf())},i.isBetween=function(e,t,n,s){return e=v(e)?e:W(e),t=v(t)?t:W(t),!!(this.isValid()&&e.isValid()&&t.isValid())&&("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},i.isSame=function(e,t){var e=v(e)?e:W(e);return!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()===e.valueOf():(e=e.valueOf(),this.clone().startOf(t).valueOf()<=e&&e<=this.clone().endOf(t).valueOf()))},i.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},i.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},i.isValid=function(){return A(this)},i.lang=Xe,i.locale=Xt,i.localeData=Kt,i.max=we,i.min=ge,i.parsingFlags=function(){return E({},p(this))},i.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t,n=[];for(t in e)c(e,t)&&n.push({unit:t,priority:le[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=ue(e)),s=n.length,i=0;i<s;i++)this[n[i].unit](e[n[i].unit]);else if(a(this[e=o(e)]))return this[e](t);return this},i.startOf=function(e){var t,n;if(void 0!==(e=o(e))&&"millisecond"!==e&&this.isValid()){switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=tn(t,6e4);break;case"second":t=this._d.valueOf(),t-=tn(t,1e3)}this._d.setTime(t),_.updateOffset(this,!0)}return this},i.subtract=Je,i.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},i.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},i.toDate=function(){return new Date(this.valueOf())},i.toISOString=function(e){var t;return this.isValid()?(t=(e=!0!==e)?this.clone().utc():this).year()<0||9999<t.year()?re(t,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):a(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",re(t,"Z")):re(t,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ"):null},i.inspect=function(){var e,t,n;return this.isValid()?(t="moment",e="",this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z"),t="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(t+n+"-MM-DD[T]HH:mm:ss.SSS"+(e+'[")]'))):"moment.invalid(/* "+this._i+" */)"},"undefined"!=typeof Symbol&&null!=Symbol.for&&(i[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},i.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},i.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].name;if(t[n].until<=e&&e<=t[n].since)return t[n].name}return""},i.eraNarrow=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].narrow;if(t[n].until<=e&&e<=t[n].since)return t[n].narrow}return""},i.eraAbbr=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].abbr;if(t[n].until<=e&&e<=t[n].since)return t[n].abbr}return""},i.eraYear=function(){for(var e,t,n=this.localeData().eras(),s=0,i=n.length;s<i;++s)if(e=n[s].since<=n[s].until?1:-1,t=this.clone().startOf("day").valueOf(),n[s].since<=t&&t<=n[s].until||n[s].until<=t&&t<=n[s].since)return(this.year()-_(n[s].since).year())*e+n[s].offset;return this.year()},i.year=Ie,i.isLeapYear=function(){return he(this.year())},i.weekYear=function(e){return un.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},i.isoWeekYear=function(e){return un.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},i.quarter=i.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},i.month=Ge,i.daysInMonth=function(){return We(this.year(),this.month())},i.week=i.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},i.isoWeek=i.isoWeeks=function(e){var t=qe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},i.weeksInYear=function(){var e=this.localeData()._week;return P(this.year(),e.dow,e.doy)},i.weeksInWeekYear=function(){var e=this.localeData()._week;return P(this.weekYear(),e.dow,e.doy)},i.isoWeeksInYear=function(){return P(this.year(),1,4)},i.isoWeeksInISOWeekYear=function(){return P(this.isoWeekYear(),1,4)},i.date=ve,i.day=i.days=function(e){var t,n,s;return this.isValid()?(t=this._isUTC?this._d.getUTCDay():this._d.getDay(),null!=e?(n=e,s=this.localeData(),e="string"!=typeof n?n:isNaN(n)?"number"==typeof(n=s.weekdaysParse(n))?n:null:parseInt(n,10),this.add(e-t,"d")):t):null!=e?this:NaN},i.weekday=function(e){var t;return this.isValid()?(t=(this.day()+7-this.localeData()._week.dow)%7,null==e?t:this.add(e-t,"d")):null!=e?this:NaN},i.isoWeekday=function(e){var t,n;return this.isValid()?null!=e?(t=e,n=this.localeData(),n="string"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t,this.day(this.day()%7?n:n-7)):this.day()||7:null!=e?this:NaN},i.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},i.hour=i.hours=m,i.minute=i.minutes=_e,i.second=i.seconds=ke,i.millisecond=i.milliseconds=ye,i.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?i:Et(this);if("string"==typeof e){if(null===(e=Vt(Ye,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Et(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?qt(this,C(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,_.updateOffset(this,!0),this._changeInProgress=null)),this},i.utc=function(e){return this.utcOffset(0,e)},i.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e)&&this.subtract(Et(this),"m"),this},i.parseZone=function(){var e;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):"string"==typeof this._i&&(null!=(e=Vt(Se,this._i))?this.utcOffset(e):this.utcOffset(0,!0)),this},i.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?W(e).utcOffset():0,(this.utcOffset()-e)%60==0)},i.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},i.isLocal=function(){return!!this.isValid()&&!this._isUTC},i.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},i.isUtc=At,i.isUTC=At,i.zoneAbbr=function(){return this._isUTC?"UTC":""},i.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},i.dates=e("dates accessor is deprecated. Use date instead.",ve),i.months=e("months accessor is deprecated. Use month instead",Ge),i.years=e("years accessor is deprecated. Use year instead",Ie),i.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?(this.utcOffset(e="string"!=typeof e?-e:e,t),this):-this.utcOffset()}),i.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){var e,t;return g(this._isDSTShifted)&&($(e={},this),(e=Nt(e))._a?(t=(e._isUTC?l:W)(e._a),this._isDSTShifted=this.isValid()&&0<function(e,t,n){for(var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0,a=0;a<s;a++)(n&&e[a]!==t[a]||!n&&h(e[a])!==h(t[a]))&&r++;return r+i}(e._a,t.toArray())):this._isDSTShifted=!1),this._isDSTShifted});u=K.prototype;function cn(e,t,n,s){var i=mt(),s=l().set(s,t);return i[n](s,e)}function fn(e,t,n){if(w(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");for(var s=[],i=0;i<12;i++)s[i]=cn(e,i,n,"month");return s}function mn(e,t,n,s){t=("boolean"==typeof e?w(t)&&(n=t,t=void 0):(t=e,e=!1,w(n=t)&&(n=t,t=void 0)),t||"");var i,r=mt(),a=e?r._week.dow:0,o=[];if(null!=n)return cn(t,(n+a)%7,s,"day");for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,"day");return o}u.calendar=function(e,t,n){return a(e=this._calendar[e]||this._calendar.sameElse)?e.call(t,n):e},u.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(te).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},u.invalidDate=function(){return this._invalidDate},u.ordinal=function(e){return this._ordinal.replace("%d",e)},u.preparse=dn,u.postformat=dn,u.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return a(i)?i(e,t,n,s):i.replace(/%d/i,e)},u.pastFuture=function(e,t){return a(e=this._relativeTime[0<e?"future":"past"])?e(t):e.replace(/%s/i,t)},u.set=function(e){var t,n;for(n in e)c(e,n)&&(a(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},u.eras=function(e,t){for(var n,s=this._eras||mt("en")._eras,i=0,r=s.length;i<r;++i)switch("string"==typeof s[i].since&&(n=_(s[i].since).startOf("day"),s[i].since=n.valueOf()),typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":n=_(s[i].until).startOf("day").valueOf(),s[i].until=n.valueOf()}return s},u.erasParse=function(e,t,n){var s,i,r,a,o,u=this.eras();for(e=e.toUpperCase(),s=0,i=u.length;s<i;++s)if(r=u[s].name.toUpperCase(),a=u[s].abbr.toUpperCase(),o=u[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[s];break;case"NNNN":if(r===e)return u[s];break;case"NNNNN":if(o===e)return u[s]}else if(0<=[r,a,o].indexOf(e))return u[s]},u.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?_(e.since).year():_(e.since).year()+(t-e.offset)*n},u.erasAbbrRegex=function(e){return c(this,"_erasAbbrRegex")||an.call(this),e?this._erasAbbrRegex:this._erasRegex},u.erasNameRegex=function(e){return c(this,"_erasNameRegex")||an.call(this),e?this._erasNameRegex:this._erasRegex},u.erasNarrowRegex=function(e){return c(this,"_erasNarrowRegex")||an.call(this),e?this._erasNarrowRegex:this._erasRegex},u.months=function(e,t){return e?(y(this._months)?this._months:this._months[(this._months.isFormat||He).test(t)?"format":"standalone"])[e.month()]:y(this._months)?this._months:this._months.standalone},u.monthsShort=function(e,t){return e?(y(this._monthsShort)?this._monthsShort:this._monthsShort[He.test(t)?"format":"standalone"])[e.month()]:y(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},u.monthsParse=function(e,t,n){var s,i;if(this._monthsParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=l([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=S.call(this._shortMonthsParse,e))?i:null:-1!==(i=S.call(this._longMonthsParse,e))?i:null:"MMM"===t?-1!==(i=S.call(this._shortMonthsParse,e))||-1!==(i=S.call(this._longMonthsParse,e))?i:null:-1!==(i=S.call(this._longMonthsParse,e))||-1!==(i=S.call(this._shortMonthsParse,e))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=l([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(i="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},u.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ee.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Le),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},u.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ee.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Fe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},u.week=function(e){return qe(e,this._week.dow,this._week.doy).week},u.firstDayOfYear=function(){return this._week.doy},u.firstDayOfWeek=function(){return this._week.dow},u.weekdays=function(e,t){return t=y(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"],!0===e?Be(t,this._week.dow):e?t[e.day()]:t},u.weekdaysMin=function(e){return!0===e?Be(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},u.weekdaysShort=function(e){return!0===e?Be(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},u.weekdaysParse=function(e,t,n){var s,i;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=l([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=S.call(this._weekdaysParse,e))?i:null:"ddd"===t?-1!==(i=S.call(this._shortWeekdaysParse,e))?i:null:-1!==(i=S.call(this._minWeekdaysParse,e))?i:null:"dddd"===t?-1!==(i=S.call(this._weekdaysParse,e))||-1!==(i=S.call(this._shortWeekdaysParse,e))||-1!==(i=S.call(this._minWeekdaysParse,e))?i:null:"ddd"===t?-1!==(i=S.call(this._shortWeekdaysParse,e))||-1!==(i=S.call(this._weekdaysParse,e))||-1!==(i=S.call(this._minWeekdaysParse,e))?i:null:-1!==(i=S.call(this._minWeekdaysParse,e))||-1!==(i=S.call(this._weekdaysParse,e))||-1!==(i=S.call(this._shortWeekdaysParse,e))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=l([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(i="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},u.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Ke),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},u.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=et),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},u.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},u.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},u.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},ct("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===h(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th")}}),_.lang=e("moment.lang is deprecated. Use moment.locale instead.",ct),_.langData=e("moment.langData is deprecated. Use moment.localeData instead.",mt);var _n=Math.abs;function yn(e,t,n,s){t=C(t,n);return e._milliseconds+=s*t._milliseconds,e._days+=s*t._days,e._months+=s*t._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function wn(e){return 4800*e/146097}function pn(e){return 146097*e/4800}function vn(e){return function(){return this.as(e)}}pe=vn("ms"),me=vn("s"),Ce=vn("m"),we=vn("h"),ge=vn("d"),Je=vn("w"),m=vn("M"),_e=vn("Q"),ke=vn("y");function kn(e){return function(){return this.isValid()?this._data[e]:NaN}}var ye=kn("milliseconds"),ve=kn("seconds"),Ie=kn("minutes"),u=kn("hours"),Mn=kn("days"),Dn=kn("months"),Sn=kn("years");var Yn=Math.round,On={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function bn(e,t,n,s){var i=C(e).abs(),r=Yn(i.as("s")),a=Yn(i.as("m")),o=Yn(i.as("h")),u=Yn(i.as("d")),l=Yn(i.as("M")),h=Yn(i.as("w")),i=Yn(i.as("y")),r=(r<=n.ss?["s",r]:r<n.s&&["ss",r])||(a<=1?["m"]:a<n.m&&["mm",a])||(o<=1?["h"]:o<n.h&&["hh",o])||(u<=1?["d"]:u<n.d&&["dd",u]);return(r=(r=null!=n.w?r||(h<=1?["w"]:h<n.w&&["ww",h]):r)||(l<=1?["M"]:l<n.M&&["MM",l])||(i<=1?["y"]:["yy",i]))[2]=t,r[3]=0<+e,r[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,r)}var xn=Math.abs;function Tn(e){return(0<e)-(e<0)||+e}function Nn(){var e,t,n,s,i,r,a,o,u,l,h;return this.isValid()?(e=xn(this._milliseconds)/1e3,t=xn(this._days),n=xn(this._months),(o=this.asSeconds())?(s=d(e/60),i=d(s/60),e%=60,s%=60,r=d(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",u=Tn(this._months)!==Tn(o)?"-":"",l=Tn(this._days)!==Tn(o)?"-":"",h=Tn(this._milliseconds)!==Tn(o)?"-":"",(o<0?"-":"")+"P"+(r?u+r+"Y":"")+(n?u+n+"M":"")+(t?l+t+"D":"")+(i||s||e?"T":"")+(i?h+i+"H":"")+(s?h+s+"M":"")+(e?h+a+"S":"")):"P0D"):this.localeData().invalidDate()}var U=Ct.prototype;return U.isValid=function(){return this._isValid},U.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},U.add=function(e,t){return yn(this,e,t,1)},U.subtract=function(e,t){return yn(this,e,t,-1)},U.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=o(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+wn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(pn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},U.asMilliseconds=pe,U.asSeconds=me,U.asMinutes=Ce,U.asHours=we,U.asDays=ge,U.asWeeks=Je,U.asMonths=m,U.asQuarters=_e,U.asYears=ke,U.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*h(this._months/12):NaN},U._bubble=function(){var e=this._milliseconds,t=this._days,n=this._months,s=this._data;return 0<=e&&0<=t&&0<=n||e<=0&&t<=0&&n<=0||(e+=864e5*gn(pn(n)+t),n=t=0),s.milliseconds=e%1e3,e=d(e/1e3),s.seconds=e%60,e=d(e/60),s.minutes=e%60,e=d(e/60),s.hours=e%24,t+=d(e/24),n+=e=d(wn(t)),t-=gn(pn(e)),e=d(n/12),n%=12,s.days=t,s.months=n,s.years=e,this},U.clone=function(){return C(this)},U.get=function(e){return e=o(e),this.isValid()?this[e+"s"]():NaN},U.milliseconds=ye,U.seconds=ve,U.minutes=Ie,U.hours=u,U.days=Mn,U.weeks=function(){return d(this.days()/7)},U.months=Dn,U.years=Sn,U.humanize=function(e,t){var n,s;return this.isValid()?(n=!1,s=On,"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(n=e),"object"==typeof t&&(s=Object.assign({},On,t),null!=t.s)&&null==t.ss&&(s.ss=t.s-1),e=this.localeData(),t=bn(this,!n,s,e),n&&(t=e.pastFuture(+this,t)),e.postformat(t)):this.localeData().invalidDate()},U.toISOString=Nn,U.toString=Nn,U.toJSON=Nn,U.locale=Xt,U.localeData=Kt,U.toIsoString=e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Nn),U.lang=Xe,s("X",0,0,"unix"),s("x",0,0,"valueOf"),k("x",De),k("X",/[+-]?\d+(\.\d{1,3})?/),D("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),D("x",function(e,t,n){n._d=new Date(h(e))}),_.version="2.29.4",H=W,_.fn=i,_.min=function(){return Rt("isBefore",[].slice.call(arguments,0))},_.max=function(){return Rt("isAfter",[].slice.call(arguments,0))},_.now=function(){return Date.now?Date.now():+new Date},_.utc=l,_.unix=function(e){return W(1e3*e)},_.months=function(e,t){return fn(e,t,"months")},_.isDate=V,_.locale=ct,_.invalid=I,_.duration=C,_.isMoment=v,_.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},_.parseZone=function(){return W.apply(null,arguments).parseZone()},_.localeData=mt,_.isDuration=Ut,_.monthsShort=function(e,t){return fn(e,t,"monthsShort")},_.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},_.defineLocale=ft,_.updateLocale=function(e,t){var n,s;return null!=t?(s=ot,null!=R[e]&&null!=R[e].parentLocale?R[e].set(X(R[e]._config,t)):(t=X(s=null!=(n=dt(e))?n._config:s,t),null==n&&(t.abbr=e),(s=new K(t)).parentLocale=R[e],R[e]=s),ct(e)):null!=R[e]&&(null!=R[e].parentLocale?(R[e]=R[e].parentLocale,e===ct()&&ct(e)):null!=R[e]&&delete R[e]),R[e]},_.locales=function(){return ee(R)},_.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},_.normalizeUnits=o,_.relativeTimeRounding=function(e){return void 0===e?Yn:"function"==typeof e&&(Yn=e,!0)},_.relativeTimeThreshold=function(e,t){return void 0!==On[e]&&(void 0===t?On[e]:(On[e]=t,"s"===e&&(On.ss=t-1),!0))},_.calendarFormat=function(e,t){return(e=e.diff(t,"days",!0))<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse"},_.prototype=i,_.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},_}); react-dom.js 0000644 00004067436 15153765737 0007024 0 ustar 00 /**
* @license React
* react-dom.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
(global = global || self, factory(global.ReactDOM = {}, global.React));
}(this, (function (exports, React) { 'use strict';
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
var suppressWarning = false;
function setSuppressWarning(newSuppressWarning) {
{
suppressWarning = newSuppressWarning;
}
} // In DEV, calls to console.warn and console.error get replaced
// by calls to these methods by a Babel plugin.
//
// In PROD (or in packages without access to React internals),
// they are left as they are instead.
function warn(format) {
{
if (!suppressWarning) {
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
printWarning('warn', format, args);
}
}
}
function error(format) {
{
if (!suppressWarning) {
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
printWarning('error', format, args);
}
}
}
function printWarning(level, format, args) {
// When changing this logic, you might want to also
// update consoleWithStackDev.www.js as well.
{
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
var stack = ReactDebugCurrentFrame.getStackAddendum();
if (stack !== '') {
format += '%s';
args = args.concat([stack]);
} // eslint-disable-next-line react-internal/safe-string-coercion
var argsWithFormat = args.map(function (item) {
return String(item);
}); // Careful: RN currently depends on this prefix
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
// breaks IE9: https://github.com/facebook/react/issues/13610
// eslint-disable-next-line react-internal/no-production-logging
Function.prototype.apply.call(console[level], console, argsWithFormat);
}
}
var FunctionComponent = 0;
var ClassComponent = 1;
var IndeterminateComponent = 2; // Before we know whether it is function or class
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
var HostComponent = 5;
var HostText = 6;
var Fragment = 7;
var Mode = 8;
var ContextConsumer = 9;
var ContextProvider = 10;
var ForwardRef = 11;
var Profiler = 12;
var SuspenseComponent = 13;
var MemoComponent = 14;
var SimpleMemoComponent = 15;
var LazyComponent = 16;
var IncompleteClassComponent = 17;
var DehydratedFragment = 18;
var SuspenseListComponent = 19;
var ScopeComponent = 21;
var OffscreenComponent = 22;
var LegacyHiddenComponent = 23;
var CacheComponent = 24;
var TracingMarkerComponent = 25;
// -----------------------------------------------------------------------------
var enableClientRenderFallbackOnTextMismatch = true; // TODO: Need to review this code one more time before landing
// the react-reconciler package.
var enableNewReconciler = false; // Support legacy Primer support on internal FB www
var enableLazyContextPropagation = false; // FB-only usage. The new API has different semantics.
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
var enableSuspenseAvoidThisFallback = false; // Enables unstable_avoidThisFallback feature in Fizz
// React DOM Chopping Block
//
// Similar to main Chopping Block but only flags related to React DOM. These are
// grouped because we will likely batch all of them into a single major release.
// -----------------------------------------------------------------------------
// Disable support for comment nodes as React DOM containers. Already disabled
// in open source, but www codebase still relies on it. Need to remove.
var disableCommentsAsDOMContainers = true; // Disable javascript: URL strings in href for XSS protection.
// and client rendering, mostly to allow JSX attributes to apply to the custom
// element's object properties instead of only HTML attributes.
// https://github.com/facebook/react/issues/11347
var enableCustomElementPropertySupport = false; // Disables children for <textarea> elements
var warnAboutStringRefs = false; // -----------------------------------------------------------------------------
// Debugging and DevTools
// -----------------------------------------------------------------------------
// Adds user timing marks for e.g. state updates, suspense, and work loop stuff,
// for an experimental timeline tool.
var enableSchedulingProfiler = true; // Helps identify side effects in render-phase lifecycle hooks and setState
var enableProfilerTimer = true; // Record durations for commit and passive effects phases.
var enableProfilerCommitHooks = true; // Phase param passed to onRender callback differentiates between an "update" and a "cascading-update".
var allNativeEvents = new Set();
/**
* Mapping from registration name to event name
*/
var registrationNameDependencies = {};
/**
* Mapping from lowercase registration names to the properly cased version,
* used to warn in the case of missing event handlers. Available
* only in true.
* @type {Object}
*/
var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true
function registerTwoPhaseEvent(registrationName, dependencies) {
registerDirectEvent(registrationName, dependencies);
registerDirectEvent(registrationName + 'Capture', dependencies);
}
function registerDirectEvent(registrationName, dependencies) {
{
if (registrationNameDependencies[registrationName]) {
error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);
}
}
registrationNameDependencies[registrationName] = dependencies;
{
var lowerCasedName = registrationName.toLowerCase();
possibleRegistrationNames[lowerCasedName] = registrationName;
if (registrationName === 'onDoubleClick') {
possibleRegistrationNames.ondblclick = registrationName;
}
}
for (var i = 0; i < dependencies.length; i++) {
allNativeEvents.add(dependencies[i]);
}
}
var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
var hasOwnProperty = Object.prototype.hasOwnProperty;
/*
* The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
* and Temporal.* types. See https://github.com/facebook/react/pull/22064.
*
* The functions in this module will throw an easier-to-understand,
* easier-to-debug exception with a clear errors message message explaining the
* problem. (Instead of a confusing exception thrown inside the implementation
* of the `value` object).
*/
// $FlowFixMe only called in DEV, so void return is not possible.
function typeName(value) {
{
// toStringTag is needed for namespaced types like Temporal.Instant
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
return type;
}
} // $FlowFixMe only called in DEV, so void return is not possible.
function willCoercionThrow(value) {
{
try {
testStringCoercion(value);
return false;
} catch (e) {
return true;
}
}
}
function testStringCoercion(value) {
// If you ended up here by following an exception call stack, here's what's
// happened: you supplied an object or symbol value to React (as a prop, key,
// DOM attribute, CSS property, string ref, etc.) and when React tried to
// coerce it to a string using `'' + value`, an exception was thrown.
//
// The most common types that will cause this exception are `Symbol` instances
// and Temporal objects like `Temporal.Instant`. But any object that has a
// `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
// exception. (Library authors do this to prevent users from using built-in
// numeric operators like `+` or comparison operators like `>=` because custom
// methods are needed to perform accurate arithmetic or comparison.)
//
// To fix the problem, coerce this object or symbol value to a string before
// passing it to React. The most reliable way is usually `String(value)`.
//
// To find which value is throwing, check the browser or debugger console.
// Before this exception was thrown, there should be `console.error` output
// that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
// problem and how that type was used: key, atrribute, input value prop, etc.
// In most cases, this console output also shows the component and its
// ancestor components where the exception happened.
//
// eslint-disable-next-line react-internal/safe-string-coercion
return '' + value;
}
function checkAttributeStringCoercion(value, attributeName) {
{
if (willCoercionThrow(value)) {
error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', attributeName, typeName(value));
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
}
}
}
function checkKeyStringCoercion(value) {
{
if (willCoercionThrow(value)) {
error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
}
}
}
function checkPropStringCoercion(value, propName) {
{
if (willCoercionThrow(value)) {
error('The provided `%s` prop is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
}
}
}
function checkCSSPropertyStringCoercion(value, propName) {
{
if (willCoercionThrow(value)) {
error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
}
}
}
function checkHtmlStringCoercion(value) {
{
if (willCoercionThrow(value)) {
error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
}
}
}
function checkFormFieldValueStringCoercion(value) {
{
if (willCoercionThrow(value)) {
error('Form field values (value, checked, defaultValue, or defaultChecked props)' + ' must be strings, not %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
}
}
}
// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0; // A simple string attribute.
// Attributes that aren't in the filter are presumed to have this type.
var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
// "enumerated" attributes with "true" and "false" as possible values.
// When true, it should be set to a "true" string.
// When false, it should be set to a "false" string.
var BOOLEANISH_STRING = 2; // A real boolean attribute.
// When true, it should be present (set either to an empty string or its name).
// When false, it should be omitted.
var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
// When true, it should be present (set either to an empty string or its name).
// When false, it should be omitted.
// For any other value, should be present with that value.
var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
// When falsy, it should be removed.
var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
// When falsy, it should be removed.
var POSITIVE_NUMERIC = 6;
/* eslint-disable max-len */
var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
/* eslint-enable max-len */
var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
var illegalAttributeNameCache = {};
var validatedAttributeNameCache = {};
function isAttributeNameSafe(attributeName) {
if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
return true;
}
if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
return false;
}
if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
validatedAttributeNameCache[attributeName] = true;
return true;
}
illegalAttributeNameCache[attributeName] = true;
{
error('Invalid attribute name: `%s`', attributeName);
}
return false;
}
function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
if (propertyInfo !== null) {
return propertyInfo.type === RESERVED;
}
if (isCustomComponentTag) {
return false;
}
if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
return true;
}
return false;
}
function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
if (propertyInfo !== null && propertyInfo.type === RESERVED) {
return false;
}
switch (typeof value) {
case 'function': // $FlowIssue symbol is perfectly valid here
case 'symbol':
// eslint-disable-line
return true;
case 'boolean':
{
if (isCustomComponentTag) {
return false;
}
if (propertyInfo !== null) {
return !propertyInfo.acceptsBooleans;
} else {
var prefix = name.toLowerCase().slice(0, 5);
return prefix !== 'data-' && prefix !== 'aria-';
}
}
default:
return false;
}
}
function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
if (value === null || typeof value === 'undefined') {
return true;
}
if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
return true;
}
if (isCustomComponentTag) {
return false;
}
if (propertyInfo !== null) {
switch (propertyInfo.type) {
case BOOLEAN:
return !value;
case OVERLOADED_BOOLEAN:
return value === false;
case NUMERIC:
return isNaN(value);
case POSITIVE_NUMERIC:
return isNaN(value) || value < 1;
}
}
return false;
}
function getPropertyInfo(name) {
return properties.hasOwnProperty(name) ? properties[name] : null;
}
function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
this.attributeName = attributeName;
this.attributeNamespace = attributeNamespace;
this.mustUseProperty = mustUseProperty;
this.propertyName = name;
this.type = type;
this.sanitizeURL = sanitizeURL;
this.removeEmptyString = removeEmptyString;
} // When adding attributes to this list, be sure to also add them to
// the `possibleStandardNames` module to ensure casing and incorrect
// name warnings.
var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.
var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
// elements (not just inputs). Now that ReactDOMInput assigns to the
// defaultValue property -- do we need this?
'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
false, // sanitizeURL
false);
}); // A few React string attributes have a different name.
// This is a mapping from React prop names to the attribute names.
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
var name = _ref[0],
attributeName = _ref[1];
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
attributeName, // attributeName
null, // attributeNamespace
false, // sanitizeURL
false);
}); // These are "enumerated" HTML attributes that accept "true" and "false".
// In React, we let users pass `true` and `false` even though technically
// these aren't boolean attributes (they are coerced to strings).
['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
false, // sanitizeURL
false);
}); // These are "enumerated" SVG attributes that accept "true" and "false".
// In React, we let users pass `true` and `false` even though technically
// these aren't boolean attributes (they are coerced to strings).
// Since these are SVG attributes, their attribute names are case-sensitive.
['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
false, // sanitizeURL
false);
}); // These are HTML boolean attributes.
['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
// on the client side because the browsers are inconsistent. Instead we call focus().
'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
'itemScope'].forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
false, // sanitizeURL
false);
}); // These are the few React props that we set as DOM properties
// rather than attributes. These are all booleans.
['checked', // Note: `option.selected` is not updated if `select.multiple` is
// disabled with `removeAttribute`. We have special logic for handling this.
'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
name, // attributeName
null, // attributeNamespace
false, // sanitizeURL
false);
}); // These are HTML attributes that are "overloaded booleans": they behave like
// booleans, but can also accept a string value.
['capture', 'download' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
false, // sanitizeURL
false);
}); // These are HTML attributes that must be positive numbers.
['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
false, // sanitizeURL
false);
}); // These are HTML attributes that must be numbers.
['rowSpan', 'start'].forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
false, // sanitizeURL
false);
});
var CAMELIZE = /[\-\:]([a-z])/g;
var capitalize = function (token) {
return token[1].toUpperCase();
}; // This is a list of all SVG attributes that need special casing, namespacing,
// or boolean value assignment. Regular attributes that just accept strings
// and have the same names are omitted, just like in the HTML attribute filter.
// Some of these attributes can be hard to find. This list was created by
// scraping the MDN documentation.
['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function (attributeName) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
attributeName, null, // attributeNamespace
false, // sanitizeURL
false);
}); // String SVG attributes with the xlink namespace.
['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function (attributeName) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
false);
}); // String SVG attributes with the xml namespace.
['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function (attributeName) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
false);
}); // These attribute exists both in HTML and SVG.
// The attribute name is case-sensitive in SVG so we can't just use
// the React name like we do for attributes that exist only in HTML.
['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
attributeName.toLowerCase(), // attributeName
null, // attributeNamespace
false, // sanitizeURL
false);
}); // These attributes accept URLs. These must not allow javascript: URLS.
// These will also need to accept Trusted Types object in the future.
var xlinkHref = 'xlinkHref';
properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
false);
['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
attributeName.toLowerCase(), // attributeName
null, // attributeNamespace
true, // sanitizeURL
true);
});
// and any newline or tab are filtered out as if they're not part of the URL.
// https://url.spec.whatwg.org/#url-parsing
// Tab or newline are defined as \r\n\t:
// https://infra.spec.whatwg.org/#ascii-tab-or-newline
// A C0 control is a code point in the range \u0000 NULL to \u001F
// INFORMATION SEPARATOR ONE, inclusive:
// https://infra.spec.whatwg.org/#c0-control-or-space
/* eslint-disable max-len */
var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
var didWarn = false;
function sanitizeURL(url) {
{
if (!didWarn && isJavaScriptProtocol.test(url)) {
didWarn = true;
error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
}
}
}
/**
* Get the value for a property on a node. Only used in DEV for SSR validation.
* The "expected" argument is used as a hint of what the expected value is.
* Some properties have multiple equivalent values.
*/
function getValueForProperty(node, name, expected, propertyInfo) {
{
if (propertyInfo.mustUseProperty) {
var propertyName = propertyInfo.propertyName;
return node[propertyName];
} else {
// This check protects multiple uses of `expected`, which is why the
// react-internal/safe-string-coercion rule is disabled in several spots
// below.
{
checkAttributeStringCoercion(expected, name);
}
if ( propertyInfo.sanitizeURL) {
// If we haven't fully disabled javascript: URLs, and if
// the hydration is successful of a javascript: URL, we
// still want to warn on the client.
// eslint-disable-next-line react-internal/safe-string-coercion
sanitizeURL('' + expected);
}
var attributeName = propertyInfo.attributeName;
var stringValue = null;
if (propertyInfo.type === OVERLOADED_BOOLEAN) {
if (node.hasAttribute(attributeName)) {
var value = node.getAttribute(attributeName);
if (value === '') {
return true;
}
if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
return value;
} // eslint-disable-next-line react-internal/safe-string-coercion
if (value === '' + expected) {
return expected;
}
return value;
}
} else if (node.hasAttribute(attributeName)) {
if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
// We had an attribute but shouldn't have had one, so read it
// for the error message.
return node.getAttribute(attributeName);
}
if (propertyInfo.type === BOOLEAN) {
// If this was a boolean, it doesn't matter what the value is
// the fact that we have it is the same as the expected.
return expected;
} // Even if this property uses a namespace we use getAttribute
// because we assume its namespaced name is the same as our config.
// To use getAttributeNS we need the local name which we don't have
// in our config atm.
stringValue = node.getAttribute(attributeName);
}
if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
return stringValue === null ? expected : stringValue; // eslint-disable-next-line react-internal/safe-string-coercion
} else if (stringValue === '' + expected) {
return expected;
} else {
return stringValue;
}
}
}
}
/**
* Get the value for a attribute on a node. Only used in DEV for SSR validation.
* The third argument is used as a hint of what the expected value is. Some
* attributes have multiple equivalent values.
*/
function getValueForAttribute(node, name, expected, isCustomComponentTag) {
{
if (!isAttributeNameSafe(name)) {
return;
}
if (!node.hasAttribute(name)) {
return expected === undefined ? undefined : null;
}
var value = node.getAttribute(name);
{
checkAttributeStringCoercion(expected, name);
}
if (value === '' + expected) {
return expected;
}
return value;
}
}
/**
* Sets the value for a property on a node.
*
* @param {DOMElement} node
* @param {string} name
* @param {*} value
*/
function setValueForProperty(node, name, value, isCustomComponentTag) {
var propertyInfo = getPropertyInfo(name);
if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {
return;
}
if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {
value = null;
}
if (isCustomComponentTag || propertyInfo === null) {
if (isAttributeNameSafe(name)) {
var _attributeName = name;
if (value === null) {
node.removeAttribute(_attributeName);
} else {
{
checkAttributeStringCoercion(value, name);
}
node.setAttribute(_attributeName, '' + value);
}
}
return;
}
var mustUseProperty = propertyInfo.mustUseProperty;
if (mustUseProperty) {
var propertyName = propertyInfo.propertyName;
if (value === null) {
var type = propertyInfo.type;
node[propertyName] = type === BOOLEAN ? false : '';
} else {
// Contrary to `setAttribute`, object properties are properly
// `toString`ed by IE8/9.
node[propertyName] = value;
}
return;
} // The rest are treated as attributes with special cases.
var attributeName = propertyInfo.attributeName,
attributeNamespace = propertyInfo.attributeNamespace;
if (value === null) {
node.removeAttribute(attributeName);
} else {
var _type = propertyInfo.type;
var attributeValue;
if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {
// If attribute type is boolean, we know for sure it won't be an execution sink
// and we won't require Trusted Type here.
attributeValue = '';
} else {
// `setAttribute` with objects becomes only `[object]` in IE8/9,
// ('' + value) makes it output the correct toString()-value.
{
{
checkAttributeStringCoercion(value, attributeName);
}
attributeValue = '' + value;
}
if (propertyInfo.sanitizeURL) {
sanitizeURL(attributeValue.toString());
}
}
if (attributeNamespace) {
node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
} else {
node.setAttribute(attributeName, attributeValue);
}
}
}
// ATTENTION
// When adding new symbols to this file,
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
// The Symbol used to tag the ReactElement-like types.
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
var REACT_MEMO_TYPE = Symbol.for('react.memo');
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
var REACT_SCOPE_TYPE = Symbol.for('react.scope');
var REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for('react.debug_trace_mode');
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
var REACT_LEGACY_HIDDEN_TYPE = Symbol.for('react.legacy_hidden');
var REACT_CACHE_TYPE = Symbol.for('react.cache');
var REACT_TRACING_MARKER_TYPE = Symbol.for('react.tracing_marker');
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = '@@iterator';
function getIteratorFn(maybeIterable) {
if (maybeIterable === null || typeof maybeIterable !== 'object') {
return null;
}
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
if (typeof maybeIterator === 'function') {
return maybeIterator;
}
return null;
}
var assign = Object.assign;
// Helpers to patch console.logs to avoid logging during side-effect free
// replaying on render function. This currently only patches the object
// lazily which won't cover if the log function was extracted eagerly.
// We could also eagerly patch the method.
var disabledDepth = 0;
var prevLog;
var prevInfo;
var prevWarn;
var prevError;
var prevGroup;
var prevGroupCollapsed;
var prevGroupEnd;
function disabledLog() {}
disabledLog.__reactDisabledLog = true;
function disableLogs() {
{
if (disabledDepth === 0) {
/* eslint-disable react-internal/no-production-logging */
prevLog = console.log;
prevInfo = console.info;
prevWarn = console.warn;
prevError = console.error;
prevGroup = console.group;
prevGroupCollapsed = console.groupCollapsed;
prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
var props = {
configurable: true,
enumerable: true,
value: disabledLog,
writable: true
}; // $FlowFixMe Flow thinks console is immutable.
Object.defineProperties(console, {
info: props,
log: props,
warn: props,
error: props,
group: props,
groupCollapsed: props,
groupEnd: props
});
/* eslint-enable react-internal/no-production-logging */
}
disabledDepth++;
}
}
function reenableLogs() {
{
disabledDepth--;
if (disabledDepth === 0) {
/* eslint-disable react-internal/no-production-logging */
var props = {
configurable: true,
enumerable: true,
writable: true
}; // $FlowFixMe Flow thinks console is immutable.
Object.defineProperties(console, {
log: assign({}, props, {
value: prevLog
}),
info: assign({}, props, {
value: prevInfo
}),
warn: assign({}, props, {
value: prevWarn
}),
error: assign({}, props, {
value: prevError
}),
group: assign({}, props, {
value: prevGroup
}),
groupCollapsed: assign({}, props, {
value: prevGroupCollapsed
}),
groupEnd: assign({}, props, {
value: prevGroupEnd
})
});
/* eslint-enable react-internal/no-production-logging */
}
if (disabledDepth < 0) {
error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
}
}
}
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
var prefix;
function describeBuiltInComponentFrame(name, source, ownerFn) {
{
if (prefix === undefined) {
// Extract the VM specific prefix used by each line.
try {
throw Error();
} catch (x) {
var match = x.stack.trim().match(/\n( *(at )?)/);
prefix = match && match[1] || '';
}
} // We use the prefix to ensure our stacks line up with native stack frames.
return '\n' + prefix + name;
}
}
var reentry = false;
var componentFrameCache;
{
var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
componentFrameCache = new PossiblyWeakMap();
}
function describeNativeComponentFrame(fn, construct) {
// If something asked for a stack inside a fake render, it should get ignored.
if ( !fn || reentry) {
return '';
}
{
var frame = componentFrameCache.get(fn);
if (frame !== undefined) {
return frame;
}
}
var control;
reentry = true;
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
Error.prepareStackTrace = undefined;
var previousDispatcher;
{
previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
// for warnings.
ReactCurrentDispatcher.current = null;
disableLogs();
}
try {
// This should throw.
if (construct) {
// Something should be setting the props in the constructor.
var Fake = function () {
throw Error();
}; // $FlowFixMe
Object.defineProperty(Fake.prototype, 'props', {
set: function () {
// We use a throwing setter instead of frozen or non-writable props
// because that won't throw in a non-strict mode function.
throw Error();
}
});
if (typeof Reflect === 'object' && Reflect.construct) {
// We construct a different control for this case to include any extra
// frames added by the construct call.
try {
Reflect.construct(Fake, []);
} catch (x) {
control = x;
}
Reflect.construct(fn, [], Fake);
} else {
try {
Fake.call();
} catch (x) {
control = x;
}
fn.call(Fake.prototype);
}
} else {
try {
throw Error();
} catch (x) {
control = x;
}
fn();
}
} catch (sample) {
// This is inlined manually because closure doesn't do it for us.
if (sample && control && typeof sample.stack === 'string') {
// This extracts the first frame from the sample that isn't also in the control.
// Skipping one frame that we assume is the frame that calls the two.
var sampleLines = sample.stack.split('\n');
var controlLines = control.stack.split('\n');
var s = sampleLines.length - 1;
var c = controlLines.length - 1;
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
// We expect at least one stack frame to be shared.
// Typically this will be the root most one. However, stack frames may be
// cut off due to maximum stack limits. In this case, one maybe cut off
// earlier than the other. We assume that the sample is longer or the same
// and there for cut off earlier. So we should find the root most frame in
// the sample somewhere in the control.
c--;
}
for (; s >= 1 && c >= 0; s--, c--) {
// Next we find the first one that isn't the same which should be the
// frame that called our sample function and the control.
if (sampleLines[s] !== controlLines[c]) {
// In V8, the first line is describing the message but other VMs don't.
// If we're about to return the first line, and the control is also on the same
// line, that's a pretty good indicator that our sample threw at same line as
// the control. I.e. before we entered the sample frame. So we ignore this result.
// This can happen if you passed a class to function component, or non-function.
if (s !== 1 || c !== 1) {
do {
s--;
c--; // We may still have similar intermediate frames from the construct call.
// The next one that isn't the same should be our match though.
if (c < 0 || sampleLines[s] !== controlLines[c]) {
// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
// but we have a user-provided "displayName"
// splice it in to make the stack more readable.
if (fn.displayName && _frame.includes('<anonymous>')) {
_frame = _frame.replace('<anonymous>', fn.displayName);
}
{
if (typeof fn === 'function') {
componentFrameCache.set(fn, _frame);
}
} // Return the line we found.
return _frame;
}
} while (s >= 1 && c >= 0);
}
break;
}
}
}
} finally {
reentry = false;
{
ReactCurrentDispatcher.current = previousDispatcher;
reenableLogs();
}
Error.prepareStackTrace = previousPrepareStackTrace;
} // Fallback to just using the name if we couldn't make it throw.
var name = fn ? fn.displayName || fn.name : '';
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
{
if (typeof fn === 'function') {
componentFrameCache.set(fn, syntheticFrame);
}
}
return syntheticFrame;
}
function describeClassComponentFrame(ctor, source, ownerFn) {
{
return describeNativeComponentFrame(ctor, true);
}
}
function describeFunctionComponentFrame(fn, source, ownerFn) {
{
return describeNativeComponentFrame(fn, false);
}
}
function shouldConstruct(Component) {
var prototype = Component.prototype;
return !!(prototype && prototype.isReactComponent);
}
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
if (type == null) {
return '';
}
if (typeof type === 'function') {
{
return describeNativeComponentFrame(type, shouldConstruct(type));
}
}
if (typeof type === 'string') {
return describeBuiltInComponentFrame(type);
}
switch (type) {
case REACT_SUSPENSE_TYPE:
return describeBuiltInComponentFrame('Suspense');
case REACT_SUSPENSE_LIST_TYPE:
return describeBuiltInComponentFrame('SuspenseList');
}
if (typeof type === 'object') {
switch (type.$$typeof) {
case REACT_FORWARD_REF_TYPE:
return describeFunctionComponentFrame(type.render);
case REACT_MEMO_TYPE:
// Memo may contain any component type so we recursively resolve it.
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
case REACT_LAZY_TYPE:
{
var lazyComponent = type;
var payload = lazyComponent._payload;
var init = lazyComponent._init;
try {
// Lazy may contain any component type so we recursively resolve it.
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
} catch (x) {}
}
}
}
return '';
}
function describeFiber(fiber) {
var owner = fiber._debugOwner ? fiber._debugOwner.type : null ;
var source = fiber._debugSource ;
switch (fiber.tag) {
case HostComponent:
return describeBuiltInComponentFrame(fiber.type);
case LazyComponent:
return describeBuiltInComponentFrame('Lazy');
case SuspenseComponent:
return describeBuiltInComponentFrame('Suspense');
case SuspenseListComponent:
return describeBuiltInComponentFrame('SuspenseList');
case FunctionComponent:
case IndeterminateComponent:
case SimpleMemoComponent:
return describeFunctionComponentFrame(fiber.type);
case ForwardRef:
return describeFunctionComponentFrame(fiber.type.render);
case ClassComponent:
return describeClassComponentFrame(fiber.type);
default:
return '';
}
}
function getStackByFiberInDevAndProd(workInProgress) {
try {
var info = '';
var node = workInProgress;
do {
info += describeFiber(node);
node = node.return;
} while (node);
return info;
} catch (x) {
return '\nError generating stack: ' + x.message + '\n' + x.stack;
}
}
function getWrappedName(outerType, innerType, wrapperName) {
var displayName = outerType.displayName;
if (displayName) {
return displayName;
}
var functionName = innerType.displayName || innerType.name || '';
return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
} // Keep in sync with react-reconciler/getComponentNameFromFiber
function getContextName(type) {
return type.displayName || 'Context';
} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
function getComponentNameFromType(type) {
if (type == null) {
// Host root, text node or just invalid type.
return null;
}
{
if (typeof type.tag === 'number') {
error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
}
}
if (typeof type === 'function') {
return type.displayName || type.name || null;
}
if (typeof type === 'string') {
return type;
}
switch (type) {
case REACT_FRAGMENT_TYPE:
return 'Fragment';
case REACT_PORTAL_TYPE:
return 'Portal';
case REACT_PROFILER_TYPE:
return 'Profiler';
case REACT_STRICT_MODE_TYPE:
return 'StrictMode';
case REACT_SUSPENSE_TYPE:
return 'Suspense';
case REACT_SUSPENSE_LIST_TYPE:
return 'SuspenseList';
}
if (typeof type === 'object') {
switch (type.$$typeof) {
case REACT_CONTEXT_TYPE:
var context = type;
return getContextName(context) + '.Consumer';
case REACT_PROVIDER_TYPE:
var provider = type;
return getContextName(provider._context) + '.Provider';
case REACT_FORWARD_REF_TYPE:
return getWrappedName(type, type.render, 'ForwardRef');
case REACT_MEMO_TYPE:
var outerName = type.displayName || null;
if (outerName !== null) {
return outerName;
}
return getComponentNameFromType(type.type) || 'Memo';
case REACT_LAZY_TYPE:
{
var lazyComponent = type;
var payload = lazyComponent._payload;
var init = lazyComponent._init;
try {
return getComponentNameFromType(init(payload));
} catch (x) {
return null;
}
}
// eslint-disable-next-line no-fallthrough
}
}
return null;
}
function getWrappedName$1(outerType, innerType, wrapperName) {
var functionName = innerType.displayName || innerType.name || '';
return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
} // Keep in sync with shared/getComponentNameFromType
function getContextName$1(type) {
return type.displayName || 'Context';
}
function getComponentNameFromFiber(fiber) {
var tag = fiber.tag,
type = fiber.type;
switch (tag) {
case CacheComponent:
return 'Cache';
case ContextConsumer:
var context = type;
return getContextName$1(context) + '.Consumer';
case ContextProvider:
var provider = type;
return getContextName$1(provider._context) + '.Provider';
case DehydratedFragment:
return 'DehydratedFragment';
case ForwardRef:
return getWrappedName$1(type, type.render, 'ForwardRef');
case Fragment:
return 'Fragment';
case HostComponent:
// Host component type is the display name (e.g. "div", "View")
return type;
case HostPortal:
return 'Portal';
case HostRoot:
return 'Root';
case HostText:
return 'Text';
case LazyComponent:
// Name comes from the type in this case; we don't have a tag.
return getComponentNameFromType(type);
case Mode:
if (type === REACT_STRICT_MODE_TYPE) {
// Don't be less specific than shared/getComponentNameFromType
return 'StrictMode';
}
return 'Mode';
case OffscreenComponent:
return 'Offscreen';
case Profiler:
return 'Profiler';
case ScopeComponent:
return 'Scope';
case SuspenseComponent:
return 'Suspense';
case SuspenseListComponent:
return 'SuspenseList';
case TracingMarkerComponent:
return 'TracingMarker';
// The display name for this tags come from the user-provided type:
case ClassComponent:
case FunctionComponent:
case IncompleteClassComponent:
case IndeterminateComponent:
case MemoComponent:
case SimpleMemoComponent:
if (typeof type === 'function') {
return type.displayName || type.name || null;
}
if (typeof type === 'string') {
return type;
}
break;
}
return null;
}
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
var current = null;
var isRendering = false;
function getCurrentFiberOwnerNameInDevOrNull() {
{
if (current === null) {
return null;
}
var owner = current._debugOwner;
if (owner !== null && typeof owner !== 'undefined') {
return getComponentNameFromFiber(owner);
}
}
return null;
}
function getCurrentFiberStackInDev() {
{
if (current === null) {
return '';
} // Safe because if current fiber exists, we are reconciling,
// and it is guaranteed to be the work-in-progress version.
return getStackByFiberInDevAndProd(current);
}
}
function resetCurrentFiber() {
{
ReactDebugCurrentFrame.getCurrentStack = null;
current = null;
isRendering = false;
}
}
function setCurrentFiber(fiber) {
{
ReactDebugCurrentFrame.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev;
current = fiber;
isRendering = false;
}
}
function getCurrentFiber() {
{
return current;
}
}
function setIsRendering(rendering) {
{
isRendering = rendering;
}
}
// Flow does not allow string concatenation of most non-string types. To work
// around this limitation, we use an opaque type that can only be obtained by
// passing the value through getToStringValue first.
function toString(value) {
// The coercion safety check is performed in getToStringValue().
// eslint-disable-next-line react-internal/safe-string-coercion
return '' + value;
}
function getToStringValue(value) {
switch (typeof value) {
case 'boolean':
case 'number':
case 'string':
case 'undefined':
return value;
case 'object':
{
checkFormFieldValueStringCoercion(value);
}
return value;
default:
// function, symbol are assigned as empty strings
return '';
}
}
var hasReadOnlyValue = {
button: true,
checkbox: true,
image: true,
hidden: true,
radio: true,
reset: true,
submit: true
};
function checkControlledValueProps(tagName, props) {
{
if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
}
if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
}
}
}
function isCheckable(elem) {
var type = elem.type;
var nodeName = elem.nodeName;
return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
}
function getTracker(node) {
return node._valueTracker;
}
function detachTracker(node) {
node._valueTracker = null;
}
function getValueFromNode(node) {
var value = '';
if (!node) {
return value;
}
if (isCheckable(node)) {
value = node.checked ? 'true' : 'false';
} else {
value = node.value;
}
return value;
}
function trackValueOnNode(node) {
var valueField = isCheckable(node) ? 'checked' : 'value';
var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
{
checkFormFieldValueStringCoercion(node[valueField]);
}
var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail
// and don't track value will cause over reporting of changes,
// but it's better then a hard failure
// (needed for certain tests that spyOn input values and Safari)
if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
return;
}
var get = descriptor.get,
set = descriptor.set;
Object.defineProperty(node, valueField, {
configurable: true,
get: function () {
return get.call(this);
},
set: function (value) {
{
checkFormFieldValueStringCoercion(value);
}
currentValue = '' + value;
set.call(this, value);
}
}); // We could've passed this the first time
// but it triggers a bug in IE11 and Edge 14/15.
// Calling defineProperty() again should be equivalent.
// https://github.com/facebook/react/issues/11768
Object.defineProperty(node, valueField, {
enumerable: descriptor.enumerable
});
var tracker = {
getValue: function () {
return currentValue;
},
setValue: function (value) {
{
checkFormFieldValueStringCoercion(value);
}
currentValue = '' + value;
},
stopTracking: function () {
detachTracker(node);
delete node[valueField];
}
};
return tracker;
}
function track(node) {
if (getTracker(node)) {
return;
} // TODO: Once it's just Fiber we can move this to node._wrapperState
node._valueTracker = trackValueOnNode(node);
}
function updateValueIfChanged(node) {
if (!node) {
return false;
}
var tracker = getTracker(node); // if there is no tracker at this point it's unlikely
// that trying again will succeed
if (!tracker) {
return true;
}
var lastValue = tracker.getValue();
var nextValue = getValueFromNode(node);
if (nextValue !== lastValue) {
tracker.setValue(nextValue);
return true;
}
return false;
}
function getActiveElement(doc) {
doc = doc || (typeof document !== 'undefined' ? document : undefined);
if (typeof doc === 'undefined') {
return null;
}
try {
return doc.activeElement || doc.body;
} catch (e) {
return doc.body;
}
}
var didWarnValueDefaultValue = false;
var didWarnCheckedDefaultChecked = false;
var didWarnControlledToUncontrolled = false;
var didWarnUncontrolledToControlled = false;
function isControlled(props) {
var usesChecked = props.type === 'checkbox' || props.type === 'radio';
return usesChecked ? props.checked != null : props.value != null;
}
/**
* Implements an <input> host component that allows setting these optional
* props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
*
* If `checked` or `value` are not supplied (or null/undefined), user actions
* that affect the checked state or value will trigger updates to the element.
*
* If they are supplied (and not null/undefined), the rendered element will not
* trigger updates to the element. Instead, the props must change in order for
* the rendered element to be updated.
*
* The rendered element will be initialized as unchecked (or `defaultChecked`)
* with an empty value (or `defaultValue`).
*
* See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
*/
function getHostProps(element, props) {
var node = element;
var checked = props.checked;
var hostProps = assign({}, props, {
defaultChecked: undefined,
defaultValue: undefined,
value: undefined,
checked: checked != null ? checked : node._wrapperState.initialChecked
});
return hostProps;
}
function initWrapperState(element, props) {
{
checkControlledValueProps('input', props);
if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
didWarnCheckedDefaultChecked = true;
}
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
didWarnValueDefaultValue = true;
}
}
var node = element;
var defaultValue = props.defaultValue == null ? '' : props.defaultValue;
node._wrapperState = {
initialChecked: props.checked != null ? props.checked : props.defaultChecked,
initialValue: getToStringValue(props.value != null ? props.value : defaultValue),
controlled: isControlled(props)
};
}
function updateChecked(element, props) {
var node = element;
var checked = props.checked;
if (checked != null) {
setValueForProperty(node, 'checked', checked, false);
}
}
function updateWrapper(element, props) {
var node = element;
{
var controlled = isControlled(props);
if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');
didWarnUncontrolledToControlled = true;
}
if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');
didWarnControlledToUncontrolled = true;
}
}
updateChecked(element, props);
var value = getToStringValue(props.value);
var type = props.type;
if (value != null) {
if (type === 'number') {
if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.
// eslint-disable-next-line
node.value != value) {
node.value = toString(value);
}
} else if (node.value !== toString(value)) {
node.value = toString(value);
}
} else if (type === 'submit' || type === 'reset') {
// Submit/reset inputs need the attribute removed completely to avoid
// blank-text buttons.
node.removeAttribute('value');
return;
}
{
// When syncing the value attribute, the value comes from a cascade of
// properties:
// 1. The value React property
// 2. The defaultValue React property
// 3. Otherwise there should be no change
if (props.hasOwnProperty('value')) {
setDefaultValue(node, props.type, value);
} else if (props.hasOwnProperty('defaultValue')) {
setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
}
}
{
// When syncing the checked attribute, it only changes when it needs
// to be removed, such as transitioning from a checkbox into a text input
if (props.checked == null && props.defaultChecked != null) {
node.defaultChecked = !!props.defaultChecked;
}
}
}
function postMountWrapper(element, props, isHydrating) {
var node = element; // Do not assign value if it is already set. This prevents user text input
// from being lost during SSR hydration.
if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {
var type = props.type;
var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the
// default value provided by the browser. See: #12872
if (isButton && (props.value === undefined || props.value === null)) {
return;
}
var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input
// from being lost during SSR hydration.
if (!isHydrating) {
{
// When syncing the value attribute, the value property should use
// the wrapperState._initialValue property. This uses:
//
// 1. The value React property when present
// 2. The defaultValue React property when present
// 3. An empty string
if (initialValue !== node.value) {
node.value = initialValue;
}
}
}
{
// Otherwise, the value attribute is synchronized to the property,
// so we assign defaultValue to the same thing as the value property
// assignment step above.
node.defaultValue = initialValue;
}
} // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
// this is needed to work around a chrome bug where setting defaultChecked
// will sometimes influence the value of checked (even after detachment).
// Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
// We need to temporarily unset name to avoid disrupting radio button groups.
var name = node.name;
if (name !== '') {
node.name = '';
}
{
// When syncing the checked attribute, both the checked property and
// attribute are assigned at the same time using defaultChecked. This uses:
//
// 1. The checked React property when present
// 2. The defaultChecked React property when present
// 3. Otherwise, false
node.defaultChecked = !node.defaultChecked;
node.defaultChecked = !!node._wrapperState.initialChecked;
}
if (name !== '') {
node.name = name;
}
}
function restoreControlledState(element, props) {
var node = element;
updateWrapper(node, props);
updateNamedCousins(node, props);
}
function updateNamedCousins(rootNode, props) {
var name = props.name;
if (props.type === 'radio' && name != null) {
var queryRoot = rootNode;
while (queryRoot.parentNode) {
queryRoot = queryRoot.parentNode;
} // If `rootNode.form` was non-null, then we could try `form.elements`,
// but that sometimes behaves strangely in IE8. We could also try using
// `form.getElementsByName`, but that will only return direct children
// and won't include inputs that use the HTML5 `form=` attribute. Since
// the input might not even be in a form. It might not even be in the
// document. Let's just use the local `querySelectorAll` to ensure we don't
// miss anything.
{
checkAttributeStringCoercion(name, 'name');
}
var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
for (var i = 0; i < group.length; i++) {
var otherNode = group[i];
if (otherNode === rootNode || otherNode.form !== rootNode.form) {
continue;
} // This will throw if radio buttons rendered by different copies of React
// and the same name are rendered into the same form (same as #1939).
// That's probably okay; we don't support it just as we don't support
// mixing React radio buttons with non-React ones.
var otherProps = getFiberCurrentPropsFromNode(otherNode);
if (!otherProps) {
throw new Error('ReactDOMInput: Mixing React and non-React radio inputs with the ' + 'same `name` is not supported.');
} // We need update the tracked value on the named cousin since the value
// was changed but the input saw no event or value set
updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that
// was previously checked to update will cause it to be come re-checked
// as appropriate.
updateWrapper(otherNode, otherProps);
}
}
} // In Chrome, assigning defaultValue to certain input types triggers input validation.
// For number inputs, the display value loses trailing decimal points. For email inputs,
// Chrome raises "The specified value <x> is not a valid email address".
//
// Here we check to see if the defaultValue has actually changed, avoiding these problems
// when the user is inputting text
//
// https://github.com/facebook/react/issues/7253
function setDefaultValue(node, type, value) {
if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js
type !== 'number' || getActiveElement(node.ownerDocument) !== node) {
if (value == null) {
node.defaultValue = toString(node._wrapperState.initialValue);
} else if (node.defaultValue !== toString(value)) {
node.defaultValue = toString(value);
}
}
}
var didWarnSelectedSetOnOption = false;
var didWarnInvalidChild = false;
var didWarnInvalidInnerHTML = false;
/**
* Implements an <option> host component that warns when `selected` is set.
*/
function validateProps(element, props) {
{
// If a value is not provided, then the children must be simple.
if (props.value == null) {
if (typeof props.children === 'object' && props.children !== null) {
React.Children.forEach(props.children, function (child) {
if (child == null) {
return;
}
if (typeof child === 'string' || typeof child === 'number') {
return;
}
if (!didWarnInvalidChild) {
didWarnInvalidChild = true;
error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.');
}
});
} else if (props.dangerouslySetInnerHTML != null) {
if (!didWarnInvalidInnerHTML) {
didWarnInvalidInnerHTML = true;
error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.');
}
}
} // TODO: Remove support for `selected` in <option>.
if (props.selected != null && !didWarnSelectedSetOnOption) {
error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
didWarnSelectedSetOnOption = true;
}
}
}
function postMountWrapper$1(element, props) {
// value="" should make a value attribute (#6219)
if (props.value != null) {
element.setAttribute('value', toString(getToStringValue(props.value)));
}
}
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
function isArray(a) {
return isArrayImpl(a);
}
var didWarnValueDefaultValue$1;
{
didWarnValueDefaultValue$1 = false;
}
function getDeclarationErrorAddendum() {
var ownerName = getCurrentFiberOwnerNameInDevOrNull();
if (ownerName) {
return '\n\nCheck the render method of `' + ownerName + '`.';
}
return '';
}
var valuePropNames = ['value', 'defaultValue'];
/**
* Validation function for `value` and `defaultValue`.
*/
function checkSelectPropTypes(props) {
{
checkControlledValueProps('select', props);
for (var i = 0; i < valuePropNames.length; i++) {
var propName = valuePropNames[i];
if (props[propName] == null) {
continue;
}
var propNameIsArray = isArray(props[propName]);
if (props.multiple && !propNameIsArray) {
error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
} else if (!props.multiple && propNameIsArray) {
error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
}
}
}
}
function updateOptions(node, multiple, propValue, setDefaultSelected) {
var options = node.options;
if (multiple) {
var selectedValues = propValue;
var selectedValue = {};
for (var i = 0; i < selectedValues.length; i++) {
// Prefix to avoid chaos with special keys.
selectedValue['$' + selectedValues[i]] = true;
}
for (var _i = 0; _i < options.length; _i++) {
var selected = selectedValue.hasOwnProperty('$' + options[_i].value);
if (options[_i].selected !== selected) {
options[_i].selected = selected;
}
if (selected && setDefaultSelected) {
options[_i].defaultSelected = true;
}
}
} else {
// Do not set `select.value` as exact behavior isn't consistent across all
// browsers for all cases.
var _selectedValue = toString(getToStringValue(propValue));
var defaultSelected = null;
for (var _i2 = 0; _i2 < options.length; _i2++) {
if (options[_i2].value === _selectedValue) {
options[_i2].selected = true;
if (setDefaultSelected) {
options[_i2].defaultSelected = true;
}
return;
}
if (defaultSelected === null && !options[_i2].disabled) {
defaultSelected = options[_i2];
}
}
if (defaultSelected !== null) {
defaultSelected.selected = true;
}
}
}
/**
* Implements a <select> host component that allows optionally setting the
* props `value` and `defaultValue`. If `multiple` is false, the prop must be a
* stringable. If `multiple` is true, the prop must be an array of stringables.
*
* If `value` is not supplied (or null/undefined), user actions that change the
* selected option will trigger updates to the rendered options.
*
* If it is supplied (and not null/undefined), the rendered options will not
* update in response to user actions. Instead, the `value` prop must change in
* order for the rendered options to update.
*
* If `defaultValue` is provided, any options with the supplied values will be
* selected.
*/
function getHostProps$1(element, props) {
return assign({}, props, {
value: undefined
});
}
function initWrapperState$1(element, props) {
var node = element;
{
checkSelectPropTypes(props);
}
node._wrapperState = {
wasMultiple: !!props.multiple
};
{
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {
error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');
didWarnValueDefaultValue$1 = true;
}
}
}
function postMountWrapper$2(element, props) {
var node = element;
node.multiple = !!props.multiple;
var value = props.value;
if (value != null) {
updateOptions(node, !!props.multiple, value, false);
} else if (props.defaultValue != null) {
updateOptions(node, !!props.multiple, props.defaultValue, true);
}
}
function postUpdateWrapper(element, props) {
var node = element;
var wasMultiple = node._wrapperState.wasMultiple;
node._wrapperState.wasMultiple = !!props.multiple;
var value = props.value;
if (value != null) {
updateOptions(node, !!props.multiple, value, false);
} else if (wasMultiple !== !!props.multiple) {
// For simplicity, reapply `defaultValue` if `multiple` is toggled.
if (props.defaultValue != null) {
updateOptions(node, !!props.multiple, props.defaultValue, true);
} else {
// Revert the select back to its default unselected state.
updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);
}
}
}
function restoreControlledState$1(element, props) {
var node = element;
var value = props.value;
if (value != null) {
updateOptions(node, !!props.multiple, value, false);
}
}
var didWarnValDefaultVal = false;
/**
* Implements a <textarea> host component that allows setting `value`, and
* `defaultValue`. This differs from the traditional DOM API because value is
* usually set as PCDATA children.
*
* If `value` is not supplied (or null/undefined), user actions that affect the
* value will trigger updates to the element.
*
* If `value` is supplied (and not null/undefined), the rendered element will
* not trigger updates to the element. Instead, the `value` prop must change in
* order for the rendered element to be updated.
*
* The rendered element will be initialized with an empty value, the prop
* `defaultValue` if specified, or the children content (deprecated).
*/
function getHostProps$2(element, props) {
var node = element;
if (props.dangerouslySetInnerHTML != null) {
throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');
} // Always set children to the same thing. In IE9, the selection range will
// get reset if `textContent` is mutated. We could add a check in setTextContent
// to only set the value if/when the value differs from the node value (which would
// completely solve this IE9 bug), but Sebastian+Sophie seemed to like this
// solution. The value can be a boolean or object so that's why it's forced
// to be a string.
var hostProps = assign({}, props, {
value: undefined,
defaultValue: undefined,
children: toString(node._wrapperState.initialValue)
});
return hostProps;
}
function initWrapperState$2(element, props) {
var node = element;
{
checkControlledValueProps('textarea', props);
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
didWarnValDefaultVal = true;
}
}
var initialValue = props.value; // Only bother fetching default value if we're going to use it
if (initialValue == null) {
var children = props.children,
defaultValue = props.defaultValue;
if (children != null) {
{
error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
}
{
if (defaultValue != null) {
throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.');
}
if (isArray(children)) {
if (children.length > 1) {
throw new Error('<textarea> can only have at most one child.');
}
children = children[0];
}
defaultValue = children;
}
}
if (defaultValue == null) {
defaultValue = '';
}
initialValue = defaultValue;
}
node._wrapperState = {
initialValue: getToStringValue(initialValue)
};
}
function updateWrapper$1(element, props) {
var node = element;
var value = getToStringValue(props.value);
var defaultValue = getToStringValue(props.defaultValue);
if (value != null) {
// Cast `value` to a string to ensure the value is set correctly. While
// browsers typically do this as necessary, jsdom doesn't.
var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed
if (newValue !== node.value) {
node.value = newValue;
}
if (props.defaultValue == null && node.defaultValue !== newValue) {
node.defaultValue = newValue;
}
}
if (defaultValue != null) {
node.defaultValue = toString(defaultValue);
}
}
function postMountWrapper$3(element, props) {
var node = element; // This is in postMount because we need access to the DOM node, which is not
// available until after the component has mounted.
var textContent = node.textContent; // Only set node.value if textContent is equal to the expected
// initial value. In IE10/IE11 there is a bug where the placeholder attribute
// will populate textContent as well.
// https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
if (textContent === node._wrapperState.initialValue) {
if (textContent !== '' && textContent !== null) {
node.value = textContent;
}
}
}
function restoreControlledState$2(element, props) {
// DOM component is still mounted; update
updateWrapper$1(element, props);
}
var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; // Assumes there is no parent namespace.
function getIntrinsicNamespace(type) {
switch (type) {
case 'svg':
return SVG_NAMESPACE;
case 'math':
return MATH_NAMESPACE;
default:
return HTML_NAMESPACE;
}
}
function getChildNamespace(parentNamespace, type) {
if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
// No (or default) parent namespace: potential entry point.
return getIntrinsicNamespace(type);
}
if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
// We're leaving SVG.
return HTML_NAMESPACE;
} // By default, pass namespace below.
return parentNamespace;
}
/* globals MSApp */
/**
* Create a function which has 'unsafe' privileges (required by windows8 apps)
*/
var createMicrosoftUnsafeLocalFunction = function (func) {
if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
return function (arg0, arg1, arg2, arg3) {
MSApp.execUnsafeLocalFunction(function () {
return func(arg0, arg1, arg2, arg3);
});
};
} else {
return func;
}
};
var reusableSVGContainer;
/**
* Set the innerHTML property of a node
*
* @param {DOMElement} node
* @param {string} html
* @internal
*/
var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
if (node.namespaceURI === SVG_NAMESPACE) {
if (!('innerHTML' in node)) {
// IE does not have innerHTML for SVG nodes, so instead we inject the
// new markup in a temp node and then move the child nodes across into
// the target node
reusableSVGContainer = reusableSVGContainer || document.createElement('div');
reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';
var svgNode = reusableSVGContainer.firstChild;
while (node.firstChild) {
node.removeChild(node.firstChild);
}
while (svgNode.firstChild) {
node.appendChild(svgNode.firstChild);
}
return;
}
}
node.innerHTML = html;
});
/**
* HTML nodeType values that represent the type of the node
*/
var ELEMENT_NODE = 1;
var TEXT_NODE = 3;
var COMMENT_NODE = 8;
var DOCUMENT_NODE = 9;
var DOCUMENT_FRAGMENT_NODE = 11;
/**
* Set the textContent property of a node. For text updates, it's faster
* to set the `nodeValue` of the Text node directly instead of using
* `.textContent` which will remove the existing node and create a new one.
*
* @param {DOMElement} node
* @param {string} text
* @internal
*/
var setTextContent = function (node, text) {
if (text) {
var firstChild = node.firstChild;
if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
firstChild.nodeValue = text;
return;
}
}
node.textContent = text;
};
// List derived from Gecko source code:
// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js
var shorthandToLonghand = {
animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],
background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],
backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],
border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],
borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],
borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],
borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],
borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],
borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],
borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],
borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],
borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],
borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],
borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],
borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],
borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],
borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],
columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],
columns: ['columnCount', 'columnWidth'],
flex: ['flexBasis', 'flexGrow', 'flexShrink'],
flexFlow: ['flexDirection', 'flexWrap'],
font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],
fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],
gap: ['columnGap', 'rowGap'],
grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],
gridColumn: ['gridColumnEnd', 'gridColumnStart'],
gridColumnGap: ['columnGap'],
gridGap: ['columnGap', 'rowGap'],
gridRow: ['gridRowEnd', 'gridRowStart'],
gridRowGap: ['rowGap'],
gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],
margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],
marker: ['markerEnd', 'markerMid', 'markerStart'],
mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],
maskPosition: ['maskPositionX', 'maskPositionY'],
outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],
overflow: ['overflowX', 'overflowY'],
padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],
placeContent: ['alignContent', 'justifyContent'],
placeItems: ['alignItems', 'justifyItems'],
placeSelf: ['alignSelf', 'justifySelf'],
textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],
textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],
transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],
wordWrap: ['overflowWrap']
};
/**
* CSS properties which accept numbers but are not in units of "px".
*/
var isUnitlessNumber = {
animationIterationCount: true,
aspectRatio: true,
borderImageOutset: true,
borderImageSlice: true,
borderImageWidth: true,
boxFlex: true,
boxFlexGroup: true,
boxOrdinalGroup: true,
columnCount: true,
columns: true,
flex: true,
flexGrow: true,
flexPositive: true,
flexShrink: true,
flexNegative: true,
flexOrder: true,
gridArea: true,
gridRow: true,
gridRowEnd: true,
gridRowSpan: true,
gridRowStart: true,
gridColumn: true,
gridColumnEnd: true,
gridColumnSpan: true,
gridColumnStart: true,
fontWeight: true,
lineClamp: true,
lineHeight: true,
opacity: true,
order: true,
orphans: true,
tabSize: true,
widows: true,
zIndex: true,
zoom: true,
// SVG-related properties
fillOpacity: true,
floodOpacity: true,
stopOpacity: true,
strokeDasharray: true,
strokeDashoffset: true,
strokeMiterlimit: true,
strokeOpacity: true,
strokeWidth: true
};
/**
* @param {string} prefix vendor-specific prefix, eg: Webkit
* @param {string} key style name, eg: transitionDuration
* @return {string} style name prefixed with `prefix`, properly camelCased, eg:
* WebkitTransitionDuration
*/
function prefixKey(prefix, key) {
return prefix + key.charAt(0).toUpperCase() + key.substring(1);
}
/**
* Support style names that may come passed in prefixed by adding permutations
* of vendor prefixes.
*/
var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
// infinite loop, because it iterates over the newly added props too.
Object.keys(isUnitlessNumber).forEach(function (prop) {
prefixes.forEach(function (prefix) {
isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
});
});
/**
* Convert a value into the proper css writable value. The style name `name`
* should be logical (no hyphens), as specified
* in `CSSProperty.isUnitlessNumber`.
*
* @param {string} name CSS property name such as `topMargin`.
* @param {*} value CSS property value such as `10px`.
* @return {string} Normalized style value with dimensions applied.
*/
function dangerousStyleValue(name, value, isCustomProperty) {
// Note that we've removed escapeTextForBrowser() calls here since the
// whole string will be escaped when the attribute is injected into
// the markup. If you provide unsafe user data here they can inject
// arbitrary CSS which may be problematic (I couldn't repro this):
// https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
// http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
// This is not an XSS hole but instead a potential CSS injection issue
// which has lead to a greater discussion about how we're going to
// trust URLs moving forward. See #2115901
var isEmpty = value == null || typeof value === 'boolean' || value === '';
if (isEmpty) {
return '';
}
if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
}
{
checkCSSPropertyStringCoercion(value, name);
}
return ('' + value).trim();
}
var uppercasePattern = /([A-Z])/g;
var msPattern = /^ms-/;
/**
* Hyphenates a camelcased CSS property name, for example:
*
* > hyphenateStyleName('backgroundColor')
* < "background-color"
* > hyphenateStyleName('MozTransition')
* < "-moz-transition"
* > hyphenateStyleName('msTransition')
* < "-ms-transition"
*
* As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
* is converted to `-ms-`.
*/
function hyphenateStyleName(name) {
return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
}
var warnValidStyle = function () {};
{
// 'msTransform' is correct, but the other prefixes should be capitalized
var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
var msPattern$1 = /^-ms-/;
var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon
var badStyleValueWithSemicolonPattern = /;\s*$/;
var warnedStyleNames = {};
var warnedStyleValues = {};
var warnedForNaNValue = false;
var warnedForInfinityValue = false;
var camelize = function (string) {
return string.replace(hyphenPattern, function (_, character) {
return character.toUpperCase();
});
};
var warnHyphenatedStyleName = function (name) {
if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
return;
}
warnedStyleNames[name] = true;
error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
// (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
// is converted to lowercase `ms`.
camelize(name.replace(msPattern$1, 'ms-')));
};
var warnBadVendoredStyleName = function (name) {
if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
return;
}
warnedStyleNames[name] = true;
error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
};
var warnStyleValueWithSemicolon = function (name, value) {
if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
return;
}
warnedStyleValues[value] = true;
error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
};
var warnStyleValueIsNaN = function (name, value) {
if (warnedForNaNValue) {
return;
}
warnedForNaNValue = true;
error('`NaN` is an invalid value for the `%s` css style property.', name);
};
var warnStyleValueIsInfinity = function (name, value) {
if (warnedForInfinityValue) {
return;
}
warnedForInfinityValue = true;
error('`Infinity` is an invalid value for the `%s` css style property.', name);
};
warnValidStyle = function (name, value) {
if (name.indexOf('-') > -1) {
warnHyphenatedStyleName(name);
} else if (badVendoredStyleNamePattern.test(name)) {
warnBadVendoredStyleName(name);
} else if (badStyleValueWithSemicolonPattern.test(value)) {
warnStyleValueWithSemicolon(name, value);
}
if (typeof value === 'number') {
if (isNaN(value)) {
warnStyleValueIsNaN(name, value);
} else if (!isFinite(value)) {
warnStyleValueIsInfinity(name, value);
}
}
};
}
var warnValidStyle$1 = warnValidStyle;
/**
* Operations for dealing with CSS properties.
*/
/**
* This creates a string that is expected to be equivalent to the style
* attribute generated by server-side rendering. It by-passes warnings and
* security checks so it's not safe to use this value for anything other than
* comparison. It is only used in DEV for SSR validation.
*/
function createDangerousStringForStyles(styles) {
{
var serialized = '';
var delimiter = '';
for (var styleName in styles) {
if (!styles.hasOwnProperty(styleName)) {
continue;
}
var styleValue = styles[styleName];
if (styleValue != null) {
var isCustomProperty = styleName.indexOf('--') === 0;
serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';
serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
delimiter = ';';
}
}
return serialized || null;
}
}
/**
* Sets the value for multiple styles on a node. If a value is specified as
* '' (empty string), the corresponding style property will be unset.
*
* @param {DOMElement} node
* @param {object} styles
*/
function setValueForStyles(node, styles) {
var style = node.style;
for (var styleName in styles) {
if (!styles.hasOwnProperty(styleName)) {
continue;
}
var isCustomProperty = styleName.indexOf('--') === 0;
{
if (!isCustomProperty) {
warnValidStyle$1(styleName, styles[styleName]);
}
}
var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);
if (styleName === 'float') {
styleName = 'cssFloat';
}
if (isCustomProperty) {
style.setProperty(styleName, styleValue);
} else {
style[styleName] = styleValue;
}
}
}
function isValueEmpty(value) {
return value == null || typeof value === 'boolean' || value === '';
}
/**
* Given {color: 'red', overflow: 'hidden'} returns {
* color: 'color',
* overflowX: 'overflow',
* overflowY: 'overflow',
* }. This can be read as "the overflowY property was set by the overflow
* shorthand". That is, the values are the property that each was derived from.
*/
function expandShorthandMap(styles) {
var expanded = {};
for (var key in styles) {
var longhands = shorthandToLonghand[key] || [key];
for (var i = 0; i < longhands.length; i++) {
expanded[longhands[i]] = key;
}
}
return expanded;
}
/**
* When mixing shorthand and longhand property names, we warn during updates if
* we expect an incorrect result to occur. In particular, we warn for:
*
* Updating a shorthand property (longhand gets overwritten):
* {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
* becomes .style.font = 'baz'
* Removing a shorthand property (longhand gets lost too):
* {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}
* becomes .style.font = ''
* Removing a longhand property (should revert to shorthand; doesn't):
* {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}
* becomes .style.fontVariant = ''
*/
function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {
{
if (!nextStyles) {
return;
}
var expandedUpdates = expandShorthandMap(styleUpdates);
var expandedStyles = expandShorthandMap(nextStyles);
var warnedAbout = {};
for (var key in expandedUpdates) {
var originalKey = expandedUpdates[key];
var correctOriginalKey = expandedStyles[key];
if (correctOriginalKey && originalKey !== correctOriginalKey) {
var warningKey = originalKey + ',' + correctOriginalKey;
if (warnedAbout[warningKey]) {
continue;
}
warnedAbout[warningKey] = true;
error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + "avoid this, don't mix shorthand and non-shorthand properties " + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);
}
}
}
}
// For HTML, certain tags should omit their close tag. We keep a list for
// those special-case tags.
var omittedCloseTags = {
area: true,
base: true,
br: true,
col: true,
embed: true,
hr: true,
img: true,
input: true,
keygen: true,
link: true,
meta: true,
param: true,
source: true,
track: true,
wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.
};
// `omittedCloseTags` except that `menuitem` should still have its closing tag.
var voidElementTags = assign({
menuitem: true
}, omittedCloseTags);
var HTML = '__html';
function assertValidProps(tag, props) {
if (!props) {
return;
} // Note the use of `==` which checks for null or undefined.
if (voidElementTags[tag]) {
if (props.children != null || props.dangerouslySetInnerHTML != null) {
throw new Error(tag + " is a void element tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.');
}
}
if (props.dangerouslySetInnerHTML != null) {
if (props.children != null) {
throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');
}
if (typeof props.dangerouslySetInnerHTML !== 'object' || !(HTML in props.dangerouslySetInnerHTML)) {
throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.');
}
}
{
if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');
}
}
if (props.style != null && typeof props.style !== 'object') {
throw new Error('The `style` prop expects a mapping from style properties to values, ' + "not a string. For example, style={{marginRight: spacing + 'em'}} when " + 'using JSX.');
}
}
function isCustomComponent(tagName, props) {
if (tagName.indexOf('-') === -1) {
return typeof props.is === 'string';
}
switch (tagName) {
// These are reserved SVG and MathML elements.
// We don't mind this list too much because we expect it to never grow.
// The alternative is to track the namespace in a few places which is convoluted.
// https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
case 'annotation-xml':
case 'color-profile':
case 'font-face':
case 'font-face-src':
case 'font-face-uri':
case 'font-face-format':
case 'font-face-name':
case 'missing-glyph':
return false;
default:
return true;
}
}
// When adding attributes to the HTML or SVG allowed attribute list, be sure to
// also add them to this module to ensure casing and incorrect name
// warnings.
var possibleStandardNames = {
// HTML
accept: 'accept',
acceptcharset: 'acceptCharset',
'accept-charset': 'acceptCharset',
accesskey: 'accessKey',
action: 'action',
allowfullscreen: 'allowFullScreen',
alt: 'alt',
as: 'as',
async: 'async',
autocapitalize: 'autoCapitalize',
autocomplete: 'autoComplete',
autocorrect: 'autoCorrect',
autofocus: 'autoFocus',
autoplay: 'autoPlay',
autosave: 'autoSave',
capture: 'capture',
cellpadding: 'cellPadding',
cellspacing: 'cellSpacing',
challenge: 'challenge',
charset: 'charSet',
checked: 'checked',
children: 'children',
cite: 'cite',
class: 'className',
classid: 'classID',
classname: 'className',
cols: 'cols',
colspan: 'colSpan',
content: 'content',
contenteditable: 'contentEditable',
contextmenu: 'contextMenu',
controls: 'controls',
controlslist: 'controlsList',
coords: 'coords',
crossorigin: 'crossOrigin',
dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
data: 'data',
datetime: 'dateTime',
default: 'default',
defaultchecked: 'defaultChecked',
defaultvalue: 'defaultValue',
defer: 'defer',
dir: 'dir',
disabled: 'disabled',
disablepictureinpicture: 'disablePictureInPicture',
disableremoteplayback: 'disableRemotePlayback',
download: 'download',
draggable: 'draggable',
enctype: 'encType',
enterkeyhint: 'enterKeyHint',
for: 'htmlFor',
form: 'form',
formmethod: 'formMethod',
formaction: 'formAction',
formenctype: 'formEncType',
formnovalidate: 'formNoValidate',
formtarget: 'formTarget',
frameborder: 'frameBorder',
headers: 'headers',
height: 'height',
hidden: 'hidden',
high: 'high',
href: 'href',
hreflang: 'hrefLang',
htmlfor: 'htmlFor',
httpequiv: 'httpEquiv',
'http-equiv': 'httpEquiv',
icon: 'icon',
id: 'id',
imagesizes: 'imageSizes',
imagesrcset: 'imageSrcSet',
innerhtml: 'innerHTML',
inputmode: 'inputMode',
integrity: 'integrity',
is: 'is',
itemid: 'itemID',
itemprop: 'itemProp',
itemref: 'itemRef',
itemscope: 'itemScope',
itemtype: 'itemType',
keyparams: 'keyParams',
keytype: 'keyType',
kind: 'kind',
label: 'label',
lang: 'lang',
list: 'list',
loop: 'loop',
low: 'low',
manifest: 'manifest',
marginwidth: 'marginWidth',
marginheight: 'marginHeight',
max: 'max',
maxlength: 'maxLength',
media: 'media',
mediagroup: 'mediaGroup',
method: 'method',
min: 'min',
minlength: 'minLength',
multiple: 'multiple',
muted: 'muted',
name: 'name',
nomodule: 'noModule',
nonce: 'nonce',
novalidate: 'noValidate',
open: 'open',
optimum: 'optimum',
pattern: 'pattern',
placeholder: 'placeholder',
playsinline: 'playsInline',
poster: 'poster',
preload: 'preload',
profile: 'profile',
radiogroup: 'radioGroup',
readonly: 'readOnly',
referrerpolicy: 'referrerPolicy',
rel: 'rel',
required: 'required',
reversed: 'reversed',
role: 'role',
rows: 'rows',
rowspan: 'rowSpan',
sandbox: 'sandbox',
scope: 'scope',
scoped: 'scoped',
scrolling: 'scrolling',
seamless: 'seamless',
selected: 'selected',
shape: 'shape',
size: 'size',
sizes: 'sizes',
span: 'span',
spellcheck: 'spellCheck',
src: 'src',
srcdoc: 'srcDoc',
srclang: 'srcLang',
srcset: 'srcSet',
start: 'start',
step: 'step',
style: 'style',
summary: 'summary',
tabindex: 'tabIndex',
target: 'target',
title: 'title',
type: 'type',
usemap: 'useMap',
value: 'value',
width: 'width',
wmode: 'wmode',
wrap: 'wrap',
// SVG
about: 'about',
accentheight: 'accentHeight',
'accent-height': 'accentHeight',
accumulate: 'accumulate',
additive: 'additive',
alignmentbaseline: 'alignmentBaseline',
'alignment-baseline': 'alignmentBaseline',
allowreorder: 'allowReorder',
alphabetic: 'alphabetic',
amplitude: 'amplitude',
arabicform: 'arabicForm',
'arabic-form': 'arabicForm',
ascent: 'ascent',
attributename: 'attributeName',
attributetype: 'attributeType',
autoreverse: 'autoReverse',
azimuth: 'azimuth',
basefrequency: 'baseFrequency',
baselineshift: 'baselineShift',
'baseline-shift': 'baselineShift',
baseprofile: 'baseProfile',
bbox: 'bbox',
begin: 'begin',
bias: 'bias',
by: 'by',
calcmode: 'calcMode',
capheight: 'capHeight',
'cap-height': 'capHeight',
clip: 'clip',
clippath: 'clipPath',
'clip-path': 'clipPath',
clippathunits: 'clipPathUnits',
cliprule: 'clipRule',
'clip-rule': 'clipRule',
color: 'color',
colorinterpolation: 'colorInterpolation',
'color-interpolation': 'colorInterpolation',
colorinterpolationfilters: 'colorInterpolationFilters',
'color-interpolation-filters': 'colorInterpolationFilters',
colorprofile: 'colorProfile',
'color-profile': 'colorProfile',
colorrendering: 'colorRendering',
'color-rendering': 'colorRendering',
contentscripttype: 'contentScriptType',
contentstyletype: 'contentStyleType',
cursor: 'cursor',
cx: 'cx',
cy: 'cy',
d: 'd',
datatype: 'datatype',
decelerate: 'decelerate',
descent: 'descent',
diffuseconstant: 'diffuseConstant',
direction: 'direction',
display: 'display',
divisor: 'divisor',
dominantbaseline: 'dominantBaseline',
'dominant-baseline': 'dominantBaseline',
dur: 'dur',
dx: 'dx',
dy: 'dy',
edgemode: 'edgeMode',
elevation: 'elevation',
enablebackground: 'enableBackground',
'enable-background': 'enableBackground',
end: 'end',
exponent: 'exponent',
externalresourcesrequired: 'externalResourcesRequired',
fill: 'fill',
fillopacity: 'fillOpacity',
'fill-opacity': 'fillOpacity',
fillrule: 'fillRule',
'fill-rule': 'fillRule',
filter: 'filter',
filterres: 'filterRes',
filterunits: 'filterUnits',
floodopacity: 'floodOpacity',
'flood-opacity': 'floodOpacity',
floodcolor: 'floodColor',
'flood-color': 'floodColor',
focusable: 'focusable',
fontfamily: 'fontFamily',
'font-family': 'fontFamily',
fontsize: 'fontSize',
'font-size': 'fontSize',
fontsizeadjust: 'fontSizeAdjust',
'font-size-adjust': 'fontSizeAdjust',
fontstretch: 'fontStretch',
'font-stretch': 'fontStretch',
fontstyle: 'fontStyle',
'font-style': 'fontStyle',
fontvariant: 'fontVariant',
'font-variant': 'fontVariant',
fontweight: 'fontWeight',
'font-weight': 'fontWeight',
format: 'format',
from: 'from',
fx: 'fx',
fy: 'fy',
g1: 'g1',
g2: 'g2',
glyphname: 'glyphName',
'glyph-name': 'glyphName',
glyphorientationhorizontal: 'glyphOrientationHorizontal',
'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
glyphorientationvertical: 'glyphOrientationVertical',
'glyph-orientation-vertical': 'glyphOrientationVertical',
glyphref: 'glyphRef',
gradienttransform: 'gradientTransform',
gradientunits: 'gradientUnits',
hanging: 'hanging',
horizadvx: 'horizAdvX',
'horiz-adv-x': 'horizAdvX',
horizoriginx: 'horizOriginX',
'horiz-origin-x': 'horizOriginX',
ideographic: 'ideographic',
imagerendering: 'imageRendering',
'image-rendering': 'imageRendering',
in2: 'in2',
in: 'in',
inlist: 'inlist',
intercept: 'intercept',
k1: 'k1',
k2: 'k2',
k3: 'k3',
k4: 'k4',
k: 'k',
kernelmatrix: 'kernelMatrix',
kernelunitlength: 'kernelUnitLength',
kerning: 'kerning',
keypoints: 'keyPoints',
keysplines: 'keySplines',
keytimes: 'keyTimes',
lengthadjust: 'lengthAdjust',
letterspacing: 'letterSpacing',
'letter-spacing': 'letterSpacing',
lightingcolor: 'lightingColor',
'lighting-color': 'lightingColor',
limitingconeangle: 'limitingConeAngle',
local: 'local',
markerend: 'markerEnd',
'marker-end': 'markerEnd',
markerheight: 'markerHeight',
markermid: 'markerMid',
'marker-mid': 'markerMid',
markerstart: 'markerStart',
'marker-start': 'markerStart',
markerunits: 'markerUnits',
markerwidth: 'markerWidth',
mask: 'mask',
maskcontentunits: 'maskContentUnits',
maskunits: 'maskUnits',
mathematical: 'mathematical',
mode: 'mode',
numoctaves: 'numOctaves',
offset: 'offset',
opacity: 'opacity',
operator: 'operator',
order: 'order',
orient: 'orient',
orientation: 'orientation',
origin: 'origin',
overflow: 'overflow',
overlineposition: 'overlinePosition',
'overline-position': 'overlinePosition',
overlinethickness: 'overlineThickness',
'overline-thickness': 'overlineThickness',
paintorder: 'paintOrder',
'paint-order': 'paintOrder',
panose1: 'panose1',
'panose-1': 'panose1',
pathlength: 'pathLength',
patterncontentunits: 'patternContentUnits',
patterntransform: 'patternTransform',
patternunits: 'patternUnits',
pointerevents: 'pointerEvents',
'pointer-events': 'pointerEvents',
points: 'points',
pointsatx: 'pointsAtX',
pointsaty: 'pointsAtY',
pointsatz: 'pointsAtZ',
prefix: 'prefix',
preservealpha: 'preserveAlpha',
preserveaspectratio: 'preserveAspectRatio',
primitiveunits: 'primitiveUnits',
property: 'property',
r: 'r',
radius: 'radius',
refx: 'refX',
refy: 'refY',
renderingintent: 'renderingIntent',
'rendering-intent': 'renderingIntent',
repeatcount: 'repeatCount',
repeatdur: 'repeatDur',
requiredextensions: 'requiredExtensions',
requiredfeatures: 'requiredFeatures',
resource: 'resource',
restart: 'restart',
result: 'result',
results: 'results',
rotate: 'rotate',
rx: 'rx',
ry: 'ry',
scale: 'scale',
security: 'security',
seed: 'seed',
shaperendering: 'shapeRendering',
'shape-rendering': 'shapeRendering',
slope: 'slope',
spacing: 'spacing',
specularconstant: 'specularConstant',
specularexponent: 'specularExponent',
speed: 'speed',
spreadmethod: 'spreadMethod',
startoffset: 'startOffset',
stddeviation: 'stdDeviation',
stemh: 'stemh',
stemv: 'stemv',
stitchtiles: 'stitchTiles',
stopcolor: 'stopColor',
'stop-color': 'stopColor',
stopopacity: 'stopOpacity',
'stop-opacity': 'stopOpacity',
strikethroughposition: 'strikethroughPosition',
'strikethrough-position': 'strikethroughPosition',
strikethroughthickness: 'strikethroughThickness',
'strikethrough-thickness': 'strikethroughThickness',
string: 'string',
stroke: 'stroke',
strokedasharray: 'strokeDasharray',
'stroke-dasharray': 'strokeDasharray',
strokedashoffset: 'strokeDashoffset',
'stroke-dashoffset': 'strokeDashoffset',
strokelinecap: 'strokeLinecap',
'stroke-linecap': 'strokeLinecap',
strokelinejoin: 'strokeLinejoin',
'stroke-linejoin': 'strokeLinejoin',
strokemiterlimit: 'strokeMiterlimit',
'stroke-miterlimit': 'strokeMiterlimit',
strokewidth: 'strokeWidth',
'stroke-width': 'strokeWidth',
strokeopacity: 'strokeOpacity',
'stroke-opacity': 'strokeOpacity',
suppresscontenteditablewarning: 'suppressContentEditableWarning',
suppresshydrationwarning: 'suppressHydrationWarning',
surfacescale: 'surfaceScale',
systemlanguage: 'systemLanguage',
tablevalues: 'tableValues',
targetx: 'targetX',
targety: 'targetY',
textanchor: 'textAnchor',
'text-anchor': 'textAnchor',
textdecoration: 'textDecoration',
'text-decoration': 'textDecoration',
textlength: 'textLength',
textrendering: 'textRendering',
'text-rendering': 'textRendering',
to: 'to',
transform: 'transform',
typeof: 'typeof',
u1: 'u1',
u2: 'u2',
underlineposition: 'underlinePosition',
'underline-position': 'underlinePosition',
underlinethickness: 'underlineThickness',
'underline-thickness': 'underlineThickness',
unicode: 'unicode',
unicodebidi: 'unicodeBidi',
'unicode-bidi': 'unicodeBidi',
unicoderange: 'unicodeRange',
'unicode-range': 'unicodeRange',
unitsperem: 'unitsPerEm',
'units-per-em': 'unitsPerEm',
unselectable: 'unselectable',
valphabetic: 'vAlphabetic',
'v-alphabetic': 'vAlphabetic',
values: 'values',
vectoreffect: 'vectorEffect',
'vector-effect': 'vectorEffect',
version: 'version',
vertadvy: 'vertAdvY',
'vert-adv-y': 'vertAdvY',
vertoriginx: 'vertOriginX',
'vert-origin-x': 'vertOriginX',
vertoriginy: 'vertOriginY',
'vert-origin-y': 'vertOriginY',
vhanging: 'vHanging',
'v-hanging': 'vHanging',
videographic: 'vIdeographic',
'v-ideographic': 'vIdeographic',
viewbox: 'viewBox',
viewtarget: 'viewTarget',
visibility: 'visibility',
vmathematical: 'vMathematical',
'v-mathematical': 'vMathematical',
vocab: 'vocab',
widths: 'widths',
wordspacing: 'wordSpacing',
'word-spacing': 'wordSpacing',
writingmode: 'writingMode',
'writing-mode': 'writingMode',
x1: 'x1',
x2: 'x2',
x: 'x',
xchannelselector: 'xChannelSelector',
xheight: 'xHeight',
'x-height': 'xHeight',
xlinkactuate: 'xlinkActuate',
'xlink:actuate': 'xlinkActuate',
xlinkarcrole: 'xlinkArcrole',
'xlink:arcrole': 'xlinkArcrole',
xlinkhref: 'xlinkHref',
'xlink:href': 'xlinkHref',
xlinkrole: 'xlinkRole',
'xlink:role': 'xlinkRole',
xlinkshow: 'xlinkShow',
'xlink:show': 'xlinkShow',
xlinktitle: 'xlinkTitle',
'xlink:title': 'xlinkTitle',
xlinktype: 'xlinkType',
'xlink:type': 'xlinkType',
xmlbase: 'xmlBase',
'xml:base': 'xmlBase',
xmllang: 'xmlLang',
'xml:lang': 'xmlLang',
xmlns: 'xmlns',
'xml:space': 'xmlSpace',
xmlnsxlink: 'xmlnsXlink',
'xmlns:xlink': 'xmlnsXlink',
xmlspace: 'xmlSpace',
y1: 'y1',
y2: 'y2',
y: 'y',
ychannelselector: 'yChannelSelector',
z: 'z',
zoomandpan: 'zoomAndPan'
};
var ariaProperties = {
'aria-current': 0,
// state
'aria-description': 0,
'aria-details': 0,
'aria-disabled': 0,
// state
'aria-hidden': 0,
// state
'aria-invalid': 0,
// state
'aria-keyshortcuts': 0,
'aria-label': 0,
'aria-roledescription': 0,
// Widget Attributes
'aria-autocomplete': 0,
'aria-checked': 0,
'aria-expanded': 0,
'aria-haspopup': 0,
'aria-level': 0,
'aria-modal': 0,
'aria-multiline': 0,
'aria-multiselectable': 0,
'aria-orientation': 0,
'aria-placeholder': 0,
'aria-pressed': 0,
'aria-readonly': 0,
'aria-required': 0,
'aria-selected': 0,
'aria-sort': 0,
'aria-valuemax': 0,
'aria-valuemin': 0,
'aria-valuenow': 0,
'aria-valuetext': 0,
// Live Region Attributes
'aria-atomic': 0,
'aria-busy': 0,
'aria-live': 0,
'aria-relevant': 0,
// Drag-and-Drop Attributes
'aria-dropeffect': 0,
'aria-grabbed': 0,
// Relationship Attributes
'aria-activedescendant': 0,
'aria-colcount': 0,
'aria-colindex': 0,
'aria-colspan': 0,
'aria-controls': 0,
'aria-describedby': 0,
'aria-errormessage': 0,
'aria-flowto': 0,
'aria-labelledby': 0,
'aria-owns': 0,
'aria-posinset': 0,
'aria-rowcount': 0,
'aria-rowindex': 0,
'aria-rowspan': 0,
'aria-setsize': 0
};
var warnedProperties = {};
var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
function validateProperty(tagName, name) {
{
if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) {
return true;
}
if (rARIACamel.test(name)) {
var ariaName = 'aria-' + name.slice(4).toLowerCase();
var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
// DOM properties, then it is an invalid aria-* attribute.
if (correctName == null) {
error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
warnedProperties[name] = true;
return true;
} // aria-* attributes should be lowercase; suggest the lowercase version.
if (name !== correctName) {
error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
warnedProperties[name] = true;
return true;
}
}
if (rARIA.test(name)) {
var lowerCasedName = name.toLowerCase();
var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
// DOM properties, then it is an invalid aria-* attribute.
if (standardName == null) {
warnedProperties[name] = true;
return false;
} // aria-* attributes should be lowercase; suggest the lowercase version.
if (name !== standardName) {
error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
warnedProperties[name] = true;
return true;
}
}
}
return true;
}
function warnInvalidARIAProps(type, props) {
{
var invalidProps = [];
for (var key in props) {
var isValid = validateProperty(type, key);
if (!isValid) {
invalidProps.push(key);
}
}
var unknownPropString = invalidProps.map(function (prop) {
return '`' + prop + '`';
}).join(', ');
if (invalidProps.length === 1) {
error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
} else if (invalidProps.length > 1) {
error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
}
}
}
function validateProperties(type, props) {
if (isCustomComponent(type, props)) {
return;
}
warnInvalidARIAProps(type, props);
}
var didWarnValueNull = false;
function validateProperties$1(type, props) {
{
if (type !== 'input' && type !== 'textarea' && type !== 'select') {
return;
}
if (props != null && props.value === null && !didWarnValueNull) {
didWarnValueNull = true;
if (type === 'select' && props.multiple) {
error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);
} else {
error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
}
}
}
}
var validateProperty$1 = function () {};
{
var warnedProperties$1 = {};
var EVENT_NAME_REGEX = /^on./;
var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
validateProperty$1 = function (tagName, name, value, eventRegistry) {
if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
return true;
}
var lowerCasedName = name.toLowerCase();
if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');
warnedProperties$1[name] = true;
return true;
} // We can't rely on the event system being injected on the server.
if (eventRegistry != null) {
var registrationNameDependencies = eventRegistry.registrationNameDependencies,
possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
if (registrationNameDependencies.hasOwnProperty(name)) {
return true;
}
var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
if (registrationName != null) {
error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
warnedProperties$1[name] = true;
return true;
}
if (EVENT_NAME_REGEX.test(name)) {
error('Unknown event handler property `%s`. It will be ignored.', name);
warnedProperties$1[name] = true;
return true;
}
} else if (EVENT_NAME_REGEX.test(name)) {
// If no event plugins have been injected, we are in a server environment.
// So we can't tell if the event name is correct for sure, but we can filter
// out known bad ones like `onclick`. We can't suggest a specific replacement though.
if (INVALID_EVENT_NAME_REGEX.test(name)) {
error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
}
warnedProperties$1[name] = true;
return true;
} // Let the ARIA attribute hook validate ARIA attributes
if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
return true;
}
if (lowerCasedName === 'innerhtml') {
error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
warnedProperties$1[name] = true;
return true;
}
if (lowerCasedName === 'aria') {
error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
warnedProperties$1[name] = true;
return true;
}
if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
warnedProperties$1[name] = true;
return true;
}
if (typeof value === 'number' && isNaN(value)) {
error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
warnedProperties$1[name] = true;
return true;
}
var propertyInfo = getPropertyInfo(name);
var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.
if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
var standardName = possibleStandardNames[lowerCasedName];
if (standardName !== name) {
error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
warnedProperties$1[name] = true;
return true;
}
} else if (!isReserved && name !== lowerCasedName) {
// Unknown attributes should have lowercase casing since that's how they
// will be cased anyway with server rendering.
error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);
warnedProperties$1[name] = true;
return true;
}
if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
if (value) {
error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name);
} else {
error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);
}
warnedProperties$1[name] = true;
return true;
} // Now that we've validated casing, do not validate
// data types for reserved props
if (isReserved) {
return true;
} // Warn when a known attribute is a bad type
if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
warnedProperties$1[name] = true;
return false;
} // Warn when passing the strings 'false' or 'true' into a boolean prop
if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value);
warnedProperties$1[name] = true;
return true;
}
return true;
};
}
var warnUnknownProperties = function (type, props, eventRegistry) {
{
var unknownProps = [];
for (var key in props) {
var isValid = validateProperty$1(type, key, props[key], eventRegistry);
if (!isValid) {
unknownProps.push(key);
}
}
var unknownPropString = unknownProps.map(function (prop) {
return '`' + prop + '`';
}).join(', ');
if (unknownProps.length === 1) {
error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
} else if (unknownProps.length > 1) {
error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
}
}
};
function validateProperties$2(type, props, eventRegistry) {
if (isCustomComponent(type, props)) {
return;
}
warnUnknownProperties(type, props, eventRegistry);
}
var IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;
var IS_NON_DELEGATED = 1 << 1;
var IS_CAPTURE_PHASE = 1 << 2;
// set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when
// we call willDeferLaterForLegacyFBSupport, thus not bailing out
// will result in endless cycles like an infinite loop.
// We also don't want to defer during event replaying.
var SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;
// This exists to avoid circular dependency between ReactDOMEventReplaying
// and DOMPluginEventSystem.
var currentReplayingEvent = null;
function setReplayingEvent(event) {
{
if (currentReplayingEvent !== null) {
error('Expected currently replaying event to be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');
}
}
currentReplayingEvent = event;
}
function resetReplayingEvent() {
{
if (currentReplayingEvent === null) {
error('Expected currently replaying event to not be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');
}
}
currentReplayingEvent = null;
}
function isReplayingEvent(event) {
return event === currentReplayingEvent;
}
/**
* Gets the target node from a native browser event by accounting for
* inconsistencies in browser DOM APIs.
*
* @param {object} nativeEvent Native browser event.
* @return {DOMEventTarget} Target node.
*/
function getEventTarget(nativeEvent) {
// Fallback to nativeEvent.srcElement for IE9
// https://github.com/facebook/react/issues/12506
var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963
if (target.correspondingUseElement) {
target = target.correspondingUseElement;
} // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
// @see http://www.quirksmode.org/js/events_properties.html
return target.nodeType === TEXT_NODE ? target.parentNode : target;
}
var restoreImpl = null;
var restoreTarget = null;
var restoreQueue = null;
function restoreStateOfTarget(target) {
// We perform this translation at the end of the event loop so that we
// always receive the correct fiber here
var internalInstance = getInstanceFromNode(target);
if (!internalInstance) {
// Unmounted
return;
}
if (typeof restoreImpl !== 'function') {
throw new Error('setRestoreImplementation() needs to be called to handle a target for controlled ' + 'events. This error is likely caused by a bug in React. Please file an issue.');
}
var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.
if (stateNode) {
var _props = getFiberCurrentPropsFromNode(stateNode);
restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
}
}
function setRestoreImplementation(impl) {
restoreImpl = impl;
}
function enqueueStateRestore(target) {
if (restoreTarget) {
if (restoreQueue) {
restoreQueue.push(target);
} else {
restoreQueue = [target];
}
} else {
restoreTarget = target;
}
}
function needsStateRestore() {
return restoreTarget !== null || restoreQueue !== null;
}
function restoreStateIfNeeded() {
if (!restoreTarget) {
return;
}
var target = restoreTarget;
var queuedTargets = restoreQueue;
restoreTarget = null;
restoreQueue = null;
restoreStateOfTarget(target);
if (queuedTargets) {
for (var i = 0; i < queuedTargets.length; i++) {
restoreStateOfTarget(queuedTargets[i]);
}
}
}
// the renderer. Such as when we're dispatching events or if third party
// libraries need to call batchedUpdates. Eventually, this API will go away when
// everything is batched by default. We'll then have a similar API to opt-out of
// scheduled work and instead do synchronous work.
// Defaults
var batchedUpdatesImpl = function (fn, bookkeeping) {
return fn(bookkeeping);
};
var flushSyncImpl = function () {};
var isInsideEventHandler = false;
function finishEventHandler() {
// Here we wait until all updates have propagated, which is important
// when using controlled components within layers:
// https://github.com/facebook/react/issues/1698
// Then we restore state of any controlled component.
var controlledComponentsHavePendingUpdates = needsStateRestore();
if (controlledComponentsHavePendingUpdates) {
// If a controlled event was fired, we may need to restore the state of
// the DOM node back to the controlled value. This is necessary when React
// bails out of the update without touching the DOM.
// TODO: Restore state in the microtask, after the discrete updates flush,
// instead of early flushing them here.
flushSyncImpl();
restoreStateIfNeeded();
}
}
function batchedUpdates(fn, a, b) {
if (isInsideEventHandler) {
// If we are currently inside another batch, we need to wait until it
// fully completes before restoring state.
return fn(a, b);
}
isInsideEventHandler = true;
try {
return batchedUpdatesImpl(fn, a, b);
} finally {
isInsideEventHandler = false;
finishEventHandler();
}
} // TODO: Replace with flushSync
function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushSyncImpl) {
batchedUpdatesImpl = _batchedUpdatesImpl;
flushSyncImpl = _flushSyncImpl;
}
function isInteractive(tag) {
return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
}
function shouldPreventMouseEvent(name, type, props) {
switch (name) {
case 'onClick':
case 'onClickCapture':
case 'onDoubleClick':
case 'onDoubleClickCapture':
case 'onMouseDown':
case 'onMouseDownCapture':
case 'onMouseMove':
case 'onMouseMoveCapture':
case 'onMouseUp':
case 'onMouseUpCapture':
case 'onMouseEnter':
return !!(props.disabled && isInteractive(type));
default:
return false;
}
}
/**
* @param {object} inst The instance, which is the source of events.
* @param {string} registrationName Name of listener (e.g. `onClick`).
* @return {?function} The stored callback.
*/
function getListener(inst, registrationName) {
var stateNode = inst.stateNode;
if (stateNode === null) {
// Work in progress (ex: onload events in incremental mode).
return null;
}
var props = getFiberCurrentPropsFromNode(stateNode);
if (props === null) {
// Work in progress.
return null;
}
var listener = props[registrationName];
if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
return null;
}
if (listener && typeof listener !== 'function') {
throw new Error("Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type.");
}
return listener;
}
var passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners
// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support
if (canUseDOM) {
try {
var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value
Object.defineProperty(options, 'passive', {
get: function () {
passiveBrowserEventsSupported = true;
}
});
window.addEventListener('test', options, options);
window.removeEventListener('test', options, options);
} catch (e) {
passiveBrowserEventsSupported = false;
}
}
function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {
var funcArgs = Array.prototype.slice.call(arguments, 3);
try {
func.apply(context, funcArgs);
} catch (error) {
this.onError(error);
}
}
var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;
{
// In DEV mode, we swap out invokeGuardedCallback for a special version
// that plays more nicely with the browser's DevTools. The idea is to preserve
// "Pause on exceptions" behavior. Because React wraps all user-provided
// functions in invokeGuardedCallback, and the production version of
// invokeGuardedCallback uses a try-catch, all user exceptions are treated
// like caught exceptions, and the DevTools won't pause unless the developer
// takes the extra step of enabling pause on caught exceptions. This is
// unintuitive, though, because even though React has caught the error, from
// the developer's perspective, the error is uncaught.
//
// To preserve the expected "Pause on exceptions" behavior, we don't use a
// try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
// DOM node, and call the user-provided callback from inside an event handler
// for that fake event. If the callback throws, the error is "captured" using
// a global event handler. But because the error happens in a different
// event loop context, it does not interrupt the normal program flow.
// Effectively, this gives us try-catch behavior without actually using
// try-catch. Neat!
// Check that the browser supports the APIs we need to implement our special
// DEV version of invokeGuardedCallback
if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
var fakeNode = document.createElement('react');
invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {
// If document doesn't exist we know for sure we will crash in this method
// when we call document.createEvent(). However this can cause confusing
// errors: https://github.com/facebook/create-react-app/issues/3482
// So we preemptively throw with a better message instead.
if (typeof document === 'undefined' || document === null) {
throw new Error('The `document` global was defined when React was initialized, but is not ' + 'defined anymore. This can happen in a test environment if a component ' + 'schedules an update from an asynchronous callback, but the test has already ' + 'finished running. To solve this, you can either unmount the component at ' + 'the end of your test (and ensure that any asynchronous operations get ' + 'canceled in `componentWillUnmount`), or you can change the test itself ' + 'to be asynchronous.');
}
var evt = document.createEvent('Event');
var didCall = false; // Keeps track of whether the user-provided callback threw an error. We
// set this to true at the beginning, then set it to false right after
// calling the function. If the function errors, `didError` will never be
// set to false. This strategy works even if the browser is flaky and
// fails to call our global error handler, because it doesn't rely on
// the error event at all.
var didError = true; // Keeps track of the value of window.event so that we can reset it
// during the callback to let user code access window.event in the
// browsers that support it.
var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
// dispatching: https://github.com/facebook/react/issues/13688
var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');
function restoreAfterDispatch() {
// We immediately remove the callback from event listeners so that
// nested `invokeGuardedCallback` calls do not clash. Otherwise, a
// nested call would trigger the fake event handlers of any call higher
// in the stack.
fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
// window.event assignment in both IE <= 10 as they throw an error
// "Member not found" in strict mode, and in Firefox which does not
// support window.event.
if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
window.event = windowEvent;
}
} // Create an event handler for our fake event. We will synchronously
// dispatch our fake event using `dispatchEvent`. Inside the handler, we
// call the user-provided callback.
var funcArgs = Array.prototype.slice.call(arguments, 3);
function callCallback() {
didCall = true;
restoreAfterDispatch();
func.apply(context, funcArgs);
didError = false;
} // Create a global error event handler. We use this to capture the value
// that was thrown. It's possible that this error handler will fire more
// than once; for example, if non-React code also calls `dispatchEvent`
// and a handler for that event throws. We should be resilient to most of
// those cases. Even if our error event handler fires more than once, the
// last error event is always used. If the callback actually does error,
// we know that the last error event is the correct one, because it's not
// possible for anything else to have happened in between our callback
// erroring and the code that follows the `dispatchEvent` call below. If
// the callback doesn't error, but the error event was fired, we know to
// ignore it because `didError` will be false, as described above.
var error; // Use this to track whether the error event is ever called.
var didSetError = false;
var isCrossOriginError = false;
function handleWindowError(event) {
error = event.error;
didSetError = true;
if (error === null && event.colno === 0 && event.lineno === 0) {
isCrossOriginError = true;
}
if (event.defaultPrevented) {
// Some other error handler has prevented default.
// Browsers silence the error report if this happens.
// We'll remember this to later decide whether to log it or not.
if (error != null && typeof error === 'object') {
try {
error._suppressLogging = true;
} catch (inner) {// Ignore.
}
}
}
} // Create a fake event type.
var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers
window.addEventListener('error', handleWindowError);
fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
// errors, it will trigger our global error handler.
evt.initEvent(evtType, false, false);
fakeNode.dispatchEvent(evt);
if (windowEventDescriptor) {
Object.defineProperty(window, 'event', windowEventDescriptor);
}
if (didCall && didError) {
if (!didSetError) {
// The callback errored, but the error event never fired.
// eslint-disable-next-line react-internal/prod-error-codes
error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
} else if (isCrossOriginError) {
// eslint-disable-next-line react-internal/prod-error-codes
error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');
}
this.onError(error);
} // Remove our event listeners
window.removeEventListener('error', handleWindowError);
if (!didCall) {
// Something went really wrong, and our event was not dispatched.
// https://github.com/facebook/react/issues/16734
// https://github.com/facebook/react/issues/16585
// Fall back to the production implementation.
restoreAfterDispatch();
return invokeGuardedCallbackProd.apply(this, arguments);
}
};
}
}
var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
var hasError = false;
var caughtError = null; // Used by event system to capture/rethrow the first error.
var hasRethrowError = false;
var rethrowError = null;
var reporter = {
onError: function (error) {
hasError = true;
caughtError = error;
}
};
/**
* Call a function while guarding against errors that happens within it.
* Returns an error if it throws, otherwise null.
*
* In production, this is implemented using a try-catch. The reason we don't
* use a try-catch directly is so that we can swap out a different
* implementation in DEV mode.
*
* @param {String} name of the guard to use for logging or debugging
* @param {Function} func The function to invoke
* @param {*} context The context to use when calling the function
* @param {...*} args Arguments for function
*/
function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
hasError = false;
caughtError = null;
invokeGuardedCallbackImpl$1.apply(reporter, arguments);
}
/**
* Same as invokeGuardedCallback, but instead of returning an error, it stores
* it in a global so it can be rethrown by `rethrowCaughtError` later.
* TODO: See if caughtError and rethrowError can be unified.
*
* @param {String} name of the guard to use for logging or debugging
* @param {Function} func The function to invoke
* @param {*} context The context to use when calling the function
* @param {...*} args Arguments for function
*/
function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
invokeGuardedCallback.apply(this, arguments);
if (hasError) {
var error = clearCaughtError();
if (!hasRethrowError) {
hasRethrowError = true;
rethrowError = error;
}
}
}
/**
* During execution of guarded functions we will capture the first error which
* we will rethrow to be handled by the top level error handler.
*/
function rethrowCaughtError() {
if (hasRethrowError) {
var error = rethrowError;
hasRethrowError = false;
rethrowError = null;
throw error;
}
}
function hasCaughtError() {
return hasError;
}
function clearCaughtError() {
if (hasError) {
var error = caughtError;
hasError = false;
caughtError = null;
return error;
} else {
throw new Error('clearCaughtError was called but no error was captured. This error ' + 'is likely caused by a bug in React. Please file an issue.');
}
}
var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
var _ReactInternals$Sched = ReactInternals.Scheduler,
unstable_cancelCallback = _ReactInternals$Sched.unstable_cancelCallback,
unstable_now = _ReactInternals$Sched.unstable_now,
unstable_scheduleCallback = _ReactInternals$Sched.unstable_scheduleCallback,
unstable_shouldYield = _ReactInternals$Sched.unstable_shouldYield,
unstable_requestPaint = _ReactInternals$Sched.unstable_requestPaint,
unstable_getFirstCallbackNode = _ReactInternals$Sched.unstable_getFirstCallbackNode,
unstable_runWithPriority = _ReactInternals$Sched.unstable_runWithPriority,
unstable_next = _ReactInternals$Sched.unstable_next,
unstable_continueExecution = _ReactInternals$Sched.unstable_continueExecution,
unstable_pauseExecution = _ReactInternals$Sched.unstable_pauseExecution,
unstable_getCurrentPriorityLevel = _ReactInternals$Sched.unstable_getCurrentPriorityLevel,
unstable_ImmediatePriority = _ReactInternals$Sched.unstable_ImmediatePriority,
unstable_UserBlockingPriority = _ReactInternals$Sched.unstable_UserBlockingPriority,
unstable_NormalPriority = _ReactInternals$Sched.unstable_NormalPriority,
unstable_LowPriority = _ReactInternals$Sched.unstable_LowPriority,
unstable_IdlePriority = _ReactInternals$Sched.unstable_IdlePriority,
unstable_forceFrameRate = _ReactInternals$Sched.unstable_forceFrameRate,
unstable_flushAllWithoutAsserting = _ReactInternals$Sched.unstable_flushAllWithoutAsserting,
unstable_yieldValue = _ReactInternals$Sched.unstable_yieldValue,
unstable_setDisableYieldValue = _ReactInternals$Sched.unstable_setDisableYieldValue;
/**
* `ReactInstanceMap` maintains a mapping from a public facing stateful
* instance (key) and the internal representation (value). This allows public
* methods to accept the user facing instance as an argument and map them back
* to internal methods.
*
* Note that this module is currently shared and assumed to be stateless.
* If this becomes an actual Map, that will break.
*/
function get(key) {
return key._reactInternals;
}
function has(key) {
return key._reactInternals !== undefined;
}
function set(key, value) {
key._reactInternals = value;
}
// Don't change these two values. They're used by React Dev Tools.
var NoFlags =
/* */
0;
var PerformedWork =
/* */
1; // You can change the rest (and add more).
var Placement =
/* */
2;
var Update =
/* */
4;
var ChildDeletion =
/* */
16;
var ContentReset =
/* */
32;
var Callback =
/* */
64;
var DidCapture =
/* */
128;
var ForceClientRender =
/* */
256;
var Ref =
/* */
512;
var Snapshot =
/* */
1024;
var Passive =
/* */
2048;
var Hydrating =
/* */
4096;
var Visibility =
/* */
8192;
var StoreConsistency =
/* */
16384;
var LifecycleEffectMask = Passive | Update | Callback | Ref | Snapshot | StoreConsistency; // Union of all commit flags (flags with the lifetime of a particular commit)
var HostEffectMask =
/* */
32767; // These are not really side effects, but we still reuse this field.
var Incomplete =
/* */
32768;
var ShouldCapture =
/* */
65536;
var ForceUpdateForLegacySuspense =
/* */
131072;
var Forked =
/* */
1048576; // Static tags describe aspects of a fiber that are not specific to a render,
// e.g. a fiber uses a passive effect (even if there are no updates on this particular render).
// This enables us to defer more work in the unmount case,
// since we can defer traversing the tree during layout to look for Passive effects,
// and instead rely on the static flag as a signal that there may be cleanup work.
var RefStatic =
/* */
2097152;
var LayoutStatic =
/* */
4194304;
var PassiveStatic =
/* */
8388608; // These flags allow us to traverse to fibers that have effects on mount
// without traversing the entire tree after every commit for
// double invoking
var MountLayoutDev =
/* */
16777216;
var MountPassiveDev =
/* */
33554432; // Groups of flags that are used in the commit phase to skip over trees that
// don't contain effects, by checking subtreeFlags.
var BeforeMutationMask = // TODO: Remove Update flag from before mutation phase by re-landing Visibility
// flag logic (see #20043)
Update | Snapshot | ( 0);
var MutationMask = Placement | Update | ChildDeletion | ContentReset | Ref | Hydrating | Visibility;
var LayoutMask = Update | Callback | Ref | Visibility; // TODO: Split into PassiveMountMask and PassiveUnmountMask
var PassiveMask = Passive | ChildDeletion; // Union of tags that don't get reset on clones.
// This allows certain concepts to persist without recalculating them,
// e.g. whether a subtree contains passive effects or portals.
var StaticMask = LayoutStatic | PassiveStatic | RefStatic;
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
function getNearestMountedFiber(fiber) {
var node = fiber;
var nearestMounted = fiber;
if (!fiber.alternate) {
// If there is no alternate, this might be a new tree that isn't inserted
// yet. If it is, then it will have a pending insertion effect on it.
var nextNode = node;
do {
node = nextNode;
if ((node.flags & (Placement | Hydrating)) !== NoFlags) {
// This is an insertion or in-progress hydration. The nearest possible
// mounted fiber is the parent but we need to continue to figure out
// if that one is still mounted.
nearestMounted = node.return;
}
nextNode = node.return;
} while (nextNode);
} else {
while (node.return) {
node = node.return;
}
}
if (node.tag === HostRoot) {
// TODO: Check if this was a nested HostRoot when used with
// renderContainerIntoSubtree.
return nearestMounted;
} // If we didn't hit the root, that means that we're in an disconnected tree
// that has been unmounted.
return null;
}
function getSuspenseInstanceFromFiber(fiber) {
if (fiber.tag === SuspenseComponent) {
var suspenseState = fiber.memoizedState;
if (suspenseState === null) {
var current = fiber.alternate;
if (current !== null) {
suspenseState = current.memoizedState;
}
}
if (suspenseState !== null) {
return suspenseState.dehydrated;
}
}
return null;
}
function getContainerFromFiber(fiber) {
return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;
}
function isFiberMounted(fiber) {
return getNearestMountedFiber(fiber) === fiber;
}
function isMounted(component) {
{
var owner = ReactCurrentOwner.current;
if (owner !== null && owner.tag === ClassComponent) {
var ownerFiber = owner;
var instance = ownerFiber.stateNode;
if (!instance._warnedAboutRefsInRender) {
error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentNameFromFiber(ownerFiber) || 'A component');
}
instance._warnedAboutRefsInRender = true;
}
}
var fiber = get(component);
if (!fiber) {
return false;
}
return getNearestMountedFiber(fiber) === fiber;
}
function assertIsMounted(fiber) {
if (getNearestMountedFiber(fiber) !== fiber) {
throw new Error('Unable to find node on an unmounted component.');
}
}
function findCurrentFiberUsingSlowPath(fiber) {
var alternate = fiber.alternate;
if (!alternate) {
// If there is no alternate, then we only need to check if it is mounted.
var nearestMounted = getNearestMountedFiber(fiber);
if (nearestMounted === null) {
throw new Error('Unable to find node on an unmounted component.');
}
if (nearestMounted !== fiber) {
return null;
}
return fiber;
} // If we have two possible branches, we'll walk backwards up to the root
// to see what path the root points to. On the way we may hit one of the
// special cases and we'll deal with them.
var a = fiber;
var b = alternate;
while (true) {
var parentA = a.return;
if (parentA === null) {
// We're at the root.
break;
}
var parentB = parentA.alternate;
if (parentB === null) {
// There is no alternate. This is an unusual case. Currently, it only
// happens when a Suspense component is hidden. An extra fragment fiber
// is inserted in between the Suspense fiber and its children. Skip
// over this extra fragment fiber and proceed to the next parent.
var nextParent = parentA.return;
if (nextParent !== null) {
a = b = nextParent;
continue;
} // If there's no parent, we're at the root.
break;
} // If both copies of the parent fiber point to the same child, we can
// assume that the child is current. This happens when we bailout on low
// priority: the bailed out fiber's child reuses the current child.
if (parentA.child === parentB.child) {
var child = parentA.child;
while (child) {
if (child === a) {
// We've determined that A is the current branch.
assertIsMounted(parentA);
return fiber;
}
if (child === b) {
// We've determined that B is the current branch.
assertIsMounted(parentA);
return alternate;
}
child = child.sibling;
} // We should never have an alternate for any mounting node. So the only
// way this could possibly happen is if this was unmounted, if at all.
throw new Error('Unable to find node on an unmounted component.');
}
if (a.return !== b.return) {
// The return pointer of A and the return pointer of B point to different
// fibers. We assume that return pointers never criss-cross, so A must
// belong to the child set of A.return, and B must belong to the child
// set of B.return.
a = parentA;
b = parentB;
} else {
// The return pointers point to the same fiber. We'll have to use the
// default, slow path: scan the child sets of each parent alternate to see
// which child belongs to which set.
//
// Search parent A's child set
var didFindChild = false;
var _child = parentA.child;
while (_child) {
if (_child === a) {
didFindChild = true;
a = parentA;
b = parentB;
break;
}
if (_child === b) {
didFindChild = true;
b = parentA;
a = parentB;
break;
}
_child = _child.sibling;
}
if (!didFindChild) {
// Search parent B's child set
_child = parentB.child;
while (_child) {
if (_child === a) {
didFindChild = true;
a = parentB;
b = parentA;
break;
}
if (_child === b) {
didFindChild = true;
b = parentB;
a = parentA;
break;
}
_child = _child.sibling;
}
if (!didFindChild) {
throw new Error('Child was not found in either parent set. This indicates a bug ' + 'in React related to the return pointer. Please file an issue.');
}
}
}
if (a.alternate !== b) {
throw new Error("Return fibers should always be each others' alternates. " + 'This error is likely caused by a bug in React. Please file an issue.');
}
} // If the root is not a host container, we're in a disconnected tree. I.e.
// unmounted.
if (a.tag !== HostRoot) {
throw new Error('Unable to find node on an unmounted component.');
}
if (a.stateNode.current === a) {
// We've determined that A is the current branch.
return fiber;
} // Otherwise B has to be current branch.
return alternate;
}
function findCurrentHostFiber(parent) {
var currentParent = findCurrentFiberUsingSlowPath(parent);
return currentParent !== null ? findCurrentHostFiberImpl(currentParent) : null;
}
function findCurrentHostFiberImpl(node) {
// Next we'll drill down this component to find the first HostComponent/Text.
if (node.tag === HostComponent || node.tag === HostText) {
return node;
}
var child = node.child;
while (child !== null) {
var match = findCurrentHostFiberImpl(child);
if (match !== null) {
return match;
}
child = child.sibling;
}
return null;
}
function findCurrentHostFiberWithNoPortals(parent) {
var currentParent = findCurrentFiberUsingSlowPath(parent);
return currentParent !== null ? findCurrentHostFiberWithNoPortalsImpl(currentParent) : null;
}
function findCurrentHostFiberWithNoPortalsImpl(node) {
// Next we'll drill down this component to find the first HostComponent/Text.
if (node.tag === HostComponent || node.tag === HostText) {
return node;
}
var child = node.child;
while (child !== null) {
if (child.tag !== HostPortal) {
var match = findCurrentHostFiberWithNoPortalsImpl(child);
if (match !== null) {
return match;
}
}
child = child.sibling;
}
return null;
}
// This module only exists as an ESM wrapper around the external CommonJS
var scheduleCallback = unstable_scheduleCallback;
var cancelCallback = unstable_cancelCallback;
var shouldYield = unstable_shouldYield;
var requestPaint = unstable_requestPaint;
var now = unstable_now;
var getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
var ImmediatePriority = unstable_ImmediatePriority;
var UserBlockingPriority = unstable_UserBlockingPriority;
var NormalPriority = unstable_NormalPriority;
var LowPriority = unstable_LowPriority;
var IdlePriority = unstable_IdlePriority;
// this doesn't actually exist on the scheduler, but it *does*
// on scheduler/unstable_mock, which we'll need for internal testing
var unstable_yieldValue$1 = unstable_yieldValue;
var unstable_setDisableYieldValue$1 = unstable_setDisableYieldValue;
var rendererID = null;
var injectedHook = null;
var injectedProfilingHooks = null;
var hasLoggedError = false;
var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';
function injectInternals(internals) {
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
// No DevTools
return false;
}
var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (hook.isDisabled) {
// This isn't a real property on the hook, but it can be set to opt out
// of DevTools integration and associated warnings and logs.
// https://github.com/facebook/react/issues/3877
return true;
}
if (!hook.supportsFiber) {
{
error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://reactjs.org/link/react-devtools');
} // DevTools exists, even though it doesn't support Fiber.
return true;
}
try {
if (enableSchedulingProfiler) {
// Conditionally inject these hooks only if Timeline profiler is supported by this build.
// This gives DevTools a way to feature detect that isn't tied to version number
// (since profiling and timeline are controlled by different feature flags).
internals = assign({}, internals, {
getLaneLabelMap: getLaneLabelMap,
injectProfilingHooks: injectProfilingHooks
});
}
rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.
injectedHook = hook;
} catch (err) {
// Catch all errors because it is unsafe to throw during initialization.
{
error('React instrumentation encountered an error: %s.', err);
}
}
if (hook.checkDCE) {
// This is the real DevTools.
return true;
} else {
// This is likely a hook installed by Fast Refresh runtime.
return false;
}
}
function onScheduleRoot(root, children) {
{
if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {
try {
injectedHook.onScheduleFiberRoot(rendererID, root, children);
} catch (err) {
if ( !hasLoggedError) {
hasLoggedError = true;
error('React instrumentation encountered an error: %s', err);
}
}
}
}
}
function onCommitRoot(root, eventPriority) {
if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {
try {
var didError = (root.current.flags & DidCapture) === DidCapture;
if (enableProfilerTimer) {
var schedulerPriority;
switch (eventPriority) {
case DiscreteEventPriority:
schedulerPriority = ImmediatePriority;
break;
case ContinuousEventPriority:
schedulerPriority = UserBlockingPriority;
break;
case DefaultEventPriority:
schedulerPriority = NormalPriority;
break;
case IdleEventPriority:
schedulerPriority = IdlePriority;
break;
default:
schedulerPriority = NormalPriority;
break;
}
injectedHook.onCommitFiberRoot(rendererID, root, schedulerPriority, didError);
} else {
injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);
}
} catch (err) {
{
if (!hasLoggedError) {
hasLoggedError = true;
error('React instrumentation encountered an error: %s', err);
}
}
}
}
}
function onPostCommitRoot(root) {
if (injectedHook && typeof injectedHook.onPostCommitFiberRoot === 'function') {
try {
injectedHook.onPostCommitFiberRoot(rendererID, root);
} catch (err) {
{
if (!hasLoggedError) {
hasLoggedError = true;
error('React instrumentation encountered an error: %s', err);
}
}
}
}
}
function onCommitUnmount(fiber) {
if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {
try {
injectedHook.onCommitFiberUnmount(rendererID, fiber);
} catch (err) {
{
if (!hasLoggedError) {
hasLoggedError = true;
error('React instrumentation encountered an error: %s', err);
}
}
}
}
}
function setIsStrictModeForDevtools(newIsStrictMode) {
{
if (typeof unstable_yieldValue$1 === 'function') {
// We're in a test because Scheduler.unstable_yieldValue only exists
// in SchedulerMock. To reduce the noise in strict mode tests,
// suppress warnings and disable scheduler yielding during the double render
unstable_setDisableYieldValue$1(newIsStrictMode);
setSuppressWarning(newIsStrictMode);
}
if (injectedHook && typeof injectedHook.setStrictMode === 'function') {
try {
injectedHook.setStrictMode(rendererID, newIsStrictMode);
} catch (err) {
{
if (!hasLoggedError) {
hasLoggedError = true;
error('React instrumentation encountered an error: %s', err);
}
}
}
}
}
} // Profiler API hooks
function injectProfilingHooks(profilingHooks) {
injectedProfilingHooks = profilingHooks;
}
function getLaneLabelMap() {
{
var map = new Map();
var lane = 1;
for (var index = 0; index < TotalLanes; index++) {
var label = getLabelForLane(lane);
map.set(lane, label);
lane *= 2;
}
return map;
}
}
function markCommitStarted(lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStarted === 'function') {
injectedProfilingHooks.markCommitStarted(lanes);
}
}
}
function markCommitStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStopped === 'function') {
injectedProfilingHooks.markCommitStopped();
}
}
}
function markComponentRenderStarted(fiber) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStarted === 'function') {
injectedProfilingHooks.markComponentRenderStarted(fiber);
}
}
}
function markComponentRenderStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStopped === 'function') {
injectedProfilingHooks.markComponentRenderStopped();
}
}
}
function markComponentPassiveEffectMountStarted(fiber) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStarted === 'function') {
injectedProfilingHooks.markComponentPassiveEffectMountStarted(fiber);
}
}
}
function markComponentPassiveEffectMountStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStopped === 'function') {
injectedProfilingHooks.markComponentPassiveEffectMountStopped();
}
}
}
function markComponentPassiveEffectUnmountStarted(fiber) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStarted === 'function') {
injectedProfilingHooks.markComponentPassiveEffectUnmountStarted(fiber);
}
}
}
function markComponentPassiveEffectUnmountStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped === 'function') {
injectedProfilingHooks.markComponentPassiveEffectUnmountStopped();
}
}
}
function markComponentLayoutEffectMountStarted(fiber) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStarted === 'function') {
injectedProfilingHooks.markComponentLayoutEffectMountStarted(fiber);
}
}
}
function markComponentLayoutEffectMountStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStopped === 'function') {
injectedProfilingHooks.markComponentLayoutEffectMountStopped();
}
}
}
function markComponentLayoutEffectUnmountStarted(fiber) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted === 'function') {
injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber);
}
}
}
function markComponentLayoutEffectUnmountStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped === 'function') {
injectedProfilingHooks.markComponentLayoutEffectUnmountStopped();
}
}
}
function markComponentErrored(fiber, thrownValue, lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentErrored === 'function') {
injectedProfilingHooks.markComponentErrored(fiber, thrownValue, lanes);
}
}
}
function markComponentSuspended(fiber, wakeable, lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentSuspended === 'function') {
injectedProfilingHooks.markComponentSuspended(fiber, wakeable, lanes);
}
}
}
function markLayoutEffectsStarted(lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStarted === 'function') {
injectedProfilingHooks.markLayoutEffectsStarted(lanes);
}
}
}
function markLayoutEffectsStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStopped === 'function') {
injectedProfilingHooks.markLayoutEffectsStopped();
}
}
}
function markPassiveEffectsStarted(lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStarted === 'function') {
injectedProfilingHooks.markPassiveEffectsStarted(lanes);
}
}
}
function markPassiveEffectsStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStopped === 'function') {
injectedProfilingHooks.markPassiveEffectsStopped();
}
}
}
function markRenderStarted(lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStarted === 'function') {
injectedProfilingHooks.markRenderStarted(lanes);
}
}
}
function markRenderYielded() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderYielded === 'function') {
injectedProfilingHooks.markRenderYielded();
}
}
}
function markRenderStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStopped === 'function') {
injectedProfilingHooks.markRenderStopped();
}
}
}
function markRenderScheduled(lane) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderScheduled === 'function') {
injectedProfilingHooks.markRenderScheduled(lane);
}
}
}
function markForceUpdateScheduled(fiber, lane) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markForceUpdateScheduled === 'function') {
injectedProfilingHooks.markForceUpdateScheduled(fiber, lane);
}
}
}
function markStateUpdateScheduled(fiber, lane) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markStateUpdateScheduled === 'function') {
injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);
}
}
}
var NoMode =
/* */
0; // TODO: Remove ConcurrentMode by reading from the root tag instead
var ConcurrentMode =
/* */
1;
var ProfileMode =
/* */
2;
var StrictLegacyMode =
/* */
8;
var StrictEffectsMode =
/* */
16;
// TODO: This is pretty well supported by browsers. Maybe we can drop it.
var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros.
// Based on:
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32
var log = Math.log;
var LN2 = Math.LN2;
function clz32Fallback(x) {
var asUint = x >>> 0;
if (asUint === 0) {
return 32;
}
return 31 - (log(asUint) / LN2 | 0) | 0;
}
// If those values are changed that package should be rebuilt and redeployed.
var TotalLanes = 31;
var NoLanes =
/* */
0;
var NoLane =
/* */
0;
var SyncLane =
/* */
1;
var InputContinuousHydrationLane =
/* */
2;
var InputContinuousLane =
/* */
4;
var DefaultHydrationLane =
/* */
8;
var DefaultLane =
/* */
16;
var TransitionHydrationLane =
/* */
32;
var TransitionLanes =
/* */
4194240;
var TransitionLane1 =
/* */
64;
var TransitionLane2 =
/* */
128;
var TransitionLane3 =
/* */
256;
var TransitionLane4 =
/* */
512;
var TransitionLane5 =
/* */
1024;
var TransitionLane6 =
/* */
2048;
var TransitionLane7 =
/* */
4096;
var TransitionLane8 =
/* */
8192;
var TransitionLane9 =
/* */
16384;
var TransitionLane10 =
/* */
32768;
var TransitionLane11 =
/* */
65536;
var TransitionLane12 =
/* */
131072;
var TransitionLane13 =
/* */
262144;
var TransitionLane14 =
/* */
524288;
var TransitionLane15 =
/* */
1048576;
var TransitionLane16 =
/* */
2097152;
var RetryLanes =
/* */
130023424;
var RetryLane1 =
/* */
4194304;
var RetryLane2 =
/* */
8388608;
var RetryLane3 =
/* */
16777216;
var RetryLane4 =
/* */
33554432;
var RetryLane5 =
/* */
67108864;
var SomeRetryLane = RetryLane1;
var SelectiveHydrationLane =
/* */
134217728;
var NonIdleLanes =
/* */
268435455;
var IdleHydrationLane =
/* */
268435456;
var IdleLane =
/* */
536870912;
var OffscreenLane =
/* */
1073741824; // This function is used for the experimental timeline (react-devtools-timeline)
// It should be kept in sync with the Lanes values above.
function getLabelForLane(lane) {
{
if (lane & SyncLane) {
return 'Sync';
}
if (lane & InputContinuousHydrationLane) {
return 'InputContinuousHydration';
}
if (lane & InputContinuousLane) {
return 'InputContinuous';
}
if (lane & DefaultHydrationLane) {
return 'DefaultHydration';
}
if (lane & DefaultLane) {
return 'Default';
}
if (lane & TransitionHydrationLane) {
return 'TransitionHydration';
}
if (lane & TransitionLanes) {
return 'Transition';
}
if (lane & RetryLanes) {
return 'Retry';
}
if (lane & SelectiveHydrationLane) {
return 'SelectiveHydration';
}
if (lane & IdleHydrationLane) {
return 'IdleHydration';
}
if (lane & IdleLane) {
return 'Idle';
}
if (lane & OffscreenLane) {
return 'Offscreen';
}
}
}
var NoTimestamp = -1;
var nextTransitionLane = TransitionLane1;
var nextRetryLane = RetryLane1;
function getHighestPriorityLanes(lanes) {
switch (getHighestPriorityLane(lanes)) {
case SyncLane:
return SyncLane;
case InputContinuousHydrationLane:
return InputContinuousHydrationLane;
case InputContinuousLane:
return InputContinuousLane;
case DefaultHydrationLane:
return DefaultHydrationLane;
case DefaultLane:
return DefaultLane;
case TransitionHydrationLane:
return TransitionHydrationLane;
case TransitionLane1:
case TransitionLane2:
case TransitionLane3:
case TransitionLane4:
case TransitionLane5:
case TransitionLane6:
case TransitionLane7:
case TransitionLane8:
case TransitionLane9:
case TransitionLane10:
case TransitionLane11:
case TransitionLane12:
case TransitionLane13:
case TransitionLane14:
case TransitionLane15:
case TransitionLane16:
return lanes & TransitionLanes;
case RetryLane1:
case RetryLane2:
case RetryLane3:
case RetryLane4:
case RetryLane5:
return lanes & RetryLanes;
case SelectiveHydrationLane:
return SelectiveHydrationLane;
case IdleHydrationLane:
return IdleHydrationLane;
case IdleLane:
return IdleLane;
case OffscreenLane:
return OffscreenLane;
default:
{
error('Should have found matching lanes. This is a bug in React.');
} // This shouldn't be reachable, but as a fallback, return the entire bitmask.
return lanes;
}
}
function getNextLanes(root, wipLanes) {
// Early bailout if there's no pending work left.
var pendingLanes = root.pendingLanes;
if (pendingLanes === NoLanes) {
return NoLanes;
}
var nextLanes = NoLanes;
var suspendedLanes = root.suspendedLanes;
var pingedLanes = root.pingedLanes; // Do not work on any idle work until all the non-idle work has finished,
// even if the work is suspended.
var nonIdlePendingLanes = pendingLanes & NonIdleLanes;
if (nonIdlePendingLanes !== NoLanes) {
var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;
if (nonIdleUnblockedLanes !== NoLanes) {
nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);
} else {
var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;
if (nonIdlePingedLanes !== NoLanes) {
nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);
}
}
} else {
// The only remaining work is Idle.
var unblockedLanes = pendingLanes & ~suspendedLanes;
if (unblockedLanes !== NoLanes) {
nextLanes = getHighestPriorityLanes(unblockedLanes);
} else {
if (pingedLanes !== NoLanes) {
nextLanes = getHighestPriorityLanes(pingedLanes);
}
}
}
if (nextLanes === NoLanes) {
// This should only be reachable if we're suspended
// TODO: Consider warning in this path if a fallback timer is not scheduled.
return NoLanes;
} // If we're already in the middle of a render, switching lanes will interrupt
// it and we'll lose our progress. We should only do this if the new lanes are
// higher priority.
if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't
// bother waiting until the root is complete.
(wipLanes & suspendedLanes) === NoLanes) {
var nextLane = getHighestPriorityLane(nextLanes);
var wipLane = getHighestPriorityLane(wipLanes);
if ( // Tests whether the next lane is equal or lower priority than the wip
// one. This works because the bits decrease in priority as you go left.
nextLane >= wipLane || // Default priority updates should not interrupt transition updates. The
// only difference between default updates and transition updates is that
// default updates do not support refresh transitions.
nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes) {
// Keep working on the existing in-progress tree. Do not interrupt.
return wipLanes;
}
}
if ((nextLanes & InputContinuousLane) !== NoLanes) {
// When updates are sync by default, we entangle continuous priority updates
// and default updates, so they render in the same batch. The only reason
// they use separate lanes is because continuous updates should interrupt
// transitions, but default updates should not.
nextLanes |= pendingLanes & DefaultLane;
} // Check for entangled lanes and add them to the batch.
//
// A lane is said to be entangled with another when it's not allowed to render
// in a batch that does not also include the other lane. Typically we do this
// when multiple updates have the same source, and we only want to respond to
// the most recent event from that source.
//
// Note that we apply entanglements *after* checking for partial work above.
// This means that if a lane is entangled during an interleaved event while
// it's already rendering, we won't interrupt it. This is intentional, since
// entanglement is usually "best effort": we'll try our best to render the
// lanes in the same batch, but it's not worth throwing out partially
// completed work in order to do it.
// TODO: Reconsider this. The counter-argument is that the partial work
// represents an intermediate state, which we don't want to show to the user.
// And by spending extra time finishing it, we're increasing the amount of
// time it takes to show the final state, which is what they are actually
// waiting for.
//
// For those exceptions where entanglement is semantically important, like
// useMutableSource, we should ensure that there is no partial work at the
// time we apply the entanglement.
var entangledLanes = root.entangledLanes;
if (entangledLanes !== NoLanes) {
var entanglements = root.entanglements;
var lanes = nextLanes & entangledLanes;
while (lanes > 0) {
var index = pickArbitraryLaneIndex(lanes);
var lane = 1 << index;
nextLanes |= entanglements[index];
lanes &= ~lane;
}
}
return nextLanes;
}
function getMostRecentEventTime(root, lanes) {
var eventTimes = root.eventTimes;
var mostRecentEventTime = NoTimestamp;
while (lanes > 0) {
var index = pickArbitraryLaneIndex(lanes);
var lane = 1 << index;
var eventTime = eventTimes[index];
if (eventTime > mostRecentEventTime) {
mostRecentEventTime = eventTime;
}
lanes &= ~lane;
}
return mostRecentEventTime;
}
function computeExpirationTime(lane, currentTime) {
switch (lane) {
case SyncLane:
case InputContinuousHydrationLane:
case InputContinuousLane:
// User interactions should expire slightly more quickly.
//
// NOTE: This is set to the corresponding constant as in Scheduler.js.
// When we made it larger, a product metric in www regressed, suggesting
// there's a user interaction that's being starved by a series of
// synchronous updates. If that theory is correct, the proper solution is
// to fix the starvation. However, this scenario supports the idea that
// expiration times are an important safeguard when starvation
// does happen.
return currentTime + 250;
case DefaultHydrationLane:
case DefaultLane:
case TransitionHydrationLane:
case TransitionLane1:
case TransitionLane2:
case TransitionLane3:
case TransitionLane4:
case TransitionLane5:
case TransitionLane6:
case TransitionLane7:
case TransitionLane8:
case TransitionLane9:
case TransitionLane10:
case TransitionLane11:
case TransitionLane12:
case TransitionLane13:
case TransitionLane14:
case TransitionLane15:
case TransitionLane16:
return currentTime + 5000;
case RetryLane1:
case RetryLane2:
case RetryLane3:
case RetryLane4:
case RetryLane5:
// TODO: Retries should be allowed to expire if they are CPU bound for
// too long, but when I made this change it caused a spike in browser
// crashes. There must be some other underlying bug; not super urgent but
// ideally should figure out why and fix it. Unfortunately we don't have
// a repro for the crashes, only detected via production metrics.
return NoTimestamp;
case SelectiveHydrationLane:
case IdleHydrationLane:
case IdleLane:
case OffscreenLane:
// Anything idle priority or lower should never expire.
return NoTimestamp;
default:
{
error('Should have found matching lanes. This is a bug in React.');
}
return NoTimestamp;
}
}
function markStarvedLanesAsExpired(root, currentTime) {
// TODO: This gets called every time we yield. We can optimize by storing
// the earliest expiration time on the root. Then use that to quickly bail out
// of this function.
var pendingLanes = root.pendingLanes;
var suspendedLanes = root.suspendedLanes;
var pingedLanes = root.pingedLanes;
var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their
// expiration time. If so, we'll assume the update is being starved and mark
// it as expired to force it to finish.
var lanes = pendingLanes;
while (lanes > 0) {
var index = pickArbitraryLaneIndex(lanes);
var lane = 1 << index;
var expirationTime = expirationTimes[index];
if (expirationTime === NoTimestamp) {
// Found a pending lane with no expiration time. If it's not suspended, or
// if it's pinged, assume it's CPU-bound. Compute a new expiration time
// using the current time.
if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {
// Assumes timestamps are monotonically increasing.
expirationTimes[index] = computeExpirationTime(lane, currentTime);
}
} else if (expirationTime <= currentTime) {
// This lane expired
root.expiredLanes |= lane;
}
lanes &= ~lane;
}
} // This returns the highest priority pending lanes regardless of whether they
// are suspended.
function getHighestPriorityPendingLanes(root) {
return getHighestPriorityLanes(root.pendingLanes);
}
function getLanesToRetrySynchronouslyOnError(root) {
var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;
if (everythingButOffscreen !== NoLanes) {
return everythingButOffscreen;
}
if (everythingButOffscreen & OffscreenLane) {
return OffscreenLane;
}
return NoLanes;
}
function includesSyncLane(lanes) {
return (lanes & SyncLane) !== NoLanes;
}
function includesNonIdleWork(lanes) {
return (lanes & NonIdleLanes) !== NoLanes;
}
function includesOnlyRetries(lanes) {
return (lanes & RetryLanes) === lanes;
}
function includesOnlyNonUrgentLanes(lanes) {
var UrgentLanes = SyncLane | InputContinuousLane | DefaultLane;
return (lanes & UrgentLanes) === NoLanes;
}
function includesOnlyTransitions(lanes) {
return (lanes & TransitionLanes) === lanes;
}
function includesBlockingLane(root, lanes) {
var SyncDefaultLanes = InputContinuousHydrationLane | InputContinuousLane | DefaultHydrationLane | DefaultLane;
return (lanes & SyncDefaultLanes) !== NoLanes;
}
function includesExpiredLane(root, lanes) {
// This is a separate check from includesBlockingLane because a lane can
// expire after a render has already started.
return (lanes & root.expiredLanes) !== NoLanes;
}
function isTransitionLane(lane) {
return (lane & TransitionLanes) !== NoLanes;
}
function claimNextTransitionLane() {
// Cycle through the lanes, assigning each new transition to the next lane.
// In most cases, this means every transition gets its own lane, until we
// run out of lanes and cycle back to the beginning.
var lane = nextTransitionLane;
nextTransitionLane <<= 1;
if ((nextTransitionLane & TransitionLanes) === NoLanes) {
nextTransitionLane = TransitionLane1;
}
return lane;
}
function claimNextRetryLane() {
var lane = nextRetryLane;
nextRetryLane <<= 1;
if ((nextRetryLane & RetryLanes) === NoLanes) {
nextRetryLane = RetryLane1;
}
return lane;
}
function getHighestPriorityLane(lanes) {
return lanes & -lanes;
}
function pickArbitraryLane(lanes) {
// This wrapper function gets inlined. Only exists so to communicate that it
// doesn't matter which bit is selected; you can pick any bit without
// affecting the algorithms where its used. Here I'm using
// getHighestPriorityLane because it requires the fewest operations.
return getHighestPriorityLane(lanes);
}
function pickArbitraryLaneIndex(lanes) {
return 31 - clz32(lanes);
}
function laneToIndex(lane) {
return pickArbitraryLaneIndex(lane);
}
function includesSomeLane(a, b) {
return (a & b) !== NoLanes;
}
function isSubsetOfLanes(set, subset) {
return (set & subset) === subset;
}
function mergeLanes(a, b) {
return a | b;
}
function removeLanes(set, subset) {
return set & ~subset;
}
function intersectLanes(a, b) {
return a & b;
} // Seems redundant, but it changes the type from a single lane (used for
// updates) to a group of lanes (used for flushing work).
function laneToLanes(lane) {
return lane;
}
function higherPriorityLane(a, b) {
// This works because the bit ranges decrease in priority as you go left.
return a !== NoLane && a < b ? a : b;
}
function createLaneMap(initial) {
// Intentionally pushing one by one.
// https://v8.dev/blog/elements-kinds#avoid-creating-holes
var laneMap = [];
for (var i = 0; i < TotalLanes; i++) {
laneMap.push(initial);
}
return laneMap;
}
function markRootUpdated(root, updateLane, eventTime) {
root.pendingLanes |= updateLane; // If there are any suspended transitions, it's possible this new update
// could unblock them. Clear the suspended lanes so that we can try rendering
// them again.
//
// TODO: We really only need to unsuspend only lanes that are in the
// `subtreeLanes` of the updated fiber, or the update lanes of the return
// path. This would exclude suspended updates in an unrelated sibling tree,
// since there's no way for this update to unblock it.
//
// We don't do this if the incoming update is idle, because we never process
// idle updates until after all the regular updates have finished; there's no
// way it could unblock a transition.
if (updateLane !== IdleLane) {
root.suspendedLanes = NoLanes;
root.pingedLanes = NoLanes;
}
var eventTimes = root.eventTimes;
var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most
// recent event, and we assume time is monotonically increasing.
eventTimes[index] = eventTime;
}
function markRootSuspended(root, suspendedLanes) {
root.suspendedLanes |= suspendedLanes;
root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.
var expirationTimes = root.expirationTimes;
var lanes = suspendedLanes;
while (lanes > 0) {
var index = pickArbitraryLaneIndex(lanes);
var lane = 1 << index;
expirationTimes[index] = NoTimestamp;
lanes &= ~lane;
}
}
function markRootPinged(root, pingedLanes, eventTime) {
root.pingedLanes |= root.suspendedLanes & pingedLanes;
}
function markRootFinished(root, remainingLanes) {
var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;
root.pendingLanes = remainingLanes; // Let's try everything again
root.suspendedLanes = NoLanes;
root.pingedLanes = NoLanes;
root.expiredLanes &= remainingLanes;
root.mutableReadLanes &= remainingLanes;
root.entangledLanes &= remainingLanes;
var entanglements = root.entanglements;
var eventTimes = root.eventTimes;
var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work
var lanes = noLongerPendingLanes;
while (lanes > 0) {
var index = pickArbitraryLaneIndex(lanes);
var lane = 1 << index;
entanglements[index] = NoLanes;
eventTimes[index] = NoTimestamp;
expirationTimes[index] = NoTimestamp;
lanes &= ~lane;
}
}
function markRootEntangled(root, entangledLanes) {
// In addition to entangling each of the given lanes with each other, we also
// have to consider _transitive_ entanglements. For each lane that is already
// entangled with *any* of the given lanes, that lane is now transitively
// entangled with *all* the given lanes.
//
// Translated: If C is entangled with A, then entangling A with B also
// entangles C with B.
//
// If this is hard to grasp, it might help to intentionally break this
// function and look at the tests that fail in ReactTransition-test.js. Try
// commenting out one of the conditions below.
var rootEntangledLanes = root.entangledLanes |= entangledLanes;
var entanglements = root.entanglements;
var lanes = rootEntangledLanes;
while (lanes) {
var index = pickArbitraryLaneIndex(lanes);
var lane = 1 << index;
if ( // Is this one of the newly entangled lanes?
lane & entangledLanes | // Is this lane transitively entangled with the newly entangled lanes?
entanglements[index] & entangledLanes) {
entanglements[index] |= entangledLanes;
}
lanes &= ~lane;
}
}
function getBumpedLaneForHydration(root, renderLanes) {
var renderLane = getHighestPriorityLane(renderLanes);
var lane;
switch (renderLane) {
case InputContinuousLane:
lane = InputContinuousHydrationLane;
break;
case DefaultLane:
lane = DefaultHydrationLane;
break;
case TransitionLane1:
case TransitionLane2:
case TransitionLane3:
case TransitionLane4:
case TransitionLane5:
case TransitionLane6:
case TransitionLane7:
case TransitionLane8:
case TransitionLane9:
case TransitionLane10:
case TransitionLane11:
case TransitionLane12:
case TransitionLane13:
case TransitionLane14:
case TransitionLane15:
case TransitionLane16:
case RetryLane1:
case RetryLane2:
case RetryLane3:
case RetryLane4:
case RetryLane5:
lane = TransitionHydrationLane;
break;
case IdleLane:
lane = IdleHydrationLane;
break;
default:
// Everything else is already either a hydration lane, or shouldn't
// be retried at a hydration lane.
lane = NoLane;
break;
} // Check if the lane we chose is suspended. If so, that indicates that we
// already attempted and failed to hydrate at that level. Also check if we're
// already rendering that lane, which is rare but could happen.
if ((lane & (root.suspendedLanes | renderLanes)) !== NoLane) {
// Give up trying to hydrate and fall back to client render.
return NoLane;
}
return lane;
}
function addFiberToLanesMap(root, fiber, lanes) {
if (!isDevToolsPresent) {
return;
}
var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;
while (lanes > 0) {
var index = laneToIndex(lanes);
var lane = 1 << index;
var updaters = pendingUpdatersLaneMap[index];
updaters.add(fiber);
lanes &= ~lane;
}
}
function movePendingFibersToMemoized(root, lanes) {
if (!isDevToolsPresent) {
return;
}
var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;
var memoizedUpdaters = root.memoizedUpdaters;
while (lanes > 0) {
var index = laneToIndex(lanes);
var lane = 1 << index;
var updaters = pendingUpdatersLaneMap[index];
if (updaters.size > 0) {
updaters.forEach(function (fiber) {
var alternate = fiber.alternate;
if (alternate === null || !memoizedUpdaters.has(alternate)) {
memoizedUpdaters.add(fiber);
}
});
updaters.clear();
}
lanes &= ~lane;
}
}
function getTransitionsForLanes(root, lanes) {
{
return null;
}
}
var DiscreteEventPriority = SyncLane;
var ContinuousEventPriority = InputContinuousLane;
var DefaultEventPriority = DefaultLane;
var IdleEventPriority = IdleLane;
var currentUpdatePriority = NoLane;
function getCurrentUpdatePriority() {
return currentUpdatePriority;
}
function setCurrentUpdatePriority(newPriority) {
currentUpdatePriority = newPriority;
}
function runWithPriority(priority, fn) {
var previousPriority = currentUpdatePriority;
try {
currentUpdatePriority = priority;
return fn();
} finally {
currentUpdatePriority = previousPriority;
}
}
function higherEventPriority(a, b) {
return a !== 0 && a < b ? a : b;
}
function lowerEventPriority(a, b) {
return a === 0 || a > b ? a : b;
}
function isHigherEventPriority(a, b) {
return a !== 0 && a < b;
}
function lanesToEventPriority(lanes) {
var lane = getHighestPriorityLane(lanes);
if (!isHigherEventPriority(DiscreteEventPriority, lane)) {
return DiscreteEventPriority;
}
if (!isHigherEventPriority(ContinuousEventPriority, lane)) {
return ContinuousEventPriority;
}
if (includesNonIdleWork(lane)) {
return DefaultEventPriority;
}
return IdleEventPriority;
}
// This is imported by the event replaying implementation in React DOM. It's
// in a separate file to break a circular dependency between the renderer and
// the reconciler.
function isRootDehydrated(root) {
var currentState = root.current.memoizedState;
return currentState.isDehydrated;
}
var _attemptSynchronousHydration;
function setAttemptSynchronousHydration(fn) {
_attemptSynchronousHydration = fn;
}
function attemptSynchronousHydration(fiber) {
_attemptSynchronousHydration(fiber);
}
var attemptContinuousHydration;
function setAttemptContinuousHydration(fn) {
attemptContinuousHydration = fn;
}
var attemptHydrationAtCurrentPriority;
function setAttemptHydrationAtCurrentPriority(fn) {
attemptHydrationAtCurrentPriority = fn;
}
var getCurrentUpdatePriority$1;
function setGetCurrentUpdatePriority(fn) {
getCurrentUpdatePriority$1 = fn;
}
var attemptHydrationAtPriority;
function setAttemptHydrationAtPriority(fn) {
attemptHydrationAtPriority = fn;
} // TODO: Upgrade this definition once we're on a newer version of Flow that
// has this definition built-in.
var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.
var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.
// if the last target was dehydrated.
var queuedFocus = null;
var queuedDrag = null;
var queuedMouse = null; // For pointer events there can be one latest event per pointerId.
var queuedPointers = new Map();
var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.
var queuedExplicitHydrationTargets = [];
var discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase
'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit'];
function isDiscreteEventThatRequiresHydration(eventType) {
return discreteReplayableEvents.indexOf(eventType) > -1;
}
function createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
return {
blockedOn: blockedOn,
domEventName: domEventName,
eventSystemFlags: eventSystemFlags,
nativeEvent: nativeEvent,
targetContainers: [targetContainer]
};
}
function clearIfContinuousEvent(domEventName, nativeEvent) {
switch (domEventName) {
case 'focusin':
case 'focusout':
queuedFocus = null;
break;
case 'dragenter':
case 'dragleave':
queuedDrag = null;
break;
case 'mouseover':
case 'mouseout':
queuedMouse = null;
break;
case 'pointerover':
case 'pointerout':
{
var pointerId = nativeEvent.pointerId;
queuedPointers.delete(pointerId);
break;
}
case 'gotpointercapture':
case 'lostpointercapture':
{
var _pointerId = nativeEvent.pointerId;
queuedPointerCaptures.delete(_pointerId);
break;
}
}
}
function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {
var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
if (blockedOn !== null) {
var _fiber2 = getInstanceFromNode(blockedOn);
if (_fiber2 !== null) {
// Attempt to increase the priority of this target.
attemptContinuousHydration(_fiber2);
}
}
return queuedEvent;
} // If we have already queued this exact event, then it's because
// the different event systems have different DOM event listeners.
// We can accumulate the flags, and the targetContainers, and
// store a single event to be replayed.
existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
var targetContainers = existingQueuedEvent.targetContainers;
if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {
targetContainers.push(targetContainer);
}
return existingQueuedEvent;
}
function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
// These set relatedTarget to null because the replayed event will be treated as if we
// moved from outside the window (no target) onto the target once it hydrates.
// Instead of mutating we could clone the event.
switch (domEventName) {
case 'focusin':
{
var focusEvent = nativeEvent;
queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);
return true;
}
case 'dragenter':
{
var dragEvent = nativeEvent;
queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);
return true;
}
case 'mouseover':
{
var mouseEvent = nativeEvent;
queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);
return true;
}
case 'pointerover':
{
var pointerEvent = nativeEvent;
var pointerId = pointerEvent.pointerId;
queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));
return true;
}
case 'gotpointercapture':
{
var _pointerEvent = nativeEvent;
var _pointerId2 = _pointerEvent.pointerId;
queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));
return true;
}
}
return false;
} // Check if this target is unblocked. Returns true if it's unblocked.
function attemptExplicitHydrationTarget(queuedTarget) {
// TODO: This function shares a lot of logic with findInstanceBlockingEvent.
// Try to unify them. It's a bit tricky since it would require two return
// values.
var targetInst = getClosestInstanceFromNode(queuedTarget.target);
if (targetInst !== null) {
var nearestMounted = getNearestMountedFiber(targetInst);
if (nearestMounted !== null) {
var tag = nearestMounted.tag;
if (tag === SuspenseComponent) {
var instance = getSuspenseInstanceFromFiber(nearestMounted);
if (instance !== null) {
// We're blocked on hydrating this boundary.
// Increase its priority.
queuedTarget.blockedOn = instance;
attemptHydrationAtPriority(queuedTarget.priority, function () {
attemptHydrationAtCurrentPriority(nearestMounted);
});
return;
}
} else if (tag === HostRoot) {
var root = nearestMounted.stateNode;
if (isRootDehydrated(root)) {
queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of
// a root other than sync.
return;
}
}
}
}
queuedTarget.blockedOn = null;
}
function queueExplicitHydrationTarget(target) {
// TODO: This will read the priority if it's dispatched by the React
// event system but not native events. Should read window.event.type, like
// we do for updates (getCurrentEventPriority).
var updatePriority = getCurrentUpdatePriority$1();
var queuedTarget = {
blockedOn: null,
target: target,
priority: updatePriority
};
var i = 0;
for (; i < queuedExplicitHydrationTargets.length; i++) {
// Stop once we hit the first target with lower priority than
if (!isHigherEventPriority(updatePriority, queuedExplicitHydrationTargets[i].priority)) {
break;
}
}
queuedExplicitHydrationTargets.splice(i, 0, queuedTarget);
if (i === 0) {
attemptExplicitHydrationTarget(queuedTarget);
}
}
function attemptReplayContinuousQueuedEvent(queuedEvent) {
if (queuedEvent.blockedOn !== null) {
return false;
}
var targetContainers = queuedEvent.targetContainers;
while (targetContainers.length > 0) {
var targetContainer = targetContainers[0];
var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);
if (nextBlockedOn === null) {
{
var nativeEvent = queuedEvent.nativeEvent;
var nativeEventClone = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
setReplayingEvent(nativeEventClone);
nativeEvent.target.dispatchEvent(nativeEventClone);
resetReplayingEvent();
}
} else {
// We're still blocked. Try again later.
var _fiber3 = getInstanceFromNode(nextBlockedOn);
if (_fiber3 !== null) {
attemptContinuousHydration(_fiber3);
}
queuedEvent.blockedOn = nextBlockedOn;
return false;
} // This target container was successfully dispatched. Try the next.
targetContainers.shift();
}
return true;
}
function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
if (attemptReplayContinuousQueuedEvent(queuedEvent)) {
map.delete(key);
}
}
function replayUnblockedEvents() {
hasScheduledReplayAttempt = false;
if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {
queuedFocus = null;
}
if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {
queuedDrag = null;
}
if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {
queuedMouse = null;
}
queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
}
function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
if (queuedEvent.blockedOn === unblocked) {
queuedEvent.blockedOn = null;
if (!hasScheduledReplayAttempt) {
hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are
// now unblocked. This first might not actually be unblocked yet.
// We could check it early to avoid scheduling an unnecessary callback.
unstable_scheduleCallback(unstable_NormalPriority, replayUnblockedEvents);
}
}
}
function retryIfBlockedOn(unblocked) {
// Mark anything that was blocked on this as no longer blocked
// and eligible for a replay.
if (queuedDiscreteEvents.length > 0) {
scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's
// worth it because we expect very few discrete events to queue up and once
// we are actually fully unblocked it will be fast to replay them.
for (var i = 1; i < queuedDiscreteEvents.length; i++) {
var queuedEvent = queuedDiscreteEvents[i];
if (queuedEvent.blockedOn === unblocked) {
queuedEvent.blockedOn = null;
}
}
}
if (queuedFocus !== null) {
scheduleCallbackIfUnblocked(queuedFocus, unblocked);
}
if (queuedDrag !== null) {
scheduleCallbackIfUnblocked(queuedDrag, unblocked);
}
if (queuedMouse !== null) {
scheduleCallbackIfUnblocked(queuedMouse, unblocked);
}
var unblock = function (queuedEvent) {
return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
};
queuedPointers.forEach(unblock);
queuedPointerCaptures.forEach(unblock);
for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {
var queuedTarget = queuedExplicitHydrationTargets[_i];
if (queuedTarget.blockedOn === unblocked) {
queuedTarget.blockedOn = null;
}
}
while (queuedExplicitHydrationTargets.length > 0) {
var nextExplicitTarget = queuedExplicitHydrationTargets[0];
if (nextExplicitTarget.blockedOn !== null) {
// We're still blocked.
break;
} else {
attemptExplicitHydrationTarget(nextExplicitTarget);
if (nextExplicitTarget.blockedOn === null) {
// We're unblocked.
queuedExplicitHydrationTargets.shift();
}
}
}
}
var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; // TODO: can we stop exporting these?
var _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.
// We'd like to remove this but it's not clear if this is safe.
function setEnabled(enabled) {
_enabled = !!enabled;
}
function isEnabled() {
return _enabled;
}
function createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {
var eventPriority = getEventPriority(domEventName);
var listenerWrapper;
switch (eventPriority) {
case DiscreteEventPriority:
listenerWrapper = dispatchDiscreteEvent;
break;
case ContinuousEventPriority:
listenerWrapper = dispatchContinuousEvent;
break;
case DefaultEventPriority:
default:
listenerWrapper = dispatchEvent;
break;
}
return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);
}
function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {
var previousPriority = getCurrentUpdatePriority();
var prevTransition = ReactCurrentBatchConfig.transition;
ReactCurrentBatchConfig.transition = null;
try {
setCurrentUpdatePriority(DiscreteEventPriority);
dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
} finally {
setCurrentUpdatePriority(previousPriority);
ReactCurrentBatchConfig.transition = prevTransition;
}
}
function dispatchContinuousEvent(domEventName, eventSystemFlags, container, nativeEvent) {
var previousPriority = getCurrentUpdatePriority();
var prevTransition = ReactCurrentBatchConfig.transition;
ReactCurrentBatchConfig.transition = null;
try {
setCurrentUpdatePriority(ContinuousEventPriority);
dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
} finally {
setCurrentUpdatePriority(previousPriority);
ReactCurrentBatchConfig.transition = prevTransition;
}
}
function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
if (!_enabled) {
return;
}
{
dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent);
}
}
function dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
var blockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);
if (blockedOn === null) {
dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);
clearIfContinuousEvent(domEventName, nativeEvent);
return;
}
if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {
nativeEvent.stopPropagation();
return;
} // We need to clear only if we didn't queue because
// queueing is accumulative.
clearIfContinuousEvent(domEventName, nativeEvent);
if (eventSystemFlags & IS_CAPTURE_PHASE && isDiscreteEventThatRequiresHydration(domEventName)) {
while (blockedOn !== null) {
var fiber = getInstanceFromNode(blockedOn);
if (fiber !== null) {
attemptSynchronousHydration(fiber);
}
var nextBlockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);
if (nextBlockedOn === null) {
dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);
}
if (nextBlockedOn === blockedOn) {
break;
}
blockedOn = nextBlockedOn;
}
if (blockedOn !== null) {
nativeEvent.stopPropagation();
}
return;
} // This is not replayable so we'll invoke it but without a target,
// in case the event system needs to trace it.
dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);
}
var return_targetInst = null; // Returns a SuspenseInstance or Container if it's blocked.
// The return_targetInst field above is conceptually part of the return value.
function findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
// TODO: Warn if _enabled is false.
return_targetInst = null;
var nativeEventTarget = getEventTarget(nativeEvent);
var targetInst = getClosestInstanceFromNode(nativeEventTarget);
if (targetInst !== null) {
var nearestMounted = getNearestMountedFiber(targetInst);
if (nearestMounted === null) {
// This tree has been unmounted already. Dispatch without a target.
targetInst = null;
} else {
var tag = nearestMounted.tag;
if (tag === SuspenseComponent) {
var instance = getSuspenseInstanceFromFiber(nearestMounted);
if (instance !== null) {
// Queue the event to be replayed later. Abort dispatching since we
// don't want this event dispatched twice through the event system.
// TODO: If this is the first discrete event in the queue. Schedule an increased
// priority for this boundary.
return instance;
} // This shouldn't happen, something went wrong but to avoid blocking
// the whole system, dispatch the event without a target.
// TODO: Warn.
targetInst = null;
} else if (tag === HostRoot) {
var root = nearestMounted.stateNode;
if (isRootDehydrated(root)) {
// If this happens during a replay something went wrong and it might block
// the whole system.
return getContainerFromFiber(nearestMounted);
}
targetInst = null;
} else if (nearestMounted !== targetInst) {
// If we get an event (ex: img onload) before committing that
// component's mount, ignore it for now (that is, treat it as if it was an
// event on a non-React tree). We might also consider queueing events and
// dispatching them after the mount.
targetInst = null;
}
}
}
return_targetInst = targetInst; // We're not blocked on anything.
return null;
}
function getEventPriority(domEventName) {
switch (domEventName) {
// Used by SimpleEventPlugin:
case 'cancel':
case 'click':
case 'close':
case 'contextmenu':
case 'copy':
case 'cut':
case 'auxclick':
case 'dblclick':
case 'dragend':
case 'dragstart':
case 'drop':
case 'focusin':
case 'focusout':
case 'input':
case 'invalid':
case 'keydown':
case 'keypress':
case 'keyup':
case 'mousedown':
case 'mouseup':
case 'paste':
case 'pause':
case 'play':
case 'pointercancel':
case 'pointerdown':
case 'pointerup':
case 'ratechange':
case 'reset':
case 'resize':
case 'seeked':
case 'submit':
case 'touchcancel':
case 'touchend':
case 'touchstart':
case 'volumechange': // Used by polyfills:
// eslint-disable-next-line no-fallthrough
case 'change':
case 'selectionchange':
case 'textInput':
case 'compositionstart':
case 'compositionend':
case 'compositionupdate': // Only enableCreateEventHandleAPI:
// eslint-disable-next-line no-fallthrough
case 'beforeblur':
case 'afterblur': // Not used by React but could be by user code:
// eslint-disable-next-line no-fallthrough
case 'beforeinput':
case 'blur':
case 'fullscreenchange':
case 'focus':
case 'hashchange':
case 'popstate':
case 'select':
case 'selectstart':
return DiscreteEventPriority;
case 'drag':
case 'dragenter':
case 'dragexit':
case 'dragleave':
case 'dragover':
case 'mousemove':
case 'mouseout':
case 'mouseover':
case 'pointermove':
case 'pointerout':
case 'pointerover':
case 'scroll':
case 'toggle':
case 'touchmove':
case 'wheel': // Not used by React but could be by user code:
// eslint-disable-next-line no-fallthrough
case 'mouseenter':
case 'mouseleave':
case 'pointerenter':
case 'pointerleave':
return ContinuousEventPriority;
case 'message':
{
// We might be in the Scheduler callback.
// Eventually this mechanism will be replaced by a check
// of the current priority on the native scheduler.
var schedulerPriority = getCurrentPriorityLevel();
switch (schedulerPriority) {
case ImmediatePriority:
return DiscreteEventPriority;
case UserBlockingPriority:
return ContinuousEventPriority;
case NormalPriority:
case LowPriority:
// TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.
return DefaultEventPriority;
case IdlePriority:
return IdleEventPriority;
default:
return DefaultEventPriority;
}
}
default:
return DefaultEventPriority;
}
}
function addEventBubbleListener(target, eventType, listener) {
target.addEventListener(eventType, listener, false);
return listener;
}
function addEventCaptureListener(target, eventType, listener) {
target.addEventListener(eventType, listener, true);
return listener;
}
function addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {
target.addEventListener(eventType, listener, {
capture: true,
passive: passive
});
return listener;
}
function addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {
target.addEventListener(eventType, listener, {
passive: passive
});
return listener;
}
/**
* These variables store information about text content of a target node,
* allowing comparison of content before and after a given event.
*
* Identify the node where selection currently begins, then observe
* both its text content and its current position in the DOM. Since the
* browser may natively replace the target node during composition, we can
* use its position to find its replacement.
*
*
*/
var root = null;
var startText = null;
var fallbackText = null;
function initialize(nativeEventTarget) {
root = nativeEventTarget;
startText = getText();
return true;
}
function reset() {
root = null;
startText = null;
fallbackText = null;
}
function getData() {
if (fallbackText) {
return fallbackText;
}
var start;
var startValue = startText;
var startLength = startValue.length;
var end;
var endValue = getText();
var endLength = endValue.length;
for (start = 0; start < startLength; start++) {
if (startValue[start] !== endValue[start]) {
break;
}
}
var minEnd = startLength - start;
for (end = 1; end <= minEnd; end++) {
if (startValue[startLength - end] !== endValue[endLength - end]) {
break;
}
}
var sliceTail = end > 1 ? 1 - end : undefined;
fallbackText = endValue.slice(start, sliceTail);
return fallbackText;
}
function getText() {
if ('value' in root) {
return root.value;
}
return root.textContent;
}
/**
* `charCode` represents the actual "character code" and is safe to use with
* `String.fromCharCode`. As such, only keys that correspond to printable
* characters produce a valid `charCode`, the only exception to this is Enter.
* The Tab-key is considered non-printable and does not have a `charCode`,
* presumably because it does not produce a tab-character in browsers.
*
* @param {object} nativeEvent Native browser event.
* @return {number} Normalized `charCode` property.
*/
function getEventCharCode(nativeEvent) {
var charCode;
var keyCode = nativeEvent.keyCode;
if ('charCode' in nativeEvent) {
charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.
if (charCode === 0 && keyCode === 13) {
charCode = 13;
}
} else {
// IE8 does not implement `charCode`, but `keyCode` has the correct value.
charCode = keyCode;
} // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
// report Enter as charCode 10 when ctrl is pressed.
if (charCode === 10) {
charCode = 13;
} // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
// Must not discard the (non-)printable Enter-key.
if (charCode >= 32 || charCode === 13) {
return charCode;
}
return 0;
}
function functionThatReturnsTrue() {
return true;
}
function functionThatReturnsFalse() {
return false;
} // This is intentionally a factory so that we have different returned constructors.
// If we had a single constructor, it would be megamorphic and engines would deopt.
function createSyntheticEvent(Interface) {
/**
* Synthetic events are dispatched by event plugins, typically in response to a
* top-level event delegation handler.
*
* These systems should generally use pooling to reduce the frequency of garbage
* collection. The system should check `isPersistent` to determine whether the
* event should be released into the pool after being dispatched. Users that
* need a persisted event should invoke `persist`.
*
* Synthetic events (and subclasses) implement the DOM Level 3 Events API by
* normalizing browser quirks. Subclasses do not necessarily have to implement a
* DOM interface; custom application-specific events can also subclass this.
*/
function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
this._reactName = reactName;
this._targetInst = targetInst;
this.type = reactEventType;
this.nativeEvent = nativeEvent;
this.target = nativeEventTarget;
this.currentTarget = null;
for (var _propName in Interface) {
if (!Interface.hasOwnProperty(_propName)) {
continue;
}
var normalize = Interface[_propName];
if (normalize) {
this[_propName] = normalize(nativeEvent);
} else {
this[_propName] = nativeEvent[_propName];
}
}
var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
if (defaultPrevented) {
this.isDefaultPrevented = functionThatReturnsTrue;
} else {
this.isDefaultPrevented = functionThatReturnsFalse;
}
this.isPropagationStopped = functionThatReturnsFalse;
return this;
}
assign(SyntheticBaseEvent.prototype, {
preventDefault: function () {
this.defaultPrevented = true;
var event = this.nativeEvent;
if (!event) {
return;
}
if (event.preventDefault) {
event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE
} else if (typeof event.returnValue !== 'unknown') {
event.returnValue = false;
}
this.isDefaultPrevented = functionThatReturnsTrue;
},
stopPropagation: function () {
var event = this.nativeEvent;
if (!event) {
return;
}
if (event.stopPropagation) {
event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE
} else if (typeof event.cancelBubble !== 'unknown') {
// The ChangeEventPlugin registers a "propertychange" event for
// IE. This event does not support bubbling or cancelling, and
// any references to cancelBubble throw "Member not found". A
// typeof check of "unknown" circumvents this issue (and is also
// IE specific).
event.cancelBubble = true;
}
this.isPropagationStopped = functionThatReturnsTrue;
},
/**
* We release all dispatched `SyntheticEvent`s after each event loop, adding
* them back into the pool. This allows a way to hold onto a reference that
* won't be added back into the pool.
*/
persist: function () {// Modern event system doesn't use pooling.
},
/**
* Checks if this event should be released back into the pool.
*
* @return {boolean} True if this should not be released, false otherwise.
*/
isPersistent: functionThatReturnsTrue
});
return SyntheticBaseEvent;
}
/**
* @interface Event
* @see http://www.w3.org/TR/DOM-Level-3-Events/
*/
var EventInterface = {
eventPhase: 0,
bubbles: 0,
cancelable: 0,
timeStamp: function (event) {
return event.timeStamp || Date.now();
},
defaultPrevented: 0,
isTrusted: 0
};
var SyntheticEvent = createSyntheticEvent(EventInterface);
var UIEventInterface = assign({}, EventInterface, {
view: 0,
detail: 0
});
var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);
var lastMovementX;
var lastMovementY;
var lastMouseEvent;
function updateMouseMovementPolyfillState(event) {
if (event !== lastMouseEvent) {
if (lastMouseEvent && event.type === 'mousemove') {
lastMovementX = event.screenX - lastMouseEvent.screenX;
lastMovementY = event.screenY - lastMouseEvent.screenY;
} else {
lastMovementX = 0;
lastMovementY = 0;
}
lastMouseEvent = event;
}
}
/**
* @interface MouseEvent
* @see http://www.w3.org/TR/DOM-Level-3-Events/
*/
var MouseEventInterface = assign({}, UIEventInterface, {
screenX: 0,
screenY: 0,
clientX: 0,
clientY: 0,
pageX: 0,
pageY: 0,
ctrlKey: 0,
shiftKey: 0,
altKey: 0,
metaKey: 0,
getModifierState: getEventModifierState,
button: 0,
buttons: 0,
relatedTarget: function (event) {
if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;
return event.relatedTarget;
},
movementX: function (event) {
if ('movementX' in event) {
return event.movementX;
}
updateMouseMovementPolyfillState(event);
return lastMovementX;
},
movementY: function (event) {
if ('movementY' in event) {
return event.movementY;
} // Don't need to call updateMouseMovementPolyfillState() here
// because it's guaranteed to have already run when movementX
// was copied.
return lastMovementY;
}
});
var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);
/**
* @interface DragEvent
* @see http://www.w3.org/TR/DOM-Level-3-Events/
*/
var DragEventInterface = assign({}, MouseEventInterface, {
dataTransfer: 0
});
var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);
/**
* @interface FocusEvent
* @see http://www.w3.org/TR/DOM-Level-3-Events/
*/
var FocusEventInterface = assign({}, UIEventInterface, {
relatedTarget: 0
});
var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);
/**
* @interface Event
* @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
* @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
*/
var AnimationEventInterface = assign({}, EventInterface, {
animationName: 0,
elapsedTime: 0,
pseudoElement: 0
});
var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);
/**
* @interface Event
* @see http://www.w3.org/TR/clipboard-apis/
*/
var ClipboardEventInterface = assign({}, EventInterface, {
clipboardData: function (event) {
return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
}
});
var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);
/**
* @interface Event
* @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
*/
var CompositionEventInterface = assign({}, EventInterface, {
data: 0
});
var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);
/**
* @interface Event
* @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
* /#events-inputevents
*/
// Happens to share the same list for now.
var SyntheticInputEvent = SyntheticCompositionEvent;
/**
* Normalization of deprecated HTML5 `key` values
* @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
*/
var normalizeKey = {
Esc: 'Escape',
Spacebar: ' ',
Left: 'ArrowLeft',
Up: 'ArrowUp',
Right: 'ArrowRight',
Down: 'ArrowDown',
Del: 'Delete',
Win: 'OS',
Menu: 'ContextMenu',
Apps: 'ContextMenu',
Scroll: 'ScrollLock',
MozPrintableKey: 'Unidentified'
};
/**
* Translation from legacy `keyCode` to HTML5 `key`
* Only special keys supported, all others depend on keyboard layout or browser
* @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
*/
var translateToKey = {
'8': 'Backspace',
'9': 'Tab',
'12': 'Clear',
'13': 'Enter',
'16': 'Shift',
'17': 'Control',
'18': 'Alt',
'19': 'Pause',
'20': 'CapsLock',
'27': 'Escape',
'32': ' ',
'33': 'PageUp',
'34': 'PageDown',
'35': 'End',
'36': 'Home',
'37': 'ArrowLeft',
'38': 'ArrowUp',
'39': 'ArrowRight',
'40': 'ArrowDown',
'45': 'Insert',
'46': 'Delete',
'112': 'F1',
'113': 'F2',
'114': 'F3',
'115': 'F4',
'116': 'F5',
'117': 'F6',
'118': 'F7',
'119': 'F8',
'120': 'F9',
'121': 'F10',
'122': 'F11',
'123': 'F12',
'144': 'NumLock',
'145': 'ScrollLock',
'224': 'Meta'
};
/**
* @param {object} nativeEvent Native browser event.
* @return {string} Normalized `key` property.
*/
function getEventKey(nativeEvent) {
if (nativeEvent.key) {
// Normalize inconsistent values reported by browsers due to
// implementations of a working draft specification.
// FireFox implements `key` but returns `MozPrintableKey` for all
// printable characters (normalized to `Unidentified`), ignore it.
var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
if (key !== 'Unidentified') {
return key;
}
} // Browser does not implement `key`, polyfill as much of it as we can.
if (nativeEvent.type === 'keypress') {
var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
// thus be captured by `keypress`, no other non-printable key should.
return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
}
if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
// While user keyboard layout determines the actual meaning of each
// `keyCode` value, almost all function keys have a universal value.
return translateToKey[nativeEvent.keyCode] || 'Unidentified';
}
return '';
}
/**
* Translation from modifier key to the associated property in the event.
* @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
*/
var modifierKeyToProp = {
Alt: 'altKey',
Control: 'ctrlKey',
Meta: 'metaKey',
Shift: 'shiftKey'
}; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
// getModifierState. If getModifierState is not supported, we map it to a set of
// modifier keys exposed by the event. In this case, Lock-keys are not supported.
function modifierStateGetter(keyArg) {
var syntheticEvent = this;
var nativeEvent = syntheticEvent.nativeEvent;
if (nativeEvent.getModifierState) {
return nativeEvent.getModifierState(keyArg);
}
var keyProp = modifierKeyToProp[keyArg];
return keyProp ? !!nativeEvent[keyProp] : false;
}
function getEventModifierState(nativeEvent) {
return modifierStateGetter;
}
/**
* @interface KeyboardEvent
* @see http://www.w3.org/TR/DOM-Level-3-Events/
*/
var KeyboardEventInterface = assign({}, UIEventInterface, {
key: getEventKey,
code: 0,
location: 0,
ctrlKey: 0,
shiftKey: 0,
altKey: 0,
metaKey: 0,
repeat: 0,
locale: 0,
getModifierState: getEventModifierState,
// Legacy Interface
charCode: function (event) {
// `charCode` is the result of a KeyPress event and represents the value of
// the actual printable character.
// KeyPress is deprecated, but its replacement is not yet final and not
// implemented in any major browser. Only KeyPress has charCode.
if (event.type === 'keypress') {
return getEventCharCode(event);
}
return 0;
},
keyCode: function (event) {
// `keyCode` is the result of a KeyDown/Up event and represents the value of
// physical keyboard key.
// The actual meaning of the value depends on the users' keyboard layout
// which cannot be detected. Assuming that it is a US keyboard layout
// provides a surprisingly accurate mapping for US and European users.
// Due to this, it is left to the user to implement at this time.
if (event.type === 'keydown' || event.type === 'keyup') {
return event.keyCode;
}
return 0;
},
which: function (event) {
// `which` is an alias for either `keyCode` or `charCode` depending on the
// type of the event.
if (event.type === 'keypress') {
return getEventCharCode(event);
}
if (event.type === 'keydown' || event.type === 'keyup') {
return event.keyCode;
}
return 0;
}
});
var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);
/**
* @interface PointerEvent
* @see http://www.w3.org/TR/pointerevents/
*/
var PointerEventInterface = assign({}, MouseEventInterface, {
pointerId: 0,
width: 0,
height: 0,
pressure: 0,
tangentialPressure: 0,
tiltX: 0,
tiltY: 0,
twist: 0,
pointerType: 0,
isPrimary: 0
});
var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);
/**
* @interface TouchEvent
* @see http://www.w3.org/TR/touch-events/
*/
var TouchEventInterface = assign({}, UIEventInterface, {
touches: 0,
targetTouches: 0,
changedTouches: 0,
altKey: 0,
metaKey: 0,
ctrlKey: 0,
shiftKey: 0,
getModifierState: getEventModifierState
});
var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);
/**
* @interface Event
* @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
* @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
*/
var TransitionEventInterface = assign({}, EventInterface, {
propertyName: 0,
elapsedTime: 0,
pseudoElement: 0
});
var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);
/**
* @interface WheelEvent
* @see http://www.w3.org/TR/DOM-Level-3-Events/
*/
var WheelEventInterface = assign({}, MouseEventInterface, {
deltaX: function (event) {
return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
},
deltaY: function (event) {
return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
'wheelDelta' in event ? -event.wheelDelta : 0;
},
deltaZ: 0,
// Browsers without "deltaMode" is reporting in raw wheel delta where one
// notch on the scroll is always +/- 120, roughly equivalent to pixels.
// A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
// ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
deltaMode: 0
});
var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);
var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
var START_KEYCODE = 229;
var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;
var documentMode = null;
if (canUseDOM && 'documentMode' in document) {
documentMode = document.documentMode;
} // Webkit offers a very useful `textInput` event that can be used to
// directly represent `beforeInput`. The IE `textinput` event is not as
// useful, so we don't use it.
var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied
// by the native compositionend event may be incorrect. Japanese ideographic
// spaces, for instance (\u3000) are not recorded correctly.
var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
var SPACEBAR_CODE = 32;
var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
function registerEvents() {
registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);
registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
} // Track whether we've ever handled a keypress on the space key.
var hasSpaceKeypress = false;
/**
* Return whether a native keypress event is assumed to be a command.
* This is required because Firefox fires `keypress` events for key commands
* (cut, copy, select-all, etc.) even though no character is inserted.
*/
function isKeypressCommand(nativeEvent) {
return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.
!(nativeEvent.ctrlKey && nativeEvent.altKey);
}
/**
* Translate native top level events into event types.
*/
function getCompositionEventType(domEventName) {
switch (domEventName) {
case 'compositionstart':
return 'onCompositionStart';
case 'compositionend':
return 'onCompositionEnd';
case 'compositionupdate':
return 'onCompositionUpdate';
}
}
/**
* Does our fallback best-guess model think this event signifies that
* composition has begun?
*/
function isFallbackCompositionStart(domEventName, nativeEvent) {
return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;
}
/**
* Does our fallback mode think that this event is the end of composition?
*/
function isFallbackCompositionEnd(domEventName, nativeEvent) {
switch (domEventName) {
case 'keyup':
// Command keys insert or clear IME input.
return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
case 'keydown':
// Expect IME keyCode on each keydown. If we get any other
// code we must have exited earlier.
return nativeEvent.keyCode !== START_KEYCODE;
case 'keypress':
case 'mousedown':
case 'focusout':
// Events are not possible without cancelling IME.
return true;
default:
return false;
}
}
/**
* Google Input Tools provides composition data via a CustomEvent,
* with the `data` property populated in the `detail` object. If this
* is available on the event object, use it. If not, this is a plain
* composition event and we have nothing special to extract.
*
* @param {object} nativeEvent
* @return {?string}
*/
function getDataFromCustomEvent(nativeEvent) {
var detail = nativeEvent.detail;
if (typeof detail === 'object' && 'data' in detail) {
return detail.data;
}
return null;
}
/**
* Check if a composition event was triggered by Korean IME.
* Our fallback mode does not work well with IE's Korean IME,
* so just use native composition events when Korean IME is used.
* Although CompositionEvent.locale property is deprecated,
* it is available in IE, where our fallback mode is enabled.
*
* @param {object} nativeEvent
* @return {boolean}
*/
function isUsingKoreanIME(nativeEvent) {
return nativeEvent.locale === 'ko';
} // Track the current IME composition status, if any.
var isComposing = false;
/**
* @return {?object} A SyntheticCompositionEvent.
*/
function extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
var eventType;
var fallbackData;
if (canUseCompositionEvent) {
eventType = getCompositionEventType(domEventName);
} else if (!isComposing) {
if (isFallbackCompositionStart(domEventName, nativeEvent)) {
eventType = 'onCompositionStart';
}
} else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {
eventType = 'onCompositionEnd';
}
if (!eventType) {
return null;
}
if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
// The current composition is stored statically and must not be
// overwritten while composition continues.
if (!isComposing && eventType === 'onCompositionStart') {
isComposing = initialize(nativeEventTarget);
} else if (eventType === 'onCompositionEnd') {
if (isComposing) {
fallbackData = getData();
}
}
}
var listeners = accumulateTwoPhaseListeners(targetInst, eventType);
if (listeners.length > 0) {
var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);
dispatchQueue.push({
event: event,
listeners: listeners
});
if (fallbackData) {
// Inject data generated from fallback path into the synthetic event.
// This matches the property of native CompositionEventInterface.
event.data = fallbackData;
} else {
var customData = getDataFromCustomEvent(nativeEvent);
if (customData !== null) {
event.data = customData;
}
}
}
}
function getNativeBeforeInputChars(domEventName, nativeEvent) {
switch (domEventName) {
case 'compositionend':
return getDataFromCustomEvent(nativeEvent);
case 'keypress':
/**
* If native `textInput` events are available, our goal is to make
* use of them. However, there is a special case: the spacebar key.
* In Webkit, preventing default on a spacebar `textInput` event
* cancels character insertion, but it *also* causes the browser
* to fall back to its default spacebar behavior of scrolling the
* page.
*
* Tracking at:
* https://code.google.com/p/chromium/issues/detail?id=355103
*
* To avoid this issue, use the keypress event as if no `textInput`
* event is available.
*/
var which = nativeEvent.which;
if (which !== SPACEBAR_CODE) {
return null;
}
hasSpaceKeypress = true;
return SPACEBAR_CHAR;
case 'textInput':
// Record the characters to be added to the DOM.
var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled
// it at the keypress level and bail immediately. Android Chrome
// doesn't give us keycodes, so we need to ignore it.
if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
return null;
}
return chars;
default:
// For other native event types, do nothing.
return null;
}
}
/**
* For browsers that do not provide the `textInput` event, extract the
* appropriate string to use for SyntheticInputEvent.
*/
function getFallbackBeforeInputChars(domEventName, nativeEvent) {
// If we are currently composing (IME) and using a fallback to do so,
// try to extract the composed characters from the fallback object.
// If composition event is available, we extract a string only at
// compositionevent, otherwise extract it at fallback events.
if (isComposing) {
if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {
var chars = getData();
reset();
isComposing = false;
return chars;
}
return null;
}
switch (domEventName) {
case 'paste':
// If a paste event occurs after a keypress, throw out the input
// chars. Paste events should not lead to BeforeInput events.
return null;
case 'keypress':
/**
* As of v27, Firefox may fire keypress events even when no character
* will be inserted. A few possibilities:
*
* - `which` is `0`. Arrow keys, Esc key, etc.
*
* - `which` is the pressed key code, but no char is available.
* Ex: 'AltGr + d` in Polish. There is no modified character for
* this key combination and no character is inserted into the
* document, but FF fires the keypress for char code `100` anyway.
* No `input` event will occur.
*
* - `which` is the pressed key code, but a command combination is
* being used. Ex: `Cmd+C`. No character is inserted, and no
* `input` event will occur.
*/
if (!isKeypressCommand(nativeEvent)) {
// IE fires the `keypress` event when a user types an emoji via
// Touch keyboard of Windows. In such a case, the `char` property
// holds an emoji character like `\uD83D\uDE0A`. Because its length
// is 2, the property `which` does not represent an emoji correctly.
// In such a case, we directly return the `char` property instead of
// using `which`.
if (nativeEvent.char && nativeEvent.char.length > 1) {
return nativeEvent.char;
} else if (nativeEvent.which) {
return String.fromCharCode(nativeEvent.which);
}
}
return null;
case 'compositionend':
return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;
default:
return null;
}
}
/**
* Extract a SyntheticInputEvent for `beforeInput`, based on either native
* `textInput` or fallback behavior.
*
* @return {?object} A SyntheticInputEvent.
*/
function extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
var chars;
if (canUseTextInputEvent) {
chars = getNativeBeforeInputChars(domEventName, nativeEvent);
} else {
chars = getFallbackBeforeInputChars(domEventName, nativeEvent);
} // If no characters are being inserted, no BeforeInput event should
// be fired.
if (!chars) {
return null;
}
var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');
if (listeners.length > 0) {
var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);
dispatchQueue.push({
event: event,
listeners: listeners
});
event.data = chars;
}
}
/**
* Create an `onBeforeInput` event to match
* http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
*
* This event plugin is based on the native `textInput` event
* available in Chrome, Safari, Opera, and IE. This event fires after
* `onKeyPress` and `onCompositionEnd`, but before `onInput`.
*
* `beforeInput` is spec'd but not implemented in any browsers, and
* the `input` event does not provide any useful information about what has
* actually been added, contrary to the spec. Thus, `textInput` is the best
* available event to identify the characters that have actually been inserted
* into the target node.
*
* This plugin is also responsible for emitting `composition` events, thus
* allowing us to share composition fallback code for both `beforeInput` and
* `composition` event types.
*/
function extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
}
/**
* @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
*/
var supportedInputTypes = {
color: true,
date: true,
datetime: true,
'datetime-local': true,
email: true,
month: true,
number: true,
password: true,
range: true,
search: true,
tel: true,
text: true,
time: true,
url: true,
week: true
};
function isTextInputElement(elem) {
var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
if (nodeName === 'input') {
return !!supportedInputTypes[elem.type];
}
if (nodeName === 'textarea') {
return true;
}
return false;
}
/**
* Checks if an event is supported in the current execution environment.
*
* NOTE: This will not work correctly for non-generic events such as `change`,
* `reset`, `load`, `error`, and `select`.
*
* Borrows from Modernizr.
*
* @param {string} eventNameSuffix Event name, e.g. "click".
* @return {boolean} True if the event is supported.
* @internal
* @license Modernizr 3.0.0pre (Custom Build) | MIT
*/
function isEventSupported(eventNameSuffix) {
if (!canUseDOM) {
return false;
}
var eventName = 'on' + eventNameSuffix;
var isSupported = (eventName in document);
if (!isSupported) {
var element = document.createElement('div');
element.setAttribute(eventName, 'return;');
isSupported = typeof element[eventName] === 'function';
}
return isSupported;
}
function registerEvents$1() {
registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);
}
function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {
// Flag this event loop as needing state restore.
enqueueStateRestore(target);
var listeners = accumulateTwoPhaseListeners(inst, 'onChange');
if (listeners.length > 0) {
var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);
dispatchQueue.push({
event: event,
listeners: listeners
});
}
}
/**
* For IE shims
*/
var activeElement = null;
var activeElementInst = null;
/**
* SECTION: handle `change` event
*/
function shouldUseChangeEvent(elem) {
var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
}
function manualDispatchChangeEvent(nativeEvent) {
var dispatchQueue = [];
createAndAccumulateChangeEvent(dispatchQueue, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the
// other events and have it go through ReactBrowserEventEmitter. Since it
// doesn't, we manually listen for the events and so we have to enqueue and
// process the abstract event manually.
//
// Batching is necessary here in order to ensure that all event handlers run
// before the next rerender (including event handlers attached to ancestor
// elements instead of directly on the input). Without this, controlled
// components don't work properly in conjunction with event bubbling because
// the component is rerendered and the value reverted before all the event
// handlers can run. See https://github.com/facebook/react/issues/708.
batchedUpdates(runEventInBatch, dispatchQueue);
}
function runEventInBatch(dispatchQueue) {
processDispatchQueue(dispatchQueue, 0);
}
function getInstIfValueChanged(targetInst) {
var targetNode = getNodeFromInstance(targetInst);
if (updateValueIfChanged(targetNode)) {
return targetInst;
}
}
function getTargetInstForChangeEvent(domEventName, targetInst) {
if (domEventName === 'change') {
return targetInst;
}
}
/**
* SECTION: handle `input` event
*/
var isInputEventSupported = false;
if (canUseDOM) {
// IE9 claims to support the input event but fails to trigger it when
// deleting text, so we ignore its input events.
isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
}
/**
* (For IE <=9) Starts tracking propertychange events on the passed-in element
* and override the value property so that we can distinguish user events from
* value changes in JS.
*/
function startWatchingForValueChange(target, targetInst) {
activeElement = target;
activeElementInst = targetInst;
activeElement.attachEvent('onpropertychange', handlePropertyChange);
}
/**
* (For IE <=9) Removes the event listeners from the currently-tracked element,
* if any exists.
*/
function stopWatchingForValueChange() {
if (!activeElement) {
return;
}
activeElement.detachEvent('onpropertychange', handlePropertyChange);
activeElement = null;
activeElementInst = null;
}
/**
* (For IE <=9) Handles a propertychange event, sending a `change` event if
* the value of the active element has changed.
*/
function handlePropertyChange(nativeEvent) {
if (nativeEvent.propertyName !== 'value') {
return;
}
if (getInstIfValueChanged(activeElementInst)) {
manualDispatchChangeEvent(nativeEvent);
}
}
function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
if (domEventName === 'focusin') {
// In IE9, propertychange fires for most input events but is buggy and
// doesn't fire when text is deleted, but conveniently, selectionchange
// appears to fire in all of the remaining cases so we catch those and
// forward the event if the value has changed
// In either case, we don't want to call the event handler if the value
// is changed from JS so we redefine a setter for `.value` that updates
// our activeElementValue variable, allowing us to ignore those changes
//
// stopWatching() should be a noop here but we call it just in case we
// missed a blur event somehow.
stopWatchingForValueChange();
startWatchingForValueChange(target, targetInst);
} else if (domEventName === 'focusout') {
stopWatchingForValueChange();
}
} // For IE8 and IE9.
function getTargetInstForInputEventPolyfill(domEventName, targetInst) {
if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {
// On the selectionchange event, the target is just document which isn't
// helpful for us so just check activeElement instead.
//
// 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
// propertychange on the first input event after setting `value` from a
// script and fires only keydown, keypress, keyup. Catching keyup usually
// gets it and catching keydown lets us fire an event for the first
// keystroke if user does a key repeat (it'll be a little delayed: right
// before the second keystroke). Other input methods (e.g., paste) seem to
// fire selectionchange normally.
return getInstIfValueChanged(activeElementInst);
}
}
/**
* SECTION: handle `click` event
*/
function shouldUseClickEvent(elem) {
// Use the `click` event to detect changes to checkbox and radio inputs.
// This approach works across all browsers, whereas `change` does not fire
// until `blur` in IE8.
var nodeName = elem.nodeName;
return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
}
function getTargetInstForClickEvent(domEventName, targetInst) {
if (domEventName === 'click') {
return getInstIfValueChanged(targetInst);
}
}
function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
if (domEventName === 'input' || domEventName === 'change') {
return getInstIfValueChanged(targetInst);
}
}
function handleControlledInputBlur(node) {
var state = node._wrapperState;
if (!state || !state.controlled || node.type !== 'number') {
return;
}
{
// If controlled, assign the value attribute to the current value on blur
setDefaultValue(node, 'number', node.value);
}
}
/**
* This plugin creates an `onChange` event that normalizes change events
* across form elements. This event fires at a time when it's possible to
* change the element's value without seeing a flicker.
*
* Supported elements are:
* - input (see `isTextInputElement`)
* - textarea
* - select
*/
function extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
var getTargetInstFunc, handleEventFunc;
if (shouldUseChangeEvent(targetNode)) {
getTargetInstFunc = getTargetInstForChangeEvent;
} else if (isTextInputElement(targetNode)) {
if (isInputEventSupported) {
getTargetInstFunc = getTargetInstForInputOrChangeEvent;
} else {
getTargetInstFunc = getTargetInstForInputEventPolyfill;
handleEventFunc = handleEventsForInputEventPolyfill;
}
} else if (shouldUseClickEvent(targetNode)) {
getTargetInstFunc = getTargetInstForClickEvent;
}
if (getTargetInstFunc) {
var inst = getTargetInstFunc(domEventName, targetInst);
if (inst) {
createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);
return;
}
}
if (handleEventFunc) {
handleEventFunc(domEventName, targetNode, targetInst);
} // When blurring, set the value attribute for number inputs
if (domEventName === 'focusout') {
handleControlledInputBlur(targetNode);
}
}
function registerEvents$2() {
registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);
registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);
registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);
registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);
}
/**
* For almost every interaction we care about, there will be both a top-level
* `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
* we do not extract duplicate events. However, moving the mouse into the
* browser from outside will not fire a `mouseout` event. In this case, we use
* the `mouseover` top-level event.
*/
function extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';
var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';
if (isOverEvent && !isReplayingEvent(nativeEvent)) {
// If this is an over event with a target, we might have already dispatched
// the event in the out event of the other target. If this is replayed,
// then it's because we couldn't dispatch against this target previously
// so we have to do it now instead.
var related = nativeEvent.relatedTarget || nativeEvent.fromElement;
if (related) {
// If the related node is managed by React, we can assume that we have
// already dispatched the corresponding events during its mouseout.
if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {
return;
}
}
}
if (!isOutEvent && !isOverEvent) {
// Must not be a mouse or pointer in or out - ignoring.
return;
}
var win; // TODO: why is this nullable in the types but we read from it?
if (nativeEventTarget.window === nativeEventTarget) {
// `nativeEventTarget` is probably a window object.
win = nativeEventTarget;
} else {
// TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
var doc = nativeEventTarget.ownerDocument;
if (doc) {
win = doc.defaultView || doc.parentWindow;
} else {
win = window;
}
}
var from;
var to;
if (isOutEvent) {
var _related = nativeEvent.relatedTarget || nativeEvent.toElement;
from = targetInst;
to = _related ? getClosestInstanceFromNode(_related) : null;
if (to !== null) {
var nearestMounted = getNearestMountedFiber(to);
if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {
to = null;
}
}
} else {
// Moving to a node from outside the window.
from = null;
to = targetInst;
}
if (from === to) {
// Nothing pertains to our managed components.
return;
}
var SyntheticEventCtor = SyntheticMouseEvent;
var leaveEventType = 'onMouseLeave';
var enterEventType = 'onMouseEnter';
var eventTypePrefix = 'mouse';
if (domEventName === 'pointerout' || domEventName === 'pointerover') {
SyntheticEventCtor = SyntheticPointerEvent;
leaveEventType = 'onPointerLeave';
enterEventType = 'onPointerEnter';
eventTypePrefix = 'pointer';
}
var fromNode = from == null ? win : getNodeFromInstance(from);
var toNode = to == null ? win : getNodeFromInstance(to);
var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);
leave.target = fromNode;
leave.relatedTarget = toNode;
var enter = null; // We should only process this nativeEvent if we are processing
// the first ancestor. Next time, we will ignore the event.
var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);
if (nativeTargetInst === targetInst) {
var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);
enterEvent.target = toNode;
enterEvent.relatedTarget = fromNode;
enter = enterEvent;
}
accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);
}
/**
* inlined Object.is polyfill to avoid requiring consumers ship their own
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
*/
function is(x, y) {
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
;
}
var objectIs = typeof Object.is === 'function' ? Object.is : is;
/**
* Performs equality by iterating through keys on an object and returning false
* when any key has values which are not strictly equal between the arguments.
* Returns true when the values of all keys are strictly equal.
*/
function shallowEqual(objA, objB) {
if (objectIs(objA, objB)) {
return true;
}
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
return false;
}
var keysA = Object.keys(objA);
var keysB = Object.keys(objB);
if (keysA.length !== keysB.length) {
return false;
} // Test for A's keys different from B.
for (var i = 0; i < keysA.length; i++) {
var currentKey = keysA[i];
if (!hasOwnProperty.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey])) {
return false;
}
}
return true;
}
/**
* Given any node return the first leaf node without children.
*
* @param {DOMElement|DOMTextNode} node
* @return {DOMElement|DOMTextNode}
*/
function getLeafNode(node) {
while (node && node.firstChild) {
node = node.firstChild;
}
return node;
}
/**
* Get the next sibling within a container. This will walk up the
* DOM if a node's siblings have been exhausted.
*
* @param {DOMElement|DOMTextNode} node
* @return {?DOMElement|DOMTextNode}
*/
function getSiblingNode(node) {
while (node) {
if (node.nextSibling) {
return node.nextSibling;
}
node = node.parentNode;
}
}
/**
* Get object describing the nodes which contain characters at offset.
*
* @param {DOMElement|DOMTextNode} root
* @param {number} offset
* @return {?object}
*/
function getNodeForCharacterOffset(root, offset) {
var node = getLeafNode(root);
var nodeStart = 0;
var nodeEnd = 0;
while (node) {
if (node.nodeType === TEXT_NODE) {
nodeEnd = nodeStart + node.textContent.length;
if (nodeStart <= offset && nodeEnd >= offset) {
return {
node: node,
offset: offset - nodeStart
};
}
nodeStart = nodeEnd;
}
node = getLeafNode(getSiblingNode(node));
}
}
/**
* @param {DOMElement} outerNode
* @return {?object}
*/
function getOffsets(outerNode) {
var ownerDocument = outerNode.ownerDocument;
var win = ownerDocument && ownerDocument.defaultView || window;
var selection = win.getSelection && win.getSelection();
if (!selection || selection.rangeCount === 0) {
return null;
}
var anchorNode = selection.anchorNode,
anchorOffset = selection.anchorOffset,
focusNode = selection.focusNode,
focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
// up/down buttons on an <input type="number">. Anonymous divs do not seem to
// expose properties, triggering a "Permission denied error" if any of its
// properties are accessed. The only seemingly possible way to avoid erroring
// is to access a property that typically works for non-anonymous divs and
// catch any error that may otherwise arise. See
// https://bugzilla.mozilla.org/show_bug.cgi?id=208427
try {
/* eslint-disable no-unused-expressions */
anchorNode.nodeType;
focusNode.nodeType;
/* eslint-enable no-unused-expressions */
} catch (e) {
return null;
}
return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);
}
/**
* Returns {start, end} where `start` is the character/codepoint index of
* (anchorNode, anchorOffset) within the textContent of `outerNode`, and
* `end` is the index of (focusNode, focusOffset).
*
* Returns null if you pass in garbage input but we should probably just crash.
*
* Exported only for testing.
*/
function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {
var length = 0;
var start = -1;
var end = -1;
var indexWithinAnchor = 0;
var indexWithinFocus = 0;
var node = outerNode;
var parentNode = null;
outer: while (true) {
var next = null;
while (true) {
if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
start = length + anchorOffset;
}
if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
end = length + focusOffset;
}
if (node.nodeType === TEXT_NODE) {
length += node.nodeValue.length;
}
if ((next = node.firstChild) === null) {
break;
} // Moving from `node` to its first child `next`.
parentNode = node;
node = next;
}
while (true) {
if (node === outerNode) {
// If `outerNode` has children, this is always the second time visiting
// it. If it has no children, this is still the first loop, and the only
// valid selection is anchorNode and focusNode both equal to this node
// and both offsets 0, in which case we will have handled above.
break outer;
}
if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
start = length;
}
if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {
end = length;
}
if ((next = node.nextSibling) !== null) {
break;
}
node = parentNode;
parentNode = node.parentNode;
} // Moving from `node` to its next sibling `next`.
node = next;
}
if (start === -1 || end === -1) {
// This should never happen. (Would happen if the anchor/focus nodes aren't
// actually inside the passed-in node.)
return null;
}
return {
start: start,
end: end
};
}
/**
* In modern non-IE browsers, we can support both forward and backward
* selections.
*
* Note: IE10+ supports the Selection object, but it does not support
* the `extend` method, which means that even in modern IE, it's not possible
* to programmatically create a backward selection. Thus, for all IE
* versions, we use the old IE API to create our selections.
*
* @param {DOMElement|DOMTextNode} node
* @param {object} offsets
*/
function setOffsets(node, offsets) {
var doc = node.ownerDocument || document;
var win = doc && doc.defaultView || window; // Edge fails with "Object expected" in some scenarios.
// (For instance: TinyMCE editor used in a list component that supports pasting to add more,
// fails when pasting 100+ items)
if (!win.getSelection) {
return;
}
var selection = win.getSelection();
var length = node.textContent.length;
var start = Math.min(offsets.start, length);
var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.
// Flip backward selections, so we can set with a single range.
if (!selection.extend && start > end) {
var temp = end;
end = start;
start = temp;
}
var startMarker = getNodeForCharacterOffset(node, start);
var endMarker = getNodeForCharacterOffset(node, end);
if (startMarker && endMarker) {
if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {
return;
}
var range = doc.createRange();
range.setStart(startMarker.node, startMarker.offset);
selection.removeAllRanges();
if (start > end) {
selection.addRange(range);
selection.extend(endMarker.node, endMarker.offset);
} else {
range.setEnd(endMarker.node, endMarker.offset);
selection.addRange(range);
}
}
}
function isTextNode(node) {
return node && node.nodeType === TEXT_NODE;
}
function containsNode(outerNode, innerNode) {
if (!outerNode || !innerNode) {
return false;
} else if (outerNode === innerNode) {
return true;
} else if (isTextNode(outerNode)) {
return false;
} else if (isTextNode(innerNode)) {
return containsNode(outerNode, innerNode.parentNode);
} else if ('contains' in outerNode) {
return outerNode.contains(innerNode);
} else if (outerNode.compareDocumentPosition) {
return !!(outerNode.compareDocumentPosition(innerNode) & 16);
} else {
return false;
}
}
function isInDocument(node) {
return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
}
function isSameOriginFrame(iframe) {
try {
// Accessing the contentDocument of a HTMLIframeElement can cause the browser
// to throw, e.g. if it has a cross-origin src attribute.
// Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g:
// iframe.contentDocument.defaultView;
// A safety way is to access one of the cross origin properties: Window or Location
// Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
// https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
return typeof iframe.contentWindow.location.href === 'string';
} catch (err) {
return false;
}
}
function getActiveElementDeep() {
var win = window;
var element = getActiveElement();
while (element instanceof win.HTMLIFrameElement) {
if (isSameOriginFrame(element)) {
win = element.contentWindow;
} else {
return element;
}
element = getActiveElement(win.document);
}
return element;
}
/**
* @ReactInputSelection: React input selection module. Based on Selection.js,
* but modified to be suitable for react and has a couple of bug fixes (doesn't
* assume buttons have range selections allowed).
* Input selection module for React.
*/
/**
* @hasSelectionCapabilities: we get the element types that support selection
* from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
* and `selectionEnd` rows.
*/
function hasSelectionCapabilities(elem) {
var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
}
function getSelectionInformation() {
var focusedElem = getActiveElementDeep();
return {
focusedElem: focusedElem,
selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null
};
}
/**
* @restoreSelection: If any selection information was potentially lost,
* restore it. This is useful when performing operations that could remove dom
* nodes and place them back in, resulting in focus being lost.
*/
function restoreSelection(priorSelectionInformation) {
var curFocusedElem = getActiveElementDeep();
var priorFocusedElem = priorSelectionInformation.focusedElem;
var priorSelectionRange = priorSelectionInformation.selectionRange;
if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
setSelection(priorFocusedElem, priorSelectionRange);
} // Focusing a node can change the scroll position, which is undesirable
var ancestors = [];
var ancestor = priorFocusedElem;
while (ancestor = ancestor.parentNode) {
if (ancestor.nodeType === ELEMENT_NODE) {
ancestors.push({
element: ancestor,
left: ancestor.scrollLeft,
top: ancestor.scrollTop
});
}
}
if (typeof priorFocusedElem.focus === 'function') {
priorFocusedElem.focus();
}
for (var i = 0; i < ancestors.length; i++) {
var info = ancestors[i];
info.element.scrollLeft = info.left;
info.element.scrollTop = info.top;
}
}
}
/**
* @getSelection: Gets the selection bounds of a focused textarea, input or
* contentEditable node.
* -@input: Look up selection bounds of this input
* -@return {start: selectionStart, end: selectionEnd}
*/
function getSelection(input) {
var selection;
if ('selectionStart' in input) {
// Modern browser with input or textarea.
selection = {
start: input.selectionStart,
end: input.selectionEnd
};
} else {
// Content editable or old IE textarea.
selection = getOffsets(input);
}
return selection || {
start: 0,
end: 0
};
}
/**
* @setSelection: Sets the selection bounds of a textarea or input and focuses
* the input.
* -@input Set selection bounds of this input or textarea
* -@offsets Object of same form that is returned from get*
*/
function setSelection(input, offsets) {
var start = offsets.start;
var end = offsets.end;
if (end === undefined) {
end = start;
}
if ('selectionStart' in input) {
input.selectionStart = start;
input.selectionEnd = Math.min(end, input.value.length);
} else {
setOffsets(input, offsets);
}
}
var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;
function registerEvents$3() {
registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);
}
var activeElement$1 = null;
var activeElementInst$1 = null;
var lastSelection = null;
var mouseDown = false;
/**
* Get an object which is a unique representation of the current selection.
*
* The return value will not be consistent across nodes or browsers, but
* two identical selections on the same node will return identical objects.
*/
function getSelection$1(node) {
if ('selectionStart' in node && hasSelectionCapabilities(node)) {
return {
start: node.selectionStart,
end: node.selectionEnd
};
} else {
var win = node.ownerDocument && node.ownerDocument.defaultView || window;
var selection = win.getSelection();
return {
anchorNode: selection.anchorNode,
anchorOffset: selection.anchorOffset,
focusNode: selection.focusNode,
focusOffset: selection.focusOffset
};
}
}
/**
* Get document associated with the event target.
*/
function getEventTargetDocument(eventTarget) {
return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
}
/**
* Poll selection to see whether it's changed.
*
* @param {object} nativeEvent
* @param {object} nativeEventTarget
* @return {?SyntheticEvent}
*/
function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
// Ensure we have the right element, and that the user is not dragging a
// selection (this matches native `select` event behavior). In HTML5, select
// fires only on input and textarea thus if there's no focused element we
// won't dispatch.
var doc = getEventTargetDocument(nativeEventTarget);
if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
return;
} // Only fire when selection has actually changed.
var currentSelection = getSelection$1(activeElement$1);
if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
lastSelection = currentSelection;
var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect');
if (listeners.length > 0) {
var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);
dispatchQueue.push({
event: event,
listeners: listeners
});
event.target = activeElement$1;
}
}
}
/**
* This plugin creates an `onSelect` event that normalizes select events
* across form elements.
*
* Supported elements are:
* - input (see `isTextInputElement`)
* - textarea
* - contentEditable
*
* This differs from native browser implementations in the following ways:
* - Fires on contentEditable fields as well as inputs.
* - Fires for collapsed selection.
* - Fires after user input.
*/
function extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
switch (domEventName) {
// Track the input node that has focus.
case 'focusin':
if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
activeElement$1 = targetNode;
activeElementInst$1 = targetInst;
lastSelection = null;
}
break;
case 'focusout':
activeElement$1 = null;
activeElementInst$1 = null;
lastSelection = null;
break;
// Don't fire the event while the user is dragging. This matches the
// semantics of the native select event.
case 'mousedown':
mouseDown = true;
break;
case 'contextmenu':
case 'mouseup':
case 'dragend':
mouseDown = false;
constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
break;
// Chrome and IE fire non-standard event when selection is changed (and
// sometimes when it hasn't). IE's event fires out of order with respect
// to key and input events on deletion, so we discard it.
//
// Firefox doesn't support selectionchange, so check selection status
// after each key entry. The selection changes after keydown and before
// keyup, but we check on keydown as well in the case of holding down a
// key, when multiple keydown events are fired but only one keyup is.
// This is also our approach for IE handling, for the reason above.
case 'selectionchange':
if (skipSelectionChangeEvent) {
break;
}
// falls through
case 'keydown':
case 'keyup':
constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
}
}
/**
* Generate a mapping of standard vendor prefixes using the defined style property and event name.
*
* @param {string} styleProp
* @param {string} eventName
* @returns {object}
*/
function makePrefixMap(styleProp, eventName) {
var prefixes = {};
prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
prefixes['Webkit' + styleProp] = 'webkit' + eventName;
prefixes['Moz' + styleProp] = 'moz' + eventName;
return prefixes;
}
/**
* A list of event names to a configurable list of vendor prefixes.
*/
var vendorPrefixes = {
animationend: makePrefixMap('Animation', 'AnimationEnd'),
animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
animationstart: makePrefixMap('Animation', 'AnimationStart'),
transitionend: makePrefixMap('Transition', 'TransitionEnd')
};
/**
* Event names that have already been detected and prefixed (if applicable).
*/
var prefixedEventNames = {};
/**
* Element to check for prefixes on.
*/
var style = {};
/**
* Bootstrap if a DOM exists.
*/
if (canUseDOM) {
style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,
// the un-prefixed "animation" and "transition" properties are defined on the
// style object but the events that fire will still be prefixed, so we need
// to check if the un-prefixed events are usable, and if not remove them from the map.
if (!('AnimationEvent' in window)) {
delete vendorPrefixes.animationend.animation;
delete vendorPrefixes.animationiteration.animation;
delete vendorPrefixes.animationstart.animation;
} // Same as above
if (!('TransitionEvent' in window)) {
delete vendorPrefixes.transitionend.transition;
}
}
/**
* Attempts to determine the correct vendor prefixed event name.
*
* @param {string} eventName
* @returns {string}
*/
function getVendorPrefixedEventName(eventName) {
if (prefixedEventNames[eventName]) {
return prefixedEventNames[eventName];
} else if (!vendorPrefixes[eventName]) {
return eventName;
}
var prefixMap = vendorPrefixes[eventName];
for (var styleProp in prefixMap) {
if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
return prefixedEventNames[eventName] = prefixMap[styleProp];
}
}
return eventName;
}
var ANIMATION_END = getVendorPrefixedEventName('animationend');
var ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');
var ANIMATION_START = getVendorPrefixedEventName('animationstart');
var TRANSITION_END = getVendorPrefixedEventName('transitionend');
var topLevelEventsToReactNames = new Map(); // NOTE: Capitalization is important in this list!
//
// E.g. it needs "pointerDown", not "pointerdown".
// This is because we derive both React name ("onPointerDown")
// and DOM name ("pointerdown") from the same list.
//
// Exceptions that don't match this convention are listed separately.
//
// prettier-ignore
var simpleEventPluginEvents = ['abort', 'auxClick', 'cancel', 'canPlay', 'canPlayThrough', 'click', 'close', 'contextMenu', 'copy', 'cut', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'gotPointerCapture', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'lostPointerCapture', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'pointerCancel', 'pointerDown', 'pointerMove', 'pointerOut', 'pointerOver', 'pointerUp', 'progress', 'rateChange', 'reset', 'resize', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchStart', 'volumeChange', 'scroll', 'toggle', 'touchMove', 'waiting', 'wheel'];
function registerSimpleEvent(domEventName, reactName) {
topLevelEventsToReactNames.set(domEventName, reactName);
registerTwoPhaseEvent(reactName, [domEventName]);
}
function registerSimpleEvents() {
for (var i = 0; i < simpleEventPluginEvents.length; i++) {
var eventName = simpleEventPluginEvents[i];
var domEventName = eventName.toLowerCase();
var capitalizedEvent = eventName[0].toUpperCase() + eventName.slice(1);
registerSimpleEvent(domEventName, 'on' + capitalizedEvent);
} // Special cases where event names don't match.
registerSimpleEvent(ANIMATION_END, 'onAnimationEnd');
registerSimpleEvent(ANIMATION_ITERATION, 'onAnimationIteration');
registerSimpleEvent(ANIMATION_START, 'onAnimationStart');
registerSimpleEvent('dblclick', 'onDoubleClick');
registerSimpleEvent('focusin', 'onFocus');
registerSimpleEvent('focusout', 'onBlur');
registerSimpleEvent(TRANSITION_END, 'onTransitionEnd');
}
function extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
var reactName = topLevelEventsToReactNames.get(domEventName);
if (reactName === undefined) {
return;
}
var SyntheticEventCtor = SyntheticEvent;
var reactEventType = domEventName;
switch (domEventName) {
case 'keypress':
// Firefox creates a keypress event for function keys too. This removes
// the unwanted keypress events. Enter is however both printable and
// non-printable. One would expect Tab to be as well (but it isn't).
if (getEventCharCode(nativeEvent) === 0) {
return;
}
/* falls through */
case 'keydown':
case 'keyup':
SyntheticEventCtor = SyntheticKeyboardEvent;
break;
case 'focusin':
reactEventType = 'focus';
SyntheticEventCtor = SyntheticFocusEvent;
break;
case 'focusout':
reactEventType = 'blur';
SyntheticEventCtor = SyntheticFocusEvent;
break;
case 'beforeblur':
case 'afterblur':
SyntheticEventCtor = SyntheticFocusEvent;
break;
case 'click':
// Firefox creates a click event on right mouse clicks. This removes the
// unwanted click events.
if (nativeEvent.button === 2) {
return;
}
/* falls through */
case 'auxclick':
case 'dblclick':
case 'mousedown':
case 'mousemove':
case 'mouseup': // TODO: Disabled elements should not respond to mouse events
/* falls through */
case 'mouseout':
case 'mouseover':
case 'contextmenu':
SyntheticEventCtor = SyntheticMouseEvent;
break;
case 'drag':
case 'dragend':
case 'dragenter':
case 'dragexit':
case 'dragleave':
case 'dragover':
case 'dragstart':
case 'drop':
SyntheticEventCtor = SyntheticDragEvent;
break;
case 'touchcancel':
case 'touchend':
case 'touchmove':
case 'touchstart':
SyntheticEventCtor = SyntheticTouchEvent;
break;
case ANIMATION_END:
case ANIMATION_ITERATION:
case ANIMATION_START:
SyntheticEventCtor = SyntheticAnimationEvent;
break;
case TRANSITION_END:
SyntheticEventCtor = SyntheticTransitionEvent;
break;
case 'scroll':
SyntheticEventCtor = SyntheticUIEvent;
break;
case 'wheel':
SyntheticEventCtor = SyntheticWheelEvent;
break;
case 'copy':
case 'cut':
case 'paste':
SyntheticEventCtor = SyntheticClipboardEvent;
break;
case 'gotpointercapture':
case 'lostpointercapture':
case 'pointercancel':
case 'pointerdown':
case 'pointermove':
case 'pointerout':
case 'pointerover':
case 'pointerup':
SyntheticEventCtor = SyntheticPointerEvent;
break;
}
var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;
{
// Some events don't bubble in the browser.
// In the past, React has always bubbled them, but this can be surprising.
// We're going to try aligning closer to the browser behavior by not bubbling
// them in React either. We'll start by not bubbling onScroll, and then expand.
var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from
// nonDelegatedEvents list in DOMPluginEventSystem.
// Then we can remove this special list.
// This is a breaking change that can wait until React 18.
domEventName === 'scroll';
var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);
if (_listeners.length > 0) {
// Intentionally create event lazily.
var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);
dispatchQueue.push({
event: _event,
listeners: _listeners
});
}
}
}
// TODO: remove top-level side effect.
registerSimpleEvents();
registerEvents$2();
registerEvents$1();
registerEvents$3();
registerEvents();
function extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
// TODO: we should remove the concept of a "SimpleEventPlugin".
// This is the basic functionality of the event system. All
// the other plugins are essentially polyfills. So the plugin
// should probably be inlined somewhere and have its logic
// be core the to event system. This would potentially allow
// us to ship builds of React without the polyfilled plugins below.
extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the
// event's native "bubble" phase, which means that we're
// not in the capture phase. That's because we emulate
// the capture phase here still. This is a trade-off,
// because in an ideal world we would not emulate and use
// the phases properly, like we do with the SimpleEvent
// plugin. However, the plugins below either expect
// emulation (EnterLeave) or use state localized to that
// plugin (BeforeInput, Change, Select). The state in
// these modules complicates things, as you'll essentially
// get the case where the capture phase event might change
// state, only for the following bubble event to come in
// later and not trigger anything as the state now
// invalidates the heuristics of the event plugin. We
// could alter all these plugins to work in such ways, but
// that might cause other unknown side-effects that we
// can't foresee right now.
if (shouldProcessPolyfillPlugins) {
extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
}
} // List of events that need to be individually attached to media elements.
var mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'resize', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather
// set them on the actual target element itself. This is primarily
// because these events do not consistently bubble in the DOM.
var nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));
function executeDispatch(event, listener, currentTarget) {
var type = event.type || 'unknown-event';
event.currentTarget = currentTarget;
invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
event.currentTarget = null;
}
function processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {
var previousInstance;
if (inCapturePhase) {
for (var i = dispatchListeners.length - 1; i >= 0; i--) {
var _dispatchListeners$i = dispatchListeners[i],
instance = _dispatchListeners$i.instance,
currentTarget = _dispatchListeners$i.currentTarget,
listener = _dispatchListeners$i.listener;
if (instance !== previousInstance && event.isPropagationStopped()) {
return;
}
executeDispatch(event, listener, currentTarget);
previousInstance = instance;
}
} else {
for (var _i = 0; _i < dispatchListeners.length; _i++) {
var _dispatchListeners$_i = dispatchListeners[_i],
_instance = _dispatchListeners$_i.instance,
_currentTarget = _dispatchListeners$_i.currentTarget,
_listener = _dispatchListeners$_i.listener;
if (_instance !== previousInstance && event.isPropagationStopped()) {
return;
}
executeDispatch(event, _listener, _currentTarget);
previousInstance = _instance;
}
}
}
function processDispatchQueue(dispatchQueue, eventSystemFlags) {
var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;
for (var i = 0; i < dispatchQueue.length; i++) {
var _dispatchQueue$i = dispatchQueue[i],
event = _dispatchQueue$i.event,
listeners = _dispatchQueue$i.listeners;
processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); // event system doesn't use pooling.
} // This would be a good time to rethrow if any of the event handlers threw.
rethrowCaughtError();
}
function dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
var nativeEventTarget = getEventTarget(nativeEvent);
var dispatchQueue = [];
extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
processDispatchQueue(dispatchQueue, eventSystemFlags);
}
function listenToNonDelegatedEvent(domEventName, targetElement) {
{
if (!nonDelegatedEvents.has(domEventName)) {
error('Did not expect a listenToNonDelegatedEvent() call for "%s". ' + 'This is a bug in React. Please file an issue.', domEventName);
}
}
var isCapturePhaseListener = false;
var listenerSet = getEventListenerSet(targetElement);
var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);
if (!listenerSet.has(listenerSetKey)) {
addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);
listenerSet.add(listenerSetKey);
}
}
function listenToNativeEvent(domEventName, isCapturePhaseListener, target) {
{
if (nonDelegatedEvents.has(domEventName) && !isCapturePhaseListener) {
error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. ' + 'This is a bug in React. Please file an issue.', domEventName);
}
}
var eventSystemFlags = 0;
if (isCapturePhaseListener) {
eventSystemFlags |= IS_CAPTURE_PHASE;
}
addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);
} // This is only used by createEventHandle when the
var listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);
function listenToAllSupportedEvents(rootContainerElement) {
if (!rootContainerElement[listeningMarker]) {
rootContainerElement[listeningMarker] = true;
allNativeEvents.forEach(function (domEventName) {
// We handle selectionchange separately because it
// doesn't bubble and needs to be on the document.
if (domEventName !== 'selectionchange') {
if (!nonDelegatedEvents.has(domEventName)) {
listenToNativeEvent(domEventName, false, rootContainerElement);
}
listenToNativeEvent(domEventName, true, rootContainerElement);
}
});
var ownerDocument = rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;
if (ownerDocument !== null) {
// The selectionchange event also needs deduplication
// but it is attached to the document.
if (!ownerDocument[listeningMarker]) {
ownerDocument[listeningMarker] = true;
listenToNativeEvent('selectionchange', false, ownerDocument);
}
}
}
}
function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {
var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be
// active and not passive.
var isPassiveListener = undefined;
if (passiveBrowserEventsSupported) {
// Browsers introduced an intervention, making these events
// passive by default on document. React doesn't bind them
// to document anymore, but changing this now would undo
// the performance wins from the change. So we emulate
// the existing behavior manually on the roots now.
// https://github.com/facebook/react/issues/19651
if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {
isPassiveListener = true;
}
}
targetContainer = targetContainer;
var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we
if (isCapturePhaseListener) {
if (isPassiveListener !== undefined) {
unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
} else {
unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);
}
} else {
if (isPassiveListener !== undefined) {
unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
} else {
unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);
}
}
}
function isMatchingRootContainer(grandContainer, targetContainer) {
return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;
}
function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
var ancestorInst = targetInst;
if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {
var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we
if (targetInst !== null) {
// The below logic attempts to work out if we need to change
// the target fiber to a different ancestor. We had similar logic
// in the legacy event system, except the big difference between
// systems is that the modern event system now has an event listener
// attached to each React Root and React Portal Root. Together,
// the DOM nodes representing these roots are the "rootContainer".
// To figure out which ancestor instance we should use, we traverse
// up the fiber tree from the target instance and attempt to find
// root boundaries that match that of our current "rootContainer".
// If we find that "rootContainer", we find the parent fiber
// sub-tree for that root and make that our ancestor instance.
var node = targetInst;
mainLoop: while (true) {
if (node === null) {
return;
}
var nodeTag = node.tag;
if (nodeTag === HostRoot || nodeTag === HostPortal) {
var container = node.stateNode.containerInfo;
if (isMatchingRootContainer(container, targetContainerNode)) {
break;
}
if (nodeTag === HostPortal) {
// The target is a portal, but it's not the rootContainer we're looking for.
// Normally portals handle their own events all the way down to the root.
// So we should be able to stop now. However, we don't know if this portal
// was part of *our* root.
var grandNode = node.return;
while (grandNode !== null) {
var grandTag = grandNode.tag;
if (grandTag === HostRoot || grandTag === HostPortal) {
var grandContainer = grandNode.stateNode.containerInfo;
if (isMatchingRootContainer(grandContainer, targetContainerNode)) {
// This is the rootContainer we're looking for and we found it as
// a parent of the Portal. That means we can ignore it because the
// Portal will bubble through to us.
return;
}
}
grandNode = grandNode.return;
}
} // Now we need to find it's corresponding host fiber in the other
// tree. To do this we can use getClosestInstanceFromNode, but we
// need to validate that the fiber is a host instance, otherwise
// we need to traverse up through the DOM till we find the correct
// node that is from the other tree.
while (container !== null) {
var parentNode = getClosestInstanceFromNode(container);
if (parentNode === null) {
return;
}
var parentTag = parentNode.tag;
if (parentTag === HostComponent || parentTag === HostText) {
node = ancestorInst = parentNode;
continue mainLoop;
}
container = container.parentNode;
}
}
node = node.return;
}
}
}
batchedUpdates(function () {
return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);
});
}
function createDispatchListener(instance, listener, currentTarget) {
return {
instance: instance,
listener: listener,
currentTarget: currentTarget
};
}
function accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly, nativeEvent) {
var captureName = reactName !== null ? reactName + 'Capture' : null;
var reactEventName = inCapturePhase ? captureName : reactName;
var listeners = [];
var instance = targetFiber;
var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.
while (instance !== null) {
var _instance2 = instance,
stateNode = _instance2.stateNode,
tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)
if (tag === HostComponent && stateNode !== null) {
lastHostComponent = stateNode; // createEventHandle listeners
if (reactEventName !== null) {
var listener = getListener(instance, reactEventName);
if (listener != null) {
listeners.push(createDispatchListener(instance, listener, lastHostComponent));
}
}
} // If we are only accumulating events for the target, then we don't
// continue to propagate through the React fiber tree to find other
// listeners.
if (accumulateTargetOnly) {
break;
} // If we are processing the onBeforeBlur event, then we need to take
instance = instance.return;
}
return listeners;
} // We should only use this function for:
// - BeforeInputEventPlugin
// - ChangeEventPlugin
// - SelectEventPlugin
// This is because we only process these plugins
// in the bubble phase, so we need to accumulate two
// phase event listeners (via emulation).
function accumulateTwoPhaseListeners(targetFiber, reactName) {
var captureName = reactName + 'Capture';
var listeners = [];
var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.
while (instance !== null) {
var _instance3 = instance,
stateNode = _instance3.stateNode,
tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)
if (tag === HostComponent && stateNode !== null) {
var currentTarget = stateNode;
var captureListener = getListener(instance, captureName);
if (captureListener != null) {
listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
}
var bubbleListener = getListener(instance, reactName);
if (bubbleListener != null) {
listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
}
}
instance = instance.return;
}
return listeners;
}
function getParent(inst) {
if (inst === null) {
return null;
}
do {
inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
// That is depending on if we want nested subtrees (layers) to bubble
// events to their parent. We could also go through parentNode on the
// host node but that wouldn't work for React Native and doesn't let us
// do the portal feature.
} while (inst && inst.tag !== HostComponent);
if (inst) {
return inst;
}
return null;
}
/**
* Return the lowest common ancestor of A and B, or null if they are in
* different trees.
*/
function getLowestCommonAncestor(instA, instB) {
var nodeA = instA;
var nodeB = instB;
var depthA = 0;
for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {
depthA++;
}
var depthB = 0;
for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {
depthB++;
} // If A is deeper, crawl up.
while (depthA - depthB > 0) {
nodeA = getParent(nodeA);
depthA--;
} // If B is deeper, crawl up.
while (depthB - depthA > 0) {
nodeB = getParent(nodeB);
depthB--;
} // Walk in lockstep until we find a match.
var depth = depthA;
while (depth--) {
if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {
return nodeA;
}
nodeA = getParent(nodeA);
nodeB = getParent(nodeB);
}
return null;
}
function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {
var registrationName = event._reactName;
var listeners = [];
var instance = target;
while (instance !== null) {
if (instance === common) {
break;
}
var _instance4 = instance,
alternate = _instance4.alternate,
stateNode = _instance4.stateNode,
tag = _instance4.tag;
if (alternate !== null && alternate === common) {
break;
}
if (tag === HostComponent && stateNode !== null) {
var currentTarget = stateNode;
if (inCapturePhase) {
var captureListener = getListener(instance, registrationName);
if (captureListener != null) {
listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
}
} else if (!inCapturePhase) {
var bubbleListener = getListener(instance, registrationName);
if (bubbleListener != null) {
listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
}
}
}
instance = instance.return;
}
if (listeners.length !== 0) {
dispatchQueue.push({
event: event,
listeners: listeners
});
}
} // We should only use this function for:
// - EnterLeaveEventPlugin
// This is because we only process this plugin
// in the bubble phase, so we need to accumulate two
// phase event listeners.
function accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {
var common = from && to ? getLowestCommonAncestor(from, to) : null;
if (from !== null) {
accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);
}
if (to !== null && enterEvent !== null) {
accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);
}
}
function getListenerSetKey(domEventName, capture) {
return domEventName + "__" + (capture ? 'capture' : 'bubble');
}
var didWarnInvalidHydration = false;
var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';
var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';
var SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';
var AUTOFOCUS = 'autoFocus';
var CHILDREN = 'children';
var STYLE = 'style';
var HTML$1 = '__html';
var warnedUnknownTags;
var validatePropertiesInDevelopment;
var warnForPropDifference;
var warnForExtraAttributes;
var warnForInvalidEventListener;
var canDiffStyleForHydrationWarning;
var normalizeHTML;
{
warnedUnknownTags = {
// There are working polyfills for <dialog>. Let people use it.
dialog: true,
// Electron ships a custom <webview> tag to display external web content in
// an isolated frame and process.
// This tag is not present in non Electron environments such as JSDom which
// is often used for testing purposes.
// @see https://electronjs.org/docs/api/webview-tag
webview: true
};
validatePropertiesInDevelopment = function (type, props) {
validateProperties(type, props);
validateProperties$1(type, props);
validateProperties$2(type, props, {
registrationNameDependencies: registrationNameDependencies,
possibleRegistrationNames: possibleRegistrationNames
});
}; // IE 11 parses & normalizes the style attribute as opposed to other
// browsers. It adds spaces and sorts the properties in some
// non-alphabetical order. Handling that would require sorting CSS
// properties in the client & server versions or applying
// `expectedStyle` to a temporary DOM node to read its `style` attribute
// normalized. Since it only affects IE, we're skipping style warnings
// in that browser completely in favor of doing all that work.
// See https://github.com/facebook/react/issues/11807
canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode;
warnForPropDifference = function (propName, serverValue, clientValue) {
if (didWarnInvalidHydration) {
return;
}
var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);
var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);
if (normalizedServerValue === normalizedClientValue) {
return;
}
didWarnInvalidHydration = true;
error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
};
warnForExtraAttributes = function (attributeNames) {
if (didWarnInvalidHydration) {
return;
}
didWarnInvalidHydration = true;
var names = [];
attributeNames.forEach(function (name) {
names.push(name);
});
error('Extra attributes from the server: %s', names);
};
warnForInvalidEventListener = function (registrationName, listener) {
if (listener === false) {
error('Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);
} else {
error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);
}
}; // Parse the HTML and read it back to normalize the HTML string so that it
// can be used for comparison.
normalizeHTML = function (parent, html) {
// We could have created a separate document here to avoid
// re-initializing custom elements if they exist. But this breaks
// how <noscript> is being handled. So we use the same document.
// See the discussion in https://github.com/facebook/react/pull/11157.
var testElement = parent.namespaceURI === HTML_NAMESPACE ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);
testElement.innerHTML = html;
return testElement.innerHTML;
};
} // HTML parsing normalizes CR and CRLF to LF.
// It also can turn \u0000 into \uFFFD inside attributes.
// https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream
// If we have a mismatch, it might be caused by that.
// We will still patch up in this case but not fire the warning.
var NORMALIZE_NEWLINES_REGEX = /\r\n?/g;
var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;
function normalizeMarkupForTextOrAttribute(markup) {
{
checkHtmlStringCoercion(markup);
}
var markupString = typeof markup === 'string' ? markup : '' + markup;
return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');
}
function checkForUnmatchedText(serverText, clientText, isConcurrentMode, shouldWarnDev) {
var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);
var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);
if (normalizedServerText === normalizedClientText) {
return;
}
if (shouldWarnDev) {
{
if (!didWarnInvalidHydration) {
didWarnInvalidHydration = true;
error('Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
}
}
}
if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) {
// In concurrent roots, we throw when there's a text mismatch and revert to
// client rendering, up to the nearest Suspense boundary.
throw new Error('Text content does not match server-rendered HTML.');
}
}
function getOwnerDocumentFromRootContainer(rootContainerElement) {
return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;
}
function noop() {}
function trapClickOnNonInteractiveElement(node) {
// Mobile Safari does not fire properly bubble click events on
// non-interactive elements, which means delegated click listeners do not
// fire. The workaround for this bug involves attaching an empty click
// listener on the target node.
// https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
// Just set it using the onclick property so that we don't have to manage any
// bookkeeping for it. Not sure if we need to clear it when the listener is
// removed.
// TODO: Only do this for the relevant Safaris maybe?
node.onclick = noop;
}
function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {
for (var propKey in nextProps) {
if (!nextProps.hasOwnProperty(propKey)) {
continue;
}
var nextProp = nextProps[propKey];
if (propKey === STYLE) {
{
if (nextProp) {
// Freeze the next style object so that we can assume it won't be
// mutated. We have already warned for this in the past.
Object.freeze(nextProp);
}
} // Relies on `updateStylesByID` not mutating `styleUpdates`.
setValueForStyles(domElement, nextProp);
} else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
if (nextHtml != null) {
setInnerHTML(domElement, nextHtml);
}
} else if (propKey === CHILDREN) {
if (typeof nextProp === 'string') {
// Avoid setting initial textContent when the text is empty. In IE11 setting
// textContent on a <textarea> will cause the placeholder to not
// show within the <textarea> until it has been focused and blurred again.
// https://github.com/facebook/react/issues/6731#issuecomment-254874553
var canSetTextContent = tag !== 'textarea' || nextProp !== '';
if (canSetTextContent) {
setTextContent(domElement, nextProp);
}
} else if (typeof nextProp === 'number') {
setTextContent(domElement, '' + nextProp);
}
} else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
if (nextProp != null) {
if ( typeof nextProp !== 'function') {
warnForInvalidEventListener(propKey, nextProp);
}
if (propKey === 'onScroll') {
listenToNonDelegatedEvent('scroll', domElement);
}
}
} else if (nextProp != null) {
setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);
}
}
}
function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
// TODO: Handle wasCustomComponentTag
for (var i = 0; i < updatePayload.length; i += 2) {
var propKey = updatePayload[i];
var propValue = updatePayload[i + 1];
if (propKey === STYLE) {
setValueForStyles(domElement, propValue);
} else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
setInnerHTML(domElement, propValue);
} else if (propKey === CHILDREN) {
setTextContent(domElement, propValue);
} else {
setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
}
}
}
function createElement(type, props, rootContainerElement, parentNamespace) {
var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML
// tags get no namespace.
var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
var domElement;
var namespaceURI = parentNamespace;
if (namespaceURI === HTML_NAMESPACE) {
namespaceURI = getIntrinsicNamespace(type);
}
if (namespaceURI === HTML_NAMESPACE) {
{
isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to
// allow <SVG> or <mATH>.
if (!isCustomComponentTag && type !== type.toLowerCase()) {
error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);
}
}
if (type === 'script') {
// Create the script via .innerHTML so its "parser-inserted" flag is
// set to true and it does not execute
var div = ownerDocument.createElement('div');
div.innerHTML = '<script><' + '/script>'; // eslint-disable-line
// This is guaranteed to yield a script element.
var firstChild = div.firstChild;
domElement = div.removeChild(firstChild);
} else if (typeof props.is === 'string') {
// $FlowIssue `createElement` should be updated for Web Components
domElement = ownerDocument.createElement(type, {
is: props.is
});
} else {
// Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
// See discussion in https://github.com/facebook/react/pull/6896
// and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`
// attributes on `select`s needs to be added before `option`s are inserted.
// This prevents:
// - a bug where the `select` does not scroll to the correct option because singular
// `select` elements automatically pick the first item #13222
// - a bug where the `select` set the first item as selected despite the `size` attribute #14239
// See https://github.com/facebook/react/issues/13222
// and https://github.com/facebook/react/issues/14239
if (type === 'select') {
var node = domElement;
if (props.multiple) {
node.multiple = true;
} else if (props.size) {
// Setting a size greater than 1 causes a select to behave like `multiple=true`, where
// it is possible that no option is selected.
//
// This is only necessary when a select in "single selection mode".
node.size = props.size;
}
}
}
} else {
domElement = ownerDocument.createElementNS(namespaceURI, type);
}
{
if (namespaceURI === HTML_NAMESPACE) {
if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !hasOwnProperty.call(warnedUnknownTags, type)) {
warnedUnknownTags[type] = true;
error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);
}
}
}
return domElement;
}
function createTextNode(text, rootContainerElement) {
return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);
}
function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {
var isCustomComponentTag = isCustomComponent(tag, rawProps);
{
validatePropertiesInDevelopment(tag, rawProps);
} // TODO: Make sure that we check isMounted before firing any of these events.
var props;
switch (tag) {
case 'dialog':
listenToNonDelegatedEvent('cancel', domElement);
listenToNonDelegatedEvent('close', domElement);
props = rawProps;
break;
case 'iframe':
case 'object':
case 'embed':
// We listen to this event in case to ensure emulated bubble
// listeners still fire for the load event.
listenToNonDelegatedEvent('load', domElement);
props = rawProps;
break;
case 'video':
case 'audio':
// We listen to these events in case to ensure emulated bubble
// listeners still fire for all the media events.
for (var i = 0; i < mediaEventTypes.length; i++) {
listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
}
props = rawProps;
break;
case 'source':
// We listen to this event in case to ensure emulated bubble
// listeners still fire for the error event.
listenToNonDelegatedEvent('error', domElement);
props = rawProps;
break;
case 'img':
case 'image':
case 'link':
// We listen to these events in case to ensure emulated bubble
// listeners still fire for error and load events.
listenToNonDelegatedEvent('error', domElement);
listenToNonDelegatedEvent('load', domElement);
props = rawProps;
break;
case 'details':
// We listen to this event in case to ensure emulated bubble
// listeners still fire for the toggle event.
listenToNonDelegatedEvent('toggle', domElement);
props = rawProps;
break;
case 'input':
initWrapperState(domElement, rawProps);
props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
// listeners still fire for the invalid event.
listenToNonDelegatedEvent('invalid', domElement);
break;
case 'option':
validateProps(domElement, rawProps);
props = rawProps;
break;
case 'select':
initWrapperState$1(domElement, rawProps);
props = getHostProps$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
// listeners still fire for the invalid event.
listenToNonDelegatedEvent('invalid', domElement);
break;
case 'textarea':
initWrapperState$2(domElement, rawProps);
props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
// listeners still fire for the invalid event.
listenToNonDelegatedEvent('invalid', domElement);
break;
default:
props = rawProps;
}
assertValidProps(tag, props);
setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);
switch (tag) {
case 'input':
// TODO: Make sure we check if this is still unmounted or do any clean
// up necessary since we never stop tracking anymore.
track(domElement);
postMountWrapper(domElement, rawProps, false);
break;
case 'textarea':
// TODO: Make sure we check if this is still unmounted or do any clean
// up necessary since we never stop tracking anymore.
track(domElement);
postMountWrapper$3(domElement);
break;
case 'option':
postMountWrapper$1(domElement, rawProps);
break;
case 'select':
postMountWrapper$2(domElement, rawProps);
break;
default:
if (typeof props.onClick === 'function') {
// TODO: This cast may not be sound for SVG, MathML or custom elements.
trapClickOnNonInteractiveElement(domElement);
}
break;
}
} // Calculate the diff between the two objects.
function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
{
validatePropertiesInDevelopment(tag, nextRawProps);
}
var updatePayload = null;
var lastProps;
var nextProps;
switch (tag) {
case 'input':
lastProps = getHostProps(domElement, lastRawProps);
nextProps = getHostProps(domElement, nextRawProps);
updatePayload = [];
break;
case 'select':
lastProps = getHostProps$1(domElement, lastRawProps);
nextProps = getHostProps$1(domElement, nextRawProps);
updatePayload = [];
break;
case 'textarea':
lastProps = getHostProps$2(domElement, lastRawProps);
nextProps = getHostProps$2(domElement, nextRawProps);
updatePayload = [];
break;
default:
lastProps = lastRawProps;
nextProps = nextRawProps;
if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {
// TODO: This cast may not be sound for SVG, MathML or custom elements.
trapClickOnNonInteractiveElement(domElement);
}
break;
}
assertValidProps(tag, nextProps);
var propKey;
var styleName;
var styleUpdates = null;
for (propKey in lastProps) {
if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
continue;
}
if (propKey === STYLE) {
var lastStyle = lastProps[propKey];
for (styleName in lastStyle) {
if (lastStyle.hasOwnProperty(styleName)) {
if (!styleUpdates) {
styleUpdates = {};
}
styleUpdates[styleName] = '';
}
}
} else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
// This is a special case. If any listener updates we need to ensure
// that the "current" fiber pointer gets updated so we need a commit
// to update this element.
if (!updatePayload) {
updatePayload = [];
}
} else {
// For all other deleted properties we add it to the queue. We use
// the allowed property list in the commit phase instead.
(updatePayload = updatePayload || []).push(propKey, null);
}
}
for (propKey in nextProps) {
var nextProp = nextProps[propKey];
var lastProp = lastProps != null ? lastProps[propKey] : undefined;
if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
continue;
}
if (propKey === STYLE) {
{
if (nextProp) {
// Freeze the next style object so that we can assume it won't be
// mutated. We have already warned for this in the past.
Object.freeze(nextProp);
}
}
if (lastProp) {
// Unset styles on `lastProp` but not on `nextProp`.
for (styleName in lastProp) {
if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
if (!styleUpdates) {
styleUpdates = {};
}
styleUpdates[styleName] = '';
}
} // Update styles that changed since `lastProp`.
for (styleName in nextProp) {
if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
if (!styleUpdates) {
styleUpdates = {};
}
styleUpdates[styleName] = nextProp[styleName];
}
}
} else {
// Relies on `updateStylesByID` not mutating `styleUpdates`.
if (!styleUpdates) {
if (!updatePayload) {
updatePayload = [];
}
updatePayload.push(propKey, styleUpdates);
}
styleUpdates = nextProp;
}
} else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
var lastHtml = lastProp ? lastProp[HTML$1] : undefined;
if (nextHtml != null) {
if (lastHtml !== nextHtml) {
(updatePayload = updatePayload || []).push(propKey, nextHtml);
}
}
} else if (propKey === CHILDREN) {
if (typeof nextProp === 'string' || typeof nextProp === 'number') {
(updatePayload = updatePayload || []).push(propKey, '' + nextProp);
}
} else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
if (nextProp != null) {
// We eagerly listen to this even though we haven't committed yet.
if ( typeof nextProp !== 'function') {
warnForInvalidEventListener(propKey, nextProp);
}
if (propKey === 'onScroll') {
listenToNonDelegatedEvent('scroll', domElement);
}
}
if (!updatePayload && lastProp !== nextProp) {
// This is a special case. If any listener updates we need to ensure
// that the "current" props pointer gets updated so we need a commit
// to update this element.
updatePayload = [];
}
} else {
// For any other property we always add it to the queue and then we
// filter it out using the allowed property list during the commit.
(updatePayload = updatePayload || []).push(propKey, nextProp);
}
}
if (styleUpdates) {
{
validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);
}
(updatePayload = updatePayload || []).push(STYLE, styleUpdates);
}
return updatePayload;
} // Apply the diff.
function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
// Update checked *before* name.
// In the middle of an update, it is possible to have multiple checked.
// When a checked radio tries to change name, browser makes another radio's checked false.
if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
updateChecked(domElement, nextRawProps);
}
var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.
updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props
// changed.
switch (tag) {
case 'input':
// Update the wrapper around inputs *after* updating props. This has to
// happen after `updateDOMProperties`. Otherwise HTML5 input validations
// raise warnings and prevent the new value from being assigned.
updateWrapper(domElement, nextRawProps);
break;
case 'textarea':
updateWrapper$1(domElement, nextRawProps);
break;
case 'select':
// <select> value update needs to occur after <option> children
// reconciliation
postUpdateWrapper(domElement, nextRawProps);
break;
}
}
function getPossibleStandardName(propName) {
{
var lowerCasedName = propName.toLowerCase();
if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {
return null;
}
return possibleStandardNames[lowerCasedName] || null;
}
}
function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement, isConcurrentMode, shouldWarnDev) {
var isCustomComponentTag;
var extraAttributeNames;
{
isCustomComponentTag = isCustomComponent(tag, rawProps);
validatePropertiesInDevelopment(tag, rawProps);
} // TODO: Make sure that we check isMounted before firing any of these events.
switch (tag) {
case 'dialog':
listenToNonDelegatedEvent('cancel', domElement);
listenToNonDelegatedEvent('close', domElement);
break;
case 'iframe':
case 'object':
case 'embed':
// We listen to this event in case to ensure emulated bubble
// listeners still fire for the load event.
listenToNonDelegatedEvent('load', domElement);
break;
case 'video':
case 'audio':
// We listen to these events in case to ensure emulated bubble
// listeners still fire for all the media events.
for (var i = 0; i < mediaEventTypes.length; i++) {
listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
}
break;
case 'source':
// We listen to this event in case to ensure emulated bubble
// listeners still fire for the error event.
listenToNonDelegatedEvent('error', domElement);
break;
case 'img':
case 'image':
case 'link':
// We listen to these events in case to ensure emulated bubble
// listeners still fire for error and load events.
listenToNonDelegatedEvent('error', domElement);
listenToNonDelegatedEvent('load', domElement);
break;
case 'details':
// We listen to this event in case to ensure emulated bubble
// listeners still fire for the toggle event.
listenToNonDelegatedEvent('toggle', domElement);
break;
case 'input':
initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
// listeners still fire for the invalid event.
listenToNonDelegatedEvent('invalid', domElement);
break;
case 'option':
validateProps(domElement, rawProps);
break;
case 'select':
initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
// listeners still fire for the invalid event.
listenToNonDelegatedEvent('invalid', domElement);
break;
case 'textarea':
initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
// listeners still fire for the invalid event.
listenToNonDelegatedEvent('invalid', domElement);
break;
}
assertValidProps(tag, rawProps);
{
extraAttributeNames = new Set();
var attributes = domElement.attributes;
for (var _i = 0; _i < attributes.length; _i++) {
var name = attributes[_i].name.toLowerCase();
switch (name) {
// Controlled attributes are not validated
// TODO: Only ignore them on controlled tags.
case 'value':
break;
case 'checked':
break;
case 'selected':
break;
default:
// Intentionally use the original name.
// See discussion in https://github.com/facebook/react/pull/10676.
extraAttributeNames.add(attributes[_i].name);
}
}
}
var updatePayload = null;
for (var propKey in rawProps) {
if (!rawProps.hasOwnProperty(propKey)) {
continue;
}
var nextProp = rawProps[propKey];
if (propKey === CHILDREN) {
// For text content children we compare against textContent. This
// might match additional HTML that is hidden when we read it using
// textContent. E.g. "foo" will match "f<span>oo</span>" but that still
// satisfies our requirement. Our requirement is not to produce perfect
// HTML and attributes. Ideally we should preserve structure but it's
// ok not to if the visible content is still enough to indicate what
// even listeners these nodes might be wired up to.
// TODO: Warn if there is more than a single textNode as a child.
// TODO: Should we use domElement.firstChild.nodeValue to compare?
if (typeof nextProp === 'string') {
if (domElement.textContent !== nextProp) {
if (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {
checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev);
}
updatePayload = [CHILDREN, nextProp];
}
} else if (typeof nextProp === 'number') {
if (domElement.textContent !== '' + nextProp) {
if (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {
checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev);
}
updatePayload = [CHILDREN, '' + nextProp];
}
}
} else if (registrationNameDependencies.hasOwnProperty(propKey)) {
if (nextProp != null) {
if ( typeof nextProp !== 'function') {
warnForInvalidEventListener(propKey, nextProp);
}
if (propKey === 'onScroll') {
listenToNonDelegatedEvent('scroll', domElement);
}
}
} else if (shouldWarnDev && true && // Convince Flow we've calculated it (it's DEV-only in this method.)
typeof isCustomComponentTag === 'boolean') {
// Validate that the properties correspond to their expected values.
var serverValue = void 0;
var propertyInfo = isCustomComponentTag && enableCustomElementPropertySupport ? null : getPropertyInfo(propKey);
if (rawProps[SUPPRESS_HYDRATION_WARNING] === true) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated
// TODO: Only ignore them on controlled tags.
propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
var serverHTML = domElement.innerHTML;
var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
if (nextHtml != null) {
var expectedHTML = normalizeHTML(domElement, nextHtml);
if (expectedHTML !== serverHTML) {
warnForPropDifference(propKey, serverHTML, expectedHTML);
}
}
} else if (propKey === STYLE) {
// $FlowFixMe - Should be inferred as not undefined.
extraAttributeNames.delete(propKey);
if (canDiffStyleForHydrationWarning) {
var expectedStyle = createDangerousStringForStyles(nextProp);
serverValue = domElement.getAttribute('style');
if (expectedStyle !== serverValue) {
warnForPropDifference(propKey, serverValue, expectedStyle);
}
}
} else if (isCustomComponentTag && !enableCustomElementPropertySupport) {
// $FlowFixMe - Should be inferred as not undefined.
extraAttributeNames.delete(propKey.toLowerCase());
serverValue = getValueForAttribute(domElement, propKey, nextProp);
if (nextProp !== serverValue) {
warnForPropDifference(propKey, serverValue, nextProp);
}
} else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {
var isMismatchDueToBadCasing = false;
if (propertyInfo !== null) {
// $FlowFixMe - Should be inferred as not undefined.
extraAttributeNames.delete(propertyInfo.attributeName);
serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);
} else {
var ownNamespace = parentNamespace;
if (ownNamespace === HTML_NAMESPACE) {
ownNamespace = getIntrinsicNamespace(tag);
}
if (ownNamespace === HTML_NAMESPACE) {
// $FlowFixMe - Should be inferred as not undefined.
extraAttributeNames.delete(propKey.toLowerCase());
} else {
var standardName = getPossibleStandardName(propKey);
if (standardName !== null && standardName !== propKey) {
// If an SVG prop is supplied with bad casing, it will
// be successfully parsed from HTML, but will produce a mismatch
// (and would be incorrectly rendered on the client).
// However, we already warn about bad casing elsewhere.
// So we'll skip the misleading extra mismatch warning in this case.
isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined.
extraAttributeNames.delete(standardName);
} // $FlowFixMe - Should be inferred as not undefined.
extraAttributeNames.delete(propKey);
}
serverValue = getValueForAttribute(domElement, propKey, nextProp);
}
var dontWarnCustomElement = enableCustomElementPropertySupport ;
if (!dontWarnCustomElement && nextProp !== serverValue && !isMismatchDueToBadCasing) {
warnForPropDifference(propKey, serverValue, nextProp);
}
}
}
}
{
if (shouldWarnDev) {
if ( // $FlowFixMe - Should be inferred as not undefined.
extraAttributeNames.size > 0 && rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {
// $FlowFixMe - Should be inferred as not undefined.
warnForExtraAttributes(extraAttributeNames);
}
}
}
switch (tag) {
case 'input':
// TODO: Make sure we check if this is still unmounted or do any clean
// up necessary since we never stop tracking anymore.
track(domElement);
postMountWrapper(domElement, rawProps, true);
break;
case 'textarea':
// TODO: Make sure we check if this is still unmounted or do any clean
// up necessary since we never stop tracking anymore.
track(domElement);
postMountWrapper$3(domElement);
break;
case 'select':
case 'option':
// For input and textarea we current always set the value property at
// post mount to force it to diverge from attributes. However, for
// option and select we don't quite do the same thing and select
// is not resilient to the DOM state changing so we don't do that here.
// TODO: Consider not doing this for input and textarea.
break;
default:
if (typeof rawProps.onClick === 'function') {
// TODO: This cast may not be sound for SVG, MathML or custom elements.
trapClickOnNonInteractiveElement(domElement);
}
break;
}
return updatePayload;
}
function diffHydratedText(textNode, text, isConcurrentMode) {
var isDifferent = textNode.nodeValue !== text;
return isDifferent;
}
function warnForDeletedHydratableElement(parentNode, child) {
{
if (didWarnInvalidHydration) {
return;
}
didWarnInvalidHydration = true;
error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
}
}
function warnForDeletedHydratableText(parentNode, child) {
{
if (didWarnInvalidHydration) {
return;
}
didWarnInvalidHydration = true;
error('Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
}
}
function warnForInsertedHydratedElement(parentNode, tag, props) {
{
if (didWarnInvalidHydration) {
return;
}
didWarnInvalidHydration = true;
error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
}
}
function warnForInsertedHydratedText(parentNode, text) {
{
if (text === '') {
// We expect to insert empty text nodes since they're not represented in
// the HTML.
// TODO: Remove this special case if we can just avoid inserting empty
// text nodes.
return;
}
if (didWarnInvalidHydration) {
return;
}
didWarnInvalidHydration = true;
error('Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
}
}
function restoreControlledState$3(domElement, tag, props) {
switch (tag) {
case 'input':
restoreControlledState(domElement, props);
return;
case 'textarea':
restoreControlledState$2(domElement, props);
return;
case 'select':
restoreControlledState$1(domElement, props);
return;
}
}
var validateDOMNesting = function () {};
var updatedAncestorInfo = function () {};
{
// This validation code was written based on the HTML5 parsing spec:
// https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
//
// Note: this does not catch all invalid nesting, nor does it try to (as it's
// not clear what practical benefit doing so provides); instead, we warn only
// for cases where the parser will give a parse tree differing from what React
// intended. For example, <b><div></div></b> is invalid but we don't warn
// because it still parses correctly; we do warn for other cases like nested
// <p> tags where the beginning of the second element implicitly closes the
// first, causing a confusing mess.
// https://html.spec.whatwg.org/multipage/syntax.html#special
var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
// TODO: Distinguish by namespace here -- for <title>, including it here
// errs on the side of fewer warnings
'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
var emptyAncestorInfo = {
current: null,
formTag: null,
aTagInScope: null,
buttonTagInScope: null,
nobrTagInScope: null,
pTagInButtonScope: null,
listItemTagAutoclosing: null,
dlItemTagAutoclosing: null
};
updatedAncestorInfo = function (oldInfo, tag) {
var ancestorInfo = assign({}, oldInfo || emptyAncestorInfo);
var info = {
tag: tag
};
if (inScopeTags.indexOf(tag) !== -1) {
ancestorInfo.aTagInScope = null;
ancestorInfo.buttonTagInScope = null;
ancestorInfo.nobrTagInScope = null;
}
if (buttonScopeTags.indexOf(tag) !== -1) {
ancestorInfo.pTagInButtonScope = null;
} // See rules for 'li', 'dd', 'dt' start tags in
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
ancestorInfo.listItemTagAutoclosing = null;
ancestorInfo.dlItemTagAutoclosing = null;
}
ancestorInfo.current = info;
if (tag === 'form') {
ancestorInfo.formTag = info;
}
if (tag === 'a') {
ancestorInfo.aTagInScope = info;
}
if (tag === 'button') {
ancestorInfo.buttonTagInScope = info;
}
if (tag === 'nobr') {
ancestorInfo.nobrTagInScope = info;
}
if (tag === 'p') {
ancestorInfo.pTagInButtonScope = info;
}
if (tag === 'li') {
ancestorInfo.listItemTagAutoclosing = info;
}
if (tag === 'dd' || tag === 'dt') {
ancestorInfo.dlItemTagAutoclosing = info;
}
return ancestorInfo;
};
/**
* Returns whether
*/
var isTagValidWithParent = function (tag, parentTag) {
// First, let's check if we're in an unusual parsing mode...
switch (parentTag) {
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
case 'select':
return tag === 'option' || tag === 'optgroup' || tag === '#text';
case 'optgroup':
return tag === 'option' || tag === '#text';
// Strictly speaking, seeing an <option> doesn't mean we're in a <select>
// but
case 'option':
return tag === '#text';
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
// No special behavior since these rules fall back to "in body" mode for
// all except special table nodes which cause bad parsing behavior anyway.
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
case 'tr':
return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
case 'tbody':
case 'thead':
case 'tfoot':
return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
case 'colgroup':
return tag === 'col' || tag === 'template';
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
case 'table':
return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
case 'head':
return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
// https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
case 'html':
return tag === 'head' || tag === 'body' || tag === 'frameset';
case 'frameset':
return tag === 'frame';
case '#document':
return tag === 'html';
} // Probably in the "in body" parsing mode, so we outlaw only tag combos
// where the parsing rules cause implicit opens or closes to be added.
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
switch (tag) {
case 'h1':
case 'h2':
case 'h3':
case 'h4':
case 'h5':
case 'h6':
return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
case 'rp':
case 'rt':
return impliedEndTags.indexOf(parentTag) === -1;
case 'body':
case 'caption':
case 'col':
case 'colgroup':
case 'frameset':
case 'frame':
case 'head':
case 'html':
case 'tbody':
case 'td':
case 'tfoot':
case 'th':
case 'thead':
case 'tr':
// These tags are only valid with a few parents that have special child
// parsing rules -- if we're down here, then none of those matched and
// so we allow it only if we don't know what the parent is, as all other
// cases are invalid.
return parentTag == null;
}
return true;
};
/**
* Returns whether
*/
var findInvalidAncestorForTag = function (tag, ancestorInfo) {
switch (tag) {
case 'address':
case 'article':
case 'aside':
case 'blockquote':
case 'center':
case 'details':
case 'dialog':
case 'dir':
case 'div':
case 'dl':
case 'fieldset':
case 'figcaption':
case 'figure':
case 'footer':
case 'header':
case 'hgroup':
case 'main':
case 'menu':
case 'nav':
case 'ol':
case 'p':
case 'section':
case 'summary':
case 'ul':
case 'pre':
case 'listing':
case 'table':
case 'hr':
case 'xmp':
case 'h1':
case 'h2':
case 'h3':
case 'h4':
case 'h5':
case 'h6':
return ancestorInfo.pTagInButtonScope;
case 'form':
return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
case 'li':
return ancestorInfo.listItemTagAutoclosing;
case 'dd':
case 'dt':
return ancestorInfo.dlItemTagAutoclosing;
case 'button':
return ancestorInfo.buttonTagInScope;
case 'a':
// Spec says something about storing a list of markers, but it sounds
// equivalent to this check.
return ancestorInfo.aTagInScope;
case 'nobr':
return ancestorInfo.nobrTagInScope;
}
return null;
};
var didWarn$1 = {};
validateDOMNesting = function (childTag, childText, ancestorInfo) {
ancestorInfo = ancestorInfo || emptyAncestorInfo;
var parentInfo = ancestorInfo.current;
var parentTag = parentInfo && parentInfo.tag;
if (childText != null) {
if (childTag != null) {
error('validateDOMNesting: when childText is passed, childTag should be null');
}
childTag = '#text';
}
var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
var invalidParentOrAncestor = invalidParent || invalidAncestor;
if (!invalidParentOrAncestor) {
return;
}
var ancestorTag = invalidParentOrAncestor.tag;
var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag;
if (didWarn$1[warnKey]) {
return;
}
didWarn$1[warnKey] = true;
var tagDisplayName = childTag;
var whitespaceInfo = '';
if (childTag === '#text') {
if (/\S/.test(childText)) {
tagDisplayName = 'Text nodes';
} else {
tagDisplayName = 'Whitespace text nodes';
whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
}
} else {
tagDisplayName = '<' + childTag + '>';
}
if (invalidParent) {
var info = '';
if (ancestorTag === 'table' && childTag === 'tr') {
info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';
}
error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);
} else {
error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);
}
};
}
var SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';
var SUSPENSE_START_DATA = '$';
var SUSPENSE_END_DATA = '/$';
var SUSPENSE_PENDING_START_DATA = '$?';
var SUSPENSE_FALLBACK_START_DATA = '$!';
var STYLE$1 = 'style';
var eventsEnabled = null;
var selectionInformation = null;
function getRootHostContext(rootContainerInstance) {
var type;
var namespace;
var nodeType = rootContainerInstance.nodeType;
switch (nodeType) {
case DOCUMENT_NODE:
case DOCUMENT_FRAGMENT_NODE:
{
type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';
var root = rootContainerInstance.documentElement;
namespace = root ? root.namespaceURI : getChildNamespace(null, '');
break;
}
default:
{
var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;
var ownNamespace = container.namespaceURI || null;
type = container.tagName;
namespace = getChildNamespace(ownNamespace, type);
break;
}
}
{
var validatedTag = type.toLowerCase();
var ancestorInfo = updatedAncestorInfo(null, validatedTag);
return {
namespace: namespace,
ancestorInfo: ancestorInfo
};
}
}
function getChildHostContext(parentHostContext, type, rootContainerInstance) {
{
var parentHostContextDev = parentHostContext;
var namespace = getChildNamespace(parentHostContextDev.namespace, type);
var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);
return {
namespace: namespace,
ancestorInfo: ancestorInfo
};
}
}
function getPublicInstance(instance) {
return instance;
}
function prepareForCommit(containerInfo) {
eventsEnabled = isEnabled();
selectionInformation = getSelectionInformation();
var activeInstance = null;
setEnabled(false);
return activeInstance;
}
function resetAfterCommit(containerInfo) {
restoreSelection(selectionInformation);
setEnabled(eventsEnabled);
eventsEnabled = null;
selectionInformation = null;
}
function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
var parentNamespace;
{
// TODO: take namespace into account when validating.
var hostContextDev = hostContext;
validateDOMNesting(type, null, hostContextDev.ancestorInfo);
if (typeof props.children === 'string' || typeof props.children === 'number') {
var string = '' + props.children;
var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
validateDOMNesting(null, string, ownAncestorInfo);
}
parentNamespace = hostContextDev.namespace;
}
var domElement = createElement(type, props, rootContainerInstance, parentNamespace);
precacheFiberNode(internalInstanceHandle, domElement);
updateFiberProps(domElement, props);
return domElement;
}
function appendInitialChild(parentInstance, child) {
parentInstance.appendChild(child);
}
function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {
setInitialProperties(domElement, type, props, rootContainerInstance);
switch (type) {
case 'button':
case 'input':
case 'select':
case 'textarea':
return !!props.autoFocus;
case 'img':
return true;
default:
return false;
}
}
function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {
{
var hostContextDev = hostContext;
if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {
var string = '' + newProps.children;
var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
validateDOMNesting(null, string, ownAncestorInfo);
}
}
return diffProperties(domElement, type, oldProps, newProps);
}
function shouldSetTextContent(type, props) {
return type === 'textarea' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
}
function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {
{
var hostContextDev = hostContext;
validateDOMNesting(null, text, hostContextDev.ancestorInfo);
}
var textNode = createTextNode(text, rootContainerInstance);
precacheFiberNode(internalInstanceHandle, textNode);
return textNode;
}
function getCurrentEventPriority() {
var currentEvent = window.event;
if (currentEvent === undefined) {
return DefaultEventPriority;
}
return getEventPriority(currentEvent.type);
}
// if a component just imports ReactDOM (e.g. for findDOMNode).
// Some environments might not have setTimeout or clearTimeout.
var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;
var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;
var noTimeout = -1;
var localPromise = typeof Promise === 'function' ? Promise : undefined; // -------------------
var scheduleMicrotask = typeof queueMicrotask === 'function' ? queueMicrotask : typeof localPromise !== 'undefined' ? function (callback) {
return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);
} : scheduleTimeout; // TODO: Determine the best fallback here.
function handleErrorInNextTick(error) {
setTimeout(function () {
throw error;
});
} // -------------------
function commitMount(domElement, type, newProps, internalInstanceHandle) {
// Despite the naming that might imply otherwise, this method only
// fires if there is an `Update` effect scheduled during mounting.
// This happens if `finalizeInitialChildren` returns `true` (which it
// does to implement the `autoFocus` attribute on the client). But
// there are also other cases when this might happen (such as patching
// up text content during hydration mismatch). So we'll check this again.
switch (type) {
case 'button':
case 'input':
case 'select':
case 'textarea':
if (newProps.autoFocus) {
domElement.focus();
}
return;
case 'img':
{
if (newProps.src) {
domElement.src = newProps.src;
}
return;
}
}
}
function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {
// Apply the diff to the DOM node.
updateProperties(domElement, updatePayload, type, oldProps, newProps); // Update the props handle so that we know which props are the ones with
// with current event handlers.
updateFiberProps(domElement, newProps);
}
function resetTextContent(domElement) {
setTextContent(domElement, '');
}
function commitTextUpdate(textInstance, oldText, newText) {
textInstance.nodeValue = newText;
}
function appendChild(parentInstance, child) {
parentInstance.appendChild(child);
}
function appendChildToContainer(container, child) {
var parentNode;
if (container.nodeType === COMMENT_NODE) {
parentNode = container.parentNode;
parentNode.insertBefore(child, container);
} else {
parentNode = container;
parentNode.appendChild(child);
} // This container might be used for a portal.
// If something inside a portal is clicked, that click should bubble
// through the React tree. However, on Mobile Safari the click would
// never bubble through the *DOM* tree unless an ancestor with onclick
// event exists. So we wouldn't see it and dispatch it.
// This is why we ensure that non React root containers have inline onclick
// defined.
// https://github.com/facebook/react/issues/11918
var reactRootContainer = container._reactRootContainer;
if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {
// TODO: This cast may not be sound for SVG, MathML or custom elements.
trapClickOnNonInteractiveElement(parentNode);
}
}
function insertBefore(parentInstance, child, beforeChild) {
parentInstance.insertBefore(child, beforeChild);
}
function insertInContainerBefore(container, child, beforeChild) {
if (container.nodeType === COMMENT_NODE) {
container.parentNode.insertBefore(child, beforeChild);
} else {
container.insertBefore(child, beforeChild);
}
}
function removeChild(parentInstance, child) {
parentInstance.removeChild(child);
}
function removeChildFromContainer(container, child) {
if (container.nodeType === COMMENT_NODE) {
container.parentNode.removeChild(child);
} else {
container.removeChild(child);
}
}
function clearSuspenseBoundary(parentInstance, suspenseInstance) {
var node = suspenseInstance; // Delete all nodes within this suspense boundary.
// There might be nested nodes so we need to keep track of how
// deep we are and only break out when we're back on top.
var depth = 0;
do {
var nextNode = node.nextSibling;
parentInstance.removeChild(node);
if (nextNode && nextNode.nodeType === COMMENT_NODE) {
var data = nextNode.data;
if (data === SUSPENSE_END_DATA) {
if (depth === 0) {
parentInstance.removeChild(nextNode); // Retry if any event replaying was blocked on this.
retryIfBlockedOn(suspenseInstance);
return;
} else {
depth--;
}
} else if (data === SUSPENSE_START_DATA || data === SUSPENSE_PENDING_START_DATA || data === SUSPENSE_FALLBACK_START_DATA) {
depth++;
}
}
node = nextNode;
} while (node); // TODO: Warn, we didn't find the end comment boundary.
// Retry if any event replaying was blocked on this.
retryIfBlockedOn(suspenseInstance);
}
function clearSuspenseBoundaryFromContainer(container, suspenseInstance) {
if (container.nodeType === COMMENT_NODE) {
clearSuspenseBoundary(container.parentNode, suspenseInstance);
} else if (container.nodeType === ELEMENT_NODE) {
clearSuspenseBoundary(container, suspenseInstance);
} // Retry if any event replaying was blocked on this.
retryIfBlockedOn(container);
}
function hideInstance(instance) {
// TODO: Does this work for all element types? What about MathML? Should we
// pass host context to this method?
instance = instance;
var style = instance.style;
if (typeof style.setProperty === 'function') {
style.setProperty('display', 'none', 'important');
} else {
style.display = 'none';
}
}
function hideTextInstance(textInstance) {
textInstance.nodeValue = '';
}
function unhideInstance(instance, props) {
instance = instance;
var styleProp = props[STYLE$1];
var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;
instance.style.display = dangerousStyleValue('display', display);
}
function unhideTextInstance(textInstance, text) {
textInstance.nodeValue = text;
}
function clearContainer(container) {
if (container.nodeType === ELEMENT_NODE) {
container.textContent = '';
} else if (container.nodeType === DOCUMENT_NODE) {
if (container.documentElement) {
container.removeChild(container.documentElement);
}
}
} // -------------------
function canHydrateInstance(instance, type, props) {
if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {
return null;
} // This has now been refined to an element node.
return instance;
}
function canHydrateTextInstance(instance, text) {
if (text === '' || instance.nodeType !== TEXT_NODE) {
// Empty strings are not parsed by HTML so there won't be a correct match here.
return null;
} // This has now been refined to a text node.
return instance;
}
function canHydrateSuspenseInstance(instance) {
if (instance.nodeType !== COMMENT_NODE) {
// Empty strings are not parsed by HTML so there won't be a correct match here.
return null;
} // This has now been refined to a suspense node.
return instance;
}
function isSuspenseInstancePending(instance) {
return instance.data === SUSPENSE_PENDING_START_DATA;
}
function isSuspenseInstanceFallback(instance) {
return instance.data === SUSPENSE_FALLBACK_START_DATA;
}
function getSuspenseInstanceFallbackErrorDetails(instance) {
var dataset = instance.nextSibling && instance.nextSibling.dataset;
var digest, message, stack;
if (dataset) {
digest = dataset.dgst;
{
message = dataset.msg;
stack = dataset.stck;
}
}
{
return {
message: message,
digest: digest,
stack: stack
};
} // let value = {message: undefined, hash: undefined};
// const nextSibling = instance.nextSibling;
// if (nextSibling) {
// const dataset = ((nextSibling: any): HTMLTemplateElement).dataset;
// value.message = dataset.msg;
// value.hash = dataset.hash;
// if (true) {
// value.stack = dataset.stack;
// }
// }
// return value;
}
function registerSuspenseInstanceRetry(instance, callback) {
instance._reactRetry = callback;
}
function getNextHydratable(node) {
// Skip non-hydratable nodes.
for (; node != null; node = node.nextSibling) {
var nodeType = node.nodeType;
if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {
break;
}
if (nodeType === COMMENT_NODE) {
var nodeData = node.data;
if (nodeData === SUSPENSE_START_DATA || nodeData === SUSPENSE_FALLBACK_START_DATA || nodeData === SUSPENSE_PENDING_START_DATA) {
break;
}
if (nodeData === SUSPENSE_END_DATA) {
return null;
}
}
}
return node;
}
function getNextHydratableSibling(instance) {
return getNextHydratable(instance.nextSibling);
}
function getFirstHydratableChild(parentInstance) {
return getNextHydratable(parentInstance.firstChild);
}
function getFirstHydratableChildWithinContainer(parentContainer) {
return getNextHydratable(parentContainer.firstChild);
}
function getFirstHydratableChildWithinSuspenseInstance(parentInstance) {
return getNextHydratable(parentInstance.nextSibling);
}
function hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle, shouldWarnDev) {
precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events
// get attached.
updateFiberProps(instance, props);
var parentNamespace;
{
var hostContextDev = hostContext;
parentNamespace = hostContextDev.namespace;
} // TODO: Temporary hack to check if we're in a concurrent root. We can delete
// when the legacy root API is removed.
var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;
return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance, isConcurrentMode, shouldWarnDev);
}
function hydrateTextInstance(textInstance, text, internalInstanceHandle, shouldWarnDev) {
precacheFiberNode(internalInstanceHandle, textInstance); // TODO: Temporary hack to check if we're in a concurrent root. We can delete
// when the legacy root API is removed.
var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;
return diffHydratedText(textInstance, text);
}
function hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) {
precacheFiberNode(internalInstanceHandle, suspenseInstance);
}
function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {
var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.
// There might be nested nodes so we need to keep track of how
// deep we are and only break out when we're back on top.
var depth = 0;
while (node) {
if (node.nodeType === COMMENT_NODE) {
var data = node.data;
if (data === SUSPENSE_END_DATA) {
if (depth === 0) {
return getNextHydratableSibling(node);
} else {
depth--;
}
} else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
depth++;
}
}
node = node.nextSibling;
} // TODO: Warn, we didn't find the end comment boundary.
return null;
} // Returns the SuspenseInstance if this node is a direct child of a
// SuspenseInstance. I.e. if its previous sibling is a Comment with
// SUSPENSE_x_START_DATA. Otherwise, null.
function getParentSuspenseInstance(targetInstance) {
var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.
// There might be nested nodes so we need to keep track of how
// deep we are and only break out when we're back on top.
var depth = 0;
while (node) {
if (node.nodeType === COMMENT_NODE) {
var data = node.data;
if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
if (depth === 0) {
return node;
} else {
depth--;
}
} else if (data === SUSPENSE_END_DATA) {
depth++;
}
}
node = node.previousSibling;
}
return null;
}
function commitHydratedContainer(container) {
// Retry if any event replaying was blocked on this.
retryIfBlockedOn(container);
}
function commitHydratedSuspenseInstance(suspenseInstance) {
// Retry if any event replaying was blocked on this.
retryIfBlockedOn(suspenseInstance);
}
function shouldDeleteUnhydratedTailInstances(parentType) {
return parentType !== 'head' && parentType !== 'body';
}
function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text, isConcurrentMode) {
var shouldWarnDev = true;
checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);
}
function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text, isConcurrentMode) {
if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
var shouldWarnDev = true;
checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);
}
}
function didNotHydrateInstanceWithinContainer(parentContainer, instance) {
{
if (instance.nodeType === ELEMENT_NODE) {
warnForDeletedHydratableElement(parentContainer, instance);
} else if (instance.nodeType === COMMENT_NODE) ; else {
warnForDeletedHydratableText(parentContainer, instance);
}
}
}
function didNotHydrateInstanceWithinSuspenseInstance(parentInstance, instance) {
{
// $FlowFixMe: Only Element or Document can be parent nodes.
var parentNode = parentInstance.parentNode;
if (parentNode !== null) {
if (instance.nodeType === ELEMENT_NODE) {
warnForDeletedHydratableElement(parentNode, instance);
} else if (instance.nodeType === COMMENT_NODE) ; else {
warnForDeletedHydratableText(parentNode, instance);
}
}
}
}
function didNotHydrateInstance(parentType, parentProps, parentInstance, instance, isConcurrentMode) {
{
if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
if (instance.nodeType === ELEMENT_NODE) {
warnForDeletedHydratableElement(parentInstance, instance);
} else if (instance.nodeType === COMMENT_NODE) ; else {
warnForDeletedHydratableText(parentInstance, instance);
}
}
}
}
function didNotFindHydratableInstanceWithinContainer(parentContainer, type, props) {
{
warnForInsertedHydratedElement(parentContainer, type);
}
}
function didNotFindHydratableTextInstanceWithinContainer(parentContainer, text) {
{
warnForInsertedHydratedText(parentContainer, text);
}
}
function didNotFindHydratableInstanceWithinSuspenseInstance(parentInstance, type, props) {
{
// $FlowFixMe: Only Element or Document can be parent nodes.
var parentNode = parentInstance.parentNode;
if (parentNode !== null) warnForInsertedHydratedElement(parentNode, type);
}
}
function didNotFindHydratableTextInstanceWithinSuspenseInstance(parentInstance, text) {
{
// $FlowFixMe: Only Element or Document can be parent nodes.
var parentNode = parentInstance.parentNode;
if (parentNode !== null) warnForInsertedHydratedText(parentNode, text);
}
}
function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props, isConcurrentMode) {
{
if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
warnForInsertedHydratedElement(parentInstance, type);
}
}
}
function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text, isConcurrentMode) {
{
if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
warnForInsertedHydratedText(parentInstance, text);
}
}
}
function errorHydratingContainer(parentContainer) {
{
// TODO: This gets logged by onRecoverableError, too, so we should be
// able to remove it.
error('An error occurred during hydration. The server HTML was replaced with client content in <%s>.', parentContainer.nodeName.toLowerCase());
}
}
function preparePortalMount(portalInstance) {
listenToAllSupportedEvents(portalInstance);
}
var randomKey = Math.random().toString(36).slice(2);
var internalInstanceKey = '__reactFiber$' + randomKey;
var internalPropsKey = '__reactProps$' + randomKey;
var internalContainerInstanceKey = '__reactContainer$' + randomKey;
var internalEventHandlersKey = '__reactEvents$' + randomKey;
var internalEventHandlerListenersKey = '__reactListeners$' + randomKey;
var internalEventHandlesSetKey = '__reactHandles$' + randomKey;
function detachDeletedInstance(node) {
// TODO: This function is only called on host components. I don't think all of
// these fields are relevant.
delete node[internalInstanceKey];
delete node[internalPropsKey];
delete node[internalEventHandlersKey];
delete node[internalEventHandlerListenersKey];
delete node[internalEventHandlesSetKey];
}
function precacheFiberNode(hostInst, node) {
node[internalInstanceKey] = hostInst;
}
function markContainerAsRoot(hostRoot, node) {
node[internalContainerInstanceKey] = hostRoot;
}
function unmarkContainerAsRoot(node) {
node[internalContainerInstanceKey] = null;
}
function isContainerMarkedAsRoot(node) {
return !!node[internalContainerInstanceKey];
} // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.
// If the target node is part of a hydrated or not yet rendered subtree, then
// this may also return a SuspenseComponent or HostRoot to indicate that.
// Conceptually the HostRoot fiber is a child of the Container node. So if you
// pass the Container node as the targetNode, you will not actually get the
// HostRoot back. To get to the HostRoot, you need to pass a child of it.
// The same thing applies to Suspense boundaries.
function getClosestInstanceFromNode(targetNode) {
var targetInst = targetNode[internalInstanceKey];
if (targetInst) {
// Don't return HostRoot or SuspenseComponent here.
return targetInst;
} // If the direct event target isn't a React owned DOM node, we need to look
// to see if one of its parents is a React owned DOM node.
var parentNode = targetNode.parentNode;
while (parentNode) {
// We'll check if this is a container root that could include
// React nodes in the future. We need to check this first because
// if we're a child of a dehydrated container, we need to first
// find that inner container before moving on to finding the parent
// instance. Note that we don't check this field on the targetNode
// itself because the fibers are conceptually between the container
// node and the first child. It isn't surrounding the container node.
// If it's not a container, we check if it's an instance.
targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];
if (targetInst) {
// Since this wasn't the direct target of the event, we might have
// stepped past dehydrated DOM nodes to get here. However they could
// also have been non-React nodes. We need to answer which one.
// If we the instance doesn't have any children, then there can't be
// a nested suspense boundary within it. So we can use this as a fast
// bailout. Most of the time, when people add non-React children to
// the tree, it is using a ref to a child-less DOM node.
// Normally we'd only need to check one of the fibers because if it
// has ever gone from having children to deleting them or vice versa
// it would have deleted the dehydrated boundary nested inside already.
// However, since the HostRoot starts out with an alternate it might
// have one on the alternate so we need to check in case this was a
// root.
var alternate = targetInst.alternate;
if (targetInst.child !== null || alternate !== null && alternate.child !== null) {
// Next we need to figure out if the node that skipped past is
// nested within a dehydrated boundary and if so, which one.
var suspenseInstance = getParentSuspenseInstance(targetNode);
while (suspenseInstance !== null) {
// We found a suspense instance. That means that we haven't
// hydrated it yet. Even though we leave the comments in the
// DOM after hydrating, and there are boundaries in the DOM
// that could already be hydrated, we wouldn't have found them
// through this pass since if the target is hydrated it would
// have had an internalInstanceKey on it.
// Let's get the fiber associated with the SuspenseComponent
// as the deepest instance.
var targetSuspenseInst = suspenseInstance[internalInstanceKey];
if (targetSuspenseInst) {
return targetSuspenseInst;
} // If we don't find a Fiber on the comment, it might be because
// we haven't gotten to hydrate it yet. There might still be a
// parent boundary that hasn't above this one so we need to find
// the outer most that is known.
suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent
// host component also hasn't hydrated yet. We can return it
// below since it will bail out on the isMounted check later.
}
}
return targetInst;
}
targetNode = parentNode;
parentNode = targetNode.parentNode;
}
return null;
}
/**
* Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
* instance, or null if the node was not rendered by this React.
*/
function getInstanceFromNode(node) {
var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];
if (inst) {
if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {
return inst;
} else {
return null;
}
}
return null;
}
/**
* Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
* DOM node.
*/
function getNodeFromInstance(inst) {
if (inst.tag === HostComponent || inst.tag === HostText) {
// In Fiber this, is just the state node right now. We assume it will be
// a host component or host text.
return inst.stateNode;
} // Without this first invariant, passing a non-DOM-component triggers the next
// invariant for a missing parent, which is super confusing.
throw new Error('getNodeFromInstance: Invalid argument.');
}
function getFiberCurrentPropsFromNode(node) {
return node[internalPropsKey] || null;
}
function updateFiberProps(node, props) {
node[internalPropsKey] = props;
}
function getEventListenerSet(node) {
var elementListenerSet = node[internalEventHandlersKey];
if (elementListenerSet === undefined) {
elementListenerSet = node[internalEventHandlersKey] = new Set();
}
return elementListenerSet;
}
var loggedTypeFailures = {};
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
function setCurrentlyValidatingElement(element) {
{
if (element) {
var owner = element._owner;
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
} else {
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
}
}
}
function checkPropTypes(typeSpecs, values, location, componentName, element) {
{
// $FlowFixMe This is okay but Flow doesn't know it.
var has = Function.call.bind(hasOwnProperty);
for (var typeSpecName in typeSpecs) {
if (has(typeSpecs, typeSpecName)) {
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
// fail the render phase where it didn't fail before. So we log it.
// After these have been cleaned up, we'll let them throw.
try {
// This is intentionally an invariant that gets caught. It's the same
// behavior as without this statement except with a better message.
if (typeof typeSpecs[typeSpecName] !== 'function') {
// eslint-disable-next-line react-internal/prod-error-codes
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
err.name = 'Invariant Violation';
throw err;
}
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
} catch (ex) {
error$1 = ex;
}
if (error$1 && !(error$1 instanceof Error)) {
setCurrentlyValidatingElement(element);
error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
setCurrentlyValidatingElement(null);
}
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
// Only monitor this failure once because there tends to be a lot of the
// same error.
loggedTypeFailures[error$1.message] = true;
setCurrentlyValidatingElement(element);
error('Failed %s type: %s', location, error$1.message);
setCurrentlyValidatingElement(null);
}
}
}
}
}
var valueStack = [];
var fiberStack;
{
fiberStack = [];
}
var index = -1;
function createCursor(defaultValue) {
return {
current: defaultValue
};
}
function pop(cursor, fiber) {
if (index < 0) {
{
error('Unexpected pop.');
}
return;
}
{
if (fiber !== fiberStack[index]) {
error('Unexpected Fiber popped.');
}
}
cursor.current = valueStack[index];
valueStack[index] = null;
{
fiberStack[index] = null;
}
index--;
}
function push(cursor, value, fiber) {
index++;
valueStack[index] = cursor.current;
{
fiberStack[index] = fiber;
}
cursor.current = value;
}
var warnedAboutMissingGetChildContext;
{
warnedAboutMissingGetChildContext = {};
}
var emptyContextObject = {};
{
Object.freeze(emptyContextObject);
} // A cursor to the current merged context object on the stack.
var contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.
var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.
// We use this to get access to the parent context after we have already
// pushed the next context provider, and now need to merge their contexts.
var previousContext = emptyContextObject;
function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {
{
if (didPushOwnContextIfProvider && isContextProvider(Component)) {
// If the fiber is a context provider itself, when we read its context
// we may have already pushed its own child context on the stack. A context
// provider should not "see" its own child context. Therefore we read the
// previous (parent) context instead for a context provider.
return previousContext;
}
return contextStackCursor.current;
}
}
function cacheContext(workInProgress, unmaskedContext, maskedContext) {
{
var instance = workInProgress.stateNode;
instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
}
}
function getMaskedContext(workInProgress, unmaskedContext) {
{
var type = workInProgress.type;
var contextTypes = type.contextTypes;
if (!contextTypes) {
return emptyContextObject;
} // Avoid recreating masked context unless unmasked context has changed.
// Failing to do this will result in unnecessary calls to componentWillReceiveProps.
// This may trigger infinite loops if componentWillReceiveProps calls setState.
var instance = workInProgress.stateNode;
if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {
return instance.__reactInternalMemoizedMaskedChildContext;
}
var context = {};
for (var key in contextTypes) {
context[key] = unmaskedContext[key];
}
{
var name = getComponentNameFromFiber(workInProgress) || 'Unknown';
checkPropTypes(contextTypes, context, 'context', name);
} // Cache unmasked context so we can avoid recreating masked context unless necessary.
// Context is created before the class component is instantiated so check for instance.
if (instance) {
cacheContext(workInProgress, unmaskedContext, context);
}
return context;
}
}
function hasContextChanged() {
{
return didPerformWorkStackCursor.current;
}
}
function isContextProvider(type) {
{
var childContextTypes = type.childContextTypes;
return childContextTypes !== null && childContextTypes !== undefined;
}
}
function popContext(fiber) {
{
pop(didPerformWorkStackCursor, fiber);
pop(contextStackCursor, fiber);
}
}
function popTopLevelContextObject(fiber) {
{
pop(didPerformWorkStackCursor, fiber);
pop(contextStackCursor, fiber);
}
}
function pushTopLevelContextObject(fiber, context, didChange) {
{
if (contextStackCursor.current !== emptyContextObject) {
throw new Error('Unexpected context found on stack. ' + 'This error is likely caused by a bug in React. Please file an issue.');
}
push(contextStackCursor, context, fiber);
push(didPerformWorkStackCursor, didChange, fiber);
}
}
function processChildContext(fiber, type, parentContext) {
{
var instance = fiber.stateNode;
var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.
// It has only been added in Fiber to match the (unintentional) behavior in Stack.
if (typeof instance.getChildContext !== 'function') {
{
var componentName = getComponentNameFromFiber(fiber) || 'Unknown';
if (!warnedAboutMissingGetChildContext[componentName]) {
warnedAboutMissingGetChildContext[componentName] = true;
error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);
}
}
return parentContext;
}
var childContext = instance.getChildContext();
for (var contextKey in childContext) {
if (!(contextKey in childContextTypes)) {
throw new Error((getComponentNameFromFiber(fiber) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes.");
}
}
{
var name = getComponentNameFromFiber(fiber) || 'Unknown';
checkPropTypes(childContextTypes, childContext, 'child context', name);
}
return assign({}, parentContext, childContext);
}
}
function pushContextProvider(workInProgress) {
{
var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.
// If the instance does not exist yet, we will push null at first,
// and replace it on the stack later when invalidating the context.
var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.
// Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.
previousContext = contextStackCursor.current;
push(contextStackCursor, memoizedMergedChildContext, workInProgress);
push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);
return true;
}
}
function invalidateContextProvider(workInProgress, type, didChange) {
{
var instance = workInProgress.stateNode;
if (!instance) {
throw new Error('Expected to have an instance by this point. ' + 'This error is likely caused by a bug in React. Please file an issue.');
}
if (didChange) {
// Merge parent and own context.
// Skip this if we're not updating due to sCU.
// This avoids unnecessarily recomputing memoized values.
var mergedContext = processChildContext(workInProgress, type, previousContext);
instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.
// It is important to unwind the context in the reverse order.
pop(didPerformWorkStackCursor, workInProgress);
pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.
push(contextStackCursor, mergedContext, workInProgress);
push(didPerformWorkStackCursor, didChange, workInProgress);
} else {
pop(didPerformWorkStackCursor, workInProgress);
push(didPerformWorkStackCursor, didChange, workInProgress);
}
}
}
function findCurrentUnmaskedContext(fiber) {
{
// Currently this is only used with renderSubtreeIntoContainer; not sure if it
// makes sense elsewhere
if (!isFiberMounted(fiber) || fiber.tag !== ClassComponent) {
throw new Error('Expected subtree parent to be a mounted class component. ' + 'This error is likely caused by a bug in React. Please file an issue.');
}
var node = fiber;
do {
switch (node.tag) {
case HostRoot:
return node.stateNode.context;
case ClassComponent:
{
var Component = node.type;
if (isContextProvider(Component)) {
return node.stateNode.__reactInternalMemoizedMergedChildContext;
}
break;
}
}
node = node.return;
} while (node !== null);
throw new Error('Found unexpected detached subtree parent. ' + 'This error is likely caused by a bug in React. Please file an issue.');
}
}
var LegacyRoot = 0;
var ConcurrentRoot = 1;
var syncQueue = null;
var includesLegacySyncCallbacks = false;
var isFlushingSyncQueue = false;
function scheduleSyncCallback(callback) {
// Push this callback into an internal queue. We'll flush these either in
// the next tick, or earlier if something calls `flushSyncCallbackQueue`.
if (syncQueue === null) {
syncQueue = [callback];
} else {
// Push onto existing queue. Don't need to schedule a callback because
// we already scheduled one when we created the queue.
syncQueue.push(callback);
}
}
function scheduleLegacySyncCallback(callback) {
includesLegacySyncCallbacks = true;
scheduleSyncCallback(callback);
}
function flushSyncCallbacksOnlyInLegacyMode() {
// Only flushes the queue if there's a legacy sync callback scheduled.
// TODO: There's only a single type of callback: performSyncOnWorkOnRoot. So
// it might make more sense for the queue to be a list of roots instead of a
// list of generic callbacks. Then we can have two: one for legacy roots, one
// for concurrent roots. And this method would only flush the legacy ones.
if (includesLegacySyncCallbacks) {
flushSyncCallbacks();
}
}
function flushSyncCallbacks() {
if (!isFlushingSyncQueue && syncQueue !== null) {
// Prevent re-entrance.
isFlushingSyncQueue = true;
var i = 0;
var previousUpdatePriority = getCurrentUpdatePriority();
try {
var isSync = true;
var queue = syncQueue; // TODO: Is this necessary anymore? The only user code that runs in this
// queue is in the render or commit phases.
setCurrentUpdatePriority(DiscreteEventPriority);
for (; i < queue.length; i++) {
var callback = queue[i];
do {
callback = callback(isSync);
} while (callback !== null);
}
syncQueue = null;
includesLegacySyncCallbacks = false;
} catch (error) {
// If something throws, leave the remaining callbacks on the queue.
if (syncQueue !== null) {
syncQueue = syncQueue.slice(i + 1);
} // Resume flushing in the next tick
scheduleCallback(ImmediatePriority, flushSyncCallbacks);
throw error;
} finally {
setCurrentUpdatePriority(previousUpdatePriority);
isFlushingSyncQueue = false;
}
}
return null;
}
// TODO: Use the unified fiber stack module instead of this local one?
// Intentionally not using it yet to derisk the initial implementation, because
// the way we push/pop these values is a bit unusual. If there's a mistake, I'd
// rather the ids be wrong than crash the whole reconciler.
var forkStack = [];
var forkStackIndex = 0;
var treeForkProvider = null;
var treeForkCount = 0;
var idStack = [];
var idStackIndex = 0;
var treeContextProvider = null;
var treeContextId = 1;
var treeContextOverflow = '';
function isForkedChild(workInProgress) {
warnIfNotHydrating();
return (workInProgress.flags & Forked) !== NoFlags;
}
function getForksAtLevel(workInProgress) {
warnIfNotHydrating();
return treeForkCount;
}
function getTreeId() {
var overflow = treeContextOverflow;
var idWithLeadingBit = treeContextId;
var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit);
return id.toString(32) + overflow;
}
function pushTreeFork(workInProgress, totalChildren) {
// This is called right after we reconcile an array (or iterator) of child
// fibers, because that's the only place where we know how many children in
// the whole set without doing extra work later, or storing addtional
// information on the fiber.
//
// That's why this function is separate from pushTreeId — it's called during
// the render phase of the fork parent, not the child, which is where we push
// the other context values.
//
// In the Fizz implementation this is much simpler because the child is
// rendered in the same callstack as the parent.
//
// It might be better to just add a `forks` field to the Fiber type. It would
// make this module simpler.
warnIfNotHydrating();
forkStack[forkStackIndex++] = treeForkCount;
forkStack[forkStackIndex++] = treeForkProvider;
treeForkProvider = workInProgress;
treeForkCount = totalChildren;
}
function pushTreeId(workInProgress, totalChildren, index) {
warnIfNotHydrating();
idStack[idStackIndex++] = treeContextId;
idStack[idStackIndex++] = treeContextOverflow;
idStack[idStackIndex++] = treeContextProvider;
treeContextProvider = workInProgress;
var baseIdWithLeadingBit = treeContextId;
var baseOverflow = treeContextOverflow; // The leftmost 1 marks the end of the sequence, non-inclusive. It's not part
// of the id; we use it to account for leading 0s.
var baseLength = getBitLength(baseIdWithLeadingBit) - 1;
var baseId = baseIdWithLeadingBit & ~(1 << baseLength);
var slot = index + 1;
var length = getBitLength(totalChildren) + baseLength; // 30 is the max length we can store without overflowing, taking into
// consideration the leading 1 we use to mark the end of the sequence.
if (length > 30) {
// We overflowed the bitwise-safe range. Fall back to slower algorithm.
// This branch assumes the length of the base id is greater than 5; it won't
// work for smaller ids, because you need 5 bits per character.
//
// We encode the id in multiple steps: first the base id, then the
// remaining digits.
//
// Each 5 bit sequence corresponds to a single base 32 character. So for
// example, if the current id is 23 bits long, we can convert 20 of those
// bits into a string of 4 characters, with 3 bits left over.
//
// First calculate how many bits in the base id represent a complete
// sequence of characters.
var numberOfOverflowBits = baseLength - baseLength % 5; // Then create a bitmask that selects only those bits.
var newOverflowBits = (1 << numberOfOverflowBits) - 1; // Select the bits, and convert them to a base 32 string.
var newOverflow = (baseId & newOverflowBits).toString(32); // Now we can remove those bits from the base id.
var restOfBaseId = baseId >> numberOfOverflowBits;
var restOfBaseLength = baseLength - numberOfOverflowBits; // Finally, encode the rest of the bits using the normal algorithm. Because
// we made more room, this time it won't overflow.
var restOfLength = getBitLength(totalChildren) + restOfBaseLength;
var restOfNewBits = slot << restOfBaseLength;
var id = restOfNewBits | restOfBaseId;
var overflow = newOverflow + baseOverflow;
treeContextId = 1 << restOfLength | id;
treeContextOverflow = overflow;
} else {
// Normal path
var newBits = slot << baseLength;
var _id = newBits | baseId;
var _overflow = baseOverflow;
treeContextId = 1 << length | _id;
treeContextOverflow = _overflow;
}
}
function pushMaterializedTreeId(workInProgress) {
warnIfNotHydrating(); // This component materialized an id. This will affect any ids that appear
// in its children.
var returnFiber = workInProgress.return;
if (returnFiber !== null) {
var numberOfForks = 1;
var slotIndex = 0;
pushTreeFork(workInProgress, numberOfForks);
pushTreeId(workInProgress, numberOfForks, slotIndex);
}
}
function getBitLength(number) {
return 32 - clz32(number);
}
function getLeadingBit(id) {
return 1 << getBitLength(id) - 1;
}
function popTreeContext(workInProgress) {
// Restore the previous values.
// This is a bit more complicated than other context-like modules in Fiber
// because the same Fiber may appear on the stack multiple times and for
// different reasons. We have to keep popping until the work-in-progress is
// no longer at the top of the stack.
while (workInProgress === treeForkProvider) {
treeForkProvider = forkStack[--forkStackIndex];
forkStack[forkStackIndex] = null;
treeForkCount = forkStack[--forkStackIndex];
forkStack[forkStackIndex] = null;
}
while (workInProgress === treeContextProvider) {
treeContextProvider = idStack[--idStackIndex];
idStack[idStackIndex] = null;
treeContextOverflow = idStack[--idStackIndex];
idStack[idStackIndex] = null;
treeContextId = idStack[--idStackIndex];
idStack[idStackIndex] = null;
}
}
function getSuspendedTreeContext() {
warnIfNotHydrating();
if (treeContextProvider !== null) {
return {
id: treeContextId,
overflow: treeContextOverflow
};
} else {
return null;
}
}
function restoreSuspendedTreeContext(workInProgress, suspendedContext) {
warnIfNotHydrating();
idStack[idStackIndex++] = treeContextId;
idStack[idStackIndex++] = treeContextOverflow;
idStack[idStackIndex++] = treeContextProvider;
treeContextId = suspendedContext.id;
treeContextOverflow = suspendedContext.overflow;
treeContextProvider = workInProgress;
}
function warnIfNotHydrating() {
{
if (!getIsHydrating()) {
error('Expected to be hydrating. This is a bug in React. Please file ' + 'an issue.');
}
}
}
// This may have been an insertion or a hydration.
var hydrationParentFiber = null;
var nextHydratableInstance = null;
var isHydrating = false; // This flag allows for warning supression when we expect there to be mismatches
// due to earlier mismatches or a suspended fiber.
var didSuspendOrErrorDEV = false; // Hydration errors that were thrown inside this boundary
var hydrationErrors = null;
function warnIfHydrating() {
{
if (isHydrating) {
error('We should not be hydrating here. This is a bug in React. Please file a bug.');
}
}
}
function markDidThrowWhileHydratingDEV() {
{
didSuspendOrErrorDEV = true;
}
}
function didSuspendOrErrorWhileHydratingDEV() {
{
return didSuspendOrErrorDEV;
}
}
function enterHydrationState(fiber) {
var parentInstance = fiber.stateNode.containerInfo;
nextHydratableInstance = getFirstHydratableChildWithinContainer(parentInstance);
hydrationParentFiber = fiber;
isHydrating = true;
hydrationErrors = null;
didSuspendOrErrorDEV = false;
return true;
}
function reenterHydrationStateFromDehydratedSuspenseInstance(fiber, suspenseInstance, treeContext) {
nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(suspenseInstance);
hydrationParentFiber = fiber;
isHydrating = true;
hydrationErrors = null;
didSuspendOrErrorDEV = false;
if (treeContext !== null) {
restoreSuspendedTreeContext(fiber, treeContext);
}
return true;
}
function warnUnhydratedInstance(returnFiber, instance) {
{
switch (returnFiber.tag) {
case HostRoot:
{
didNotHydrateInstanceWithinContainer(returnFiber.stateNode.containerInfo, instance);
break;
}
case HostComponent:
{
var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;
didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance, // TODO: Delete this argument when we remove the legacy root API.
isConcurrentMode);
break;
}
case SuspenseComponent:
{
var suspenseState = returnFiber.memoizedState;
if (suspenseState.dehydrated !== null) didNotHydrateInstanceWithinSuspenseInstance(suspenseState.dehydrated, instance);
break;
}
}
}
}
function deleteHydratableInstance(returnFiber, instance) {
warnUnhydratedInstance(returnFiber, instance);
var childToDelete = createFiberFromHostInstanceForDeletion();
childToDelete.stateNode = instance;
childToDelete.return = returnFiber;
var deletions = returnFiber.deletions;
if (deletions === null) {
returnFiber.deletions = [childToDelete];
returnFiber.flags |= ChildDeletion;
} else {
deletions.push(childToDelete);
}
}
function warnNonhydratedInstance(returnFiber, fiber) {
{
if (didSuspendOrErrorDEV) {
// Inside a boundary that already suspended. We're currently rendering the
// siblings of a suspended node. The mismatch may be due to the missing
// data, so it's probably a false positive.
return;
}
switch (returnFiber.tag) {
case HostRoot:
{
var parentContainer = returnFiber.stateNode.containerInfo;
switch (fiber.tag) {
case HostComponent:
var type = fiber.type;
var props = fiber.pendingProps;
didNotFindHydratableInstanceWithinContainer(parentContainer, type);
break;
case HostText:
var text = fiber.pendingProps;
didNotFindHydratableTextInstanceWithinContainer(parentContainer, text);
break;
}
break;
}
case HostComponent:
{
var parentType = returnFiber.type;
var parentProps = returnFiber.memoizedProps;
var parentInstance = returnFiber.stateNode;
switch (fiber.tag) {
case HostComponent:
{
var _type = fiber.type;
var _props = fiber.pendingProps;
var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;
didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props, // TODO: Delete this argument when we remove the legacy root API.
isConcurrentMode);
break;
}
case HostText:
{
var _text = fiber.pendingProps;
var _isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;
didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text, // TODO: Delete this argument when we remove the legacy root API.
_isConcurrentMode);
break;
}
}
break;
}
case SuspenseComponent:
{
var suspenseState = returnFiber.memoizedState;
var _parentInstance = suspenseState.dehydrated;
if (_parentInstance !== null) switch (fiber.tag) {
case HostComponent:
var _type2 = fiber.type;
var _props2 = fiber.pendingProps;
didNotFindHydratableInstanceWithinSuspenseInstance(_parentInstance, _type2);
break;
case HostText:
var _text2 = fiber.pendingProps;
didNotFindHydratableTextInstanceWithinSuspenseInstance(_parentInstance, _text2);
break;
}
break;
}
default:
return;
}
}
}
function insertNonHydratedInstance(returnFiber, fiber) {
fiber.flags = fiber.flags & ~Hydrating | Placement;
warnNonhydratedInstance(returnFiber, fiber);
}
function tryHydrate(fiber, nextInstance) {
switch (fiber.tag) {
case HostComponent:
{
var type = fiber.type;
var props = fiber.pendingProps;
var instance = canHydrateInstance(nextInstance, type);
if (instance !== null) {
fiber.stateNode = instance;
hydrationParentFiber = fiber;
nextHydratableInstance = getFirstHydratableChild(instance);
return true;
}
return false;
}
case HostText:
{
var text = fiber.pendingProps;
var textInstance = canHydrateTextInstance(nextInstance, text);
if (textInstance !== null) {
fiber.stateNode = textInstance;
hydrationParentFiber = fiber; // Text Instances don't have children so there's nothing to hydrate.
nextHydratableInstance = null;
return true;
}
return false;
}
case SuspenseComponent:
{
var suspenseInstance = canHydrateSuspenseInstance(nextInstance);
if (suspenseInstance !== null) {
var suspenseState = {
dehydrated: suspenseInstance,
treeContext: getSuspendedTreeContext(),
retryLane: OffscreenLane
};
fiber.memoizedState = suspenseState; // Store the dehydrated fragment as a child fiber.
// This simplifies the code for getHostSibling and deleting nodes,
// since it doesn't have to consider all Suspense boundaries and
// check if they're dehydrated ones or not.
var dehydratedFragment = createFiberFromDehydratedFragment(suspenseInstance);
dehydratedFragment.return = fiber;
fiber.child = dehydratedFragment;
hydrationParentFiber = fiber; // While a Suspense Instance does have children, we won't step into
// it during the first pass. Instead, we'll reenter it later.
nextHydratableInstance = null;
return true;
}
return false;
}
default:
return false;
}
}
function shouldClientRenderOnMismatch(fiber) {
return (fiber.mode & ConcurrentMode) !== NoMode && (fiber.flags & DidCapture) === NoFlags;
}
function throwOnHydrationMismatch(fiber) {
throw new Error('Hydration failed because the initial UI does not match what was ' + 'rendered on the server.');
}
function tryToClaimNextHydratableInstance(fiber) {
if (!isHydrating) {
return;
}
var nextInstance = nextHydratableInstance;
if (!nextInstance) {
if (shouldClientRenderOnMismatch(fiber)) {
warnNonhydratedInstance(hydrationParentFiber, fiber);
throwOnHydrationMismatch();
} // Nothing to hydrate. Make it an insertion.
insertNonHydratedInstance(hydrationParentFiber, fiber);
isHydrating = false;
hydrationParentFiber = fiber;
return;
}
var firstAttemptedInstance = nextInstance;
if (!tryHydrate(fiber, nextInstance)) {
if (shouldClientRenderOnMismatch(fiber)) {
warnNonhydratedInstance(hydrationParentFiber, fiber);
throwOnHydrationMismatch();
} // If we can't hydrate this instance let's try the next one.
// We use this as a heuristic. It's based on intuition and not data so it
// might be flawed or unnecessary.
nextInstance = getNextHydratableSibling(firstAttemptedInstance);
var prevHydrationParentFiber = hydrationParentFiber;
if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
// Nothing to hydrate. Make it an insertion.
insertNonHydratedInstance(hydrationParentFiber, fiber);
isHydrating = false;
hydrationParentFiber = fiber;
return;
} // We matched the next one, we'll now assume that the first one was
// superfluous and we'll delete it. Since we can't eagerly delete it
// we'll have to schedule a deletion. To do that, this node needs a dummy
// fiber associated with it.
deleteHydratableInstance(prevHydrationParentFiber, firstAttemptedInstance);
}
}
function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
var instance = fiber.stateNode;
var shouldWarnIfMismatchDev = !didSuspendOrErrorDEV;
var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber, shouldWarnIfMismatchDev); // TODO: Type this specific to this type of component.
fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
// is a new ref we mark this as an update.
if (updatePayload !== null) {
return true;
}
return false;
}
function prepareToHydrateHostTextInstance(fiber) {
var textInstance = fiber.stateNode;
var textContent = fiber.memoizedProps;
var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
if (shouldUpdate) {
// We assume that prepareToHydrateHostTextInstance is called in a context where the
// hydration parent is the parent host component of this host text.
var returnFiber = hydrationParentFiber;
if (returnFiber !== null) {
switch (returnFiber.tag) {
case HostRoot:
{
var parentContainer = returnFiber.stateNode.containerInfo;
var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;
didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API.
isConcurrentMode);
break;
}
case HostComponent:
{
var parentType = returnFiber.type;
var parentProps = returnFiber.memoizedProps;
var parentInstance = returnFiber.stateNode;
var _isConcurrentMode2 = (returnFiber.mode & ConcurrentMode) !== NoMode;
didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API.
_isConcurrentMode2);
break;
}
}
}
}
return shouldUpdate;
}
function prepareToHydrateHostSuspenseInstance(fiber) {
var suspenseState = fiber.memoizedState;
var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;
if (!suspenseInstance) {
throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.');
}
hydrateSuspenseInstance(suspenseInstance, fiber);
}
function skipPastDehydratedSuspenseInstance(fiber) {
var suspenseState = fiber.memoizedState;
var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;
if (!suspenseInstance) {
throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.');
}
return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
}
function popToNextHostParent(fiber) {
var parent = fiber.return;
while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {
parent = parent.return;
}
hydrationParentFiber = parent;
}
function popHydrationState(fiber) {
if (fiber !== hydrationParentFiber) {
// We're deeper than the current hydration context, inside an inserted
// tree.
return false;
}
if (!isHydrating) {
// If we're not currently hydrating but we're in a hydration context, then
// we were an insertion and now need to pop up reenter hydration of our
// siblings.
popToNextHostParent(fiber);
isHydrating = true;
return false;
} // If we have any remaining hydratable nodes, we need to delete them now.
// We only do this deeper than head and body since they tend to have random
// other nodes in them. We also ignore components with pure text content in
// side of them. We also don't delete anything inside the root container.
if (fiber.tag !== HostRoot && (fiber.tag !== HostComponent || shouldDeleteUnhydratedTailInstances(fiber.type) && !shouldSetTextContent(fiber.type, fiber.memoizedProps))) {
var nextInstance = nextHydratableInstance;
if (nextInstance) {
if (shouldClientRenderOnMismatch(fiber)) {
warnIfUnhydratedTailNodes(fiber);
throwOnHydrationMismatch();
} else {
while (nextInstance) {
deleteHydratableInstance(fiber, nextInstance);
nextInstance = getNextHydratableSibling(nextInstance);
}
}
}
}
popToNextHostParent(fiber);
if (fiber.tag === SuspenseComponent) {
nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);
} else {
nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
}
return true;
}
function hasUnhydratedTailNodes() {
return isHydrating && nextHydratableInstance !== null;
}
function warnIfUnhydratedTailNodes(fiber) {
var nextInstance = nextHydratableInstance;
while (nextInstance) {
warnUnhydratedInstance(fiber, nextInstance);
nextInstance = getNextHydratableSibling(nextInstance);
}
}
function resetHydrationState() {
hydrationParentFiber = null;
nextHydratableInstance = null;
isHydrating = false;
didSuspendOrErrorDEV = false;
}
function upgradeHydrationErrorsToRecoverable() {
if (hydrationErrors !== null) {
// Successfully completed a forced client render. The errors that occurred
// during the hydration attempt are now recovered. We will log them in
// commit phase, once the entire tree has finished.
queueRecoverableErrors(hydrationErrors);
hydrationErrors = null;
}
}
function getIsHydrating() {
return isHydrating;
}
function queueHydrationError(error) {
if (hydrationErrors === null) {
hydrationErrors = [error];
} else {
hydrationErrors.push(error);
}
}
var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
var NoTransition = null;
function requestCurrentTransition() {
return ReactCurrentBatchConfig$1.transition;
}
var ReactStrictModeWarnings = {
recordUnsafeLifecycleWarnings: function (fiber, instance) {},
flushPendingUnsafeLifecycleWarnings: function () {},
recordLegacyContextWarning: function (fiber, instance) {},
flushLegacyContextWarning: function () {},
discardPendingWarnings: function () {}
};
{
var findStrictRoot = function (fiber) {
var maybeStrictRoot = null;
var node = fiber;
while (node !== null) {
if (node.mode & StrictLegacyMode) {
maybeStrictRoot = node;
}
node = node.return;
}
return maybeStrictRoot;
};
var setToSortedString = function (set) {
var array = [];
set.forEach(function (value) {
array.push(value);
});
return array.sort().join(', ');
};
var pendingComponentWillMountWarnings = [];
var pendingUNSAFE_ComponentWillMountWarnings = [];
var pendingComponentWillReceivePropsWarnings = [];
var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
var pendingComponentWillUpdateWarnings = [];
var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.
var didWarnAboutUnsafeLifecycles = new Set();
ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {
// Dedupe strategy: Warn once per component.
if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {
return;
}
if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.
instance.componentWillMount.__suppressDeprecationWarning !== true) {
pendingComponentWillMountWarnings.push(fiber);
}
if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillMount === 'function') {
pendingUNSAFE_ComponentWillMountWarnings.push(fiber);
}
if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
pendingComponentWillReceivePropsWarnings.push(fiber);
}
if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);
}
if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
pendingComponentWillUpdateWarnings.push(fiber);
}
if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {
pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);
}
};
ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {
// We do an initial pass to gather component names
var componentWillMountUniqueNames = new Set();
if (pendingComponentWillMountWarnings.length > 0) {
pendingComponentWillMountWarnings.forEach(function (fiber) {
componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');
didWarnAboutUnsafeLifecycles.add(fiber.type);
});
pendingComponentWillMountWarnings = [];
}
var UNSAFE_componentWillMountUniqueNames = new Set();
if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {
pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {
UNSAFE_componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');
didWarnAboutUnsafeLifecycles.add(fiber.type);
});
pendingUNSAFE_ComponentWillMountWarnings = [];
}
var componentWillReceivePropsUniqueNames = new Set();
if (pendingComponentWillReceivePropsWarnings.length > 0) {
pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {
componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');
didWarnAboutUnsafeLifecycles.add(fiber.type);
});
pendingComponentWillReceivePropsWarnings = [];
}
var UNSAFE_componentWillReceivePropsUniqueNames = new Set();
if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {
pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {
UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');
didWarnAboutUnsafeLifecycles.add(fiber.type);
});
pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
}
var componentWillUpdateUniqueNames = new Set();
if (pendingComponentWillUpdateWarnings.length > 0) {
pendingComponentWillUpdateWarnings.forEach(function (fiber) {
componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');
didWarnAboutUnsafeLifecycles.add(fiber.type);
});
pendingComponentWillUpdateWarnings = [];
}
var UNSAFE_componentWillUpdateUniqueNames = new Set();
if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {
pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {
UNSAFE_componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');
didWarnAboutUnsafeLifecycles.add(fiber.type);
});
pendingUNSAFE_ComponentWillUpdateWarnings = [];
} // Finally, we flush all the warnings
// UNSAFE_ ones before the deprecated ones, since they'll be 'louder'
if (UNSAFE_componentWillMountUniqueNames.size > 0) {
var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);
error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames);
}
if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {
var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);
error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '\nPlease update the following components: %s', _sortedNames);
}
if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {
var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);
error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', _sortedNames2);
}
if (componentWillMountUniqueNames.size > 0) {
var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);
warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames3);
}
if (componentWillReceivePropsUniqueNames.size > 0) {
var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);
warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames4);
}
if (componentWillUpdateUniqueNames.size > 0) {
var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);
warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames5);
}
};
var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.
var didWarnAboutLegacyContext = new Set();
ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {
var strictRoot = findStrictRoot(fiber);
if (strictRoot === null) {
error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');
return;
} // Dedup strategy: Warn once per component.
if (didWarnAboutLegacyContext.has(fiber.type)) {
return;
}
var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);
if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {
if (warningsForRoot === undefined) {
warningsForRoot = [];
pendingLegacyContextWarning.set(strictRoot, warningsForRoot);
}
warningsForRoot.push(fiber);
}
};
ReactStrictModeWarnings.flushLegacyContextWarning = function () {
pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {
if (fiberArray.length === 0) {
return;
}
var firstFiber = fiberArray[0];
var uniqueNames = new Set();
fiberArray.forEach(function (fiber) {
uniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');
didWarnAboutLegacyContext.add(fiber.type);
});
var sortedNames = setToSortedString(uniqueNames);
try {
setCurrentFiber(firstFiber);
error('Legacy context API has been detected within a strict-mode tree.' + '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context', sortedNames);
} finally {
resetCurrentFiber();
}
});
};
ReactStrictModeWarnings.discardPendingWarnings = function () {
pendingComponentWillMountWarnings = [];
pendingUNSAFE_ComponentWillMountWarnings = [];
pendingComponentWillReceivePropsWarnings = [];
pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
pendingComponentWillUpdateWarnings = [];
pendingUNSAFE_ComponentWillUpdateWarnings = [];
pendingLegacyContextWarning = new Map();
};
}
function resolveDefaultProps(Component, baseProps) {
if (Component && Component.defaultProps) {
// Resolve default props. Taken from ReactElement
var props = assign({}, baseProps);
var defaultProps = Component.defaultProps;
for (var propName in defaultProps) {
if (props[propName] === undefined) {
props[propName] = defaultProps[propName];
}
}
return props;
}
return baseProps;
}
var valueCursor = createCursor(null);
var rendererSigil;
{
// Use this to detect multiple renderers using the same context
rendererSigil = {};
}
var currentlyRenderingFiber = null;
var lastContextDependency = null;
var lastFullyObservedContext = null;
var isDisallowedContextReadInDEV = false;
function resetContextDependencies() {
// This is called right before React yields execution, to ensure `readContext`
// cannot be called outside the render phase.
currentlyRenderingFiber = null;
lastContextDependency = null;
lastFullyObservedContext = null;
{
isDisallowedContextReadInDEV = false;
}
}
function enterDisallowedContextReadInDEV() {
{
isDisallowedContextReadInDEV = true;
}
}
function exitDisallowedContextReadInDEV() {
{
isDisallowedContextReadInDEV = false;
}
}
function pushProvider(providerFiber, context, nextValue) {
{
push(valueCursor, context._currentValue, providerFiber);
context._currentValue = nextValue;
{
if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {
error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');
}
context._currentRenderer = rendererSigil;
}
}
}
function popProvider(context, providerFiber) {
var currentValue = valueCursor.current;
pop(valueCursor, providerFiber);
{
{
context._currentValue = currentValue;
}
}
}
function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {
// Update the child lanes of all the ancestors, including the alternates.
var node = parent;
while (node !== null) {
var alternate = node.alternate;
if (!isSubsetOfLanes(node.childLanes, renderLanes)) {
node.childLanes = mergeLanes(node.childLanes, renderLanes);
if (alternate !== null) {
alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
}
} else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {
alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
}
if (node === propagationRoot) {
break;
}
node = node.return;
}
{
if (node !== propagationRoot) {
error('Expected to find the propagation root when scheduling context work. ' + 'This error is likely caused by a bug in React. Please file an issue.');
}
}
}
function propagateContextChange(workInProgress, context, renderLanes) {
{
propagateContextChange_eager(workInProgress, context, renderLanes);
}
}
function propagateContextChange_eager(workInProgress, context, renderLanes) {
var fiber = workInProgress.child;
if (fiber !== null) {
// Set the return pointer of the child to the work-in-progress fiber.
fiber.return = workInProgress;
}
while (fiber !== null) {
var nextFiber = void 0; // Visit this fiber.
var list = fiber.dependencies;
if (list !== null) {
nextFiber = fiber.child;
var dependency = list.firstContext;
while (dependency !== null) {
// Check if the context matches.
if (dependency.context === context) {
// Match! Schedule an update on this fiber.
if (fiber.tag === ClassComponent) {
// Schedule a force update on the work-in-progress.
var lane = pickArbitraryLane(renderLanes);
var update = createUpdate(NoTimestamp, lane);
update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the
// update to the current fiber, too, which means it will persist even if
// this render is thrown away. Since it's a race condition, not sure it's
// worth fixing.
// Inlined `enqueueUpdate` to remove interleaved update check
var updateQueue = fiber.updateQueue;
if (updateQueue === null) ; else {
var sharedQueue = updateQueue.shared;
var pending = sharedQueue.pending;
if (pending === null) {
// This is the first update. Create a circular list.
update.next = update;
} else {
update.next = pending.next;
pending.next = update;
}
sharedQueue.pending = update;
}
}
fiber.lanes = mergeLanes(fiber.lanes, renderLanes);
var alternate = fiber.alternate;
if (alternate !== null) {
alternate.lanes = mergeLanes(alternate.lanes, renderLanes);
}
scheduleContextWorkOnParentPath(fiber.return, renderLanes, workInProgress); // Mark the updated lanes on the list, too.
list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the
// dependency list.
break;
}
dependency = dependency.next;
}
} else if (fiber.tag === ContextProvider) {
// Don't scan deeper if this is a matching provider
nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
} else if (fiber.tag === DehydratedFragment) {
// If a dehydrated suspense boundary is in this subtree, we don't know
// if it will have any context consumers in it. The best we can do is
// mark it as having updates.
var parentSuspense = fiber.return;
if (parentSuspense === null) {
throw new Error('We just came from a parent so we must have had a parent. This is a bug in React.');
}
parentSuspense.lanes = mergeLanes(parentSuspense.lanes, renderLanes);
var _alternate = parentSuspense.alternate;
if (_alternate !== null) {
_alternate.lanes = mergeLanes(_alternate.lanes, renderLanes);
} // This is intentionally passing this fiber as the parent
// because we want to schedule this fiber as having work
// on its children. We'll use the childLanes on
// this fiber to indicate that a context has changed.
scheduleContextWorkOnParentPath(parentSuspense, renderLanes, workInProgress);
nextFiber = fiber.sibling;
} else {
// Traverse down.
nextFiber = fiber.child;
}
if (nextFiber !== null) {
// Set the return pointer of the child to the work-in-progress fiber.
nextFiber.return = fiber;
} else {
// No child. Traverse to next sibling.
nextFiber = fiber;
while (nextFiber !== null) {
if (nextFiber === workInProgress) {
// We're back to the root of this subtree. Exit.
nextFiber = null;
break;
}
var sibling = nextFiber.sibling;
if (sibling !== null) {
// Set the return pointer of the sibling to the work-in-progress fiber.
sibling.return = nextFiber.return;
nextFiber = sibling;
break;
} // No more siblings. Traverse up.
nextFiber = nextFiber.return;
}
}
fiber = nextFiber;
}
}
function prepareToReadContext(workInProgress, renderLanes) {
currentlyRenderingFiber = workInProgress;
lastContextDependency = null;
lastFullyObservedContext = null;
var dependencies = workInProgress.dependencies;
if (dependencies !== null) {
{
var firstContext = dependencies.firstContext;
if (firstContext !== null) {
if (includesSomeLane(dependencies.lanes, renderLanes)) {
// Context list has a pending update. Mark that this fiber performed work.
markWorkInProgressReceivedUpdate();
} // Reset the work-in-progress list
dependencies.firstContext = null;
}
}
}
}
function readContext(context) {
{
// This warning would fire if you read context inside a Hook like useMemo.
// Unlike the class check below, it's not enforced in production for perf.
if (isDisallowedContextReadInDEV) {
error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
}
}
var value = context._currentValue ;
if (lastFullyObservedContext === context) ; else {
var contextItem = {
context: context,
memoizedValue: value,
next: null
};
if (lastContextDependency === null) {
if (currentlyRenderingFiber === null) {
throw new Error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
} // This is the first dependency for this component. Create a new list.
lastContextDependency = contextItem;
currentlyRenderingFiber.dependencies = {
lanes: NoLanes,
firstContext: contextItem
};
} else {
// Append a new context item.
lastContextDependency = lastContextDependency.next = contextItem;
}
}
return value;
}
// render. When this render exits, either because it finishes or because it is
// interrupted, the interleaved updates will be transferred onto the main part
// of the queue.
var concurrentQueues = null;
function pushConcurrentUpdateQueue(queue) {
if (concurrentQueues === null) {
concurrentQueues = [queue];
} else {
concurrentQueues.push(queue);
}
}
function finishQueueingConcurrentUpdates() {
// Transfer the interleaved updates onto the main queue. Each queue has a
// `pending` field and an `interleaved` field. When they are not null, they
// point to the last node in a circular linked list. We need to append the
// interleaved list to the end of the pending list by joining them into a
// single, circular list.
if (concurrentQueues !== null) {
for (var i = 0; i < concurrentQueues.length; i++) {
var queue = concurrentQueues[i];
var lastInterleavedUpdate = queue.interleaved;
if (lastInterleavedUpdate !== null) {
queue.interleaved = null;
var firstInterleavedUpdate = lastInterleavedUpdate.next;
var lastPendingUpdate = queue.pending;
if (lastPendingUpdate !== null) {
var firstPendingUpdate = lastPendingUpdate.next;
lastPendingUpdate.next = firstInterleavedUpdate;
lastInterleavedUpdate.next = firstPendingUpdate;
}
queue.pending = lastInterleavedUpdate;
}
}
concurrentQueues = null;
}
}
function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
var interleaved = queue.interleaved;
if (interleaved === null) {
// This is the first update. Create a circular list.
update.next = update; // At the end of the current render, this queue's interleaved updates will
// be transferred to the pending queue.
pushConcurrentUpdateQueue(queue);
} else {
update.next = interleaved.next;
interleaved.next = update;
}
queue.interleaved = update;
return markUpdateLaneFromFiberToRoot(fiber, lane);
}
function enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update, lane) {
var interleaved = queue.interleaved;
if (interleaved === null) {
// This is the first update. Create a circular list.
update.next = update; // At the end of the current render, this queue's interleaved updates will
// be transferred to the pending queue.
pushConcurrentUpdateQueue(queue);
} else {
update.next = interleaved.next;
interleaved.next = update;
}
queue.interleaved = update;
}
function enqueueConcurrentClassUpdate(fiber, queue, update, lane) {
var interleaved = queue.interleaved;
if (interleaved === null) {
// This is the first update. Create a circular list.
update.next = update; // At the end of the current render, this queue's interleaved updates will
// be transferred to the pending queue.
pushConcurrentUpdateQueue(queue);
} else {
update.next = interleaved.next;
interleaved.next = update;
}
queue.interleaved = update;
return markUpdateLaneFromFiberToRoot(fiber, lane);
}
function enqueueConcurrentRenderForLane(fiber, lane) {
return markUpdateLaneFromFiberToRoot(fiber, lane);
} // Calling this function outside this module should only be done for backwards
// compatibility and should always be accompanied by a warning.
var unsafe_markUpdateLaneFromFiberToRoot = markUpdateLaneFromFiberToRoot;
function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
// Update the source fiber's lanes
sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);
var alternate = sourceFiber.alternate;
if (alternate !== null) {
alternate.lanes = mergeLanes(alternate.lanes, lane);
}
{
if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {
warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
}
} // Walk the parent path to the root and update the child lanes.
var node = sourceFiber;
var parent = sourceFiber.return;
while (parent !== null) {
parent.childLanes = mergeLanes(parent.childLanes, lane);
alternate = parent.alternate;
if (alternate !== null) {
alternate.childLanes = mergeLanes(alternate.childLanes, lane);
} else {
{
if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {
warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
}
}
}
node = parent;
parent = parent.return;
}
if (node.tag === HostRoot) {
var root = node.stateNode;
return root;
} else {
return null;
}
}
var UpdateState = 0;
var ReplaceState = 1;
var ForceUpdate = 2;
var CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.
// It should only be read right after calling `processUpdateQueue`, via
// `checkHasForceUpdateAfterProcessing`.
var hasForceUpdate = false;
var didWarnUpdateInsideUpdate;
var currentlyProcessingQueue;
{
didWarnUpdateInsideUpdate = false;
currentlyProcessingQueue = null;
}
function initializeUpdateQueue(fiber) {
var queue = {
baseState: fiber.memoizedState,
firstBaseUpdate: null,
lastBaseUpdate: null,
shared: {
pending: null,
interleaved: null,
lanes: NoLanes
},
effects: null
};
fiber.updateQueue = queue;
}
function cloneUpdateQueue(current, workInProgress) {
// Clone the update queue from current. Unless it's already a clone.
var queue = workInProgress.updateQueue;
var currentQueue = current.updateQueue;
if (queue === currentQueue) {
var clone = {
baseState: currentQueue.baseState,
firstBaseUpdate: currentQueue.firstBaseUpdate,
lastBaseUpdate: currentQueue.lastBaseUpdate,
shared: currentQueue.shared,
effects: currentQueue.effects
};
workInProgress.updateQueue = clone;
}
}
function createUpdate(eventTime, lane) {
var update = {
eventTime: eventTime,
lane: lane,
tag: UpdateState,
payload: null,
callback: null,
next: null
};
return update;
}
function enqueueUpdate(fiber, update, lane) {
var updateQueue = fiber.updateQueue;
if (updateQueue === null) {
// Only occurs if the fiber has been unmounted.
return null;
}
var sharedQueue = updateQueue.shared;
{
if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {
error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');
didWarnUpdateInsideUpdate = true;
}
}
if (isUnsafeClassRenderPhaseUpdate()) {
// This is an unsafe render phase update. Add directly to the update
// queue so we can process it immediately during the current render.
var pending = sharedQueue.pending;
if (pending === null) {
// This is the first update. Create a circular list.
update.next = update;
} else {
update.next = pending.next;
pending.next = update;
}
sharedQueue.pending = update; // Update the childLanes even though we're most likely already rendering
// this fiber. This is for backwards compatibility in the case where you
// update a different component during render phase than the one that is
// currently renderings (a pattern that is accompanied by a warning).
return unsafe_markUpdateLaneFromFiberToRoot(fiber, lane);
} else {
return enqueueConcurrentClassUpdate(fiber, sharedQueue, update, lane);
}
}
function entangleTransitions(root, fiber, lane) {
var updateQueue = fiber.updateQueue;
if (updateQueue === null) {
// Only occurs if the fiber has been unmounted.
return;
}
var sharedQueue = updateQueue.shared;
if (isTransitionLane(lane)) {
var queueLanes = sharedQueue.lanes; // If any entangled lanes are no longer pending on the root, then they must
// have finished. We can remove them from the shared queue, which represents
// a superset of the actually pending lanes. In some cases we may entangle
// more than we need to, but that's OK. In fact it's worse if we *don't*
// entangle when we should.
queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.
var newQueueLanes = mergeLanes(queueLanes, lane);
sharedQueue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if
// the lane finished since the last time we entangled it. So we need to
// entangle it again, just to be sure.
markRootEntangled(root, newQueueLanes);
}
}
function enqueueCapturedUpdate(workInProgress, capturedUpdate) {
// Captured updates are updates that are thrown by a child during the render
// phase. They should be discarded if the render is aborted. Therefore,
// we should only put them on the work-in-progress queue, not the current one.
var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.
var current = workInProgress.alternate;
if (current !== null) {
var currentQueue = current.updateQueue;
if (queue === currentQueue) {
// The work-in-progress queue is the same as current. This happens when
// we bail out on a parent fiber that then captures an error thrown by
// a child. Since we want to append the update only to the work-in
// -progress queue, we need to clone the updates. We usually clone during
// processUpdateQueue, but that didn't happen in this case because we
// skipped over the parent when we bailed out.
var newFirst = null;
var newLast = null;
var firstBaseUpdate = queue.firstBaseUpdate;
if (firstBaseUpdate !== null) {
// Loop through the updates and clone them.
var update = firstBaseUpdate;
do {
var clone = {
eventTime: update.eventTime,
lane: update.lane,
tag: update.tag,
payload: update.payload,
callback: update.callback,
next: null
};
if (newLast === null) {
newFirst = newLast = clone;
} else {
newLast.next = clone;
newLast = clone;
}
update = update.next;
} while (update !== null); // Append the captured update the end of the cloned list.
if (newLast === null) {
newFirst = newLast = capturedUpdate;
} else {
newLast.next = capturedUpdate;
newLast = capturedUpdate;
}
} else {
// There are no base updates.
newFirst = newLast = capturedUpdate;
}
queue = {
baseState: currentQueue.baseState,
firstBaseUpdate: newFirst,
lastBaseUpdate: newLast,
shared: currentQueue.shared,
effects: currentQueue.effects
};
workInProgress.updateQueue = queue;
return;
}
} // Append the update to the end of the list.
var lastBaseUpdate = queue.lastBaseUpdate;
if (lastBaseUpdate === null) {
queue.firstBaseUpdate = capturedUpdate;
} else {
lastBaseUpdate.next = capturedUpdate;
}
queue.lastBaseUpdate = capturedUpdate;
}
function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
switch (update.tag) {
case ReplaceState:
{
var payload = update.payload;
if (typeof payload === 'function') {
// Updater function
{
enterDisallowedContextReadInDEV();
}
var nextState = payload.call(instance, prevState, nextProps);
{
if ( workInProgress.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
payload.call(instance, prevState, nextProps);
} finally {
setIsStrictModeForDevtools(false);
}
}
exitDisallowedContextReadInDEV();
}
return nextState;
} // State object
return payload;
}
case CaptureUpdate:
{
workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;
}
// Intentional fallthrough
case UpdateState:
{
var _payload = update.payload;
var partialState;
if (typeof _payload === 'function') {
// Updater function
{
enterDisallowedContextReadInDEV();
}
partialState = _payload.call(instance, prevState, nextProps);
{
if ( workInProgress.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
_payload.call(instance, prevState, nextProps);
} finally {
setIsStrictModeForDevtools(false);
}
}
exitDisallowedContextReadInDEV();
}
} else {
// Partial state object
partialState = _payload;
}
if (partialState === null || partialState === undefined) {
// Null and undefined are treated as no-ops.
return prevState;
} // Merge the partial state and the previous state.
return assign({}, prevState, partialState);
}
case ForceUpdate:
{
hasForceUpdate = true;
return prevState;
}
}
return prevState;
}
function processUpdateQueue(workInProgress, props, instance, renderLanes) {
// This is always non-null on a ClassComponent or HostRoot
var queue = workInProgress.updateQueue;
hasForceUpdate = false;
{
currentlyProcessingQueue = queue.shared;
}
var firstBaseUpdate = queue.firstBaseUpdate;
var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.
var pendingQueue = queue.shared.pending;
if (pendingQueue !== null) {
queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first
// and last so that it's non-circular.
var lastPendingUpdate = pendingQueue;
var firstPendingUpdate = lastPendingUpdate.next;
lastPendingUpdate.next = null; // Append pending updates to base queue
if (lastBaseUpdate === null) {
firstBaseUpdate = firstPendingUpdate;
} else {
lastBaseUpdate.next = firstPendingUpdate;
}
lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then
// we need to transfer the updates to that queue, too. Because the base
// queue is a singly-linked list with no cycles, we can append to both
// lists and take advantage of structural sharing.
// TODO: Pass `current` as argument
var current = workInProgress.alternate;
if (current !== null) {
// This is always non-null on a ClassComponent or HostRoot
var currentQueue = current.updateQueue;
var currentLastBaseUpdate = currentQueue.lastBaseUpdate;
if (currentLastBaseUpdate !== lastBaseUpdate) {
if (currentLastBaseUpdate === null) {
currentQueue.firstBaseUpdate = firstPendingUpdate;
} else {
currentLastBaseUpdate.next = firstPendingUpdate;
}
currentQueue.lastBaseUpdate = lastPendingUpdate;
}
}
} // These values may change as we process the queue.
if (firstBaseUpdate !== null) {
// Iterate through the list of updates to compute the result.
var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes
// from the original lanes.
var newLanes = NoLanes;
var newBaseState = null;
var newFirstBaseUpdate = null;
var newLastBaseUpdate = null;
var update = firstBaseUpdate;
do {
var updateLane = update.lane;
var updateEventTime = update.eventTime;
if (!isSubsetOfLanes(renderLanes, updateLane)) {
// Priority is insufficient. Skip this update. If this is the first
// skipped update, the previous update/state is the new base
// update/state.
var clone = {
eventTime: updateEventTime,
lane: updateLane,
tag: update.tag,
payload: update.payload,
callback: update.callback,
next: null
};
if (newLastBaseUpdate === null) {
newFirstBaseUpdate = newLastBaseUpdate = clone;
newBaseState = newState;
} else {
newLastBaseUpdate = newLastBaseUpdate.next = clone;
} // Update the remaining priority in the queue.
newLanes = mergeLanes(newLanes, updateLane);
} else {
// This update does have sufficient priority.
if (newLastBaseUpdate !== null) {
var _clone = {
eventTime: updateEventTime,
// This update is going to be committed so we never want uncommit
// it. Using NoLane works because 0 is a subset of all bitmasks, so
// this will never be skipped by the check above.
lane: NoLane,
tag: update.tag,
payload: update.payload,
callback: update.callback,
next: null
};
newLastBaseUpdate = newLastBaseUpdate.next = _clone;
} // Process this update.
newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);
var callback = update.callback;
if (callback !== null && // If the update was already committed, we should not queue its
// callback again.
update.lane !== NoLane) {
workInProgress.flags |= Callback;
var effects = queue.effects;
if (effects === null) {
queue.effects = [update];
} else {
effects.push(update);
}
}
}
update = update.next;
if (update === null) {
pendingQueue = queue.shared.pending;
if (pendingQueue === null) {
break;
} else {
// An update was scheduled from inside a reducer. Add the new
// pending updates to the end of the list and keep processing.
var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we
// unravel them when transferring them to the base queue.
var _firstPendingUpdate = _lastPendingUpdate.next;
_lastPendingUpdate.next = null;
update = _firstPendingUpdate;
queue.lastBaseUpdate = _lastPendingUpdate;
queue.shared.pending = null;
}
}
} while (true);
if (newLastBaseUpdate === null) {
newBaseState = newState;
}
queue.baseState = newBaseState;
queue.firstBaseUpdate = newFirstBaseUpdate;
queue.lastBaseUpdate = newLastBaseUpdate; // Interleaved updates are stored on a separate queue. We aren't going to
// process them during this render, but we do need to track which lanes
// are remaining.
var lastInterleaved = queue.shared.interleaved;
if (lastInterleaved !== null) {
var interleaved = lastInterleaved;
do {
newLanes = mergeLanes(newLanes, interleaved.lane);
interleaved = interleaved.next;
} while (interleaved !== lastInterleaved);
} else if (firstBaseUpdate === null) {
// `queue.lanes` is used for entangling transitions. We can set it back to
// zero once the queue is empty.
queue.shared.lanes = NoLanes;
} // Set the remaining expiration time to be whatever is remaining in the queue.
// This should be fine because the only two other things that contribute to
// expiration time are props and context. We're already in the middle of the
// begin phase by the time we start processing the queue, so we've already
// dealt with the props. Context in components that specify
// shouldComponentUpdate is tricky; but we'll have to account for
// that regardless.
markSkippedUpdateLanes(newLanes);
workInProgress.lanes = newLanes;
workInProgress.memoizedState = newState;
}
{
currentlyProcessingQueue = null;
}
}
function callCallback(callback, context) {
if (typeof callback !== 'function') {
throw new Error('Invalid argument passed as callback. Expected a function. Instead ' + ("received: " + callback));
}
callback.call(context);
}
function resetHasForceUpdateBeforeProcessing() {
hasForceUpdate = false;
}
function checkHasForceUpdateAfterProcessing() {
return hasForceUpdate;
}
function commitUpdateQueue(finishedWork, finishedQueue, instance) {
// Commit the effects
var effects = finishedQueue.effects;
finishedQueue.effects = null;
if (effects !== null) {
for (var i = 0; i < effects.length; i++) {
var effect = effects[i];
var callback = effect.callback;
if (callback !== null) {
effect.callback = null;
callCallback(callback, instance);
}
}
}
}
var fakeInternalInstance = {}; // React.Component uses a shared frozen object by default.
// We'll use it to determine whether we need to initialize legacy refs.
var emptyRefsObject = new React.Component().refs;
var didWarnAboutStateAssignmentForComponent;
var didWarnAboutUninitializedState;
var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;
var didWarnAboutLegacyLifecyclesAndDerivedState;
var didWarnAboutUndefinedDerivedState;
var warnOnUndefinedDerivedState;
var warnOnInvalidCallback;
var didWarnAboutDirectlyAssigningPropsToState;
var didWarnAboutContextTypeAndContextTypes;
var didWarnAboutInvalidateContextType;
{
didWarnAboutStateAssignmentForComponent = new Set();
didWarnAboutUninitializedState = new Set();
didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();
didWarnAboutLegacyLifecyclesAndDerivedState = new Set();
didWarnAboutDirectlyAssigningPropsToState = new Set();
didWarnAboutUndefinedDerivedState = new Set();
didWarnAboutContextTypeAndContextTypes = new Set();
didWarnAboutInvalidateContextType = new Set();
var didWarnOnInvalidCallback = new Set();
warnOnInvalidCallback = function (callback, callerName) {
if (callback === null || typeof callback === 'function') {
return;
}
var key = callerName + '_' + callback;
if (!didWarnOnInvalidCallback.has(key)) {
didWarnOnInvalidCallback.add(key);
error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
}
};
warnOnUndefinedDerivedState = function (type, partialState) {
if (partialState === undefined) {
var componentName = getComponentNameFromType(type) || 'Component';
if (!didWarnAboutUndefinedDerivedState.has(componentName)) {
didWarnAboutUndefinedDerivedState.add(componentName);
error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);
}
}
}; // This is so gross but it's at least non-critical and can be removed if
// it causes problems. This is meant to give a nicer error message for
// ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,
// ...)) which otherwise throws a "_processChildContext is not a function"
// exception.
Object.defineProperty(fakeInternalInstance, '_processChildContext', {
enumerable: false,
value: function () {
throw new Error('_processChildContext is not available in React 16+. This likely ' + 'means you have multiple copies of React and are attempting to nest ' + 'a React 15 tree inside a React 16 tree using ' + "unstable_renderSubtreeIntoContainer, which isn't supported. Try " + 'to make sure you have only one copy of React (and ideally, switch ' + 'to ReactDOM.createPortal).');
}
});
Object.freeze(fakeInternalInstance);
}
function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {
var prevState = workInProgress.memoizedState;
var partialState = getDerivedStateFromProps(nextProps, prevState);
{
if ( workInProgress.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
// Invoke the function an extra time to help detect side-effects.
partialState = getDerivedStateFromProps(nextProps, prevState);
} finally {
setIsStrictModeForDevtools(false);
}
}
warnOnUndefinedDerivedState(ctor, partialState);
} // Merge the partial state and the previous state.
var memoizedState = partialState === null || partialState === undefined ? prevState : assign({}, prevState, partialState);
workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the
// base state.
if (workInProgress.lanes === NoLanes) {
// Queue is always non-null for classes
var updateQueue = workInProgress.updateQueue;
updateQueue.baseState = memoizedState;
}
}
var classComponentUpdater = {
isMounted: isMounted,
enqueueSetState: function (inst, payload, callback) {
var fiber = get(inst);
var eventTime = requestEventTime();
var lane = requestUpdateLane(fiber);
var update = createUpdate(eventTime, lane);
update.payload = payload;
if (callback !== undefined && callback !== null) {
{
warnOnInvalidCallback(callback, 'setState');
}
update.callback = callback;
}
var root = enqueueUpdate(fiber, update, lane);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, lane, eventTime);
entangleTransitions(root, fiber, lane);
}
{
markStateUpdateScheduled(fiber, lane);
}
},
enqueueReplaceState: function (inst, payload, callback) {
var fiber = get(inst);
var eventTime = requestEventTime();
var lane = requestUpdateLane(fiber);
var update = createUpdate(eventTime, lane);
update.tag = ReplaceState;
update.payload = payload;
if (callback !== undefined && callback !== null) {
{
warnOnInvalidCallback(callback, 'replaceState');
}
update.callback = callback;
}
var root = enqueueUpdate(fiber, update, lane);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, lane, eventTime);
entangleTransitions(root, fiber, lane);
}
{
markStateUpdateScheduled(fiber, lane);
}
},
enqueueForceUpdate: function (inst, callback) {
var fiber = get(inst);
var eventTime = requestEventTime();
var lane = requestUpdateLane(fiber);
var update = createUpdate(eventTime, lane);
update.tag = ForceUpdate;
if (callback !== undefined && callback !== null) {
{
warnOnInvalidCallback(callback, 'forceUpdate');
}
update.callback = callback;
}
var root = enqueueUpdate(fiber, update, lane);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, lane, eventTime);
entangleTransitions(root, fiber, lane);
}
{
markForceUpdateScheduled(fiber, lane);
}
}
};
function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {
var instance = workInProgress.stateNode;
if (typeof instance.shouldComponentUpdate === 'function') {
var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
{
if ( workInProgress.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
// Invoke the function an extra time to help detect side-effects.
shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
} finally {
setIsStrictModeForDevtools(false);
}
}
if (shouldUpdate === undefined) {
error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentNameFromType(ctor) || 'Component');
}
}
return shouldUpdate;
}
if (ctor.prototype && ctor.prototype.isPureReactComponent) {
return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);
}
return true;
}
function checkClassInstance(workInProgress, ctor, newProps) {
var instance = workInProgress.stateNode;
{
var name = getComponentNameFromType(ctor) || 'Component';
var renderPresent = instance.render;
if (!renderPresent) {
if (ctor.prototype && typeof ctor.prototype.render === 'function') {
error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
} else {
error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
}
}
if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {
error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);
}
if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {
error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);
}
if (instance.propTypes) {
error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);
}
if (instance.contextType) {
error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);
}
{
if (instance.contextTypes) {
error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);
}
if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {
didWarnAboutContextTypeAndContextTypes.add(ctor);
error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);
}
}
if (typeof instance.componentShouldUpdate === 'function') {
error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);
}
if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentNameFromType(ctor) || 'A pure component');
}
if (typeof instance.componentDidUnmount === 'function') {
error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);
}
if (typeof instance.componentDidReceiveProps === 'function') {
error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);
}
if (typeof instance.componentWillRecieveProps === 'function') {
error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);
}
if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {
error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);
}
var hasMutatedProps = instance.props !== newProps;
if (instance.props !== undefined && hasMutatedProps) {
error('%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name);
}
if (instance.defaultProps) {
error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);
}
if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {
didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);
error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentNameFromType(ctor));
}
if (typeof instance.getDerivedStateFromProps === 'function') {
error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
}
if (typeof instance.getDerivedStateFromError === 'function') {
error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
}
if (typeof ctor.getSnapshotBeforeUpdate === 'function') {
error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);
}
var _state = instance.state;
if (_state && (typeof _state !== 'object' || isArray(_state))) {
error('%s.state: must be set to an object or null', name);
}
if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {
error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);
}
}
}
function adoptClassInstance(workInProgress, instance) {
instance.updater = classComponentUpdater;
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
set(instance, workInProgress);
{
instance._reactInternalInstance = fakeInternalInstance;
}
}
function constructClassInstance(workInProgress, ctor, props) {
var isLegacyContextConsumer = false;
var unmaskedContext = emptyContextObject;
var context = emptyContextObject;
var contextType = ctor.contextType;
{
if ('contextType' in ctor) {
var isValid = // Allow null for conditional declaration
contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>
if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
didWarnAboutInvalidateContextType.add(ctor);
var addendum = '';
if (contextType === undefined) {
addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';
} else if (typeof contextType !== 'object') {
addendum = ' However, it is set to a ' + typeof contextType + '.';
} else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
addendum = ' Did you accidentally pass the Context.Provider instead?';
} else if (contextType._context !== undefined) {
// <Context.Consumer>
addendum = ' Did you accidentally pass the Context.Consumer instead?';
} else {
addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
}
error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentNameFromType(ctor) || 'Component', addendum);
}
}
}
if (typeof contextType === 'object' && contextType !== null) {
context = readContext(contextType);
} else {
unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
var contextTypes = ctor.contextTypes;
isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;
context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;
}
var instance = new ctor(props, context); // Instantiate twice to help detect side-effects.
{
if ( workInProgress.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
instance = new ctor(props, context); // eslint-disable-line no-new
} finally {
setIsStrictModeForDevtools(false);
}
}
}
var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;
adoptClassInstance(workInProgress, instance);
{
if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {
var componentName = getComponentNameFromType(ctor) || 'Component';
if (!didWarnAboutUninitializedState.has(componentName)) {
didWarnAboutUninitializedState.add(componentName);
error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);
}
} // If new component APIs are defined, "unsafe" lifecycles won't be called.
// Warn about these lifecycles if they are present.
// Don't warn about react-lifecycles-compat polyfilled methods though.
if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {
var foundWillMountName = null;
var foundWillReceivePropsName = null;
var foundWillUpdateName = null;
if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {
foundWillMountName = 'componentWillMount';
} else if (typeof instance.UNSAFE_componentWillMount === 'function') {
foundWillMountName = 'UNSAFE_componentWillMount';
}
if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
foundWillReceivePropsName = 'componentWillReceiveProps';
} else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
}
if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
foundWillUpdateName = 'componentWillUpdate';
} else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
foundWillUpdateName = 'UNSAFE_componentWillUpdate';
}
if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
var _componentName = getComponentNameFromType(ctor) || 'Component';
var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {
didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);
error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://reactjs.org/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? "\n " + foundWillMountName : '', foundWillReceivePropsName !== null ? "\n " + foundWillReceivePropsName : '', foundWillUpdateName !== null ? "\n " + foundWillUpdateName : '');
}
}
}
} // Cache unmasked context so we can avoid recreating masked context unless necessary.
// ReactFiberContext usually updates this cache but can't for newly-created instances.
if (isLegacyContextConsumer) {
cacheContext(workInProgress, unmaskedContext, context);
}
return instance;
}
function callComponentWillMount(workInProgress, instance) {
var oldState = instance.state;
if (typeof instance.componentWillMount === 'function') {
instance.componentWillMount();
}
if (typeof instance.UNSAFE_componentWillMount === 'function') {
instance.UNSAFE_componentWillMount();
}
if (oldState !== instance.state) {
{
error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentNameFromFiber(workInProgress) || 'Component');
}
classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
}
}
function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {
var oldState = instance.state;
if (typeof instance.componentWillReceiveProps === 'function') {
instance.componentWillReceiveProps(newProps, nextContext);
}
if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
}
if (instance.state !== oldState) {
{
var componentName = getComponentNameFromFiber(workInProgress) || 'Component';
if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {
didWarnAboutStateAssignmentForComponent.add(componentName);
error('%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
}
}
classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
}
} // Invokes the mount life-cycles on a previously never rendered instance.
function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
{
checkClassInstance(workInProgress, ctor, newProps);
}
var instance = workInProgress.stateNode;
instance.props = newProps;
instance.state = workInProgress.memoizedState;
instance.refs = emptyRefsObject;
initializeUpdateQueue(workInProgress);
var contextType = ctor.contextType;
if (typeof contextType === 'object' && contextType !== null) {
instance.context = readContext(contextType);
} else {
var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
instance.context = getMaskedContext(workInProgress, unmaskedContext);
}
{
if (instance.state === newProps) {
var componentName = getComponentNameFromType(ctor) || 'Component';
if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {
didWarnAboutDirectlyAssigningPropsToState.add(componentName);
error('%s: It is not recommended to assign props directly to state ' + "because updates to props won't be reflected in state. " + 'In most cases, it is better to use props directly.', componentName);
}
}
if (workInProgress.mode & StrictLegacyMode) {
ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);
}
{
ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);
}
}
instance.state = workInProgress.memoizedState;
var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
if (typeof getDerivedStateFromProps === 'function') {
applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
instance.state = workInProgress.memoizedState;
} // In order to support react-lifecycles-compat polyfilled components,
// Unsafe lifecycles should not be invoked for components using the new APIs.
if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's
// process them now.
processUpdateQueue(workInProgress, newProps, instance, renderLanes);
instance.state = workInProgress.memoizedState;
}
if (typeof instance.componentDidMount === 'function') {
var fiberFlags = Update;
{
fiberFlags |= LayoutStatic;
}
if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {
fiberFlags |= MountLayoutDev;
}
workInProgress.flags |= fiberFlags;
}
}
function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
var instance = workInProgress.stateNode;
var oldProps = workInProgress.memoizedProps;
instance.props = oldProps;
var oldContext = instance.context;
var contextType = ctor.contextType;
var nextContext = emptyContextObject;
if (typeof contextType === 'object' && contextType !== null) {
nextContext = readContext(contextType);
} else {
var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);
}
var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
// ever the previously attempted to render - not the "current". However,
// during componentDidUpdate we pass the "current" props.
// In order to support react-lifecycles-compat polyfilled components,
// Unsafe lifecycles should not be invoked for components using the new APIs.
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
if (oldProps !== newProps || oldContext !== nextContext) {
callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
}
}
resetHasForceUpdateBeforeProcessing();
var oldState = workInProgress.memoizedState;
var newState = instance.state = oldState;
processUpdateQueue(workInProgress, newProps, instance, renderLanes);
newState = workInProgress.memoizedState;
if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
// If an update was already in progress, we should schedule an Update
// effect even though we're bailing out, so that cWU/cDU are called.
if (typeof instance.componentDidMount === 'function') {
var fiberFlags = Update;
{
fiberFlags |= LayoutStatic;
}
if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {
fiberFlags |= MountLayoutDev;
}
workInProgress.flags |= fiberFlags;
}
return false;
}
if (typeof getDerivedStateFromProps === 'function') {
applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
newState = workInProgress.memoizedState;
}
var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);
if (shouldUpdate) {
// In order to support react-lifecycles-compat polyfilled components,
// Unsafe lifecycles should not be invoked for components using the new APIs.
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
if (typeof instance.componentWillMount === 'function') {
instance.componentWillMount();
}
if (typeof instance.UNSAFE_componentWillMount === 'function') {
instance.UNSAFE_componentWillMount();
}
}
if (typeof instance.componentDidMount === 'function') {
var _fiberFlags = Update;
{
_fiberFlags |= LayoutStatic;
}
if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {
_fiberFlags |= MountLayoutDev;
}
workInProgress.flags |= _fiberFlags;
}
} else {
// If an update was already in progress, we should schedule an Update
// effect even though we're bailing out, so that cWU/cDU are called.
if (typeof instance.componentDidMount === 'function') {
var _fiberFlags2 = Update;
{
_fiberFlags2 |= LayoutStatic;
}
if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {
_fiberFlags2 |= MountLayoutDev;
}
workInProgress.flags |= _fiberFlags2;
} // If shouldComponentUpdate returned false, we should still update the
// memoized state to indicate that this work can be reused.
workInProgress.memoizedProps = newProps;
workInProgress.memoizedState = newState;
} // Update the existing instance's state, props, and context pointers even
// if shouldComponentUpdate returns false.
instance.props = newProps;
instance.state = newState;
instance.context = nextContext;
return shouldUpdate;
} // Invokes the update life-cycles and returns false if it shouldn't rerender.
function updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {
var instance = workInProgress.stateNode;
cloneUpdateQueue(current, workInProgress);
var unresolvedOldProps = workInProgress.memoizedProps;
var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);
instance.props = oldProps;
var unresolvedNewProps = workInProgress.pendingProps;
var oldContext = instance.context;
var contextType = ctor.contextType;
var nextContext = emptyContextObject;
if (typeof contextType === 'object' && contextType !== null) {
nextContext = readContext(contextType);
} else {
var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);
}
var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
// ever the previously attempted to render - not the "current". However,
// during componentDidUpdate we pass the "current" props.
// In order to support react-lifecycles-compat polyfilled components,
// Unsafe lifecycles should not be invoked for components using the new APIs.
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {
callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
}
}
resetHasForceUpdateBeforeProcessing();
var oldState = workInProgress.memoizedState;
var newState = instance.state = oldState;
processUpdateQueue(workInProgress, newProps, instance, renderLanes);
newState = workInProgress.memoizedState;
if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing() && !(enableLazyContextPropagation )) {
// If an update was already in progress, we should schedule an Update
// effect even though we're bailing out, so that cWU/cDU are called.
if (typeof instance.componentDidUpdate === 'function') {
if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
workInProgress.flags |= Update;
}
}
if (typeof instance.getSnapshotBeforeUpdate === 'function') {
if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
workInProgress.flags |= Snapshot;
}
}
return false;
}
if (typeof getDerivedStateFromProps === 'function') {
applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
newState = workInProgress.memoizedState;
}
var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) || // TODO: In some cases, we'll end up checking if context has changed twice,
// both before and after `shouldComponentUpdate` has been called. Not ideal,
// but I'm loath to refactor this function. This only happens for memoized
// components so it's not that common.
enableLazyContextPropagation ;
if (shouldUpdate) {
// In order to support react-lifecycles-compat polyfilled components,
// Unsafe lifecycles should not be invoked for components using the new APIs.
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {
if (typeof instance.componentWillUpdate === 'function') {
instance.componentWillUpdate(newProps, newState, nextContext);
}
if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);
}
}
if (typeof instance.componentDidUpdate === 'function') {
workInProgress.flags |= Update;
}
if (typeof instance.getSnapshotBeforeUpdate === 'function') {
workInProgress.flags |= Snapshot;
}
} else {
// If an update was already in progress, we should schedule an Update
// effect even though we're bailing out, so that cWU/cDU are called.
if (typeof instance.componentDidUpdate === 'function') {
if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
workInProgress.flags |= Update;
}
}
if (typeof instance.getSnapshotBeforeUpdate === 'function') {
if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
workInProgress.flags |= Snapshot;
}
} // If shouldComponentUpdate returned false, we should still update the
// memoized props/state to indicate that this work can be reused.
workInProgress.memoizedProps = newProps;
workInProgress.memoizedState = newState;
} // Update the existing instance's state, props, and context pointers even
// if shouldComponentUpdate returns false.
instance.props = newProps;
instance.state = newState;
instance.context = nextContext;
return shouldUpdate;
}
var didWarnAboutMaps;
var didWarnAboutGenerators;
var didWarnAboutStringRefs;
var ownerHasKeyUseWarning;
var ownerHasFunctionTypeWarning;
var warnForMissingKey = function (child, returnFiber) {};
{
didWarnAboutMaps = false;
didWarnAboutGenerators = false;
didWarnAboutStringRefs = {};
/**
* Warn if there's no key explicitly set on dynamic arrays of children or
* object keys are not valid. This allows us to keep track of children between
* updates.
*/
ownerHasKeyUseWarning = {};
ownerHasFunctionTypeWarning = {};
warnForMissingKey = function (child, returnFiber) {
if (child === null || typeof child !== 'object') {
return;
}
if (!child._store || child._store.validated || child.key != null) {
return;
}
if (typeof child._store !== 'object') {
throw new Error('React Component in warnForMissingKey should have a _store. ' + 'This error is likely caused by a bug in React. Please file an issue.');
}
child._store.validated = true;
var componentName = getComponentNameFromFiber(returnFiber) || 'Component';
if (ownerHasKeyUseWarning[componentName]) {
return;
}
ownerHasKeyUseWarning[componentName] = true;
error('Each child in a list should have a unique ' + '"key" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');
};
}
function coerceRef(returnFiber, current, element) {
var mixedRef = element.ref;
if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {
{
// TODO: Clean this up once we turn on the string ref warning for
// everyone, because the strict mode case will no longer be relevant
if ((returnFiber.mode & StrictLegacyMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs
// because these cannot be automatically converted to an arrow function
// using a codemod. Therefore, we don't have to warn about string refs again.
!(element._owner && element._self && element._owner.stateNode !== element._self)) {
var componentName = getComponentNameFromFiber(returnFiber) || 'Component';
if (!didWarnAboutStringRefs[componentName]) {
{
error('A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', mixedRef);
}
didWarnAboutStringRefs[componentName] = true;
}
}
}
if (element._owner) {
var owner = element._owner;
var inst;
if (owner) {
var ownerFiber = owner;
if (ownerFiber.tag !== ClassComponent) {
throw new Error('Function components cannot have string refs. ' + 'We recommend using useRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref');
}
inst = ownerFiber.stateNode;
}
if (!inst) {
throw new Error("Missing owner for string ref " + mixedRef + ". This error is likely caused by a " + 'bug in React. Please file an issue.');
} // Assigning this to a const so Flow knows it won't change in the closure
var resolvedInst = inst;
{
checkPropStringCoercion(mixedRef, 'ref');
}
var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref
if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {
return current.ref;
}
var ref = function (value) {
var refs = resolvedInst.refs;
if (refs === emptyRefsObject) {
// This is a lazy pooled frozen object, so we need to initialize.
refs = resolvedInst.refs = {};
}
if (value === null) {
delete refs[stringRef];
} else {
refs[stringRef] = value;
}
};
ref._stringRef = stringRef;
return ref;
} else {
if (typeof mixedRef !== 'string') {
throw new Error('Expected ref to be a function, a string, an object returned by React.createRef(), or null.');
}
if (!element._owner) {
throw new Error("Element ref was specified as a string (" + mixedRef + ") but no owner was set. This could happen for one of" + ' the following reasons:\n' + '1. You may be adding a ref to a function component\n' + "2. You may be adding a ref to a component that was not created inside a component's render method\n" + '3. You have multiple copies of React loaded\n' + 'See https://reactjs.org/link/refs-must-have-owner for more information.');
}
}
}
return mixedRef;
}
function throwOnInvalidObjectType(returnFiber, newChild) {
var childString = Object.prototype.toString.call(newChild);
throw new Error("Objects are not valid as a React child (found: " + (childString === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : childString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.');
}
function warnOnFunctionType(returnFiber) {
{
var componentName = getComponentNameFromFiber(returnFiber) || 'Component';
if (ownerHasFunctionTypeWarning[componentName]) {
return;
}
ownerHasFunctionTypeWarning[componentName] = true;
error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');
}
}
function resolveLazy(lazyType) {
var payload = lazyType._payload;
var init = lazyType._init;
return init(payload);
} // This wrapper function exists because I expect to clone the code in each path
// to be able to optimize each path individually by branching early. This needs
// a compiler or we can do it manually. Helpers that don't need this branching
// live outside of this function.
function ChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
if (!shouldTrackSideEffects) {
// Noop.
return;
}
var deletions = returnFiber.deletions;
if (deletions === null) {
returnFiber.deletions = [childToDelete];
returnFiber.flags |= ChildDeletion;
} else {
deletions.push(childToDelete);
}
}
function deleteRemainingChildren(returnFiber, currentFirstChild) {
if (!shouldTrackSideEffects) {
// Noop.
return null;
} // TODO: For the shouldClone case, this could be micro-optimized a bit by
// assuming that after the first child we've already added everything.
var childToDelete = currentFirstChild;
while (childToDelete !== null) {
deleteChild(returnFiber, childToDelete);
childToDelete = childToDelete.sibling;
}
return null;
}
function mapRemainingChildren(returnFiber, currentFirstChild) {
// Add the remaining children to a temporary map so that we can find them by
// keys quickly. Implicit (null) keys get added to this set with their index
// instead.
var existingChildren = new Map();
var existingChild = currentFirstChild;
while (existingChild !== null) {
if (existingChild.key !== null) {
existingChildren.set(existingChild.key, existingChild);
} else {
existingChildren.set(existingChild.index, existingChild);
}
existingChild = existingChild.sibling;
}
return existingChildren;
}
function useFiber(fiber, pendingProps) {
// We currently set sibling to null and index to 0 here because it is easy
// to forget to do before returning it. E.g. for the single child case.
var clone = createWorkInProgress(fiber, pendingProps);
clone.index = 0;
clone.sibling = null;
return clone;
}
function placeChild(newFiber, lastPlacedIndex, newIndex) {
newFiber.index = newIndex;
if (!shouldTrackSideEffects) {
// During hydration, the useId algorithm needs to know which fibers are
// part of a list of children (arrays, iterators).
newFiber.flags |= Forked;
return lastPlacedIndex;
}
var current = newFiber.alternate;
if (current !== null) {
var oldIndex = current.index;
if (oldIndex < lastPlacedIndex) {
// This is a move.
newFiber.flags |= Placement;
return lastPlacedIndex;
} else {
// This item can stay in place.
return oldIndex;
}
} else {
// This is an insertion.
newFiber.flags |= Placement;
return lastPlacedIndex;
}
}
function placeSingleChild(newFiber) {
// This is simpler for the single child case. We only need to do a
// placement for inserting new children.
if (shouldTrackSideEffects && newFiber.alternate === null) {
newFiber.flags |= Placement;
}
return newFiber;
}
function updateTextNode(returnFiber, current, textContent, lanes) {
if (current === null || current.tag !== HostText) {
// Insert
var created = createFiberFromText(textContent, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
} else {
// Update
var existing = useFiber(current, textContent);
existing.return = returnFiber;
return existing;
}
}
function updateElement(returnFiber, current, element, lanes) {
var elementType = element.type;
if (elementType === REACT_FRAGMENT_TYPE) {
return updateFragment(returnFiber, current, element.props.children, lanes, element.key);
}
if (current !== null) {
if (current.elementType === elementType || ( // Keep this check inline so it only runs on the false path:
isCompatibleFamilyForHotReloading(current, element) ) || // Lazy types should reconcile their resolved type.
// We need to do this after the Hot Reloading check above,
// because hot reloading has different semantics than prod because
// it doesn't resuspend. So we can't let the call below suspend.
typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current.type) {
// Move based on index
var existing = useFiber(current, element.props);
existing.ref = coerceRef(returnFiber, current, element);
existing.return = returnFiber;
{
existing._debugSource = element._source;
existing._debugOwner = element._owner;
}
return existing;
}
} // Insert
var created = createFiberFromElement(element, returnFiber.mode, lanes);
created.ref = coerceRef(returnFiber, current, element);
created.return = returnFiber;
return created;
}
function updatePortal(returnFiber, current, portal, lanes) {
if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
// Insert
var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
} else {
// Update
var existing = useFiber(current, portal.children || []);
existing.return = returnFiber;
return existing;
}
}
function updateFragment(returnFiber, current, fragment, lanes, key) {
if (current === null || current.tag !== Fragment) {
// Insert
var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
created.return = returnFiber;
return created;
} else {
// Update
var existing = useFiber(current, fragment);
existing.return = returnFiber;
return existing;
}
}
function createChild(returnFiber, newChild, lanes) {
if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {
// Text nodes don't have keys. If the previous node is implicitly keyed
// we can continue to replace it without aborting even if it is not a text
// node.
var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
}
if (typeof newChild === 'object' && newChild !== null) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
{
var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);
_created.ref = coerceRef(returnFiber, null, newChild);
_created.return = returnFiber;
return _created;
}
case REACT_PORTAL_TYPE:
{
var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);
_created2.return = returnFiber;
return _created2;
}
case REACT_LAZY_TYPE:
{
var payload = newChild._payload;
var init = newChild._init;
return createChild(returnFiber, init(payload), lanes);
}
}
if (isArray(newChild) || getIteratorFn(newChild)) {
var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);
_created3.return = returnFiber;
return _created3;
}
throwOnInvalidObjectType(returnFiber, newChild);
}
{
if (typeof newChild === 'function') {
warnOnFunctionType(returnFiber);
}
}
return null;
}
function updateSlot(returnFiber, oldFiber, newChild, lanes) {
// Update the fiber if the keys match, otherwise return null.
var key = oldFiber !== null ? oldFiber.key : null;
if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {
// Text nodes don't have keys. If the previous node is implicitly keyed
// we can continue to replace it without aborting even if it is not a text
// node.
if (key !== null) {
return null;
}
return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);
}
if (typeof newChild === 'object' && newChild !== null) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
{
if (newChild.key === key) {
return updateElement(returnFiber, oldFiber, newChild, lanes);
} else {
return null;
}
}
case REACT_PORTAL_TYPE:
{
if (newChild.key === key) {
return updatePortal(returnFiber, oldFiber, newChild, lanes);
} else {
return null;
}
}
case REACT_LAZY_TYPE:
{
var payload = newChild._payload;
var init = newChild._init;
return updateSlot(returnFiber, oldFiber, init(payload), lanes);
}
}
if (isArray(newChild) || getIteratorFn(newChild)) {
if (key !== null) {
return null;
}
return updateFragment(returnFiber, oldFiber, newChild, lanes, null);
}
throwOnInvalidObjectType(returnFiber, newChild);
}
{
if (typeof newChild === 'function') {
warnOnFunctionType(returnFiber);
}
}
return null;
}
function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {
// Text nodes don't have keys, so we neither have to check the old nor
// new node for the key. If both are text nodes, they match.
var matchedFiber = existingChildren.get(newIdx) || null;
return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);
}
if (typeof newChild === 'object' && newChild !== null) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
{
var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
return updateElement(returnFiber, _matchedFiber, newChild, lanes);
}
case REACT_PORTAL_TYPE:
{
var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);
}
case REACT_LAZY_TYPE:
var payload = newChild._payload;
var init = newChild._init;
return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes);
}
if (isArray(newChild) || getIteratorFn(newChild)) {
var _matchedFiber3 = existingChildren.get(newIdx) || null;
return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);
}
throwOnInvalidObjectType(returnFiber, newChild);
}
{
if (typeof newChild === 'function') {
warnOnFunctionType(returnFiber);
}
}
return null;
}
/**
* Warns if there is a duplicate or missing key
*/
function warnOnInvalidKey(child, knownKeys, returnFiber) {
{
if (typeof child !== 'object' || child === null) {
return knownKeys;
}
switch (child.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
warnForMissingKey(child, returnFiber);
var key = child.key;
if (typeof key !== 'string') {
break;
}
if (knownKeys === null) {
knownKeys = new Set();
knownKeys.add(key);
break;
}
if (!knownKeys.has(key)) {
knownKeys.add(key);
break;
}
error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);
break;
case REACT_LAZY_TYPE:
var payload = child._payload;
var init = child._init;
warnOnInvalidKey(init(payload), knownKeys, returnFiber);
break;
}
}
return knownKeys;
}
function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
// This algorithm can't optimize by searching from both ends since we
// don't have backpointers on fibers. I'm trying to see how far we can get
// with that model. If it ends up not being worth the tradeoffs, we can
// add it later.
// Even with a two ended optimization, we'd want to optimize for the case
// where there are few changes and brute force the comparison instead of
// going for the Map. It'd like to explore hitting that path first in
// forward-only mode and only go for the Map once we notice that we need
// lots of look ahead. This doesn't handle reversal as well as two ended
// search but that's unusual. Besides, for the two ended optimization to
// work on Iterables, we'd need to copy the whole set.
// In this first iteration, we'll just live with hitting the bad case
// (adding everything to a Map) in for every insert/move.
// If you change this code, also update reconcileChildrenIterator() which
// uses the same algorithm.
{
// First, validate keys.
var knownKeys = null;
for (var i = 0; i < newChildren.length; i++) {
var child = newChildren[i];
knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
}
}
var resultingFirstChild = null;
var previousNewFiber = null;
var oldFiber = currentFirstChild;
var lastPlacedIndex = 0;
var newIdx = 0;
var nextOldFiber = null;
for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {
if (oldFiber.index > newIdx) {
nextOldFiber = oldFiber;
oldFiber = null;
} else {
nextOldFiber = oldFiber.sibling;
}
var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);
if (newFiber === null) {
// TODO: This breaks on empty slots like null children. That's
// unfortunate because it triggers the slow path all the time. We need
// a better way to communicate whether this was a miss or null,
// boolean, undefined, etc.
if (oldFiber === null) {
oldFiber = nextOldFiber;
}
break;
}
if (shouldTrackSideEffects) {
if (oldFiber && newFiber.alternate === null) {
// We matched the slot, but we didn't reuse the existing fiber, so we
// need to delete the existing child.
deleteChild(returnFiber, oldFiber);
}
}
lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
if (previousNewFiber === null) {
// TODO: Move out of the loop. This only happens for the first run.
resultingFirstChild = newFiber;
} else {
// TODO: Defer siblings if we're not at the right index for this slot.
// I.e. if we had null values before, then we want to defer this
// for each null value. However, we also don't want to call updateSlot
// with the previous one.
previousNewFiber.sibling = newFiber;
}
previousNewFiber = newFiber;
oldFiber = nextOldFiber;
}
if (newIdx === newChildren.length) {
// We've reached the end of the new children. We can delete the rest.
deleteRemainingChildren(returnFiber, oldFiber);
if (getIsHydrating()) {
var numberOfForks = newIdx;
pushTreeFork(returnFiber, numberOfForks);
}
return resultingFirstChild;
}
if (oldFiber === null) {
// If we don't have any more existing children we can choose a fast path
// since the rest will all be insertions.
for (; newIdx < newChildren.length; newIdx++) {
var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);
if (_newFiber === null) {
continue;
}
lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);
if (previousNewFiber === null) {
// TODO: Move out of the loop. This only happens for the first run.
resultingFirstChild = _newFiber;
} else {
previousNewFiber.sibling = _newFiber;
}
previousNewFiber = _newFiber;
}
if (getIsHydrating()) {
var _numberOfForks = newIdx;
pushTreeFork(returnFiber, _numberOfForks);
}
return resultingFirstChild;
} // Add all children to a key map for quick lookups.
var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
for (; newIdx < newChildren.length; newIdx++) {
var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);
if (_newFiber2 !== null) {
if (shouldTrackSideEffects) {
if (_newFiber2.alternate !== null) {
// The new fiber is a work in progress, but if there exists a
// current, that means that we reused the fiber. We need to delete
// it from the child list so that we don't add it to the deletion
// list.
existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);
}
}
lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);
if (previousNewFiber === null) {
resultingFirstChild = _newFiber2;
} else {
previousNewFiber.sibling = _newFiber2;
}
previousNewFiber = _newFiber2;
}
}
if (shouldTrackSideEffects) {
// Any existing children that weren't consumed above were deleted. We need
// to add them to the deletion list.
existingChildren.forEach(function (child) {
return deleteChild(returnFiber, child);
});
}
if (getIsHydrating()) {
var _numberOfForks2 = newIdx;
pushTreeFork(returnFiber, _numberOfForks2);
}
return resultingFirstChild;
}
function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {
// This is the same implementation as reconcileChildrenArray(),
// but using the iterator instead.
var iteratorFn = getIteratorFn(newChildrenIterable);
if (typeof iteratorFn !== 'function') {
throw new Error('An object is not an iterable. This error is likely caused by a bug in ' + 'React. Please file an issue.');
}
{
// We don't support rendering Generators because it's a mutation.
// See https://github.com/facebook/react/issues/12995
if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag
newChildrenIterable[Symbol.toStringTag] === 'Generator') {
if (!didWarnAboutGenerators) {
error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');
}
didWarnAboutGenerators = true;
} // Warn about using Maps as children
if (newChildrenIterable.entries === iteratorFn) {
if (!didWarnAboutMaps) {
error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
}
didWarnAboutMaps = true;
} // First, validate keys.
// We'll get a different iterator later for the main pass.
var _newChildren = iteratorFn.call(newChildrenIterable);
if (_newChildren) {
var knownKeys = null;
var _step = _newChildren.next();
for (; !_step.done; _step = _newChildren.next()) {
var child = _step.value;
knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
}
}
}
var newChildren = iteratorFn.call(newChildrenIterable);
if (newChildren == null) {
throw new Error('An iterable object provided no iterator.');
}
var resultingFirstChild = null;
var previousNewFiber = null;
var oldFiber = currentFirstChild;
var lastPlacedIndex = 0;
var newIdx = 0;
var nextOldFiber = null;
var step = newChildren.next();
for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {
if (oldFiber.index > newIdx) {
nextOldFiber = oldFiber;
oldFiber = null;
} else {
nextOldFiber = oldFiber.sibling;
}
var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
if (newFiber === null) {
// TODO: This breaks on empty slots like null children. That's
// unfortunate because it triggers the slow path all the time. We need
// a better way to communicate whether this was a miss or null,
// boolean, undefined, etc.
if (oldFiber === null) {
oldFiber = nextOldFiber;
}
break;
}
if (shouldTrackSideEffects) {
if (oldFiber && newFiber.alternate === null) {
// We matched the slot, but we didn't reuse the existing fiber, so we
// need to delete the existing child.
deleteChild(returnFiber, oldFiber);
}
}
lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
if (previousNewFiber === null) {
// TODO: Move out of the loop. This only happens for the first run.
resultingFirstChild = newFiber;
} else {
// TODO: Defer siblings if we're not at the right index for this slot.
// I.e. if we had null values before, then we want to defer this
// for each null value. However, we also don't want to call updateSlot
// with the previous one.
previousNewFiber.sibling = newFiber;
}
previousNewFiber = newFiber;
oldFiber = nextOldFiber;
}
if (step.done) {
// We've reached the end of the new children. We can delete the rest.
deleteRemainingChildren(returnFiber, oldFiber);
if (getIsHydrating()) {
var numberOfForks = newIdx;
pushTreeFork(returnFiber, numberOfForks);
}
return resultingFirstChild;
}
if (oldFiber === null) {
// If we don't have any more existing children we can choose a fast path
// since the rest will all be insertions.
for (; !step.done; newIdx++, step = newChildren.next()) {
var _newFiber3 = createChild(returnFiber, step.value, lanes);
if (_newFiber3 === null) {
continue;
}
lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);
if (previousNewFiber === null) {
// TODO: Move out of the loop. This only happens for the first run.
resultingFirstChild = _newFiber3;
} else {
previousNewFiber.sibling = _newFiber3;
}
previousNewFiber = _newFiber3;
}
if (getIsHydrating()) {
var _numberOfForks3 = newIdx;
pushTreeFork(returnFiber, _numberOfForks3);
}
return resultingFirstChild;
} // Add all children to a key map for quick lookups.
var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
for (; !step.done; newIdx++, step = newChildren.next()) {
var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);
if (_newFiber4 !== null) {
if (shouldTrackSideEffects) {
if (_newFiber4.alternate !== null) {
// The new fiber is a work in progress, but if there exists a
// current, that means that we reused the fiber. We need to delete
// it from the child list so that we don't add it to the deletion
// list.
existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);
}
}
lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);
if (previousNewFiber === null) {
resultingFirstChild = _newFiber4;
} else {
previousNewFiber.sibling = _newFiber4;
}
previousNewFiber = _newFiber4;
}
}
if (shouldTrackSideEffects) {
// Any existing children that weren't consumed above were deleted. We need
// to add them to the deletion list.
existingChildren.forEach(function (child) {
return deleteChild(returnFiber, child);
});
}
if (getIsHydrating()) {
var _numberOfForks4 = newIdx;
pushTreeFork(returnFiber, _numberOfForks4);
}
return resultingFirstChild;
}
function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {
// There's no need to check for keys on text nodes since we don't have a
// way to define them.
if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
// We already have an existing node so let's just update it and delete
// the rest.
deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
var existing = useFiber(currentFirstChild, textContent);
existing.return = returnFiber;
return existing;
} // The existing first child is not a text node so we need to create one
// and delete the existing ones.
deleteRemainingChildren(returnFiber, currentFirstChild);
var created = createFiberFromText(textContent, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
}
function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {
var key = element.key;
var child = currentFirstChild;
while (child !== null) {
// TODO: If key === null and child.key === null, then this only applies to
// the first item in the list.
if (child.key === key) {
var elementType = element.type;
if (elementType === REACT_FRAGMENT_TYPE) {
if (child.tag === Fragment) {
deleteRemainingChildren(returnFiber, child.sibling);
var existing = useFiber(child, element.props.children);
existing.return = returnFiber;
{
existing._debugSource = element._source;
existing._debugOwner = element._owner;
}
return existing;
}
} else {
if (child.elementType === elementType || ( // Keep this check inline so it only runs on the false path:
isCompatibleFamilyForHotReloading(child, element) ) || // Lazy types should reconcile their resolved type.
// We need to do this after the Hot Reloading check above,
// because hot reloading has different semantics than prod because
// it doesn't resuspend. So we can't let the call below suspend.
typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === child.type) {
deleteRemainingChildren(returnFiber, child.sibling);
var _existing = useFiber(child, element.props);
_existing.ref = coerceRef(returnFiber, child, element);
_existing.return = returnFiber;
{
_existing._debugSource = element._source;
_existing._debugOwner = element._owner;
}
return _existing;
}
} // Didn't match.
deleteRemainingChildren(returnFiber, child);
break;
} else {
deleteChild(returnFiber, child);
}
child = child.sibling;
}
if (element.type === REACT_FRAGMENT_TYPE) {
var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);
created.return = returnFiber;
return created;
} else {
var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);
_created4.ref = coerceRef(returnFiber, currentFirstChild, element);
_created4.return = returnFiber;
return _created4;
}
}
function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {
var key = portal.key;
var child = currentFirstChild;
while (child !== null) {
// TODO: If key === null and child.key === null, then this only applies to
// the first item in the list.
if (child.key === key) {
if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {
deleteRemainingChildren(returnFiber, child.sibling);
var existing = useFiber(child, portal.children || []);
existing.return = returnFiber;
return existing;
} else {
deleteRemainingChildren(returnFiber, child);
break;
}
} else {
deleteChild(returnFiber, child);
}
child = child.sibling;
}
var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
} // This API will tag the children with the side-effect of the reconciliation
// itself. They will be added to the side-effect list as we pass through the
// children and the parent.
function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {
// This function is not recursive.
// If the top level item is an array, we treat it as a set of children,
// not as a fragment. Nested arrays on the other hand will be treated as
// fragment nodes. Recursion happens at the normal flow.
// Handle top level unkeyed fragments as if they were arrays.
// This leads to an ambiguity between <>{[...]}</> and <>...</>.
// We treat the ambiguous cases above the same.
var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;
if (isUnkeyedTopLevelFragment) {
newChild = newChild.props.children;
} // Handle object types
if (typeof newChild === 'object' && newChild !== null) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));
case REACT_PORTAL_TYPE:
return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));
case REACT_LAZY_TYPE:
var payload = newChild._payload;
var init = newChild._init; // TODO: This function is supposed to be non-recursive.
return reconcileChildFibers(returnFiber, currentFirstChild, init(payload), lanes);
}
if (isArray(newChild)) {
return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);
}
if (getIteratorFn(newChild)) {
return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);
}
throwOnInvalidObjectType(returnFiber, newChild);
}
if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {
return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));
}
{
if (typeof newChild === 'function') {
warnOnFunctionType(returnFiber);
}
} // Remaining cases are all treated as empty.
return deleteRemainingChildren(returnFiber, currentFirstChild);
}
return reconcileChildFibers;
}
var reconcileChildFibers = ChildReconciler(true);
var mountChildFibers = ChildReconciler(false);
function cloneChildFibers(current, workInProgress) {
if (current !== null && workInProgress.child !== current.child) {
throw new Error('Resuming work not yet implemented.');
}
if (workInProgress.child === null) {
return;
}
var currentChild = workInProgress.child;
var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);
workInProgress.child = newChild;
newChild.return = workInProgress;
while (currentChild.sibling !== null) {
currentChild = currentChild.sibling;
newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);
newChild.return = workInProgress;
}
newChild.sibling = null;
} // Reset a workInProgress child set to prepare it for a second pass.
function resetChildFibers(workInProgress, lanes) {
var child = workInProgress.child;
while (child !== null) {
resetWorkInProgress(child, lanes);
child = child.sibling;
}
}
var NO_CONTEXT = {};
var contextStackCursor$1 = createCursor(NO_CONTEXT);
var contextFiberStackCursor = createCursor(NO_CONTEXT);
var rootInstanceStackCursor = createCursor(NO_CONTEXT);
function requiredContext(c) {
if (c === NO_CONTEXT) {
throw new Error('Expected host context to exist. This error is likely caused by a bug ' + 'in React. Please file an issue.');
}
return c;
}
function getRootHostContainer() {
var rootInstance = requiredContext(rootInstanceStackCursor.current);
return rootInstance;
}
function pushHostContainer(fiber, nextRootInstance) {
// Push current root instance onto the stack;
// This allows us to reset root when portals are popped.
push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.
// This enables us to pop only Fibers that provide unique contexts.
push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.
// However, we can't just call getRootHostContext() and push it because
// we'd have a different number of entries on the stack depending on
// whether getRootHostContext() throws somewhere in renderer code or not.
// So we push an empty value first. This lets us safely unwind on errors.
push(contextStackCursor$1, NO_CONTEXT, fiber);
var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.
pop(contextStackCursor$1, fiber);
push(contextStackCursor$1, nextRootContext, fiber);
}
function popHostContainer(fiber) {
pop(contextStackCursor$1, fiber);
pop(contextFiberStackCursor, fiber);
pop(rootInstanceStackCursor, fiber);
}
function getHostContext() {
var context = requiredContext(contextStackCursor$1.current);
return context;
}
function pushHostContext(fiber) {
var rootInstance = requiredContext(rootInstanceStackCursor.current);
var context = requiredContext(contextStackCursor$1.current);
var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.
if (context === nextContext) {
return;
} // Track the context and the Fiber that provided it.
// This enables us to pop only Fibers that provide unique contexts.
push(contextFiberStackCursor, fiber, fiber);
push(contextStackCursor$1, nextContext, fiber);
}
function popHostContext(fiber) {
// Do not pop unless this Fiber provided the current context.
// pushHostContext() only pushes Fibers that provide unique contexts.
if (contextFiberStackCursor.current !== fiber) {
return;
}
pop(contextStackCursor$1, fiber);
pop(contextFiberStackCursor, fiber);
}
var DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is
// inherited deeply down the subtree. The upper bits only affect
// this immediate suspense boundary and gets reset each new
// boundary or suspense list.
var SubtreeSuspenseContextMask = 1; // Subtree Flags:
// InvisibleParentSuspenseContext indicates that one of our parent Suspense
// boundaries is not currently showing visible main content.
// Either because it is already showing a fallback or is not mounted at all.
// We can use this to determine if it is desirable to trigger a fallback at
// the parent. If not, then we might need to trigger undesirable boundaries
// and/or suspend the commit to avoid hiding the parent content.
var InvisibleParentSuspenseContext = 1; // Shallow Flags:
// ForceSuspenseFallback can be used by SuspenseList to force newly added
// items into their fallback state during one of the render passes.
var ForceSuspenseFallback = 2;
var suspenseStackCursor = createCursor(DefaultSuspenseContext);
function hasSuspenseContext(parentContext, flag) {
return (parentContext & flag) !== 0;
}
function setDefaultShallowSuspenseContext(parentContext) {
return parentContext & SubtreeSuspenseContextMask;
}
function setShallowSuspenseContext(parentContext, shallowContext) {
return parentContext & SubtreeSuspenseContextMask | shallowContext;
}
function addSubtreeSuspenseContext(parentContext, subtreeContext) {
return parentContext | subtreeContext;
}
function pushSuspenseContext(fiber, newContext) {
push(suspenseStackCursor, newContext, fiber);
}
function popSuspenseContext(fiber) {
pop(suspenseStackCursor, fiber);
}
function shouldCaptureSuspense(workInProgress, hasInvisibleParent) {
// If it was the primary children that just suspended, capture and render the
// fallback. Otherwise, don't capture and bubble to the next boundary.
var nextState = workInProgress.memoizedState;
if (nextState !== null) {
if (nextState.dehydrated !== null) {
// A dehydrated boundary always captures.
return true;
}
return false;
}
var props = workInProgress.memoizedProps; // Regular boundaries always capture.
{
return true;
} // If it's a boundary we should avoid, then we prefer to bubble up to the
}
function findFirstSuspended(row) {
var node = row;
while (node !== null) {
if (node.tag === SuspenseComponent) {
var state = node.memoizedState;
if (state !== null) {
var dehydrated = state.dehydrated;
if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {
return node;
}
}
} else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't
// keep track of whether it suspended or not.
node.memoizedProps.revealOrder !== undefined) {
var didSuspend = (node.flags & DidCapture) !== NoFlags;
if (didSuspend) {
return node;
}
} else if (node.child !== null) {
node.child.return = node;
node = node.child;
continue;
}
if (node === row) {
return null;
}
while (node.sibling === null) {
if (node.return === null || node.return === row) {
return null;
}
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
return null;
}
var NoFlags$1 =
/* */
0; // Represents whether effect should fire.
var HasEffect =
/* */
1; // Represents the phase in which the effect (not the clean-up) fires.
var Insertion =
/* */
2;
var Layout =
/* */
4;
var Passive$1 =
/* */
8;
// and should be reset before starting a new render.
// This tracks which mutable sources need to be reset after a render.
var workInProgressSources = [];
function resetWorkInProgressVersions() {
for (var i = 0; i < workInProgressSources.length; i++) {
var mutableSource = workInProgressSources[i];
{
mutableSource._workInProgressVersionPrimary = null;
}
}
workInProgressSources.length = 0;
}
// This ensures that the version used for server rendering matches the one
// that is eventually read during hydration.
// If they don't match there's a potential tear and a full deopt render is required.
function registerMutableSourceForHydration(root, mutableSource) {
var getVersion = mutableSource._getVersion;
var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.
// Retaining it forever may interfere with GC.
if (root.mutableSourceEagerHydrationData == null) {
root.mutableSourceEagerHydrationData = [mutableSource, version];
} else {
root.mutableSourceEagerHydrationData.push(mutableSource, version);
}
}
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig;
var didWarnAboutMismatchedHooksForComponent;
var didWarnUncachedGetSnapshot;
{
didWarnAboutMismatchedHooksForComponent = new Set();
}
// These are set right before calling the component.
var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from
// the work-in-progress hook.
var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The
// current hook list is the list that belongs to the current fiber. The
// work-in-progress hook list is a new list that will be added to the
// work-in-progress fiber.
var currentHook = null;
var workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This
// does not get reset if we do another render pass; only when we're completely
// finished evaluating this component. This is an optimization so we know
// whether we need to clear render phase updates after a throw.
var didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This
// gets reset after each attempt.
// TODO: Maybe there's some way to consolidate this with
// `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.
var didScheduleRenderPhaseUpdateDuringThisPass = false; // Counts the number of useId hooks in this component.
var localIdCounter = 0; // Used for ids that are generated completely client-side (i.e. not during
// hydration). This counter is global, so client ids are not stable across
// render attempts.
var globalClientIdCounter = 0;
var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook
var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.
// The list stores the order of hooks used during the initial render (mount).
// Subsequent renders (updates) reference this list.
var hookTypesDev = null;
var hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore
// the dependencies for Hooks that need them (e.g. useEffect or useMemo).
// When true, such Hooks will always be "remounted". Only used during hot reload.
var ignorePreviousDependencies = false;
function mountHookTypesDev() {
{
var hookName = currentHookNameInDev;
if (hookTypesDev === null) {
hookTypesDev = [hookName];
} else {
hookTypesDev.push(hookName);
}
}
}
function updateHookTypesDev() {
{
var hookName = currentHookNameInDev;
if (hookTypesDev !== null) {
hookTypesUpdateIndexDev++;
if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {
warnOnHookMismatchInDev(hookName);
}
}
}
}
function checkDepsAreArrayDev(deps) {
{
if (deps !== undefined && deps !== null && !isArray(deps)) {
// Verify deps, but only on mount to avoid extra checks.
// It's unlikely their type would change as usually you define them inline.
error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);
}
}
}
function warnOnHookMismatchInDev(currentHookName) {
{
var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1);
if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {
didWarnAboutMismatchedHooksForComponent.add(componentName);
if (hookTypesDev !== null) {
var table = '';
var secondColumnStart = 30;
for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {
var oldHookName = hookTypesDev[i];
var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;
var row = i + 1 + ". " + oldHookName; // Extra space so second column lines up
// lol @ IE not supporting String#repeat
while (row.length < secondColumnStart) {
row += ' ';
}
row += newHookName + '\n';
table += row;
}
error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table);
}
}
}
}
function throwInvalidHookError() {
throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');
}
function areHookInputsEqual(nextDeps, prevDeps) {
{
if (ignorePreviousDependencies) {
// Only true when this component is being hot reloaded.
return false;
}
}
if (prevDeps === null) {
{
error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);
}
return false;
}
{
// Don't bother comparing lengths in prod because these arrays should be
// passed inline.
if (nextDeps.length !== prevDeps.length) {
error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, "[" + prevDeps.join(', ') + "]", "[" + nextDeps.join(', ') + "]");
}
}
for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
if (objectIs(nextDeps[i], prevDeps[i])) {
continue;
}
return false;
}
return true;
}
function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {
renderLanes = nextRenderLanes;
currentlyRenderingFiber$1 = workInProgress;
{
hookTypesDev = current !== null ? current._debugHookTypes : null;
hookTypesUpdateIndexDev = -1; // Used for hot reloading:
ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;
}
workInProgress.memoizedState = null;
workInProgress.updateQueue = null;
workInProgress.lanes = NoLanes; // The following should have already been reset
// currentHook = null;
// workInProgressHook = null;
// didScheduleRenderPhaseUpdate = false;
// localIdCounter = 0;
// TODO Warn if no hooks are used at all during mount, then some are used during update.
// Currently we will identify the update render as a mount because memoizedState === null.
// This is tricky because it's valid for certain types of components (e.g. React.lazy)
// Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.
// Non-stateful hooks (e.g. context) don't get added to memoizedState,
// so memoizedState would be null during updates and mounts.
{
if (current !== null && current.memoizedState !== null) {
ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;
} else if (hookTypesDev !== null) {
// This dispatcher handles an edge case where a component is updating,
// but no stateful hooks have been used.
// We want to match the production code behavior (which will use HooksDispatcherOnMount),
// but with the extra DEV validation to ensure hooks ordering hasn't changed.
// This dispatcher does that.
ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;
} else {
ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;
}
}
var children = Component(props, secondArg); // Check if there was a render phase update
if (didScheduleRenderPhaseUpdateDuringThisPass) {
// Keep rendering in a loop for as long as render phase updates continue to
// be scheduled. Use a counter to prevent infinite loops.
var numberOfReRenders = 0;
do {
didScheduleRenderPhaseUpdateDuringThisPass = false;
localIdCounter = 0;
if (numberOfReRenders >= RE_RENDER_LIMIT) {
throw new Error('Too many re-renders. React limits the number of renders to prevent ' + 'an infinite loop.');
}
numberOfReRenders += 1;
{
// Even when hot reloading, allow dependencies to stabilize
// after first render to prevent infinite render phase updates.
ignorePreviousDependencies = false;
} // Start over from the beginning of the list
currentHook = null;
workInProgressHook = null;
workInProgress.updateQueue = null;
{
// Also validate hook order for cascading updates.
hookTypesUpdateIndexDev = -1;
}
ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV ;
children = Component(props, secondArg);
} while (didScheduleRenderPhaseUpdateDuringThisPass);
} // We can assume the previous dispatcher is always this one, since we set it
// at the beginning of the render phase and there's no re-entrance.
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
{
workInProgress._debugHookTypes = hookTypesDev;
} // This check uses currentHook so that it works the same in DEV and prod bundles.
// hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.
var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;
renderLanes = NoLanes;
currentlyRenderingFiber$1 = null;
currentHook = null;
workInProgressHook = null;
{
currentHookNameInDev = null;
hookTypesDev = null;
hookTypesUpdateIndexDev = -1; // Confirm that a static flag was not added or removed since the last
// render. If this fires, it suggests that we incorrectly reset the static
// flags in some other part of the codebase. This has happened before, for
// example, in the SuspenseList implementation.
if (current !== null && (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird
// and creates false positives. To make this work in legacy mode, we'd
// need to mark fibers that commit in an incomplete state, somehow. For
// now I'll disable the warning that most of the bugs that would trigger
// it are either exclusive to concurrent mode or exist in both.
(current.mode & ConcurrentMode) !== NoMode) {
error('Internal React error: Expected static flag was missing. Please ' + 'notify the React team.');
}
}
didScheduleRenderPhaseUpdate = false; // This is reset by checkDidRenderIdHook
// localIdCounter = 0;
if (didRenderTooFewHooks) {
throw new Error('Rendered fewer hooks than expected. This may be caused by an accidental ' + 'early return statement.');
}
return children;
}
function checkDidRenderIdHook() {
// This should be called immediately after every renderWithHooks call.
// Conceptually, it's part of the return value of renderWithHooks; it's only a
// separate function to avoid using an array tuple.
var didRenderIdHook = localIdCounter !== 0;
localIdCounter = 0;
return didRenderIdHook;
}
function bailoutHooks(current, workInProgress, lanes) {
workInProgress.updateQueue = current.updateQueue; // TODO: Don't need to reset the flags here, because they're reset in the
// complete phase (bubbleProperties).
if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {
workInProgress.flags &= ~(MountPassiveDev | MountLayoutDev | Passive | Update);
} else {
workInProgress.flags &= ~(Passive | Update);
}
current.lanes = removeLanes(current.lanes, lanes);
}
function resetHooksAfterThrow() {
// We can assume the previous dispatcher is always this one, since we set it
// at the beginning of the render phase and there's no re-entrance.
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
if (didScheduleRenderPhaseUpdate) {
// There were render phase updates. These are only valid for this render
// phase, which we are now aborting. Remove the updates from the queues so
// they do not persist to the next render. Do not remove updates from hooks
// that weren't processed.
//
// Only reset the updates from the queue if it has a clone. If it does
// not have a clone, that means it wasn't processed, and the updates were
// scheduled before we entered the render phase.
var hook = currentlyRenderingFiber$1.memoizedState;
while (hook !== null) {
var queue = hook.queue;
if (queue !== null) {
queue.pending = null;
}
hook = hook.next;
}
didScheduleRenderPhaseUpdate = false;
}
renderLanes = NoLanes;
currentlyRenderingFiber$1 = null;
currentHook = null;
workInProgressHook = null;
{
hookTypesDev = null;
hookTypesUpdateIndexDev = -1;
currentHookNameInDev = null;
isUpdatingOpaqueValueInRenderPhase = false;
}
didScheduleRenderPhaseUpdateDuringThisPass = false;
localIdCounter = 0;
}
function mountWorkInProgressHook() {
var hook = {
memoizedState: null,
baseState: null,
baseQueue: null,
queue: null,
next: null
};
if (workInProgressHook === null) {
// This is the first hook in the list
currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;
} else {
// Append to the end of the list
workInProgressHook = workInProgressHook.next = hook;
}
return workInProgressHook;
}
function updateWorkInProgressHook() {
// This function is used both for updates and for re-renders triggered by a
// render phase update. It assumes there is either a current hook we can
// clone, or a work-in-progress hook from a previous render pass that we can
// use as a base. When we reach the end of the base list, we must switch to
// the dispatcher used for mounts.
var nextCurrentHook;
if (currentHook === null) {
var current = currentlyRenderingFiber$1.alternate;
if (current !== null) {
nextCurrentHook = current.memoizedState;
} else {
nextCurrentHook = null;
}
} else {
nextCurrentHook = currentHook.next;
}
var nextWorkInProgressHook;
if (workInProgressHook === null) {
nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;
} else {
nextWorkInProgressHook = workInProgressHook.next;
}
if (nextWorkInProgressHook !== null) {
// There's already a work-in-progress. Reuse it.
workInProgressHook = nextWorkInProgressHook;
nextWorkInProgressHook = workInProgressHook.next;
currentHook = nextCurrentHook;
} else {
// Clone from the current hook.
if (nextCurrentHook === null) {
throw new Error('Rendered more hooks than during the previous render.');
}
currentHook = nextCurrentHook;
var newHook = {
memoizedState: currentHook.memoizedState,
baseState: currentHook.baseState,
baseQueue: currentHook.baseQueue,
queue: currentHook.queue,
next: null
};
if (workInProgressHook === null) {
// This is the first hook in the list.
currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;
} else {
// Append to the end of the list.
workInProgressHook = workInProgressHook.next = newHook;
}
}
return workInProgressHook;
}
function createFunctionComponentUpdateQueue() {
return {
lastEffect: null,
stores: null
};
}
function basicStateReducer(state, action) {
// $FlowFixMe: Flow doesn't like mixed types
return typeof action === 'function' ? action(state) : action;
}
function mountReducer(reducer, initialArg, init) {
var hook = mountWorkInProgressHook();
var initialState;
if (init !== undefined) {
initialState = init(initialArg);
} else {
initialState = initialArg;
}
hook.memoizedState = hook.baseState = initialState;
var queue = {
pending: null,
interleaved: null,
lanes: NoLanes,
dispatch: null,
lastRenderedReducer: reducer,
lastRenderedState: initialState
};
hook.queue = queue;
var dispatch = queue.dispatch = dispatchReducerAction.bind(null, currentlyRenderingFiber$1, queue);
return [hook.memoizedState, dispatch];
}
function updateReducer(reducer, initialArg, init) {
var hook = updateWorkInProgressHook();
var queue = hook.queue;
if (queue === null) {
throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');
}
queue.lastRenderedReducer = reducer;
var current = currentHook; // The last rebase update that is NOT part of the base state.
var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet.
var pendingQueue = queue.pending;
if (pendingQueue !== null) {
// We have new updates that haven't been processed yet.
// We'll add them to the base queue.
if (baseQueue !== null) {
// Merge the pending queue and the base queue.
var baseFirst = baseQueue.next;
var pendingFirst = pendingQueue.next;
baseQueue.next = pendingFirst;
pendingQueue.next = baseFirst;
}
{
if (current.baseQueue !== baseQueue) {
// Internal invariant that should never happen, but feasibly could in
// the future if we implement resuming, or some form of that.
error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');
}
}
current.baseQueue = baseQueue = pendingQueue;
queue.pending = null;
}
if (baseQueue !== null) {
// We have a queue to process.
var first = baseQueue.next;
var newState = current.baseState;
var newBaseState = null;
var newBaseQueueFirst = null;
var newBaseQueueLast = null;
var update = first;
do {
var updateLane = update.lane;
if (!isSubsetOfLanes(renderLanes, updateLane)) {
// Priority is insufficient. Skip this update. If this is the first
// skipped update, the previous update/state is the new base
// update/state.
var clone = {
lane: updateLane,
action: update.action,
hasEagerState: update.hasEagerState,
eagerState: update.eagerState,
next: null
};
if (newBaseQueueLast === null) {
newBaseQueueFirst = newBaseQueueLast = clone;
newBaseState = newState;
} else {
newBaseQueueLast = newBaseQueueLast.next = clone;
} // Update the remaining priority in the queue.
// TODO: Don't need to accumulate this. Instead, we can remove
// renderLanes from the original lanes.
currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);
markSkippedUpdateLanes(updateLane);
} else {
// This update does have sufficient priority.
if (newBaseQueueLast !== null) {
var _clone = {
// This update is going to be committed so we never want uncommit
// it. Using NoLane works because 0 is a subset of all bitmasks, so
// this will never be skipped by the check above.
lane: NoLane,
action: update.action,
hasEagerState: update.hasEagerState,
eagerState: update.eagerState,
next: null
};
newBaseQueueLast = newBaseQueueLast.next = _clone;
} // Process this update.
if (update.hasEagerState) {
// If this update is a state update (not a reducer) and was processed eagerly,
// we can use the eagerly computed state
newState = update.eagerState;
} else {
var action = update.action;
newState = reducer(newState, action);
}
}
update = update.next;
} while (update !== null && update !== first);
if (newBaseQueueLast === null) {
newBaseState = newState;
} else {
newBaseQueueLast.next = newBaseQueueFirst;
} // Mark that the fiber performed work, but only if the new state is
// different from the current state.
if (!objectIs(newState, hook.memoizedState)) {
markWorkInProgressReceivedUpdate();
}
hook.memoizedState = newState;
hook.baseState = newBaseState;
hook.baseQueue = newBaseQueueLast;
queue.lastRenderedState = newState;
} // Interleaved updates are stored on a separate queue. We aren't going to
// process them during this render, but we do need to track which lanes
// are remaining.
var lastInterleaved = queue.interleaved;
if (lastInterleaved !== null) {
var interleaved = lastInterleaved;
do {
var interleavedLane = interleaved.lane;
currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, interleavedLane);
markSkippedUpdateLanes(interleavedLane);
interleaved = interleaved.next;
} while (interleaved !== lastInterleaved);
} else if (baseQueue === null) {
// `queue.lanes` is used for entangling transitions. We can set it back to
// zero once the queue is empty.
queue.lanes = NoLanes;
}
var dispatch = queue.dispatch;
return [hook.memoizedState, dispatch];
}
function rerenderReducer(reducer, initialArg, init) {
var hook = updateWorkInProgressHook();
var queue = hook.queue;
if (queue === null) {
throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');
}
queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous
// work-in-progress hook.
var dispatch = queue.dispatch;
var lastRenderPhaseUpdate = queue.pending;
var newState = hook.memoizedState;
if (lastRenderPhaseUpdate !== null) {
// The queue doesn't persist past this render pass.
queue.pending = null;
var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;
var update = firstRenderPhaseUpdate;
do {
// Process this render phase update. We don't have to check the
// priority because it will always be the same as the current
// render's.
var action = update.action;
newState = reducer(newState, action);
update = update.next;
} while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is
// different from the current state.
if (!objectIs(newState, hook.memoizedState)) {
markWorkInProgressReceivedUpdate();
}
hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to
// the base state unless the queue is empty.
// TODO: Not sure if this is the desired semantics, but it's what we
// do for gDSFP. I can't remember why.
if (hook.baseQueue === null) {
hook.baseState = newState;
}
queue.lastRenderedState = newState;
}
return [newState, dispatch];
}
function mountMutableSource(source, getSnapshot, subscribe) {
{
return undefined;
}
}
function updateMutableSource(source, getSnapshot, subscribe) {
{
return undefined;
}
}
function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber$1;
var hook = mountWorkInProgressHook();
var nextSnapshot;
var isHydrating = getIsHydrating();
if (isHydrating) {
if (getServerSnapshot === undefined) {
throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.');
}
nextSnapshot = getServerSnapshot();
{
if (!didWarnUncachedGetSnapshot) {
if (nextSnapshot !== getServerSnapshot()) {
error('The result of getServerSnapshot should be cached to avoid an infinite loop');
didWarnUncachedGetSnapshot = true;
}
}
}
} else {
nextSnapshot = getSnapshot();
{
if (!didWarnUncachedGetSnapshot) {
var cachedSnapshot = getSnapshot();
if (!objectIs(nextSnapshot, cachedSnapshot)) {
error('The result of getSnapshot should be cached to avoid an infinite loop');
didWarnUncachedGetSnapshot = true;
}
}
} // Unless we're rendering a blocking lane, schedule a consistency check.
// Right before committing, we will walk the tree and check if any of the
// stores were mutated.
//
// We won't do this if we're hydrating server-rendered content, because if
// the content is stale, it's already visible anyway. Instead we'll patch
// it up in a passive effect.
var root = getWorkInProgressRoot();
if (root === null) {
throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');
}
if (!includesBlockingLane(root, renderLanes)) {
pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
}
} // Read the current snapshot from the store on every render. This breaks the
// normal rules of React, and only works because store updates are
// always synchronous.
hook.memoizedState = nextSnapshot;
var inst = {
value: nextSnapshot,
getSnapshot: getSnapshot
};
hook.queue = inst; // Schedule an effect to subscribe to the store.
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Schedule an effect to update the mutable instance fields. We will update
// this whenever subscribe, getSnapshot, or value changes. Because there's no
// clean-up function, and we track the deps correctly, we can call pushEffect
// directly, without storing any additional state. For the same reason, we
// don't need to set a static flag, either.
// TODO: We can move this to the passive phase once we add a pre-commit
// consistency check. See the next comment.
fiber.flags |= Passive;
pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), undefined, null);
return nextSnapshot;
}
function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber$1;
var hook = updateWorkInProgressHook(); // Read the current snapshot from the store on every render. This breaks the
// normal rules of React, and only works because store updates are
// always synchronous.
var nextSnapshot = getSnapshot();
{
if (!didWarnUncachedGetSnapshot) {
var cachedSnapshot = getSnapshot();
if (!objectIs(nextSnapshot, cachedSnapshot)) {
error('The result of getSnapshot should be cached to avoid an infinite loop');
didWarnUncachedGetSnapshot = true;
}
}
}
var prevSnapshot = hook.memoizedState;
var snapshotChanged = !objectIs(prevSnapshot, nextSnapshot);
if (snapshotChanged) {
hook.memoizedState = nextSnapshot;
markWorkInProgressReceivedUpdate();
}
var inst = hook.queue;
updateEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Whenever getSnapshot or subscribe changes, we need to check in the
// commit phase if there was an interleaved mutation. In concurrent mode
// this can happen all the time, but even in synchronous mode, an earlier
// effect may have mutated the store.
if (inst.getSnapshot !== getSnapshot || snapshotChanged || // Check if the susbcribe function changed. We can save some memory by
// checking whether we scheduled a subscription effect above.
workInProgressHook !== null && workInProgressHook.memoizedState.tag & HasEffect) {
fiber.flags |= Passive;
pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), undefined, null); // Unless we're rendering a blocking lane, schedule a consistency check.
// Right before committing, we will walk the tree and check if any of the
// stores were mutated.
var root = getWorkInProgressRoot();
if (root === null) {
throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');
}
if (!includesBlockingLane(root, renderLanes)) {
pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
}
}
return nextSnapshot;
}
function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {
fiber.flags |= StoreConsistency;
var check = {
getSnapshot: getSnapshot,
value: renderedSnapshot
};
var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;
if (componentUpdateQueue === null) {
componentUpdateQueue = createFunctionComponentUpdateQueue();
currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;
componentUpdateQueue.stores = [check];
} else {
var stores = componentUpdateQueue.stores;
if (stores === null) {
componentUpdateQueue.stores = [check];
} else {
stores.push(check);
}
}
}
function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {
// These are updated in the passive phase
inst.value = nextSnapshot;
inst.getSnapshot = getSnapshot; // Something may have been mutated in between render and commit. This could
// have been in an event that fired before the passive effects, or it could
// have been in a layout effect. In that case, we would have used the old
// snapsho and getSnapshot values to bail out. We need to check one more time.
if (checkIfSnapshotChanged(inst)) {
// Force a re-render.
forceStoreRerender(fiber);
}
}
function subscribeToStore(fiber, inst, subscribe) {
var handleStoreChange = function () {
// The store changed. Check if the snapshot changed since the last time we
// read from the store.
if (checkIfSnapshotChanged(inst)) {
// Force a re-render.
forceStoreRerender(fiber);
}
}; // Subscribe to the store and return a clean-up function.
return subscribe(handleStoreChange);
}
function checkIfSnapshotChanged(inst) {
var latestGetSnapshot = inst.getSnapshot;
var prevValue = inst.value;
try {
var nextValue = latestGetSnapshot();
return !objectIs(prevValue, nextValue);
} catch (error) {
return true;
}
}
function forceStoreRerender(fiber) {
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
}
}
function mountState(initialState) {
var hook = mountWorkInProgressHook();
if (typeof initialState === 'function') {
// $FlowFixMe: Flow doesn't like mixed types
initialState = initialState();
}
hook.memoizedState = hook.baseState = initialState;
var queue = {
pending: null,
interleaved: null,
lanes: NoLanes,
dispatch: null,
lastRenderedReducer: basicStateReducer,
lastRenderedState: initialState
};
hook.queue = queue;
var dispatch = queue.dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue);
return [hook.memoizedState, dispatch];
}
function updateState(initialState) {
return updateReducer(basicStateReducer);
}
function rerenderState(initialState) {
return rerenderReducer(basicStateReducer);
}
function pushEffect(tag, create, destroy, deps) {
var effect = {
tag: tag,
create: create,
destroy: destroy,
deps: deps,
// Circular
next: null
};
var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;
if (componentUpdateQueue === null) {
componentUpdateQueue = createFunctionComponentUpdateQueue();
currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;
componentUpdateQueue.lastEffect = effect.next = effect;
} else {
var lastEffect = componentUpdateQueue.lastEffect;
if (lastEffect === null) {
componentUpdateQueue.lastEffect = effect.next = effect;
} else {
var firstEffect = lastEffect.next;
lastEffect.next = effect;
effect.next = firstEffect;
componentUpdateQueue.lastEffect = effect;
}
}
return effect;
}
function mountRef(initialValue) {
var hook = mountWorkInProgressHook();
{
var _ref2 = {
current: initialValue
};
hook.memoizedState = _ref2;
return _ref2;
}
}
function updateRef(initialValue) {
var hook = updateWorkInProgressHook();
return hook.memoizedState;
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
var hook = mountWorkInProgressHook();
var nextDeps = deps === undefined ? null : deps;
currentlyRenderingFiber$1.flags |= fiberFlags;
hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
var hook = updateWorkInProgressHook();
var nextDeps = deps === undefined ? null : deps;
var destroy = undefined;
if (currentHook !== null) {
var prevEffect = currentHook.memoizedState;
destroy = prevEffect.destroy;
if (nextDeps !== null) {
var prevDeps = prevEffect.deps;
if (areHookInputsEqual(nextDeps, prevDeps)) {
hook.memoizedState = pushEffect(hookFlags, create, destroy, nextDeps);
return;
}
}
}
currentlyRenderingFiber$1.flags |= fiberFlags;
hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps);
}
function mountEffect(create, deps) {
if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {
return mountEffectImpl(MountPassiveDev | Passive | PassiveStatic, Passive$1, create, deps);
} else {
return mountEffectImpl(Passive | PassiveStatic, Passive$1, create, deps);
}
}
function updateEffect(create, deps) {
return updateEffectImpl(Passive, Passive$1, create, deps);
}
function mountInsertionEffect(create, deps) {
return mountEffectImpl(Update, Insertion, create, deps);
}
function updateInsertionEffect(create, deps) {
return updateEffectImpl(Update, Insertion, create, deps);
}
function mountLayoutEffect(create, deps) {
var fiberFlags = Update;
{
fiberFlags |= LayoutStatic;
}
if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {
fiberFlags |= MountLayoutDev;
}
return mountEffectImpl(fiberFlags, Layout, create, deps);
}
function updateLayoutEffect(create, deps) {
return updateEffectImpl(Update, Layout, create, deps);
}
function imperativeHandleEffect(create, ref) {
if (typeof ref === 'function') {
var refCallback = ref;
var _inst = create();
refCallback(_inst);
return function () {
refCallback(null);
};
} else if (ref !== null && ref !== undefined) {
var refObject = ref;
{
if (!refObject.hasOwnProperty('current')) {
error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');
}
}
var _inst2 = create();
refObject.current = _inst2;
return function () {
refObject.current = null;
};
}
}
function mountImperativeHandle(ref, create, deps) {
{
if (typeof create !== 'function') {
error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
}
} // TODO: If deps are provided, should we skip comparing the ref itself?
var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
var fiberFlags = Update;
{
fiberFlags |= LayoutStatic;
}
if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {
fiberFlags |= MountLayoutDev;
}
return mountEffectImpl(fiberFlags, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
}
function updateImperativeHandle(ref, create, deps) {
{
if (typeof create !== 'function') {
error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
}
} // TODO: If deps are provided, should we skip comparing the ref itself?
var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
}
function mountDebugValue(value, formatterFn) {// This hook is normally a no-op.
// The react-debug-hooks package injects its own implementation
// so that e.g. DevTools can display custom hook values.
}
var updateDebugValue = mountDebugValue;
function mountCallback(callback, deps) {
var hook = mountWorkInProgressHook();
var nextDeps = deps === undefined ? null : deps;
hook.memoizedState = [callback, nextDeps];
return callback;
}
function updateCallback(callback, deps) {
var hook = updateWorkInProgressHook();
var nextDeps = deps === undefined ? null : deps;
var prevState = hook.memoizedState;
if (prevState !== null) {
if (nextDeps !== null) {
var prevDeps = prevState[1];
if (areHookInputsEqual(nextDeps, prevDeps)) {
return prevState[0];
}
}
}
hook.memoizedState = [callback, nextDeps];
return callback;
}
function mountMemo(nextCreate, deps) {
var hook = mountWorkInProgressHook();
var nextDeps = deps === undefined ? null : deps;
var nextValue = nextCreate();
hook.memoizedState = [nextValue, nextDeps];
return nextValue;
}
function updateMemo(nextCreate, deps) {
var hook = updateWorkInProgressHook();
var nextDeps = deps === undefined ? null : deps;
var prevState = hook.memoizedState;
if (prevState !== null) {
// Assume these are defined. If they're not, areHookInputsEqual will warn.
if (nextDeps !== null) {
var prevDeps = prevState[1];
if (areHookInputsEqual(nextDeps, prevDeps)) {
return prevState[0];
}
}
}
var nextValue = nextCreate();
hook.memoizedState = [nextValue, nextDeps];
return nextValue;
}
function mountDeferredValue(value) {
var hook = mountWorkInProgressHook();
hook.memoizedState = value;
return value;
}
function updateDeferredValue(value) {
var hook = updateWorkInProgressHook();
var resolvedCurrentHook = currentHook;
var prevValue = resolvedCurrentHook.memoizedState;
return updateDeferredValueImpl(hook, prevValue, value);
}
function rerenderDeferredValue(value) {
var hook = updateWorkInProgressHook();
if (currentHook === null) {
// This is a rerender during a mount.
hook.memoizedState = value;
return value;
} else {
// This is a rerender during an update.
var prevValue = currentHook.memoizedState;
return updateDeferredValueImpl(hook, prevValue, value);
}
}
function updateDeferredValueImpl(hook, prevValue, value) {
var shouldDeferValue = !includesOnlyNonUrgentLanes(renderLanes);
if (shouldDeferValue) {
// This is an urgent update. If the value has changed, keep using the
// previous value and spawn a deferred render to update it later.
if (!objectIs(value, prevValue)) {
// Schedule a deferred render
var deferredLane = claimNextTransitionLane();
currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, deferredLane);
markSkippedUpdateLanes(deferredLane); // Set this to true to indicate that the rendered value is inconsistent
// from the latest value. The name "baseState" doesn't really match how we
// use it because we're reusing a state hook field instead of creating a
// new one.
hook.baseState = true;
} // Reuse the previous value
return prevValue;
} else {
// This is not an urgent update, so we can use the latest value regardless
// of what it is. No need to defer it.
// However, if we're currently inside a spawned render, then we need to mark
// this as an update to prevent the fiber from bailing out.
//
// `baseState` is true when the current value is different from the rendered
// value. The name doesn't really match how we use it because we're reusing
// a state hook field instead of creating a new one.
if (hook.baseState) {
// Flip this back to false.
hook.baseState = false;
markWorkInProgressReceivedUpdate();
}
hook.memoizedState = value;
return value;
}
}
function startTransition(setPending, callback, options) {
var previousPriority = getCurrentUpdatePriority();
setCurrentUpdatePriority(higherEventPriority(previousPriority, ContinuousEventPriority));
setPending(true);
var prevTransition = ReactCurrentBatchConfig$2.transition;
ReactCurrentBatchConfig$2.transition = {};
var currentTransition = ReactCurrentBatchConfig$2.transition;
{
ReactCurrentBatchConfig$2.transition._updatedFibers = new Set();
}
try {
setPending(false);
callback();
} finally {
setCurrentUpdatePriority(previousPriority);
ReactCurrentBatchConfig$2.transition = prevTransition;
{
if (prevTransition === null && currentTransition._updatedFibers) {
var updatedFibersCount = currentTransition._updatedFibers.size;
if (updatedFibersCount > 10) {
warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');
}
currentTransition._updatedFibers.clear();
}
}
}
}
function mountTransition() {
var _mountState = mountState(false),
isPending = _mountState[0],
setPending = _mountState[1]; // The `start` method never changes.
var start = startTransition.bind(null, setPending);
var hook = mountWorkInProgressHook();
hook.memoizedState = start;
return [isPending, start];
}
function updateTransition() {
var _updateState = updateState(),
isPending = _updateState[0];
var hook = updateWorkInProgressHook();
var start = hook.memoizedState;
return [isPending, start];
}
function rerenderTransition() {
var _rerenderState = rerenderState(),
isPending = _rerenderState[0];
var hook = updateWorkInProgressHook();
var start = hook.memoizedState;
return [isPending, start];
}
var isUpdatingOpaqueValueInRenderPhase = false;
function getIsUpdatingOpaqueValueInRenderPhaseInDEV() {
{
return isUpdatingOpaqueValueInRenderPhase;
}
}
function mountId() {
var hook = mountWorkInProgressHook();
var root = getWorkInProgressRoot(); // TODO: In Fizz, id generation is specific to each server config. Maybe we
// should do this in Fiber, too? Deferring this decision for now because
// there's no other place to store the prefix except for an internal field on
// the public createRoot object, which the fiber tree does not currently have
// a reference to.
var identifierPrefix = root.identifierPrefix;
var id;
if (getIsHydrating()) {
var treeId = getTreeId(); // Use a captial R prefix for server-generated ids.
id = ':' + identifierPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end
// that represents the position of this useId hook among all the useId
// hooks for this fiber.
var localId = localIdCounter++;
if (localId > 0) {
id += 'H' + localId.toString(32);
}
id += ':';
} else {
// Use a lowercase r prefix for client-generated ids.
var globalClientId = globalClientIdCounter++;
id = ':' + identifierPrefix + 'r' + globalClientId.toString(32) + ':';
}
hook.memoizedState = id;
return id;
}
function updateId() {
var hook = updateWorkInProgressHook();
var id = hook.memoizedState;
return id;
}
function dispatchReducerAction(fiber, queue, action) {
{
if (typeof arguments[3] === 'function') {
error("State updates from the useState() and useReducer() Hooks don't support the " + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');
}
}
var lane = requestUpdateLane(fiber);
var update = {
lane: lane,
action: action,
hasEagerState: false,
eagerState: null,
next: null
};
if (isRenderPhaseUpdate(fiber)) {
enqueueRenderPhaseUpdate(queue, update);
} else {
var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
if (root !== null) {
var eventTime = requestEventTime();
scheduleUpdateOnFiber(root, fiber, lane, eventTime);
entangleTransitionUpdate(root, queue, lane);
}
}
markUpdateInDevTools(fiber, lane);
}
function dispatchSetState(fiber, queue, action) {
{
if (typeof arguments[3] === 'function') {
error("State updates from the useState() and useReducer() Hooks don't support the " + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');
}
}
var lane = requestUpdateLane(fiber);
var update = {
lane: lane,
action: action,
hasEagerState: false,
eagerState: null,
next: null
};
if (isRenderPhaseUpdate(fiber)) {
enqueueRenderPhaseUpdate(queue, update);
} else {
var alternate = fiber.alternate;
if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {
// The queue is currently empty, which means we can eagerly compute the
// next state before entering the render phase. If the new state is the
// same as the current state, we may be able to bail out entirely.
var lastRenderedReducer = queue.lastRenderedReducer;
if (lastRenderedReducer !== null) {
var prevDispatcher;
{
prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
}
try {
var currentState = queue.lastRenderedState;
var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute
// it, on the update object. If the reducer hasn't changed by the
// time we enter the render phase, then the eager state can be used
// without calling the reducer again.
update.hasEagerState = true;
update.eagerState = eagerState;
if (objectIs(eagerState, currentState)) {
// Fast path. We can bail out without scheduling React to re-render.
// It's still possible that we'll need to rebase this update later,
// if the component re-renders for a different reason and by that
// time the reducer has changed.
// TODO: Do we still need to entangle transitions in this case?
enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update, lane);
return;
}
} catch (error) {// Suppress the error. It will throw again in the render phase.
} finally {
{
ReactCurrentDispatcher$1.current = prevDispatcher;
}
}
}
}
var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
if (root !== null) {
var eventTime = requestEventTime();
scheduleUpdateOnFiber(root, fiber, lane, eventTime);
entangleTransitionUpdate(root, queue, lane);
}
}
markUpdateInDevTools(fiber, lane);
}
function isRenderPhaseUpdate(fiber) {
var alternate = fiber.alternate;
return fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1;
}
function enqueueRenderPhaseUpdate(queue, update) {
// This is a render phase update. Stash it in a lazily-created map of
// queue -> linked list of updates. After this render pass, we'll restart
// and apply the stashed updates on top of the work-in-progress hook.
didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;
var pending = queue.pending;
if (pending === null) {
// This is the first update. Create a circular list.
update.next = update;
} else {
update.next = pending.next;
pending.next = update;
}
queue.pending = update;
} // TODO: Move to ReactFiberConcurrentUpdates?
function entangleTransitionUpdate(root, queue, lane) {
if (isTransitionLane(lane)) {
var queueLanes = queue.lanes; // If any entangled lanes are no longer pending on the root, then they
// must have finished. We can remove them from the shared queue, which
// represents a superset of the actually pending lanes. In some cases we
// may entangle more than we need to, but that's OK. In fact it's worse if
// we *don't* entangle when we should.
queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.
var newQueueLanes = mergeLanes(queueLanes, lane);
queue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if
// the lane finished since the last time we entangled it. So we need to
// entangle it again, just to be sure.
markRootEntangled(root, newQueueLanes);
}
}
function markUpdateInDevTools(fiber, lane, action) {
{
markStateUpdateScheduled(fiber, lane);
}
}
var ContextOnlyDispatcher = {
readContext: readContext,
useCallback: throwInvalidHookError,
useContext: throwInvalidHookError,
useEffect: throwInvalidHookError,
useImperativeHandle: throwInvalidHookError,
useInsertionEffect: throwInvalidHookError,
useLayoutEffect: throwInvalidHookError,
useMemo: throwInvalidHookError,
useReducer: throwInvalidHookError,
useRef: throwInvalidHookError,
useState: throwInvalidHookError,
useDebugValue: throwInvalidHookError,
useDeferredValue: throwInvalidHookError,
useTransition: throwInvalidHookError,
useMutableSource: throwInvalidHookError,
useSyncExternalStore: throwInvalidHookError,
useId: throwInvalidHookError,
unstable_isNewReconciler: enableNewReconciler
};
var HooksDispatcherOnMountInDEV = null;
var HooksDispatcherOnMountWithHookTypesInDEV = null;
var HooksDispatcherOnUpdateInDEV = null;
var HooksDispatcherOnRerenderInDEV = null;
var InvalidNestedHooksDispatcherOnMountInDEV = null;
var InvalidNestedHooksDispatcherOnUpdateInDEV = null;
var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
{
var warnInvalidContextAccess = function () {
error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
};
var warnInvalidHookAccess = function () {
error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');
};
HooksDispatcherOnMountInDEV = {
readContext: function (context) {
return readContext(context);
},
useCallback: function (callback, deps) {
currentHookNameInDev = 'useCallback';
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountCallback(callback, deps);
},
useContext: function (context) {
currentHookNameInDev = 'useContext';
mountHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
currentHookNameInDev = 'useEffect';
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountEffect(create, deps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = 'useImperativeHandle';
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountImperativeHandle(ref, create, deps);
},
useInsertionEffect: function (create, deps) {
currentHookNameInDev = 'useInsertionEffect';
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountInsertionEffect(create, deps);
},
useLayoutEffect: function (create, deps) {
currentHookNameInDev = 'useLayoutEffect';
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountLayoutEffect(create, deps);
},
useMemo: function (create, deps) {
currentHookNameInDev = 'useMemo';
mountHookTypesDev();
checkDepsAreArrayDev(deps);
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
mountHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer, initialArg, init);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
currentHookNameInDev = 'useRef';
mountHookTypesDev();
return mountRef(initialValue);
},
useState: function (initialState) {
currentHookNameInDev = 'useState';
mountHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
currentHookNameInDev = 'useDebugValue';
mountHookTypesDev();
return mountDebugValue();
},
useDeferredValue: function (value) {
currentHookNameInDev = 'useDeferredValue';
mountHookTypesDev();
return mountDeferredValue(value);
},
useTransition: function () {
currentHookNameInDev = 'useTransition';
mountHookTypesDev();
return mountTransition();
},
useMutableSource: function (source, getSnapshot, subscribe) {
currentHookNameInDev = 'useMutableSource';
mountHookTypesDev();
return mountMutableSource();
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
currentHookNameInDev = 'useSyncExternalStore';
mountHookTypesDev();
return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
},
useId: function () {
currentHookNameInDev = 'useId';
mountHookTypesDev();
return mountId();
},
unstable_isNewReconciler: enableNewReconciler
};
HooksDispatcherOnMountWithHookTypesInDEV = {
readContext: function (context) {
return readContext(context);
},
useCallback: function (callback, deps) {
currentHookNameInDev = 'useCallback';
updateHookTypesDev();
return mountCallback(callback, deps);
},
useContext: function (context) {
currentHookNameInDev = 'useContext';
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
currentHookNameInDev = 'useEffect';
updateHookTypesDev();
return mountEffect(create, deps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = 'useImperativeHandle';
updateHookTypesDev();
return mountImperativeHandle(ref, create, deps);
},
useInsertionEffect: function (create, deps) {
currentHookNameInDev = 'useInsertionEffect';
updateHookTypesDev();
return mountInsertionEffect(create, deps);
},
useLayoutEffect: function (create, deps) {
currentHookNameInDev = 'useLayoutEffect';
updateHookTypesDev();
return mountLayoutEffect(create, deps);
},
useMemo: function (create, deps) {
currentHookNameInDev = 'useMemo';
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer, initialArg, init);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
currentHookNameInDev = 'useRef';
updateHookTypesDev();
return mountRef(initialValue);
},
useState: function (initialState) {
currentHookNameInDev = 'useState';
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
currentHookNameInDev = 'useDebugValue';
updateHookTypesDev();
return mountDebugValue();
},
useDeferredValue: function (value) {
currentHookNameInDev = 'useDeferredValue';
updateHookTypesDev();
return mountDeferredValue(value);
},
useTransition: function () {
currentHookNameInDev = 'useTransition';
updateHookTypesDev();
return mountTransition();
},
useMutableSource: function (source, getSnapshot, subscribe) {
currentHookNameInDev = 'useMutableSource';
updateHookTypesDev();
return mountMutableSource();
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
currentHookNameInDev = 'useSyncExternalStore';
updateHookTypesDev();
return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
},
useId: function () {
currentHookNameInDev = 'useId';
updateHookTypesDev();
return mountId();
},
unstable_isNewReconciler: enableNewReconciler
};
HooksDispatcherOnUpdateInDEV = {
readContext: function (context) {
return readContext(context);
},
useCallback: function (callback, deps) {
currentHookNameInDev = 'useCallback';
updateHookTypesDev();
return updateCallback(callback, deps);
},
useContext: function (context) {
currentHookNameInDev = 'useContext';
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
currentHookNameInDev = 'useEffect';
updateHookTypesDev();
return updateEffect(create, deps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = 'useImperativeHandle';
updateHookTypesDev();
return updateImperativeHandle(ref, create, deps);
},
useInsertionEffect: function (create, deps) {
currentHookNameInDev = 'useInsertionEffect';
updateHookTypesDev();
return updateInsertionEffect(create, deps);
},
useLayoutEffect: function (create, deps) {
currentHookNameInDev = 'useLayoutEffect';
updateHookTypesDev();
return updateLayoutEffect(create, deps);
},
useMemo: function (create, deps) {
currentHookNameInDev = 'useMemo';
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateMemo(create, deps);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateReducer(reducer, initialArg, init);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
currentHookNameInDev = 'useRef';
updateHookTypesDev();
return updateRef();
},
useState: function (initialState) {
currentHookNameInDev = 'useState';
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateState(initialState);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
currentHookNameInDev = 'useDebugValue';
updateHookTypesDev();
return updateDebugValue();
},
useDeferredValue: function (value) {
currentHookNameInDev = 'useDeferredValue';
updateHookTypesDev();
return updateDeferredValue(value);
},
useTransition: function () {
currentHookNameInDev = 'useTransition';
updateHookTypesDev();
return updateTransition();
},
useMutableSource: function (source, getSnapshot, subscribe) {
currentHookNameInDev = 'useMutableSource';
updateHookTypesDev();
return updateMutableSource();
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
currentHookNameInDev = 'useSyncExternalStore';
updateHookTypesDev();
return updateSyncExternalStore(subscribe, getSnapshot);
},
useId: function () {
currentHookNameInDev = 'useId';
updateHookTypesDev();
return updateId();
},
unstable_isNewReconciler: enableNewReconciler
};
HooksDispatcherOnRerenderInDEV = {
readContext: function (context) {
return readContext(context);
},
useCallback: function (callback, deps) {
currentHookNameInDev = 'useCallback';
updateHookTypesDev();
return updateCallback(callback, deps);
},
useContext: function (context) {
currentHookNameInDev = 'useContext';
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
currentHookNameInDev = 'useEffect';
updateHookTypesDev();
return updateEffect(create, deps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = 'useImperativeHandle';
updateHookTypesDev();
return updateImperativeHandle(ref, create, deps);
},
useInsertionEffect: function (create, deps) {
currentHookNameInDev = 'useInsertionEffect';
updateHookTypesDev();
return updateInsertionEffect(create, deps);
},
useLayoutEffect: function (create, deps) {
currentHookNameInDev = 'useLayoutEffect';
updateHookTypesDev();
return updateLayoutEffect(create, deps);
},
useMemo: function (create, deps) {
currentHookNameInDev = 'useMemo';
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
try {
return updateMemo(create, deps);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
try {
return rerenderReducer(reducer, initialArg, init);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
currentHookNameInDev = 'useRef';
updateHookTypesDev();
return updateRef();
},
useState: function (initialState) {
currentHookNameInDev = 'useState';
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
try {
return rerenderState(initialState);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
currentHookNameInDev = 'useDebugValue';
updateHookTypesDev();
return updateDebugValue();
},
useDeferredValue: function (value) {
currentHookNameInDev = 'useDeferredValue';
updateHookTypesDev();
return rerenderDeferredValue(value);
},
useTransition: function () {
currentHookNameInDev = 'useTransition';
updateHookTypesDev();
return rerenderTransition();
},
useMutableSource: function (source, getSnapshot, subscribe) {
currentHookNameInDev = 'useMutableSource';
updateHookTypesDev();
return updateMutableSource();
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
currentHookNameInDev = 'useSyncExternalStore';
updateHookTypesDev();
return updateSyncExternalStore(subscribe, getSnapshot);
},
useId: function () {
currentHookNameInDev = 'useId';
updateHookTypesDev();
return updateId();
},
unstable_isNewReconciler: enableNewReconciler
};
InvalidNestedHooksDispatcherOnMountInDEV = {
readContext: function (context) {
warnInvalidContextAccess();
return readContext(context);
},
useCallback: function (callback, deps) {
currentHookNameInDev = 'useCallback';
warnInvalidHookAccess();
mountHookTypesDev();
return mountCallback(callback, deps);
},
useContext: function (context) {
currentHookNameInDev = 'useContext';
warnInvalidHookAccess();
mountHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
currentHookNameInDev = 'useEffect';
warnInvalidHookAccess();
mountHookTypesDev();
return mountEffect(create, deps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = 'useImperativeHandle';
warnInvalidHookAccess();
mountHookTypesDev();
return mountImperativeHandle(ref, create, deps);
},
useInsertionEffect: function (create, deps) {
currentHookNameInDev = 'useInsertionEffect';
warnInvalidHookAccess();
mountHookTypesDev();
return mountInsertionEffect(create, deps);
},
useLayoutEffect: function (create, deps) {
currentHookNameInDev = 'useLayoutEffect';
warnInvalidHookAccess();
mountHookTypesDev();
return mountLayoutEffect(create, deps);
},
useMemo: function (create, deps) {
currentHookNameInDev = 'useMemo';
warnInvalidHookAccess();
mountHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
warnInvalidHookAccess();
mountHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer, initialArg, init);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
currentHookNameInDev = 'useRef';
warnInvalidHookAccess();
mountHookTypesDev();
return mountRef(initialValue);
},
useState: function (initialState) {
currentHookNameInDev = 'useState';
warnInvalidHookAccess();
mountHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
currentHookNameInDev = 'useDebugValue';
warnInvalidHookAccess();
mountHookTypesDev();
return mountDebugValue();
},
useDeferredValue: function (value) {
currentHookNameInDev = 'useDeferredValue';
warnInvalidHookAccess();
mountHookTypesDev();
return mountDeferredValue(value);
},
useTransition: function () {
currentHookNameInDev = 'useTransition';
warnInvalidHookAccess();
mountHookTypesDev();
return mountTransition();
},
useMutableSource: function (source, getSnapshot, subscribe) {
currentHookNameInDev = 'useMutableSource';
warnInvalidHookAccess();
mountHookTypesDev();
return mountMutableSource();
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
currentHookNameInDev = 'useSyncExternalStore';
warnInvalidHookAccess();
mountHookTypesDev();
return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
},
useId: function () {
currentHookNameInDev = 'useId';
warnInvalidHookAccess();
mountHookTypesDev();
return mountId();
},
unstable_isNewReconciler: enableNewReconciler
};
InvalidNestedHooksDispatcherOnUpdateInDEV = {
readContext: function (context) {
warnInvalidContextAccess();
return readContext(context);
},
useCallback: function (callback, deps) {
currentHookNameInDev = 'useCallback';
warnInvalidHookAccess();
updateHookTypesDev();
return updateCallback(callback, deps);
},
useContext: function (context) {
currentHookNameInDev = 'useContext';
warnInvalidHookAccess();
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
currentHookNameInDev = 'useEffect';
warnInvalidHookAccess();
updateHookTypesDev();
return updateEffect(create, deps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = 'useImperativeHandle';
warnInvalidHookAccess();
updateHookTypesDev();
return updateImperativeHandle(ref, create, deps);
},
useInsertionEffect: function (create, deps) {
currentHookNameInDev = 'useInsertionEffect';
warnInvalidHookAccess();
updateHookTypesDev();
return updateInsertionEffect(create, deps);
},
useLayoutEffect: function (create, deps) {
currentHookNameInDev = 'useLayoutEffect';
warnInvalidHookAccess();
updateHookTypesDev();
return updateLayoutEffect(create, deps);
},
useMemo: function (create, deps) {
currentHookNameInDev = 'useMemo';
warnInvalidHookAccess();
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateMemo(create, deps);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
warnInvalidHookAccess();
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateReducer(reducer, initialArg, init);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
currentHookNameInDev = 'useRef';
warnInvalidHookAccess();
updateHookTypesDev();
return updateRef();
},
useState: function (initialState) {
currentHookNameInDev = 'useState';
warnInvalidHookAccess();
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateState(initialState);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
currentHookNameInDev = 'useDebugValue';
warnInvalidHookAccess();
updateHookTypesDev();
return updateDebugValue();
},
useDeferredValue: function (value) {
currentHookNameInDev = 'useDeferredValue';
warnInvalidHookAccess();
updateHookTypesDev();
return updateDeferredValue(value);
},
useTransition: function () {
currentHookNameInDev = 'useTransition';
warnInvalidHookAccess();
updateHookTypesDev();
return updateTransition();
},
useMutableSource: function (source, getSnapshot, subscribe) {
currentHookNameInDev = 'useMutableSource';
warnInvalidHookAccess();
updateHookTypesDev();
return updateMutableSource();
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
currentHookNameInDev = 'useSyncExternalStore';
warnInvalidHookAccess();
updateHookTypesDev();
return updateSyncExternalStore(subscribe, getSnapshot);
},
useId: function () {
currentHookNameInDev = 'useId';
warnInvalidHookAccess();
updateHookTypesDev();
return updateId();
},
unstable_isNewReconciler: enableNewReconciler
};
InvalidNestedHooksDispatcherOnRerenderInDEV = {
readContext: function (context) {
warnInvalidContextAccess();
return readContext(context);
},
useCallback: function (callback, deps) {
currentHookNameInDev = 'useCallback';
warnInvalidHookAccess();
updateHookTypesDev();
return updateCallback(callback, deps);
},
useContext: function (context) {
currentHookNameInDev = 'useContext';
warnInvalidHookAccess();
updateHookTypesDev();
return readContext(context);
},
useEffect: function (create, deps) {
currentHookNameInDev = 'useEffect';
warnInvalidHookAccess();
updateHookTypesDev();
return updateEffect(create, deps);
},
useImperativeHandle: function (ref, create, deps) {
currentHookNameInDev = 'useImperativeHandle';
warnInvalidHookAccess();
updateHookTypesDev();
return updateImperativeHandle(ref, create, deps);
},
useInsertionEffect: function (create, deps) {
currentHookNameInDev = 'useInsertionEffect';
warnInvalidHookAccess();
updateHookTypesDev();
return updateInsertionEffect(create, deps);
},
useLayoutEffect: function (create, deps) {
currentHookNameInDev = 'useLayoutEffect';
warnInvalidHookAccess();
updateHookTypesDev();
return updateLayoutEffect(create, deps);
},
useMemo: function (create, deps) {
currentHookNameInDev = 'useMemo';
warnInvalidHookAccess();
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateMemo(create, deps);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
warnInvalidHookAccess();
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return rerenderReducer(reducer, initialArg, init);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
currentHookNameInDev = 'useRef';
warnInvalidHookAccess();
updateHookTypesDev();
return updateRef();
},
useState: function (initialState) {
currentHookNameInDev = 'useState';
warnInvalidHookAccess();
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return rerenderState(initialState);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
currentHookNameInDev = 'useDebugValue';
warnInvalidHookAccess();
updateHookTypesDev();
return updateDebugValue();
},
useDeferredValue: function (value) {
currentHookNameInDev = 'useDeferredValue';
warnInvalidHookAccess();
updateHookTypesDev();
return rerenderDeferredValue(value);
},
useTransition: function () {
currentHookNameInDev = 'useTransition';
warnInvalidHookAccess();
updateHookTypesDev();
return rerenderTransition();
},
useMutableSource: function (source, getSnapshot, subscribe) {
currentHookNameInDev = 'useMutableSource';
warnInvalidHookAccess();
updateHookTypesDev();
return updateMutableSource();
},
useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
currentHookNameInDev = 'useSyncExternalStore';
warnInvalidHookAccess();
updateHookTypesDev();
return updateSyncExternalStore(subscribe, getSnapshot);
},
useId: function () {
currentHookNameInDev = 'useId';
warnInvalidHookAccess();
updateHookTypesDev();
return updateId();
},
unstable_isNewReconciler: enableNewReconciler
};
}
var now$1 = unstable_now;
var commitTime = 0;
var layoutEffectStartTime = -1;
var profilerStartTime = -1;
var passiveEffectStartTime = -1;
/**
* Tracks whether the current update was a nested/cascading update (scheduled from a layout effect).
*
* The overall sequence is:
* 1. render
* 2. commit (and call `onRender`, `onCommit`)
* 3. check for nested updates
* 4. flush passive effects (and call `onPostCommit`)
*
* Nested updates are identified in step 3 above,
* but step 4 still applies to the work that was just committed.
* We use two flags to track nested updates then:
* one tracks whether the upcoming update is a nested update,
* and the other tracks whether the current update was a nested update.
* The first value gets synced to the second at the start of the render phase.
*/
var currentUpdateIsNested = false;
var nestedUpdateScheduled = false;
function isCurrentUpdateNested() {
return currentUpdateIsNested;
}
function markNestedUpdateScheduled() {
{
nestedUpdateScheduled = true;
}
}
function resetNestedUpdateFlag() {
{
currentUpdateIsNested = false;
nestedUpdateScheduled = false;
}
}
function syncNestedUpdateFlag() {
{
currentUpdateIsNested = nestedUpdateScheduled;
nestedUpdateScheduled = false;
}
}
function getCommitTime() {
return commitTime;
}
function recordCommitTime() {
commitTime = now$1();
}
function startProfilerTimer(fiber) {
profilerStartTime = now$1();
if (fiber.actualStartTime < 0) {
fiber.actualStartTime = now$1();
}
}
function stopProfilerTimerIfRunning(fiber) {
profilerStartTime = -1;
}
function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
if (profilerStartTime >= 0) {
var elapsedTime = now$1() - profilerStartTime;
fiber.actualDuration += elapsedTime;
if (overrideBaseTime) {
fiber.selfBaseDuration = elapsedTime;
}
profilerStartTime = -1;
}
}
function recordLayoutEffectDuration(fiber) {
if (layoutEffectStartTime >= 0) {
var elapsedTime = now$1() - layoutEffectStartTime;
layoutEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor
// Or the root (for the DevTools Profiler to read)
var parentFiber = fiber.return;
while (parentFiber !== null) {
switch (parentFiber.tag) {
case HostRoot:
var root = parentFiber.stateNode;
root.effectDuration += elapsedTime;
return;
case Profiler:
var parentStateNode = parentFiber.stateNode;
parentStateNode.effectDuration += elapsedTime;
return;
}
parentFiber = parentFiber.return;
}
}
}
function recordPassiveEffectDuration(fiber) {
if (passiveEffectStartTime >= 0) {
var elapsedTime = now$1() - passiveEffectStartTime;
passiveEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor
// Or the root (for the DevTools Profiler to read)
var parentFiber = fiber.return;
while (parentFiber !== null) {
switch (parentFiber.tag) {
case HostRoot:
var root = parentFiber.stateNode;
if (root !== null) {
root.passiveEffectDuration += elapsedTime;
}
return;
case Profiler:
var parentStateNode = parentFiber.stateNode;
if (parentStateNode !== null) {
// Detached fibers have their state node cleared out.
// In this case, the return pointer is also cleared out,
// so we won't be able to report the time spent in this Profiler's subtree.
parentStateNode.passiveEffectDuration += elapsedTime;
}
return;
}
parentFiber = parentFiber.return;
}
}
}
function startLayoutEffectTimer() {
layoutEffectStartTime = now$1();
}
function startPassiveEffectTimer() {
passiveEffectStartTime = now$1();
}
function transferActualDuration(fiber) {
// Transfer time spent rendering these children so we don't lose it
// after we rerender. This is used as a helper in special cases
// where we should count the work of multiple passes.
var child = fiber.child;
while (child) {
fiber.actualDuration += child.actualDuration;
child = child.sibling;
}
}
function createCapturedValueAtFiber(value, source) {
// If the value is an error, call this function immediately after it is thrown
// so the stack is accurate.
return {
value: value,
source: source,
stack: getStackByFiberInDevAndProd(source),
digest: null
};
}
function createCapturedValue(value, digest, stack) {
return {
value: value,
source: null,
stack: stack != null ? stack : null,
digest: digest != null ? digest : null
};
}
// This module is forked in different environments.
// By default, return `true` to log errors to the console.
// Forks can return `false` if this isn't desirable.
function showErrorDialog(boundary, errorInfo) {
return true;
}
function logCapturedError(boundary, errorInfo) {
try {
var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.
// This enables renderers like ReactNative to better manage redbox behavior.
if (logError === false) {
return;
}
var error = errorInfo.value;
if (true) {
var source = errorInfo.source;
var stack = errorInfo.stack;
var componentStack = stack !== null ? stack : ''; // Browsers support silencing uncaught errors by calling
// `preventDefault()` in window `error` handler.
// We record this information as an expando on the error.
if (error != null && error._suppressLogging) {
if (boundary.tag === ClassComponent) {
// The error is recoverable and was silenced.
// Ignore it and don't print the stack addendum.
// This is handy for testing error boundaries without noise.
return;
} // The error is fatal. Since the silencing might have
// been accidental, we'll surface it anyway.
// However, the browser would have silenced the original error
// so we'll print it first, and then print the stack addendum.
console['error'](error); // Don't transform to our wrapper
// For a more detailed description of this block, see:
// https://github.com/facebook/react/pull/13384
}
var componentName = source ? getComponentNameFromFiber(source) : null;
var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : 'The above error occurred in one of your React components:';
var errorBoundaryMessage;
if (boundary.tag === HostRoot) {
errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.';
} else {
var errorBoundaryName = getComponentNameFromFiber(boundary) || 'Anonymous';
errorBoundaryMessage = "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + errorBoundaryName + ".");
}
var combinedMessage = componentNameMessage + "\n" + componentStack + "\n\n" + ("" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.
// We don't include the original error message and JS stack because the browser
// has already printed it. Even if the application swallows the error, it is still
// displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.
console['error'](combinedMessage); // Don't transform to our wrapper
} else {
// In production, we print the error directly.
// This will include the message, the JS stack, and anything the browser wants to show.
// We pass the error object instead of custom message so that the browser displays the error natively.
console['error'](error); // Don't transform to our wrapper
}
} catch (e) {
// This method must not throw, or React internal state will get messed up.
// If console.error is overridden, or logCapturedError() shows a dialog that throws,
// we want to report this error outside of the normal stack as a last resort.
// https://github.com/facebook/react/issues/13188
setTimeout(function () {
throw e;
});
}
}
var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;
function createRootErrorUpdate(fiber, errorInfo, lane) {
var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null.
update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property
// being called "element".
update.payload = {
element: null
};
var error = errorInfo.value;
update.callback = function () {
onUncaughtError(error);
logCapturedError(fiber, errorInfo);
};
return update;
}
function createClassErrorUpdate(fiber, errorInfo, lane) {
var update = createUpdate(NoTimestamp, lane);
update.tag = CaptureUpdate;
var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
if (typeof getDerivedStateFromError === 'function') {
var error$1 = errorInfo.value;
update.payload = function () {
return getDerivedStateFromError(error$1);
};
update.callback = function () {
{
markFailedErrorBoundaryForHotReloading(fiber);
}
logCapturedError(fiber, errorInfo);
};
}
var inst = fiber.stateNode;
if (inst !== null && typeof inst.componentDidCatch === 'function') {
update.callback = function callback() {
{
markFailedErrorBoundaryForHotReloading(fiber);
}
logCapturedError(fiber, errorInfo);
if (typeof getDerivedStateFromError !== 'function') {
// To preserve the preexisting retry behavior of error boundaries,
// we keep track of which ones already failed during this batch.
// This gets reset before we yield back to the browser.
// TODO: Warn in strict mode if getDerivedStateFromError is
// not defined.
markLegacyErrorBoundaryAsFailed(this);
}
var error$1 = errorInfo.value;
var stack = errorInfo.stack;
this.componentDidCatch(error$1, {
componentStack: stack !== null ? stack : ''
});
{
if (typeof getDerivedStateFromError !== 'function') {
// If componentDidCatch is the only error boundary method defined,
// then it needs to call setState to recover from errors.
// If no state update is scheduled then the boundary will swallow the error.
if (!includesSomeLane(fiber.lanes, SyncLane)) {
error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentNameFromFiber(fiber) || 'Unknown');
}
}
}
};
}
return update;
}
function attachPingListener(root, wakeable, lanes) {
// Attach a ping listener
//
// The data might resolve before we have a chance to commit the fallback. Or,
// in the case of a refresh, we'll never commit a fallback. So we need to
// attach a listener now. When it resolves ("pings"), we can decide whether to
// try rendering the tree again.
//
// Only attach a listener if one does not already exist for the lanes
// we're currently rendering (which acts like a "thread ID" here).
//
// We only need to do this in concurrent mode. Legacy Suspense always
// commits fallbacks synchronously, so there are no pings.
var pingCache = root.pingCache;
var threadIDs;
if (pingCache === null) {
pingCache = root.pingCache = new PossiblyWeakMap$1();
threadIDs = new Set();
pingCache.set(wakeable, threadIDs);
} else {
threadIDs = pingCache.get(wakeable);
if (threadIDs === undefined) {
threadIDs = new Set();
pingCache.set(wakeable, threadIDs);
}
}
if (!threadIDs.has(lanes)) {
// Memoize using the thread ID to prevent redundant listeners.
threadIDs.add(lanes);
var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);
{
if (isDevToolsPresent) {
// If we have pending work still, restore the original updaters
restorePendingUpdaters(root, lanes);
}
}
wakeable.then(ping, ping);
}
}
function attachRetryListener(suspenseBoundary, root, wakeable, lanes) {
// Retry listener
//
// If the fallback does commit, we need to attach a different type of
// listener. This one schedules an update on the Suspense boundary to turn
// the fallback state off.
//
// Stash the wakeable on the boundary fiber so we can access it in the
// commit phase.
//
// When the wakeable resolves, we'll attempt to render the boundary
// again ("retry").
var wakeables = suspenseBoundary.updateQueue;
if (wakeables === null) {
var updateQueue = new Set();
updateQueue.add(wakeable);
suspenseBoundary.updateQueue = updateQueue;
} else {
wakeables.add(wakeable);
}
}
function resetSuspendedComponent(sourceFiber, rootRenderLanes) {
// A legacy mode Suspense quirk, only relevant to hook components.
var tag = sourceFiber.tag;
if ((sourceFiber.mode & ConcurrentMode) === NoMode && (tag === FunctionComponent || tag === ForwardRef || tag === SimpleMemoComponent)) {
var currentSource = sourceFiber.alternate;
if (currentSource) {
sourceFiber.updateQueue = currentSource.updateQueue;
sourceFiber.memoizedState = currentSource.memoizedState;
sourceFiber.lanes = currentSource.lanes;
} else {
sourceFiber.updateQueue = null;
sourceFiber.memoizedState = null;
}
}
}
function getNearestSuspenseBoundaryToCapture(returnFiber) {
var node = returnFiber;
do {
if (node.tag === SuspenseComponent && shouldCaptureSuspense(node)) {
return node;
} // This boundary already captured during this render. Continue to the next
// boundary.
node = node.return;
} while (node !== null);
return null;
}
function markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes) {
// This marks a Suspense boundary so that when we're unwinding the stack,
// it captures the suspended "exception" and does a second (fallback) pass.
if ((suspenseBoundary.mode & ConcurrentMode) === NoMode) {
// Legacy Mode Suspense
//
// If the boundary is in legacy mode, we should *not*
// suspend the commit. Pretend as if the suspended component rendered
// null and keep rendering. When the Suspense boundary completes,
// we'll do a second pass to render the fallback.
if (suspenseBoundary === returnFiber) {
// Special case where we suspended while reconciling the children of
// a Suspense boundary's inner Offscreen wrapper fiber. This happens
// when a React.lazy component is a direct child of a
// Suspense boundary.
//
// Suspense boundaries are implemented as multiple fibers, but they
// are a single conceptual unit. The legacy mode behavior where we
// pretend the suspended fiber committed as `null` won't work,
// because in this case the "suspended" fiber is the inner
// Offscreen wrapper.
//
// Because the contents of the boundary haven't started rendering
// yet (i.e. nothing in the tree has partially rendered) we can
// switch to the regular, concurrent mode behavior: mark the
// boundary with ShouldCapture and enter the unwind phase.
suspenseBoundary.flags |= ShouldCapture;
} else {
suspenseBoundary.flags |= DidCapture;
sourceFiber.flags |= ForceUpdateForLegacySuspense; // We're going to commit this fiber even though it didn't complete.
// But we shouldn't call any lifecycle methods or callbacks. Remove
// all lifecycle effect tags.
sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete);
if (sourceFiber.tag === ClassComponent) {
var currentSourceFiber = sourceFiber.alternate;
if (currentSourceFiber === null) {
// This is a new mount. Change the tag so it's not mistaken for a
// completed class component. For example, we should not call
// componentWillUnmount if it is deleted.
sourceFiber.tag = IncompleteClassComponent;
} else {
// When we try rendering again, we should not reuse the current fiber,
// since it's known to be in an inconsistent state. Use a force update to
// prevent a bail out.
var update = createUpdate(NoTimestamp, SyncLane);
update.tag = ForceUpdate;
enqueueUpdate(sourceFiber, update, SyncLane);
}
} // The source fiber did not complete. Mark it with Sync priority to
// indicate that it still has pending work.
sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane);
}
return suspenseBoundary;
} // Confirmed that the boundary is in a concurrent mode tree. Continue
// with the normal suspend path.
//
// After this we'll use a set of heuristics to determine whether this
// render pass will run to completion or restart or "suspend" the commit.
// The actual logic for this is spread out in different places.
//
// This first principle is that if we're going to suspend when we complete
// a root, then we should also restart if we get an update or ping that
// might unsuspend it, and vice versa. The only reason to suspend is
// because you think you might want to restart before committing. However,
// it doesn't make sense to restart only while in the period we're suspended.
//
// Restarting too aggressively is also not good because it starves out any
// intermediate loading state. So we use heuristics to determine when.
// Suspense Heuristics
//
// If nothing threw a Promise or all the same fallbacks are already showing,
// then don't suspend/restart.
//
// If this is an initial render of a new tree of Suspense boundaries and
// those trigger a fallback, then don't suspend/restart. We want to ensure
// that we can show the initial loading state as quickly as possible.
//
// If we hit a "Delayed" case, such as when we'd switch from content back into
// a fallback, then we should always suspend/restart. Transitions apply
// to this case. If none is defined, JND is used instead.
//
// If we're already showing a fallback and it gets "retried", allowing us to show
// another level, but there's still an inner boundary that would show a fallback,
// then we suspend/restart for 500ms since the last time we showed a fallback
// anywhere in the tree. This effectively throttles progressive loading into a
// consistent train of commits. This also gives us an opportunity to restart to
// get to the completed state slightly earlier.
//
// If there's ambiguity due to batching it's resolved in preference of:
// 1) "delayed", 2) "initial render", 3) "retry".
//
// We want to ensure that a "busy" state doesn't get force committed. We want to
// ensure that new initial loading states can commit as soon as possible.
suspenseBoundary.flags |= ShouldCapture; // TODO: I think we can remove this, since we now use `DidCapture` in
// the begin phase to prevent an early bailout.
suspenseBoundary.lanes = rootRenderLanes;
return suspenseBoundary;
}
function throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {
// The source fiber did not complete.
sourceFiber.flags |= Incomplete;
{
if (isDevToolsPresent) {
// If we have pending work still, restore the original updaters
restorePendingUpdaters(root, rootRenderLanes);
}
}
if (value !== null && typeof value === 'object' && typeof value.then === 'function') {
// This is a wakeable. The component suspended.
var wakeable = value;
resetSuspendedComponent(sourceFiber);
{
if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {
markDidThrowWhileHydratingDEV();
}
}
var suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber);
if (suspenseBoundary !== null) {
suspenseBoundary.flags &= ~ForceClientRender;
markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // We only attach ping listeners in concurrent mode. Legacy Suspense always
// commits fallbacks synchronously, so there are no pings.
if (suspenseBoundary.mode & ConcurrentMode) {
attachPingListener(root, wakeable, rootRenderLanes);
}
attachRetryListener(suspenseBoundary, root, wakeable);
return;
} else {
// No boundary was found. Unless this is a sync update, this is OK.
// We can suspend and wait for more data to arrive.
if (!includesSyncLane(rootRenderLanes)) {
// This is not a sync update. Suspend. Since we're not activating a
// Suspense boundary, this will unwind all the way to the root without
// performing a second pass to render a fallback. (This is arguably how
// refresh transitions should work, too, since we're not going to commit
// the fallbacks anyway.)
//
// This case also applies to initial hydration.
attachPingListener(root, wakeable, rootRenderLanes);
renderDidSuspendDelayIfPossible();
return;
} // This is a sync/discrete update. We treat this case like an error
// because discrete renders are expected to produce a complete tree
// synchronously to maintain consistency with external state.
var uncaughtSuspenseError = new Error('A component suspended while responding to synchronous input. This ' + 'will cause the UI to be replaced with a loading indicator. To ' + 'fix, updates that suspend should be wrapped ' + 'with startTransition.'); // If we're outside a transition, fall through to the regular error path.
// The error will be caught by the nearest suspense boundary.
value = uncaughtSuspenseError;
}
} else {
// This is a regular error, not a Suspense wakeable.
if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {
markDidThrowWhileHydratingDEV();
var _suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber); // If the error was thrown during hydration, we may be able to recover by
// discarding the dehydrated content and switching to a client render.
// Instead of surfacing the error, find the nearest Suspense boundary
// and render it again without hydration.
if (_suspenseBoundary !== null) {
if ((_suspenseBoundary.flags & ShouldCapture) === NoFlags) {
// Set a flag to indicate that we should try rendering the normal
// children again, not the fallback.
_suspenseBoundary.flags |= ForceClientRender;
}
markSuspenseBoundaryShouldCapture(_suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // Even though the user may not be affected by this error, we should
// still log it so it can be fixed.
queueHydrationError(createCapturedValueAtFiber(value, sourceFiber));
return;
}
}
}
value = createCapturedValueAtFiber(value, sourceFiber);
renderDidError(value); // We didn't find a boundary that could handle this type of exception. Start
// over and traverse parent path again, this time treating the exception
// as an error.
var workInProgress = returnFiber;
do {
switch (workInProgress.tag) {
case HostRoot:
{
var _errorInfo = value;
workInProgress.flags |= ShouldCapture;
var lane = pickArbitraryLane(rootRenderLanes);
workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);
var update = createRootErrorUpdate(workInProgress, _errorInfo, lane);
enqueueCapturedUpdate(workInProgress, update);
return;
}
case ClassComponent:
// Capture and retry
var errorInfo = value;
var ctor = workInProgress.type;
var instance = workInProgress.stateNode;
if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {
workInProgress.flags |= ShouldCapture;
var _lane = pickArbitraryLane(rootRenderLanes);
workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state
var _update = createClassErrorUpdate(workInProgress, errorInfo, _lane);
enqueueCapturedUpdate(workInProgress, _update);
return;
}
break;
}
workInProgress = workInProgress.return;
} while (workInProgress !== null);
}
function getSuspendedCache() {
{
return null;
} // This function is called when a Suspense boundary suspends. It returns the
}
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
var didReceiveUpdate = false;
var didWarnAboutBadClass;
var didWarnAboutModulePatternComponent;
var didWarnAboutContextTypeOnFunctionComponent;
var didWarnAboutGetDerivedStateOnFunctionComponent;
var didWarnAboutFunctionRefs;
var didWarnAboutReassigningProps;
var didWarnAboutRevealOrder;
var didWarnAboutTailOptions;
{
didWarnAboutBadClass = {};
didWarnAboutModulePatternComponent = {};
didWarnAboutContextTypeOnFunctionComponent = {};
didWarnAboutGetDerivedStateOnFunctionComponent = {};
didWarnAboutFunctionRefs = {};
didWarnAboutReassigningProps = false;
didWarnAboutRevealOrder = {};
didWarnAboutTailOptions = {};
}
function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
if (current === null) {
// If this is a fresh new component that hasn't been rendered yet, we
// won't update its child set by applying minimal side-effects. Instead,
// we will add them all to the child before it gets rendered. That means
// we can optimize this reconciliation pass by not tracking side-effects.
workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);
} else {
// If the current child is the same as the work in progress, it means that
// we haven't yet started any work on these children. Therefore, we use
// the clone algorithm to create a copy of all the current children.
// If we had any progressed work already, that is invalid at this point so
// let's throw it out.
workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes);
}
}
function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {
// This function is fork of reconcileChildren. It's used in cases where we
// want to reconcile without matching against the existing set. This has the
// effect of all current children being unmounted; even if the type and key
// are the same, the old child is unmounted and a new child is created.
//
// To do this, we're going to go through the reconcile algorithm twice. In
// the first pass, we schedule a deletion for all the current children by
// passing null.
workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that we
// pass null in place of where we usually pass the current child set. This has
// the effect of remounting all children regardless of whether their
// identities match.
workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);
}
function updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {
// TODO: current can be non-null here even if the component
// hasn't yet mounted. This happens after the first render suspends.
// We'll need to figure out if this is fine or can cause issues.
{
if (workInProgress.type !== workInProgress.elementType) {
// Lazy component props can't be validated in createElement
// because they're only guaranteed to be resolved here.
var innerPropTypes = Component.propTypes;
if (innerPropTypes) {
checkPropTypes(innerPropTypes, nextProps, // Resolved props
'prop', getComponentNameFromType(Component));
}
}
}
var render = Component.render;
var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent
var nextChildren;
var hasId;
prepareToReadContext(workInProgress, renderLanes);
{
markComponentRenderStarted(workInProgress);
}
{
ReactCurrentOwner$1.current = workInProgress;
setIsRendering(true);
nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);
hasId = checkDidRenderIdHook();
if ( workInProgress.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);
hasId = checkDidRenderIdHook();
} finally {
setIsStrictModeForDevtools(false);
}
}
setIsRendering(false);
}
{
markComponentRenderStopped();
}
if (current !== null && !didReceiveUpdate) {
bailoutHooks(current, workInProgress, renderLanes);
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
}
if (getIsHydrating() && hasId) {
pushMaterializedTreeId(workInProgress);
} // React DevTools reads this flag.
workInProgress.flags |= PerformedWork;
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
function updateMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {
if (current === null) {
var type = Component.type;
if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.
Component.defaultProps === undefined) {
var resolvedType = type;
{
resolvedType = resolveFunctionForHotReloading(type);
} // If this is a plain function component without default props,
// and with only the default shallow comparison, we upgrade it
// to a SimpleMemoComponent to allow fast path updates.
workInProgress.tag = SimpleMemoComponent;
workInProgress.type = resolvedType;
{
validateFunctionComponentInDev(workInProgress, type);
}
return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, renderLanes);
}
{
var innerPropTypes = type.propTypes;
if (innerPropTypes) {
// Inner memo component props aren't currently validated in createElement.
// We could move it there, but we'd still need this for lazy code path.
checkPropTypes(innerPropTypes, nextProps, // Resolved props
'prop', getComponentNameFromType(type));
}
}
var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);
child.ref = workInProgress.ref;
child.return = workInProgress;
workInProgress.child = child;
return child;
}
{
var _type = Component.type;
var _innerPropTypes = _type.propTypes;
if (_innerPropTypes) {
// Inner memo component props aren't currently validated in createElement.
// We could move it there, but we'd still need this for lazy code path.
checkPropTypes(_innerPropTypes, nextProps, // Resolved props
'prop', getComponentNameFromType(_type));
}
}
var currentChild = current.child; // This is always exactly one child
var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);
if (!hasScheduledUpdateOrContext) {
// This will be the props with resolved defaultProps,
// unlike current.memoizedProps which will be the unresolved ones.
var prevProps = currentChild.memoizedProps; // Default to shallow comparison
var compare = Component.compare;
compare = compare !== null ? compare : shallowEqual;
if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
}
} // React DevTools reads this flag.
workInProgress.flags |= PerformedWork;
var newChild = createWorkInProgress(currentChild, nextProps);
newChild.ref = workInProgress.ref;
newChild.return = workInProgress;
workInProgress.child = newChild;
return newChild;
}
function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {
// TODO: current can be non-null here even if the component
// hasn't yet mounted. This happens when the inner render suspends.
// We'll need to figure out if this is fine or can cause issues.
{
if (workInProgress.type !== workInProgress.elementType) {
// Lazy component props can't be validated in createElement
// because they're only guaranteed to be resolved here.
var outerMemoType = workInProgress.elementType;
if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {
// We warn when you define propTypes on lazy()
// so let's just skip over it to find memo() outer wrapper.
// Inner props for memo are validated later.
var lazyComponent = outerMemoType;
var payload = lazyComponent._payload;
var init = lazyComponent._init;
try {
outerMemoType = init(payload);
} catch (x) {
outerMemoType = null;
} // Inner propTypes will be validated in the function component path.
var outerPropTypes = outerMemoType && outerMemoType.propTypes;
if (outerPropTypes) {
checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
'prop', getComponentNameFromType(outerMemoType));
}
}
}
}
if (current !== null) {
var prevProps = current.memoizedProps;
if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.
workInProgress.type === current.type )) {
didReceiveUpdate = false; // The props are shallowly equal. Reuse the previous props object, like we
// would during a normal fiber bailout.
//
// We don't have strong guarantees that the props object is referentially
// equal during updates where we can't bail out anyway — like if the props
// are shallowly equal, but there's a local state or context update in the
// same batch.
//
// However, as a principle, we should aim to make the behavior consistent
// across different ways of memoizing a component. For example, React.memo
// has a different internal Fiber layout if you pass a normal function
// component (SimpleMemoComponent) versus if you pass a different type
// like forwardRef (MemoComponent). But this is an implementation detail.
// Wrapping a component in forwardRef (or React.lazy, etc) shouldn't
// affect whether the props object is reused during a bailout.
workInProgress.pendingProps = nextProps = prevProps;
if (!checkScheduledUpdateOrContext(current, renderLanes)) {
// The pending lanes were cleared at the beginning of beginWork. We're
// about to bail out, but there might be other lanes that weren't
// included in the current render. Usually, the priority level of the
// remaining updates is accumulated during the evaluation of the
// component (i.e. when processing the update queue). But since since
// we're bailing out early *without* evaluating the component, we need
// to account for it here, too. Reset to the value of the current fiber.
// NOTE: This only applies to SimpleMemoComponent, not MemoComponent,
// because a MemoComponent fiber does not have hooks or an update queue;
// rather, it wraps around an inner component, which may or may not
// contains hooks.
// TODO: Move the reset at in beginWork out of the common path so that
// this is no longer necessary.
workInProgress.lanes = current.lanes;
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
} else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
// This is a special case that only exists for legacy mode.
// See https://github.com/facebook/react/pull/19216.
didReceiveUpdate = true;
}
}
}
return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);
}
function updateOffscreenComponent(current, workInProgress, renderLanes) {
var nextProps = workInProgress.pendingProps;
var nextChildren = nextProps.children;
var prevState = current !== null ? current.memoizedState : null;
if (nextProps.mode === 'hidden' || enableLegacyHidden ) {
// Rendering a hidden tree.
if ((workInProgress.mode & ConcurrentMode) === NoMode) {
// In legacy sync mode, don't defer the subtree. Render it now.
// TODO: Consider how Offscreen should work with transitions in the future
var nextState = {
baseLanes: NoLanes,
cachePool: null,
transitions: null
};
workInProgress.memoizedState = nextState;
pushRenderLanes(workInProgress, renderLanes);
} else if (!includesSomeLane(renderLanes, OffscreenLane)) {
var spawnedCachePool = null; // We're hidden, and we're not rendering at Offscreen. We will bail out
// and resume this tree later.
var nextBaseLanes;
if (prevState !== null) {
var prevBaseLanes = prevState.baseLanes;
nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes);
} else {
nextBaseLanes = renderLanes;
} // Schedule this fiber to re-render at offscreen priority. Then bailout.
workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane);
var _nextState = {
baseLanes: nextBaseLanes,
cachePool: spawnedCachePool,
transitions: null
};
workInProgress.memoizedState = _nextState;
workInProgress.updateQueue = null;
// to avoid a push/pop misalignment.
pushRenderLanes(workInProgress, nextBaseLanes);
return null;
} else {
// This is the second render. The surrounding visible content has already
// committed. Now we resume rendering the hidden tree.
// Rendering at offscreen, so we can clear the base lanes.
var _nextState2 = {
baseLanes: NoLanes,
cachePool: null,
transitions: null
};
workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out.
var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes;
pushRenderLanes(workInProgress, subtreeRenderLanes);
}
} else {
// Rendering a visible tree.
var _subtreeRenderLanes;
if (prevState !== null) {
// We're going from hidden -> visible.
_subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes);
workInProgress.memoizedState = null;
} else {
// We weren't previously hidden, and we still aren't, so there's nothing
// special to do. Need to push to the stack regardless, though, to avoid
// a push/pop misalignment.
_subtreeRenderLanes = renderLanes;
}
pushRenderLanes(workInProgress, _subtreeRenderLanes);
}
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
} // Note: These happen to have identical begin phases, for now. We shouldn't hold
function updateFragment(current, workInProgress, renderLanes) {
var nextChildren = workInProgress.pendingProps;
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
function updateMode(current, workInProgress, renderLanes) {
var nextChildren = workInProgress.pendingProps.children;
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
function updateProfiler(current, workInProgress, renderLanes) {
{
workInProgress.flags |= Update;
{
// Reset effect durations for the next eventual effect phase.
// These are reset during render to allow the DevTools commit hook a chance to read them,
var stateNode = workInProgress.stateNode;
stateNode.effectDuration = 0;
stateNode.passiveEffectDuration = 0;
}
}
var nextProps = workInProgress.pendingProps;
var nextChildren = nextProps.children;
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
function markRef(current, workInProgress) {
var ref = workInProgress.ref;
if (current === null && ref !== null || current !== null && current.ref !== ref) {
// Schedule a Ref effect
workInProgress.flags |= Ref;
{
workInProgress.flags |= RefStatic;
}
}
}
function updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {
{
if (workInProgress.type !== workInProgress.elementType) {
// Lazy component props can't be validated in createElement
// because they're only guaranteed to be resolved here.
var innerPropTypes = Component.propTypes;
if (innerPropTypes) {
checkPropTypes(innerPropTypes, nextProps, // Resolved props
'prop', getComponentNameFromType(Component));
}
}
}
var context;
{
var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);
context = getMaskedContext(workInProgress, unmaskedContext);
}
var nextChildren;
var hasId;
prepareToReadContext(workInProgress, renderLanes);
{
markComponentRenderStarted(workInProgress);
}
{
ReactCurrentOwner$1.current = workInProgress;
setIsRendering(true);
nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);
hasId = checkDidRenderIdHook();
if ( workInProgress.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);
hasId = checkDidRenderIdHook();
} finally {
setIsStrictModeForDevtools(false);
}
}
setIsRendering(false);
}
{
markComponentRenderStopped();
}
if (current !== null && !didReceiveUpdate) {
bailoutHooks(current, workInProgress, renderLanes);
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
}
if (getIsHydrating() && hasId) {
pushMaterializedTreeId(workInProgress);
} // React DevTools reads this flag.
workInProgress.flags |= PerformedWork;
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
function updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {
{
// This is used by DevTools to force a boundary to error.
switch (shouldError(workInProgress)) {
case false:
{
var _instance = workInProgress.stateNode;
var ctor = workInProgress.type; // TODO This way of resetting the error boundary state is a hack.
// Is there a better way to do this?
var tempInstance = new ctor(workInProgress.memoizedProps, _instance.context);
var state = tempInstance.state;
_instance.updater.enqueueSetState(_instance, state, null);
break;
}
case true:
{
workInProgress.flags |= DidCapture;
workInProgress.flags |= ShouldCapture; // eslint-disable-next-line react-internal/prod-error-codes
var error$1 = new Error('Simulated error coming from DevTools');
var lane = pickArbitraryLane(renderLanes);
workInProgress.lanes = mergeLanes(workInProgress.lanes, lane); // Schedule the error boundary to re-render using updated state
var update = createClassErrorUpdate(workInProgress, createCapturedValueAtFiber(error$1, workInProgress), lane);
enqueueCapturedUpdate(workInProgress, update);
break;
}
}
if (workInProgress.type !== workInProgress.elementType) {
// Lazy component props can't be validated in createElement
// because they're only guaranteed to be resolved here.
var innerPropTypes = Component.propTypes;
if (innerPropTypes) {
checkPropTypes(innerPropTypes, nextProps, // Resolved props
'prop', getComponentNameFromType(Component));
}
}
} // Push context providers early to prevent context stack mismatches.
// During mounting we don't know the child context yet as the instance doesn't exist.
// We will invalidate the child context in finishClassComponent() right after rendering.
var hasContext;
if (isContextProvider(Component)) {
hasContext = true;
pushContextProvider(workInProgress);
} else {
hasContext = false;
}
prepareToReadContext(workInProgress, renderLanes);
var instance = workInProgress.stateNode;
var shouldUpdate;
if (instance === null) {
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); // In the initial pass we might need to construct the instance.
constructClassInstance(workInProgress, Component, nextProps);
mountClassInstance(workInProgress, Component, nextProps, renderLanes);
shouldUpdate = true;
} else if (current === null) {
// In a resume, we'll already have an instance we can reuse.
shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes);
} else {
shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);
}
var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);
{
var inst = workInProgress.stateNode;
if (shouldUpdate && inst.props !== nextProps) {
if (!didWarnAboutReassigningProps) {
error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentNameFromFiber(workInProgress) || 'a component');
}
didWarnAboutReassigningProps = true;
}
}
return nextUnitOfWork;
}
function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {
// Refs should update even if shouldComponentUpdate returns false
markRef(current, workInProgress);
var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags;
if (!shouldUpdate && !didCaptureError) {
// Context providers should defer to sCU for rendering
if (hasContext) {
invalidateContextProvider(workInProgress, Component, false);
}
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
}
var instance = workInProgress.stateNode; // Rerender
ReactCurrentOwner$1.current = workInProgress;
var nextChildren;
if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {
// If we captured an error, but getDerivedStateFromError is not defined,
// unmount all the children. componentDidCatch will schedule an update to
// re-render a fallback. This is temporary until we migrate everyone to
// the new API.
// TODO: Warn in a future release.
nextChildren = null;
{
stopProfilerTimerIfRunning();
}
} else {
{
markComponentRenderStarted(workInProgress);
}
{
setIsRendering(true);
nextChildren = instance.render();
if ( workInProgress.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
instance.render();
} finally {
setIsStrictModeForDevtools(false);
}
}
setIsRendering(false);
}
{
markComponentRenderStopped();
}
} // React DevTools reads this flag.
workInProgress.flags |= PerformedWork;
if (current !== null && didCaptureError) {
// If we're recovering from an error, reconcile without reusing any of
// the existing children. Conceptually, the normal children and the children
// that are shown on error are two different sets, so we shouldn't reuse
// normal children even if their identities match.
forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes);
} else {
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
} // Memoize state using the values we just used to render.
// TODO: Restructure so we never read values from the instance.
workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.
if (hasContext) {
invalidateContextProvider(workInProgress, Component, true);
}
return workInProgress.child;
}
function pushHostRootContext(workInProgress) {
var root = workInProgress.stateNode;
if (root.pendingContext) {
pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);
} else if (root.context) {
// Should always be set
pushTopLevelContextObject(workInProgress, root.context, false);
}
pushHostContainer(workInProgress, root.containerInfo);
}
function updateHostRoot(current, workInProgress, renderLanes) {
pushHostRootContext(workInProgress);
if (current === null) {
throw new Error('Should have a current fiber. This is a bug in React.');
}
var nextProps = workInProgress.pendingProps;
var prevState = workInProgress.memoizedState;
var prevChildren = prevState.element;
cloneUpdateQueue(current, workInProgress);
processUpdateQueue(workInProgress, nextProps, null, renderLanes);
var nextState = workInProgress.memoizedState;
var root = workInProgress.stateNode;
// being called "element".
var nextChildren = nextState.element;
if ( prevState.isDehydrated) {
// This is a hydration root whose shell has not yet hydrated. We should
// attempt to hydrate.
// Flip isDehydrated to false to indicate that when this render
// finishes, the root will no longer be dehydrated.
var overrideState = {
element: nextChildren,
isDehydrated: false,
cache: nextState.cache,
pendingSuspenseBoundaries: nextState.pendingSuspenseBoundaries,
transitions: nextState.transitions
};
var updateQueue = workInProgress.updateQueue; // `baseState` can always be the last state because the root doesn't
// have reducer functions so it doesn't need rebasing.
updateQueue.baseState = overrideState;
workInProgress.memoizedState = overrideState;
if (workInProgress.flags & ForceClientRender) {
// Something errored during a previous attempt to hydrate the shell, so we
// forced a client render.
var recoverableError = createCapturedValueAtFiber(new Error('There was an error while hydrating. Because the error happened outside ' + 'of a Suspense boundary, the entire root will switch to ' + 'client rendering.'), workInProgress);
return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError);
} else if (nextChildren !== prevChildren) {
var _recoverableError = createCapturedValueAtFiber(new Error('This root received an early update, before anything was able ' + 'hydrate. Switched the entire root to client rendering.'), workInProgress);
return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, _recoverableError);
} else {
// The outermost shell has not hydrated yet. Start hydrating.
enterHydrationState(workInProgress);
var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);
workInProgress.child = child;
var node = child;
while (node) {
// Mark each child as hydrating. This is a fast path to know whether this
// tree is part of a hydrating tree. This is used to determine if a child
// node has fully mounted yet, and for scheduling event replaying.
// Conceptually this is similar to Placement in that a new subtree is
// inserted into the React tree here. It just happens to not need DOM
// mutations because it already exists.
node.flags = node.flags & ~Placement | Hydrating;
node = node.sibling;
}
}
} else {
// Root is not dehydrated. Either this is a client-only root, or it
// already hydrated.
resetHydrationState();
if (nextChildren === prevChildren) {
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
}
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
}
return workInProgress.child;
}
function mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError) {
// Revert to client rendering.
resetHydrationState();
queueHydrationError(recoverableError);
workInProgress.flags |= ForceClientRender;
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
function updateHostComponent(current, workInProgress, renderLanes) {
pushHostContext(workInProgress);
if (current === null) {
tryToClaimNextHydratableInstance(workInProgress);
}
var type = workInProgress.type;
var nextProps = workInProgress.pendingProps;
var prevProps = current !== null ? current.memoizedProps : null;
var nextChildren = nextProps.children;
var isDirectTextChild = shouldSetTextContent(type, nextProps);
if (isDirectTextChild) {
// We special case a direct text child of a host node. This is a common
// case. We won't handle it as a reified child. We will instead handle
// this in the host environment that also has access to this prop. That
// avoids allocating another HostText fiber and traversing it.
nextChildren = null;
} else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {
// If we're switching from a direct text child to a normal child, or to
// empty, we need to schedule the text content to be reset.
workInProgress.flags |= ContentReset;
}
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
function updateHostText(current, workInProgress) {
if (current === null) {
tryToClaimNextHydratableInstance(workInProgress);
} // Nothing to do here. This is terminal. We'll do the completion step
// immediately after.
return null;
}
function mountLazyComponent(_current, workInProgress, elementType, renderLanes) {
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
var props = workInProgress.pendingProps;
var lazyComponent = elementType;
var payload = lazyComponent._payload;
var init = lazyComponent._init;
var Component = init(payload); // Store the unwrapped component in the type.
workInProgress.type = Component;
var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);
var resolvedProps = resolveDefaultProps(Component, props);
var child;
switch (resolvedTag) {
case FunctionComponent:
{
{
validateFunctionComponentInDev(workInProgress, Component);
workInProgress.type = Component = resolveFunctionForHotReloading(Component);
}
child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes);
return child;
}
case ClassComponent:
{
{
workInProgress.type = Component = resolveClassForHotReloading(Component);
}
child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes);
return child;
}
case ForwardRef:
{
{
workInProgress.type = Component = resolveForwardRefForHotReloading(Component);
}
child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes);
return child;
}
case MemoComponent:
{
{
if (workInProgress.type !== workInProgress.elementType) {
var outerPropTypes = Component.propTypes;
if (outerPropTypes) {
checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only
'prop', getComponentNameFromType(Component));
}
}
}
child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
renderLanes);
return child;
}
}
var hint = '';
{
if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {
hint = ' Did you wrap a component in React.lazy() more than once?';
}
} // This message intentionally doesn't mention ForwardRef or MemoComponent
// because the fact that it's a separate type of work is an
// implementation detail.
throw new Error("Element type is invalid. Received a promise that resolves to: " + Component + ". " + ("Lazy element type must resolve to a class or function." + hint));
}
function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); // Promote the fiber to a class and try rendering again.
workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`
// Push context providers early to prevent context stack mismatches.
// During mounting we don't know the child context yet as the instance doesn't exist.
// We will invalidate the child context in finishClassComponent() right after rendering.
var hasContext;
if (isContextProvider(Component)) {
hasContext = true;
pushContextProvider(workInProgress);
} else {
hasContext = false;
}
prepareToReadContext(workInProgress, renderLanes);
constructClassInstance(workInProgress, Component, nextProps);
mountClassInstance(workInProgress, Component, nextProps, renderLanes);
return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);
}
function mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
var props = workInProgress.pendingProps;
var context;
{
var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);
context = getMaskedContext(workInProgress, unmaskedContext);
}
prepareToReadContext(workInProgress, renderLanes);
var value;
var hasId;
{
markComponentRenderStarted(workInProgress);
}
{
if (Component.prototype && typeof Component.prototype.render === 'function') {
var componentName = getComponentNameFromType(Component) || 'Unknown';
if (!didWarnAboutBadClass[componentName]) {
error("The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);
didWarnAboutBadClass[componentName] = true;
}
}
if (workInProgress.mode & StrictLegacyMode) {
ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);
}
setIsRendering(true);
ReactCurrentOwner$1.current = workInProgress;
value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);
hasId = checkDidRenderIdHook();
setIsRendering(false);
}
{
markComponentRenderStopped();
} // React DevTools reads this flag.
workInProgress.flags |= PerformedWork;
{
// Support for module components is deprecated and is removed behind a flag.
// Whether or not it would crash later, we want to show a good message in DEV first.
if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
var _componentName = getComponentNameFromType(Component) || 'Unknown';
if (!didWarnAboutModulePatternComponent[_componentName]) {
error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);
didWarnAboutModulePatternComponent[_componentName] = true;
}
}
}
if ( // Run these checks in production only if the flag is off.
// Eventually we'll delete this branch altogether.
typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
{
var _componentName2 = getComponentNameFromType(Component) || 'Unknown';
if (!didWarnAboutModulePatternComponent[_componentName2]) {
error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2);
didWarnAboutModulePatternComponent[_componentName2] = true;
}
} // Proceed under the assumption that this is a class instance
workInProgress.tag = ClassComponent; // Throw out any hooks that were used.
workInProgress.memoizedState = null;
workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.
// During mounting we don't know the child context yet as the instance doesn't exist.
// We will invalidate the child context in finishClassComponent() right after rendering.
var hasContext = false;
if (isContextProvider(Component)) {
hasContext = true;
pushContextProvider(workInProgress);
} else {
hasContext = false;
}
workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;
initializeUpdateQueue(workInProgress);
adoptClassInstance(workInProgress, value);
mountClassInstance(workInProgress, Component, props, renderLanes);
return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);
} else {
// Proceed under the assumption that this is a function component
workInProgress.tag = FunctionComponent;
{
if ( workInProgress.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);
hasId = checkDidRenderIdHook();
} finally {
setIsStrictModeForDevtools(false);
}
}
}
if (getIsHydrating() && hasId) {
pushMaterializedTreeId(workInProgress);
}
reconcileChildren(null, workInProgress, value, renderLanes);
{
validateFunctionComponentInDev(workInProgress, Component);
}
return workInProgress.child;
}
}
function validateFunctionComponentInDev(workInProgress, Component) {
{
if (Component) {
if (Component.childContextTypes) {
error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');
}
}
if (workInProgress.ref !== null) {
var info = '';
var ownerName = getCurrentFiberOwnerNameInDevOrNull();
if (ownerName) {
info += '\n\nCheck the render method of `' + ownerName + '`.';
}
var warningKey = ownerName || '';
var debugSource = workInProgress._debugSource;
if (debugSource) {
warningKey = debugSource.fileName + ':' + debugSource.lineNumber;
}
if (!didWarnAboutFunctionRefs[warningKey]) {
didWarnAboutFunctionRefs[warningKey] = true;
error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);
}
}
if (typeof Component.getDerivedStateFromProps === 'function') {
var _componentName3 = getComponentNameFromType(Component) || 'Unknown';
if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {
error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;
}
}
if (typeof Component.contextType === 'object' && Component.contextType !== null) {
var _componentName4 = getComponentNameFromType(Component) || 'Unknown';
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
error('%s: Function components do not support contextType.', _componentName4);
didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
}
}
}
}
var SUSPENDED_MARKER = {
dehydrated: null,
treeContext: null,
retryLane: NoLane
};
function mountSuspenseOffscreenState(renderLanes) {
return {
baseLanes: renderLanes,
cachePool: getSuspendedCache(),
transitions: null
};
}
function updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {
var cachePool = null;
return {
baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes),
cachePool: cachePool,
transitions: prevOffscreenState.transitions
};
} // TODO: Probably should inline this back
function shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {
// If we're already showing a fallback, there are cases where we need to
// remain on that fallback regardless of whether the content has resolved.
// For example, SuspenseList coordinates when nested content appears.
if (current !== null) {
var suspenseState = current.memoizedState;
if (suspenseState === null) {
// Currently showing content. Don't hide it, even if ForceSuspenseFallback
// is true. More precise name might be "ForceRemainSuspenseFallback".
// Note: This is a factoring smell. Can't remain on a fallback if there's
// no fallback to remain on.
return false;
}
} // Not currently showing content. Consult the Suspense context.
return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
}
function getRemainingWorkInPrimaryTree(current, renderLanes) {
// TODO: Should not remove render lanes that were pinged during this render
return removeLanes(current.childLanes, renderLanes);
}
function updateSuspenseComponent(current, workInProgress, renderLanes) {
var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.
{
if (shouldSuspend(workInProgress)) {
workInProgress.flags |= DidCapture;
}
}
var suspenseContext = suspenseStackCursor.current;
var showFallback = false;
var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags;
if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {
// Something in this boundary's subtree already suspended. Switch to
// rendering the fallback children.
showFallback = true;
workInProgress.flags &= ~DidCapture;
} else {
// Attempting the main content
if (current === null || current.memoizedState !== null) {
// This is a new mount or this boundary is already showing a fallback state.
// Mark this subtree context as having at least one invisible parent that could
// handle the fallback state.
// Avoided boundaries are not considered since they cannot handle preferred fallback states.
{
suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);
}
}
}
suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense
// boundary's children. This involves some custom reconciliation logic. Two
// main reasons this is so complicated.
//
// First, Legacy Mode has different semantics for backwards compatibility. The
// primary tree will commit in an inconsistent state, so when we do the
// second pass to render the fallback, we do some exceedingly, uh, clever
// hacks to make that not totally break. Like transferring effects and
// deletions from hidden tree. In Concurrent Mode, it's much simpler,
// because we bailout on the primary tree completely and leave it in its old
// state, no effects. Same as what we do for Offscreen (except that
// Offscreen doesn't have the first render pass).
//
// Second is hydration. During hydration, the Suspense fiber has a slightly
// different layout, where the child points to a dehydrated fragment, which
// contains the DOM rendered by the server.
//
// Third, even if you set all that aside, Suspense is like error boundaries in
// that we first we try to render one tree, and if that fails, we render again
// and switch to a different tree. Like a try/catch block. So we have to track
// which branch we're currently rendering. Ideally we would model this using
// a stack.
if (current === null) {
// Initial mount
// Special path for hydration
// If we're currently hydrating, try to hydrate this boundary.
tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.
var suspenseState = workInProgress.memoizedState;
if (suspenseState !== null) {
var dehydrated = suspenseState.dehydrated;
if (dehydrated !== null) {
return mountDehydratedSuspenseComponent(workInProgress, dehydrated);
}
}
var nextPrimaryChildren = nextProps.children;
var nextFallbackChildren = nextProps.fallback;
if (showFallback) {
var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);
var primaryChildFragment = workInProgress.child;
primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);
workInProgress.memoizedState = SUSPENDED_MARKER;
return fallbackFragment;
} else {
return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren);
}
} else {
// This is an update.
// Special path for hydration
var prevState = current.memoizedState;
if (prevState !== null) {
var _dehydrated = prevState.dehydrated;
if (_dehydrated !== null) {
return updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, nextProps, _dehydrated, prevState, renderLanes);
}
}
if (showFallback) {
var _nextFallbackChildren = nextProps.fallback;
var _nextPrimaryChildren = nextProps.children;
var fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren, _nextFallbackChildren, renderLanes);
var _primaryChildFragment2 = workInProgress.child;
var prevOffscreenState = current.child.memoizedState;
_primaryChildFragment2.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);
_primaryChildFragment2.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);
workInProgress.memoizedState = SUSPENDED_MARKER;
return fallbackChildFragment;
} else {
var _nextPrimaryChildren2 = nextProps.children;
var _primaryChildFragment3 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren2, renderLanes);
workInProgress.memoizedState = null;
return _primaryChildFragment3;
}
}
}
function mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {
var mode = workInProgress.mode;
var primaryChildProps = {
mode: 'visible',
children: primaryChildren
};
var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);
primaryChildFragment.return = workInProgress;
workInProgress.child = primaryChildFragment;
return primaryChildFragment;
}
function mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {
var mode = workInProgress.mode;
var progressedPrimaryFragment = workInProgress.child;
var primaryChildProps = {
mode: 'hidden',
children: primaryChildren
};
var primaryChildFragment;
var fallbackChildFragment;
if ((mode & ConcurrentMode) === NoMode && progressedPrimaryFragment !== null) {
// In legacy mode, we commit the primary tree as if it successfully
// completed, even though it's in an inconsistent state.
primaryChildFragment = progressedPrimaryFragment;
primaryChildFragment.childLanes = NoLanes;
primaryChildFragment.pendingProps = primaryChildProps;
if ( workInProgress.mode & ProfileMode) {
// Reset the durations from the first pass so they aren't included in the
// final amounts. This seems counterintuitive, since we're intentionally
// not measuring part of the render phase, but this makes it match what we
// do in Concurrent Mode.
primaryChildFragment.actualDuration = 0;
primaryChildFragment.actualStartTime = -1;
primaryChildFragment.selfBaseDuration = 0;
primaryChildFragment.treeBaseDuration = 0;
}
fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);
} else {
primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);
fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);
}
primaryChildFragment.return = workInProgress;
fallbackChildFragment.return = workInProgress;
primaryChildFragment.sibling = fallbackChildFragment;
workInProgress.child = primaryChildFragment;
return fallbackChildFragment;
}
function mountWorkInProgressOffscreenFiber(offscreenProps, mode, renderLanes) {
// The props argument to `createFiberFromOffscreen` is `any` typed, so we use
// this wrapper function to constrain it.
return createFiberFromOffscreen(offscreenProps, mode, NoLanes, null);
}
function updateWorkInProgressOffscreenFiber(current, offscreenProps) {
// The props argument to `createWorkInProgress` is `any` typed, so we use this
// wrapper function to constrain it.
return createWorkInProgress(current, offscreenProps);
}
function updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {
var currentPrimaryChildFragment = current.child;
var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
var primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {
mode: 'visible',
children: primaryChildren
});
if ((workInProgress.mode & ConcurrentMode) === NoMode) {
primaryChildFragment.lanes = renderLanes;
}
primaryChildFragment.return = workInProgress;
primaryChildFragment.sibling = null;
if (currentFallbackChildFragment !== null) {
// Delete the fallback child fragment
var deletions = workInProgress.deletions;
if (deletions === null) {
workInProgress.deletions = [currentFallbackChildFragment];
workInProgress.flags |= ChildDeletion;
} else {
deletions.push(currentFallbackChildFragment);
}
}
workInProgress.child = primaryChildFragment;
return primaryChildFragment;
}
function updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {
var mode = workInProgress.mode;
var currentPrimaryChildFragment = current.child;
var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
var primaryChildProps = {
mode: 'hidden',
children: primaryChildren
};
var primaryChildFragment;
if ( // In legacy mode, we commit the primary tree as if it successfully
// completed, even though it's in an inconsistent state.
(mode & ConcurrentMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was
// already cloned. In legacy mode, the only case where this isn't true is
// when DevTools forces us to display a fallback; we skip the first render
// pass entirely and go straight to rendering the fallback. (In Concurrent
// Mode, SuspenseList can also trigger this scenario, but this is a legacy-
// only codepath.)
workInProgress.child !== currentPrimaryChildFragment) {
var progressedPrimaryFragment = workInProgress.child;
primaryChildFragment = progressedPrimaryFragment;
primaryChildFragment.childLanes = NoLanes;
primaryChildFragment.pendingProps = primaryChildProps;
if ( workInProgress.mode & ProfileMode) {
// Reset the durations from the first pass so they aren't included in the
// final amounts. This seems counterintuitive, since we're intentionally
// not measuring part of the render phase, but this makes it match what we
// do in Concurrent Mode.
primaryChildFragment.actualDuration = 0;
primaryChildFragment.actualStartTime = -1;
primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;
primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;
} // The fallback fiber was added as a deletion during the first pass.
// However, since we're going to remain on the fallback, we no longer want
// to delete it.
workInProgress.deletions = null;
} else {
primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps); // Since we're reusing a current tree, we need to reuse the flags, too.
// (We don't do this in legacy mode, because in legacy mode we don't re-use
// the current tree; see previous branch.)
primaryChildFragment.subtreeFlags = currentPrimaryChildFragment.subtreeFlags & StaticMask;
}
var fallbackChildFragment;
if (currentFallbackChildFragment !== null) {
fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);
} else {
fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already
// mounted but this is a new fiber.
fallbackChildFragment.flags |= Placement;
}
fallbackChildFragment.return = workInProgress;
primaryChildFragment.return = workInProgress;
primaryChildFragment.sibling = fallbackChildFragment;
workInProgress.child = primaryChildFragment;
return fallbackChildFragment;
}
function retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, recoverableError) {
// Falling back to client rendering. Because this has performance
// implications, it's considered a recoverable error, even though the user
// likely won't observe anything wrong with the UI.
//
// The error is passed in as an argument to enforce that every caller provide
// a custom message, or explicitly opt out (currently the only path that opts
// out is legacy mode; every concurrent path provides an error).
if (recoverableError !== null) {
queueHydrationError(recoverableError);
} // This will add the old fiber to the deletion list
reconcileChildFibers(workInProgress, current.child, null, renderLanes); // We're now not suspended nor dehydrated.
var nextProps = workInProgress.pendingProps;
var primaryChildren = nextProps.children;
var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Needs a placement effect because the parent (the Suspense boundary) already
// mounted but this is a new fiber.
primaryChildFragment.flags |= Placement;
workInProgress.memoizedState = null;
return primaryChildFragment;
}
function mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {
var fiberMode = workInProgress.mode;
var primaryChildProps = {
mode: 'visible',
children: primaryChildren
};
var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, fiberMode);
var fallbackChildFragment = createFiberFromFragment(fallbackChildren, fiberMode, renderLanes, null); // Needs a placement effect because the parent (the Suspense
// boundary) already mounted but this is a new fiber.
fallbackChildFragment.flags |= Placement;
primaryChildFragment.return = workInProgress;
fallbackChildFragment.return = workInProgress;
primaryChildFragment.sibling = fallbackChildFragment;
workInProgress.child = primaryChildFragment;
if ((workInProgress.mode & ConcurrentMode) !== NoMode) {
// We will have dropped the effect list which contains the
// deletion. We need to reconcile to delete the current child.
reconcileChildFibers(workInProgress, current.child, null, renderLanes);
}
return fallbackChildFragment;
}
function mountDehydratedSuspenseComponent(workInProgress, suspenseInstance, renderLanes) {
// During the first pass, we'll bail out and not drill into the children.
// Instead, we'll leave the content in place and try to hydrate it later.
if ((workInProgress.mode & ConcurrentMode) === NoMode) {
{
error('Cannot hydrate Suspense in legacy mode. Switch from ' + 'ReactDOM.hydrate(element, container) to ' + 'ReactDOMClient.hydrateRoot(container, <App />)' + '.render(element) or remove the Suspense components from ' + 'the server rendered components.');
}
workInProgress.lanes = laneToLanes(SyncLane);
} else if (isSuspenseInstanceFallback(suspenseInstance)) {
// This is a client-only boundary. Since we won't get any content from the server
// for this, we need to schedule that at a higher priority based on when it would
// have timed out. In theory we could render it in this pass but it would have the
// wrong priority associated with it and will prevent hydration of parent path.
// Instead, we'll leave work left on it to render it in a separate commit.
// TODO This time should be the time at which the server rendered response that is
// a parent to this boundary was displayed. However, since we currently don't have
// a protocol to transfer that time, we'll just estimate it by using the current
// time. This will mean that Suspense timeouts are slightly shifted to later than
// they should be.
// Schedule a normal pri update to render this content.
workInProgress.lanes = laneToLanes(DefaultHydrationLane);
} else {
// We'll continue hydrating the rest at offscreen priority since we'll already
// be showing the right content coming from the server, it is no rush.
workInProgress.lanes = laneToLanes(OffscreenLane);
}
return null;
}
function updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, nextProps, suspenseInstance, suspenseState, renderLanes) {
if (!didSuspend) {
// This is the first render pass. Attempt to hydrate.
// We should never be hydrating at this point because it is the first pass,
// but after we've already committed once.
warnIfHydrating();
if ((workInProgress.mode & ConcurrentMode) === NoMode) {
return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, // TODO: When we delete legacy mode, we should make this error argument
// required — every concurrent mode path that causes hydration to
// de-opt to client rendering should have an error message.
null);
}
if (isSuspenseInstanceFallback(suspenseInstance)) {
// This boundary is in a permanent fallback state. In this case, we'll never
// get an update and we'll never be able to hydrate the final content. Let's just try the
// client side render instead.
var digest, message, stack;
{
var _getSuspenseInstanceF = getSuspenseInstanceFallbackErrorDetails(suspenseInstance);
digest = _getSuspenseInstanceF.digest;
message = _getSuspenseInstanceF.message;
stack = _getSuspenseInstanceF.stack;
}
var error;
if (message) {
// eslint-disable-next-line react-internal/prod-error-codes
error = new Error(message);
} else {
error = new Error('The server could not finish this Suspense boundary, likely ' + 'due to an error during server rendering. Switched to ' + 'client rendering.');
}
var capturedValue = createCapturedValue(error, digest, stack);
return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, capturedValue);
}
// any context has changed, we need to treat is as if the input might have changed.
var hasContextChanged = includesSomeLane(renderLanes, current.childLanes);
if (didReceiveUpdate || hasContextChanged) {
// This boundary has changed since the first render. This means that we are now unable to
// hydrate it. We might still be able to hydrate it using a higher priority lane.
var root = getWorkInProgressRoot();
if (root !== null) {
var attemptHydrationAtLane = getBumpedLaneForHydration(root, renderLanes);
if (attemptHydrationAtLane !== NoLane && attemptHydrationAtLane !== suspenseState.retryLane) {
// Intentionally mutating since this render will get interrupted. This
// is one of the very rare times where we mutate the current tree
// during the render phase.
suspenseState.retryLane = attemptHydrationAtLane; // TODO: Ideally this would inherit the event time of the current render
var eventTime = NoTimestamp;
enqueueConcurrentRenderForLane(current, attemptHydrationAtLane);
scheduleUpdateOnFiber(root, current, attemptHydrationAtLane, eventTime);
}
} // If we have scheduled higher pri work above, this will probably just abort the render
// since we now have higher priority work, but in case it doesn't, we need to prepare to
// render something, if we time out. Even if that requires us to delete everything and
// skip hydration.
// Delay having to do this as long as the suspense timeout allows us.
renderDidSuspendDelayIfPossible();
var _capturedValue = createCapturedValue(new Error('This Suspense boundary received an update before it finished ' + 'hydrating. This caused the boundary to switch to client rendering. ' + 'The usual way to fix this is to wrap the original update ' + 'in startTransition.'));
return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, _capturedValue);
} else if (isSuspenseInstancePending(suspenseInstance)) {
// This component is still pending more data from the server, so we can't hydrate its
// content. We treat it as if this component suspended itself. It might seem as if
// we could just try to render it client-side instead. However, this will perform a
// lot of unnecessary work and is unlikely to complete since it often will suspend
// on missing data anyway. Additionally, the server might be able to render more
// than we can on the client yet. In that case we'd end up with more fallback states
// on the client than if we just leave it alone. If the server times out or errors
// these should update this boundary to the permanent Fallback state instead.
// Mark it as having captured (i.e. suspended).
workInProgress.flags |= DidCapture; // Leave the child in place. I.e. the dehydrated fragment.
workInProgress.child = current.child; // Register a callback to retry this boundary once the server has sent the result.
var retry = retryDehydratedSuspenseBoundary.bind(null, current);
registerSuspenseInstanceRetry(suspenseInstance, retry);
return null;
} else {
// This is the first attempt.
reenterHydrationStateFromDehydratedSuspenseInstance(workInProgress, suspenseInstance, suspenseState.treeContext);
var primaryChildren = nextProps.children;
var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Mark the children as hydrating. This is a fast path to know whether this
// tree is part of a hydrating tree. This is used to determine if a child
// node has fully mounted yet, and for scheduling event replaying.
// Conceptually this is similar to Placement in that a new subtree is
// inserted into the React tree here. It just happens to not need DOM
// mutations because it already exists.
primaryChildFragment.flags |= Hydrating;
return primaryChildFragment;
}
} else {
// This is the second render pass. We already attempted to hydrated, but
// something either suspended or errored.
if (workInProgress.flags & ForceClientRender) {
// Something errored during hydration. Try again without hydrating.
workInProgress.flags &= ~ForceClientRender;
var _capturedValue2 = createCapturedValue(new Error('There was an error while hydrating this Suspense boundary. ' + 'Switched to client rendering.'));
return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, _capturedValue2);
} else if (workInProgress.memoizedState !== null) {
// Something suspended and we should still be in dehydrated mode.
// Leave the existing child in place.
workInProgress.child = current.child; // The dehydrated completion pass expects this flag to be there
// but the normal suspense pass doesn't.
workInProgress.flags |= DidCapture;
return null;
} else {
// Suspended but we should no longer be in dehydrated mode.
// Therefore we now have to render the fallback.
var nextPrimaryChildren = nextProps.children;
var nextFallbackChildren = nextProps.fallback;
var fallbackChildFragment = mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);
var _primaryChildFragment4 = workInProgress.child;
_primaryChildFragment4.memoizedState = mountSuspenseOffscreenState(renderLanes);
workInProgress.memoizedState = SUSPENDED_MARKER;
return fallbackChildFragment;
}
}
}
function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {
fiber.lanes = mergeLanes(fiber.lanes, renderLanes);
var alternate = fiber.alternate;
if (alternate !== null) {
alternate.lanes = mergeLanes(alternate.lanes, renderLanes);
}
scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);
}
function propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {
// Mark any Suspense boundaries with fallbacks as having work to do.
// If they were previously forced into fallbacks, they may now be able
// to unblock.
var node = firstChild;
while (node !== null) {
if (node.tag === SuspenseComponent) {
var state = node.memoizedState;
if (state !== null) {
scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);
}
} else if (node.tag === SuspenseListComponent) {
// If the tail is hidden there might not be an Suspense boundaries
// to schedule work on. In this case we have to schedule it on the
// list itself.
// We don't have to traverse to the children of the list since
// the list will propagate the change when it rerenders.
scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);
} else if (node.child !== null) {
node.child.return = node;
node = node.child;
continue;
}
if (node === workInProgress) {
return;
}
while (node.sibling === null) {
if (node.return === null || node.return === workInProgress) {
return;
}
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
}
function findLastContentRow(firstChild) {
// This is going to find the last row among these children that is already
// showing content on the screen, as opposed to being in fallback state or
// new. If a row has multiple Suspense boundaries, any of them being in the
// fallback state, counts as the whole row being in a fallback state.
// Note that the "rows" will be workInProgress, but any nested children
// will still be current since we haven't rendered them yet. The mounted
// order may not be the same as the new order. We use the new order.
var row = firstChild;
var lastContentRow = null;
while (row !== null) {
var currentRow = row.alternate; // New rows can't be content rows.
if (currentRow !== null && findFirstSuspended(currentRow) === null) {
lastContentRow = row;
}
row = row.sibling;
}
return lastContentRow;
}
function validateRevealOrder(revealOrder) {
{
if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {
didWarnAboutRevealOrder[revealOrder] = true;
if (typeof revealOrder === 'string') {
switch (revealOrder.toLowerCase()) {
case 'together':
case 'forwards':
case 'backwards':
{
error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase "%s" instead.', revealOrder, revealOrder.toLowerCase());
break;
}
case 'forward':
case 'backward':
{
error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use "%ss" instead.', revealOrder, revealOrder.toLowerCase());
break;
}
default:
error('"%s" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);
break;
}
} else {
error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);
}
}
}
}
function validateTailOptions(tailMode, revealOrder) {
{
if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {
if (tailMode !== 'collapsed' && tailMode !== 'hidden') {
didWarnAboutTailOptions[tailMode] = true;
error('"%s" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean "collapsed" or "hidden"?', tailMode);
} else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {
didWarnAboutTailOptions[tailMode] = true;
error('<SuspenseList tail="%s" /> is only valid if revealOrder is ' + '"forwards" or "backwards". ' + 'Did you mean to specify revealOrder="forwards"?', tailMode);
}
}
}
}
function validateSuspenseListNestedChild(childSlot, index) {
{
var isAnArray = isArray(childSlot);
var isIterable = !isAnArray && typeof getIteratorFn(childSlot) === 'function';
if (isAnArray || isIterable) {
var type = isAnArray ? 'array' : 'iterable';
error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);
return false;
}
}
return true;
}
function validateSuspenseListChildren(children, revealOrder) {
{
if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {
if (isArray(children)) {
for (var i = 0; i < children.length; i++) {
if (!validateSuspenseListNestedChild(children[i], i)) {
return;
}
}
} else {
var iteratorFn = getIteratorFn(children);
if (typeof iteratorFn === 'function') {
var childrenIterator = iteratorFn.call(children);
if (childrenIterator) {
var step = childrenIterator.next();
var _i = 0;
for (; !step.done; step = childrenIterator.next()) {
if (!validateSuspenseListNestedChild(step.value, _i)) {
return;
}
_i++;
}
}
} else {
error('A single row was passed to a <SuspenseList revealOrder="%s" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);
}
}
}
}
}
function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode) {
var renderState = workInProgress.memoizedState;
if (renderState === null) {
workInProgress.memoizedState = {
isBackwards: isBackwards,
rendering: null,
renderingStartTime: 0,
last: lastContentRow,
tail: tail,
tailMode: tailMode
};
} else {
// We can reuse the existing object from previous renders.
renderState.isBackwards = isBackwards;
renderState.rendering = null;
renderState.renderingStartTime = 0;
renderState.last = lastContentRow;
renderState.tail = tail;
renderState.tailMode = tailMode;
}
} // This can end up rendering this component multiple passes.
// The first pass splits the children fibers into two sets. A head and tail.
// We first render the head. If anything is in fallback state, we do another
// pass through beginWork to rerender all children (including the tail) with
// the force suspend context. If the first render didn't have anything in
// in fallback state. Then we render each row in the tail one-by-one.
// That happens in the completeWork phase without going back to beginWork.
function updateSuspenseListComponent(current, workInProgress, renderLanes) {
var nextProps = workInProgress.pendingProps;
var revealOrder = nextProps.revealOrder;
var tailMode = nextProps.tail;
var newChildren = nextProps.children;
validateRevealOrder(revealOrder);
validateTailOptions(tailMode, revealOrder);
validateSuspenseListChildren(newChildren, revealOrder);
reconcileChildren(current, workInProgress, newChildren, renderLanes);
var suspenseContext = suspenseStackCursor.current;
var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
if (shouldForceFallback) {
suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
workInProgress.flags |= DidCapture;
} else {
var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;
if (didSuspendBefore) {
// If we previously forced a fallback, we need to schedule work
// on any nested boundaries to let them know to try to render
// again. This is the same as context updating.
propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);
}
suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
}
pushSuspenseContext(workInProgress, suspenseContext);
if ((workInProgress.mode & ConcurrentMode) === NoMode) {
// In legacy mode, SuspenseList doesn't work so we just
// use make it a noop by treating it as the default revealOrder.
workInProgress.memoizedState = null;
} else {
switch (revealOrder) {
case 'forwards':
{
var lastContentRow = findLastContentRow(workInProgress.child);
var tail;
if (lastContentRow === null) {
// The whole list is part of the tail.
// TODO: We could fast path by just rendering the tail now.
tail = workInProgress.child;
workInProgress.child = null;
} else {
// Disconnect the tail rows after the content row.
// We're going to render them separately later.
tail = lastContentRow.sibling;
lastContentRow.sibling = null;
}
initSuspenseListRenderState(workInProgress, false, // isBackwards
tail, lastContentRow, tailMode);
break;
}
case 'backwards':
{
// We're going to find the first row that has existing content.
// At the same time we're going to reverse the list of everything
// we pass in the meantime. That's going to be our tail in reverse
// order.
var _tail = null;
var row = workInProgress.child;
workInProgress.child = null;
while (row !== null) {
var currentRow = row.alternate; // New rows can't be content rows.
if (currentRow !== null && findFirstSuspended(currentRow) === null) {
// This is the beginning of the main content.
workInProgress.child = row;
break;
}
var nextRow = row.sibling;
row.sibling = _tail;
_tail = row;
row = nextRow;
} // TODO: If workInProgress.child is null, we can continue on the tail immediately.
initSuspenseListRenderState(workInProgress, true, // isBackwards
_tail, null, // last
tailMode);
break;
}
case 'together':
{
initSuspenseListRenderState(workInProgress, false, // isBackwards
null, // tail
null, // last
undefined);
break;
}
default:
{
// The default reveal order is the same as not having
// a boundary.
workInProgress.memoizedState = null;
}
}
}
return workInProgress.child;
}
function updatePortalComponent(current, workInProgress, renderLanes) {
pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
var nextChildren = workInProgress.pendingProps;
if (current === null) {
// Portals are special because we don't append the children during mount
// but at commit. Therefore we need to track insertions which the normal
// flow doesn't do during mount. This doesn't happen at the root because
// the root always starts with a "current" with a null child.
// TODO: Consider unifying this with how the root works.
workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);
} else {
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
}
return workInProgress.child;
}
var hasWarnedAboutUsingNoValuePropOnContextProvider = false;
function updateContextProvider(current, workInProgress, renderLanes) {
var providerType = workInProgress.type;
var context = providerType._context;
var newProps = workInProgress.pendingProps;
var oldProps = workInProgress.memoizedProps;
var newValue = newProps.value;
{
if (!('value' in newProps)) {
if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {
hasWarnedAboutUsingNoValuePropOnContextProvider = true;
error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');
}
}
var providerPropTypes = workInProgress.type.propTypes;
if (providerPropTypes) {
checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider');
}
}
pushProvider(workInProgress, context, newValue);
{
if (oldProps !== null) {
var oldValue = oldProps.value;
if (objectIs(oldValue, newValue)) {
// No change. Bailout early if children are the same.
if (oldProps.children === newProps.children && !hasContextChanged()) {
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
}
} else {
// The context value changed. Search for matching consumers and schedule
// them to update.
propagateContextChange(workInProgress, context, renderLanes);
}
}
}
var newChildren = newProps.children;
reconcileChildren(current, workInProgress, newChildren, renderLanes);
return workInProgress.child;
}
var hasWarnedAboutUsingContextAsConsumer = false;
function updateContextConsumer(current, workInProgress, renderLanes) {
var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
// DEV mode, we create a separate object for Context.Consumer that acts
// like a proxy to Context. This proxy object adds unnecessary code in PROD
// so we use the old behaviour (Context.Consumer references Context) to
// reduce size and overhead. The separate object references context via
// a property called "_context", which also gives us the ability to check
// in DEV mode if this property exists or not and warn if it does not.
{
if (context._context === undefined) {
// This may be because it's a Context (rather than a Consumer).
// Or it may be because it's older React where they're the same thing.
// We only want to warn if we're sure it's a new React.
if (context !== context.Consumer) {
if (!hasWarnedAboutUsingContextAsConsumer) {
hasWarnedAboutUsingContextAsConsumer = true;
error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
}
}
} else {
context = context._context;
}
}
var newProps = workInProgress.pendingProps;
var render = newProps.children;
{
if (typeof render !== 'function') {
error('A context consumer was rendered with multiple children, or a child ' + "that isn't a function. A context consumer expects a single child " + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');
}
}
prepareToReadContext(workInProgress, renderLanes);
var newValue = readContext(context);
{
markComponentRenderStarted(workInProgress);
}
var newChildren;
{
ReactCurrentOwner$1.current = workInProgress;
setIsRendering(true);
newChildren = render(newValue);
setIsRendering(false);
}
{
markComponentRenderStopped();
} // React DevTools reads this flag.
workInProgress.flags |= PerformedWork;
reconcileChildren(current, workInProgress, newChildren, renderLanes);
return workInProgress.child;
}
function markWorkInProgressReceivedUpdate() {
didReceiveUpdate = true;
}
function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) {
if ((workInProgress.mode & ConcurrentMode) === NoMode) {
if (current !== null) {
// A lazy component only mounts if it suspended inside a non-
// concurrent tree, in an inconsistent state. We want to treat it like
// a new mount, even though an empty version of it already committed.
// Disconnect the alternate pointers.
current.alternate = null;
workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
workInProgress.flags |= Placement;
}
}
}
function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {
if (current !== null) {
// Reuse previous dependencies
workInProgress.dependencies = current.dependencies;
}
{
// Don't update "base" render times for bailouts.
stopProfilerTimerIfRunning();
}
markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.
if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {
// The children don't have any work either. We can skip them.
// TODO: Once we add back resuming, we should check if the children are
// a work-in-progress set. If so, we need to transfer their effects.
{
return null;
}
} // This fiber doesn't have work, but its subtree does. Clone the child
// fibers and continue.
cloneChildFibers(current, workInProgress);
return workInProgress.child;
}
function remountFiber(current, oldWorkInProgress, newWorkInProgress) {
{
var returnFiber = oldWorkInProgress.return;
if (returnFiber === null) {
// eslint-disable-next-line react-internal/prod-error-codes
throw new Error('Cannot swap the root fiber.');
} // Disconnect from the old current.
// It will get deleted.
current.alternate = null;
oldWorkInProgress.alternate = null; // Connect to the new tree.
newWorkInProgress.index = oldWorkInProgress.index;
newWorkInProgress.sibling = oldWorkInProgress.sibling;
newWorkInProgress.return = oldWorkInProgress.return;
newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.
if (oldWorkInProgress === returnFiber.child) {
returnFiber.child = newWorkInProgress;
} else {
var prevSibling = returnFiber.child;
if (prevSibling === null) {
// eslint-disable-next-line react-internal/prod-error-codes
throw new Error('Expected parent to have a child.');
}
while (prevSibling.sibling !== oldWorkInProgress) {
prevSibling = prevSibling.sibling;
if (prevSibling === null) {
// eslint-disable-next-line react-internal/prod-error-codes
throw new Error('Expected to find the previous sibling.');
}
}
prevSibling.sibling = newWorkInProgress;
} // Delete the old fiber and place the new one.
// Since the old fiber is disconnected, we have to schedule it manually.
var deletions = returnFiber.deletions;
if (deletions === null) {
returnFiber.deletions = [current];
returnFiber.flags |= ChildDeletion;
} else {
deletions.push(current);
}
newWorkInProgress.flags |= Placement; // Restart work from the new fiber.
return newWorkInProgress;
}
}
function checkScheduledUpdateOrContext(current, renderLanes) {
// Before performing an early bailout, we must check if there are pending
// updates or context.
var updateLanes = current.lanes;
if (includesSomeLane(updateLanes, renderLanes)) {
return true;
} // No pending update, but because context is propagated lazily, we need
return false;
}
function attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes) {
// This fiber does not have any pending work. Bailout without entering
// the begin phase. There's still some bookkeeping we that needs to be done
// in this optimized path, mostly pushing stuff onto the stack.
switch (workInProgress.tag) {
case HostRoot:
pushHostRootContext(workInProgress);
var root = workInProgress.stateNode;
resetHydrationState();
break;
case HostComponent:
pushHostContext(workInProgress);
break;
case ClassComponent:
{
var Component = workInProgress.type;
if (isContextProvider(Component)) {
pushContextProvider(workInProgress);
}
break;
}
case HostPortal:
pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
break;
case ContextProvider:
{
var newValue = workInProgress.memoizedProps.value;
var context = workInProgress.type._context;
pushProvider(workInProgress, context, newValue);
break;
}
case Profiler:
{
// Profiler should only call onRender when one of its descendants actually rendered.
var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);
if (hasChildWork) {
workInProgress.flags |= Update;
}
{
// Reset effect durations for the next eventual effect phase.
// These are reset during render to allow the DevTools commit hook a chance to read them,
var stateNode = workInProgress.stateNode;
stateNode.effectDuration = 0;
stateNode.passiveEffectDuration = 0;
}
}
break;
case SuspenseComponent:
{
var state = workInProgress.memoizedState;
if (state !== null) {
if (state.dehydrated !== null) {
pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // We know that this component will suspend again because if it has
// been unsuspended it has committed as a resolved Suspense component.
// If it needs to be retried, it should have work scheduled on it.
workInProgress.flags |= DidCapture; // We should never render the children of a dehydrated boundary until we
// upgrade it. We return null instead of bailoutOnAlreadyFinishedWork.
return null;
} // If this boundary is currently timed out, we need to decide
// whether to retry the primary children, or to skip over it and
// go straight to the fallback. Check the priority of the primary
// child fragment.
var primaryChildFragment = workInProgress.child;
var primaryChildLanes = primaryChildFragment.childLanes;
if (includesSomeLane(renderLanes, primaryChildLanes)) {
// The primary children have pending work. Use the normal path
// to attempt to render the primary children again.
return updateSuspenseComponent(current, workInProgress, renderLanes);
} else {
// The primary child fragment does not have pending work marked
// on it
pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient
// priority. Bailout.
var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
if (child !== null) {
// The fallback children have pending work. Skip over the
// primary children and work on the fallback.
return child.sibling;
} else {
// Note: We can return `null` here because we already checked
// whether there were nested context consumers, via the call to
// `bailoutOnAlreadyFinishedWork` above.
return null;
}
}
} else {
pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
}
break;
}
case SuspenseListComponent:
{
var didSuspendBefore = (current.flags & DidCapture) !== NoFlags;
var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);
if (didSuspendBefore) {
if (_hasChildWork) {
// If something was in fallback state last time, and we have all the
// same children then we're still in progressive loading state.
// Something might get unblocked by state updates or retries in the
// tree which will affect the tail. So we need to use the normal
// path to compute the correct tail.
return updateSuspenseListComponent(current, workInProgress, renderLanes);
} // If none of the children had any work, that means that none of
// them got retried so they'll still be blocked in the same way
// as before. We can fast bail out.
workInProgress.flags |= DidCapture;
} // If nothing suspended before and we're rendering the same children,
// then the tail doesn't matter. Anything new that suspends will work
// in the "together" mode, so we can continue from the state we had.
var renderState = workInProgress.memoizedState;
if (renderState !== null) {
// Reset to the "together" mode in case we've started a different
// update in the past but didn't complete it.
renderState.rendering = null;
renderState.tail = null;
renderState.lastEffect = null;
}
pushSuspenseContext(workInProgress, suspenseStackCursor.current);
if (_hasChildWork) {
break;
} else {
// If none of the children had any work, that means that none of
// them got retried so they'll still be blocked in the same way
// as before. We can fast bail out.
return null;
}
}
case OffscreenComponent:
case LegacyHiddenComponent:
{
// Need to check if the tree still needs to be deferred. This is
// almost identical to the logic used in the normal update path,
// so we'll just enter that. The only difference is we'll bail out
// at the next level instead of this one, because the child props
// have not changed. Which is fine.
// TODO: Probably should refactor `beginWork` to split the bailout
// path from the normal path. I'm tempted to do a labeled break here
// but I won't :)
workInProgress.lanes = NoLanes;
return updateOffscreenComponent(current, workInProgress, renderLanes);
}
}
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
}
function beginWork(current, workInProgress, renderLanes) {
{
if (workInProgress._debugNeedsRemount && current !== null) {
// This will restart the begin phase with a new fiber.
return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));
}
}
if (current !== null) {
var oldProps = current.memoizedProps;
var newProps = workInProgress.pendingProps;
if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:
workInProgress.type !== current.type )) {
// If props or context changed, mark the fiber as having performed work.
// This may be unset if the props are determined to be equal later (memo).
didReceiveUpdate = true;
} else {
// Neither props nor legacy context changes. Check if there's a pending
// update or context change.
var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);
if (!hasScheduledUpdateOrContext && // If this is the second pass of an error or suspense boundary, there
// may not be work scheduled on `current`, so we check for this flag.
(workInProgress.flags & DidCapture) === NoFlags) {
// No pending updates or context. Bail out now.
didReceiveUpdate = false;
return attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes);
}
if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
// This is a special case that only exists for legacy mode.
// See https://github.com/facebook/react/pull/19216.
didReceiveUpdate = true;
} else {
// An update was scheduled on this fiber, but there are no new props
// nor legacy context. Set this to false. If an update queue or context
// consumer produces a changed value, it will set this to true. Otherwise,
// the component will assume the children have not changed and bail out.
didReceiveUpdate = false;
}
}
} else {
didReceiveUpdate = false;
if (getIsHydrating() && isForkedChild(workInProgress)) {
// Check if this child belongs to a list of muliple children in
// its parent.
//
// In a true multi-threaded implementation, we would render children on
// parallel threads. This would represent the beginning of a new render
// thread for this subtree.
//
// We only use this for id generation during hydration, which is why the
// logic is located in this special branch.
var slotIndex = workInProgress.index;
var numberOfForks = getForksAtLevel();
pushTreeId(workInProgress, numberOfForks, slotIndex);
}
} // Before entering the begin phase, clear pending update priority.
// TODO: This assumes that we're about to evaluate the component and process
// the update queue. However, there's an exception: SimpleMemoComponent
// sometimes bails out later in the begin phase. This indicates that we should
// move this assignment out of the common path and into each branch.
workInProgress.lanes = NoLanes;
switch (workInProgress.tag) {
case IndeterminateComponent:
{
return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);
}
case LazyComponent:
{
var elementType = workInProgress.elementType;
return mountLazyComponent(current, workInProgress, elementType, renderLanes);
}
case FunctionComponent:
{
var Component = workInProgress.type;
var unresolvedProps = workInProgress.pendingProps;
var resolvedProps = workInProgress.elementType === Component ? unresolvedProps : resolveDefaultProps(Component, unresolvedProps);
return updateFunctionComponent(current, workInProgress, Component, resolvedProps, renderLanes);
}
case ClassComponent:
{
var _Component = workInProgress.type;
var _unresolvedProps = workInProgress.pendingProps;
var _resolvedProps = workInProgress.elementType === _Component ? _unresolvedProps : resolveDefaultProps(_Component, _unresolvedProps);
return updateClassComponent(current, workInProgress, _Component, _resolvedProps, renderLanes);
}
case HostRoot:
return updateHostRoot(current, workInProgress, renderLanes);
case HostComponent:
return updateHostComponent(current, workInProgress, renderLanes);
case HostText:
return updateHostText(current, workInProgress);
case SuspenseComponent:
return updateSuspenseComponent(current, workInProgress, renderLanes);
case HostPortal:
return updatePortalComponent(current, workInProgress, renderLanes);
case ForwardRef:
{
var type = workInProgress.type;
var _unresolvedProps2 = workInProgress.pendingProps;
var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);
}
case Fragment:
return updateFragment(current, workInProgress, renderLanes);
case Mode:
return updateMode(current, workInProgress, renderLanes);
case Profiler:
return updateProfiler(current, workInProgress, renderLanes);
case ContextProvider:
return updateContextProvider(current, workInProgress, renderLanes);
case ContextConsumer:
return updateContextConsumer(current, workInProgress, renderLanes);
case MemoComponent:
{
var _type2 = workInProgress.type;
var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.
var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);
{
if (workInProgress.type !== workInProgress.elementType) {
var outerPropTypes = _type2.propTypes;
if (outerPropTypes) {
checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only
'prop', getComponentNameFromType(_type2));
}
}
}
_resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);
return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, renderLanes);
}
case SimpleMemoComponent:
{
return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, renderLanes);
}
case IncompleteClassComponent:
{
var _Component2 = workInProgress.type;
var _unresolvedProps4 = workInProgress.pendingProps;
var _resolvedProps4 = workInProgress.elementType === _Component2 ? _unresolvedProps4 : resolveDefaultProps(_Component2, _unresolvedProps4);
return mountIncompleteClassComponent(current, workInProgress, _Component2, _resolvedProps4, renderLanes);
}
case SuspenseListComponent:
{
return updateSuspenseListComponent(current, workInProgress, renderLanes);
}
case ScopeComponent:
{
break;
}
case OffscreenComponent:
{
return updateOffscreenComponent(current, workInProgress, renderLanes);
}
}
throw new Error("Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in " + 'React. Please file an issue.');
}
function markUpdate(workInProgress) {
// Tag the fiber with an update effect. This turns a Placement into
// a PlacementAndUpdate.
workInProgress.flags |= Update;
}
function markRef$1(workInProgress) {
workInProgress.flags |= Ref;
{
workInProgress.flags |= RefStatic;
}
}
var appendAllChildren;
var updateHostContainer;
var updateHostComponent$1;
var updateHostText$1;
{
// Mutation mode
appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {
// We only have the top Fiber that was created but we need recurse down its
// children to find all the terminal nodes.
var node = workInProgress.child;
while (node !== null) {
if (node.tag === HostComponent || node.tag === HostText) {
appendInitialChild(parent, node.stateNode);
} else if (node.tag === HostPortal) ; else if (node.child !== null) {
node.child.return = node;
node = node.child;
continue;
}
if (node === workInProgress) {
return;
}
while (node.sibling === null) {
if (node.return === null || node.return === workInProgress) {
return;
}
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
};
updateHostContainer = function (current, workInProgress) {// Noop
};
updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {
// If we have an alternate, that means this is an update and we need to
// schedule a side-effect to do the updates.
var oldProps = current.memoizedProps;
if (oldProps === newProps) {
// In mutation mode, this is sufficient for a bailout because
// we won't touch this node even if children changed.
return;
} // If we get updated because one of our children updated, we don't
// have newProps so we'll have to reuse them.
// TODO: Split the update API as separate for the props vs. children.
// Even better would be if children weren't special cased at all tho.
var instance = workInProgress.stateNode;
var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host
// component is hitting the resume path. Figure out why. Possibly
// related to `hidden`.
var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component.
workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
// is a new ref we mark this as an update. All the work is done in commitWork.
if (updatePayload) {
markUpdate(workInProgress);
}
};
updateHostText$1 = function (current, workInProgress, oldText, newText) {
// If the text differs, mark it as an update. All the work in done in commitWork.
if (oldText !== newText) {
markUpdate(workInProgress);
}
};
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
if (getIsHydrating()) {
// If we're hydrating, we should consume as many items as we can
// so we don't leave any behind.
return;
}
switch (renderState.tailMode) {
case 'hidden':
{
// Any insertions at the end of the tail list after this point
// should be invisible. If there are already mounted boundaries
// anything before them are not considered for collapsing.
// Therefore we need to go through the whole tail to find if
// there are any.
var tailNode = renderState.tail;
var lastTailNode = null;
while (tailNode !== null) {
if (tailNode.alternate !== null) {
lastTailNode = tailNode;
}
tailNode = tailNode.sibling;
} // Next we're simply going to delete all insertions after the
// last rendered item.
if (lastTailNode === null) {
// All remaining items in the tail are insertions.
renderState.tail = null;
} else {
// Detach the insertion after the last node that was already
// inserted.
lastTailNode.sibling = null;
}
break;
}
case 'collapsed':
{
// Any insertions at the end of the tail list after this point
// should be invisible. If there are already mounted boundaries
// anything before them are not considered for collapsing.
// Therefore we need to go through the whole tail to find if
// there are any.
var _tailNode = renderState.tail;
var _lastTailNode = null;
while (_tailNode !== null) {
if (_tailNode.alternate !== null) {
_lastTailNode = _tailNode;
}
_tailNode = _tailNode.sibling;
} // Next we're simply going to delete all insertions after the
// last rendered item.
if (_lastTailNode === null) {
// All remaining items in the tail are insertions.
if (!hasRenderedATailFallback && renderState.tail !== null) {
// We suspended during the head. We want to show at least one
// row at the tail. So we'll keep on and cut off the rest.
renderState.tail.sibling = null;
} else {
renderState.tail = null;
}
} else {
// Detach the insertion after the last node that was already
// inserted.
_lastTailNode.sibling = null;
}
break;
}
}
}
function bubbleProperties(completedWork) {
var didBailout = completedWork.alternate !== null && completedWork.alternate.child === completedWork.child;
var newChildLanes = NoLanes;
var subtreeFlags = NoFlags;
if (!didBailout) {
// Bubble up the earliest expiration time.
if ( (completedWork.mode & ProfileMode) !== NoMode) {
// In profiling mode, resetChildExpirationTime is also used to reset
// profiler durations.
var actualDuration = completedWork.actualDuration;
var treeBaseDuration = completedWork.selfBaseDuration;
var child = completedWork.child;
while (child !== null) {
newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));
subtreeFlags |= child.subtreeFlags;
subtreeFlags |= child.flags; // When a fiber is cloned, its actualDuration is reset to 0. This value will
// only be updated if work is done on the fiber (i.e. it doesn't bailout).
// When work is done, it should bubble to the parent's actualDuration. If
// the fiber has not been cloned though, (meaning no work was done), then
// this value will reflect the amount of time spent working on a previous
// render. In that case it should not bubble. We determine whether it was
// cloned by comparing the child pointer.
actualDuration += child.actualDuration;
treeBaseDuration += child.treeBaseDuration;
child = child.sibling;
}
completedWork.actualDuration = actualDuration;
completedWork.treeBaseDuration = treeBaseDuration;
} else {
var _child = completedWork.child;
while (_child !== null) {
newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));
subtreeFlags |= _child.subtreeFlags;
subtreeFlags |= _child.flags; // Update the return pointer so the tree is consistent. This is a code
// smell because it assumes the commit phase is never concurrent with
// the render phase. Will address during refactor to alternate model.
_child.return = completedWork;
_child = _child.sibling;
}
}
completedWork.subtreeFlags |= subtreeFlags;
} else {
// Bubble up the earliest expiration time.
if ( (completedWork.mode & ProfileMode) !== NoMode) {
// In profiling mode, resetChildExpirationTime is also used to reset
// profiler durations.
var _treeBaseDuration = completedWork.selfBaseDuration;
var _child2 = completedWork.child;
while (_child2 !== null) {
newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child2.lanes, _child2.childLanes)); // "Static" flags share the lifetime of the fiber/hook they belong to,
// so we should bubble those up even during a bailout. All the other
// flags have a lifetime only of a single render + commit, so we should
// ignore them.
subtreeFlags |= _child2.subtreeFlags & StaticMask;
subtreeFlags |= _child2.flags & StaticMask;
_treeBaseDuration += _child2.treeBaseDuration;
_child2 = _child2.sibling;
}
completedWork.treeBaseDuration = _treeBaseDuration;
} else {
var _child3 = completedWork.child;
while (_child3 !== null) {
newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child3.lanes, _child3.childLanes)); // "Static" flags share the lifetime of the fiber/hook they belong to,
// so we should bubble those up even during a bailout. All the other
// flags have a lifetime only of a single render + commit, so we should
// ignore them.
subtreeFlags |= _child3.subtreeFlags & StaticMask;
subtreeFlags |= _child3.flags & StaticMask; // Update the return pointer so the tree is consistent. This is a code
// smell because it assumes the commit phase is never concurrent with
// the render phase. Will address during refactor to alternate model.
_child3.return = completedWork;
_child3 = _child3.sibling;
}
}
completedWork.subtreeFlags |= subtreeFlags;
}
completedWork.childLanes = newChildLanes;
return didBailout;
}
function completeDehydratedSuspenseBoundary(current, workInProgress, nextState) {
if (hasUnhydratedTailNodes() && (workInProgress.mode & ConcurrentMode) !== NoMode && (workInProgress.flags & DidCapture) === NoFlags) {
warnIfUnhydratedTailNodes(workInProgress);
resetHydrationState();
workInProgress.flags |= ForceClientRender | Incomplete | ShouldCapture;
return false;
}
var wasHydrated = popHydrationState(workInProgress);
if (nextState !== null && nextState.dehydrated !== null) {
// We might be inside a hydration state the first time we're picking up this
// Suspense boundary, and also after we've reentered it for further hydration.
if (current === null) {
if (!wasHydrated) {
throw new Error('A dehydrated suspense component was completed without a hydrated node. ' + 'This is probably a bug in React.');
}
prepareToHydrateHostSuspenseInstance(workInProgress);
bubbleProperties(workInProgress);
{
if ((workInProgress.mode & ProfileMode) !== NoMode) {
var isTimedOutSuspense = nextState !== null;
if (isTimedOutSuspense) {
// Don't count time spent in a timed out Suspense subtree as part of the base duration.
var primaryChildFragment = workInProgress.child;
if (primaryChildFragment !== null) {
// $FlowFixMe Flow doesn't support type casting in combination with the -= operator
workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration;
}
}
}
}
return false;
} else {
// We might have reentered this boundary to hydrate it. If so, we need to reset the hydration
// state since we're now exiting out of it. popHydrationState doesn't do that for us.
resetHydrationState();
if ((workInProgress.flags & DidCapture) === NoFlags) {
// This boundary did not suspend so it's now hydrated and unsuspended.
workInProgress.memoizedState = null;
} // If nothing suspended, we need to schedule an effect to mark this boundary
// as having hydrated so events know that they're free to be invoked.
// It's also a signal to replay events and the suspense callback.
// If something suspended, schedule an effect to attach retry listeners.
// So we might as well always mark this.
workInProgress.flags |= Update;
bubbleProperties(workInProgress);
{
if ((workInProgress.mode & ProfileMode) !== NoMode) {
var _isTimedOutSuspense = nextState !== null;
if (_isTimedOutSuspense) {
// Don't count time spent in a timed out Suspense subtree as part of the base duration.
var _primaryChildFragment = workInProgress.child;
if (_primaryChildFragment !== null) {
// $FlowFixMe Flow doesn't support type casting in combination with the -= operator
workInProgress.treeBaseDuration -= _primaryChildFragment.treeBaseDuration;
}
}
}
}
return false;
}
} else {
// Successfully completed this tree. If this was a forced client render,
// there may have been recoverable errors during first hydration
// attempt. If so, add them to a queue so we can log them in the
// commit phase.
upgradeHydrationErrorsToRecoverable(); // Fall through to normal Suspense path
return true;
}
}
function completeWork(current, workInProgress, renderLanes) {
var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing
// to the current tree provider fiber is just as fast and less error-prone.
// Ideally we would have a special version of the work loop only
// for hydration.
popTreeContext(workInProgress);
switch (workInProgress.tag) {
case IndeterminateComponent:
case LazyComponent:
case SimpleMemoComponent:
case FunctionComponent:
case ForwardRef:
case Fragment:
case Mode:
case Profiler:
case ContextConsumer:
case MemoComponent:
bubbleProperties(workInProgress);
return null;
case ClassComponent:
{
var Component = workInProgress.type;
if (isContextProvider(Component)) {
popContext(workInProgress);
}
bubbleProperties(workInProgress);
return null;
}
case HostRoot:
{
var fiberRoot = workInProgress.stateNode;
popHostContainer(workInProgress);
popTopLevelContextObject(workInProgress);
resetWorkInProgressVersions();
if (fiberRoot.pendingContext) {
fiberRoot.context = fiberRoot.pendingContext;
fiberRoot.pendingContext = null;
}
if (current === null || current.child === null) {
// If we hydrated, pop so that we can delete any remaining children
// that weren't hydrated.
var wasHydrated = popHydrationState(workInProgress);
if (wasHydrated) {
// If we hydrated, then we'll need to schedule an update for
// the commit side-effects on the root.
markUpdate(workInProgress);
} else {
if (current !== null) {
var prevState = current.memoizedState;
if ( // Check if this is a client root
!prevState.isDehydrated || // Check if we reverted to client rendering (e.g. due to an error)
(workInProgress.flags & ForceClientRender) !== NoFlags) {
// Schedule an effect to clear this container at the start of the
// next commit. This handles the case of React rendering into a
// container with previous children. It's also safe to do for
// updates too, because current.child would only be null if the
// previous render was null (so the container would already
// be empty).
workInProgress.flags |= Snapshot; // If this was a forced client render, there may have been
// recoverable errors during first hydration attempt. If so, add
// them to a queue so we can log them in the commit phase.
upgradeHydrationErrorsToRecoverable();
}
}
}
}
updateHostContainer(current, workInProgress);
bubbleProperties(workInProgress);
return null;
}
case HostComponent:
{
popHostContext(workInProgress);
var rootContainerInstance = getRootHostContainer();
var type = workInProgress.type;
if (current !== null && workInProgress.stateNode != null) {
updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);
if (current.ref !== workInProgress.ref) {
markRef$1(workInProgress);
}
} else {
if (!newProps) {
if (workInProgress.stateNode === null) {
throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');
} // This can happen when we abort work.
bubbleProperties(workInProgress);
return null;
}
var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
// "stack" as the parent. Then append children as we go in beginWork
// or completeWork depending on whether we want to add them top->down or
// bottom->up. Top->down is faster in IE11.
var _wasHydrated = popHydrationState(workInProgress);
if (_wasHydrated) {
// TODO: Move this and createInstance step into the beginPhase
// to consolidate.
if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {
// If changes to the hydrated node need to be applied at the
// commit-phase we mark this as such.
markUpdate(workInProgress);
}
} else {
var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);
appendAllChildren(instance, workInProgress, false, false);
workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.
// (eg DOM renderer supports auto-focus for certain elements).
// Make sure such renderers get scheduled for later work.
if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {
markUpdate(workInProgress);
}
}
if (workInProgress.ref !== null) {
// If there is a ref on a host node we need to schedule a callback
markRef$1(workInProgress);
}
}
bubbleProperties(workInProgress);
return null;
}
case HostText:
{
var newText = newProps;
if (current && workInProgress.stateNode != null) {
var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need
// to schedule a side-effect to do the updates.
updateHostText$1(current, workInProgress, oldText, newText);
} else {
if (typeof newText !== 'string') {
if (workInProgress.stateNode === null) {
throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');
} // This can happen when we abort work.
}
var _rootContainerInstance = getRootHostContainer();
var _currentHostContext = getHostContext();
var _wasHydrated2 = popHydrationState(workInProgress);
if (_wasHydrated2) {
if (prepareToHydrateHostTextInstance(workInProgress)) {
markUpdate(workInProgress);
}
} else {
workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);
}
}
bubbleProperties(workInProgress);
return null;
}
case SuspenseComponent:
{
popSuspenseContext(workInProgress);
var nextState = workInProgress.memoizedState; // Special path for dehydrated boundaries. We may eventually move this
// to its own fiber type so that we can add other kinds of hydration
// boundaries that aren't associated with a Suspense tree. In anticipation
// of such a refactor, all the hydration logic is contained in
// this branch.
if (current === null || current.memoizedState !== null && current.memoizedState.dehydrated !== null) {
var fallthroughToNormalSuspensePath = completeDehydratedSuspenseBoundary(current, workInProgress, nextState);
if (!fallthroughToNormalSuspensePath) {
if (workInProgress.flags & ShouldCapture) {
// Special case. There were remaining unhydrated nodes. We treat
// this as a mismatch. Revert to client rendering.
return workInProgress;
} else {
// Did not finish hydrating, either because this is the initial
// render or because something suspended.
return null;
}
} // Continue with the normal Suspense path.
}
if ((workInProgress.flags & DidCapture) !== NoFlags) {
// Something suspended. Re-render with the fallback children.
workInProgress.lanes = renderLanes; // Do not reset the effect list.
if ( (workInProgress.mode & ProfileMode) !== NoMode) {
transferActualDuration(workInProgress);
} // Don't bubble properties in this case.
return workInProgress;
}
var nextDidTimeout = nextState !== null;
var prevDidTimeout = current !== null && current.memoizedState !== null;
// a passive effect, which is when we process the transitions
if (nextDidTimeout !== prevDidTimeout) {
// an effect to toggle the subtree's visibility. When we switch from
// fallback -> primary, the inner Offscreen fiber schedules this effect
// as part of its normal complete phase. But when we switch from
// primary -> fallback, the inner Offscreen fiber does not have a complete
// phase. So we need to schedule its effect here.
//
// We also use this flag to connect/disconnect the effects, but the same
// logic applies: when re-connecting, the Offscreen fiber's complete
// phase will handle scheduling the effect. It's only when the fallback
// is active that we have to do anything special.
if (nextDidTimeout) {
var _offscreenFiber2 = workInProgress.child;
_offscreenFiber2.flags |= Visibility; // TODO: This will still suspend a synchronous tree if anything
// in the concurrent tree already suspended during this render.
// This is a known bug.
if ((workInProgress.mode & ConcurrentMode) !== NoMode) {
// TODO: Move this back to throwException because this is too late
// if this is a large tree which is common for initial loads. We
// don't know if we should restart a render or not until we get
// this marker, and this is too late.
// If this render already had a ping or lower pri updates,
// and this is the first time we know we're going to suspend we
// should be able to immediately restart from within throwException.
var hasInvisibleChildContext = current === null && (workInProgress.memoizedProps.unstable_avoidThisFallback !== true || !enableSuspenseAvoidThisFallback);
if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {
// If this was in an invisible tree or a new render, then showing
// this boundary is ok.
renderDidSuspend();
} else {
// Otherwise, we're going to have to hide content so we should
// suspend for longer if possible.
renderDidSuspendDelayIfPossible();
}
}
}
}
var wakeables = workInProgress.updateQueue;
if (wakeables !== null) {
// Schedule an effect to attach a retry listener to the promise.
// TODO: Move to passive phase
workInProgress.flags |= Update;
}
bubbleProperties(workInProgress);
{
if ((workInProgress.mode & ProfileMode) !== NoMode) {
if (nextDidTimeout) {
// Don't count time spent in a timed out Suspense subtree as part of the base duration.
var primaryChildFragment = workInProgress.child;
if (primaryChildFragment !== null) {
// $FlowFixMe Flow doesn't support type casting in combination with the -= operator
workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration;
}
}
}
}
return null;
}
case HostPortal:
popHostContainer(workInProgress);
updateHostContainer(current, workInProgress);
if (current === null) {
preparePortalMount(workInProgress.stateNode.containerInfo);
}
bubbleProperties(workInProgress);
return null;
case ContextProvider:
// Pop provider fiber
var context = workInProgress.type._context;
popProvider(context, workInProgress);
bubbleProperties(workInProgress);
return null;
case IncompleteClassComponent:
{
// Same as class component case. I put it down here so that the tags are
// sequential to ensure this switch is compiled to a jump table.
var _Component = workInProgress.type;
if (isContextProvider(_Component)) {
popContext(workInProgress);
}
bubbleProperties(workInProgress);
return null;
}
case SuspenseListComponent:
{
popSuspenseContext(workInProgress);
var renderState = workInProgress.memoizedState;
if (renderState === null) {
// We're running in the default, "independent" mode.
// We don't do anything in this mode.
bubbleProperties(workInProgress);
return null;
}
var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags;
var renderedTail = renderState.rendering;
if (renderedTail === null) {
// We just rendered the head.
if (!didSuspendAlready) {
// This is the first pass. We need to figure out if anything is still
// suspended in the rendered set.
// If new content unsuspended, but there's still some content that
// didn't. Then we need to do a second pass that forces everything
// to keep showing their fallbacks.
// We might be suspended if something in this render pass suspended, or
// something in the previous committed pass suspended. Otherwise,
// there's no chance so we can skip the expensive call to
// findFirstSuspended.
var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags);
if (!cannotBeSuspended) {
var row = workInProgress.child;
while (row !== null) {
var suspended = findFirstSuspended(row);
if (suspended !== null) {
didSuspendAlready = true;
workInProgress.flags |= DidCapture;
cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as
// part of the second pass. In that case nothing will subscribe to
// its thenables. Instead, we'll transfer its thenables to the
// SuspenseList so that it can retry if they resolve.
// There might be multiple of these in the list but since we're
// going to wait for all of them anyway, it doesn't really matter
// which ones gets to ping. In theory we could get clever and keep
// track of how many dependencies remain but it gets tricky because
// in the meantime, we can add/remove/change items and dependencies.
// We might bail out of the loop before finding any but that
// doesn't matter since that means that the other boundaries that
// we did find already has their listeners attached.
var newThenables = suspended.updateQueue;
if (newThenables !== null) {
workInProgress.updateQueue = newThenables;
workInProgress.flags |= Update;
} // Rerender the whole list, but this time, we'll force fallbacks
// to stay in place.
// Reset the effect flags before doing the second pass since that's now invalid.
// Reset the child fibers to their original state.
workInProgress.subtreeFlags = NoFlags;
resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediately
// rerender the children.
pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback)); // Don't bubble properties in this case.
return workInProgress.child;
}
row = row.sibling;
}
}
if (renderState.tail !== null && now() > getRenderTargetTime()) {
// We have already passed our CPU deadline but we still have rows
// left in the tail. We'll just give up further attempts to render
// the main content and only render fallbacks.
workInProgress.flags |= DidCapture;
didSuspendAlready = true;
cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
// to get it started back up to attempt the next item. While in terms
// of priority this work has the same priority as this current render,
// it's not part of the same transition once the transition has
// committed. If it's sync, we still want to yield so that it can be
// painted. Conceptually, this is really the same as pinging.
// We can use any RetryLane even if it's the one currently rendering
// since we're leaving it behind on this node.
workInProgress.lanes = SomeRetryLane;
}
} else {
cutOffTailIfNeeded(renderState, false);
} // Next we're going to render the tail.
} else {
// Append the rendered row to the child list.
if (!didSuspendAlready) {
var _suspended = findFirstSuspended(renderedTail);
if (_suspended !== null) {
workInProgress.flags |= DidCapture;
didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't
// get lost if this row ends up dropped during a second pass.
var _newThenables = _suspended.updateQueue;
if (_newThenables !== null) {
workInProgress.updateQueue = _newThenables;
workInProgress.flags |= Update;
}
cutOffTailIfNeeded(renderState, true); // This might have been modified.
if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.
) {
// We're done.
bubbleProperties(workInProgress);
return null;
}
} else if ( // The time it took to render last row is greater than the remaining
// time we have to render. So rendering one more row would likely
// exceed it.
now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {
// We have now passed our CPU deadline and we'll just give up further
// attempts to render the main content and only render fallbacks.
// The assumption is that this is usually faster.
workInProgress.flags |= DidCapture;
didSuspendAlready = true;
cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
// to get it started back up to attempt the next item. While in terms
// of priority this work has the same priority as this current render,
// it's not part of the same transition once the transition has
// committed. If it's sync, we still want to yield so that it can be
// painted. Conceptually, this is really the same as pinging.
// We can use any RetryLane even if it's the one currently rendering
// since we're leaving it behind on this node.
workInProgress.lanes = SomeRetryLane;
}
}
if (renderState.isBackwards) {
// The effect list of the backwards tail will have been added
// to the end. This breaks the guarantee that life-cycles fire in
// sibling order but that isn't a strong guarantee promised by React.
// Especially since these might also just pop in during future commits.
// Append to the beginning of the list.
renderedTail.sibling = workInProgress.child;
workInProgress.child = renderedTail;
} else {
var previousSibling = renderState.last;
if (previousSibling !== null) {
previousSibling.sibling = renderedTail;
} else {
workInProgress.child = renderedTail;
}
renderState.last = renderedTail;
}
}
if (renderState.tail !== null) {
// We still have tail rows to render.
// Pop a row.
var next = renderState.tail;
renderState.rendering = next;
renderState.tail = next.sibling;
renderState.renderingStartTime = now();
next.sibling = null; // Restore the context.
// TODO: We can probably just avoid popping it instead and only
// setting it the first time we go from not suspended to suspended.
var suspenseContext = suspenseStackCursor.current;
if (didSuspendAlready) {
suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
} else {
suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
}
pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.
// Don't bubble properties in this case.
return next;
}
bubbleProperties(workInProgress);
return null;
}
case ScopeComponent:
{
break;
}
case OffscreenComponent:
case LegacyHiddenComponent:
{
popRenderLanes(workInProgress);
var _nextState = workInProgress.memoizedState;
var nextIsHidden = _nextState !== null;
if (current !== null) {
var _prevState = current.memoizedState;
var prevIsHidden = _prevState !== null;
if (prevIsHidden !== nextIsHidden && ( // LegacyHidden doesn't do any hiding — it only pre-renders.
!enableLegacyHidden )) {
workInProgress.flags |= Visibility;
}
}
if (!nextIsHidden || (workInProgress.mode & ConcurrentMode) === NoMode) {
bubbleProperties(workInProgress);
} else {
// Don't bubble properties for hidden children unless we're rendering
// at offscreen priority.
if (includesSomeLane(subtreeRenderLanes, OffscreenLane)) {
bubbleProperties(workInProgress);
{
// Check if there was an insertion or update in the hidden subtree.
// If so, we need to hide those nodes in the commit phase, so
// schedule a visibility effect.
if ( workInProgress.subtreeFlags & (Placement | Update)) {
workInProgress.flags |= Visibility;
}
}
}
}
return null;
}
case CacheComponent:
{
return null;
}
case TracingMarkerComponent:
{
return null;
}
}
throw new Error("Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in " + 'React. Please file an issue.');
}
function unwindWork(current, workInProgress, renderLanes) {
// Note: This intentionally doesn't check if we're hydrating because comparing
// to the current tree provider fiber is just as fast and less error-prone.
// Ideally we would have a special version of the work loop only
// for hydration.
popTreeContext(workInProgress);
switch (workInProgress.tag) {
case ClassComponent:
{
var Component = workInProgress.type;
if (isContextProvider(Component)) {
popContext(workInProgress);
}
var flags = workInProgress.flags;
if (flags & ShouldCapture) {
workInProgress.flags = flags & ~ShouldCapture | DidCapture;
if ( (workInProgress.mode & ProfileMode) !== NoMode) {
transferActualDuration(workInProgress);
}
return workInProgress;
}
return null;
}
case HostRoot:
{
var root = workInProgress.stateNode;
popHostContainer(workInProgress);
popTopLevelContextObject(workInProgress);
resetWorkInProgressVersions();
var _flags = workInProgress.flags;
if ((_flags & ShouldCapture) !== NoFlags && (_flags & DidCapture) === NoFlags) {
// There was an error during render that wasn't captured by a suspense
// boundary. Do a second pass on the root to unmount the children.
workInProgress.flags = _flags & ~ShouldCapture | DidCapture;
return workInProgress;
} // We unwound to the root without completing it. Exit.
return null;
}
case HostComponent:
{
// TODO: popHydrationState
popHostContext(workInProgress);
return null;
}
case SuspenseComponent:
{
popSuspenseContext(workInProgress);
var suspenseState = workInProgress.memoizedState;
if (suspenseState !== null && suspenseState.dehydrated !== null) {
if (workInProgress.alternate === null) {
throw new Error('Threw in newly mounted dehydrated component. This is likely a bug in ' + 'React. Please file an issue.');
}
resetHydrationState();
}
var _flags2 = workInProgress.flags;
if (_flags2 & ShouldCapture) {
workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.
if ( (workInProgress.mode & ProfileMode) !== NoMode) {
transferActualDuration(workInProgress);
}
return workInProgress;
}
return null;
}
case SuspenseListComponent:
{
popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been
// caught by a nested boundary. If not, it should bubble through.
return null;
}
case HostPortal:
popHostContainer(workInProgress);
return null;
case ContextProvider:
var context = workInProgress.type._context;
popProvider(context, workInProgress);
return null;
case OffscreenComponent:
case LegacyHiddenComponent:
popRenderLanes(workInProgress);
return null;
case CacheComponent:
return null;
default:
return null;
}
}
function unwindInterruptedWork(current, interruptedWork, renderLanes) {
// Note: This intentionally doesn't check if we're hydrating because comparing
// to the current tree provider fiber is just as fast and less error-prone.
// Ideally we would have a special version of the work loop only
// for hydration.
popTreeContext(interruptedWork);
switch (interruptedWork.tag) {
case ClassComponent:
{
var childContextTypes = interruptedWork.type.childContextTypes;
if (childContextTypes !== null && childContextTypes !== undefined) {
popContext(interruptedWork);
}
break;
}
case HostRoot:
{
var root = interruptedWork.stateNode;
popHostContainer(interruptedWork);
popTopLevelContextObject(interruptedWork);
resetWorkInProgressVersions();
break;
}
case HostComponent:
{
popHostContext(interruptedWork);
break;
}
case HostPortal:
popHostContainer(interruptedWork);
break;
case SuspenseComponent:
popSuspenseContext(interruptedWork);
break;
case SuspenseListComponent:
popSuspenseContext(interruptedWork);
break;
case ContextProvider:
var context = interruptedWork.type._context;
popProvider(context, interruptedWork);
break;
case OffscreenComponent:
case LegacyHiddenComponent:
popRenderLanes(interruptedWork);
break;
}
}
var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
{
didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
} // Used during the commit phase to track the state of the Offscreen component stack.
// Allows us to avoid traversing the return path to find the nearest Offscreen ancestor.
// Only used when enableSuspenseLayoutEffectSemantics is enabled.
var offscreenSubtreeIsHidden = false;
var offscreenSubtreeWasHidden = false;
var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;
var nextEffect = null; // Used for Profiling builds to track updaters.
var inProgressLanes = null;
var inProgressRoot = null;
function reportUncaughtErrorInDEV(error) {
// Wrapping each small part of the commit phase into a guarded
// callback is a bit too slow (https://github.com/facebook/react/pull/21666).
// But we rely on it to surface errors to DEV tools like overlays
// (https://github.com/facebook/react/issues/21712).
// As a compromise, rethrow only caught errors in a guard.
{
invokeGuardedCallback(null, function () {
throw error;
});
clearCaughtError();
}
}
var callComponentWillUnmountWithTimer = function (current, instance) {
instance.props = current.memoizedProps;
instance.state = current.memoizedState;
if ( current.mode & ProfileMode) {
try {
startLayoutEffectTimer();
instance.componentWillUnmount();
} finally {
recordLayoutEffectDuration(current);
}
} else {
instance.componentWillUnmount();
}
}; // Capture errors so they don't interrupt mounting.
function safelyCallCommitHookLayoutEffectListMount(current, nearestMountedAncestor) {
try {
commitHookEffectListMount(Layout, current);
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
} // Capture errors so they don't interrupt unmounting.
function safelyCallComponentWillUnmount(current, nearestMountedAncestor, instance) {
try {
callComponentWillUnmountWithTimer(current, instance);
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
} // Capture errors so they don't interrupt mounting.
function safelyCallComponentDidMount(current, nearestMountedAncestor, instance) {
try {
instance.componentDidMount();
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
} // Capture errors so they don't interrupt mounting.
function safelyAttachRef(current, nearestMountedAncestor) {
try {
commitAttachRef(current);
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
}
function safelyDetachRef(current, nearestMountedAncestor) {
var ref = current.ref;
if (ref !== null) {
if (typeof ref === 'function') {
var retVal;
try {
if (enableProfilerTimer && enableProfilerCommitHooks && current.mode & ProfileMode) {
try {
startLayoutEffectTimer();
retVal = ref(null);
} finally {
recordLayoutEffectDuration(current);
}
} else {
retVal = ref(null);
}
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
{
if (typeof retVal === 'function') {
error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(current));
}
}
} else {
ref.current = null;
}
}
}
function safelyCallDestroy(current, nearestMountedAncestor, destroy) {
try {
destroy();
} catch (error) {
captureCommitPhaseError(current, nearestMountedAncestor, error);
}
}
var focusedInstanceHandle = null;
var shouldFireAfterActiveInstanceBlur = false;
function commitBeforeMutationEffects(root, firstChild) {
focusedInstanceHandle = prepareForCommit(root.containerInfo);
nextEffect = firstChild;
commitBeforeMutationEffects_begin(); // We no longer need to track the active instance fiber
var shouldFire = shouldFireAfterActiveInstanceBlur;
shouldFireAfterActiveInstanceBlur = false;
focusedInstanceHandle = null;
return shouldFire;
}
function commitBeforeMutationEffects_begin() {
while (nextEffect !== null) {
var fiber = nextEffect; // This phase is only used for beforeActiveInstanceBlur.
var child = fiber.child;
if ((fiber.subtreeFlags & BeforeMutationMask) !== NoFlags && child !== null) {
child.return = fiber;
nextEffect = child;
} else {
commitBeforeMutationEffects_complete();
}
}
}
function commitBeforeMutationEffects_complete() {
while (nextEffect !== null) {
var fiber = nextEffect;
setCurrentFiber(fiber);
try {
commitBeforeMutationEffectsOnFiber(fiber);
} catch (error) {
captureCommitPhaseError(fiber, fiber.return, error);
}
resetCurrentFiber();
var sibling = fiber.sibling;
if (sibling !== null) {
sibling.return = fiber.return;
nextEffect = sibling;
return;
}
nextEffect = fiber.return;
}
}
function commitBeforeMutationEffectsOnFiber(finishedWork) {
var current = finishedWork.alternate;
var flags = finishedWork.flags;
if ((flags & Snapshot) !== NoFlags) {
setCurrentFiber(finishedWork);
switch (finishedWork.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent:
{
break;
}
case ClassComponent:
{
if (current !== null) {
var prevProps = current.memoizedProps;
var prevState = current.memoizedState;
var instance = finishedWork.stateNode; // We could update instance props and state here,
// but instead we rely on them being set during last render.
// TODO: revisit this when we implement resuming.
{
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
if (instance.props !== finishedWork.memoizedProps) {
error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');
}
if (instance.state !== finishedWork.memoizedState) {
error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');
}
}
}
var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);
{
var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;
if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {
didWarnSet.add(finishedWork.type);
error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentNameFromFiber(finishedWork));
}
}
instance.__reactInternalSnapshotBeforeUpdate = snapshot;
}
break;
}
case HostRoot:
{
{
var root = finishedWork.stateNode;
clearContainer(root.containerInfo);
}
break;
}
case HostComponent:
case HostText:
case HostPortal:
case IncompleteClassComponent:
// Nothing to do for these component types
break;
default:
{
throw new Error('This unit of work tag should not have side-effects. This error is ' + 'likely caused by a bug in React. Please file an issue.');
}
}
resetCurrentFiber();
}
}
function commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {
var updateQueue = finishedWork.updateQueue;
var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
if (lastEffect !== null) {
var firstEffect = lastEffect.next;
var effect = firstEffect;
do {
if ((effect.tag & flags) === flags) {
// Unmount
var destroy = effect.destroy;
effect.destroy = undefined;
if (destroy !== undefined) {
{
if ((flags & Passive$1) !== NoFlags$1) {
markComponentPassiveEffectUnmountStarted(finishedWork);
} else if ((flags & Layout) !== NoFlags$1) {
markComponentLayoutEffectUnmountStarted(finishedWork);
}
}
{
if ((flags & Insertion) !== NoFlags$1) {
setIsRunningInsertionEffect(true);
}
}
safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy);
{
if ((flags & Insertion) !== NoFlags$1) {
setIsRunningInsertionEffect(false);
}
}
{
if ((flags & Passive$1) !== NoFlags$1) {
markComponentPassiveEffectUnmountStopped();
} else if ((flags & Layout) !== NoFlags$1) {
markComponentLayoutEffectUnmountStopped();
}
}
}
}
effect = effect.next;
} while (effect !== firstEffect);
}
}
function commitHookEffectListMount(flags, finishedWork) {
var updateQueue = finishedWork.updateQueue;
var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
if (lastEffect !== null) {
var firstEffect = lastEffect.next;
var effect = firstEffect;
do {
if ((effect.tag & flags) === flags) {
{
if ((flags & Passive$1) !== NoFlags$1) {
markComponentPassiveEffectMountStarted(finishedWork);
} else if ((flags & Layout) !== NoFlags$1) {
markComponentLayoutEffectMountStarted(finishedWork);
}
} // Mount
var create = effect.create;
{
if ((flags & Insertion) !== NoFlags$1) {
setIsRunningInsertionEffect(true);
}
}
effect.destroy = create();
{
if ((flags & Insertion) !== NoFlags$1) {
setIsRunningInsertionEffect(false);
}
}
{
if ((flags & Passive$1) !== NoFlags$1) {
markComponentPassiveEffectMountStopped();
} else if ((flags & Layout) !== NoFlags$1) {
markComponentLayoutEffectMountStopped();
}
}
{
var destroy = effect.destroy;
if (destroy !== undefined && typeof destroy !== 'function') {
var hookName = void 0;
if ((effect.tag & Layout) !== NoFlags) {
hookName = 'useLayoutEffect';
} else if ((effect.tag & Insertion) !== NoFlags) {
hookName = 'useInsertionEffect';
} else {
hookName = 'useEffect';
}
var addendum = void 0;
if (destroy === null) {
addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';
} else if (typeof destroy.then === 'function') {
addendum = '\n\nIt looks like you wrote ' + hookName + '(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + hookName + '(() => {\n' + ' async function fetchData() {\n' + ' // You can await here\n' + ' const response = await MyAPI.getData(someId);\n' + ' // ...\n' + ' }\n' + ' fetchData();\n' + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching';
} else {
addendum = ' You returned: ' + destroy;
}
error('%s must not return anything besides a function, ' + 'which is used for clean-up.%s', hookName, addendum);
}
}
}
effect = effect.next;
} while (effect !== firstEffect);
}
}
function commitPassiveEffectDurations(finishedRoot, finishedWork) {
{
// Only Profilers with work in their subtree will have an Update effect scheduled.
if ((finishedWork.flags & Update) !== NoFlags) {
switch (finishedWork.tag) {
case Profiler:
{
var passiveEffectDuration = finishedWork.stateNode.passiveEffectDuration;
var _finishedWork$memoize = finishedWork.memoizedProps,
id = _finishedWork$memoize.id,
onPostCommit = _finishedWork$memoize.onPostCommit; // This value will still reflect the previous commit phase.
// It does not get reset until the start of the next commit phase.
var commitTime = getCommitTime();
var phase = finishedWork.alternate === null ? 'mount' : 'update';
{
if (isCurrentUpdateNested()) {
phase = 'nested-update';
}
}
if (typeof onPostCommit === 'function') {
onPostCommit(id, phase, passiveEffectDuration, commitTime);
} // Bubble times to the next nearest ancestor Profiler.
// After we process that Profiler, we'll bubble further up.
var parentFiber = finishedWork.return;
outer: while (parentFiber !== null) {
switch (parentFiber.tag) {
case HostRoot:
var root = parentFiber.stateNode;
root.passiveEffectDuration += passiveEffectDuration;
break outer;
case Profiler:
var parentStateNode = parentFiber.stateNode;
parentStateNode.passiveEffectDuration += passiveEffectDuration;
break outer;
}
parentFiber = parentFiber.return;
}
break;
}
}
}
}
}
function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committedLanes) {
if ((finishedWork.flags & LayoutMask) !== NoFlags) {
switch (finishedWork.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent:
{
if ( !offscreenSubtreeWasHidden) {
// At this point layout effects have already been destroyed (during mutation phase).
// This is done to prevent sibling component effects from interfering with each other,
// e.g. a destroy function in one component should never override a ref set
// by a create function in another component during the same commit.
if ( finishedWork.mode & ProfileMode) {
try {
startLayoutEffectTimer();
commitHookEffectListMount(Layout | HasEffect, finishedWork);
} finally {
recordLayoutEffectDuration(finishedWork);
}
} else {
commitHookEffectListMount(Layout | HasEffect, finishedWork);
}
}
break;
}
case ClassComponent:
{
var instance = finishedWork.stateNode;
if (finishedWork.flags & Update) {
if (!offscreenSubtreeWasHidden) {
if (current === null) {
// We could update instance props and state here,
// but instead we rely on them being set during last render.
// TODO: revisit this when we implement resuming.
{
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
if (instance.props !== finishedWork.memoizedProps) {
error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');
}
if (instance.state !== finishedWork.memoizedState) {
error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');
}
}
}
if ( finishedWork.mode & ProfileMode) {
try {
startLayoutEffectTimer();
instance.componentDidMount();
} finally {
recordLayoutEffectDuration(finishedWork);
}
} else {
instance.componentDidMount();
}
} else {
var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);
var prevState = current.memoizedState; // We could update instance props and state here,
// but instead we rely on them being set during last render.
// TODO: revisit this when we implement resuming.
{
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
if (instance.props !== finishedWork.memoizedProps) {
error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');
}
if (instance.state !== finishedWork.memoizedState) {
error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');
}
}
}
if ( finishedWork.mode & ProfileMode) {
try {
startLayoutEffectTimer();
instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
} finally {
recordLayoutEffectDuration(finishedWork);
}
} else {
instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
}
}
}
} // TODO: I think this is now always non-null by the time it reaches the
// commit phase. Consider removing the type check.
var updateQueue = finishedWork.updateQueue;
if (updateQueue !== null) {
{
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
if (instance.props !== finishedWork.memoizedProps) {
error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');
}
if (instance.state !== finishedWork.memoizedState) {
error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');
}
}
} // We could update instance props and state here,
// but instead we rely on them being set during last render.
// TODO: revisit this when we implement resuming.
commitUpdateQueue(finishedWork, updateQueue, instance);
}
break;
}
case HostRoot:
{
// TODO: I think this is now always non-null by the time it reaches the
// commit phase. Consider removing the type check.
var _updateQueue = finishedWork.updateQueue;
if (_updateQueue !== null) {
var _instance = null;
if (finishedWork.child !== null) {
switch (finishedWork.child.tag) {
case HostComponent:
_instance = getPublicInstance(finishedWork.child.stateNode);
break;
case ClassComponent:
_instance = finishedWork.child.stateNode;
break;
}
}
commitUpdateQueue(finishedWork, _updateQueue, _instance);
}
break;
}
case HostComponent:
{
var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted
// (eg DOM renderer may schedule auto-focus for inputs and form controls).
// These effects should only be committed when components are first mounted,
// aka when there is no current/alternate.
if (current === null && finishedWork.flags & Update) {
var type = finishedWork.type;
var props = finishedWork.memoizedProps;
commitMount(_instance2, type, props);
}
break;
}
case HostText:
{
// We have no life-cycles associated with text.
break;
}
case HostPortal:
{
// We have no life-cycles associated with portals.
break;
}
case Profiler:
{
{
var _finishedWork$memoize2 = finishedWork.memoizedProps,
onCommit = _finishedWork$memoize2.onCommit,
onRender = _finishedWork$memoize2.onRender;
var effectDuration = finishedWork.stateNode.effectDuration;
var commitTime = getCommitTime();
var phase = current === null ? 'mount' : 'update';
{
if (isCurrentUpdateNested()) {
phase = 'nested-update';
}
}
if (typeof onRender === 'function') {
onRender(finishedWork.memoizedProps.id, phase, finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime);
}
{
if (typeof onCommit === 'function') {
onCommit(finishedWork.memoizedProps.id, phase, effectDuration, commitTime);
} // Schedule a passive effect for this Profiler to call onPostCommit hooks.
// This effect should be scheduled even if there is no onPostCommit callback for this Profiler,
// because the effect is also where times bubble to parent Profilers.
enqueuePendingPassiveProfilerEffect(finishedWork); // Propagate layout effect durations to the next nearest Profiler ancestor.
// Do not reset these values until the next render so DevTools has a chance to read them first.
var parentFiber = finishedWork.return;
outer: while (parentFiber !== null) {
switch (parentFiber.tag) {
case HostRoot:
var root = parentFiber.stateNode;
root.effectDuration += effectDuration;
break outer;
case Profiler:
var parentStateNode = parentFiber.stateNode;
parentStateNode.effectDuration += effectDuration;
break outer;
}
parentFiber = parentFiber.return;
}
}
}
break;
}
case SuspenseComponent:
{
commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
break;
}
case SuspenseListComponent:
case IncompleteClassComponent:
case ScopeComponent:
case OffscreenComponent:
case LegacyHiddenComponent:
case TracingMarkerComponent:
{
break;
}
default:
throw new Error('This unit of work tag should not have side-effects. This error is ' + 'likely caused by a bug in React. Please file an issue.');
}
}
if ( !offscreenSubtreeWasHidden) {
{
if (finishedWork.flags & Ref) {
commitAttachRef(finishedWork);
}
}
}
}
function reappearLayoutEffectsOnFiber(node) {
// Turn on layout effects in a tree that previously disappeared.
// TODO (Offscreen) Check: flags & LayoutStatic
switch (node.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent:
{
if ( node.mode & ProfileMode) {
try {
startLayoutEffectTimer();
safelyCallCommitHookLayoutEffectListMount(node, node.return);
} finally {
recordLayoutEffectDuration(node);
}
} else {
safelyCallCommitHookLayoutEffectListMount(node, node.return);
}
break;
}
case ClassComponent:
{
var instance = node.stateNode;
if (typeof instance.componentDidMount === 'function') {
safelyCallComponentDidMount(node, node.return, instance);
}
safelyAttachRef(node, node.return);
break;
}
case HostComponent:
{
safelyAttachRef(node, node.return);
break;
}
}
}
function hideOrUnhideAllChildren(finishedWork, isHidden) {
// Only hide or unhide the top-most host nodes.
var hostSubtreeRoot = null;
{
// We only have the top Fiber that was inserted but we need to recurse down its
// children to find all the terminal nodes.
var node = finishedWork;
while (true) {
if (node.tag === HostComponent) {
if (hostSubtreeRoot === null) {
hostSubtreeRoot = node;
try {
var instance = node.stateNode;
if (isHidden) {
hideInstance(instance);
} else {
unhideInstance(node.stateNode, node.memoizedProps);
}
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
} else if (node.tag === HostText) {
if (hostSubtreeRoot === null) {
try {
var _instance3 = node.stateNode;
if (isHidden) {
hideTextInstance(_instance3);
} else {
unhideTextInstance(_instance3, node.memoizedProps);
}
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
} else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; else if (node.child !== null) {
node.child.return = node;
node = node.child;
continue;
}
if (node === finishedWork) {
return;
}
while (node.sibling === null) {
if (node.return === null || node.return === finishedWork) {
return;
}
if (hostSubtreeRoot === node) {
hostSubtreeRoot = null;
}
node = node.return;
}
if (hostSubtreeRoot === node) {
hostSubtreeRoot = null;
}
node.sibling.return = node.return;
node = node.sibling;
}
}
}
function commitAttachRef(finishedWork) {
var ref = finishedWork.ref;
if (ref !== null) {
var instance = finishedWork.stateNode;
var instanceToUse;
switch (finishedWork.tag) {
case HostComponent:
instanceToUse = getPublicInstance(instance);
break;
default:
instanceToUse = instance;
} // Moved outside to ensure DCE works with this flag
if (typeof ref === 'function') {
var retVal;
if ( finishedWork.mode & ProfileMode) {
try {
startLayoutEffectTimer();
retVal = ref(instanceToUse);
} finally {
recordLayoutEffectDuration(finishedWork);
}
} else {
retVal = ref(instanceToUse);
}
{
if (typeof retVal === 'function') {
error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(finishedWork));
}
}
} else {
{
if (!ref.hasOwnProperty('current')) {
error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentNameFromFiber(finishedWork));
}
}
ref.current = instanceToUse;
}
}
}
function detachFiberMutation(fiber) {
// Cut off the return pointer to disconnect it from the tree.
// This enables us to detect and warn against state updates on an unmounted component.
// It also prevents events from bubbling from within disconnected components.
//
// Ideally, we should also clear the child pointer of the parent alternate to let this
// get GC:ed but we don't know which for sure which parent is the current
// one so we'll settle for GC:ing the subtree of this child.
// This child itself will be GC:ed when the parent updates the next time.
//
// Note that we can't clear child or sibling pointers yet.
// They're needed for passive effects and for findDOMNode.
// We defer those fields, and all other cleanup, to the passive phase (see detachFiberAfterEffects).
//
// Don't reset the alternate yet, either. We need that so we can detach the
// alternate's fields in the passive phase. Clearing the return pointer is
// sufficient for findDOMNode semantics.
var alternate = fiber.alternate;
if (alternate !== null) {
alternate.return = null;
}
fiber.return = null;
}
function detachFiberAfterEffects(fiber) {
var alternate = fiber.alternate;
if (alternate !== null) {
fiber.alternate = null;
detachFiberAfterEffects(alternate);
} // Note: Defensively using negation instead of < in case
// `deletedTreeCleanUpLevel` is undefined.
{
// Clear cyclical Fiber fields. This level alone is designed to roughly
// approximate the planned Fiber refactor. In that world, `setState` will be
// bound to a special "instance" object instead of a Fiber. The Instance
// object will not have any of these fields. It will only be connected to
// the fiber tree via a single link at the root. So if this level alone is
// sufficient to fix memory issues, that bodes well for our plans.
fiber.child = null;
fiber.deletions = null;
fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host
// tree, which has its own pointers to children, parents, and siblings.
// The other host nodes also point back to fibers, so we should detach that
// one, too.
if (fiber.tag === HostComponent) {
var hostInstance = fiber.stateNode;
if (hostInstance !== null) {
detachDeletedInstance(hostInstance);
}
}
fiber.stateNode = null; // I'm intentionally not clearing the `return` field in this level. We
// already disconnect the `return` pointer at the root of the deleted
// subtree (in `detachFiberMutation`). Besides, `return` by itself is not
// cyclical — it's only cyclical when combined with `child`, `sibling`, and
// `alternate`. But we'll clear it in the next level anyway, just in case.
{
fiber._debugOwner = null;
}
{
// Theoretically, nothing in here should be necessary, because we already
// disconnected the fiber from the tree. So even if something leaks this
// particular fiber, it won't leak anything else
//
// The purpose of this branch is to be super aggressive so we can measure
// if there's any difference in memory impact. If there is, that could
// indicate a React leak we don't know about.
fiber.return = null;
fiber.dependencies = null;
fiber.memoizedProps = null;
fiber.memoizedState = null;
fiber.pendingProps = null;
fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead.
fiber.updateQueue = null;
}
}
}
function getHostParentFiber(fiber) {
var parent = fiber.return;
while (parent !== null) {
if (isHostParent(parent)) {
return parent;
}
parent = parent.return;
}
throw new Error('Expected to find a host parent. This error is likely caused by a bug ' + 'in React. Please file an issue.');
}
function isHostParent(fiber) {
return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;
}
function getHostSibling(fiber) {
// We're going to search forward into the tree until we find a sibling host
// node. Unfortunately, if multiple insertions are done in a row we have to
// search past them. This leads to exponential search for the next sibling.
// TODO: Find a more efficient way to do this.
var node = fiber;
siblings: while (true) {
// If we didn't find anything, let's try the next sibling.
while (node.sibling === null) {
if (node.return === null || isHostParent(node.return)) {
// If we pop out of the root or hit the parent the fiber we are the
// last sibling.
return null;
}
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {
// If it is not host node and, we might have a host node inside it.
// Try to search down until we find one.
if (node.flags & Placement) {
// If we don't have a child, try the siblings instead.
continue siblings;
} // If we don't have a child, try the siblings instead.
// We also skip portals because they are not part of this host tree.
if (node.child === null || node.tag === HostPortal) {
continue siblings;
} else {
node.child.return = node;
node = node.child;
}
} // Check if this host node is stable or about to be placed.
if (!(node.flags & Placement)) {
// Found it!
return node.stateNode;
}
}
}
function commitPlacement(finishedWork) {
var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.
switch (parentFiber.tag) {
case HostComponent:
{
var parent = parentFiber.stateNode;
if (parentFiber.flags & ContentReset) {
// Reset the text content of the parent before doing any insertions
resetTextContent(parent); // Clear ContentReset from the effect tag
parentFiber.flags &= ~ContentReset;
}
var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its
// children to find all the terminal nodes.
insertOrAppendPlacementNode(finishedWork, before, parent);
break;
}
case HostRoot:
case HostPortal:
{
var _parent = parentFiber.stateNode.containerInfo;
var _before = getHostSibling(finishedWork);
insertOrAppendPlacementNodeIntoContainer(finishedWork, _before, _parent);
break;
}
// eslint-disable-next-line-no-fallthrough
default:
throw new Error('Invalid host parent fiber. This error is likely caused by a bug ' + 'in React. Please file an issue.');
}
}
function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
var tag = node.tag;
var isHost = tag === HostComponent || tag === HostText;
if (isHost) {
var stateNode = node.stateNode;
if (before) {
insertInContainerBefore(parent, stateNode, before);
} else {
appendChildToContainer(parent, stateNode);
}
} else if (tag === HostPortal) ; else {
var child = node.child;
if (child !== null) {
insertOrAppendPlacementNodeIntoContainer(child, before, parent);
var sibling = child.sibling;
while (sibling !== null) {
insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);
sibling = sibling.sibling;
}
}
}
}
function insertOrAppendPlacementNode(node, before, parent) {
var tag = node.tag;
var isHost = tag === HostComponent || tag === HostText;
if (isHost) {
var stateNode = node.stateNode;
if (before) {
insertBefore(parent, stateNode, before);
} else {
appendChild(parent, stateNode);
}
} else if (tag === HostPortal) ; else {
var child = node.child;
if (child !== null) {
insertOrAppendPlacementNode(child, before, parent);
var sibling = child.sibling;
while (sibling !== null) {
insertOrAppendPlacementNode(sibling, before, parent);
sibling = sibling.sibling;
}
}
}
} // These are tracked on the stack as we recursively traverse a
// deleted subtree.
// TODO: Update these during the whole mutation phase, not just during
// a deletion.
var hostParent = null;
var hostParentIsContainer = false;
function commitDeletionEffects(root, returnFiber, deletedFiber) {
{
// We only have the top Fiber that was deleted but we need to recurse down its
// children to find all the terminal nodes.
// Recursively delete all host nodes from the parent, detach refs, clean
// up mounted layout effects, and call componentWillUnmount.
// We only need to remove the topmost host child in each branch. But then we
// still need to keep traversing to unmount effects, refs, and cWU. TODO: We
// could split this into two separate traversals functions, where the second
// one doesn't include any removeChild logic. This is maybe the same
// function as "disappearLayoutEffects" (or whatever that turns into after
// the layout phase is refactored to use recursion).
// Before starting, find the nearest host parent on the stack so we know
// which instance/container to remove the children from.
// TODO: Instead of searching up the fiber return path on every deletion, we
// can track the nearest host component on the JS stack as we traverse the
// tree during the commit phase. This would make insertions faster, too.
var parent = returnFiber;
findParent: while (parent !== null) {
switch (parent.tag) {
case HostComponent:
{
hostParent = parent.stateNode;
hostParentIsContainer = false;
break findParent;
}
case HostRoot:
{
hostParent = parent.stateNode.containerInfo;
hostParentIsContainer = true;
break findParent;
}
case HostPortal:
{
hostParent = parent.stateNode.containerInfo;
hostParentIsContainer = true;
break findParent;
}
}
parent = parent.return;
}
if (hostParent === null) {
throw new Error('Expected to find a host parent. This error is likely caused by ' + 'a bug in React. Please file an issue.');
}
commitDeletionEffectsOnFiber(root, returnFiber, deletedFiber);
hostParent = null;
hostParentIsContainer = false;
}
detachFiberMutation(deletedFiber);
}
function recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {
// TODO: Use a static flag to skip trees that don't have unmount effects
var child = parent.child;
while (child !== null) {
commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, child);
child = child.sibling;
}
}
function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {
onCommitUnmount(deletedFiber); // The cases in this outer switch modify the stack before they traverse
// into their subtree. There are simpler cases in the inner switch
// that don't modify the stack.
switch (deletedFiber.tag) {
case HostComponent:
{
if (!offscreenSubtreeWasHidden) {
safelyDetachRef(deletedFiber, nearestMountedAncestor);
} // Intentional fallthrough to next branch
}
// eslint-disable-next-line-no-fallthrough
case HostText:
{
// We only need to remove the nearest host child. Set the host parent
// to `null` on the stack to indicate that nested children don't
// need to be removed.
{
var prevHostParent = hostParent;
var prevHostParentIsContainer = hostParentIsContainer;
hostParent = null;
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
hostParent = prevHostParent;
hostParentIsContainer = prevHostParentIsContainer;
if (hostParent !== null) {
// Now that all the child effects have unmounted, we can remove the
// node from the tree.
if (hostParentIsContainer) {
removeChildFromContainer(hostParent, deletedFiber.stateNode);
} else {
removeChild(hostParent, deletedFiber.stateNode);
}
}
}
return;
}
case DehydratedFragment:
{
// Delete the dehydrated suspense boundary and all of its content.
{
if (hostParent !== null) {
if (hostParentIsContainer) {
clearSuspenseBoundaryFromContainer(hostParent, deletedFiber.stateNode);
} else {
clearSuspenseBoundary(hostParent, deletedFiber.stateNode);
}
}
}
return;
}
case HostPortal:
{
{
// When we go into a portal, it becomes the parent to remove from.
var _prevHostParent = hostParent;
var _prevHostParentIsContainer = hostParentIsContainer;
hostParent = deletedFiber.stateNode.containerInfo;
hostParentIsContainer = true;
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
hostParent = _prevHostParent;
hostParentIsContainer = _prevHostParentIsContainer;
}
return;
}
case FunctionComponent:
case ForwardRef:
case MemoComponent:
case SimpleMemoComponent:
{
if (!offscreenSubtreeWasHidden) {
var updateQueue = deletedFiber.updateQueue;
if (updateQueue !== null) {
var lastEffect = updateQueue.lastEffect;
if (lastEffect !== null) {
var firstEffect = lastEffect.next;
var effect = firstEffect;
do {
var _effect = effect,
destroy = _effect.destroy,
tag = _effect.tag;
if (destroy !== undefined) {
if ((tag & Insertion) !== NoFlags$1) {
safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);
} else if ((tag & Layout) !== NoFlags$1) {
{
markComponentLayoutEffectUnmountStarted(deletedFiber);
}
if ( deletedFiber.mode & ProfileMode) {
startLayoutEffectTimer();
safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);
recordLayoutEffectDuration(deletedFiber);
} else {
safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);
}
{
markComponentLayoutEffectUnmountStopped();
}
}
}
effect = effect.next;
} while (effect !== firstEffect);
}
}
}
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
return;
}
case ClassComponent:
{
if (!offscreenSubtreeWasHidden) {
safelyDetachRef(deletedFiber, nearestMountedAncestor);
var instance = deletedFiber.stateNode;
if (typeof instance.componentWillUnmount === 'function') {
safelyCallComponentWillUnmount(deletedFiber, nearestMountedAncestor, instance);
}
}
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
return;
}
case ScopeComponent:
{
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
return;
}
case OffscreenComponent:
{
if ( // TODO: Remove this dead flag
deletedFiber.mode & ConcurrentMode) {
// If this offscreen component is hidden, we already unmounted it. Before
// deleting the children, track that it's already unmounted so that we
// don't attempt to unmount the effects again.
// TODO: If the tree is hidden, in most cases we should be able to skip
// over the nested children entirely. An exception is we haven't yet found
// the topmost host node to delete, which we already track on the stack.
// But the other case is portals, which need to be detached no matter how
// deeply they are nested. We should use a subtree flag to track whether a
// subtree includes a nested portal.
var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || deletedFiber.memoizedState !== null;
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
} else {
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
}
break;
}
default:
{
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
return;
}
}
}
function commitSuspenseCallback(finishedWork) {
// TODO: Move this to passive phase
var newState = finishedWork.memoizedState;
}
function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
var newState = finishedWork.memoizedState;
if (newState === null) {
var current = finishedWork.alternate;
if (current !== null) {
var prevState = current.memoizedState;
if (prevState !== null) {
var suspenseInstance = prevState.dehydrated;
if (suspenseInstance !== null) {
commitHydratedSuspenseInstance(suspenseInstance);
}
}
}
}
}
function attachSuspenseRetryListeners(finishedWork) {
// If this boundary just timed out, then it will have a set of wakeables.
// For each wakeable, attach a listener so that when it resolves, React
// attempts to re-render the boundary in the primary (pre-timeout) state.
var wakeables = finishedWork.updateQueue;
if (wakeables !== null) {
finishedWork.updateQueue = null;
var retryCache = finishedWork.stateNode;
if (retryCache === null) {
retryCache = finishedWork.stateNode = new PossiblyWeakSet();
}
wakeables.forEach(function (wakeable) {
// Memoize using the boundary fiber to prevent redundant listeners.
var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
if (!retryCache.has(wakeable)) {
retryCache.add(wakeable);
{
if (isDevToolsPresent) {
if (inProgressLanes !== null && inProgressRoot !== null) {
// If we have pending work still, associate the original updaters with it.
restorePendingUpdaters(inProgressRoot, inProgressLanes);
} else {
throw Error('Expected finished root and lanes to be set. This is a bug in React.');
}
}
}
wakeable.then(retry, retry);
}
});
}
} // This function detects when a Suspense boundary goes from visible to hidden.
function commitMutationEffects(root, finishedWork, committedLanes) {
inProgressLanes = committedLanes;
inProgressRoot = root;
setCurrentFiber(finishedWork);
commitMutationEffectsOnFiber(finishedWork, root);
setCurrentFiber(finishedWork);
inProgressLanes = null;
inProgressRoot = null;
}
function recursivelyTraverseMutationEffects(root, parentFiber, lanes) {
// Deletions effects can be scheduled on any fiber type. They need to happen
// before the children effects hae fired.
var deletions = parentFiber.deletions;
if (deletions !== null) {
for (var i = 0; i < deletions.length; i++) {
var childToDelete = deletions[i];
try {
commitDeletionEffects(root, parentFiber, childToDelete);
} catch (error) {
captureCommitPhaseError(childToDelete, parentFiber, error);
}
}
}
var prevDebugFiber = getCurrentFiber();
if (parentFiber.subtreeFlags & MutationMask) {
var child = parentFiber.child;
while (child !== null) {
setCurrentFiber(child);
commitMutationEffectsOnFiber(child, root);
child = child.sibling;
}
}
setCurrentFiber(prevDebugFiber);
}
function commitMutationEffectsOnFiber(finishedWork, root, lanes) {
var current = finishedWork.alternate;
var flags = finishedWork.flags; // The effect flag should be checked *after* we refine the type of fiber,
// because the fiber tag is more specific. An exception is any flag related
// to reconcilation, because those can be set on all fiber types.
switch (finishedWork.tag) {
case FunctionComponent:
case ForwardRef:
case MemoComponent:
case SimpleMemoComponent:
{
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
if (flags & Update) {
try {
commitHookEffectListUnmount(Insertion | HasEffect, finishedWork, finishedWork.return);
commitHookEffectListMount(Insertion | HasEffect, finishedWork);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
} // Layout effects are destroyed during the mutation phase so that all
// destroy functions for all fibers are called before any create functions.
// This prevents sibling component effects from interfering with each other,
// e.g. a destroy function in one component should never override a ref set
// by a create function in another component during the same commit.
if ( finishedWork.mode & ProfileMode) {
try {
startLayoutEffectTimer();
commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
recordLayoutEffectDuration(finishedWork);
} else {
try {
commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
}
return;
}
case ClassComponent:
{
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
if (flags & Ref) {
if (current !== null) {
safelyDetachRef(current, current.return);
}
}
return;
}
case HostComponent:
{
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
if (flags & Ref) {
if (current !== null) {
safelyDetachRef(current, current.return);
}
}
{
// TODO: ContentReset gets cleared by the children during the commit
// phase. This is a refactor hazard because it means we must read
// flags the flags after `commitReconciliationEffects` has already run;
// the order matters. We should refactor so that ContentReset does not
// rely on mutating the flag during commit. Like by setting a flag
// during the render phase instead.
if (finishedWork.flags & ContentReset) {
var instance = finishedWork.stateNode;
try {
resetTextContent(instance);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
if (flags & Update) {
var _instance4 = finishedWork.stateNode;
if (_instance4 != null) {
// Commit the work prepared earlier.
var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
// as the newProps. The updatePayload will contain the real change in
// this case.
var oldProps = current !== null ? current.memoizedProps : newProps;
var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.
var updatePayload = finishedWork.updateQueue;
finishedWork.updateQueue = null;
if (updatePayload !== null) {
try {
commitUpdate(_instance4, updatePayload, type, oldProps, newProps, finishedWork);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
}
}
}
return;
}
case HostText:
{
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
if (flags & Update) {
{
if (finishedWork.stateNode === null) {
throw new Error('This should have a text node initialized. This error is likely ' + 'caused by a bug in React. Please file an issue.');
}
var textInstance = finishedWork.stateNode;
var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
// as the newProps. The updatePayload will contain the real change in
// this case.
var oldText = current !== null ? current.memoizedProps : newText;
try {
commitTextUpdate(textInstance, oldText, newText);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
}
return;
}
case HostRoot:
{
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
if (flags & Update) {
{
if (current !== null) {
var prevRootState = current.memoizedState;
if (prevRootState.isDehydrated) {
try {
commitHydratedContainer(root.containerInfo);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
}
}
}
return;
}
case HostPortal:
{
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
return;
}
case SuspenseComponent:
{
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
var offscreenFiber = finishedWork.child;
if (offscreenFiber.flags & Visibility) {
var offscreenInstance = offscreenFiber.stateNode;
var newState = offscreenFiber.memoizedState;
var isHidden = newState !== null; // Track the current state on the Offscreen instance so we can
// read it during an event
offscreenInstance.isHidden = isHidden;
if (isHidden) {
var wasHidden = offscreenFiber.alternate !== null && offscreenFiber.alternate.memoizedState !== null;
if (!wasHidden) {
// TODO: Move to passive phase
markCommitTimeOfFallback();
}
}
}
if (flags & Update) {
try {
commitSuspenseCallback(finishedWork);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
attachSuspenseRetryListeners(finishedWork);
}
return;
}
case OffscreenComponent:
{
var _wasHidden = current !== null && current.memoizedState !== null;
if ( // TODO: Remove this dead flag
finishedWork.mode & ConcurrentMode) {
// Before committing the children, track on the stack whether this
// offscreen subtree was already hidden, so that we don't unmount the
// effects again.
var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || _wasHidden;
recursivelyTraverseMutationEffects(root, finishedWork);
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
} else {
recursivelyTraverseMutationEffects(root, finishedWork);
}
commitReconciliationEffects(finishedWork);
if (flags & Visibility) {
var _offscreenInstance = finishedWork.stateNode;
var _newState = finishedWork.memoizedState;
var _isHidden = _newState !== null;
var offscreenBoundary = finishedWork; // Track the current state on the Offscreen instance so we can
// read it during an event
_offscreenInstance.isHidden = _isHidden;
{
if (_isHidden) {
if (!_wasHidden) {
if ((offscreenBoundary.mode & ConcurrentMode) !== NoMode) {
nextEffect = offscreenBoundary;
var offscreenChild = offscreenBoundary.child;
while (offscreenChild !== null) {
nextEffect = offscreenChild;
disappearLayoutEffects_begin(offscreenChild);
offscreenChild = offscreenChild.sibling;
}
}
}
}
}
{
// TODO: This needs to run whenever there's an insertion or update
// inside a hidden Offscreen tree.
hideOrUnhideAllChildren(offscreenBoundary, _isHidden);
}
}
return;
}
case SuspenseListComponent:
{
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
if (flags & Update) {
attachSuspenseRetryListeners(finishedWork);
}
return;
}
case ScopeComponent:
{
return;
}
default:
{
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
return;
}
}
}
function commitReconciliationEffects(finishedWork) {
// Placement effects (insertions, reorders) can be scheduled on any fiber
// type. They needs to happen after the children effects have fired, but
// before the effects on this fiber have fired.
var flags = finishedWork.flags;
if (flags & Placement) {
try {
commitPlacement(finishedWork);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
} // Clear the "placement" from effect tag so that we know that this is
// inserted, before any life-cycles like componentDidMount gets called.
// TODO: findDOMNode doesn't rely on this any more but isMounted does
// and isMounted is deprecated anyway so we should be able to kill this.
finishedWork.flags &= ~Placement;
}
if (flags & Hydrating) {
finishedWork.flags &= ~Hydrating;
}
}
function commitLayoutEffects(finishedWork, root, committedLanes) {
inProgressLanes = committedLanes;
inProgressRoot = root;
nextEffect = finishedWork;
commitLayoutEffects_begin(finishedWork, root, committedLanes);
inProgressLanes = null;
inProgressRoot = null;
}
function commitLayoutEffects_begin(subtreeRoot, root, committedLanes) {
// Suspense layout effects semantics don't change for legacy roots.
var isModernRoot = (subtreeRoot.mode & ConcurrentMode) !== NoMode;
while (nextEffect !== null) {
var fiber = nextEffect;
var firstChild = fiber.child;
if ( fiber.tag === OffscreenComponent && isModernRoot) {
// Keep track of the current Offscreen stack's state.
var isHidden = fiber.memoizedState !== null;
var newOffscreenSubtreeIsHidden = isHidden || offscreenSubtreeIsHidden;
if (newOffscreenSubtreeIsHidden) {
// The Offscreen tree is hidden. Skip over its layout effects.
commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);
continue;
} else {
// TODO (Offscreen) Also check: subtreeFlags & LayoutMask
var current = fiber.alternate;
var wasHidden = current !== null && current.memoizedState !== null;
var newOffscreenSubtreeWasHidden = wasHidden || offscreenSubtreeWasHidden;
var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden;
var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; // Traverse the Offscreen subtree with the current Offscreen as the root.
offscreenSubtreeIsHidden = newOffscreenSubtreeIsHidden;
offscreenSubtreeWasHidden = newOffscreenSubtreeWasHidden;
if (offscreenSubtreeWasHidden && !prevOffscreenSubtreeWasHidden) {
// This is the root of a reappearing boundary. Turn its layout effects
// back on.
nextEffect = fiber;
reappearLayoutEffects_begin(fiber);
}
var child = firstChild;
while (child !== null) {
nextEffect = child;
commitLayoutEffects_begin(child, // New root; bubble back up to here and stop.
root, committedLanes);
child = child.sibling;
} // Restore Offscreen state and resume in our-progress traversal.
nextEffect = fiber;
offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);
continue;
}
}
if ((fiber.subtreeFlags & LayoutMask) !== NoFlags && firstChild !== null) {
firstChild.return = fiber;
nextEffect = firstChild;
} else {
commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);
}
}
}
function commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes) {
while (nextEffect !== null) {
var fiber = nextEffect;
if ((fiber.flags & LayoutMask) !== NoFlags) {
var current = fiber.alternate;
setCurrentFiber(fiber);
try {
commitLayoutEffectOnFiber(root, current, fiber, committedLanes);
} catch (error) {
captureCommitPhaseError(fiber, fiber.return, error);
}
resetCurrentFiber();
}
if (fiber === subtreeRoot) {
nextEffect = null;
return;
}
var sibling = fiber.sibling;
if (sibling !== null) {
sibling.return = fiber.return;
nextEffect = sibling;
return;
}
nextEffect = fiber.return;
}
}
function disappearLayoutEffects_begin(subtreeRoot) {
while (nextEffect !== null) {
var fiber = nextEffect;
var firstChild = fiber.child; // TODO (Offscreen) Check: flags & (RefStatic | LayoutStatic)
switch (fiber.tag) {
case FunctionComponent:
case ForwardRef:
case MemoComponent:
case SimpleMemoComponent:
{
if ( fiber.mode & ProfileMode) {
try {
startLayoutEffectTimer();
commitHookEffectListUnmount(Layout, fiber, fiber.return);
} finally {
recordLayoutEffectDuration(fiber);
}
} else {
commitHookEffectListUnmount(Layout, fiber, fiber.return);
}
break;
}
case ClassComponent:
{
// TODO (Offscreen) Check: flags & RefStatic
safelyDetachRef(fiber, fiber.return);
var instance = fiber.stateNode;
if (typeof instance.componentWillUnmount === 'function') {
safelyCallComponentWillUnmount(fiber, fiber.return, instance);
}
break;
}
case HostComponent:
{
safelyDetachRef(fiber, fiber.return);
break;
}
case OffscreenComponent:
{
// Check if this is a
var isHidden = fiber.memoizedState !== null;
if (isHidden) {
// Nested Offscreen tree is already hidden. Don't disappear
// its effects.
disappearLayoutEffects_complete(subtreeRoot);
continue;
}
break;
}
} // TODO (Offscreen) Check: subtreeFlags & LayoutStatic
if (firstChild !== null) {
firstChild.return = fiber;
nextEffect = firstChild;
} else {
disappearLayoutEffects_complete(subtreeRoot);
}
}
}
function disappearLayoutEffects_complete(subtreeRoot) {
while (nextEffect !== null) {
var fiber = nextEffect;
if (fiber === subtreeRoot) {
nextEffect = null;
return;
}
var sibling = fiber.sibling;
if (sibling !== null) {
sibling.return = fiber.return;
nextEffect = sibling;
return;
}
nextEffect = fiber.return;
}
}
function reappearLayoutEffects_begin(subtreeRoot) {
while (nextEffect !== null) {
var fiber = nextEffect;
var firstChild = fiber.child;
if (fiber.tag === OffscreenComponent) {
var isHidden = fiber.memoizedState !== null;
if (isHidden) {
// Nested Offscreen tree is still hidden. Don't re-appear its effects.
reappearLayoutEffects_complete(subtreeRoot);
continue;
}
} // TODO (Offscreen) Check: subtreeFlags & LayoutStatic
if (firstChild !== null) {
// This node may have been reused from a previous render, so we can't
// assume its return pointer is correct.
firstChild.return = fiber;
nextEffect = firstChild;
} else {
reappearLayoutEffects_complete(subtreeRoot);
}
}
}
function reappearLayoutEffects_complete(subtreeRoot) {
while (nextEffect !== null) {
var fiber = nextEffect; // TODO (Offscreen) Check: flags & LayoutStatic
setCurrentFiber(fiber);
try {
reappearLayoutEffectsOnFiber(fiber);
} catch (error) {
captureCommitPhaseError(fiber, fiber.return, error);
}
resetCurrentFiber();
if (fiber === subtreeRoot) {
nextEffect = null;
return;
}
var sibling = fiber.sibling;
if (sibling !== null) {
// This node may have been reused from a previous render, so we can't
// assume its return pointer is correct.
sibling.return = fiber.return;
nextEffect = sibling;
return;
}
nextEffect = fiber.return;
}
}
function commitPassiveMountEffects(root, finishedWork, committedLanes, committedTransitions) {
nextEffect = finishedWork;
commitPassiveMountEffects_begin(finishedWork, root, committedLanes, committedTransitions);
}
function commitPassiveMountEffects_begin(subtreeRoot, root, committedLanes, committedTransitions) {
while (nextEffect !== null) {
var fiber = nextEffect;
var firstChild = fiber.child;
if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && firstChild !== null) {
firstChild.return = fiber;
nextEffect = firstChild;
} else {
commitPassiveMountEffects_complete(subtreeRoot, root, committedLanes, committedTransitions);
}
}
}
function commitPassiveMountEffects_complete(subtreeRoot, root, committedLanes, committedTransitions) {
while (nextEffect !== null) {
var fiber = nextEffect;
if ((fiber.flags & Passive) !== NoFlags) {
setCurrentFiber(fiber);
try {
commitPassiveMountOnFiber(root, fiber, committedLanes, committedTransitions);
} catch (error) {
captureCommitPhaseError(fiber, fiber.return, error);
}
resetCurrentFiber();
}
if (fiber === subtreeRoot) {
nextEffect = null;
return;
}
var sibling = fiber.sibling;
if (sibling !== null) {
sibling.return = fiber.return;
nextEffect = sibling;
return;
}
nextEffect = fiber.return;
}
}
function commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions) {
switch (finishedWork.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent:
{
if ( finishedWork.mode & ProfileMode) {
startPassiveEffectTimer();
try {
commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);
} finally {
recordPassiveEffectDuration(finishedWork);
}
} else {
commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);
}
break;
}
}
}
function commitPassiveUnmountEffects(firstChild) {
nextEffect = firstChild;
commitPassiveUnmountEffects_begin();
}
function commitPassiveUnmountEffects_begin() {
while (nextEffect !== null) {
var fiber = nextEffect;
var child = fiber.child;
if ((nextEffect.flags & ChildDeletion) !== NoFlags) {
var deletions = fiber.deletions;
if (deletions !== null) {
for (var i = 0; i < deletions.length; i++) {
var fiberToDelete = deletions[i];
nextEffect = fiberToDelete;
commitPassiveUnmountEffectsInsideOfDeletedTree_begin(fiberToDelete, fiber);
}
{
// A fiber was deleted from this parent fiber, but it's still part of
// the previous (alternate) parent fiber's list of children. Because
// children are a linked list, an earlier sibling that's still alive
// will be connected to the deleted fiber via its `alternate`:
//
// live fiber
// --alternate--> previous live fiber
// --sibling--> deleted fiber
//
// We can't disconnect `alternate` on nodes that haven't been deleted
// yet, but we can disconnect the `sibling` and `child` pointers.
var previousFiber = fiber.alternate;
if (previousFiber !== null) {
var detachedChild = previousFiber.child;
if (detachedChild !== null) {
previousFiber.child = null;
do {
var detachedSibling = detachedChild.sibling;
detachedChild.sibling = null;
detachedChild = detachedSibling;
} while (detachedChild !== null);
}
}
}
nextEffect = fiber;
}
}
if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && child !== null) {
child.return = fiber;
nextEffect = child;
} else {
commitPassiveUnmountEffects_complete();
}
}
}
function commitPassiveUnmountEffects_complete() {
while (nextEffect !== null) {
var fiber = nextEffect;
if ((fiber.flags & Passive) !== NoFlags) {
setCurrentFiber(fiber);
commitPassiveUnmountOnFiber(fiber);
resetCurrentFiber();
}
var sibling = fiber.sibling;
if (sibling !== null) {
sibling.return = fiber.return;
nextEffect = sibling;
return;
}
nextEffect = fiber.return;
}
}
function commitPassiveUnmountOnFiber(finishedWork) {
switch (finishedWork.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent:
{
if ( finishedWork.mode & ProfileMode) {
startPassiveEffectTimer();
commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return);
recordPassiveEffectDuration(finishedWork);
} else {
commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return);
}
break;
}
}
}
function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor) {
while (nextEffect !== null) {
var fiber = nextEffect; // Deletion effects fire in parent -> child order
// TODO: Check if fiber has a PassiveStatic flag
setCurrentFiber(fiber);
commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor);
resetCurrentFiber();
var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. (But, if we
// do this, still need to handle `deletedTreeCleanUpLevel` correctly.)
if (child !== null) {
child.return = fiber;
nextEffect = child;
} else {
commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot);
}
}
}
function commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot) {
while (nextEffect !== null) {
var fiber = nextEffect;
var sibling = fiber.sibling;
var returnFiber = fiber.return;
{
// Recursively traverse the entire deleted tree and clean up fiber fields.
// This is more aggressive than ideal, and the long term goal is to only
// have to detach the deleted tree at the root.
detachFiberAfterEffects(fiber);
if (fiber === deletedSubtreeRoot) {
nextEffect = null;
return;
}
}
if (sibling !== null) {
sibling.return = returnFiber;
nextEffect = sibling;
return;
}
nextEffect = returnFiber;
}
}
function commitPassiveUnmountInsideDeletedTreeOnFiber(current, nearestMountedAncestor) {
switch (current.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent:
{
if ( current.mode & ProfileMode) {
startPassiveEffectTimer();
commitHookEffectListUnmount(Passive$1, current, nearestMountedAncestor);
recordPassiveEffectDuration(current);
} else {
commitHookEffectListUnmount(Passive$1, current, nearestMountedAncestor);
}
break;
}
}
} // TODO: Reuse reappearLayoutEffects traversal here?
function invokeLayoutEffectMountInDEV(fiber) {
{
// We don't need to re-check StrictEffectsMode here.
// This function is only called if that check has already passed.
switch (fiber.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent:
{
try {
commitHookEffectListMount(Layout | HasEffect, fiber);
} catch (error) {
captureCommitPhaseError(fiber, fiber.return, error);
}
break;
}
case ClassComponent:
{
var instance = fiber.stateNode;
try {
instance.componentDidMount();
} catch (error) {
captureCommitPhaseError(fiber, fiber.return, error);
}
break;
}
}
}
}
function invokePassiveEffectMountInDEV(fiber) {
{
// We don't need to re-check StrictEffectsMode here.
// This function is only called if that check has already passed.
switch (fiber.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent:
{
try {
commitHookEffectListMount(Passive$1 | HasEffect, fiber);
} catch (error) {
captureCommitPhaseError(fiber, fiber.return, error);
}
break;
}
}
}
}
function invokeLayoutEffectUnmountInDEV(fiber) {
{
// We don't need to re-check StrictEffectsMode here.
// This function is only called if that check has already passed.
switch (fiber.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent:
{
try {
commitHookEffectListUnmount(Layout | HasEffect, fiber, fiber.return);
} catch (error) {
captureCommitPhaseError(fiber, fiber.return, error);
}
break;
}
case ClassComponent:
{
var instance = fiber.stateNode;
if (typeof instance.componentWillUnmount === 'function') {
safelyCallComponentWillUnmount(fiber, fiber.return, instance);
}
break;
}
}
}
}
function invokePassiveEffectUnmountInDEV(fiber) {
{
// We don't need to re-check StrictEffectsMode here.
// This function is only called if that check has already passed.
switch (fiber.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent:
{
try {
commitHookEffectListUnmount(Passive$1 | HasEffect, fiber, fiber.return);
} catch (error) {
captureCommitPhaseError(fiber, fiber.return, error);
}
}
}
}
}
var COMPONENT_TYPE = 0;
var HAS_PSEUDO_CLASS_TYPE = 1;
var ROLE_TYPE = 2;
var TEST_NAME_TYPE = 3;
var TEXT_TYPE = 4;
if (typeof Symbol === 'function' && Symbol.for) {
var symbolFor = Symbol.for;
COMPONENT_TYPE = symbolFor('selector.component');
HAS_PSEUDO_CLASS_TYPE = symbolFor('selector.has_pseudo_class');
ROLE_TYPE = symbolFor('selector.role');
TEST_NAME_TYPE = symbolFor('selector.test_id');
TEXT_TYPE = symbolFor('selector.text');
}
var commitHooks = [];
function onCommitRoot$1() {
{
commitHooks.forEach(function (commitHook) {
return commitHook();
});
}
}
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;
function isLegacyActEnvironment(fiber) {
{
// Legacy mode. We preserve the behavior of React 17's act. It assumes an
// act environment whenever `jest` is defined, but you can still turn off
// spurious warnings by setting IS_REACT_ACT_ENVIRONMENT explicitly
// to false.
var isReactActEnvironmentGlobal = // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined; // $FlowExpectedError - Flow doesn't know about jest
var jestIsDefined = typeof jest !== 'undefined';
return jestIsDefined && isReactActEnvironmentGlobal !== false;
}
}
function isConcurrentActEnvironment() {
{
var isReactActEnvironmentGlobal = // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined;
if (!isReactActEnvironmentGlobal && ReactCurrentActQueue.current !== null) {
// TODO: Include link to relevant documentation page.
error('The current testing environment is not configured to support ' + 'act(...)');
}
return isReactActEnvironmentGlobal;
}
}
var ceil = Math.ceil;
var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig,
ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue;
var NoContext =
/* */
0;
var BatchedContext =
/* */
1;
var RenderContext =
/* */
2;
var CommitContext =
/* */
4;
var RootInProgress = 0;
var RootFatalErrored = 1;
var RootErrored = 2;
var RootSuspended = 3;
var RootSuspendedWithDelay = 4;
var RootCompleted = 5;
var RootDidNotComplete = 6; // Describes where we are in the React execution stack
var executionContext = NoContext; // The root we're working on
var workInProgressRoot = null; // The fiber we're working on
var workInProgress = null; // The lanes we're rendering
var workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree
// This is a superset of the lanes we started working on at the root. The only
// case where it's different from `workInProgressRootRenderLanes` is when we
// enter a subtree that is hidden and needs to be unhidden: Suspense and
// Offscreen component.
//
// Most things in the work loop should deal with workInProgressRootRenderLanes.
// Most things in begin/complete phases should deal with subtreeRenderLanes.
var subtreeRenderLanes = NoLanes;
var subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc.
var workInProgressRootExitStatus = RootInProgress; // A fatal error, if one is thrown
var workInProgressRootFatalError = null; // "Included" lanes refer to lanes that were worked on during this render. It's
// slightly different than `renderLanes` because `renderLanes` can change as you
// enter and exit an Offscreen tree. This value is the combination of all render
// lanes for the entire render phase.
var workInProgressRootIncludedLanes = NoLanes; // The work left over by components that were visited during this render. Only
// includes unprocessed updates, not work in bailed out children.
var workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.
var workInProgressRootInterleavedUpdatedLanes = NoLanes; // Lanes that were updated during the render phase (*not* an interleaved event).
var workInProgressRootPingedLanes = NoLanes; // Errors that are thrown during the render phase.
var workInProgressRootConcurrentErrors = null; // These are errors that we recovered from without surfacing them to the UI.
// We will log them once the tree commits.
var workInProgressRootRecoverableErrors = null; // The most recent time we committed a fallback. This lets us ensure a train
// model where we don't commit new loading states in too quick succession.
var globalMostRecentFallbackTime = 0;
var FALLBACK_THROTTLE_MS = 500; // The absolute time for when we should start giving up on rendering
// more and prefer CPU suspense heuristics instead.
var workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU
// suspense heuristics and opt out of rendering more content.
var RENDER_TIMEOUT_MS = 500;
var workInProgressTransitions = null;
function resetRenderTimer() {
workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS;
}
function getRenderTargetTime() {
return workInProgressRootRenderTargetTime;
}
var hasUncaughtError = false;
var firstUncaughtError = null;
var legacyErrorBoundariesThatAlreadyFailed = null; // Only used when enableProfilerNestedUpdateScheduledHook is true;
var rootDoesHavePassiveEffects = false;
var rootWithPendingPassiveEffects = null;
var pendingPassiveEffectsLanes = NoLanes;
var pendingPassiveProfilerEffects = [];
var pendingPassiveTransitions = null; // Use these to prevent an infinite loop of nested updates
var NESTED_UPDATE_LIMIT = 50;
var nestedUpdateCount = 0;
var rootWithNestedUpdates = null;
var isFlushingPassiveEffects = false;
var didScheduleUpdateDuringPassiveEffects = false;
var NESTED_PASSIVE_UPDATE_LIMIT = 50;
var nestedPassiveUpdateCount = 0;
var rootWithPassiveNestedUpdates = null; // If two updates are scheduled within the same event, we should treat their
// event times as simultaneous, even if the actual clock time has advanced
// between the first and second call.
var currentEventTime = NoTimestamp;
var currentEventTransitionLane = NoLanes;
var isRunningInsertionEffect = false;
function getWorkInProgressRoot() {
return workInProgressRoot;
}
function requestEventTime() {
if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
// We're inside React, so it's fine to read the actual time.
return now();
} // We're not inside React, so we may be in the middle of a browser event.
if (currentEventTime !== NoTimestamp) {
// Use the same start time for all updates until we enter React again.
return currentEventTime;
} // This is the first update since React yielded. Compute a new start time.
currentEventTime = now();
return currentEventTime;
}
function requestUpdateLane(fiber) {
// Special cases
var mode = fiber.mode;
if ((mode & ConcurrentMode) === NoMode) {
return SyncLane;
} else if ( (executionContext & RenderContext) !== NoContext && workInProgressRootRenderLanes !== NoLanes) {
// This is a render phase update. These are not officially supported. The
// old behavior is to give this the same "thread" (lanes) as
// whatever is currently rendering. So if you call `setState` on a component
// that happens later in the same render, it will flush. Ideally, we want to
// remove the special case and treat them as if they came from an
// interleaved event. Regardless, this pattern is not officially supported.
// This behavior is only a fallback. The flag only exists until we can roll
// out the setState warning, since existing code might accidentally rely on
// the current behavior.
return pickArbitraryLane(workInProgressRootRenderLanes);
}
var isTransition = requestCurrentTransition() !== NoTransition;
if (isTransition) {
if ( ReactCurrentBatchConfig$3.transition !== null) {
var transition = ReactCurrentBatchConfig$3.transition;
if (!transition._updatedFibers) {
transition._updatedFibers = new Set();
}
transition._updatedFibers.add(fiber);
} // The algorithm for assigning an update to a lane should be stable for all
// updates at the same priority within the same event. To do this, the
// inputs to the algorithm must be the same.
//
// The trick we use is to cache the first of each of these inputs within an
// event. Then reset the cached values once we can be sure the event is
// over. Our heuristic for that is whenever we enter a concurrent work loop.
if (currentEventTransitionLane === NoLane) {
// All transitions within the same event are assigned the same lane.
currentEventTransitionLane = claimNextTransitionLane();
}
return currentEventTransitionLane;
} // Updates originating inside certain React methods, like flushSync, have
// their priority set by tracking it with a context variable.
//
// The opaque type returned by the host config is internally a lane, so we can
// use that directly.
// TODO: Move this type conversion to the event priority module.
var updateLane = getCurrentUpdatePriority();
if (updateLane !== NoLane) {
return updateLane;
} // This update originated outside React. Ask the host environment for an
// appropriate priority, based on the type of event.
//
// The opaque type returned by the host config is internally a lane, so we can
// use that directly.
// TODO: Move this type conversion to the event priority module.
var eventLane = getCurrentEventPriority();
return eventLane;
}
function requestRetryLane(fiber) {
// This is a fork of `requestUpdateLane` designed specifically for Suspense
// "retries" — a special update that attempts to flip a Suspense boundary
// from its placeholder state to its primary/resolved state.
// Special cases
var mode = fiber.mode;
if ((mode & ConcurrentMode) === NoMode) {
return SyncLane;
}
return claimNextRetryLane();
}
function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {
checkForNestedUpdates();
{
if (isRunningInsertionEffect) {
error('useInsertionEffect must not schedule updates.');
}
}
{
if (isFlushingPassiveEffects) {
didScheduleUpdateDuringPassiveEffects = true;
}
} // Mark that the root has a pending update.
markRootUpdated(root, lane, eventTime);
if ((executionContext & RenderContext) !== NoLanes && root === workInProgressRoot) {
// This update was dispatched during the render phase. This is a mistake
// if the update originates from user space (with the exception of local
// hook updates, which are handled differently and don't reach this
// function), but there are some internal React features that use this as
// an implementation detail, like selective hydration.
warnAboutRenderPhaseUpdatesInDEV(fiber); // Track lanes that were updated during the render phase
} else {
// This is a normal update, scheduled from outside the render phase. For
// example, during an input event.
{
if (isDevToolsPresent) {
addFiberToLanesMap(root, fiber, lane);
}
}
warnIfUpdatesNotWrappedWithActDEV(fiber);
if (root === workInProgressRoot) {
// Received an update to a tree that's in the middle of rendering. Mark
// that there was an interleaved update work on this root. Unless the
// `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render
// phase update. In that case, we don't treat render phase updates as if
// they were interleaved, for backwards compat reasons.
if ( (executionContext & RenderContext) === NoContext) {
workInProgressRootInterleavedUpdatedLanes = mergeLanes(workInProgressRootInterleavedUpdatedLanes, lane);
}
if (workInProgressRootExitStatus === RootSuspendedWithDelay) {
// The root already suspended with a delay, which means this render
// definitely won't finish. Since we have a new update, let's mark it as
// suspended now, right before marking the incoming update. This has the
// effect of interrupting the current render and switching to the update.
// TODO: Make sure this doesn't override pings that happen while we've
// already started rendering.
markRootSuspended$1(root, workInProgressRootRenderLanes);
}
}
ensureRootIsScheduled(root, eventTime);
if (lane === SyncLane && executionContext === NoContext && (fiber.mode & ConcurrentMode) === NoMode && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
!( ReactCurrentActQueue$1.isBatchingLegacy)) {
// Flush the synchronous work now, unless we're already working or inside
// a batch. This is intentionally inside scheduleUpdateOnFiber instead of
// scheduleCallbackForFiber to preserve the ability to schedule a callback
// without immediately flushing it. We only do this for user-initiated
// updates, to preserve historical behavior of legacy mode.
resetRenderTimer();
flushSyncCallbacksOnlyInLegacyMode();
}
}
}
function scheduleInitialHydrationOnRoot(root, lane, eventTime) {
// This is a special fork of scheduleUpdateOnFiber that is only used to
// schedule the initial hydration of a root that has just been created. Most
// of the stuff in scheduleUpdateOnFiber can be skipped.
//
// The main reason for this separate path, though, is to distinguish the
// initial children from subsequent updates. In fully client-rendered roots
// (createRoot instead of hydrateRoot), all top-level renders are modeled as
// updates, but hydration roots are special because the initial render must
// match what was rendered on the server.
var current = root.current;
current.lanes = lane;
markRootUpdated(root, lane, eventTime);
ensureRootIsScheduled(root, eventTime);
}
function isUnsafeClassRenderPhaseUpdate(fiber) {
// Check if this is a render phase update. Only called by class components,
// which special (deprecated) behavior for UNSAFE_componentWillReceive props.
return (// TODO: Remove outdated deferRenderPhaseUpdateToNextBatch experiment. We
// decided not to enable it.
(executionContext & RenderContext) !== NoContext
);
} // Use this function to schedule a task for a root. There's only one task per
// root; if a task was already scheduled, we'll check to make sure the priority
// of the existing task is the same as the priority of the next level that the
// root has work on. This function is called on every update, and right before
// exiting a task.
function ensureRootIsScheduled(root, currentTime) {
var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as
// expired so we know to work on those next.
markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.
var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);
if (nextLanes === NoLanes) {
// Special case: There's nothing to work on.
if (existingCallbackNode !== null) {
cancelCallback$1(existingCallbackNode);
}
root.callbackNode = null;
root.callbackPriority = NoLane;
return;
} // We use the highest priority lane to represent the priority of the callback.
var newCallbackPriority = getHighestPriorityLane(nextLanes); // Check if there's an existing task. We may be able to reuse it.
var existingCallbackPriority = root.callbackPriority;
if (existingCallbackPriority === newCallbackPriority && // Special case related to `act`. If the currently scheduled task is a
// Scheduler task, rather than an `act` task, cancel it and re-scheduled
// on the `act` queue.
!( ReactCurrentActQueue$1.current !== null && existingCallbackNode !== fakeActCallbackNode)) {
{
// If we're going to re-use an existing task, it needs to exist.
// Assume that discrete update microtasks are non-cancellable and null.
// TODO: Temporary until we confirm this warning is not fired.
if (existingCallbackNode == null && existingCallbackPriority !== SyncLane) {
error('Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.');
}
} // The priority hasn't changed. We can reuse the existing task. Exit.
return;
}
if (existingCallbackNode != null) {
// Cancel the existing callback. We'll schedule a new one below.
cancelCallback$1(existingCallbackNode);
} // Schedule a new callback.
var newCallbackNode;
if (newCallbackPriority === SyncLane) {
// Special case: Sync React callbacks are scheduled on a special
// internal queue
if (root.tag === LegacyRoot) {
if ( ReactCurrentActQueue$1.isBatchingLegacy !== null) {
ReactCurrentActQueue$1.didScheduleLegacyUpdate = true;
}
scheduleLegacySyncCallback(performSyncWorkOnRoot.bind(null, root));
} else {
scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
}
{
// Flush the queue in a microtask.
if ( ReactCurrentActQueue$1.current !== null) {
// Inside `act`, use our internal `act` queue so that these get flushed
// at the end of the current scope even when using the sync version
// of `act`.
ReactCurrentActQueue$1.current.push(flushSyncCallbacks);
} else {
scheduleMicrotask(function () {
// In Safari, appending an iframe forces microtasks to run.
// https://github.com/facebook/react/issues/22459
// We don't support running callbacks in the middle of render
// or commit so we need to check against that.
if ((executionContext & (RenderContext | CommitContext)) === NoContext) {
// Note that this would still prematurely flush the callbacks
// if this happens outside render or commit phase (e.g. in an event).
flushSyncCallbacks();
}
});
}
}
newCallbackNode = null;
} else {
var schedulerPriorityLevel;
switch (lanesToEventPriority(nextLanes)) {
case DiscreteEventPriority:
schedulerPriorityLevel = ImmediatePriority;
break;
case ContinuousEventPriority:
schedulerPriorityLevel = UserBlockingPriority;
break;
case DefaultEventPriority:
schedulerPriorityLevel = NormalPriority;
break;
case IdleEventPriority:
schedulerPriorityLevel = IdlePriority;
break;
default:
schedulerPriorityLevel = NormalPriority;
break;
}
newCallbackNode = scheduleCallback$1(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));
}
root.callbackPriority = newCallbackPriority;
root.callbackNode = newCallbackNode;
} // This is the entry point for every concurrent task, i.e. anything that
// goes through Scheduler.
function performConcurrentWorkOnRoot(root, didTimeout) {
{
resetNestedUpdateFlag();
} // Since we know we're in a React event, we can clear the current
// event time. The next update will compute a new event time.
currentEventTime = NoTimestamp;
currentEventTransitionLane = NoLanes;
if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
throw new Error('Should not already be working.');
} // Flush any pending passive effects before deciding which lanes to work on,
// in case they schedule additional work.
var originalCallbackNode = root.callbackNode;
var didFlushPassiveEffects = flushPassiveEffects();
if (didFlushPassiveEffects) {
// Something in the passive effect phase may have canceled the current task.
// Check if the task node for this root was changed.
if (root.callbackNode !== originalCallbackNode) {
// The current task was canceled. Exit. We don't need to call
// `ensureRootIsScheduled` because the check above implies either that
// there's a new task, or that there's no remaining work on this root.
return null;
}
} // Determine the next lanes to work on, using the fields stored
// on the root.
var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);
if (lanes === NoLanes) {
// Defensive coding. This is never expected to happen.
return null;
} // We disable time-slicing in some cases: if the work has been CPU-bound
// for too long ("expired" work, to prevent starvation), or we're in
// sync-updates-by-default mode.
// TODO: We only check `didTimeout` defensively, to account for a Scheduler
// bug we're still investigating. Once the bug in Scheduler is fixed,
// we can remove this, since we track expiration ourselves.
var shouldTimeSlice = !includesBlockingLane(root, lanes) && !includesExpiredLane(root, lanes) && ( !didTimeout);
var exitStatus = shouldTimeSlice ? renderRootConcurrent(root, lanes) : renderRootSync(root, lanes);
if (exitStatus !== RootInProgress) {
if (exitStatus === RootErrored) {
// If something threw an error, try rendering one more time. We'll
// render synchronously to block concurrent data mutations, and we'll
// includes all pending updates are included. If it still fails after
// the second attempt, we'll give up and commit the resulting tree.
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);
if (errorRetryLanes !== NoLanes) {
lanes = errorRetryLanes;
exitStatus = recoverFromConcurrentError(root, errorRetryLanes);
}
}
if (exitStatus === RootFatalErrored) {
var fatalError = workInProgressRootFatalError;
prepareFreshStack(root, NoLanes);
markRootSuspended$1(root, lanes);
ensureRootIsScheduled(root, now());
throw fatalError;
}
if (exitStatus === RootDidNotComplete) {
// The render unwound without completing the tree. This happens in special
// cases where need to exit the current render without producing a
// consistent tree or committing.
//
// This should only happen during a concurrent render, not a discrete or
// synchronous update. We should have already checked for this when we
// unwound the stack.
markRootSuspended$1(root, lanes);
} else {
// The render completed.
// Check if this render may have yielded to a concurrent event, and if so,
// confirm that any newly rendered stores are consistent.
// TODO: It's possible that even a concurrent render may never have yielded
// to the main thread, if it was fast enough, or if it expired. We could
// skip the consistency check in that case, too.
var renderWasConcurrent = !includesBlockingLane(root, lanes);
var finishedWork = root.current.alternate;
if (renderWasConcurrent && !isRenderConsistentWithExternalStores(finishedWork)) {
// A store was mutated in an interleaved event. Render again,
// synchronously, to block further mutations.
exitStatus = renderRootSync(root, lanes); // We need to check again if something threw
if (exitStatus === RootErrored) {
var _errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);
if (_errorRetryLanes !== NoLanes) {
lanes = _errorRetryLanes;
exitStatus = recoverFromConcurrentError(root, _errorRetryLanes); // We assume the tree is now consistent because we didn't yield to any
// concurrent events.
}
}
if (exitStatus === RootFatalErrored) {
var _fatalError = workInProgressRootFatalError;
prepareFreshStack(root, NoLanes);
markRootSuspended$1(root, lanes);
ensureRootIsScheduled(root, now());
throw _fatalError;
}
} // We now have a consistent tree. The next step is either to commit it,
// or, if something suspended, wait to commit it after a timeout.
root.finishedWork = finishedWork;
root.finishedLanes = lanes;
finishConcurrentRender(root, exitStatus, lanes);
}
}
ensureRootIsScheduled(root, now());
if (root.callbackNode === originalCallbackNode) {
// The task node scheduled for this root is the same one that's
// currently executed. Need to return a continuation.
return performConcurrentWorkOnRoot.bind(null, root);
}
return null;
}
function recoverFromConcurrentError(root, errorRetryLanes) {
// If an error occurred during hydration, discard server response and fall
// back to client side render.
// Before rendering again, save the errors from the previous attempt.
var errorsFromFirstAttempt = workInProgressRootConcurrentErrors;
if (isRootDehydrated(root)) {
// The shell failed to hydrate. Set a flag to force a client rendering
// during the next attempt. To do this, we call prepareFreshStack now
// to create the root work-in-progress fiber. This is a bit weird in terms
// of factoring, because it relies on renderRootSync not calling
// prepareFreshStack again in the call below, which happens because the
// root and lanes haven't changed.
//
// TODO: I think what we should do is set ForceClientRender inside
// throwException, like we do for nested Suspense boundaries. The reason
// it's here instead is so we can switch to the synchronous work loop, too.
// Something to consider for a future refactor.
var rootWorkInProgress = prepareFreshStack(root, errorRetryLanes);
rootWorkInProgress.flags |= ForceClientRender;
{
errorHydratingContainer(root.containerInfo);
}
}
var exitStatus = renderRootSync(root, errorRetryLanes);
if (exitStatus !== RootErrored) {
// Successfully finished rendering on retry
// The errors from the failed first attempt have been recovered. Add
// them to the collection of recoverable errors. We'll log them in the
// commit phase.
var errorsFromSecondAttempt = workInProgressRootRecoverableErrors;
workInProgressRootRecoverableErrors = errorsFromFirstAttempt; // The errors from the second attempt should be queued after the errors
// from the first attempt, to preserve the causal sequence.
if (errorsFromSecondAttempt !== null) {
queueRecoverableErrors(errorsFromSecondAttempt);
}
}
return exitStatus;
}
function queueRecoverableErrors(errors) {
if (workInProgressRootRecoverableErrors === null) {
workInProgressRootRecoverableErrors = errors;
} else {
workInProgressRootRecoverableErrors.push.apply(workInProgressRootRecoverableErrors, errors);
}
}
function finishConcurrentRender(root, exitStatus, lanes) {
switch (exitStatus) {
case RootInProgress:
case RootFatalErrored:
{
throw new Error('Root did not complete. This is a bug in React.');
}
// Flow knows about invariant, so it complains if I add a break
// statement, but eslint doesn't know about invariant, so it complains
// if I do. eslint-disable-next-line no-fallthrough
case RootErrored:
{
// We should have already attempted to retry this tree. If we reached
// this point, it errored again. Commit it.
commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);
break;
}
case RootSuspended:
{
markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we
// should immediately commit it or wait a bit.
if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope
!shouldForceFlushFallbacksInDEV()) {
// This render only included retries, no updates. Throttle committing
// retries so that we don't show too many loading states too quickly.
var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.
if (msUntilTimeout > 10) {
var nextLanes = getNextLanes(root, NoLanes);
if (nextLanes !== NoLanes) {
// There's additional work on this root.
break;
}
var suspendedLanes = root.suspendedLanes;
if (!isSubsetOfLanes(suspendedLanes, lanes)) {
// We should prefer to render the fallback of at the last
// suspended level. Ping the last suspended level to try
// rendering it again.
// FIXME: What if the suspended lanes are Idle? Should not restart.
var eventTime = requestEventTime();
markRootPinged(root, suspendedLanes);
break;
} // The render is suspended, it hasn't timed out, and there's no
// lower priority work to do. Instead of committing the fallback
// immediately, wait for more data to arrive.
root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root, workInProgressRootRecoverableErrors, workInProgressTransitions), msUntilTimeout);
break;
}
} // The work expired. Commit immediately.
commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);
break;
}
case RootSuspendedWithDelay:
{
markRootSuspended$1(root, lanes);
if (includesOnlyTransitions(lanes)) {
// This is a transition, so we should exit without committing a
// placeholder and without scheduling a timeout. Delay indefinitely
// until we receive more data.
break;
}
if (!shouldForceFlushFallbacksInDEV()) {
// This is not a transition, but we did trigger an avoided state.
// Schedule a placeholder to display after a short delay, using the Just
// Noticeable Difference.
// TODO: Is the JND optimization worth the added complexity? If this is
// the only reason we track the event time, then probably not.
// Consider removing.
var mostRecentEventTime = getMostRecentEventTime(root, lanes);
var eventTimeMs = mostRecentEventTime;
var timeElapsedMs = now() - eventTimeMs;
var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time.
if (_msUntilTimeout > 10) {
// Instead of committing the fallback immediately, wait for more data
// to arrive.
root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root, workInProgressRootRecoverableErrors, workInProgressTransitions), _msUntilTimeout);
break;
}
} // Commit the placeholder.
commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);
break;
}
case RootCompleted:
{
// The work completed. Ready to commit.
commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);
break;
}
default:
{
throw new Error('Unknown root exit status.');
}
}
}
function isRenderConsistentWithExternalStores(finishedWork) {
// Search the rendered tree for external store reads, and check whether the
// stores were mutated in a concurrent event. Intentionally using an iterative
// loop instead of recursion so we can exit early.
var node = finishedWork;
while (true) {
if (node.flags & StoreConsistency) {
var updateQueue = node.updateQueue;
if (updateQueue !== null) {
var checks = updateQueue.stores;
if (checks !== null) {
for (var i = 0; i < checks.length; i++) {
var check = checks[i];
var getSnapshot = check.getSnapshot;
var renderedValue = check.value;
try {
if (!objectIs(getSnapshot(), renderedValue)) {
// Found an inconsistent store.
return false;
}
} catch (error) {
// If `getSnapshot` throws, return `false`. This will schedule
// a re-render, and the error will be rethrown during render.
return false;
}
}
}
}
}
var child = node.child;
if (node.subtreeFlags & StoreConsistency && child !== null) {
child.return = node;
node = child;
continue;
}
if (node === finishedWork) {
return true;
}
while (node.sibling === null) {
if (node.return === null || node.return === finishedWork) {
return true;
}
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
} // Flow doesn't know this is unreachable, but eslint does
// eslint-disable-next-line no-unreachable
return true;
}
function markRootSuspended$1(root, suspendedLanes) {
// When suspending, we should always exclude lanes that were pinged or (more
// rarely, since we try to avoid it) updated during the render phase.
// TODO: Lol maybe there's a better way to factor this besides this
// obnoxiously named function :)
suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);
suspendedLanes = removeLanes(suspendedLanes, workInProgressRootInterleavedUpdatedLanes);
markRootSuspended(root, suspendedLanes);
} // This is the entry point for synchronous tasks that don't go
// through Scheduler
function performSyncWorkOnRoot(root) {
{
syncNestedUpdateFlag();
}
if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
throw new Error('Should not already be working.');
}
flushPassiveEffects();
var lanes = getNextLanes(root, NoLanes);
if (!includesSomeLane(lanes, SyncLane)) {
// There's no remaining sync work left.
ensureRootIsScheduled(root, now());
return null;
}
var exitStatus = renderRootSync(root, lanes);
if (root.tag !== LegacyRoot && exitStatus === RootErrored) {
// If something threw an error, try rendering one more time. We'll render
// synchronously to block concurrent data mutations, and we'll includes
// all pending updates are included. If it still fails after the second
// attempt, we'll give up and commit the resulting tree.
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);
if (errorRetryLanes !== NoLanes) {
lanes = errorRetryLanes;
exitStatus = recoverFromConcurrentError(root, errorRetryLanes);
}
}
if (exitStatus === RootFatalErrored) {
var fatalError = workInProgressRootFatalError;
prepareFreshStack(root, NoLanes);
markRootSuspended$1(root, lanes);
ensureRootIsScheduled(root, now());
throw fatalError;
}
if (exitStatus === RootDidNotComplete) {
throw new Error('Root did not complete. This is a bug in React.');
} // We now have a consistent tree. Because this is a sync render, we
// will commit it even if something suspended.
var finishedWork = root.current.alternate;
root.finishedWork = finishedWork;
root.finishedLanes = lanes;
commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions); // Before exiting, make sure there's a callback scheduled for the next
// pending level.
ensureRootIsScheduled(root, now());
return null;
}
function flushRoot(root, lanes) {
if (lanes !== NoLanes) {
markRootEntangled(root, mergeLanes(lanes, SyncLane));
ensureRootIsScheduled(root, now());
if ((executionContext & (RenderContext | CommitContext)) === NoContext) {
resetRenderTimer();
flushSyncCallbacks();
}
}
}
function batchedUpdates$1(fn, a) {
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
try {
return fn(a);
} finally {
executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer
// most batchedUpdates-like method.
if (executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
!( ReactCurrentActQueue$1.isBatchingLegacy)) {
resetRenderTimer();
flushSyncCallbacksOnlyInLegacyMode();
}
}
}
function discreteUpdates(fn, a, b, c, d) {
var previousPriority = getCurrentUpdatePriority();
var prevTransition = ReactCurrentBatchConfig$3.transition;
try {
ReactCurrentBatchConfig$3.transition = null;
setCurrentUpdatePriority(DiscreteEventPriority);
return fn(a, b, c, d);
} finally {
setCurrentUpdatePriority(previousPriority);
ReactCurrentBatchConfig$3.transition = prevTransition;
if (executionContext === NoContext) {
resetRenderTimer();
}
}
} // Overload the definition to the two valid signatures.
// Warning, this opts-out of checking the function body.
// eslint-disable-next-line no-redeclare
function flushSync(fn) {
// In legacy mode, we flush pending passive effects at the beginning of the
// next event, not at the end of the previous one.
if (rootWithPendingPassiveEffects !== null && rootWithPendingPassiveEffects.tag === LegacyRoot && (executionContext & (RenderContext | CommitContext)) === NoContext) {
flushPassiveEffects();
}
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
var prevTransition = ReactCurrentBatchConfig$3.transition;
var previousPriority = getCurrentUpdatePriority();
try {
ReactCurrentBatchConfig$3.transition = null;
setCurrentUpdatePriority(DiscreteEventPriority);
if (fn) {
return fn();
} else {
return undefined;
}
} finally {
setCurrentUpdatePriority(previousPriority);
ReactCurrentBatchConfig$3.transition = prevTransition;
executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.
// Note that this will happen even if batchedUpdates is higher up
// the stack.
if ((executionContext & (RenderContext | CommitContext)) === NoContext) {
flushSyncCallbacks();
}
}
}
function isAlreadyRendering() {
// Used by the renderer to print a warning if certain APIs are called from
// the wrong context.
return (executionContext & (RenderContext | CommitContext)) !== NoContext;
}
function pushRenderLanes(fiber, lanes) {
push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);
subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);
workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);
}
function popRenderLanes(fiber) {
subtreeRenderLanes = subtreeRenderLanesCursor.current;
pop(subtreeRenderLanesCursor, fiber);
}
function prepareFreshStack(root, lanes) {
root.finishedWork = null;
root.finishedLanes = NoLanes;
var timeoutHandle = root.timeoutHandle;
if (timeoutHandle !== noTimeout) {
// The root previous suspended and scheduled a timeout to commit a fallback
// state. Now that we have additional work, cancel the timeout.
root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
cancelTimeout(timeoutHandle);
}
if (workInProgress !== null) {
var interruptedWork = workInProgress.return;
while (interruptedWork !== null) {
var current = interruptedWork.alternate;
unwindInterruptedWork(current, interruptedWork);
interruptedWork = interruptedWork.return;
}
}
workInProgressRoot = root;
var rootWorkInProgress = createWorkInProgress(root.current, null);
workInProgress = rootWorkInProgress;
workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;
workInProgressRootExitStatus = RootInProgress;
workInProgressRootFatalError = null;
workInProgressRootSkippedLanes = NoLanes;
workInProgressRootInterleavedUpdatedLanes = NoLanes;
workInProgressRootPingedLanes = NoLanes;
workInProgressRootConcurrentErrors = null;
workInProgressRootRecoverableErrors = null;
finishQueueingConcurrentUpdates();
{
ReactStrictModeWarnings.discardPendingWarnings();
}
return rootWorkInProgress;
}
function handleError(root, thrownValue) {
do {
var erroredWork = workInProgress;
try {
// Reset module-level state that was set during the render phase.
resetContextDependencies();
resetHooksAfterThrow();
resetCurrentFiber(); // TODO: I found and added this missing line while investigating a
// separate issue. Write a regression test using string refs.
ReactCurrentOwner$2.current = null;
if (erroredWork === null || erroredWork.return === null) {
// Expected to be working on a non-root fiber. This is a fatal error
// because there's no ancestor that can handle it; the root is
// supposed to capture all errors that weren't caught by an error
// boundary.
workInProgressRootExitStatus = RootFatalErrored;
workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next
// sibling, or the parent if there are no siblings. But since the root
// has no siblings nor a parent, we set it to null. Usually this is
// handled by `completeUnitOfWork` or `unwindWork`, but since we're
// intentionally not calling those, we need set it here.
// TODO: Consider calling `unwindWork` to pop the contexts.
workInProgress = null;
return;
}
if (enableProfilerTimer && erroredWork.mode & ProfileMode) {
// Record the time spent rendering before an error was thrown. This
// avoids inaccurate Profiler durations in the case of a
// suspended render.
stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true);
}
if (enableSchedulingProfiler) {
markComponentRenderStopped();
if (thrownValue !== null && typeof thrownValue === 'object' && typeof thrownValue.then === 'function') {
var wakeable = thrownValue;
markComponentSuspended(erroredWork, wakeable, workInProgressRootRenderLanes);
} else {
markComponentErrored(erroredWork, thrownValue, workInProgressRootRenderLanes);
}
}
throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);
completeUnitOfWork(erroredWork);
} catch (yetAnotherThrownValue) {
// Something in the return path also threw.
thrownValue = yetAnotherThrownValue;
if (workInProgress === erroredWork && erroredWork !== null) {
// If this boundary has already errored, then we had trouble processing
// the error. Bubble it to the next boundary.
erroredWork = erroredWork.return;
workInProgress = erroredWork;
} else {
erroredWork = workInProgress;
}
continue;
} // Return to the normal work loop.
return;
} while (true);
}
function pushDispatcher() {
var prevDispatcher = ReactCurrentDispatcher$2.current;
ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;
if (prevDispatcher === null) {
// The React isomorphic package does not include a default dispatcher.
// Instead the first renderer will lazily attach one, in order to give
// nicer error messages.
return ContextOnlyDispatcher;
} else {
return prevDispatcher;
}
}
function popDispatcher(prevDispatcher) {
ReactCurrentDispatcher$2.current = prevDispatcher;
}
function markCommitTimeOfFallback() {
globalMostRecentFallbackTime = now();
}
function markSkippedUpdateLanes(lane) {
workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);
}
function renderDidSuspend() {
if (workInProgressRootExitStatus === RootInProgress) {
workInProgressRootExitStatus = RootSuspended;
}
}
function renderDidSuspendDelayIfPossible() {
if (workInProgressRootExitStatus === RootInProgress || workInProgressRootExitStatus === RootSuspended || workInProgressRootExitStatus === RootErrored) {
workInProgressRootExitStatus = RootSuspendedWithDelay;
} // Check if there are updates that we skipped tree that might have unblocked
// this render.
if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootInterleavedUpdatedLanes))) {
// Mark the current render as suspended so that we switch to working on
// the updates that were skipped. Usually we only suspend at the end of
// the render phase.
// TODO: We should probably always mark the root as suspended immediately
// (inside this function), since by suspending at the end of the render
// phase introduces a potential mistake where we suspend lanes that were
// pinged or updated while we were rendering.
markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);
}
}
function renderDidError(error) {
if (workInProgressRootExitStatus !== RootSuspendedWithDelay) {
workInProgressRootExitStatus = RootErrored;
}
if (workInProgressRootConcurrentErrors === null) {
workInProgressRootConcurrentErrors = [error];
} else {
workInProgressRootConcurrentErrors.push(error);
}
} // Called during render to determine if anything has suspended.
// Returns false if we're not sure.
function renderHasNotSuspendedYet() {
// If something errored or completed, we can't really be sure,
// so those are false.
return workInProgressRootExitStatus === RootInProgress;
}
function renderRootSync(root, lanes) {
var prevExecutionContext = executionContext;
executionContext |= RenderContext;
var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack
// and prepare a fresh one. Otherwise we'll continue where we left off.
if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
{
if (isDevToolsPresent) {
var memoizedUpdaters = root.memoizedUpdaters;
if (memoizedUpdaters.size > 0) {
restorePendingUpdaters(root, workInProgressRootRenderLanes);
memoizedUpdaters.clear();
} // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.
// If we bailout on this work, we'll move them back (like above).
// It's important to move them now in case the work spawns more work at the same priority with different updaters.
// That way we can keep the current update and future updates separate.
movePendingFibersToMemoized(root, lanes);
}
}
workInProgressTransitions = getTransitionsForLanes();
prepareFreshStack(root, lanes);
}
{
markRenderStarted(lanes);
}
do {
try {
workLoopSync();
break;
} catch (thrownValue) {
handleError(root, thrownValue);
}
} while (true);
resetContextDependencies();
executionContext = prevExecutionContext;
popDispatcher(prevDispatcher);
if (workInProgress !== null) {
// This is a sync render, so we should have finished the whole tree.
throw new Error('Cannot commit an incomplete root. This error is likely caused by a ' + 'bug in React. Please file an issue.');
}
{
markRenderStopped();
} // Set this to null to indicate there's no in-progress render.
workInProgressRoot = null;
workInProgressRootRenderLanes = NoLanes;
return workInProgressRootExitStatus;
} // The work loop is an extremely hot path. Tell Closure not to inline it.
/** @noinline */
function workLoopSync() {
// Already timed out, so perform work without checking if we need to yield.
while (workInProgress !== null) {
performUnitOfWork(workInProgress);
}
}
function renderRootConcurrent(root, lanes) {
var prevExecutionContext = executionContext;
executionContext |= RenderContext;
var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack
// and prepare a fresh one. Otherwise we'll continue where we left off.
if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
{
if (isDevToolsPresent) {
var memoizedUpdaters = root.memoizedUpdaters;
if (memoizedUpdaters.size > 0) {
restorePendingUpdaters(root, workInProgressRootRenderLanes);
memoizedUpdaters.clear();
} // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.
// If we bailout on this work, we'll move them back (like above).
// It's important to move them now in case the work spawns more work at the same priority with different updaters.
// That way we can keep the current update and future updates separate.
movePendingFibersToMemoized(root, lanes);
}
}
workInProgressTransitions = getTransitionsForLanes();
resetRenderTimer();
prepareFreshStack(root, lanes);
}
{
markRenderStarted(lanes);
}
do {
try {
workLoopConcurrent();
break;
} catch (thrownValue) {
handleError(root, thrownValue);
}
} while (true);
resetContextDependencies();
popDispatcher(prevDispatcher);
executionContext = prevExecutionContext;
if (workInProgress !== null) {
// Still work remaining.
{
markRenderYielded();
}
return RootInProgress;
} else {
// Completed the tree.
{
markRenderStopped();
} // Set this to null to indicate there's no in-progress render.
workInProgressRoot = null;
workInProgressRootRenderLanes = NoLanes; // Return the final exit status.
return workInProgressRootExitStatus;
}
}
/** @noinline */
function workLoopConcurrent() {
// Perform work until Scheduler asks us to yield
while (workInProgress !== null && !shouldYield()) {
performUnitOfWork(workInProgress);
}
}
function performUnitOfWork(unitOfWork) {
// The current, flushed, state of this fiber is the alternate. Ideally
// nothing should rely on this, but relying on it here means that we don't
// need an additional field on the work in progress.
var current = unitOfWork.alternate;
setCurrentFiber(unitOfWork);
var next;
if ( (unitOfWork.mode & ProfileMode) !== NoMode) {
startProfilerTimer(unitOfWork);
next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);
} else {
next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
}
resetCurrentFiber();
unitOfWork.memoizedProps = unitOfWork.pendingProps;
if (next === null) {
// If this doesn't spawn new work, complete the current work.
completeUnitOfWork(unitOfWork);
} else {
workInProgress = next;
}
ReactCurrentOwner$2.current = null;
}
function completeUnitOfWork(unitOfWork) {
// Attempt to complete the current unit of work, then move to the next
// sibling. If there are no more siblings, return to the parent fiber.
var completedWork = unitOfWork;
do {
// The current, flushed, state of this fiber is the alternate. Ideally
// nothing should rely on this, but relying on it here means that we don't
// need an additional field on the work in progress.
var current = completedWork.alternate;
var returnFiber = completedWork.return; // Check if the work completed or if something threw.
if ((completedWork.flags & Incomplete) === NoFlags) {
setCurrentFiber(completedWork);
var next = void 0;
if ( (completedWork.mode & ProfileMode) === NoMode) {
next = completeWork(current, completedWork, subtreeRenderLanes);
} else {
startProfilerTimer(completedWork);
next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error.
stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);
}
resetCurrentFiber();
if (next !== null) {
// Completing this fiber spawned new work. Work on that next.
workInProgress = next;
return;
}
} else {
// This fiber did not complete because something threw. Pop values off
// the stack without entering the complete phase. If this is a boundary,
// capture values if possible.
var _next = unwindWork(current, completedWork); // Because this fiber did not complete, don't reset its lanes.
if (_next !== null) {
// If completing this work spawned new work, do that next. We'll come
// back here again.
// Since we're restarting, remove anything that is not a host effect
// from the effect tag.
_next.flags &= HostEffectMask;
workInProgress = _next;
return;
}
if ( (completedWork.mode & ProfileMode) !== NoMode) {
// Record the render duration for the fiber that errored.
stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing.
var actualDuration = completedWork.actualDuration;
var child = completedWork.child;
while (child !== null) {
actualDuration += child.actualDuration;
child = child.sibling;
}
completedWork.actualDuration = actualDuration;
}
if (returnFiber !== null) {
// Mark the parent fiber as incomplete and clear its subtree flags.
returnFiber.flags |= Incomplete;
returnFiber.subtreeFlags = NoFlags;
returnFiber.deletions = null;
} else {
// We've unwound all the way to the root.
workInProgressRootExitStatus = RootDidNotComplete;
workInProgress = null;
return;
}
}
var siblingFiber = completedWork.sibling;
if (siblingFiber !== null) {
// If there is more work to do in this returnFiber, do that next.
workInProgress = siblingFiber;
return;
} // Otherwise, return to the parent
completedWork = returnFiber; // Update the next thing we're working on in case something throws.
workInProgress = completedWork;
} while (completedWork !== null); // We've reached the root.
if (workInProgressRootExitStatus === RootInProgress) {
workInProgressRootExitStatus = RootCompleted;
}
}
function commitRoot(root, recoverableErrors, transitions) {
// TODO: This no longer makes any sense. We already wrap the mutation and
// layout phases. Should be able to remove.
var previousUpdateLanePriority = getCurrentUpdatePriority();
var prevTransition = ReactCurrentBatchConfig$3.transition;
try {
ReactCurrentBatchConfig$3.transition = null;
setCurrentUpdatePriority(DiscreteEventPriority);
commitRootImpl(root, recoverableErrors, transitions, previousUpdateLanePriority);
} finally {
ReactCurrentBatchConfig$3.transition = prevTransition;
setCurrentUpdatePriority(previousUpdateLanePriority);
}
return null;
}
function commitRootImpl(root, recoverableErrors, transitions, renderPriorityLevel) {
do {
// `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which
// means `flushPassiveEffects` will sometimes result in additional
// passive effects. So we need to keep flushing in a loop until there are
// no more pending effects.
// TODO: Might be better if `flushPassiveEffects` did not automatically
// flush synchronous work at the end, to avoid factoring hazards like this.
flushPassiveEffects();
} while (rootWithPendingPassiveEffects !== null);
flushRenderPhaseStrictModeWarningsInDEV();
if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
throw new Error('Should not already be working.');
}
var finishedWork = root.finishedWork;
var lanes = root.finishedLanes;
{
markCommitStarted(lanes);
}
if (finishedWork === null) {
{
markCommitStopped();
}
return null;
} else {
{
if (lanes === NoLanes) {
error('root.finishedLanes should not be empty during a commit. This is a ' + 'bug in React.');
}
}
}
root.finishedWork = null;
root.finishedLanes = NoLanes;
if (finishedWork === root.current) {
throw new Error('Cannot commit the same tree as before. This error is likely caused by ' + 'a bug in React. Please file an issue.');
} // commitRoot never returns a continuation; it always finishes synchronously.
// So we can clear these now to allow a new callback to be scheduled.
root.callbackNode = null;
root.callbackPriority = NoLane; // Update the first and last pending times on this root. The new first
// pending time is whatever is left on the root fiber.
var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);
markRootFinished(root, remainingLanes);
if (root === workInProgressRoot) {
// We can reset these now that they are finished.
workInProgressRoot = null;
workInProgress = null;
workInProgressRootRenderLanes = NoLanes;
} // If there are pending passive effects, schedule a callback to process them.
// Do this as early as possible, so it is queued before anything else that
// might get scheduled in the commit phase. (See #16714.)
// TODO: Delete all other places that schedule the passive effect callback
// They're redundant.
if ((finishedWork.subtreeFlags & PassiveMask) !== NoFlags || (finishedWork.flags & PassiveMask) !== NoFlags) {
if (!rootDoesHavePassiveEffects) {
rootDoesHavePassiveEffects = true;
// to store it in pendingPassiveTransitions until they get processed
// We need to pass this through as an argument to commitRoot
// because workInProgressTransitions might have changed between
// the previous render and commit if we throttle the commit
// with setTimeout
pendingPassiveTransitions = transitions;
scheduleCallback$1(NormalPriority, function () {
flushPassiveEffects(); // This render triggered passive effects: release the root cache pool
// *after* passive effects fire to avoid freeing a cache pool that may
// be referenced by a node in the tree (HostRoot, Cache boundary etc)
return null;
});
}
} // Check if there are any effects in the whole tree.
// TODO: This is left over from the effect list implementation, where we had
// to check for the existence of `firstEffect` to satisfy Flow. I think the
// only other reason this optimization exists is because it affects profiling.
// Reconsider whether this is necessary.
var subtreeHasEffects = (finishedWork.subtreeFlags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags;
var rootHasEffect = (finishedWork.flags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags;
if (subtreeHasEffects || rootHasEffect) {
var prevTransition = ReactCurrentBatchConfig$3.transition;
ReactCurrentBatchConfig$3.transition = null;
var previousPriority = getCurrentUpdatePriority();
setCurrentUpdatePriority(DiscreteEventPriority);
var prevExecutionContext = executionContext;
executionContext |= CommitContext; // Reset this to null before calling lifecycles
ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass
// of the effect list for each phase: all mutation effects come before all
// layout effects, and so on.
// The first phase a "before mutation" phase. We use this phase to read the
// state of the host tree right before we mutate it. This is where
// getSnapshotBeforeUpdate is called.
var shouldFireAfterActiveInstanceBlur = commitBeforeMutationEffects(root, finishedWork);
{
// Mark the current commit time to be shared by all Profilers in this
// batch. This enables them to be grouped later.
recordCommitTime();
}
commitMutationEffects(root, finishedWork, lanes);
resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after
// the mutation phase, so that the previous tree is still current during
// componentWillUnmount, but before the layout phase, so that the finished
// work is current during componentDidMount/Update.
root.current = finishedWork; // The next phase is the layout phase, where we call effects that read
{
markLayoutEffectsStarted(lanes);
}
commitLayoutEffects(finishedWork, root, lanes);
{
markLayoutEffectsStopped();
}
// opportunity to paint.
requestPaint();
executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value.
setCurrentUpdatePriority(previousPriority);
ReactCurrentBatchConfig$3.transition = prevTransition;
} else {
// No effects.
root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were
// no effects.
// TODO: Maybe there's a better way to report this.
{
recordCommitTime();
}
}
var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;
if (rootDoesHavePassiveEffects) {
// This commit has passive effects. Stash a reference to them. But don't
// schedule a callback until after flushing layout work.
rootDoesHavePassiveEffects = false;
rootWithPendingPassiveEffects = root;
pendingPassiveEffectsLanes = lanes;
} else {
{
nestedPassiveUpdateCount = 0;
rootWithPassiveNestedUpdates = null;
}
} // Read this again, since an effect might have updated it
remainingLanes = root.pendingLanes; // Check if there's remaining work on this root
// TODO: This is part of the `componentDidCatch` implementation. Its purpose
// is to detect whether something might have called setState inside
// `componentDidCatch`. The mechanism is known to be flawed because `setState`
// inside `componentDidCatch` is itself flawed — that's why we recommend
// `getDerivedStateFromError` instead. However, it could be improved by
// checking if remainingLanes includes Sync work, instead of whether there's
// any work remaining at all (which would also include stuff like Suspense
// retries or transitions). It's been like this for a while, though, so fixing
// it probably isn't that urgent.
if (remainingLanes === NoLanes) {
// If there's no remaining work, we can clear the set of already failed
// error boundaries.
legacyErrorBoundariesThatAlreadyFailed = null;
}
{
if (!rootDidHavePassiveEffects) {
commitDoubleInvokeEffectsInDEV(root.current, false);
}
}
onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
{
if (isDevToolsPresent) {
root.memoizedUpdaters.clear();
}
}
{
onCommitRoot$1();
} // Always call this before exiting `commitRoot`, to ensure that any
// additional work on this root is scheduled.
ensureRootIsScheduled(root, now());
if (recoverableErrors !== null) {
// There were errors during this render, but recovered from them without
// needing to surface it to the UI. We log them here.
var onRecoverableError = root.onRecoverableError;
for (var i = 0; i < recoverableErrors.length; i++) {
var recoverableError = recoverableErrors[i];
var componentStack = recoverableError.stack;
var digest = recoverableError.digest;
onRecoverableError(recoverableError.value, {
componentStack: componentStack,
digest: digest
});
}
}
if (hasUncaughtError) {
hasUncaughtError = false;
var error$1 = firstUncaughtError;
firstUncaughtError = null;
throw error$1;
} // If the passive effects are the result of a discrete render, flush them
// synchronously at the end of the current task so that the result is
// immediately observable. Otherwise, we assume that they are not
// order-dependent and do not need to be observed by external systems, so we
// can wait until after paint.
// TODO: We can optimize this by not scheduling the callback earlier. Since we
// currently schedule the callback in multiple places, will wait until those
// are consolidated.
if (includesSomeLane(pendingPassiveEffectsLanes, SyncLane) && root.tag !== LegacyRoot) {
flushPassiveEffects();
} // Read this again, since a passive effect might have updated it
remainingLanes = root.pendingLanes;
if (includesSomeLane(remainingLanes, SyncLane)) {
{
markNestedUpdateScheduled();
} // Count the number of times the root synchronously re-renders without
// finishing. If there are too many, it indicates an infinite update loop.
if (root === rootWithNestedUpdates) {
nestedUpdateCount++;
} else {
nestedUpdateCount = 0;
rootWithNestedUpdates = root;
}
} else {
nestedUpdateCount = 0;
} // If layout work was scheduled, flush it now.
flushSyncCallbacks();
{
markCommitStopped();
}
return null;
}
function flushPassiveEffects() {
// Returns whether passive effects were flushed.
// TODO: Combine this check with the one in flushPassiveEFfectsImpl. We should
// probably just combine the two functions. I believe they were only separate
// in the first place because we used to wrap it with
// `Scheduler.runWithPriority`, which accepts a function. But now we track the
// priority within React itself, so we can mutate the variable directly.
if (rootWithPendingPassiveEffects !== null) {
var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes);
var priority = lowerEventPriority(DefaultEventPriority, renderPriority);
var prevTransition = ReactCurrentBatchConfig$3.transition;
var previousPriority = getCurrentUpdatePriority();
try {
ReactCurrentBatchConfig$3.transition = null;
setCurrentUpdatePriority(priority);
return flushPassiveEffectsImpl();
} finally {
setCurrentUpdatePriority(previousPriority);
ReactCurrentBatchConfig$3.transition = prevTransition; // Once passive effects have run for the tree - giving components a
}
}
return false;
}
function enqueuePendingPassiveProfilerEffect(fiber) {
{
pendingPassiveProfilerEffects.push(fiber);
if (!rootDoesHavePassiveEffects) {
rootDoesHavePassiveEffects = true;
scheduleCallback$1(NormalPriority, function () {
flushPassiveEffects();
return null;
});
}
}
}
function flushPassiveEffectsImpl() {
if (rootWithPendingPassiveEffects === null) {
return false;
} // Cache and clear the transitions flag
var transitions = pendingPassiveTransitions;
pendingPassiveTransitions = null;
var root = rootWithPendingPassiveEffects;
var lanes = pendingPassiveEffectsLanes;
rootWithPendingPassiveEffects = null; // TODO: This is sometimes out of sync with rootWithPendingPassiveEffects.
// Figure out why and fix it. It's not causing any known issues (probably
// because it's only used for profiling), but it's a refactor hazard.
pendingPassiveEffectsLanes = NoLanes;
if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
throw new Error('Cannot flush passive effects while already rendering.');
}
{
isFlushingPassiveEffects = true;
didScheduleUpdateDuringPassiveEffects = false;
}
{
markPassiveEffectsStarted(lanes);
}
var prevExecutionContext = executionContext;
executionContext |= CommitContext;
commitPassiveUnmountEffects(root.current);
commitPassiveMountEffects(root, root.current, lanes, transitions); // TODO: Move to commitPassiveMountEffects
{
var profilerEffects = pendingPassiveProfilerEffects;
pendingPassiveProfilerEffects = [];
for (var i = 0; i < profilerEffects.length; i++) {
var _fiber = profilerEffects[i];
commitPassiveEffectDurations(root, _fiber);
}
}
{
markPassiveEffectsStopped();
}
{
commitDoubleInvokeEffectsInDEV(root.current, true);
}
executionContext = prevExecutionContext;
flushSyncCallbacks();
{
// If additional passive effects were scheduled, increment a counter. If this
// exceeds the limit, we'll fire a warning.
if (didScheduleUpdateDuringPassiveEffects) {
if (root === rootWithPassiveNestedUpdates) {
nestedPassiveUpdateCount++;
} else {
nestedPassiveUpdateCount = 0;
rootWithPassiveNestedUpdates = root;
}
} else {
nestedPassiveUpdateCount = 0;
}
isFlushingPassiveEffects = false;
didScheduleUpdateDuringPassiveEffects = false;
} // TODO: Move to commitPassiveMountEffects
onPostCommitRoot(root);
{
var stateNode = root.current.stateNode;
stateNode.effectDuration = 0;
stateNode.passiveEffectDuration = 0;
}
return true;
}
function isAlreadyFailedLegacyErrorBoundary(instance) {
return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);
}
function markLegacyErrorBoundaryAsFailed(instance) {
if (legacyErrorBoundariesThatAlreadyFailed === null) {
legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);
} else {
legacyErrorBoundariesThatAlreadyFailed.add(instance);
}
}
function prepareToThrowUncaughtError(error) {
if (!hasUncaughtError) {
hasUncaughtError = true;
firstUncaughtError = error;
}
}
var onUncaughtError = prepareToThrowUncaughtError;
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
var errorInfo = createCapturedValueAtFiber(error, sourceFiber);
var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);
var root = enqueueUpdate(rootFiber, update, SyncLane);
var eventTime = requestEventTime();
if (root !== null) {
markRootUpdated(root, SyncLane, eventTime);
ensureRootIsScheduled(root, eventTime);
}
}
function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error$1) {
{
reportUncaughtErrorInDEV(error$1);
setIsRunningInsertionEffect(false);
}
if (sourceFiber.tag === HostRoot) {
// Error was thrown at the root. There is no parent, so the root
// itself should capture it.
captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error$1);
return;
}
var fiber = null;
{
fiber = nearestMountedAncestor;
}
while (fiber !== null) {
if (fiber.tag === HostRoot) {
captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error$1);
return;
} else if (fiber.tag === ClassComponent) {
var ctor = fiber.type;
var instance = fiber.stateNode;
if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
var errorInfo = createCapturedValueAtFiber(error$1, sourceFiber);
var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);
var root = enqueueUpdate(fiber, update, SyncLane);
var eventTime = requestEventTime();
if (root !== null) {
markRootUpdated(root, SyncLane, eventTime);
ensureRootIsScheduled(root, eventTime);
}
return;
}
}
fiber = fiber.return;
}
{
// TODO: Until we re-land skipUnmountedBoundaries (see #20147), this warning
// will fire for errors that are thrown by destroy functions inside deleted
// trees. What it should instead do is propagate the error to the parent of
// the deleted tree. In the meantime, do not add this warning to the
// allowlist; this is only for our internal use.
error('Internal React error: Attempted to capture a commit phase error ' + 'inside a detached tree. This indicates a bug in React. Likely ' + 'causes include deleting the same fiber more than once, committing an ' + 'already-finished tree, or an inconsistent return pointer.\n\n' + 'Error message:\n\n%s', error$1);
}
}
function pingSuspendedRoot(root, wakeable, pingedLanes) {
var pingCache = root.pingCache;
if (pingCache !== null) {
// The wakeable resolved, so we no longer need to memoize, because it will
// never be thrown again.
pingCache.delete(wakeable);
}
var eventTime = requestEventTime();
markRootPinged(root, pingedLanes);
warnIfSuspenseResolutionNotWrappedWithActDEV(root);
if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {
// Received a ping at the same priority level at which we're currently
// rendering. We might want to restart this render. This should mirror
// the logic of whether or not a root suspends once it completes.
// TODO: If we're rendering sync either due to Sync, Batched or expired,
// we should probably never restart.
// If we're suspended with delay, or if it's a retry, we'll always suspend
// so we can always restart.
if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {
// Restart from the root.
prepareFreshStack(root, NoLanes);
} else {
// Even though we can't restart right now, we might get an
// opportunity later. So we mark this render as having a ping.
workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);
}
}
ensureRootIsScheduled(root, eventTime);
}
function retryTimedOutBoundary(boundaryFiber, retryLane) {
// The boundary fiber (a Suspense component or SuspenseList component)
// previously was rendered in its fallback state. One of the promises that
// suspended it has resolved, which means at least part of the tree was
// likely unblocked. Try rendering again, at a new lanes.
if (retryLane === NoLane) {
// TODO: Assign this to `suspenseState.retryLane`? to avoid
// unnecessary entanglement?
retryLane = requestRetryLane(boundaryFiber);
} // TODO: Special case idle priority?
var eventTime = requestEventTime();
var root = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);
if (root !== null) {
markRootUpdated(root, retryLane, eventTime);
ensureRootIsScheduled(root, eventTime);
}
}
function retryDehydratedSuspenseBoundary(boundaryFiber) {
var suspenseState = boundaryFiber.memoizedState;
var retryLane = NoLane;
if (suspenseState !== null) {
retryLane = suspenseState.retryLane;
}
retryTimedOutBoundary(boundaryFiber, retryLane);
}
function resolveRetryWakeable(boundaryFiber, wakeable) {
var retryLane = NoLane; // Default
var retryCache;
switch (boundaryFiber.tag) {
case SuspenseComponent:
retryCache = boundaryFiber.stateNode;
var suspenseState = boundaryFiber.memoizedState;
if (suspenseState !== null) {
retryLane = suspenseState.retryLane;
}
break;
case SuspenseListComponent:
retryCache = boundaryFiber.stateNode;
break;
default:
throw new Error('Pinged unknown suspense boundary type. ' + 'This is probably a bug in React.');
}
if (retryCache !== null) {
// The wakeable resolved, so we no longer need to memoize, because it will
// never be thrown again.
retryCache.delete(wakeable);
}
retryTimedOutBoundary(boundaryFiber, retryLane);
} // Computes the next Just Noticeable Difference (JND) boundary.
// The theory is that a person can't tell the difference between small differences in time.
// Therefore, if we wait a bit longer than necessary that won't translate to a noticeable
// difference in the experience. However, waiting for longer might mean that we can avoid
// showing an intermediate loading state. The longer we have already waited, the harder it
// is to tell small differences in time. Therefore, the longer we've already waited,
// the longer we can wait additionally. At some point we have to give up though.
// We pick a train model where the next boundary commits at a consistent schedule.
// These particular numbers are vague estimates. We expect to adjust them based on research.
function jnd(timeElapsed) {
return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;
}
function checkForNestedUpdates() {
if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
nestedUpdateCount = 0;
rootWithNestedUpdates = null;
throw new Error('Maximum update depth exceeded. This can happen when a component ' + 'repeatedly calls setState inside componentWillUpdate or ' + 'componentDidUpdate. React limits the number of nested updates to ' + 'prevent infinite loops.');
}
{
if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {
nestedPassiveUpdateCount = 0;
rootWithPassiveNestedUpdates = null;
error('Maximum update depth exceeded. This can happen when a component ' + "calls setState inside useEffect, but useEffect either doesn't " + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');
}
}
}
function flushRenderPhaseStrictModeWarningsInDEV() {
{
ReactStrictModeWarnings.flushLegacyContextWarning();
{
ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
}
}
}
function commitDoubleInvokeEffectsInDEV(fiber, hasPassiveEffects) {
{
// TODO (StrictEffects) Should we set a marker on the root if it contains strict effects
// so we don't traverse unnecessarily? similar to subtreeFlags but just at the root level.
// Maybe not a big deal since this is DEV only behavior.
setCurrentFiber(fiber);
invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectUnmountInDEV);
if (hasPassiveEffects) {
invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectUnmountInDEV);
}
invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectMountInDEV);
if (hasPassiveEffects) {
invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectMountInDEV);
}
resetCurrentFiber();
}
}
function invokeEffectsInDev(firstChild, fiberFlags, invokeEffectFn) {
{
// We don't need to re-check StrictEffectsMode here.
// This function is only called if that check has already passed.
var current = firstChild;
var subtreeRoot = null;
while (current !== null) {
var primarySubtreeFlag = current.subtreeFlags & fiberFlags;
if (current !== subtreeRoot && current.child !== null && primarySubtreeFlag !== NoFlags) {
current = current.child;
} else {
if ((current.flags & fiberFlags) !== NoFlags) {
invokeEffectFn(current);
}
if (current.sibling !== null) {
current = current.sibling;
} else {
current = subtreeRoot = current.return;
}
}
}
}
}
var didWarnStateUpdateForNotYetMountedComponent = null;
function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
{
if ((executionContext & RenderContext) !== NoContext) {
// We let the other warning about render phase updates deal with this one.
return;
}
if (!(fiber.mode & ConcurrentMode)) {
return;
}
var tag = fiber.tag;
if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent) {
// Only warn for user-defined components, not internal ones like Suspense.
return;
} // We show the whole stack but dedupe on the top component's name because
// the problematic code almost always lies inside that component.
var componentName = getComponentNameFromFiber(fiber) || 'ReactComponent';
if (didWarnStateUpdateForNotYetMountedComponent !== null) {
if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {
return;
}
didWarnStateUpdateForNotYetMountedComponent.add(componentName);
} else {
didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);
}
var previousFiber = current;
try {
setCurrentFiber(fiber);
error("Can't perform a React state update on a component that hasn't mounted yet. " + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.');
} finally {
if (previousFiber) {
setCurrentFiber(fiber);
} else {
resetCurrentFiber();
}
}
}
}
var beginWork$1;
{
var dummyFiber = null;
beginWork$1 = function (current, unitOfWork, lanes) {
// If a component throws an error, we replay it again in a synchronously
// dispatched event, so that the debugger will treat it as an uncaught
// error See ReactErrorUtils for more information.
// Before entering the begin phase, copy the work-in-progress onto a dummy
// fiber. If beginWork throws, we'll use this to reset the state.
var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);
try {
return beginWork(current, unitOfWork, lanes);
} catch (originalError) {
if (didSuspendOrErrorWhileHydratingDEV() || originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {
// Don't replay promises.
// Don't replay errors if we are hydrating and have already suspended or handled an error
throw originalError;
} // Keep this code in sync with handleError; any changes here must have
// corresponding changes there.
resetContextDependencies();
resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the
// same fiber again.
// Unwind the failed stack frame
unwindInterruptedWork(current, unitOfWork); // Restore the original properties of the fiber.
assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);
if ( unitOfWork.mode & ProfileMode) {
// Reset the profiler timer.
startProfilerTimer(unitOfWork);
} // Run beginWork again.
invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes);
if (hasCaughtError()) {
var replayError = clearCaughtError();
if (typeof replayError === 'object' && replayError !== null && replayError._suppressLogging && typeof originalError === 'object' && originalError !== null && !originalError._suppressLogging) {
// If suppressed, let the flag carry over to the original error which is the one we'll rethrow.
originalError._suppressLogging = true;
}
} // We always throw the original error in case the second render pass is not idempotent.
// This can happen if a memoized function or CommonJS module doesn't throw after first invocation.
throw originalError;
}
};
}
var didWarnAboutUpdateInRender = false;
var didWarnAboutUpdateInRenderForAnotherComponent;
{
didWarnAboutUpdateInRenderForAnotherComponent = new Set();
}
function warnAboutRenderPhaseUpdatesInDEV(fiber) {
{
if (isRendering && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {
switch (fiber.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent:
{
var renderingComponentName = workInProgress && getComponentNameFromFiber(workInProgress) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.
var dedupeKey = renderingComponentName;
if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {
didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);
var setStateComponentName = getComponentNameFromFiber(fiber) || 'Unknown';
error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);
}
break;
}
case ClassComponent:
{
if (!didWarnAboutUpdateInRender) {
error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');
didWarnAboutUpdateInRender = true;
}
break;
}
}
}
}
}
function restorePendingUpdaters(root, lanes) {
{
if (isDevToolsPresent) {
var memoizedUpdaters = root.memoizedUpdaters;
memoizedUpdaters.forEach(function (schedulingFiber) {
addFiberToLanesMap(root, schedulingFiber, lanes);
}); // This function intentionally does not clear memoized updaters.
// Those may still be relevant to the current commit
// and a future one (e.g. Suspense).
}
}
}
var fakeActCallbackNode = {};
function scheduleCallback$1(priorityLevel, callback) {
{
// If we're currently inside an `act` scope, bypass Scheduler and push to
// the `act` queue instead.
var actQueue = ReactCurrentActQueue$1.current;
if (actQueue !== null) {
actQueue.push(callback);
return fakeActCallbackNode;
} else {
return scheduleCallback(priorityLevel, callback);
}
}
}
function cancelCallback$1(callbackNode) {
if ( callbackNode === fakeActCallbackNode) {
return;
} // In production, always call Scheduler. This function will be stripped out.
return cancelCallback(callbackNode);
}
function shouldForceFlushFallbacksInDEV() {
// Never force flush in production. This function should get stripped out.
return ReactCurrentActQueue$1.current !== null;
}
function warnIfUpdatesNotWrappedWithActDEV(fiber) {
{
if (fiber.mode & ConcurrentMode) {
if (!isConcurrentActEnvironment()) {
// Not in an act environment. No need to warn.
return;
}
} else {
// Legacy mode has additional cases where we suppress a warning.
if (!isLegacyActEnvironment()) {
// Not in an act environment. No need to warn.
return;
}
if (executionContext !== NoContext) {
// Legacy mode doesn't warn if the update is batched, i.e.
// batchedUpdates or flushSync.
return;
}
if (fiber.tag !== FunctionComponent && fiber.tag !== ForwardRef && fiber.tag !== SimpleMemoComponent) {
// For backwards compatibility with pre-hooks code, legacy mode only
// warns for updates that originate from a hook.
return;
}
}
if (ReactCurrentActQueue$1.current === null) {
var previousFiber = current;
try {
setCurrentFiber(fiber);
error('An update to %s inside a test was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentNameFromFiber(fiber));
} finally {
if (previousFiber) {
setCurrentFiber(fiber);
} else {
resetCurrentFiber();
}
}
}
}
}
function warnIfSuspenseResolutionNotWrappedWithActDEV(root) {
{
if (root.tag !== LegacyRoot && isConcurrentActEnvironment() && ReactCurrentActQueue$1.current === null) {
error('A suspended resource finished loading inside a test, but the event ' + 'was not wrapped in act(...).\n\n' + 'When testing, code that resolves suspended data should be wrapped ' + 'into act(...):\n\n' + 'act(() => {\n' + ' /* finish loading suspended data */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act');
}
}
}
function setIsRunningInsertionEffect(isRunning) {
{
isRunningInsertionEffect = isRunning;
}
}
/* eslint-disable react-internal/prod-error-codes */
var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.
var failedBoundaries = null;
var setRefreshHandler = function (handler) {
{
resolveFamily = handler;
}
};
function resolveFunctionForHotReloading(type) {
{
if (resolveFamily === null) {
// Hot reloading is disabled.
return type;
}
var family = resolveFamily(type);
if (family === undefined) {
return type;
} // Use the latest known implementation.
return family.current;
}
}
function resolveClassForHotReloading(type) {
// No implementation differences.
return resolveFunctionForHotReloading(type);
}
function resolveForwardRefForHotReloading(type) {
{
if (resolveFamily === null) {
// Hot reloading is disabled.
return type;
}
var family = resolveFamily(type);
if (family === undefined) {
// Check if we're dealing with a real forwardRef. Don't want to crash early.
if (type !== null && type !== undefined && typeof type.render === 'function') {
// ForwardRef is special because its resolved .type is an object,
// but it's possible that we only have its inner render function in the map.
// If that inner render function is different, we'll build a new forwardRef type.
var currentRender = resolveFunctionForHotReloading(type.render);
if (type.render !== currentRender) {
var syntheticType = {
$$typeof: REACT_FORWARD_REF_TYPE,
render: currentRender
};
if (type.displayName !== undefined) {
syntheticType.displayName = type.displayName;
}
return syntheticType;
}
}
return type;
} // Use the latest known implementation.
return family.current;
}
}
function isCompatibleFamilyForHotReloading(fiber, element) {
{
if (resolveFamily === null) {
// Hot reloading is disabled.
return false;
}
var prevType = fiber.elementType;
var nextType = element.type; // If we got here, we know types aren't === equal.
var needsCompareFamilies = false;
var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;
switch (fiber.tag) {
case ClassComponent:
{
if (typeof nextType === 'function') {
needsCompareFamilies = true;
}
break;
}
case FunctionComponent:
{
if (typeof nextType === 'function') {
needsCompareFamilies = true;
} else if ($$typeofNextType === REACT_LAZY_TYPE) {
// We don't know the inner type yet.
// We're going to assume that the lazy inner type is stable,
// and so it is sufficient to avoid reconciling it away.
// We're not going to unwrap or actually use the new lazy type.
needsCompareFamilies = true;
}
break;
}
case ForwardRef:
{
if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {
needsCompareFamilies = true;
} else if ($$typeofNextType === REACT_LAZY_TYPE) {
needsCompareFamilies = true;
}
break;
}
case MemoComponent:
case SimpleMemoComponent:
{
if ($$typeofNextType === REACT_MEMO_TYPE) {
// TODO: if it was but can no longer be simple,
// we shouldn't set this.
needsCompareFamilies = true;
} else if ($$typeofNextType === REACT_LAZY_TYPE) {
needsCompareFamilies = true;
}
break;
}
default:
return false;
} // Check if both types have a family and it's the same one.
if (needsCompareFamilies) {
// Note: memo() and forwardRef() we'll compare outer rather than inner type.
// This means both of them need to be registered to preserve state.
// If we unwrapped and compared the inner types for wrappers instead,
// then we would risk falsely saying two separate memo(Foo)
// calls are equivalent because they wrap the same Foo function.
var prevFamily = resolveFamily(prevType);
if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {
return true;
}
}
return false;
}
}
function markFailedErrorBoundaryForHotReloading(fiber) {
{
if (resolveFamily === null) {
// Hot reloading is disabled.
return;
}
if (typeof WeakSet !== 'function') {
return;
}
if (failedBoundaries === null) {
failedBoundaries = new WeakSet();
}
failedBoundaries.add(fiber);
}
}
var scheduleRefresh = function (root, update) {
{
if (resolveFamily === null) {
// Hot reloading is disabled.
return;
}
var staleFamilies = update.staleFamilies,
updatedFamilies = update.updatedFamilies;
flushPassiveEffects();
flushSync(function () {
scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);
});
}
};
var scheduleRoot = function (root, element) {
{
if (root.context !== emptyContextObject) {
// Super edge case: root has a legacy _renderSubtree context
// but we don't know the parentComponent so we can't pass it.
// Just ignore. We'll delete this with _renderSubtree code path later.
return;
}
flushPassiveEffects();
flushSync(function () {
updateContainer(element, root, null, null);
});
}
};
function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
{
var alternate = fiber.alternate,
child = fiber.child,
sibling = fiber.sibling,
tag = fiber.tag,
type = fiber.type;
var candidateType = null;
switch (tag) {
case FunctionComponent:
case SimpleMemoComponent:
case ClassComponent:
candidateType = type;
break;
case ForwardRef:
candidateType = type.render;
break;
}
if (resolveFamily === null) {
throw new Error('Expected resolveFamily to be set during hot reload.');
}
var needsRender = false;
var needsRemount = false;
if (candidateType !== null) {
var family = resolveFamily(candidateType);
if (family !== undefined) {
if (staleFamilies.has(family)) {
needsRemount = true;
} else if (updatedFamilies.has(family)) {
if (tag === ClassComponent) {
needsRemount = true;
} else {
needsRender = true;
}
}
}
}
if (failedBoundaries !== null) {
if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {
needsRemount = true;
}
}
if (needsRemount) {
fiber._debugNeedsRemount = true;
}
if (needsRemount || needsRender) {
var _root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (_root !== null) {
scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp);
}
}
if (child !== null && !needsRemount) {
scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);
}
if (sibling !== null) {
scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);
}
}
}
var findHostInstancesForRefresh = function (root, families) {
{
var hostInstances = new Set();
var types = new Set(families.map(function (family) {
return family.current;
}));
findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);
return hostInstances;
}
};
function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {
{
var child = fiber.child,
sibling = fiber.sibling,
tag = fiber.tag,
type = fiber.type;
var candidateType = null;
switch (tag) {
case FunctionComponent:
case SimpleMemoComponent:
case ClassComponent:
candidateType = type;
break;
case ForwardRef:
candidateType = type.render;
break;
}
var didMatch = false;
if (candidateType !== null) {
if (types.has(candidateType)) {
didMatch = true;
}
}
if (didMatch) {
// We have a match. This only drills down to the closest host components.
// There's no need to search deeper because for the purpose of giving
// visual feedback, "flashing" outermost parent rectangles is sufficient.
findHostInstancesForFiberShallowly(fiber, hostInstances);
} else {
// If there's no match, maybe there will be one further down in the child tree.
if (child !== null) {
findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);
}
}
if (sibling !== null) {
findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);
}
}
}
function findHostInstancesForFiberShallowly(fiber, hostInstances) {
{
var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);
if (foundHostInstances) {
return;
} // If we didn't find any host children, fallback to closest host parent.
var node = fiber;
while (true) {
switch (node.tag) {
case HostComponent:
hostInstances.add(node.stateNode);
return;
case HostPortal:
hostInstances.add(node.stateNode.containerInfo);
return;
case HostRoot:
hostInstances.add(node.stateNode.containerInfo);
return;
}
if (node.return === null) {
throw new Error('Expected to reach root first.');
}
node = node.return;
}
}
}
function findChildHostInstancesForFiberShallowly(fiber, hostInstances) {
{
var node = fiber;
var foundHostInstances = false;
while (true) {
if (node.tag === HostComponent) {
// We got a match.
foundHostInstances = true;
hostInstances.add(node.stateNode); // There may still be more, so keep searching.
} else if (node.child !== null) {
node.child.return = node;
node = node.child;
continue;
}
if (node === fiber) {
return foundHostInstances;
}
while (node.sibling === null) {
if (node.return === null || node.return === fiber) {
return foundHostInstances;
}
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
}
return false;
}
var hasBadMapPolyfill;
{
hasBadMapPolyfill = false;
try {
var nonExtensibleObject = Object.preventExtensions({});
/* eslint-disable no-new */
new Map([[nonExtensibleObject, null]]);
new Set([nonExtensibleObject]);
/* eslint-enable no-new */
} catch (e) {
// TODO: Consider warning about bad polyfills
hasBadMapPolyfill = true;
}
}
function FiberNode(tag, pendingProps, key, mode) {
// Instance
this.tag = tag;
this.key = key;
this.elementType = null;
this.type = null;
this.stateNode = null; // Fiber
this.return = null;
this.child = null;
this.sibling = null;
this.index = 0;
this.ref = null;
this.pendingProps = pendingProps;
this.memoizedProps = null;
this.updateQueue = null;
this.memoizedState = null;
this.dependencies = null;
this.mode = mode; // Effects
this.flags = NoFlags;
this.subtreeFlags = NoFlags;
this.deletions = null;
this.lanes = NoLanes;
this.childLanes = NoLanes;
this.alternate = null;
{
// Note: The following is done to avoid a v8 performance cliff.
//
// Initializing the fields below to smis and later updating them with
// double values will cause Fibers to end up having separate shapes.
// This behavior/bug has something to do with Object.preventExtension().
// Fortunately this only impacts DEV builds.
// Unfortunately it makes React unusably slow for some applications.
// To work around this, initialize the fields below with doubles.
//
// Learn more about this here:
// https://github.com/facebook/react/issues/14365
// https://bugs.chromium.org/p/v8/issues/detail?id=8538
this.actualDuration = Number.NaN;
this.actualStartTime = Number.NaN;
this.selfBaseDuration = Number.NaN;
this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.
// This won't trigger the performance cliff mentioned above,
// and it simplifies other profiler code (including DevTools).
this.actualDuration = 0;
this.actualStartTime = -1;
this.selfBaseDuration = 0;
this.treeBaseDuration = 0;
}
{
// This isn't directly used but is handy for debugging internals:
this._debugSource = null;
this._debugOwner = null;
this._debugNeedsRemount = false;
this._debugHookTypes = null;
if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {
Object.preventExtensions(this);
}
}
} // This is a constructor function, rather than a POJO constructor, still
// please ensure we do the following:
// 1) Nobody should add any instance methods on this. Instance methods can be
// more difficult to predict when they get optimized and they are almost
// never inlined properly in static compilers.
// 2) Nobody should rely on `instanceof Fiber` for type testing. We should
// always know when it is a fiber.
// 3) We might want to experiment with using numeric keys since they are easier
// to optimize in a non-JIT environment.
// 4) We can easily go from a constructor to a createFiber object literal if that
// is faster.
// 5) It should be easy to port this to a C struct and keep a C implementation
// compatible.
var createFiber = function (tag, pendingProps, key, mode) {
// $FlowFixMe: the shapes are exact here but Flow doesn't like constructors
return new FiberNode(tag, pendingProps, key, mode);
};
function shouldConstruct$1(Component) {
var prototype = Component.prototype;
return !!(prototype && prototype.isReactComponent);
}
function isSimpleFunctionComponent(type) {
return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined;
}
function resolveLazyComponentTag(Component) {
if (typeof Component === 'function') {
return shouldConstruct$1(Component) ? ClassComponent : FunctionComponent;
} else if (Component !== undefined && Component !== null) {
var $$typeof = Component.$$typeof;
if ($$typeof === REACT_FORWARD_REF_TYPE) {
return ForwardRef;
}
if ($$typeof === REACT_MEMO_TYPE) {
return MemoComponent;
}
}
return IndeterminateComponent;
} // This is used to create an alternate fiber to do work on.
function createWorkInProgress(current, pendingProps) {
var workInProgress = current.alternate;
if (workInProgress === null) {
// We use a double buffering pooling technique because we know that we'll
// only ever need at most two versions of a tree. We pool the "other" unused
// node that we're free to reuse. This is lazily created to avoid allocating
// extra objects for things that are never updated. It also allow us to
// reclaim the extra memory if needed.
workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);
workInProgress.elementType = current.elementType;
workInProgress.type = current.type;
workInProgress.stateNode = current.stateNode;
{
// DEV-only fields
workInProgress._debugSource = current._debugSource;
workInProgress._debugOwner = current._debugOwner;
workInProgress._debugHookTypes = current._debugHookTypes;
}
workInProgress.alternate = current;
current.alternate = workInProgress;
} else {
workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type.
workInProgress.type = current.type; // We already have an alternate.
// Reset the effect tag.
workInProgress.flags = NoFlags; // The effects are no longer valid.
workInProgress.subtreeFlags = NoFlags;
workInProgress.deletions = null;
{
// We intentionally reset, rather than copy, actualDuration & actualStartTime.
// This prevents time from endlessly accumulating in new commits.
// This has the downside of resetting values for different priority renders,
// But works for yielding (the common case) and should support resuming.
workInProgress.actualDuration = 0;
workInProgress.actualStartTime = -1;
}
} // Reset all effects except static ones.
// Static effects are not specific to a render.
workInProgress.flags = current.flags & StaticMask;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
workInProgress.memoizedProps = current.memoizedProps;
workInProgress.memoizedState = current.memoizedState;
workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so
// it cannot be shared with the current fiber.
var currentDependencies = current.dependencies;
workInProgress.dependencies = currentDependencies === null ? null : {
lanes: currentDependencies.lanes,
firstContext: currentDependencies.firstContext
}; // These will be overridden during the parent's reconciliation
workInProgress.sibling = current.sibling;
workInProgress.index = current.index;
workInProgress.ref = current.ref;
{
workInProgress.selfBaseDuration = current.selfBaseDuration;
workInProgress.treeBaseDuration = current.treeBaseDuration;
}
{
workInProgress._debugNeedsRemount = current._debugNeedsRemount;
switch (workInProgress.tag) {
case IndeterminateComponent:
case FunctionComponent:
case SimpleMemoComponent:
workInProgress.type = resolveFunctionForHotReloading(current.type);
break;
case ClassComponent:
workInProgress.type = resolveClassForHotReloading(current.type);
break;
case ForwardRef:
workInProgress.type = resolveForwardRefForHotReloading(current.type);
break;
}
}
return workInProgress;
} // Used to reuse a Fiber for a second pass.
function resetWorkInProgress(workInProgress, renderLanes) {
// This resets the Fiber to what createFiber or createWorkInProgress would
// have set the values to before during the first pass. Ideally this wouldn't
// be necessary but unfortunately many code paths reads from the workInProgress
// when they should be reading from current and writing to workInProgress.
// We assume pendingProps, index, key, ref, return are still untouched to
// avoid doing another reconciliation.
// Reset the effect flags but keep any Placement tags, since that's something
// that child fiber is setting, not the reconciliation.
workInProgress.flags &= StaticMask | Placement; // The effects are no longer valid.
var current = workInProgress.alternate;
if (current === null) {
// Reset to createFiber's initial values.
workInProgress.childLanes = NoLanes;
workInProgress.lanes = renderLanes;
workInProgress.child = null;
workInProgress.subtreeFlags = NoFlags;
workInProgress.memoizedProps = null;
workInProgress.memoizedState = null;
workInProgress.updateQueue = null;
workInProgress.dependencies = null;
workInProgress.stateNode = null;
{
// Note: We don't reset the actualTime counts. It's useful to accumulate
// actual time across multiple render passes.
workInProgress.selfBaseDuration = 0;
workInProgress.treeBaseDuration = 0;
}
} else {
// Reset to the cloned values that createWorkInProgress would've.
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
workInProgress.subtreeFlags = NoFlags;
workInProgress.deletions = null;
workInProgress.memoizedProps = current.memoizedProps;
workInProgress.memoizedState = current.memoizedState;
workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.
workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, so
// it cannot be shared with the current fiber.
var currentDependencies = current.dependencies;
workInProgress.dependencies = currentDependencies === null ? null : {
lanes: currentDependencies.lanes,
firstContext: currentDependencies.firstContext
};
{
// Note: We don't reset the actualTime counts. It's useful to accumulate
// actual time across multiple render passes.
workInProgress.selfBaseDuration = current.selfBaseDuration;
workInProgress.treeBaseDuration = current.treeBaseDuration;
}
}
return workInProgress;
}
function createHostRootFiber(tag, isStrictMode, concurrentUpdatesByDefaultOverride) {
var mode;
if (tag === ConcurrentRoot) {
mode = ConcurrentMode;
if (isStrictMode === true) {
mode |= StrictLegacyMode;
{
mode |= StrictEffectsMode;
}
}
} else {
mode = NoMode;
}
if ( isDevToolsPresent) {
// Always collect profile timings when DevTools are present.
// This enables DevTools to start capturing timing at any point–
// Without some nodes in the tree having empty base times.
mode |= ProfileMode;
}
return createFiber(HostRoot, null, null, mode);
}
function createFiberFromTypeAndProps(type, // React$ElementType
key, pendingProps, owner, mode, lanes) {
var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
var resolvedType = type;
if (typeof type === 'function') {
if (shouldConstruct$1(type)) {
fiberTag = ClassComponent;
{
resolvedType = resolveClassForHotReloading(resolvedType);
}
} else {
{
resolvedType = resolveFunctionForHotReloading(resolvedType);
}
}
} else if (typeof type === 'string') {
fiberTag = HostComponent;
} else {
getTag: switch (type) {
case REACT_FRAGMENT_TYPE:
return createFiberFromFragment(pendingProps.children, mode, lanes, key);
case REACT_STRICT_MODE_TYPE:
fiberTag = Mode;
mode |= StrictLegacyMode;
if ( (mode & ConcurrentMode) !== NoMode) {
// Strict effects should never run on legacy roots
mode |= StrictEffectsMode;
}
break;
case REACT_PROFILER_TYPE:
return createFiberFromProfiler(pendingProps, mode, lanes, key);
case REACT_SUSPENSE_TYPE:
return createFiberFromSuspense(pendingProps, mode, lanes, key);
case REACT_SUSPENSE_LIST_TYPE:
return createFiberFromSuspenseList(pendingProps, mode, lanes, key);
case REACT_OFFSCREEN_TYPE:
return createFiberFromOffscreen(pendingProps, mode, lanes, key);
case REACT_LEGACY_HIDDEN_TYPE:
// eslint-disable-next-line no-fallthrough
case REACT_SCOPE_TYPE:
// eslint-disable-next-line no-fallthrough
case REACT_CACHE_TYPE:
// eslint-disable-next-line no-fallthrough
case REACT_TRACING_MARKER_TYPE:
// eslint-disable-next-line no-fallthrough
case REACT_DEBUG_TRACING_MODE_TYPE:
// eslint-disable-next-line no-fallthrough
default:
{
if (typeof type === 'object' && type !== null) {
switch (type.$$typeof) {
case REACT_PROVIDER_TYPE:
fiberTag = ContextProvider;
break getTag;
case REACT_CONTEXT_TYPE:
// This is a consumer
fiberTag = ContextConsumer;
break getTag;
case REACT_FORWARD_REF_TYPE:
fiberTag = ForwardRef;
{
resolvedType = resolveForwardRefForHotReloading(resolvedType);
}
break getTag;
case REACT_MEMO_TYPE:
fiberTag = MemoComponent;
break getTag;
case REACT_LAZY_TYPE:
fiberTag = LazyComponent;
resolvedType = null;
break getTag;
}
}
var info = '';
{
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.';
}
var ownerName = owner ? getComponentNameFromFiber(owner) : null;
if (ownerName) {
info += '\n\nCheck the render method of `' + ownerName + '`.';
}
}
throw new Error('Element type is invalid: expected a string (for built-in ' + 'components) or a class/function (for composite components) ' + ("but got: " + (type == null ? type : typeof type) + "." + info));
}
}
}
var fiber = createFiber(fiberTag, pendingProps, key, mode);
fiber.elementType = type;
fiber.type = resolvedType;
fiber.lanes = lanes;
{
fiber._debugOwner = owner;
}
return fiber;
}
function createFiberFromElement(element, mode, lanes) {
var owner = null;
{
owner = element._owner;
}
var type = element.type;
var key = element.key;
var pendingProps = element.props;
var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes);
{
fiber._debugSource = element._source;
fiber._debugOwner = element._owner;
}
return fiber;
}
function createFiberFromFragment(elements, mode, lanes, key) {
var fiber = createFiber(Fragment, elements, key, mode);
fiber.lanes = lanes;
return fiber;
}
function createFiberFromProfiler(pendingProps, mode, lanes, key) {
{
if (typeof pendingProps.id !== 'string') {
error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.', typeof pendingProps.id);
}
}
var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode);
fiber.elementType = REACT_PROFILER_TYPE;
fiber.lanes = lanes;
{
fiber.stateNode = {
effectDuration: 0,
passiveEffectDuration: 0
};
}
return fiber;
}
function createFiberFromSuspense(pendingProps, mode, lanes, key) {
var fiber = createFiber(SuspenseComponent, pendingProps, key, mode);
fiber.elementType = REACT_SUSPENSE_TYPE;
fiber.lanes = lanes;
return fiber;
}
function createFiberFromSuspenseList(pendingProps, mode, lanes, key) {
var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);
fiber.elementType = REACT_SUSPENSE_LIST_TYPE;
fiber.lanes = lanes;
return fiber;
}
function createFiberFromOffscreen(pendingProps, mode, lanes, key) {
var fiber = createFiber(OffscreenComponent, pendingProps, key, mode);
fiber.elementType = REACT_OFFSCREEN_TYPE;
fiber.lanes = lanes;
var primaryChildInstance = {
isHidden: false
};
fiber.stateNode = primaryChildInstance;
return fiber;
}
function createFiberFromText(content, mode, lanes) {
var fiber = createFiber(HostText, content, null, mode);
fiber.lanes = lanes;
return fiber;
}
function createFiberFromHostInstanceForDeletion() {
var fiber = createFiber(HostComponent, null, null, NoMode);
fiber.elementType = 'DELETED';
return fiber;
}
function createFiberFromDehydratedFragment(dehydratedNode) {
var fiber = createFiber(DehydratedFragment, null, null, NoMode);
fiber.stateNode = dehydratedNode;
return fiber;
}
function createFiberFromPortal(portal, mode, lanes) {
var pendingProps = portal.children !== null ? portal.children : [];
var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);
fiber.lanes = lanes;
fiber.stateNode = {
containerInfo: portal.containerInfo,
pendingChildren: null,
// Used by persistent updates
implementation: portal.implementation
};
return fiber;
} // Used for stashing WIP properties to replay failed work in DEV.
function assignFiberPropertiesInDEV(target, source) {
if (target === null) {
// This Fiber's initial properties will always be overwritten.
// We only use a Fiber to ensure the same hidden class so DEV isn't slow.
target = createFiber(IndeterminateComponent, null, null, NoMode);
} // This is intentionally written as a list of all properties.
// We tried to use Object.assign() instead but this is called in
// the hottest path, and Object.assign() was too slow:
// https://github.com/facebook/react/issues/12502
// This code is DEV-only so size is not a concern.
target.tag = source.tag;
target.key = source.key;
target.elementType = source.elementType;
target.type = source.type;
target.stateNode = source.stateNode;
target.return = source.return;
target.child = source.child;
target.sibling = source.sibling;
target.index = source.index;
target.ref = source.ref;
target.pendingProps = source.pendingProps;
target.memoizedProps = source.memoizedProps;
target.updateQueue = source.updateQueue;
target.memoizedState = source.memoizedState;
target.dependencies = source.dependencies;
target.mode = source.mode;
target.flags = source.flags;
target.subtreeFlags = source.subtreeFlags;
target.deletions = source.deletions;
target.lanes = source.lanes;
target.childLanes = source.childLanes;
target.alternate = source.alternate;
{
target.actualDuration = source.actualDuration;
target.actualStartTime = source.actualStartTime;
target.selfBaseDuration = source.selfBaseDuration;
target.treeBaseDuration = source.treeBaseDuration;
}
target._debugSource = source._debugSource;
target._debugOwner = source._debugOwner;
target._debugNeedsRemount = source._debugNeedsRemount;
target._debugHookTypes = source._debugHookTypes;
return target;
}
function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError) {
this.tag = tag;
this.containerInfo = containerInfo;
this.pendingChildren = null;
this.current = null;
this.pingCache = null;
this.finishedWork = null;
this.timeoutHandle = noTimeout;
this.context = null;
this.pendingContext = null;
this.callbackNode = null;
this.callbackPriority = NoLane;
this.eventTimes = createLaneMap(NoLanes);
this.expirationTimes = createLaneMap(NoTimestamp);
this.pendingLanes = NoLanes;
this.suspendedLanes = NoLanes;
this.pingedLanes = NoLanes;
this.expiredLanes = NoLanes;
this.mutableReadLanes = NoLanes;
this.finishedLanes = NoLanes;
this.entangledLanes = NoLanes;
this.entanglements = createLaneMap(NoLanes);
this.identifierPrefix = identifierPrefix;
this.onRecoverableError = onRecoverableError;
{
this.mutableSourceEagerHydrationData = null;
}
{
this.effectDuration = 0;
this.passiveEffectDuration = 0;
}
{
this.memoizedUpdaters = new Set();
var pendingUpdatersLaneMap = this.pendingUpdatersLaneMap = [];
for (var _i = 0; _i < TotalLanes; _i++) {
pendingUpdatersLaneMap.push(new Set());
}
}
{
switch (tag) {
case ConcurrentRoot:
this._debugRootType = hydrate ? 'hydrateRoot()' : 'createRoot()';
break;
case LegacyRoot:
this._debugRootType = hydrate ? 'hydrate()' : 'render()';
break;
}
}
}
function createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, // TODO: We have several of these arguments that are conceptually part of the
// host config, but because they are passed in at runtime, we have to thread
// them through the root constructor. Perhaps we should put them all into a
// single type, like a DynamicHostConfig that is defined by the renderer.
identifierPrefix, onRecoverableError, transitionCallbacks) {
var root = new FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError);
// stateNode is any.
var uninitializedFiber = createHostRootFiber(tag, isStrictMode);
root.current = uninitializedFiber;
uninitializedFiber.stateNode = root;
{
var _initialState = {
element: initialChildren,
isDehydrated: hydrate,
cache: null,
// not enabled yet
transitions: null,
pendingSuspenseBoundaries: null
};
uninitializedFiber.memoizedState = _initialState;
}
initializeUpdateQueue(uninitializedFiber);
return root;
}
var ReactVersion = '18.2.0';
function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
implementation) {
var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
{
checkKeyStringCoercion(key);
}
return {
// This tag allow us to uniquely identify this as a React Portal
$$typeof: REACT_PORTAL_TYPE,
key: key == null ? null : '' + key,
children: children,
containerInfo: containerInfo,
implementation: implementation
};
}
var didWarnAboutNestedUpdates;
var didWarnAboutFindNodeInStrictMode;
{
didWarnAboutNestedUpdates = false;
didWarnAboutFindNodeInStrictMode = {};
}
function getContextForSubtree(parentComponent) {
if (!parentComponent) {
return emptyContextObject;
}
var fiber = get(parentComponent);
var parentContext = findCurrentUnmaskedContext(fiber);
if (fiber.tag === ClassComponent) {
var Component = fiber.type;
if (isContextProvider(Component)) {
return processChildContext(fiber, Component, parentContext);
}
}
return parentContext;
}
function findHostInstanceWithWarning(component, methodName) {
{
var fiber = get(component);
if (fiber === undefined) {
if (typeof component.render === 'function') {
throw new Error('Unable to find node on an unmounted component.');
} else {
var keys = Object.keys(component).join(',');
throw new Error("Argument appears to not be a ReactComponent. Keys: " + keys);
}
}
var hostFiber = findCurrentHostFiber(fiber);
if (hostFiber === null) {
return null;
}
if (hostFiber.mode & StrictLegacyMode) {
var componentName = getComponentNameFromFiber(fiber) || 'Component';
if (!didWarnAboutFindNodeInStrictMode[componentName]) {
didWarnAboutFindNodeInStrictMode[componentName] = true;
var previousFiber = current;
try {
setCurrentFiber(hostFiber);
if (fiber.mode & StrictLegacyMode) {
error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);
} else {
error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);
}
} finally {
// Ideally this should reset to previous but this shouldn't be called in
// render and there's another warning for that anyway.
if (previousFiber) {
setCurrentFiber(previousFiber);
} else {
resetCurrentFiber();
}
}
}
}
return hostFiber.stateNode;
}
}
function createContainer(containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {
var hydrate = false;
var initialChildren = null;
return createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);
}
function createHydrationContainer(initialChildren, // TODO: Remove `callback` when we delete legacy mode.
callback, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {
var hydrate = true;
var root = createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError); // TODO: Move this to FiberRoot constructor
root.context = getContextForSubtree(null); // Schedule the initial render. In a hydration root, this is different from
// a regular update because the initial render must match was was rendered
// on the server.
// NOTE: This update intentionally doesn't have a payload. We're only using
// the update to schedule work on the root fiber (and, for legacy roots, to
// enqueue the callback if one is provided).
var current = root.current;
var eventTime = requestEventTime();
var lane = requestUpdateLane(current);
var update = createUpdate(eventTime, lane);
update.callback = callback !== undefined && callback !== null ? callback : null;
enqueueUpdate(current, update, lane);
scheduleInitialHydrationOnRoot(root, lane, eventTime);
return root;
}
function updateContainer(element, container, parentComponent, callback) {
{
onScheduleRoot(container, element);
}
var current$1 = container.current;
var eventTime = requestEventTime();
var lane = requestUpdateLane(current$1);
{
markRenderScheduled(lane);
}
var context = getContextForSubtree(parentComponent);
if (container.context === null) {
container.context = context;
} else {
container.pendingContext = context;
}
{
if (isRendering && current !== null && !didWarnAboutNestedUpdates) {
didWarnAboutNestedUpdates = true;
error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + 'Check the render method of %s.', getComponentNameFromFiber(current) || 'Unknown');
}
}
var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property
// being called "element".
update.payload = {
element: element
};
callback = callback === undefined ? null : callback;
if (callback !== null) {
{
if (typeof callback !== 'function') {
error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);
}
}
update.callback = callback;
}
var root = enqueueUpdate(current$1, update, lane);
if (root !== null) {
scheduleUpdateOnFiber(root, current$1, lane, eventTime);
entangleTransitions(root, current$1, lane);
}
return lane;
}
function getPublicRootInstance(container) {
var containerFiber = container.current;
if (!containerFiber.child) {
return null;
}
switch (containerFiber.child.tag) {
case HostComponent:
return getPublicInstance(containerFiber.child.stateNode);
default:
return containerFiber.child.stateNode;
}
}
function attemptSynchronousHydration$1(fiber) {
switch (fiber.tag) {
case HostRoot:
{
var root = fiber.stateNode;
if (isRootDehydrated(root)) {
// Flush the first scheduled "update".
var lanes = getHighestPriorityPendingLanes(root);
flushRoot(root, lanes);
}
break;
}
case SuspenseComponent:
{
flushSync(function () {
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root !== null) {
var eventTime = requestEventTime();
scheduleUpdateOnFiber(root, fiber, SyncLane, eventTime);
}
}); // If we're still blocked after this, we need to increase
// the priority of any promises resolving within this
// boundary so that they next attempt also has higher pri.
var retryLane = SyncLane;
markRetryLaneIfNotHydrated(fiber, retryLane);
break;
}
}
}
function markRetryLaneImpl(fiber, retryLane) {
var suspenseState = fiber.memoizedState;
if (suspenseState !== null && suspenseState.dehydrated !== null) {
suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);
}
} // Increases the priority of thenables when they resolve within this boundary.
function markRetryLaneIfNotHydrated(fiber, retryLane) {
markRetryLaneImpl(fiber, retryLane);
var alternate = fiber.alternate;
if (alternate) {
markRetryLaneImpl(alternate, retryLane);
}
}
function attemptContinuousHydration$1(fiber) {
if (fiber.tag !== SuspenseComponent) {
// We ignore HostRoots here because we can't increase
// their priority and they should not suspend on I/O,
// since you have to wrap anything that might suspend in
// Suspense.
return;
}
var lane = SelectiveHydrationLane;
var root = enqueueConcurrentRenderForLane(fiber, lane);
if (root !== null) {
var eventTime = requestEventTime();
scheduleUpdateOnFiber(root, fiber, lane, eventTime);
}
markRetryLaneIfNotHydrated(fiber, lane);
}
function attemptHydrationAtCurrentPriority$1(fiber) {
if (fiber.tag !== SuspenseComponent) {
// We ignore HostRoots here because we can't increase
// their priority other than synchronously flush it.
return;
}
var lane = requestUpdateLane(fiber);
var root = enqueueConcurrentRenderForLane(fiber, lane);
if (root !== null) {
var eventTime = requestEventTime();
scheduleUpdateOnFiber(root, fiber, lane, eventTime);
}
markRetryLaneIfNotHydrated(fiber, lane);
}
function findHostInstanceWithNoPortals(fiber) {
var hostFiber = findCurrentHostFiberWithNoPortals(fiber);
if (hostFiber === null) {
return null;
}
return hostFiber.stateNode;
}
var shouldErrorImpl = function (fiber) {
return null;
};
function shouldError(fiber) {
return shouldErrorImpl(fiber);
}
var shouldSuspendImpl = function (fiber) {
return false;
};
function shouldSuspend(fiber) {
return shouldSuspendImpl(fiber);
}
var overrideHookState = null;
var overrideHookStateDeletePath = null;
var overrideHookStateRenamePath = null;
var overrideProps = null;
var overridePropsDeletePath = null;
var overridePropsRenamePath = null;
var scheduleUpdate = null;
var setErrorHandler = null;
var setSuspenseHandler = null;
{
var copyWithDeleteImpl = function (obj, path, index) {
var key = path[index];
var updated = isArray(obj) ? obj.slice() : assign({}, obj);
if (index + 1 === path.length) {
if (isArray(updated)) {
updated.splice(key, 1);
} else {
delete updated[key];
}
return updated;
} // $FlowFixMe number or string is fine here
updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);
return updated;
};
var copyWithDelete = function (obj, path) {
return copyWithDeleteImpl(obj, path, 0);
};
var copyWithRenameImpl = function (obj, oldPath, newPath, index) {
var oldKey = oldPath[index];
var updated = isArray(obj) ? obj.slice() : assign({}, obj);
if (index + 1 === oldPath.length) {
var newKey = newPath[index]; // $FlowFixMe number or string is fine here
updated[newKey] = updated[oldKey];
if (isArray(updated)) {
updated.splice(oldKey, 1);
} else {
delete updated[oldKey];
}
} else {
// $FlowFixMe number or string is fine here
updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine here
obj[oldKey], oldPath, newPath, index + 1);
}
return updated;
};
var copyWithRename = function (obj, oldPath, newPath) {
if (oldPath.length !== newPath.length) {
warn('copyWithRename() expects paths of the same length');
return;
} else {
for (var i = 0; i < newPath.length - 1; i++) {
if (oldPath[i] !== newPath[i]) {
warn('copyWithRename() expects paths to be the same except for the deepest key');
return;
}
}
}
return copyWithRenameImpl(obj, oldPath, newPath, 0);
};
var copyWithSetImpl = function (obj, path, index, value) {
if (index >= path.length) {
return value;
}
var key = path[index];
var updated = isArray(obj) ? obj.slice() : assign({}, obj); // $FlowFixMe number or string is fine here
updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);
return updated;
};
var copyWithSet = function (obj, path, value) {
return copyWithSetImpl(obj, path, 0, value);
};
var findHook = function (fiber, id) {
// For now, the "id" of stateful hooks is just the stateful hook index.
// This may change in the future with e.g. nested hooks.
var currentHook = fiber.memoizedState;
while (currentHook !== null && id > 0) {
currentHook = currentHook.next;
id--;
}
return currentHook;
}; // Support DevTools editable values for useState and useReducer.
overrideHookState = function (fiber, id, path, value) {
var hook = findHook(fiber, id);
if (hook !== null) {
var newState = copyWithSet(hook.memoizedState, path, value);
hook.memoizedState = newState;
hook.baseState = newState; // We aren't actually adding an update to the queue,
// because there is no update we can add for useReducer hooks that won't trigger an error.
// (There's no appropriate action type for DevTools overrides.)
// As a result though, React will see the scheduled update as a noop and bailout.
// Shallow cloning props works as a workaround for now to bypass the bailout check.
fiber.memoizedProps = assign({}, fiber.memoizedProps);
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
}
}
};
overrideHookStateDeletePath = function (fiber, id, path) {
var hook = findHook(fiber, id);
if (hook !== null) {
var newState = copyWithDelete(hook.memoizedState, path);
hook.memoizedState = newState;
hook.baseState = newState; // We aren't actually adding an update to the queue,
// because there is no update we can add for useReducer hooks that won't trigger an error.
// (There's no appropriate action type for DevTools overrides.)
// As a result though, React will see the scheduled update as a noop and bailout.
// Shallow cloning props works as a workaround for now to bypass the bailout check.
fiber.memoizedProps = assign({}, fiber.memoizedProps);
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
}
}
};
overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {
var hook = findHook(fiber, id);
if (hook !== null) {
var newState = copyWithRename(hook.memoizedState, oldPath, newPath);
hook.memoizedState = newState;
hook.baseState = newState; // We aren't actually adding an update to the queue,
// because there is no update we can add for useReducer hooks that won't trigger an error.
// (There's no appropriate action type for DevTools overrides.)
// As a result though, React will see the scheduled update as a noop and bailout.
// Shallow cloning props works as a workaround for now to bypass the bailout check.
fiber.memoizedProps = assign({}, fiber.memoizedProps);
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
}
}
}; // Support DevTools props for function components, forwardRef, memo, host components, etc.
overrideProps = function (fiber, path, value) {
fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);
if (fiber.alternate) {
fiber.alternate.pendingProps = fiber.pendingProps;
}
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
}
};
overridePropsDeletePath = function (fiber, path) {
fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);
if (fiber.alternate) {
fiber.alternate.pendingProps = fiber.pendingProps;
}
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
}
};
overridePropsRenamePath = function (fiber, oldPath, newPath) {
fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);
if (fiber.alternate) {
fiber.alternate.pendingProps = fiber.pendingProps;
}
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
}
};
scheduleUpdate = function (fiber) {
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root !== null) {
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
}
};
setErrorHandler = function (newShouldErrorImpl) {
shouldErrorImpl = newShouldErrorImpl;
};
setSuspenseHandler = function (newShouldSuspendImpl) {
shouldSuspendImpl = newShouldSuspendImpl;
};
}
function findHostInstanceByFiber(fiber) {
var hostFiber = findCurrentHostFiber(fiber);
if (hostFiber === null) {
return null;
}
return hostFiber.stateNode;
}
function emptyFindFiberByHostInstance(instance) {
return null;
}
function getCurrentFiberForDevTools() {
return current;
}
function injectIntoDevTools(devToolsConfig) {
var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
return injectInternals({
bundleType: devToolsConfig.bundleType,
version: devToolsConfig.version,
rendererPackageName: devToolsConfig.rendererPackageName,
rendererConfig: devToolsConfig.rendererConfig,
overrideHookState: overrideHookState,
overrideHookStateDeletePath: overrideHookStateDeletePath,
overrideHookStateRenamePath: overrideHookStateRenamePath,
overrideProps: overrideProps,
overridePropsDeletePath: overridePropsDeletePath,
overridePropsRenamePath: overridePropsRenamePath,
setErrorHandler: setErrorHandler,
setSuspenseHandler: setSuspenseHandler,
scheduleUpdate: scheduleUpdate,
currentDispatcherRef: ReactCurrentDispatcher,
findHostInstanceByFiber: findHostInstanceByFiber,
findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,
// React Refresh
findHostInstancesForRefresh: findHostInstancesForRefresh ,
scheduleRefresh: scheduleRefresh ,
scheduleRoot: scheduleRoot ,
setRefreshHandler: setRefreshHandler ,
// Enables DevTools to append owner stacks to error messages in DEV mode.
getCurrentFiber: getCurrentFiberForDevTools ,
// Enables DevTools to detect reconciler version rather than renderer version
// which may not match for third party renderers.
reconcilerVersion: ReactVersion
});
}
/* global reportError */
var defaultOnRecoverableError = typeof reportError === 'function' ? // In modern browsers, reportError will dispatch an error event,
// emulating an uncaught JavaScript error.
reportError : function (error) {
// In older browsers and test environments, fallback to console.error.
// eslint-disable-next-line react-internal/no-production-logging
console['error'](error);
};
function ReactDOMRoot(internalRoot) {
this._internalRoot = internalRoot;
}
ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function (children) {
var root = this._internalRoot;
if (root === null) {
throw new Error('Cannot update an unmounted root.');
}
{
if (typeof arguments[1] === 'function') {
error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
} else if (isValidContainer(arguments[1])) {
error('You passed a container to the second argument of root.render(...). ' + "You don't need to pass it again since you already passed it to create the root.");
} else if (typeof arguments[1] !== 'undefined') {
error('You passed a second argument to root.render(...) but it only accepts ' + 'one argument.');
}
var container = root.containerInfo;
if (container.nodeType !== COMMENT_NODE) {
var hostInstance = findHostInstanceWithNoPortals(root.current);
if (hostInstance) {
if (hostInstance.parentNode !== container) {
error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + "root.unmount() to empty a root's container.");
}
}
}
}
updateContainer(children, root, null, null);
};
ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function () {
{
if (typeof arguments[0] === 'function') {
error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
}
}
var root = this._internalRoot;
if (root !== null) {
this._internalRoot = null;
var container = root.containerInfo;
{
if (isAlreadyRendering()) {
error('Attempted to synchronously unmount a root while React was already ' + 'rendering. React cannot finish unmounting the root until the ' + 'current render has completed, which may lead to a race condition.');
}
}
flushSync(function () {
updateContainer(null, root, null, null);
});
unmarkContainerAsRoot(container);
}
};
function createRoot(container, options) {
if (!isValidContainer(container)) {
throw new Error('createRoot(...): Target container is not a DOM element.');
}
warnIfReactDOMContainerInDEV(container);
var isStrictMode = false;
var concurrentUpdatesByDefaultOverride = false;
var identifierPrefix = '';
var onRecoverableError = defaultOnRecoverableError;
var transitionCallbacks = null;
if (options !== null && options !== undefined) {
{
if (options.hydrate) {
warn('hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.');
} else {
if (typeof options === 'object' && options !== null && options.$$typeof === REACT_ELEMENT_TYPE) {
error('You passed a JSX element to createRoot. You probably meant to ' + 'call root.render instead. ' + 'Example usage:\n\n' + ' let root = createRoot(domContainer);\n' + ' root.render(<App />);');
}
}
}
if (options.unstable_strictMode === true) {
isStrictMode = true;
}
if (options.identifierPrefix !== undefined) {
identifierPrefix = options.identifierPrefix;
}
if (options.onRecoverableError !== undefined) {
onRecoverableError = options.onRecoverableError;
}
if (options.transitionCallbacks !== undefined) {
transitionCallbacks = options.transitionCallbacks;
}
}
var root = createContainer(container, ConcurrentRoot, null, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);
markContainerAsRoot(root.current, container);
var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;
listenToAllSupportedEvents(rootContainerElement);
return new ReactDOMRoot(root);
}
function ReactDOMHydrationRoot(internalRoot) {
this._internalRoot = internalRoot;
}
function scheduleHydration(target) {
if (target) {
queueExplicitHydrationTarget(target);
}
}
ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = scheduleHydration;
function hydrateRoot(container, initialChildren, options) {
if (!isValidContainer(container)) {
throw new Error('hydrateRoot(...): Target container is not a DOM element.');
}
warnIfReactDOMContainerInDEV(container);
{
if (initialChildren === undefined) {
error('Must provide initial children as second argument to hydrateRoot. ' + 'Example usage: hydrateRoot(domContainer, <App />)');
}
} // For now we reuse the whole bag of options since they contain
// the hydration callbacks.
var hydrationCallbacks = options != null ? options : null; // TODO: Delete this option
var mutableSources = options != null && options.hydratedSources || null;
var isStrictMode = false;
var concurrentUpdatesByDefaultOverride = false;
var identifierPrefix = '';
var onRecoverableError = defaultOnRecoverableError;
if (options !== null && options !== undefined) {
if (options.unstable_strictMode === true) {
isStrictMode = true;
}
if (options.identifierPrefix !== undefined) {
identifierPrefix = options.identifierPrefix;
}
if (options.onRecoverableError !== undefined) {
onRecoverableError = options.onRecoverableError;
}
}
var root = createHydrationContainer(initialChildren, null, container, ConcurrentRoot, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);
markContainerAsRoot(root.current, container); // This can't be a comment node since hydration doesn't work on comment nodes anyway.
listenToAllSupportedEvents(container);
if (mutableSources) {
for (var i = 0; i < mutableSources.length; i++) {
var mutableSource = mutableSources[i];
registerMutableSourceForHydration(root, mutableSource);
}
}
return new ReactDOMHydrationRoot(root);
}
function isValidContainer(node) {
return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || !disableCommentsAsDOMContainers ));
} // TODO: Remove this function which also includes comment nodes.
// We only use it in places that are currently more relaxed.
function isValidContainerLegacy(node) {
return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));
}
function warnIfReactDOMContainerInDEV(container) {
{
if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {
error('createRoot(): Creating roots directly with document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try using a container element created ' + 'for your app.');
}
if (isContainerMarkedAsRoot(container)) {
if (container._reactRootContainer) {
error('You are calling ReactDOMClient.createRoot() on a container that was previously ' + 'passed to ReactDOM.render(). This is not supported.');
} else {
error('You are calling ReactDOMClient.createRoot() on a container that ' + 'has already been passed to createRoot() before. Instead, call ' + 'root.render() on the existing root instead if you want to update it.');
}
}
}
}
var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;
var topLevelUpdateWarnings;
{
topLevelUpdateWarnings = function (container) {
if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {
var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer.current);
if (hostInstance) {
if (hostInstance.parentNode !== container) {
error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');
}
}
}
var isRootRenderedBySomeReact = !!container._reactRootContainer;
var rootEl = getReactRootElementInContainer(container);
var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));
if (hasNonRootReactChild && !isRootRenderedBySomeReact) {
error('render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');
}
if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {
error('render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.');
}
};
}
function getReactRootElementInContainer(container) {
if (!container) {
return null;
}
if (container.nodeType === DOCUMENT_NODE) {
return container.documentElement;
} else {
return container.firstChild;
}
}
function noopOnRecoverableError() {// This isn't reachable because onRecoverableError isn't called in the
// legacy API.
}
function legacyCreateRootFromDOMContainer(container, initialChildren, parentComponent, callback, isHydrationContainer) {
if (isHydrationContainer) {
if (typeof callback === 'function') {
var originalCallback = callback;
callback = function () {
var instance = getPublicRootInstance(root);
originalCallback.call(instance);
};
}
var root = createHydrationContainer(initialChildren, callback, container, LegacyRoot, null, // hydrationCallbacks
false, // isStrictMode
false, // concurrentUpdatesByDefaultOverride,
'', // identifierPrefix
noopOnRecoverableError);
container._reactRootContainer = root;
markContainerAsRoot(root.current, container);
var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;
listenToAllSupportedEvents(rootContainerElement);
flushSync();
return root;
} else {
// First clear any existing content.
var rootSibling;
while (rootSibling = container.lastChild) {
container.removeChild(rootSibling);
}
if (typeof callback === 'function') {
var _originalCallback = callback;
callback = function () {
var instance = getPublicRootInstance(_root);
_originalCallback.call(instance);
};
}
var _root = createContainer(container, LegacyRoot, null, // hydrationCallbacks
false, // isStrictMode
false, // concurrentUpdatesByDefaultOverride,
'', // identifierPrefix
noopOnRecoverableError);
container._reactRootContainer = _root;
markContainerAsRoot(_root.current, container);
var _rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;
listenToAllSupportedEvents(_rootContainerElement); // Initial mount should not be batched.
flushSync(function () {
updateContainer(initialChildren, _root, parentComponent, callback);
});
return _root;
}
}
function warnOnInvalidCallback$1(callback, callerName) {
{
if (callback !== null && typeof callback !== 'function') {
error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
}
}
}
function legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {
{
topLevelUpdateWarnings(container);
warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render');
}
var maybeRoot = container._reactRootContainer;
var root;
if (!maybeRoot) {
// Initial mount
root = legacyCreateRootFromDOMContainer(container, children, parentComponent, callback, forceHydrate);
} else {
root = maybeRoot;
if (typeof callback === 'function') {
var originalCallback = callback;
callback = function () {
var instance = getPublicRootInstance(root);
originalCallback.call(instance);
};
} // Update
updateContainer(children, root, parentComponent, callback);
}
return getPublicRootInstance(root);
}
function findDOMNode(componentOrElement) {
{
var owner = ReactCurrentOwner$3.current;
if (owner !== null && owner.stateNode !== null) {
var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;
if (!warnedAboutRefsInRender) {
error('%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentNameFromType(owner.type) || 'A component');
}
owner.stateNode._warnedAboutRefsInRender = true;
}
}
if (componentOrElement == null) {
return null;
}
if (componentOrElement.nodeType === ELEMENT_NODE) {
return componentOrElement;
}
{
return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');
}
}
function hydrate(element, container, callback) {
{
error('ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + "if it's running React 17. Learn " + 'more: https://reactjs.org/link/switch-to-createroot');
}
if (!isValidContainerLegacy(container)) {
throw new Error('Target container is not a DOM element.');
}
{
var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
if (isModernRoot) {
error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call hydrateRoot(container, element)?');
}
} // TODO: throw or warn if we couldn't hydrate?
return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);
}
function render(element, container, callback) {
{
error('ReactDOM.render is no longer supported in React 18. Use createRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + "if it's running React 17. Learn " + 'more: https://reactjs.org/link/switch-to-createroot');
}
if (!isValidContainerLegacy(container)) {
throw new Error('Target container is not a DOM element.');
}
{
var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
if (isModernRoot) {
error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');
}
}
return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);
}
function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
{
error('ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported ' + 'in React 18. Consider using a portal instead. Until you switch to ' + "the createRoot API, your app will behave as if it's running React " + '17. Learn more: https://reactjs.org/link/switch-to-createroot');
}
if (!isValidContainerLegacy(containerNode)) {
throw new Error('Target container is not a DOM element.');
}
if (parentComponent == null || !has(parentComponent)) {
throw new Error('parentComponent must be a valid React Component');
}
return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);
}
function unmountComponentAtNode(container) {
if (!isValidContainerLegacy(container)) {
throw new Error('unmountComponentAtNode(...): Target container is not a DOM element.');
}
{
var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
if (isModernRoot) {
error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?');
}
}
if (container._reactRootContainer) {
{
var rootEl = getReactRootElementInContainer(container);
var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);
if (renderedByDifferentReact) {
error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.');
}
} // Unmount should not be batched.
flushSync(function () {
legacyRenderSubtreeIntoContainer(null, null, container, false, function () {
// $FlowFixMe This should probably use `delete container._reactRootContainer`
container._reactRootContainer = null;
unmarkContainerAsRoot(container);
});
}); // If you call unmountComponentAtNode twice in quick succession, you'll
// get `true` twice. That's probably fine?
return true;
} else {
{
var _rootEl = getReactRootElementInContainer(container);
var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node.
var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainerLegacy(container.parentNode) && !!container.parentNode._reactRootContainer;
if (hasNonRootReactChild) {
error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.');
}
}
return false;
}
}
setAttemptSynchronousHydration(attemptSynchronousHydration$1);
setAttemptContinuousHydration(attemptContinuousHydration$1);
setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);
setGetCurrentUpdatePriority(getCurrentUpdatePriority);
setAttemptHydrationAtPriority(runWithPriority);
{
if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype
Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype
Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {
error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
}
}
setRestoreImplementation(restoreControlledState$3);
setBatchingImplementation(batchedUpdates$1, discreteUpdates, flushSync);
function createPortal$1(children, container) {
var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
if (!isValidContainer(container)) {
throw new Error('Target container is not a DOM element.');
} // TODO: pass ReactDOM portal implementation as third argument
// $FlowFixMe The Flow type is opaque but there's no way to actually create it.
return createPortal(children, container, null, key);
}
function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);
}
var Internals = {
usingClientEntryPoint: false,
// Keep in sync with ReactTestUtils.js.
// This is an array for better minification.
Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, batchedUpdates$1]
};
function createRoot$1(container, options) {
{
if (!Internals.usingClientEntryPoint && !true) {
error('You are importing createRoot from "react-dom" which is not supported. ' + 'You should instead import it from "react-dom/client".');
}
}
return createRoot(container, options);
}
function hydrateRoot$1(container, initialChildren, options) {
{
if (!Internals.usingClientEntryPoint && !true) {
error('You are importing hydrateRoot from "react-dom" which is not supported. ' + 'You should instead import it from "react-dom/client".');
}
}
return hydrateRoot(container, initialChildren, options);
} // Overload the definition to the two valid signatures.
// Warning, this opts-out of checking the function body.
// eslint-disable-next-line no-redeclare
function flushSync$1(fn) {
{
if (isAlreadyRendering()) {
error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');
}
}
return flushSync(fn);
}
var foundDevTools = injectIntoDevTools({
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 1 ,
version: ReactVersion,
rendererPackageName: 'react-dom'
});
{
if (!foundDevTools && canUseDOM && window.top === window.self) {
// If we're in Chrome or Firefox, provide a download link if not installed.
if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.
if (/^(https?|file):$/.test(protocol)) {
// eslint-disable-next-line react-internal/no-production-logging
console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://reactjs.org/link/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + 'https://reactjs.org/link/react-devtools-faq' : ''), 'font-weight:bold');
}
}
}
}
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = createPortal$1;
exports.createRoot = createRoot$1;
exports.findDOMNode = findDOMNode;
exports.flushSync = flushSync$1;
exports.hydrate = hydrate;
exports.hydrateRoot = hydrateRoot$1;
exports.render = render;
exports.unmountComponentAtNode = unmountComponentAtNode;
exports.unstable_batchedUpdates = batchedUpdates$1;
exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;
exports.version = ReactVersion;
})));
react-dom.min.js 0000644 00000374565 15153765737 0007606 0 ustar 00 /**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
!function(){"use strict";var e,n;e=this,n=function(e,n){function t(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t<arguments.length;t++)n+="&args[]="+encodeURIComponent(arguments[t]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(e,n){l(e,n),l(e+"Capture",n)}function l(e,n){for(ra[e]=n,e=0;e<n.length;e++)ta.add(n[e])}function a(e,n,t,r,l,a,u){this.acceptsBooleans=2===n||3===n||4===n,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=a,this.removeEmptyString=u}function u(e,n,t,r){var l=sa.hasOwnProperty(n)?sa[n]:null;(null!==l?0!==l.type:r||!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&(function(e,n,t,r){if(null==n||function(e,n,t,r){if(null!==t&&0===t.type)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==t?!t.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,n,t,r))return!0;if(r)return!1;if(null!==t)switch(t.type){case 3:return!n;case 4:return!1===n;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}(n,t,l,r)&&(t=null),r||null===l?function(e){return!!aa.call(ia,e)||!aa.call(oa,e)&&(ua.test(e)?ia[e]=!0:(oa[e]=!0,!1))}(n)&&(null===t?e.removeAttribute(n):e.setAttribute(n,""+t)):l.mustUseProperty?e[l.propertyName]=null===t?3!==l.type&&"":t:(n=l.attributeName,r=l.attributeNamespace,null===t?e.removeAttribute(n):(t=3===(l=l.type)||4===l&&!0===t?"":""+t,r?e.setAttributeNS(r,n,t):e.setAttribute(n,t))))}function o(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=_a&&e[_a]||e["@@iterator"])?e:null}function i(e,n,t){if(void 0===za)try{throw Error()}catch(e){za=(n=e.stack.trim().match(/\n( *(at )?)/))&&n[1]||""}return"\n"+za+e}function s(e,n){if(!e||Ta)return"";Ta=!0;var t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(n){if(n&&r&&"string"==typeof n.stack){for(var l=n.stack.split("\n"),a=r.stack.split("\n"),u=l.length-1,o=a.length-1;1<=u&&0<=o&&l[u]!==a[o];)o--;for(;1<=u&&0<=o;u--,o--)if(l[u]!==a[o]){if(1!==u||1!==o)do{if(u--,0>--o||l[u]!==a[o]){var s="\n"+l[u].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}}while(1<=u&&0<=o);break}}}finally{Ta=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?i(e):""}function c(e){switch(e.tag){case 5:return i(e.type);case 16:return i("Lazy");case 13:return i("Suspense");case 19:return i("SuspenseList");case 0:case 2:case 15:return e=s(e.type,!1);case 11:return e=s(e.type.render,!1);case 1:return e=s(e.type,!0);default:return""}}function f(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ha:return"Fragment";case ma:return"Portal";case va:return"Profiler";case ga:return"StrictMode";case wa:return"Suspense";case Sa:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ba:return(e.displayName||"Context")+".Consumer";case ya:return(e._context.displayName||"Context")+".Provider";case ka:var n=e.render;return(e=e.displayName)||(e=""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case xa:return null!==(n=e.displayName||null)?n:f(e.type)||"Memo";case Ea:n=e._payload,e=e._init;try{return f(e(n))}catch(e){}}return null}function d(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=n.render).displayName||e.name||"",n.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return f(n);case 8:return n===ga?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof n)return n.displayName||n.name||null;if("string"==typeof n)return n}return null}function p(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function m(e){var n=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===n||"radio"===n)}function h(e){e._valueTracker||(e._valueTracker=function(e){var n=m(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&void 0!==t&&"function"==typeof t.get&&"function"==typeof t.set){var l=t.get,a=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}(e))}function g(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=m(e)?e.checked?"true":"false":e.value),(e=r)!==t&&(n.setValue(e),!0)}function v(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(n){return e.body}}function y(e,n){var t=n.checked;return La({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=t?t:e._wrapperState.initialChecked})}function b(e,n){var t=null==n.defaultValue?"":n.defaultValue,r=null!=n.checked?n.checked:n.defaultChecked;t=p(null!=n.value?n.value:t),e._wrapperState={initialChecked:r,initialValue:t,controlled:"checkbox"===n.type||"radio"===n.type?null!=n.checked:null!=n.value}}function k(e,n){null!=(n=n.checked)&&u(e,"checked",n,!1)}function w(e,n){k(e,n);var t=p(n.value),r=n.type;if(null!=t)"number"===r?(0===t&&""===e.value||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");n.hasOwnProperty("value")?x(e,n.type,t):n.hasOwnProperty("defaultValue")&&x(e,n.type,p(n.defaultValue)),null==n.checked&&null!=n.defaultChecked&&(e.defaultChecked=!!n.defaultChecked)}function S(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(!("submit"!==r&&"reset"!==r||void 0!==n.value&&null!==n.value))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}""!==(t=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==t&&(e.name=t)}function x(e,n,t){"number"===n&&v(e.ownerDocument)===e||(null==t?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}function E(e,n,t,r){if(e=e.options,n){n={};for(var l=0;l<t.length;l++)n["$"+t[l]]=!0;for(t=0;t<e.length;t++)l=n.hasOwnProperty("$"+e[t].value),e[t].selected!==l&&(e[t].selected=l),l&&r&&(e[t].defaultSelected=!0)}else{for(t=""+p(t),n=null,l=0;l<e.length;l++){if(e[l].value===t)return e[l].selected=!0,void(r&&(e[l].defaultSelected=!0));null!==n||e[l].disabled||(n=e[l])}null!==n&&(n.selected=!0)}}function C(e,n){if(null!=n.dangerouslySetInnerHTML)throw Error(t(91));return La({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function z(e,n){var r=n.value;if(null==r){if(r=n.children,n=n.defaultValue,null!=r){if(null!=n)throw Error(t(92));if(Ma(r)){if(1<r.length)throw Error(t(93));r=r[0]}n=r}null==n&&(n=""),r=n}e._wrapperState={initialValue:p(r)}}function N(e,n){var t=p(n.value),r=p(n.defaultValue);null!=t&&((t=""+t)!==e.value&&(e.value=t),null==n.defaultValue&&e.defaultValue!==t&&(e.defaultValue=t)),null!=r&&(e.defaultValue=""+r)}function P(e,n){(n=e.textContent)===e._wrapperState.initialValue&&""!==n&&null!==n&&(e.value=n)}function _(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function L(e,n){return null==e||"http://www.w3.org/1999/xhtml"===e?_(n):"http://www.w3.org/2000/svg"===e&&"foreignObject"===n?"http://www.w3.org/1999/xhtml":e}function T(e,n,t){return null==n||"boolean"==typeof n||""===n?"":t||"number"!=typeof n||0===n||Da.hasOwnProperty(e)&&Da[e]?(""+n).trim():n+"px"}function M(e,n){for(var t in e=e.style,n)if(n.hasOwnProperty(t)){var r=0===t.indexOf("--"),l=T(t,n[t],r);"float"===t&&(t="cssFloat"),r?e.setProperty(t,l):e[t]=l}}function F(e,n){if(n){if(Ia[e]&&(null!=n.children||null!=n.dangerouslySetInnerHTML))throw Error(t(137,e));if(null!=n.dangerouslySetInnerHTML){if(null!=n.children)throw Error(t(60));if("object"!=typeof n.dangerouslySetInnerHTML||!("__html"in n.dangerouslySetInnerHTML))throw Error(t(61))}if(null!=n.style&&"object"!=typeof n.style)throw Error(t(62))}}function R(e,n){if(-1===e.indexOf("-"))return"string"==typeof n.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function D(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function O(e){if(e=mn(e)){if("function"!=typeof Va)throw Error(t(280));var n=e.stateNode;n&&(n=gn(n),Va(e.stateNode,e.type,n))}}function I(e){Aa?Ba?Ba.push(e):Ba=[e]:Aa=e}function U(){if(Aa){var e=Aa,n=Ba;if(Ba=Aa=null,O(e),n)for(e=0;e<n.length;e++)O(n[e])}}function V(e,n,t){if(Qa)return e(n,t);Qa=!0;try{return Wa(e,n,t)}finally{Qa=!1,(null!==Aa||null!==Ba)&&(Ha(),U())}}function A(e,n){var r=e.stateNode;if(null===r)return null;var l=gn(r);if(null===l)return null;r=l[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(l=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!l;break e;default:e=!1}if(e)return null;if(r&&"function"!=typeof r)throw Error(t(231,n,typeof r));return r}function B(e,n,t,r,l,a,u,o,i){Ga=!1,Za=null,Xa.apply(nu,arguments)}function W(e,n,r,l,a,u,o,i,s){if(B.apply(this,arguments),Ga){if(!Ga)throw Error(t(198));var c=Za;Ga=!1,Za=null,Ja||(Ja=!0,eu=c)}}function H(e){var n=e,t=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do{0!=(4098&(n=e).flags)&&(t=n.return),e=n.return}while(e)}return 3===n.tag?t:null}function Q(e){if(13===e.tag){var n=e.memoizedState;if(null===n&&null!==(e=e.alternate)&&(n=e.memoizedState),null!==n)return n.dehydrated}return null}function j(e){if(H(e)!==e)throw Error(t(188))}function $(e){return null!==(e=function(e){var n=e.alternate;if(!n){if(null===(n=H(e)))throw Error(t(188));return n!==e?null:e}for(var r=e,l=n;;){var a=r.return;if(null===a)break;var u=a.alternate;if(null===u){if(null!==(l=a.return)){r=l;continue}break}if(a.child===u.child){for(u=a.child;u;){if(u===r)return j(a),e;if(u===l)return j(a),n;u=u.sibling}throw Error(t(188))}if(r.return!==l.return)r=a,l=u;else{for(var o=!1,i=a.child;i;){if(i===r){o=!0,r=a,l=u;break}if(i===l){o=!0,l=a,r=u;break}i=i.sibling}if(!o){for(i=u.child;i;){if(i===r){o=!0,r=u,l=a;break}if(i===l){o=!0,l=u,r=a;break}i=i.sibling}if(!o)throw Error(t(189))}}if(r.alternate!==l)throw Error(t(190))}if(3!==r.tag)throw Error(t(188));return r.stateNode.current===r?e:n}(e))?q(e):null}function q(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var n=q(e);if(null!==n)return n;e=e.sibling}return null}function K(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Y(e,n){var t=e.pendingLanes;if(0===t)return 0;var r=0,l=e.suspendedLanes,a=e.pingedLanes,u=268435455&t;if(0!==u){var o=u&~l;0!==o?r=K(o):0!=(a&=u)&&(r=K(a))}else 0!=(u=t&~l)?r=K(u):0!==a&&(r=K(a));if(0===r)return 0;if(0!==n&&n!==r&&0==(n&l)&&((l=r&-r)>=(a=n&-n)||16===l&&0!=(4194240&a)))return n;if(0!=(4&r)&&(r|=16&t),0!==(n=e.entangledLanes))for(e=e.entanglements,n&=r;0<n;)l=1<<(t=31-yu(n)),r|=e[t],n&=~l;return r}function X(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;default:return-1}}function G(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Z(){var e=wu;return 0==(4194240&(wu<<=1))&&(wu=64),e}function J(e){for(var n=[],t=0;31>t;t++)n.push(e);return n}function ee(e,n,t){e.pendingLanes|=n,536870912!==n&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[n=31-yu(n)]=t}function ne(e,n){var t=e.entangledLanes|=n;for(e=e.entanglements;t;){var r=31-yu(t),l=1<<r;l&n|e[r]&n&&(e[r]|=n),t&=~l}}function te(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}function re(e,n){switch(e){case"focusin":case"focusout":zu=null;break;case"dragenter":case"dragleave":Nu=null;break;case"mouseover":case"mouseout":Pu=null;break;case"pointerover":case"pointerout":_u.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lu.delete(n.pointerId)}}function le(e,n,t,r,l,a){return null===e||e.nativeEvent!==a?(e={blockedOn:n,domEventName:t,eventSystemFlags:r,nativeEvent:a,targetContainers:[l]},null!==n&&null!==(n=mn(n))&&Ys(n),e):(e.eventSystemFlags|=r,n=e.targetContainers,null!==l&&-1===n.indexOf(l)&&n.push(l),e)}function ae(e){var n=pn(e.target);if(null!==n){var t=H(n);if(null!==t)if(13===(n=t.tag)){if(null!==(n=Q(t)))return e.blockedOn=n,void Zs(e.priority,(function(){Xs(t)}))}else if(3===n&&t.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===t.tag?t.stateNode.containerInfo:null)}e.blockedOn=null}function ue(e){if(null!==e.blockedOn)return!1;for(var n=e.targetContainers;0<n.length;){var t=me(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(null!==t)return null!==(n=mn(t))&&Ys(n),e.blockedOn=t,!1;var r=new(t=e.nativeEvent).constructor(t.type,t);Ua=r,t.target.dispatchEvent(r),Ua=null,n.shift()}return!0}function oe(e,n,t){ue(e)&&t.delete(n)}function ie(){Eu=!1,null!==zu&&ue(zu)&&(zu=null),null!==Nu&&ue(Nu)&&(Nu=null),null!==Pu&&ue(Pu)&&(Pu=null),_u.forEach(oe),Lu.forEach(oe)}function se(e,n){e.blockedOn===n&&(e.blockedOn=null,Eu||(Eu=!0,ru(lu,ie)))}function ce(e){if(0<Cu.length){se(Cu[0],e);for(var n=1;n<Cu.length;n++){var t=Cu[n];t.blockedOn===e&&(t.blockedOn=null)}}for(null!==zu&&se(zu,e),null!==Nu&&se(Nu,e),null!==Pu&&se(Pu,e),n=function(n){return se(n,e)},_u.forEach(n),Lu.forEach(n),n=0;n<Tu.length;n++)(t=Tu[n]).blockedOn===e&&(t.blockedOn=null);for(;0<Tu.length&&null===(n=Tu[0]).blockedOn;)ae(n),null===n.blockedOn&&Tu.shift()}function fe(e,n,t,r){var l=xu,a=Fu.transition;Fu.transition=null;try{xu=1,pe(e,n,t,r)}finally{xu=l,Fu.transition=a}}function de(e,n,t,r){var l=xu,a=Fu.transition;Fu.transition=null;try{xu=4,pe(e,n,t,r)}finally{xu=l,Fu.transition=a}}function pe(e,n,t,r){if(Ru){var l=me(e,n,t,r);if(null===l)Je(e,n,r,Du,t),re(e,r);else if(function(e,n,t,r,l){switch(n){case"focusin":return zu=le(zu,e,n,t,r,l),!0;case"dragenter":return Nu=le(Nu,e,n,t,r,l),!0;case"mouseover":return Pu=le(Pu,e,n,t,r,l),!0;case"pointerover":var a=l.pointerId;return _u.set(a,le(_u.get(a)||null,e,n,t,r,l)),!0;case"gotpointercapture":return a=l.pointerId,Lu.set(a,le(Lu.get(a)||null,e,n,t,r,l)),!0}return!1}(l,e,n,t,r))r.stopPropagation();else if(re(e,r),4&n&&-1<Mu.indexOf(e)){for(;null!==l;){var a=mn(l);if(null!==a&&Ks(a),null===(a=me(e,n,t,r))&&Je(e,n,r,Du,t),a===l)break;l=a}null!==l&&r.stopPropagation()}else Je(e,n,r,null,t)}}function me(e,n,t,r){if(Du=null,null!==(e=pn(e=D(r))))if(null===(n=H(e)))e=null;else if(13===(t=n.tag)){if(null!==(e=Q(n)))return e;e=null}else if(3===t){if(n.stateNode.current.memoizedState.isDehydrated)return 3===n.tag?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return Du=e,null}function he(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(cu()){case fu:return 1;case du:return 4;case pu:case mu:return 16;case hu:return 536870912;default:return 16}default:return 16}}function ge(){if(Uu)return Uu;var e,n,t=Iu,r=t.length,l="value"in Ou?Ou.value:Ou.textContent,a=l.length;for(e=0;e<r&&t[e]===l[e];e++);var u=r-e;for(n=1;n<=u&&t[r-n]===l[a-n];n++);return Uu=l.slice(e,1<n?1-n:void 0)}function ve(e){var n=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===n&&(e=13):e=n,10===e&&(e=13),32<=e||13===e?e:0}function ye(){return!0}function be(){return!1}function ke(e){function n(n,t,r,l,a){for(var u in this._reactName=n,this._targetInst=r,this.type=t,this.nativeEvent=l,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(u)&&(n=e[u],this[u]=n?n(l):l[u]);return this.isDefaultPrevented=(null!=l.defaultPrevented?l.defaultPrevented:!1===l.returnValue)?ye:be,this.isPropagationStopped=be,this}return La(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ye)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ye)},persist:function(){},isPersistent:ye}),n}function we(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):!!(e=eo[e])&&!!n[e]}function Se(e){return we}function xe(e,n){switch(e){case"keyup":return-1!==io.indexOf(n.keyCode);case"keydown":return 229!==n.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ee(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}function Ce(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===n?!!vo[e.type]:"textarea"===n}function ze(e,n,t,r){I(r),0<(n=nn(n,"onChange")).length&&(t=new Au("onChange","change",null,t,r),e.push({event:t,listeners:n}))}function Ne(e){Ke(e,0)}function Pe(e){if(g(hn(e)))return e}function _e(e,n){if("change"===e)return n}function Le(){yo&&(yo.detachEvent("onpropertychange",Te),bo=yo=null)}function Te(e){if("value"===e.propertyName&&Pe(bo)){var n=[];ze(n,bo,e,D(e)),V(Ne,n)}}function Me(e,n,t){"focusin"===e?(Le(),bo=t,(yo=n).attachEvent("onpropertychange",Te)):"focusout"===e&&Le()}function Fe(e,n){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Pe(bo)}function Re(e,n){if("click"===e)return Pe(n)}function De(e,n){if("input"===e||"change"===e)return Pe(n)}function Oe(e,n){if(wo(e,n))return!0;if("object"!=typeof e||null===e||"object"!=typeof n||null===n)return!1;var t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;for(r=0;r<t.length;r++){var l=t[r];if(!aa.call(n,l)||!wo(e[l],n[l]))return!1}return!0}function Ie(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ue(e,n){var t,r=Ie(e);for(e=0;r;){if(3===r.nodeType){if(t=e+r.textContent.length,e<=n&&t>=n)return{node:r,offset:n-e};e=t}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Ie(r)}}function Ve(e,n){return!(!e||!n)&&(e===n||(!e||3!==e.nodeType)&&(n&&3===n.nodeType?Ve(e,n.parentNode):"contains"in e?e.contains(n):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(n))))}function Ae(){for(var e=window,n=v();n instanceof e.HTMLIFrameElement;){try{var t="string"==typeof n.contentWindow.location.href}catch(e){t=!1}if(!t)break;n=v((e=n.contentWindow).document)}return n}function Be(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&("input"===n&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===n||"true"===e.contentEditable)}function We(e){var n=Ae(),t=e.focusedElem,r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Ve(t.ownerDocument.documentElement,t)){if(null!==r&&Be(t))if(n=r.start,void 0===(e=r.end)&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if((e=(n=t.ownerDocument||document)&&n.defaultView||window).getSelection){e=e.getSelection();var l=t.textContent.length,a=Math.min(r.start,l);r=void 0===r.end?a:Math.min(r.end,l),!e.extend&&a>r&&(l=r,r=a,a=l),l=Ue(t,a);var u=Ue(t,r);l&&u&&(1!==e.rangeCount||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&((n=n.createRange()).setStart(l.node,l.offset),e.removeAllRanges(),a>r?(e.addRange(n),e.extend(u.node,u.offset)):(n.setEnd(u.node,u.offset),e.addRange(n)))}for(n=[],e=t;e=e.parentNode;)1===e.nodeType&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof t.focus&&t.focus(),t=0;t<n.length;t++)(e=n[t]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}function He(e,n,t){var r=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;zo||null==xo||xo!==v(r)||(r="selectionStart"in(r=xo)&&Be(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},Co&&Oe(Co,r)||(Co=r,0<(r=nn(Eo,"onSelect")).length&&(n=new Au("onSelect","select",null,n,t),e.push({event:n,listeners:r}),n.target=xo)))}function Qe(e,n){var t={};return t[e.toLowerCase()]=n.toLowerCase(),t["Webkit"+e]="webkit"+n,t["Moz"+e]="moz"+n,t}function je(e){if(Po[e])return Po[e];if(!No[e])return e;var n,t=No[e];for(n in t)if(t.hasOwnProperty(n)&&n in _o)return Po[e]=t[n];return e}function $e(e,n){Ro.set(e,n),r(n,[e])}function qe(e,n,t){var r=e.type||"unknown-event";e.currentTarget=t,W(r,n,void 0,e),e.currentTarget=null}function Ke(e,n){n=0!=(4&n);for(var t=0;t<e.length;t++){var r=e[t],l=r.event;r=r.listeners;e:{var a=void 0;if(n)for(var u=r.length-1;0<=u;u--){var o=r[u],i=o.instance,s=o.currentTarget;if(o=o.listener,i!==a&&l.isPropagationStopped())break e;qe(l,o,s),a=i}else for(u=0;u<r.length;u++){if(i=(o=r[u]).instance,s=o.currentTarget,o=o.listener,i!==a&&l.isPropagationStopped())break e;qe(l,o,s),a=i}}}if(Ja)throw e=eu,Ja=!1,eu=null,e}function Ye(e,n){var t=n[Go];void 0===t&&(t=n[Go]=new Set);var r=e+"__bubble";t.has(r)||(Ze(n,e,2,!1),t.add(r))}function Xe(e,n,t){var r=0;n&&(r|=4),Ze(t,e,r,n)}function Ge(e){if(!e[Uo]){e[Uo]=!0,ta.forEach((function(n){"selectionchange"!==n&&(Io.has(n)||Xe(n,!1,e),Xe(n,!0,e))}));var n=9===e.nodeType?e:e.ownerDocument;null===n||n[Uo]||(n[Uo]=!0,Xe("selectionchange",!1,n))}}function Ze(e,n,t,r,l){switch(he(n)){case 1:l=fe;break;case 4:l=de;break;default:l=pe}t=l.bind(null,n,t,e),l=void 0,!ja||"touchstart"!==n&&"touchmove"!==n&&"wheel"!==n||(l=!0),r?void 0!==l?e.addEventListener(n,t,{capture:!0,passive:l}):e.addEventListener(n,t,!0):void 0!==l?e.addEventListener(n,t,{passive:l}):e.addEventListener(n,t,!1)}function Je(e,n,t,r,l){var a=r;if(0==(1&n)&&0==(2&n)&&null!==r)e:for(;;){if(null===r)return;var u=r.tag;if(3===u||4===u){var o=r.stateNode.containerInfo;if(o===l||8===o.nodeType&&o.parentNode===l)break;if(4===u)for(u=r.return;null!==u;){var i=u.tag;if((3===i||4===i)&&((i=u.stateNode.containerInfo)===l||8===i.nodeType&&i.parentNode===l))return;u=u.return}for(;null!==o;){if(null===(u=pn(o)))return;if(5===(i=u.tag)||6===i){r=a=u;continue e}o=o.parentNode}}r=r.return}V((function(){var r=a,l=D(t),u=[];e:{var o=Ro.get(e);if(void 0!==o){var i=Au,s=e;switch(e){case"keypress":if(0===ve(t))break e;case"keydown":case"keyup":i=to;break;case"focusin":s="focus",i=$u;break;case"focusout":s="blur",i=$u;break;case"beforeblur":case"afterblur":i=$u;break;case"click":if(2===t.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":i=Qu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":i=ju;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":i=lo;break;case Lo:case To:case Mo:i=qu;break;case Fo:i=ao;break;case"scroll":i=Wu;break;case"wheel":i=oo;break;case"copy":case"cut":case"paste":i=Yu;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":i=ro}var c=0!=(4&n),f=!c&&"scroll"===e,d=c?null!==o?o+"Capture":null:o;c=[];for(var p,m=r;null!==m;){var h=(p=m).stateNode;if(5===p.tag&&null!==h&&(p=h,null!==d&&null!=(h=A(m,d))&&c.push(en(m,h,p))),f)break;m=m.return}0<c.length&&(o=new i(o,s,null,t,l),u.push({event:o,listeners:c}))}}if(0==(7&n)){if(i="mouseout"===e||"pointerout"===e,(!(o="mouseover"===e||"pointerover"===e)||t===Ua||!(s=t.relatedTarget||t.fromElement)||!pn(s)&&!s[Xo])&&(i||o)&&(o=l.window===l?l:(o=l.ownerDocument)?o.defaultView||o.parentWindow:window,i?(i=r,null!==(s=(s=t.relatedTarget||t.toElement)?pn(s):null)&&(s!==(f=H(s))||5!==s.tag&&6!==s.tag)&&(s=null)):(i=null,s=r),i!==s)){if(c=Qu,h="onMouseLeave",d="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(c=ro,h="onPointerLeave",d="onPointerEnter",m="pointer"),f=null==i?o:hn(i),p=null==s?o:hn(s),(o=new c(h,m+"leave",i,t,l)).target=f,o.relatedTarget=p,h=null,pn(l)===r&&((c=new c(d,m+"enter",s,t,l)).target=p,c.relatedTarget=f,h=c),f=h,i&&s)e:{for(d=s,m=0,p=c=i;p;p=tn(p))m++;for(p=0,h=d;h;h=tn(h))p++;for(;0<m-p;)c=tn(c),m--;for(;0<p-m;)d=tn(d),p--;for(;m--;){if(c===d||null!==d&&c===d.alternate)break e;c=tn(c),d=tn(d)}c=null}else c=null;null!==i&&rn(u,o,i,c,!1),null!==s&&null!==f&&rn(u,f,s,c,!0)}if("select"===(i=(o=r?hn(r):window).nodeName&&o.nodeName.toLowerCase())||"input"===i&&"file"===o.type)var g=_e;else if(Ce(o))if(ko)g=De;else{g=Fe;var v=Me}else(i=o.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(g=Re);switch(g&&(g=g(e,r))?ze(u,g,t,l):(v&&v(e,o,r),"focusout"===e&&(v=o._wrapperState)&&v.controlled&&"number"===o.type&&x(o,"number",o.value)),v=r?hn(r):window,e){case"focusin":(Ce(v)||"true"===v.contentEditable)&&(xo=v,Eo=r,Co=null);break;case"focusout":Co=Eo=xo=null;break;case"mousedown":zo=!0;break;case"contextmenu":case"mouseup":case"dragend":zo=!1,He(u,t,l);break;case"selectionchange":if(So)break;case"keydown":case"keyup":He(u,t,l)}var y;if(so)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else go?xe(e,t)&&(b="onCompositionEnd"):"keydown"===e&&229===t.keyCode&&(b="onCompositionStart");b&&(po&&"ko"!==t.locale&&(go||"onCompositionStart"!==b?"onCompositionEnd"===b&&go&&(y=ge()):(Iu="value"in(Ou=l)?Ou.value:Ou.textContent,go=!0)),0<(v=nn(r,b)).length&&(b=new Xu(b,e,null,t,l),u.push({event:b,listeners:v}),(y||null!==(y=Ee(t)))&&(b.data=y))),(y=fo?function(e,n){switch(e){case"compositionend":return Ee(n);case"keypress":return 32!==n.which?null:(ho=!0,mo);case"textInput":return(e=n.data)===mo&&ho?null:e;default:return null}}(e,t):function(e,n){if(go)return"compositionend"===e||!so&&xe(e,n)?(e=ge(),Uu=Iu=Ou=null,go=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return po&&"ko"!==n.locale?null:n.data}}(e,t))&&0<(r=nn(r,"onBeforeInput")).length&&(l=new Gu("onBeforeInput","beforeinput",null,t,l),u.push({event:l,listeners:r}),l.data=y)}Ke(u,n)}))}function en(e,n,t){return{instance:e,listener:n,currentTarget:t}}function nn(e,n){for(var t=n+"Capture",r=[];null!==e;){var l=e,a=l.stateNode;5===l.tag&&null!==a&&(l=a,null!=(a=A(e,t))&&r.unshift(en(e,a,l)),null!=(a=A(e,n))&&r.push(en(e,a,l))),e=e.return}return r}function tn(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function rn(e,n,t,r,l){for(var a=n._reactName,u=[];null!==t&&t!==r;){var o=t,i=o.alternate,s=o.stateNode;if(null!==i&&i===r)break;5===o.tag&&null!==s&&(o=s,l?null!=(i=A(t,a))&&u.unshift(en(t,i,o)):l||null!=(i=A(t,a))&&u.push(en(t,i,o))),t=t.return}0!==u.length&&e.push({event:n,listeners:u})}function ln(e){return("string"==typeof e?e:""+e).replace(Vo,"\n").replace(Ao,"")}function an(e,n,r,l){if(n=ln(n),ln(e)!==n&&r)throw Error(t(425))}function un(){}function on(e,n){return"textarea"===e||"noscript"===e||"string"==typeof n.children||"number"==typeof n.children||"object"==typeof n.dangerouslySetInnerHTML&&null!==n.dangerouslySetInnerHTML&&null!=n.dangerouslySetInnerHTML.__html}function sn(e){setTimeout((function(){throw e}))}function cn(e,n){var t=n,r=0;do{var l=t.nextSibling;if(e.removeChild(t),l&&8===l.nodeType)if("/$"===(t=l.data)){if(0===r)return e.removeChild(l),void ce(n);r--}else"$"!==t&&"$?"!==t&&"$!"!==t||r++;t=l}while(t);ce(n)}function fn(e){for(;null!=e;e=e.nextSibling){var n=e.nodeType;if(1===n||3===n)break;if(8===n){if("$"===(n=e.data)||"$!"===n||"$?"===n)break;if("/$"===n)return null}}return e}function dn(e){e=e.previousSibling;for(var n=0;e;){if(8===e.nodeType){var t=e.data;if("$"===t||"$!"===t||"$?"===t){if(0===n)return e;n--}else"/$"===t&&n++}e=e.previousSibling}return null}function pn(e){var n=e[Ko];if(n)return n;for(var t=e.parentNode;t;){if(n=t[Xo]||t[Ko]){if(t=n.alternate,null!==n.child||null!==t&&null!==t.child)for(e=dn(e);null!==e;){if(t=e[Ko])return t;e=dn(e)}return n}t=(e=t).parentNode}return null}function mn(e){return!(e=e[Ko]||e[Xo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function hn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(t(33))}function gn(e){return e[Yo]||null}function vn(e){return{current:e}}function yn(e,n){0>ni||(e.current=ei[ni],ei[ni]=null,ni--)}function bn(e,n,t){ni++,ei[ni]=e.current,e.current=n}function kn(e,n){var t=e.type.contextTypes;if(!t)return ti;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var l,a={};for(l in t)a[l]=n[l];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=a),a}function wn(e){return null!=(e=e.childContextTypes)}function Sn(e,n,r){if(ri.current!==ti)throw Error(t(168));bn(ri,n),bn(li,r)}function xn(e,n,r){var l=e.stateNode;if(n=n.childContextTypes,"function"!=typeof l.getChildContext)return r;for(var a in l=l.getChildContext())if(!(a in n))throw Error(t(108,d(e)||"Unknown",a));return La({},r,l)}function En(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ti,ai=ri.current,bn(ri,e),bn(li,li.current),!0}function Cn(e,n,r){var l=e.stateNode;if(!l)throw Error(t(169));r?(e=xn(e,n,ai),l.__reactInternalMemoizedMergedChildContext=e,yn(li),yn(ri),bn(ri,e)):yn(li),bn(li,r)}function zn(e){null===ui?ui=[e]:ui.push(e)}function Nn(){if(!ii&&null!==ui){ii=!0;var e=0,n=xu;try{var t=ui;for(xu=1;e<t.length;e++){var r=t[e];do{r=r(!0)}while(null!==r)}ui=null,oi=!1}catch(n){throw null!==ui&&(ui=ui.slice(e+1)),au(fu,Nn),n}finally{xu=n,ii=!1}}return null}function Pn(e,n){si[ci++]=di,si[ci++]=fi,fi=e,di=n}function _n(e,n,t){pi[mi++]=gi,pi[mi++]=vi,pi[mi++]=hi,hi=e;var r=gi;e=vi;var l=32-yu(r)-1;r&=~(1<<l),t+=1;var a=32-yu(n)+l;if(30<a){var u=l-l%5;a=(r&(1<<u)-1).toString(32),r>>=u,l-=u,gi=1<<32-yu(n)+l|t<<l|r,vi=a+e}else gi=1<<a|t<<l|r,vi=e}function Ln(e){null!==e.return&&(Pn(e,1),_n(e,1,0))}function Tn(e){for(;e===fi;)fi=si[--ci],si[ci]=null,di=si[--ci],si[ci]=null;for(;e===hi;)hi=pi[--mi],pi[mi]=null,vi=pi[--mi],pi[mi]=null,gi=pi[--mi],pi[mi]=null}function Mn(e,n){var t=$s(5,null,null,0);t.elementType="DELETED",t.stateNode=n,t.return=e,null===(n=e.deletions)?(e.deletions=[t],e.flags|=16):n.push(t)}function Fn(e,n){switch(e.tag){case 5:var t=e.type;return null!==(n=1!==n.nodeType||t.toLowerCase()!==n.nodeName.toLowerCase()?null:n)&&(e.stateNode=n,yi=e,bi=fn(n.firstChild),!0);case 6:return null!==(n=""===e.pendingProps||3!==n.nodeType?null:n)&&(e.stateNode=n,yi=e,bi=null,!0);case 13:return null!==(n=8!==n.nodeType?null:n)&&(t=null!==hi?{id:gi,overflow:vi}:null,e.memoizedState={dehydrated:n,treeContext:t,retryLane:1073741824},(t=$s(18,null,null,0)).stateNode=n,t.return=e,e.child=t,yi=e,bi=null,!0);default:return!1}}function Rn(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function Dn(e){if(ki){var n=bi;if(n){var r=n;if(!Fn(e,n)){if(Rn(e))throw Error(t(418));n=fn(r.nextSibling);var l=yi;n&&Fn(e,n)?Mn(l,r):(e.flags=-4097&e.flags|2,ki=!1,yi=e)}}else{if(Rn(e))throw Error(t(418));e.flags=-4097&e.flags|2,ki=!1,yi=e}}}function On(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;yi=e}function In(e){if(e!==yi)return!1;if(!ki)return On(e),ki=!0,!1;var n;if((n=3!==e.tag)&&!(n=5!==e.tag)&&(n="head"!==(n=e.type)&&"body"!==n&&!on(e.type,e.memoizedProps)),n&&(n=bi)){if(Rn(e)){for(e=bi;e;)e=fn(e.nextSibling);throw Error(t(418))}for(;n;)Mn(e,n),n=fn(n.nextSibling)}if(On(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(t(317));e:{for(e=e.nextSibling,n=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===n){bi=fn(e.nextSibling);break e}n--}else"$"!==r&&"$!"!==r&&"$?"!==r||n++}e=e.nextSibling}bi=null}}else bi=yi?fn(e.stateNode.nextSibling):null;return!0}function Un(){bi=yi=null,ki=!1}function Vn(e){null===wi?wi=[e]:wi.push(e)}function An(e,n){if(e&&e.defaultProps){for(var t in n=La({},n),e=e.defaultProps)void 0===n[t]&&(n[t]=e[t]);return n}return n}function Bn(){zi=Ci=Ei=null}function Wn(e,n){n=xi.current,yn(xi),e._currentValue=n}function Hn(e,n,t){for(;null!==e;){var r=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,null!==r&&(r.childLanes|=n)):null!==r&&(r.childLanes&n)!==n&&(r.childLanes|=n),e===t)break;e=e.return}}function Qn(e,n){Ei=e,zi=Ci=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&n)&&(ts=!0),e.firstContext=null)}function jn(e){var n=e._currentValue;if(zi!==e)if(e={context:e,memoizedValue:n,next:null},null===Ci){if(null===Ei)throw Error(t(308));Ci=e,Ei.dependencies={lanes:0,firstContext:e}}else Ci=Ci.next=e;return n}function $n(e){null===Ni?Ni=[e]:Ni.push(e)}function qn(e,n,t,r){var l=n.interleaved;return null===l?(t.next=t,$n(n)):(t.next=l.next,l.next=t),n.interleaved=t,Kn(e,r)}function Kn(e,n){e.lanes|=n;var t=e.alternate;for(null!==t&&(t.lanes|=n),t=e,e=e.return;null!==e;)e.childLanes|=n,null!==(t=e.alternate)&&(t.childLanes|=n),t=e,e=e.return;return 3===t.tag?t.stateNode:null}function Yn(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xn(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Gn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Zn(e,n,t){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&bs)){var l=r.pending;return null===l?n.next=n:(n.next=l.next,l.next=n),r.pending=n,Pi(e,t)}return null===(l=r.interleaved)?(n.next=n,$n(r)):(n.next=l.next,l.next=n),r.interleaved=n,Kn(e,t)}function Jn(e,n,t){if(null!==(n=n.updateQueue)&&(n=n.shared,0!=(4194240&t))){var r=n.lanes;t|=r&=e.pendingLanes,n.lanes=t,ne(e,t)}}function et(e,n){var t=e.updateQueue,r=e.alternate;if(null!==r&&t===(r=r.updateQueue)){var l=null,a=null;if(null!==(t=t.firstBaseUpdate)){do{var u={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};null===a?l=a=u:a=a.next=u,t=t.next}while(null!==t);null===a?l=a=n:a=a.next=n}else l=a=n;return t={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=t)}null===(e=t.lastBaseUpdate)?t.firstBaseUpdate=n:e.next=n,t.lastBaseUpdate=n}function nt(e,n,t,r){var l=e.updateQueue;_i=!1;var a=l.firstBaseUpdate,u=l.lastBaseUpdate,o=l.shared.pending;if(null!==o){l.shared.pending=null;var i=o,s=i.next;i.next=null,null===u?a=s:u.next=s,u=i;var c=e.alternate;null!==c&&(o=(c=c.updateQueue).lastBaseUpdate)!==u&&(null===o?c.firstBaseUpdate=s:o.next=s,c.lastBaseUpdate=i)}if(null!==a){var f=l.baseState;for(u=0,c=s=i=null,o=a;;){var d=o.lane,p=o.eventTime;if((r&d)===d){null!==c&&(c=c.next={eventTime:p,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var m=e,h=o;switch(d=n,p=t,h.tag){case 1:if("function"==typeof(m=h.payload)){f=m.call(p,f,d);break e}f=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(d="function"==typeof(m=h.payload)?m.call(p,f,d):m))break e;f=La({},f,d);break e;case 2:_i=!0}}null!==o.callback&&0!==o.lane&&(e.flags|=64,null===(d=l.effects)?l.effects=[o]:d.push(o))}else p={eventTime:p,lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===c?(s=c=p,i=f):c=c.next=p,u|=d;if(null===(o=o.next)){if(null===(o=l.shared.pending))break;o=(d=o).next,d.next=null,l.lastBaseUpdate=d,l.shared.pending=null}}if(null===c&&(i=f),l.baseState=i,l.firstBaseUpdate=s,l.lastBaseUpdate=c,null!==(n=l.shared.interleaved)){l=n;do{u|=l.lane,l=l.next}while(l!==n)}else null===a&&(l.shared.lanes=0);Ns|=u,e.lanes=u,e.memoizedState=f}}function tt(e,n,r){if(e=n.effects,n.effects=null,null!==e)for(n=0;n<e.length;n++){var l=e[n],a=l.callback;if(null!==a){if(l.callback=null,l=r,"function"!=typeof a)throw Error(t(191,a));a.call(l)}}}function rt(e,n,t,r){t=null==(t=t(r,n=e.memoizedState))?n:La({},n,t),e.memoizedState=t,0===e.lanes&&(e.updateQueue.baseState=t)}function lt(e,n,t,r,l,a,u){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,u):!(n.prototype&&n.prototype.isPureReactComponent&&Oe(t,r)&&Oe(l,a))}function at(e,n,t){var r=!1,l=ti,a=n.contextType;return"object"==typeof a&&null!==a?a=jn(a):(l=wn(n)?ai:ri.current,a=(r=null!=(r=n.contextTypes))?kn(e,l):ti),n=new n(t,a),e.memoizedState=null!==n.state&&void 0!==n.state?n.state:null,n.updater=Ti,e.stateNode=n,n._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=a),n}function ut(e,n,t,r){e=n.state,"function"==typeof n.componentWillReceiveProps&&n.componentWillReceiveProps(t,r),"function"==typeof n.UNSAFE_componentWillReceiveProps&&n.UNSAFE_componentWillReceiveProps(t,r),n.state!==e&&Ti.enqueueReplaceState(n,n.state,null)}function ot(e,n,t,r){var l=e.stateNode;l.props=t,l.state=e.memoizedState,l.refs=Li,Yn(e);var a=n.contextType;"object"==typeof a&&null!==a?l.context=jn(a):(a=wn(n)?ai:ri.current,l.context=kn(e,a)),l.state=e.memoizedState,"function"==typeof(a=n.getDerivedStateFromProps)&&(rt(e,n,a,t),l.state=e.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||(n=l.state,"function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount(),n!==l.state&&Ti.enqueueReplaceState(l,l.state,null),nt(e,t,l,r),l.state=e.memoizedState),"function"==typeof l.componentDidMount&&(e.flags|=4194308)}function it(e,n,r){if(null!==(e=r.ref)&&"function"!=typeof e&&"object"!=typeof e){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(t(309));var l=r.stateNode}if(!l)throw Error(t(147,e));var a=l,u=""+e;return null!==n&&null!==n.ref&&"function"==typeof n.ref&&n.ref._stringRef===u?n.ref:(n=function(e){var n=a.refs;n===Li&&(n=a.refs={}),null===e?delete n[u]:n[u]=e},n._stringRef=u,n)}if("string"!=typeof e)throw Error(t(284));if(!r._owner)throw Error(t(290,e))}return e}function st(e,n){throw e=Object.prototype.toString.call(n),Error(t(31,"[object Object]"===e?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function ct(e){return(0,e._init)(e._payload)}function ft(e){function n(n,t){if(e){var r=n.deletions;null===r?(n.deletions=[t],n.flags|=16):r.push(t)}}function r(t,r){if(!e)return null;for(;null!==r;)n(t,r),r=r.sibling;return null}function l(e,n){for(e=new Map;null!==n;)null!==n.key?e.set(n.key,n):e.set(n.index,n),n=n.sibling;return e}function a(e,n){return(e=Rl(e,n)).index=0,e.sibling=null,e}function u(n,t,r){return n.index=r,e?null!==(r=n.alternate)?(r=r.index)<t?(n.flags|=2,t):r:(n.flags|=2,t):(n.flags|=1048576,t)}function i(n){return e&&null===n.alternate&&(n.flags|=2),n}function s(e,n,t,r){return null===n||6!==n.tag?((n=Ul(t,e.mode,r)).return=e,n):((n=a(n,t)).return=e,n)}function c(e,n,t,r){var l=t.type;return l===ha?d(e,n,t.props.children,r,t.key):null!==n&&(n.elementType===l||"object"==typeof l&&null!==l&&l.$$typeof===Ea&&ct(l)===n.type)?((r=a(n,t.props)).ref=it(e,n,t),r.return=e,r):((r=Dl(t.type,t.key,t.props,null,e.mode,r)).ref=it(e,n,t),r.return=e,r)}function f(e,n,t,r){return null===n||4!==n.tag||n.stateNode.containerInfo!==t.containerInfo||n.stateNode.implementation!==t.implementation?((n=Vl(t,e.mode,r)).return=e,n):((n=a(n,t.children||[])).return=e,n)}function d(e,n,t,r,l){return null===n||7!==n.tag?((n=Ol(t,e.mode,r,l)).return=e,n):((n=a(n,t)).return=e,n)}function p(e,n,t){if("string"==typeof n&&""!==n||"number"==typeof n)return(n=Ul(""+n,e.mode,t)).return=e,n;if("object"==typeof n&&null!==n){switch(n.$$typeof){case pa:return(t=Dl(n.type,n.key,n.props,null,e.mode,t)).ref=it(e,null,n),t.return=e,t;case ma:return(n=Vl(n,e.mode,t)).return=e,n;case Ea:return p(e,(0,n._init)(n._payload),t)}if(Ma(n)||o(n))return(n=Ol(n,e.mode,t,null)).return=e,n;st(e,n)}return null}function m(e,n,t,r){var l=null!==n?n.key:null;if("string"==typeof t&&""!==t||"number"==typeof t)return null!==l?null:s(e,n,""+t,r);if("object"==typeof t&&null!==t){switch(t.$$typeof){case pa:return t.key===l?c(e,n,t,r):null;case ma:return t.key===l?f(e,n,t,r):null;case Ea:return m(e,n,(l=t._init)(t._payload),r)}if(Ma(t)||o(t))return null!==l?null:d(e,n,t,r,null);st(e,t)}return null}function h(e,n,t,r,l){if("string"==typeof r&&""!==r||"number"==typeof r)return s(n,e=e.get(t)||null,""+r,l);if("object"==typeof r&&null!==r){switch(r.$$typeof){case pa:return c(n,e=e.get(null===r.key?t:r.key)||null,r,l);case ma:return f(n,e=e.get(null===r.key?t:r.key)||null,r,l);case Ea:return h(e,n,t,(0,r._init)(r._payload),l)}if(Ma(r)||o(r))return d(n,e=e.get(t)||null,r,l,null);st(n,r)}return null}function g(t,a,o,i){for(var s=null,c=null,f=a,d=a=0,g=null;null!==f&&d<o.length;d++){f.index>d?(g=f,f=null):g=f.sibling;var v=m(t,f,o[d],i);if(null===v){null===f&&(f=g);break}e&&f&&null===v.alternate&&n(t,f),a=u(v,a,d),null===c?s=v:c.sibling=v,c=v,f=g}if(d===o.length)return r(t,f),ki&&Pn(t,d),s;if(null===f){for(;d<o.length;d++)null!==(f=p(t,o[d],i))&&(a=u(f,a,d),null===c?s=f:c.sibling=f,c=f);return ki&&Pn(t,d),s}for(f=l(t,f);d<o.length;d++)null!==(g=h(f,t,d,o[d],i))&&(e&&null!==g.alternate&&f.delete(null===g.key?d:g.key),a=u(g,a,d),null===c?s=g:c.sibling=g,c=g);return e&&f.forEach((function(e){return n(t,e)})),ki&&Pn(t,d),s}function v(a,i,s,c){var f=o(s);if("function"!=typeof f)throw Error(t(150));if(null==(s=f.call(s)))throw Error(t(151));for(var d=f=null,g=i,v=i=0,y=null,b=s.next();null!==g&&!b.done;v++,b=s.next()){g.index>v?(y=g,g=null):y=g.sibling;var k=m(a,g,b.value,c);if(null===k){null===g&&(g=y);break}e&&g&&null===k.alternate&&n(a,g),i=u(k,i,v),null===d?f=k:d.sibling=k,d=k,g=y}if(b.done)return r(a,g),ki&&Pn(a,v),f;if(null===g){for(;!b.done;v++,b=s.next())null!==(b=p(a,b.value,c))&&(i=u(b,i,v),null===d?f=b:d.sibling=b,d=b);return ki&&Pn(a,v),f}for(g=l(a,g);!b.done;v++,b=s.next())null!==(b=h(g,a,v,b.value,c))&&(e&&null!==b.alternate&&g.delete(null===b.key?v:b.key),i=u(b,i,v),null===d?f=b:d.sibling=b,d=b);return e&&g.forEach((function(e){return n(a,e)})),ki&&Pn(a,v),f}return function e(t,l,u,s){if("object"==typeof u&&null!==u&&u.type===ha&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case pa:e:{for(var c=u.key,f=l;null!==f;){if(f.key===c){if((c=u.type)===ha){if(7===f.tag){r(t,f.sibling),(l=a(f,u.props.children)).return=t,t=l;break e}}else if(f.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===Ea&&ct(c)===f.type){r(t,f.sibling),(l=a(f,u.props)).ref=it(t,f,u),l.return=t,t=l;break e}r(t,f);break}n(t,f),f=f.sibling}u.type===ha?((l=Ol(u.props.children,t.mode,s,u.key)).return=t,t=l):((s=Dl(u.type,u.key,u.props,null,t.mode,s)).ref=it(t,l,u),s.return=t,t=s)}return i(t);case ma:e:{for(f=u.key;null!==l;){if(l.key===f){if(4===l.tag&&l.stateNode.containerInfo===u.containerInfo&&l.stateNode.implementation===u.implementation){r(t,l.sibling),(l=a(l,u.children||[])).return=t,t=l;break e}r(t,l);break}n(t,l),l=l.sibling}(l=Vl(u,t.mode,s)).return=t,t=l}return i(t);case Ea:return e(t,l,(f=u._init)(u._payload),s)}if(Ma(u))return g(t,l,u,s);if(o(u))return v(t,l,u,s);st(t,u)}return"string"==typeof u&&""!==u||"number"==typeof u?(u=""+u,null!==l&&6===l.tag?(r(t,l.sibling),(l=a(l,u)).return=t,t=l):(r(t,l),(l=Ul(u,t.mode,s)).return=t,t=l),i(t)):r(t,l)}}function dt(e){if(e===Ri)throw Error(t(174));return e}function pt(e,n){switch(bn(Ii,n),bn(Oi,e),bn(Di,Ri),e=n.nodeType){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:L(null,"");break;default:n=L(n=(e=8===e?n.parentNode:n).namespaceURI||null,e=e.tagName)}yn(Di),bn(Di,n)}function mt(e){yn(Di),yn(Oi),yn(Ii)}function ht(e){dt(Ii.current);var n=dt(Di.current),t=L(n,e.type);n!==t&&(bn(Oi,e),bn(Di,t))}function gt(e){Oi.current===e&&(yn(Di),yn(Oi))}function vt(e){for(var n=e;null!==n;){if(13===n.tag){var t=n.memoizedState;if(null!==t&&(null===(t=t.dehydrated)||"$?"===t.data||"$!"===t.data))return n}else if(19===n.tag&&void 0!==n.memoizedProps.revealOrder){if(0!=(128&n.flags))return n}else if(null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function yt(){for(var e=0;e<Vi.length;e++)Vi[e]._workInProgressVersionPrimary=null;Vi.length=0}function bt(){throw Error(t(321))}function kt(e,n){if(null===n)return!1;for(var t=0;t<n.length&&t<e.length;t++)if(!wo(e[t],n[t]))return!1;return!0}function wt(e,n,r,l,a,u){if(Wi=u,Hi=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Ai.current=null===e||null===e.memoizedState?Gi:Zi,e=r(l,a),qi){u=0;do{if(qi=!1,Ki=0,25<=u)throw Error(t(301));u+=1,ji=Qi=null,n.updateQueue=null,Ai.current=Ji,e=r(l,a)}while(qi)}if(Ai.current=Xi,n=null!==Qi&&null!==Qi.next,Wi=0,ji=Qi=Hi=null,$i=!1,n)throw Error(t(300));return e}function St(){var e=0!==Ki;return Ki=0,e}function xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ji?Hi.memoizedState=ji=e:ji=ji.next=e,ji}function Et(){if(null===Qi){var e=Hi.alternate;e=null!==e?e.memoizedState:null}else e=Qi.next;var n=null===ji?Hi.memoizedState:ji.next;if(null!==n)ji=n,Qi=e;else{if(null===e)throw Error(t(310));e={memoizedState:(Qi=e).memoizedState,baseState:Qi.baseState,baseQueue:Qi.baseQueue,queue:Qi.queue,next:null},null===ji?Hi.memoizedState=ji=e:ji=ji.next=e}return ji}function Ct(e,n){return"function"==typeof n?n(e):n}function zt(e,n,r){if(null===(r=(n=Et()).queue))throw Error(t(311));r.lastRenderedReducer=e;var l=Qi,a=l.baseQueue,u=r.pending;if(null!==u){if(null!==a){var o=a.next;a.next=u.next,u.next=o}l.baseQueue=a=u,r.pending=null}if(null!==a){u=a.next,l=l.baseState;var i=o=null,s=null,c=u;do{var f=c.lane;if((Wi&f)===f)null!==s&&(s=s.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),l=c.hasEagerState?c.eagerState:e(l,c.action);else{var d={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===s?(i=s=d,o=l):s=s.next=d,Hi.lanes|=f,Ns|=f}c=c.next}while(null!==c&&c!==u);null===s?o=l:s.next=i,wo(l,n.memoizedState)||(ts=!0),n.memoizedState=l,n.baseState=o,n.baseQueue=s,r.lastRenderedState=l}if(null!==(e=r.interleaved)){a=e;do{u=a.lane,Hi.lanes|=u,Ns|=u,a=a.next}while(a!==e)}else null===a&&(r.lanes=0);return[n.memoizedState,r.dispatch]}function Nt(e,n,r){if(null===(r=(n=Et()).queue))throw Error(t(311));r.lastRenderedReducer=e;var l=r.dispatch,a=r.pending,u=n.memoizedState;if(null!==a){r.pending=null;var o=a=a.next;do{u=e(u,o.action),o=o.next}while(o!==a);wo(u,n.memoizedState)||(ts=!0),n.memoizedState=u,null===n.baseQueue&&(n.baseState=u),r.lastRenderedState=u}return[u,l]}function Pt(e,n,t){}function _t(e,n,r){r=Hi;var l=Et(),a=n(),u=!wo(l.memoizedState,a);if(u&&(l.memoizedState=a,ts=!0),l=l.queue,Bt(Mt.bind(null,r,l,e),[e]),l.getSnapshot!==n||u||null!==ji&&1&ji.memoizedState.tag){if(r.flags|=2048,Ot(9,Tt.bind(null,r,l,a,n),void 0,null),null===ks)throw Error(t(349));0!=(30&Wi)||Lt(r,n,a)}return a}function Lt(e,n,t){e.flags|=16384,e={getSnapshot:n,value:t},null===(n=Hi.updateQueue)?(n={lastEffect:null,stores:null},Hi.updateQueue=n,n.stores=[e]):null===(t=n.stores)?n.stores=[e]:t.push(e)}function Tt(e,n,t,r){n.value=t,n.getSnapshot=r,Ft(n)&&Rt(e)}function Mt(e,n,t){return t((function(){Ft(n)&&Rt(e)}))}function Ft(e){var n=e.getSnapshot;e=e.value;try{var t=n();return!wo(e,t)}catch(e){return!0}}function Rt(e){var n=Kn(e,1);null!==n&&al(n,e,1,-1)}function Dt(e){var n=xt();return"function"==typeof e&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ct,lastRenderedState:e},n.queue=e,e=e.dispatch=Jt.bind(null,Hi,e),[n.memoizedState,e]}function Ot(e,n,t,r){return e={tag:e,create:n,destroy:t,deps:r,next:null},null===(n=Hi.updateQueue)?(n={lastEffect:null,stores:null},Hi.updateQueue=n,n.lastEffect=e.next=e):null===(t=n.lastEffect)?n.lastEffect=e.next=e:(r=t.next,t.next=e,e.next=r,n.lastEffect=e),e}function It(e){return Et().memoizedState}function Ut(e,n,t,r){var l=xt();Hi.flags|=e,l.memoizedState=Ot(1|n,t,void 0,void 0===r?null:r)}function Vt(e,n,t,r){var l=Et();r=void 0===r?null:r;var a=void 0;if(null!==Qi){var u=Qi.memoizedState;if(a=u.destroy,null!==r&&kt(r,u.deps))return void(l.memoizedState=Ot(n,t,a,r))}Hi.flags|=e,l.memoizedState=Ot(1|n,t,a,r)}function At(e,n){return Ut(8390656,8,e,n)}function Bt(e,n){return Vt(2048,8,e,n)}function Wt(e,n){return Vt(4,2,e,n)}function Ht(e,n){return Vt(4,4,e,n)}function Qt(e,n){return"function"==typeof n?(e=e(),n(e),function(){n(null)}):null!=n?(e=e(),n.current=e,function(){n.current=null}):void 0}function jt(e,n,t){return t=null!=t?t.concat([e]):null,Vt(4,4,Qt.bind(null,n,e),t)}function $t(e,n){}function qt(e,n){var t=Et();n=void 0===n?null:n;var r=t.memoizedState;return null!==r&&null!==n&&kt(n,r[1])?r[0]:(t.memoizedState=[e,n],e)}function Kt(e,n){var t=Et();n=void 0===n?null:n;var r=t.memoizedState;return null!==r&&null!==n&&kt(n,r[1])?r[0]:(e=e(),t.memoizedState=[e,n],e)}function Yt(e,n,t){return 0==(21&Wi)?(e.baseState&&(e.baseState=!1,ts=!0),e.memoizedState=t):(wo(t,n)||(t=Z(),Hi.lanes|=t,Ns|=t,e.baseState=!0),n)}function Xt(e,n,t){xu=0!==(t=xu)&&4>t?t:4,e(!0);var r=Bi.transition;Bi.transition={};try{e(!1),n()}finally{xu=t,Bi.transition=r}}function Gt(){return Et().memoizedState}function Zt(e,n,t){var r=ll(e);t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},er(e)?nr(n,t):null!==(t=qn(e,n,t,r))&&(al(t,e,r,rl()),tr(t,n,r))}function Jt(e,n,t){var r=ll(e),l={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(er(e))nr(n,l);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=n.lastRenderedReducer))try{var u=n.lastRenderedState,o=a(u,t);if(l.hasEagerState=!0,l.eagerState=o,wo(o,u)){var i=n.interleaved;return null===i?(l.next=l,$n(n)):(l.next=i.next,i.next=l),void(n.interleaved=l)}}catch(e){}null!==(t=qn(e,n,l,r))&&(al(t,e,r,l=rl()),tr(t,n,r))}}function er(e){var n=e.alternate;return e===Hi||null!==n&&n===Hi}function nr(e,n){qi=$i=!0;var t=e.pending;null===t?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function tr(e,n,t){if(0!=(4194240&t)){var r=n.lanes;t|=r&=e.pendingLanes,n.lanes=t,ne(e,t)}}function rr(e,n){try{var t="",r=n;do{t+=c(r),r=r.return}while(r);var l=t}catch(e){l="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:n,stack:l,digest:null}}function lr(e,n,t){return{value:e,source:null,stack:null!=t?t:null,digest:null!=n?n:null}}function ar(e,n){try{console.error(n.value)}catch(e){setTimeout((function(){throw e}))}}function ur(e,n,t){(t=Gn(-1,t)).tag=3,t.payload={element:null};var r=n.value;return t.callback=function(){Ds||(Ds=!0,Os=r),ar(0,n)},t}function or(e,n,t){(t=Gn(-1,t)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var l=n.value;t.payload=function(){return r(l)},t.callback=function(){ar(0,n)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(t.callback=function(){ar(0,n),"function"!=typeof r&&(null===Is?Is=new Set([this]):Is.add(this));var e=n.stack;this.componentDidCatch(n.value,{componentStack:null!==e?e:""})}),t}function ir(e,n,t){var r=e.pingCache;if(null===r){r=e.pingCache=new es;var l=new Set;r.set(n,l)}else void 0===(l=r.get(n))&&(l=new Set,r.set(n,l));l.has(t)||(l.add(t),e=Nl.bind(null,e,n,t),n.then(e,e))}function sr(e){do{var n;if((n=13===e.tag)&&(n=null===(n=e.memoizedState)||null!==n.dehydrated),n)return e;e=e.return}while(null!==e);return null}function cr(e,n,t,r,l){return 0==(1&e.mode)?(e===n?e.flags|=65536:(e.flags|=128,t.flags|=131072,t.flags&=-52805,1===t.tag&&(null===t.alternate?t.tag=17:((n=Gn(-1,1)).tag=2,Zn(t,n,1))),t.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}function fr(e,n,t,r){n.child=null===e?Fi(n,null,t,r):Mi(n,e.child,t,r)}function dr(e,n,t,r,l){t=t.render;var a=n.ref;return Qn(n,l),r=wt(e,n,t,r,a,l),t=St(),null===e||ts?(ki&&t&&Ln(n),n.flags|=1,fr(e,n,r,l),n.child):(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l,Lr(e,n,l))}function pr(e,n,t,r,l){if(null===e){var a=t.type;return"function"!=typeof a||Fl(a)||void 0!==a.defaultProps||null!==t.compare||void 0!==t.defaultProps?((e=Dl(t.type,null,r,n,n.mode,l)).ref=n.ref,e.return=n,n.child=e):(n.tag=15,n.type=a,mr(e,n,a,r,l))}if(a=e.child,0==(e.lanes&l)){var u=a.memoizedProps;if((t=null!==(t=t.compare)?t:Oe)(u,r)&&e.ref===n.ref)return Lr(e,n,l)}return n.flags|=1,(e=Rl(a,r)).ref=n.ref,e.return=n,n.child=e}function mr(e,n,t,r,l){if(null!==e){var a=e.memoizedProps;if(Oe(a,r)&&e.ref===n.ref){if(ts=!1,n.pendingProps=r=a,0==(e.lanes&l))return n.lanes=e.lanes,Lr(e,n,l);0!=(131072&e.flags)&&(ts=!0)}}return vr(e,n,t,r,l)}function hr(e,n,t){var r=n.pendingProps,l=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&n.mode))n.memoizedState={baseLanes:0,cachePool:null,transitions:null},bn(Es,xs),xs|=t;else{if(0==(1073741824&t))return e=null!==a?a.baseLanes|t:t,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,bn(Es,xs),xs|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:t,bn(Es,xs),xs|=r}else null!==a?(r=a.baseLanes|t,n.memoizedState=null):r=t,bn(Es,xs),xs|=r;return fr(e,n,l,t),n.child}function gr(e,n){var t=n.ref;(null===e&&null!==t||null!==e&&e.ref!==t)&&(n.flags|=512,n.flags|=2097152)}function vr(e,n,t,r,l){var a=wn(t)?ai:ri.current;return a=kn(n,a),Qn(n,l),t=wt(e,n,t,r,a,l),r=St(),null===e||ts?(ki&&r&&Ln(n),n.flags|=1,fr(e,n,t,l),n.child):(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l,Lr(e,n,l))}function yr(e,n,t,r,l){if(wn(t)){var a=!0;En(n)}else a=!1;if(Qn(n,l),null===n.stateNode)_r(e,n),at(n,t,r),ot(n,t,r,l),r=!0;else if(null===e){var u=n.stateNode,o=n.memoizedProps;u.props=o;var i=u.context,s=t.contextType;s="object"==typeof s&&null!==s?jn(s):kn(n,s=wn(t)?ai:ri.current);var c=t.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof u.getSnapshotBeforeUpdate;f||"function"!=typeof u.UNSAFE_componentWillReceiveProps&&"function"!=typeof u.componentWillReceiveProps||(o!==r||i!==s)&&ut(n,u,r,s),_i=!1;var d=n.memoizedState;u.state=d,nt(n,r,u,l),i=n.memoizedState,o!==r||d!==i||li.current||_i?("function"==typeof c&&(rt(n,t,c,r),i=n.memoizedState),(o=_i||lt(n,t,o,r,d,i,s))?(f||"function"!=typeof u.UNSAFE_componentWillMount&&"function"!=typeof u.componentWillMount||("function"==typeof u.componentWillMount&&u.componentWillMount(),"function"==typeof u.UNSAFE_componentWillMount&&u.UNSAFE_componentWillMount()),"function"==typeof u.componentDidMount&&(n.flags|=4194308)):("function"==typeof u.componentDidMount&&(n.flags|=4194308),n.memoizedProps=r,n.memoizedState=i),u.props=r,u.state=i,u.context=s,r=o):("function"==typeof u.componentDidMount&&(n.flags|=4194308),r=!1)}else{u=n.stateNode,Xn(e,n),o=n.memoizedProps,s=n.type===n.elementType?o:An(n.type,o),u.props=s,f=n.pendingProps,d=u.context,i="object"==typeof(i=t.contextType)&&null!==i?jn(i):kn(n,i=wn(t)?ai:ri.current);var p=t.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof u.getSnapshotBeforeUpdate)||"function"!=typeof u.UNSAFE_componentWillReceiveProps&&"function"!=typeof u.componentWillReceiveProps||(o!==f||d!==i)&&ut(n,u,r,i),_i=!1,d=n.memoizedState,u.state=d,nt(n,r,u,l);var m=n.memoizedState;o!==f||d!==m||li.current||_i?("function"==typeof p&&(rt(n,t,p,r),m=n.memoizedState),(s=_i||lt(n,t,s,r,d,m,i)||!1)?(c||"function"!=typeof u.UNSAFE_componentWillUpdate&&"function"!=typeof u.componentWillUpdate||("function"==typeof u.componentWillUpdate&&u.componentWillUpdate(r,m,i),"function"==typeof u.UNSAFE_componentWillUpdate&&u.UNSAFE_componentWillUpdate(r,m,i)),"function"==typeof u.componentDidUpdate&&(n.flags|=4),"function"==typeof u.getSnapshotBeforeUpdate&&(n.flags|=1024)):("function"!=typeof u.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(n.flags|=4),"function"!=typeof u.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(n.flags|=1024),n.memoizedProps=r,n.memoizedState=m),u.props=r,u.state=m,u.context=i,r=s):("function"!=typeof u.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(n.flags|=4),"function"!=typeof u.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(n.flags|=1024),r=!1)}return br(e,n,t,r,a,l)}function br(e,n,t,r,l,a){gr(e,n);var u=0!=(128&n.flags);if(!r&&!u)return l&&Cn(n,t,!1),Lr(e,n,a);r=n.stateNode,ns.current=n;var o=u&&"function"!=typeof t.getDerivedStateFromError?null:r.render();return n.flags|=1,null!==e&&u?(n.child=Mi(n,e.child,null,a),n.child=Mi(n,null,o,a)):fr(e,n,o,a),n.memoizedState=r.state,l&&Cn(n,t,!0),n.child}function kr(e){var n=e.stateNode;n.pendingContext?Sn(0,n.pendingContext,n.pendingContext!==n.context):n.context&&Sn(0,n.context,!1),pt(e,n.containerInfo)}function wr(e,n,t,r,l){return Un(),Vn(l),n.flags|=256,fr(e,n,t,r),n.child}function Sr(e){return{baseLanes:e,cachePool:null,transitions:null}}function xr(e,n,r){var l,a=n.pendingProps,u=Ui.current,o=!1,i=0!=(128&n.flags);if((l=i)||(l=(null===e||null!==e.memoizedState)&&0!=(2&u)),l?(o=!0,n.flags&=-129):null!==e&&null===e.memoizedState||(u|=1),bn(Ui,1&u),null===e)return Dn(n),null!==(e=n.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&n.mode)?n.lanes=1:"$!"===e.data?n.lanes=8:n.lanes=1073741824,null):(i=a.children,e=a.fallback,o?(a=n.mode,o=n.child,i={mode:"hidden",children:i},0==(1&a)&&null!==o?(o.childLanes=0,o.pendingProps=i):o=Il(i,a,0,null),e=Ol(e,a,r,null),o.return=n,e.return=n,o.sibling=e,n.child=o,n.child.memoizedState=Sr(r),n.memoizedState=rs,e):Er(n,i));if(null!==(u=e.memoizedState)&&null!==(l=u.dehydrated))return function(e,n,r,l,a,u,o){if(r)return 256&n.flags?(n.flags&=-257,Cr(e,n,o,l=lr(Error(t(422))))):null!==n.memoizedState?(n.child=e.child,n.flags|=128,null):(u=l.fallback,a=n.mode,l=Il({mode:"visible",children:l.children},a,0,null),(u=Ol(u,a,o,null)).flags|=2,l.return=n,u.return=n,l.sibling=u,n.child=l,0!=(1&n.mode)&&Mi(n,e.child,null,o),n.child.memoizedState=Sr(o),n.memoizedState=rs,u);if(0==(1&n.mode))return Cr(e,n,o,null);if("$!"===a.data){if(l=a.nextSibling&&a.nextSibling.dataset)var i=l.dgst;return l=i,Cr(e,n,o,l=lr(u=Error(t(419)),l,void 0))}if(i=0!=(o&e.childLanes),ts||i){if(null!==(l=ks)){switch(o&-o){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}0!==(a=0!=(a&(l.suspendedLanes|o))?0:a)&&a!==u.retryLane&&(u.retryLane=a,Kn(e,a),al(l,e,a,-1))}return vl(),Cr(e,n,o,l=lr(Error(t(421))))}return"$?"===a.data?(n.flags|=128,n.child=e.child,n=_l.bind(null,e),a._reactRetry=n,null):(e=u.treeContext,bi=fn(a.nextSibling),yi=n,ki=!0,wi=null,null!==e&&(pi[mi++]=gi,pi[mi++]=vi,pi[mi++]=hi,gi=e.id,vi=e.overflow,hi=n),(n=Er(n,l.children)).flags|=4096,n)}(e,n,i,a,l,u,r);if(o){o=a.fallback,i=n.mode,l=(u=e.child).sibling;var s={mode:"hidden",children:a.children};return 0==(1&i)&&n.child!==u?((a=n.child).childLanes=0,a.pendingProps=s,n.deletions=null):(a=Rl(u,s)).subtreeFlags=14680064&u.subtreeFlags,null!==l?o=Rl(l,o):(o=Ol(o,i,r,null)).flags|=2,o.return=n,a.return=n,a.sibling=o,n.child=a,a=o,o=n.child,i=null===(i=e.child.memoizedState)?Sr(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~r,n.memoizedState=rs,a}return e=(o=e.child).sibling,a=Rl(o,{mode:"visible",children:a.children}),0==(1&n.mode)&&(a.lanes=r),a.return=n,a.sibling=null,null!==e&&(null===(r=n.deletions)?(n.deletions=[e],n.flags|=16):r.push(e)),n.child=a,n.memoizedState=null,a}function Er(e,n,t){return(n=Il({mode:"visible",children:n},e.mode,0,null)).return=e,e.child=n}function Cr(e,n,t,r){return null!==r&&Vn(r),Mi(n,e.child,null,t),(e=Er(n,n.pendingProps.children)).flags|=2,n.memoizedState=null,e}function zr(e,n,t){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n),Hn(e.return,n,t)}function Nr(e,n,t,r,l){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:r,tail:t,tailMode:l}:(a.isBackwards=n,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=t,a.tailMode=l)}function Pr(e,n,t){var r=n.pendingProps,l=r.revealOrder,a=r.tail;if(fr(e,n,r.children,t),0!=(2&(r=Ui.current)))r=1&r|2,n.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=n.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&zr(e,t,n);else if(19===e.tag)zr(e,t,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(bn(Ui,r),0==(1&n.mode))n.memoizedState=null;else switch(l){case"forwards":for(t=n.child,l=null;null!==t;)null!==(e=t.alternate)&&null===vt(e)&&(l=t),t=t.sibling;null===(t=l)?(l=n.child,n.child=null):(l=t.sibling,t.sibling=null),Nr(n,!1,l,t,a);break;case"backwards":for(t=null,l=n.child,n.child=null;null!==l;){if(null!==(e=l.alternate)&&null===vt(e)){n.child=l;break}e=l.sibling,l.sibling=t,t=l,l=e}Nr(n,!0,t,null,a);break;case"together":Nr(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function _r(e,n){0==(1&n.mode)&&null!==e&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Lr(e,n,r){if(null!==e&&(n.dependencies=e.dependencies),Ns|=n.lanes,0==(r&n.childLanes))return null;if(null!==e&&n.child!==e.child)throw Error(t(153));if(null!==n.child){for(r=Rl(e=n.child,e.pendingProps),n.child=r,r.return=n;null!==e.sibling;)e=e.sibling,(r=r.sibling=Rl(e,e.pendingProps)).return=n;r.sibling=null}return n.child}function Tr(e,n){if(!ki)switch(e.tailMode){case"hidden":n=e.tail;for(var t=null;null!==n;)null!==n.alternate&&(t=n),n=n.sibling;null===t?e.tail=null:t.sibling=null;break;case"collapsed":t=e.tail;for(var r=null;null!==t;)null!==t.alternate&&(r=t),t=t.sibling;null===r?n||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Mr(e){var n=null!==e.alternate&&e.alternate.child===e.child,t=0,r=0;if(n)for(var l=e.child;null!==l;)t|=l.lanes|l.childLanes,r|=14680064&l.subtreeFlags,r|=14680064&l.flags,l.return=e,l=l.sibling;else for(l=e.child;null!==l;)t|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=t,n}function Fr(e,n,r){var l=n.pendingProps;switch(Tn(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mr(n),null;case 1:case 17:return wn(n.type)&&(yn(li),yn(ri)),Mr(n),null;case 3:return l=n.stateNode,mt(),yn(li),yn(ri),yt(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),null!==e&&null!==e.child||(In(n)?n.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&n.flags)||(n.flags|=1024,null!==wi&&(sl(wi),wi=null))),as(e,n),Mr(n),null;case 5:gt(n);var a=dt(Ii.current);if(r=n.type,null!==e&&null!=n.stateNode)us(e,n,r,l,a),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!l){if(null===n.stateNode)throw Error(t(166));return Mr(n),null}if(e=dt(Di.current),In(n)){l=n.stateNode,r=n.type;var o=n.memoizedProps;switch(l[Ko]=n,l[Yo]=o,e=0!=(1&n.mode),r){case"dialog":Ye("cancel",l),Ye("close",l);break;case"iframe":case"object":case"embed":Ye("load",l);break;case"video":case"audio":for(a=0;a<Oo.length;a++)Ye(Oo[a],l);break;case"source":Ye("error",l);break;case"img":case"image":case"link":Ye("error",l),Ye("load",l);break;case"details":Ye("toggle",l);break;case"input":b(l,o),Ye("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!o.multiple},Ye("invalid",l);break;case"textarea":z(l,o),Ye("invalid",l)}for(var i in F(r,o),a=null,o)if(o.hasOwnProperty(i)){var s=o[i];"children"===i?"string"==typeof s?l.textContent!==s&&(!0!==o.suppressHydrationWarning&&an(l.textContent,s,e),a=["children",s]):"number"==typeof s&&l.textContent!==""+s&&(!0!==o.suppressHydrationWarning&&an(l.textContent,s,e),a=["children",""+s]):ra.hasOwnProperty(i)&&null!=s&&"onScroll"===i&&Ye("scroll",l)}switch(r){case"input":h(l),S(l,o,!0);break;case"textarea":h(l),P(l);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(l.onclick=un)}l=a,n.updateQueue=l,null!==l&&(n.flags|=4)}else{i=9===a.nodeType?a:a.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=_(r)),"http://www.w3.org/1999/xhtml"===e?"script"===r?((e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof l.is?e=i.createElement(r,{is:l.is}):(e=i.createElement(r),"select"===r&&(i=e,l.multiple?i.multiple=!0:l.size&&(i.size=l.size))):e=i.createElementNS(e,r),e[Ko]=n,e[Yo]=l,ls(e,n,!1,!1),n.stateNode=e;e:{switch(i=R(r,l),r){case"dialog":Ye("cancel",e),Ye("close",e),a=l;break;case"iframe":case"object":case"embed":Ye("load",e),a=l;break;case"video":case"audio":for(a=0;a<Oo.length;a++)Ye(Oo[a],e);a=l;break;case"source":Ye("error",e),a=l;break;case"img":case"image":case"link":Ye("error",e),Ye("load",e),a=l;break;case"details":Ye("toggle",e),a=l;break;case"input":b(e,l),a=y(e,l),Ye("invalid",e);break;case"option":default:a=l;break;case"select":e._wrapperState={wasMultiple:!!l.multiple},a=La({},l,{value:void 0}),Ye("invalid",e);break;case"textarea":z(e,l),a=C(e,l),Ye("invalid",e)}for(o in F(r,a),s=a)if(s.hasOwnProperty(o)){var c=s[o];"style"===o?M(e,c):"dangerouslySetInnerHTML"===o?null!=(c=c?c.__html:void 0)&&Fa(e,c):"children"===o?"string"==typeof c?("textarea"!==r||""!==c)&&Ra(e,c):"number"==typeof c&&Ra(e,""+c):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(ra.hasOwnProperty(o)?null!=c&&"onScroll"===o&&Ye("scroll",e):null!=c&&u(e,o,c,i))}switch(r){case"input":h(e),S(e,l,!1);break;case"textarea":h(e),P(e);break;case"option":null!=l.value&&e.setAttribute("value",""+p(l.value));break;case"select":e.multiple=!!l.multiple,null!=(o=l.value)?E(e,!!l.multiple,o,!1):null!=l.defaultValue&&E(e,!!l.multiple,l.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=un)}switch(r){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}}l&&(n.flags|=4)}null!==n.ref&&(n.flags|=512,n.flags|=2097152)}return Mr(n),null;case 6:if(e&&null!=n.stateNode)os(e,n,e.memoizedProps,l);else{if("string"!=typeof l&&null===n.stateNode)throw Error(t(166));if(r=dt(Ii.current),dt(Di.current),In(n)){if(l=n.stateNode,r=n.memoizedProps,l[Ko]=n,(o=l.nodeValue!==r)&&null!==(e=yi))switch(e.tag){case 3:an(l.nodeValue,r,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&an(l.nodeValue,r,0!=(1&e.mode))}o&&(n.flags|=4)}else(l=(9===r.nodeType?r:r.ownerDocument).createTextNode(l))[Ko]=n,n.stateNode=l}return Mr(n),null;case 13:if(yn(Ui),l=n.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ki&&null!==bi&&0!=(1&n.mode)&&0==(128&n.flags)){for(o=bi;o;)o=fn(o.nextSibling);Un(),n.flags|=98560,o=!1}else if(o=In(n),null!==l&&null!==l.dehydrated){if(null===e){if(!o)throw Error(t(318));if(!(o=null!==(o=n.memoizedState)?o.dehydrated:null))throw Error(t(317));o[Ko]=n}else Un(),0==(128&n.flags)&&(n.memoizedState=null),n.flags|=4;Mr(n),o=!1}else null!==wi&&(sl(wi),wi=null),o=!0;if(!o)return 65536&n.flags?n:null}return 0!=(128&n.flags)?(n.lanes=r,n):((l=null!==l)!=(null!==e&&null!==e.memoizedState)&&l&&(n.child.flags|=8192,0!=(1&n.mode)&&(null===e||0!=(1&Ui.current)?0===Cs&&(Cs=3):vl())),null!==n.updateQueue&&(n.flags|=4),Mr(n),null);case 4:return mt(),as(e,n),null===e&&Ge(n.stateNode.containerInfo),Mr(n),null;case 10:return Wn(n.type._context),Mr(n),null;case 19:if(yn(Ui),null===(o=n.memoizedState))return Mr(n),null;if(l=0!=(128&n.flags),null===(i=o.rendering))if(l)Tr(o,!1);else{if(0!==Cs||null!==e&&0!=(128&e.flags))for(e=n.child;null!==e;){if(null!==(i=vt(e))){for(n.flags|=128,Tr(o,!1),null!==(l=i.updateQueue)&&(n.updateQueue=l,n.flags|=4),n.subtreeFlags=0,l=r,r=n.child;null!==r;)e=l,(o=r).flags&=14680066,null===(i=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return bn(Ui,1&Ui.current|2),n.child}e=e.sibling}null!==o.tail&&su()>Fs&&(n.flags|=128,l=!0,Tr(o,!1),n.lanes=4194304)}else{if(!l)if(null!==(e=vt(i))){if(n.flags|=128,l=!0,null!==(r=e.updateQueue)&&(n.updateQueue=r,n.flags|=4),Tr(o,!0),null===o.tail&&"hidden"===o.tailMode&&!i.alternate&&!ki)return Mr(n),null}else 2*su()-o.renderingStartTime>Fs&&1073741824!==r&&(n.flags|=128,l=!0,Tr(o,!1),n.lanes=4194304);o.isBackwards?(i.sibling=n.child,n.child=i):(null!==(r=o.last)?r.sibling=i:n.child=i,o.last=i)}return null!==o.tail?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=su(),n.sibling=null,r=Ui.current,bn(Ui,l?1&r|2:1&r),n):(Mr(n),null);case 22:case 23:return xs=Es.current,yn(Es),l=null!==n.memoizedState,null!==e&&null!==e.memoizedState!==l&&(n.flags|=8192),l&&0!=(1&n.mode)?0!=(1073741824&xs)&&(Mr(n),6&n.subtreeFlags&&(n.flags|=8192)):Mr(n),null;case 24:case 25:return null}throw Error(t(156,n.tag))}function Rr(e,n,r){switch(Tn(n),n.tag){case 1:return wn(n.type)&&(yn(li),yn(ri)),65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 3:return mt(),yn(li),yn(ri),yt(),0!=(65536&(e=n.flags))&&0==(128&e)?(n.flags=-65537&e|128,n):null;case 5:return gt(n),null;case 13:if(yn(Ui),null!==(e=n.memoizedState)&&null!==e.dehydrated){if(null===n.alternate)throw Error(t(340));Un()}return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 19:return yn(Ui),null;case 4:return mt(),null;case 10:return Wn(n.type._context),null;case 22:case 23:return xs=Es.current,yn(Es),null;default:return null}}function Dr(e,n){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){zl(e,n,t)}else t.current=null}function Or(e,n,t){try{t()}catch(t){zl(e,n,t)}}function Ir(e,n,t){var r=n.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var l=r=r.next;do{if((l.tag&e)===e){var a=l.destroy;l.destroy=void 0,void 0!==a&&Or(n,t,a)}l=l.next}while(l!==r)}}function Ur(e,n){if(null!==(n=null!==(n=n.updateQueue)?n.lastEffect:null)){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function Vr(e){var n=e.ref;if(null!==n){var t=e.stateNode;e.tag,e=t,"function"==typeof n?n(e):n.current=e}}function Ar(e){var n=e.alternate;null!==n&&(e.alternate=null,Ar(n)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(n=e.stateNode)&&(delete n[Ko],delete n[Yo],delete n[Go],delete n[Zo],delete n[Jo]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Br(e){return 5===e.tag||3===e.tag||4===e.tag}function Wr(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Br(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Hr(e,n,t){var r=e.tag;if(5===r||6===r)e=e.stateNode,n?8===t.nodeType?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(8===t.nodeType?(n=t.parentNode).insertBefore(e,t):(n=t).appendChild(e),null!=(t=t._reactRootContainer)||null!==n.onclick||(n.onclick=un));else if(4!==r&&null!==(e=e.child))for(Hr(e,n,t),e=e.sibling;null!==e;)Hr(e,n,t),e=e.sibling}function Qr(e,n,t){var r=e.tag;if(5===r||6===r)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Qr(e,n,t),e=e.sibling;null!==e;)Qr(e,n,t),e=e.sibling}function jr(e,n,t){for(t=t.child;null!==t;)$r(e,n,t),t=t.sibling}function $r(e,n,t){if(vu&&"function"==typeof vu.onCommitFiberUnmount)try{vu.onCommitFiberUnmount(gu,t)}catch(e){}switch(t.tag){case 5:ss||Dr(t,n);case 6:var r=ps,l=ms;ps=null,jr(e,n,t),ms=l,null!==(ps=r)&&(ms?(e=ps,t=t.stateNode,8===e.nodeType?e.parentNode.removeChild(t):e.removeChild(t)):ps.removeChild(t.stateNode));break;case 18:null!==ps&&(ms?(e=ps,t=t.stateNode,8===e.nodeType?cn(e.parentNode,t):1===e.nodeType&&cn(e,t),ce(e)):cn(ps,t.stateNode));break;case 4:r=ps,l=ms,ps=t.stateNode.containerInfo,ms=!0,jr(e,n,t),ps=r,ms=l;break;case 0:case 11:case 14:case 15:if(!ss&&null!==(r=t.updateQueue)&&null!==(r=r.lastEffect)){l=r=r.next;do{var a=l,u=a.destroy;a=a.tag,void 0!==u&&(0!=(2&a)||0!=(4&a))&&Or(t,n,u),l=l.next}while(l!==r)}jr(e,n,t);break;case 1:if(!ss&&(Dr(t,n),"function"==typeof(r=t.stateNode).componentWillUnmount))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(e){zl(t,n,e)}jr(e,n,t);break;case 21:jr(e,n,t);break;case 22:1&t.mode?(ss=(r=ss)||null!==t.memoizedState,jr(e,n,t),ss=r):jr(e,n,t);break;default:jr(e,n,t)}}function qr(e){var n=e.updateQueue;if(null!==n){e.updateQueue=null;var t=e.stateNode;null===t&&(t=e.stateNode=new cs),n.forEach((function(n){var r=Ll.bind(null,e,n);t.has(n)||(t.add(n),n.then(r,r))}))}}function Kr(e,n,r){if(null!==(r=n.deletions))for(var l=0;l<r.length;l++){var a=r[l];try{var u=e,o=n,i=o;e:for(;null!==i;){switch(i.tag){case 5:ps=i.stateNode,ms=!1;break e;case 3:case 4:ps=i.stateNode.containerInfo,ms=!0;break e}i=i.return}if(null===ps)throw Error(t(160));$r(u,o,a),ps=null,ms=!1;var s=a.alternate;null!==s&&(s.return=null),a.return=null}catch(e){zl(a,n,e)}}if(12854&n.subtreeFlags)for(n=n.child;null!==n;)Yr(n,e),n=n.sibling}function Yr(e,n,r){var l=e.alternate;switch(r=e.flags,e.tag){case 0:case 11:case 14:case 15:if(Kr(n,e),Xr(e),4&r){try{Ir(3,e,e.return),Ur(3,e)}catch(n){zl(e,e.return,n)}try{Ir(5,e,e.return)}catch(n){zl(e,e.return,n)}}break;case 1:Kr(n,e),Xr(e),512&r&&null!==l&&Dr(l,l.return);break;case 5:if(Kr(n,e),Xr(e),512&r&&null!==l&&Dr(l,l.return),32&e.flags){var a=e.stateNode;try{Ra(a,"")}catch(n){zl(e,e.return,n)}}if(4&r&&null!=(a=e.stateNode)){var o=e.memoizedProps,i=null!==l?l.memoizedProps:o,s=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===s&&"radio"===o.type&&null!=o.name&&k(a,o),R(s,i);var f=R(s,o);for(i=0;i<c.length;i+=2){var d=c[i],p=c[i+1];"style"===d?M(a,p):"dangerouslySetInnerHTML"===d?Fa(a,p):"children"===d?Ra(a,p):u(a,d,p,f)}switch(s){case"input":w(a,o);break;case"textarea":N(a,o);break;case"select":var m=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var h=o.value;null!=h?E(a,!!o.multiple,h,!1):m!==!!o.multiple&&(null!=o.defaultValue?E(a,!!o.multiple,o.defaultValue,!0):E(a,!!o.multiple,o.multiple?[]:"",!1))}a[Yo]=o}catch(n){zl(e,e.return,n)}}break;case 6:if(Kr(n,e),Xr(e),4&r){if(null===e.stateNode)throw Error(t(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(n){zl(e,e.return,n)}}break;case 3:if(Kr(n,e),Xr(e),4&r&&null!==l&&l.memoizedState.isDehydrated)try{ce(n.containerInfo)}catch(n){zl(e,e.return,n)}break;case 4:default:Kr(n,e),Xr(e);break;case 13:Kr(n,e),Xr(e),8192&(a=e.child).flags&&(o=null!==a.memoizedState,a.stateNode.isHidden=o,!o||null!==a.alternate&&null!==a.alternate.memoizedState||(Ms=su())),4&r&&qr(e);break;case 22:if(d=null!==l&&null!==l.memoizedState,1&e.mode?(ss=(f=ss)||d,Kr(n,e),ss=f):Kr(n,e),Xr(e),8192&r){if(f=null!==e.memoizedState,(e.stateNode.isHidden=f)&&!d&&0!=(1&e.mode))for(fs=e,d=e.child;null!==d;){for(p=fs=d;null!==fs;){switch(h=(m=fs).child,m.tag){case 0:case 11:case 14:case 15:Ir(4,m,m.return);break;case 1:Dr(m,m.return);var g=m.stateNode;if("function"==typeof g.componentWillUnmount){r=m,n=m.return;try{l=r,g.props=l.memoizedProps,g.state=l.memoizedState,g.componentWillUnmount()}catch(e){zl(r,n,e)}}break;case 5:Dr(m,m.return);break;case 22:if(null!==m.memoizedState){el(p);continue}}null!==h?(h.return=m,fs=h):el(p)}d=d.sibling}e:for(d=null,p=e;;){if(5===p.tag){if(null===d){d=p;try{a=p.stateNode,f?"function"==typeof(o=a.style).setProperty?o.setProperty("display","none","important"):o.display="none":(s=p.stateNode,i=null!=(c=p.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,s.style.display=T("display",i))}catch(n){zl(e,e.return,n)}}}else if(6===p.tag){if(null===d)try{p.stateNode.nodeValue=f?"":p.memoizedProps}catch(n){zl(e,e.return,n)}}else if((22!==p.tag&&23!==p.tag||null===p.memoizedState||p===e)&&null!==p.child){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;null===p.sibling;){if(null===p.return||p.return===e)break e;d===p&&(d=null),p=p.return}d===p&&(d=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:Kr(n,e),Xr(e),4&r&&qr(e);case 21:}}function Xr(e){var n=e.flags;if(2&n){try{e:{for(var r=e.return;null!==r;){if(Br(r)){var l=r;break e}r=r.return}throw Error(t(160))}switch(l.tag){case 5:var a=l.stateNode;32&l.flags&&(Ra(a,""),l.flags&=-33),Qr(e,Wr(e),a);break;case 3:case 4:var u=l.stateNode.containerInfo;Hr(e,Wr(e),u);break;default:throw Error(t(161))}}catch(n){zl(e,e.return,n)}e.flags&=-3}4096&n&&(e.flags&=-4097)}function Gr(e,n,t){fs=e,Zr(e,n,t)}function Zr(e,n,t){for(var r=0!=(1&e.mode);null!==fs;){var l=fs,a=l.child;if(22===l.tag&&r){var u=null!==l.memoizedState||is;if(!u){var o=l.alternate,i=null!==o&&null!==o.memoizedState||ss;o=is;var s=ss;if(is=u,(ss=i)&&!s)for(fs=l;null!==fs;)i=(u=fs).child,22===u.tag&&null!==u.memoizedState?nl(l):null!==i?(i.return=u,fs=i):nl(l);for(;null!==a;)fs=a,Zr(a,n,t),a=a.sibling;fs=l,is=o,ss=s}Jr(e,n,t)}else 0!=(8772&l.subtreeFlags)&&null!==a?(a.return=l,fs=a):Jr(e,n,t)}}function Jr(e,n,r){for(;null!==fs;){if(0!=(8772&(n=fs).flags)){r=n.alternate;try{if(0!=(8772&n.flags))switch(n.tag){case 0:case 11:case 15:ss||Ur(5,n);break;case 1:var l=n.stateNode;if(4&n.flags&&!ss)if(null===r)l.componentDidMount();else{var a=n.elementType===n.type?r.memoizedProps:An(n.type,r.memoizedProps);l.componentDidUpdate(a,r.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var u=n.updateQueue;null!==u&&tt(n,u,l);break;case 3:var o=n.updateQueue;if(null!==o){if(r=null,null!==n.child)switch(n.child.tag){case 5:case 1:r=n.child.stateNode}tt(n,o,r)}break;case 5:var i=n.stateNode;if(null===r&&4&n.flags){r=i;var s=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&r.focus();break;case"img":s.src&&(r.src=s.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===n.memoizedState){var c=n.alternate;if(null!==c){var f=c.memoizedState;if(null!==f){var d=f.dehydrated;null!==d&&ce(d)}}}break;default:throw Error(t(163))}ss||512&n.flags&&Vr(n)}catch(e){zl(n,n.return,e)}}if(n===e){fs=null;break}if(null!==(r=n.sibling)){r.return=n.return,fs=r;break}fs=n.return}}function el(e){for(;null!==fs;){var n=fs;if(n===e){fs=null;break}var t=n.sibling;if(null!==t){t.return=n.return,fs=t;break}fs=n.return}}function nl(e){for(;null!==fs;){var n=fs;try{switch(n.tag){case 0:case 11:case 15:var t=n.return;try{Ur(4,n)}catch(e){zl(n,t,e)}break;case 1:var r=n.stateNode;if("function"==typeof r.componentDidMount){var l=n.return;try{r.componentDidMount()}catch(e){zl(n,l,e)}}var a=n.return;try{Vr(n)}catch(e){zl(n,a,e)}break;case 5:var u=n.return;try{Vr(n)}catch(e){zl(n,u,e)}}}catch(e){zl(n,n.return,e)}if(n===e){fs=null;break}var o=n.sibling;if(null!==o){o.return=n.return,fs=o;break}fs=n.return}}function tl(){Fs=su()+500}function rl(){return 0!=(6&bs)?su():-1!==Hs?Hs:Hs=su()}function ll(e){return 0==(1&e.mode)?1:0!=(2&bs)&&0!==Ss?Ss&-Ss:null!==Si.transition?(0===Qs&&(Qs=Z()),Qs):0!==(e=xu)?e:e=void 0===(e=window.event)?16:he(e.type)}function al(e,n,r,l){if(50<Bs)throw Bs=0,Ws=null,Error(t(185));ee(e,r,l),0!=(2&bs)&&e===ks||(e===ks&&(0==(2&bs)&&(Ps|=r),4===Cs&&cl(e,Ss)),ul(e,l),1===r&&0===bs&&0==(1&n.mode)&&(tl(),oi&&Nn()))}function ul(e,n){var t=e.callbackNode;!function(e,n){for(var t=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,a=e.pendingLanes;0<a;){var u=31-yu(a),o=1<<u,i=l[u];-1===i?0!=(o&t)&&0==(o&r)||(l[u]=X(o,n)):i<=n&&(e.expiredLanes|=o),a&=~o}}(e,n);var r=Y(e,e===ks?Ss:0);if(0===r)null!==t&&uu(t),e.callbackNode=null,e.callbackPriority=0;else if(n=r&-r,e.callbackPriority!==n){if(null!=t&&uu(t),1===n)0===e.tag?function(e){oi=!0,zn(e)}(fl.bind(null,e)):zn(fl.bind(null,e)),$o((function(){0==(6&bs)&&Nn()})),t=null;else{switch(te(r)){case 1:t=fu;break;case 4:t=du;break;case 16:default:t=pu;break;case 536870912:t=hu}t=Tl(t,ol.bind(null,e))}e.callbackPriority=n,e.callbackNode=t}}function ol(e,n){if(Hs=-1,Qs=0,0!=(6&bs))throw Error(t(327));var r=e.callbackNode;if(El()&&e.callbackNode!==r)return null;var l=Y(e,e===ks?Ss:0);if(0===l)return null;if(0!=(30&l)||0!=(l&e.expiredLanes)||n)n=yl(e,l);else{n=l;var a=bs;bs|=2;var u=gl();for(ks===e&&Ss===n||(Rs=null,tl(),ml(e,n));;)try{kl();break}catch(n){hl(e,n)}Bn(),gs.current=u,bs=a,null!==ws?n=0:(ks=null,Ss=0,n=Cs)}if(0!==n){if(2===n&&0!==(a=G(e))&&(l=a,n=il(e,a)),1===n)throw r=zs,ml(e,0),cl(e,l),ul(e,su()),r;if(6===n)cl(e,l);else{if(a=e.current.alternate,0==(30&l)&&!function(e){for(var n=e;;){if(16384&n.flags){var t=n.updateQueue;if(null!==t&&null!==(t=t.stores))for(var r=0;r<t.length;r++){var l=t[r],a=l.getSnapshot;l=l.value;try{if(!wo(a(),l))return!1}catch(e){return!1}}}if(t=n.child,16384&n.subtreeFlags&&null!==t)t.return=n,n=t;else{if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}(a)&&(2===(n=yl(e,l))&&0!==(u=G(e))&&(l=u,n=il(e,u)),1===n))throw r=zs,ml(e,0),cl(e,l),ul(e,su()),r;switch(e.finishedWork=a,e.finishedLanes=l,n){case 0:case 1:throw Error(t(345));case 2:case 5:xl(e,Ts,Rs);break;case 3:if(cl(e,l),(130023424&l)===l&&10<(n=Ms+500-su())){if(0!==Y(e,0))break;if(((a=e.suspendedLanes)&l)!==l){rl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Ho(xl.bind(null,e,Ts,Rs),n);break}xl(e,Ts,Rs);break;case 4:if(cl(e,l),(4194240&l)===l)break;for(n=e.eventTimes,a=-1;0<l;){var o=31-yu(l);u=1<<o,(o=n[o])>a&&(a=o),l&=~u}if(l=a,10<(l=(120>(l=su()-l)?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*hs(l/1960))-l)){e.timeoutHandle=Ho(xl.bind(null,e,Ts,Rs),l);break}xl(e,Ts,Rs);break;default:throw Error(t(329))}}}return ul(e,su()),e.callbackNode===r?ol.bind(null,e):null}function il(e,n){var t=Ls;return e.current.memoizedState.isDehydrated&&(ml(e,n).flags|=256),2!==(e=yl(e,n))&&(n=Ts,Ts=t,null!==n&&sl(n)),e}function sl(e){null===Ts?Ts=e:Ts.push.apply(Ts,e)}function cl(e,n){for(n&=~_s,n&=~Ps,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var t=31-yu(n),r=1<<t;e[t]=-1,n&=~r}}function fl(e){if(0!=(6&bs))throw Error(t(327));El();var n=Y(e,0);if(0==(1&n))return ul(e,su()),null;var r=yl(e,n);if(0!==e.tag&&2===r){var l=G(e);0!==l&&(n=l,r=il(e,l))}if(1===r)throw r=zs,ml(e,0),cl(e,n),ul(e,su()),r;if(6===r)throw Error(t(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,xl(e,Ts,Rs),ul(e,su()),null}function dl(e,n){var t=bs;bs|=1;try{return e(n)}finally{0===(bs=t)&&(tl(),oi&&Nn())}}function pl(e){null!==Vs&&0===Vs.tag&&0==(6&bs)&&El();var n=bs;bs|=1;var t=ys.transition,r=xu;try{if(ys.transition=null,xu=1,e)return e()}finally{xu=r,ys.transition=t,0==(6&(bs=n))&&Nn()}}function ml(e,n){e.finishedWork=null,e.finishedLanes=0;var t=e.timeoutHandle;if(-1!==t&&(e.timeoutHandle=-1,Qo(t)),null!==ws)for(t=ws.return;null!==t;){var r=t;switch(Tn(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&(yn(li),yn(ri));break;case 3:mt(),yn(li),yn(ri),yt();break;case 5:gt(r);break;case 4:mt();break;case 13:case 19:yn(Ui);break;case 10:Wn(r.type._context);break;case 22:case 23:xs=Es.current,yn(Es)}t=t.return}if(ks=e,ws=e=Rl(e.current,null),Ss=xs=n,Cs=0,zs=null,_s=Ps=Ns=0,Ts=Ls=null,null!==Ni){for(n=0;n<Ni.length;n++)if(null!==(r=(t=Ni[n]).interleaved)){t.interleaved=null;var l=r.next,a=t.pending;if(null!==a){var u=a.next;a.next=l,r.next=u}t.pending=r}Ni=null}return e}function hl(e,n){for(;;){var r=ws;try{if(Bn(),Ai.current=Xi,$i){for(var l=Hi.memoizedState;null!==l;){var a=l.queue;null!==a&&(a.pending=null),l=l.next}$i=!1}if(Wi=0,ji=Qi=Hi=null,qi=!1,Ki=0,vs.current=null,null===r||null===r.return){Cs=1,zs=n,ws=null;break}e:{var u=e,o=r.return,i=r,s=n;if(n=Ss,i.flags|=32768,null!==s&&"object"==typeof s&&"function"==typeof s.then){var c=s,f=i,d=f.tag;if(0==(1&f.mode)&&(0===d||11===d||15===d)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var m=sr(o);if(null!==m){m.flags&=-257,cr(m,o,i,0,n),1&m.mode&&ir(u,c,n),s=c;var h=(n=m).updateQueue;if(null===h){var g=new Set;g.add(s),n.updateQueue=g}else h.add(s);break e}if(0==(1&n)){ir(u,c,n),vl();break e}s=Error(t(426))}else if(ki&&1&i.mode){var v=sr(o);if(null!==v){0==(65536&v.flags)&&(v.flags|=256),cr(v,o,i,0,n),Vn(rr(s,i));break e}}u=s=rr(s,i),4!==Cs&&(Cs=2),null===Ls?Ls=[u]:Ls.push(u),u=o;do{switch(u.tag){case 3:u.flags|=65536,n&=-n,u.lanes|=n,et(u,ur(0,s,n));break e;case 1:i=s;var y=u.type,b=u.stateNode;if(0==(128&u.flags)&&("function"==typeof y.getDerivedStateFromError||null!==b&&"function"==typeof b.componentDidCatch&&(null===Is||!Is.has(b)))){u.flags|=65536,n&=-n,u.lanes|=n,et(u,or(u,i,n));break e}}u=u.return}while(null!==u)}Sl(r)}catch(e){n=e,ws===r&&null!==r&&(ws=r=r.return);continue}break}}function gl(){var e=gs.current;return gs.current=Xi,null===e?Xi:e}function vl(){0!==Cs&&3!==Cs&&2!==Cs||(Cs=4),null===ks||0==(268435455&Ns)&&0==(268435455&Ps)||cl(ks,Ss)}function yl(e,n){var r=bs;bs|=2;var l=gl();for(ks===e&&Ss===n||(Rs=null,ml(e,n));;)try{bl();break}catch(n){hl(e,n)}if(Bn(),bs=r,gs.current=l,null!==ws)throw Error(t(261));return ks=null,Ss=0,Cs}function bl(){for(;null!==ws;)wl(ws)}function kl(){for(;null!==ws&&!ou();)wl(ws)}function wl(e){var n=js(e.alternate,e,xs);e.memoizedProps=e.pendingProps,null===n?Sl(e):ws=n,vs.current=null}function Sl(e){var n=e;do{var t=n.alternate;if(e=n.return,0==(32768&n.flags)){if(null!==(t=Fr(t,n,xs)))return void(ws=t)}else{if(null!==(t=Rr(t,n)))return t.flags&=32767,void(ws=t);if(null===e)return Cs=6,void(ws=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(n=n.sibling))return void(ws=n);ws=n=e}while(null!==n);0===Cs&&(Cs=5)}function xl(e,n,r){var l=xu,a=ys.transition;try{ys.transition=null,xu=1,function(e,n,r,l){do{El()}while(null!==Vs);if(0!=(6&bs))throw Error(t(327));r=e.finishedWork;var a=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(t(177));e.callbackNode=null,e.callbackPriority=0;var u=r.lanes|r.childLanes;if(function(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<t;){var l=31-yu(t),a=1<<l;n[l]=0,r[l]=-1,e[l]=-1,t&=~a}}(e,u),e===ks&&(ws=ks=null,Ss=0),0==(2064&r.subtreeFlags)&&0==(2064&r.flags)||Us||(Us=!0,Tl(pu,(function(){return El(),null}))),u=0!=(15990&r.flags),0!=(15990&r.subtreeFlags)||u){u=ys.transition,ys.transition=null;var o=xu;xu=1;var i=bs;bs|=4,vs.current=null,function(e,n){if(Bo=Ru,Be(e=Ae())){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var l=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(l&&0!==l.rangeCount){r=l.anchorNode;var a=l.anchorOffset,u=l.focusNode;l=l.focusOffset;try{r.nodeType,u.nodeType}catch(e){r=null;break e}var o=0,i=-1,s=-1,c=0,f=0,d=e,p=null;n:for(;;){for(var m;d!==r||0!==a&&3!==d.nodeType||(i=o+a),d!==u||0!==l&&3!==d.nodeType||(s=o+l),3===d.nodeType&&(o+=d.nodeValue.length),null!==(m=d.firstChild);)p=d,d=m;for(;;){if(d===e)break n;if(p===r&&++c===a&&(i=o),p===u&&++f===l&&(s=o),null!==(m=d.nextSibling))break;p=(d=p).parentNode}d=m}r=-1===i||-1===s?null:{start:i,end:s}}else r=null}r=r||{start:0,end:0}}else r=null;for(Wo={focusedElem:e,selectionRange:r},Ru=!1,fs=n;null!==fs;)if(e=(n=fs).child,0!=(1028&n.subtreeFlags)&&null!==e)e.return=n,fs=e;else for(;null!==fs;){n=fs;try{var h=n.alternate;if(0!=(1024&n.flags))switch(n.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var g=h.memoizedProps,v=h.memoizedState,y=n.stateNode,b=y.getSnapshotBeforeUpdate(n.elementType===n.type?g:An(n.type,g),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var k=n.stateNode.containerInfo;1===k.nodeType?k.textContent="":9===k.nodeType&&k.documentElement&&k.removeChild(k.documentElement);break;default:throw Error(t(163))}}catch(e){zl(n,n.return,e)}if(null!==(e=n.sibling)){e.return=n.return,fs=e;break}fs=n.return}h=ds,ds=!1}(e,r),Yr(r,e),We(Wo),Ru=!!Bo,Wo=Bo=null,e.current=r,Gr(r,e,a),iu(),bs=i,xu=o,ys.transition=u}else e.current=r;if(Us&&(Us=!1,Vs=e,As=a),0===(u=e.pendingLanes)&&(Is=null),function(e,n){if(vu&&"function"==typeof vu.onCommitFiberRoot)try{vu.onCommitFiberRoot(gu,e,void 0,128==(128&e.current.flags))}catch(e){}}(r.stateNode),ul(e,su()),null!==n)for(l=e.onRecoverableError,r=0;r<n.length;r++)a=n[r],l(a.value,{componentStack:a.stack,digest:a.digest});if(Ds)throw Ds=!1,e=Os,Os=null,e;0!=(1&As)&&0!==e.tag&&El(),0!=(1&(u=e.pendingLanes))?e===Ws?Bs++:(Bs=0,Ws=e):Bs=0,Nn()}(e,n,r,l)}finally{ys.transition=a,xu=l}return null}function El(){if(null!==Vs){var e=te(As),n=ys.transition,r=xu;try{if(ys.transition=null,xu=16>e?16:e,null===Vs)var l=!1;else{if(e=Vs,Vs=null,As=0,0!=(6&bs))throw Error(t(331));var a=bs;for(bs|=4,fs=e.current;null!==fs;){var u=fs,o=u.child;if(0!=(16&fs.flags)){var i=u.deletions;if(null!==i){for(var s=0;s<i.length;s++){var c=i[s];for(fs=c;null!==fs;){var f=fs;switch(f.tag){case 0:case 11:case 15:Ir(8,f,u)}var d=f.child;if(null!==d)d.return=f,fs=d;else for(;null!==fs;){var p=(f=fs).sibling,m=f.return;if(Ar(f),f===c){fs=null;break}if(null!==p){p.return=m,fs=p;break}fs=m}}}var h=u.alternate;if(null!==h){var g=h.child;if(null!==g){h.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}fs=u}}if(0!=(2064&u.subtreeFlags)&&null!==o)o.return=u,fs=o;else e:for(;null!==fs;){if(0!=(2048&(u=fs).flags))switch(u.tag){case 0:case 11:case 15:Ir(9,u,u.return)}var y=u.sibling;if(null!==y){y.return=u.return,fs=y;break e}fs=u.return}}var b=e.current;for(fs=b;null!==fs;){var k=(o=fs).child;if(0!=(2064&o.subtreeFlags)&&null!==k)k.return=o,fs=k;else e:for(o=b;null!==fs;){if(0!=(2048&(i=fs).flags))try{switch(i.tag){case 0:case 11:case 15:Ur(9,i)}}catch(e){zl(i,i.return,e)}if(i===o){fs=null;break e}var w=i.sibling;if(null!==w){w.return=i.return,fs=w;break e}fs=i.return}}if(bs=a,Nn(),vu&&"function"==typeof vu.onPostCommitFiberRoot)try{vu.onPostCommitFiberRoot(gu,e)}catch(e){}l=!0}return l}finally{xu=r,ys.transition=n}}return!1}function Cl(e,n,t){e=Zn(e,n=ur(0,n=rr(t,n),1),1),n=rl(),null!==e&&(ee(e,1,n),ul(e,n))}function zl(e,n,t){if(3===e.tag)Cl(e,e,t);else for(;null!==n;){if(3===n.tag){Cl(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Is||!Is.has(r))){n=Zn(n,e=or(n,e=rr(t,e),1),1),e=rl(),null!==n&&(ee(n,1,e),ul(n,e));break}}n=n.return}}function Nl(e,n,t){var r=e.pingCache;null!==r&&r.delete(n),n=rl(),e.pingedLanes|=e.suspendedLanes&t,ks===e&&(Ss&t)===t&&(4===Cs||3===Cs&&(130023424&Ss)===Ss&&500>su()-Ms?ml(e,0):_s|=t),ul(e,n)}function Pl(e,n){0===n&&(0==(1&e.mode)?n=1:(n=Su,0==(130023424&(Su<<=1))&&(Su=4194304)));var t=rl();null!==(e=Kn(e,n))&&(ee(e,n,t),ul(e,t))}function _l(e){var n=e.memoizedState,t=0;null!==n&&(t=n.retryLane),Pl(e,t)}function Ll(e,n){var r=0;switch(e.tag){case 13:var l=e.stateNode,a=e.memoizedState;null!==a&&(r=a.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(t(314))}null!==l&&l.delete(n),Pl(e,r)}function Tl(e,n){return au(e,n)}function Ml(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Rl(e,n){var t=e.alternate;return null===t?((t=$s(e.tag,n,e.key,e.mode)).elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=14680064&e.flags,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=null===n?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Dl(e,n,r,l,a,u){var o=2;if(l=e,"function"==typeof e)Fl(e)&&(o=1);else if("string"==typeof e)o=5;else e:switch(e){case ha:return Ol(r.children,a,u,n);case ga:o=8,a|=8;break;case va:return(e=$s(12,r,n,2|a)).elementType=va,e.lanes=u,e;case wa:return(e=$s(13,r,n,a)).elementType=wa,e.lanes=u,e;case Sa:return(e=$s(19,r,n,a)).elementType=Sa,e.lanes=u,e;case Ca:return Il(r,a,u,n);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ya:o=10;break e;case ba:o=9;break e;case ka:o=11;break e;case xa:o=14;break e;case Ea:o=16,l=null;break e}throw Error(t(130,null==e?e:typeof e,""))}return(n=$s(o,r,n,a)).elementType=e,n.type=l,n.lanes=u,n}function Ol(e,n,t,r){return(e=$s(7,e,r,n)).lanes=t,e}function Il(e,n,t,r){return(e=$s(22,e,r,n)).elementType=Ca,e.lanes=t,e.stateNode={isHidden:!1},e}function Ul(e,n,t){return(e=$s(6,e,null,n)).lanes=t,e}function Vl(e,n,t){return(n=$s(4,null!==e.children?e.children:[],e.key,n)).lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Al(e,n,t,r,l){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=J(0),this.expirationTimes=J(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=J(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Bl(e,n,t,r,l,a,u,o,i,s){return e=new Al(e,n,t,o,i),1===n?(n=1,!0===a&&(n|=8)):n=0,a=$s(3,null,null,n),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yn(a),e}function Wl(e){if(!e)return ti;e:{if(H(e=e._reactInternals)!==e||1!==e.tag)throw Error(t(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(wn(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(null!==n);throw Error(t(171))}if(1===e.tag){var r=e.type;if(wn(r))return xn(e,r,n)}return n}function Hl(e,n,t,r,l,a,u,o,i,s){return(e=Bl(t,r,!0,e,0,a,0,o,i)).context=Wl(null),t=e.current,(a=Gn(r=rl(),l=ll(t))).callback=null!=n?n:null,Zn(t,a,l),e.current.lanes=l,ee(e,l,r),ul(e,r),e}function Ql(e,n,t,r){var l=n.current,a=rl(),u=ll(l);return t=Wl(t),null===n.context?n.context=t:n.pendingContext=t,(n=Gn(a,u)).payload={element:e},null!==(r=void 0===r?null:r)&&(n.callback=r),null!==(e=Zn(l,n,u))&&(al(e,l,u,a),Jn(e,l,u)),u}function jl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function $l(e,n){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var t=e.retryLane;e.retryLane=0!==t&&t<n?t:n}}function ql(e,n){$l(e,n),(e=e.alternate)&&$l(e,n)}function Kl(e){return null===(e=$(e))?null:e.stateNode}function Yl(e){return null}function Xl(e){this._internalRoot=e}function Gl(e){this._internalRoot=e}function Zl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Jl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ea(){}function na(e,n,t,r,l){var a=t._reactRootContainer;if(a){var u=a;if("function"==typeof l){var o=l;l=function(){var e=jl(u);o.call(e)}}Ql(n,u,e,l)}else u=function(e,n,t,r,l){if(l){if("function"==typeof r){var a=r;r=function(){var e=jl(u);a.call(e)}}var u=Hl(n,r,e,0,null,!1,0,"",ea);return e._reactRootContainer=u,e[Xo]=u.current,Ge(8===e.nodeType?e.parentNode:e),pl(),u}for(;l=e.lastChild;)e.removeChild(l);if("function"==typeof r){var o=r;r=function(){var e=jl(i);o.call(e)}}var i=Bl(e,0,!1,null,0,!1,0,"",ea);return e._reactRootContainer=i,e[Xo]=i.current,Ge(8===e.nodeType?e.parentNode:e),pl((function(){Ql(n,i,t,r)})),i}(t,n,e,l,r);return jl(u)}var ta=new Set,ra={},la=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),aa=Object.prototype.hasOwnProperty,ua=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,oa={},ia={},sa={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){sa[e]=new a(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var n=e[0];sa[n]=new a(n,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){sa[e]=new a(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){sa[e]=new a(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){sa[e]=new a(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){sa[e]=new a(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){sa[e]=new a(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){sa[e]=new a(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){sa[e]=new a(e,5,!1,e.toLowerCase(),null,!1,!1)}));var ca=/[\-:]([a-z])/g,fa=function(e){return e[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var n=e.replace(ca,fa);sa[n]=new a(n,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var n=e.replace(ca,fa);sa[n]=new a(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var n=e.replace(ca,fa);sa[n]=new a(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){sa[e]=new a(e,1,!1,e.toLowerCase(),null,!1,!1)})),sa.xlinkHref=new a("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){sa[e]=new a(e,1,!1,e.toLowerCase(),null,!0,!0)}));var da=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,pa=Symbol.for("react.element"),ma=Symbol.for("react.portal"),ha=Symbol.for("react.fragment"),ga=Symbol.for("react.strict_mode"),va=Symbol.for("react.profiler"),ya=Symbol.for("react.provider"),ba=Symbol.for("react.context"),ka=Symbol.for("react.forward_ref"),wa=Symbol.for("react.suspense"),Sa=Symbol.for("react.suspense_list"),xa=Symbol.for("react.memo"),Ea=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var Ca=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var za,Na,Pa,_a=Symbol.iterator,La=Object.assign,Ta=!1,Ma=Array.isArray,Fa=(Pa=function(e,n){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=n;else{for((Na=Na||document.createElement("div")).innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Na.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,t,r){MSApp.execUnsafeLocalFunction((function(){return Pa(e,n)}))}:Pa),Ra=function(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&3===t.nodeType)return void(t.nodeValue=n)}e.textContent=n},Da={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Oa=["Webkit","ms","Moz","O"];Object.keys(Da).forEach((function(e){Oa.forEach((function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Da[n]=Da[e]}))}));var Ia=La({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),Ua=null,Va=null,Aa=null,Ba=null,Wa=function(e,n){return e(n)},Ha=function(){},Qa=!1,ja=!1;if(la)try{var $a={};Object.defineProperty($a,"passive",{get:function(){ja=!0}}),window.addEventListener("test",$a,$a),window.removeEventListener("test",$a,$a)}catch(Pa){ja=!1}var qa,Ka,Ya,Xa=function(e,n,t,r,l,a,u,o,i){var s=Array.prototype.slice.call(arguments,3);try{n.apply(t,s)}catch(e){this.onError(e)}},Ga=!1,Za=null,Ja=!1,eu=null,nu={onError:function(e){Ga=!0,Za=e}},tu=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler,ru=tu.unstable_scheduleCallback,lu=tu.unstable_NormalPriority,au=ru,uu=tu.unstable_cancelCallback,ou=tu.unstable_shouldYield,iu=tu.unstable_requestPaint,su=tu.unstable_now,cu=tu.unstable_getCurrentPriorityLevel,fu=tu.unstable_ImmediatePriority,du=tu.unstable_UserBlockingPriority,pu=lu,mu=tu.unstable_LowPriority,hu=tu.unstable_IdlePriority,gu=null,vu=null,yu=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(bu(e)/ku|0)|0},bu=Math.log,ku=Math.LN2,wu=64,Su=4194304,xu=0,Eu=!1,Cu=[],zu=null,Nu=null,Pu=null,_u=new Map,Lu=new Map,Tu=[],Mu="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" "),Fu=da.ReactCurrentBatchConfig,Ru=!0,Du=null,Ou=null,Iu=null,Uu=null,Vu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Au=ke(Vu),Bu=La({},Vu,{view:0,detail:0}),Wu=ke(Bu),Hu=La({},Bu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Se,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ya&&(Ya&&"mousemove"===e.type?(qa=e.screenX-Ya.screenX,Ka=e.screenY-Ya.screenY):Ka=qa=0,Ya=e),qa)},movementY:function(e){return"movementY"in e?e.movementY:Ka}}),Qu=ke(Hu),ju=ke(La({},Hu,{dataTransfer:0})),$u=ke(La({},Bu,{relatedTarget:0})),qu=ke(La({},Vu,{animationName:0,elapsedTime:0,pseudoElement:0})),Ku=La({},Vu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Yu=ke(Ku),Xu=ke(La({},Vu,{data:0})),Gu=Xu,Zu={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ju={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},eo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},no=La({},Bu,{key:function(e){if(e.key){var n=Zu[e.key]||e.key;if("Unidentified"!==n)return n}return"keypress"===e.type?13===(e=ve(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Ju[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Se,charCode:function(e){return"keypress"===e.type?ve(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ve(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),to=ke(no),ro=ke(La({},Hu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),lo=ke(La({},Bu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Se})),ao=ke(La({},Vu,{propertyName:0,elapsedTime:0,pseudoElement:0})),uo=La({},Hu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),oo=ke(uo),io=[9,13,27,32],so=la&&"CompositionEvent"in window,co=null;la&&"documentMode"in document&&(co=document.documentMode);var fo=la&&"TextEvent"in window&&!co,po=la&&(!so||co&&8<co&&11>=co),mo=String.fromCharCode(32),ho=!1,go=!1,vo={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},yo=null,bo=null,ko=!1;la&&(ko=function(e){if(!la)return!1;var n=(e="on"+e)in document;return n||((n=document.createElement("div")).setAttribute(e,"return;"),n="function"==typeof n[e]),n}("input")&&(!document.documentMode||9<document.documentMode));var wo="function"==typeof Object.is?Object.is:function(e,n){return e===n&&(0!==e||1/e==1/n)||e!=e&&n!=n},So=la&&"documentMode"in document&&11>=document.documentMode,xo=null,Eo=null,Co=null,zo=!1,No={animationend:Qe("Animation","AnimationEnd"),animationiteration:Qe("Animation","AnimationIteration"),animationstart:Qe("Animation","AnimationStart"),transitionend:Qe("Transition","TransitionEnd")},Po={},_o={};la&&(_o=document.createElement("div").style,"AnimationEvent"in window||(delete No.animationend.animation,delete No.animationiteration.animation,delete No.animationstart.animation),"TransitionEvent"in window||delete No.transitionend.transition);var Lo=je("animationend"),To=je("animationiteration"),Mo=je("animationstart"),Fo=je("transitionend"),Ro=new Map,Do="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");!function(){for(var e=0;e<Do.length;e++){var n=Do[e];$e(n.toLowerCase(),"on"+(n=n[0].toUpperCase()+n.slice(1)))}$e(Lo,"onAnimationEnd"),$e(To,"onAnimationIteration"),$e(Mo,"onAnimationStart"),$e("dblclick","onDoubleClick"),$e("focusin","onFocus"),$e("focusout","onBlur"),$e(Fo,"onTransitionEnd")}(),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),r("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),r("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),r("onBeforeInput",["compositionend","keypress","textInput","paste"]),r("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),r("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),r("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Oo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Io=new Set("cancel close invalid load scroll toggle".split(" ").concat(Oo)),Uo="_reactListening"+Math.random().toString(36).slice(2),Vo=/\r\n?/g,Ao=/\u0000|\uFFFD/g,Bo=null,Wo=null,Ho="function"==typeof setTimeout?setTimeout:void 0,Qo="function"==typeof clearTimeout?clearTimeout:void 0,jo="function"==typeof Promise?Promise:void 0,$o="function"==typeof queueMicrotask?queueMicrotask:void 0!==jo?function(e){return jo.resolve(null).then(e).catch(sn)}:Ho,qo=Math.random().toString(36).slice(2),Ko="__reactFiber$"+qo,Yo="__reactProps$"+qo,Xo="__reactContainer$"+qo,Go="__reactEvents$"+qo,Zo="__reactListeners$"+qo,Jo="__reactHandles$"+qo,ei=[],ni=-1,ti={},ri=vn(ti),li=vn(!1),ai=ti,ui=null,oi=!1,ii=!1,si=[],ci=0,fi=null,di=0,pi=[],mi=0,hi=null,gi=1,vi="",yi=null,bi=null,ki=!1,wi=null,Si=da.ReactCurrentBatchConfig,xi=vn(null),Ei=null,Ci=null,zi=null,Ni=null,Pi=Kn,_i=!1,Li=(new n.Component).refs,Ti={isMounted:function(e){return!!(e=e._reactInternals)&&H(e)===e},enqueueSetState:function(e,n,t){e=e._reactInternals;var r=rl(),l=ll(e),a=Gn(r,l);a.payload=n,null!=t&&(a.callback=t),null!==(n=Zn(e,a,l))&&(al(n,e,l,r),Jn(n,e,l))},enqueueReplaceState:function(e,n,t){e=e._reactInternals;var r=rl(),l=ll(e),a=Gn(r,l);a.tag=1,a.payload=n,null!=t&&(a.callback=t),null!==(n=Zn(e,a,l))&&(al(n,e,l,r),Jn(n,e,l))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var t=rl(),r=ll(e),l=Gn(t,r);l.tag=2,null!=n&&(l.callback=n),null!==(n=Zn(e,l,r))&&(al(n,e,r,t),Jn(n,e,r))}},Mi=ft(!0),Fi=ft(!1),Ri={},Di=vn(Ri),Oi=vn(Ri),Ii=vn(Ri),Ui=vn(0),Vi=[],Ai=da.ReactCurrentDispatcher,Bi=da.ReactCurrentBatchConfig,Wi=0,Hi=null,Qi=null,ji=null,$i=!1,qi=!1,Ki=0,Yi=0,Xi={readContext:jn,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useInsertionEffect:bt,useLayoutEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useMutableSource:bt,useSyncExternalStore:bt,useId:bt,unstable_isNewReconciler:!1},Gi={readContext:jn,useCallback:function(e,n){return xt().memoizedState=[e,void 0===n?null:n],e},useContext:jn,useEffect:At,useImperativeHandle:function(e,n,t){return t=null!=t?t.concat([e]):null,Ut(4194308,4,Qt.bind(null,n,e),t)},useLayoutEffect:function(e,n){return Ut(4194308,4,e,n)},useInsertionEffect:function(e,n){return Ut(4,2,e,n)},useMemo:function(e,n){var t=xt();return n=void 0===n?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=xt();return n=void 0!==t?t(n):n,r.memoizedState=r.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},r.queue=e,e=e.dispatch=Zt.bind(null,Hi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},xt().memoizedState=e},useState:Dt,useDebugValue:$t,useDeferredValue:function(e){return xt().memoizedState=e},useTransition:function(){var e=Dt(!1),n=e[0];return e=Xt.bind(null,e[1]),xt().memoizedState=e,[n,e]},useMutableSource:function(e,n,t){},useSyncExternalStore:function(e,n,r){var l=Hi,a=xt();if(ki){if(void 0===r)throw Error(t(407));r=r()}else{if(r=n(),null===ks)throw Error(t(349));0!=(30&Wi)||Lt(l,n,r)}a.memoizedState=r;var u={value:r,getSnapshot:n};return a.queue=u,At(Mt.bind(null,l,u,e),[e]),l.flags|=2048,Ot(9,Tt.bind(null,l,u,r,n),void 0,null),r},useId:function(){var e=xt(),n=ks.identifierPrefix;if(ki){var t=vi;n=":"+n+"R"+(t=(gi&~(1<<32-yu(gi)-1)).toString(32)+t),0<(t=Ki++)&&(n+="H"+t.toString(32)),n+=":"}else n=":"+n+"r"+(t=Yi++).toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},Zi={readContext:jn,useCallback:qt,useContext:jn,useEffect:Bt,useImperativeHandle:jt,useInsertionEffect:Wt,useLayoutEffect:Ht,useMemo:Kt,useReducer:zt,useRef:It,useState:function(e){return zt(Ct)},useDebugValue:$t,useDeferredValue:function(e){return Yt(Et(),Qi.memoizedState,e)},useTransition:function(){return[zt(Ct)[0],Et().memoizedState]},useMutableSource:Pt,useSyncExternalStore:_t,useId:Gt,unstable_isNewReconciler:!1},Ji={readContext:jn,useCallback:qt,useContext:jn,useEffect:Bt,useImperativeHandle:jt,useInsertionEffect:Wt,useLayoutEffect:Ht,useMemo:Kt,useReducer:Nt,useRef:It,useState:function(e){return Nt(Ct)},useDebugValue:$t,useDeferredValue:function(e){var n=Et();return null===Qi?n.memoizedState=e:Yt(n,Qi.memoizedState,e)},useTransition:function(){return[Nt(Ct)[0],Et().memoizedState]},useMutableSource:Pt,useSyncExternalStore:_t,useId:Gt,unstable_isNewReconciler:!1},es="function"==typeof WeakMap?WeakMap:Map,ns=da.ReactCurrentOwner,ts=!1,rs={dehydrated:null,treeContext:null,retryLane:0},ls=function(e,n,t,r){for(t=n.child;null!==t;){if(5===t.tag||6===t.tag)e.appendChild(t.stateNode);else if(4!==t.tag&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===n)break;for(;null===t.sibling;){if(null===t.return||t.return===n)return;t=t.return}t.sibling.return=t.return,t=t.sibling}},as=function(e,n){},us=function(e,n,t,r,l){var a=e.memoizedProps;if(a!==r){switch(e=n.stateNode,dt(Di.current),l=null,t){case"input":a=y(e,a),r=y(e,r),l=[];break;case"select":a=La({},a,{value:void 0}),r=La({},r,{value:void 0}),l=[];break;case"textarea":a=C(e,a),r=C(e,r),l=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(e.onclick=un)}var u;for(s in F(t,r),t=null,a)if(!r.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s){var o=a[s];for(u in o)o.hasOwnProperty(u)&&(t||(t={}),t[u]="")}else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(ra.hasOwnProperty(s)?l||(l=[]):(l=l||[]).push(s,null));for(s in r){var i=r[s];if(o=null!=a?a[s]:void 0,r.hasOwnProperty(s)&&i!==o&&(null!=i||null!=o))if("style"===s)if(o){for(u in o)!o.hasOwnProperty(u)||i&&i.hasOwnProperty(u)||(t||(t={}),t[u]="");for(u in i)i.hasOwnProperty(u)&&o[u]!==i[u]&&(t||(t={}),t[u]=i[u])}else t||(l||(l=[]),l.push(s,t)),t=i;else"dangerouslySetInnerHTML"===s?(i=i?i.__html:void 0,o=o?o.__html:void 0,null!=i&&o!==i&&(l=l||[]).push(s,i)):"children"===s?"string"!=typeof i&&"number"!=typeof i||(l=l||[]).push(s,""+i):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(ra.hasOwnProperty(s)?(null!=i&&"onScroll"===s&&Ye("scroll",e),l||o===i||(l=[])):(l=l||[]).push(s,i))}t&&(l=l||[]).push("style",t);var s=l;(n.updateQueue=s)&&(n.flags|=4)}},os=function(e,n,t,r){t!==r&&(n.flags|=4)},is=!1,ss=!1,cs="function"==typeof WeakSet?WeakSet:Set,fs=null,ds=!1,ps=null,ms=!1,hs=Math.ceil,gs=da.ReactCurrentDispatcher,vs=da.ReactCurrentOwner,ys=da.ReactCurrentBatchConfig,bs=0,ks=null,ws=null,Ss=0,xs=0,Es=vn(0),Cs=0,zs=null,Ns=0,Ps=0,_s=0,Ls=null,Ts=null,Ms=0,Fs=1/0,Rs=null,Ds=!1,Os=null,Is=null,Us=!1,Vs=null,As=0,Bs=0,Ws=null,Hs=-1,Qs=0,js=function(e,n,r){if(null!==e)if(e.memoizedProps!==n.pendingProps||li.current)ts=!0;else{if(0==(e.lanes&r)&&0==(128&n.flags))return ts=!1,function(e,n,t){switch(n.tag){case 3:kr(n),Un();break;case 5:ht(n);break;case 1:wn(n.type)&&En(n);break;case 4:pt(n,n.stateNode.containerInfo);break;case 10:var r=n.type._context,l=n.memoizedProps.value;bn(xi,r._currentValue),r._currentValue=l;break;case 13:if(null!==(r=n.memoizedState))return null!==r.dehydrated?(bn(Ui,1&Ui.current),n.flags|=128,null):0!=(t&n.child.childLanes)?xr(e,n,t):(bn(Ui,1&Ui.current),null!==(e=Lr(e,n,t))?e.sibling:null);bn(Ui,1&Ui.current);break;case 19:if(r=0!=(t&n.childLanes),0!=(128&e.flags)){if(r)return Pr(e,n,t);n.flags|=128}if(null!==(l=n.memoizedState)&&(l.rendering=null,l.tail=null,l.lastEffect=null),bn(Ui,Ui.current),r)break;return null;case 22:case 23:return n.lanes=0,hr(e,n,t)}return Lr(e,n,t)}(e,n,r);ts=0!=(131072&e.flags)}else ts=!1,ki&&0!=(1048576&n.flags)&&_n(n,di,n.index);switch(n.lanes=0,n.tag){case 2:var l=n.type;_r(e,n),e=n.pendingProps;var a=kn(n,ri.current);Qn(n,r),a=wt(null,n,l,e,a,r);var u=St();return n.flags|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof?(n.tag=1,n.memoizedState=null,n.updateQueue=null,wn(l)?(u=!0,En(n)):u=!1,n.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,Yn(n),a.updater=Ti,n.stateNode=a,a._reactInternals=n,ot(n,l,e,r),n=br(null,n,l,!0,u,r)):(n.tag=0,ki&&u&&Ln(n),fr(null,n,a,r),n=n.child),n;case 16:l=n.elementType;e:{switch(_r(e,n),e=n.pendingProps,l=(a=l._init)(l._payload),n.type=l,a=n.tag=function(e){if("function"==typeof e)return Fl(e)?1:0;if(null!=e){if((e=e.$$typeof)===ka)return 11;if(e===xa)return 14}return 2}(l),e=An(l,e),a){case 0:n=vr(null,n,l,e,r);break e;case 1:n=yr(null,n,l,e,r);break e;case 11:n=dr(null,n,l,e,r);break e;case 14:n=pr(null,n,l,An(l.type,e),r);break e}throw Error(t(306,l,""))}return n;case 0:return l=n.type,a=n.pendingProps,vr(e,n,l,a=n.elementType===l?a:An(l,a),r);case 1:return l=n.type,a=n.pendingProps,yr(e,n,l,a=n.elementType===l?a:An(l,a),r);case 3:e:{if(kr(n),null===e)throw Error(t(387));l=n.pendingProps,a=(u=n.memoizedState).element,Xn(e,n),nt(n,l,null,r);var o=n.memoizedState;if(l=o.element,u.isDehydrated){if(u={element:l,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},n.updateQueue.baseState=u,n.memoizedState=u,256&n.flags){n=wr(e,n,l,r,a=rr(Error(t(423)),n));break e}if(l!==a){n=wr(e,n,l,r,a=rr(Error(t(424)),n));break e}for(bi=fn(n.stateNode.containerInfo.firstChild),yi=n,ki=!0,wi=null,r=Fi(n,null,l,r),n.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(Un(),l===a){n=Lr(e,n,r);break e}fr(e,n,l,r)}n=n.child}return n;case 5:return ht(n),null===e&&Dn(n),l=n.type,a=n.pendingProps,u=null!==e?e.memoizedProps:null,o=a.children,on(l,a)?o=null:null!==u&&on(l,u)&&(n.flags|=32),gr(e,n),fr(e,n,o,r),n.child;case 6:return null===e&&Dn(n),null;case 13:return xr(e,n,r);case 4:return pt(n,n.stateNode.containerInfo),l=n.pendingProps,null===e?n.child=Mi(n,null,l,r):fr(e,n,l,r),n.child;case 11:return l=n.type,a=n.pendingProps,dr(e,n,l,a=n.elementType===l?a:An(l,a),r);case 7:return fr(e,n,n.pendingProps,r),n.child;case 8:case 12:return fr(e,n,n.pendingProps.children,r),n.child;case 10:e:{if(l=n.type._context,a=n.pendingProps,u=n.memoizedProps,o=a.value,bn(xi,l._currentValue),l._currentValue=o,null!==u)if(wo(u.value,o)){if(u.children===a.children&&!li.current){n=Lr(e,n,r);break e}}else for(null!==(u=n.child)&&(u.return=n);null!==u;){var i=u.dependencies;if(null!==i){o=u.child;for(var s=i.firstContext;null!==s;){if(s.context===l){if(1===u.tag){(s=Gn(-1,r&-r)).tag=2;var c=u.updateQueue;if(null!==c){var f=(c=c.shared).pending;null===f?s.next=s:(s.next=f.next,f.next=s),c.pending=s}}u.lanes|=r,null!==(s=u.alternate)&&(s.lanes|=r),Hn(u.return,r,n),i.lanes|=r;break}s=s.next}}else if(10===u.tag)o=u.type===n.type?null:u.child;else if(18===u.tag){if(null===(o=u.return))throw Error(t(341));o.lanes|=r,null!==(i=o.alternate)&&(i.lanes|=r),Hn(o,r,n),o=u.sibling}else o=u.child;if(null!==o)o.return=u;else for(o=u;null!==o;){if(o===n){o=null;break}if(null!==(u=o.sibling)){u.return=o.return,o=u;break}o=o.return}u=o}fr(e,n,a.children,r),n=n.child}return n;case 9:return a=n.type,l=n.pendingProps.children,Qn(n,r),l=l(a=jn(a)),n.flags|=1,fr(e,n,l,r),n.child;case 14:return a=An(l=n.type,n.pendingProps),pr(e,n,l,a=An(l.type,a),r);case 15:return mr(e,n,n.type,n.pendingProps,r);case 17:return l=n.type,a=n.pendingProps,a=n.elementType===l?a:An(l,a),_r(e,n),n.tag=1,wn(l)?(e=!0,En(n)):e=!1,Qn(n,r),at(n,l,a),ot(n,l,a,r),br(null,n,l,!0,e,r);case 19:return Pr(e,n,r);case 22:return hr(e,n,r)}throw Error(t(156,n.tag))},$s=function(e,n,t,r){return new Ml(e,n,t,r)},qs="function"==typeof reportError?reportError:function(e){console.error(e)};Gl.prototype.render=Xl.prototype.render=function(e){var n=this._internalRoot;if(null===n)throw Error(t(409));Ql(e,n,null,null)},Gl.prototype.unmount=Xl.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var n=e.containerInfo;pl((function(){Ql(null,e,null,null)})),n[Xo]=null}},Gl.prototype.unstable_scheduleHydration=function(e){if(e){var n=Gs();e={blockedOn:null,target:e,priority:n};for(var t=0;t<Tu.length&&0!==n&&n<Tu[t].priority;t++);Tu.splice(t,0,e),0===t&&ae(e)}};var Ks=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var t=K(n.pendingLanes);0!==t&&(ne(n,1|t),ul(n,su()),0==(6&bs)&&(tl(),Nn()))}break;case 13:pl((function(){var n=Kn(e,1);if(null!==n){var t=rl();al(n,e,1,t)}})),ql(e,1)}},Ys=function(e){if(13===e.tag){var n=Kn(e,134217728);null!==n&&al(n,e,134217728,rl()),ql(e,134217728)}},Xs=function(e){if(13===e.tag){var n=ll(e),t=Kn(e,n);null!==t&&al(t,e,n,rl()),ql(e,n)}},Gs=function(){return xu},Zs=function(e,n){var t=xu;try{return xu=e,n()}finally{xu=t}};Va=function(e,n,r){switch(n){case"input":if(w(e,r),n=r.name,"radio"===r.type&&null!=n){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<r.length;n++){var l=r[n];if(l!==e&&l.form===e.form){var a=gn(l);if(!a)throw Error(t(90));g(l),w(l,a)}}}break;case"textarea":N(e,r);break;case"select":null!=(n=r.value)&&E(e,!!r.multiple,n,!1)}},function(e,n,t){Wa=e,Ha=t}(dl,0,pl);var Js={usingClientEntryPoint:!1,Events:[mn,hn,gn,I,U,dl]};!function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:da.ReactCurrentDispatcher,findHostInstanceByFiber:Kl,findFiberByHostInstance:e.findFiberByHostInstance||Yl,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var n=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(n.isDisabled||!n.supportsFiber)e=!0;else{try{gu=n.inject(e),vu=n}catch(e){}e=!!n.checkDCE}}}({findFiberByHostInstance:pn,bundleType:0,version:"18.2.0-next-9e3b772b8-20220608",rendererPackageName:"react-dom"}),e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Js,e.createPortal=function(e,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Zl(n))throw Error(t(200));return function(e,n,t){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ma,key:null==r?null:""+r,children:e,containerInfo:n,implementation:t}}(e,n,null,r)},e.createRoot=function(e,n){if(!Zl(e))throw Error(t(299));var r=!1,l="",a=qs;return null!=n&&(!0===n.unstable_strictMode&&(r=!0),void 0!==n.identifierPrefix&&(l=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),n=Bl(e,1,!1,null,0,r,0,l,a),e[Xo]=n.current,Ge(8===e.nodeType?e.parentNode:e),new Xl(n)},e.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var n=e._reactInternals;if(void 0===n){if("function"==typeof e.render)throw Error(t(188));throw e=Object.keys(e).join(","),Error(t(268,e))}return e=null===(e=$(n))?null:e.stateNode},e.flushSync=function(e){return pl(e)},e.hydrate=function(e,n,r){if(!Jl(n))throw Error(t(200));return na(null,e,n,!0,r)},e.hydrateRoot=function(e,n,r){if(!Zl(e))throw Error(t(405));var l=null!=r&&r.hydratedSources||null,a=!1,u="",o=qs;if(null!=r&&(!0===r.unstable_strictMode&&(a=!0),void 0!==r.identifierPrefix&&(u=r.identifierPrefix),void 0!==r.onRecoverableError&&(o=r.onRecoverableError)),n=Hl(n,null,e,1,null!=r?r:null,a,0,u,o),e[Xo]=n.current,Ge(e),l)for(e=0;e<l.length;e++)a=(a=(r=l[e])._getVersion)(r._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[r,a]:n.mutableSourceEagerHydrationData.push(r,a);return new Gl(n)},e.render=function(e,n,r){if(!Jl(n))throw Error(t(200));return na(null,e,n,!1,r)},e.unmountComponentAtNode=function(e){if(!Jl(e))throw Error(t(40));return!!e._reactRootContainer&&(pl((function(){na(null,null,e,!1,(function(){e._reactRootContainer=null,e[Xo]=null}))})),!0)},e.unstable_batchedUpdates=dl,e.unstable_renderSubtreeIntoContainer=function(e,n,r,l){if(!Jl(r))throw Error(t(200));if(null==e||void 0===e._reactInternals)throw Error(t(38));return na(e,n,r,!1,l)},e.version="18.2.0-next-9e3b772b8-20220608"},"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((e=e||self).ReactDOM={},e.React)}(); react.js 0000644 00000326526 15153765740 0006233 0 ustar 00 /**
* @license React
* react.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.React = {}));
}(this, (function (exports) { 'use strict';
var ReactVersion = '18.2.0';
// ATTENTION
// When adding new symbols to this file,
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
// The Symbol used to tag the ReactElement-like types.
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
var REACT_MEMO_TYPE = Symbol.for('react.memo');
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = '@@iterator';
function getIteratorFn(maybeIterable) {
if (maybeIterable === null || typeof maybeIterable !== 'object') {
return null;
}
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
if (typeof maybeIterator === 'function') {
return maybeIterator;
}
return null;
}
/**
* Keeps track of the current dispatcher.
*/
var ReactCurrentDispatcher = {
/**
* @internal
* @type {ReactComponent}
*/
current: null
};
/**
* Keeps track of the current batch's configuration such as how long an update
* should suspend for if it needs to.
*/
var ReactCurrentBatchConfig = {
transition: null
};
var ReactCurrentActQueue = {
current: null,
// Used to reproduce behavior of `batchedUpdates` in legacy mode.
isBatchingLegacy: false,
didScheduleLegacyUpdate: false
};
/**
* Keeps track of the current owner.
*
* The current owner is the component who should own any components that are
* currently being constructed.
*/
var ReactCurrentOwner = {
/**
* @internal
* @type {ReactComponent}
*/
current: null
};
var ReactDebugCurrentFrame = {};
var currentExtraStackFrame = null;
function setExtraStackFrame(stack) {
{
currentExtraStackFrame = stack;
}
}
{
ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {
{
currentExtraStackFrame = stack;
}
}; // Stack implementation injected by the current renderer.
ReactDebugCurrentFrame.getCurrentStack = null;
ReactDebugCurrentFrame.getStackAddendum = function () {
var stack = ''; // Add an extra top frame while an element is being validated
if (currentExtraStackFrame) {
stack += currentExtraStackFrame;
} // Delegate to the injected renderer-specific implementation
var impl = ReactDebugCurrentFrame.getCurrentStack;
if (impl) {
stack += impl() || '';
}
return stack;
};
}
// -----------------------------------------------------------------------------
var enableScopeAPI = false; // Experimental Create Event Handle API.
var enableCacheElement = false;
var enableTransitionTracing = false; // No known bugs, but needs performance testing
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
// stuff. Intended to enable React core members to more easily debug scheduling
// issues in DEV builds.
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
var ReactSharedInternals = {
ReactCurrentDispatcher: ReactCurrentDispatcher,
ReactCurrentBatchConfig: ReactCurrentBatchConfig,
ReactCurrentOwner: ReactCurrentOwner
};
{
ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
}
// by calls to these methods by a Babel plugin.
//
// In PROD (or in packages without access to React internals),
// they are left as they are instead.
function warn(format) {
{
{
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
printWarning('warn', format, args);
}
}
}
function error(format) {
{
{
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
printWarning('error', format, args);
}
}
}
function printWarning(level, format, args) {
// When changing this logic, you might want to also
// update consoleWithStackDev.www.js as well.
{
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
var stack = ReactDebugCurrentFrame.getStackAddendum();
if (stack !== '') {
format += '%s';
args = args.concat([stack]);
} // eslint-disable-next-line react-internal/safe-string-coercion
var argsWithFormat = args.map(function (item) {
return String(item);
}); // Careful: RN currently depends on this prefix
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
// breaks IE9: https://github.com/facebook/react/issues/13610
// eslint-disable-next-line react-internal/no-production-logging
Function.prototype.apply.call(console[level], console, argsWithFormat);
}
}
var didWarnStateUpdateForUnmountedComponent = {};
function warnNoop(publicInstance, callerName) {
{
var _constructor = publicInstance.constructor;
var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
var warningKey = componentName + "." + callerName;
if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
return;
}
error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
didWarnStateUpdateForUnmountedComponent[warningKey] = true;
}
}
/**
* This is the abstract API for an update queue.
*/
var ReactNoopUpdateQueue = {
/**
* Checks whether or not this composite component is mounted.
* @param {ReactClass} publicInstance The instance we want to test.
* @return {boolean} True if mounted, false otherwise.
* @protected
* @final
*/
isMounted: function (publicInstance) {
return false;
},
/**
* Forces an update. This should only be invoked when it is known with
* certainty that we are **not** in a DOM transaction.
*
* You may want to call this when you know that some deeper aspect of the
* component's state has changed but `setState` was not called.
*
* This will not invoke `shouldComponentUpdate`, but it will invoke
* `componentWillUpdate` and `componentDidUpdate`.
*
* @param {ReactClass} publicInstance The instance that should rerender.
* @param {?function} callback Called after component is updated.
* @param {?string} callerName name of the calling function in the public API.
* @internal
*/
enqueueForceUpdate: function (publicInstance, callback, callerName) {
warnNoop(publicInstance, 'forceUpdate');
},
/**
* Replaces all of the state. Always use this or `setState` to mutate state.
* You should treat `this.state` as immutable.
*
* There is no guarantee that `this.state` will be immediately updated, so
* accessing `this.state` after calling this method may return the old value.
*
* @param {ReactClass} publicInstance The instance that should rerender.
* @param {object} completeState Next state.
* @param {?function} callback Called after component is updated.
* @param {?string} callerName name of the calling function in the public API.
* @internal
*/
enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
warnNoop(publicInstance, 'replaceState');
},
/**
* Sets a subset of the state. This only exists because _pendingState is
* internal. This provides a merging strategy that is not available to deep
* properties which is confusing. TODO: Expose pendingState or don't use it
* during the merge.
*
* @param {ReactClass} publicInstance The instance that should rerender.
* @param {object} partialState Next partial state to be merged with state.
* @param {?function} callback Called after component is updated.
* @param {?string} Name of the calling function in the public API.
* @internal
*/
enqueueSetState: function (publicInstance, partialState, callback, callerName) {
warnNoop(publicInstance, 'setState');
}
};
var assign = Object.assign;
var emptyObject = {};
{
Object.freeze(emptyObject);
}
/**
* Base class helpers for the updating state of a component.
*/
function Component(props, context, updater) {
this.props = props;
this.context = context; // If a component has string refs, we will assign a different object later.
this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
// renderer.
this.updater = updater || ReactNoopUpdateQueue;
}
Component.prototype.isReactComponent = {};
/**
* Sets a subset of the state. Always use this to mutate
* state. You should treat `this.state` as immutable.
*
* There is no guarantee that `this.state` will be immediately updated, so
* accessing `this.state` after calling this method may return the old value.
*
* There is no guarantee that calls to `setState` will run synchronously,
* as they may eventually be batched together. You can provide an optional
* callback that will be executed when the call to setState is actually
* completed.
*
* When a function is provided to setState, it will be called at some point in
* the future (not synchronously). It will be called with the up to date
* component arguments (state, props, context). These values can be different
* from this.* because your function may be called after receiveProps but before
* shouldComponentUpdate, and this new state, props, and context will not yet be
* assigned to this.
*
* @param {object|function} partialState Next partial state or function to
* produce next partial state to be merged with current state.
* @param {?function} callback Called after state is updated.
* @final
* @protected
*/
Component.prototype.setState = function (partialState, callback) {
if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {
throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');
}
this.updater.enqueueSetState(this, partialState, callback, 'setState');
};
/**
* Forces an update. This should only be invoked when it is known with
* certainty that we are **not** in a DOM transaction.
*
* You may want to call this when you know that some deeper aspect of the
* component's state has changed but `setState` was not called.
*
* This will not invoke `shouldComponentUpdate`, but it will invoke
* `componentWillUpdate` and `componentDidUpdate`.
*
* @param {?function} callback Called after update is complete.
* @final
* @protected
*/
Component.prototype.forceUpdate = function (callback) {
this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
};
/**
* Deprecated APIs. These APIs used to exist on classic React classes but since
* we would like to deprecate them, we're not going to move them over to this
* modern base class. Instead, we define a getter that warns if it's accessed.
*/
{
var deprecatedAPIs = {
isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
};
var defineDeprecationWarning = function (methodName, info) {
Object.defineProperty(Component.prototype, methodName, {
get: function () {
warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
return undefined;
}
});
};
for (var fnName in deprecatedAPIs) {
if (deprecatedAPIs.hasOwnProperty(fnName)) {
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
}
}
}
function ComponentDummy() {}
ComponentDummy.prototype = Component.prototype;
/**
* Convenience component with default shallow equality check for sCU.
*/
function PureComponent(props, context, updater) {
this.props = props;
this.context = context; // If a component has string refs, we will assign a different object later.
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
assign(pureComponentPrototype, Component.prototype);
pureComponentPrototype.isPureReactComponent = true;
// an immutable object with a single mutable value
function createRef() {
var refObject = {
current: null
};
{
Object.seal(refObject);
}
return refObject;
}
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
function isArray(a) {
return isArrayImpl(a);
}
/*
* The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
* and Temporal.* types. See https://github.com/facebook/react/pull/22064.
*
* The functions in this module will throw an easier-to-understand,
* easier-to-debug exception with a clear errors message message explaining the
* problem. (Instead of a confusing exception thrown inside the implementation
* of the `value` object).
*/
// $FlowFixMe only called in DEV, so void return is not possible.
function typeName(value) {
{
// toStringTag is needed for namespaced types like Temporal.Instant
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
return type;
}
} // $FlowFixMe only called in DEV, so void return is not possible.
function willCoercionThrow(value) {
{
try {
testStringCoercion(value);
return false;
} catch (e) {
return true;
}
}
}
function testStringCoercion(value) {
// If you ended up here by following an exception call stack, here's what's
// happened: you supplied an object or symbol value to React (as a prop, key,
// DOM attribute, CSS property, string ref, etc.) and when React tried to
// coerce it to a string using `'' + value`, an exception was thrown.
//
// The most common types that will cause this exception are `Symbol` instances
// and Temporal objects like `Temporal.Instant`. But any object that has a
// `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
// exception. (Library authors do this to prevent users from using built-in
// numeric operators like `+` or comparison operators like `>=` because custom
// methods are needed to perform accurate arithmetic or comparison.)
//
// To fix the problem, coerce this object or symbol value to a string before
// passing it to React. The most reliable way is usually `String(value)`.
//
// To find which value is throwing, check the browser or debugger console.
// Before this exception was thrown, there should be `console.error` output
// that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
// problem and how that type was used: key, atrribute, input value prop, etc.
// In most cases, this console output also shows the component and its
// ancestor components where the exception happened.
//
// eslint-disable-next-line react-internal/safe-string-coercion
return '' + value;
}
function checkKeyStringCoercion(value) {
{
if (willCoercionThrow(value)) {
error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
}
}
}
function getWrappedName(outerType, innerType, wrapperName) {
var displayName = outerType.displayName;
if (displayName) {
return displayName;
}
var functionName = innerType.displayName || innerType.name || '';
return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
} // Keep in sync with react-reconciler/getComponentNameFromFiber
function getContextName(type) {
return type.displayName || 'Context';
} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
function getComponentNameFromType(type) {
if (type == null) {
// Host root, text node or just invalid type.
return null;
}
{
if (typeof type.tag === 'number') {
error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
}
}
if (typeof type === 'function') {
return type.displayName || type.name || null;
}
if (typeof type === 'string') {
return type;
}
switch (type) {
case REACT_FRAGMENT_TYPE:
return 'Fragment';
case REACT_PORTAL_TYPE:
return 'Portal';
case REACT_PROFILER_TYPE:
return 'Profiler';
case REACT_STRICT_MODE_TYPE:
return 'StrictMode';
case REACT_SUSPENSE_TYPE:
return 'Suspense';
case REACT_SUSPENSE_LIST_TYPE:
return 'SuspenseList';
}
if (typeof type === 'object') {
switch (type.$$typeof) {
case REACT_CONTEXT_TYPE:
var context = type;
return getContextName(context) + '.Consumer';
case REACT_PROVIDER_TYPE:
var provider = type;
return getContextName(provider._context) + '.Provider';
case REACT_FORWARD_REF_TYPE:
return getWrappedName(type, type.render, 'ForwardRef');
case REACT_MEMO_TYPE:
var outerName = type.displayName || null;
if (outerName !== null) {
return outerName;
}
return getComponentNameFromType(type.type) || 'Memo';
case REACT_LAZY_TYPE:
{
var lazyComponent = type;
var payload = lazyComponent._payload;
var init = lazyComponent._init;
try {
return getComponentNameFromType(init(payload));
} catch (x) {
return null;
}
}
// eslint-disable-next-line no-fallthrough
}
}
return null;
}
var hasOwnProperty = Object.prototype.hasOwnProperty;
var RESERVED_PROPS = {
key: true,
ref: true,
__self: true,
__source: true
};
var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
{
didWarnAboutStringRefs = {};
}
function hasValidRef(config) {
{
if (hasOwnProperty.call(config, 'ref')) {
var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
if (getter && getter.isReactWarning) {
return false;
}
}
}
return config.ref !== undefined;
}
function hasValidKey(config) {
{
if (hasOwnProperty.call(config, 'key')) {
var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
if (getter && getter.isReactWarning) {
return false;
}
}
}
return config.key !== undefined;
}
function defineKeyPropWarningGetter(props, displayName) {
var warnAboutAccessingKey = function () {
{
if (!specialPropKeyWarningShown) {
specialPropKeyWarningShown = true;
error('%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://reactjs.org/link/special-props)', displayName);
}
}
};
warnAboutAccessingKey.isReactWarning = true;
Object.defineProperty(props, 'key', {
get: warnAboutAccessingKey,
configurable: true
});
}
function defineRefPropWarningGetter(props, displayName) {
var warnAboutAccessingRef = function () {
{
if (!specialPropRefWarningShown) {
specialPropRefWarningShown = true;
error('%s: `ref` 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://reactjs.org/link/special-props)', displayName);
}
}
};
warnAboutAccessingRef.isReactWarning = true;
Object.defineProperty(props, 'ref', {
get: warnAboutAccessingRef,
configurable: true
});
}
function warnIfStringRefCannotBeAutoConverted(config) {
{
if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
if (!didWarnAboutStringRefs[componentName]) {
error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
didWarnAboutStringRefs[componentName] = true;
}
}
}
}
/**
* Factory method to create a new React element. This no longer adheres to
* the class pattern, so do not use new to call it. Also, instanceof check
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
* if something is a React Element.
*
* @param {*} type
* @param {*} props
* @param {*} key
* @param {string|object} ref
* @param {*} owner
* @param {*} self A *temporary* helper to detect places where `this` is
* different from the `owner` when React.createElement is called, so that we
* can warn. We want to get rid of owner and replace string `ref`s with arrow
* functions, and as long as `this` and owner are the same, there will be no
* change in behavior.
* @param {*} source An annotation object (added by a transpiler or otherwise)
* indicating filename, line number, and/or other information.
* @internal
*/
var ReactElement = function (type, key, ref, self, source, owner, props) {
var element = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: REACT_ELEMENT_TYPE,
// Built-in properties that belong on the element
type: type,
key: key,
ref: ref,
props: props,
// Record the component responsible for creating this element.
_owner: owner
};
{
// The validation flag is currently mutative. We put it on
// an external backing store so that we can freeze the whole object.
// This can be replaced with a WeakMap once they are implemented in
// commonly used development environments.
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
// the validation flag non-enumerable (where possible, which should
// include every environment we run tests in), so the test framework
// ignores it.
Object.defineProperty(element._store, 'validated', {
configurable: false,
enumerable: false,
writable: true,
value: false
}); // self and source are DEV only properties.
Object.defineProperty(element, '_self', {
configurable: false,
enumerable: false,
writable: false,
value: self
}); // Two elements created in two different places should be considered
// equal for testing purposes and therefore we hide it from enumeration.
Object.defineProperty(element, '_source', {
configurable: false,
enumerable: false,
writable: false,
value: source
});
if (Object.freeze) {
Object.freeze(element.props);
Object.freeze(element);
}
}
return element;
};
/**
* Create and return a new ReactElement of the given type.
* See https://reactjs.org/docs/react-api.html#createelement
*/
function createElement(type, config, children) {
var propName; // Reserved names are extracted
var props = {};
var key = null;
var ref = null;
var self = null;
var source = null;
if (config != null) {
if (hasValidRef(config)) {
ref = config.ref;
{
warnIfStringRefCannotBeAutoConverted(config);
}
}
if (hasValidKey(config)) {
{
checkKeyStringCoercion(config.key);
}
key = '' + config.key;
}
self = config.__self === undefined ? null : config.__self;
source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
for (propName in config) {
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
props[propName] = config[propName];
}
}
} // Children can be more than one argument, and those are transferred onto
// the newly allocated props object.
var childrenLength = arguments.length - 2;
if (childrenLength === 1) {
props.children = children;
} else if (childrenLength > 1) {
var childArray = Array(childrenLength);
for (var i = 0; i < childrenLength; i++) {
childArray[i] = arguments[i + 2];
}
{
if (Object.freeze) {
Object.freeze(childArray);
}
}
props.children = childArray;
} // Resolve default props
if (type && type.defaultProps) {
var defaultProps = type.defaultProps;
for (propName in defaultProps) {
if (props[propName] === undefined) {
props[propName] = defaultProps[propName];
}
}
}
{
if (key || ref) {
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
if (key) {
defineKeyPropWarningGetter(props, displayName);
}
if (ref) {
defineRefPropWarningGetter(props, displayName);
}
}
}
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
}
function cloneAndReplaceKey(oldElement, newKey) {
var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
return newElement;
}
/**
* Clone and return a new ReactElement using element as the starting point.
* See https://reactjs.org/docs/react-api.html#cloneelement
*/
function cloneElement(element, config, children) {
if (element === null || element === undefined) {
throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
}
var propName; // Original props are copied
var props = assign({}, element.props); // Reserved names are extracted
var key = element.key;
var ref = element.ref; // Self is preserved since the owner is preserved.
var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
// transpiler, and the original source is probably a better indicator of the
// true owner.
var source = element._source; // Owner will be preserved, unless ref is overridden
var owner = element._owner;
if (config != null) {
if (hasValidRef(config)) {
// Silently steal the ref from the parent.
ref = config.ref;
owner = ReactCurrentOwner.current;
}
if (hasValidKey(config)) {
{
checkKeyStringCoercion(config.key);
}
key = '' + config.key;
} // Remaining properties override existing props
var defaultProps;
if (element.type && element.type.defaultProps) {
defaultProps = element.type.defaultProps;
}
for (propName in config) {
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
if (config[propName] === undefined && defaultProps !== undefined) {
// Resolve default props
props[propName] = defaultProps[propName];
} else {
props[propName] = config[propName];
}
}
}
} // Children can be more than one argument, and those are transferred onto
// the newly allocated props object.
var childrenLength = arguments.length - 2;
if (childrenLength === 1) {
props.children = children;
} else if (childrenLength > 1) {
var childArray = Array(childrenLength);
for (var i = 0; i < childrenLength; i++) {
childArray[i] = arguments[i + 2];
}
props.children = childArray;
}
return ReactElement(element.type, key, ref, self, source, owner, props);
}
/**
* Verifies the object is a ReactElement.
* See https://reactjs.org/docs/react-api.html#isvalidelement
* @param {?object} object
* @return {boolean} True if `object` is a ReactElement.
* @final
*/
function isValidElement(object) {
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
var SEPARATOR = '.';
var SUBSEPARATOR = ':';
/**
* Escape and wrap key so it is safe to use as a reactid
*
* @param {string} key to be escaped.
* @return {string} the escaped key.
*/
function escape(key) {
var escapeRegex = /[=:]/g;
var escaperLookup = {
'=': '=0',
':': '=2'
};
var escapedString = key.replace(escapeRegex, function (match) {
return escaperLookup[match];
});
return '$' + escapedString;
}
/**
* TODO: Test that a single child and an array with one item have the same key
* pattern.
*/
var didWarnAboutMaps = false;
var userProvidedKeyEscapeRegex = /\/+/g;
function escapeUserProvidedKey(text) {
return text.replace(userProvidedKeyEscapeRegex, '$&/');
}
/**
* Generate a key string that identifies a element within a set.
*
* @param {*} element A element that could contain a manual key.
* @param {number} index Index that is used if a manual key is not provided.
* @return {string}
*/
function getElementKey(element, index) {
// Do some typechecking here since we call this blindly. We want to ensure
// that we don't block potential future ES APIs.
if (typeof element === 'object' && element !== null && element.key != null) {
// Explicit key
{
checkKeyStringCoercion(element.key);
}
return escape('' + element.key);
} // Implicit key determined by the index in the set
return index.toString(36);
}
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
var type = typeof children;
if (type === 'undefined' || type === 'boolean') {
// All of the above are perceived as null.
children = null;
}
var invokeCallback = false;
if (children === null) {
invokeCallback = true;
} else {
switch (type) {
case 'string':
case 'number':
invokeCallback = true;
break;
case 'object':
switch (children.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
invokeCallback = true;
}
}
}
if (invokeCallback) {
var _child = children;
var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array
// so that it's consistent if the number of children grows:
var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
if (isArray(mappedChild)) {
var escapedChildKey = '';
if (childKey != null) {
escapedChildKey = escapeUserProvidedKey(childKey) + '/';
}
mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {
return c;
});
} else if (mappedChild != null) {
if (isValidElement(mappedChild)) {
{
// The `if` statement here prevents auto-disabling of the safe
// coercion ESLint rule, so we must manually disable it below.
// $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
checkKeyStringCoercion(mappedChild.key);
}
}
mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
// traverseAllChildren used to do for objects as children
escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
// eslint-disable-next-line react-internal/safe-string-coercion
escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);
}
array.push(mappedChild);
}
return 1;
}
var child;
var nextName;
var subtreeCount = 0; // Count of children found in the current subtree.
var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
if (isArray(children)) {
for (var i = 0; i < children.length; i++) {
child = children[i];
nextName = nextNamePrefix + getElementKey(child, i);
subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
}
} else {
var iteratorFn = getIteratorFn(children);
if (typeof iteratorFn === 'function') {
var iterableChildren = children;
{
// Warn about using Maps as children
if (iteratorFn === iterableChildren.entries) {
if (!didWarnAboutMaps) {
warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
}
didWarnAboutMaps = true;
}
}
var iterator = iteratorFn.call(iterableChildren);
var step;
var ii = 0;
while (!(step = iterator.next()).done) {
child = step.value;
nextName = nextNamePrefix + getElementKey(child, ii++);
subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
}
} else if (type === 'object') {
// eslint-disable-next-line react-internal/safe-string-coercion
var childrenString = String(children);
throw new Error("Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.');
}
}
return subtreeCount;
}
/**
* Maps children that are typically specified as `props.children`.
*
* See https://reactjs.org/docs/react-api.html#reactchildrenmap
*
* The provided mapFunction(child, index) will be called for each
* leaf child.
*
* @param {?*} children Children tree container.
* @param {function(*, int)} func The map function.
* @param {*} context Context for mapFunction.
* @return {object} Object containing the ordered map of results.
*/
function mapChildren(children, func, context) {
if (children == null) {
return children;
}
var result = [];
var count = 0;
mapIntoArray(children, result, '', '', function (child) {
return func.call(context, child, count++);
});
return result;
}
/**
* Count the number of children that are typically specified as
* `props.children`.
*
* See https://reactjs.org/docs/react-api.html#reactchildrencount
*
* @param {?*} children Children tree container.
* @return {number} The number of children.
*/
function countChildren(children) {
var n = 0;
mapChildren(children, function () {
n++; // Don't return anything
});
return n;
}
/**
* Iterates through children that are typically specified as `props.children`.
*
* See https://reactjs.org/docs/react-api.html#reactchildrenforeach
*
* The provided forEachFunc(child, index) will be called for each
* leaf child.
*
* @param {?*} children Children tree container.
* @param {function(*, int)} forEachFunc
* @param {*} forEachContext Context for forEachContext.
*/
function forEachChildren(children, forEachFunc, forEachContext) {
mapChildren(children, function () {
forEachFunc.apply(this, arguments); // Don't return anything.
}, forEachContext);
}
/**
* Flatten a children object (typically specified as `props.children`) and
* return an array with appropriately re-keyed children.
*
* See https://reactjs.org/docs/react-api.html#reactchildrentoarray
*/
function toArray(children) {
return mapChildren(children, function (child) {
return child;
}) || [];
}
/**
* Returns the first child in a collection of children and verifies that there
* is only one child in the collection.
*
* See https://reactjs.org/docs/react-api.html#reactchildrenonly
*
* The current implementation of this function assumes that a single child gets
* passed without a wrapper, but the purpose of this helper function is to
* abstract away the particular structure of children.
*
* @param {?object} children Child collection structure.
* @return {ReactElement} The first and only `ReactElement` contained in the
* structure.
*/
function onlyChild(children) {
if (!isValidElement(children)) {
throw new Error('React.Children.only expected to receive a single React element child.');
}
return children;
}
function createContext(defaultValue) {
// TODO: Second argument used to be an optional `calculateChangedBits`
// function. Warn to reserve for future use?
var context = {
$$typeof: REACT_CONTEXT_TYPE,
// As a workaround to support multiple concurrent renderers, we categorize
// some renderers as primary and others as secondary. We only expect
// there to be two concurrent renderers at most: React Native (primary) and
// Fabric (secondary); React DOM (primary) and React ART (secondary).
// Secondary renderers store their context values on separate fields.
_currentValue: defaultValue,
_currentValue2: defaultValue,
// Used to track how many concurrent renderers this context currently
// supports within in a single renderer. Such as parallel server rendering.
_threadCount: 0,
// These are circular
Provider: null,
Consumer: null,
// Add these to use same hidden class in VM as ServerContext
_defaultValue: null,
_globalName: null
};
context.Provider = {
$$typeof: REACT_PROVIDER_TYPE,
_context: context
};
var hasWarnedAboutUsingNestedContextConsumers = false;
var hasWarnedAboutUsingConsumerProvider = false;
var hasWarnedAboutDisplayNameOnConsumer = false;
{
// A separate object, but proxies back to the original context object for
// backwards compatibility. It has a different $$typeof, so we can properly
// warn for the incorrect usage of Context as a Consumer.
var Consumer = {
$$typeof: REACT_CONTEXT_TYPE,
_context: context
}; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
Object.defineProperties(Consumer, {
Provider: {
get: function () {
if (!hasWarnedAboutUsingConsumerProvider) {
hasWarnedAboutUsingConsumerProvider = true;
error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
}
return context.Provider;
},
set: function (_Provider) {
context.Provider = _Provider;
}
},
_currentValue: {
get: function () {
return context._currentValue;
},
set: function (_currentValue) {
context._currentValue = _currentValue;
}
},
_currentValue2: {
get: function () {
return context._currentValue2;
},
set: function (_currentValue2) {
context._currentValue2 = _currentValue2;
}
},
_threadCount: {
get: function () {
return context._threadCount;
},
set: function (_threadCount) {
context._threadCount = _threadCount;
}
},
Consumer: {
get: function () {
if (!hasWarnedAboutUsingNestedContextConsumers) {
hasWarnedAboutUsingNestedContextConsumers = true;
error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
}
return context.Consumer;
}
},
displayName: {
get: function () {
return context.displayName;
},
set: function (displayName) {
if (!hasWarnedAboutDisplayNameOnConsumer) {
warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName);
hasWarnedAboutDisplayNameOnConsumer = true;
}
}
}
}); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
context.Consumer = Consumer;
}
{
context._currentRenderer = null;
context._currentRenderer2 = null;
}
return context;
}
var Uninitialized = -1;
var Pending = 0;
var Resolved = 1;
var Rejected = 2;
function lazyInitializer(payload) {
if (payload._status === Uninitialized) {
var ctor = payload._result;
var thenable = ctor(); // Transition to the next state.
// This might throw either because it's missing or throws. If so, we treat it
// as still uninitialized and try again next time. Which is the same as what
// happens if the ctor or any wrappers processing the ctor throws. This might
// end up fixing it if the resolution was a concurrency bug.
thenable.then(function (moduleObject) {
if (payload._status === Pending || payload._status === Uninitialized) {
// Transition to the next state.
var resolved = payload;
resolved._status = Resolved;
resolved._result = moduleObject;
}
}, function (error) {
if (payload._status === Pending || payload._status === Uninitialized) {
// Transition to the next state.
var rejected = payload;
rejected._status = Rejected;
rejected._result = error;
}
});
if (payload._status === Uninitialized) {
// In case, we're still uninitialized, then we're waiting for the thenable
// to resolve. Set it as pending in the meantime.
var pending = payload;
pending._status = Pending;
pending._result = thenable;
}
}
if (payload._status === Resolved) {
var moduleObject = payload._result;
{
if (moduleObject === undefined) {
error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))\n\n" + 'Did you accidentally put curly braces around the import?', moduleObject);
}
}
{
if (!('default' in moduleObject)) {
error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
}
}
return moduleObject.default;
} else {
throw payload._result;
}
}
function lazy(ctor) {
var payload = {
// We use these fields to store the result.
_status: Uninitialized,
_result: ctor
};
var lazyType = {
$$typeof: REACT_LAZY_TYPE,
_payload: payload,
_init: lazyInitializer
};
{
// In production, this would just set it on the object.
var defaultProps;
var propTypes; // $FlowFixMe
Object.defineProperties(lazyType, {
defaultProps: {
configurable: true,
get: function () {
return defaultProps;
},
set: function (newDefaultProps) {
error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
defaultProps = newDefaultProps; // Match production behavior more closely:
// $FlowFixMe
Object.defineProperty(lazyType, 'defaultProps', {
enumerable: true
});
}
},
propTypes: {
configurable: true,
get: function () {
return propTypes;
},
set: function (newPropTypes) {
error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
propTypes = newPropTypes; // Match production behavior more closely:
// $FlowFixMe
Object.defineProperty(lazyType, 'propTypes', {
enumerable: true
});
}
}
});
}
return lazyType;
}
function forwardRef(render) {
{
if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
} else if (typeof render !== 'function') {
error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
} else {
if (render.length !== 0 && render.length !== 2) {
error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
}
}
if (render != null) {
if (render.defaultProps != null || render.propTypes != null) {
error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
}
}
}
var elementType = {
$$typeof: REACT_FORWARD_REF_TYPE,
render: render
};
{
var ownName;
Object.defineProperty(elementType, 'displayName', {
enumerable: false,
configurable: true,
get: function () {
return ownName;
},
set: function (name) {
ownName = name; // The inner component shouldn't inherit this display name in most cases,
// because the component may be used elsewhere.
// But it's nice for anonymous functions to inherit the name,
// so that our component-stack generation logic will display their frames.
// An anonymous function generally suggests a pattern like:
// React.forwardRef((props, ref) => {...});
// This kind of inner function is not used elsewhere so the side effect is okay.
if (!render.name && !render.displayName) {
render.displayName = name;
}
}
});
}
return elementType;
}
var REACT_MODULE_REFERENCE;
{
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
}
function isValidElementType(type) {
if (typeof type === 'string' || typeof type === 'function') {
return true;
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
return true;
}
if (typeof type === 'object' && type !== null) {
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since
// we don't know which Flight build this will end up being used
// with.
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
return true;
}
}
return false;
}
function memo(type, compare) {
{
if (!isValidElementType(type)) {
error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
}
}
var elementType = {
$$typeof: REACT_MEMO_TYPE,
type: type,
compare: compare === undefined ? null : compare
};
{
var ownName;
Object.defineProperty(elementType, 'displayName', {
enumerable: false,
configurable: true,
get: function () {
return ownName;
},
set: function (name) {
ownName = name; // The inner component shouldn't inherit this display name in most cases,
// because the component may be used elsewhere.
// But it's nice for anonymous functions to inherit the name,
// so that our component-stack generation logic will display their frames.
// An anonymous function generally suggests a pattern like:
// React.memo((props) => {...});
// This kind of inner function is not used elsewhere so the side effect is okay.
if (!type.name && !type.displayName) {
type.displayName = name;
}
}
});
}
return elementType;
}
function resolveDispatcher() {
var dispatcher = ReactCurrentDispatcher.current;
{
if (dispatcher === null) {
error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');
}
} // Will result in a null access error if accessed outside render phase. We
// intentionally don't throw our own error because this is in a hot path.
// Also helps ensure this is inlined.
return dispatcher;
}
function useContext(Context) {
var dispatcher = resolveDispatcher();
{
// TODO: add a more generic warning for invalid values.
if (Context._context !== undefined) {
var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
// and nobody should be using this in existing code.
if (realContext.Consumer === Context) {
error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
} else if (realContext.Provider === Context) {
error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
}
}
}
return dispatcher.useContext(Context);
}
function useState(initialState) {
var dispatcher = resolveDispatcher();
return dispatcher.useState(initialState);
}
function useReducer(reducer, initialArg, init) {
var dispatcher = resolveDispatcher();
return dispatcher.useReducer(reducer, initialArg, init);
}
function useRef(initialValue) {
var dispatcher = resolveDispatcher();
return dispatcher.useRef(initialValue);
}
function useEffect(create, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useEffect(create, deps);
}
function useInsertionEffect(create, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useInsertionEffect(create, deps);
}
function useLayoutEffect(create, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useLayoutEffect(create, deps);
}
function useCallback(callback, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useCallback(callback, deps);
}
function useMemo(create, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useMemo(create, deps);
}
function useImperativeHandle(ref, create, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useImperativeHandle(ref, create, deps);
}
function useDebugValue(value, formatterFn) {
{
var dispatcher = resolveDispatcher();
return dispatcher.useDebugValue(value, formatterFn);
}
}
function useTransition() {
var dispatcher = resolveDispatcher();
return dispatcher.useTransition();
}
function useDeferredValue(value) {
var dispatcher = resolveDispatcher();
return dispatcher.useDeferredValue(value);
}
function useId() {
var dispatcher = resolveDispatcher();
return dispatcher.useId();
}
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
var dispatcher = resolveDispatcher();
return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
}
// Helpers to patch console.logs to avoid logging during side-effect free
// replaying on render function. This currently only patches the object
// lazily which won't cover if the log function was extracted eagerly.
// We could also eagerly patch the method.
var disabledDepth = 0;
var prevLog;
var prevInfo;
var prevWarn;
var prevError;
var prevGroup;
var prevGroupCollapsed;
var prevGroupEnd;
function disabledLog() {}
disabledLog.__reactDisabledLog = true;
function disableLogs() {
{
if (disabledDepth === 0) {
/* eslint-disable react-internal/no-production-logging */
prevLog = console.log;
prevInfo = console.info;
prevWarn = console.warn;
prevError = console.error;
prevGroup = console.group;
prevGroupCollapsed = console.groupCollapsed;
prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
var props = {
configurable: true,
enumerable: true,
value: disabledLog,
writable: true
}; // $FlowFixMe Flow thinks console is immutable.
Object.defineProperties(console, {
info: props,
log: props,
warn: props,
error: props,
group: props,
groupCollapsed: props,
groupEnd: props
});
/* eslint-enable react-internal/no-production-logging */
}
disabledDepth++;
}
}
function reenableLogs() {
{
disabledDepth--;
if (disabledDepth === 0) {
/* eslint-disable react-internal/no-production-logging */
var props = {
configurable: true,
enumerable: true,
writable: true
}; // $FlowFixMe Flow thinks console is immutable.
Object.defineProperties(console, {
log: assign({}, props, {
value: prevLog
}),
info: assign({}, props, {
value: prevInfo
}),
warn: assign({}, props, {
value: prevWarn
}),
error: assign({}, props, {
value: prevError
}),
group: assign({}, props, {
value: prevGroup
}),
groupCollapsed: assign({}, props, {
value: prevGroupCollapsed
}),
groupEnd: assign({}, props, {
value: prevGroupEnd
})
});
/* eslint-enable react-internal/no-production-logging */
}
if (disabledDepth < 0) {
error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
}
}
}
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
var prefix;
function describeBuiltInComponentFrame(name, source, ownerFn) {
{
if (prefix === undefined) {
// Extract the VM specific prefix used by each line.
try {
throw Error();
} catch (x) {
var match = x.stack.trim().match(/\n( *(at )?)/);
prefix = match && match[1] || '';
}
} // We use the prefix to ensure our stacks line up with native stack frames.
return '\n' + prefix + name;
}
}
var reentry = false;
var componentFrameCache;
{
var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
componentFrameCache = new PossiblyWeakMap();
}
function describeNativeComponentFrame(fn, construct) {
// If something asked for a stack inside a fake render, it should get ignored.
if ( !fn || reentry) {
return '';
}
{
var frame = componentFrameCache.get(fn);
if (frame !== undefined) {
return frame;
}
}
var control;
reentry = true;
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
Error.prepareStackTrace = undefined;
var previousDispatcher;
{
previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function
// for warnings.
ReactCurrentDispatcher$1.current = null;
disableLogs();
}
try {
// This should throw.
if (construct) {
// Something should be setting the props in the constructor.
var Fake = function () {
throw Error();
}; // $FlowFixMe
Object.defineProperty(Fake.prototype, 'props', {
set: function () {
// We use a throwing setter instead of frozen or non-writable props
// because that won't throw in a non-strict mode function.
throw Error();
}
});
if (typeof Reflect === 'object' && Reflect.construct) {
// We construct a different control for this case to include any extra
// frames added by the construct call.
try {
Reflect.construct(Fake, []);
} catch (x) {
control = x;
}
Reflect.construct(fn, [], Fake);
} else {
try {
Fake.call();
} catch (x) {
control = x;
}
fn.call(Fake.prototype);
}
} else {
try {
throw Error();
} catch (x) {
control = x;
}
fn();
}
} catch (sample) {
// This is inlined manually because closure doesn't do it for us.
if (sample && control && typeof sample.stack === 'string') {
// This extracts the first frame from the sample that isn't also in the control.
// Skipping one frame that we assume is the frame that calls the two.
var sampleLines = sample.stack.split('\n');
var controlLines = control.stack.split('\n');
var s = sampleLines.length - 1;
var c = controlLines.length - 1;
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
// We expect at least one stack frame to be shared.
// Typically this will be the root most one. However, stack frames may be
// cut off due to maximum stack limits. In this case, one maybe cut off
// earlier than the other. We assume that the sample is longer or the same
// and there for cut off earlier. So we should find the root most frame in
// the sample somewhere in the control.
c--;
}
for (; s >= 1 && c >= 0; s--, c--) {
// Next we find the first one that isn't the same which should be the
// frame that called our sample function and the control.
if (sampleLines[s] !== controlLines[c]) {
// In V8, the first line is describing the message but other VMs don't.
// If we're about to return the first line, and the control is also on the same
// line, that's a pretty good indicator that our sample threw at same line as
// the control. I.e. before we entered the sample frame. So we ignore this result.
// This can happen if you passed a class to function component, or non-function.
if (s !== 1 || c !== 1) {
do {
s--;
c--; // We may still have similar intermediate frames from the construct call.
// The next one that isn't the same should be our match though.
if (c < 0 || sampleLines[s] !== controlLines[c]) {
// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
// but we have a user-provided "displayName"
// splice it in to make the stack more readable.
if (fn.displayName && _frame.includes('<anonymous>')) {
_frame = _frame.replace('<anonymous>', fn.displayName);
}
{
if (typeof fn === 'function') {
componentFrameCache.set(fn, _frame);
}
} // Return the line we found.
return _frame;
}
} while (s >= 1 && c >= 0);
}
break;
}
}
}
} finally {
reentry = false;
{
ReactCurrentDispatcher$1.current = previousDispatcher;
reenableLogs();
}
Error.prepareStackTrace = previousPrepareStackTrace;
} // Fallback to just using the name if we couldn't make it throw.
var name = fn ? fn.displayName || fn.name : '';
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
{
if (typeof fn === 'function') {
componentFrameCache.set(fn, syntheticFrame);
}
}
return syntheticFrame;
}
function describeFunctionComponentFrame(fn, source, ownerFn) {
{
return describeNativeComponentFrame(fn, false);
}
}
function shouldConstruct(Component) {
var prototype = Component.prototype;
return !!(prototype && prototype.isReactComponent);
}
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
if (type == null) {
return '';
}
if (typeof type === 'function') {
{
return describeNativeComponentFrame(type, shouldConstruct(type));
}
}
if (typeof type === 'string') {
return describeBuiltInComponentFrame(type);
}
switch (type) {
case REACT_SUSPENSE_TYPE:
return describeBuiltInComponentFrame('Suspense');
case REACT_SUSPENSE_LIST_TYPE:
return describeBuiltInComponentFrame('SuspenseList');
}
if (typeof type === 'object') {
switch (type.$$typeof) {
case REACT_FORWARD_REF_TYPE:
return describeFunctionComponentFrame(type.render);
case REACT_MEMO_TYPE:
// Memo may contain any component type so we recursively resolve it.
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
case REACT_LAZY_TYPE:
{
var lazyComponent = type;
var payload = lazyComponent._payload;
var init = lazyComponent._init;
try {
// Lazy may contain any component type so we recursively resolve it.
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
} catch (x) {}
}
}
}
return '';
}
var loggedTypeFailures = {};
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
function setCurrentlyValidatingElement(element) {
{
if (element) {
var owner = element._owner;
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
} else {
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
}
}
}
function checkPropTypes(typeSpecs, values, location, componentName, element) {
{
// $FlowFixMe This is okay but Flow doesn't know it.
var has = Function.call.bind(hasOwnProperty);
for (var typeSpecName in typeSpecs) {
if (has(typeSpecs, typeSpecName)) {
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
// fail the render phase where it didn't fail before. So we log it.
// After these have been cleaned up, we'll let them throw.
try {
// This is intentionally an invariant that gets caught. It's the same
// behavior as without this statement except with a better message.
if (typeof typeSpecs[typeSpecName] !== 'function') {
// eslint-disable-next-line react-internal/prod-error-codes
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
err.name = 'Invariant Violation';
throw err;
}
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
} catch (ex) {
error$1 = ex;
}
if (error$1 && !(error$1 instanceof Error)) {
setCurrentlyValidatingElement(element);
error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
setCurrentlyValidatingElement(null);
}
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
// Only monitor this failure once because there tends to be a lot of the
// same error.
loggedTypeFailures[error$1.message] = true;
setCurrentlyValidatingElement(element);
error('Failed %s type: %s', location, error$1.message);
setCurrentlyValidatingElement(null);
}
}
}
}
}
function setCurrentlyValidatingElement$1(element) {
{
if (element) {
var owner = element._owner;
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
setExtraStackFrame(stack);
} else {
setExtraStackFrame(null);
}
}
}
var propTypesMisspellWarningShown;
{
propTypesMisspellWarningShown = false;
}
function getDeclarationErrorAddendum() {
if (ReactCurrentOwner.current) {
var name = getComponentNameFromType(ReactCurrentOwner.current.type);
if (name) {
return '\n\nCheck the render method of `' + name + '`.';
}
}
return '';
}
function getSourceInfoErrorAddendum(source) {
if (source !== undefined) {
var fileName = source.fileName.replace(/^.*[\\\/]/, '');
var lineNumber = source.lineNumber;
return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
}
return '';
}
function getSourceInfoErrorAddendumForProps(elementProps) {
if (elementProps !== null && elementProps !== undefined) {
return getSourceInfoErrorAddendum(elementProps.__source);
}
return '';
}
/**
* Warn if there's no key explicitly set on dynamic arrays of children or
* object keys are not valid. This allows us to keep track of children between
* updates.
*/
var ownerHasKeyUseWarning = {};
function getCurrentComponentErrorInfo(parentType) {
var info = getDeclarationErrorAddendum();
if (!info) {
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
if (parentName) {
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
}
}
return info;
}
/**
* Warn if the element doesn't have an explicit key assigned to it.
* This element is in an array. The array could grow and shrink or be
* reordered. All children that haven't already been validated are required to
* have a "key" property assigned to it. Error statuses are cached so a warning
* will only be shown once.
*
* @internal
* @param {ReactElement} element Element that requires a key.
* @param {*} parentType element's parent's type.
*/
function validateExplicitKey(element, parentType) {
if (!element._store || element._store.validated || element.key != null) {
return;
}
element._store.validated = true;
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
return;
}
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
// property, it may be the creator of the child that's responsible for
// assigning it a key.
var childOwner = '';
if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
// Give the component that originally created this child.
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
}
{
setCurrentlyValidatingElement$1(element);
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
setCurrentlyValidatingElement$1(null);
}
}
/**
* Ensure that every element either is passed in a static location, in an
* array with an explicit keys property defined, or in an object literal
* with valid key property.
*
* @internal
* @param {ReactNode} node Statically passed child of any type.
* @param {*} parentType node's parent's type.
*/
function validateChildKeys(node, parentType) {
if (typeof node !== 'object') {
return;
}
if (isArray(node)) {
for (var i = 0; i < node.length; i++) {
var child = node[i];
if (isValidElement(child)) {
validateExplicitKey(child, parentType);
}
}
} else if (isValidElement(node)) {
// This element was passed in a valid location.
if (node._store) {
node._store.validated = true;
}
} else if (node) {
var iteratorFn = getIteratorFn(node);
if (typeof iteratorFn === 'function') {
// Entry iterators used to provide implicit keys,
// but now we print a separate warning for them later.
if (iteratorFn !== node.entries) {
var iterator = iteratorFn.call(node);
var step;
while (!(step = iterator.next()).done) {
if (isValidElement(step.value)) {
validateExplicitKey(step.value, parentType);
}
}
}
}
}
}
/**
* Given an element, validate that its props follow the propTypes definition,
* provided by the type.
*
* @param {ReactElement} element
*/
function validatePropTypes(element) {
{
var type = element.type;
if (type === null || type === undefined || typeof type === 'string') {
return;
}
var propTypes;
if (typeof type === 'function') {
propTypes = type.propTypes;
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
type.$$typeof === REACT_MEMO_TYPE)) {
propTypes = type.propTypes;
} else {
return;
}
if (propTypes) {
// Intentionally inside to avoid triggering lazy initializers:
var name = getComponentNameFromType(type);
checkPropTypes(propTypes, element.props, 'prop', name, element);
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
var _name = getComponentNameFromType(type);
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
}
if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
}
}
}
/**
* Given a fragment, validate that it can only be provided with fragment props
* @param {ReactElement} fragment
*/
function validateFragmentProps(fragment) {
{
var keys = Object.keys(fragment.props);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (key !== 'children' && key !== 'key') {
setCurrentlyValidatingElement$1(fragment);
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
setCurrentlyValidatingElement$1(null);
break;
}
}
if (fragment.ref !== null) {
setCurrentlyValidatingElement$1(fragment);
error('Invalid attribute `ref` supplied to `React.Fragment`.');
setCurrentlyValidatingElement$1(null);
}
}
}
function createElementWithValidation(type, props, children) {
var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
// succeed and there will likely be errors in render.
if (!validType) {
var info = '';
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
}
var sourceInfo = getSourceInfoErrorAddendumForProps(props);
if (sourceInfo) {
info += sourceInfo;
} else {
info += getDeclarationErrorAddendum();
}
var typeString;
if (type === null) {
typeString = 'null';
} else if (isArray(type)) {
typeString = 'array';
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
info = ' Did you accidentally export a JSX literal instead of a component?';
} else {
typeString = typeof type;
}
{
error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
}
}
var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
// TODO: Drop this when these are no longer allowed as the type argument.
if (element == null) {
return element;
} // Skip key warning if the type isn't valid since our key validation logic
// doesn't expect a non-string/function type and can throw confusing errors.
// We don't want exception behavior to differ between dev and prod.
// (Rendering will throw with a helpful message and as soon as the type is
// fixed, the key warnings will appear.)
if (validType) {
for (var i = 2; i < arguments.length; i++) {
validateChildKeys(arguments[i], type);
}
}
if (type === REACT_FRAGMENT_TYPE) {
validateFragmentProps(element);
} else {
validatePropTypes(element);
}
return element;
}
var didWarnAboutDeprecatedCreateFactory = false;
function createFactoryWithValidation(type) {
var validatedFactory = createElementWithValidation.bind(null, type);
validatedFactory.type = type;
{
if (!didWarnAboutDeprecatedCreateFactory) {
didWarnAboutDeprecatedCreateFactory = true;
warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
} // Legacy hook: remove it
Object.defineProperty(validatedFactory, 'type', {
enumerable: false,
get: function () {
warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
Object.defineProperty(this, 'type', {
value: type
});
return type;
}
});
}
return validatedFactory;
}
function cloneElementWithValidation(element, props, children) {
var newElement = cloneElement.apply(this, arguments);
for (var i = 2; i < arguments.length; i++) {
validateChildKeys(arguments[i], newElement.type);
}
validatePropTypes(newElement);
return newElement;
}
var enableSchedulerDebugging = false;
var enableProfiling = false;
var frameYieldMs = 5;
function push(heap, node) {
var index = heap.length;
heap.push(node);
siftUp(heap, node, index);
}
function peek(heap) {
return heap.length === 0 ? null : heap[0];
}
function pop(heap) {
if (heap.length === 0) {
return null;
}
var first = heap[0];
var last = heap.pop();
if (last !== first) {
heap[0] = last;
siftDown(heap, last, 0);
}
return first;
}
function siftUp(heap, node, i) {
var index = i;
while (index > 0) {
var parentIndex = index - 1 >>> 1;
var parent = heap[parentIndex];
if (compare(parent, node) > 0) {
// The parent is larger. Swap positions.
heap[parentIndex] = node;
heap[index] = parent;
index = parentIndex;
} else {
// The parent is smaller. Exit.
return;
}
}
}
function siftDown(heap, node, i) {
var index = i;
var length = heap.length;
var halfLength = length >>> 1;
while (index < halfLength) {
var leftIndex = (index + 1) * 2 - 1;
var left = heap[leftIndex];
var rightIndex = leftIndex + 1;
var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.
if (compare(left, node) < 0) {
if (rightIndex < length && compare(right, left) < 0) {
heap[index] = right;
heap[rightIndex] = node;
index = rightIndex;
} else {
heap[index] = left;
heap[leftIndex] = node;
index = leftIndex;
}
} else if (rightIndex < length && compare(right, node) < 0) {
heap[index] = right;
heap[rightIndex] = node;
index = rightIndex;
} else {
// Neither child is smaller. Exit.
return;
}
}
}
function compare(a, b) {
// Compare sort index first, then task id.
var diff = a.sortIndex - b.sortIndex;
return diff !== 0 ? diff : a.id - b.id;
}
// TODO: Use symbols?
var ImmediatePriority = 1;
var UserBlockingPriority = 2;
var NormalPriority = 3;
var LowPriority = 4;
var IdlePriority = 5;
function markTaskErrored(task, ms) {
}
/* eslint-disable no-var */
var getCurrentTime;
var hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
if (hasPerformanceNow) {
var localPerformance = performance;
getCurrentTime = function () {
return localPerformance.now();
};
} else {
var localDate = Date;
var initialTime = localDate.now();
getCurrentTime = function () {
return localDate.now() - initialTime;
};
} // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
// Math.pow(2, 30) - 1
// 0b111111111111111111111111111111
var maxSigned31BitInt = 1073741823; // Times out immediately
var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out
var USER_BLOCKING_PRIORITY_TIMEOUT = 250;
var NORMAL_PRIORITY_TIMEOUT = 5000;
var LOW_PRIORITY_TIMEOUT = 10000; // Never times out
var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap
var taskQueue = [];
var timerQueue = []; // Incrementing id counter. Used to maintain insertion order.
var taskIdCounter = 1; // Pausing the scheduler is useful for debugging.
var currentTask = null;
var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrance.
var isPerformingWork = false;
var isHostCallbackScheduled = false;
var isHostTimeoutScheduled = false; // Capture local references to native APIs, in case a polyfill overrides them.
var localSetTimeout = typeof setTimeout === 'function' ? setTimeout : null;
var localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : null;
var localSetImmediate = typeof setImmediate !== 'undefined' ? setImmediate : null; // IE and Node.js + jsdom
var isInputPending = typeof navigator !== 'undefined' && navigator.scheduling !== undefined && navigator.scheduling.isInputPending !== undefined ? navigator.scheduling.isInputPending.bind(navigator.scheduling) : null;
function advanceTimers(currentTime) {
// Check for tasks that are no longer delayed and add them to the queue.
var timer = peek(timerQueue);
while (timer !== null) {
if (timer.callback === null) {
// Timer was cancelled.
pop(timerQueue);
} else if (timer.startTime <= currentTime) {
// Timer fired. Transfer to the task queue.
pop(timerQueue);
timer.sortIndex = timer.expirationTime;
push(taskQueue, timer);
} else {
// Remaining timers are pending.
return;
}
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = false;
advanceTimers(currentTime);
if (!isHostCallbackScheduled) {
if (peek(taskQueue) !== null) {
isHostCallbackScheduled = true;
requestHostCallback(flushWork);
} else {
var firstTimer = peek(timerQueue);
if (firstTimer !== null) {
requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
}
}
}
}
function flushWork(hasTimeRemaining, initialTime) {
isHostCallbackScheduled = false;
if (isHostTimeoutScheduled) {
// We scheduled a timeout but it's no longer needed. Cancel it.
isHostTimeoutScheduled = false;
cancelHostTimeout();
}
isPerformingWork = true;
var previousPriorityLevel = currentPriorityLevel;
try {
if (enableProfiling) {
try {
return workLoop(hasTimeRemaining, initialTime);
} catch (error) {
if (currentTask !== null) {
var currentTime = getCurrentTime();
markTaskErrored(currentTask, currentTime);
currentTask.isQueued = false;
}
throw error;
}
} else {
// No catch in prod code path.
return workLoop(hasTimeRemaining, initialTime);
}
} finally {
currentTask = null;
currentPriorityLevel = previousPriorityLevel;
isPerformingWork = false;
}
}
function workLoop(hasTimeRemaining, initialTime) {
var currentTime = initialTime;
advanceTimers(currentTime);
currentTask = peek(taskQueue);
while (currentTask !== null && !(enableSchedulerDebugging )) {
if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {
// This currentTask hasn't expired, and we've reached the deadline.
break;
}
var callback = currentTask.callback;
if (typeof callback === 'function') {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;
var continuationCallback = callback(didUserCallbackTimeout);
currentTime = getCurrentTime();
if (typeof continuationCallback === 'function') {
currentTask.callback = continuationCallback;
} else {
if (currentTask === peek(taskQueue)) {
pop(taskQueue);
}
}
advanceTimers(currentTime);
} else {
pop(taskQueue);
}
currentTask = peek(taskQueue);
} // Return whether there's additional work
if (currentTask !== null) {
return true;
} else {
var firstTimer = peek(timerQueue);
if (firstTimer !== null) {
requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
}
return false;
}
}
function unstable_runWithPriority(priorityLevel, eventHandler) {
switch (priorityLevel) {
case ImmediatePriority:
case UserBlockingPriority:
case NormalPriority:
case LowPriority:
case IdlePriority:
break;
default:
priorityLevel = NormalPriority;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
}
function unstable_next(eventHandler) {
var priorityLevel;
switch (currentPriorityLevel) {
case ImmediatePriority:
case UserBlockingPriority:
case NormalPriority:
// Shift down to normal priority
priorityLevel = NormalPriority;
break;
default:
// Anything lower than normal priority should remain at the current level.
priorityLevel = currentPriorityLevel;
break;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
}
function unstable_wrapCallback(callback) {
var parentPriorityLevel = currentPriorityLevel;
return function () {
// This is a fork of runWithPriority, inlined for performance.
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
}
function unstable_scheduleCallback(priorityLevel, callback, options) {
var currentTime = getCurrentTime();
var startTime;
if (typeof options === 'object' && options !== null) {
var delay = options.delay;
if (typeof delay === 'number' && delay > 0) {
startTime = currentTime + delay;
} else {
startTime = currentTime;
}
} else {
startTime = currentTime;
}
var timeout;
switch (priorityLevel) {
case ImmediatePriority:
timeout = IMMEDIATE_PRIORITY_TIMEOUT;
break;
case UserBlockingPriority:
timeout = USER_BLOCKING_PRIORITY_TIMEOUT;
break;
case IdlePriority:
timeout = IDLE_PRIORITY_TIMEOUT;
break;
case LowPriority:
timeout = LOW_PRIORITY_TIMEOUT;
break;
case NormalPriority:
default:
timeout = NORMAL_PRIORITY_TIMEOUT;
break;
}
var expirationTime = startTime + timeout;
var newTask = {
id: taskIdCounter++,
callback: callback,
priorityLevel: priorityLevel,
startTime: startTime,
expirationTime: expirationTime,
sortIndex: -1
};
if (startTime > currentTime) {
// This is a delayed task.
newTask.sortIndex = startTime;
push(timerQueue, newTask);
if (peek(taskQueue) === null && newTask === peek(timerQueue)) {
// All tasks are delayed, and this is the task with the earliest delay.
if (isHostTimeoutScheduled) {
// Cancel an existing timeout.
cancelHostTimeout();
} else {
isHostTimeoutScheduled = true;
} // Schedule a timeout.
requestHostTimeout(handleTimeout, startTime - currentTime);
}
} else {
newTask.sortIndex = expirationTime;
push(taskQueue, newTask);
// wait until the next time we yield.
if (!isHostCallbackScheduled && !isPerformingWork) {
isHostCallbackScheduled = true;
requestHostCallback(flushWork);
}
}
return newTask;
}
function unstable_pauseExecution() {
}
function unstable_continueExecution() {
if (!isHostCallbackScheduled && !isPerformingWork) {
isHostCallbackScheduled = true;
requestHostCallback(flushWork);
}
}
function unstable_getFirstCallbackNode() {
return peek(taskQueue);
}
function unstable_cancelCallback(task) {
// remove from the queue because you can't remove arbitrary nodes from an
// array based heap, only the first one.)
task.callback = null;
}
function unstable_getCurrentPriorityLevel() {
return currentPriorityLevel;
}
var isMessageLoopRunning = false;
var scheduledHostCallback = null;
var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main
// thread, like user events. By default, it yields multiple times per frame.
// It does not attempt to align with frame boundaries, since most tasks don't
// need to be frame aligned; for those that do, use requestAnimationFrame.
var frameInterval = frameYieldMs;
var startTime = -1;
function shouldYieldToHost() {
var timeElapsed = getCurrentTime() - startTime;
if (timeElapsed < frameInterval) {
// The main thread has only been blocked for a really short amount of time;
// smaller than a single frame. Don't yield yet.
return false;
} // The main thread has been blocked for a non-negligible amount of time. We
return true;
}
function requestPaint() {
}
function forceFrameRate(fps) {
if (fps < 0 || fps > 125) {
// Using console['error'] to evade Babel and ESLint
console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported');
return;
}
if (fps > 0) {
frameInterval = Math.floor(1000 / fps);
} else {
// reset the framerate
frameInterval = frameYieldMs;
}
}
var performWorkUntilDeadline = function () {
if (scheduledHostCallback !== null) {
var currentTime = getCurrentTime(); // Keep track of the start time so we can measure how long the main thread
// has been blocked.
startTime = currentTime;
var hasTimeRemaining = true; // If a scheduler task throws, exit the current browser task so the
// error can be observed.
//
// Intentionally not using a try-catch, since that makes some debugging
// techniques harder. Instead, if `scheduledHostCallback` errors, then
// `hasMoreWork` will remain true, and we'll continue the work loop.
var hasMoreWork = true;
try {
hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
} finally {
if (hasMoreWork) {
// If there's more work, schedule the next message event at the end
// of the preceding one.
schedulePerformWorkUntilDeadline();
} else {
isMessageLoopRunning = false;
scheduledHostCallback = null;
}
}
} else {
isMessageLoopRunning = false;
} // Yielding to the browser will give it a chance to paint, so we can
};
var schedulePerformWorkUntilDeadline;
if (typeof localSetImmediate === 'function') {
// Node.js and old IE.
// There's a few reasons for why we prefer setImmediate.
//
// Unlike MessageChannel, it doesn't prevent a Node.js process from exiting.
// (Even though this is a DOM fork of the Scheduler, you could get here
// with a mix of Node.js 15+, which has a MessageChannel, and jsdom.)
// https://github.com/facebook/react/issues/20756
//
// But also, it runs earlier which is the semantic we want.
// If other browsers ever implement it, it's better to use it.
// Although both of these would be inferior to native scheduling.
schedulePerformWorkUntilDeadline = function () {
localSetImmediate(performWorkUntilDeadline);
};
} else if (typeof MessageChannel !== 'undefined') {
// DOM and Worker environments.
// We prefer MessageChannel because of the 4ms setTimeout clamping.
var channel = new MessageChannel();
var port = channel.port2;
channel.port1.onmessage = performWorkUntilDeadline;
schedulePerformWorkUntilDeadline = function () {
port.postMessage(null);
};
} else {
// We should only fallback here in non-browser environments.
schedulePerformWorkUntilDeadline = function () {
localSetTimeout(performWorkUntilDeadline, 0);
};
}
function requestHostCallback(callback) {
scheduledHostCallback = callback;
if (!isMessageLoopRunning) {
isMessageLoopRunning = true;
schedulePerformWorkUntilDeadline();
}
}
function requestHostTimeout(callback, ms) {
taskTimeoutID = localSetTimeout(function () {
callback(getCurrentTime());
}, ms);
}
function cancelHostTimeout() {
localClearTimeout(taskTimeoutID);
taskTimeoutID = -1;
}
var unstable_requestPaint = requestPaint;
var unstable_Profiling = null;
var Scheduler = /*#__PURE__*/Object.freeze({
__proto__: null,
unstable_ImmediatePriority: ImmediatePriority,
unstable_UserBlockingPriority: UserBlockingPriority,
unstable_NormalPriority: NormalPriority,
unstable_IdlePriority: IdlePriority,
unstable_LowPriority: LowPriority,
unstable_runWithPriority: unstable_runWithPriority,
unstable_next: unstable_next,
unstable_scheduleCallback: unstable_scheduleCallback,
unstable_cancelCallback: unstable_cancelCallback,
unstable_wrapCallback: unstable_wrapCallback,
unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
unstable_shouldYield: shouldYieldToHost,
unstable_requestPaint: unstable_requestPaint,
unstable_continueExecution: unstable_continueExecution,
unstable_pauseExecution: unstable_pauseExecution,
unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
get unstable_now () { return getCurrentTime; },
unstable_forceFrameRate: forceFrameRate,
unstable_Profiling: unstable_Profiling
});
var ReactSharedInternals$1 = {
ReactCurrentDispatcher: ReactCurrentDispatcher,
ReactCurrentOwner: ReactCurrentOwner,
ReactCurrentBatchConfig: ReactCurrentBatchConfig,
// Re-export the schedule API(s) for UMD bundles.
// This avoids introducing a dependency on a new UMD global in a minor update,
// Since that would be a breaking change (e.g. for all existing CodeSandboxes).
// This re-export is only required for UMD bundles;
// CJS bundles use the shared NPM package.
Scheduler: Scheduler
};
{
ReactSharedInternals$1.ReactCurrentActQueue = ReactCurrentActQueue;
ReactSharedInternals$1.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
}
function startTransition(scope, options) {
var prevTransition = ReactCurrentBatchConfig.transition;
ReactCurrentBatchConfig.transition = {};
var currentTransition = ReactCurrentBatchConfig.transition;
{
ReactCurrentBatchConfig.transition._updatedFibers = new Set();
}
try {
scope();
} finally {
ReactCurrentBatchConfig.transition = prevTransition;
{
if (prevTransition === null && currentTransition._updatedFibers) {
var updatedFibersCount = currentTransition._updatedFibers.size;
if (updatedFibersCount > 10) {
warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');
}
currentTransition._updatedFibers.clear();
}
}
}
}
var didWarnAboutMessageChannel = false;
var enqueueTaskImpl = null;
function enqueueTask(task) {
if (enqueueTaskImpl === null) {
try {
// read require off the module object to get around the bundlers.
// we don't want them to detect a require and bundle a Node polyfill.
var requireString = ('require' + Math.random()).slice(0, 7);
var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's
// version of setImmediate, bypassing fake timers if any.
enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;
} catch (_err) {
// we're in a browser
// we can't use regular timers because they may still be faked
// so we try MessageChannel+postMessage instead
enqueueTaskImpl = function (callback) {
{
if (didWarnAboutMessageChannel === false) {
didWarnAboutMessageChannel = true;
if (typeof MessageChannel === 'undefined') {
error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');
}
}
}
var channel = new MessageChannel();
channel.port1.onmessage = callback;
channel.port2.postMessage(undefined);
};
}
}
return enqueueTaskImpl(task);
}
var actScopeDepth = 0;
var didWarnNoAwaitAct = false;
function act(callback) {
{
// `act` calls can be nested, so we track the depth. This represents the
// number of `act` scopes on the stack.
var prevActScopeDepth = actScopeDepth;
actScopeDepth++;
if (ReactCurrentActQueue.current === null) {
// This is the outermost `act` scope. Initialize the queue. The reconciler
// will detect the queue and use it instead of Scheduler.
ReactCurrentActQueue.current = [];
}
var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
var result;
try {
// Used to reproduce behavior of `batchedUpdates` in legacy mode. Only
// set to `true` while the given callback is executed, not for updates
// triggered during an async event, because this is how the legacy
// implementation of `act` behaved.
ReactCurrentActQueue.isBatchingLegacy = true;
result = callback(); // Replicate behavior of original `act` implementation in legacy mode,
// which flushed updates immediately after the scope function exits, even
// if it's an async function.
if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
var queue = ReactCurrentActQueue.current;
if (queue !== null) {
ReactCurrentActQueue.didScheduleLegacyUpdate = false;
flushActQueue(queue);
}
}
} catch (error) {
popActScope(prevActScopeDepth);
throw error;
} finally {
ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
}
if (result !== null && typeof result === 'object' && typeof result.then === 'function') {
var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait
// for it to resolve before exiting the current scope.
var wasAwaited = false;
var thenable = {
then: function (resolve, reject) {
wasAwaited = true;
thenableResult.then(function (returnValue) {
popActScope(prevActScopeDepth);
if (actScopeDepth === 0) {
// We've exited the outermost act scope. Recursively flush the
// queue until there's no remaining work.
recursivelyFlushAsyncActWork(returnValue, resolve, reject);
} else {
resolve(returnValue);
}
}, function (error) {
// The callback threw an error.
popActScope(prevActScopeDepth);
reject(error);
});
}
};
{
if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {
// eslint-disable-next-line no-undef
Promise.resolve().then(function () {}).then(function () {
if (!wasAwaited) {
didWarnNoAwaitAct = true;
error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');
}
});
}
}
return thenable;
} else {
var returnValue = result; // The callback is not an async function. Exit the current scope
// immediately, without awaiting.
popActScope(prevActScopeDepth);
if (actScopeDepth === 0) {
// Exiting the outermost act scope. Flush the queue.
var _queue = ReactCurrentActQueue.current;
if (_queue !== null) {
flushActQueue(_queue);
ReactCurrentActQueue.current = null;
} // Return a thenable. If the user awaits it, we'll flush again in
// case additional work was scheduled by a microtask.
var _thenable = {
then: function (resolve, reject) {
// Confirm we haven't re-entered another `act` scope, in case
// the user does something weird like await the thenable
// multiple times.
if (ReactCurrentActQueue.current === null) {
// Recursively flush the queue until there's no remaining work.
ReactCurrentActQueue.current = [];
recursivelyFlushAsyncActWork(returnValue, resolve, reject);
} else {
resolve(returnValue);
}
}
};
return _thenable;
} else {
// Since we're inside a nested `act` scope, the returned thenable
// immediately resolves. The outer scope will flush the queue.
var _thenable2 = {
then: function (resolve, reject) {
resolve(returnValue);
}
};
return _thenable2;
}
}
}
}
function popActScope(prevActScopeDepth) {
{
if (prevActScopeDepth !== actScopeDepth - 1) {
error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
}
actScopeDepth = prevActScopeDepth;
}
}
function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
{
var queue = ReactCurrentActQueue.current;
if (queue !== null) {
try {
flushActQueue(queue);
enqueueTask(function () {
if (queue.length === 0) {
// No additional work was scheduled. Finish.
ReactCurrentActQueue.current = null;
resolve(returnValue);
} else {
// Keep flushing work until there's none left.
recursivelyFlushAsyncActWork(returnValue, resolve, reject);
}
});
} catch (error) {
reject(error);
}
} else {
resolve(returnValue);
}
}
}
var isFlushing = false;
function flushActQueue(queue) {
{
if (!isFlushing) {
// Prevent re-entrance.
isFlushing = true;
var i = 0;
try {
for (; i < queue.length; i++) {
var callback = queue[i];
do {
callback = callback(true);
} while (callback !== null);
}
queue.length = 0;
} catch (error) {
// If something throws, leave the remaining callbacks on the queue.
queue = queue.slice(i + 1);
throw error;
} finally {
isFlushing = false;
}
}
}
}
var createElement$1 = createElementWithValidation ;
var cloneElement$1 = cloneElementWithValidation ;
var createFactory = createFactoryWithValidation ;
var Children = {
map: mapChildren,
forEach: forEachChildren,
count: countChildren,
toArray: toArray,
only: onlyChild
};
exports.Children = Children;
exports.Component = Component;
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.Profiler = REACT_PROFILER_TYPE;
exports.PureComponent = PureComponent;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals$1;
exports.cloneElement = cloneElement$1;
exports.createContext = createContext;
exports.createElement = createElement$1;
exports.createFactory = createFactory;
exports.createRef = createRef;
exports.forwardRef = forwardRef;
exports.isValidElement = isValidElement;
exports.lazy = lazy;
exports.memo = memo;
exports.startTransition = startTransition;
exports.unstable_act = act;
exports.useCallback = useCallback;
exports.useContext = useContext;
exports.useDebugValue = useDebugValue;
exports.useDeferredValue = useDeferredValue;
exports.useEffect = useEffect;
exports.useId = useId;
exports.useImperativeHandle = useImperativeHandle;
exports.useInsertionEffect = useInsertionEffect;
exports.useLayoutEffect = useLayoutEffect;
exports.useMemo = useMemo;
exports.useReducer = useReducer;
exports.useRef = useRef;
exports.useState = useState;
exports.useSyncExternalStore = useSyncExternalStore;
exports.useTransition = useTransition;
exports.version = ReactVersion;
})));
react.min.js 0000644 00000024561 15153765740 0007007 0 ustar 00 /**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
!function(){"use strict";var e,t;e=this,t=function(e){function t(e,t,n){this.props=e,this.context=t,this.refs=L,this.updater=n||T}function n(){}function r(e,t,n){this.props=e,this.context=t,this.refs=L,this.updater=n||T}function o(e,t,n){var r,o={},u=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(u=""+t.key),t)D.call(t,r)&&!V.hasOwnProperty(r)&&(o[r]=t[r]);var i=arguments.length-2;if(1===i)o.children=n;else if(1<i){for(var l=Array(i),c=0;c<i;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(r in i=e.defaultProps)void 0===o[r]&&(o[r]=i[r]);return{$$typeof:g,type:e,key:u,ref:a,props:o,_owner:U.current}}function u(e){return"object"==typeof e&&null!==e&&e.$$typeof===g}function a(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function i(e,t,n,r,o){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var c=!1;if(null===e)c=!0;else switch(l){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case g:case k:c=!0}}if(c)return o=o(c=e),e=""===r?"."+a(c,0):r,M(o)?(n="",null!=e&&(n=e.replace(q,"$&/")+"/"),i(o,t,n,"",(function(e){return e}))):null!=o&&(u(o)&&(o=function(e,t){return{$$typeof:g,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||c&&c.key===o.key?"":(""+o.key).replace(q,"$&/")+"/")+e)),t.push(o)),1;if(c=0,r=""===r?".":r+":",M(e))for(var f=0;f<e.length;f++){var s=r+a(l=e[f],f);c+=i(l,t,n,s,o)}else if(s=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=j&&e[j]||e["@@iterator"])?e:null}(e),"function"==typeof s)for(e=s.call(e),f=0;!(l=e.next()).done;)c+=i(l=l.value,t,n,s=r+a(l,f++),o);else if("object"===l)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function l(e,t,n){if(null==e)return e;var r=[],o=0;return i(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function c(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}function f(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<y(o,t)))break e;e[r]=t,e[n]=o,n=r}}function s(e){return 0===e.length?null:e[0]}function p(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,u=o>>>1;r<u;){var a=2*(r+1)-1,i=e[a],l=a+1,c=e[l];if(0>y(i,n))l<o&&0>y(c,i)?(e[r]=c,e[l]=n,r=l):(e[r]=i,e[a]=n,r=a);else{if(!(l<o&&0>y(c,n)))break e;e[r]=c,e[l]=n,r=l}}}return t}function y(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}function d(e){for(var t=s(G);null!==t;){if(null===t.callback)p(G);else{if(!(t.startTime<=e))break;p(G),t.sortIndex=t.expirationTime,f(Y,t)}t=s(G)}}function b(e){if(ee=!1,d(e),!Z)if(null!==s(Y))Z=!0,_(v);else{var t=s(G);null!==t&&h(b,t.startTime-e)}}function v(e,t){Z=!1,ee&&(ee=!1,ne(ae),ae=-1),X=!0;var n=Q;try{for(d(t),K=s(Y);null!==K&&(!(K.expirationTime>t)||e&&!m());){var r=K.callback;if("function"==typeof r){K.callback=null,Q=K.priorityLevel;var o=r(K.expirationTime<=t);t=z(),"function"==typeof o?K.callback=o:K===s(Y)&&p(Y),d(t)}else p(Y);K=s(Y)}if(null!==K)var u=!0;else{var a=s(G);null!==a&&h(b,a.startTime-t),u=!1}return u}finally{K=null,Q=n,X=!1}}function m(){return!(z()-le<ie)}function _(e){ue=e,oe||(oe=!0,fe())}function h(e,t){ae=te((function(){e(z())}),t)}var g=Symbol.for("react.element"),k=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),E=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),$=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),j=Symbol.iterator,T={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){},enqueueReplaceState:function(e,t,n,r){},enqueueSetState:function(e,t,n,r){}},O=Object.assign,L={};t.prototype.isReactComponent={},t.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},t.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},n.prototype=t.prototype;var F=r.prototype=new n;F.constructor=r,O(F,t.prototype),F.isPureReactComponent=!0;var M=Array.isArray,D=Object.prototype.hasOwnProperty,U={current:null},V={key:!0,ref:!0,__self:!0,__source:!0},q=/\/+/g,A={current:null},N={transition:null};if("object"==typeof performance&&"function"==typeof performance.now)var B=performance,z=function(){return B.now()};else{var H=Date,W=H.now();z=function(){return H.now()-W}}var Y=[],G=[],J=1,K=null,Q=3,X=!1,Z=!1,ee=!1,te="function"==typeof setTimeout?setTimeout:null,ne="function"==typeof clearTimeout?clearTimeout:null,re="undefined"!=typeof setImmediate?setImmediate:null;"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var oe=!1,ue=null,ae=-1,ie=5,le=-1,ce=function(){if(null!==ue){var e=z();le=e;var t=!0;try{t=ue(!0,e)}finally{t?fe():(oe=!1,ue=null)}}else oe=!1};if("function"==typeof re)var fe=function(){re(ce)};else if("undefined"!=typeof MessageChannel){var se=(F=new MessageChannel).port2;F.port1.onmessage=ce,fe=function(){se.postMessage(null)}}else fe=function(){te(ce,0)};F={ReactCurrentDispatcher:A,ReactCurrentOwner:U,ReactCurrentBatchConfig:N,Scheduler:{__proto__:null,unstable_ImmediatePriority:1,unstable_UserBlockingPriority:2,unstable_NormalPriority:3,unstable_IdlePriority:5,unstable_LowPriority:4,unstable_runWithPriority:function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Q;Q=e;try{return t()}finally{Q=n}},unstable_next:function(e){switch(Q){case 1:case 2:case 3:var t=3;break;default:t=Q}var n=Q;Q=t;try{return e()}finally{Q=n}},unstable_scheduleCallback:function(e,t,n){var r=z();switch(n="object"==typeof n&&null!==n&&"number"==typeof(n=n.delay)&&0<n?r+n:r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return e={id:J++,callback:t,priorityLevel:e,startTime:n,expirationTime:o=n+o,sortIndex:-1},n>r?(e.sortIndex=n,f(G,e),null===s(Y)&&e===s(G)&&(ee?(ne(ae),ae=-1):ee=!0,h(b,n-r))):(e.sortIndex=o,f(Y,e),Z||X||(Z=!0,_(v))),e},unstable_cancelCallback:function(e){e.callback=null},unstable_wrapCallback:function(e){var t=Q;return function(){var n=Q;Q=t;try{return e.apply(this,arguments)}finally{Q=n}}},unstable_getCurrentPriorityLevel:function(){return Q},unstable_shouldYield:m,unstable_requestPaint:function(){},unstable_continueExecution:function(){Z||X||(Z=!0,_(v))},unstable_pauseExecution:function(){},unstable_getFirstCallbackNode:function(){return s(Y)},get unstable_now(){return z},unstable_forceFrameRate:function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ie=0<e?Math.floor(1e3/e):5},unstable_Profiling:null}},e.Children={map:l,forEach:function(e,t,n){l(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return l(e,(function(){t++})),t},toArray:function(e){return l(e,(function(e){return e}))||[]},only:function(e){if(!u(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},e.Component=t,e.Fragment=w,e.Profiler=x,e.PureComponent=r,e.StrictMode=S,e.Suspense=P,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F,e.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=O({},e.props),o=e.key,u=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(u=t.ref,a=U.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(l in t)D.call(t,l)&&!V.hasOwnProperty(l)&&(r[l]=void 0===t[l]&&void 0!==i?i[l]:t[l])}var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){i=Array(l);for(var c=0;c<l;c++)i[c]=arguments[c+2];r.children=i}return{$$typeof:g,type:e.type,key:o,ref:u,props:r,_owner:a}},e.createContext=function(e){return(e={$$typeof:E,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:C,_context:e},e.Consumer=e},e.createElement=o,e.createFactory=function(e){var t=o.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:R,render:e}},e.isValidElement=u,e.lazy=function(e){return{$$typeof:I,_payload:{_status:-1,_result:e},_init:c}},e.memo=function(e,t){return{$$typeof:$,type:e,compare:void 0===t?null:t}},e.startTransition=function(e,t){t=N.transition,N.transition={};try{e()}finally{N.transition=t}},e.unstable_act=function(e){throw Error("act(...) is not supported in production builds of React.")},e.useCallback=function(e,t){return A.current.useCallback(e,t)},e.useContext=function(e){return A.current.useContext(e)},e.useDebugValue=function(e,t){},e.useDeferredValue=function(e){return A.current.useDeferredValue(e)},e.useEffect=function(e,t){return A.current.useEffect(e,t)},e.useId=function(){return A.current.useId()},e.useImperativeHandle=function(e,t,n){return A.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return A.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return A.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return A.current.useMemo(e,t)},e.useReducer=function(e,t,n){return A.current.useReducer(e,t,n)},e.useRef=function(e){return A.current.useRef(e)},e.useState=function(e){return A.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return A.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return A.current.useTransition()},e.version="18.2.0"},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).React={})}(); regenerator-runtime.js 0000644 00000061171 15153765740 0011123 0 ustar 00 /**
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var runtime = (function (exports) {
"use strict";
var Op = Object.prototype;
var hasOwn = Op.hasOwnProperty;
var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; };
var undefined; // More compressible than void 0.
var $Symbol = typeof Symbol === "function" ? Symbol : {};
var iteratorSymbol = $Symbol.iterator || "@@iterator";
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
function define(obj, key, value) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
return obj[key];
}
try {
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
define({}, "");
} catch (err) {
define = function(obj, key, value) {
return obj[key] = value;
};
}
function wrap(innerFn, outerFn, self, tryLocsList) {
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
var generator = Object.create(protoGenerator.prototype);
var context = new Context(tryLocsList || []);
// The ._invoke method unifies the implementations of the .next,
// .throw, and .return methods.
defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) });
return generator;
}
exports.wrap = wrap;
// Try/catch helper to minimize deoptimizations. Returns a completion
// record like context.tryEntries[i].completion. This interface could
// have been (and was previously) designed to take a closure to be
// invoked without arguments, but in all the cases we care about we
// already have an existing method we want to call, so there's no need
// to create a new function object. We can even get away with assuming
// the method takes exactly one argument, since that happens to be true
// in every case, so we don't have to touch the arguments object. The
// only additional allocation required is the completion record, which
// has a stable shape and so hopefully should be cheap to allocate.
function tryCatch(fn, obj, arg) {
try {
return { type: "normal", arg: fn.call(obj, arg) };
} catch (err) {
return { type: "throw", arg: err };
}
}
var GenStateSuspendedStart = "suspendedStart";
var GenStateSuspendedYield = "suspendedYield";
var GenStateExecuting = "executing";
var GenStateCompleted = "completed";
// Returning this object from the innerFn has the same effect as
// breaking out of the dispatch switch statement.
var ContinueSentinel = {};
// Dummy constructor functions that we use as the .constructor and
// .constructor.prototype properties for functions that return Generator
// objects. For full spec compliance, you may wish to configure your
// minifier not to mangle the names of these two functions.
function Generator() {}
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}
// This is a polyfill for %IteratorPrototype% for environments that
// don't natively support it.
var IteratorPrototype = {};
define(IteratorPrototype, iteratorSymbol, function () {
return this;
});
var getProto = Object.getPrototypeOf;
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
if (NativeIteratorPrototype &&
NativeIteratorPrototype !== Op &&
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
// This environment has a native %IteratorPrototype%; use it instead
// of the polyfill.
IteratorPrototype = NativeIteratorPrototype;
}
var Gp = GeneratorFunctionPrototype.prototype =
Generator.prototype = Object.create(IteratorPrototype);
GeneratorFunction.prototype = GeneratorFunctionPrototype;
defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: true });
defineProperty(
GeneratorFunctionPrototype,
"constructor",
{ value: GeneratorFunction, configurable: true }
);
GeneratorFunction.displayName = define(
GeneratorFunctionPrototype,
toStringTagSymbol,
"GeneratorFunction"
);
// Helper for defining the .next, .throw, and .return methods of the
// Iterator interface in terms of a single ._invoke method.
function defineIteratorMethods(prototype) {
["next", "throw", "return"].forEach(function(method) {
define(prototype, method, function(arg) {
return this._invoke(method, arg);
});
});
}
exports.isGeneratorFunction = function(genFun) {
var ctor = typeof genFun === "function" && genFun.constructor;
return ctor
? ctor === GeneratorFunction ||
// For the native GeneratorFunction constructor, the best we can
// do is to check its .name property.
(ctor.displayName || ctor.name) === "GeneratorFunction"
: false;
};
exports.mark = function(genFun) {
if (Object.setPrototypeOf) {
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
} else {
genFun.__proto__ = GeneratorFunctionPrototype;
define(genFun, toStringTagSymbol, "GeneratorFunction");
}
genFun.prototype = Object.create(Gp);
return genFun;
};
// Within the body of any async function, `await x` is transformed to
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
// `hasOwn.call(value, "__await")` to determine if the yielded value is
// meant to be awaited.
exports.awrap = function(arg) {
return { __await: arg };
};
function AsyncIterator(generator, PromiseImpl) {
function invoke(method, arg, resolve, reject) {
var record = tryCatch(generator[method], generator, arg);
if (record.type === "throw") {
reject(record.arg);
} else {
var result = record.arg;
var value = result.value;
if (value &&
typeof value === "object" &&
hasOwn.call(value, "__await")) {
return PromiseImpl.resolve(value.__await).then(function(value) {
invoke("next", value, resolve, reject);
}, function(err) {
invoke("throw", err, resolve, reject);
});
}
return PromiseImpl.resolve(value).then(function(unwrapped) {
// When a yielded Promise is resolved, its final value becomes
// the .value of the Promise<{value,done}> result for the
// current iteration.
result.value = unwrapped;
resolve(result);
}, function(error) {
// If a rejected Promise was yielded, throw the rejection back
// into the async generator function so it can be handled there.
return invoke("throw", error, resolve, reject);
});
}
}
var previousPromise;
function enqueue(method, arg) {
function callInvokeWithMethodAndArg() {
return new PromiseImpl(function(resolve, reject) {
invoke(method, arg, resolve, reject);
});
}
return previousPromise =
// If enqueue has been called before, then we want to wait until
// all previous Promises have been resolved before calling invoke,
// so that results are always delivered in the correct order. If
// enqueue has not been called before, then it is important to
// call invoke immediately, without waiting on a callback to fire,
// so that the async generator function has the opportunity to do
// any necessary setup in a predictable way. This predictability
// is why the Promise constructor synchronously invokes its
// executor callback, and why async functions synchronously
// execute code before the first await. Since we implement simple
// async functions in terms of async generators, it is especially
// important to get this right, even though it requires care.
previousPromise ? previousPromise.then(
callInvokeWithMethodAndArg,
// Avoid propagating failures to Promises returned by later
// invocations of the iterator.
callInvokeWithMethodAndArg
) : callInvokeWithMethodAndArg();
}
// Define the unified helper method that is used to implement .next,
// .throw, and .return (see defineIteratorMethods).
defineProperty(this, "_invoke", { value: enqueue });
}
defineIteratorMethods(AsyncIterator.prototype);
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
return this;
});
exports.AsyncIterator = AsyncIterator;
// Note that simple async functions are implemented on top of
// AsyncIterator objects; they just return a Promise for the value of
// the final result produced by the iterator.
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
if (PromiseImpl === void 0) PromiseImpl = Promise;
var iter = new AsyncIterator(
wrap(innerFn, outerFn, self, tryLocsList),
PromiseImpl
);
return exports.isGeneratorFunction(outerFn)
? iter // If outerFn is a generator, return the full iterator.
: iter.next().then(function(result) {
return result.done ? result.value : iter.next();
});
};
function makeInvokeMethod(innerFn, self, context) {
var state = GenStateSuspendedStart;
return function invoke(method, arg) {
if (state === GenStateExecuting) {
throw new Error("Generator is already running");
}
if (state === GenStateCompleted) {
if (method === "throw") {
throw arg;
}
// Be forgiving, per 25.3.3.3.3 of the spec:
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
return doneResult();
}
context.method = method;
context.arg = arg;
while (true) {
var delegate = context.delegate;
if (delegate) {
var delegateResult = maybeInvokeDelegate(delegate, context);
if (delegateResult) {
if (delegateResult === ContinueSentinel) continue;
return delegateResult;
}
}
if (context.method === "next") {
// Setting context._sent for legacy support of Babel's
// function.sent implementation.
context.sent = context._sent = context.arg;
} else if (context.method === "throw") {
if (state === GenStateSuspendedStart) {
state = GenStateCompleted;
throw context.arg;
}
context.dispatchException(context.arg);
} else if (context.method === "return") {
context.abrupt("return", context.arg);
}
state = GenStateExecuting;
var record = tryCatch(innerFn, self, context);
if (record.type === "normal") {
// If an exception is thrown from innerFn, we leave state ===
// GenStateExecuting and loop back for another invocation.
state = context.done
? GenStateCompleted
: GenStateSuspendedYield;
if (record.arg === ContinueSentinel) {
continue;
}
return {
value: record.arg,
done: context.done
};
} else if (record.type === "throw") {
state = GenStateCompleted;
// Dispatch the exception by looping back around to the
// context.dispatchException(context.arg) call above.
context.method = "throw";
context.arg = record.arg;
}
}
};
}
// Call delegate.iterator[context.method](context.arg) and handle the
// result, either by returning a { value, done } result from the
// delegate iterator, or by modifying context.method and context.arg,
// setting context.delegate to null, and returning the ContinueSentinel.
function maybeInvokeDelegate(delegate, context) {
var methodName = context.method;
var method = delegate.iterator[methodName];
if (method === undefined) {
// A .throw or .return when the delegate iterator has no .throw
// method, or a missing .next mehtod, always terminate the
// yield* loop.
context.delegate = null;
// Note: ["return"] must be used for ES3 parsing compatibility.
if (methodName === "throw" && delegate.iterator["return"]) {
// If the delegate iterator has a return method, give it a
// chance to clean up.
context.method = "return";
context.arg = undefined;
maybeInvokeDelegate(delegate, context);
if (context.method === "throw") {
// If maybeInvokeDelegate(context) changed context.method from
// "return" to "throw", let that override the TypeError below.
return ContinueSentinel;
}
}
if (methodName !== "return") {
context.method = "throw";
context.arg = new TypeError(
"The iterator does not provide a '" + methodName + "' method");
}
return ContinueSentinel;
}
var record = tryCatch(method, delegate.iterator, context.arg);
if (record.type === "throw") {
context.method = "throw";
context.arg = record.arg;
context.delegate = null;
return ContinueSentinel;
}
var info = record.arg;
if (! info) {
context.method = "throw";
context.arg = new TypeError("iterator result is not an object");
context.delegate = null;
return ContinueSentinel;
}
if (info.done) {
// Assign the result of the finished delegate to the temporary
// variable specified by delegate.resultName (see delegateYield).
context[delegate.resultName] = info.value;
// Resume execution at the desired location (see delegateYield).
context.next = delegate.nextLoc;
// If context.method was "throw" but the delegate handled the
// exception, let the outer generator proceed normally. If
// context.method was "next", forget context.arg since it has been
// "consumed" by the delegate iterator. If context.method was
// "return", allow the original .return call to continue in the
// outer generator.
if (context.method !== "return") {
context.method = "next";
context.arg = undefined;
}
} else {
// Re-yield the result returned by the delegate method.
return info;
}
// The delegate iterator is finished, so forget it and continue with
// the outer generator.
context.delegate = null;
return ContinueSentinel;
}
// Define Generator.prototype.{next,throw,return} in terms of the
// unified ._invoke helper method.
defineIteratorMethods(Gp);
define(Gp, toStringTagSymbol, "Generator");
// A Generator should always return itself as the iterator object when the
// @@iterator function is called on it. Some browsers' implementations of the
// iterator prototype chain incorrectly implement this, causing the Generator
// object to not be returned from this call. This ensures that doesn't happen.
// See https://github.com/facebook/regenerator/issues/274 for more details.
define(Gp, iteratorSymbol, function() {
return this;
});
define(Gp, "toString", function() {
return "[object Generator]";
});
function pushTryEntry(locs) {
var entry = { tryLoc: locs[0] };
if (1 in locs) {
entry.catchLoc = locs[1];
}
if (2 in locs) {
entry.finallyLoc = locs[2];
entry.afterLoc = locs[3];
}
this.tryEntries.push(entry);
}
function resetTryEntry(entry) {
var record = entry.completion || {};
record.type = "normal";
delete record.arg;
entry.completion = record;
}
function Context(tryLocsList) {
// The root entry object (effectively a try statement without a catch
// or a finally block) gives us a place to store values thrown from
// locations where there is no enclosing try statement.
this.tryEntries = [{ tryLoc: "root" }];
tryLocsList.forEach(pushTryEntry, this);
this.reset(true);
}
exports.keys = function(val) {
var object = Object(val);
var keys = [];
for (var key in object) {
keys.push(key);
}
keys.reverse();
// Rather than returning an object with a next method, we keep
// things simple and return the next function itself.
return function next() {
while (keys.length) {
var key = keys.pop();
if (key in object) {
next.value = key;
next.done = false;
return next;
}
}
// To avoid creating an additional object, we just hang the .value
// and .done properties off the next function object itself. This
// also ensures that the minifier will not anonymize the function.
next.done = true;
return next;
};
};
function values(iterable) {
if (iterable || iterable === "") {
var iteratorMethod = iterable[iteratorSymbol];
if (iteratorMethod) {
return iteratorMethod.call(iterable);
}
if (typeof iterable.next === "function") {
return iterable;
}
if (!isNaN(iterable.length)) {
var i = -1, next = function next() {
while (++i < iterable.length) {
if (hasOwn.call(iterable, i)) {
next.value = iterable[i];
next.done = false;
return next;
}
}
next.value = undefined;
next.done = true;
return next;
};
return next.next = next;
}
}
throw new TypeError(typeof iterable + " is not iterable");
}
exports.values = values;
function doneResult() {
return { value: undefined, done: true };
}
Context.prototype = {
constructor: Context,
reset: function(skipTempReset) {
this.prev = 0;
this.next = 0;
// Resetting context._sent for legacy support of Babel's
// function.sent implementation.
this.sent = this._sent = undefined;
this.done = false;
this.delegate = null;
this.method = "next";
this.arg = undefined;
this.tryEntries.forEach(resetTryEntry);
if (!skipTempReset) {
for (var name in this) {
// Not sure about the optimal order of these conditions:
if (name.charAt(0) === "t" &&
hasOwn.call(this, name) &&
!isNaN(+name.slice(1))) {
this[name] = undefined;
}
}
}
},
stop: function() {
this.done = true;
var rootEntry = this.tryEntries[0];
var rootRecord = rootEntry.completion;
if (rootRecord.type === "throw") {
throw rootRecord.arg;
}
return this.rval;
},
dispatchException: function(exception) {
if (this.done) {
throw exception;
}
var context = this;
function handle(loc, caught) {
record.type = "throw";
record.arg = exception;
context.next = loc;
if (caught) {
// If the dispatched exception was caught by a catch block,
// then let that catch block handle the exception normally.
context.method = "next";
context.arg = undefined;
}
return !! caught;
}
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
var record = entry.completion;
if (entry.tryLoc === "root") {
// Exception thrown outside of any try block that could handle
// it, so set the completion value of the entire function to
// throw the exception.
return handle("end");
}
if (entry.tryLoc <= this.prev) {
var hasCatch = hasOwn.call(entry, "catchLoc");
var hasFinally = hasOwn.call(entry, "finallyLoc");
if (hasCatch && hasFinally) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
} else if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else if (hasCatch) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
}
} else if (hasFinally) {
if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else {
throw new Error("try statement without catch or finally");
}
}
}
},
abrupt: function(type, arg) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc <= this.prev &&
hasOwn.call(entry, "finallyLoc") &&
this.prev < entry.finallyLoc) {
var finallyEntry = entry;
break;
}
}
if (finallyEntry &&
(type === "break" ||
type === "continue") &&
finallyEntry.tryLoc <= arg &&
arg <= finallyEntry.finallyLoc) {
// Ignore the finally entry if control is not jumping to a
// location outside the try/catch block.
finallyEntry = null;
}
var record = finallyEntry ? finallyEntry.completion : {};
record.type = type;
record.arg = arg;
if (finallyEntry) {
this.method = "next";
this.next = finallyEntry.finallyLoc;
return ContinueSentinel;
}
return this.complete(record);
},
complete: function(record, afterLoc) {
if (record.type === "throw") {
throw record.arg;
}
if (record.type === "break" ||
record.type === "continue") {
this.next = record.arg;
} else if (record.type === "return") {
this.rval = this.arg = record.arg;
this.method = "return";
this.next = "end";
} else if (record.type === "normal" && afterLoc) {
this.next = afterLoc;
}
return ContinueSentinel;
},
finish: function(finallyLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.finallyLoc === finallyLoc) {
this.complete(entry.completion, entry.afterLoc);
resetTryEntry(entry);
return ContinueSentinel;
}
}
},
"catch": function(tryLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc === tryLoc) {
var record = entry.completion;
if (record.type === "throw") {
var thrown = record.arg;
resetTryEntry(entry);
}
return thrown;
}
}
// The context.catch method must only be called with a location
// argument that corresponds to a known catch block.
throw new Error("illegal catch attempt");
},
delegateYield: function(iterable, resultName, nextLoc) {
this.delegate = {
iterator: values(iterable),
resultName: resultName,
nextLoc: nextLoc
};
if (this.method === "next") {
// Deliberately forget the last sent value so that we don't
// accidentally pass it on to the delegate.
this.arg = undefined;
}
return ContinueSentinel;
}
};
// Regardless of whether this script is executing as a CommonJS module
// or not, return the runtime object so that we can declare the variable
// regeneratorRuntime in the outer scope, which allows this module to be
// injected easily by `bin/regenerator --include-runtime script.js`.
return exports;
}(
// If this script is executing as a CommonJS module, use module.exports
// as the regeneratorRuntime namespace. Otherwise create a new empty
// object. Either way, the resulting object will be used to initialize
// the regeneratorRuntime variable at the top of this file.
typeof module === "object" ? module.exports : {}
));
try {
regeneratorRuntime = runtime;
} catch (accidentalStrictMode) {
// This module should not be running in strict mode, so the above
// assignment should always work unless something is misconfigured. Just
// in case runtime.js accidentally runs in strict mode, in modern engines
// we can explicitly access globalThis. In older engines we can escape
// strict mode using a global Function call. This could conceivably fail
// if a Content Security Policy forbids using Function, but in that case
// the proper solution is to fix the accidental strict mode problem. If
// you've misconfigured your bundler to force strict mode and applied a
// CSP to forbid Function, and you're not willing to fix either of those
// problems, please detail your unique predicament in a GitHub issue.
if (typeof globalThis === "object") {
globalThis.regeneratorRuntime = runtime;
} else {
Function("r", "regeneratorRuntime = r")(runtime);
}
}
regenerator-runtime.min.js 0000644 00000014741 15153765740 0011706 0 ustar 00 var runtime=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i=(w="function"==typeof Symbol?Symbol:{}).iterator||"@@iterator",a=w.asyncIterator||"@@asyncIterator",c=w.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(r){u=function(t,e,r){return t[e]=r}}function h(t,r,n,i){var a,c,u,h;r=r&&r.prototype instanceof v?r:v,r=Object.create(r.prototype),i=new O(i||[]);return o(r,"_invoke",{value:(a=t,c=n,u=i,h=f,function(t,r){if(h===p)throw new Error("Generator is already running");if(h===y){if("throw"===t)throw r;return{value:e,done:!0}}for(u.method=t,u.arg=r;;){var n=u.delegate;if(n&&(n=function t(r,n){var o=n.method,i=r.iterator[o];return i===e?(n.delegate=null,"throw"===o&&r.iterator.return&&(n.method="return",n.arg=e,t(r,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),g):"throw"===(o=l(i,r.iterator,n.arg)).type?(n.method="throw",n.arg=o.arg,n.delegate=null,g):(i=o.arg)?i.done?(n[r.resultName]=i.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}(n,u),n)){if(n===g)continue;return n}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(h===f)throw h=y,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);if(h=p,"normal"===(n=l(a,c,u)).type){if(h=u.done?y:s,n.arg!==g)return{value:n.arg,done:u.done}}else"throw"===n.type&&(h=y,u.method="throw",u.arg=n.arg)}})}),r}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var f="suspendedStart",s="suspendedYield",p="executing",y="completed",g={};function v(){}function d(){}function m(){}var w,b,L=((b=(b=(u(w={},i,(function(){return this})),Object.getPrototypeOf))&&b(b(k([]))))&&b!==r&&n.call(b,i)&&(w=b),m.prototype=v.prototype=Object.create(w));function x(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){var r;o(this,"_invoke",{value:function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,c){var u;if("throw"!==(o=l(t[o],t,i)).type)return(i=(u=o.arg).value)&&"object"==typeof i&&n.call(i,"__await")?e.resolve(i.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(i).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,c)}));c(o.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}})}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function k(t){if(t||""===t){var r,o=t[i];if(o)return o.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return r=-1,(o=function o(){for(;++r<t.length;)if(n.call(t,r))return o.value=t[r],o.done=!1,o;return o.value=e,o.done=!0,o}).next=o}throw new TypeError(typeof t+" is not iterable")}return o(L,"constructor",{value:d.prototype=m,configurable:!0}),o(m,"constructor",{value:d,configurable:!0}),d.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){return!!(t="function"==typeof t&&t.constructor)&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,c,"GeneratorFunction")),t.prototype=Object.create(L),t},t.awrap=function(t){return{__await:t}},x(E.prototype),u(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new E(h(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(L),u(L,c,"Generator"),u(L,i,(function(){return this})),u(L,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,r=Object(t),n=[];for(e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=k,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;0<=i;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),h=n.call(a,"finallyLoc");if(u&&h){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,o=this.tryEntries[e];if(o.tryLoc===t)return"throw"===(r=o.completion).type&&(n=r.arg,_(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}("object"==typeof module?module.exports:{});try{regeneratorRuntime=runtime}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)} wp-polyfill-dom-rect.js 0000644 00000003607 15153765740 0011113 0 ustar 00
// DOMRect
(function (global) {
function number(v) {
return v === undefined ? 0 : Number(v);
}
function different(u, v) {
return u !== v && !(isNaN(u) && isNaN(v));
}
function DOMRect(xArg, yArg, wArg, hArg) {
var x, y, width, height, left, right, top, bottom;
x = number(xArg);
y = number(yArg);
width = number(wArg);
height = number(hArg);
Object.defineProperties(this, {
x: {
get: function () { return x; },
set: function (newX) {
if (different(x, newX)) {
x = newX;
left = right = undefined;
}
},
enumerable: true
},
y: {
get: function () { return y; },
set: function (newY) {
if (different(y, newY)) {
y = newY;
top = bottom = undefined;
}
},
enumerable: true
},
width: {
get: function () { return width; },
set: function (newWidth) {
if (different(width, newWidth)) {
width = newWidth;
left = right = undefined;
}
},
enumerable: true
},
height: {
get: function () { return height; },
set: function (newHeight) {
if (different(height, newHeight)) {
height = newHeight;
top = bottom = undefined;
}
},
enumerable: true
},
left: {
get: function () {
if (left === undefined) {
left = x + Math.min(0, width);
}
return left;
},
enumerable: true
},
right: {
get: function () {
if (right === undefined) {
right = x + Math.max(0, width);
}
return right;
},
enumerable: true
},
top: {
get: function () {
if (top === undefined) {
top = y + Math.min(0, height);
}
return top;
},
enumerable: true
},
bottom: {
get: function () {
if (bottom === undefined) {
bottom = y + Math.max(0, height);
}
return bottom;
},
enumerable: true
}
});
}
global.DOMRect = DOMRect;
}(self));
wp-polyfill-dom-rect.min.js 0000644 00000001541 15153765740 0011670 0 ustar 00 !function(){function e(e){return void 0===e?0:Number(e)}function n(e,n){return!(e===n||isNaN(e)&&isNaN(n))}self.DOMRect=function(t,i,u,r){var o,f,c,a,m=e(t),b=e(i),d=e(u),g=e(r);Object.defineProperties(this,{x:{get:function(){return m},set:function(e){n(m,e)&&(m=e,o=f=void 0)},enumerable:!0},y:{get:function(){return b},set:function(e){n(b,e)&&(b=e,c=a=void 0)},enumerable:!0},width:{get:function(){return d},set:function(e){n(d,e)&&(d=e,o=f=void 0)},enumerable:!0},height:{get:function(){return g},set:function(e){n(g,e)&&(g=e,c=a=void 0)},enumerable:!0},left:{get:function(){return o=void 0===o?m+Math.min(0,d):o},enumerable:!0},right:{get:function(){return f=void 0===f?m+Math.max(0,d):f},enumerable:!0},top:{get:function(){return c=void 0===c?b+Math.min(0,g):c},enumerable:!0},bottom:{get:function(){return a=void 0===a?b+Math.max(0,g):a},enumerable:!0}})}}(); wp-polyfill-element-closest.js 0000644 00000000654 15153765740 0012503 0 ustar 00 !function(e){var t=e.Element.prototype;"function"!=typeof t.matches&&(t.matches=t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),o=0;t[o]&&t[o]!==this;)++o;return Boolean(t[o])}),"function"!=typeof t.closest&&(t.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null})}(window);
wp-polyfill-element-closest.min.js 0000644 00000000652 15153765740 0013263 0 ustar 00 !function(e){var t=window.Element.prototype;"function"!=typeof t.matches&&(t.matches=t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),o=0;t[o]&&t[o]!==this;)++o;return Boolean(t[o])}),"function"!=typeof t.closest&&(t.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null})}(); wp-polyfill-fetch.js 0000644 00000046020 15153765740 0010466 0 ustar 00 (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.WHATWGFetch = {})));
}(this, (function (exports) { 'use strict';
/* eslint-disable no-prototype-builtins */
var g =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof self !== 'undefined' && self) ||
// eslint-disable-next-line no-undef
(typeof global !== 'undefined' && global) ||
{};
var support = {
searchParams: 'URLSearchParams' in g,
iterable: 'Symbol' in g && 'iterator' in Symbol,
blob:
'FileReader' in g &&
'Blob' in g &&
(function() {
try {
new Blob();
return true
} catch (e) {
return false
}
})(),
formData: 'FormData' in g,
arrayBuffer: 'ArrayBuffer' in g
};
function isDataView(obj) {
return obj && DataView.prototype.isPrototypeOf(obj)
}
if (support.arrayBuffer) {
var viewClasses = [
'[object Int8Array]',
'[object Uint8Array]',
'[object Uint8ClampedArray]',
'[object Int16Array]',
'[object Uint16Array]',
'[object Int32Array]',
'[object Uint32Array]',
'[object Float32Array]',
'[object Float64Array]'
];
var isArrayBufferView =
ArrayBuffer.isView ||
function(obj) {
return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
};
}
function normalizeName(name) {
if (typeof name !== 'string') {
name = String(name);
}
if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {
throw new TypeError('Invalid character in header field name: "' + name + '"')
}
return name.toLowerCase()
}
function normalizeValue(value) {
if (typeof value !== 'string') {
value = String(value);
}
return value
}
// Build a destructive iterator for the value list
function iteratorFor(items) {
var iterator = {
next: function() {
var value = items.shift();
return {done: value === undefined, value: value}
}
};
if (support.iterable) {
iterator[Symbol.iterator] = function() {
return iterator
};
}
return iterator
}
function Headers(headers) {
this.map = {};
if (headers instanceof Headers) {
headers.forEach(function(value, name) {
this.append(name, value);
}, this);
} else if (Array.isArray(headers)) {
headers.forEach(function(header) {
if (header.length != 2) {
throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length)
}
this.append(header[0], header[1]);
}, this);
} else if (headers) {
Object.getOwnPropertyNames(headers).forEach(function(name) {
this.append(name, headers[name]);
}, this);
}
}
Headers.prototype.append = function(name, value) {
name = normalizeName(name);
value = normalizeValue(value);
var oldValue = this.map[name];
this.map[name] = oldValue ? oldValue + ', ' + value : value;
};
Headers.prototype['delete'] = function(name) {
delete this.map[normalizeName(name)];
};
Headers.prototype.get = function(name) {
name = normalizeName(name);
return this.has(name) ? this.map[name] : null
};
Headers.prototype.has = function(name) {
return this.map.hasOwnProperty(normalizeName(name))
};
Headers.prototype.set = function(name, value) {
this.map[normalizeName(name)] = normalizeValue(value);
};
Headers.prototype.forEach = function(callback, thisArg) {
for (var name in this.map) {
if (this.map.hasOwnProperty(name)) {
callback.call(thisArg, this.map[name], name, this);
}
}
};
Headers.prototype.keys = function() {
var items = [];
this.forEach(function(value, name) {
items.push(name);
});
return iteratorFor(items)
};
Headers.prototype.values = function() {
var items = [];
this.forEach(function(value) {
items.push(value);
});
return iteratorFor(items)
};
Headers.prototype.entries = function() {
var items = [];
this.forEach(function(value, name) {
items.push([name, value]);
});
return iteratorFor(items)
};
if (support.iterable) {
Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
}
function consumed(body) {
if (body._noBody) return
if (body.bodyUsed) {
return Promise.reject(new TypeError('Already read'))
}
body.bodyUsed = true;
}
function fileReaderReady(reader) {
return new Promise(function(resolve, reject) {
reader.onload = function() {
resolve(reader.result);
};
reader.onerror = function() {
reject(reader.error);
};
})
}
function readBlobAsArrayBuffer(blob) {
var reader = new FileReader();
var promise = fileReaderReady(reader);
reader.readAsArrayBuffer(blob);
return promise
}
function readBlobAsText(blob) {
var reader = new FileReader();
var promise = fileReaderReady(reader);
var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type);
var encoding = match ? match[1] : 'utf-8';
reader.readAsText(blob, encoding);
return promise
}
function readArrayBufferAsText(buf) {
var view = new Uint8Array(buf);
var chars = new Array(view.length);
for (var i = 0; i < view.length; i++) {
chars[i] = String.fromCharCode(view[i]);
}
return chars.join('')
}
function bufferClone(buf) {
if (buf.slice) {
return buf.slice(0)
} else {
var view = new Uint8Array(buf.byteLength);
view.set(new Uint8Array(buf));
return view.buffer
}
}
function Body() {
this.bodyUsed = false;
this._initBody = function(body) {
/*
fetch-mock wraps the Response object in an ES6 Proxy to
provide useful test harness features such as flush. However, on
ES5 browsers without fetch or Proxy support pollyfills must be used;
the proxy-pollyfill is unable to proxy an attribute unless it exists
on the object before the Proxy is created. This change ensures
Response.bodyUsed exists on the instance, while maintaining the
semantic of setting Request.bodyUsed in the constructor before
_initBody is called.
*/
// eslint-disable-next-line no-self-assign
this.bodyUsed = this.bodyUsed;
this._bodyInit = body;
if (!body) {
this._noBody = true;
this._bodyText = '';
} else if (typeof body === 'string') {
this._bodyText = body;
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
this._bodyBlob = body;
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
this._bodyFormData = body;
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
this._bodyText = body.toString();
} else if (support.arrayBuffer && support.blob && isDataView(body)) {
this._bodyArrayBuffer = bufferClone(body.buffer);
// IE 10-11 can't handle a DataView body.
this._bodyInit = new Blob([this._bodyArrayBuffer]);
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
this._bodyArrayBuffer = bufferClone(body);
} else {
this._bodyText = body = Object.prototype.toString.call(body);
}
if (!this.headers.get('content-type')) {
if (typeof body === 'string') {
this.headers.set('content-type', 'text/plain;charset=UTF-8');
} else if (this._bodyBlob && this._bodyBlob.type) {
this.headers.set('content-type', this._bodyBlob.type);
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
}
}
};
if (support.blob) {
this.blob = function() {
var rejected = consumed(this);
if (rejected) {
return rejected
}
if (this._bodyBlob) {
return Promise.resolve(this._bodyBlob)
} else if (this._bodyArrayBuffer) {
return Promise.resolve(new Blob([this._bodyArrayBuffer]))
} else if (this._bodyFormData) {
throw new Error('could not read FormData body as blob')
} else {
return Promise.resolve(new Blob([this._bodyText]))
}
};
}
this.arrayBuffer = function() {
if (this._bodyArrayBuffer) {
var isConsumed = consumed(this);
if (isConsumed) {
return isConsumed
} else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {
return Promise.resolve(
this._bodyArrayBuffer.buffer.slice(
this._bodyArrayBuffer.byteOffset,
this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
)
)
} else {
return Promise.resolve(this._bodyArrayBuffer)
}
} else if (support.blob) {
return this.blob().then(readBlobAsArrayBuffer)
} else {
throw new Error('could not read as ArrayBuffer')
}
};
this.text = function() {
var rejected = consumed(this);
if (rejected) {
return rejected
}
if (this._bodyBlob) {
return readBlobAsText(this._bodyBlob)
} else if (this._bodyArrayBuffer) {
return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
} else if (this._bodyFormData) {
throw new Error('could not read FormData body as text')
} else {
return Promise.resolve(this._bodyText)
}
};
if (support.formData) {
this.formData = function() {
return this.text().then(decode)
};
}
this.json = function() {
return this.text().then(JSON.parse)
};
return this
}
// HTTP methods whose capitalization should be normalized
var methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'];
function normalizeMethod(method) {
var upcased = method.toUpperCase();
return methods.indexOf(upcased) > -1 ? upcased : method
}
function Request(input, options) {
if (!(this instanceof Request)) {
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
}
options = options || {};
var body = options.body;
if (input instanceof Request) {
if (input.bodyUsed) {
throw new TypeError('Already read')
}
this.url = input.url;
this.credentials = input.credentials;
if (!options.headers) {
this.headers = new Headers(input.headers);
}
this.method = input.method;
this.mode = input.mode;
this.signal = input.signal;
if (!body && input._bodyInit != null) {
body = input._bodyInit;
input.bodyUsed = true;
}
} else {
this.url = String(input);
}
this.credentials = options.credentials || this.credentials || 'same-origin';
if (options.headers || !this.headers) {
this.headers = new Headers(options.headers);
}
this.method = normalizeMethod(options.method || this.method || 'GET');
this.mode = options.mode || this.mode || null;
this.signal = options.signal || this.signal || (function () {
if ('AbortController' in g) {
var ctrl = new AbortController();
return ctrl.signal;
}
}());
this.referrer = null;
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
throw new TypeError('Body not allowed for GET or HEAD requests')
}
this._initBody(body);
if (this.method === 'GET' || this.method === 'HEAD') {
if (options.cache === 'no-store' || options.cache === 'no-cache') {
// Search for a '_' parameter in the query string
var reParamSearch = /([?&])_=[^&]*/;
if (reParamSearch.test(this.url)) {
// If it already exists then set the value with the current time
this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime());
} else {
// Otherwise add a new '_' parameter to the end with the current time
var reQueryString = /\?/;
this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime();
}
}
}
}
Request.prototype.clone = function() {
return new Request(this, {body: this._bodyInit})
};
function decode(body) {
var form = new FormData();
body
.trim()
.split('&')
.forEach(function(bytes) {
if (bytes) {
var split = bytes.split('=');
var name = split.shift().replace(/\+/g, ' ');
var value = split.join('=').replace(/\+/g, ' ');
form.append(decodeURIComponent(name), decodeURIComponent(value));
}
});
return form
}
function parseHeaders(rawHeaders) {
var headers = new Headers();
// Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
// https://tools.ietf.org/html/rfc7230#section-3.2
var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
// Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
// https://github.com/github/fetch/issues/748
// https://github.com/zloirock/core-js/issues/751
preProcessedHeaders
.split('\r')
.map(function(header) {
return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header
})
.forEach(function(line) {
var parts = line.split(':');
var key = parts.shift().trim();
if (key) {
var value = parts.join(':').trim();
try {
headers.append(key, value);
} catch (error) {
console.warn('Response ' + error.message);
}
}
});
return headers
}
Body.call(Request.prototype);
function Response(bodyInit, options) {
if (!(this instanceof Response)) {
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
}
if (!options) {
options = {};
}
this.type = 'default';
this.status = options.status === undefined ? 200 : options.status;
if (this.status < 200 || this.status > 599) {
throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].")
}
this.ok = this.status >= 200 && this.status < 300;
this.statusText = options.statusText === undefined ? '' : '' + options.statusText;
this.headers = new Headers(options.headers);
this.url = options.url || '';
this._initBody(bodyInit);
}
Body.call(Response.prototype);
Response.prototype.clone = function() {
return new Response(this._bodyInit, {
status: this.status,
statusText: this.statusText,
headers: new Headers(this.headers),
url: this.url
})
};
Response.error = function() {
var response = new Response(null, {status: 200, statusText: ''});
response.status = 0;
response.type = 'error';
return response
};
var redirectStatuses = [301, 302, 303, 307, 308];
Response.redirect = function(url, status) {
if (redirectStatuses.indexOf(status) === -1) {
throw new RangeError('Invalid status code')
}
return new Response(null, {status: status, headers: {location: url}})
};
exports.DOMException = g.DOMException;
try {
new exports.DOMException();
} catch (err) {
exports.DOMException = function(message, name) {
this.message = message;
this.name = name;
var error = Error(message);
this.stack = error.stack;
};
exports.DOMException.prototype = Object.create(Error.prototype);
exports.DOMException.prototype.constructor = exports.DOMException;
}
function fetch(input, init) {
return new Promise(function(resolve, reject) {
var request = new Request(input, init);
if (request.signal && request.signal.aborted) {
return reject(new exports.DOMException('Aborted', 'AbortError'))
}
var xhr = new XMLHttpRequest();
function abortXhr() {
xhr.abort();
}
xhr.onload = function() {
var options = {
status: xhr.status,
statusText: xhr.statusText,
headers: parseHeaders(xhr.getAllResponseHeaders() || '')
};
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
var body = 'response' in xhr ? xhr.response : xhr.responseText;
setTimeout(function() {
resolve(new Response(body, options));
}, 0);
};
xhr.onerror = function() {
setTimeout(function() {
reject(new TypeError('Network request failed'));
}, 0);
};
xhr.ontimeout = function() {
setTimeout(function() {
reject(new TypeError('Network request failed'));
}, 0);
};
xhr.onabort = function() {
setTimeout(function() {
reject(new exports.DOMException('Aborted', 'AbortError'));
}, 0);
};
function fixUrl(url) {
try {
return url === '' && g.location.href ? g.location.href : url
} catch (e) {
return url
}
}
xhr.open(request.method, fixUrl(request.url), true);
if (request.credentials === 'include') {
xhr.withCredentials = true;
} else if (request.credentials === 'omit') {
xhr.withCredentials = false;
}
if ('responseType' in xhr) {
if (support.blob) {
xhr.responseType = 'blob';
} else if (
support.arrayBuffer
) {
xhr.responseType = 'arraybuffer';
}
}
if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {
var names = [];
Object.getOwnPropertyNames(init.headers).forEach(function(name) {
names.push(normalizeName(name));
xhr.setRequestHeader(name, normalizeValue(init.headers[name]));
});
request.headers.forEach(function(value, name) {
if (names.indexOf(name) === -1) {
xhr.setRequestHeader(name, value);
}
});
} else {
request.headers.forEach(function(value, name) {
xhr.setRequestHeader(name, value);
});
}
if (request.signal) {
request.signal.addEventListener('abort', abortXhr);
xhr.onreadystatechange = function() {
// DONE (success or failure)
if (xhr.readyState === 4) {
request.signal.removeEventListener('abort', abortXhr);
}
};
}
xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
})
}
fetch.polyfill = true;
if (!g.fetch) {
g.fetch = fetch;
g.Headers = Headers;
g.Request = Request;
g.Response = Response;
}
exports.Headers = Headers;
exports.Request = Request;
exports.Response = Response;
exports.fetch = fetch;
Object.defineProperty(exports, '__esModule', { value: true });
})));
wp-polyfill-fetch.min.js 0000644 00000023351 15153765740 0011252 0 ustar 00 !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.WHATWGFetch={})}(this,(function(t){"use strict";var e,r,o="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||{},n="URLSearchParams"in o,i="Symbol"in o&&"iterator"in Symbol,s="FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch(t){return!1}}(),a="FormData"in o,h="ArrayBuffer"in o;function u(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function f(t){return"string"!=typeof t?String(t):t}function d(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return i&&(e[Symbol.iterator]=function(){return e}),e}function c(t){this.map={},t instanceof c?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){if(2!=t.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function y(t){if(!t._noBody)return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function p(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function l(t){var e=new FileReader,r=p(e);return e.readAsArrayBuffer(t),r}function b(t){var e;return t.slice?t.slice(0):((e=new Uint8Array(t.byteLength)).set(new Uint8Array(t)),e.buffer)}function m(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,(this._bodyInit=t)?"string"==typeof t?this._bodyText=t:s&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:a&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():h&&s&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=b(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):h&&(ArrayBuffer.prototype.isPrototypeOf(t)||r(t))?this._bodyArrayBuffer=b(t):this._bodyText=t=Object.prototype.toString.call(t):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var t=y(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer)return y(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer));if(s)return this.blob().then(l);throw new Error("could not read as ArrayBuffer")},this.text=function(){var t,e,r,o=y(this);if(o)return o;if(this._bodyBlob)return o=this._bodyBlob,e=p(t=new FileReader),r=(r=/charset=([A-Za-z0-9_-]+)/.exec(o.type))?r[1]:"utf-8",t.readAsText(o,r),e;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),o=0;o<e.length;o++)r[o]=String.fromCharCode(e[o]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(A)}),this.json=function(){return this.text().then(JSON.parse)},this}h&&(e=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=ArrayBuffer.isView||function(t){return t&&-1<e.indexOf(Object.prototype.toString.call(t))}),c.prototype.append=function(t,e){t=u(t),e=f(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},c.prototype.delete=function(t){delete this.map[u(t)]},c.prototype.get=function(t){return t=u(t),this.has(t)?this.map[t]:null},c.prototype.has=function(t){return this.map.hasOwnProperty(u(t))},c.prototype.set=function(t,e){this.map[u(t)]=f(e)},c.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},c.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),d(t)},c.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),d(t)},c.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),d(t)},i&&(c.prototype[Symbol.iterator]=c.prototype.entries);var w=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function E(t,e){if(!(this instanceof E))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,n=(e=e||{}).body;if(t instanceof E){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new c(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new c(e.headers)),this.method=(r=(t=e.method||this.method||"GET").toUpperCase(),-1<w.indexOf(r)?r:t),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in o)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n),"GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache||((r=/([?&])_=[^&]*/).test(this.url)?this.url=this.url.replace(r,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime())}function A(t){var e=new FormData;return t.trim().split("&").forEach((function(t){var r;t&&(r=(t=t.split("=")).shift().replace(/\+/g," "),t=t.join("=").replace(/\+/g," "),e.append(decodeURIComponent(r),decodeURIComponent(t)))})),e}function g(t,e){if(!(this instanceof g))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e=e||{},this.type="default",this.status=void 0===e.status?200:e.status,this.status<200||599<this.status)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=200<=this.status&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new c(e.headers),this.url=e.url||"",this._initBody(t)}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})},m.call(E.prototype),m.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},g.error=function(){var t=new g(null,{status:200,statusText:""});return t.status=0,t.type="error",t};var T=[301,302,303,307,308];g.redirect=function(t,e){if(-1===T.indexOf(e))throw new RangeError("Invalid status code");return new g(null,{status:e,headers:{location:t}})},t.DOMException=o.DOMException;try{new t.DOMException}catch(d){t.DOMException=function(t,e){this.message=t,this.name=e,e=Error(t),this.stack=e.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function _(e,r){return new Promise((function(n,i){var a=new E(e,r);if(a.signal&&a.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var d,y=new XMLHttpRequest;function p(){y.abort()}y.onload=function(){var t,e,r={status:y.status,statusText:y.statusText,headers:(t=y.getAllResponseHeaders()||"",e=new c,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var r=(t=t.split(":")).shift().trim();if(r){t=t.join(":").trim();try{e.append(r,t)}catch(t){console.warn("Response "+t.message)}}})),e)},o=(r.url="responseURL"in y?y.responseURL:r.headers.get("X-Request-URL"),"response"in y?y.response:y.responseText);setTimeout((function(){n(new g(o,r))}),0)},y.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},y.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},y.onabort=function(){setTimeout((function(){i(new t.DOMException("Aborted","AbortError"))}),0)},y.open(a.method,function(t){try{return""===t&&o.location.href?o.location.href:t}catch(e){return t}}(a.url),!0),"include"===a.credentials?y.withCredentials=!0:"omit"===a.credentials&&(y.withCredentials=!1),"responseType"in y&&(s?y.responseType="blob":h&&(y.responseType="arraybuffer")),r&&"object"==typeof r.headers&&!(r.headers instanceof c||o.Headers&&r.headers instanceof o.Headers)?(d=[],Object.getOwnPropertyNames(r.headers).forEach((function(t){d.push(u(t)),y.setRequestHeader(t,f(r.headers[t]))})),a.headers.forEach((function(t,e){-1===d.indexOf(e)&&y.setRequestHeader(e,t)}))):a.headers.forEach((function(t,e){y.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",p),y.onreadystatechange=function(){4===y.readyState&&a.signal.removeEventListener("abort",p)}),y.send(void 0===a._bodyInit?null:a._bodyInit)}))}_.polyfill=!0,o.fetch||(o.fetch=_,o.Headers=c,o.Request=E,o.Response=g),t.Headers=c,t.Request=E,t.Response=g,t.fetch=_,Object.defineProperty(t,"__esModule",{value:!0})})); wp-polyfill-formdata.js 0000644 00000027142 15153765740 0011176 0 ustar 00 /* formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
/* global FormData self Blob File */
/* eslint-disable no-inner-declarations */
if (typeof Blob !== 'undefined' && (typeof FormData === 'undefined' || !FormData.prototype.keys)) {
const global = typeof globalThis === 'object'
? globalThis
: typeof window === 'object'
? window
: typeof self === 'object' ? self : this
// keep a reference to native implementation
const _FormData = global.FormData
// To be monkey patched
const _send = global.XMLHttpRequest && global.XMLHttpRequest.prototype.send
const _fetch = global.Request && global.fetch
const _sendBeacon = global.navigator && global.navigator.sendBeacon
// Might be a worker thread...
const _match = global.Element && global.Element.prototype
// Unable to patch Request/Response constructor correctly #109
// only way is to use ES6 class extend
// https://github.com/babel/babel/issues/1966
const stringTag = global.Symbol && Symbol.toStringTag
// Add missing stringTags to blob and files
if (stringTag) {
if (!Blob.prototype[stringTag]) {
Blob.prototype[stringTag] = 'Blob'
}
if ('File' in global && !File.prototype[stringTag]) {
File.prototype[stringTag] = 'File'
}
}
// Fix so you can construct your own File
try {
new File([], '') // eslint-disable-line
} catch (a) {
global.File = function File (b, d, c) {
const blob = new Blob(b, c || {})
const t = c && void 0 !== c.lastModified ? new Date(c.lastModified) : new Date()
Object.defineProperties(blob, {
name: {
value: d
},
lastModified: {
value: +t
},
toString: {
value () {
return '[object File]'
}
}
})
if (stringTag) {
Object.defineProperty(blob, stringTag, {
value: 'File'
})
}
return blob
}
}
function ensureArgs (args, expected) {
if (args.length < expected) {
throw new TypeError(`${expected} argument required, but only ${args.length} present.`)
}
}
/**
* @param {string} name
* @param {string | undefined} filename
* @returns {[string, File|string]}
*/
function normalizeArgs (name, value, filename) {
if (value instanceof Blob) {
filename = filename !== undefined
? String(filename + '')
: typeof value.name === 'string'
? value.name
: 'blob'
if (value.name !== filename || Object.prototype.toString.call(value) === '[object Blob]') {
value = new File([value], filename)
}
return [String(name), value]
}
return [String(name), String(value)]
}
// normalize line feeds for textarea
// https://html.spec.whatwg.org/multipage/form-elements.html#textarea-line-break-normalisation-transformation
function normalizeLinefeeds (value) {
return value.replace(/\r?\n|\r/g, '\r\n')
}
/**
* @template T
* @param {ArrayLike<T>} arr
* @param {{ (elm: T): void; }} cb
*/
function each (arr, cb) {
for (let i = 0; i < arr.length; i++) {
cb(arr[i])
}
}
const escape = str => str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22')
/**
* @implements {Iterable}
*/
class FormDataPolyfill {
/**
* FormData class
*
* @param {HTMLFormElement=} form
*/
constructor (form) {
/** @type {[string, string|File][]} */
this._data = []
const self = this
form && each(form.elements, (/** @type {HTMLInputElement} */ elm) => {
if (
!elm.name ||
elm.disabled ||
elm.type === 'submit' ||
elm.type === 'button' ||
elm.matches('form fieldset[disabled] *')
) return
if (elm.type === 'file') {
const files = elm.files && elm.files.length
? elm.files
: [new File([], '', { type: 'application/octet-stream' })] // #78
each(files, file => {
self.append(elm.name, file)
})
} else if (elm.type === 'select-multiple' || elm.type === 'select-one') {
each(elm.options, opt => {
!opt.disabled && opt.selected && self.append(elm.name, opt.value)
})
} else if (elm.type === 'checkbox' || elm.type === 'radio') {
if (elm.checked) self.append(elm.name, elm.value)
} else {
const value = elm.type === 'textarea' ? normalizeLinefeeds(elm.value) : elm.value
self.append(elm.name, value)
}
})
}
/**
* Append a field
*
* @param {string} name field name
* @param {string|Blob|File} value string / blob / file
* @param {string=} filename filename to use with blob
* @return {undefined}
*/
append (name, value, filename) {
ensureArgs(arguments, 2)
this._data.push(normalizeArgs(name, value, filename))
}
/**
* Delete all fields values given name
*
* @param {string} name Field name
* @return {undefined}
*/
delete (name) {
ensureArgs(arguments, 1)
const result = []
name = String(name)
each(this._data, entry => {
entry[0] !== name && result.push(entry)
})
this._data = result
}
/**
* Iterate over all fields as [name, value]
*
* @return {Iterator}
*/
* entries () {
for (var i = 0; i < this._data.length; i++) {
yield this._data[i]
}
}
/**
* Iterate over all fields
*
* @param {Function} callback Executed for each item with parameters (value, name, thisArg)
* @param {Object=} thisArg `this` context for callback function
*/
forEach (callback, thisArg) {
ensureArgs(arguments, 1)
for (const [name, value] of this) {
callback.call(thisArg, value, name, this)
}
}
/**
* Return first field value given name
* or null if non existent
*
* @param {string} name Field name
* @return {string|File|null} value Fields value
*/
get (name) {
ensureArgs(arguments, 1)
const entries = this._data
name = String(name)
for (let i = 0; i < entries.length; i++) {
if (entries[i][0] === name) {
return entries[i][1]
}
}
return null
}
/**
* Return all fields values given name
*
* @param {string} name Fields name
* @return {Array} [{String|File}]
*/
getAll (name) {
ensureArgs(arguments, 1)
const result = []
name = String(name)
each(this._data, data => {
data[0] === name && result.push(data[1])
})
return result
}
/**
* Check for field name existence
*
* @param {string} name Field name
* @return {boolean}
*/
has (name) {
ensureArgs(arguments, 1)
name = String(name)
for (let i = 0; i < this._data.length; i++) {
if (this._data[i][0] === name) {
return true
}
}
return false
}
/**
* Iterate over all fields name
*
* @return {Iterator}
*/
* keys () {
for (const [name] of this) {
yield name
}
}
/**
* Overwrite all values given name
*
* @param {string} name Filed name
* @param {string} value Field value
* @param {string=} filename Filename (optional)
*/
set (name, value, filename) {
ensureArgs(arguments, 2)
name = String(name)
/** @type {[string, string|File][]} */
const result = []
const args = normalizeArgs(name, value, filename)
let replace = true
// - replace the first occurrence with same name
// - discards the remaining with same name
// - while keeping the same order items where added
each(this._data, data => {
data[0] === name
? replace && (replace = !result.push(args))
: result.push(data)
})
replace && result.push(args)
this._data = result
}
/**
* Iterate over all fields
*
* @return {Iterator}
*/
* values () {
for (const [, value] of this) {
yield value
}
}
/**
* Return a native (perhaps degraded) FormData with only a `append` method
* Can throw if it's not supported
*
* @return {FormData}
*/
['_asNative'] () {
const fd = new _FormData()
for (const [name, value] of this) {
fd.append(name, value)
}
return fd
}
/**
* [_blob description]
*
* @return {Blob} [description]
*/
['_blob'] () {
const boundary = '----formdata-polyfill-' + Math.random(),
chunks = [],
p = `--${boundary}\r\nContent-Disposition: form-data; name="`
this.forEach((value, name) => typeof value == 'string'
? chunks.push(p + escape(normalizeLinefeeds(name)) + `"\r\n\r\n${normalizeLinefeeds(value)}\r\n`)
: chunks.push(p + escape(normalizeLinefeeds(name)) + `"; filename="${escape(value.name)}"\r\nContent-Type: ${value.type||"application/octet-stream"}\r\n\r\n`, value, `\r\n`))
chunks.push(`--${boundary}--`)
return new Blob(chunks, {
type: "multipart/form-data; boundary=" + boundary
})
}
/**
* The class itself is iterable
* alias for formdata.entries()
*
* @return {Iterator}
*/
[Symbol.iterator] () {
return this.entries()
}
/**
* Create the default string description.
*
* @return {string} [object FormData]
*/
toString () {
return '[object FormData]'
}
}
if (_match && !_match.matches) {
_match.matches =
_match.matchesSelector ||
_match.mozMatchesSelector ||
_match.msMatchesSelector ||
_match.oMatchesSelector ||
_match.webkitMatchesSelector ||
function (s) {
var matches = (this.document || this.ownerDocument).querySelectorAll(s)
var i = matches.length
while (--i >= 0 && matches.item(i) !== this) {}
return i > -1
}
}
if (stringTag) {
/**
* Create the default string description.
* It is accessed internally by the Object.prototype.toString().
*/
FormDataPolyfill.prototype[stringTag] = 'FormData'
}
// Patch xhr's send method to call _blob transparently
if (_send) {
const setRequestHeader = global.XMLHttpRequest.prototype.setRequestHeader
global.XMLHttpRequest.prototype.setRequestHeader = function (name, value) {
setRequestHeader.call(this, name, value)
if (name.toLowerCase() === 'content-type') this._hasContentType = true
}
global.XMLHttpRequest.prototype.send = function (data) {
// need to patch send b/c old IE don't send blob's type (#44)
if (data instanceof FormDataPolyfill) {
const blob = data['_blob']()
if (!this._hasContentType) this.setRequestHeader('Content-Type', blob.type)
_send.call(this, blob)
} else {
_send.call(this, data)
}
}
}
// Patch fetch's function to call _blob transparently
if (_fetch) {
global.fetch = function (input, init) {
if (init && init.body && init.body instanceof FormDataPolyfill) {
init.body = init.body['_blob']()
}
return _fetch.call(this, input, init)
}
}
// Patch navigator.sendBeacon to use native FormData
if (_sendBeacon) {
global.navigator.sendBeacon = function (url, data) {
if (data instanceof FormDataPolyfill) {
data = data['_asNative']()
}
return _sendBeacon.call(this, url, data)
}
}
global['FormData'] = FormDataPolyfill
}
wp-polyfill-formdata.min.js 0000644 00000021106 15153765740 0011752 0 ustar 00 /*! formdata-polyfill. MIT License. Jimmy W?rting <https://jimmy.warting.se/opensource> */
!function(){var t;function e(t){var e=0;return function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}}var n="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){return t==Array.prototype||t==Object.prototype||(t[e]=n.value),t};var r,o=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var e=0;e<t.length;++e){var n=t[e];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}(this);function i(t,e){if(e)t:{var r=o;t=t.split(".");for(var i=0;i<t.length-1;i++){var a=t[i];if(!(a in r))break t;r=r[a]}(e=e(i=r[t=t[t.length-1]]))!=i&&null!=e&&n(r,t,{configurable:!0,writable:!0,value:e})}}function a(t){return(t={next:t})[Symbol.iterator]=function(){return this},t}function u(t){var n="undefined"!=typeof Symbol&&Symbol.iterator&&t[Symbol.iterator];return n?n.call(t):{next:e(t)}}if(i("Symbol",(function(t){function e(t,e){this.A=t,n(this,"description",{configurable:!0,writable:!0,value:e})}if(t)return t;e.prototype.toString=function(){return this.A};var r="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",o=0;return function t(n){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return new e(r+(n||"")+"_"+o++,n)}})),i("Symbol.iterator",(function(t){if(t)return t;t=Symbol("Symbol.iterator");for(var r="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),i=0;i<r.length;i++){var u=o[r[i]];"function"==typeof u&&"function"!=typeof u.prototype[t]&&n(u.prototype,t,{configurable:!0,writable:!0,value:function(){return a(e(this))}})}return t})),"function"==typeof Object.setPrototypeOf)r=Object.setPrototypeOf;else{var l;t:{var s={};try{s.__proto__={a:!0},l=s.a;break t}catch(t){}l=!1}r=l?function(t,e){if(t.__proto__=e,t.__proto__!==e)throw new TypeError(t+" is not extensible");return t}:null}var f=r;function c(){this.m=!1,this.j=null,this.v=void 0,this.h=1,this.u=this.C=0,this.l=null}function h(t){if(t.m)throw new TypeError("Generator is already running");t.m=!0}function p(t,e){return t.h=3,{value:e}}function y(t){this.g=new c,this.G=t}function v(t,e,n,r){try{var o=e.call(t.g.j,n);if(!(o instanceof Object))throw new TypeError("Iterator result "+o+" is not an object");if(!o.done)return t.g.m=!1,o;var i=o.value}catch(e){return t.g.j=null,t.g.s(e),g(t)}return t.g.j=null,r.call(t.g,i),g(t)}function g(t){for(;t.g.h;)try{var e=t.G(t.g);if(e)return t.g.m=!1,{value:e.value,done:!1}}catch(e){t.g.v=void 0,t.g.s(e)}if(t.g.m=!1,t.g.l){if(e=t.g.l,t.g.l=null,e.F)throw e.D;return{value:e.return,done:!0}}return{value:void 0,done:!0}}function d(t){this.next=function(e){return t.o(e)},this.throw=function(e){return t.s(e)},this.return=function(e){return function(t,e){h(t.g);var n=t.g.j;return n?v(t,"return"in n?n.return:function(t){return{value:t,done:!0}},e,t.g.return):(t.g.return(e),g(t))}(t,e)},this[Symbol.iterator]=function(){return this}}function b(t,e){return e=new d(new y(e)),f&&t.prototype&&f(e,t.prototype),e}if(c.prototype.o=function(t){this.v=t},c.prototype.s=function(t){this.l={D:t,F:!0},this.h=this.C||this.u},c.prototype.return=function(t){this.l={return:t},this.h=this.u},y.prototype.o=function(t){return h(this.g),this.g.j?v(this,this.g.j.next,t,this.g.o):(this.g.o(t),g(this))},y.prototype.s=function(t){return h(this.g),this.g.j?v(this,this.g.j.throw,t,this.g.o):(this.g.s(t),g(this))},i("Array.prototype.entries",(function(t){return t||function(){return function(t,e){t instanceof String&&(t+="");var n=0,r=!1,o={next:function(){if(!r&&n<t.length){var o=n++;return{value:e(o,t[o]),done:!1}}return r=!0,{done:!0,value:void 0}}};return o[Symbol.iterator]=function(){return o},o}(this,(function(t,e){return[t,e]}))}})),"undefined"!=typeof Blob&&("undefined"==typeof FormData||!FormData.prototype.keys)){var m=function(t,e){for(var n=0;n<t.length;n++)e(t[n])},w=function(t){return t.replace(/\r?\n|\r/g,"\r\n")},S=function(t,e,n){return e instanceof Blob?(n=void 0!==n?String(n+""):"string"==typeof e.name?e.name:"blob",e.name===n&&"[object Blob]"!==Object.prototype.toString.call(e)||(e=new File([e],n)),[String(t),e]):[String(t),String(e)]},j=function(t,e){if(t.length<e)throw new TypeError(e+" argument required, but only "+t.length+" present.")},x="object"==typeof globalThis?globalThis:"object"==typeof window?window:"object"==typeof self?self:this,_=x.FormData,F=x.XMLHttpRequest&&x.XMLHttpRequest.prototype.send,A=x.Request&&x.fetch,M=x.navigator&&x.navigator.sendBeacon,D=x.Element&&x.Element.prototype,B=x.Symbol&&Symbol.toStringTag;B&&(Blob.prototype[B]||(Blob.prototype[B]="Blob"),"File"in x&&!File.prototype[B]&&(File.prototype[B]="File"));try{new File([],"")}catch(t){x.File=function(t,e,n){return t=new Blob(t,n||{}),Object.defineProperties(t,{name:{value:e},lastModified:{value:+(n&&void 0!==n.lastModified?new Date(n.lastModified):new Date)},toString:{value:function(){return"[object File]"}}}),B&&Object.defineProperty(t,B,{value:"File"}),t}}var T=function(t){return t.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22")},q=function(t){this.i=[];var e=this;t&&m(t.elements,(function(t){if(t.name&&!t.disabled&&"submit"!==t.type&&"button"!==t.type&&!t.matches("form fieldset[disabled] *"))if("file"===t.type){var n=t.files&&t.files.length?t.files:[new File([],"",{type:"application/octet-stream"})];m(n,(function(n){e.append(t.name,n)}))}else"select-multiple"===t.type||"select-one"===t.type?m(t.options,(function(n){!n.disabled&&n.selected&&e.append(t.name,n.value)})):"checkbox"===t.type||"radio"===t.type?t.checked&&e.append(t.name,t.value):(n="textarea"===t.type?w(t.value):t.value,e.append(t.name,n))}))};if((t=q.prototype).append=function(t,e,n){j(arguments,2),this.i.push(S(t,e,n))},t.delete=function(t){j(arguments,1);var e=[];t=String(t),m(this.i,(function(n){n[0]!==t&&e.push(n)})),this.i=e},t.entries=function t(){var e,n=this;return b(t,(function(t){if(1==t.h&&(e=0),3!=t.h)return e<n.i.length?t=p(t,n.i[e]):(t.h=0,t=void 0),t;e++,t.h=2}))},t.forEach=function(t,e){j(arguments,1);for(var n=u(this),r=n.next();!r.done;r=n.next()){var o=u(r.value);r=o.next().value,o=o.next().value,t.call(e,o,r,this)}},t.get=function(t){j(arguments,1);var e=this.i;t=String(t);for(var n=0;n<e.length;n++)if(e[n][0]===t)return e[n][1];return null},t.getAll=function(t){j(arguments,1);var e=[];return t=String(t),m(this.i,(function(n){n[0]===t&&e.push(n[1])})),e},t.has=function(t){j(arguments,1),t=String(t);for(var e=0;e<this.i.length;e++)if(this.i[e][0]===t)return!0;return!1},t.keys=function t(){var e,n,r,o,i=this;return b(t,(function(t){if(1==t.h&&(e=u(i),n=e.next()),3!=t.h)return n.done?void(t.h=0):(r=n.value,o=u(r),p(t,o.next().value));n=e.next(),t.h=2}))},t.set=function(t,e,n){j(arguments,2),t=String(t);var r=[],o=S(t,e,n),i=!0;m(this.i,(function(e){e[0]===t?i&&(i=!r.push(o)):r.push(e)})),i&&r.push(o),this.i=r},t.values=function t(){var e,n,r,o,i=this;return b(t,(function(t){if(1==t.h&&(e=u(i),n=e.next()),3!=t.h)return n.done?void(t.h=0):(r=n.value,(o=u(r)).next(),p(t,o.next().value));n=e.next(),t.h=2}))},q.prototype._asNative=function(){for(var t=new _,e=u(this),n=e.next();!n.done;n=e.next()){var r=u(n.value);n=r.next().value,r=r.next().value,t.append(n,r)}return t},q.prototype._blob=function(){var t="----formdata-polyfill-"+Math.random(),e=[],n="--"+t+'\r\nContent-Disposition: form-data; name="';return this.forEach((function(t,r){return"string"==typeof t?e.push(n+T(w(r))+'"\r\n\r\n'+w(t)+"\r\n"):e.push(n+T(w(r))+'"; filename="'+T(t.name)+'"\r\nContent-Type: '+(t.type||"application/octet-stream")+"\r\n\r\n",t,"\r\n")})),e.push("--"+t+"--"),new Blob(e,{type:"multipart/form-data; boundary="+t})},q.prototype[Symbol.iterator]=function(){return this.entries()},q.prototype.toString=function(){return"[object FormData]"},D&&!D.matches&&(D.matches=D.matchesSelector||D.mozMatchesSelector||D.msMatchesSelector||D.oMatchesSelector||D.webkitMatchesSelector||function(t){for(var e=(t=(this.document||this.ownerDocument).querySelectorAll(t)).length;0<=--e&&t.item(e)!==this;);return-1<e}),B&&(q.prototype[B]="FormData"),F){var O=x.XMLHttpRequest.prototype.setRequestHeader;x.XMLHttpRequest.prototype.setRequestHeader=function(t,e){O.call(this,t,e),"content-type"===t.toLowerCase()&&(this.B=!0)},x.XMLHttpRequest.prototype.send=function(t){t instanceof q?(t=t._blob(),this.B||this.setRequestHeader("Content-Type",t.type),F.call(this,t)):F.call(this,t)}}A&&(x.fetch=function(t,e){return e&&e.body&&e.body instanceof q&&(e.body=e.body._blob()),A.call(this,t,e)}),M&&(x.navigator.sendBeacon=function(t,e){return e instanceof q&&(e=e._asNative()),M.call(this,t,e)}),x.FormData=q}}(); wp-polyfill-importmap.js 0000644 00000143601 15153765740 0011410 0 ustar 00 /* ES Module Shims Wasm 1.8.2 */
(function () {
const hasWindow = typeof window !== 'undefined';
const hasDocument = typeof document !== 'undefined';
const noop = () => {};
const optionsScript = hasDocument ? document.querySelector('script[type=esms-options]') : undefined;
const esmsInitOptions = optionsScript ? JSON.parse(optionsScript.innerHTML) : {};
Object.assign(esmsInitOptions, self.esmsInitOptions || {});
let shimMode = hasDocument ? !!esmsInitOptions.shimMode : true;
const importHook = globalHook(shimMode && esmsInitOptions.onimport);
const resolveHook = globalHook(shimMode && esmsInitOptions.resolve);
let fetchHook = esmsInitOptions.fetch ? globalHook(esmsInitOptions.fetch) : fetch;
const metaHook = esmsInitOptions.meta ? globalHook(shimMode && esmsInitOptions.meta) : noop;
const mapOverrides = esmsInitOptions.mapOverrides;
let nonce = esmsInitOptions.nonce;
if (!nonce && hasDocument) {
const nonceElement = document.querySelector('script[nonce]');
if (nonceElement)
nonce = nonceElement.nonce || nonceElement.getAttribute('nonce');
}
const onerror = globalHook(esmsInitOptions.onerror || noop);
const onpolyfill = esmsInitOptions.onpolyfill ? globalHook(esmsInitOptions.onpolyfill) : () => {
console.log('%c^^ Module TypeError above is polyfilled and can be ignored ^^', 'font-weight:900;color:#391');
};
const { revokeBlobURLs, noLoadEventRetriggers, enforceIntegrity } = esmsInitOptions;
function globalHook (name) {
return typeof name === 'string' ? self[name] : name;
}
const enable = Array.isArray(esmsInitOptions.polyfillEnable) ? esmsInitOptions.polyfillEnable : [];
const cssModulesEnabled = enable.includes('css-modules');
const jsonModulesEnabled = enable.includes('json-modules');
const edge = !navigator.userAgentData && !!navigator.userAgent.match(/Edge\/\d+\.\d+/);
const baseUrl = hasDocument
? document.baseURI
: `${location.protocol}//${location.host}${location.pathname.includes('/')
? location.pathname.slice(0, location.pathname.lastIndexOf('/') + 1)
: location.pathname}`;
const createBlob = (source, type = 'text/javascript') => URL.createObjectURL(new Blob([source], { type }));
let { skip } = esmsInitOptions;
if (Array.isArray(skip)) {
const l = skip.map(s => new URL(s, baseUrl).href);
skip = s => l.some(i => i[i.length - 1] === '/' && s.startsWith(i) || s === i);
}
else if (typeof skip === 'string') {
const r = new RegExp(skip);
skip = s => r.test(s);
} else if (skip instanceof RegExp) {
skip = s => skip.test(s);
}
const eoop = err => setTimeout(() => { throw err });
const throwError = err => { (self.reportError || hasWindow && window.safari && console.error || eoop)(err), void onerror(err); };
function fromParent (parent) {
return parent ? ` imported from ${parent}` : '';
}
let importMapSrcOrLazy = false;
function setImportMapSrcOrLazy () {
importMapSrcOrLazy = true;
}
// shim mode is determined on initialization, no late shim mode
if (!shimMode) {
if (document.querySelectorAll('script[type=module-shim],script[type=importmap-shim],link[rel=modulepreload-shim]').length) {
shimMode = true;
}
else {
let seenScript = false;
for (const script of document.querySelectorAll('script[type=module],script[type=importmap]')) {
if (!seenScript) {
if (script.type === 'module' && !script.ep)
seenScript = true;
}
else if (script.type === 'importmap' && seenScript) {
importMapSrcOrLazy = true;
break;
}
}
}
}
const backslashRegEx = /\\/g;
function asURL (url) {
try {
if (url.indexOf(':') !== -1)
return new URL(url).href;
}
catch (_) {}
}
function resolveUrl (relUrl, parentUrl) {
return resolveIfNotPlainOrUrl(relUrl, parentUrl) || (asURL(relUrl) || resolveIfNotPlainOrUrl('./' + relUrl, parentUrl));
}
function resolveIfNotPlainOrUrl (relUrl, parentUrl) {
const hIdx = parentUrl.indexOf('#'), qIdx = parentUrl.indexOf('?');
if (hIdx + qIdx > -2)
parentUrl = parentUrl.slice(0, hIdx === -1 ? qIdx : qIdx === -1 || qIdx > hIdx ? hIdx : qIdx);
if (relUrl.indexOf('\\') !== -1)
relUrl = relUrl.replace(backslashRegEx, '/');
// protocol-relative
if (relUrl[0] === '/' && relUrl[1] === '/') {
return parentUrl.slice(0, parentUrl.indexOf(':') + 1) + relUrl;
}
// relative-url
else if (relUrl[0] === '.' && (relUrl[1] === '/' || relUrl[1] === '.' && (relUrl[2] === '/' || relUrl.length === 2 && (relUrl += '/')) ||
relUrl.length === 1 && (relUrl += '/')) ||
relUrl[0] === '/') {
const parentProtocol = parentUrl.slice(0, parentUrl.indexOf(':') + 1);
if (parentProtocol === 'blob:') {
throw new TypeError(`Failed to resolve module specifier "${relUrl}". Invalid relative url or base scheme isn't hierarchical.`);
}
// Disabled, but these cases will give inconsistent results for deep backtracking
//if (parentUrl[parentProtocol.length] !== '/')
// throw new Error('Cannot resolve');
// read pathname from parent URL
// pathname taken to be part after leading "/"
let pathname;
if (parentUrl[parentProtocol.length + 1] === '/') {
// resolving to a :// so we need to read out the auth and host
if (parentProtocol !== 'file:') {
pathname = parentUrl.slice(parentProtocol.length + 2);
pathname = pathname.slice(pathname.indexOf('/') + 1);
}
else {
pathname = parentUrl.slice(8);
}
}
else {
// resolving to :/ so pathname is the /... part
pathname = parentUrl.slice(parentProtocol.length + (parentUrl[parentProtocol.length] === '/'));
}
if (relUrl[0] === '/')
return parentUrl.slice(0, parentUrl.length - pathname.length - 1) + relUrl;
// join together and split for removal of .. and . segments
// looping the string instead of anything fancy for perf reasons
// '../../../../../z' resolved to 'x/y' is just 'z'
const segmented = pathname.slice(0, pathname.lastIndexOf('/') + 1) + relUrl;
const output = [];
let segmentIndex = -1;
for (let i = 0; i < segmented.length; i++) {
// busy reading a segment - only terminate on '/'
if (segmentIndex !== -1) {
if (segmented[i] === '/') {
output.push(segmented.slice(segmentIndex, i + 1));
segmentIndex = -1;
}
continue;
}
// new segment - check if it is relative
else if (segmented[i] === '.') {
// ../ segment
if (segmented[i + 1] === '.' && (segmented[i + 2] === '/' || i + 2 === segmented.length)) {
output.pop();
i += 2;
continue;
}
// ./ segment
else if (segmented[i + 1] === '/' || i + 1 === segmented.length) {
i += 1;
continue;
}
}
// it is the start of a new segment
while (segmented[i] === '/') i++;
segmentIndex = i;
}
// finish reading out the last segment
if (segmentIndex !== -1)
output.push(segmented.slice(segmentIndex));
return parentUrl.slice(0, parentUrl.length - pathname.length) + output.join('');
}
}
function resolveAndComposeImportMap (json, baseUrl, parentMap) {
const outMap = { imports: Object.assign({}, parentMap.imports), scopes: Object.assign({}, parentMap.scopes) };
if (json.imports)
resolveAndComposePackages(json.imports, outMap.imports, baseUrl, parentMap);
if (json.scopes)
for (let s in json.scopes) {
const resolvedScope = resolveUrl(s, baseUrl);
resolveAndComposePackages(json.scopes[s], outMap.scopes[resolvedScope] || (outMap.scopes[resolvedScope] = {}), baseUrl, parentMap);
}
return outMap;
}
function getMatch (path, matchObj) {
if (matchObj[path])
return path;
let sepIndex = path.length;
do {
const segment = path.slice(0, sepIndex + 1);
if (segment in matchObj)
return segment;
} while ((sepIndex = path.lastIndexOf('/', sepIndex - 1)) !== -1)
}
function applyPackages (id, packages) {
const pkgName = getMatch(id, packages);
if (pkgName) {
const pkg = packages[pkgName];
if (pkg === null) return;
return pkg + id.slice(pkgName.length);
}
}
function resolveImportMap (importMap, resolvedOrPlain, parentUrl) {
let scopeUrl = parentUrl && getMatch(parentUrl, importMap.scopes);
while (scopeUrl) {
const packageResolution = applyPackages(resolvedOrPlain, importMap.scopes[scopeUrl]);
if (packageResolution)
return packageResolution;
scopeUrl = getMatch(scopeUrl.slice(0, scopeUrl.lastIndexOf('/')), importMap.scopes);
}
return applyPackages(resolvedOrPlain, importMap.imports) || resolvedOrPlain.indexOf(':') !== -1 && resolvedOrPlain;
}
function resolveAndComposePackages (packages, outPackages, baseUrl, parentMap) {
for (let p in packages) {
const resolvedLhs = resolveIfNotPlainOrUrl(p, baseUrl) || p;
if ((!shimMode || !mapOverrides) && outPackages[resolvedLhs] && (outPackages[resolvedLhs] !== packages[resolvedLhs])) {
throw Error(`Rejected map override "${resolvedLhs}" from ${outPackages[resolvedLhs]} to ${packages[resolvedLhs]}.`);
}
let target = packages[p];
if (typeof target !== 'string')
continue;
const mapped = resolveImportMap(parentMap, resolveIfNotPlainOrUrl(target, baseUrl) || target, baseUrl);
if (mapped) {
outPackages[resolvedLhs] = mapped;
continue;
}
console.warn(`Mapping "${p}" -> "${packages[p]}" does not resolve`);
}
}
let dynamicImport = !hasDocument && (0, eval)('u=>import(u)');
let supportsDynamicImport;
const dynamicImportCheck = hasDocument && new Promise(resolve => {
const s = Object.assign(document.createElement('script'), {
src: createBlob('self._d=u=>import(u)'),
ep: true
});
s.setAttribute('nonce', nonce);
s.addEventListener('load', () => {
if (!(supportsDynamicImport = !!(dynamicImport = self._d))) {
let err;
window.addEventListener('error', _err => err = _err);
dynamicImport = (url, opts) => new Promise((resolve, reject) => {
const s = Object.assign(document.createElement('script'), {
type: 'module',
src: createBlob(`import*as m from'${url}';self._esmsi=m`)
});
err = undefined;
s.ep = true;
if (nonce)
s.setAttribute('nonce', nonce);
// Safari is unique in supporting module script error events
s.addEventListener('error', cb);
s.addEventListener('load', cb);
function cb (_err) {
document.head.removeChild(s);
if (self._esmsi) {
resolve(self._esmsi, baseUrl);
self._esmsi = undefined;
}
else {
reject(!(_err instanceof Event) && _err || err && err.error || new Error(`Error loading ${opts && opts.errUrl || url} (${s.src}).`));
err = undefined;
}
}
document.head.appendChild(s);
});
}
document.head.removeChild(s);
delete self._d;
resolve();
});
document.head.appendChild(s);
});
// support browsers without dynamic import support (eg Firefox 6x)
let supportsJsonAssertions = false;
let supportsCssAssertions = false;
const supports = hasDocument && HTMLScriptElement.supports;
let supportsImportMaps = supports && supports.name === 'supports' && supports('importmap');
let supportsImportMeta = supportsDynamicImport;
const importMetaCheck = 'import.meta';
const cssModulesCheck = `import"x"assert{type:"css"}`;
const jsonModulesCheck = `import"x"assert{type:"json"}`;
let featureDetectionPromise = Promise.resolve(dynamicImportCheck).then(() => {
if (!supportsDynamicImport)
return;
if (!hasDocument)
return Promise.all([
supportsImportMaps || dynamicImport(createBlob(importMetaCheck)).then(() => supportsImportMeta = true, noop),
cssModulesEnabled && dynamicImport(createBlob(cssModulesCheck.replace('x', createBlob('', 'text/css')))).then(() => supportsCssAssertions = true, noop),
jsonModulesEnabled && dynamicImport(createBlob(jsonModulescheck.replace('x', createBlob('{}', 'text/json')))).then(() => supportsJsonAssertions = true, noop),
]);
return new Promise(resolve => {
const iframe = document.createElement('iframe');
iframe.style.display = 'none';
iframe.setAttribute('nonce', nonce);
function cb ({ data }) {
const isFeatureDetectionMessage = Array.isArray(data) && data[0] === 'esms';
if (!isFeatureDetectionMessage) {
return;
}
supportsImportMaps = data[1];
supportsImportMeta = data[2];
supportsCssAssertions = data[3];
supportsJsonAssertions = data[4];
resolve();
document.head.removeChild(iframe);
window.removeEventListener('message', cb, false);
}
window.addEventListener('message', cb, false);
const importMapTest = `<script nonce=${nonce || ''}>b=(s,type='text/javascript')=>URL.createObjectURL(new Blob([s],{type}));document.head.appendChild(Object.assign(document.createElement('script'),{type:'importmap',nonce:"${nonce}",innerText:\`{"imports":{"x":"\${b('')}"}}\`}));Promise.all([${
supportsImportMaps ? 'true,true' : `'x',b('${importMetaCheck}')`}, ${cssModulesEnabled ? `b('${cssModulesCheck}'.replace('x',b('','text/css')))` : 'false'}, ${
jsonModulesEnabled ? `b('${jsonModulesCheck}'.replace('x',b('{}','text/json')))` : 'false'}].map(x =>typeof x==='string'?import(x).then(x =>!!x,()=>false):x)).then(a=>parent.postMessage(['esms'].concat(a),'*'))<${''}/script>`;
// Safari will call onload eagerly on head injection, but we don't want the Wechat
// path to trigger before setting srcdoc, therefore we track the timing
let readyForOnload = false, onloadCalledWhileNotReady = false;
function doOnload () {
if (!readyForOnload) {
onloadCalledWhileNotReady = true;
return;
}
// WeChat browser doesn't support setting srcdoc scripts
// But iframe sandboxes don't support contentDocument so we do this as a fallback
const doc = iframe.contentDocument;
if (doc && doc.head.childNodes.length === 0) {
const s = doc.createElement('script');
if (nonce)
s.setAttribute('nonce', nonce);
s.innerHTML = importMapTest.slice(15 + (nonce ? nonce.length : 0), -9);
doc.head.appendChild(s);
}
}
iframe.onload = doOnload;
// WeChat browser requires append before setting srcdoc
document.head.appendChild(iframe);
// setting srcdoc is not supported in React native webviews on iOS
// setting src to a blob URL results in a navigation event in webviews
// document.write gives usability warnings
readyForOnload = true;
if ('srcdoc' in iframe)
iframe.srcdoc = importMapTest;
else
iframe.contentDocument.write(importMapTest);
// retrigger onload for Safari only if necessary
if (onloadCalledWhileNotReady) doOnload();
});
});
/* es-module-lexer 1.4.1 */
const A=1===new Uint8Array(new Uint16Array([1]).buffer)[0];function parse(E,g="@"){if(!C)return init.then((()=>parse(E)));const I=E.length+1,k=(C.__heap_base.value||C.__heap_base)+4*I-C.memory.buffer.byteLength;k>0&&C.memory.grow(Math.ceil(k/65536));const K=C.sa(I-1);if((A?B:Q)(E,new Uint16Array(C.memory.buffer,K,I)),!C.parse())throw Object.assign(new Error(`Parse error ${g}:${E.slice(0,C.e()).split("\n").length}:${C.e()-E.lastIndexOf("\n",C.e()-1)}`),{idx:C.e()});const o=[],D=[];for(;C.ri();){const A=C.is(),Q=C.ie(),B=C.ai(),g=C.id(),I=C.ss(),k=C.se();let K;C.ip()&&(K=w(E.slice(-1===g?A-1:A,-1===g?Q+1:Q))),o.push({n:K,s:A,e:Q,ss:I,se:k,d:g,a:B});}for(;C.re();){const A=C.es(),Q=C.ee(),B=C.els(),g=C.ele(),I=E.slice(A,Q),k=I[0],K=B<0?void 0:E.slice(B,g),o=K?K[0]:"";D.push({s:A,e:Q,ls:B,le:g,n:'"'===k||"'"===k?w(I):I,ln:'"'===o||"'"===o?w(K):K});}function w(A){try{return (0,eval)(A)}catch(A){}}return [o,D,!!C.f(),!!C.ms()]}function Q(A,Q){const B=A.length;let C=0;for(;C<B;){const B=A.charCodeAt(C);Q[C++]=(255&B)<<8|B>>>8;}}function B(A,Q){const B=A.length;let C=0;for(;C<B;)Q[C]=A.charCodeAt(C++);}let C;const init=WebAssembly.compile((E="AGFzbQEAAAABKghgAX8Bf2AEf39/fwBgAAF/YAAAYAF/AGADf39/AX9gAn9/AX9gAn9/AAMwLwABAQICAgICAgICAgICAgICAgICAAMDAwQEAAAAAwAAAAADAwAFBgAAAAcABgIFBAUBcAEBAQUDAQABBg8CfwFBsPIAC38AQbDyAAsHdRQGbWVtb3J5AgACc2EAAAFlAAMCaXMABAJpZQAFAnNzAAYCc2UABwJhaQAIAmlkAAkCaXAACgJlcwALAmVlAAwDZWxzAA0DZWxlAA4CcmkADwJyZQAQAWYAEQJtcwASBXBhcnNlABMLX19oZWFwX2Jhc2UDAQryPS9oAQF/QQAgADYC9AlBACgC0AkiASAAQQF0aiIAQQA7AQBBACAAQQJqIgA2AvgJQQAgADYC/AlBAEEANgLUCUEAQQA2AuQJQQBBADYC3AlBAEEANgLYCUEAQQA2AuwJQQBBADYC4AkgAQu+AQEDf0EAKALkCSEEQQBBACgC/AkiBTYC5AlBACAENgLoCUEAIAVBIGo2AvwJIARBHGpB1AkgBBsgBTYCAEEAKALICSEEQQAoAsQJIQYgBSABNgIAIAUgADYCCCAFIAIgAkECakEAIAYgA0YbIAQgA0YbNgIMIAUgAzYCFCAFQQA2AhAgBSACNgIEIAVBADYCHCAFQQAoAsQJIANGIgI6ABgCQAJAIAINAEEAKALICSADRw0BC0EAQQE6AIAKCwteAQF/QQAoAuwJIgRBEGpB2AkgBBtBACgC/AkiBDYCAEEAIAQ2AuwJQQAgBEEUajYC/AlBAEEBOgCACiAEQQA2AhAgBCADNgIMIAQgAjYCCCAEIAE2AgQgBCAANgIACwgAQQAoAoQKCxUAQQAoAtwJKAIAQQAoAtAJa0EBdQseAQF/QQAoAtwJKAIEIgBBACgC0AlrQQF1QX8gABsLFQBBACgC3AkoAghBACgC0AlrQQF1Cx4BAX9BACgC3AkoAgwiAEEAKALQCWtBAXVBfyAAGwseAQF/QQAoAtwJKAIQIgBBACgC0AlrQQF1QX8gABsLOwEBfwJAQQAoAtwJKAIUIgBBACgCxAlHDQBBfw8LAkAgAEEAKALICUcNAEF+DwsgAEEAKALQCWtBAXULCwBBACgC3AktABgLFQBBACgC4AkoAgBBACgC0AlrQQF1CxUAQQAoAuAJKAIEQQAoAtAJa0EBdQseAQF/QQAoAuAJKAIIIgBBACgC0AlrQQF1QX8gABsLHgEBf0EAKALgCSgCDCIAQQAoAtAJa0EBdUF/IAAbCyUBAX9BAEEAKALcCSIAQRxqQdQJIAAbKAIAIgA2AtwJIABBAEcLJQEBf0EAQQAoAuAJIgBBEGpB2AkgABsoAgAiADYC4AkgAEEARwsIAEEALQCICgsIAEEALQCACgvyDAEGfyMAQYDQAGsiACQAQQBBAToAiApBAEEAKALMCTYCkApBAEEAKALQCUF+aiIBNgKkCkEAIAFBACgC9AlBAXRqIgI2AqgKQQBBADoAgApBAEEAOwGKCkEAQQA7AYwKQQBBADoAlApBAEEANgKECkEAQQA6APAJQQAgAEGAEGo2ApgKQQAgADYCnApBAEEAOgCgCgJAAkACQAJAA0BBACABQQJqIgM2AqQKIAEgAk8NAQJAIAMvAQAiAkF3akEFSQ0AAkACQAJAAkACQCACQZt/ag4FAQgICAIACyACQSBGDQQgAkEvRg0DIAJBO0YNAgwHC0EALwGMCg0BIAMQFEUNASABQQRqQYIIQQoQLg0BEBVBAC0AiAoNAUEAQQAoAqQKIgE2ApAKDAcLIAMQFEUNACABQQRqQYwIQQoQLg0AEBYLQQBBACgCpAo2ApAKDAELAkAgAS8BBCIDQSpGDQAgA0EvRw0EEBcMAQtBARAYC0EAKAKoCiECQQAoAqQKIQEMAAsLQQAhAiADIQFBAC0A8AkNAgwBC0EAIAE2AqQKQQBBADoAiAoLA0BBACABQQJqIgM2AqQKAkACQAJAAkACQAJAAkACQAJAIAFBACgCqApPDQAgAy8BACICQXdqQQVJDQgCQAJAAkACQAJAAkACQAJAAkACQCACQWBqDgoSEQYRERERBQECAAsCQAJAAkACQCACQaB/ag4KCxQUAxQBFBQUAgALIAJBhX9qDgMFEwYJC0EALwGMCg0SIAMQFEUNEiABQQRqQYIIQQoQLg0SEBUMEgsgAxAURQ0RIAFBBGpBjAhBChAuDREQFgwRCyADEBRFDRAgASkABELsgISDsI7AOVINECABLwEMIgNBd2oiAUEXSw0OQQEgAXRBn4CABHFFDQ4MDwtBAEEALwGMCiIBQQFqOwGMCkEAKAKYCiABQQN0aiIBQQE2AgAgAUEAKAKQCjYCBAwPC0EALwGMCiIDRQ0LQQAgA0F/aiICOwGMCkEALwGKCiIDRQ0OQQAoApgKIAJB//8DcUEDdGooAgBBBUcNDgJAIANBAnRBACgCnApqQXxqKAIAIgIoAgQNACACQQAoApAKQQJqNgIEC0EAIANBf2o7AYoKIAIgAUEEajYCDAwOCwJAQQAoApAKIgEvAQBBKUcNAEEAKALkCSIDRQ0AIAMoAgQgAUcNAEEAQQAoAugJIgM2AuQJAkAgA0UNACADQQA2AhwMAQtBAEEANgLUCQtBAEEALwGMCiIDQQFqOwGMCkEAKAKYCiADQQN0aiIDQQZBAkEALQCgChs2AgAgAyABNgIEQQBBADoAoAoMDQtBAC8BjAoiAUUNCUEAIAFBf2oiATsBjApBACgCmAogAUH//wNxQQN0aigCAEEERg0EDAwLQScQGQwLC0EiEBkMCgsgAkEvRw0JAkACQCABLwEEIgFBKkYNACABQS9HDQEQFwwMC0EBEBgMCwsCQAJAQQAoApAKIgEvAQAiAxAaRQ0AAkACQCADQVVqDgQACAEDCAsgAUF+ai8BAEErRg0GDAcLIAFBfmovAQBBLUYNBQwGCwJAIANB/QBGDQAgA0EpRw0FQQAoApgKQQAvAYwKQQN0aigCBBAbRQ0FDAYLQQAoApgKQQAvAYwKQQN0aiICKAIEEBwNBSACKAIAQQZGDQUMBAsgAUF+ai8BAEFQakH//wNxQQpJDQMMBAtBACgCmApBAC8BjAoiAUEDdCIDakEAKAKQCjYCBEEAIAFBAWo7AYwKQQAoApgKIANqQQM2AgALEB0MBwtBAC0A8AlBAC8BigpBAC8BjApyckUhAgwJCyABEB4NACADRQ0AIANBL0ZBAC0AlApBAEdxDQAgAUF+aiEBQQAoAtAJIQICQANAIAFBAmoiBCACTQ0BQQAgATYCkAogAS8BACEDIAFBfmoiBCEBIAMQH0UNAAsgBEECaiEEC0EBIQUgA0H//wNxECBFDQEgBEF+aiEBAkADQCABQQJqIgMgAk0NAUEAIAE2ApAKIAEvAQAhAyABQX5qIgQhASADECANAAsgBEECaiEDCyADECFFDQEQIkEAQQA6AJQKDAULECJBACEFC0EAIAU6AJQKDAMLECNBACECDAULIANBoAFHDQELQQBBAToAoAoLQQBBACgCpAo2ApAKC0EAKAKkCiEBDAALCyAAQYDQAGokACACCxoAAkBBACgC0AkgAEcNAEEBDwsgAEF+ahAkC/wKAQZ/QQBBACgCpAoiAEEMaiIBNgKkCkEAKALsCSECQQEQKCEDAkACQAJAAkACQAJAAkACQAJAQQAoAqQKIgQgAUcNACADECdFDQELAkACQAJAAkACQAJAAkAgA0EqRg0AIANB+wBHDQFBACAEQQJqNgKkCkEBECghA0EAKAKkCiEEA0ACQAJAIANB//8DcSIDQSJGDQAgA0EnRg0AIAMQKxpBACgCpAohAwwBCyADEBlBAEEAKAKkCkECaiIDNgKkCgtBARAoGgJAIAQgAxAsIgNBLEcNAEEAQQAoAqQKQQJqNgKkCkEBECghAwsgA0H9AEYNA0EAKAKkCiIFIARGDQ8gBSEEIAVBACgCqApNDQAMDwsLQQAgBEECajYCpApBARAoGkEAKAKkCiIDIAMQLBoMAgtBAEEAOgCICgJAAkACQAJAAkACQCADQZ9/ag4MAgsEAQsDCwsLCwsFAAsgA0H2AEYNBAwKC0EAIARBDmoiAzYCpAoCQAJAAkBBARAoQZ9/ag4GABICEhIBEgtBACgCpAoiBSkAAkLzgOSD4I3AMVINESAFLwEKECBFDRFBACAFQQpqNgKkCkEAECgaC0EAKAKkCiIFQQJqQaIIQQ4QLg0QIAUvARAiAkF3aiIBQRdLDQ1BASABdEGfgIAEcUUNDQwOC0EAKAKkCiIFKQACQuyAhIOwjsA5Ug0PIAUvAQoiAkF3aiIBQRdNDQYMCgtBACAEQQpqNgKkCkEAECgaQQAoAqQKIQQLQQAgBEEQajYCpAoCQEEBECgiBEEqRw0AQQBBACgCpApBAmo2AqQKQQEQKCEEC0EAKAKkCiEDIAQQKxogA0EAKAKkCiIEIAMgBBACQQBBACgCpApBfmo2AqQKDwsCQCAEKQACQuyAhIOwjsA5Ug0AIAQvAQoQH0UNAEEAIARBCmo2AqQKQQEQKCEEQQAoAqQKIQMgBBArGiADQQAoAqQKIgQgAyAEEAJBAEEAKAKkCkF+ajYCpAoPC0EAIARBBGoiBDYCpAoLQQAgBEEGajYCpApBAEEAOgCICkEBECghBEEAKAKkCiEDIAQQKyEEQQAoAqQKIQIgBEHf/wNxIgFB2wBHDQNBACACQQJqNgKkCkEBECghBUEAKAKkCiEDQQAhBAwEC0EAQQE6AIAKQQBBACgCpApBAmo2AqQKC0EBECghBEEAKAKkCiEDAkAgBEHmAEcNACADQQJqQZwIQQYQLg0AQQAgA0EIajYCpAogAEEBECgQKiACQRBqQdgJIAIbIQMDQCADKAIAIgNFDQUgA0IANwIIIANBEGohAwwACwtBACADQX5qNgKkCgwDC0EBIAF0QZ+AgARxRQ0DDAQLQQEhBAsDQAJAAkAgBA4CAAEBCyAFQf//A3EQKxpBASEEDAELAkACQEEAKAKkCiIEIANGDQAgAyAEIAMgBBACQQEQKCEEAkAgAUHbAEcNACAEQSByQf0ARg0EC0EAKAKkCiEDAkAgBEEsRw0AQQAgA0ECajYCpApBARAoIQVBACgCpAohAyAFQSByQfsARw0CC0EAIANBfmo2AqQKCyABQdsARw0CQQAgAkF+ajYCpAoPC0EAIQQMAAsLDwsgAkGgAUYNACACQfsARw0EC0EAIAVBCmo2AqQKQQEQKCIFQfsARg0DDAILAkAgAkFYag4DAQMBAAsgAkGgAUcNAgtBACAFQRBqNgKkCgJAQQEQKCIFQSpHDQBBAEEAKAKkCkECajYCpApBARAoIQULIAVBKEYNAQtBACgCpAohASAFECsaQQAoAqQKIgUgAU0NACAEIAMgASAFEAJBAEEAKAKkCkF+ajYCpAoPCyAEIANBAEEAEAJBACAEQQxqNgKkCg8LECML1AYBBH9BAEEAKAKkCiIAQQxqIgE2AqQKAkACQAJAAkACQAJAAkACQAJAAkBBARAoIgJBWWoOCAQCAQQBAQEDAAsgAkEiRg0DIAJB+wBGDQQLQQAoAqQKIAFHDQJBACAAQQpqNgKkCg8LQQAoApgKQQAvAYwKIgJBA3RqIgFBACgCpAo2AgRBACACQQFqOwGMCiABQQU2AgBBACgCkAovAQBBLkYNA0EAQQAoAqQKIgFBAmo2AqQKQQEQKCECIABBACgCpApBACABEAFBAEEALwGKCiIBQQFqOwGKCkEAKAKcCiABQQJ0akEAKALkCTYCAAJAIAJBIkYNACACQSdGDQBBAEEAKAKkCkF+ajYCpAoPCyACEBlBAEEAKAKkCkECaiICNgKkCgJAAkACQEEBEChBV2oOBAECAgACC0EAQQAoAqQKQQJqNgKkCkEBECgaQQAoAuQJIgEgAjYCBCABQQE6ABggAUEAKAKkCiICNgIQQQAgAkF+ajYCpAoPC0EAKALkCSIBIAI2AgQgAUEBOgAYQQBBAC8BjApBf2o7AYwKIAFBACgCpApBAmo2AgxBAEEALwGKCkF/ajsBigoPC0EAQQAoAqQKQX5qNgKkCg8LQQBBACgCpApBAmo2AqQKQQEQKEHtAEcNAkEAKAKkCiICQQJqQZYIQQYQLg0CAkBBACgCkAoiARApDQAgAS8BAEEuRg0DCyAAIAAgAkEIakEAKALICRABDwtBAC8BjAoNAkEAKAKkCiECQQAoAqgKIQMDQCACIANPDQUCQAJAIAIvAQAiAUEnRg0AIAFBIkcNAQsgACABECoPC0EAIAJBAmoiAjYCpAoMAAsLQQAoAqQKIQJBAC8BjAoNAgJAA0ACQAJAAkAgAkEAKAKoCk8NAEEBECgiAkEiRg0BIAJBJ0YNASACQf0ARw0CQQBBACgCpApBAmo2AqQKC0EBECghAUEAKAKkCiECAkAgAUHmAEcNACACQQJqQZwIQQYQLg0IC0EAIAJBCGo2AqQKQQEQKCICQSJGDQMgAkEnRg0DDAcLIAIQGQtBAEEAKAKkCkECaiICNgKkCgwACwsgACACECoLDwtBAEEAKAKkCkF+ajYCpAoPC0EAIAJBfmo2AqQKDwsQIwtHAQN/QQAoAqQKQQJqIQBBACgCqAohAQJAA0AgACICQX5qIAFPDQEgAkECaiEAIAIvAQBBdmoOBAEAAAEACwtBACACNgKkCguYAQEDf0EAQQAoAqQKIgFBAmo2AqQKIAFBBmohAUEAKAKoCiECA0ACQAJAAkAgAUF8aiACTw0AIAFBfmovAQAhAwJAAkAgAA0AIANBKkYNASADQXZqDgQCBAQCBAsgA0EqRw0DCyABLwEAQS9HDQJBACABQX5qNgKkCgwBCyABQX5qIQELQQAgATYCpAoPCyABQQJqIQEMAAsLiAEBBH9BACgCpAohAUEAKAKoCiECAkACQANAIAEiA0ECaiEBIAMgAk8NASABLwEAIgQgAEYNAgJAIARB3ABGDQAgBEF2ag4EAgEBAgELIANBBGohASADLwEEQQ1HDQAgA0EGaiABIAMvAQZBCkYbIQEMAAsLQQAgATYCpAoQIw8LQQAgATYCpAoLbAEBfwJAAkAgAEFfaiIBQQVLDQBBASABdEExcQ0BCyAAQUZqQf//A3FBBkkNACAAQSlHIABBWGpB//8DcUEHSXENAAJAIABBpX9qDgQBAAABAAsgAEH9AEcgAEGFf2pB//8DcUEESXEPC0EBCy4BAX9BASEBAkAgAEGWCUEFECUNACAAQaAJQQMQJQ0AIABBpglBAhAlIQELIAELgwEBAn9BASEBAkACQAJAAkACQAJAIAAvAQAiAkFFag4EBQQEAQALAkAgAkGbf2oOBAMEBAIACyACQSlGDQQgAkH5AEcNAyAAQX5qQbIJQQYQJQ8LIABBfmovAQBBPUYPCyAAQX5qQaoJQQQQJQ8LIABBfmpBvglBAxAlDwtBACEBCyABC94BAQR/QQAoAqQKIQBBACgCqAohAQJAAkACQANAIAAiAkECaiEAIAIgAU8NAQJAAkACQCAALwEAIgNBpH9qDgUCAwMDAQALIANBJEcNAiACLwEEQfsARw0CQQAgAkEEaiIANgKkCkEAQQAvAYwKIgJBAWo7AYwKQQAoApgKIAJBA3RqIgJBBDYCACACIAA2AgQPC0EAIAA2AqQKQQBBAC8BjApBf2oiADsBjApBACgCmAogAEH//wNxQQN0aigCAEEDRw0DDAQLIAJBBGohAAwACwtBACAANgKkCgsQIwsLtAMBAn9BACEBAkACQAJAAkACQAJAAkACQAJAAkAgAC8BAEGcf2oOFAABAgkJCQkDCQkEBQkJBgkHCQkICQsCQAJAIABBfmovAQBBl39qDgQACgoBCgsgAEF8akG6CEECECUPCyAAQXxqQb4IQQMQJQ8LAkACQAJAIABBfmovAQBBjX9qDgMAAQIKCwJAIABBfGovAQAiAkHhAEYNACACQewARw0KIABBempB5QAQJg8LIABBempB4wAQJg8LIABBfGpBxAhBBBAlDwsgAEF8akHMCEEGECUPCyAAQX5qLwEAQe8ARw0GIABBfGovAQBB5QBHDQYCQCAAQXpqLwEAIgJB8ABGDQAgAkHjAEcNByAAQXhqQdgIQQYQJQ8LIABBeGpB5AhBAhAlDwsgAEF+akHoCEEEECUPC0EBIQEgAEF+aiIAQekAECYNBCAAQfAIQQUQJQ8LIABBfmpB5AAQJg8LIABBfmpB+ghBBxAlDwsgAEF+akGICUEEECUPCwJAIABBfmovAQAiAkHvAEYNACACQeUARw0BIABBfGpB7gAQJg8LIABBfGpBkAlBAxAlIQELIAELNAEBf0EBIQECQCAAQXdqQf//A3FBBUkNACAAQYABckGgAUYNACAAQS5HIAAQJ3EhAQsgAQswAQF/AkACQCAAQXdqIgFBF0sNAEEBIAF0QY2AgARxDQELIABBoAFGDQBBAA8LQQELTgECf0EAIQECQAJAIAAvAQAiAkHlAEYNACACQesARw0BIABBfmpB6AhBBBAlDwsgAEF+ai8BAEH1AEcNACAAQXxqQcwIQQYQJSEBCyABC3ABAn8CQAJAA0BBAEEAKAKkCiIAQQJqIgE2AqQKIABBACgCqApPDQECQAJAAkAgAS8BACIBQaV/ag4CAQIACwJAIAFBdmoOBAQDAwQACyABQS9HDQIMBAsQLRoMAQtBACAAQQRqNgKkCgwACwsQIwsLNQEBf0EAQQE6APAJQQAoAqQKIQBBAEEAKAKoCkECajYCpApBACAAQQAoAtAJa0EBdTYChAoLQwECf0EBIQECQCAALwEAIgJBd2pB//8DcUEFSQ0AIAJBgAFyQaABRg0AQQAhASACECdFDQAgAkEuRyAAEClyDwsgAQtGAQN/QQAhAwJAIAAgAkEBdCICayIEQQJqIgBBACgC0AkiBUkNACAAIAEgAhAuDQACQCAAIAVHDQBBAQ8LIAQQJCEDCyADCz0BAn9BACECAkBBACgC0AkiAyAASw0AIAAvAQAgAUcNAAJAIAMgAEcNAEEBDwsgAEF+ai8BABAfIQILIAILaAECf0EBIQECQAJAIABBX2oiAkEFSw0AQQEgAnRBMXENAQsgAEH4/wNxQShGDQAgAEFGakH//wNxQQZJDQACQCAAQaV/aiICQQNLDQAgAkEBRw0BCyAAQYV/akH//wNxQQRJIQELIAELnAEBA39BACgCpAohAQJAA0ACQAJAIAEvAQAiAkEvRw0AAkAgAS8BAiIBQSpGDQAgAUEvRw0EEBcMAgsgABAYDAELAkACQCAARQ0AIAJBd2oiAUEXSw0BQQEgAXRBn4CABHFFDQEMAgsgAhAgRQ0DDAELIAJBoAFHDQILQQBBACgCpAoiA0ECaiIBNgKkCiADQQAoAqgKSQ0ACwsgAgsxAQF/QQAhAQJAIAAvAQBBLkcNACAAQX5qLwEAQS5HDQAgAEF8ai8BAEEuRiEBCyABC4kEAQF/AkAgAUEiRg0AIAFBJ0YNABAjDwtBACgCpAohAiABEBkgACACQQJqQQAoAqQKQQAoAsQJEAFBAEEAKAKkCkECajYCpAoCQAJAAkACQEEAECgiAUHhAEYNACABQfcARg0BQQAoAqQKIQEMAgtBACgCpAoiAUECakGwCEEKEC4NAUEGIQAMAgtBACgCpAoiAS8BAkHpAEcNACABLwEEQfQARw0AQQQhACABLwEGQegARg0BC0EAIAFBfmo2AqQKDwtBACABIABBAXRqNgKkCgJAQQEQKEH7AEYNAEEAIAE2AqQKDwtBACgCpAoiAiEAA0BBACAAQQJqNgKkCgJAAkACQEEBECgiAEEiRg0AIABBJ0cNAUEnEBlBAEEAKAKkCkECajYCpApBARAoIQAMAgtBIhAZQQBBACgCpApBAmo2AqQKQQEQKCEADAELIAAQKyEACwJAIABBOkYNAEEAIAE2AqQKDwtBAEEAKAKkCkECajYCpAoCQEEBECgiAEEiRg0AIABBJ0YNAEEAIAE2AqQKDwsgABAZQQBBACgCpApBAmo2AqQKAkACQEEBECgiAEEsRg0AIABB/QBGDQFBACABNgKkCg8LQQBBACgCpApBAmo2AqQKQQEQKEH9AEYNAEEAKAKkCiEADAELC0EAKALkCSIBIAI2AhAgAUEAKAKkCkECajYCDAttAQJ/AkACQANAAkAgAEH//wNxIgFBd2oiAkEXSw0AQQEgAnRBn4CABHENAgsgAUGgAUYNASAAIQIgARAnDQJBACECQQBBACgCpAoiAEECajYCpAogAC8BAiIADQAMAgsLIAAhAgsgAkH//wNxC6sBAQR/AkACQEEAKAKkCiICLwEAIgNB4QBGDQAgASEEIAAhBQwBC0EAIAJBBGo2AqQKQQEQKCECQQAoAqQKIQUCQAJAIAJBIkYNACACQSdGDQAgAhArGkEAKAKkCiEEDAELIAIQGUEAQQAoAqQKQQJqIgQ2AqQKC0EBECghA0EAKAKkCiECCwJAIAIgBUYNACAFIARBACAAIAAgAUYiAhtBACABIAIbEAILIAMLcgEEf0EAKAKkCiEAQQAoAqgKIQECQAJAA0AgAEECaiECIAAgAU8NAQJAAkAgAi8BACIDQaR/ag4CAQQACyACIQAgA0F2ag4EAgEBAgELIABBBGohAAwACwtBACACNgKkChAjQQAPC0EAIAI2AqQKQd0AC0kBA39BACEDAkAgAkUNAAJAA0AgAC0AACIEIAEtAAAiBUcNASABQQFqIQEgAEEBaiEAIAJBf2oiAg0ADAILCyAEIAVrIQMLIAMLC+IBAgBBgAgLxAEAAHgAcABvAHIAdABtAHAAbwByAHQAZQB0AGEAcgBvAG0AdQBuAGMAdABpAG8AbgBzAHMAZQByAHQAdgBvAHkAaQBlAGQAZQBsAGUAYwBvAG4AdABpAG4AaQBuAHMAdABhAG4AdAB5AGIAcgBlAGEAcgBlAHQAdQByAGQAZQBiAHUAZwBnAGUAYQB3AGEAaQB0AGgAcgB3AGgAaQBsAGUAZgBvAHIAaQBmAGMAYQB0AGMAZgBpAG4AYQBsAGwAZQBsAHMAAEHECQsQAQAAAAIAAAAABAAAMDkAAA==","undefined"!=typeof Buffer?Buffer.from(E,"base64"):Uint8Array.from(atob(E),(A=>A.charCodeAt(0))))).then(WebAssembly.instantiate).then((({exports:A})=>{C=A;}));var E;
async function _resolve (id, parentUrl) {
const urlResolved = resolveIfNotPlainOrUrl(id, parentUrl) || asURL(id);
return {
r: resolveImportMap(importMap, urlResolved || id, parentUrl) || throwUnresolved(id, parentUrl),
// b = bare specifier
b: !urlResolved && !asURL(id)
};
}
const resolve = resolveHook ? async (id, parentUrl) => {
let result = resolveHook(id, parentUrl, defaultResolve);
// will be deprecated in next major
if (result && result.then)
result = await result;
return result ? { r: result, b: !resolveIfNotPlainOrUrl(id, parentUrl) && !asURL(id) } : _resolve(id, parentUrl);
} : _resolve;
// importShim('mod');
// importShim('mod', { opts });
// importShim('mod', { opts }, parentUrl);
// importShim('mod', parentUrl);
async function importShim (id, ...args) {
// parentUrl if present will be the last argument
let parentUrl = args[args.length - 1];
if (typeof parentUrl !== 'string')
parentUrl = baseUrl;
// needed for shim check
await initPromise;
if (importHook) await importHook(id, typeof args[1] !== 'string' ? args[1] : {}, parentUrl);
if (acceptingImportMaps || shimMode || !baselinePassthrough) {
if (hasDocument)
processScriptsAndPreloads(true);
if (!shimMode)
acceptingImportMaps = false;
}
await importMapPromise;
return topLevelLoad((await resolve(id, parentUrl)).r, { credentials: 'same-origin' });
}
self.importShim = importShim;
function defaultResolve (id, parentUrl) {
return resolveImportMap(importMap, resolveIfNotPlainOrUrl(id, parentUrl) || id, parentUrl) || throwUnresolved(id, parentUrl);
}
function throwUnresolved (id, parentUrl) {
throw Error(`Unable to resolve specifier '${id}'${fromParent(parentUrl)}`);
}
const resolveSync = (id, parentUrl = baseUrl) => {
parentUrl = `${parentUrl}`;
const result = resolveHook && resolveHook(id, parentUrl, defaultResolve);
return result && !result.then ? result : defaultResolve(id, parentUrl);
};
function metaResolve (id, parentUrl = this.url) {
return resolveSync(id, parentUrl);
}
importShim.resolve = resolveSync;
importShim.getImportMap = () => JSON.parse(JSON.stringify(importMap));
importShim.addImportMap = importMapIn => {
if (!shimMode) throw new Error('Unsupported in polyfill mode.');
importMap = resolveAndComposeImportMap(importMapIn, baseUrl, importMap);
};
const registry = importShim._r = {};
importShim._w = {};
async function loadAll (load, seen) {
if (load.b || seen[load.u])
return;
seen[load.u] = 1;
await load.L;
await Promise.all(load.d.map(dep => loadAll(dep, seen)));
if (!load.n)
load.n = load.d.some(dep => dep.n);
}
let importMap = { imports: {}, scopes: {} };
let baselinePassthrough;
const initPromise = featureDetectionPromise.then(() => {
baselinePassthrough = esmsInitOptions.polyfillEnable !== true && supportsDynamicImport && supportsImportMeta && supportsImportMaps && (!jsonModulesEnabled || supportsJsonAssertions) && (!cssModulesEnabled || supportsCssAssertions) && !importMapSrcOrLazy;
if (hasDocument) {
if (!supportsImportMaps) {
const supports = HTMLScriptElement.supports || (type => type === 'classic' || type === 'module');
HTMLScriptElement.supports = type => type === 'importmap' || supports(type);
}
if (shimMode || !baselinePassthrough) {
new MutationObserver(mutations => {
for (const mutation of mutations) {
if (mutation.type !== 'childList') continue;
for (const node of mutation.addedNodes) {
if (node.tagName === 'SCRIPT') {
if (node.type === (shimMode ? 'module-shim' : 'module'))
processScript(node, true);
if (node.type === (shimMode ? 'importmap-shim' : 'importmap'))
processImportMap(node, true);
}
else if (node.tagName === 'LINK' && node.rel === (shimMode ? 'modulepreload-shim' : 'modulepreload')) {
processPreload(node);
}
}
}
}).observe(document, {childList: true, subtree: true});
processScriptsAndPreloads();
if (document.readyState === 'complete') {
readyStateCompleteCheck();
}
else {
async function readyListener() {
await initPromise;
processScriptsAndPreloads();
if (document.readyState === 'complete') {
readyStateCompleteCheck();
document.removeEventListener('readystatechange', readyListener);
}
}
document.addEventListener('readystatechange', readyListener);
}
}
}
return init;
});
let importMapPromise = initPromise;
let firstPolyfillLoad = true;
let acceptingImportMaps = true;
async function topLevelLoad (url, fetchOpts, source, nativelyLoaded, lastStaticLoadPromise) {
if (!shimMode)
acceptingImportMaps = false;
await initPromise;
await importMapPromise;
if (importHook) await importHook(url, typeof fetchOpts !== 'string' ? fetchOpts : {}, '');
// early analysis opt-out - no need to even fetch if we have feature support
if (!shimMode && baselinePassthrough) {
// for polyfill case, only dynamic import needs a return value here, and dynamic import will never pass nativelyLoaded
if (nativelyLoaded)
return null;
await lastStaticLoadPromise;
return dynamicImport(source ? createBlob(source) : url, { errUrl: url || source });
}
const load = getOrCreateLoad(url, fetchOpts, null, source);
const seen = {};
await loadAll(load, seen);
lastLoad = undefined;
resolveDeps(load, seen);
await lastStaticLoadPromise;
if (source && !shimMode && !load.n) {
if (nativelyLoaded) return;
if (revokeBlobURLs) revokeObjectURLs(Object.keys(seen));
return await dynamicImport(createBlob(source), { errUrl: source });
}
if (firstPolyfillLoad && !shimMode && load.n && nativelyLoaded) {
onpolyfill();
firstPolyfillLoad = false;
}
const module = await dynamicImport(!shimMode && !load.n && nativelyLoaded ? load.u : load.b, { errUrl: load.u });
// if the top-level load is a shell, run its update function
if (load.s)
(await dynamicImport(load.s)).u$_(module);
if (revokeBlobURLs) revokeObjectURLs(Object.keys(seen));
// when tla is supported, this should return the tla promise as an actual handle
// so readystate can still correspond to the sync subgraph exec completions
return module;
}
function revokeObjectURLs(registryKeys) {
let batch = 0;
const keysLength = registryKeys.length;
const schedule = self.requestIdleCallback ? self.requestIdleCallback : self.requestAnimationFrame;
schedule(cleanup);
function cleanup() {
const batchStartIndex = batch * 100;
if (batchStartIndex > keysLength) return
for (const key of registryKeys.slice(batchStartIndex, batchStartIndex + 100)) {
const load = registry[key];
if (load) URL.revokeObjectURL(load.b);
}
batch++;
schedule(cleanup);
}
}
function urlJsString (url) {
return `'${url.replace(/'/g, "\\'")}'`;
}
let lastLoad;
function resolveDeps (load, seen) {
if (load.b || !seen[load.u])
return;
seen[load.u] = 0;
for (const dep of load.d)
resolveDeps(dep, seen);
const [imports, exports] = load.a;
// "execution"
const source = load.S;
// edge doesnt execute sibling in order, so we fix this up by ensuring all previous executions are explicit dependencies
let resolvedSource = edge && lastLoad ? `import '${lastLoad}';` : '';
// once all deps have loaded we can inline the dependency resolution blobs
// and define this blob
let lastIndex = 0, depIndex = 0, dynamicImportEndStack = [];
function pushStringTo (originalIndex) {
while (dynamicImportEndStack[dynamicImportEndStack.length - 1] < originalIndex) {
const dynamicImportEnd = dynamicImportEndStack.pop();
resolvedSource += `${source.slice(lastIndex, dynamicImportEnd)}, ${urlJsString(load.r)}`;
lastIndex = dynamicImportEnd;
}
resolvedSource += source.slice(lastIndex, originalIndex);
lastIndex = originalIndex;
}
for (const { s: start, ss: statementStart, se: statementEnd, d: dynamicImportIndex } of imports) {
// dependency source replacements
if (dynamicImportIndex === -1) {
let depLoad = load.d[depIndex++], blobUrl = depLoad.b, cycleShell = !blobUrl;
if (cycleShell) {
// circular shell creation
if (!(blobUrl = depLoad.s)) {
blobUrl = depLoad.s = createBlob(`export function u$_(m){${
depLoad.a[1].map(({ s, e }, i) => {
const q = depLoad.S[s] === '"' || depLoad.S[s] === "'";
return `e$_${i}=m${q ? `[` : '.'}${depLoad.S.slice(s, e)}${q ? `]` : ''}`;
}).join(',')
}}${
depLoad.a[1].length ? `let ${depLoad.a[1].map((_, i) => `e$_${i}`).join(',')};` : ''
}export {${
depLoad.a[1].map(({ s, e }, i) => `e$_${i} as ${depLoad.S.slice(s, e)}`).join(',')
}}\n//# sourceURL=${depLoad.r}?cycle`);
}
}
pushStringTo(start - 1);
resolvedSource += `/*${source.slice(start - 1, statementEnd)}*/${urlJsString(blobUrl)}`;
// circular shell execution
if (!cycleShell && depLoad.s) {
resolvedSource += `;import*as m$_${depIndex} from'${depLoad.b}';import{u$_ as u$_${depIndex}}from'${depLoad.s}';u$_${depIndex}(m$_${depIndex})`;
depLoad.s = undefined;
}
lastIndex = statementEnd;
}
// import.meta
else if (dynamicImportIndex === -2) {
load.m = { url: load.r, resolve: metaResolve };
metaHook(load.m, load.u);
pushStringTo(start);
resolvedSource += `importShim._r[${urlJsString(load.u)}].m`;
lastIndex = statementEnd;
}
// dynamic import
else {
pushStringTo(statementStart + 6);
resolvedSource += `Shim(`;
dynamicImportEndStack.push(statementEnd - 1);
lastIndex = start;
}
}
// support progressive cycle binding updates (try statement avoids tdz errors)
if (load.s)
resolvedSource += `\n;import{u$_}from'${load.s}';try{u$_({${exports.filter(e => e.ln).map(({ s, e, ln }) => `${source.slice(s, e)}:${ln}`).join(',')}})}catch(_){};\n`;
function pushSourceURL (commentPrefix, commentStart) {
const urlStart = commentStart + commentPrefix.length;
const commentEnd = source.indexOf('\n', urlStart);
const urlEnd = commentEnd !== -1 ? commentEnd : source.length;
pushStringTo(urlStart);
resolvedSource += new URL(source.slice(urlStart, urlEnd), load.r).href;
lastIndex = urlEnd;
}
let sourceURLCommentStart = source.lastIndexOf(sourceURLCommentPrefix);
let sourceMapURLCommentStart = source.lastIndexOf(sourceMapURLCommentPrefix);
// ignore sourceMap comments before already spliced code
if (sourceURLCommentStart < lastIndex) sourceURLCommentStart = -1;
if (sourceMapURLCommentStart < lastIndex) sourceMapURLCommentStart = -1;
// sourceURL first / only
if (sourceURLCommentStart !== -1 && (sourceMapURLCommentStart === -1 || sourceMapURLCommentStart > sourceURLCommentStart)) {
pushSourceURL(sourceURLCommentPrefix, sourceURLCommentStart);
}
// sourceMappingURL
if (sourceMapURLCommentStart !== -1) {
pushSourceURL(sourceMapURLCommentPrefix, sourceMapURLCommentStart);
// sourceURL last
if (sourceURLCommentStart !== -1 && (sourceURLCommentStart > sourceMapURLCommentStart))
pushSourceURL(sourceURLCommentPrefix, sourceURLCommentStart);
}
pushStringTo(source.length);
if (sourceURLCommentStart === -1)
resolvedSource += sourceURLCommentPrefix + load.r;
load.b = lastLoad = createBlob(resolvedSource);
load.S = undefined;
}
const sourceURLCommentPrefix = '\n//# sourceURL=';
const sourceMapURLCommentPrefix = '\n//# sourceMappingURL=';
const jsContentType = /^(text|application)\/(x-)?javascript(;|$)/;
const wasmContentType = /^(application)\/wasm(;|$)/;
const jsonContentType = /^(text|application)\/json(;|$)/;
const cssContentType = /^(text|application)\/css(;|$)/;
const cssUrlRegEx = /url\(\s*(?:(["'])((?:\\.|[^\n\\"'])+)\1|((?:\\.|[^\s,"'()\\])+))\s*\)/g;
// restrict in-flight fetches to a pool of 100
let p = [];
let c = 0;
function pushFetchPool () {
if (++c > 100)
return new Promise(r => p.push(r));
}
function popFetchPool () {
c--;
if (p.length)
p.shift()();
}
async function doFetch (url, fetchOpts, parent) {
if (enforceIntegrity && !fetchOpts.integrity)
throw Error(`No integrity for ${url}${fromParent(parent)}.`);
const poolQueue = pushFetchPool();
if (poolQueue) await poolQueue;
try {
var res = await fetchHook(url, fetchOpts);
}
catch (e) {
e.message = `Unable to fetch ${url}${fromParent(parent)} - see network log for details.\n` + e.message;
throw e;
}
finally {
popFetchPool();
}
if (!res.ok) {
const error = new TypeError(`${res.status} ${res.statusText} ${res.url}${fromParent(parent)}`);
error.response = res;
throw error;
}
return res;
}
async function fetchModule (url, fetchOpts, parent) {
const res = await doFetch(url, fetchOpts, parent);
const contentType = res.headers.get('content-type');
if (jsContentType.test(contentType))
return { r: res.url, s: await res.text(), t: 'js' };
else if (wasmContentType.test(contentType)) {
const module = importShim._w[url] = await WebAssembly.compileStreaming(res);
let s = '', i = 0, importObj = '';
for (const impt of WebAssembly.Module.imports(module)) {
s += `import * as impt${i} from '${impt.module}';\n`;
importObj += `'${impt.module}':impt${i++},`;
}
i = 0;
s += `const instance = await WebAssembly.instantiate(importShim._w['${url}'], {${importObj}});\n`;
for (const expt of WebAssembly.Module.exports(module)) {
s += `const expt${i} = instance['${expt.name}'];\n`;
s += `export { expt${i++} as "${expt.name}" };\n`;
}
return { r: res.url, s, t: 'wasm' };
}
else if (jsonContentType.test(contentType))
return { r: res.url, s: `export default ${await res.text()}`, t: 'json' };
else if (cssContentType.test(contentType)) {
return { r: res.url, s: `var s=new CSSStyleSheet();s.replaceSync(${
JSON.stringify((await res.text()).replace(cssUrlRegEx, (_match, quotes = '', relUrl1, relUrl2) => `url(${quotes}${resolveUrl(relUrl1 || relUrl2, url)}${quotes})`))
});export default s;`, t: 'css' };
}
else
throw Error(`Unsupported Content-Type "${contentType}" loading ${url}${fromParent(parent)}. Modules must be served with a valid MIME type like application/javascript.`);
}
function getOrCreateLoad (url, fetchOpts, parent, source) {
let load = registry[url];
if (load && !source)
return load;
load = {
// url
u: url,
// response url
r: source ? url : undefined,
// fetchPromise
f: undefined,
// source
S: undefined,
// linkPromise
L: undefined,
// analysis
a: undefined,
// deps
d: undefined,
// blobUrl
b: undefined,
// shellUrl
s: undefined,
// needsShim
n: false,
// type
t: null,
// meta
m: null
};
if (registry[url]) {
let i = 0;
while (registry[load.u + ++i]);
load.u += i;
}
registry[load.u] = load;
load.f = (async () => {
if (!source) {
// preload fetch options override fetch options (race)
let t;
({ r: load.r, s: source, t } = await (fetchCache[url] || fetchModule(url, fetchOpts, parent)));
if (t && !shimMode) {
if (t === 'css' && !cssModulesEnabled || t === 'json' && !jsonModulesEnabled)
throw Error(`${t}-modules require <script type="esms-options">{ "polyfillEnable": ["${t}-modules"] }<${''}/script>`);
if (t === 'css' && !supportsCssAssertions || t === 'json' && !supportsJsonAssertions)
load.n = true;
}
}
try {
load.a = parse(source, load.u);
}
catch (e) {
throwError(e);
load.a = [[], [], false];
}
load.S = source;
return load;
})();
load.L = load.f.then(async () => {
let childFetchOpts = fetchOpts;
load.d = (await Promise.all(load.a[0].map(async ({ n, d }) => {
if (d >= 0 && !supportsDynamicImport || d === -2 && !supportsImportMeta)
load.n = true;
if (d !== -1 || !n) return;
const { r, b } = await resolve(n, load.r || load.u);
if (b && (!supportsImportMaps || importMapSrcOrLazy))
load.n = true;
if (d !== -1) return;
if (skip && skip(r)) return { b: r };
if (childFetchOpts.integrity)
childFetchOpts = Object.assign({}, childFetchOpts, { integrity: undefined });
return getOrCreateLoad(r, childFetchOpts, load.r).f;
}))).filter(l => l);
});
return load;
}
function processScriptsAndPreloads (mapsOnly = false) {
if (!mapsOnly)
for (const link of document.querySelectorAll(shimMode ? 'link[rel=modulepreload-shim]' : 'link[rel=modulepreload]'))
processPreload(link);
for (const script of document.querySelectorAll(shimMode ? 'script[type=importmap-shim]' : 'script[type=importmap]'))
processImportMap(script);
if (!mapsOnly)
for (const script of document.querySelectorAll(shimMode ? 'script[type=module-shim]' : 'script[type=module]'))
processScript(script);
}
function getFetchOpts (script) {
const fetchOpts = {};
if (script.integrity)
fetchOpts.integrity = script.integrity;
if (script.referrerPolicy)
fetchOpts.referrerPolicy = script.referrerPolicy;
if (script.crossOrigin === 'use-credentials')
fetchOpts.credentials = 'include';
else if (script.crossOrigin === 'anonymous')
fetchOpts.credentials = 'omit';
else
fetchOpts.credentials = 'same-origin';
return fetchOpts;
}
let lastStaticLoadPromise = Promise.resolve();
let domContentLoadedCnt = 1;
function domContentLoadedCheck () {
if (--domContentLoadedCnt === 0 && !noLoadEventRetriggers && (shimMode || !baselinePassthrough)) {
document.dispatchEvent(new Event('DOMContentLoaded'));
}
}
// this should always trigger because we assume es-module-shims is itself a domcontentloaded requirement
if (hasDocument) {
document.addEventListener('DOMContentLoaded', async () => {
await initPromise;
domContentLoadedCheck();
});
}
let readyStateCompleteCnt = 1;
function readyStateCompleteCheck () {
if (--readyStateCompleteCnt === 0 && !noLoadEventRetriggers && (shimMode || !baselinePassthrough)) {
document.dispatchEvent(new Event('readystatechange'));
}
}
const hasNext = script => script.nextSibling || script.parentNode && hasNext(script.parentNode);
const epCheck = (script, ready) => script.ep || !ready && (!script.src && !script.innerHTML || !hasNext(script)) || script.getAttribute('noshim') !== null || !(script.ep = true);
function processImportMap (script, ready = readyStateCompleteCnt > 0) {
if (epCheck(script, ready)) return;
// we dont currently support multiple, external or dynamic imports maps in polyfill mode to match native
if (script.src) {
if (!shimMode)
return;
setImportMapSrcOrLazy();
}
if (acceptingImportMaps) {
importMapPromise = importMapPromise
.then(async () => {
importMap = resolveAndComposeImportMap(script.src ? await (await doFetch(script.src, getFetchOpts(script))).json() : JSON.parse(script.innerHTML), script.src || baseUrl, importMap);
})
.catch(e => {
console.log(e);
if (e instanceof SyntaxError)
e = new Error(`Unable to parse import map ${e.message} in: ${script.src || script.innerHTML}`);
throwError(e);
});
if (!shimMode)
acceptingImportMaps = false;
}
}
function processScript (script, ready = readyStateCompleteCnt > 0) {
if (epCheck(script, ready)) return;
// does this load block readystate complete
const isBlockingReadyScript = script.getAttribute('async') === null && readyStateCompleteCnt > 0;
// does this load block DOMContentLoaded
const isDomContentLoadedScript = domContentLoadedCnt > 0;
if (isBlockingReadyScript) readyStateCompleteCnt++;
if (isDomContentLoadedScript) domContentLoadedCnt++;
const loadPromise = topLevelLoad(script.src || baseUrl, getFetchOpts(script), !script.src && script.innerHTML, !shimMode, isBlockingReadyScript && lastStaticLoadPromise)
.then(() => {
// if the type of the script tag "module-shim", browser does not dispatch a "load" event
// see https://github.com/guybedford/es-module-shims/issues/346
if (shimMode) {
script.dispatchEvent(new Event('load'));
}
})
.catch(throwError);
if (isBlockingReadyScript)
lastStaticLoadPromise = loadPromise.then(readyStateCompleteCheck);
if (isDomContentLoadedScript)
loadPromise.then(domContentLoadedCheck);
}
const fetchCache = {};
function processPreload (link) {
if (link.ep) return;
link.ep = true;
if (fetchCache[link.href])
return;
fetchCache[link.href] = fetchModule(link.href, getFetchOpts(link));
}
})();
wp-polyfill-importmap.min.js 0000644 00000065030 15153765740 0012171 0 ustar 00 !function(){const A="undefined"!=typeof window,Q="undefined"!=typeof document,e=()=>{};var t=Q?document.querySelector("script[type=esms-options]"):void 0;const C=t?JSON.parse(t.innerHTML):{};Object.assign(C,self.esmsInitOptions||{});let B=!Q||!!C.shimMode;const E=p(B&&C.onimport),o=p(B&&C.resolve);let i=C.fetch?p(C.fetch):fetch;const g=C.meta?p(B&&C.meta):e,n=C.mapOverrides;let s=C.nonce;!s&&Q&&(t=document.querySelector("script[nonce]"))&&(s=t.nonce||t.getAttribute("nonce"));const r=p(C.onerror||e),a=C.onpolyfill?p(C.onpolyfill):()=>{console.log("%c^^ Module TypeError above is polyfilled and can be ignored ^^","font-weight:900;color:#391")},{revokeBlobURLs:I,noLoadEventRetriggers:c,enforceIntegrity:l}=C;function p(A){return"string"==typeof A?self[A]:A}const f=(t=Array.isArray(C.polyfillEnable)?C.polyfillEnable:[]).includes("css-modules"),k=t.includes("json-modules"),w=!navigator.userAgentData&&!!navigator.userAgent.match(/Edge\/\d+\.\d+/),m=Q?document.baseURI:location.protocol+"//"+location.host+(location.pathname.includes("/")?location.pathname.slice(0,location.pathname.lastIndexOf("/")+1):location.pathname),K=(A,Q="text/javascript")=>URL.createObjectURL(new Blob([A],{type:Q}));let d=C.skip;if(Array.isArray(d)){const A=d.map((A=>new URL(A,m).href));d=Q=>A.some((A=>"/"===A[A.length-1]&&Q.startsWith(A)||Q===A))}else if("string"==typeof d){const A=new RegExp(d);d=Q=>A.test(Q)}else d instanceof RegExp&&(d=A=>d.test(A));const u=A=>setTimeout((()=>{throw A})),D=Q=>{(self.reportError||A&&window.safari&&console.error||u)(Q),r(Q)};function h(A){return A?" imported from "+A:""}let J=!1;if(!B)if(document.querySelectorAll("script[type=module-shim],script[type=importmap-shim],link[rel=modulepreload-shim]").length)B=!0;else{let A=!1;for(const Q of document.querySelectorAll("script[type=module],script[type=importmap]"))if(A){if("importmap"===Q.type&&A){J=!0;break}}else"module"!==Q.type||Q.ep||(A=!0)}const L=/\\/g;function N(A){try{if(-1!==A.indexOf(":"))return new URL(A).href}catch(A){}}function y(A,Q){return F(A,Q)||N(A)||F("./"+A,Q)}function F(A,Q){var e=Q.indexOf("#"),t=Q.indexOf("?");if(-2<e+t&&(Q=Q.slice(0,-1!==e&&(-1===t||e<t)?e:t)),"/"===(A=-1!==A.indexOf("\\")?A.replace(L,"/"):A)[0]&&"/"===A[1])return Q.slice(0,Q.indexOf(":")+1)+A;if("."===A[0]&&("/"===A[1]||"."===A[1]&&("/"===A[2]||2===A.length&&(A+="/"))||1===A.length&&(A+="/"))||"/"===A[0]){if("blob:"===(e=Q.slice(0,Q.indexOf(":")+1)))throw new TypeError(`Failed to resolve module specifier "${A}". Invalid relative url or base scheme isn't hierarchical.`);let t;if(t="/"===Q[e.length+1]?"file:"!==e?(t=Q.slice(e.length+2)).slice(t.indexOf("/")+1):Q.slice(8):Q.slice(e.length+("/"===Q[e.length])),"/"===A[0])return Q.slice(0,Q.length-t.length-1)+A;var C=t.slice(0,t.lastIndexOf("/")+1)+A,B=[];let E=-1;for(let A=0;A<C.length;A++)if(-1!==E)"/"===C[A]&&(B.push(C.slice(E,A+1)),E=-1);else{if("."===C[A]){if("."===C[A+1]&&("/"===C[A+2]||A+2===C.length)){B.pop(),A+=2;continue}if("/"===C[A+1]||A+1===C.length){A+=1;continue}}for(;"/"===C[A];)A++;E=A}return-1!==E&&B.push(C.slice(E)),Q.slice(0,Q.length-t.length)+B.join("")}}function U(A,Q,e){var t={imports:Object.assign({},e.imports),scopes:Object.assign({},e.scopes)};if(A.imports&&Y(A.imports,t.imports,Q,e),A.scopes)for(var C in A.scopes){var B=y(C,Q);Y(A.scopes[C],t.scopes[B]||(t.scopes[B]={}),Q,e)}return t}function q(A,Q){if(Q[A])return A;let e=A.length;do{var t=A.slice(0,e+1);if(t in Q)return t}while(-1!==(e=A.lastIndexOf("/",e-1)))}function v(A,Q){var e=q(A,Q);if(e&&null!==(Q=Q[e]))return Q+A.slice(e.length)}function R(A,Q,e){let t=e&&q(e,A.scopes);for(;t;){var C=v(Q,A.scopes[t]);if(C)return C;t=q(t.slice(0,t.lastIndexOf("/")),A.scopes)}return v(Q,A.imports)||-1!==Q.indexOf(":")&&Q}function Y(A,Q,e,t){for(var C in A){var E=F(C,e)||C;if((!B||!n)&&Q[E]&&Q[E]!==A[E])throw Error(`Rejected map override "${E}" from ${Q[E]} to ${A[E]}.`);var o=A[C];"string"==typeof o&&((o=R(t,F(o,e)||o,e))?Q[E]=o:console.warn(`Mapping "${C}" -> "${A[C]}" does not resolve`))}}let M,S=!Q&&(0,eval)("u=>import(u)");t=Q&&new Promise((A=>{const Q=Object.assign(document.createElement("script"),{src:K("self._d=u=>import(u)"),ep:!0});Q.setAttribute("nonce",s),Q.addEventListener("load",(()=>{if(!(M=!!(S=self._d))){let A;window.addEventListener("error",(Q=>A=Q)),S=(Q,e)=>new Promise(((t,C)=>{const B=Object.assign(document.createElement("script"),{type:"module",src:K(`import*as m from'${Q}';self._esmsi=m`)});function E(E){document.head.removeChild(B),self._esmsi?(t(self._esmsi,m),self._esmsi=void 0):(C(!(E instanceof Event)&&E||A&&A.error||new Error(`Error loading ${e&&e.errUrl||Q} (${B.src}).`)),A=void 0)}A=void 0,B.ep=!0,s&&B.setAttribute("nonce",s),B.addEventListener("error",E),B.addEventListener("load",E),document.head.appendChild(B)}))}document.head.removeChild(Q),delete self._d,A()})),document.head.appendChild(Q)}));let G=!1,b=!1;var x=Q&&HTMLScriptElement.supports;let H=x&&"supports"===x.name&&x("importmap"),$=M;const j="import.meta",O='import"x"assert{type:"css"}';x=Promise.resolve(t).then((()=>{if(M)return Q?new Promise((A=>{const Q=document.createElement("iframe");Q.style.display="none",Q.setAttribute("nonce",s),window.addEventListener("message",(function e({data:t}){Array.isArray(t)&&"esms"===t[0]&&(H=t[1],$=t[2],b=t[3],G=t[4],A(),document.head.removeChild(Q),window.removeEventListener("message",e,!1))}),!1);const e=`<script nonce=${s||""}>b=(s,type='text/javascript')=>URL.createObjectURL(new Blob([s],{type}));document.head.appendChild(Object.assign(document.createElement('script'),{type:'importmap',nonce:"${s}",innerText:\`{"imports":{"x":"\${b('')}"}}\`}));Promise.all([${H?"true,true":`'x',b('${j}')`}, ${f?`b('${O}'.replace('x',b('','text/css')))`:"false"}, ${k?"b('import\"x\"assert{type:\"json\"}'.replace('x',b('{}','text/json')))":"false"}].map(x =>typeof x==='string'?import(x).then(x =>!!x,()=>false):x)).then(a=>parent.postMessage(['esms'].concat(a),'*'))<\/script>`;let t=!1,C=!1;function B(){var A,B;t?(A=Q.contentDocument)&&0===A.head.childNodes.length&&(B=A.createElement("script"),s&&B.setAttribute("nonce",s),B.innerHTML=e.slice(15+(s?s.length:0),-9),A.head.appendChild(B)):C=!0}Q.onload=B,document.head.appendChild(Q),t=!0,"srcdoc"in Q?Q.srcdoc=e:Q.contentDocument.write(e),C&&B()})):Promise.all([H||S(K(j)).then((()=>$=!0),e),f&&S(K(O.replace("x",K("","text/css")))).then((()=>b=!0),e),k&&S(K(jsonModulescheck.replace("x",K("{}","text/json")))).then((()=>G=!0),e)])}));const X=1===new Uint8Array(new Uint16Array([1]).buffer)[0];function P(A,Q="@"){if(!Z)return V.then((()=>P(A)));const e=A.length+1,t=(Z.__heap_base.value||Z.__heap_base)+4*e-Z.memory.buffer.byteLength,C=(0<t&&Z.memory.grow(Math.ceil(t/65536)),Z.sa(e-1));if((X?_:T)(A,new Uint16Array(Z.memory.buffer,C,e)),!Z.parse())throw Object.assign(new Error(`Parse error ${Q}:${A.slice(0,Z.e()).split("\n").length}:`+(Z.e()-A.lastIndexOf("\n",Z.e()-1))),{idx:Z.e()});const B=[],E=[];for(;Z.ri();){const Q=Z.is(),e=Z.ie(),t=Z.ai(),C=Z.id(),E=Z.ss(),i=Z.se();let g;Z.ip()&&(g=o(A.slice(-1===C?Q-1:Q,-1===C?e+1:e))),B.push({n:g,s:Q,e,ss:E,se:i,d:C,a:t})}for(;Z.re();){const Q=Z.es(),e=Z.ee(),t=Z.els(),C=Z.ele(),B=A.slice(Q,e),i=B[0],g=t<0?void 0:A.slice(t,C),n=g?g[0]:"";E.push({s:Q,e,ls:t,le:C,n:'"'===i||"'"===i?o(B):B,ln:'"'===n||"'"===n?o(g):g})}function o(A){try{return(0,eval)(A)}catch(A){}}return[B,E,!!Z.f(),!!Z.ms()]}function T(A,Q){const e=A.length;let t=0;for(;t<e;){const e=A.charCodeAt(t);Q[t++]=(255&e)<<8|e>>>8}}function _(A,Q){var e=A.length;let t=0;for(;t<e;)Q[t]=A.charCodeAt(t++)}let Z;const V=WebAssembly.compile((t="AGFzbQEAAAABKghgAX8Bf2AEf39/fwBgAAF/YAAAYAF/AGADf39/AX9gAn9/AX9gAn9/AAMwLwABAQICAgICAgICAgICAgICAgICAAMDAwQEAAAAAwAAAAADAwAFBgAAAAcABgIFBAUBcAEBAQUDAQABBg8CfwFBsPIAC38AQbDyAAsHdRQGbWVtb3J5AgACc2EAAAFlAAMCaXMABAJpZQAFAnNzAAYCc2UABwJhaQAIAmlkAAkCaXAACgJlcwALAmVlAAwDZWxzAA0DZWxlAA4CcmkADwJyZQAQAWYAEQJtcwASBXBhcnNlABMLX19oZWFwX2Jhc2UDAQryPS9oAQF/QQAgADYC9AlBACgC0AkiASAAQQF0aiIAQQA7AQBBACAAQQJqIgA2AvgJQQAgADYC/AlBAEEANgLUCUEAQQA2AuQJQQBBADYC3AlBAEEANgLYCUEAQQA2AuwJQQBBADYC4AkgAQu+AQEDf0EAKALkCSEEQQBBACgC/AkiBTYC5AlBACAENgLoCUEAIAVBIGo2AvwJIARBHGpB1AkgBBsgBTYCAEEAKALICSEEQQAoAsQJIQYgBSABNgIAIAUgADYCCCAFIAIgAkECakEAIAYgA0YbIAQgA0YbNgIMIAUgAzYCFCAFQQA2AhAgBSACNgIEIAVBADYCHCAFQQAoAsQJIANGIgI6ABgCQAJAIAINAEEAKALICSADRw0BC0EAQQE6AIAKCwteAQF/QQAoAuwJIgRBEGpB2AkgBBtBACgC/AkiBDYCAEEAIAQ2AuwJQQAgBEEUajYC/AlBAEEBOgCACiAEQQA2AhAgBCADNgIMIAQgAjYCCCAEIAE2AgQgBCAANgIACwgAQQAoAoQKCxUAQQAoAtwJKAIAQQAoAtAJa0EBdQseAQF/QQAoAtwJKAIEIgBBACgC0AlrQQF1QX8gABsLFQBBACgC3AkoAghBACgC0AlrQQF1Cx4BAX9BACgC3AkoAgwiAEEAKALQCWtBAXVBfyAAGwseAQF/QQAoAtwJKAIQIgBBACgC0AlrQQF1QX8gABsLOwEBfwJAQQAoAtwJKAIUIgBBACgCxAlHDQBBfw8LAkAgAEEAKALICUcNAEF+DwsgAEEAKALQCWtBAXULCwBBACgC3AktABgLFQBBACgC4AkoAgBBACgC0AlrQQF1CxUAQQAoAuAJKAIEQQAoAtAJa0EBdQseAQF/QQAoAuAJKAIIIgBBACgC0AlrQQF1QX8gABsLHgEBf0EAKALgCSgCDCIAQQAoAtAJa0EBdUF/IAAbCyUBAX9BAEEAKALcCSIAQRxqQdQJIAAbKAIAIgA2AtwJIABBAEcLJQEBf0EAQQAoAuAJIgBBEGpB2AkgABsoAgAiADYC4AkgAEEARwsIAEEALQCICgsIAEEALQCACgvyDAEGfyMAQYDQAGsiACQAQQBBAToAiApBAEEAKALMCTYCkApBAEEAKALQCUF+aiIBNgKkCkEAIAFBACgC9AlBAXRqIgI2AqgKQQBBADoAgApBAEEAOwGKCkEAQQA7AYwKQQBBADoAlApBAEEANgKECkEAQQA6APAJQQAgAEGAEGo2ApgKQQAgADYCnApBAEEAOgCgCgJAAkACQAJAA0BBACABQQJqIgM2AqQKIAEgAk8NAQJAIAMvAQAiAkF3akEFSQ0AAkACQAJAAkACQCACQZt/ag4FAQgICAIACyACQSBGDQQgAkEvRg0DIAJBO0YNAgwHC0EALwGMCg0BIAMQFEUNASABQQRqQYIIQQoQLg0BEBVBAC0AiAoNAUEAQQAoAqQKIgE2ApAKDAcLIAMQFEUNACABQQRqQYwIQQoQLg0AEBYLQQBBACgCpAo2ApAKDAELAkAgAS8BBCIDQSpGDQAgA0EvRw0EEBcMAQtBARAYC0EAKAKoCiECQQAoAqQKIQEMAAsLQQAhAiADIQFBAC0A8AkNAgwBC0EAIAE2AqQKQQBBADoAiAoLA0BBACABQQJqIgM2AqQKAkACQAJAAkACQAJAAkACQAJAIAFBACgCqApPDQAgAy8BACICQXdqQQVJDQgCQAJAAkACQAJAAkACQAJAAkACQCACQWBqDgoSEQYRERERBQECAAsCQAJAAkACQCACQaB/ag4KCxQUAxQBFBQUAgALIAJBhX9qDgMFEwYJC0EALwGMCg0SIAMQFEUNEiABQQRqQYIIQQoQLg0SEBUMEgsgAxAURQ0RIAFBBGpBjAhBChAuDREQFgwRCyADEBRFDRAgASkABELsgISDsI7AOVINECABLwEMIgNBd2oiAUEXSw0OQQEgAXRBn4CABHFFDQ4MDwtBAEEALwGMCiIBQQFqOwGMCkEAKAKYCiABQQN0aiIBQQE2AgAgAUEAKAKQCjYCBAwPC0EALwGMCiIDRQ0LQQAgA0F/aiICOwGMCkEALwGKCiIDRQ0OQQAoApgKIAJB//8DcUEDdGooAgBBBUcNDgJAIANBAnRBACgCnApqQXxqKAIAIgIoAgQNACACQQAoApAKQQJqNgIEC0EAIANBf2o7AYoKIAIgAUEEajYCDAwOCwJAQQAoApAKIgEvAQBBKUcNAEEAKALkCSIDRQ0AIAMoAgQgAUcNAEEAQQAoAugJIgM2AuQJAkAgA0UNACADQQA2AhwMAQtBAEEANgLUCQtBAEEALwGMCiIDQQFqOwGMCkEAKAKYCiADQQN0aiIDQQZBAkEALQCgChs2AgAgAyABNgIEQQBBADoAoAoMDQtBAC8BjAoiAUUNCUEAIAFBf2oiATsBjApBACgCmAogAUH//wNxQQN0aigCAEEERg0EDAwLQScQGQwLC0EiEBkMCgsgAkEvRw0JAkACQCABLwEEIgFBKkYNACABQS9HDQEQFwwMC0EBEBgMCwsCQAJAQQAoApAKIgEvAQAiAxAaRQ0AAkACQCADQVVqDgQACAEDCAsgAUF+ai8BAEErRg0GDAcLIAFBfmovAQBBLUYNBQwGCwJAIANB/QBGDQAgA0EpRw0FQQAoApgKQQAvAYwKQQN0aigCBBAbRQ0FDAYLQQAoApgKQQAvAYwKQQN0aiICKAIEEBwNBSACKAIAQQZGDQUMBAsgAUF+ai8BAEFQakH//wNxQQpJDQMMBAtBACgCmApBAC8BjAoiAUEDdCIDakEAKAKQCjYCBEEAIAFBAWo7AYwKQQAoApgKIANqQQM2AgALEB0MBwtBAC0A8AlBAC8BigpBAC8BjApyckUhAgwJCyABEB4NACADRQ0AIANBL0ZBAC0AlApBAEdxDQAgAUF+aiEBQQAoAtAJIQICQANAIAFBAmoiBCACTQ0BQQAgATYCkAogAS8BACEDIAFBfmoiBCEBIAMQH0UNAAsgBEECaiEEC0EBIQUgA0H//wNxECBFDQEgBEF+aiEBAkADQCABQQJqIgMgAk0NAUEAIAE2ApAKIAEvAQAhAyABQX5qIgQhASADECANAAsgBEECaiEDCyADECFFDQEQIkEAQQA6AJQKDAULECJBACEFC0EAIAU6AJQKDAMLECNBACECDAULIANBoAFHDQELQQBBAToAoAoLQQBBACgCpAo2ApAKC0EAKAKkCiEBDAALCyAAQYDQAGokACACCxoAAkBBACgC0AkgAEcNAEEBDwsgAEF+ahAkC/wKAQZ/QQBBACgCpAoiAEEMaiIBNgKkCkEAKALsCSECQQEQKCEDAkACQAJAAkACQAJAAkACQAJAQQAoAqQKIgQgAUcNACADECdFDQELAkACQAJAAkACQAJAAkAgA0EqRg0AIANB+wBHDQFBACAEQQJqNgKkCkEBECghA0EAKAKkCiEEA0ACQAJAIANB//8DcSIDQSJGDQAgA0EnRg0AIAMQKxpBACgCpAohAwwBCyADEBlBAEEAKAKkCkECaiIDNgKkCgtBARAoGgJAIAQgAxAsIgNBLEcNAEEAQQAoAqQKQQJqNgKkCkEBECghAwsgA0H9AEYNA0EAKAKkCiIFIARGDQ8gBSEEIAVBACgCqApNDQAMDwsLQQAgBEECajYCpApBARAoGkEAKAKkCiIDIAMQLBoMAgtBAEEAOgCICgJAAkACQAJAAkACQCADQZ9/ag4MAgsEAQsDCwsLCwsFAAsgA0H2AEYNBAwKC0EAIARBDmoiAzYCpAoCQAJAAkBBARAoQZ9/ag4GABICEhIBEgtBACgCpAoiBSkAAkLzgOSD4I3AMVINESAFLwEKECBFDRFBACAFQQpqNgKkCkEAECgaC0EAKAKkCiIFQQJqQaIIQQ4QLg0QIAUvARAiAkF3aiIBQRdLDQ1BASABdEGfgIAEcUUNDQwOC0EAKAKkCiIFKQACQuyAhIOwjsA5Ug0PIAUvAQoiAkF3aiIBQRdNDQYMCgtBACAEQQpqNgKkCkEAECgaQQAoAqQKIQQLQQAgBEEQajYCpAoCQEEBECgiBEEqRw0AQQBBACgCpApBAmo2AqQKQQEQKCEEC0EAKAKkCiEDIAQQKxogA0EAKAKkCiIEIAMgBBACQQBBACgCpApBfmo2AqQKDwsCQCAEKQACQuyAhIOwjsA5Ug0AIAQvAQoQH0UNAEEAIARBCmo2AqQKQQEQKCEEQQAoAqQKIQMgBBArGiADQQAoAqQKIgQgAyAEEAJBAEEAKAKkCkF+ajYCpAoPC0EAIARBBGoiBDYCpAoLQQAgBEEGajYCpApBAEEAOgCICkEBECghBEEAKAKkCiEDIAQQKyEEQQAoAqQKIQIgBEHf/wNxIgFB2wBHDQNBACACQQJqNgKkCkEBECghBUEAKAKkCiEDQQAhBAwEC0EAQQE6AIAKQQBBACgCpApBAmo2AqQKC0EBECghBEEAKAKkCiEDAkAgBEHmAEcNACADQQJqQZwIQQYQLg0AQQAgA0EIajYCpAogAEEBECgQKiACQRBqQdgJIAIbIQMDQCADKAIAIgNFDQUgA0IANwIIIANBEGohAwwACwtBACADQX5qNgKkCgwDC0EBIAF0QZ+AgARxRQ0DDAQLQQEhBAsDQAJAAkAgBA4CAAEBCyAFQf//A3EQKxpBASEEDAELAkACQEEAKAKkCiIEIANGDQAgAyAEIAMgBBACQQEQKCEEAkAgAUHbAEcNACAEQSByQf0ARg0EC0EAKAKkCiEDAkAgBEEsRw0AQQAgA0ECajYCpApBARAoIQVBACgCpAohAyAFQSByQfsARw0CC0EAIANBfmo2AqQKCyABQdsARw0CQQAgAkF+ajYCpAoPC0EAIQQMAAsLDwsgAkGgAUYNACACQfsARw0EC0EAIAVBCmo2AqQKQQEQKCIFQfsARg0DDAILAkAgAkFYag4DAQMBAAsgAkGgAUcNAgtBACAFQRBqNgKkCgJAQQEQKCIFQSpHDQBBAEEAKAKkCkECajYCpApBARAoIQULIAVBKEYNAQtBACgCpAohASAFECsaQQAoAqQKIgUgAU0NACAEIAMgASAFEAJBAEEAKAKkCkF+ajYCpAoPCyAEIANBAEEAEAJBACAEQQxqNgKkCg8LECML1AYBBH9BAEEAKAKkCiIAQQxqIgE2AqQKAkACQAJAAkACQAJAAkACQAJAAkBBARAoIgJBWWoOCAQCAQQBAQEDAAsgAkEiRg0DIAJB+wBGDQQLQQAoAqQKIAFHDQJBACAAQQpqNgKkCg8LQQAoApgKQQAvAYwKIgJBA3RqIgFBACgCpAo2AgRBACACQQFqOwGMCiABQQU2AgBBACgCkAovAQBBLkYNA0EAQQAoAqQKIgFBAmo2AqQKQQEQKCECIABBACgCpApBACABEAFBAEEALwGKCiIBQQFqOwGKCkEAKAKcCiABQQJ0akEAKALkCTYCAAJAIAJBIkYNACACQSdGDQBBAEEAKAKkCkF+ajYCpAoPCyACEBlBAEEAKAKkCkECaiICNgKkCgJAAkACQEEBEChBV2oOBAECAgACC0EAQQAoAqQKQQJqNgKkCkEBECgaQQAoAuQJIgEgAjYCBCABQQE6ABggAUEAKAKkCiICNgIQQQAgAkF+ajYCpAoPC0EAKALkCSIBIAI2AgQgAUEBOgAYQQBBAC8BjApBf2o7AYwKIAFBACgCpApBAmo2AgxBAEEALwGKCkF/ajsBigoPC0EAQQAoAqQKQX5qNgKkCg8LQQBBACgCpApBAmo2AqQKQQEQKEHtAEcNAkEAKAKkCiICQQJqQZYIQQYQLg0CAkBBACgCkAoiARApDQAgAS8BAEEuRg0DCyAAIAAgAkEIakEAKALICRABDwtBAC8BjAoNAkEAKAKkCiECQQAoAqgKIQMDQCACIANPDQUCQAJAIAIvAQAiAUEnRg0AIAFBIkcNAQsgACABECoPC0EAIAJBAmoiAjYCpAoMAAsLQQAoAqQKIQJBAC8BjAoNAgJAA0ACQAJAAkAgAkEAKAKoCk8NAEEBECgiAkEiRg0BIAJBJ0YNASACQf0ARw0CQQBBACgCpApBAmo2AqQKC0EBECghAUEAKAKkCiECAkAgAUHmAEcNACACQQJqQZwIQQYQLg0IC0EAIAJBCGo2AqQKQQEQKCICQSJGDQMgAkEnRg0DDAcLIAIQGQtBAEEAKAKkCkECaiICNgKkCgwACwsgACACECoLDwtBAEEAKAKkCkF+ajYCpAoPC0EAIAJBfmo2AqQKDwsQIwtHAQN/QQAoAqQKQQJqIQBBACgCqAohAQJAA0AgACICQX5qIAFPDQEgAkECaiEAIAIvAQBBdmoOBAEAAAEACwtBACACNgKkCguYAQEDf0EAQQAoAqQKIgFBAmo2AqQKIAFBBmohAUEAKAKoCiECA0ACQAJAAkAgAUF8aiACTw0AIAFBfmovAQAhAwJAAkAgAA0AIANBKkYNASADQXZqDgQCBAQCBAsgA0EqRw0DCyABLwEAQS9HDQJBACABQX5qNgKkCgwBCyABQX5qIQELQQAgATYCpAoPCyABQQJqIQEMAAsLiAEBBH9BACgCpAohAUEAKAKoCiECAkACQANAIAEiA0ECaiEBIAMgAk8NASABLwEAIgQgAEYNAgJAIARB3ABGDQAgBEF2ag4EAgEBAgELIANBBGohASADLwEEQQ1HDQAgA0EGaiABIAMvAQZBCkYbIQEMAAsLQQAgATYCpAoQIw8LQQAgATYCpAoLbAEBfwJAAkAgAEFfaiIBQQVLDQBBASABdEExcQ0BCyAAQUZqQf//A3FBBkkNACAAQSlHIABBWGpB//8DcUEHSXENAAJAIABBpX9qDgQBAAABAAsgAEH9AEcgAEGFf2pB//8DcUEESXEPC0EBCy4BAX9BASEBAkAgAEGWCUEFECUNACAAQaAJQQMQJQ0AIABBpglBAhAlIQELIAELgwEBAn9BASEBAkACQAJAAkACQAJAIAAvAQAiAkFFag4EBQQEAQALAkAgAkGbf2oOBAMEBAIACyACQSlGDQQgAkH5AEcNAyAAQX5qQbIJQQYQJQ8LIABBfmovAQBBPUYPCyAAQX5qQaoJQQQQJQ8LIABBfmpBvglBAxAlDwtBACEBCyABC94BAQR/QQAoAqQKIQBBACgCqAohAQJAAkACQANAIAAiAkECaiEAIAIgAU8NAQJAAkACQCAALwEAIgNBpH9qDgUCAwMDAQALIANBJEcNAiACLwEEQfsARw0CQQAgAkEEaiIANgKkCkEAQQAvAYwKIgJBAWo7AYwKQQAoApgKIAJBA3RqIgJBBDYCACACIAA2AgQPC0EAIAA2AqQKQQBBAC8BjApBf2oiADsBjApBACgCmAogAEH//wNxQQN0aigCAEEDRw0DDAQLIAJBBGohAAwACwtBACAANgKkCgsQIwsLtAMBAn9BACEBAkACQAJAAkACQAJAAkACQAJAAkAgAC8BAEGcf2oOFAABAgkJCQkDCQkEBQkJBgkHCQkICQsCQAJAIABBfmovAQBBl39qDgQACgoBCgsgAEF8akG6CEECECUPCyAAQXxqQb4IQQMQJQ8LAkACQAJAIABBfmovAQBBjX9qDgMAAQIKCwJAIABBfGovAQAiAkHhAEYNACACQewARw0KIABBempB5QAQJg8LIABBempB4wAQJg8LIABBfGpBxAhBBBAlDwsgAEF8akHMCEEGECUPCyAAQX5qLwEAQe8ARw0GIABBfGovAQBB5QBHDQYCQCAAQXpqLwEAIgJB8ABGDQAgAkHjAEcNByAAQXhqQdgIQQYQJQ8LIABBeGpB5AhBAhAlDwsgAEF+akHoCEEEECUPC0EBIQEgAEF+aiIAQekAECYNBCAAQfAIQQUQJQ8LIABBfmpB5AAQJg8LIABBfmpB+ghBBxAlDwsgAEF+akGICUEEECUPCwJAIABBfmovAQAiAkHvAEYNACACQeUARw0BIABBfGpB7gAQJg8LIABBfGpBkAlBAxAlIQELIAELNAEBf0EBIQECQCAAQXdqQf//A3FBBUkNACAAQYABckGgAUYNACAAQS5HIAAQJ3EhAQsgAQswAQF/AkACQCAAQXdqIgFBF0sNAEEBIAF0QY2AgARxDQELIABBoAFGDQBBAA8LQQELTgECf0EAIQECQAJAIAAvAQAiAkHlAEYNACACQesARw0BIABBfmpB6AhBBBAlDwsgAEF+ai8BAEH1AEcNACAAQXxqQcwIQQYQJSEBCyABC3ABAn8CQAJAA0BBAEEAKAKkCiIAQQJqIgE2AqQKIABBACgCqApPDQECQAJAAkAgAS8BACIBQaV/ag4CAQIACwJAIAFBdmoOBAQDAwQACyABQS9HDQIMBAsQLRoMAQtBACAAQQRqNgKkCgwACwsQIwsLNQEBf0EAQQE6APAJQQAoAqQKIQBBAEEAKAKoCkECajYCpApBACAAQQAoAtAJa0EBdTYChAoLQwECf0EBIQECQCAALwEAIgJBd2pB//8DcUEFSQ0AIAJBgAFyQaABRg0AQQAhASACECdFDQAgAkEuRyAAEClyDwsgAQtGAQN/QQAhAwJAIAAgAkEBdCICayIEQQJqIgBBACgC0AkiBUkNACAAIAEgAhAuDQACQCAAIAVHDQBBAQ8LIAQQJCEDCyADCz0BAn9BACECAkBBACgC0AkiAyAASw0AIAAvAQAgAUcNAAJAIAMgAEcNAEEBDwsgAEF+ai8BABAfIQILIAILaAECf0EBIQECQAJAIABBX2oiAkEFSw0AQQEgAnRBMXENAQsgAEH4/wNxQShGDQAgAEFGakH//wNxQQZJDQACQCAAQaV/aiICQQNLDQAgAkEBRw0BCyAAQYV/akH//wNxQQRJIQELIAELnAEBA39BACgCpAohAQJAA0ACQAJAIAEvAQAiAkEvRw0AAkAgAS8BAiIBQSpGDQAgAUEvRw0EEBcMAgsgABAYDAELAkACQCAARQ0AIAJBd2oiAUEXSw0BQQEgAXRBn4CABHFFDQEMAgsgAhAgRQ0DDAELIAJBoAFHDQILQQBBACgCpAoiA0ECaiIBNgKkCiADQQAoAqgKSQ0ACwsgAgsxAQF/QQAhAQJAIAAvAQBBLkcNACAAQX5qLwEAQS5HDQAgAEF8ai8BAEEuRiEBCyABC4kEAQF/AkAgAUEiRg0AIAFBJ0YNABAjDwtBACgCpAohAiABEBkgACACQQJqQQAoAqQKQQAoAsQJEAFBAEEAKAKkCkECajYCpAoCQAJAAkACQEEAECgiAUHhAEYNACABQfcARg0BQQAoAqQKIQEMAgtBACgCpAoiAUECakGwCEEKEC4NAUEGIQAMAgtBACgCpAoiAS8BAkHpAEcNACABLwEEQfQARw0AQQQhACABLwEGQegARg0BC0EAIAFBfmo2AqQKDwtBACABIABBAXRqNgKkCgJAQQEQKEH7AEYNAEEAIAE2AqQKDwtBACgCpAoiAiEAA0BBACAAQQJqNgKkCgJAAkACQEEBECgiAEEiRg0AIABBJ0cNAUEnEBlBAEEAKAKkCkECajYCpApBARAoIQAMAgtBIhAZQQBBACgCpApBAmo2AqQKQQEQKCEADAELIAAQKyEACwJAIABBOkYNAEEAIAE2AqQKDwtBAEEAKAKkCkECajYCpAoCQEEBECgiAEEiRg0AIABBJ0YNAEEAIAE2AqQKDwsgABAZQQBBACgCpApBAmo2AqQKAkACQEEBECgiAEEsRg0AIABB/QBGDQFBACABNgKkCg8LQQBBACgCpApBAmo2AqQKQQEQKEH9AEYNAEEAKAKkCiEADAELC0EAKALkCSIBIAI2AhAgAUEAKAKkCkECajYCDAttAQJ/AkACQANAAkAgAEH//wNxIgFBd2oiAkEXSw0AQQEgAnRBn4CABHENAgsgAUGgAUYNASAAIQIgARAnDQJBACECQQBBACgCpAoiAEECajYCpAogAC8BAiIADQAMAgsLIAAhAgsgAkH//wNxC6sBAQR/AkACQEEAKAKkCiICLwEAIgNB4QBGDQAgASEEIAAhBQwBC0EAIAJBBGo2AqQKQQEQKCECQQAoAqQKIQUCQAJAIAJBIkYNACACQSdGDQAgAhArGkEAKAKkCiEEDAELIAIQGUEAQQAoAqQKQQJqIgQ2AqQKC0EBECghA0EAKAKkCiECCwJAIAIgBUYNACAFIARBACAAIAAgAUYiAhtBACABIAIbEAILIAMLcgEEf0EAKAKkCiEAQQAoAqgKIQECQAJAA0AgAEECaiECIAAgAU8NAQJAAkAgAi8BACIDQaR/ag4CAQQACyACIQAgA0F2ag4EAgEBAgELIABBBGohAAwACwtBACACNgKkChAjQQAPC0EAIAI2AqQKQd0AC0kBA39BACEDAkAgAkUNAAJAA0AgAC0AACIEIAEtAAAiBUcNASABQQFqIQEgAEEBaiEAIAJBf2oiAg0ADAILCyAEIAVrIQMLIAMLC+IBAgBBgAgLxAEAAHgAcABvAHIAdABtAHAAbwByAHQAZQB0AGEAcgBvAG0AdQBuAGMAdABpAG8AbgBzAHMAZQByAHQAdgBvAHkAaQBlAGQAZQBsAGUAYwBvAG4AdABpAG4AaQBuAHMAdABhAG4AdAB5AGIAcgBlAGEAcgBlAHQAdQByAGQAZQBiAHUAZwBnAGUAYQB3AGEAaQB0AGgAcgB3AGgAaQBsAGUAZgBvAHIAaQBmAGMAYQB0AGMAZgBpAG4AYQBsAGwAZQBsAHMAAEHECQsQAQAAAAIAAAAABAAAMDkAAA==","undefined"!=typeof Buffer?Buffer.from(t,"base64"):Uint8Array.from(atob(t),(A=>A.charCodeAt(0))))).then(WebAssembly.instantiate).then((({exports:A})=>{Z=A}));async function W(A,Q){var e=F(A,Q)||N(A);return{r:R(oA,e||A,Q)||eA(A,Q),b:!e&&!N(A)}}const z=o?async(A,Q)=>{let e=o(A,Q,QA);return(e=e&&e.then?await e:e)?{r:e,b:!F(A,Q)&&!N(A)}:W(A,Q)}:W;async function AA(A,...e){let t=e[e.length-1];return"string"!=typeof t&&(t=m),await iA,E&&await E(A,"string"!=typeof e[1]?e[1]:{},t),!rA&&!B&&EA||(Q&&JA(!0),B)||(rA=!1),await nA,aA((await z(A,t)).r,{credentials:"same-origin"})}function QA(A,Q){return R(oA,F(A,Q)||A,Q)||eA(A,Q)}function eA(A,Q){throw Error(`Unable to resolve specifier '${A}'`+h(Q))}self.importShim=AA;const tA=(A,Q=m)=>{Q=""+Q;var e=o&&o(A,Q,QA);return e&&!e.then?e:QA(A,Q)};function CA(A,Q=this.url){return tA(A,Q)}AA.resolve=tA,AA.getImportMap=()=>JSON.parse(JSON.stringify(oA)),AA.addImportMap=A=>{if(!B)throw new Error("Unsupported in polyfill mode.");oA=U(A,m,oA)};const BA=AA._r={};AA._w={};let EA,oA={imports:{},scopes:{}};const iA=x.then((()=>{if(EA=!0!==C.polyfillEnable&&M&&$&&H&&(!k||G)&&(!f||b)&&!J,Q){if(!H){const A=HTMLScriptElement.supports||(A=>"classic"===A||"module"===A);HTMLScriptElement.supports=Q=>"importmap"===Q||A(Q)}!B&&EA||(new MutationObserver((A=>{for(const Q of A)if("childList"===Q.type)for(const A of Q.addedNodes)"SCRIPT"===A.tagName?(A.type===(B?"module-shim":"module")&&MA(A,!0),A.type===(B?"importmap-shim":"importmap")&&YA(A,!0)):"LINK"===A.tagName&&A.rel===(B?"modulepreload-shim":"modulepreload")&&GA(A)})).observe(document,{childList:!0,subtree:!0}),JA(),"complete"===document.readyState?qA():document.addEventListener("readystatechange",(async function A(){await iA,JA(),"complete"===document.readyState&&(qA(),document.removeEventListener("readystatechange",A))})))}return V}));let gA,nA=iA,sA=!0,rA=!0;async function aA(A,Q,e,t,C){return B||(rA=!1),await iA,await nA,E&&await E(A,"string"!=typeof Q?Q:{},""),!B&&EA?t?null:(await C,S(e?K(e):A,{errUrl:A||e})):(A=function A(Q,e,t,C){let E=BA[Q];if(E&&!C)return E;if(E={u:Q,r:C?Q:void 0,f:void 0,S:void 0,L:void 0,a:void 0,d:void 0,b:void 0,s:void 0,n:!1,t:null,m:null},BA[Q]){let A=0;for(;BA[E.u+ ++A];);E.u+=A}return BA[E.u]=E,E.f=(async()=>{if(!C){let A;if(({r:E.r,s:C,t:A}=await(SA[Q]||hA(Q,e,t))),A&&!B){if("css"===A&&!f||"json"===A&&!k)throw Error(`${A}-modules require <script type="esms-options">{ "polyfillEnable": ["${A}-modules"] }<\/script>`);("css"===A&&!b||"json"===A&&!G)&&(E.n=!0)}}try{E.a=P(C,E.u)}catch(A){D(A),E.a=[[],[],!1]}return E.S=C,E})(),E.L=E.f.then((async()=>{let Q=e;E.d=(await Promise.all(E.a[0].map((async({n:e,d:t})=>{if((0<=t&&!M||-2===t&&!$)&&(E.n=!0),-1===t&&e){const{r:C,b:B}=await z(e,E.r||E.u);if(!B||H&&!J||(E.n=!0),-1===t)return d&&d(C)?{b:C}:(Q.integrity&&(Q=Object.assign({},Q,{integrity:void 0})),A(C,Q,E.r).f)}})))).filter((A=>A))})),E}(A,Q,null,e),Q={},await async function A(Q,e){Q.b||e[Q.u]||(e[Q.u]=1,await Q.L,await Promise.all(Q.d.map((Q=>A(Q,e)))),Q.n)||(Q.n=Q.d.some((A=>A.n)))}(A,Q),gA=void 0,function A(Q,e){if(Q.b||!e[Q.u])return;e[Q.u]=0;for(const t of Q.d)A(t,e);const[t,C]=Q.a,B=Q.S;let E=w&&gA?`import '${gA}';`:"",o=0,i=0,n=[];function s(A){for(;n[n.length-1]<A;){const A=n.pop();E+=B.slice(o,A)+", "+cA(Q.r),o=A}E+=B.slice(o,A),o=A}for(var{s:r,ss:a,se:I,d:c}of t)if(-1===c){let A=Q.d[i++],e=A.b,t=!e;t&&(e=(e=A.s)||(A.s=K(`export function u$_(m){${A.a[1].map((({s:Q,e},t)=>{const C='"'===A.S[Q]||"'"===A.S[Q];return`e$_${t}=m`+(C?"[":".")+A.S.slice(Q,e)+(C?"]":"")})).join(",")}}${A.a[1].length?`let ${A.a[1].map(((A,Q)=>"e$_"+Q)).join(",")};`:""}export {${A.a[1].map((({s:Q,e},t)=>`e$_${t} as `+A.S.slice(Q,e))).join(",")}}\n//# sourceURL=${A.r}?cycle`))),s(r-1),E+=`/*${B.slice(r-1,I)}*/`+cA(e),!t&&A.s&&(E+=`;import*as m$_${i} from'${A.b}';import{u$_ as u$_${i}}from'${A.s}';u$_${i}(m$_${i})`,A.s=void 0),o=I}else o=-2===c?(Q.m={url:Q.r,resolve:CA},g(Q.m,Q.u),s(r),E+=`importShim._r[${cA(Q.u)}].m`,I):(s(a+6),E+="Shim(",n.push(I-1),r);function l(A,e){const t=e+A.length,C=B.indexOf("\n",t),i=-1!==C?C:B.length;s(t),E+=new URL(B.slice(t,i),Q.r).href,o=i}Q.s&&(E+=`\n;import{u$_}from'${Q.s}';try{u$_({${C.filter((A=>A.ln)).map((({s:A,e:Q,ln:e})=>B.slice(A,Q)+":"+e)).join(",")}})}catch(_){};\n`);let p=B.lastIndexOf(lA),f=B.lastIndexOf(pA);p<o&&(p=-1),f<o&&(f=-1),-1!==p&&(-1===f||f>p)&&l(lA,p),-1!==f&&(l(pA,f),-1!==p)&&p>f&&l(lA,p),s(B.length),-1===p&&(E+=lA+Q.r),Q.b=gA=K(E),Q.S=void 0}(A,Q),await C,!e||B||A.n?(sA&&!B&&A.n&&t&&(a(),sA=!1),C=await S(B||A.n||!t?A.b:A.u,{errUrl:A.u}),A.s&&(await S(A.s)).u$_(C),I&&IA(Object.keys(Q)),C):t?void 0:(I&&IA(Object.keys(Q)),S(K(e),{errUrl:e})))}function IA(A){let Q=0;const e=A.length,t=self.requestIdleCallback||self.requestAnimationFrame;t((function C(){const B=100*Q;if(!(B>e)){for(const Q of A.slice(B,100+B)){const A=BA[Q];A&&URL.revokeObjectURL(A.b)}Q++,t(C)}}))}function cA(A){return`'${A.replace(/'/g,"\\'")}'`}const lA="\n//# sourceURL=",pA="\n//# sourceMappingURL=",fA=/^(text|application)\/(x-)?javascript(;|$)/,kA=/^(application)\/wasm(;|$)/,wA=/^(text|application)\/json(;|$)/,mA=/^(text|application)\/css(;|$)/,KA=/url\(\s*(?:(["'])((?:\\.|[^\n\\"'])+)\1|((?:\\.|[^\s,"'()\\])+))\s*\)/g;let dA=[],uA=0;async function DA(A,Q,e){if(l&&!Q.integrity)throw Error(`No integrity for ${A}${h(e)}.`);var t=function(){if(100<++uA)return new Promise((A=>dA.push(A)))}();t&&await t;try{var C=await i(A,Q)}catch(Q){throw Q.message=`Unable to fetch ${A}${h(e)} - see network log for details.\n`+Q.message,Q}finally{uA--,dA.length&&dA.shift()()}if(C.ok)return C;throw(t=new TypeError(`${C.status} ${C.statusText} `+C.url+h(e))).response=C,t}async function hA(A,Q,e){var t=(Q=await DA(A,Q,e)).headers.get("content-type");if(fA.test(t))return{r:Q.url,s:await Q.text(),t:"js"};if(kA.test(t)){var C=AA._w[A]=await WebAssembly.compileStreaming(Q);let e="",t=0,B="";for(const A of WebAssembly.Module.imports(C))e+=`import * as impt${t} from '${A.module}';\n`,B+=`'${A.module}':impt${t++},`;t=0,e+=`const instance = await WebAssembly.instantiate(importShim._w['${A}'], {${B}});\n`;for(const A of WebAssembly.Module.exports(C))e=(e+=`const expt${t} = instance['${A.name}'];\n`)+`export { expt${t++} as "${A.name}" };\n`;return{r:Q.url,s:e,t:"wasm"}}if(wA.test(t))return{r:Q.url,s:"export default "+await Q.text(),t:"json"};if(mA.test(t))return{r:Q.url,s:`var s=new CSSStyleSheet();s.replaceSync(${JSON.stringify((await Q.text()).replace(KA,((Q,e="",t,C)=>`url(${e}${y(t||C,A)}${e})`)))});export default s;`,t:"css"};throw Error(`Unsupported Content-Type "${t}" loading ${A}${h(e)}. Modules must be served with a valid MIME type like application/javascript.`)}function JA(A=!1){if(!A)for(const A of document.querySelectorAll(B?"link[rel=modulepreload-shim]":"link[rel=modulepreload]"))GA(A);for(const A of document.querySelectorAll(B?"script[type=importmap-shim]":"script[type=importmap]"))YA(A);if(!A)for(const A of document.querySelectorAll(B?"script[type=module-shim]":"script[type=module]"))MA(A)}function LA(A){var Q={};return A.integrity&&(Q.integrity=A.integrity),A.referrerPolicy&&(Q.referrerPolicy=A.referrerPolicy),"use-credentials"===A.crossOrigin?Q.credentials="include":"anonymous"===A.crossOrigin?Q.credentials="omit":Q.credentials="same-origin",Q}let NA=Promise.resolve(),yA=1;function FA(){0!=--yA||c||!B&&EA||document.dispatchEvent(new Event("DOMContentLoaded"))}Q&&document.addEventListener("DOMContentLoaded",(async()=>{await iA,FA()}));let UA=1;function qA(){0!=--UA||c||!B&&EA||document.dispatchEvent(new Event("readystatechange"))}const vA=A=>A.nextSibling||A.parentNode&&vA(A.parentNode),RA=(A,Q)=>A.ep||!Q&&(!A.src&&!A.innerHTML||!vA(A))||null!==A.getAttribute("noshim")||!(A.ep=!0);function YA(A,Q=0<UA){if(!RA(A,Q)){if(A.src){if(!B)return;J=!0}rA&&(nA=nA.then((async()=>{oA=U(A.src?await(await DA(A.src,LA(A))).json():JSON.parse(A.innerHTML),A.src||m,oA)})).catch((Q=>{console.log(Q),Q instanceof SyntaxError&&(Q=new Error(`Unable to parse import map ${Q.message} in: `+(A.src||A.innerHTML))),D(Q)})),B||(rA=!1))}}function MA(A,Q=0<UA){var e,t;RA(A,Q)||((Q=null===A.getAttribute("async")&&0<UA)&&UA++,(e=0<yA)&&yA++,t=aA(A.src||m,LA(A),!A.src&&A.innerHTML,!B,Q&&NA).then((()=>{B&&A.dispatchEvent(new Event("load"))})).catch(D),Q&&(NA=t.then(qA)),e&&t.then(FA))}const SA={};function GA(A){A.ep||(A.ep=!0,SA[A.href])||(SA[A.href]=hA(A.href,LA(A)))}}(); wp-polyfill-inert.js 0000644 00000072743 15153765740 0010531 0 ustar 00 (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define('inert', factory) :
(factory());
}(this, (function () { 'use strict';
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* This work is licensed under the W3C Software and Document License
* (http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document).
*/
(function () {
// Return early if we're not running inside of the browser.
if (typeof window === 'undefined') {
return;
}
// Convenience function for converting NodeLists.
/** @type {typeof Array.prototype.slice} */
var slice = Array.prototype.slice;
/**
* IE has a non-standard name for "matches".
* @type {typeof Element.prototype.matches}
*/
var matches = Element.prototype.matches || Element.prototype.msMatchesSelector;
/** @type {string} */
var _focusableElementsString = ['a[href]', 'area[href]', 'input:not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', 'button:not([disabled])', 'details', 'summary', 'iframe', 'object', 'embed', '[contenteditable]'].join(',');
/**
* `InertRoot` manages a single inert subtree, i.e. a DOM subtree whose root element has an `inert`
* attribute.
*
* Its main functions are:
*
* - to create and maintain a set of managed `InertNode`s, including when mutations occur in the
* subtree. The `makeSubtreeUnfocusable()` method handles collecting `InertNode`s via registering
* each focusable node in the subtree with the singleton `InertManager` which manages all known
* focusable nodes within inert subtrees. `InertManager` ensures that a single `InertNode`
* instance exists for each focusable node which has at least one inert root as an ancestor.
*
* - to notify all managed `InertNode`s when this subtree stops being inert (i.e. when the `inert`
* attribute is removed from the root node). This is handled in the destructor, which calls the
* `deregister` method on `InertManager` for each managed inert node.
*/
var InertRoot = function () {
/**
* @param {!HTMLElement} rootElement The HTMLElement at the root of the inert subtree.
* @param {!InertManager} inertManager The global singleton InertManager object.
*/
function InertRoot(rootElement, inertManager) {
_classCallCheck(this, InertRoot);
/** @type {!InertManager} */
this._inertManager = inertManager;
/** @type {!HTMLElement} */
this._rootElement = rootElement;
/**
* @type {!Set<!InertNode>}
* All managed focusable nodes in this InertRoot's subtree.
*/
this._managedNodes = new Set();
// Make the subtree hidden from assistive technology
if (this._rootElement.hasAttribute('aria-hidden')) {
/** @type {?string} */
this._savedAriaHidden = this._rootElement.getAttribute('aria-hidden');
} else {
this._savedAriaHidden = null;
}
this._rootElement.setAttribute('aria-hidden', 'true');
// Make all focusable elements in the subtree unfocusable and add them to _managedNodes
this._makeSubtreeUnfocusable(this._rootElement);
// Watch for:
// - any additions in the subtree: make them unfocusable too
// - any removals from the subtree: remove them from this inert root's managed nodes
// - attribute changes: if `tabindex` is added, or removed from an intrinsically focusable
// element, make that node a managed node.
this._observer = new MutationObserver(this._onMutation.bind(this));
this._observer.observe(this._rootElement, { attributes: true, childList: true, subtree: true });
}
/**
* Call this whenever this object is about to become obsolete. This unwinds all of the state
* stored in this object and updates the state of all of the managed nodes.
*/
_createClass(InertRoot, [{
key: 'destructor',
value: function destructor() {
this._observer.disconnect();
if (this._rootElement) {
if (this._savedAriaHidden !== null) {
this._rootElement.setAttribute('aria-hidden', this._savedAriaHidden);
} else {
this._rootElement.removeAttribute('aria-hidden');
}
}
this._managedNodes.forEach(function (inertNode) {
this._unmanageNode(inertNode.node);
}, this);
// Note we cast the nulls to the ANY type here because:
// 1) We want the class properties to be declared as non-null, or else we
// need even more casts throughout this code. All bets are off if an
// instance has been destroyed and a method is called.
// 2) We don't want to cast "this", because we want type-aware optimizations
// to know which properties we're setting.
this._observer = /** @type {?} */null;
this._rootElement = /** @type {?} */null;
this._managedNodes = /** @type {?} */null;
this._inertManager = /** @type {?} */null;
}
/**
* @return {!Set<!InertNode>} A copy of this InertRoot's managed nodes set.
*/
}, {
key: '_makeSubtreeUnfocusable',
/**
* @param {!Node} startNode
*/
value: function _makeSubtreeUnfocusable(startNode) {
var _this2 = this;
composedTreeWalk(startNode, function (node) {
return _this2._visitNode(node);
});
var activeElement = document.activeElement;
if (!document.body.contains(startNode)) {
// startNode may be in shadow DOM, so find its nearest shadowRoot to get the activeElement.
var node = startNode;
/** @type {!ShadowRoot|undefined} */
var root = undefined;
while (node) {
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
root = /** @type {!ShadowRoot} */node;
break;
}
node = node.parentNode;
}
if (root) {
activeElement = root.activeElement;
}
}
if (startNode.contains(activeElement)) {
activeElement.blur();
// In IE11, if an element is already focused, and then set to tabindex=-1
// calling blur() will not actually move the focus.
// To work around this we call focus() on the body instead.
if (activeElement === document.activeElement) {
document.body.focus();
}
}
}
/**
* @param {!Node} node
*/
}, {
key: '_visitNode',
value: function _visitNode(node) {
if (node.nodeType !== Node.ELEMENT_NODE) {
return;
}
var element = /** @type {!HTMLElement} */node;
// If a descendant inert root becomes un-inert, its descendants will still be inert because of
// this inert root, so all of its managed nodes need to be adopted by this InertRoot.
if (element !== this._rootElement && element.hasAttribute('inert')) {
this._adoptInertRoot(element);
}
if (matches.call(element, _focusableElementsString) || element.hasAttribute('tabindex')) {
this._manageNode(element);
}
}
/**
* Register the given node with this InertRoot and with InertManager.
* @param {!Node} node
*/
}, {
key: '_manageNode',
value: function _manageNode(node) {
var inertNode = this._inertManager.register(node, this);
this._managedNodes.add(inertNode);
}
/**
* Unregister the given node with this InertRoot and with InertManager.
* @param {!Node} node
*/
}, {
key: '_unmanageNode',
value: function _unmanageNode(node) {
var inertNode = this._inertManager.deregister(node, this);
if (inertNode) {
this._managedNodes['delete'](inertNode);
}
}
/**
* Unregister the entire subtree starting at `startNode`.
* @param {!Node} startNode
*/
}, {
key: '_unmanageSubtree',
value: function _unmanageSubtree(startNode) {
var _this3 = this;
composedTreeWalk(startNode, function (node) {
return _this3._unmanageNode(node);
});
}
/**
* If a descendant node is found with an `inert` attribute, adopt its managed nodes.
* @param {!HTMLElement} node
*/
}, {
key: '_adoptInertRoot',
value: function _adoptInertRoot(node) {
var inertSubroot = this._inertManager.getInertRoot(node);
// During initialisation this inert root may not have been registered yet,
// so register it now if need be.
if (!inertSubroot) {
this._inertManager.setInert(node, true);
inertSubroot = this._inertManager.getInertRoot(node);
}
inertSubroot.managedNodes.forEach(function (savedInertNode) {
this._manageNode(savedInertNode.node);
}, this);
}
/**
* Callback used when mutation observer detects subtree additions, removals, or attribute changes.
* @param {!Array<!MutationRecord>} records
* @param {!MutationObserver} self
*/
}, {
key: '_onMutation',
value: function _onMutation(records, self) {
records.forEach(function (record) {
var target = /** @type {!HTMLElement} */record.target;
if (record.type === 'childList') {
// Manage added nodes
slice.call(record.addedNodes).forEach(function (node) {
this._makeSubtreeUnfocusable(node);
}, this);
// Un-manage removed nodes
slice.call(record.removedNodes).forEach(function (node) {
this._unmanageSubtree(node);
}, this);
} else if (record.type === 'attributes') {
if (record.attributeName === 'tabindex') {
// Re-initialise inert node if tabindex changes
this._manageNode(target);
} else if (target !== this._rootElement && record.attributeName === 'inert' && target.hasAttribute('inert')) {
// If a new inert root is added, adopt its managed nodes and make sure it knows about the
// already managed nodes from this inert subroot.
this._adoptInertRoot(target);
var inertSubroot = this._inertManager.getInertRoot(target);
this._managedNodes.forEach(function (managedNode) {
if (target.contains(managedNode.node)) {
inertSubroot._manageNode(managedNode.node);
}
});
}
}
}, this);
}
}, {
key: 'managedNodes',
get: function get() {
return new Set(this._managedNodes);
}
/** @return {boolean} */
}, {
key: 'hasSavedAriaHidden',
get: function get() {
return this._savedAriaHidden !== null;
}
/** @param {?string} ariaHidden */
}, {
key: 'savedAriaHidden',
set: function set(ariaHidden) {
this._savedAriaHidden = ariaHidden;
}
/** @return {?string} */
,
get: function get() {
return this._savedAriaHidden;
}
}]);
return InertRoot;
}();
/**
* `InertNode` initialises and manages a single inert node.
* A node is inert if it is a descendant of one or more inert root elements.
*
* On construction, `InertNode` saves the existing `tabindex` value for the node, if any, and
* either removes the `tabindex` attribute or sets it to `-1`, depending on whether the element
* is intrinsically focusable or not.
*
* `InertNode` maintains a set of `InertRoot`s which are descendants of this `InertNode`. When an
* `InertRoot` is destroyed, and calls `InertManager.deregister()`, the `InertManager` notifies the
* `InertNode` via `removeInertRoot()`, which in turn destroys the `InertNode` if no `InertRoot`s
* remain in the set. On destruction, `InertNode` reinstates the stored `tabindex` if one exists,
* or removes the `tabindex` attribute if the element is intrinsically focusable.
*/
var InertNode = function () {
/**
* @param {!Node} node A focusable element to be made inert.
* @param {!InertRoot} inertRoot The inert root element associated with this inert node.
*/
function InertNode(node, inertRoot) {
_classCallCheck(this, InertNode);
/** @type {!Node} */
this._node = node;
/** @type {boolean} */
this._overrodeFocusMethod = false;
/**
* @type {!Set<!InertRoot>} The set of descendant inert roots.
* If and only if this set becomes empty, this node is no longer inert.
*/
this._inertRoots = new Set([inertRoot]);
/** @type {?number} */
this._savedTabIndex = null;
/** @type {boolean} */
this._destroyed = false;
// Save any prior tabindex info and make this node untabbable
this.ensureUntabbable();
}
/**
* Call this whenever this object is about to become obsolete.
* This makes the managed node focusable again and deletes all of the previously stored state.
*/
_createClass(InertNode, [{
key: 'destructor',
value: function destructor() {
this._throwIfDestroyed();
if (this._node && this._node.nodeType === Node.ELEMENT_NODE) {
var element = /** @type {!HTMLElement} */this._node;
if (this._savedTabIndex !== null) {
element.setAttribute('tabindex', this._savedTabIndex);
} else {
element.removeAttribute('tabindex');
}
// Use `delete` to restore native focus method.
if (this._overrodeFocusMethod) {
delete element.focus;
}
}
// See note in InertRoot.destructor for why we cast these nulls to ANY.
this._node = /** @type {?} */null;
this._inertRoots = /** @type {?} */null;
this._destroyed = true;
}
/**
* @type {boolean} Whether this object is obsolete because the managed node is no longer inert.
* If the object has been destroyed, any attempt to access it will cause an exception.
*/
}, {
key: '_throwIfDestroyed',
/**
* Throw if user tries to access destroyed InertNode.
*/
value: function _throwIfDestroyed() {
if (this.destroyed) {
throw new Error('Trying to access destroyed InertNode');
}
}
/** @return {boolean} */
}, {
key: 'ensureUntabbable',
/** Save the existing tabindex value and make the node untabbable and unfocusable */
value: function ensureUntabbable() {
if (this.node.nodeType !== Node.ELEMENT_NODE) {
return;
}
var element = /** @type {!HTMLElement} */this.node;
if (matches.call(element, _focusableElementsString)) {
if ( /** @type {!HTMLElement} */element.tabIndex === -1 && this.hasSavedTabIndex) {
return;
}
if (element.hasAttribute('tabindex')) {
this._savedTabIndex = /** @type {!HTMLElement} */element.tabIndex;
}
element.setAttribute('tabindex', '-1');
if (element.nodeType === Node.ELEMENT_NODE) {
element.focus = function () {};
this._overrodeFocusMethod = true;
}
} else if (element.hasAttribute('tabindex')) {
this._savedTabIndex = /** @type {!HTMLElement} */element.tabIndex;
element.removeAttribute('tabindex');
}
}
/**
* Add another inert root to this inert node's set of managing inert roots.
* @param {!InertRoot} inertRoot
*/
}, {
key: 'addInertRoot',
value: function addInertRoot(inertRoot) {
this._throwIfDestroyed();
this._inertRoots.add(inertRoot);
}
/**
* Remove the given inert root from this inert node's set of managing inert roots.
* If the set of managing inert roots becomes empty, this node is no longer inert,
* so the object should be destroyed.
* @param {!InertRoot} inertRoot
*/
}, {
key: 'removeInertRoot',
value: function removeInertRoot(inertRoot) {
this._throwIfDestroyed();
this._inertRoots['delete'](inertRoot);
if (this._inertRoots.size === 0) {
this.destructor();
}
}
}, {
key: 'destroyed',
get: function get() {
return (/** @type {!InertNode} */this._destroyed
);
}
}, {
key: 'hasSavedTabIndex',
get: function get() {
return this._savedTabIndex !== null;
}
/** @return {!Node} */
}, {
key: 'node',
get: function get() {
this._throwIfDestroyed();
return this._node;
}
/** @param {?number} tabIndex */
}, {
key: 'savedTabIndex',
set: function set(tabIndex) {
this._throwIfDestroyed();
this._savedTabIndex = tabIndex;
}
/** @return {?number} */
,
get: function get() {
this._throwIfDestroyed();
return this._savedTabIndex;
}
}]);
return InertNode;
}();
/**
* InertManager is a per-document singleton object which manages all inert roots and nodes.
*
* When an element becomes an inert root by having an `inert` attribute set and/or its `inert`
* property set to `true`, the `setInert` method creates an `InertRoot` object for the element.
* The `InertRoot` in turn registers itself as managing all of the element's focusable descendant
* nodes via the `register()` method. The `InertManager` ensures that a single `InertNode` instance
* is created for each such node, via the `_managedNodes` map.
*/
var InertManager = function () {
/**
* @param {!Document} document
*/
function InertManager(document) {
_classCallCheck(this, InertManager);
if (!document) {
throw new Error('Missing required argument; InertManager needs to wrap a document.');
}
/** @type {!Document} */
this._document = document;
/**
* All managed nodes known to this InertManager. In a map to allow looking up by Node.
* @type {!Map<!Node, !InertNode>}
*/
this._managedNodes = new Map();
/**
* All inert roots known to this InertManager. In a map to allow looking up by Node.
* @type {!Map<!Node, !InertRoot>}
*/
this._inertRoots = new Map();
/**
* Observer for mutations on `document.body`.
* @type {!MutationObserver}
*/
this._observer = new MutationObserver(this._watchForInert.bind(this));
// Add inert style.
addInertStyle(document.head || document.body || document.documentElement);
// Wait for document to be loaded.
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', this._onDocumentLoaded.bind(this));
} else {
this._onDocumentLoaded();
}
}
/**
* Set whether the given element should be an inert root or not.
* @param {!HTMLElement} root
* @param {boolean} inert
*/
_createClass(InertManager, [{
key: 'setInert',
value: function setInert(root, inert) {
if (inert) {
if (this._inertRoots.has(root)) {
// element is already inert
return;
}
var inertRoot = new InertRoot(root, this);
root.setAttribute('inert', '');
this._inertRoots.set(root, inertRoot);
// If not contained in the document, it must be in a shadowRoot.
// Ensure inert styles are added there.
if (!this._document.body.contains(root)) {
var parent = root.parentNode;
while (parent) {
if (parent.nodeType === 11) {
addInertStyle(parent);
}
parent = parent.parentNode;
}
}
} else {
if (!this._inertRoots.has(root)) {
// element is already non-inert
return;
}
var _inertRoot = this._inertRoots.get(root);
_inertRoot.destructor();
this._inertRoots['delete'](root);
root.removeAttribute('inert');
}
}
/**
* Get the InertRoot object corresponding to the given inert root element, if any.
* @param {!Node} element
* @return {!InertRoot|undefined}
*/
}, {
key: 'getInertRoot',
value: function getInertRoot(element) {
return this._inertRoots.get(element);
}
/**
* Register the given InertRoot as managing the given node.
* In the case where the node has a previously existing inert root, this inert root will
* be added to its set of inert roots.
* @param {!Node} node
* @param {!InertRoot} inertRoot
* @return {!InertNode} inertNode
*/
}, {
key: 'register',
value: function register(node, inertRoot) {
var inertNode = this._managedNodes.get(node);
if (inertNode !== undefined) {
// node was already in an inert subtree
inertNode.addInertRoot(inertRoot);
} else {
inertNode = new InertNode(node, inertRoot);
}
this._managedNodes.set(node, inertNode);
return inertNode;
}
/**
* De-register the given InertRoot as managing the given inert node.
* Removes the inert root from the InertNode's set of managing inert roots, and remove the inert
* node from the InertManager's set of managed nodes if it is destroyed.
* If the node is not currently managed, this is essentially a no-op.
* @param {!Node} node
* @param {!InertRoot} inertRoot
* @return {?InertNode} The potentially destroyed InertNode associated with this node, if any.
*/
}, {
key: 'deregister',
value: function deregister(node, inertRoot) {
var inertNode = this._managedNodes.get(node);
if (!inertNode) {
return null;
}
inertNode.removeInertRoot(inertRoot);
if (inertNode.destroyed) {
this._managedNodes['delete'](node);
}
return inertNode;
}
/**
* Callback used when document has finished loading.
*/
}, {
key: '_onDocumentLoaded',
value: function _onDocumentLoaded() {
// Find all inert roots in document and make them actually inert.
var inertElements = slice.call(this._document.querySelectorAll('[inert]'));
inertElements.forEach(function (inertElement) {
this.setInert(inertElement, true);
}, this);
// Comment this out to use programmatic API only.
this._observer.observe(this._document.body || this._document.documentElement, { attributes: true, subtree: true, childList: true });
}
/**
* Callback used when mutation observer detects attribute changes.
* @param {!Array<!MutationRecord>} records
* @param {!MutationObserver} self
*/
}, {
key: '_watchForInert',
value: function _watchForInert(records, self) {
var _this = this;
records.forEach(function (record) {
switch (record.type) {
case 'childList':
slice.call(record.addedNodes).forEach(function (node) {
if (node.nodeType !== Node.ELEMENT_NODE) {
return;
}
var inertElements = slice.call(node.querySelectorAll('[inert]'));
if (matches.call(node, '[inert]')) {
inertElements.unshift(node);
}
inertElements.forEach(function (inertElement) {
this.setInert(inertElement, true);
}, _this);
}, _this);
break;
case 'attributes':
if (record.attributeName !== 'inert') {
return;
}
var target = /** @type {!HTMLElement} */record.target;
var inert = target.hasAttribute('inert');
_this.setInert(target, inert);
break;
}
}, this);
}
}]);
return InertManager;
}();
/**
* Recursively walk the composed tree from |node|.
* @param {!Node} node
* @param {(function (!HTMLElement))=} callback Callback to be called for each element traversed,
* before descending into child nodes.
* @param {?ShadowRoot=} shadowRootAncestor The nearest ShadowRoot ancestor, if any.
*/
function composedTreeWalk(node, callback, shadowRootAncestor) {
if (node.nodeType == Node.ELEMENT_NODE) {
var element = /** @type {!HTMLElement} */node;
if (callback) {
callback(element);
}
// Descend into node:
// If it has a ShadowRoot, ignore all child elements - these will be picked
// up by the <content> or <shadow> elements. Descend straight into the
// ShadowRoot.
var shadowRoot = /** @type {!HTMLElement} */element.shadowRoot;
if (shadowRoot) {
composedTreeWalk(shadowRoot, callback, shadowRoot);
return;
}
// If it is a <content> element, descend into distributed elements - these
// are elements from outside the shadow root which are rendered inside the
// shadow DOM.
if (element.localName == 'content') {
var content = /** @type {!HTMLContentElement} */element;
// Verifies if ShadowDom v0 is supported.
var distributedNodes = content.getDistributedNodes ? content.getDistributedNodes() : [];
for (var i = 0; i < distributedNodes.length; i++) {
composedTreeWalk(distributedNodes[i], callback, shadowRootAncestor);
}
return;
}
// If it is a <slot> element, descend into assigned nodes - these
// are elements from outside the shadow root which are rendered inside the
// shadow DOM.
if (element.localName == 'slot') {
var slot = /** @type {!HTMLSlotElement} */element;
// Verify if ShadowDom v1 is supported.
var _distributedNodes = slot.assignedNodes ? slot.assignedNodes({ flatten: true }) : [];
for (var _i = 0; _i < _distributedNodes.length; _i++) {
composedTreeWalk(_distributedNodes[_i], callback, shadowRootAncestor);
}
return;
}
}
// If it is neither the parent of a ShadowRoot, a <content> element, a <slot>
// element, nor a <shadow> element recurse normally.
var child = node.firstChild;
while (child != null) {
composedTreeWalk(child, callback, shadowRootAncestor);
child = child.nextSibling;
}
}
/**
* Adds a style element to the node containing the inert specific styles
* @param {!Node} node
*/
function addInertStyle(node) {
if (node.querySelector('style#inert-style, link#inert-style')) {
return;
}
var style = document.createElement('style');
style.setAttribute('id', 'inert-style');
style.textContent = '\n' + '[inert] {\n' + ' pointer-events: none;\n' + ' cursor: default;\n' + '}\n' + '\n' + '[inert], [inert] * {\n' + ' -webkit-user-select: none;\n' + ' -moz-user-select: none;\n' + ' -ms-user-select: none;\n' + ' user-select: none;\n' + '}\n';
node.appendChild(style);
}
if (!HTMLElement.prototype.hasOwnProperty('inert')) {
/** @type {!InertManager} */
var inertManager = new InertManager(document);
Object.defineProperty(HTMLElement.prototype, 'inert', {
enumerable: true,
/** @this {!HTMLElement} */
get: function get() {
return this.hasAttribute('inert');
},
/** @this {!HTMLElement} */
set: function set(inert) {
inertManager.setInert(this, inert);
}
});
}
})();
})));
wp-polyfill-inert.min.js 0000644 00000017753 15153765740 0011313 0 ustar 00 !function(e){"object"==typeof exports&&"undefined"!=typeof module||"function"!=typeof define||!define.amd?e():define("inert",e)}((function(){"use strict";var e,t,n,i,o,r,s=function(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e};function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){d(this,u),this._inertManager=t,this._rootElement=e,this._managedNodes=new Set,this._rootElement.hasAttribute("aria-hidden")?this._savedAriaHidden=this._rootElement.getAttribute("aria-hidden"):this._savedAriaHidden=null,this._rootElement.setAttribute("aria-hidden","true"),this._makeSubtreeUnfocusable(this._rootElement),this._observer=new MutationObserver(this._onMutation.bind(this)),this._observer.observe(this._rootElement,{attributes:!0,childList:!0,subtree:!0})}function h(e,t){d(this,h),this._node=e,this._overrodeFocusMethod=!1,this._inertRoots=new Set([t]),this._savedTabIndex=null,this._destroyed=!1,this.ensureUntabbable()}function l(e){if(d(this,l),!e)throw new Error("Missing required argument; InertManager needs to wrap a document.");this._document=e,this._managedNodes=new Map,this._inertRoots=new Map,this._observer=new MutationObserver(this._watchForInert.bind(this)),_(e.head||e.body||e.documentElement),"loading"===e.readyState?e.addEventListener("DOMContentLoaded",this._onDocumentLoaded.bind(this)):this._onDocumentLoaded()}function c(e,t,n){if(e.nodeType==Node.ELEMENT_NODE){var i=e;if(s=(t&&t(i),i.shadowRoot))return void c(s,t,s);if("content"==i.localName){for(var o=(s=i).getDistributedNodes?s.getDistributedNodes():[],r=0;r<o.length;r++)c(o[r],t,n);return}if("slot"==i.localName){for(var s,a=(s=i).assignedNodes?s.assignedNodes({flatten:!0}):[],d=0;d<a.length;d++)c(a[d],t,n);return}}for(var u=e.firstChild;null!=u;)c(u,t,n),u=u.nextSibling}function _(e){var t;e.querySelector("style#inert-style, link#inert-style")||((t=document.createElement("style")).setAttribute("id","inert-style"),t.textContent="\n[inert] {\n pointer-events: none;\n cursor: default;\n}\n\n[inert], [inert] * {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n",e.appendChild(t))}"undefined"!=typeof window&&(e=Array.prototype.slice,t=Element.prototype.matches||Element.prototype.msMatchesSelector,n=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","details","summary","iframe","object","embed","[contenteditable]"].join(","),s(u,[{key:"destructor",value:function(){this._observer.disconnect(),this._rootElement&&(null!==this._savedAriaHidden?this._rootElement.setAttribute("aria-hidden",this._savedAriaHidden):this._rootElement.removeAttribute("aria-hidden")),this._managedNodes.forEach((function(e){this._unmanageNode(e.node)}),this),this._observer=null,this._rootElement=null,this._managedNodes=null,this._inertManager=null}},{key:"_makeSubtreeUnfocusable",value:function(e){var t=this,n=(c(e,(function(e){return t._visitNode(e)})),document.activeElement);if(!document.body.contains(e)){for(var i=e,o=void 0;i;){if(i.nodeType===Node.DOCUMENT_FRAGMENT_NODE){o=i;break}i=i.parentNode}o&&(n=o.activeElement)}e.contains(n)&&(n.blur(),n===document.activeElement&&document.body.focus())}},{key:"_visitNode",value:function(e){e.nodeType===Node.ELEMENT_NODE&&(e!==this._rootElement&&e.hasAttribute("inert")&&this._adoptInertRoot(e),(t.call(e,n)||e.hasAttribute("tabindex"))&&this._manageNode(e))}},{key:"_manageNode",value:function(e){e=this._inertManager.register(e,this),this._managedNodes.add(e)}},{key:"_unmanageNode",value:function(e){(e=this._inertManager.deregister(e,this))&&this._managedNodes.delete(e)}},{key:"_unmanageSubtree",value:function(e){var t=this;c(e,(function(e){return t._unmanageNode(e)}))}},{key:"_adoptInertRoot",value:function(e){var t=this._inertManager.getInertRoot(e);t||(this._inertManager.setInert(e,!0),t=this._inertManager.getInertRoot(e)),t.managedNodes.forEach((function(e){this._manageNode(e.node)}),this)}},{key:"_onMutation",value:function(t,n){t.forEach((function(t){var n,i=t.target;"childList"===t.type?(e.call(t.addedNodes).forEach((function(e){this._makeSubtreeUnfocusable(e)}),this),e.call(t.removedNodes).forEach((function(e){this._unmanageSubtree(e)}),this)):"attributes"===t.type&&("tabindex"===t.attributeName?this._manageNode(i):i!==this._rootElement&&"inert"===t.attributeName&&i.hasAttribute("inert")&&(this._adoptInertRoot(i),n=this._inertManager.getInertRoot(i),this._managedNodes.forEach((function(e){i.contains(e.node)&&n._manageNode(e.node)}))))}),this)}},{key:"managedNodes",get:function(){return new Set(this._managedNodes)}},{key:"hasSavedAriaHidden",get:function(){return null!==this._savedAriaHidden}},{key:"savedAriaHidden",set:function(e){this._savedAriaHidden=e},get:function(){return this._savedAriaHidden}}]),i=u,s(h,[{key:"destructor",value:function(){var e;this._throwIfDestroyed(),this._node&&this._node.nodeType===Node.ELEMENT_NODE&&(e=this._node,null!==this._savedTabIndex?e.setAttribute("tabindex",this._savedTabIndex):e.removeAttribute("tabindex"),this._overrodeFocusMethod&&delete e.focus),this._node=null,this._inertRoots=null,this._destroyed=!0}},{key:"_throwIfDestroyed",value:function(){if(this.destroyed)throw new Error("Trying to access destroyed InertNode")}},{key:"ensureUntabbable",value:function(){var e;this.node.nodeType===Node.ELEMENT_NODE&&(e=this.node,t.call(e,n)?-1===e.tabIndex&&this.hasSavedTabIndex||(e.hasAttribute("tabindex")&&(this._savedTabIndex=e.tabIndex),e.setAttribute("tabindex","-1"),e.nodeType===Node.ELEMENT_NODE&&(e.focus=function(){},this._overrodeFocusMethod=!0)):e.hasAttribute("tabindex")&&(this._savedTabIndex=e.tabIndex,e.removeAttribute("tabindex")))}},{key:"addInertRoot",value:function(e){this._throwIfDestroyed(),this._inertRoots.add(e)}},{key:"removeInertRoot",value:function(e){this._throwIfDestroyed(),this._inertRoots.delete(e),0===this._inertRoots.size&&this.destructor()}},{key:"destroyed",get:function(){return this._destroyed}},{key:"hasSavedTabIndex",get:function(){return null!==this._savedTabIndex}},{key:"node",get:function(){return this._throwIfDestroyed(),this._node}},{key:"savedTabIndex",set:function(e){this._throwIfDestroyed(),this._savedTabIndex=e},get:function(){return this._throwIfDestroyed(),this._savedTabIndex}}]),o=h,s(l,[{key:"setInert",value:function(e,t){if(t){if(!this._inertRoots.has(e)&&(t=new i(e,this),e.setAttribute("inert",""),this._inertRoots.set(e,t),!this._document.body.contains(e)))for(var n=e.parentNode;n;)11===n.nodeType&&_(n),n=n.parentNode}else this._inertRoots.has(e)&&(this._inertRoots.get(e).destructor(),this._inertRoots.delete(e),e.removeAttribute("inert"))}},{key:"getInertRoot",value:function(e){return this._inertRoots.get(e)}},{key:"register",value:function(e,t){var n=this._managedNodes.get(e);return void 0!==n?n.addInertRoot(t):n=new o(e,t),this._managedNodes.set(e,n),n}},{key:"deregister",value:function(e,t){var n=this._managedNodes.get(e);return n?(n.removeInertRoot(t),n.destroyed&&this._managedNodes.delete(e),n):null}},{key:"_onDocumentLoaded",value:function(){e.call(this._document.querySelectorAll("[inert]")).forEach((function(e){this.setInert(e,!0)}),this),this._observer.observe(this._document.body||this._document.documentElement,{attributes:!0,subtree:!0,childList:!0})}},{key:"_watchForInert",value:function(n,i){var o=this;n.forEach((function(n){switch(n.type){case"childList":e.call(n.addedNodes).forEach((function(n){var i;n.nodeType===Node.ELEMENT_NODE&&(i=e.call(n.querySelectorAll("[inert]")),t.call(n,"[inert]")&&i.unshift(n),i.forEach((function(e){this.setInert(e,!0)}),o))}),o);break;case"attributes":if("inert"!==n.attributeName)return;var i=n.target,r=i.hasAttribute("inert");o.setInert(i,r)}}),this)}}]),s=l,HTMLElement.prototype.hasOwnProperty("inert")||(r=new s(document),Object.defineProperty(HTMLElement.prototype,"inert",{enumerable:!0,get:function(){return this.hasAttribute("inert")},set:function(e){r.setInert(this,e)}})))})); wp-polyfill-node-contains.js 0000644 00000001203 15153765740 0012130 0 ustar 00
// Node.prototype.contains
(function() {
function contains(node) {
if (!(0 in arguments)) {
throw new TypeError('1 argument is required');
}
do {
if (this === node) {
return true;
}
// eslint-disable-next-line no-cond-assign
} while (node = node && node.parentNode);
return false;
}
// IE
if ('HTMLElement' in self && 'contains' in HTMLElement.prototype) {
try {
delete HTMLElement.prototype.contains;
// eslint-disable-next-line no-empty
} catch (e) {}
}
if ('Node' in self) {
Node.prototype.contains = contains;
} else {
document.contains = Element.prototype.contains = contains;
}
}());
wp-polyfill-node-contains.min.js 0000644 00000000541 15153765740 0012716 0 ustar 00 !function(){function e(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1}if("HTMLElement"in self&&"contains"in HTMLElement.prototype)try{delete HTMLElement.prototype.contains}catch(e){}"Node"in self?Node.prototype.contains=e:document.contains=Element.prototype.contains=e}(); wp-polyfill-object-fit.js 0000644 00000021741 15153765740 0011426 0 ustar 00 /*----------------------------------------
* objectFitPolyfill 2.3.5
*
* Made by Constance Chen
* Released under the ISC license
*
* https://github.com/constancecchen/object-fit-polyfill
*--------------------------------------*/
(function() {
'use strict';
// if the page is being rendered on the server, don't continue
if (typeof window === 'undefined') return;
// Workaround for Edge 16-18, which only implemented object-fit for <img> tags
var edgeMatch = window.navigator.userAgent.match(/Edge\/(\d{2})\./);
var edgeVersion = edgeMatch ? parseInt(edgeMatch[1], 10) : null;
var edgePartialSupport = edgeVersion
? edgeVersion >= 16 && edgeVersion <= 18
: false;
// If the browser does support object-fit, we don't need to continue
var hasSupport = 'objectFit' in document.documentElement.style !== false;
if (hasSupport && !edgePartialSupport) {
window.objectFitPolyfill = function() {
return false;
};
return;
}
/**
* Check the container's parent element to make sure it will
* correctly handle and clip absolutely positioned children
*
* @param {node} $container - parent element
*/
var checkParentContainer = function($container) {
var styles = window.getComputedStyle($container, null);
var position = styles.getPropertyValue('position');
var overflow = styles.getPropertyValue('overflow');
var display = styles.getPropertyValue('display');
if (!position || position === 'static') {
$container.style.position = 'relative';
}
if (overflow !== 'hidden') {
$container.style.overflow = 'hidden';
}
// Guesstimating that people want the parent to act like full width/height wrapper here.
// Mostly attempts to target <picture> elements, which default to inline.
if (!display || display === 'inline') {
$container.style.display = 'block';
}
if ($container.clientHeight === 0) {
$container.style.height = '100%';
}
// Add a CSS class hook, in case people need to override styles for any reason.
if ($container.className.indexOf('object-fit-polyfill') === -1) {
$container.className = $container.className + ' object-fit-polyfill';
}
};
/**
* Check for pre-set max-width/height, min-width/height,
* positioning, or margins, which can mess up image calculations
*
* @param {node} $media - img/video element
*/
var checkMediaProperties = function($media) {
var styles = window.getComputedStyle($media, null);
var constraints = {
'max-width': 'none',
'max-height': 'none',
'min-width': '0px',
'min-height': '0px',
top: 'auto',
right: 'auto',
bottom: 'auto',
left: 'auto',
'margin-top': '0px',
'margin-right': '0px',
'margin-bottom': '0px',
'margin-left': '0px',
};
for (var property in constraints) {
var constraint = styles.getPropertyValue(property);
if (constraint !== constraints[property]) {
$media.style[property] = constraints[property];
}
}
};
/**
* Calculate & set object-position
*
* @param {string} axis - either "x" or "y"
* @param {node} $media - img or video element
* @param {string} objectPosition - e.g. "50% 50%", "top left"
*/
var setPosition = function(axis, $media, objectPosition) {
var position, other, start, end, side;
objectPosition = objectPosition.split(' ');
if (objectPosition.length < 2) {
objectPosition[1] = objectPosition[0];
}
/* istanbul ignore else */
if (axis === 'x') {
position = objectPosition[0];
other = objectPosition[1];
start = 'left';
end = 'right';
side = $media.clientWidth;
} else if (axis === 'y') {
position = objectPosition[1];
other = objectPosition[0];
start = 'top';
end = 'bottom';
side = $media.clientHeight;
} else {
return; // Neither x or y axis specified
}
if (position === start || other === start) {
$media.style[start] = '0';
return;
}
if (position === end || other === end) {
$media.style[end] = '0';
return;
}
if (position === 'center' || position === '50%') {
$media.style[start] = '50%';
$media.style['margin-' + start] = side / -2 + 'px';
return;
}
// Percentage values (e.g., 30% 10%)
if (position.indexOf('%') >= 0) {
position = parseInt(position, 10);
if (position < 50) {
$media.style[start] = position + '%';
$media.style['margin-' + start] = side * (position / -100) + 'px';
} else {
position = 100 - position;
$media.style[end] = position + '%';
$media.style['margin-' + end] = side * (position / -100) + 'px';
}
return;
}
// Length-based values (e.g. 10px / 10em)
else {
$media.style[start] = position;
}
};
/**
* Calculate & set object-fit
*
* @param {node} $media - img/video/picture element
*/
var objectFit = function($media) {
// IE 10- data polyfill
var fit = $media.dataset
? $media.dataset.objectFit
: $media.getAttribute('data-object-fit');
var position = $media.dataset
? $media.dataset.objectPosition
: $media.getAttribute('data-object-position');
// Default fallbacks
fit = fit || 'cover';
position = position || '50% 50%';
// If necessary, make the parent container work with absolutely positioned elements
var $container = $media.parentNode;
checkParentContainer($container);
// Check for any pre-set CSS which could mess up image calculations
checkMediaProperties($media);
// Reset any pre-set width/height CSS and handle fit positioning
$media.style.position = 'absolute';
$media.style.width = 'auto';
$media.style.height = 'auto';
// `scale-down` chooses either `none` or `contain`, whichever is smaller
if (fit === 'scale-down') {
if (
$media.clientWidth < $container.clientWidth &&
$media.clientHeight < $container.clientHeight
) {
fit = 'none';
} else {
fit = 'contain';
}
}
// `none` (width/height auto) and `fill` (100%) and are straightforward
if (fit === 'none') {
setPosition('x', $media, position);
setPosition('y', $media, position);
return;
}
if (fit === 'fill') {
$media.style.width = '100%';
$media.style.height = '100%';
setPosition('x', $media, position);
setPosition('y', $media, position);
return;
}
// `cover` and `contain` must figure out which side needs covering, and add CSS positioning & centering
$media.style.height = '100%';
if (
(fit === 'cover' && $media.clientWidth > $container.clientWidth) ||
(fit === 'contain' && $media.clientWidth < $container.clientWidth)
) {
$media.style.top = '0';
$media.style.marginTop = '0';
setPosition('x', $media, position);
} else {
$media.style.width = '100%';
$media.style.height = 'auto';
$media.style.left = '0';
$media.style.marginLeft = '0';
setPosition('y', $media, position);
}
};
/**
* Initialize plugin
*
* @param {node} media - Optional specific DOM node(s) to be polyfilled
*/
var objectFitPolyfill = function(media) {
if (typeof media === 'undefined' || media instanceof Event) {
// If left blank, or a default event, all media on the page will be polyfilled.
media = document.querySelectorAll('[data-object-fit]');
} else if (media && media.nodeName) {
// If it's a single node, wrap it in an array so it works.
media = [media];
} else if (typeof media === 'object' && media.length && media[0].nodeName) {
// If it's an array of DOM nodes (e.g. a jQuery selector), it's fine as-is.
media = media;
} else {
// Otherwise, if it's invalid or an incorrect type, return false to let people know.
return false;
}
for (var i = 0; i < media.length; i++) {
if (!media[i].nodeName) continue;
var mediaType = media[i].nodeName.toLowerCase();
if (mediaType === 'img') {
if (edgePartialSupport) continue; // Edge supports object-fit for images (but nothing else), so no need to polyfill
if (media[i].complete) {
objectFit(media[i]);
} else {
media[i].addEventListener('load', function() {
objectFit(this);
});
}
} else if (mediaType === 'video') {
if (media[i].readyState > 0) {
objectFit(media[i]);
} else {
media[i].addEventListener('loadedmetadata', function() {
objectFit(this);
});
}
} else {
objectFit(media[i]);
}
}
return true;
};
if (document.readyState === 'loading') {
// Loading hasn't finished yet
document.addEventListener('DOMContentLoaded', objectFitPolyfill);
} else {
// `DOMContentLoaded` has already fired
objectFitPolyfill();
}
window.addEventListener('resize', objectFitPolyfill);
window.objectFitPolyfill = objectFitPolyfill;
})();
wp-polyfill-object-fit.min.js 0000644 00000005637 15153765740 0012216 0 ustar 00 !function(){"use strict";if("undefined"!=typeof window){var t=window.navigator.userAgent.match(/Edge\/(\d{2})\./),e=t?parseInt(t[1],10):null,i=!!e&&16<=e&&e<=18;if("objectFit"in document.documentElement.style==0||i){var n=function(t,e,i){var n,o,l,a,d;if((i=i.split(" ")).length<2&&(i[1]=i[0]),"x"===t)n=i[0],o=i[1],l="left",a="right",d=e.clientWidth;else{if("y"!==t)return;n=i[1],o=i[0],l="top",a="bottom",d=e.clientHeight}if(n!==l&&o!==l){if(n!==a&&o!==a)return"center"===n||"50%"===n?(e.style[l]="50%",void(e.style["margin-"+l]=d/-2+"px")):void(0<=n.indexOf("%")?(n=parseInt(n,10))<50?(e.style[l]=n+"%",e.style["margin-"+l]=d*(n/-100)+"px"):(n=100-n,e.style[a]=n+"%",e.style["margin-"+a]=d*(n/-100)+"px"):e.style[l]=n);e.style[a]="0"}else e.style[l]="0"},o=function(t){var e=t.dataset?t.dataset.objectFit:t.getAttribute("data-object-fit"),i=t.dataset?t.dataset.objectPosition:t.getAttribute("data-object-position");e=e||"cover",i=i||"50% 50%";var o=t.parentNode;return function(t){var e=window.getComputedStyle(t,null),i=e.getPropertyValue("position"),n=e.getPropertyValue("overflow"),o=e.getPropertyValue("display");i&&"static"!==i||(t.style.position="relative"),"hidden"!==n&&(t.style.overflow="hidden"),o&&"inline"!==o||(t.style.display="block"),0===t.clientHeight&&(t.style.height="100%"),-1===t.className.indexOf("object-fit-polyfill")&&(t.className=t.className+" object-fit-polyfill")}(o),function(t){var e=window.getComputedStyle(t,null),i={"max-width":"none","max-height":"none","min-width":"0px","min-height":"0px",top:"auto",right:"auto",bottom:"auto",left:"auto","margin-top":"0px","margin-right":"0px","margin-bottom":"0px","margin-left":"0px"};for(var n in i)e.getPropertyValue(n)!==i[n]&&(t.style[n]=i[n])}(t),t.style.position="absolute",t.style.width="auto",t.style.height="auto","scale-down"===e&&(e=t.clientWidth<o.clientWidth&&t.clientHeight<o.clientHeight?"none":"contain"),"none"===e?(n("x",t,i),void n("y",t,i)):"fill"===e?(t.style.width="100%",t.style.height="100%",n("x",t,i),void n("y",t,i)):(t.style.height="100%",void("cover"===e&&t.clientWidth>o.clientWidth||"contain"===e&&t.clientWidth<o.clientWidth?(t.style.top="0",t.style.marginTop="0",n("x",t,i)):(t.style.width="100%",t.style.height="auto",t.style.left="0",t.style.marginLeft="0",n("y",t,i))))},l=function(t){if(void 0===t||t instanceof Event)t=document.querySelectorAll("[data-object-fit]");else if(t&&t.nodeName)t=[t];else if("object"!=typeof t||!t.length||!t[0].nodeName)return!1;for(var e=0;e<t.length;e++)if(t[e].nodeName){var n=t[e].nodeName.toLowerCase();if("img"===n){if(i)continue;t[e].complete?o(t[e]):t[e].addEventListener("load",(function(){o(this)}))}else"video"===n?0<t[e].readyState?o(t[e]):t[e].addEventListener("loadedmetadata",(function(){o(this)})):o(t[e])}return!0};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",l):l(),window.addEventListener("resize",l),window.objectFitPolyfill=l}else window.objectFitPolyfill=function(){return!1}}}(); wp-polyfill-url.js 0000644 00000327374 15153765740 0010215 0 ustar 00 (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
module.exports = function (it) {
if (typeof it != 'function') {
throw TypeError(String(it) + ' is not a function');
} return it;
};
},{}],2:[function(require,module,exports){
var isObject = require('../internals/is-object');
module.exports = function (it) {
if (!isObject(it) && it !== null) {
throw TypeError("Can't set " + String(it) + ' as a prototype');
} return it;
};
},{"../internals/is-object":37}],3:[function(require,module,exports){
var wellKnownSymbol = require('../internals/well-known-symbol');
var create = require('../internals/object-create');
var definePropertyModule = require('../internals/object-define-property');
var UNSCOPABLES = wellKnownSymbol('unscopables');
var ArrayPrototype = Array.prototype;
// Array.prototype[@@unscopables]
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
if (ArrayPrototype[UNSCOPABLES] == undefined) {
definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
configurable: true,
value: create(null)
});
}
// add a key to Array.prototype[@@unscopables]
module.exports = function (key) {
ArrayPrototype[UNSCOPABLES][key] = true;
};
},{"../internals/object-create":45,"../internals/object-define-property":47,"../internals/well-known-symbol":77}],4:[function(require,module,exports){
module.exports = function (it, Constructor, name) {
if (!(it instanceof Constructor)) {
throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
} return it;
};
},{}],5:[function(require,module,exports){
var isObject = require('../internals/is-object');
module.exports = function (it) {
if (!isObject(it)) {
throw TypeError(String(it) + ' is not an object');
} return it;
};
},{"../internals/is-object":37}],6:[function(require,module,exports){
'use strict';
var bind = require('../internals/function-bind-context');
var toObject = require('../internals/to-object');
var callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');
var isArrayIteratorMethod = require('../internals/is-array-iterator-method');
var toLength = require('../internals/to-length');
var createProperty = require('../internals/create-property');
var getIteratorMethod = require('../internals/get-iterator-method');
// `Array.from` method implementation
// https://tc39.github.io/ecma262/#sec-array.from
module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
var O = toObject(arrayLike);
var C = typeof this == 'function' ? this : Array;
var argumentsLength = arguments.length;
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
var mapping = mapfn !== undefined;
var iteratorMethod = getIteratorMethod(O);
var index = 0;
var length, result, step, iterator, next, value;
if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
// if the target is not iterable or it's an array with the default iterator - use a simple case
if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
iterator = iteratorMethod.call(O);
next = iterator.next;
result = new C();
for (;!(step = next.call(iterator)).done; index++) {
value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
createProperty(result, index, value);
}
} else {
length = toLength(O.length);
result = new C(length);
for (;length > index; index++) {
value = mapping ? mapfn(O[index], index) : O[index];
createProperty(result, index, value);
}
}
result.length = index;
return result;
};
},{"../internals/call-with-safe-iteration-closing":8,"../internals/create-property":16,"../internals/function-bind-context":23,"../internals/get-iterator-method":25,"../internals/is-array-iterator-method":35,"../internals/to-length":71,"../internals/to-object":72}],7:[function(require,module,exports){
var toIndexedObject = require('../internals/to-indexed-object');
var toLength = require('../internals/to-length');
var toAbsoluteIndex = require('../internals/to-absolute-index');
// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
return function ($this, el, fromIndex) {
var O = toIndexedObject($this);
var length = toLength(O.length);
var index = toAbsoluteIndex(fromIndex, length);
var value;
// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare
if (IS_INCLUDES && el != el) while (length > index) {
value = O[index++];
// eslint-disable-next-line no-self-compare
if (value != value) return true;
// Array#indexOf ignores holes, Array#includes - not
} else for (;length > index; index++) {
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
} return !IS_INCLUDES && -1;
};
};
module.exports = {
// `Array.prototype.includes` method
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
includes: createMethod(true),
// `Array.prototype.indexOf` method
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
indexOf: createMethod(false)
};
},{"../internals/to-absolute-index":68,"../internals/to-indexed-object":69,"../internals/to-length":71}],8:[function(require,module,exports){
var anObject = require('../internals/an-object');
// call something on iterator step with safe closing on error
module.exports = function (iterator, fn, value, ENTRIES) {
try {
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
// 7.4.6 IteratorClose(iterator, completion)
} catch (error) {
var returnMethod = iterator['return'];
if (returnMethod !== undefined) anObject(returnMethod.call(iterator));
throw error;
}
};
},{"../internals/an-object":5}],9:[function(require,module,exports){
var toString = {}.toString;
module.exports = function (it) {
return toString.call(it).slice(8, -1);
};
},{}],10:[function(require,module,exports){
var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');
var classofRaw = require('../internals/classof-raw');
var wellKnownSymbol = require('../internals/well-known-symbol');
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
// ES3 wrong here
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
try {
return it[key];
} catch (error) { /* empty */ }
};
// getting tag from ES6+ `Object.prototype.toString`
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
var O, tag, result;
return it === undefined ? 'Undefined' : it === null ? 'Null'
// @@toStringTag case
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
// builtinTag case
: CORRECT_ARGUMENTS ? classofRaw(O)
// ES3 arguments fallback
: (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
};
},{"../internals/classof-raw":9,"../internals/to-string-tag-support":74,"../internals/well-known-symbol":77}],11:[function(require,module,exports){
var has = require('../internals/has');
var ownKeys = require('../internals/own-keys');
var getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');
var definePropertyModule = require('../internals/object-define-property');
module.exports = function (target, source) {
var keys = ownKeys(source);
var defineProperty = definePropertyModule.f;
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
}
};
},{"../internals/has":28,"../internals/object-define-property":47,"../internals/object-get-own-property-descriptor":48,"../internals/own-keys":56}],12:[function(require,module,exports){
var fails = require('../internals/fails');
module.exports = !fails(function () {
function F() { /* empty */ }
F.prototype.constructor = null;
return Object.getPrototypeOf(new F()) !== F.prototype;
});
},{"../internals/fails":22}],13:[function(require,module,exports){
'use strict';
var IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;
var create = require('../internals/object-create');
var createPropertyDescriptor = require('../internals/create-property-descriptor');
var setToStringTag = require('../internals/set-to-string-tag');
var Iterators = require('../internals/iterators');
var returnThis = function () { return this; };
module.exports = function (IteratorConstructor, NAME, next) {
var TO_STRING_TAG = NAME + ' Iterator';
IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
Iterators[TO_STRING_TAG] = returnThis;
return IteratorConstructor;
};
},{"../internals/create-property-descriptor":15,"../internals/iterators":40,"../internals/iterators-core":39,"../internals/object-create":45,"../internals/set-to-string-tag":62}],14:[function(require,module,exports){
var DESCRIPTORS = require('../internals/descriptors');
var definePropertyModule = require('../internals/object-define-property');
var createPropertyDescriptor = require('../internals/create-property-descriptor');
module.exports = DESCRIPTORS ? function (object, key, value) {
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
},{"../internals/create-property-descriptor":15,"../internals/descriptors":18,"../internals/object-define-property":47}],15:[function(require,module,exports){
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
},{}],16:[function(require,module,exports){
'use strict';
var toPrimitive = require('../internals/to-primitive');
var definePropertyModule = require('../internals/object-define-property');
var createPropertyDescriptor = require('../internals/create-property-descriptor');
module.exports = function (object, key, value) {
var propertyKey = toPrimitive(key);
if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
else object[propertyKey] = value;
};
},{"../internals/create-property-descriptor":15,"../internals/object-define-property":47,"../internals/to-primitive":73}],17:[function(require,module,exports){
'use strict';
var $ = require('../internals/export');
var createIteratorConstructor = require('../internals/create-iterator-constructor');
var getPrototypeOf = require('../internals/object-get-prototype-of');
var setPrototypeOf = require('../internals/object-set-prototype-of');
var setToStringTag = require('../internals/set-to-string-tag');
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
var redefine = require('../internals/redefine');
var wellKnownSymbol = require('../internals/well-known-symbol');
var IS_PURE = require('../internals/is-pure');
var Iterators = require('../internals/iterators');
var IteratorsCore = require('../internals/iterators-core');
var IteratorPrototype = IteratorsCore.IteratorPrototype;
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
var ITERATOR = wellKnownSymbol('iterator');
var KEYS = 'keys';
var VALUES = 'values';
var ENTRIES = 'entries';
var returnThis = function () { return this; };
module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
createIteratorConstructor(IteratorConstructor, NAME, next);
var getIterationMethod = function (KIND) {
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
switch (KIND) {
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
} return function () { return new IteratorConstructor(this); };
};
var TO_STRING_TAG = NAME + ' Iterator';
var INCORRECT_VALUES_NAME = false;
var IterablePrototype = Iterable.prototype;
var nativeIterator = IterablePrototype[ITERATOR]
|| IterablePrototype['@@iterator']
|| DEFAULT && IterablePrototype[DEFAULT];
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
var CurrentIteratorPrototype, methods, KEY;
// fix native
if (anyNativeIterator) {
CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
if (setPrototypeOf) {
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
} else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
}
}
// Set @@toStringTag to native iterators
setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
}
}
// fix Array#{values, @@iterator}.name in V8 / FF
if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
INCORRECT_VALUES_NAME = true;
defaultIterator = function values() { return nativeIterator.call(this); };
}
// define iterator
if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
}
Iterators[NAME] = defaultIterator;
// export additional methods
if (DEFAULT) {
methods = {
values: getIterationMethod(VALUES),
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
entries: getIterationMethod(ENTRIES)
};
if (FORCED) for (KEY in methods) {
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
redefine(IterablePrototype, KEY, methods[KEY]);
}
} else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
}
return methods;
};
},{"../internals/create-iterator-constructor":13,"../internals/create-non-enumerable-property":14,"../internals/export":21,"../internals/is-pure":38,"../internals/iterators":40,"../internals/iterators-core":39,"../internals/object-get-prototype-of":51,"../internals/object-set-prototype-of":55,"../internals/redefine":59,"../internals/set-to-string-tag":62,"../internals/well-known-symbol":77}],18:[function(require,module,exports){
var fails = require('../internals/fails');
// Thank's IE8 for his funny defineProperty
module.exports = !fails(function () {
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
});
},{"../internals/fails":22}],19:[function(require,module,exports){
var global = require('../internals/global');
var isObject = require('../internals/is-object');
var document = global.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
return EXISTS ? document.createElement(it) : {};
};
},{"../internals/global":27,"../internals/is-object":37}],20:[function(require,module,exports){
// IE8- don't enum bug keys
module.exports = [
'constructor',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'toLocaleString',
'toString',
'valueOf'
];
},{}],21:[function(require,module,exports){
var global = require('../internals/global');
var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
var redefine = require('../internals/redefine');
var setGlobal = require('../internals/set-global');
var copyConstructorProperties = require('../internals/copy-constructor-properties');
var isForced = require('../internals/is-forced');
/*
options.target - name of the target object
options.global - target is the global object
options.stat - export as static methods of target
options.proto - export as prototype methods of target
options.real - real prototype method for the `pure` version
options.forced - export even if the native feature is available
options.bind - bind methods to the target, required for the `pure` version
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
options.unsafe - use the simple assignment of property instead of delete + defineProperty
options.sham - add a flag to not completely full polyfills
options.enumerable - export as enumerable property
options.noTargetGet - prevent calling a getter on target
*/
module.exports = function (options, source) {
var TARGET = options.target;
var GLOBAL = options.global;
var STATIC = options.stat;
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
if (GLOBAL) {
target = global;
} else if (STATIC) {
target = global[TARGET] || setGlobal(TARGET, {});
} else {
target = (global[TARGET] || {}).prototype;
}
if (target) for (key in source) {
sourceProperty = source[key];
if (options.noTargetGet) {
descriptor = getOwnPropertyDescriptor(target, key);
targetProperty = descriptor && descriptor.value;
} else targetProperty = target[key];
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
// contained in target
if (!FORCED && targetProperty !== undefined) {
if (typeof sourceProperty === typeof targetProperty) continue;
copyConstructorProperties(sourceProperty, targetProperty);
}
// add a flag to not completely full polyfills
if (options.sham || (targetProperty && targetProperty.sham)) {
createNonEnumerableProperty(sourceProperty, 'sham', true);
}
// extend global
redefine(target, key, sourceProperty, options);
}
};
},{"../internals/copy-constructor-properties":11,"../internals/create-non-enumerable-property":14,"../internals/global":27,"../internals/is-forced":36,"../internals/object-get-own-property-descriptor":48,"../internals/redefine":59,"../internals/set-global":61}],22:[function(require,module,exports){
module.exports = function (exec) {
try {
return !!exec();
} catch (error) {
return true;
}
};
},{}],23:[function(require,module,exports){
var aFunction = require('../internals/a-function');
// optional / simple context binding
module.exports = function (fn, that, length) {
aFunction(fn);
if (that === undefined) return fn;
switch (length) {
case 0: return function () {
return fn.call(that);
};
case 1: return function (a) {
return fn.call(that, a);
};
case 2: return function (a, b) {
return fn.call(that, a, b);
};
case 3: return function (a, b, c) {
return fn.call(that, a, b, c);
};
}
return function (/* ...args */) {
return fn.apply(that, arguments);
};
};
},{"../internals/a-function":1}],24:[function(require,module,exports){
var path = require('../internals/path');
var global = require('../internals/global');
var aFunction = function (variable) {
return typeof variable == 'function' ? variable : undefined;
};
module.exports = function (namespace, method) {
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
: path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
};
},{"../internals/global":27,"../internals/path":57}],25:[function(require,module,exports){
var classof = require('../internals/classof');
var Iterators = require('../internals/iterators');
var wellKnownSymbol = require('../internals/well-known-symbol');
var ITERATOR = wellKnownSymbol('iterator');
module.exports = function (it) {
if (it != undefined) return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
};
},{"../internals/classof":10,"../internals/iterators":40,"../internals/well-known-symbol":77}],26:[function(require,module,exports){
var anObject = require('../internals/an-object');
var getIteratorMethod = require('../internals/get-iterator-method');
module.exports = function (it) {
var iteratorMethod = getIteratorMethod(it);
if (typeof iteratorMethod != 'function') {
throw TypeError(String(it) + ' is not iterable');
} return anObject(iteratorMethod.call(it));
};
},{"../internals/an-object":5,"../internals/get-iterator-method":25}],27:[function(require,module,exports){
(function (global){
var check = function (it) {
return it && it.Math == Math && it;
};
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
// eslint-disable-next-line no-undef
check(typeof globalThis == 'object' && globalThis) ||
check(typeof window == 'object' && window) ||
check(typeof self == 'object' && self) ||
check(typeof global == 'object' && global) ||
// eslint-disable-next-line no-new-func
Function('return this')();
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],28:[function(require,module,exports){
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
},{}],29:[function(require,module,exports){
module.exports = {};
},{}],30:[function(require,module,exports){
var getBuiltIn = require('../internals/get-built-in');
module.exports = getBuiltIn('document', 'documentElement');
},{"../internals/get-built-in":24}],31:[function(require,module,exports){
var DESCRIPTORS = require('../internals/descriptors');
var fails = require('../internals/fails');
var createElement = require('../internals/document-create-element');
// Thank's IE8 for his funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
return Object.defineProperty(createElement('div'), 'a', {
get: function () { return 7; }
}).a != 7;
});
},{"../internals/descriptors":18,"../internals/document-create-element":19,"../internals/fails":22}],32:[function(require,module,exports){
var fails = require('../internals/fails');
var classof = require('../internals/classof-raw');
var split = ''.split;
// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
// eslint-disable-next-line no-prototype-builtins
return !Object('z').propertyIsEnumerable(0);
}) ? function (it) {
return classof(it) == 'String' ? split.call(it, '') : Object(it);
} : Object;
},{"../internals/classof-raw":9,"../internals/fails":22}],33:[function(require,module,exports){
var store = require('../internals/shared-store');
var functionToString = Function.toString;
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
if (typeof store.inspectSource != 'function') {
store.inspectSource = function (it) {
return functionToString.call(it);
};
}
module.exports = store.inspectSource;
},{"../internals/shared-store":64}],34:[function(require,module,exports){
var NATIVE_WEAK_MAP = require('../internals/native-weak-map');
var global = require('../internals/global');
var isObject = require('../internals/is-object');
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
var objectHas = require('../internals/has');
var sharedKey = require('../internals/shared-key');
var hiddenKeys = require('../internals/hidden-keys');
var WeakMap = global.WeakMap;
var set, get, has;
var enforce = function (it) {
return has(it) ? get(it) : set(it, {});
};
var getterFor = function (TYPE) {
return function (it) {
var state;
if (!isObject(it) || (state = get(it)).type !== TYPE) {
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
} return state;
};
};
if (NATIVE_WEAK_MAP) {
var store = new WeakMap();
var wmget = store.get;
var wmhas = store.has;
var wmset = store.set;
set = function (it, metadata) {
wmset.call(store, it, metadata);
return metadata;
};
get = function (it) {
return wmget.call(store, it) || {};
};
has = function (it) {
return wmhas.call(store, it);
};
} else {
var STATE = sharedKey('state');
hiddenKeys[STATE] = true;
set = function (it, metadata) {
createNonEnumerableProperty(it, STATE, metadata);
return metadata;
};
get = function (it) {
return objectHas(it, STATE) ? it[STATE] : {};
};
has = function (it) {
return objectHas(it, STATE);
};
}
module.exports = {
set: set,
get: get,
has: has,
enforce: enforce,
getterFor: getterFor
};
},{"../internals/create-non-enumerable-property":14,"../internals/global":27,"../internals/has":28,"../internals/hidden-keys":29,"../internals/is-object":37,"../internals/native-weak-map":43,"../internals/shared-key":63}],35:[function(require,module,exports){
var wellKnownSymbol = require('../internals/well-known-symbol');
var Iterators = require('../internals/iterators');
var ITERATOR = wellKnownSymbol('iterator');
var ArrayPrototype = Array.prototype;
// check on default Array iterator
module.exports = function (it) {
return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
};
},{"../internals/iterators":40,"../internals/well-known-symbol":77}],36:[function(require,module,exports){
var fails = require('../internals/fails');
var replacement = /#|\.prototype\./;
var isForced = function (feature, detection) {
var value = data[normalize(feature)];
return value == POLYFILL ? true
: value == NATIVE ? false
: typeof detection == 'function' ? fails(detection)
: !!detection;
};
var normalize = isForced.normalize = function (string) {
return String(string).replace(replacement, '.').toLowerCase();
};
var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';
module.exports = isForced;
},{"../internals/fails":22}],37:[function(require,module,exports){
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
},{}],38:[function(require,module,exports){
module.exports = false;
},{}],39:[function(require,module,exports){
'use strict';
var getPrototypeOf = require('../internals/object-get-prototype-of');
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
var has = require('../internals/has');
var wellKnownSymbol = require('../internals/well-known-symbol');
var IS_PURE = require('../internals/is-pure');
var ITERATOR = wellKnownSymbol('iterator');
var BUGGY_SAFARI_ITERATORS = false;
var returnThis = function () { return this; };
// `%IteratorPrototype%` object
// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
if ([].keys) {
arrayIterator = [].keys();
// Safari 8 has buggy iterators w/o `next`
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
else {
PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
}
}
if (IteratorPrototype == undefined) IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
if (!IS_PURE && !has(IteratorPrototype, ITERATOR)) {
createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
}
module.exports = {
IteratorPrototype: IteratorPrototype,
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
};
},{"../internals/create-non-enumerable-property":14,"../internals/has":28,"../internals/is-pure":38,"../internals/object-get-prototype-of":51,"../internals/well-known-symbol":77}],40:[function(require,module,exports){
arguments[4][29][0].apply(exports,arguments)
},{"dup":29}],41:[function(require,module,exports){
var fails = require('../internals/fails');
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
// Chrome 38 Symbol has incorrect toString conversion
// eslint-disable-next-line no-undef
return !String(Symbol());
});
},{"../internals/fails":22}],42:[function(require,module,exports){
var fails = require('../internals/fails');
var wellKnownSymbol = require('../internals/well-known-symbol');
var IS_PURE = require('../internals/is-pure');
var ITERATOR = wellKnownSymbol('iterator');
module.exports = !fails(function () {
var url = new URL('b?a=1&b=2&c=3', 'http://a');
var searchParams = url.searchParams;
var result = '';
url.pathname = 'c%20d';
searchParams.forEach(function (value, key) {
searchParams['delete']('b');
result += key + value;
});
return (IS_PURE && !url.toJSON)
|| !searchParams.sort
|| url.href !== 'http://a/c%20d?a=1&c=3'
|| searchParams.get('c') !== '3'
|| String(new URLSearchParams('?a=1')) !== 'a=1'
|| !searchParams[ITERATOR]
// throws in Edge
|| new URL('https://a@b').username !== 'a'
|| new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
// not punycoded in Edge
|| new URL('http://тест').host !== 'xn--e1aybc'
// not escaped in Chrome 62-
|| new URL('http://a#б').hash !== '#%D0%B1'
// fails in Chrome 66-
|| result !== 'a1c3'
// throws in Safari
|| new URL('http://x', undefined).host !== 'x';
});
},{"../internals/fails":22,"../internals/is-pure":38,"../internals/well-known-symbol":77}],43:[function(require,module,exports){
var global = require('../internals/global');
var inspectSource = require('../internals/inspect-source');
var WeakMap = global.WeakMap;
module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
},{"../internals/global":27,"../internals/inspect-source":33}],44:[function(require,module,exports){
'use strict';
var DESCRIPTORS = require('../internals/descriptors');
var fails = require('../internals/fails');
var objectKeys = require('../internals/object-keys');
var getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');
var propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');
var toObject = require('../internals/to-object');
var IndexedObject = require('../internals/indexed-object');
var nativeAssign = Object.assign;
var defineProperty = Object.defineProperty;
// `Object.assign` method
// https://tc39.github.io/ecma262/#sec-object.assign
module.exports = !nativeAssign || fails(function () {
// should have correct order of operations (Edge bug)
if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
enumerable: true,
get: function () {
defineProperty(this, 'b', {
value: 3,
enumerable: false
});
}
}), { b: 2 })).b !== 1) return true;
// should work with symbols and should have deterministic property order (V8 bug)
var A = {};
var B = {};
// eslint-disable-next-line no-undef
var symbol = Symbol();
var alphabet = 'abcdefghijklmnopqrst';
A[symbol] = 7;
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
var T = toObject(target);
var argumentsLength = arguments.length;
var index = 1;
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
var propertyIsEnumerable = propertyIsEnumerableModule.f;
while (argumentsLength > index) {
var S = IndexedObject(arguments[index++]);
var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
var length = keys.length;
var j = 0;
var key;
while (length > j) {
key = keys[j++];
if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
}
} return T;
} : nativeAssign;
},{"../internals/descriptors":18,"../internals/fails":22,"../internals/indexed-object":32,"../internals/object-get-own-property-symbols":50,"../internals/object-keys":53,"../internals/object-property-is-enumerable":54,"../internals/to-object":72}],45:[function(require,module,exports){
var anObject = require('../internals/an-object');
var defineProperties = require('../internals/object-define-properties');
var enumBugKeys = require('../internals/enum-bug-keys');
var hiddenKeys = require('../internals/hidden-keys');
var html = require('../internals/html');
var documentCreateElement = require('../internals/document-create-element');
var sharedKey = require('../internals/shared-key');
var GT = '>';
var LT = '<';
var PROTOTYPE = 'prototype';
var SCRIPT = 'script';
var IE_PROTO = sharedKey('IE_PROTO');
var EmptyConstructor = function () { /* empty */ };
var scriptTag = function (content) {
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
};
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
var NullProtoObjectViaActiveX = function (activeXDocument) {
activeXDocument.write(scriptTag(''));
activeXDocument.close();
var temp = activeXDocument.parentWindow.Object;
activeXDocument = null; // avoid memory leak
return temp;
};
// Create object with fake `null` prototype: use iframe Object with cleared prototype
var NullProtoObjectViaIFrame = function () {
// Thrash, waste and sodomy: IE GC bug
var iframe = documentCreateElement('iframe');
var JS = 'java' + SCRIPT + ':';
var iframeDocument;
iframe.style.display = 'none';
html.appendChild(iframe);
// https://github.com/zloirock/core-js/issues/475
iframe.src = String(JS);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(scriptTag('document.F=Object'));
iframeDocument.close();
return iframeDocument.F;
};
// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
// avoid IE GC bug
var activeXDocument;
var NullProtoObject = function () {
try {
/* global ActiveXObject */
activeXDocument = document.domain && new ActiveXObject('htmlfile');
} catch (error) { /* ignore */ }
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
var length = enumBugKeys.length;
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
return NullProtoObject();
};
hiddenKeys[IE_PROTO] = true;
// `Object.create` method
// https://tc39.github.io/ecma262/#sec-object.create
module.exports = Object.create || function create(O, Properties) {
var result;
if (O !== null) {
EmptyConstructor[PROTOTYPE] = anObject(O);
result = new EmptyConstructor();
EmptyConstructor[PROTOTYPE] = null;
// add "__proto__" for Object.getPrototypeOf polyfill
result[IE_PROTO] = O;
} else result = NullProtoObject();
return Properties === undefined ? result : defineProperties(result, Properties);
};
},{"../internals/an-object":5,"../internals/document-create-element":19,"../internals/enum-bug-keys":20,"../internals/hidden-keys":29,"../internals/html":30,"../internals/object-define-properties":46,"../internals/shared-key":63}],46:[function(require,module,exports){
var DESCRIPTORS = require('../internals/descriptors');
var definePropertyModule = require('../internals/object-define-property');
var anObject = require('../internals/an-object');
var objectKeys = require('../internals/object-keys');
// `Object.defineProperties` method
// https://tc39.github.io/ecma262/#sec-object.defineproperties
module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);
var keys = objectKeys(Properties);
var length = keys.length;
var index = 0;
var key;
while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
return O;
};
},{"../internals/an-object":5,"../internals/descriptors":18,"../internals/object-define-property":47,"../internals/object-keys":53}],47:[function(require,module,exports){
var DESCRIPTORS = require('../internals/descriptors');
var IE8_DOM_DEFINE = require('../internals/ie8-dom-define');
var anObject = require('../internals/an-object');
var toPrimitive = require('../internals/to-primitive');
var nativeDefineProperty = Object.defineProperty;
// `Object.defineProperty` method
// https://tc39.github.io/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if (IE8_DOM_DEFINE) try {
return nativeDefineProperty(O, P, Attributes);
} catch (error) { /* empty */ }
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
if ('value' in Attributes) O[P] = Attributes.value;
return O;
};
},{"../internals/an-object":5,"../internals/descriptors":18,"../internals/ie8-dom-define":31,"../internals/to-primitive":73}],48:[function(require,module,exports){
var DESCRIPTORS = require('../internals/descriptors');
var propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');
var createPropertyDescriptor = require('../internals/create-property-descriptor');
var toIndexedObject = require('../internals/to-indexed-object');
var toPrimitive = require('../internals/to-primitive');
var has = require('../internals/has');
var IE8_DOM_DEFINE = require('../internals/ie8-dom-define');
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// `Object.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
O = toIndexedObject(O);
P = toPrimitive(P, true);
if (IE8_DOM_DEFINE) try {
return nativeGetOwnPropertyDescriptor(O, P);
} catch (error) { /* empty */ }
if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
};
},{"../internals/create-property-descriptor":15,"../internals/descriptors":18,"../internals/has":28,"../internals/ie8-dom-define":31,"../internals/object-property-is-enumerable":54,"../internals/to-indexed-object":69,"../internals/to-primitive":73}],49:[function(require,module,exports){
var internalObjectKeys = require('../internals/object-keys-internal');
var enumBugKeys = require('../internals/enum-bug-keys');
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
// `Object.getOwnPropertyNames` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return internalObjectKeys(O, hiddenKeys);
};
},{"../internals/enum-bug-keys":20,"../internals/object-keys-internal":52}],50:[function(require,module,exports){
exports.f = Object.getOwnPropertySymbols;
},{}],51:[function(require,module,exports){
var has = require('../internals/has');
var toObject = require('../internals/to-object');
var sharedKey = require('../internals/shared-key');
var CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');
var IE_PROTO = sharedKey('IE_PROTO');
var ObjectPrototype = Object.prototype;
// `Object.getPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
O = toObject(O);
if (has(O, IE_PROTO)) return O[IE_PROTO];
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
return O.constructor.prototype;
} return O instanceof Object ? ObjectPrototype : null;
};
},{"../internals/correct-prototype-getter":12,"../internals/has":28,"../internals/shared-key":63,"../internals/to-object":72}],52:[function(require,module,exports){
var has = require('../internals/has');
var toIndexedObject = require('../internals/to-indexed-object');
var indexOf = require('../internals/array-includes').indexOf;
var hiddenKeys = require('../internals/hidden-keys');
module.exports = function (object, names) {
var O = toIndexedObject(object);
var i = 0;
var result = [];
var key;
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
// Don't enum bug & hidden keys
while (names.length > i) if (has(O, key = names[i++])) {
~indexOf(result, key) || result.push(key);
}
return result;
};
},{"../internals/array-includes":7,"../internals/has":28,"../internals/hidden-keys":29,"../internals/to-indexed-object":69}],53:[function(require,module,exports){
var internalObjectKeys = require('../internals/object-keys-internal');
var enumBugKeys = require('../internals/enum-bug-keys');
// `Object.keys` method
// https://tc39.github.io/ecma262/#sec-object.keys
module.exports = Object.keys || function keys(O) {
return internalObjectKeys(O, enumBugKeys);
};
},{"../internals/enum-bug-keys":20,"../internals/object-keys-internal":52}],54:[function(require,module,exports){
'use strict';
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
var descriptor = getOwnPropertyDescriptor(this, V);
return !!descriptor && descriptor.enumerable;
} : nativePropertyIsEnumerable;
},{}],55:[function(require,module,exports){
var anObject = require('../internals/an-object');
var aPossiblePrototype = require('../internals/a-possible-prototype');
// `Object.setPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
var CORRECT_SETTER = false;
var test = {};
var setter;
try {
setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
setter.call(test, []);
CORRECT_SETTER = test instanceof Array;
} catch (error) { /* empty */ }
return function setPrototypeOf(O, proto) {
anObject(O);
aPossiblePrototype(proto);
if (CORRECT_SETTER) setter.call(O, proto);
else O.__proto__ = proto;
return O;
};
}() : undefined);
},{"../internals/a-possible-prototype":2,"../internals/an-object":5}],56:[function(require,module,exports){
var getBuiltIn = require('../internals/get-built-in');
var getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');
var getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');
var anObject = require('../internals/an-object');
// all object keys, includes non-enumerable and symbols
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
var keys = getOwnPropertyNamesModule.f(anObject(it));
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
};
},{"../internals/an-object":5,"../internals/get-built-in":24,"../internals/object-get-own-property-names":49,"../internals/object-get-own-property-symbols":50}],57:[function(require,module,exports){
var global = require('../internals/global');
module.exports = global;
},{"../internals/global":27}],58:[function(require,module,exports){
var redefine = require('../internals/redefine');
module.exports = function (target, src, options) {
for (var key in src) redefine(target, key, src[key], options);
return target;
};
},{"../internals/redefine":59}],59:[function(require,module,exports){
var global = require('../internals/global');
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
var has = require('../internals/has');
var setGlobal = require('../internals/set-global');
var inspectSource = require('../internals/inspect-source');
var InternalStateModule = require('../internals/internal-state');
var getInternalState = InternalStateModule.get;
var enforceInternalState = InternalStateModule.enforce;
var TEMPLATE = String(String).split('String');
(module.exports = function (O, key, value, options) {
var unsafe = options ? !!options.unsafe : false;
var simple = options ? !!options.enumerable : false;
var noTargetGet = options ? !!options.noTargetGet : false;
if (typeof value == 'function') {
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
}
if (O === global) {
if (simple) O[key] = value;
else setGlobal(key, value);
return;
} else if (!unsafe) {
delete O[key];
} else if (!noTargetGet && O[key]) {
simple = true;
}
if (simple) O[key] = value;
else createNonEnumerableProperty(O, key, value);
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, 'toString', function toString() {
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
});
},{"../internals/create-non-enumerable-property":14,"../internals/global":27,"../internals/has":28,"../internals/inspect-source":33,"../internals/internal-state":34,"../internals/set-global":61}],60:[function(require,module,exports){
// `RequireObjectCoercible` abstract operation
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
if (it == undefined) throw TypeError("Can't call method on " + it);
return it;
};
},{}],61:[function(require,module,exports){
var global = require('../internals/global');
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
module.exports = function (key, value) {
try {
createNonEnumerableProperty(global, key, value);
} catch (error) {
global[key] = value;
} return value;
};
},{"../internals/create-non-enumerable-property":14,"../internals/global":27}],62:[function(require,module,exports){
var defineProperty = require('../internals/object-define-property').f;
var has = require('../internals/has');
var wellKnownSymbol = require('../internals/well-known-symbol');
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
module.exports = function (it, TAG, STATIC) {
if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
}
};
},{"../internals/has":28,"../internals/object-define-property":47,"../internals/well-known-symbol":77}],63:[function(require,module,exports){
var shared = require('../internals/shared');
var uid = require('../internals/uid');
var keys = shared('keys');
module.exports = function (key) {
return keys[key] || (keys[key] = uid(key));
};
},{"../internals/shared":65,"../internals/uid":75}],64:[function(require,module,exports){
var global = require('../internals/global');
var setGlobal = require('../internals/set-global');
var SHARED = '__core-js_shared__';
var store = global[SHARED] || setGlobal(SHARED, {});
module.exports = store;
},{"../internals/global":27,"../internals/set-global":61}],65:[function(require,module,exports){
var IS_PURE = require('../internals/is-pure');
var store = require('../internals/shared-store');
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: '3.6.4',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
});
},{"../internals/is-pure":38,"../internals/shared-store":64}],66:[function(require,module,exports){
var toInteger = require('../internals/to-integer');
var requireObjectCoercible = require('../internals/require-object-coercible');
// `String.prototype.{ codePointAt, at }` methods implementation
var createMethod = function (CONVERT_TO_STRING) {
return function ($this, pos) {
var S = String(requireObjectCoercible($this));
var position = toInteger(pos);
var size = S.length;
var first, second;
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
first = S.charCodeAt(position);
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
? CONVERT_TO_STRING ? S.charAt(position) : first
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
};
};
module.exports = {
// `String.prototype.codePointAt` method
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
codeAt: createMethod(false),
// `String.prototype.at` method
// https://github.com/mathiasbynens/String.prototype.at
charAt: createMethod(true)
};
},{"../internals/require-object-coercible":60,"../internals/to-integer":70}],67:[function(require,module,exports){
'use strict';
// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
var base = 36;
var tMin = 1;
var tMax = 26;
var skew = 38;
var damp = 700;
var initialBias = 72;
var initialN = 128; // 0x80
var delimiter = '-'; // '\x2D'
var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars
var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
var baseMinusTMin = base - tMin;
var floor = Math.floor;
var stringFromCharCode = String.fromCharCode;
/**
* Creates an array containing the numeric code points of each Unicode
* character in the string. While JavaScript uses UCS-2 internally,
* this function will convert a pair of surrogate halves (each of which
* UCS-2 exposes as separate characters) into a single code point,
* matching UTF-16.
*/
var ucs2decode = function (string) {
var output = [];
var counter = 0;
var length = string.length;
while (counter < length) {
var value = string.charCodeAt(counter++);
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
// It's a high surrogate, and there is a next character.
var extra = string.charCodeAt(counter++);
if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
} else {
// It's an unmatched surrogate; only append this code unit, in case the
// next code unit is the high surrogate of a surrogate pair.
output.push(value);
counter--;
}
} else {
output.push(value);
}
}
return output;
};
/**
* Converts a digit/integer into a basic code point.
*/
var digitToBasic = function (digit) {
// 0..25 map to ASCII a..z or A..Z
// 26..35 map to ASCII 0..9
return digit + 22 + 75 * (digit < 26);
};
/**
* Bias adaptation function as per section 3.4 of RFC 3492.
* https://tools.ietf.org/html/rfc3492#section-3.4
*/
var adapt = function (delta, numPoints, firstTime) {
var k = 0;
delta = firstTime ? floor(delta / damp) : delta >> 1;
delta += floor(delta / numPoints);
for (; delta > baseMinusTMin * tMax >> 1; k += base) {
delta = floor(delta / baseMinusTMin);
}
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
};
/**
* Converts a string of Unicode symbols (e.g. a domain name label) to a
* Punycode string of ASCII-only symbols.
*/
// eslint-disable-next-line max-statements
var encode = function (input) {
var output = [];
// Convert the input in UCS-2 to an array of Unicode code points.
input = ucs2decode(input);
// Cache the length.
var inputLength = input.length;
// Initialize the state.
var n = initialN;
var delta = 0;
var bias = initialBias;
var i, currentValue;
// Handle the basic code points.
for (i = 0; i < input.length; i++) {
currentValue = input[i];
if (currentValue < 0x80) {
output.push(stringFromCharCode(currentValue));
}
}
var basicLength = output.length; // number of basic code points.
var handledCPCount = basicLength; // number of code points that have been handled;
// Finish the basic string with a delimiter unless it's empty.
if (basicLength) {
output.push(delimiter);
}
// Main encoding loop:
while (handledCPCount < inputLength) {
// All non-basic code points < n have been handled already. Find the next larger one:
var m = maxInt;
for (i = 0; i < input.length; i++) {
currentValue = input[i];
if (currentValue >= n && currentValue < m) {
m = currentValue;
}
}
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
var handledCPCountPlusOne = handledCPCount + 1;
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
throw RangeError(OVERFLOW_ERROR);
}
delta += (m - n) * handledCPCountPlusOne;
n = m;
for (i = 0; i < input.length; i++) {
currentValue = input[i];
if (currentValue < n && ++delta > maxInt) {
throw RangeError(OVERFLOW_ERROR);
}
if (currentValue == n) {
// Represent delta as a generalized variable-length integer.
var q = delta;
for (var k = base; /* no condition */; k += base) {
var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
if (q < t) break;
var qMinusT = q - t;
var baseMinusT = base - t;
output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));
q = floor(qMinusT / baseMinusT);
}
output.push(stringFromCharCode(digitToBasic(q)));
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
delta = 0;
++handledCPCount;
}
}
++delta;
++n;
}
return output.join('');
};
module.exports = function (input) {
var encoded = [];
var labels = input.toLowerCase().replace(regexSeparators, '\u002E').split('.');
var i, label;
for (i = 0; i < labels.length; i++) {
label = labels[i];
encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);
}
return encoded.join('.');
};
},{}],68:[function(require,module,exports){
var toInteger = require('../internals/to-integer');
var max = Math.max;
var min = Math.min;
// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
module.exports = function (index, length) {
var integer = toInteger(index);
return integer < 0 ? max(integer + length, 0) : min(integer, length);
};
},{"../internals/to-integer":70}],69:[function(require,module,exports){
// toObject with fallback for non-array-like ES3 strings
var IndexedObject = require('../internals/indexed-object');
var requireObjectCoercible = require('../internals/require-object-coercible');
module.exports = function (it) {
return IndexedObject(requireObjectCoercible(it));
};
},{"../internals/indexed-object":32,"../internals/require-object-coercible":60}],70:[function(require,module,exports){
var ceil = Math.ceil;
var floor = Math.floor;
// `ToInteger` abstract operation
// https://tc39.github.io/ecma262/#sec-tointeger
module.exports = function (argument) {
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
};
},{}],71:[function(require,module,exports){
var toInteger = require('../internals/to-integer');
var min = Math.min;
// `ToLength` abstract operation
// https://tc39.github.io/ecma262/#sec-tolength
module.exports = function (argument) {
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};
},{"../internals/to-integer":70}],72:[function(require,module,exports){
var requireObjectCoercible = require('../internals/require-object-coercible');
// `ToObject` abstract operation
// https://tc39.github.io/ecma262/#sec-toobject
module.exports = function (argument) {
return Object(requireObjectCoercible(argument));
};
},{"../internals/require-object-coercible":60}],73:[function(require,module,exports){
var isObject = require('../internals/is-object');
// `ToPrimitive` abstract operation
// https://tc39.github.io/ecma262/#sec-toprimitive
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (input, PREFERRED_STRING) {
if (!isObject(input)) return input;
var fn, val;
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
throw TypeError("Can't convert object to primitive value");
};
},{"../internals/is-object":37}],74:[function(require,module,exports){
var wellKnownSymbol = require('../internals/well-known-symbol');
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var test = {};
test[TO_STRING_TAG] = 'z';
module.exports = String(test) === '[object z]';
},{"../internals/well-known-symbol":77}],75:[function(require,module,exports){
var id = 0;
var postfix = Math.random();
module.exports = function (key) {
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
};
},{}],76:[function(require,module,exports){
var NATIVE_SYMBOL = require('../internals/native-symbol');
module.exports = NATIVE_SYMBOL
// eslint-disable-next-line no-undef
&& !Symbol.sham
// eslint-disable-next-line no-undef
&& typeof Symbol.iterator == 'symbol';
},{"../internals/native-symbol":41}],77:[function(require,module,exports){
var global = require('../internals/global');
var shared = require('../internals/shared');
var has = require('../internals/has');
var uid = require('../internals/uid');
var NATIVE_SYMBOL = require('../internals/native-symbol');
var USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');
var WellKnownSymbolsStore = shared('wks');
var Symbol = global.Symbol;
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
module.exports = function (name) {
if (!has(WellKnownSymbolsStore, name)) {
if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
} return WellKnownSymbolsStore[name];
};
},{"../internals/global":27,"../internals/has":28,"../internals/native-symbol":41,"../internals/shared":65,"../internals/uid":75,"../internals/use-symbol-as-uid":76}],78:[function(require,module,exports){
'use strict';
var toIndexedObject = require('../internals/to-indexed-object');
var addToUnscopables = require('../internals/add-to-unscopables');
var Iterators = require('../internals/iterators');
var InternalStateModule = require('../internals/internal-state');
var defineIterator = require('../internals/define-iterator');
var ARRAY_ITERATOR = 'Array Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
// `Array.prototype.entries` method
// https://tc39.github.io/ecma262/#sec-array.prototype.entries
// `Array.prototype.keys` method
// https://tc39.github.io/ecma262/#sec-array.prototype.keys
// `Array.prototype.values` method
// https://tc39.github.io/ecma262/#sec-array.prototype.values
// `Array.prototype[@@iterator]` method
// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
// `CreateArrayIterator` internal method
// https://tc39.github.io/ecma262/#sec-createarrayiterator
module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
setInternalState(this, {
type: ARRAY_ITERATOR,
target: toIndexedObject(iterated), // target
index: 0, // next index
kind: kind // kind
});
// `%ArrayIteratorPrototype%.next` method
// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
}, function () {
var state = getInternalState(this);
var target = state.target;
var kind = state.kind;
var index = state.index++;
if (!target || index >= target.length) {
state.target = undefined;
return { value: undefined, done: true };
}
if (kind == 'keys') return { value: index, done: false };
if (kind == 'values') return { value: target[index], done: false };
return { value: [index, target[index]], done: false };
}, 'values');
// argumentsList[@@iterator] is %ArrayProto_values%
// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject
// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject
Iterators.Arguments = Iterators.Array;
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');
},{"../internals/add-to-unscopables":3,"../internals/define-iterator":17,"../internals/internal-state":34,"../internals/iterators":40,"../internals/to-indexed-object":69}],79:[function(require,module,exports){
'use strict';
var charAt = require('../internals/string-multibyte').charAt;
var InternalStateModule = require('../internals/internal-state');
var defineIterator = require('../internals/define-iterator');
var STRING_ITERATOR = 'String Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
// `String.prototype[@@iterator]` method
// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
defineIterator(String, 'String', function (iterated) {
setInternalState(this, {
type: STRING_ITERATOR,
string: String(iterated),
index: 0
});
// `%StringIteratorPrototype%.next` method
// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
}, function next() {
var state = getInternalState(this);
var string = state.string;
var index = state.index;
var point;
if (index >= string.length) return { value: undefined, done: true };
point = charAt(string, index);
state.index += point.length;
return { value: point, done: false };
});
},{"../internals/define-iterator":17,"../internals/internal-state":34,"../internals/string-multibyte":66}],80:[function(require,module,exports){
'use strict';
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
require('../modules/es.array.iterator');
var $ = require('../internals/export');
var getBuiltIn = require('../internals/get-built-in');
var USE_NATIVE_URL = require('../internals/native-url');
var redefine = require('../internals/redefine');
var redefineAll = require('../internals/redefine-all');
var setToStringTag = require('../internals/set-to-string-tag');
var createIteratorConstructor = require('../internals/create-iterator-constructor');
var InternalStateModule = require('../internals/internal-state');
var anInstance = require('../internals/an-instance');
var hasOwn = require('../internals/has');
var bind = require('../internals/function-bind-context');
var classof = require('../internals/classof');
var anObject = require('../internals/an-object');
var isObject = require('../internals/is-object');
var create = require('../internals/object-create');
var createPropertyDescriptor = require('../internals/create-property-descriptor');
var getIterator = require('../internals/get-iterator');
var getIteratorMethod = require('../internals/get-iterator-method');
var wellKnownSymbol = require('../internals/well-known-symbol');
var $fetch = getBuiltIn('fetch');
var Headers = getBuiltIn('Headers');
var ITERATOR = wellKnownSymbol('iterator');
var URL_SEARCH_PARAMS = 'URLSearchParams';
var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
var setInternalState = InternalStateModule.set;
var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);
var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);
var plus = /\+/g;
var sequences = Array(4);
var percentSequence = function (bytes) {
return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'));
};
var percentDecode = function (sequence) {
try {
return decodeURIComponent(sequence);
} catch (error) {
return sequence;
}
};
var deserialize = function (it) {
var result = it.replace(plus, ' ');
var bytes = 4;
try {
return decodeURIComponent(result);
} catch (error) {
while (bytes) {
result = result.replace(percentSequence(bytes--), percentDecode);
}
return result;
}
};
var find = /[!'()~]|%20/g;
var replace = {
'!': '%21',
"'": '%27',
'(': '%28',
')': '%29',
'~': '%7E',
'%20': '+'
};
var replacer = function (match) {
return replace[match];
};
var serialize = function (it) {
return encodeURIComponent(it).replace(find, replacer);
};
var parseSearchParams = function (result, query) {
if (query) {
var attributes = query.split('&');
var index = 0;
var attribute, entry;
while (index < attributes.length) {
attribute = attributes[index++];
if (attribute.length) {
entry = attribute.split('=');
result.push({
key: deserialize(entry.shift()),
value: deserialize(entry.join('='))
});
}
}
}
};
var updateSearchParams = function (query) {
this.entries.length = 0;
parseSearchParams(this.entries, query);
};
var validateArgumentsLength = function (passed, required) {
if (passed < required) throw TypeError('Not enough arguments');
};
var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
setInternalState(this, {
type: URL_SEARCH_PARAMS_ITERATOR,
iterator: getIterator(getInternalParamsState(params).entries),
kind: kind
});
}, 'Iterator', function next() {
var state = getInternalIteratorState(this);
var kind = state.kind;
var step = state.iterator.next();
var entry = step.value;
if (!step.done) {
step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
} return step;
});
// `URLSearchParams` constructor
// https://url.spec.whatwg.org/#interface-urlsearchparams
var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);
var init = arguments.length > 0 ? arguments[0] : undefined;
var that = this;
var entries = [];
var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;
setInternalState(that, {
type: URL_SEARCH_PARAMS,
entries: entries,
updateURL: function () { /* empty */ },
updateSearchParams: updateSearchParams
});
if (init !== undefined) {
if (isObject(init)) {
iteratorMethod = getIteratorMethod(init);
if (typeof iteratorMethod === 'function') {
iterator = iteratorMethod.call(init);
next = iterator.next;
while (!(step = next.call(iterator)).done) {
entryIterator = getIterator(anObject(step.value));
entryNext = entryIterator.next;
if (
(first = entryNext.call(entryIterator)).done ||
(second = entryNext.call(entryIterator)).done ||
!entryNext.call(entryIterator).done
) throw TypeError('Expected sequence with length 2');
entries.push({ key: first.value + '', value: second.value + '' });
}
} else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' });
} else {
parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');
}
}
};
var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
redefineAll(URLSearchParamsPrototype, {
// `URLSearchParams.prototype.appent` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-append
append: function append(name, value) {
validateArgumentsLength(arguments.length, 2);
var state = getInternalParamsState(this);
state.entries.push({ key: name + '', value: value + '' });
state.updateURL();
},
// `URLSearchParams.prototype.delete` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-delete
'delete': function (name) {
validateArgumentsLength(arguments.length, 1);
var state = getInternalParamsState(this);
var entries = state.entries;
var key = name + '';
var index = 0;
while (index < entries.length) {
if (entries[index].key === key) entries.splice(index, 1);
else index++;
}
state.updateURL();
},
// `URLSearchParams.prototype.get` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-get
get: function get(name) {
validateArgumentsLength(arguments.length, 1);
var entries = getInternalParamsState(this).entries;
var key = name + '';
var index = 0;
for (; index < entries.length; index++) {
if (entries[index].key === key) return entries[index].value;
}
return null;
},
// `URLSearchParams.prototype.getAll` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-getall
getAll: function getAll(name) {
validateArgumentsLength(arguments.length, 1);
var entries = getInternalParamsState(this).entries;
var key = name + '';
var result = [];
var index = 0;
for (; index < entries.length; index++) {
if (entries[index].key === key) result.push(entries[index].value);
}
return result;
},
// `URLSearchParams.prototype.has` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-has
has: function has(name) {
validateArgumentsLength(arguments.length, 1);
var entries = getInternalParamsState(this).entries;
var key = name + '';
var index = 0;
while (index < entries.length) {
if (entries[index++].key === key) return true;
}
return false;
},
// `URLSearchParams.prototype.set` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-set
set: function set(name, value) {
validateArgumentsLength(arguments.length, 1);
var state = getInternalParamsState(this);
var entries = state.entries;
var found = false;
var key = name + '';
var val = value + '';
var index = 0;
var entry;
for (; index < entries.length; index++) {
entry = entries[index];
if (entry.key === key) {
if (found) entries.splice(index--, 1);
else {
found = true;
entry.value = val;
}
}
}
if (!found) entries.push({ key: key, value: val });
state.updateURL();
},
// `URLSearchParams.prototype.sort` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-sort
sort: function sort() {
var state = getInternalParamsState(this);
var entries = state.entries;
// Array#sort is not stable in some engines
var slice = entries.slice();
var entry, entriesIndex, sliceIndex;
entries.length = 0;
for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {
entry = slice[sliceIndex];
for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {
if (entries[entriesIndex].key > entry.key) {
entries.splice(entriesIndex, 0, entry);
break;
}
}
if (entriesIndex === sliceIndex) entries.push(entry);
}
state.updateURL();
},
// `URLSearchParams.prototype.forEach` method
forEach: function forEach(callback /* , thisArg */) {
var entries = getInternalParamsState(this).entries;
var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);
var index = 0;
var entry;
while (index < entries.length) {
entry = entries[index++];
boundFunction(entry.value, entry.key, this);
}
},
// `URLSearchParams.prototype.keys` method
keys: function keys() {
return new URLSearchParamsIterator(this, 'keys');
},
// `URLSearchParams.prototype.values` method
values: function values() {
return new URLSearchParamsIterator(this, 'values');
},
// `URLSearchParams.prototype.entries` method
entries: function entries() {
return new URLSearchParamsIterator(this, 'entries');
}
}, { enumerable: true });
// `URLSearchParams.prototype[@@iterator]` method
redefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries);
// `URLSearchParams.prototype.toString` method
// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
redefine(URLSearchParamsPrototype, 'toString', function toString() {
var entries = getInternalParamsState(this).entries;
var result = [];
var index = 0;
var entry;
while (index < entries.length) {
entry = entries[index++];
result.push(serialize(entry.key) + '=' + serialize(entry.value));
} return result.join('&');
}, { enumerable: true });
setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);
$({ global: true, forced: !USE_NATIVE_URL }, {
URLSearchParams: URLSearchParamsConstructor
});
// Wrap `fetch` for correct work with polyfilled `URLSearchParams`
// https://github.com/zloirock/core-js/issues/674
if (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') {
$({ global: true, enumerable: true, forced: true }, {
fetch: function fetch(input /* , init */) {
var args = [input];
var init, body, headers;
if (arguments.length > 1) {
init = arguments[1];
if (isObject(init)) {
body = init.body;
if (classof(body) === URL_SEARCH_PARAMS) {
headers = init.headers ? new Headers(init.headers) : new Headers();
if (!headers.has('content-type')) {
headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
}
init = create(init, {
body: createPropertyDescriptor(0, String(body)),
headers: createPropertyDescriptor(0, headers)
});
}
}
args.push(init);
} return $fetch.apply(this, args);
}
});
}
module.exports = {
URLSearchParams: URLSearchParamsConstructor,
getState: getInternalParamsState
};
},{"../internals/an-instance":4,"../internals/an-object":5,"../internals/classof":10,"../internals/create-iterator-constructor":13,"../internals/create-property-descriptor":15,"../internals/export":21,"../internals/function-bind-context":23,"../internals/get-built-in":24,"../internals/get-iterator":26,"../internals/get-iterator-method":25,"../internals/has":28,"../internals/internal-state":34,"../internals/is-object":37,"../internals/native-url":42,"../internals/object-create":45,"../internals/redefine":59,"../internals/redefine-all":58,"../internals/set-to-string-tag":62,"../internals/well-known-symbol":77,"../modules/es.array.iterator":78}],81:[function(require,module,exports){
'use strict';
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
require('../modules/es.string.iterator');
var $ = require('../internals/export');
var DESCRIPTORS = require('../internals/descriptors');
var USE_NATIVE_URL = require('../internals/native-url');
var global = require('../internals/global');
var defineProperties = require('../internals/object-define-properties');
var redefine = require('../internals/redefine');
var anInstance = require('../internals/an-instance');
var has = require('../internals/has');
var assign = require('../internals/object-assign');
var arrayFrom = require('../internals/array-from');
var codeAt = require('../internals/string-multibyte').codeAt;
var toASCII = require('../internals/string-punycode-to-ascii');
var setToStringTag = require('../internals/set-to-string-tag');
var URLSearchParamsModule = require('../modules/web.url-search-params');
var InternalStateModule = require('../internals/internal-state');
var NativeURL = global.URL;
var URLSearchParams = URLSearchParamsModule.URLSearchParams;
var getInternalSearchParamsState = URLSearchParamsModule.getState;
var setInternalState = InternalStateModule.set;
var getInternalURLState = InternalStateModule.getterFor('URL');
var floor = Math.floor;
var pow = Math.pow;
var INVALID_AUTHORITY = 'Invalid authority';
var INVALID_SCHEME = 'Invalid scheme';
var INVALID_HOST = 'Invalid host';
var INVALID_PORT = 'Invalid port';
var ALPHA = /[A-Za-z]/;
var ALPHANUMERIC = /[\d+\-.A-Za-z]/;
var DIGIT = /\d/;
var HEX_START = /^(0x|0X)/;
var OCT = /^[0-7]+$/;
var DEC = /^\d+$/;
var HEX = /^[\dA-Fa-f]+$/;
// eslint-disable-next-line no-control-regex
var FORBIDDEN_HOST_CODE_POINT = /[\u0000\u0009\u000A\u000D #%/:?@[\\]]/;
// eslint-disable-next-line no-control-regex
var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\u0000\u0009\u000A\u000D #/:?@[\\]]/;
// eslint-disable-next-line no-control-regex
var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g;
// eslint-disable-next-line no-control-regex
var TAB_AND_NEW_LINE = /[\u0009\u000A\u000D]/g;
var EOF;
var parseHost = function (url, input) {
var result, codePoints, index;
if (input.charAt(0) == '[') {
if (input.charAt(input.length - 1) != ']') return INVALID_HOST;
result = parseIPv6(input.slice(1, -1));
if (!result) return INVALID_HOST;
url.host = result;
// opaque host
} else if (!isSpecial(url)) {
if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;
result = '';
codePoints = arrayFrom(input);
for (index = 0; index < codePoints.length; index++) {
result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
}
url.host = result;
} else {
input = toASCII(input);
if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;
result = parseIPv4(input);
if (result === null) return INVALID_HOST;
url.host = result;
}
};
var parseIPv4 = function (input) {
var parts = input.split('.');
var partsLength, numbers, index, part, radix, number, ipv4;
if (parts.length && parts[parts.length - 1] == '') {
parts.pop();
}
partsLength = parts.length;
if (partsLength > 4) return input;
numbers = [];
for (index = 0; index < partsLength; index++) {
part = parts[index];
if (part == '') return input;
radix = 10;
if (part.length > 1 && part.charAt(0) == '0') {
radix = HEX_START.test(part) ? 16 : 8;
part = part.slice(radix == 8 ? 1 : 2);
}
if (part === '') {
number = 0;
} else {
if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;
number = parseInt(part, radix);
}
numbers.push(number);
}
for (index = 0; index < partsLength; index++) {
number = numbers[index];
if (index == partsLength - 1) {
if (number >= pow(256, 5 - partsLength)) return null;
} else if (number > 255) return null;
}
ipv4 = numbers.pop();
for (index = 0; index < numbers.length; index++) {
ipv4 += numbers[index] * pow(256, 3 - index);
}
return ipv4;
};
// eslint-disable-next-line max-statements
var parseIPv6 = function (input) {
var address = [0, 0, 0, 0, 0, 0, 0, 0];
var pieceIndex = 0;
var compress = null;
var pointer = 0;
var value, length, numbersSeen, ipv4Piece, number, swaps, swap;
var char = function () {
return input.charAt(pointer);
};
if (char() == ':') {
if (input.charAt(1) != ':') return;
pointer += 2;
pieceIndex++;
compress = pieceIndex;
}
while (char()) {
if (pieceIndex == 8) return;
if (char() == ':') {
if (compress !== null) return;
pointer++;
pieceIndex++;
compress = pieceIndex;
continue;
}
value = length = 0;
while (length < 4 && HEX.test(char())) {
value = value * 16 + parseInt(char(), 16);
pointer++;
length++;
}
if (char() == '.') {
if (length == 0) return;
pointer -= length;
if (pieceIndex > 6) return;
numbersSeen = 0;
while (char()) {
ipv4Piece = null;
if (numbersSeen > 0) {
if (char() == '.' && numbersSeen < 4) pointer++;
else return;
}
if (!DIGIT.test(char())) return;
while (DIGIT.test(char())) {
number = parseInt(char(), 10);
if (ipv4Piece === null) ipv4Piece = number;
else if (ipv4Piece == 0) return;
else ipv4Piece = ipv4Piece * 10 + number;
if (ipv4Piece > 255) return;
pointer++;
}
address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
numbersSeen++;
if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;
}
if (numbersSeen != 4) return;
break;
} else if (char() == ':') {
pointer++;
if (!char()) return;
} else if (char()) return;
address[pieceIndex++] = value;
}
if (compress !== null) {
swaps = pieceIndex - compress;
pieceIndex = 7;
while (pieceIndex != 0 && swaps > 0) {
swap = address[pieceIndex];
address[pieceIndex--] = address[compress + swaps - 1];
address[compress + --swaps] = swap;
}
} else if (pieceIndex != 8) return;
return address;
};
var findLongestZeroSequence = function (ipv6) {
var maxIndex = null;
var maxLength = 1;
var currStart = null;
var currLength = 0;
var index = 0;
for (; index < 8; index++) {
if (ipv6[index] !== 0) {
if (currLength > maxLength) {
maxIndex = currStart;
maxLength = currLength;
}
currStart = null;
currLength = 0;
} else {
if (currStart === null) currStart = index;
++currLength;
}
}
if (currLength > maxLength) {
maxIndex = currStart;
maxLength = currLength;
}
return maxIndex;
};
var serializeHost = function (host) {
var result, index, compress, ignore0;
// ipv4
if (typeof host == 'number') {
result = [];
for (index = 0; index < 4; index++) {
result.unshift(host % 256);
host = floor(host / 256);
} return result.join('.');
// ipv6
} else if (typeof host == 'object') {
result = '';
compress = findLongestZeroSequence(host);
for (index = 0; index < 8; index++) {
if (ignore0 && host[index] === 0) continue;
if (ignore0) ignore0 = false;
if (compress === index) {
result += index ? ':' : '::';
ignore0 = true;
} else {
result += host[index].toString(16);
if (index < 7) result += ':';
}
}
return '[' + result + ']';
} return host;
};
var C0ControlPercentEncodeSet = {};
var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
' ': 1, '"': 1, '<': 1, '>': 1, '`': 1
});
var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
'#': 1, '?': 1, '{': 1, '}': 1
});
var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
'/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
});
var percentEncode = function (char, set) {
var code = codeAt(char, 0);
return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);
};
var specialSchemes = {
ftp: 21,
file: null,
http: 80,
https: 443,
ws: 80,
wss: 443
};
var isSpecial = function (url) {
return has(specialSchemes, url.scheme);
};
var includesCredentials = function (url) {
return url.username != '' || url.password != '';
};
var cannotHaveUsernamePasswordPort = function (url) {
return !url.host || url.cannotBeABaseURL || url.scheme == 'file';
};
var isWindowsDriveLetter = function (string, normalized) {
var second;
return string.length == 2 && ALPHA.test(string.charAt(0))
&& ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));
};
var startsWithWindowsDriveLetter = function (string) {
var third;
return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (
string.length == 2 ||
((third = string.charAt(2)) === '/' || third === '\\' || third === '?' || third === '#')
);
};
var shortenURLsPath = function (url) {
var path = url.path;
var pathSize = path.length;
if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {
path.pop();
}
};
var isSingleDot = function (segment) {
return segment === '.' || segment.toLowerCase() === '%2e';
};
var isDoubleDot = function (segment) {
segment = segment.toLowerCase();
return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';
};
// States:
var SCHEME_START = {};
var SCHEME = {};
var NO_SCHEME = {};
var SPECIAL_RELATIVE_OR_AUTHORITY = {};
var PATH_OR_AUTHORITY = {};
var RELATIVE = {};
var RELATIVE_SLASH = {};
var SPECIAL_AUTHORITY_SLASHES = {};
var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};
var AUTHORITY = {};
var HOST = {};
var HOSTNAME = {};
var PORT = {};
var FILE = {};
var FILE_SLASH = {};
var FILE_HOST = {};
var PATH_START = {};
var PATH = {};
var CANNOT_BE_A_BASE_URL_PATH = {};
var QUERY = {};
var FRAGMENT = {};
// eslint-disable-next-line max-statements
var parseURL = function (url, input, stateOverride, base) {
var state = stateOverride || SCHEME_START;
var pointer = 0;
var buffer = '';
var seenAt = false;
var seenBracket = false;
var seenPasswordToken = false;
var codePoints, char, bufferCodePoints, failure;
if (!stateOverride) {
url.scheme = '';
url.username = '';
url.password = '';
url.host = null;
url.port = null;
url.path = [];
url.query = null;
url.fragment = null;
url.cannotBeABaseURL = false;
input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');
}
input = input.replace(TAB_AND_NEW_LINE, '');
codePoints = arrayFrom(input);
while (pointer <= codePoints.length) {
char = codePoints[pointer];
switch (state) {
case SCHEME_START:
if (char && ALPHA.test(char)) {
buffer += char.toLowerCase();
state = SCHEME;
} else if (!stateOverride) {
state = NO_SCHEME;
continue;
} else return INVALID_SCHEME;
break;
case SCHEME:
if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {
buffer += char.toLowerCase();
} else if (char == ':') {
if (stateOverride && (
(isSpecial(url) != has(specialSchemes, buffer)) ||
(buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||
(url.scheme == 'file' && !url.host)
)) return;
url.scheme = buffer;
if (stateOverride) {
if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;
return;
}
buffer = '';
if (url.scheme == 'file') {
state = FILE;
} else if (isSpecial(url) && base && base.scheme == url.scheme) {
state = SPECIAL_RELATIVE_OR_AUTHORITY;
} else if (isSpecial(url)) {
state = SPECIAL_AUTHORITY_SLASHES;
} else if (codePoints[pointer + 1] == '/') {
state = PATH_OR_AUTHORITY;
pointer++;
} else {
url.cannotBeABaseURL = true;
url.path.push('');
state = CANNOT_BE_A_BASE_URL_PATH;
}
} else if (!stateOverride) {
buffer = '';
state = NO_SCHEME;
pointer = 0;
continue;
} else return INVALID_SCHEME;
break;
case NO_SCHEME:
if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME;
if (base.cannotBeABaseURL && char == '#') {
url.scheme = base.scheme;
url.path = base.path.slice();
url.query = base.query;
url.fragment = '';
url.cannotBeABaseURL = true;
state = FRAGMENT;
break;
}
state = base.scheme == 'file' ? FILE : RELATIVE;
continue;
case SPECIAL_RELATIVE_OR_AUTHORITY:
if (char == '/' && codePoints[pointer + 1] == '/') {
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
pointer++;
} else {
state = RELATIVE;
continue;
} break;
case PATH_OR_AUTHORITY:
if (char == '/') {
state = AUTHORITY;
break;
} else {
state = PATH;
continue;
}
case RELATIVE:
url.scheme = base.scheme;
if (char == EOF) {
url.username = base.username;
url.password = base.password;
url.host = base.host;
url.port = base.port;
url.path = base.path.slice();
url.query = base.query;
} else if (char == '/' || (char == '\\' && isSpecial(url))) {
state = RELATIVE_SLASH;
} else if (char == '?') {
url.username = base.username;
url.password = base.password;
url.host = base.host;
url.port = base.port;
url.path = base.path.slice();
url.query = '';
state = QUERY;
} else if (char == '#') {
url.username = base.username;
url.password = base.password;
url.host = base.host;
url.port = base.port;
url.path = base.path.slice();
url.query = base.query;
url.fragment = '';
state = FRAGMENT;
} else {
url.username = base.username;
url.password = base.password;
url.host = base.host;
url.port = base.port;
url.path = base.path.slice();
url.path.pop();
state = PATH;
continue;
} break;
case RELATIVE_SLASH:
if (isSpecial(url) && (char == '/' || char == '\\')) {
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
} else if (char == '/') {
state = AUTHORITY;
} else {
url.username = base.username;
url.password = base.password;
url.host = base.host;
url.port = base.port;
state = PATH;
continue;
} break;
case SPECIAL_AUTHORITY_SLASHES:
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
if (char != '/' || buffer.charAt(pointer + 1) != '/') continue;
pointer++;
break;
case SPECIAL_AUTHORITY_IGNORE_SLASHES:
if (char != '/' && char != '\\') {
state = AUTHORITY;
continue;
} break;
case AUTHORITY:
if (char == '@') {
if (seenAt) buffer = '%40' + buffer;
seenAt = true;
bufferCodePoints = arrayFrom(buffer);
for (var i = 0; i < bufferCodePoints.length; i++) {
var codePoint = bufferCodePoints[i];
if (codePoint == ':' && !seenPasswordToken) {
seenPasswordToken = true;
continue;
}
var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);
if (seenPasswordToken) url.password += encodedCodePoints;
else url.username += encodedCodePoints;
}
buffer = '';
} else if (
char == EOF || char == '/' || char == '?' || char == '#' ||
(char == '\\' && isSpecial(url))
) {
if (seenAt && buffer == '') return INVALID_AUTHORITY;
pointer -= arrayFrom(buffer).length + 1;
buffer = '';
state = HOST;
} else buffer += char;
break;
case HOST:
case HOSTNAME:
if (stateOverride && url.scheme == 'file') {
state = FILE_HOST;
continue;
} else if (char == ':' && !seenBracket) {
if (buffer == '') return INVALID_HOST;
failure = parseHost(url, buffer);
if (failure) return failure;
buffer = '';
state = PORT;
if (stateOverride == HOSTNAME) return;
} else if (
char == EOF || char == '/' || char == '?' || char == '#' ||
(char == '\\' && isSpecial(url))
) {
if (isSpecial(url) && buffer == '') return INVALID_HOST;
if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;
failure = parseHost(url, buffer);
if (failure) return failure;
buffer = '';
state = PATH_START;
if (stateOverride) return;
continue;
} else {
if (char == '[') seenBracket = true;
else if (char == ']') seenBracket = false;
buffer += char;
} break;
case PORT:
if (DIGIT.test(char)) {
buffer += char;
} else if (
char == EOF || char == '/' || char == '?' || char == '#' ||
(char == '\\' && isSpecial(url)) ||
stateOverride
) {
if (buffer != '') {
var port = parseInt(buffer, 10);
if (port > 0xFFFF) return INVALID_PORT;
url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;
buffer = '';
}
if (stateOverride) return;
state = PATH_START;
continue;
} else return INVALID_PORT;
break;
case FILE:
url.scheme = 'file';
if (char == '/' || char == '\\') state = FILE_SLASH;
else if (base && base.scheme == 'file') {
if (char == EOF) {
url.host = base.host;
url.path = base.path.slice();
url.query = base.query;
} else if (char == '?') {
url.host = base.host;
url.path = base.path.slice();
url.query = '';
state = QUERY;
} else if (char == '#') {
url.host = base.host;
url.path = base.path.slice();
url.query = base.query;
url.fragment = '';
state = FRAGMENT;
} else {
if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
url.host = base.host;
url.path = base.path.slice();
shortenURLsPath(url);
}
state = PATH;
continue;
}
} else {
state = PATH;
continue;
} break;
case FILE_SLASH:
if (char == '/' || char == '\\') {
state = FILE_HOST;
break;
}
if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);
else url.host = base.host;
}
state = PATH;
continue;
case FILE_HOST:
if (char == EOF || char == '/' || char == '\\' || char == '?' || char == '#') {
if (!stateOverride && isWindowsDriveLetter(buffer)) {
state = PATH;
} else if (buffer == '') {
url.host = '';
if (stateOverride) return;
state = PATH_START;
} else {
failure = parseHost(url, buffer);
if (failure) return failure;
if (url.host == 'localhost') url.host = '';
if (stateOverride) return;
buffer = '';
state = PATH_START;
} continue;
} else buffer += char;
break;
case PATH_START:
if (isSpecial(url)) {
state = PATH;
if (char != '/' && char != '\\') continue;
} else if (!stateOverride && char == '?') {
url.query = '';
state = QUERY;
} else if (!stateOverride && char == '#') {
url.fragment = '';
state = FRAGMENT;
} else if (char != EOF) {
state = PATH;
if (char != '/') continue;
} break;
case PATH:
if (
char == EOF || char == '/' ||
(char == '\\' && isSpecial(url)) ||
(!stateOverride && (char == '?' || char == '#'))
) {
if (isDoubleDot(buffer)) {
shortenURLsPath(url);
if (char != '/' && !(char == '\\' && isSpecial(url))) {
url.path.push('');
}
} else if (isSingleDot(buffer)) {
if (char != '/' && !(char == '\\' && isSpecial(url))) {
url.path.push('');
}
} else {
if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
if (url.host) url.host = '';
buffer = buffer.charAt(0) + ':'; // normalize windows drive letter
}
url.path.push(buffer);
}
buffer = '';
if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {
while (url.path.length > 1 && url.path[0] === '') {
url.path.shift();
}
}
if (char == '?') {
url.query = '';
state = QUERY;
} else if (char == '#') {
url.fragment = '';
state = FRAGMENT;
}
} else {
buffer += percentEncode(char, pathPercentEncodeSet);
} break;
case CANNOT_BE_A_BASE_URL_PATH:
if (char == '?') {
url.query = '';
state = QUERY;
} else if (char == '#') {
url.fragment = '';
state = FRAGMENT;
} else if (char != EOF) {
url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);
} break;
case QUERY:
if (!stateOverride && char == '#') {
url.fragment = '';
state = FRAGMENT;
} else if (char != EOF) {
if (char == "'" && isSpecial(url)) url.query += '%27';
else if (char == '#') url.query += '%23';
else url.query += percentEncode(char, C0ControlPercentEncodeSet);
} break;
case FRAGMENT:
if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);
break;
}
pointer++;
}
};
// `URL` constructor
// https://url.spec.whatwg.org/#url-class
var URLConstructor = function URL(url /* , base */) {
var that = anInstance(this, URLConstructor, 'URL');
var base = arguments.length > 1 ? arguments[1] : undefined;
var urlString = String(url);
var state = setInternalState(that, { type: 'URL' });
var baseState, failure;
if (base !== undefined) {
if (base instanceof URLConstructor) baseState = getInternalURLState(base);
else {
failure = parseURL(baseState = {}, String(base));
if (failure) throw TypeError(failure);
}
}
failure = parseURL(state, urlString, null, baseState);
if (failure) throw TypeError(failure);
var searchParams = state.searchParams = new URLSearchParams();
var searchParamsState = getInternalSearchParamsState(searchParams);
searchParamsState.updateSearchParams(state.query);
searchParamsState.updateURL = function () {
state.query = String(searchParams) || null;
};
if (!DESCRIPTORS) {
that.href = serializeURL.call(that);
that.origin = getOrigin.call(that);
that.protocol = getProtocol.call(that);
that.username = getUsername.call(that);
that.password = getPassword.call(that);
that.host = getHost.call(that);
that.hostname = getHostname.call(that);
that.port = getPort.call(that);
that.pathname = getPathname.call(that);
that.search = getSearch.call(that);
that.searchParams = getSearchParams.call(that);
that.hash = getHash.call(that);
}
};
var URLPrototype = URLConstructor.prototype;
var serializeURL = function () {
var url = getInternalURLState(this);
var scheme = url.scheme;
var username = url.username;
var password = url.password;
var host = url.host;
var port = url.port;
var path = url.path;
var query = url.query;
var fragment = url.fragment;
var output = scheme + ':';
if (host !== null) {
output += '//';
if (includesCredentials(url)) {
output += username + (password ? ':' + password : '') + '@';
}
output += serializeHost(host);
if (port !== null) output += ':' + port;
} else if (scheme == 'file') output += '//';
output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
if (query !== null) output += '?' + query;
if (fragment !== null) output += '#' + fragment;
return output;
};
var getOrigin = function () {
var url = getInternalURLState(this);
var scheme = url.scheme;
var port = url.port;
if (scheme == 'blob') try {
return new URL(scheme.path[0]).origin;
} catch (error) {
return 'null';
}
if (scheme == 'file' || !isSpecial(url)) return 'null';
return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');
};
var getProtocol = function () {
return getInternalURLState(this).scheme + ':';
};
var getUsername = function () {
return getInternalURLState(this).username;
};
var getPassword = function () {
return getInternalURLState(this).password;
};
var getHost = function () {
var url = getInternalURLState(this);
var host = url.host;
var port = url.port;
return host === null ? ''
: port === null ? serializeHost(host)
: serializeHost(host) + ':' + port;
};
var getHostname = function () {
var host = getInternalURLState(this).host;
return host === null ? '' : serializeHost(host);
};
var getPort = function () {
var port = getInternalURLState(this).port;
return port === null ? '' : String(port);
};
var getPathname = function () {
var url = getInternalURLState(this);
var path = url.path;
return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
};
var getSearch = function () {
var query = getInternalURLState(this).query;
return query ? '?' + query : '';
};
var getSearchParams = function () {
return getInternalURLState(this).searchParams;
};
var getHash = function () {
var fragment = getInternalURLState(this).fragment;
return fragment ? '#' + fragment : '';
};
var accessorDescriptor = function (getter, setter) {
return { get: getter, set: setter, configurable: true, enumerable: true };
};
if (DESCRIPTORS) {
defineProperties(URLPrototype, {
// `URL.prototype.href` accessors pair
// https://url.spec.whatwg.org/#dom-url-href
href: accessorDescriptor(serializeURL, function (href) {
var url = getInternalURLState(this);
var urlString = String(href);
var failure = parseURL(url, urlString);
if (failure) throw TypeError(failure);
getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
}),
// `URL.prototype.origin` getter
// https://url.spec.whatwg.org/#dom-url-origin
origin: accessorDescriptor(getOrigin),
// `URL.prototype.protocol` accessors pair
// https://url.spec.whatwg.org/#dom-url-protocol
protocol: accessorDescriptor(getProtocol, function (protocol) {
var url = getInternalURLState(this);
parseURL(url, String(protocol) + ':', SCHEME_START);
}),
// `URL.prototype.username` accessors pair
// https://url.spec.whatwg.org/#dom-url-username
username: accessorDescriptor(getUsername, function (username) {
var url = getInternalURLState(this);
var codePoints = arrayFrom(String(username));
if (cannotHaveUsernamePasswordPort(url)) return;
url.username = '';
for (var i = 0; i < codePoints.length; i++) {
url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);
}
}),
// `URL.prototype.password` accessors pair
// https://url.spec.whatwg.org/#dom-url-password
password: accessorDescriptor(getPassword, function (password) {
var url = getInternalURLState(this);
var codePoints = arrayFrom(String(password));
if (cannotHaveUsernamePasswordPort(url)) return;
url.password = '';
for (var i = 0; i < codePoints.length; i++) {
url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);
}
}),
// `URL.prototype.host` accessors pair
// https://url.spec.whatwg.org/#dom-url-host
host: accessorDescriptor(getHost, function (host) {
var url = getInternalURLState(this);
if (url.cannotBeABaseURL) return;
parseURL(url, String(host), HOST);
}),
// `URL.prototype.hostname` accessors pair
// https://url.spec.whatwg.org/#dom-url-hostname
hostname: accessorDescriptor(getHostname, function (hostname) {
var url = getInternalURLState(this);
if (url.cannotBeABaseURL) return;
parseURL(url, String(hostname), HOSTNAME);
}),
// `URL.prototype.port` accessors pair
// https://url.spec.whatwg.org/#dom-url-port
port: accessorDescriptor(getPort, function (port) {
var url = getInternalURLState(this);
if (cannotHaveUsernamePasswordPort(url)) return;
port = String(port);
if (port == '') url.port = null;
else parseURL(url, port, PORT);
}),
// `URL.prototype.pathname` accessors pair
// https://url.spec.whatwg.org/#dom-url-pathname
pathname: accessorDescriptor(getPathname, function (pathname) {
var url = getInternalURLState(this);
if (url.cannotBeABaseURL) return;
url.path = [];
parseURL(url, pathname + '', PATH_START);
}),
// `URL.prototype.search` accessors pair
// https://url.spec.whatwg.org/#dom-url-search
search: accessorDescriptor(getSearch, function (search) {
var url = getInternalURLState(this);
search = String(search);
if (search == '') {
url.query = null;
} else {
if ('?' == search.charAt(0)) search = search.slice(1);
url.query = '';
parseURL(url, search, QUERY);
}
getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
}),
// `URL.prototype.searchParams` getter
// https://url.spec.whatwg.org/#dom-url-searchparams
searchParams: accessorDescriptor(getSearchParams),
// `URL.prototype.hash` accessors pair
// https://url.spec.whatwg.org/#dom-url-hash
hash: accessorDescriptor(getHash, function (hash) {
var url = getInternalURLState(this);
hash = String(hash);
if (hash == '') {
url.fragment = null;
return;
}
if ('#' == hash.charAt(0)) hash = hash.slice(1);
url.fragment = '';
parseURL(url, hash, FRAGMENT);
})
});
}
// `URL.prototype.toJSON` method
// https://url.spec.whatwg.org/#dom-url-tojson
redefine(URLPrototype, 'toJSON', function toJSON() {
return serializeURL.call(this);
}, { enumerable: true });
// `URL.prototype.toString` method
// https://url.spec.whatwg.org/#URL-stringification-behavior
redefine(URLPrototype, 'toString', function toString() {
return serializeURL.call(this);
}, { enumerable: true });
if (NativeURL) {
var nativeCreateObjectURL = NativeURL.createObjectURL;
var nativeRevokeObjectURL = NativeURL.revokeObjectURL;
// `URL.createObjectURL` method
// https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
// eslint-disable-next-line no-unused-vars
if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {
return nativeCreateObjectURL.apply(NativeURL, arguments);
});
// `URL.revokeObjectURL` method
// https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
// eslint-disable-next-line no-unused-vars
if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {
return nativeRevokeObjectURL.apply(NativeURL, arguments);
});
}
setToStringTag(URLConstructor, 'URL');
$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
URL: URLConstructor
});
},{"../internals/an-instance":4,"../internals/array-from":6,"../internals/descriptors":18,"../internals/export":21,"../internals/global":27,"../internals/has":28,"../internals/internal-state":34,"../internals/native-url":42,"../internals/object-assign":44,"../internals/object-define-properties":46,"../internals/redefine":59,"../internals/set-to-string-tag":62,"../internals/string-multibyte":66,"../internals/string-punycode-to-ascii":67,"../modules/es.string.iterator":79,"../modules/web.url-search-params":80}],82:[function(require,module,exports){
'use strict';
var $ = require('../internals/export');
// `URL.prototype.toJSON` method
// https://url.spec.whatwg.org/#dom-url-tojson
$({ target: 'URL', proto: true, enumerable: true }, {
toJSON: function toJSON() {
return URL.prototype.toString.call(this);
}
});
},{"../internals/export":21}],83:[function(require,module,exports){
require('../modules/web.url');
require('../modules/web.url.to-json');
require('../modules/web.url-search-params');
var path = require('../internals/path');
module.exports = path.URL;
},{"../internals/path":57,"../modules/web.url":81,"../modules/web.url-search-params":80,"../modules/web.url.to-json":82}]},{},[83]);
wp-polyfill-url.min.js 0000644 00000133743 15153765740 0010772 0 ustar 00 !function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[o]={exports:{}};t[o][0].call(u.exports,(function(e){return i(t[o][1][e]||e)}),u,u.exports,e,t,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){t.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},{}],2:[function(e,t,n){var r=e("../internals/is-object");t.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},{"../internals/is-object":37}],3:[function(e,t,n){var r=e("../internals/well-known-symbol"),i=e("../internals/object-create"),a=e("../internals/object-define-property"),o=r("unscopables"),s=Array.prototype;null==s[o]&&a.f(s,o,{configurable:!0,value:i(null)}),t.exports=function(e){s[o][e]=!0}},{"../internals/object-create":45,"../internals/object-define-property":47,"../internals/well-known-symbol":77}],4:[function(e,t,n){t.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},{}],5:[function(e,t,n){var r=e("../internals/is-object");t.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},{"../internals/is-object":37}],6:[function(e,t,n){"use strict";var r=e("../internals/function-bind-context"),i=e("../internals/to-object"),a=e("../internals/call-with-safe-iteration-closing"),o=e("../internals/is-array-iterator-method"),s=e("../internals/to-length"),l=e("../internals/create-property"),c=e("../internals/get-iterator-method");t.exports=function(e){var t,n,u,f,p,h,b=i(e),d="function"==typeof this?this:Array,y=arguments.length,g=y>1?arguments[1]:void 0,v=void 0!==g,m=c(b),w=0;if(v&&(g=r(g,y>2?arguments[2]:void 0,2)),null==m||d==Array&&o(m))for(n=new d(t=s(b.length));t>w;w++)h=v?g(b[w],w):b[w],l(n,w,h);else for(p=(f=m.call(b)).next,n=new d;!(u=p.call(f)).done;w++)h=v?a(f,g,[u.value,w],!0):u.value,l(n,w,h);return n.length=w,n}},{"../internals/call-with-safe-iteration-closing":8,"../internals/create-property":16,"../internals/function-bind-context":23,"../internals/get-iterator-method":25,"../internals/is-array-iterator-method":35,"../internals/to-length":71,"../internals/to-object":72}],7:[function(e,t,n){var r=e("../internals/to-indexed-object"),i=e("../internals/to-length"),a=e("../internals/to-absolute-index"),o=function(e){return function(t,n,o){var s,l=r(t),c=i(l.length),u=a(o,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},{"../internals/to-absolute-index":68,"../internals/to-indexed-object":69,"../internals/to-length":71}],8:[function(e,t,n){var r=e("../internals/an-object");t.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&r(a.call(e)),t}}},{"../internals/an-object":5}],9:[function(e,t,n){var r={}.toString;t.exports=function(e){return r.call(e).slice(8,-1)}},{}],10:[function(e,t,n){var r=e("../internals/to-string-tag-support"),i=e("../internals/classof-raw"),a=e("../internals/well-known-symbol")("toStringTag"),o="Arguments"==i(function(){return arguments}());t.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),a))?n:o?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},{"../internals/classof-raw":9,"../internals/to-string-tag-support":74,"../internals/well-known-symbol":77}],11:[function(e,t,n){var r=e("../internals/has"),i=e("../internals/own-keys"),a=e("../internals/object-get-own-property-descriptor"),o=e("../internals/object-define-property");t.exports=function(e,t){for(var n=i(t),s=o.f,l=a.f,c=0;c<n.length;c++){var u=n[c];r(e,u)||s(e,u,l(t,u))}}},{"../internals/has":28,"../internals/object-define-property":47,"../internals/object-get-own-property-descriptor":48,"../internals/own-keys":56}],12:[function(e,t,n){var r=e("../internals/fails");t.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},{"../internals/fails":22}],13:[function(e,t,n){"use strict";var r=e("../internals/iterators-core").IteratorPrototype,i=e("../internals/object-create"),a=e("../internals/create-property-descriptor"),o=e("../internals/set-to-string-tag"),s=e("../internals/iterators"),l=function(){return this};t.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=i(r,{next:a(1,n)}),o(e,c,!1,!0),s[c]=l,e}},{"../internals/create-property-descriptor":15,"../internals/iterators":40,"../internals/iterators-core":39,"../internals/object-create":45,"../internals/set-to-string-tag":62}],14:[function(e,t,n){var r=e("../internals/descriptors"),i=e("../internals/object-define-property"),a=e("../internals/create-property-descriptor");t.exports=r?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},{"../internals/create-property-descriptor":15,"../internals/descriptors":18,"../internals/object-define-property":47}],15:[function(e,t,n){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],16:[function(e,t,n){"use strict";var r=e("../internals/to-primitive"),i=e("../internals/object-define-property"),a=e("../internals/create-property-descriptor");t.exports=function(e,t,n){var o=r(t);o in e?i.f(e,o,a(0,n)):e[o]=n}},{"../internals/create-property-descriptor":15,"../internals/object-define-property":47,"../internals/to-primitive":73}],17:[function(e,t,n){"use strict";var r=e("../internals/export"),i=e("../internals/create-iterator-constructor"),a=e("../internals/object-get-prototype-of"),o=e("../internals/object-set-prototype-of"),s=e("../internals/set-to-string-tag"),l=e("../internals/create-non-enumerable-property"),c=e("../internals/redefine"),u=e("../internals/well-known-symbol"),f=e("../internals/is-pure"),p=e("../internals/iterators"),h=e("../internals/iterators-core"),b=h.IteratorPrototype,d=h.BUGGY_SAFARI_ITERATORS,y=u("iterator"),g=function(){return this};t.exports=function(e,t,n,u,h,v,m){i(n,t,u);var w,j,x,k=function(e){if(e===h&&L)return L;if(!d&&e in O)return O[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},S=t+" Iterator",A=!1,O=e.prototype,R=O[y]||O["@@iterator"]||h&&O[h],L=!d&&R||k(h),U="Array"==t&&O.entries||R;if(U&&(w=a(U.call(new e)),b!==Object.prototype&&w.next&&(f||a(w)===b||(o?o(w,b):"function"!=typeof w[y]&&l(w,y,g)),s(w,S,!0,!0),f&&(p[S]=g))),"values"==h&&R&&"values"!==R.name&&(A=!0,L=function(){return R.call(this)}),f&&!m||O[y]===L||l(O,y,L),p[t]=L,h)if(j={values:k("values"),keys:v?L:k("keys"),entries:k("entries")},m)for(x in j)!d&&!A&&x in O||c(O,x,j[x]);else r({target:t,proto:!0,forced:d||A},j);return j}},{"../internals/create-iterator-constructor":13,"../internals/create-non-enumerable-property":14,"../internals/export":21,"../internals/is-pure":38,"../internals/iterators":40,"../internals/iterators-core":39,"../internals/object-get-prototype-of":51,"../internals/object-set-prototype-of":55,"../internals/redefine":59,"../internals/set-to-string-tag":62,"../internals/well-known-symbol":77}],18:[function(e,t,n){var r=e("../internals/fails");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},{"../internals/fails":22}],19:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/is-object"),a=r.document,o=i(a)&&i(a.createElement);t.exports=function(e){return o?a.createElement(e):{}}},{"../internals/global":27,"../internals/is-object":37}],20:[function(e,t,n){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],21:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/object-get-own-property-descriptor").f,a=e("../internals/create-non-enumerable-property"),o=e("../internals/redefine"),s=e("../internals/set-global"),l=e("../internals/copy-constructor-properties"),c=e("../internals/is-forced");t.exports=function(e,t){var n,u,f,p,h,b=e.target,d=e.global,y=e.stat;if(n=d?r:y?r[b]||s(b,{}):(r[b]||{}).prototype)for(u in t){if(p=t[u],f=e.noTargetGet?(h=i(n,u))&&h.value:n[u],!c(d?u:b+(y?".":"#")+u,e.forced)&&void 0!==f){if(typeof p==typeof f)continue;l(p,f)}(e.sham||f&&f.sham)&&a(p,"sham",!0),o(n,u,p,e)}}},{"../internals/copy-constructor-properties":11,"../internals/create-non-enumerable-property":14,"../internals/global":27,"../internals/is-forced":36,"../internals/object-get-own-property-descriptor":48,"../internals/redefine":59,"../internals/set-global":61}],22:[function(e,t,n){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],23:[function(e,t,n){var r=e("../internals/a-function");t.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},{"../internals/a-function":1}],24:[function(e,t,n){var r=e("../internals/path"),i=e("../internals/global"),a=function(e){return"function"==typeof e?e:void 0};t.exports=function(e,t){return arguments.length<2?a(r[e])||a(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},{"../internals/global":27,"../internals/path":57}],25:[function(e,t,n){var r=e("../internals/classof"),i=e("../internals/iterators"),a=e("../internals/well-known-symbol")("iterator");t.exports=function(e){if(null!=e)return e[a]||e["@@iterator"]||i[r(e)]}},{"../internals/classof":10,"../internals/iterators":40,"../internals/well-known-symbol":77}],26:[function(e,t,n){var r=e("../internals/an-object"),i=e("../internals/get-iterator-method");t.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return r(t.call(e))}},{"../internals/an-object":5,"../internals/get-iterator-method":25}],27:[function(e,t,n){(function(e){var n=function(e){return e&&e.Math==Math&&e};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],28:[function(e,t,n){var r={}.hasOwnProperty;t.exports=function(e,t){return r.call(e,t)}},{}],29:[function(e,t,n){t.exports={}},{}],30:[function(e,t,n){var r=e("../internals/get-built-in");t.exports=r("document","documentElement")},{"../internals/get-built-in":24}],31:[function(e,t,n){var r=e("../internals/descriptors"),i=e("../internals/fails"),a=e("../internals/document-create-element");t.exports=!r&&!i((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},{"../internals/descriptors":18,"../internals/document-create-element":19,"../internals/fails":22}],32:[function(e,t,n){var r=e("../internals/fails"),i=e("../internals/classof-raw"),a="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?a.call(e,""):Object(e)}:Object},{"../internals/classof-raw":9,"../internals/fails":22}],33:[function(e,t,n){var r=e("../internals/shared-store"),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),t.exports=r.inspectSource},{"../internals/shared-store":64}],34:[function(e,t,n){var r,i,a,o=e("../internals/native-weak-map"),s=e("../internals/global"),l=e("../internals/is-object"),c=e("../internals/create-non-enumerable-property"),u=e("../internals/has"),f=e("../internals/shared-key"),p=e("../internals/hidden-keys"),h=s.WeakMap;if(o){var b=new h,d=b.get,y=b.has,g=b.set;r=function(e,t){return g.call(b,e,t),t},i=function(e){return d.call(b,e)||{}},a=function(e){return y.call(b,e)}}else{var v=f("state");p[v]=!0,r=function(e,t){return c(e,v,t),t},i=function(e){return u(e,v)?e[v]:{}},a=function(e){return u(e,v)}}t.exports={set:r,get:i,has:a,enforce:function(e){return a(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},{"../internals/create-non-enumerable-property":14,"../internals/global":27,"../internals/has":28,"../internals/hidden-keys":29,"../internals/is-object":37,"../internals/native-weak-map":43,"../internals/shared-key":63}],35:[function(e,t,n){var r=e("../internals/well-known-symbol"),i=e("../internals/iterators"),a=r("iterator"),o=Array.prototype;t.exports=function(e){return void 0!==e&&(i.Array===e||o[a]===e)}},{"../internals/iterators":40,"../internals/well-known-symbol":77}],36:[function(e,t,n){var r=e("../internals/fails"),i=/#|\.prototype\./,a=function(e,t){var n=s[o(e)];return n==c||n!=l&&("function"==typeof t?r(t):!!t)},o=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=a.data={},l=a.NATIVE="N",c=a.POLYFILL="P";t.exports=a},{"../internals/fails":22}],37:[function(e,t,n){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],38:[function(e,t,n){t.exports=!1},{}],39:[function(e,t,n){"use strict";var r,i,a,o=e("../internals/object-get-prototype-of"),s=e("../internals/create-non-enumerable-property"),l=e("../internals/has"),c=e("../internals/well-known-symbol"),u=e("../internals/is-pure"),f=c("iterator"),p=!1;[].keys&&("next"in(a=[].keys())?(i=o(o(a)))!==Object.prototype&&(r=i):p=!0),null==r&&(r={}),u||l(r,f)||s(r,f,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},{"../internals/create-non-enumerable-property":14,"../internals/has":28,"../internals/is-pure":38,"../internals/object-get-prototype-of":51,"../internals/well-known-symbol":77}],40:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{dup:29}],41:[function(e,t,n){var r=e("../internals/fails");t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},{"../internals/fails":22}],42:[function(e,t,n){var r=e("../internals/fails"),i=e("../internals/well-known-symbol"),a=e("../internals/is-pure"),o=i("iterator");t.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),a&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[o]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},{"../internals/fails":22,"../internals/is-pure":38,"../internals/well-known-symbol":77}],43:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/inspect-source"),a=r.WeakMap;t.exports="function"==typeof a&&/native code/.test(i(a))},{"../internals/global":27,"../internals/inspect-source":33}],44:[function(e,t,n){"use strict";var r=e("../internals/descriptors"),i=e("../internals/fails"),a=e("../internals/object-keys"),o=e("../internals/object-get-own-property-symbols"),s=e("../internals/object-property-is-enumerable"),l=e("../internals/to-object"),c=e("../internals/indexed-object"),u=Object.assign,f=Object.defineProperty;t.exports=!u||i((function(){if(r&&1!==u({b:1},u(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||"abcdefghijklmnopqrst"!=a(u({},t)).join("")}))?function(e,t){for(var n=l(e),i=arguments.length,u=1,f=o.f,p=s.f;i>u;)for(var h,b=c(arguments[u++]),d=f?a(b).concat(f(b)):a(b),y=d.length,g=0;y>g;)h=d[g++],r&&!p.call(b,h)||(n[h]=b[h]);return n}:u},{"../internals/descriptors":18,"../internals/fails":22,"../internals/indexed-object":32,"../internals/object-get-own-property-symbols":50,"../internals/object-keys":53,"../internals/object-property-is-enumerable":54,"../internals/to-object":72}],45:[function(e,t,n){var r,i=e("../internals/an-object"),a=e("../internals/object-define-properties"),o=e("../internals/enum-bug-keys"),s=e("../internals/hidden-keys"),l=e("../internals/html"),c=e("../internals/document-create-element"),u=e("../internals/shared-key")("IE_PROTO"),f=function(){},p=function(e){return"<script>"+e+"<\/script>"},h=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;h=r?function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=c("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F);for(var n=o.length;n--;)delete h.prototype[o[n]];return h()};s[u]=!0,t.exports=Object.create||function(e,t){var n;return null!==e?(f.prototype=i(e),n=new f,f.prototype=null,n[u]=e):n=h(),void 0===t?n:a(n,t)}},{"../internals/an-object":5,"../internals/document-create-element":19,"../internals/enum-bug-keys":20,"../internals/hidden-keys":29,"../internals/html":30,"../internals/object-define-properties":46,"../internals/shared-key":63}],46:[function(e,t,n){var r=e("../internals/descriptors"),i=e("../internals/object-define-property"),a=e("../internals/an-object"),o=e("../internals/object-keys");t.exports=r?Object.defineProperties:function(e,t){a(e);for(var n,r=o(t),s=r.length,l=0;s>l;)i.f(e,n=r[l++],t[n]);return e}},{"../internals/an-object":5,"../internals/descriptors":18,"../internals/object-define-property":47,"../internals/object-keys":53}],47:[function(e,t,n){var r=e("../internals/descriptors"),i=e("../internals/ie8-dom-define"),a=e("../internals/an-object"),o=e("../internals/to-primitive"),s=Object.defineProperty;n.f=r?s:function(e,t,n){if(a(e),t=o(t,!0),a(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},{"../internals/an-object":5,"../internals/descriptors":18,"../internals/ie8-dom-define":31,"../internals/to-primitive":73}],48:[function(e,t,n){var r=e("../internals/descriptors"),i=e("../internals/object-property-is-enumerable"),a=e("../internals/create-property-descriptor"),o=e("../internals/to-indexed-object"),s=e("../internals/to-primitive"),l=e("../internals/has"),c=e("../internals/ie8-dom-define"),u=Object.getOwnPropertyDescriptor;n.f=r?u:function(e,t){if(e=o(e),t=s(t,!0),c)try{return u(e,t)}catch(e){}if(l(e,t))return a(!i.f.call(e,t),e[t])}},{"../internals/create-property-descriptor":15,"../internals/descriptors":18,"../internals/has":28,"../internals/ie8-dom-define":31,"../internals/object-property-is-enumerable":54,"../internals/to-indexed-object":69,"../internals/to-primitive":73}],49:[function(e,t,n){var r=e("../internals/object-keys-internal"),i=e("../internals/enum-bug-keys").concat("length","prototype");n.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},{"../internals/enum-bug-keys":20,"../internals/object-keys-internal":52}],50:[function(e,t,n){n.f=Object.getOwnPropertySymbols},{}],51:[function(e,t,n){var r=e("../internals/has"),i=e("../internals/to-object"),a=e("../internals/shared-key"),o=e("../internals/correct-prototype-getter"),s=a("IE_PROTO"),l=Object.prototype;t.exports=o?Object.getPrototypeOf:function(e){return e=i(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},{"../internals/correct-prototype-getter":12,"../internals/has":28,"../internals/shared-key":63,"../internals/to-object":72}],52:[function(e,t,n){var r=e("../internals/has"),i=e("../internals/to-indexed-object"),a=e("../internals/array-includes").indexOf,o=e("../internals/hidden-keys");t.exports=function(e,t){var n,s=i(e),l=0,c=[];for(n in s)!r(o,n)&&r(s,n)&&c.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~a(c,n)||c.push(n));return c}},{"../internals/array-includes":7,"../internals/has":28,"../internals/hidden-keys":29,"../internals/to-indexed-object":69}],53:[function(e,t,n){var r=e("../internals/object-keys-internal"),i=e("../internals/enum-bug-keys");t.exports=Object.keys||function(e){return r(e,i)}},{"../internals/enum-bug-keys":20,"../internals/object-keys-internal":52}],54:[function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a=i&&!r.call({1:2},1);n.f=a?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},{}],55:[function(e,t,n){var r=e("../internals/an-object"),i=e("../internals/a-possible-prototype");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,a){return r(n),i(a),t?e.call(n,a):n.__proto__=a,n}}():void 0)},{"../internals/a-possible-prototype":2,"../internals/an-object":5}],56:[function(e,t,n){var r=e("../internals/get-built-in"),i=e("../internals/object-get-own-property-names"),a=e("../internals/object-get-own-property-symbols"),o=e("../internals/an-object");t.exports=r("Reflect","ownKeys")||function(e){var t=i.f(o(e)),n=a.f;return n?t.concat(n(e)):t}},{"../internals/an-object":5,"../internals/get-built-in":24,"../internals/object-get-own-property-names":49,"../internals/object-get-own-property-symbols":50}],57:[function(e,t,n){var r=e("../internals/global");t.exports=r},{"../internals/global":27}],58:[function(e,t,n){var r=e("../internals/redefine");t.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},{"../internals/redefine":59}],59:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/create-non-enumerable-property"),a=e("../internals/has"),o=e("../internals/set-global"),s=e("../internals/inspect-source"),l=e("../internals/internal-state"),c=l.get,u=l.enforce,f=String(String).split("String");(t.exports=function(e,t,n,s){var l=!!s&&!!s.unsafe,c=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||a(n,"name")||i(n,"name",t),u(n).source=f.join("string"==typeof t?t:"")),e!==r?(l?!p&&e[t]&&(c=!0):delete e[t],c?e[t]=n:i(e,t,n)):c?e[t]=n:o(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||s(this)}))},{"../internals/create-non-enumerable-property":14,"../internals/global":27,"../internals/has":28,"../internals/inspect-source":33,"../internals/internal-state":34,"../internals/set-global":61}],60:[function(e,t,n){t.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},{}],61:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/create-non-enumerable-property");t.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},{"../internals/create-non-enumerable-property":14,"../internals/global":27}],62:[function(e,t,n){var r=e("../internals/object-define-property").f,i=e("../internals/has"),a=e("../internals/well-known-symbol")("toStringTag");t.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},{"../internals/has":28,"../internals/object-define-property":47,"../internals/well-known-symbol":77}],63:[function(e,t,n){var r=e("../internals/shared"),i=e("../internals/uid"),a=r("keys");t.exports=function(e){return a[e]||(a[e]=i(e))}},{"../internals/shared":65,"../internals/uid":75}],64:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/set-global"),a=r["__core-js_shared__"]||i("__core-js_shared__",{});t.exports=a},{"../internals/global":27,"../internals/set-global":61}],65:[function(e,t,n){var r=e("../internals/is-pure"),i=e("../internals/shared-store");(t.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.4",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},{"../internals/is-pure":38,"../internals/shared-store":64}],66:[function(e,t,n){var r=e("../internals/to-integer"),i=e("../internals/require-object-coercible"),a=function(e){return function(t,n){var a,o,s=String(i(t)),l=r(n),c=s.length;return l<0||l>=c?e?"":void 0:(a=s.charCodeAt(l))<55296||a>56319||l+1===c||(o=s.charCodeAt(l+1))<56320||o>57343?e?s.charAt(l):a:e?s.slice(l,l+2):o-56320+(a-55296<<10)+65536}};t.exports={codeAt:a(!1),charAt:a(!0)}},{"../internals/require-object-coercible":60,"../internals/to-integer":70}],67:[function(e,t,n){"use strict";var r=/[^\0-\u007E]/,i=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",o=Math.floor,s=String.fromCharCode,l=function(e){return e+22+75*(e<26)},c=function(e,t,n){var r=0;for(e=n?o(e/700):e>>1,e+=o(e/t);e>455;r+=36)e=o(e/35);return o(r+36*e/(e+38))},u=function(e){var t,n,r=[],i=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);56320==(64512&a)?t.push(((1023&i)<<10)+(1023&a)+65536):(t.push(i),n--)}else t.push(i)}return t}(e)).length,u=128,f=0,p=72;for(t=0;t<e.length;t++)(n=e[t])<128&&r.push(s(n));var h=r.length,b=h;for(h&&r.push("-");b<i;){var d=2147483647;for(t=0;t<e.length;t++)(n=e[t])>=u&&n<d&&(d=n);var y=b+1;if(d-u>o((2147483647-f)/y))throw RangeError(a);for(f+=(d-u)*y,u=d,t=0;t<e.length;t++){if((n=e[t])<u&&++f>2147483647)throw RangeError(a);if(n==u){for(var g=f,v=36;;v+=36){var m=v<=p?1:v>=p+26?26:v-p;if(g<m)break;var w=g-m,j=36-m;r.push(s(l(m+w%j))),g=o(w/j)}r.push(s(l(g))),p=c(f,y,b==h),f=0,++b}}++f,++u}return r.join("")};t.exports=function(e){var t,n,a=[],o=e.toLowerCase().replace(i,".").split(".");for(t=0;t<o.length;t++)n=o[t],a.push(r.test(n)?"xn--"+u(n):n);return a.join(".")}},{}],68:[function(e,t,n){var r=e("../internals/to-integer"),i=Math.max,a=Math.min;t.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):a(n,t)}},{"../internals/to-integer":70}],69:[function(e,t,n){var r=e("../internals/indexed-object"),i=e("../internals/require-object-coercible");t.exports=function(e){return r(i(e))}},{"../internals/indexed-object":32,"../internals/require-object-coercible":60}],70:[function(e,t,n){var r=Math.ceil,i=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?i:r)(e)}},{}],71:[function(e,t,n){var r=e("../internals/to-integer"),i=Math.min;t.exports=function(e){return e>0?i(r(e),9007199254740991):0}},{"../internals/to-integer":70}],72:[function(e,t,n){var r=e("../internals/require-object-coercible");t.exports=function(e){return Object(r(e))}},{"../internals/require-object-coercible":60}],73:[function(e,t,n){var r=e("../internals/is-object");t.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},{"../internals/is-object":37}],74:[function(e,t,n){var r={};r[e("../internals/well-known-symbol")("toStringTag")]="z",t.exports="[object z]"===String(r)},{"../internals/well-known-symbol":77}],75:[function(e,t,n){var r=0,i=Math.random();t.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++r+i).toString(36)}},{}],76:[function(e,t,n){var r=e("../internals/native-symbol");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},{"../internals/native-symbol":41}],77:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/shared"),a=e("../internals/has"),o=e("../internals/uid"),s=e("../internals/native-symbol"),l=e("../internals/use-symbol-as-uid"),c=i("wks"),u=r.Symbol,f=l?u:u&&u.withoutSetter||o;t.exports=function(e){return a(c,e)||(s&&a(u,e)?c[e]=u[e]:c[e]=f("Symbol."+e)),c[e]}},{"../internals/global":27,"../internals/has":28,"../internals/native-symbol":41,"../internals/shared":65,"../internals/uid":75,"../internals/use-symbol-as-uid":76}],78:[function(e,t,n){"use strict";var r=e("../internals/to-indexed-object"),i=e("../internals/add-to-unscopables"),a=e("../internals/iterators"),o=e("../internals/internal-state"),s=e("../internals/define-iterator"),l=o.set,c=o.getterFor("Array Iterator");t.exports=s(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=c(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},{"../internals/add-to-unscopables":3,"../internals/define-iterator":17,"../internals/internal-state":34,"../internals/iterators":40,"../internals/to-indexed-object":69}],79:[function(e,t,n){"use strict";var r=e("../internals/string-multibyte").charAt,i=e("../internals/internal-state"),a=e("../internals/define-iterator"),o=i.set,s=i.getterFor("String Iterator");a(String,"String",(function(e){o(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},{"../internals/define-iterator":17,"../internals/internal-state":34,"../internals/string-multibyte":66}],80:[function(e,t,n){"use strict";e("../modules/es.array.iterator");var r=e("../internals/export"),i=e("../internals/get-built-in"),a=e("../internals/native-url"),o=e("../internals/redefine"),s=e("../internals/redefine-all"),l=e("../internals/set-to-string-tag"),c=e("../internals/create-iterator-constructor"),u=e("../internals/internal-state"),f=e("../internals/an-instance"),p=e("../internals/has"),h=e("../internals/function-bind-context"),b=e("../internals/classof"),d=e("../internals/an-object"),y=e("../internals/is-object"),g=e("../internals/object-create"),v=e("../internals/create-property-descriptor"),m=e("../internals/get-iterator"),w=e("../internals/get-iterator-method"),j=e("../internals/well-known-symbol"),x=i("fetch"),k=i("Headers"),S=j("iterator"),A=u.set,O=u.getterFor("URLSearchParams"),R=u.getterFor("URLSearchParamsIterator"),L=/\+/g,U=Array(4),P=function(e){return U[e-1]||(U[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},I=function(e){try{return decodeURIComponent(e)}catch(t){return e}},q=function(e){var t=e.replace(L," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(P(n--),I);return t}},E=/[!'()~]|%20/g,_={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},T=function(e){return _[e]},B=function(e){return encodeURIComponent(e).replace(E,T)},F=function(e,t){if(t)for(var n,r,i=t.split("&"),a=0;a<i.length;)(n=i[a++]).length&&(r=n.split("="),e.push({key:q(r.shift()),value:q(r.join("="))}))},C=function(e){this.entries.length=0,F(this.entries,e)},M=function(e,t){if(e<t)throw TypeError("Not enough arguments")},N=c((function(e,t){A(this,{type:"URLSearchParamsIterator",iterator:m(O(e).entries),kind:t})}),"Iterator",(function(){var e=R(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n})),D=function(){f(this,D,"URLSearchParams");var e,t,n,r,i,a,o,s,l,c=arguments.length>0?arguments[0]:void 0,u=[];if(A(this,{type:"URLSearchParams",entries:u,updateURL:function(){},updateSearchParams:C}),void 0!==c)if(y(c))if("function"==typeof(e=w(c)))for(n=(t=e.call(c)).next;!(r=n.call(t)).done;){if((o=(a=(i=m(d(r.value))).next).call(i)).done||(s=a.call(i)).done||!a.call(i).done)throw TypeError("Expected sequence with length 2");u.push({key:o.value+"",value:s.value+""})}else for(l in c)p(c,l)&&u.push({key:l,value:c[l]+""});else F(u,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},z=D.prototype;s(z,{append:function(e,t){M(arguments.length,2);var n=O(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){M(arguments.length,1);for(var t=O(this),n=t.entries,r=e+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;t.updateURL()},get:function(e){M(arguments.length,1);for(var t=O(this).entries,n=e+"",r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){M(arguments.length,1);for(var t=O(this).entries,n=e+"",r=[],i=0;i<t.length;i++)t[i].key===n&&r.push(t[i].value);return r},has:function(e){M(arguments.length,1);for(var t=O(this).entries,n=e+"",r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){M(arguments.length,1);for(var n,r=O(this),i=r.entries,a=!1,o=e+"",s=t+"",l=0;l<i.length;l++)(n=i[l]).key===o&&(a?i.splice(l--,1):(a=!0,n.value=s));a||i.push({key:o,value:s}),r.updateURL()},sort:function(){var e,t,n,r=O(this),i=r.entries,a=i.slice();for(i.length=0,n=0;n<a.length;n++){for(e=a[n],t=0;t<n;t++)if(i[t].key>e.key){i.splice(t,0,e);break}t===n&&i.push(e)}r.updateURL()},forEach:function(e){for(var t,n=O(this).entries,r=h(e,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new N(this,"keys")},values:function(){return new N(this,"values")},entries:function(){return new N(this,"entries")}},{enumerable:!0}),o(z,S,z.entries),o(z,"toString",(function(){for(var e,t=O(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(B(e.key)+"="+B(e.value));return n.join("&")}),{enumerable:!0}),l(D,"URLSearchParams"),r({global:!0,forced:!a},{URLSearchParams:D}),a||"function"!=typeof x||"function"!=typeof k||r({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,n,r,i=[e];return arguments.length>1&&(y(t=arguments[1])&&(n=t.body,"URLSearchParams"===b(n)&&((r=t.headers?new k(t.headers):new k).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=g(t,{body:v(0,String(n)),headers:v(0,r)}))),i.push(t)),x.apply(this,i)}}),t.exports={URLSearchParams:D,getState:O}},{"../internals/an-instance":4,"../internals/an-object":5,"../internals/classof":10,"../internals/create-iterator-constructor":13,"../internals/create-property-descriptor":15,"../internals/export":21,"../internals/function-bind-context":23,"../internals/get-built-in":24,"../internals/get-iterator":26,"../internals/get-iterator-method":25,"../internals/has":28,"../internals/internal-state":34,"../internals/is-object":37,"../internals/native-url":42,"../internals/object-create":45,"../internals/redefine":59,"../internals/redefine-all":58,"../internals/set-to-string-tag":62,"../internals/well-known-symbol":77,"../modules/es.array.iterator":78}],81:[function(e,t,n){"use strict";e("../modules/es.string.iterator");var r,i=e("../internals/export"),a=e("../internals/descriptors"),o=e("../internals/native-url"),s=e("../internals/global"),l=e("../internals/object-define-properties"),c=e("../internals/redefine"),u=e("../internals/an-instance"),f=e("../internals/has"),p=e("../internals/object-assign"),h=e("../internals/array-from"),b=e("../internals/string-multibyte").codeAt,d=e("../internals/string-punycode-to-ascii"),y=e("../internals/set-to-string-tag"),g=e("../modules/web.url-search-params"),v=e("../internals/internal-state"),m=s.URL,w=g.URLSearchParams,j=g.getState,x=v.set,k=v.getterFor("URL"),S=Math.floor,A=Math.pow,O=/[A-Za-z]/,R=/[\d+\-.A-Za-z]/,L=/\d/,U=/^(0x|0X)/,P=/^[0-7]+$/,I=/^\d+$/,q=/^[\dA-Fa-f]+$/,E=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,_=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,T=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,B=/[\u0009\u000A\u000D]/g,F=function(e,t){var n,r,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return"Invalid host";if(!(n=M(t.slice(1,-1))))return"Invalid host";e.host=n}else if(Y(e)){if(t=d(t),E.test(t))return"Invalid host";if(null===(n=C(t)))return"Invalid host";e.host=n}else{if(_.test(t))return"Invalid host";for(n="",r=h(t),i=0;i<r.length;i++)n+=$(r[i],D);e.host=n}},C=function(e){var t,n,r,i,a,o,s,l=e.split(".");if(l.length&&""==l[l.length-1]&&l.pop(),(t=l.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=l[r]))return e;if(a=10,i.length>1&&"0"==i.charAt(0)&&(a=U.test(i)?16:8,i=i.slice(8==a?1:2)),""===i)o=0;else{if(!(10==a?I:8==a?P:q).test(i))return e;o=parseInt(i,a)}n.push(o)}for(r=0;r<t;r++)if(o=n[r],r==t-1){if(o>=A(256,5-t))return null}else if(o>255)return null;for(s=n.pop(),r=0;r<n.length;r++)s+=n[r]*A(256,3-r);return s},M=function(e){var t,n,r,i,a,o,s,l=[0,0,0,0,0,0,0,0],c=0,u=null,f=0,p=function(){return e.charAt(f)};if(":"==p()){if(":"!=e.charAt(1))return;f+=2,u=++c}for(;p();){if(8==c)return;if(":"!=p()){for(t=n=0;n<4&&q.test(p());)t=16*t+parseInt(p(),16),f++,n++;if("."==p()){if(0==n)return;if(f-=n,c>6)return;for(r=0;p();){if(i=null,r>0){if(!("."==p()&&r<4))return;f++}if(!L.test(p()))return;for(;L.test(p());){if(a=parseInt(p(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;f++}l[c]=256*l[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==p()){if(f++,!p())return}else if(p())return;l[c++]=t}else{if(null!==u)return;f++,u=++c}}if(null!==u)for(o=c-u,c=7;0!=c&&o>0;)s=l[c],l[c--]=l[u+o-1],l[u+--o]=s;else if(8!=c)return;return l},N=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=S(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,a=0;a<8;a++)0!==e[a]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=a),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},D={},z=p({},D,{" ":1,'"':1,"<":1,">":1,"`":1}),G=p({},z,{"#":1,"?":1,"{":1,"}":1}),W=p({},G,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),$=function(e,t){var n=b(e,0);return n>32&&n<127&&!f(t,e)?e:encodeURIComponent(e)},J={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Y=function(e){return f(J,e.scheme)},X=function(e){return""!=e.username||""!=e.password},Z=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},H=function(e,t){var n;return 2==e.length&&O.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},K=function(e){var t;return e.length>1&&H(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},V=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&H(t[0],!0)||t.pop()},Q=function(e){return"."===e||"%2e"===e.toLowerCase()},ee={},te={},ne={},re={},ie={},ae={},oe={},se={},le={},ce={},ue={},fe={},pe={},he={},be={},de={},ye={},ge={},ve={},me={},we={},je=function(e,t,n,i){var a,o,s,l,c,u=n||ee,p=0,b="",d=!1,y=!1,g=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(T,"")),t=t.replace(B,""),a=h(t);p<=a.length;){switch(o=a[p],u){case ee:if(!o||!O.test(o)){if(n)return"Invalid scheme";u=ne;continue}b+=o.toLowerCase(),u=te;break;case te:if(o&&(R.test(o)||"+"==o||"-"==o||"."==o))b+=o.toLowerCase();else{if(":"!=o){if(n)return"Invalid scheme";b="",u=ne,p=0;continue}if(n&&(Y(e)!=f(J,b)||"file"==b&&(X(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=b,n)return void(Y(e)&&J[e.scheme]==e.port&&(e.port=null));b="","file"==e.scheme?u=he:Y(e)&&i&&i.scheme==e.scheme?u=re:Y(e)?u=se:"/"==a[p+1]?(u=ie,p++):(e.cannotBeABaseURL=!0,e.path.push(""),u=ve)}break;case ne:if(!i||i.cannotBeABaseURL&&"#"!=o)return"Invalid scheme";if(i.cannotBeABaseURL&&"#"==o){e.scheme=i.scheme,e.path=i.path.slice(),e.query=i.query,e.fragment="",e.cannotBeABaseURL=!0,u=we;break}u="file"==i.scheme?he:ae;continue;case re:if("/"!=o||"/"!=a[p+1]){u=ae;continue}u=le,p++;break;case ie:if("/"==o){u=ce;break}u=ge;continue;case ae:if(e.scheme=i.scheme,o==r)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query;else if("/"==o||"\\"==o&&Y(e))u=oe;else if("?"==o)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query="",u=me;else{if("#"!=o){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.path.pop(),u=ge;continue}e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query,e.fragment="",u=we}break;case oe:if(!Y(e)||"/"!=o&&"\\"!=o){if("/"!=o){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,u=ge;continue}u=ce}else u=le;break;case se:if(u=le,"/"!=o||"/"!=b.charAt(p+1))continue;p++;break;case le:if("/"!=o&&"\\"!=o){u=ce;continue}break;case ce:if("@"==o){d&&(b="%40"+b),d=!0,s=h(b);for(var v=0;v<s.length;v++){var m=s[v];if(":"!=m||g){var w=$(m,W);g?e.password+=w:e.username+=w}else g=!0}b=""}else if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&Y(e)){if(d&&""==b)return"Invalid authority";p-=h(b).length+1,b="",u=ue}else b+=o;break;case ue:case fe:if(n&&"file"==e.scheme){u=de;continue}if(":"!=o||y){if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&Y(e)){if(Y(e)&&""==b)return"Invalid host";if(n&&""==b&&(X(e)||null!==e.port))return;if(l=F(e,b))return l;if(b="",u=ye,n)return;continue}"["==o?y=!0:"]"==o&&(y=!1),b+=o}else{if(""==b)return"Invalid host";if(l=F(e,b))return l;if(b="",u=pe,n==fe)return}break;case pe:if(!L.test(o)){if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&Y(e)||n){if(""!=b){var j=parseInt(b,10);if(j>65535)return"Invalid port";e.port=Y(e)&&j===J[e.scheme]?null:j,b=""}if(n)return;u=ye;continue}return"Invalid port"}b+=o;break;case he:if(e.scheme="file","/"==o||"\\"==o)u=be;else{if(!i||"file"!=i.scheme){u=ge;continue}if(o==r)e.host=i.host,e.path=i.path.slice(),e.query=i.query;else if("?"==o)e.host=i.host,e.path=i.path.slice(),e.query="",u=me;else{if("#"!=o){K(a.slice(p).join(""))||(e.host=i.host,e.path=i.path.slice(),V(e)),u=ge;continue}e.host=i.host,e.path=i.path.slice(),e.query=i.query,e.fragment="",u=we}}break;case be:if("/"==o||"\\"==o){u=de;break}i&&"file"==i.scheme&&!K(a.slice(p).join(""))&&(H(i.path[0],!0)?e.path.push(i.path[0]):e.host=i.host),u=ge;continue;case de:if(o==r||"/"==o||"\\"==o||"?"==o||"#"==o){if(!n&&H(b))u=ge;else if(""==b){if(e.host="",n)return;u=ye}else{if(l=F(e,b))return l;if("localhost"==e.host&&(e.host=""),n)return;b="",u=ye}continue}b+=o;break;case ye:if(Y(e)){if(u=ge,"/"!=o&&"\\"!=o)continue}else if(n||"?"!=o)if(n||"#"!=o){if(o!=r&&(u=ge,"/"!=o))continue}else e.fragment="",u=we;else e.query="",u=me;break;case ge:if(o==r||"/"==o||"\\"==o&&Y(e)||!n&&("?"==o||"#"==o)){if(".."===(c=(c=b).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(V(e),"/"==o||"\\"==o&&Y(e)||e.path.push("")):Q(b)?"/"==o||"\\"==o&&Y(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&H(b)&&(e.host&&(e.host=""),b=b.charAt(0)+":"),e.path.push(b)),b="","file"==e.scheme&&(o==r||"?"==o||"#"==o))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==o?(e.query="",u=me):"#"==o&&(e.fragment="",u=we)}else b+=$(o,G);break;case ve:"?"==o?(e.query="",u=me):"#"==o?(e.fragment="",u=we):o!=r&&(e.path[0]+=$(o,D));break;case me:n||"#"!=o?o!=r&&("'"==o&&Y(e)?e.query+="%27":e.query+="#"==o?"%23":$(o,D)):(e.fragment="",u=we);break;case we:o!=r&&(e.fragment+=$(o,z))}p++}},xe=function(e){var t,n,r=u(this,xe,"URL"),i=arguments.length>1?arguments[1]:void 0,o=String(e),s=x(r,{type:"URL"});if(void 0!==i)if(i instanceof xe)t=k(i);else if(n=je(t={},String(i)))throw TypeError(n);if(n=je(s,o,null,t))throw TypeError(n);var l=s.searchParams=new w,c=j(l);c.updateSearchParams(s.query),c.updateURL=function(){s.query=String(l)||null},a||(r.href=Se.call(r),r.origin=Ae.call(r),r.protocol=Oe.call(r),r.username=Re.call(r),r.password=Le.call(r),r.host=Ue.call(r),r.hostname=Pe.call(r),r.port=Ie.call(r),r.pathname=qe.call(r),r.search=Ee.call(r),r.searchParams=_e.call(r),r.hash=Te.call(r))},ke=xe.prototype,Se=function(){var e=k(this),t=e.scheme,n=e.username,r=e.password,i=e.host,a=e.port,o=e.path,s=e.query,l=e.fragment,c=t+":";return null!==i?(c+="//",X(e)&&(c+=n+(r?":"+r:"")+"@"),c+=N(i),null!==a&&(c+=":"+a)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?o[0]:o.length?"/"+o.join("/"):"",null!==s&&(c+="?"+s),null!==l&&(c+="#"+l),c},Ae=function(){var e=k(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&Y(e)?t+"://"+N(e.host)+(null!==n?":"+n:""):"null"},Oe=function(){return k(this).scheme+":"},Re=function(){return k(this).username},Le=function(){return k(this).password},Ue=function(){var e=k(this),t=e.host,n=e.port;return null===t?"":null===n?N(t):N(t)+":"+n},Pe=function(){var e=k(this).host;return null===e?"":N(e)},Ie=function(){var e=k(this).port;return null===e?"":String(e)},qe=function(){var e=k(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Ee=function(){var e=k(this).query;return e?"?"+e:""},_e=function(){return k(this).searchParams},Te=function(){var e=k(this).fragment;return e?"#"+e:""},Be=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(a&&l(ke,{href:Be(Se,(function(e){var t=k(this),n=String(e),r=je(t,n);if(r)throw TypeError(r);j(t.searchParams).updateSearchParams(t.query)})),origin:Be(Ae),protocol:Be(Oe,(function(e){var t=k(this);je(t,String(e)+":",ee)})),username:Be(Re,(function(e){var t=k(this),n=h(String(e));if(!Z(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=$(n[r],W)}})),password:Be(Le,(function(e){var t=k(this),n=h(String(e));if(!Z(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=$(n[r],W)}})),host:Be(Ue,(function(e){var t=k(this);t.cannotBeABaseURL||je(t,String(e),ue)})),hostname:Be(Pe,(function(e){var t=k(this);t.cannotBeABaseURL||je(t,String(e),fe)})),port:Be(Ie,(function(e){var t=k(this);Z(t)||(""==(e=String(e))?t.port=null:je(t,e,pe))})),pathname:Be(qe,(function(e){var t=k(this);t.cannotBeABaseURL||(t.path=[],je(t,e+"",ye))})),search:Be(Ee,(function(e){var t=k(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",je(t,e,me)),j(t.searchParams).updateSearchParams(t.query)})),searchParams:Be(_e),hash:Be(Te,(function(e){var t=k(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",je(t,e,we)):t.fragment=null}))}),c(ke,"toJSON",(function(){return Se.call(this)}),{enumerable:!0}),c(ke,"toString",(function(){return Se.call(this)}),{enumerable:!0}),m){var Fe=m.createObjectURL,Ce=m.revokeObjectURL;Fe&&c(xe,"createObjectURL",(function(e){return Fe.apply(m,arguments)})),Ce&&c(xe,"revokeObjectURL",(function(e){return Ce.apply(m,arguments)}))}y(xe,"URL"),i({global:!0,forced:!o,sham:!a},{URL:xe})},{"../internals/an-instance":4,"../internals/array-from":6,"../internals/descriptors":18,"../internals/export":21,"../internals/global":27,"../internals/has":28,"../internals/internal-state":34,"../internals/native-url":42,"../internals/object-assign":44,"../internals/object-define-properties":46,"../internals/redefine":59,"../internals/set-to-string-tag":62,"../internals/string-multibyte":66,"../internals/string-punycode-to-ascii":67,"../modules/es.string.iterator":79,"../modules/web.url-search-params":80}],82:[function(e,t,n){"use strict";e("../internals/export")({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},{"../internals/export":21}],83:[function(e,t,n){e("../modules/web.url"),e("../modules/web.url.to-json"),e("../modules/web.url-search-params");var r=e("../internals/path");t.exports=r.URL},{"../internals/path":57,"../modules/web.url":81,"../modules/web.url-search-params":80,"../modules/web.url.to-json":82}]},{},[83]); wp-polyfill.js 0000644 00000373521 15153765740 0007410 0 ustar 00 /**
* core-js 3.35.1
* © 2014-2024 Denis Pushkarev (zloirock.ru)
* license: https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE
* source: https://github.com/zloirock/core-js
*/
!function (undefined) { 'use strict'; /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ var __webpack_require__ = function (moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(1);
__webpack_require__(70);
__webpack_require__(77);
__webpack_require__(80);
__webpack_require__(81);
__webpack_require__(83);
__webpack_require__(95);
__webpack_require__(96);
__webpack_require__(98);
__webpack_require__(101);
__webpack_require__(103);
__webpack_require__(104);
__webpack_require__(113);
__webpack_require__(114);
__webpack_require__(117);
__webpack_require__(123);
__webpack_require__(138);
__webpack_require__(140);
__webpack_require__(141);
module.exports = __webpack_require__(142);
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(2);
var toObject = __webpack_require__(38);
var lengthOfArrayLike = __webpack_require__(62);
var setArrayLength = __webpack_require__(67);
var doesNotExceedSafeInteger = __webpack_require__(69);
var fails = __webpack_require__(6);
var INCORRECT_TO_LENGTH = fails(function () {
return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
});
// V8 <= 121 and Safari <= 15.4; FF < 23 throws InternalError
// https://bugs.chromium.org/p/v8/issues/detail?id=12681
var properErrorOnNonWritableLength = function () {
try {
// eslint-disable-next-line es/no-object-defineproperty -- safe
Object.defineProperty([], 'length', { writable: false }).push();
} catch (error) {
return error instanceof TypeError;
}
};
var FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
// `Array.prototype.push` method
// https://tc39.es/ecma262/#sec-array.prototype.push
$({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
// eslint-disable-next-line no-unused-vars -- required for `.length`
push: function push(item) {
var O = toObject(this);
var len = lengthOfArrayLike(O);
var argCount = arguments.length;
doesNotExceedSafeInteger(len + argCount);
for (var i = 0; i < argCount; i++) {
O[len] = arguments[i];
len++;
}
setArrayLength(O, len);
return len;
}
});
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(3);
var getOwnPropertyDescriptor = __webpack_require__(4).f;
var createNonEnumerableProperty = __webpack_require__(42);
var defineBuiltIn = __webpack_require__(46);
var defineGlobalProperty = __webpack_require__(36);
var copyConstructorProperties = __webpack_require__(54);
var isForced = __webpack_require__(66);
/*
options.target - name of the target object
options.global - target is the global object
options.stat - export as static methods of target
options.proto - export as prototype methods of target
options.real - real prototype method for the `pure` version
options.forced - export even if the native feature is available
options.bind - bind methods to the target, required for the `pure` version
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
options.unsafe - use the simple assignment of property instead of delete + defineProperty
options.sham - add a flag to not completely full polyfills
options.enumerable - export as enumerable property
options.dontCallGetSet - prevent calling a getter on target
options.name - the .name of the function if it does not match the key
*/
module.exports = function (options, source) {
var TARGET = options.target;
var GLOBAL = options.global;
var STATIC = options.stat;
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
if (GLOBAL) {
target = global;
} else if (STATIC) {
target = global[TARGET] || defineGlobalProperty(TARGET, {});
} else {
target = global[TARGET] && global[TARGET].prototype;
}
if (target) for (key in source) {
sourceProperty = source[key];
if (options.dontCallGetSet) {
descriptor = getOwnPropertyDescriptor(target, key);
targetProperty = descriptor && descriptor.value;
} else targetProperty = target[key];
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
// contained in target
if (!FORCED && targetProperty !== undefined) {
if (typeof sourceProperty == typeof targetProperty) continue;
copyConstructorProperties(sourceProperty, targetProperty);
}
// add a flag to not completely full polyfills
if (options.sham || (targetProperty && targetProperty.sham)) {
createNonEnumerableProperty(sourceProperty, 'sham', true);
}
defineBuiltIn(target, key, sourceProperty, options);
}
};
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var check = function (it) {
return it && it.Math === Math && it;
};
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
// eslint-disable-next-line es/no-global-this -- safe
check(typeof globalThis == 'object' && globalThis) ||
check(typeof window == 'object' && window) ||
// eslint-disable-next-line no-restricted-globals -- safe
check(typeof self == 'object' && self) ||
check(typeof global == 'object' && global) ||
check(typeof this == 'object' && this) ||
// eslint-disable-next-line no-new-func -- fallback
(function () { return this; })() || Function('return this')();
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(5);
var call = __webpack_require__(7);
var propertyIsEnumerableModule = __webpack_require__(9);
var createPropertyDescriptor = __webpack_require__(10);
var toIndexedObject = __webpack_require__(11);
var toPropertyKey = __webpack_require__(17);
var hasOwn = __webpack_require__(37);
var IE8_DOM_DEFINE = __webpack_require__(40);
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// `Object.getOwnPropertyDescriptor` method
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
O = toIndexedObject(O);
P = toPropertyKey(P);
if (IE8_DOM_DEFINE) try {
return $getOwnPropertyDescriptor(O, P);
} catch (error) { /* empty */ }
if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
};
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(6);
// Detect IE8's incomplete defineProperty implementation
module.exports = !fails(function () {
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
});
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function (exec) {
try {
return !!exec();
} catch (error) {
return true;
}
};
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var NATIVE_BIND = __webpack_require__(8);
var call = Function.prototype.call;
module.exports = NATIVE_BIND ? call.bind(call) : function () {
return call.apply(call, arguments);
};
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(6);
module.exports = !fails(function () {
// eslint-disable-next-line es/no-function-prototype-bind -- safe
var test = (function () { /* empty */ }).bind();
// eslint-disable-next-line no-prototype-builtins -- safe
return typeof test != 'function' || test.hasOwnProperty('prototype');
});
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $propertyIsEnumerable = {}.propertyIsEnumerable;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
var descriptor = getOwnPropertyDescriptor(this, V);
return !!descriptor && descriptor.enumerable;
} : $propertyIsEnumerable;
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// toObject with fallback for non-array-like ES3 strings
var IndexedObject = __webpack_require__(12);
var requireObjectCoercible = __webpack_require__(15);
module.exports = function (it) {
return IndexedObject(requireObjectCoercible(it));
};
/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(13);
var fails = __webpack_require__(6);
var classof = __webpack_require__(14);
var $Object = Object;
var split = uncurryThis(''.split);
// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
// eslint-disable-next-line no-prototype-builtins -- safe
return !$Object('z').propertyIsEnumerable(0);
}) ? function (it) {
return classof(it) === 'String' ? split(it, '') : $Object(it);
} : $Object;
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var NATIVE_BIND = __webpack_require__(8);
var FunctionPrototype = Function.prototype;
var call = FunctionPrototype.call;
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
return function () {
return call.apply(fn, arguments);
};
};
/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(13);
var toString = uncurryThis({}.toString);
var stringSlice = uncurryThis(''.slice);
module.exports = function (it) {
return stringSlice(toString(it), 8, -1);
};
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isNullOrUndefined = __webpack_require__(16);
var $TypeError = TypeError;
// `RequireObjectCoercible` abstract operation
// https://tc39.es/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
return it;
};
/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// we can't use just `it == null` since of `document.all` special case
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
module.exports = function (it) {
return it === null || it === undefined;
};
/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toPrimitive = __webpack_require__(18);
var isSymbol = __webpack_require__(21);
// `ToPropertyKey` abstract operation
// https://tc39.es/ecma262/#sec-topropertykey
module.exports = function (argument) {
var key = toPrimitive(argument, 'string');
return isSymbol(key) ? key : key + '';
};
/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(7);
var isObject = __webpack_require__(19);
var isSymbol = __webpack_require__(21);
var getMethod = __webpack_require__(28);
var ordinaryToPrimitive = __webpack_require__(31);
var wellKnownSymbol = __webpack_require__(32);
var $TypeError = TypeError;
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
// `ToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-toprimitive
module.exports = function (input, pref) {
if (!isObject(input) || isSymbol(input)) return input;
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
var result;
if (exoticToPrim) {
if (pref === undefined) pref = 'default';
result = call(exoticToPrim, input, pref);
if (!isObject(result) || isSymbol(result)) return result;
throw new $TypeError("Can't convert object to primitive value");
}
if (pref === undefined) pref = 'number';
return ordinaryToPrimitive(input, pref);
};
/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isCallable = __webpack_require__(20);
module.exports = function (it) {
return typeof it == 'object' ? it !== null : isCallable(it);
};
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
var documentAll = typeof document == 'object' && document.all;
// `IsCallable` abstract operation
// https://tc39.es/ecma262/#sec-iscallable
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
module.exports = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
return typeof argument == 'function' || argument === documentAll;
} : function (argument) {
return typeof argument == 'function';
};
/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getBuiltIn = __webpack_require__(22);
var isCallable = __webpack_require__(20);
var isPrototypeOf = __webpack_require__(23);
var USE_SYMBOL_AS_UID = __webpack_require__(24);
var $Object = Object;
module.exports = USE_SYMBOL_AS_UID ? function (it) {
return typeof it == 'symbol';
} : function (it) {
var $Symbol = getBuiltIn('Symbol');
return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
};
/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(3);
var isCallable = __webpack_require__(20);
var aFunction = function (argument) {
return isCallable(argument) ? argument : undefined;
};
module.exports = function (namespace, method) {
return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];
};
/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(13);
module.exports = uncurryThis({}.isPrototypeOf);
/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint-disable es/no-symbol -- required for testing */
var NATIVE_SYMBOL = __webpack_require__(25);
module.exports = NATIVE_SYMBOL
&& !Symbol.sham
&& typeof Symbol.iterator == 'symbol';
/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint-disable es/no-symbol -- required for testing */
var V8_VERSION = __webpack_require__(26);
var fails = __webpack_require__(6);
var global = __webpack_require__(3);
var $String = global.String;
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
var symbol = Symbol('symbol detection');
// Chrome 38 Symbol has incorrect toString conversion
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
// of course, fail.
return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
});
/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(3);
var userAgent = __webpack_require__(27);
var process = global.process;
var Deno = global.Deno;
var versions = process && process.versions || Deno && Deno.version;
var v8 = versions && versions.v8;
var match, version;
if (v8) {
match = v8.split('.');
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
// but their correct versions are not interesting for us
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
}
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
// so check `userAgent` even if `.v8` exists, but 0
if (!version && userAgent) {
match = userAgent.match(/Edge\/(\d+)/);
if (!match || match[1] >= 74) {
match = userAgent.match(/Chrome\/(\d+)/);
if (match) version = +match[1];
}
}
module.exports = version;
/***/ }),
/* 27 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aCallable = __webpack_require__(29);
var isNullOrUndefined = __webpack_require__(16);
// `GetMethod` abstract operation
// https://tc39.es/ecma262/#sec-getmethod
module.exports = function (V, P) {
var func = V[P];
return isNullOrUndefined(func) ? undefined : aCallable(func);
};
/***/ }),
/* 29 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isCallable = __webpack_require__(20);
var tryToString = __webpack_require__(30);
var $TypeError = TypeError;
// `Assert: IsCallable(argument) is true`
module.exports = function (argument) {
if (isCallable(argument)) return argument;
throw new $TypeError(tryToString(argument) + ' is not a function');
};
/***/ }),
/* 30 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $String = String;
module.exports = function (argument) {
try {
return $String(argument);
} catch (error) {
return 'Object';
}
};
/***/ }),
/* 31 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(7);
var isCallable = __webpack_require__(20);
var isObject = __webpack_require__(19);
var $TypeError = TypeError;
// `OrdinaryToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
module.exports = function (input, pref) {
var fn, val;
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
throw new $TypeError("Can't convert object to primitive value");
};
/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(3);
var shared = __webpack_require__(33);
var hasOwn = __webpack_require__(37);
var uid = __webpack_require__(39);
var NATIVE_SYMBOL = __webpack_require__(25);
var USE_SYMBOL_AS_UID = __webpack_require__(24);
var Symbol = global.Symbol;
var WellKnownSymbolsStore = shared('wks');
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;
module.exports = function (name) {
if (!hasOwn(WellKnownSymbolsStore, name)) {
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)
? Symbol[name]
: createWellKnownSymbol('Symbol.' + name);
} return WellKnownSymbolsStore[name];
};
/***/ }),
/* 33 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var IS_PURE = __webpack_require__(34);
var store = __webpack_require__(35);
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: '3.35.1',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
source: 'https://github.com/zloirock/core-js'
});
/***/ }),
/* 34 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = false;
/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(3);
var defineGlobalProperty = __webpack_require__(36);
var SHARED = '__core-js_shared__';
var store = global[SHARED] || defineGlobalProperty(SHARED, {});
module.exports = store;
/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(3);
// eslint-disable-next-line es/no-object-defineproperty -- safe
var defineProperty = Object.defineProperty;
module.exports = function (key, value) {
try {
defineProperty(global, key, { value: value, configurable: true, writable: true });
} catch (error) {
global[key] = value;
} return value;
};
/***/ }),
/* 37 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(13);
var toObject = __webpack_require__(38);
var hasOwnProperty = uncurryThis({}.hasOwnProperty);
// `HasOwnProperty` abstract operation
// https://tc39.es/ecma262/#sec-hasownproperty
// eslint-disable-next-line es/no-object-hasown -- safe
module.exports = Object.hasOwn || function hasOwn(it, key) {
return hasOwnProperty(toObject(it), key);
};
/***/ }),
/* 38 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var requireObjectCoercible = __webpack_require__(15);
var $Object = Object;
// `ToObject` abstract operation
// https://tc39.es/ecma262/#sec-toobject
module.exports = function (argument) {
return $Object(requireObjectCoercible(argument));
};
/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(13);
var id = 0;
var postfix = Math.random();
var toString = uncurryThis(1.0.toString);
module.exports = function (key) {
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
};
/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(5);
var fails = __webpack_require__(6);
var createElement = __webpack_require__(41);
// Thanks to IE8 for its funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
return Object.defineProperty(createElement('div'), 'a', {
get: function () { return 7; }
}).a !== 7;
});
/***/ }),
/* 41 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(3);
var isObject = __webpack_require__(19);
var document = global.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
return EXISTS ? document.createElement(it) : {};
};
/***/ }),
/* 42 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(5);
var definePropertyModule = __webpack_require__(43);
var createPropertyDescriptor = __webpack_require__(10);
module.exports = DESCRIPTORS ? function (object, key, value) {
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/* 43 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(5);
var IE8_DOM_DEFINE = __webpack_require__(40);
var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(44);
var anObject = __webpack_require__(45);
var toPropertyKey = __webpack_require__(17);
var $TypeError = TypeError;
// eslint-disable-next-line es/no-object-defineproperty -- safe
var $defineProperty = Object.defineProperty;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var ENUMERABLE = 'enumerable';
var CONFIGURABLE = 'configurable';
var WRITABLE = 'writable';
// `Object.defineProperty` method
// https://tc39.es/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
anObject(O);
P = toPropertyKey(P);
anObject(Attributes);
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
var current = $getOwnPropertyDescriptor(O, P);
if (current && current[WRITABLE]) {
O[P] = Attributes.value;
Attributes = {
configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
writable: false
};
}
} return $defineProperty(O, P, Attributes);
} : $defineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPropertyKey(P);
anObject(Attributes);
if (IE8_DOM_DEFINE) try {
return $defineProperty(O, P, Attributes);
} catch (error) { /* empty */ }
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');
if ('value' in Attributes) O[P] = Attributes.value;
return O;
};
/***/ }),
/* 44 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(5);
var fails = __webpack_require__(6);
// V8 ~ Chrome 36-
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
module.exports = DESCRIPTORS && fails(function () {
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
value: 42,
writable: false
}).prototype !== 42;
});
/***/ }),
/* 45 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isObject = __webpack_require__(19);
var $String = String;
var $TypeError = TypeError;
// `Assert: Type(argument) is Object`
module.exports = function (argument) {
if (isObject(argument)) return argument;
throw new $TypeError($String(argument) + ' is not an object');
};
/***/ }),
/* 46 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isCallable = __webpack_require__(20);
var definePropertyModule = __webpack_require__(43);
var makeBuiltIn = __webpack_require__(47);
var defineGlobalProperty = __webpack_require__(36);
module.exports = function (O, key, value, options) {
if (!options) options = {};
var simple = options.enumerable;
var name = options.name !== undefined ? options.name : key;
if (isCallable(value)) makeBuiltIn(value, name, options);
if (options.global) {
if (simple) O[key] = value;
else defineGlobalProperty(key, value);
} else {
try {
if (!options.unsafe) delete O[key];
else if (O[key]) simple = true;
} catch (error) { /* empty */ }
if (simple) O[key] = value;
else definePropertyModule.f(O, key, {
value: value,
enumerable: false,
configurable: !options.nonConfigurable,
writable: !options.nonWritable
});
} return O;
};
/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(13);
var fails = __webpack_require__(6);
var isCallable = __webpack_require__(20);
var hasOwn = __webpack_require__(37);
var DESCRIPTORS = __webpack_require__(5);
var CONFIGURABLE_FUNCTION_NAME = __webpack_require__(48).CONFIGURABLE;
var inspectSource = __webpack_require__(49);
var InternalStateModule = __webpack_require__(50);
var enforceInternalState = InternalStateModule.enforce;
var getInternalState = InternalStateModule.get;
var $String = String;
// eslint-disable-next-line es/no-object-defineproperty -- safe
var defineProperty = Object.defineProperty;
var stringSlice = uncurryThis(''.slice);
var replace = uncurryThis(''.replace);
var join = uncurryThis([].join);
var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {
return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
});
var TEMPLATE = String(String).split('String');
var makeBuiltIn = module.exports = function (value, name, options) {
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
}
if (options && options.getter) name = 'get ' + name;
if (options && options.setter) name = 'set ' + name;
if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
else value.name = name;
}
if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
defineProperty(value, 'length', { value: options.arity });
}
try {
if (options && hasOwn(options, 'constructor') && options.constructor) {
if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
} else if (value.prototype) value.prototype = undefined;
} catch (error) { /* empty */ }
var state = enforceInternalState(value);
if (!hasOwn(state, 'source')) {
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
} return value;
};
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
// eslint-disable-next-line no-extend-native -- required
Function.prototype.toString = makeBuiltIn(function toString() {
return isCallable(this) && getInternalState(this).source || inspectSource(this);
}, 'toString');
/***/ }),
/* 48 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(5);
var hasOwn = __webpack_require__(37);
var FunctionPrototype = Function.prototype;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
var EXISTS = hasOwn(FunctionPrototype, 'name');
// additional protection from minified / mangled / dropped function names
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
module.exports = {
EXISTS: EXISTS,
PROPER: PROPER,
CONFIGURABLE: CONFIGURABLE
};
/***/ }),
/* 49 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(13);
var isCallable = __webpack_require__(20);
var store = __webpack_require__(35);
var functionToString = uncurryThis(Function.toString);
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
if (!isCallable(store.inspectSource)) {
store.inspectSource = function (it) {
return functionToString(it);
};
}
module.exports = store.inspectSource;
/***/ }),
/* 50 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var NATIVE_WEAK_MAP = __webpack_require__(51);
var global = __webpack_require__(3);
var isObject = __webpack_require__(19);
var createNonEnumerableProperty = __webpack_require__(42);
var hasOwn = __webpack_require__(37);
var shared = __webpack_require__(35);
var sharedKey = __webpack_require__(52);
var hiddenKeys = __webpack_require__(53);
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
var TypeError = global.TypeError;
var WeakMap = global.WeakMap;
var set, get, has;
var enforce = function (it) {
return has(it) ? get(it) : set(it, {});
};
var getterFor = function (TYPE) {
return function (it) {
var state;
if (!isObject(it) || (state = get(it)).type !== TYPE) {
throw new TypeError('Incompatible receiver, ' + TYPE + ' required');
} return state;
};
};
if (NATIVE_WEAK_MAP || shared.state) {
var store = shared.state || (shared.state = new WeakMap());
/* eslint-disable no-self-assign -- prototype methods protection */
store.get = store.get;
store.has = store.has;
store.set = store.set;
/* eslint-enable no-self-assign -- prototype methods protection */
set = function (it, metadata) {
if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
metadata.facade = it;
store.set(it, metadata);
return metadata;
};
get = function (it) {
return store.get(it) || {};
};
has = function (it) {
return store.has(it);
};
} else {
var STATE = sharedKey('state');
hiddenKeys[STATE] = true;
set = function (it, metadata) {
if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
metadata.facade = it;
createNonEnumerableProperty(it, STATE, metadata);
return metadata;
};
get = function (it) {
return hasOwn(it, STATE) ? it[STATE] : {};
};
has = function (it) {
return hasOwn(it, STATE);
};
}
module.exports = {
set: set,
get: get,
has: has,
enforce: enforce,
getterFor: getterFor
};
/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(3);
var isCallable = __webpack_require__(20);
var WeakMap = global.WeakMap;
module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
/***/ }),
/* 52 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var shared = __webpack_require__(33);
var uid = __webpack_require__(39);
var keys = shared('keys');
module.exports = function (key) {
return keys[key] || (keys[key] = uid(key));
};
/***/ }),
/* 53 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = {};
/***/ }),
/* 54 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var hasOwn = __webpack_require__(37);
var ownKeys = __webpack_require__(55);
var getOwnPropertyDescriptorModule = __webpack_require__(4);
var definePropertyModule = __webpack_require__(43);
module.exports = function (target, source, exceptions) {
var keys = ownKeys(source);
var defineProperty = definePropertyModule.f;
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
}
}
};
/***/ }),
/* 55 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getBuiltIn = __webpack_require__(22);
var uncurryThis = __webpack_require__(13);
var getOwnPropertyNamesModule = __webpack_require__(56);
var getOwnPropertySymbolsModule = __webpack_require__(65);
var anObject = __webpack_require__(45);
var concat = uncurryThis([].concat);
// all object keys, includes non-enumerable and symbols
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
var keys = getOwnPropertyNamesModule.f(anObject(it));
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
};
/***/ }),
/* 56 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var internalObjectKeys = __webpack_require__(57);
var enumBugKeys = __webpack_require__(64);
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
// `Object.getOwnPropertyNames` method
// https://tc39.es/ecma262/#sec-object.getownpropertynames
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return internalObjectKeys(O, hiddenKeys);
};
/***/ }),
/* 57 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(13);
var hasOwn = __webpack_require__(37);
var toIndexedObject = __webpack_require__(11);
var indexOf = __webpack_require__(58).indexOf;
var hiddenKeys = __webpack_require__(53);
var push = uncurryThis([].push);
module.exports = function (object, names) {
var O = toIndexedObject(object);
var i = 0;
var result = [];
var key;
for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
// Don't enum bug & hidden keys
while (names.length > i) if (hasOwn(O, key = names[i++])) {
~indexOf(result, key) || push(result, key);
}
return result;
};
/***/ }),
/* 58 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toIndexedObject = __webpack_require__(11);
var toAbsoluteIndex = __webpack_require__(59);
var lengthOfArrayLike = __webpack_require__(62);
// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
return function ($this, el, fromIndex) {
var O = toIndexedObject($this);
var length = lengthOfArrayLike(O);
var index = toAbsoluteIndex(fromIndex, length);
var value;
// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare -- NaN check
if (IS_INCLUDES && el !== el) while (length > index) {
value = O[index++];
// eslint-disable-next-line no-self-compare -- NaN check
if (value !== value) return true;
// Array#indexOf ignores holes, Array#includes - not
} else for (;length > index; index++) {
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
} return !IS_INCLUDES && -1;
};
};
module.exports = {
// `Array.prototype.includes` method
// https://tc39.es/ecma262/#sec-array.prototype.includes
includes: createMethod(true),
// `Array.prototype.indexOf` method
// https://tc39.es/ecma262/#sec-array.prototype.indexof
indexOf: createMethod(false)
};
/***/ }),
/* 59 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toIntegerOrInfinity = __webpack_require__(60);
var max = Math.max;
var min = Math.min;
// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
module.exports = function (index, length) {
var integer = toIntegerOrInfinity(index);
return integer < 0 ? max(integer + length, 0) : min(integer, length);
};
/***/ }),
/* 60 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var trunc = __webpack_require__(61);
// `ToIntegerOrInfinity` abstract operation
// https://tc39.es/ecma262/#sec-tointegerorinfinity
module.exports = function (argument) {
var number = +argument;
// eslint-disable-next-line no-self-compare -- NaN check
return number !== number || number === 0 ? 0 : trunc(number);
};
/***/ }),
/* 61 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ceil = Math.ceil;
var floor = Math.floor;
// `Math.trunc` method
// https://tc39.es/ecma262/#sec-math.trunc
// eslint-disable-next-line es/no-math-trunc -- safe
module.exports = Math.trunc || function trunc(x) {
var n = +x;
return (n > 0 ? floor : ceil)(n);
};
/***/ }),
/* 62 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toLength = __webpack_require__(63);
// `LengthOfArrayLike` abstract operation
// https://tc39.es/ecma262/#sec-lengthofarraylike
module.exports = function (obj) {
return toLength(obj.length);
};
/***/ }),
/* 63 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toIntegerOrInfinity = __webpack_require__(60);
var min = Math.min;
// `ToLength` abstract operation
// https://tc39.es/ecma262/#sec-tolength
module.exports = function (argument) {
var len = toIntegerOrInfinity(argument);
return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};
/***/ }),
/* 64 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// IE8- don't enum bug keys
module.exports = [
'constructor',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'toLocaleString',
'toString',
'valueOf'
];
/***/ }),
/* 65 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
exports.f = Object.getOwnPropertySymbols;
/***/ }),
/* 66 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(6);
var isCallable = __webpack_require__(20);
var replacement = /#|\.prototype\./;
var isForced = function (feature, detection) {
var value = data[normalize(feature)];
return value === POLYFILL ? true
: value === NATIVE ? false
: isCallable(detection) ? fails(detection)
: !!detection;
};
var normalize = isForced.normalize = function (string) {
return String(string).replace(replacement, '.').toLowerCase();
};
var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';
module.exports = isForced;
/***/ }),
/* 67 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(5);
var isArray = __webpack_require__(68);
var $TypeError = TypeError;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// Safari < 13 does not throw an error in this case
var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {
// makes no sense without proper strict mode support
if (this !== undefined) return true;
try {
// eslint-disable-next-line es/no-object-defineproperty -- safe
Object.defineProperty([], 'length', { writable: false }).length = 1;
} catch (error) {
return error instanceof TypeError;
}
}();
module.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
throw new $TypeError('Cannot set read only .length');
} return O.length = length;
} : function (O, length) {
return O.length = length;
};
/***/ }),
/* 68 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var classof = __webpack_require__(14);
// `IsArray` abstract operation
// https://tc39.es/ecma262/#sec-isarray
// eslint-disable-next-line es/no-array-isarray -- safe
module.exports = Array.isArray || function isArray(argument) {
return classof(argument) === 'Array';
};
/***/ }),
/* 69 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $TypeError = TypeError;
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
module.exports = function (it) {
if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
return it;
};
/***/ }),
/* 70 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(2);
var arrayToReversed = __webpack_require__(71);
var toIndexedObject = __webpack_require__(11);
var addToUnscopables = __webpack_require__(72);
var $Array = Array;
// `Array.prototype.toReversed` method
// https://tc39.es/ecma262/#sec-array.prototype.toreversed
$({ target: 'Array', proto: true }, {
toReversed: function toReversed() {
return arrayToReversed(toIndexedObject(this), $Array);
}
});
addToUnscopables('toReversed');
/***/ }),
/* 71 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var lengthOfArrayLike = __webpack_require__(62);
// https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.toReversed
// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toReversed
module.exports = function (O, C) {
var len = lengthOfArrayLike(O);
var A = new C(len);
var k = 0;
for (; k < len; k++) A[k] = O[len - k - 1];
return A;
};
/***/ }),
/* 72 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var wellKnownSymbol = __webpack_require__(32);
var create = __webpack_require__(73);
var defineProperty = __webpack_require__(43).f;
var UNSCOPABLES = wellKnownSymbol('unscopables');
var ArrayPrototype = Array.prototype;
// Array.prototype[@@unscopables]
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
if (ArrayPrototype[UNSCOPABLES] === undefined) {
defineProperty(ArrayPrototype, UNSCOPABLES, {
configurable: true,
value: create(null)
});
}
// add a key to Array.prototype[@@unscopables]
module.exports = function (key) {
ArrayPrototype[UNSCOPABLES][key] = true;
};
/***/ }),
/* 73 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* global ActiveXObject -- old IE, WSH */
var anObject = __webpack_require__(45);
var definePropertiesModule = __webpack_require__(74);
var enumBugKeys = __webpack_require__(64);
var hiddenKeys = __webpack_require__(53);
var html = __webpack_require__(76);
var documentCreateElement = __webpack_require__(41);
var sharedKey = __webpack_require__(52);
var GT = '>';
var LT = '<';
var PROTOTYPE = 'prototype';
var SCRIPT = 'script';
var IE_PROTO = sharedKey('IE_PROTO');
var EmptyConstructor = function () { /* empty */ };
var scriptTag = function (content) {
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
};
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
var NullProtoObjectViaActiveX = function (activeXDocument) {
activeXDocument.write(scriptTag(''));
activeXDocument.close();
var temp = activeXDocument.parentWindow.Object;
activeXDocument = null; // avoid memory leak
return temp;
};
// Create object with fake `null` prototype: use iframe Object with cleared prototype
var NullProtoObjectViaIFrame = function () {
// Thrash, waste and sodomy: IE GC bug
var iframe = documentCreateElement('iframe');
var JS = 'java' + SCRIPT + ':';
var iframeDocument;
iframe.style.display = 'none';
html.appendChild(iframe);
// https://github.com/zloirock/core-js/issues/475
iframe.src = String(JS);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(scriptTag('document.F=Object'));
iframeDocument.close();
return iframeDocument.F;
};
// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
// avoid IE GC bug
var activeXDocument;
var NullProtoObject = function () {
try {
activeXDocument = new ActiveXObject('htmlfile');
} catch (error) { /* ignore */ }
NullProtoObject = typeof document != 'undefined'
? document.domain && activeXDocument
? NullProtoObjectViaActiveX(activeXDocument) // old IE
: NullProtoObjectViaIFrame()
: NullProtoObjectViaActiveX(activeXDocument); // WSH
var length = enumBugKeys.length;
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
return NullProtoObject();
};
hiddenKeys[IE_PROTO] = true;
// `Object.create` method
// https://tc39.es/ecma262/#sec-object.create
// eslint-disable-next-line es/no-object-create -- safe
module.exports = Object.create || function create(O, Properties) {
var result;
if (O !== null) {
EmptyConstructor[PROTOTYPE] = anObject(O);
result = new EmptyConstructor();
EmptyConstructor[PROTOTYPE] = null;
// add "__proto__" for Object.getPrototypeOf polyfill
result[IE_PROTO] = O;
} else result = NullProtoObject();
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
};
/***/ }),
/* 74 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(5);
var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(44);
var definePropertyModule = __webpack_require__(43);
var anObject = __webpack_require__(45);
var toIndexedObject = __webpack_require__(11);
var objectKeys = __webpack_require__(75);
// `Object.defineProperties` method
// https://tc39.es/ecma262/#sec-object.defineproperties
// eslint-disable-next-line es/no-object-defineproperties -- safe
exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);
var props = toIndexedObject(Properties);
var keys = objectKeys(Properties);
var length = keys.length;
var index = 0;
var key;
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
return O;
};
/***/ }),
/* 75 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var internalObjectKeys = __webpack_require__(57);
var enumBugKeys = __webpack_require__(64);
// `Object.keys` method
// https://tc39.es/ecma262/#sec-object.keys
// eslint-disable-next-line es/no-object-keys -- safe
module.exports = Object.keys || function keys(O) {
return internalObjectKeys(O, enumBugKeys);
};
/***/ }),
/* 76 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getBuiltIn = __webpack_require__(22);
module.exports = getBuiltIn('document', 'documentElement');
/***/ }),
/* 77 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(2);
var uncurryThis = __webpack_require__(13);
var aCallable = __webpack_require__(29);
var toIndexedObject = __webpack_require__(11);
var arrayFromConstructorAndList = __webpack_require__(78);
var getBuiltInPrototypeMethod = __webpack_require__(79);
var addToUnscopables = __webpack_require__(72);
var $Array = Array;
var sort = uncurryThis(getBuiltInPrototypeMethod('Array', 'sort'));
// `Array.prototype.toSorted` method
// https://tc39.es/ecma262/#sec-array.prototype.tosorted
$({ target: 'Array', proto: true }, {
toSorted: function toSorted(compareFn) {
if (compareFn !== undefined) aCallable(compareFn);
var O = toIndexedObject(this);
var A = arrayFromConstructorAndList($Array, O);
return sort(A, compareFn);
}
});
addToUnscopables('toSorted');
/***/ }),
/* 78 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var lengthOfArrayLike = __webpack_require__(62);
module.exports = function (Constructor, list, $length) {
var index = 0;
var length = arguments.length > 2 ? $length : lengthOfArrayLike(list);
var result = new Constructor(length);
while (length > index) result[index] = list[index++];
return result;
};
/***/ }),
/* 79 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(3);
module.exports = function (CONSTRUCTOR, METHOD) {
var Constructor = global[CONSTRUCTOR];
var Prototype = Constructor && Constructor.prototype;
return Prototype && Prototype[METHOD];
};
/***/ }),
/* 80 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(2);
var addToUnscopables = __webpack_require__(72);
var doesNotExceedSafeInteger = __webpack_require__(69);
var lengthOfArrayLike = __webpack_require__(62);
var toAbsoluteIndex = __webpack_require__(59);
var toIndexedObject = __webpack_require__(11);
var toIntegerOrInfinity = __webpack_require__(60);
var $Array = Array;
var max = Math.max;
var min = Math.min;
// `Array.prototype.toSpliced` method
// https://tc39.es/ecma262/#sec-array.prototype.tospliced
$({ target: 'Array', proto: true }, {
toSpliced: function toSpliced(start, deleteCount /* , ...items */) {
var O = toIndexedObject(this);
var len = lengthOfArrayLike(O);
var actualStart = toAbsoluteIndex(start, len);
var argumentsLength = arguments.length;
var k = 0;
var insertCount, actualDeleteCount, newLen, A;
if (argumentsLength === 0) {
insertCount = actualDeleteCount = 0;
} else if (argumentsLength === 1) {
insertCount = 0;
actualDeleteCount = len - actualStart;
} else {
insertCount = argumentsLength - 2;
actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
}
newLen = doesNotExceedSafeInteger(len + insertCount - actualDeleteCount);
A = $Array(newLen);
for (; k < actualStart; k++) A[k] = O[k];
for (; k < actualStart + insertCount; k++) A[k] = arguments[k - actualStart + 2];
for (; k < newLen; k++) A[k] = O[k + actualDeleteCount - insertCount];
return A;
}
});
addToUnscopables('toSpliced');
/***/ }),
/* 81 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(2);
var arrayWith = __webpack_require__(82);
var toIndexedObject = __webpack_require__(11);
var $Array = Array;
// `Array.prototype.with` method
// https://tc39.es/ecma262/#sec-array.prototype.with
$({ target: 'Array', proto: true }, {
'with': function (index, value) {
return arrayWith(toIndexedObject(this), $Array, index, value);
}
});
/***/ }),
/* 82 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var lengthOfArrayLike = __webpack_require__(62);
var toIntegerOrInfinity = __webpack_require__(60);
var $RangeError = RangeError;
// https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.with
// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.with
module.exports = function (O, C, index, value) {
var len = lengthOfArrayLike(O);
var relativeIndex = toIntegerOrInfinity(index);
var actualIndex = relativeIndex < 0 ? len + relativeIndex : relativeIndex;
if (actualIndex >= len || actualIndex < 0) throw new $RangeError('Incorrect index');
var A = new C(len);
var k = 0;
for (; k < len; k++) A[k] = k === actualIndex ? value : O[k];
return A;
};
/***/ }),
/* 83 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(2);
var uncurryThis = __webpack_require__(13);
var aCallable = __webpack_require__(29);
var requireObjectCoercible = __webpack_require__(15);
var iterate = __webpack_require__(84);
var MapHelpers = __webpack_require__(94);
var IS_PURE = __webpack_require__(34);
var Map = MapHelpers.Map;
var has = MapHelpers.has;
var get = MapHelpers.get;
var set = MapHelpers.set;
var push = uncurryThis([].push);
// `Map.groupBy` method
// https://github.com/tc39/proposal-array-grouping
$({ target: 'Map', stat: true, forced: IS_PURE }, {
groupBy: function groupBy(items, callbackfn) {
requireObjectCoercible(items);
aCallable(callbackfn);
var map = new Map();
var k = 0;
iterate(items, function (value) {
var key = callbackfn(value, k++);
if (!has(map, key)) set(map, key, [value]);
else push(get(map, key), value);
});
return map;
}
});
/***/ }),
/* 84 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var bind = __webpack_require__(85);
var call = __webpack_require__(7);
var anObject = __webpack_require__(45);
var tryToString = __webpack_require__(30);
var isArrayIteratorMethod = __webpack_require__(87);
var lengthOfArrayLike = __webpack_require__(62);
var isPrototypeOf = __webpack_require__(23);
var getIterator = __webpack_require__(89);
var getIteratorMethod = __webpack_require__(90);
var iteratorClose = __webpack_require__(93);
var $TypeError = TypeError;
var Result = function (stopped, result) {
this.stopped = stopped;
this.result = result;
};
var ResultPrototype = Result.prototype;
module.exports = function (iterable, unboundFunction, options) {
var that = options && options.that;
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
var IS_RECORD = !!(options && options.IS_RECORD);
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
var INTERRUPTED = !!(options && options.INTERRUPTED);
var fn = bind(unboundFunction, that);
var iterator, iterFn, index, length, result, next, step;
var stop = function (condition) {
if (iterator) iteratorClose(iterator, 'normal', condition);
return new Result(true, condition);
};
var callFn = function (value) {
if (AS_ENTRIES) {
anObject(value);
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
} return INTERRUPTED ? fn(value, stop) : fn(value);
};
if (IS_RECORD) {
iterator = iterable.iterator;
} else if (IS_ITERATOR) {
iterator = iterable;
} else {
iterFn = getIteratorMethod(iterable);
if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');
// optimisation for array iterators
if (isArrayIteratorMethod(iterFn)) {
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
result = callFn(iterable[index]);
if (result && isPrototypeOf(ResultPrototype, result)) return result;
} return new Result(false);
}
iterator = getIterator(iterable, iterFn);
}
next = IS_RECORD ? iterable.next : iterator.next;
while (!(step = call(next, iterator)).done) {
try {
result = callFn(step.value);
} catch (error) {
iteratorClose(iterator, 'throw', error);
}
if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
} return new Result(false);
};
/***/ }),
/* 85 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(86);
var aCallable = __webpack_require__(29);
var NATIVE_BIND = __webpack_require__(8);
var bind = uncurryThis(uncurryThis.bind);
// optional / simple context binding
module.exports = function (fn, that) {
aCallable(fn);
return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
return fn.apply(that, arguments);
};
};
/***/ }),
/* 86 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var classofRaw = __webpack_require__(14);
var uncurryThis = __webpack_require__(13);
module.exports = function (fn) {
// Nashorn bug:
// https://github.com/zloirock/core-js/issues/1128
// https://github.com/zloirock/core-js/issues/1130
if (classofRaw(fn) === 'Function') return uncurryThis(fn);
};
/***/ }),
/* 87 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var wellKnownSymbol = __webpack_require__(32);
var Iterators = __webpack_require__(88);
var ITERATOR = wellKnownSymbol('iterator');
var ArrayPrototype = Array.prototype;
// check on default Array iterator
module.exports = function (it) {
return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
};
/***/ }),
/* 88 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = {};
/***/ }),
/* 89 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(7);
var aCallable = __webpack_require__(29);
var anObject = __webpack_require__(45);
var tryToString = __webpack_require__(30);
var getIteratorMethod = __webpack_require__(90);
var $TypeError = TypeError;
module.exports = function (argument, usingIterator) {
var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));
throw new $TypeError(tryToString(argument) + ' is not iterable');
};
/***/ }),
/* 90 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var classof = __webpack_require__(91);
var getMethod = __webpack_require__(28);
var isNullOrUndefined = __webpack_require__(16);
var Iterators = __webpack_require__(88);
var wellKnownSymbol = __webpack_require__(32);
var ITERATOR = wellKnownSymbol('iterator');
module.exports = function (it) {
if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR)
|| getMethod(it, '@@iterator')
|| Iterators[classof(it)];
};
/***/ }),
/* 91 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var TO_STRING_TAG_SUPPORT = __webpack_require__(92);
var isCallable = __webpack_require__(20);
var classofRaw = __webpack_require__(14);
var wellKnownSymbol = __webpack_require__(32);
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var $Object = Object;
// ES3 wrong here
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
try {
return it[key];
} catch (error) { /* empty */ }
};
// getting tag from ES6+ `Object.prototype.toString`
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
var O, tag, result;
return it === undefined ? 'Undefined' : it === null ? 'Null'
// @@toStringTag case
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
// builtinTag case
: CORRECT_ARGUMENTS ? classofRaw(O)
// ES3 arguments fallback
: (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
};
/***/ }),
/* 92 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var wellKnownSymbol = __webpack_require__(32);
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var test = {};
test[TO_STRING_TAG] = 'z';
module.exports = String(test) === '[object z]';
/***/ }),
/* 93 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(7);
var anObject = __webpack_require__(45);
var getMethod = __webpack_require__(28);
module.exports = function (iterator, kind, value) {
var innerResult, innerError;
anObject(iterator);
try {
innerResult = getMethod(iterator, 'return');
if (!innerResult) {
if (kind === 'throw') throw value;
return value;
}
innerResult = call(innerResult, iterator);
} catch (error) {
innerError = true;
innerResult = error;
}
if (kind === 'throw') throw value;
if (innerError) throw innerResult;
anObject(innerResult);
return value;
};
/***/ }),
/* 94 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(13);
// eslint-disable-next-line es/no-map -- safe
var MapPrototype = Map.prototype;
module.exports = {
// eslint-disable-next-line es/no-map -- safe
Map: Map,
set: uncurryThis(MapPrototype.set),
get: uncurryThis(MapPrototype.get),
has: uncurryThis(MapPrototype.has),
remove: uncurryThis(MapPrototype['delete']),
proto: MapPrototype
};
/***/ }),
/* 95 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(2);
var getBuiltIn = __webpack_require__(22);
var uncurryThis = __webpack_require__(13);
var aCallable = __webpack_require__(29);
var requireObjectCoercible = __webpack_require__(15);
var toPropertyKey = __webpack_require__(17);
var iterate = __webpack_require__(84);
var create = getBuiltIn('Object', 'create');
var push = uncurryThis([].push);
// `Object.groupBy` method
// https://github.com/tc39/proposal-array-grouping
$({ target: 'Object', stat: true }, {
groupBy: function groupBy(items, callbackfn) {
requireObjectCoercible(items);
aCallable(callbackfn);
var obj = create(null);
var k = 0;
iterate(items, function (value) {
var key = toPropertyKey(callbackfn(value, k++));
// in some IE versions, `hasOwnProperty` returns incorrect result on integer keys
// but since it's a `null` prototype object, we can safely use `in`
if (key in obj) push(obj[key], value);
else obj[key] = [value];
});
return obj;
}
});
/***/ }),
/* 96 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(2);
var newPromiseCapabilityModule = __webpack_require__(97);
// `Promise.withResolvers` method
// https://github.com/tc39/proposal-promise-with-resolvers
$({ target: 'Promise', stat: true }, {
withResolvers: function withResolvers() {
var promiseCapability = newPromiseCapabilityModule.f(this);
return {
promise: promiseCapability.promise,
resolve: promiseCapability.resolve,
reject: promiseCapability.reject
};
}
});
/***/ }),
/* 97 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aCallable = __webpack_require__(29);
var $TypeError = TypeError;
var PromiseCapability = function (C) {
var resolve, reject;
this.promise = new C(function ($$resolve, $$reject) {
if (resolve !== undefined || reject !== undefined) throw new $TypeError('Bad Promise constructor');
resolve = $$resolve;
reject = $$reject;
});
this.resolve = aCallable(resolve);
this.reject = aCallable(reject);
};
// `NewPromiseCapability` abstract operation
// https://tc39.es/ecma262/#sec-newpromisecapability
module.exports.f = function (C) {
return new PromiseCapability(C);
};
/***/ }),
/* 98 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(3);
var DESCRIPTORS = __webpack_require__(5);
var defineBuiltInAccessor = __webpack_require__(99);
var regExpFlags = __webpack_require__(100);
var fails = __webpack_require__(6);
// babel-minify and Closure Compiler transpiles RegExp('.', 'd') -> /./d and it causes SyntaxError
var RegExp = global.RegExp;
var RegExpPrototype = RegExp.prototype;
var FORCED = DESCRIPTORS && fails(function () {
var INDICES_SUPPORT = true;
try {
RegExp('.', 'd');
} catch (error) {
INDICES_SUPPORT = false;
}
var O = {};
// modern V8 bug
var calls = '';
var expected = INDICES_SUPPORT ? 'dgimsy' : 'gimsy';
var addGetter = function (key, chr) {
// eslint-disable-next-line es/no-object-defineproperty -- safe
Object.defineProperty(O, key, { get: function () {
calls += chr;
return true;
} });
};
var pairs = {
dotAll: 's',
global: 'g',
ignoreCase: 'i',
multiline: 'm',
sticky: 'y'
};
if (INDICES_SUPPORT) pairs.hasIndices = 'd';
for (var key in pairs) addGetter(key, pairs[key]);
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var result = Object.getOwnPropertyDescriptor(RegExpPrototype, 'flags').get.call(O);
return result !== expected || calls !== expected;
});
// `RegExp.prototype.flags` getter
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
if (FORCED) defineBuiltInAccessor(RegExpPrototype, 'flags', {
configurable: true,
get: regExpFlags
});
/***/ }),
/* 99 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var makeBuiltIn = __webpack_require__(47);
var defineProperty = __webpack_require__(43);
module.exports = function (target, name, descriptor) {
if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
return defineProperty.f(target, name, descriptor);
};
/***/ }),
/* 100 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(45);
// `RegExp.prototype.flags` getter implementation
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
module.exports = function () {
var that = anObject(this);
var result = '';
if (that.hasIndices) result += 'd';
if (that.global) result += 'g';
if (that.ignoreCase) result += 'i';
if (that.multiline) result += 'm';
if (that.dotAll) result += 's';
if (that.unicode) result += 'u';
if (that.unicodeSets) result += 'v';
if (that.sticky) result += 'y';
return result;
};
/***/ }),
/* 101 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(2);
var uncurryThis = __webpack_require__(13);
var requireObjectCoercible = __webpack_require__(15);
var toString = __webpack_require__(102);
var charCodeAt = uncurryThis(''.charCodeAt);
// `String.prototype.isWellFormed` method
// https://github.com/tc39/proposal-is-usv-string
$({ target: 'String', proto: true }, {
isWellFormed: function isWellFormed() {
var S = toString(requireObjectCoercible(this));
var length = S.length;
for (var i = 0; i < length; i++) {
var charCode = charCodeAt(S, i);
// single UTF-16 code unit
if ((charCode & 0xF800) !== 0xD800) continue;
// unpaired surrogate
if (charCode >= 0xDC00 || ++i >= length || (charCodeAt(S, i) & 0xFC00) !== 0xDC00) return false;
} return true;
}
});
/***/ }),
/* 102 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var classof = __webpack_require__(91);
var $String = String;
module.exports = function (argument) {
if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
return $String(argument);
};
/***/ }),
/* 103 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(2);
var call = __webpack_require__(7);
var uncurryThis = __webpack_require__(13);
var requireObjectCoercible = __webpack_require__(15);
var toString = __webpack_require__(102);
var fails = __webpack_require__(6);
var $Array = Array;
var charAt = uncurryThis(''.charAt);
var charCodeAt = uncurryThis(''.charCodeAt);
var join = uncurryThis([].join);
// eslint-disable-next-line es/no-string-prototype-iswellformed-towellformed -- safe
var $toWellFormed = ''.toWellFormed;
var REPLACEMENT_CHARACTER = '\uFFFD';
// Safari bug
var TO_STRING_CONVERSION_BUG = $toWellFormed && fails(function () {
return call($toWellFormed, 1) !== '1';
});
// `String.prototype.toWellFormed` method
// https://github.com/tc39/proposal-is-usv-string
$({ target: 'String', proto: true, forced: TO_STRING_CONVERSION_BUG }, {
toWellFormed: function toWellFormed() {
var S = toString(requireObjectCoercible(this));
if (TO_STRING_CONVERSION_BUG) return call($toWellFormed, S);
var length = S.length;
var result = $Array(length);
for (var i = 0; i < length; i++) {
var charCode = charCodeAt(S, i);
// single UTF-16 code unit
if ((charCode & 0xF800) !== 0xD800) result[i] = charAt(S, i);
// unpaired surrogate
else if (charCode >= 0xDC00 || i + 1 >= length || (charCodeAt(S, i + 1) & 0xFC00) !== 0xDC00) result[i] = REPLACEMENT_CHARACTER;
// surrogate pair
else {
result[i] = charAt(S, i);
result[++i] = charAt(S, i);
}
} return join(result, '');
}
});
/***/ }),
/* 104 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var arrayToReversed = __webpack_require__(71);
var ArrayBufferViewCore = __webpack_require__(105);
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;
// `%TypedArray%.prototype.toReversed` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.toreversed
exportTypedArrayMethod('toReversed', function toReversed() {
return arrayToReversed(aTypedArray(this), getTypedArrayConstructor(this));
});
/***/ }),
/* 105 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var NATIVE_ARRAY_BUFFER = __webpack_require__(106);
var DESCRIPTORS = __webpack_require__(5);
var global = __webpack_require__(3);
var isCallable = __webpack_require__(20);
var isObject = __webpack_require__(19);
var hasOwn = __webpack_require__(37);
var classof = __webpack_require__(91);
var tryToString = __webpack_require__(30);
var createNonEnumerableProperty = __webpack_require__(42);
var defineBuiltIn = __webpack_require__(46);
var defineBuiltInAccessor = __webpack_require__(99);
var isPrototypeOf = __webpack_require__(23);
var getPrototypeOf = __webpack_require__(107);
var setPrototypeOf = __webpack_require__(109);
var wellKnownSymbol = __webpack_require__(32);
var uid = __webpack_require__(39);
var InternalStateModule = __webpack_require__(50);
var enforceInternalState = InternalStateModule.enforce;
var getInternalState = InternalStateModule.get;
var Int8Array = global.Int8Array;
var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
var Uint8ClampedArray = global.Uint8ClampedArray;
var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
var TypedArray = Int8Array && getPrototypeOf(Int8Array);
var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);
var ObjectPrototype = Object.prototype;
var TypeError = global.TypeError;
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';
var TYPED_ARRAY_TAG_REQUIRED = false;
var NAME, Constructor, Prototype;
var TypedArrayConstructorsList = {
Int8Array: 1,
Uint8Array: 1,
Uint8ClampedArray: 1,
Int16Array: 2,
Uint16Array: 2,
Int32Array: 4,
Uint32Array: 4,
Float32Array: 4,
Float64Array: 8
};
var BigIntArrayConstructorsList = {
BigInt64Array: 8,
BigUint64Array: 8
};
var isView = function isView(it) {
if (!isObject(it)) return false;
var klass = classof(it);
return klass === 'DataView'
|| hasOwn(TypedArrayConstructorsList, klass)
|| hasOwn(BigIntArrayConstructorsList, klass);
};
var getTypedArrayConstructor = function (it) {
var proto = getPrototypeOf(it);
if (!isObject(proto)) return;
var state = getInternalState(proto);
return (state && hasOwn(state, TYPED_ARRAY_CONSTRUCTOR)) ? state[TYPED_ARRAY_CONSTRUCTOR] : getTypedArrayConstructor(proto);
};
var isTypedArray = function (it) {
if (!isObject(it)) return false;
var klass = classof(it);
return hasOwn(TypedArrayConstructorsList, klass)
|| hasOwn(BigIntArrayConstructorsList, klass);
};
var aTypedArray = function (it) {
if (isTypedArray(it)) return it;
throw new TypeError('Target is not a typed array');
};
var aTypedArrayConstructor = function (C) {
if (isCallable(C) && (!setPrototypeOf || isPrototypeOf(TypedArray, C))) return C;
throw new TypeError(tryToString(C) + ' is not a typed array constructor');
};
var exportTypedArrayMethod = function (KEY, property, forced, options) {
if (!DESCRIPTORS) return;
if (forced) for (var ARRAY in TypedArrayConstructorsList) {
var TypedArrayConstructor = global[ARRAY];
if (TypedArrayConstructor && hasOwn(TypedArrayConstructor.prototype, KEY)) try {
delete TypedArrayConstructor.prototype[KEY];
} catch (error) {
// old WebKit bug - some methods are non-configurable
try {
TypedArrayConstructor.prototype[KEY] = property;
} catch (error2) { /* empty */ }
}
}
if (!TypedArrayPrototype[KEY] || forced) {
defineBuiltIn(TypedArrayPrototype, KEY, forced ? property
: NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);
}
};
var exportTypedArrayStaticMethod = function (KEY, property, forced) {
var ARRAY, TypedArrayConstructor;
if (!DESCRIPTORS) return;
if (setPrototypeOf) {
if (forced) for (ARRAY in TypedArrayConstructorsList) {
TypedArrayConstructor = global[ARRAY];
if (TypedArrayConstructor && hasOwn(TypedArrayConstructor, KEY)) try {
delete TypedArrayConstructor[KEY];
} catch (error) { /* empty */ }
}
if (!TypedArray[KEY] || forced) {
// V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
try {
return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);
} catch (error) { /* empty */ }
} else return;
}
for (ARRAY in TypedArrayConstructorsList) {
TypedArrayConstructor = global[ARRAY];
if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
defineBuiltIn(TypedArrayConstructor, KEY, property);
}
}
};
for (NAME in TypedArrayConstructorsList) {
Constructor = global[NAME];
Prototype = Constructor && Constructor.prototype;
if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;
else NATIVE_ARRAY_BUFFER_VIEWS = false;
}
for (NAME in BigIntArrayConstructorsList) {
Constructor = global[NAME];
Prototype = Constructor && Constructor.prototype;
if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;
}
// WebKit bug - typed arrays constructors prototype is Object.prototype
if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
// eslint-disable-next-line no-shadow -- safe
TypedArray = function TypedArray() {
throw new TypeError('Incorrect invocation');
};
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);
}
}
if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {
TypedArrayPrototype = TypedArray.prototype;
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);
}
}
// WebKit bug - one more object in Uint8ClampedArray prototype chain
if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
}
if (DESCRIPTORS && !hasOwn(TypedArrayPrototype, TO_STRING_TAG)) {
TYPED_ARRAY_TAG_REQUIRED = true;
defineBuiltInAccessor(TypedArrayPrototype, TO_STRING_TAG, {
configurable: true,
get: function () {
return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
}
});
for (NAME in TypedArrayConstructorsList) if (global[NAME]) {
createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);
}
}
module.exports = {
NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,
aTypedArray: aTypedArray,
aTypedArrayConstructor: aTypedArrayConstructor,
exportTypedArrayMethod: exportTypedArrayMethod,
exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
getTypedArrayConstructor: getTypedArrayConstructor,
isView: isView,
isTypedArray: isTypedArray,
TypedArray: TypedArray,
TypedArrayPrototype: TypedArrayPrototype
};
/***/ }),
/* 106 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// eslint-disable-next-line es/no-typed-arrays -- safe
module.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
/***/ }),
/* 107 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var hasOwn = __webpack_require__(37);
var isCallable = __webpack_require__(20);
var toObject = __webpack_require__(38);
var sharedKey = __webpack_require__(52);
var CORRECT_PROTOTYPE_GETTER = __webpack_require__(108);
var IE_PROTO = sharedKey('IE_PROTO');
var $Object = Object;
var ObjectPrototype = $Object.prototype;
// `Object.getPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.getprototypeof
// eslint-disable-next-line es/no-object-getprototypeof -- safe
module.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
var object = toObject(O);
if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
var constructor = object.constructor;
if (isCallable(constructor) && object instanceof constructor) {
return constructor.prototype;
} return object instanceof $Object ? ObjectPrototype : null;
};
/***/ }),
/* 108 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(6);
module.exports = !fails(function () {
function F() { /* empty */ }
F.prototype.constructor = null;
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
return Object.getPrototypeOf(new F()) !== F.prototype;
});
/***/ }),
/* 109 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint-disable no-proto -- safe */
var uncurryThisAccessor = __webpack_require__(110);
var anObject = __webpack_require__(45);
var aPossiblePrototype = __webpack_require__(111);
// `Object.setPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
// eslint-disable-next-line es/no-object-setprototypeof -- safe
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
var CORRECT_SETTER = false;
var test = {};
var setter;
try {
setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
setter(test, []);
CORRECT_SETTER = test instanceof Array;
} catch (error) { /* empty */ }
return function setPrototypeOf(O, proto) {
anObject(O);
aPossiblePrototype(proto);
if (CORRECT_SETTER) setter(O, proto);
else O.__proto__ = proto;
return O;
};
}() : undefined);
/***/ }),
/* 110 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(13);
var aCallable = __webpack_require__(29);
module.exports = function (object, key, method) {
try {
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
} catch (error) { /* empty */ }
};
/***/ }),
/* 111 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isPossiblePrototype = __webpack_require__(112);
var $String = String;
var $TypeError = TypeError;
module.exports = function (argument) {
if (isPossiblePrototype(argument)) return argument;
throw new $TypeError("Can't set " + $String(argument) + ' as a prototype');
};
/***/ }),
/* 112 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isObject = __webpack_require__(19);
module.exports = function (argument) {
return isObject(argument) || argument === null;
};
/***/ }),
/* 113 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(105);
var uncurryThis = __webpack_require__(13);
var aCallable = __webpack_require__(29);
var arrayFromConstructorAndList = __webpack_require__(78);
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var sort = uncurryThis(ArrayBufferViewCore.TypedArrayPrototype.sort);
// `%TypedArray%.prototype.toSorted` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tosorted
exportTypedArrayMethod('toSorted', function toSorted(compareFn) {
if (compareFn !== undefined) aCallable(compareFn);
var O = aTypedArray(this);
var A = arrayFromConstructorAndList(getTypedArrayConstructor(O), O);
return sort(A, compareFn);
});
/***/ }),
/* 114 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var arrayWith = __webpack_require__(82);
var ArrayBufferViewCore = __webpack_require__(105);
var isBigIntArray = __webpack_require__(115);
var toIntegerOrInfinity = __webpack_require__(60);
var toBigInt = __webpack_require__(116);
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var PROPER_ORDER = !!function () {
try {
// eslint-disable-next-line no-throw-literal, es/no-typed-arrays, es/no-array-prototype-with -- required for testing
new Int8Array(1)['with'](2, { valueOf: function () { throw 8; } });
} catch (error) {
// some early implementations, like WebKit, does not follow the final semantic
// https://github.com/tc39/proposal-change-array-by-copy/pull/86
return error === 8;
}
}();
// `%TypedArray%.prototype.with` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.with
exportTypedArrayMethod('with', { 'with': function (index, value) {
var O = aTypedArray(this);
var relativeIndex = toIntegerOrInfinity(index);
var actualValue = isBigIntArray(O) ? toBigInt(value) : +value;
return arrayWith(O, getTypedArrayConstructor(O), relativeIndex, actualValue);
} }['with'], !PROPER_ORDER);
/***/ }),
/* 115 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var classof = __webpack_require__(91);
module.exports = function (it) {
var klass = classof(it);
return klass === 'BigInt64Array' || klass === 'BigUint64Array';
};
/***/ }),
/* 116 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toPrimitive = __webpack_require__(18);
var $TypeError = TypeError;
// `ToBigInt` abstract operation
// https://tc39.es/ecma262/#sec-tobigint
module.exports = function (argument) {
var prim = toPrimitive(argument, 'number');
if (typeof prim == 'number') throw new $TypeError("Can't convert number to bigint");
// eslint-disable-next-line es/no-bigint -- safe
return BigInt(prim);
};
/***/ }),
/* 117 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(2);
var global = __webpack_require__(3);
var getBuiltIn = __webpack_require__(22);
var createPropertyDescriptor = __webpack_require__(10);
var defineProperty = __webpack_require__(43).f;
var hasOwn = __webpack_require__(37);
var anInstance = __webpack_require__(118);
var inheritIfRequired = __webpack_require__(119);
var normalizeStringArgument = __webpack_require__(120);
var DOMExceptionConstants = __webpack_require__(121);
var clearErrorStack = __webpack_require__(122);
var DESCRIPTORS = __webpack_require__(5);
var IS_PURE = __webpack_require__(34);
var DOM_EXCEPTION = 'DOMException';
var Error = getBuiltIn('Error');
var NativeDOMException = getBuiltIn(DOM_EXCEPTION);
var $DOMException = function DOMException() {
anInstance(this, DOMExceptionPrototype);
var argumentsLength = arguments.length;
var message = normalizeStringArgument(argumentsLength < 1 ? undefined : arguments[0]);
var name = normalizeStringArgument(argumentsLength < 2 ? undefined : arguments[1], 'Error');
var that = new NativeDOMException(message, name);
var error = new Error(message);
error.name = DOM_EXCEPTION;
defineProperty(that, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1)));
inheritIfRequired(that, this, $DOMException);
return that;
};
var DOMExceptionPrototype = $DOMException.prototype = NativeDOMException.prototype;
var ERROR_HAS_STACK = 'stack' in new Error(DOM_EXCEPTION);
var DOM_EXCEPTION_HAS_STACK = 'stack' in new NativeDOMException(1, 2);
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var descriptor = NativeDOMException && DESCRIPTORS && Object.getOwnPropertyDescriptor(global, DOM_EXCEPTION);
// Bun ~ 0.1.1 DOMException have incorrect descriptor and we can't redefine it
// https://github.com/Jarred-Sumner/bun/issues/399
var BUGGY_DESCRIPTOR = !!descriptor && !(descriptor.writable && descriptor.configurable);
var FORCED_CONSTRUCTOR = ERROR_HAS_STACK && !BUGGY_DESCRIPTOR && !DOM_EXCEPTION_HAS_STACK;
// `DOMException` constructor patch for `.stack` where it's required
// https://webidl.spec.whatwg.org/#es-DOMException-specialness
$({ global: true, constructor: true, forced: IS_PURE || FORCED_CONSTRUCTOR }, { // TODO: fix export logic
DOMException: FORCED_CONSTRUCTOR ? $DOMException : NativeDOMException
});
var PolyfilledDOMException = getBuiltIn(DOM_EXCEPTION);
var PolyfilledDOMExceptionPrototype = PolyfilledDOMException.prototype;
if (PolyfilledDOMExceptionPrototype.constructor !== PolyfilledDOMException) {
if (!IS_PURE) {
defineProperty(PolyfilledDOMExceptionPrototype, 'constructor', createPropertyDescriptor(1, PolyfilledDOMException));
}
for (var key in DOMExceptionConstants) if (hasOwn(DOMExceptionConstants, key)) {
var constant = DOMExceptionConstants[key];
var constantName = constant.s;
if (!hasOwn(PolyfilledDOMException, constantName)) {
defineProperty(PolyfilledDOMException, constantName, createPropertyDescriptor(6, constant.c));
}
}
}
/***/ }),
/* 118 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isPrototypeOf = __webpack_require__(23);
var $TypeError = TypeError;
module.exports = function (it, Prototype) {
if (isPrototypeOf(Prototype, it)) return it;
throw new $TypeError('Incorrect invocation');
};
/***/ }),
/* 119 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isCallable = __webpack_require__(20);
var isObject = __webpack_require__(19);
var setPrototypeOf = __webpack_require__(109);
// makes subclassing work correct for wrapped built-ins
module.exports = function ($this, dummy, Wrapper) {
var NewTarget, NewTargetPrototype;
if (
// it can work only with native `setPrototypeOf`
setPrototypeOf &&
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
isCallable(NewTarget = dummy.constructor) &&
NewTarget !== Wrapper &&
isObject(NewTargetPrototype = NewTarget.prototype) &&
NewTargetPrototype !== Wrapper.prototype
) setPrototypeOf($this, NewTargetPrototype);
return $this;
};
/***/ }),
/* 120 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toString = __webpack_require__(102);
module.exports = function (argument, $default) {
return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
};
/***/ }),
/* 121 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = {
IndexSizeError: { s: 'INDEX_SIZE_ERR', c: 1, m: 1 },
DOMStringSizeError: { s: 'DOMSTRING_SIZE_ERR', c: 2, m: 0 },
HierarchyRequestError: { s: 'HIERARCHY_REQUEST_ERR', c: 3, m: 1 },
WrongDocumentError: { s: 'WRONG_DOCUMENT_ERR', c: 4, m: 1 },
InvalidCharacterError: { s: 'INVALID_CHARACTER_ERR', c: 5, m: 1 },
NoDataAllowedError: { s: 'NO_DATA_ALLOWED_ERR', c: 6, m: 0 },
NoModificationAllowedError: { s: 'NO_MODIFICATION_ALLOWED_ERR', c: 7, m: 1 },
NotFoundError: { s: 'NOT_FOUND_ERR', c: 8, m: 1 },
NotSupportedError: { s: 'NOT_SUPPORTED_ERR', c: 9, m: 1 },
InUseAttributeError: { s: 'INUSE_ATTRIBUTE_ERR', c: 10, m: 1 },
InvalidStateError: { s: 'INVALID_STATE_ERR', c: 11, m: 1 },
SyntaxError: { s: 'SYNTAX_ERR', c: 12, m: 1 },
InvalidModificationError: { s: 'INVALID_MODIFICATION_ERR', c: 13, m: 1 },
NamespaceError: { s: 'NAMESPACE_ERR', c: 14, m: 1 },
InvalidAccessError: { s: 'INVALID_ACCESS_ERR', c: 15, m: 1 },
ValidationError: { s: 'VALIDATION_ERR', c: 16, m: 0 },
TypeMismatchError: { s: 'TYPE_MISMATCH_ERR', c: 17, m: 1 },
SecurityError: { s: 'SECURITY_ERR', c: 18, m: 1 },
NetworkError: { s: 'NETWORK_ERR', c: 19, m: 1 },
AbortError: { s: 'ABORT_ERR', c: 20, m: 1 },
URLMismatchError: { s: 'URL_MISMATCH_ERR', c: 21, m: 1 },
QuotaExceededError: { s: 'QUOTA_EXCEEDED_ERR', c: 22, m: 1 },
TimeoutError: { s: 'TIMEOUT_ERR', c: 23, m: 1 },
InvalidNodeTypeError: { s: 'INVALID_NODE_TYPE_ERR', c: 24, m: 1 },
DataCloneError: { s: 'DATA_CLONE_ERR', c: 25, m: 1 }
};
/***/ }),
/* 122 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(13);
var $Error = Error;
var replace = uncurryThis(''.replace);
var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
// eslint-disable-next-line redos/no-vulnerable -- safe
var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
module.exports = function (stack, dropEntries) {
if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
} return stack;
};
/***/ }),
/* 123 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var IS_PURE = __webpack_require__(34);
var $ = __webpack_require__(2);
var global = __webpack_require__(3);
var getBuiltIn = __webpack_require__(22);
var uncurryThis = __webpack_require__(13);
var fails = __webpack_require__(6);
var uid = __webpack_require__(39);
var isCallable = __webpack_require__(20);
var isConstructor = __webpack_require__(124);
var isNullOrUndefined = __webpack_require__(16);
var isObject = __webpack_require__(19);
var isSymbol = __webpack_require__(21);
var iterate = __webpack_require__(84);
var anObject = __webpack_require__(45);
var classof = __webpack_require__(91);
var hasOwn = __webpack_require__(37);
var createProperty = __webpack_require__(125);
var createNonEnumerableProperty = __webpack_require__(42);
var lengthOfArrayLike = __webpack_require__(62);
var validateArgumentsLength = __webpack_require__(126);
var getRegExpFlags = __webpack_require__(127);
var MapHelpers = __webpack_require__(94);
var SetHelpers = __webpack_require__(128);
var setIterate = __webpack_require__(129);
var detachTransferable = __webpack_require__(131);
var ERROR_STACK_INSTALLABLE = __webpack_require__(137);
var PROPER_STRUCTURED_CLONE_TRANSFER = __webpack_require__(134);
var Object = global.Object;
var Array = global.Array;
var Date = global.Date;
var Error = global.Error;
var TypeError = global.TypeError;
var PerformanceMark = global.PerformanceMark;
var DOMException = getBuiltIn('DOMException');
var Map = MapHelpers.Map;
var mapHas = MapHelpers.has;
var mapGet = MapHelpers.get;
var mapSet = MapHelpers.set;
var Set = SetHelpers.Set;
var setAdd = SetHelpers.add;
var setHas = SetHelpers.has;
var objectKeys = getBuiltIn('Object', 'keys');
var push = uncurryThis([].push);
var thisBooleanValue = uncurryThis(true.valueOf);
var thisNumberValue = uncurryThis(1.0.valueOf);
var thisStringValue = uncurryThis(''.valueOf);
var thisTimeValue = uncurryThis(Date.prototype.getTime);
var PERFORMANCE_MARK = uid('structuredClone');
var DATA_CLONE_ERROR = 'DataCloneError';
var TRANSFERRING = 'Transferring';
var checkBasicSemantic = function (structuredCloneImplementation) {
return !fails(function () {
var set1 = new global.Set([7]);
var set2 = structuredCloneImplementation(set1);
var number = structuredCloneImplementation(Object(7));
return set2 === set1 || !set2.has(7) || !isObject(number) || +number !== 7;
}) && structuredCloneImplementation;
};
var checkErrorsCloning = function (structuredCloneImplementation, $Error) {
return !fails(function () {
var error = new $Error();
var test = structuredCloneImplementation({ a: error, b: error });
return !(test && test.a === test.b && test.a instanceof $Error && test.a.stack === error.stack);
});
};
// https://github.com/whatwg/html/pull/5749
var checkNewErrorsCloningSemantic = function (structuredCloneImplementation) {
return !fails(function () {
var test = structuredCloneImplementation(new global.AggregateError([1], PERFORMANCE_MARK, { cause: 3 }));
return test.name !== 'AggregateError' || test.errors[0] !== 1 || test.message !== PERFORMANCE_MARK || test.cause !== 3;
});
};
// FF94+, Safari 15.4+, Chrome 98+, NodeJS 17.0+, Deno 1.13+
// FF<103 and Safari implementations can't clone errors
// https://bugzilla.mozilla.org/show_bug.cgi?id=1556604
// FF103 can clone errors, but `.stack` of clone is an empty string
// https://bugzilla.mozilla.org/show_bug.cgi?id=1778762
// FF104+ fixed it on usual errors, but not on DOMExceptions
// https://bugzilla.mozilla.org/show_bug.cgi?id=1777321
// Chrome <102 returns `null` if cloned object contains multiple references to one error
// https://bugs.chromium.org/p/v8/issues/detail?id=12542
// NodeJS implementation can't clone DOMExceptions
// https://github.com/nodejs/node/issues/41038
// only FF103+ supports new (html/5749) error cloning semantic
var nativeStructuredClone = global.structuredClone;
var FORCED_REPLACEMENT = IS_PURE
|| !checkErrorsCloning(nativeStructuredClone, Error)
|| !checkErrorsCloning(nativeStructuredClone, DOMException)
|| !checkNewErrorsCloningSemantic(nativeStructuredClone);
// Chrome 82+, Safari 14.1+, Deno 1.11+
// Chrome 78-81 implementation swaps `.name` and `.message` of cloned `DOMException`
// Chrome returns `null` if cloned object contains multiple references to one error
// Safari 14.1 implementation doesn't clone some `RegExp` flags, so requires a workaround
// Safari implementation can't clone errors
// Deno 1.2-1.10 implementations too naive
// NodeJS 16.0+ does not have `PerformanceMark` constructor
// NodeJS <17.2 structured cloning implementation from `performance.mark` is too naive
// and can't clone, for example, `RegExp` or some boxed primitives
// https://github.com/nodejs/node/issues/40840
// no one of those implementations supports new (html/5749) error cloning semantic
var structuredCloneFromMark = !nativeStructuredClone && checkBasicSemantic(function (value) {
return new PerformanceMark(PERFORMANCE_MARK, { detail: value }).detail;
});
var nativeRestrictedStructuredClone = checkBasicSemantic(nativeStructuredClone) || structuredCloneFromMark;
var throwUncloneable = function (type) {
throw new DOMException('Uncloneable type: ' + type, DATA_CLONE_ERROR);
};
var throwUnpolyfillable = function (type, action) {
throw new DOMException((action || 'Cloning') + ' of ' + type + ' cannot be properly polyfilled in this engine', DATA_CLONE_ERROR);
};
var tryNativeRestrictedStructuredClone = function (value, type) {
if (!nativeRestrictedStructuredClone) throwUnpolyfillable(type);
return nativeRestrictedStructuredClone(value);
};
var createDataTransfer = function () {
var dataTransfer;
try {
dataTransfer = new global.DataTransfer();
} catch (error) {
try {
dataTransfer = new global.ClipboardEvent('').clipboardData;
} catch (error2) { /* empty */ }
}
return dataTransfer && dataTransfer.items && dataTransfer.files ? dataTransfer : null;
};
var cloneBuffer = function (value, map, $type) {
if (mapHas(map, value)) return mapGet(map, value);
var type = $type || classof(value);
var clone, length, options, source, target, i;
if (type === 'SharedArrayBuffer') {
if (nativeRestrictedStructuredClone) clone = nativeRestrictedStructuredClone(value);
// SharedArrayBuffer should use shared memory, we can't polyfill it, so return the original
else clone = value;
} else {
var DataView = global.DataView;
// `ArrayBuffer#slice` is not available in IE10
// `ArrayBuffer#slice` and `DataView` are not available in old FF
if (!DataView && !isCallable(value.slice)) throwUnpolyfillable('ArrayBuffer');
// detached buffers throws in `DataView` and `.slice`
try {
if (isCallable(value.slice) && !value.resizable) {
clone = value.slice(0);
} else {
length = value.byteLength;
options = 'maxByteLength' in value ? { maxByteLength: value.maxByteLength } : undefined;
// eslint-disable-next-line es/no-resizable-and-growable-arraybuffers -- safe
clone = new ArrayBuffer(length, options);
source = new DataView(value);
target = new DataView(clone);
for (i = 0; i < length; i++) {
target.setUint8(i, source.getUint8(i));
}
}
} catch (error) {
throw new DOMException('ArrayBuffer is detached', DATA_CLONE_ERROR);
}
}
mapSet(map, value, clone);
return clone;
};
var cloneView = function (value, type, offset, length, map) {
var C = global[type];
// in some old engines like Safari 9, typeof C is 'object'
// on Uint8ClampedArray or some other constructors
if (!isObject(C)) throwUnpolyfillable(type);
return new C(cloneBuffer(value.buffer, map), offset, length);
};
var structuredCloneInternal = function (value, map) {
if (isSymbol(value)) throwUncloneable('Symbol');
if (!isObject(value)) return value;
// effectively preserves circular references
if (map) {
if (mapHas(map, value)) return mapGet(map, value);
} else map = new Map();
var type = classof(value);
var C, name, cloned, dataTransfer, i, length, keys, key;
switch (type) {
case 'Array':
cloned = Array(lengthOfArrayLike(value));
break;
case 'Object':
cloned = {};
break;
case 'Map':
cloned = new Map();
break;
case 'Set':
cloned = new Set();
break;
case 'RegExp':
// in this block because of a Safari 14.1 bug
// old FF does not clone regexes passed to the constructor, so get the source and flags directly
cloned = new RegExp(value.source, getRegExpFlags(value));
break;
case 'Error':
name = value.name;
switch (name) {
case 'AggregateError':
cloned = new (getBuiltIn(name))([]);
break;
case 'EvalError':
case 'RangeError':
case 'ReferenceError':
case 'SuppressedError':
case 'SyntaxError':
case 'TypeError':
case 'URIError':
cloned = new (getBuiltIn(name))();
break;
case 'CompileError':
case 'LinkError':
case 'RuntimeError':
cloned = new (getBuiltIn('WebAssembly', name))();
break;
default:
cloned = new Error();
}
break;
case 'DOMException':
cloned = new DOMException(value.message, value.name);
break;
case 'ArrayBuffer':
case 'SharedArrayBuffer':
cloned = cloneBuffer(value, map, type);
break;
case 'DataView':
case 'Int8Array':
case 'Uint8Array':
case 'Uint8ClampedArray':
case 'Int16Array':
case 'Uint16Array':
case 'Int32Array':
case 'Uint32Array':
case 'Float16Array':
case 'Float32Array':
case 'Float64Array':
case 'BigInt64Array':
case 'BigUint64Array':
length = type === 'DataView' ? value.byteLength : value.length;
cloned = cloneView(value, type, value.byteOffset, length, map);
break;
case 'DOMQuad':
try {
cloned = new DOMQuad(
structuredCloneInternal(value.p1, map),
structuredCloneInternal(value.p2, map),
structuredCloneInternal(value.p3, map),
structuredCloneInternal(value.p4, map)
);
} catch (error) {
cloned = tryNativeRestrictedStructuredClone(value, type);
}
break;
case 'File':
if (nativeRestrictedStructuredClone) try {
cloned = nativeRestrictedStructuredClone(value);
// NodeJS 20.0.0 bug, https://github.com/nodejs/node/issues/47612
if (classof(cloned) !== type) cloned = undefined;
} catch (error) { /* empty */ }
if (!cloned) try {
cloned = new File([value], value.name, value);
} catch (error) { /* empty */ }
if (!cloned) throwUnpolyfillable(type);
break;
case 'FileList':
dataTransfer = createDataTransfer();
if (dataTransfer) {
for (i = 0, length = lengthOfArrayLike(value); i < length; i++) {
dataTransfer.items.add(structuredCloneInternal(value[i], map));
}
cloned = dataTransfer.files;
} else cloned = tryNativeRestrictedStructuredClone(value, type);
break;
case 'ImageData':
// Safari 9 ImageData is a constructor, but typeof ImageData is 'object'
try {
cloned = new ImageData(
structuredCloneInternal(value.data, map),
value.width,
value.height,
{ colorSpace: value.colorSpace }
);
} catch (error) {
cloned = tryNativeRestrictedStructuredClone(value, type);
} break;
default:
if (nativeRestrictedStructuredClone) {
cloned = nativeRestrictedStructuredClone(value);
} else switch (type) {
case 'BigInt':
// can be a 3rd party polyfill
cloned = Object(value.valueOf());
break;
case 'Boolean':
cloned = Object(thisBooleanValue(value));
break;
case 'Number':
cloned = Object(thisNumberValue(value));
break;
case 'String':
cloned = Object(thisStringValue(value));
break;
case 'Date':
cloned = new Date(thisTimeValue(value));
break;
case 'Blob':
try {
cloned = value.slice(0, value.size, value.type);
} catch (error) {
throwUnpolyfillable(type);
} break;
case 'DOMPoint':
case 'DOMPointReadOnly':
C = global[type];
try {
cloned = C.fromPoint
? C.fromPoint(value)
: new C(value.x, value.y, value.z, value.w);
} catch (error) {
throwUnpolyfillable(type);
} break;
case 'DOMRect':
case 'DOMRectReadOnly':
C = global[type];
try {
cloned = C.fromRect
? C.fromRect(value)
: new C(value.x, value.y, value.width, value.height);
} catch (error) {
throwUnpolyfillable(type);
} break;
case 'DOMMatrix':
case 'DOMMatrixReadOnly':
C = global[type];
try {
cloned = C.fromMatrix
? C.fromMatrix(value)
: new C(value);
} catch (error) {
throwUnpolyfillable(type);
} break;
case 'AudioData':
case 'VideoFrame':
if (!isCallable(value.clone)) throwUnpolyfillable(type);
try {
cloned = value.clone();
} catch (error) {
throwUncloneable(type);
} break;
case 'CropTarget':
case 'CryptoKey':
case 'FileSystemDirectoryHandle':
case 'FileSystemFileHandle':
case 'FileSystemHandle':
case 'GPUCompilationInfo':
case 'GPUCompilationMessage':
case 'ImageBitmap':
case 'RTCCertificate':
case 'WebAssembly.Module':
throwUnpolyfillable(type);
// break omitted
default:
throwUncloneable(type);
}
}
mapSet(map, value, cloned);
switch (type) {
case 'Array':
case 'Object':
keys = objectKeys(value);
for (i = 0, length = lengthOfArrayLike(keys); i < length; i++) {
key = keys[i];
createProperty(cloned, key, structuredCloneInternal(value[key], map));
} break;
case 'Map':
value.forEach(function (v, k) {
mapSet(cloned, structuredCloneInternal(k, map), structuredCloneInternal(v, map));
});
break;
case 'Set':
value.forEach(function (v) {
setAdd(cloned, structuredCloneInternal(v, map));
});
break;
case 'Error':
createNonEnumerableProperty(cloned, 'message', structuredCloneInternal(value.message, map));
if (hasOwn(value, 'cause')) {
createNonEnumerableProperty(cloned, 'cause', structuredCloneInternal(value.cause, map));
}
if (name === 'AggregateError') {
cloned.errors = structuredCloneInternal(value.errors, map);
} else if (name === 'SuppressedError') {
cloned.error = structuredCloneInternal(value.error, map);
cloned.suppressed = structuredCloneInternal(value.suppressed, map);
} // break omitted
case 'DOMException':
if (ERROR_STACK_INSTALLABLE) {
createNonEnumerableProperty(cloned, 'stack', structuredCloneInternal(value.stack, map));
}
}
return cloned;
};
var tryToTransfer = function (rawTransfer, map) {
if (!isObject(rawTransfer)) throw new TypeError('Transfer option cannot be converted to a sequence');
var transfer = [];
iterate(rawTransfer, function (value) {
push(transfer, anObject(value));
});
var i = 0;
var length = lengthOfArrayLike(transfer);
var buffers = new Set();
var value, type, C, transferred, canvas, context;
while (i < length) {
value = transfer[i++];
type = classof(value);
if (type === 'ArrayBuffer' ? setHas(buffers, value) : mapHas(map, value)) {
throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);
}
if (type === 'ArrayBuffer') {
setAdd(buffers, value);
continue;
}
if (PROPER_STRUCTURED_CLONE_TRANSFER) {
transferred = nativeStructuredClone(value, { transfer: [value] });
} else switch (type) {
case 'ImageBitmap':
C = global.OffscreenCanvas;
if (!isConstructor(C)) throwUnpolyfillable(type, TRANSFERRING);
try {
canvas = new C(value.width, value.height);
context = canvas.getContext('bitmaprenderer');
context.transferFromImageBitmap(value);
transferred = canvas.transferToImageBitmap();
} catch (error) { /* empty */ }
break;
case 'AudioData':
case 'VideoFrame':
if (!isCallable(value.clone) || !isCallable(value.close)) throwUnpolyfillable(type, TRANSFERRING);
try {
transferred = value.clone();
value.close();
} catch (error) { /* empty */ }
break;
case 'MediaSourceHandle':
case 'MessagePort':
case 'OffscreenCanvas':
case 'ReadableStream':
case 'TransformStream':
case 'WritableStream':
throwUnpolyfillable(type, TRANSFERRING);
}
if (transferred === undefined) throw new DOMException('This object cannot be transferred: ' + type, DATA_CLONE_ERROR);
mapSet(map, value, transferred);
}
return buffers;
};
var detachBuffers = function (buffers) {
setIterate(buffers, function (buffer) {
if (PROPER_STRUCTURED_CLONE_TRANSFER) {
nativeRestrictedStructuredClone(buffer, { transfer: [buffer] });
} else if (isCallable(buffer.transfer)) {
buffer.transfer();
} else if (detachTransferable) {
detachTransferable(buffer);
} else {
throwUnpolyfillable('ArrayBuffer', TRANSFERRING);
}
});
};
// `structuredClone` method
// https://html.spec.whatwg.org/multipage/structured-data.html#dom-structuredclone
$({ global: true, enumerable: true, sham: !PROPER_STRUCTURED_CLONE_TRANSFER, forced: FORCED_REPLACEMENT }, {
structuredClone: function structuredClone(value /* , { transfer } */) {
var options = validateArgumentsLength(arguments.length, 1) > 1 && !isNullOrUndefined(arguments[1]) ? anObject(arguments[1]) : undefined;
var transfer = options ? options.transfer : undefined;
var map, buffers;
if (transfer !== undefined) {
map = new Map();
buffers = tryToTransfer(transfer, map);
}
var clone = structuredCloneInternal(value, map);
// since of an issue with cloning views of transferred buffers, we a forced to detach them later
// https://github.com/zloirock/core-js/issues/1265
if (buffers) detachBuffers(buffers);
return clone;
}
});
/***/ }),
/* 124 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(13);
var fails = __webpack_require__(6);
var isCallable = __webpack_require__(20);
var classof = __webpack_require__(91);
var getBuiltIn = __webpack_require__(22);
var inspectSource = __webpack_require__(49);
var noop = function () { /* empty */ };
var construct = getBuiltIn('Reflect', 'construct');
var constructorRegExp = /^\s*(?:class|function)\b/;
var exec = uncurryThis(constructorRegExp.exec);
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
var isConstructorModern = function isConstructor(argument) {
if (!isCallable(argument)) return false;
try {
construct(noop, [], argument);
return true;
} catch (error) {
return false;
}
};
var isConstructorLegacy = function isConstructor(argument) {
if (!isCallable(argument)) return false;
switch (classof(argument)) {
case 'AsyncFunction':
case 'GeneratorFunction':
case 'AsyncGeneratorFunction': return false;
}
try {
// we can't check .prototype since constructors produced by .bind haven't it
// `Function#toString` throws on some built-it function in some legacy engines
// (for example, `DOMQuad` and similar in FF41-)
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
} catch (error) {
return true;
}
};
isConstructorLegacy.sham = true;
// `IsConstructor` abstract operation
// https://tc39.es/ecma262/#sec-isconstructor
module.exports = !construct || fails(function () {
var called;
return isConstructorModern(isConstructorModern.call)
|| !isConstructorModern(Object)
|| !isConstructorModern(function () { called = true; })
|| called;
}) ? isConstructorLegacy : isConstructorModern;
/***/ }),
/* 125 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toPropertyKey = __webpack_require__(17);
var definePropertyModule = __webpack_require__(43);
var createPropertyDescriptor = __webpack_require__(10);
module.exports = function (object, key, value) {
var propertyKey = toPropertyKey(key);
if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
else object[propertyKey] = value;
};
/***/ }),
/* 126 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $TypeError = TypeError;
module.exports = function (passed, required) {
if (passed < required) throw new $TypeError('Not enough arguments');
return passed;
};
/***/ }),
/* 127 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(7);
var hasOwn = __webpack_require__(37);
var isPrototypeOf = __webpack_require__(23);
var regExpFlags = __webpack_require__(100);
var RegExpPrototype = RegExp.prototype;
module.exports = function (R) {
var flags = R.flags;
return flags === undefined && !('flags' in RegExpPrototype) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype, R)
? call(regExpFlags, R) : flags;
};
/***/ }),
/* 128 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(13);
// eslint-disable-next-line es/no-set -- safe
var SetPrototype = Set.prototype;
module.exports = {
// eslint-disable-next-line es/no-set -- safe
Set: Set,
add: uncurryThis(SetPrototype.add),
has: uncurryThis(SetPrototype.has),
remove: uncurryThis(SetPrototype['delete']),
proto: SetPrototype
};
/***/ }),
/* 129 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uncurryThis = __webpack_require__(13);
var iterateSimple = __webpack_require__(130);
var SetHelpers = __webpack_require__(128);
var Set = SetHelpers.Set;
var SetPrototype = SetHelpers.proto;
var forEach = uncurryThis(SetPrototype.forEach);
var keys = uncurryThis(SetPrototype.keys);
var next = keys(new Set()).next;
module.exports = function (set, fn, interruptible) {
return interruptible ? iterateSimple({ iterator: keys(set), next: next }, fn) : forEach(set, fn);
};
/***/ }),
/* 130 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__(7);
module.exports = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) {
var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator;
var next = record.next;
var step, result;
while (!(step = call(next, iterator)).done) {
result = fn(step.value);
if (result !== undefined) return result;
}
};
/***/ }),
/* 131 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(3);
var tryNodeRequire = __webpack_require__(132);
var PROPER_STRUCTURED_CLONE_TRANSFER = __webpack_require__(134);
var structuredClone = global.structuredClone;
var $ArrayBuffer = global.ArrayBuffer;
var $MessageChannel = global.MessageChannel;
var detach = false;
var WorkerThreads, channel, buffer, $detach;
if (PROPER_STRUCTURED_CLONE_TRANSFER) {
detach = function (transferable) {
structuredClone(transferable, { transfer: [transferable] });
};
} else if ($ArrayBuffer) try {
if (!$MessageChannel) {
WorkerThreads = tryNodeRequire('worker_threads');
if (WorkerThreads) $MessageChannel = WorkerThreads.MessageChannel;
}
if ($MessageChannel) {
channel = new $MessageChannel();
buffer = new $ArrayBuffer(2);
$detach = function (transferable) {
channel.port1.postMessage(null, [transferable]);
};
if (buffer.byteLength === 2) {
$detach(buffer);
if (buffer.byteLength === 0) detach = $detach;
}
}
} catch (error) { /* empty */ }
module.exports = detach;
/***/ }),
/* 132 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var IS_NODE = __webpack_require__(133);
module.exports = function (name) {
try {
// eslint-disable-next-line no-new-func -- safe
if (IS_NODE) return Function('return require("' + name + '")')();
} catch (error) { /* empty */ }
};
/***/ }),
/* 133 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(3);
var classof = __webpack_require__(14);
module.exports = classof(global.process) === 'process';
/***/ }),
/* 134 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(3);
var fails = __webpack_require__(6);
var V8 = __webpack_require__(26);
var IS_BROWSER = __webpack_require__(135);
var IS_DENO = __webpack_require__(136);
var IS_NODE = __webpack_require__(133);
var structuredClone = global.structuredClone;
module.exports = !!structuredClone && !fails(function () {
// prevent V8 ArrayBufferDetaching protector cell invalidation and performance degradation
// https://github.com/zloirock/core-js/issues/679
if ((IS_DENO && V8 > 92) || (IS_NODE && V8 > 94) || (IS_BROWSER && V8 > 97)) return false;
var buffer = new ArrayBuffer(8);
var clone = structuredClone(buffer, { transfer: [buffer] });
return buffer.byteLength !== 0 || clone.byteLength !== 8;
});
/***/ }),
/* 135 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var IS_DENO = __webpack_require__(136);
var IS_NODE = __webpack_require__(133);
module.exports = !IS_DENO && !IS_NODE
&& typeof window == 'object'
&& typeof document == 'object';
/***/ }),
/* 136 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* global Deno -- Deno case */
module.exports = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
/***/ }),
/* 137 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(6);
var createPropertyDescriptor = __webpack_require__(10);
module.exports = !fails(function () {
var error = new Error('a');
if (!('stack' in error)) return true;
// eslint-disable-next-line es/no-object-defineproperty -- safe
Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
return error.stack !== 7;
});
/***/ }),
/* 138 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(2);
var getBuiltIn = __webpack_require__(22);
var fails = __webpack_require__(6);
var validateArgumentsLength = __webpack_require__(126);
var toString = __webpack_require__(102);
var USE_NATIVE_URL = __webpack_require__(139);
var URL = getBuiltIn('URL');
// https://github.com/nodejs/node/issues/47505
// https://github.com/denoland/deno/issues/18893
var THROWS_WITHOUT_ARGUMENTS = USE_NATIVE_URL && fails(function () {
URL.canParse();
});
// `URL.canParse` method
// https://url.spec.whatwg.org/#dom-url-canparse
$({ target: 'URL', stat: true, forced: !THROWS_WITHOUT_ARGUMENTS }, {
canParse: function canParse(url) {
var length = validateArgumentsLength(arguments.length, 1);
var urlString = toString(url);
var base = length < 2 || arguments[1] === undefined ? undefined : toString(arguments[1]);
try {
return !!new URL(urlString, base);
} catch (error) {
return false;
}
}
});
/***/ }),
/* 139 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(6);
var wellKnownSymbol = __webpack_require__(32);
var DESCRIPTORS = __webpack_require__(5);
var IS_PURE = __webpack_require__(34);
var ITERATOR = wellKnownSymbol('iterator');
module.exports = !fails(function () {
// eslint-disable-next-line unicorn/relative-url-style -- required for testing
var url = new URL('b?a=1&b=2&c=3', 'http://a');
var params = url.searchParams;
var params2 = new URLSearchParams('a=1&a=2&b=3');
var result = '';
url.pathname = 'c%20d';
params.forEach(function (value, key) {
params['delete']('b');
result += key + value;
});
params2['delete']('a', 2);
// `undefined` case is a Chromium 117 bug
// https://bugs.chromium.org/p/v8/issues/detail?id=14222
params2['delete']('b', undefined);
return (IS_PURE && (!url.toJSON || !params2.has('a', 1) || params2.has('a', 2) || !params2.has('a', undefined) || params2.has('b')))
|| (!params.size && (IS_PURE || !DESCRIPTORS))
|| !params.sort
|| url.href !== 'http://a/c%20d?a=1&c=3'
|| params.get('c') !== '3'
|| String(new URLSearchParams('?a=1')) !== 'a=1'
|| !params[ITERATOR]
// throws in Edge
|| new URL('https://a@b').username !== 'a'
|| new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
// not punycoded in Edge
|| new URL('http://тест').host !== 'xn--e1aybc'
// not escaped in Chrome 62-
|| new URL('http://a#б').hash !== '#%D0%B1'
// fails in Chrome 66-
|| result !== 'a1c3'
// throws in Safari
|| new URL('http://x', undefined).host !== 'x';
});
/***/ }),
/* 140 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var defineBuiltIn = __webpack_require__(46);
var uncurryThis = __webpack_require__(13);
var toString = __webpack_require__(102);
var validateArgumentsLength = __webpack_require__(126);
var $URLSearchParams = URLSearchParams;
var URLSearchParamsPrototype = $URLSearchParams.prototype;
var append = uncurryThis(URLSearchParamsPrototype.append);
var $delete = uncurryThis(URLSearchParamsPrototype['delete']);
var forEach = uncurryThis(URLSearchParamsPrototype.forEach);
var push = uncurryThis([].push);
var params = new $URLSearchParams('a=1&a=2&b=3');
params['delete']('a', 1);
// `undefined` case is a Chromium 117 bug
// https://bugs.chromium.org/p/v8/issues/detail?id=14222
params['delete']('b', undefined);
if (params + '' !== 'a=2') {
defineBuiltIn(URLSearchParamsPrototype, 'delete', function (name /* , value */) {
var length = arguments.length;
var $value = length < 2 ? undefined : arguments[1];
if (length && $value === undefined) return $delete(this, name);
var entries = [];
forEach(this, function (v, k) { // also validates `this`
push(entries, { key: k, value: v });
});
validateArgumentsLength(length, 1);
var key = toString(name);
var value = toString($value);
var index = 0;
var dindex = 0;
var found = false;
var entriesLength = entries.length;
var entry;
while (index < entriesLength) {
entry = entries[index++];
if (found || entry.key === key) {
found = true;
$delete(this, entry.key);
} else dindex++;
}
while (dindex < entriesLength) {
entry = entries[dindex++];
if (!(entry.key === key && entry.value === value)) append(this, entry.key, entry.value);
}
}, { enumerable: true, unsafe: true });
}
/***/ }),
/* 141 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var defineBuiltIn = __webpack_require__(46);
var uncurryThis = __webpack_require__(13);
var toString = __webpack_require__(102);
var validateArgumentsLength = __webpack_require__(126);
var $URLSearchParams = URLSearchParams;
var URLSearchParamsPrototype = $URLSearchParams.prototype;
var getAll = uncurryThis(URLSearchParamsPrototype.getAll);
var $has = uncurryThis(URLSearchParamsPrototype.has);
var params = new $URLSearchParams('a=1');
// `undefined` case is a Chromium 117 bug
// https://bugs.chromium.org/p/v8/issues/detail?id=14222
if (params.has('a', 2) || !params.has('a', undefined)) {
defineBuiltIn(URLSearchParamsPrototype, 'has', function has(name /* , value */) {
var length = arguments.length;
var $value = length < 2 ? undefined : arguments[1];
if (length && $value === undefined) return $has(this, name);
var values = getAll(this, name); // also validates `this`
validateArgumentsLength(length, 1);
var value = toString($value);
var index = 0;
while (index < values.length) {
if (values[index++] === value) return true;
} return false;
}, { enumerable: true, unsafe: true });
}
/***/ }),
/* 142 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(5);
var uncurryThis = __webpack_require__(13);
var defineBuiltInAccessor = __webpack_require__(99);
var URLSearchParamsPrototype = URLSearchParams.prototype;
var forEach = uncurryThis(URLSearchParamsPrototype.forEach);
// `URLSearchParams.prototype.size` getter
// https://github.com/whatwg/url/pull/734
if (DESCRIPTORS && !('size' in URLSearchParamsPrototype)) {
defineBuiltInAccessor(URLSearchParamsPrototype, 'size', {
get: function size() {
var count = 0;
forEach(this, function () { count++; });
return count;
},
configurable: true,
enumerable: true
});
}
/***/ })
/******/ ]); }();
wp-polyfill.min.js 0000644 00000113276 15153765740 0010171 0 ustar 00 !function(r){"use strict";var t,e,n;e={},(n=function(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}).m=t=[function(r,t,e){e(1),e(70),e(77),e(80),e(81),e(83),e(95),e(96),e(98),e(101),e(103),e(104),e(113),e(114),e(117),e(123),e(138),e(140),e(141),r.exports=e(142)},function(r,t,e){var n=e(2),o=e(38),a=e(62),c=e(67),i=e(69);n({target:"Array",proto:!0,arity:1,forced:e(6)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(r){return r instanceof TypeError}}()},{push:function(r){var t=o(this),e=a(t),n=arguments.length;i(e+n);for(var u=0;u<n;u++)t[e]=arguments[u],e++;return c(t,e),e}})},function(t,e,n){var o=n(3),a=n(4).f,c=n(42),i=n(46),u=n(36),f=n(54),s=n(66);t.exports=function(t,e){var n,p,l,y=t.target,h=t.global,v=t.stat,g=h?o:v?o[y]||u(y,{}):o[y]&&o[y].prototype;if(g)for(n in e){if(p=e[n],l=t.dontCallGetSet?(l=a(g,n))&&l.value:g[n],!s(h?n:y+(v?".":"#")+n,t.forced)&&l!==r){if(typeof p==typeof l)continue;f(p,l)}(t.sham||l&&l.sham)&&c(p,"sham",!0),i(g,n,p,t)}}},function(r,t,e){function n(r){return r&&r.Math===Math&&r}r.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof global&&global)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},function(r,t,e){var n=e(5),o=e(7),a=e(9),c=e(10),i=e(11),u=e(17),f=e(37),s=e(40),p=Object.getOwnPropertyDescriptor;t.f=n?p:function(r,t){if(r=i(r),t=u(t),s)try{return p(r,t)}catch(r){}if(f(r,t))return c(!o(a.f,r,t),r[t])}},function(r,t,e){e=e(6),r.exports=!e((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(r,t,e){r.exports=function(r){try{return!!r()}catch(r){return!0}}},function(r,t,e){e=e(8);var n=Function.prototype.call;r.exports=e?n.bind(n):function(){return n.apply(n,arguments)}},function(r,t,e){e=e(6),r.exports=!e((function(){var r=function(){}.bind();return"function"!=typeof r||r.hasOwnProperty("prototype")}))},function(r,t,e){var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,a=o&&!n.call({1:2},1);t.f=a?function(r){return!!(r=o(this,r))&&r.enumerable}:n},function(r,t,e){r.exports=function(r,t){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:t}}},function(r,t,e){var n=e(12),o=e(15);r.exports=function(r){return n(o(r))}},function(r,t,e){var n=e(13),o=e(6),a=e(14),c=Object,i=n("".split);r.exports=o((function(){return!c("z").propertyIsEnumerable(0)}))?function(r){return"String"===a(r)?i(r,""):c(r)}:c},function(r,t,e){var n=e(8),o=(e=Function.prototype).call;e=n&&e.bind.bind(o,o);r.exports=n?e:function(r){return function(){return o.apply(r,arguments)}}},function(r,t,e){var n=(e=e(13))({}.toString),o=e("".slice);r.exports=function(r){return o(n(r),8,-1)}},function(r,t,e){var n=e(16),o=TypeError;r.exports=function(r){if(n(r))throw new o("Can't call method on "+r);return r}},function(t,e,n){t.exports=function(t){return null===t||t===r}},function(r,t,e){var n=e(18),o=e(21);r.exports=function(r){return r=n(r,"string"),o(r)?r:r+""}},function(t,e,n){var o=n(7),a=n(19),c=n(21),i=n(28),u=n(31),f=(n=n(32),TypeError),s=n("toPrimitive");t.exports=function(t,e){if(!a(t)||c(t))return t;var n=i(t,s);if(n){if(n=o(n,t,e=e===r?"default":e),!a(n)||c(n))return n;throw new f("Can't convert object to primitive value")}return u(t,e=e===r?"number":e)}},function(r,t,e){var n=e(20);r.exports=function(r){return"object"==typeof r?null!==r:n(r)}},function(t,e,n){var o="object"==typeof document&&document.all;t.exports=void 0===o&&o!==r?function(r){return"function"==typeof r||r===o}:function(r){return"function"==typeof r}},function(r,t,e){var n=e(22),o=e(20),a=e(23),c=(e=e(24),Object);r.exports=e?function(r){return"symbol"==typeof r}:function(r){var t=n("Symbol");return o(t)&&a(t.prototype,c(r))}},function(t,e,n){var o=n(3),a=n(20);t.exports=function(t,e){return arguments.length<2?(n=o[t],a(n)?n:r):o[t]&&o[t][e];var n}},function(r,t,e){e=e(13),r.exports=e({}.isPrototypeOf)},function(r,t,e){e=e(25),r.exports=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(r,t,e){var n=e(26),o=e(6),a=e(3).String;r.exports=!!Object.getOwnPropertySymbols&&!o((function(){var r=Symbol("symbol detection");return!a(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},function(r,t,e){var n,o,a=e(3),c=e(27);e=a.process,a=a.Deno;!(o=(a=(a=e&&e.versions||a&&a.version)&&a.v8)?0<(n=a.split("."))[0]&&n[0]<4?1:+(n[0]+n[1]):o)&&c&&(!(n=c.match(/Edge\/(\d+)/))||74<=n[1])&&(n=c.match(/Chrome\/(\d+)/))&&(o=+n[1]),r.exports=o},function(r,t,e){r.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},function(t,e,n){var o=n(29),a=n(16);t.exports=function(t,e){return e=t[e],a(e)?r:o(e)}},function(r,t,e){var n=e(20),o=e(30),a=TypeError;r.exports=function(r){if(n(r))return r;throw new a(o(r)+" is not a function")}},function(r,t,e){var n=String;r.exports=function(r){try{return n(r)}catch(r){return"Object"}}},function(r,t,e){var n=e(7),o=e(20),a=e(19),c=TypeError;r.exports=function(r,t){var e,i;if("string"===t&&o(e=r.toString)&&!a(i=n(e,r)))return i;if(o(e=r.valueOf)&&!a(i=n(e,r)))return i;if("string"!==t&&o(e=r.toString)&&!a(i=n(e,r)))return i;throw new c("Can't convert object to primitive value")}},function(r,t,e){var n=e(3),o=e(33),a=e(37),c=e(39),i=e(25),u=(e=e(24),n.Symbol),f=o("wks"),s=e?u.for||u:u&&u.withoutSetter||c;r.exports=function(r){return a(f,r)||(f[r]=i&&a(u,r)?u[r]:s("Symbol."+r)),f[r]}},function(t,e,n){var o=n(34),a=n(35);(t.exports=function(t,e){return a[t]||(a[t]=e!==r?e:{})})("versions",[]).push({version:"3.35.1",mode:o?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE",source:"https://github.com/zloirock/core-js"})},function(r,t,e){r.exports=!1},function(r,t,e){var n=e(3),o=e(36);e=n[e="__core-js_shared__"]||o(e,{});r.exports=e},function(r,t,e){var n=e(3),o=Object.defineProperty;r.exports=function(r,t){try{o(n,r,{value:t,configurable:!0,writable:!0})}catch(e){n[r]=t}return t}},function(r,t,e){var n=e(13),o=e(38),a=n({}.hasOwnProperty);r.exports=Object.hasOwn||function(r,t){return a(o(r),t)}},function(r,t,e){var n=e(15),o=Object;r.exports=function(r){return o(n(r))}},function(t,e,n){n=n(13);var o=0,a=Math.random(),c=n(1..toString);t.exports=function(t){return"Symbol("+(t===r?"":t)+")_"+c(++o+a,36)}},function(r,t,e){var n=e(5),o=e(6),a=e(41);r.exports=!n&&!o((function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(r,t,e){var n=e(3),o=(e=e(19),n.document),a=e(o)&&e(o.createElement);r.exports=function(r){return a?o.createElement(r):{}}},function(r,t,e){var n=e(5),o=e(43),a=e(10);r.exports=n?function(r,t,e){return o.f(r,t,a(1,e))}:function(r,t,e){return r[t]=e,r}},function(r,t,e){var n=e(5),o=e(40),a=e(44),c=e(45),i=e(17),u=TypeError,f=Object.defineProperty,s=Object.getOwnPropertyDescriptor,p="enumerable",l="configurable",y="writable";t.f=n?a?function(r,t,e){var n;return c(r),t=i(t),c(e),"function"==typeof r&&"prototype"===t&&"value"in e&&y in e&&!e[y]&&(n=s(r,t))&&n[y]&&(r[t]=e.value,e={configurable:(l in e?e:n)[l],enumerable:(p in e?e:n)[p],writable:!1}),f(r,t,e)}:f:function(r,t,e){if(c(r),t=i(t),c(e),o)try{return f(r,t,e)}catch(r){}if("get"in e||"set"in e)throw new u("Accessors not supported");return"value"in e&&(r[t]=e.value),r}},function(r,t,e){var n=e(5);e=e(6);r.exports=n&&e((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(r,t,e){var n=e(19),o=String,a=TypeError;r.exports=function(r){if(n(r))return r;throw new a(o(r)+" is not an object")}},function(t,e,n){var o=n(20),a=n(43),c=n(47),i=n(36);t.exports=function(t,e,n,u){var f=(u=u||{}).enumerable,s=u.name!==r?u.name:e;if(o(n)&&c(n,s,u),u.global)f?t[e]=n:i(e,n);else{try{u.unsafe?t[e]&&(f=!0):delete t[e]}catch(t){}f?t[e]=n:a.f(t,e,{value:n,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return t}},function(t,e,n){var o=n(13),a=n(6),c=n(20),i=n(37),u=n(5),f=n(48).CONFIGURABLE,s=n(49),p=(n=n(50)).enforce,l=n.get,y=String,h=Object.defineProperty,v=o("".slice),g=o("".replace),d=o([].join),b=u&&!a((function(){return 8!==h((function(){}),"length",{value:8}).length})),m=String(String).split("String");t=t.exports=function(t,e,n){"Symbol("===v(y(e),0,7)&&(e="["+g(y(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!i(t,"name")||f&&t.name!==e)&&(u?h(t,"name",{value:e,configurable:!0}):t.name=e),b&&n&&i(n,"arity")&&t.length!==n.arity&&h(t,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?u&&h(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=r)}catch(t){}return n=p(t),i(n,"source")||(n.source=d(m,"string"==typeof e?e:"")),t};Function.prototype.toString=t((function(){return c(this)&&l(this).source||s(this)}),"toString")},function(r,t,e){var n=e(5),o=e(37),a=Function.prototype,c=n&&Object.getOwnPropertyDescriptor;o=(e=o(a,"name"))&&"something"===function(){}.name,a=e&&(!n||n&&c(a,"name").configurable);r.exports={EXISTS:e,PROPER:o,CONFIGURABLE:a}},function(r,t,e){var n=e(13),o=e(20),a=(e=e(35),n(Function.toString));o(e.inspectSource)||(e.inspectSource=function(r){return a(r)}),r.exports=e.inspectSource},function(r,t,e){var n,o,a,c,i=e(51),u=e(3),f=e(19),s=e(42),p=e(37),l=e(35),y=e(52),h=(e=e(53),"Object already initialized"),v=u.TypeError,g=(u=u.WeakMap,i||l.state?((a=l.state||(l.state=new u)).get=a.get,a.has=a.has,a.set=a.set,n=function(r,t){if(a.has(r))throw new v(h);return t.facade=r,a.set(r,t),t},o=function(r){return a.get(r)||{}},function(r){return a.has(r)}):(e[c=y("state")]=!0,n=function(r,t){if(p(r,c))throw new v(h);return t.facade=r,s(r,c,t),t},o=function(r){return p(r,c)?r[c]:{}},function(r){return p(r,c)}));r.exports={set:n,get:o,has:g,enforce:function(r){return g(r)?o(r):n(r,{})},getterFor:function(r){return function(t){var e;if(!f(t)||(e=o(t)).type!==r)throw new v("Incompatible receiver, "+r+" required");return e}}}},function(r,t,e){var n=e(3);e=e(20),n=n.WeakMap;r.exports=e(n)&&/native code/.test(String(n))},function(r,t,e){var n=e(33),o=e(39),a=n("keys");r.exports=function(r){return a[r]||(a[r]=o(r))}},function(r,t,e){r.exports={}},function(r,t,e){var n=e(37),o=e(55),a=e(4),c=e(43);r.exports=function(r,t,e){for(var i=o(t),u=c.f,f=a.f,s=0;s<i.length;s++){var p=i[s];n(r,p)||e&&n(e,p)||u(r,p,f(t,p))}}},function(r,t,e){var n=e(22),o=e(13),a=e(56),c=e(65),i=e(45),u=o([].concat);r.exports=n("Reflect","ownKeys")||function(r){var t=a.f(i(r)),e=c.f;return e?u(t,e(r)):t}},function(r,t,e){var n=e(57),o=e(64).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(r){return n(r,o)}},function(r,t,e){var n=e(13),o=e(37),a=e(11),c=e(58).indexOf,i=e(53),u=n([].push);r.exports=function(r,t){var e,n=a(r),f=0,s=[];for(e in n)!o(i,e)&&o(n,e)&&u(s,e);for(;t.length>f;)o(n,e=t[f++])&&(~c(s,e)||u(s,e));return s}},function(r,t,e){var n=e(11),o=e(59),a=e(62);e=function(r){return function(t,e,c){var i,u=n(t),f=a(u),s=o(c,f);if(r&&e!=e){for(;s<f;)if((i=u[s++])!=i)return!0}else for(;s<f;s++)if((r||s in u)&&u[s]===e)return r||s||0;return!r&&-1}};r.exports={includes:e(!0),indexOf:e(!1)}},function(r,t,e){var n=e(60),o=Math.max,a=Math.min;r.exports=function(r,t){return(r=n(r))<0?o(r+t,0):a(r,t)}},function(r,t,e){var n=e(61);r.exports=function(r){return(r=+r)!=r||0==r?0:n(r)}},function(r,t,e){var n=Math.ceil,o=Math.floor;r.exports=Math.trunc||function(r){return(0<(r=+r)?o:n)(r)}},function(r,t,e){var n=e(63);r.exports=function(r){return n(r.length)}},function(r,t,e){var n=e(60),o=Math.min;r.exports=function(r){return 0<(r=n(r))?o(r,9007199254740991):0}},function(r,t,e){r.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(r,t,e){t.f=Object.getOwnPropertySymbols},function(r,t,e){var n=e(6),o=e(20),a=/#|\.prototype\./,c=(e=function(r,t){return(r=i[c(r)])===f||r!==u&&(o(t)?n(t):!!t)},e.normalize=function(r){return String(r).replace(a,".").toLowerCase()}),i=e.data={},u=e.NATIVE="N",f=e.POLYFILL="P";r.exports=e},function(t,e,n){var o=n(5),a=n(68),c=TypeError,i=Object.getOwnPropertyDescriptor;o=o&&!function(){if(this!==r)return 1;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(r){return r instanceof TypeError}}();t.exports=o?function(r,t){if(a(r)&&!i(r,"length").writable)throw new c("Cannot set read only .length");return r.length=t}:function(r,t){return r.length=t}},function(r,t,e){var n=e(14);r.exports=Array.isArray||function(r){return"Array"===n(r)}},function(r,t,e){var n=TypeError;r.exports=function(r){if(9007199254740991<r)throw n("Maximum allowed index exceeded");return r}},function(r,t,e){var n=e(2),o=e(71),a=e(11),c=(e=e(72),Array);n({target:"Array",proto:!0},{toReversed:function(){return o(a(this),c)}}),e("toReversed")},function(r,t,e){var n=e(62);r.exports=function(r,t){for(var e=n(r),o=new t(e),a=0;a<e;a++)o[a]=r[e-a-1];return o}},function(t,e,n){var o=n(32),a=n(73),c=(n=n(43).f,o("unscopables")),i=Array.prototype;i[c]===r&&n(i,c,{configurable:!0,value:a(null)}),t.exports=function(r){i[c][r]=!0}},function(t,e,n){function o(){}function a(r){return"<script>"+r+"</"+h+">"}var c,i=n(45),u=n(74),f=n(64),s=n(53),p=n(76),l=n(41),y=(n=n(52),"prototype"),h="script",v=n("IE_PROTO"),g=function(){try{c=new ActiveXObject("htmlfile")}catch(r){}var r;g="undefined"==typeof document||document.domain&&c?function(r){r.write(a("")),r.close();var t=r.parentWindow.Object;return r=null,t}(c):((r=l("iframe")).style.display="none",p.appendChild(r),r.src=String("javascript:"),(r=r.contentWindow.document).open(),r.write(a("document.F=Object")),r.close(),r.F);for(var t=f.length;t--;)delete g[y][f[t]];return g()};s[v]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(o[y]=i(t),n=new o,o[y]=null,n[v]=t):n=g(),e===r?n:u.f(n,e)}},function(r,t,e){var n=e(5),o=e(44),a=e(43),c=e(45),i=e(11),u=e(75);t.f=n&&!o?Object.defineProperties:function(r,t){c(r);for(var e,n=i(t),o=u(t),f=o.length,s=0;s<f;)a.f(r,e=o[s++],n[e]);return r}},function(r,t,e){var n=e(57),o=e(64);r.exports=Object.keys||function(r){return n(r,o)}},function(r,t,e){e=e(22),r.exports=e("document","documentElement")},function(t,e,n){var o=n(2),a=n(13),c=n(29),i=n(11),u=n(78),f=n(79),s=(n=n(72),Array),p=a(f("Array","sort"));o({target:"Array",proto:!0},{toSorted:function(t){t!==r&&c(t);var e=i(this);e=u(s,e);return p(e,t)}}),n("toSorted")},function(r,t,e){var n=e(62);r.exports=function(r,t,e){for(var o=0,a=2<arguments.length?e:n(t),c=new r(a);o<a;)c[o]=t[o++];return c}},function(r,t,e){var n=e(3);r.exports=function(r,t){return(r=(r=n[r])&&r.prototype)&&r[t]}},function(r,t,e){var n=e(2),o=e(72),a=e(69),c=e(62),i=e(59),u=e(11),f=e(60),s=Array,p=Math.max,l=Math.min;n({target:"Array",proto:!0},{toSpliced:function(r,t){var e,n,o,y,h=u(this),v=c(h),g=i(r,v),d=0;for(0===(r=arguments.length)?e=n=0:n=1===r?(e=0,v-g):(e=r-2,l(p(f(t),0),v-g)),o=a(v+e-n),y=s(o);d<g;d++)y[d]=h[d];for(;d<g+e;d++)y[d]=arguments[d-g+2];for(;d<o;d++)y[d]=h[d+n-e];return y}}),o("toSpliced")},function(r,t,e){var n=e(2),o=e(82),a=e(11),c=Array;n({target:"Array",proto:!0},{with:function(r,t){return o(a(this),c,r,t)}})},function(r,t,e){var n=e(62),o=e(60),a=RangeError;r.exports=function(r,t,e,c){var i=n(r),u=(e=o(e))<0?i+e:e;if(i<=u||u<0)throw new a("Incorrect index");for(var f=new t(i),s=0;s<i;s++)f[s]=s===u?c:r[s];return f}},function(r,t,e){var n=e(2),o=e(13),a=e(29),c=e(15),i=e(84),u=e(94),f=(e=e(34),u.Map),s=u.has,p=u.get,l=u.set,y=o([].push);n({target:"Map",stat:!0,forced:e},{groupBy:function(r,t){c(r),a(t);var e=new f,n=0;return i(r,(function(r){var o=t(r,n++);s(e,o)?y(p(e,o),r):l(e,o,[r])})),e}})},function(r,t,e){function n(r,t){this.stopped=r,this.result=t}var o=e(85),a=e(7),c=e(45),i=e(30),u=e(87),f=e(62),s=e(23),p=e(89),l=e(90),y=e(93),h=TypeError,v=n.prototype;r.exports=function(r,t,e){function g(r){return b&&y(b,"normal",r),new n(!0,r)}function d(r){return S?(c(r),_?j(r[0],r[1],g):j(r[0],r[1])):_?j(r,g):j(r)}var b,m,w,E,x,A,O=e&&e.that,S=!(!e||!e.AS_ENTRIES),R=!(!e||!e.IS_RECORD),T=!(!e||!e.IS_ITERATOR),_=!(!e||!e.INTERRUPTED),j=o(t,O);if(R)b=r.iterator;else if(T)b=r;else{if(!(T=l(r)))throw new h(i(r)+" is not iterable");if(u(T)){for(m=0,w=f(r);m<w;m++)if((E=d(r[m]))&&s(v,E))return E;return new n(!1)}b=p(r,T)}for(x=(R?r:b).next;!(A=a(x,b)).done;){try{E=d(A.value)}catch(r){y(b,"throw",r)}if("object"==typeof E&&E&&s(v,E))return E}return new n(!1)}},function(t,e,n){var o=n(86),a=n(29),c=n(8),i=o(o.bind);t.exports=function(t,e){return a(t),e===r?t:c?i(t,e):function(){return t.apply(e,arguments)}}},function(r,t,e){var n=e(14),o=e(13);r.exports=function(r){if("Function"===n(r))return o(r)}},function(t,e,n){var o=n(32),a=n(88),c=o("iterator"),i=Array.prototype;t.exports=function(t){return t!==r&&(a.Array===t||i[c]===t)}},function(r,t,e){r.exports={}},function(r,t,e){var n=e(7),o=e(29),a=e(45),c=e(30),i=e(90),u=TypeError;r.exports=function(r,t){if(t=arguments.length<2?i(r):t,o(t))return a(n(t,r));throw new u(c(r)+" is not iterable")}},function(r,t,e){var n=e(91),o=e(28),a=e(16),c=e(88),i=e(32)("iterator");r.exports=function(r){if(!a(r))return o(r,i)||o(r,"@@iterator")||c[n(r)]}},function(t,e,n){var o=n(92),a=n(20),c=n(14),i=n(32)("toStringTag"),u=Object,f="Arguments"===c(function(){return arguments}());t.exports=o?c:function(t){var e;return t===r?"Undefined":null===t?"Null":"string"==typeof(t=function(r,t){try{return r[t]}catch(r){}}(e=u(t),i))?t:f?c(e):"Object"===(t=c(e))&&a(e.callee)?"Arguments":t}},function(r,t,e){var n={};n[e(32)("toStringTag")]="z",r.exports="[object z]"===String(n)},function(r,t,e){var n=e(7),o=e(45),a=e(28);r.exports=function(r,t,e){var c,i;o(r);try{if(!(c=a(r,"return"))){if("throw"===t)throw e;return e}c=n(c,r)}catch(r){i=!0,c=r}if("throw"===t)throw e;if(i)throw c;return o(c),e}},function(r,t,e){var n=e(13);e=Map.prototype;r.exports={Map,set:n(e.set),get:n(e.get),has:n(e.has),remove:n(e.delete),proto:e}},function(r,t,e){var n=e(2),o=e(22),a=e(13),c=e(29),i=e(15),u=e(17),f=e(84),s=o("Object","create"),p=a([].push);n({target:"Object",stat:!0},{groupBy:function(r,t){i(r),c(t);var e=s(null),n=0;return f(r,(function(r){var o=u(t(r,n++));o in e?p(e[o],r):e[o]=[r]})),e}})},function(r,t,e){var n=e(2),o=e(97);n({target:"Promise",stat:!0},{withResolvers:function(){var r=o.f(this);return{promise:r.promise,resolve:r.resolve,reject:r.reject}}})},function(t,e,n){function o(t){var e,n;this.promise=new t((function(t,o){if(e!==r||n!==r)throw new c("Bad Promise constructor");e=t,n=o})),this.resolve=a(e),this.reject=a(n)}var a=n(29),c=TypeError;t.exports.f=function(r){return new o(r)}},function(r,t,e){var n=e(3),o=e(5),a=e(99),c=e(100),i=(e=e(6),n.RegExp),u=i.prototype;o&&e((function(){var r=!0;try{i(".","d")}catch(t){r=!1}var t,e={},n="",o=r?"dgimsy":"gimsy",a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(t in r&&(a.hasIndices="d"),a)!function(r,t){Object.defineProperty(e,r,{get:function(){return n+=t,!0}})}(t,a[t]);return Object.getOwnPropertyDescriptor(u,"flags").get.call(e)!==o||n!==o}))&&a(u,"flags",{configurable:!0,get:c})},function(r,t,e){var n=e(47),o=e(43);r.exports=function(r,t,e){return e.get&&n(e.get,t,{getter:!0}),e.set&&n(e.set,t,{setter:!0}),o.f(r,t,e)}},function(r,t,e){var n=e(45);r.exports=function(){var r=n(this),t="";return r.hasIndices&&(t+="d"),r.global&&(t+="g"),r.ignoreCase&&(t+="i"),r.multiline&&(t+="m"),r.dotAll&&(t+="s"),r.unicode&&(t+="u"),r.unicodeSets&&(t+="v"),r.sticky&&(t+="y"),t}},function(r,t,e){var n=e(2),o=e(13),a=e(15),c=e(102),i=o("".charCodeAt);n({target:"String",proto:!0},{isWellFormed:function(){for(var r=c(a(this)),t=r.length,e=0;e<t;e++){var n=i(r,e);if(55296==(63488&n)&&(56320<=n||++e>=t||56320!=(64512&i(r,e))))return!1}return!0}})},function(r,t,e){var n=e(91),o=String;r.exports=function(r){if("Symbol"===n(r))throw new TypeError("Cannot convert a Symbol value to a string");return o(r)}},function(r,t,e){var n=e(2),o=e(7),a=e(13),c=e(15),i=e(102),u=(e=e(6),Array),f=a("".charAt),s=a("".charCodeAt),p=a([].join),l="".toWellFormed,y=l&&e((function(){return"1"!==o(l,1)}));n({target:"String",proto:!0,forced:y},{toWellFormed:function(){var r=i(c(this));if(y)return o(l,r);for(var t=r.length,e=u(t),n=0;n<t;n++){var a=s(r,n);55296!=(63488&a)?e[n]=f(r,n):56320<=a||t<=n+1||56320!=(64512&s(r,n+1))?e[n]="�":(e[n]=f(r,n),e[++n]=f(r,n))}return p(e,"")}})},function(r,t,e){var n=e(71),o=e(105),a=o.aTypedArray,c=(e=o.exportTypedArrayMethod,o.getTypedArrayConstructor);e("toReversed",(function(){return n(a(this),c(this))}))},function(t,e,n){function o(r){return!!l(r)&&(r=h(r),y(k,r)||y(C,r))}var a,c,i,u=n(106),f=n(5),s=n(3),p=n(20),l=n(19),y=n(37),h=n(91),v=n(30),g=n(42),d=n(46),b=n(99),m=n(23),w=n(107),E=n(109),x=n(32),A=n(39),O=(T=n(50)).enforce,S=T.get,R=(n=s.Int8Array)&&n.prototype,T=(T=s.Uint8ClampedArray)&&T.prototype,_=n&&w(n),j=R&&w(R),I=(n=Object.prototype,s.TypeError),P=(x=x("toStringTag"),A("TYPED_ARRAY_TAG")),D="TypedArrayConstructor",M=u&&!!E&&"Opera"!==h(s.opera),k=(u=!1,{Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8}),C={BigInt64Array:8,BigUint64Array:8},U=function(r){var t=w(r);if(l(t))return(r=S(t))&&y(r,D)?r[D]:U(t)};for(a in k)(i=(c=s[a])&&c.prototype)?O(i)[D]=c:M=!1;for(a in C)(i=(c=s[a])&&c.prototype)&&(O(i)[D]=c);if((!M||!p(_)||_===Function.prototype)&&(_=function(){throw new I("Incorrect invocation")},M))for(a in k)s[a]&&E(s[a],_);if((!M||!j||j===n)&&(j=_.prototype,M))for(a in k)s[a]&&E(s[a].prototype,j);if(M&&w(T)!==j&&E(T,j),f&&!y(j,x))for(a in b(j,x,{configurable:u=!0,get:function(){return l(this)?this[P]:r}}),k)s[a]&&g(s[a],P,a);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:M,TYPED_ARRAY_TAG:u&&P,aTypedArray:function(r){if(o(r))return r;throw new I("Target is not a typed array")},aTypedArrayConstructor:function(r){if(p(r)&&(!E||m(_,r)))return r;throw new I(v(r)+" is not a typed array constructor")},exportTypedArrayMethod:function(r,t,e,n){if(f){if(e)for(var o in k)if((o=s[o])&&y(o.prototype,r))try{delete o.prototype[r]}catch(e){try{o.prototype[r]=t}catch(e){}}j[r]&&!e||d(j,r,!e&&M&&R[r]||t,n)}},exportTypedArrayStaticMethod:function(r,t,e){var n,o;if(f){if(E){if(e)for(n in k)if((o=s[n])&&y(o,r))try{delete o[r]}catch(r){}if(_[r]&&!e)return;try{return d(_,r,!e&&M&&_[r]||t)}catch(r){}}for(n in k)!(o=s[n])||o[r]&&!e||d(o,r,t)}},getTypedArrayConstructor:U,isView:function(r){return!!l(r)&&("DataView"===(r=h(r))||y(k,r)||y(C,r))},isTypedArray:o,TypedArray:_,TypedArrayPrototype:j}},function(r,t,e){r.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(r,t,e){var n=e(37),o=e(20),a=e(38),c=e(52),i=(e=e(108),c("IE_PROTO")),u=Object,f=u.prototype;r.exports=e?u.getPrototypeOf:function(r){var t=a(r);return n(t,i)?t[i]:(r=t.constructor,o(r)&&t instanceof r?r.prototype:t instanceof u?f:null)}},function(r,t,e){e=e(6),r.exports=!e((function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}))},function(t,e,n){var o=n(110),a=n(45),c=n(111);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r,t=!1,e={};try{(r=o(Object.prototype,"__proto__","set"))(e,[]),t=e instanceof Array}catch(e){}return function(e,n){return a(e),c(n),t?r(e,n):e.__proto__=n,e}}():r)},function(r,t,e){var n=e(13),o=e(29);r.exports=function(r,t,e){try{return n(o(Object.getOwnPropertyDescriptor(r,t)[e]))}catch(r){}}},function(r,t,e){var n=e(112),o=String,a=TypeError;r.exports=function(r){if(n(r))return r;throw new a("Can't set "+o(r)+" as a prototype")}},function(r,t,e){var n=e(19);r.exports=function(r){return n(r)||null===r}},function(t,e,n){var o=n(105),a=n(13),c=n(29),i=n(78),u=o.aTypedArray,f=o.getTypedArrayConstructor,s=(n=o.exportTypedArrayMethod,a(o.TypedArrayPrototype.sort));n("toSorted",(function(t){t!==r&&c(t);var e=u(this);e=i(f(e),e);return s(e,t)}))},function(r,t,e){var n=e(82),o=e(105),a=e(115),c=e(60),i=e(116),u=o.aTypedArray,f=o.getTypedArrayConstructor;(0,o.exportTypedArrayMethod)("with",(function(r,t){var e=u(this);r=c(r),t=a(e)?i(t):+t;return n(e,f(e),r,t)}),!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(r){return 8===r}}())},function(r,t,e){var n=e(91);r.exports=function(r){return"BigInt64Array"===(r=n(r))||"BigUint64Array"===r}},function(r,t,e){var n=e(18),o=TypeError;r.exports=function(r){if("number"==typeof(r=n(r,"number")))throw new o("Can't convert number to bigint");return BigInt(r)}},function(t,e,n){var o=n(2),a=n(3),c=n(22),i=n(10),u=n(43).f,f=n(37),s=n(118),p=n(119),l=n(120),y=n(121),h=n(122),v=n(5),g=n(34),d="DOMException",b=c("Error"),m=c(d),w=function(){s(this,E);var t=l((e=arguments.length)<1?r:arguments[0]),e=l(e<2?r:arguments[1],"Error");e=new m(t,e);return(t=new b(t)).name=d,u(e,"stack",i(1,h(t.stack,1))),p(e,this,w),e},E=w.prototype=m.prototype,x="stack"in new b(d);n="stack"in new m(1,2),a=!(!(a=m&&v&&Object.getOwnPropertyDescriptor(a,d))||a.writable&&a.configurable),n=x&&!a&&!n;o({global:!0,constructor:!0,forced:g||n},{DOMException:n?w:m});var A,O=c(d);if((c=O.prototype).constructor!==O)for(var S in g||u(c,"constructor",i(1,O)),y)f(y,S)&&(f(O,S=(A=y[S]).s)||u(O,S,i(6,A.c)))},function(r,t,e){var n=e(23),o=TypeError;r.exports=function(r,t){if(n(t,r))return r;throw new o("Incorrect invocation")}},function(r,t,e){var n=e(20),o=e(19),a=e(109);r.exports=function(r,t,e){var c,i;return a&&n(c=t.constructor)&&c!==e&&o(i=c.prototype)&&i!==e.prototype&&a(r,i),r}},function(t,e,n){var o=n(102);t.exports=function(t,e){return t===r?arguments.length<2?"":e:o(t)}},function(r,t,e){r.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},function(r,t,e){e=e(13);var n=Error,o=e("".replace),a=(e=String(new n("zxcasd").stack),/\n\s*at [^:]*:[^\n]*/),c=a.test(e);r.exports=function(r,t){if(c&&"string"==typeof r&&!n.prepareStackTrace)for(;t--;)r=o(r,a,"");return r}},function(t,e,n){function o(r){throw new z("Uncloneable type: "+r,nr)}function a(r,t){throw new z((t||"Cloning")+" of "+r+" cannot be properly polyfilled in this engine",nr)}function c(r,t){return cr||a(t),cr(r)}function i(t,e,n){if(G(e,t))return Y(e,t);var o,c,i,u,f,s;if("SharedArrayBuffer"===(n||A(t)))o=cr?cr(t):t;else{(n=p.DataView)||g(t.slice)||a("ArrayBuffer");try{if(g(t.slice)&&!t.resizable)o=t.slice(0);else{c=t.byteLength,i="maxByteLength"in t?{maxByteLength:t.maxByteLength}:r,o=new ArrayBuffer(c,i),u=new n(t),f=new n(o);for(s=0;s<c;s++)f.setUint8(s,u.getUint8(s))}}catch(t){throw new z("ArrayBuffer is detached",nr)}}return H(e,t,o),o}var u,f=n(34),s=n(2),p=n(3),l=n(22),y=n(13),h=n(6),v=n(39),g=n(20),d=n(124),b=n(16),m=n(19),w=n(21),E=n(84),x=n(45),A=n(91),O=n(37),S=n(125),R=n(42),T=n(62),_=n(126),j=n(127),I=n(94),P=n(128),D=n(129),M=n(131),k=n(137),C=n(134),U=p.Object,L=p.Array,N=p.Date,F=p.Error,B=p.TypeError,V=p.PerformanceMark,z=l("DOMException"),W=I.Map,G=I.has,Y=I.get,H=I.set,Q=P.Set,X=P.add,q=P.has,K=l("Object","keys"),Z=y([].push),$=y((!0).valueOf),J=y(1..valueOf),rr=y("".valueOf),tr=y(N.prototype.getTime),er=v("structuredClone"),nr="DataCloneError",or="Transferring",ar=(y=function(r){return!h((function(){var t=new p.Set([7]),e=r(t),n=r(U(7));return e===t||!e.has(7)||!m(n)||7!=+n}))&&r},v=function(r,t){return!h((function(){var e=new t,n=r({a:e,b:e});return!(n&&n.a===n.b&&n.a instanceof t&&n.a.stack===e.stack)}))},p.structuredClone),cr=(f=f||!v(ar,F)||!v(ar,z)||(u=ar,!!h((function(){var r=u(new p.AggregateError([1],er,{cause:3}));return"AggregateError"!==r.name||1!==r.errors[0]||r.message!==er||3!==r.cause}))),v=!ar&&y((function(r){return new V(er,{detail:r}).detail})),y(ar)||v),ir=function(t,e){if(w(t)&&o("Symbol"),!m(t))return t;if(e){if(G(e,t))return Y(e,t)}else e=new W;var n,u,f,s,y,h,v,d,b,E,x,_,I,P,D=A(t);switch(D){case"Array":f=L(T(t));break;case"Object":f={};break;case"Map":f=new W;break;case"Set":f=new Q;break;case"RegExp":f=new RegExp(t.source,j(t));break;case"Error":switch(u=t.name){case"AggregateError":f=new(l(u))([]);break;case"EvalError":case"RangeError":case"ReferenceError":case"SuppressedError":case"SyntaxError":case"TypeError":case"URIError":f=new(l(u));break;case"CompileError":case"LinkError":case"RuntimeError":f=new(l("WebAssembly",u));break;default:f=new F}break;case"DOMException":f=new z(t.message,t.name);break;case"ArrayBuffer":case"SharedArrayBuffer":f=i(t,e,D);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":h="DataView"===D?t.byteLength:t.length,E=D,x=(b=t).byteOffset,_=h,I=e,P=p[E],m(P)||a(E),f=new P(i(b.buffer,I),x,_);break;case"DOMQuad":try{f=new DOMQuad(ir(t.p1,e),ir(t.p2,e),ir(t.p3,e),ir(t.p4,e))}catch(n){f=c(t,D)}break;case"File":if(cr)try{f=cr(t),A(f)!==D&&(f=r)}catch(n){}if(!f)try{f=new File([t],t.name,t)}catch(n){}f||a(D);break;case"FileList":if(s=function(){var r;try{r=new p.DataTransfer}catch(t){try{r=new p.ClipboardEvent("").clipboardData}catch(r){}}return r&&r.items&&r.files?r:null}()){for(y=0,h=T(t);y<h;y++)s.items.add(ir(t[y],e));f=s.files}else f=c(t,D);break;case"ImageData":try{f=new ImageData(ir(t.data,e),t.width,t.height,{colorSpace:t.colorSpace})}catch(n){f=c(t,D)}break;default:if(cr)f=cr(t);else switch(D){case"BigInt":f=U(t.valueOf());break;case"Boolean":f=U($(t));break;case"Number":f=U(J(t));break;case"String":f=U(rr(t));break;case"Date":f=new N(tr(t));break;case"Blob":try{f=t.slice(0,t.size,t.type)}catch(n){a(D)}break;case"DOMPoint":case"DOMPointReadOnly":n=p[D];try{f=n.fromPoint?n.fromPoint(t):new n(t.x,t.y,t.z,t.w)}catch(n){a(D)}break;case"DOMRect":case"DOMRectReadOnly":n=p[D];try{f=n.fromRect?n.fromRect(t):new n(t.x,t.y,t.width,t.height)}catch(n){a(D)}break;case"DOMMatrix":case"DOMMatrixReadOnly":n=p[D];try{f=n.fromMatrix?n.fromMatrix(t):new n(t)}catch(n){a(D)}break;case"AudioData":case"VideoFrame":g(t.clone)||a(D);try{f=t.clone()}catch(n){o(D)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":a(D);default:o(D)}}switch(H(e,t,f),D){case"Array":case"Object":for(v=K(t),y=0,h=T(v);y<h;y++)d=v[y],S(f,d,ir(t[d],e));break;case"Map":t.forEach((function(r,t){H(f,ir(t,e),ir(r,e))}));break;case"Set":t.forEach((function(r){X(f,ir(r,e))}));break;case"Error":R(f,"message",ir(t.message,e)),O(t,"cause")&&R(f,"cause",ir(t.cause,e)),"AggregateError"===u?f.errors=ir(t.errors,e):"SuppressedError"===u&&(f.error=ir(t.error,e),f.suppressed=ir(t.suppressed,e));case"DOMException":k&&R(f,"stack",ir(t.stack,e))}return f};s({global:!0,enumerable:!0,sham:!C,forced:f},{structuredClone:function(t){var e,n;(n=(n=1<_(arguments.length,1)&&!b(arguments[1])?x(arguments[1]):r)?n.transfer:r)!==r&&(e=function(t,e){if(!m(t))throw new B("Transfer option cannot be converted to a sequence");var n=[];E(t,(function(r){Z(n,x(r))}));for(var o,c,i,u,f,s=0,l=T(n),y=new Q;s<l;){if(o=n[s++],"ArrayBuffer"===(c=A(o))?q(y,o):G(e,o))throw new z("Duplicate transferable",nr);if("ArrayBuffer"!==c){if(C)u=ar(o,{transfer:[o]});else switch(c){case"ImageBitmap":i=p.OffscreenCanvas,d(i)||a(c,or);try{(f=new i(o.width,o.height)).getContext("bitmaprenderer").transferFromImageBitmap(o),u=f.transferToImageBitmap()}catch(t){}break;case"AudioData":case"VideoFrame":g(o.clone)&&g(o.close)||a(c,or);try{u=o.clone(),o.close()}catch(t){}break;case"MediaSourceHandle":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":a(c,or)}if(u===r)throw new z("This object cannot be transferred: "+c,nr);H(e,o,u)}else X(y,o)}return y}(n,o=new W));var o=ir(t,o);return e&&D(e,(function(r){C?cr(r,{transfer:[r]}):g(r.transfer)?r.transfer():M?M(r):a("ArrayBuffer",or)})),o}})},function(r,t,e){function n(){}function o(r){if(!i(r))return!1;try{return p(n,[],r),!0}catch(r){return!1}}var a=e(13),c=e(6),i=e(20),u=e(91),f=e(22),s=e(49),p=f("Reflect","construct"),l=/^\s*(?:class|function)\b/,y=a(l.exec),h=!l.test(n);a=function(r){if(!i(r))return!1;switch(u(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!y(l,s(r))}catch(r){return!0}};a.sham=!0,r.exports=!p||c((function(){var r;return o(o.call)||!o(Object)||!o((function(){r=!0}))||r}))?a:o},function(r,t,e){var n=e(17),o=e(43),a=e(10);r.exports=function(r,t,e){(t=n(t))in r?o.f(r,t,a(0,e)):r[t]=e}},function(r,t,e){var n=TypeError;r.exports=function(r,t){if(r<t)throw new n("Not enough arguments");return r}},function(t,e,n){var o=n(7),a=n(37),c=n(23),i=n(100),u=RegExp.prototype;t.exports=function(t){var e=t.flags;return e!==r||"flags"in u||a(t,"flags")||!c(u,t)?e:o(i,t)}},function(r,t,e){var n=e(13);e=Set.prototype;r.exports={Set,add:n(e.add),has:n(e.has),remove:n(e.delete),proto:e}},function(r,t,e){var n,o=e(13),a=e(130),c=(e=(n=e(128)).Set,o((n=n.proto).forEach)),i=o(n.keys),u=i(new e).next;r.exports=function(r,t,e){return e?a({iterator:i(r),next:u},t):c(r,t)}},function(t,e,n){var o=n(7);t.exports=function(t,e,n){for(var a,c=n?t:t.iterator,i=t.next;!(a=o(i,c)).done;)if((a=e(a.value))!==r)return a}},function(r,t,e){var n,o,a,c,i=e(3),u=e(132),f=e(134),s=i.structuredClone,p=i.ArrayBuffer;e=i.MessageChannel,i=!1;if(f)i=function(r){s(r,{transfer:[r]})};else if(p)try{e||(n=u("worker_threads"))&&(e=n.MessageChannel),e&&(o=new e,a=new p(2),c=function(r){o.port1.postMessage(null,[r])},2===a.byteLength&&(c(a),0===a.byteLength&&(i=c)))}catch(r){}r.exports=i},function(r,t,e){var n=e(133);r.exports=function(r){try{if(n)return Function('return require("'+r+'")')()}catch(r){}}},function(r,t,e){var n=e(3);e=e(14);r.exports="process"===e(n.process)},function(r,t,e){var n=e(3),o=e(6),a=e(26),c=e(135),i=e(136),u=e(133),f=n.structuredClone;r.exports=!!f&&!o((function(){if(i&&92<a||u&&94<a||c&&97<a)return!1;var r=new ArrayBuffer(8),t=f(r,{transfer:[r]});return 0!==r.byteLength||8!==t.byteLength}))},function(r,t,e){var n=e(136);e=e(133);r.exports=!n&&!e&&"object"==typeof window&&"object"==typeof document},function(r,t,e){r.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},function(r,t,e){var n=e(6),o=e(10);r.exports=!n((function(){var r=new Error("a");return!("stack"in r)||(Object.defineProperty(r,"stack",o(1,7)),7!==r.stack)}))},function(t,e,n){var o=n(2),a=n(22),c=n(6),i=n(126),u=n(102),f=(n=n(139),a("URL"));o({target:"URL",stat:!0,forced:!(n&&c((function(){f.canParse()})))},{canParse:function(t){var e=i(arguments.length,1);t=u(t),e=e<2||arguments[1]===r?r:u(arguments[1]);try{return!!new f(t,e)}catch(t){return!1}}})},function(t,e,n){var o=n(6),a=n(32),c=n(5),i=n(34),u=a("iterator");t.exports=!o((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),o="";return t.pathname="c%20d",e.forEach((function(r,t){e.delete("b"),o+=t+r})),n.delete("a",2),n.delete("b",r),i&&(!t.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",r)||n.has("b"))||!e.size&&(i||!c)||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[u]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==o||"x"!==new URL("http://x",r).host}))},function(t,e,n){var o,a=n(46),c=n(13),i=n(102),u=n(126),f=c((n=(o=URLSearchParams).prototype).append),s=c(n.delete),p=c(n.forEach),l=c([].push);(o=new o("a=1&a=2&b=3")).delete("a",1),o.delete("b",r),o+""!="a=2"&&a(n,"delete",(function(t){var e=arguments.length,n=e<2?r:arguments[1];if(e&&n===r)return s(this,t);var o=[];p(this,(function(r,t){l(o,{key:t,value:r})})),u(e,1);for(var a,c=i(t),y=i(n),h=0,v=0,g=!1,d=o.length;h<d;)a=o[h++],g||a.key===c?(g=!0,s(this,a.key)):v++;for(;v<d;)(a=o[v++]).key===c&&a.value===y||f(this,a.key,a.value)}),{enumerable:!0,unsafe:!0})},function(t,e,n){var o,a=n(46),c=n(13),i=n(102),u=n(126),f=c((n=(o=URLSearchParams).prototype).getAll),s=c(n.has);!(o=new o("a=1")).has("a",2)&&o.has("a",r)||a(n,"has",(function(t){var e=arguments.length,n=e<2?r:arguments[1];if(e&&n===r)return s(this,t);var o=f(this,t);u(e,1);for(var a=i(n),c=0;c<o.length;)if(o[c++]===a)return!0;return!1}),{enumerable:!0,unsafe:!0})},function(r,t,e){var n=e(5),o=e(13),a=e(99),c=o((e=URLSearchParams.prototype).forEach);!n||"size"in e||a(e,"size",{get:function(){var r=0;return c(this,(function(){r++})),r},configurable:!0,enumerable:!0})}],n.c=e,n.d=function(r,t,e){n.o(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:e})},n.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,t){if(1&t&&(r=n(r)),8&t)return r;if(4&t&&"object"==typeof r&&r&&r.__esModule)return r;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:r}),2&t&&"string"!=typeof r)for(var o in r)n.d(e,o,function(t){return r[t]}.bind(null,o));return e},n.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(t,"a",t),t},n.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},n.p="",n(n.s=0)}(); chosen.jquery.js 0000644 00000132000 15155665675 0007720 0 ustar 00 /*!
Chosen, a Select Box Enhancer for jQuery and Prototype
by Patrick Filler for Harvest, http://getharvest.com
Version 1.6.1
Full source at https://github.com/harvesthq/chosen
Copyright (c) 2011-2016 Harvest http://getharvest.com
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
This file is generated by `grunt build`, do not edit it by hand.
*/
(function() {
var $, AbstractChosen, Chosen, SelectParser, _ref,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
SelectParser = (function() {
function SelectParser() {
this.options_index = 0;
this.parsed = [];
}
SelectParser.prototype.add_node = function(child) {
if (child.nodeName.toUpperCase() === "OPTGROUP") {
return this.add_group(child);
} else {
return this.add_option(child);
}
};
SelectParser.prototype.add_group = function(group) {
var group_position, option, _i, _len, _ref, _results;
group_position = this.parsed.length;
this.parsed.push({
array_index: group_position,
group: true,
label: this.escapeExpression(group.label),
title: group.title ? group.title : void 0,
children: 0,
disabled: group.disabled,
classes: group.className
});
_ref = group.childNodes;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
option = _ref[_i];
_results.push(this.add_option(option, group_position, group.disabled));
}
return _results;
};
SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
if (option.nodeName.toUpperCase() === "OPTION") {
if (option.text !== "") {
if (group_position != null) {
this.parsed[group_position].children += 1;
}
this.parsed.push({
array_index: this.parsed.length,
options_index: this.options_index,
value: option.value,
text: option.text,
html: option.innerHTML,
title: option.title ? option.title : void 0,
selected: option.selected,
disabled: group_disabled === true ? group_disabled : option.disabled,
group_array_index: group_position,
group_label: group_position != null ? this.parsed[group_position].label : null,
classes: option.className,
style: option.style.cssText
});
} else {
this.parsed.push({
array_index: this.parsed.length,
options_index: this.options_index,
empty: true
});
}
return this.options_index += 1;
}
};
SelectParser.prototype.escapeExpression = function(text) {
var map, unsafe_chars;
if ((text == null) || text === false) {
return "";
}
if (!/[\&\<\>\"\'\`]/.test(text)) {
return text;
}
map = {
"<": "<",
">": ">",
'"': """,
"'": "'",
"`": "`"
};
unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
return text.replace(unsafe_chars, function(chr) {
return map[chr] || "&";
});
};
return SelectParser;
})();
SelectParser.select_to_array = function(select) {
var child, parser, _i, _len, _ref;
parser = new SelectParser();
_ref = select.childNodes;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
child = _ref[_i];
parser.add_node(child);
}
return parser.parsed;
};
AbstractChosen = (function() {
function AbstractChosen(form_field, options) {
this.form_field = form_field;
this.options = options != null ? options : {};
if (!AbstractChosen.browser_is_supported()) {
return;
}
this.is_multiple = this.form_field.multiple;
this.set_default_text();
this.set_default_values();
this.setup();
this.set_up_html();
this.register_observers();
this.on_ready();
}
AbstractChosen.prototype.set_default_values = function() {
var _this = this;
this.click_test_action = function(evt) {
return _this.test_active_click(evt);
};
this.activate_action = function(evt) {
return _this.activate_field(evt);
};
this.active_field = false;
this.mouse_on_container = false;
this.results_showing = false;
this.result_highlighted = null;
this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
this.disable_search_threshold = this.options.disable_search_threshold || 0;
this.disable_search = this.options.disable_search || false;
this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
this.group_search = this.options.group_search != null ? this.options.group_search : true;
this.search_contains = this.options.search_contains || false;
this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
this.max_selected_options = this.options.max_selected_options || Infinity;
this.inherit_select_classes = this.options.inherit_select_classes || false;
this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
return this.case_sensitive_search = this.options.case_sensitive_search || false;
};
AbstractChosen.prototype.set_default_text = function() {
if (this.form_field.getAttribute("data-placeholder")) {
this.default_text = this.form_field.getAttribute("data-placeholder");
} else if (this.is_multiple) {
this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
} else {
this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
}
return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
};
AbstractChosen.prototype.choice_label = function(item) {
if (this.include_group_label_in_selected && (item.group_label != null)) {
return "<b class='group-name'>" + item.group_label + "</b>" + item.html;
} else {
return item.html;
}
};
AbstractChosen.prototype.mouse_enter = function() {
return this.mouse_on_container = true;
};
AbstractChosen.prototype.mouse_leave = function() {
return this.mouse_on_container = false;
};
AbstractChosen.prototype.input_focus = function(evt) {
var _this = this;
if (this.is_multiple) {
if (!this.active_field) {
return setTimeout((function() {
return _this.container_mousedown();
}), 50);
}
} else {
if (!this.active_field) {
return this.activate_field();
}
}
};
AbstractChosen.prototype.input_blur = function(evt) {
var _this = this;
if (!this.mouse_on_container) {
this.active_field = false;
return setTimeout((function() {
return _this.blur_test();
}), 100);
}
};
AbstractChosen.prototype.results_option_build = function(options) {
var content, data, data_content, shown_results, _i, _len, _ref;
content = '';
shown_results = 0;
_ref = this.results_data;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
data = _ref[_i];
data_content = '';
if (data.group) {
data_content = this.result_add_group(data);
} else {
data_content = this.result_add_option(data);
}
if (data_content !== '') {
shown_results++;
content += data_content;
}
if (options != null ? options.first : void 0) {
if (data.selected && this.is_multiple) {
this.choice_build(data);
} else if (data.selected && !this.is_multiple) {
this.single_set_selected_text(this.choice_label(data));
}
}
if (shown_results >= this.max_shown_results) {
break;
}
}
return content;
};
AbstractChosen.prototype.result_add_option = function(option) {
var classes, option_el;
if (!option.search_match) {
return '';
}
if (!this.include_option_in_results(option)) {
return '';
}
classes = [];
if (!option.disabled && !(option.selected && this.is_multiple)) {
classes.push("active-result");
}
if (option.disabled && !(option.selected && this.is_multiple)) {
classes.push("disabled-result");
}
if (option.selected) {
classes.push("result-selected");
}
if (option.group_array_index != null) {
classes.push("group-option");
}
if (option.classes !== "") {
classes.push(option.classes);
}
option_el = document.createElement("li");
option_el.className = classes.join(" ");
option_el.style.cssText = option.style;
option_el.setAttribute("data-option-array-index", option.array_index);
option_el.innerHTML = option.search_text;
if (option.title) {
option_el.title = option.title;
}
return this.outerHTML(option_el);
};
AbstractChosen.prototype.result_add_group = function(group) {
var classes, group_el;
if (!(group.search_match || group.group_match)) {
return '';
}
if (!(group.active_options > 0)) {
return '';
}
classes = [];
classes.push("group-result");
if (group.classes) {
classes.push(group.classes);
}
group_el = document.createElement("li");
group_el.className = classes.join(" ");
group_el.innerHTML = group.search_text;
if (group.title) {
group_el.title = group.title;
}
return this.outerHTML(group_el);
};
AbstractChosen.prototype.results_update_field = function() {
this.set_default_text();
if (!this.is_multiple) {
this.results_reset_cleanup();
}
this.result_clear_highlight();
this.results_build();
if (this.results_showing) {
return this.winnow_results();
}
};
AbstractChosen.prototype.reset_single_select_options = function() {
var result, _i, _len, _ref, _results;
_ref = this.results_data;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
result = _ref[_i];
if (result.selected) {
_results.push(result.selected = false);
} else {
_results.push(void 0);
}
}
return _results;
};
AbstractChosen.prototype.results_toggle = function() {
if (this.results_showing) {
return this.results_hide();
} else {
return this.results_show();
}
};
AbstractChosen.prototype.results_search = function(evt) {
if (this.results_showing) {
return this.winnow_results();
} else {
return this.results_show();
}
};
AbstractChosen.prototype.winnow_results = function() {
var escapedSearchText, option, regex, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
this.no_results_clear();
results = 0;
searchText = this.get_search_text();
escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
zregex = new RegExp(escapedSearchText, 'i');
regex = this.get_search_regex(escapedSearchText);
_ref = this.results_data;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
option = _ref[_i];
option.search_match = false;
results_group = null;
if (this.include_option_in_results(option)) {
if (option.group) {
option.group_match = false;
option.active_options = 0;
}
if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
results_group = this.results_data[option.group_array_index];
if (results_group.active_options === 0 && results_group.search_match) {
results += 1;
}
results_group.active_options += 1;
}
option.search_text = option.group ? option.label : option.html;
if (!(option.group && !this.group_search)) {
option.search_match = this.search_string_match(option.search_text, regex);
if (option.search_match && !option.group) {
results += 1;
}
if (option.search_match) {
if (searchText.length) {
startpos = option.search_text.search(zregex);
text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
}
if (results_group != null) {
results_group.group_match = true;
}
} else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
option.search_match = true;
}
}
}
}
this.result_clear_highlight();
if (results < 1 && searchText.length) {
this.update_results_content("");
return this.no_results(searchText);
} else {
this.update_results_content(this.results_option_build());
return this.winnow_results_set_highlight();
}
};
AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
var regex_anchor, regex_flag;
regex_anchor = this.search_contains ? "" : "^";
regex_flag = this.case_sensitive_search ? "" : "i";
return new RegExp(regex_anchor + escaped_search_string, regex_flag);
};
AbstractChosen.prototype.search_string_match = function(search_string, regex) {
var part, parts, _i, _len;
if (regex.test(search_string)) {
return true;
} else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
parts = search_string.replace(/\[|\]/g, "").split(" ");
if (parts.length) {
for (_i = 0, _len = parts.length; _i < _len; _i++) {
part = parts[_i];
if (regex.test(part)) {
return true;
}
}
}
}
};
AbstractChosen.prototype.choices_count = function() {
var option, _i, _len, _ref;
if (this.selected_option_count != null) {
return this.selected_option_count;
}
this.selected_option_count = 0;
_ref = this.form_field.options;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
option = _ref[_i];
if (option.selected) {
this.selected_option_count += 1;
}
}
return this.selected_option_count;
};
AbstractChosen.prototype.choices_click = function(evt) {
evt.preventDefault();
if (!(this.results_showing || this.is_disabled)) {
return this.results_show();
}
};
AbstractChosen.prototype.keyup_checker = function(evt) {
var stroke, _ref;
stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
this.search_field_scale();
switch (stroke) {
case 8:
if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
return this.keydown_backstroke();
} else if (!this.pending_backstroke) {
this.result_clear_highlight();
return this.results_search();
}
break;
case 13:
evt.preventDefault();
if (this.results_showing) {
return this.result_select(evt);
}
break;
case 27:
if (this.results_showing) {
this.results_hide();
}
return true;
case 9:
case 38:
case 40:
case 16:
case 91:
case 17:
case 18:
break;
default:
return this.results_search();
}
};
AbstractChosen.prototype.clipboard_event_checker = function(evt) {
var _this = this;
return setTimeout((function() {
return _this.results_search();
}), 50);
};
AbstractChosen.prototype.container_width = function() {
if (this.options.width != null) {
return this.options.width;
} else {
return "" + this.form_field.offsetWidth + "px";
}
};
AbstractChosen.prototype.include_option_in_results = function(option) {
if (this.is_multiple && (!this.display_selected_options && option.selected)) {
return false;
}
if (!this.display_disabled_options && option.disabled) {
return false;
}
if (option.empty) {
return false;
}
return true;
};
AbstractChosen.prototype.search_results_touchstart = function(evt) {
this.touch_started = true;
return this.search_results_mouseover(evt);
};
AbstractChosen.prototype.search_results_touchmove = function(evt) {
this.touch_started = false;
return this.search_results_mouseout(evt);
};
AbstractChosen.prototype.search_results_touchend = function(evt) {
if (this.touch_started) {
return this.search_results_mouseup(evt);
}
};
AbstractChosen.prototype.outerHTML = function(element) {
var tmp;
if (element.outerHTML) {
return element.outerHTML;
}
tmp = document.createElement("div");
tmp.appendChild(element);
return tmp.innerHTML;
};
AbstractChosen.browser_is_supported = function() {
if ("Microsoft Internet Explorer" === window.navigator.appName) {
return document.documentMode >= 8;
}
if (/iP(od|hone)/i.test(window.navigator.userAgent) || /IEMobile/i.test(window.navigator.userAgent) || /Windows Phone/i.test(window.navigator.userAgent) || /BlackBerry/i.test(window.navigator.userAgent) || /BB10/i.test(window.navigator.userAgent) || /Android.*Mobile/i.test(window.navigator.userAgent)) {
return false;
}
return true;
};
AbstractChosen.default_multiple_text = "Select Some Options";
AbstractChosen.default_single_text = "Select an Option";
AbstractChosen.default_no_result_text = "No results match";
return AbstractChosen;
})();
$ = jQuery;
$.fn.extend({
chosen: function(options) {
if (!AbstractChosen.browser_is_supported()) {
return this;
}
return this.each(function(input_field) {
var $this, chosen;
$this = $(this);
chosen = $this.data('chosen');
if (options === 'destroy') {
if (chosen instanceof Chosen) {
chosen.destroy();
}
return;
}
if (!(chosen instanceof Chosen)) {
$this.data('chosen', new Chosen(this, options));
}
});
}
});
Chosen = (function(_super) {
__extends(Chosen, _super);
function Chosen() {
_ref = Chosen.__super__.constructor.apply(this, arguments);
return _ref;
}
Chosen.prototype.setup = function() {
this.form_field_jq = $(this.form_field);
this.current_selectedIndex = this.form_field.selectedIndex;
return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
};
Chosen.prototype.set_up_html = function() {
var container_classes, container_props;
container_classes = ["chosen-container"];
container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
if (this.inherit_select_classes && this.form_field.className) {
container_classes.push(this.form_field.className);
}
if (this.is_rtl) {
container_classes.push("chosen-rtl");
}
container_props = {
'class': container_classes.join(' '),
'style': "width: " + (this.container_width()) + ";",
'title': this.form_field.title
};
if (this.form_field.id.length) {
container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
}
this.container = $("<div />", container_props);
if (this.is_multiple) {
this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>');
} else {
this.container.html('<a class="chosen-single chosen-default"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>');
}
this.form_field_jq.hide().after(this.container);
this.dropdown = this.container.find('div.chosen-drop').first();
this.search_field = this.container.find('input').first();
this.search_results = this.container.find('ul.chosen-results').first();
this.search_field_scale();
this.search_no_results = this.container.find('li.no-results').first();
if (this.is_multiple) {
this.search_choices = this.container.find('ul.chosen-choices').first();
this.search_container = this.container.find('li.search-field').first();
} else {
this.search_container = this.container.find('div.chosen-search').first();
this.selected_item = this.container.find('.chosen-single').first();
}
this.results_build();
this.set_tab_index();
return this.set_label_behavior();
};
Chosen.prototype.on_ready = function() {
return this.form_field_jq.trigger("chosen:ready", {
chosen: this
});
};
Chosen.prototype.register_observers = function() {
var _this = this;
this.container.bind('touchstart.chosen', function(evt) {
_this.container_mousedown(evt);
return evt.preventDefault();
});
this.container.bind('touchend.chosen', function(evt) {
_this.container_mouseup(evt);
return evt.preventDefault();
});
this.container.bind('mousedown.chosen', function(evt) {
_this.container_mousedown(evt);
});
this.container.bind('mouseup.chosen', function(evt) {
_this.container_mouseup(evt);
});
this.container.bind('mouseenter.chosen', function(evt) {
_this.mouse_enter(evt);
});
this.container.bind('mouseleave.chosen', function(evt) {
_this.mouse_leave(evt);
});
this.search_results.bind('mouseup.chosen', function(evt) {
_this.search_results_mouseup(evt);
});
this.search_results.bind('mouseover.chosen', function(evt) {
_this.search_results_mouseover(evt);
});
this.search_results.bind('mouseout.chosen', function(evt) {
_this.search_results_mouseout(evt);
});
this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
_this.search_results_mousewheel(evt);
});
this.search_results.bind('touchstart.chosen', function(evt) {
_this.search_results_touchstart(evt);
});
this.search_results.bind('touchmove.chosen', function(evt) {
_this.search_results_touchmove(evt);
});
this.search_results.bind('touchend.chosen', function(evt) {
_this.search_results_touchend(evt);
});
this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
_this.results_update_field(evt);
});
this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
_this.activate_field(evt);
});
this.form_field_jq.bind("chosen:open.chosen", function(evt) {
_this.container_mousedown(evt);
});
this.form_field_jq.bind("chosen:close.chosen", function(evt) {
_this.input_blur(evt);
});
this.search_field.bind('blur.chosen', function(evt) {
_this.input_blur(evt);
});
this.search_field.bind('keyup.chosen', function(evt) {
_this.keyup_checker(evt);
});
this.search_field.bind('keydown.chosen', function(evt) {
_this.keydown_checker(evt);
});
this.search_field.bind('focus.chosen', function(evt) {
_this.input_focus(evt);
});
this.search_field.bind('cut.chosen', function(evt) {
_this.clipboard_event_checker(evt);
});
this.search_field.bind('paste.chosen', function(evt) {
_this.clipboard_event_checker(evt);
});
if (this.is_multiple) {
return this.search_choices.bind('click.chosen', function(evt) {
_this.choices_click(evt);
});
} else {
return this.container.bind('click.chosen', function(evt) {
evt.preventDefault();
});
}
};
Chosen.prototype.destroy = function() {
$(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
if (this.search_field[0].tabIndex) {
this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
}
this.container.remove();
this.form_field_jq.removeData('chosen');
return this.form_field_jq.show();
};
Chosen.prototype.search_field_disabled = function() {
this.is_disabled = this.form_field_jq[0].disabled;
if (this.is_disabled) {
this.container.addClass('chosen-disabled');
this.search_field[0].disabled = true;
if (!this.is_multiple) {
this.selected_item.unbind("focus.chosen", this.activate_action);
}
return this.close_field();
} else {
this.container.removeClass('chosen-disabled');
this.search_field[0].disabled = false;
if (!this.is_multiple) {
return this.selected_item.bind("focus.chosen", this.activate_action);
}
}
};
Chosen.prototype.container_mousedown = function(evt) {
if (!this.is_disabled) {
if (evt && evt.type === "mousedown" && !this.results_showing) {
evt.preventDefault();
}
if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
if (!this.active_field) {
if (this.is_multiple) {
this.search_field.val("");
}
$(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
this.results_show();
} else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
evt.preventDefault();
this.results_toggle();
}
return this.activate_field();
}
}
};
Chosen.prototype.container_mouseup = function(evt) {
if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
return this.results_reset(evt);
}
};
Chosen.prototype.search_results_mousewheel = function(evt) {
var delta;
if (evt.originalEvent) {
delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
}
if (delta != null) {
evt.preventDefault();
if (evt.type === 'DOMMouseScroll') {
delta = delta * 40;
}
return this.search_results.scrollTop(delta + this.search_results.scrollTop());
}
};
Chosen.prototype.blur_test = function(evt) {
if (!this.active_field && this.container.hasClass("chosen-container-active")) {
return this.close_field();
}
};
Chosen.prototype.close_field = function() {
$(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
this.active_field = false;
this.results_hide();
this.container.removeClass("chosen-container-active");
this.clear_backstroke();
this.show_search_field_default();
return this.search_field_scale();
};
Chosen.prototype.activate_field = function() {
this.container.addClass("chosen-container-active");
this.active_field = true;
this.search_field.val(this.search_field.val());
return this.search_field.focus();
};
Chosen.prototype.test_active_click = function(evt) {
var active_container;
active_container = $(evt.target).closest('.chosen-container');
if (active_container.length && this.container[0] === active_container[0]) {
return this.active_field = true;
} else {
return this.close_field();
}
};
Chosen.prototype.results_build = function() {
this.parsing = true;
this.selected_option_count = null;
this.results_data = SelectParser.select_to_array(this.form_field);
if (this.is_multiple) {
this.search_choices.find("li.search-choice").remove();
} else if (!this.is_multiple) {
this.single_set_selected_text();
if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
this.search_field[0].readOnly = true;
this.container.addClass("chosen-container-single-nosearch");
} else {
this.search_field[0].readOnly = false;
this.container.removeClass("chosen-container-single-nosearch");
}
}
this.update_results_content(this.results_option_build({
first: true
}));
this.search_field_disabled();
this.show_search_field_default();
this.search_field_scale();
return this.parsing = false;
};
Chosen.prototype.result_do_highlight = function(el) {
var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
if (el.length) {
this.result_clear_highlight();
this.result_highlight = el;
this.result_highlight.addClass("highlighted");
maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
visible_top = this.search_results.scrollTop();
visible_bottom = maxHeight + visible_top;
high_top = this.result_highlight.position().top + this.search_results.scrollTop();
high_bottom = high_top + this.result_highlight.outerHeight();
if (high_bottom >= visible_bottom) {
return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
} else if (high_top < visible_top) {
return this.search_results.scrollTop(high_top);
}
}
};
Chosen.prototype.result_clear_highlight = function() {
if (this.result_highlight) {
this.result_highlight.removeClass("highlighted");
}
return this.result_highlight = null;
};
Chosen.prototype.results_show = function() {
if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
this.form_field_jq.trigger("chosen:maxselected", {
chosen: this
});
return false;
}
this.container.addClass("chosen-with-drop");
this.results_showing = true;
this.search_field.focus();
this.search_field.val(this.search_field.val());
this.winnow_results();
return this.form_field_jq.trigger("chosen:showing_dropdown", {
chosen: this
});
};
Chosen.prototype.update_results_content = function(content) {
return this.search_results.html(content);
};
Chosen.prototype.results_hide = function() {
if (this.results_showing) {
this.result_clear_highlight();
this.container.removeClass("chosen-with-drop");
this.form_field_jq.trigger("chosen:hiding_dropdown", {
chosen: this
});
}
return this.results_showing = false;
};
Chosen.prototype.set_tab_index = function(el) {
var ti;
if (this.form_field.tabIndex) {
ti = this.form_field.tabIndex;
this.form_field.tabIndex = -1;
return this.search_field[0].tabIndex = ti;
}
};
Chosen.prototype.set_label_behavior = function() {
var _this = this;
this.form_field_label = this.form_field_jq.parents("label");
if (!this.form_field_label.length && this.form_field.id.length) {
this.form_field_label = $("label[for='" + this.form_field.id + "']");
}
if (this.form_field_label.length > 0) {
return this.form_field_label.bind('click.chosen', function(evt) {
if (_this.is_multiple) {
return _this.container_mousedown(evt);
} else {
return _this.activate_field();
}
});
}
};
Chosen.prototype.show_search_field_default = function() {
if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
this.search_field.val(this.default_text);
return this.search_field.addClass("default");
} else {
this.search_field.val("");
return this.search_field.removeClass("default");
}
};
Chosen.prototype.search_results_mouseup = function(evt) {
var target;
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
if (target.length) {
this.result_highlight = target;
this.result_select(evt);
return this.search_field.focus();
}
};
Chosen.prototype.search_results_mouseover = function(evt) {
var target;
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
if (target) {
return this.result_do_highlight(target);
}
};
Chosen.prototype.search_results_mouseout = function(evt) {
if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
return this.result_clear_highlight();
}
};
Chosen.prototype.choice_build = function(item) {
var choice, close_link,
_this = this;
choice = $('<li />', {
"class": "search-choice"
}).html("<span>" + (this.choice_label(item)) + "</span>");
if (item.disabled) {
choice.addClass('search-choice-disabled');
} else {
close_link = $('<a />', {
"class": 'search-choice-close',
'data-option-array-index': item.array_index
});
close_link.bind('click.chosen', function(evt) {
return _this.choice_destroy_link_click(evt);
});
choice.append(close_link);
}
return this.search_container.before(choice);
};
Chosen.prototype.choice_destroy_link_click = function(evt) {
evt.preventDefault();
evt.stopPropagation();
if (!this.is_disabled) {
return this.choice_destroy($(evt.target));
}
};
Chosen.prototype.choice_destroy = function(link) {
if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
this.show_search_field_default();
if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
this.results_hide();
}
link.parents('li').first().remove();
return this.search_field_scale();
}
};
Chosen.prototype.results_reset = function() {
this.reset_single_select_options();
this.form_field.options[0].selected = true;
this.single_set_selected_text();
this.show_search_field_default();
this.results_reset_cleanup();
this.form_field_jq.trigger("change");
if (this.active_field) {
return this.results_hide();
}
};
Chosen.prototype.results_reset_cleanup = function() {
this.current_selectedIndex = this.form_field.selectedIndex;
return this.selected_item.find("abbr").remove();
};
Chosen.prototype.result_select = function(evt) {
var high, item;
if (this.result_highlight) {
high = this.result_highlight;
this.result_clear_highlight();
if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
this.form_field_jq.trigger("chosen:maxselected", {
chosen: this
});
return false;
}
if (this.is_multiple) {
high.removeClass("active-result");
} else {
this.reset_single_select_options();
}
high.addClass("result-selected");
item = this.results_data[high[0].getAttribute("data-option-array-index")];
item.selected = true;
this.form_field.options[item.options_index].selected = true;
this.selected_option_count = null;
if (this.is_multiple) {
this.choice_build(item);
} else {
this.single_set_selected_text(this.choice_label(item));
}
if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
this.results_hide();
}
this.show_search_field_default();
if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
this.form_field_jq.trigger("change", {
'selected': this.form_field.options[item.options_index].value
});
}
this.current_selectedIndex = this.form_field.selectedIndex;
evt.preventDefault();
return this.search_field_scale();
}
};
Chosen.prototype.single_set_selected_text = function(text) {
if (text == null) {
text = this.default_text;
}
if (text === this.default_text) {
this.selected_item.addClass("chosen-default");
} else {
this.single_deselect_control_build();
this.selected_item.removeClass("chosen-default");
}
return this.selected_item.find("span").html(text);
};
Chosen.prototype.result_deselect = function(pos) {
var result_data;
result_data = this.results_data[pos];
if (!this.form_field.options[result_data.options_index].disabled) {
result_data.selected = false;
this.form_field.options[result_data.options_index].selected = false;
this.selected_option_count = null;
this.result_clear_highlight();
if (this.results_showing) {
this.winnow_results();
}
this.form_field_jq.trigger("change", {
deselected: this.form_field.options[result_data.options_index].value
});
this.search_field_scale();
return true;
} else {
return false;
}
};
Chosen.prototype.single_deselect_control_build = function() {
if (!this.allow_single_deselect) {
return;
}
if (!this.selected_item.find("abbr").length) {
this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
}
return this.selected_item.addClass("chosen-single-with-deselect");
};
Chosen.prototype.get_search_text = function() {
return $('<div/>').text($.trim(this.search_field.val())).html();
};
Chosen.prototype.winnow_results_set_highlight = function() {
var do_high, selected_results;
selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
if (do_high != null) {
return this.result_do_highlight(do_high);
}
};
Chosen.prototype.no_results = function(terms) {
var no_results_html;
no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
no_results_html.find("span").first().html(terms);
this.search_results.append(no_results_html);
return this.form_field_jq.trigger("chosen:no_results", {
chosen: this
});
};
Chosen.prototype.no_results_clear = function() {
return this.search_results.find(".no-results").remove();
};
Chosen.prototype.keydown_arrow = function() {
var next_sib;
if (this.results_showing && this.result_highlight) {
next_sib = this.result_highlight.nextAll("li.active-result").first();
if (next_sib) {
return this.result_do_highlight(next_sib);
}
} else {
return this.results_show();
}
};
Chosen.prototype.keyup_arrow = function() {
var prev_sibs;
if (!this.results_showing && !this.is_multiple) {
return this.results_show();
} else if (this.result_highlight) {
prev_sibs = this.result_highlight.prevAll("li.active-result");
if (prev_sibs.length) {
return this.result_do_highlight(prev_sibs.first());
} else {
if (this.choices_count() > 0) {
this.results_hide();
}
return this.result_clear_highlight();
}
}
};
Chosen.prototype.keydown_backstroke = function() {
var next_available_destroy;
if (this.pending_backstroke) {
this.choice_destroy(this.pending_backstroke.find("a").first());
return this.clear_backstroke();
} else {
next_available_destroy = this.search_container.siblings("li.search-choice").last();
if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
this.pending_backstroke = next_available_destroy;
if (this.single_backstroke_delete) {
return this.keydown_backstroke();
} else {
return this.pending_backstroke.addClass("search-choice-focus");
}
}
}
};
Chosen.prototype.clear_backstroke = function() {
if (this.pending_backstroke) {
this.pending_backstroke.removeClass("search-choice-focus");
}
return this.pending_backstroke = null;
};
Chosen.prototype.keydown_checker = function(evt) {
var stroke, _ref1;
stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
this.search_field_scale();
if (stroke !== 8 && this.pending_backstroke) {
this.clear_backstroke();
}
switch (stroke) {
case 8:
this.backstroke_length = this.search_field.val().length;
break;
case 9:
if (this.results_showing && !this.is_multiple) {
this.result_select(evt);
}
this.mouse_on_container = false;
break;
case 13:
if (this.results_showing) {
evt.preventDefault();
}
break;
case 32:
if (this.disable_search) {
evt.preventDefault();
}
break;
case 38:
evt.preventDefault();
this.keyup_arrow();
break;
case 40:
evt.preventDefault();
this.keydown_arrow();
break;
}
};
Chosen.prototype.search_field_scale = function() {
var div, f_width, h, style, style_block, styles, w, _i, _len;
if (this.is_multiple) {
h = 0;
w = 0;
style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
for (_i = 0, _len = styles.length; _i < _len; _i++) {
style = styles[_i];
style_block += style + ":" + this.search_field.css(style) + ";";
}
div = $('<div />', {
'style': style_block
});
div.text(this.search_field.val());
$('body').append(div);
w = div.width() + 25;
div.remove();
f_width = this.container.outerWidth();
if (w > f_width - 10) {
w = f_width - 10;
}
return this.search_field.css({
'width': w + 'px'
});
}
};
return Chosen;
})(AbstractChosen);
}).call(this);
jquery.actual.js 0000644 00000005712 15155665675 0007723 0 ustar 00 /*! Copyright 2012, Ben Lin (http://dreamerslab.com/)
* Licensed under the MIT License (LICENSE.txt).
*
* Version: 1.0.16
*
* Requires: jQuery >= 1.2.3
*/
;( function ( $ ){
$.fn.addBack = $.fn.addBack || $.fn.andSelf;
$.fn.extend({
actual : function ( method, options ){
// check if the jQuery method exist
if( !this[ method ]){
throw '$.actual => The jQuery method "' + method + '" you called does not exist';
}
var defaults = {
absolute : false,
clone : false,
includeMargin : false
};
var configs = $.extend( defaults, options );
var $target = this.eq( 0 );
var fix, restore;
if( configs.clone === true ){
fix = function (){
var style = 'position: absolute !important; top: -1000 !important; ';
// this is useful with css3pie
$target = $target.
clone().
attr( 'style', style ).
appendTo( 'body' );
};
restore = function (){
// remove DOM element after getting the width
$target.remove();
};
}else{
var tmp = [];
var style = '';
var $hidden;
fix = function (){
// get all hidden parents
$hidden = $target.parents().addBack().filter( ':hidden' );
style += 'visibility: hidden !important; display: block !important; ';
if( configs.absolute === true ) style += 'position: absolute !important; ';
// save the origin style props
// set the hidden el css to be got the actual value later
$hidden.each( function (){
// Save original style. If no style was set, attr() returns undefined
var $this = $( this );
var thisStyle = $this.attr( 'style' );
tmp.push( thisStyle );
// Retain as much of the original style as possible, if there is one
$this.attr( 'style', thisStyle ? thisStyle + ';' + style : style );
});
};
restore = function (){
// restore origin style values
$hidden.each( function ( i ){
var $this = $( this );
var _tmp = tmp[ i ];
if( _tmp === undefined ){
$this.removeAttr( 'style' );
}else{
$this.attr( 'style', _tmp );
}
});
};
}
fix();
// get the actual value with user specific methed
// it can be 'width', 'height', 'outerWidth', 'innerWidth'... etc
// configs.includeMargin only works for 'outerWidth' and 'outerHeight'
var actual = /(outer)/.test( method ) ?
$target[ method ]( configs.includeMargin ) :
$target[ method ]();
restore();
// IMPORTANT, this plugin only return the value of the first element
return actual;
}
});
})( jQuery );
jquery.interdependencies.js 0000644 00000043315 15155665675 0012143 0 ustar 00 /**
* jQuery Interdependencies library
*
* http://miohtama.github.com/jquery-interdependencies/
*
* Copyright 2012-2013 Mikko Ohtamaa, others
*/
/*global console, window*/
(function($) {
"use strict";
/**
* Microsoft safe helper to spit out our little diagnostics information
*
* @ignore
*/
function log(msg) {
if(window.console && window.console.log) {
console.log(msg);
}
}
/**
* jQuery.find() workaround for IE7
*
* If your selector is an pure tag id (#foo) IE7 finds nothing
* if you do jQuery.find() in a specific jQuery context.
*
* This workaround makes a (false) assumptions
* ids are always unique across the page.
*
* @ignore
*
* @param {jQuery} context jQuery context where we look child elements
* @param {String} selector selector as a string
* @return {jQuery} context.find() result
*/
function safeFind(context, selector) {
if(selector[0] == "#") {
// Pseudo-check that this is a simple id selector
// and not a complex jQuery selector
if(selector.indexOf(" ") < 0) {
return $(selector);
}
}
return context.find(selector);
}
/**
* Sample configuration object which can be passed to {@link jQuery.deps#enable}
*
* @class Configuration
*/
var configExample = {
/**
* @cfg show Callback function show(elem) for showing elements
* @type {Function}
*/
show : null,
/**
* @cfg hide Callback function hide(elem) for hiding elements
* @type {Function}
*/
hide : null,
/**
* @cfg log Write console.log() output of rule applying
* @type {Boolean}
*/
log : false,
/**
* @cfg checkTargets When ruleset is enabled, check that all controllers and controls referred by ruleset exist on the page.
*
* @default true
*
* @type {Boolean}
*/
checkTargets : true
};
/**
* Define one field inter-dependency rule.
*
* When condition is true then this input and all
* its children rules' inputs are visible.
*
* Possible condition strings:
*
* * **==** Widget value must be equal to given value
*
* * **any** Widget value must be any of the values in the given value array
*
* * **non-any** Widget value must not be any of the values in the given value array
*
* * **!=** Widget value must not be qual to given value
*
* * **()** Call value as a function(context, controller, ourWidgetValue) and if it's true then the condition is true
*
* * **null** This input does not have any sub-conditions
*
*
*
*/
function Rule(controller, condition, value) {
this.init(controller, condition, value);
}
$.extend(Rule.prototype, {
/**
* @method constructor
*
* @param {String} controller jQuery expression to match the `<input>` source
*
* @param {String} condition What input value must be that {@link Rule the rule takes effective}.
*
* @param value Matching value of **controller** when widgets become visible
*
*/
init : function(controller, condition, value) {
this.controller = controller;
this.condition = condition;
this.value = value;
// Child rules
this.rules = [];
// Controls shown/hidden by this rule
this.controls = [];
},
/**
* Evaluation engine
*
* @param {String} condition Any of given conditions in Rule class description
* @param {Object} val1 The base value we compare against
* @param {Object} val2 Something we got out of input
* @return {Boolean} true or false
*/
evalCondition : function(context, control, condition, val1, val2) {
/**
*
* Codestar Framework
* Added new condition for Codestar Framework
*
* @since 1.0.0
* @version 1.0.0
*
*/
if(condition == "==" || condition == "OR") {
return this.checkBoolean(val1) == this.checkBoolean(val2);
} else if(condition == "!=") {
return this.checkBoolean(val1) != this.checkBoolean(val2);
} else if(condition == ">=") {
return Number(val2) >= Number(val1);
} else if(condition == "<=") {
return Number(val2) <= Number(val1);
} else if(condition == ">") {
return Number(val2) > Number(val1);
} else if(condition == "<") {
return Number(val2) < Number(val1);
} else if(condition == "()") {
return window[val1](context, control, val2); // FIXED: function method
} else if(condition == "any") {
return $.inArray(val2, val1.split(',')) > -1;
} else if(condition == "not-any") {
return $.inArray(val2, val1.split(',')) == -1;
} else {
throw new Error("Unknown condition:" + condition);
}
},
/**
*
* Codestar Framework
* Added Boolean value type checker
*
* @since 1.0.0
* @version 1.0.0
*
*/
checkBoolean: function(value) {
switch(value) {
case true:
case 'true':
case 1:
case '1':
//case 'on':
//case 'yes':
value = true;
break;
case false:
case 'false':
case 0:
case '0':
//case 'off':
//case 'no':
value = false;
break;
}
return value;
},
/**
* Evaluate the condition of this rule in given jQuery context.
*
* The widget value is extracted using getControlValue()
*
* @param {jQuery} context The jQuery selection in which this rule is evaluated.
*
*/
checkCondition : function(context, cfg) {
// We do not have condition set, we are always true
if(!this.condition) {
return true;
}
var control = context.find(this.controller);
if(control.size() === 0 && cfg.log) {
log("Evaling condition: Could not find controller input " + this.controller);
}
var val = this.getControlValue(context, control);
if(cfg.log && val === undefined) {
log("Evaling condition: Could not exctract value from input " + this.controller);
}
if(val === undefined) {
return false;
}
val = this.normalizeValue(control, this.value, val);
return this.evalCondition(context, control, this.condition, this.value, val);
},
/**
* Make sure that what we read from input field is comparable against Javascript primitives
*
*/
normalizeValue : function(control, baseValue, val) {
if(typeof baseValue == "number") {
// Make sure we compare numbers against numbers
return parseFloat(val);
}
return val;
},
/**
* Read value from a diffent HTML controls.
*
* Handle, text, checkbox, radio, select.
*
*/
getControlValue : function(context, control) {
/**
*
* Codestar Framework
* Added multiple checkbox value control
*
* @since 1.0.0
* @version 1.0.0
*
*/
if( ( control.attr("type") == "radio" || control.attr("type") == "checkbox" ) && control.size() > 1 ) {
return control.filter(":checked").val();
}
// Handle individual checkboxes & radio
if ( control.attr("type") == "checkbox" || control.attr("type") == "radio" ) {
return control.is(":checked");
}
return control.val();
},
/**
* Create a sub-rule.
*
* Example:
*
* var masterSwitch = ruleset.createRule("#mechanicalThrombectomyDevice")
* var twoAttempts = masterSwitch.createRule("#numberOfAttempts", "==", 2);
*
* @return Rule instance
*/
createRule : function(controller, condition, value) {
var rule = new Rule(controller, condition, value);
this.rules.push(rule);
return rule;
},
/**
* Include a control in this rule.
*
* @param {String} input jQuery expression to match the input within ruleset context
*/
include : function(input) {
if(!input) {
throw new Error("Must give an input selector");
}
this.controls.push(input);
},
/**
* Apply this rule to all controls in the given context
*
* @param {jQuery} context jQuery selection within we operate
* @param {Object} cfg {@link Configuration} object or undefined
* @param {Object} enforced Recursive rule enforcer: undefined to evaluate condition, true show always, false hide always
*
*/
applyRule : function(context, cfg, enforced) {
var result;
if(enforced === undefined) {
result = this.checkCondition(context, cfg);
} else {
result = enforced;
}
if(cfg.log) {
log("Applying rule on " + this.controller + "==" + this.value + " enforced:" + enforced + " result:" + result);
}
if(cfg.log && !this.controls.length) {
log("Zero length controls slipped through");
}
// Get show/hide callback functions
var show = cfg.show || function(control) {
control.show();
};
var hide = cfg.hide || function(control) {
control.hide();
};
// Resolve controls from ids to jQuery selections
// we are controlling in this context
var controls = $.map(this.controls, function(elem, idx) {
var control = context.find(elem);
if(cfg.log && control.size() === 0) {
log("Could not find element:" + elem);
}
return control;
});
if(result) {
$(controls).each(function() {
// Some friendly debug info
if(cfg.log && $(this).size() === 0) {
log("Control selection is empty when showing");
log(this);
}
show(this);
});
// Evaluate all child rules
$(this.rules).each(function() {
if(this.condition !== "OR"){
this.applyRule(context, cfg);
}
});
} else {
$(controls).each(function() {
// Some friendly debug info
if(cfg.log && $(this).size() === 0) {
log("Control selection is empty when hiding:");
log(this);
}
hide(this);
});
// Supress all child rules
$(this.rules).each(function() {
if(this.condition !== "OR"){
this.applyRule(context, cfg, false);
} else {
this.applyRule(context, cfg);
}
});
}
}
});
/**
* A class which manages interdependenice rules.
*/
function Ruleset() {
// Hold a tree of rules
this.rules = [];
}
$.extend(Ruleset.prototype, {
/**
* Add a new rule into this ruletset.
*
* See {@link Rule} about the contstruction parameters.
* @return {Rule}
*/
createRule : function(controller, condition, value) {
var rule = new Rule(controller, condition, value);
this.rules.push(rule);
return rule;
},
/**
* Apply these rules on an element.
*
* @param {jQuery} context Selection we are dealing with
*
* @param cfg {@link Configuration} object or undefined.
*/
applyRules: function(context, cfg) {
var i;
cfg = cfg || {};
if(cfg.log) {
log("Starting evaluation ruleset of " + this.rules.length + " rules");
}
for(i=0; i<this.rules.length; i++) {
this.rules[i].applyRule(context, cfg);
}
},
/**
* Walk all rules and sub-rules in this ruleset
* @param {Function} callback(rule)
*
* @return {Array} Rules as depth-first searched
*/
walk : function() {
var rules = [];
function descent(rule) {
rules.push(rule);
$(rule.children).each(function() {
descent(this);
});
}
$(this.rules).each(function() {
descent(this);
});
return rules;
},
/**
* Check that all controllers and controls referred in ruleset exist.
*
* Throws an Error if any of them are missing.
*
* @param {jQuery} context jQuery selection of items
*
* @param {Configuration} cfg
*/
checkTargets : function(context, cfg) {
var controls = 0;
var rules = this.walk();
$(rules).each(function() {
if(context.find(this.controller).size() === 0) {
throw new Error("Rule's controller does not exist:" + this.controller);
}
if(this.controls.length === 0) {
throw new Error("Rule has no controls:" + this);
}
$(this.controls).each(function() {
if(safeFind(context, this) === 0) {
throw new Error("Rule's target control " + this + " does not exist in context " + context.get(0));
}
controls++;
});
});
if(cfg.log) {
log("Controller check ok, rules count " + rules.length + " controls count " + controls);
}
},
/**
* Make this ruleset effective on the whole page.
*
* Set event handler on **window.document** to catch all input events
* and apply those events to defined rules.
*
* @param {Configuration} cfg {@link Configuration} object or undefined
*
*/
install : function(cfg) {
$.deps.enable($(document.body), this, cfg);
}
});
/**
* jQuery interdependencie plug-in
*
* @class jQuery.deps
*
*/
var deps = {
/**
* Create a new Ruleset instance.
*
* Example:
*
* $(document).ready(function() {
* // Start creating a new ruleset
* var ruleset = $.deps.createRuleset();
*
*
* @return {Ruleset}
*/
createRuleset : function() {
return new Ruleset();
},
/**
* Enable ruleset on a specific jQuery selection.
*
* Checks the existince of all ruleset controllers and controls
* by default (see config).
*
* See possible IE event bubbling problems: http://stackoverflow.com/q/265074/315168
*
* @param {Object} selection jQuery selection in where we monitor all change events. All controls and controllers must exist within this selection.
* @param {Ruleset} ruleset
* @param {Configuration} cfg
*/
enable : function(selection, ruleset, cfg) {
cfg = cfg || {};
if(cfg.checkTargets || cfg.checkTargets === undefined) {
ruleset.checkTargets(selection, cfg);
}
var self = this;
if(cfg.log) {
log("Enabling dependency change monitoring on " + selection.get(0));
}
// Namespace our handler to avoid conflicts
//
var handler = function() { ruleset.applyRules(selection, cfg); };
var val = selection.on ? selection.on("change.deps", null, null, handler) : selection.live("change.deps", handler);
ruleset.applyRules(selection, cfg);
return val;
}
};
$.deps = deps;
})(jQuery);
jquery.tooltip.js 0000644 00000043224 15155665675 0010144 0 ustar 00 /* ========================================================================
* Bootstrap: transition.js v3.3.4
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ========================================================================
* Changed function name for avoid conflict
* ======================================================================== */
+function ($) {
'use strict';
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================
function transitionEnd() {
var el = document.createElement('bootstrap')
var transEndEventNames = {
WebkitTransition : 'webkitTransitionEnd',
MozTransition : 'transitionend',
OTransition : 'oTransitionEnd otransitionend',
transition : 'transitionend'
}
for (var name in transEndEventNames) {
if (el.style[name] !== undefined) {
return { end: transEndEventNames[name] }
}
}
return false // explicit for ie8 ( ._.)
}
// http://blog.alexmaccaw.com/css-transitions
$.fn.CSemulateTransitionEnd = function (duration) {
var called = false
var $el = this
$(this).one('bsTransitionEnd', function () { called = true })
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
setTimeout(callback, duration)
return this
}
$(function () {
$.support.transition = transitionEnd()
if (!$.support.transition) return
$.event.special.bsTransitionEnd = {
bindType: $.support.transition.end,
delegateType: $.support.transition.end,
handle: function (e) {
if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
}
}
})
}(jQuery);
/* ========================================================================
* Bootstrap: tooltip.js v3.3.4
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ========================================================================
* Changed function and class names for avoid conflict
* ======================================================================== */
+function ($) {
'use strict';
// TOOLTIP PUBLIC CLASS DEFINITION
// ===============================
var CSTooltip = function (element, options) {
this.type = null
this.options = null
this.enabled = null
this.timeout = null
this.hoverState = null
this.$element = null
this.init('cstooltip', element, options)
}
CSTooltip.VERSION = '3.3.4'
CSTooltip.TRANSITION_DURATION = 150
CSTooltip.DEFAULTS = {
animation: true,
placement: 'top',
selector: false,
template: '<div class="cs-tooltip" role="tooltip"><div class="cs-tooltip-arrow"></div><div class="cs-tooltip-inner"></div></div>',
trigger: 'hover focus',
title: '',
delay: 0,
html: false,
container: false,
viewport: {
selector: 'body',
padding: 0
}
}
CSTooltip.prototype.init = function (type, element, options) {
this.enabled = true
this.type = type
this.$element = $(element)
this.options = this.getOptions(options)
this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
if (this.$element[0] instanceof document.constructor && !this.options.selector) {
throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
}
var triggers = this.options.trigger.split(' ')
for (var i = triggers.length; i--;) {
var trigger = triggers[i]
if (trigger == 'click') {
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
} else if (trigger != 'manual') {
var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
}
}
this.options.selector ?
(this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
this.fixTitle()
}
CSTooltip.prototype.getDefaults = function () {
return CSTooltip.DEFAULTS
}
CSTooltip.prototype.getOptions = function (options) {
options = $.extend({}, this.getDefaults(), this.$element.data(), options)
if (options.delay && typeof options.delay == 'number') {
options.delay = {
show: options.delay,
hide: options.delay
}
}
return options
}
CSTooltip.prototype.getDelegateOptions = function () {
var options = {}
var defaults = this.getDefaults()
this._options && $.each(this._options, function (key, value) {
if (defaults[key] != value) options[key] = value
})
return options
}
CSTooltip.prototype.enter = function (obj) {
var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget).data('bs.' + this.type)
if (self && self.$tip && self.$tip.is(':visible')) {
self.hoverState = 'in'
return
}
if (!self) {
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
$(obj.currentTarget).data('bs.' + this.type, self)
}
clearTimeout(self.timeout)
self.hoverState = 'in'
if (!self.options.delay || !self.options.delay.show) return self.show()
self.timeout = setTimeout(function () {
if (self.hoverState == 'in') self.show()
}, self.options.delay.show)
}
CSTooltip.prototype.leave = function (obj) {
var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget).data('bs.' + this.type)
if (!self) {
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
$(obj.currentTarget).data('bs.' + this.type, self)
}
clearTimeout(self.timeout)
self.hoverState = 'out'
if (!self.options.delay || !self.options.delay.hide) return self.hide()
self.timeout = setTimeout(function () {
if (self.hoverState == 'out') self.hide()
}, self.options.delay.hide)
}
CSTooltip.prototype.show = function () {
var e = $.Event('show.bs.' + this.type)
if (this.hasContent() && this.enabled) {
this.$element.trigger(e)
var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
if (e.isDefaultPrevented() || !inDom) return
var that = this
var $tip = this.tip()
var tipId = this.getUID(this.type)
this.setContent()
$tip.attr('id', tipId)
this.$element.attr('aria-describedby', tipId)
if (this.options.animation) $tip.addClass('fade')
var placement = typeof this.options.placement == 'function' ?
this.options.placement.call(this, $tip[0], this.$element[0]) :
this.options.placement
var autoToken = /\s?auto?\s?/i
var autoPlace = autoToken.test(placement)
if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
$tip
.detach()
.css({ top: 0, left: 0, display: 'block' })
.addClass(placement)
.data('bs.' + this.type, this)
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
var pos = this.getPosition()
var actualWidth = $tip[0].offsetWidth
var actualHeight = $tip[0].offsetHeight
if (autoPlace) {
var orgPlacement = placement
var $container = this.options.container ? $(this.options.container) : this.$element.parent()
var containerDim = this.getPosition($container)
placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
placement
$tip
.removeClass(orgPlacement)
.addClass(placement)
}
var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
this.applyPlacement(calculatedOffset, placement)
var complete = function () {
var prevHoverState = that.hoverState
that.$element.trigger('shown.bs.' + that.type)
that.hoverState = null
if (prevHoverState == 'out') that.leave(that)
}
$.support.transition && this.$tip.hasClass('fade') ?
$tip
.one('bsTransitionEnd', complete)
.CSemulateTransitionEnd(CSTooltip.TRANSITION_DURATION) :
complete()
}
}
CSTooltip.prototype.applyPlacement = function (offset, placement) {
var $tip = this.tip()
var width = $tip[0].offsetWidth
var height = $tip[0].offsetHeight
// manually read margins because getBoundingClientRect includes difference
var marginTop = parseInt($tip.css('margin-top'), 10)
var marginLeft = parseInt($tip.css('margin-left'), 10)
// we must check for NaN for ie 8/9
if (isNaN(marginTop)) marginTop = 0
if (isNaN(marginLeft)) marginLeft = 0
offset.top = offset.top + marginTop
offset.left = offset.left + marginLeft
// $.fn.offset doesn't round pixel values
// so we use setOffset directly with our own function B-0
$.offset.setOffset($tip[0], $.extend({
using: function (props) {
$tip.css({
top: Math.round(props.top),
left: Math.round(props.left)
})
}
}, offset), 0)
$tip.addClass('in')
// check to see if placing tip in new offset caused the tip to resize itself
var actualWidth = $tip[0].offsetWidth
var actualHeight = $tip[0].offsetHeight
if (placement == 'top' && actualHeight != height) {
offset.top = offset.top + height - actualHeight
}
var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
if (delta.left) offset.left += delta.left
else offset.top += delta.top
var isVertical = /top|bottom/.test(placement)
var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
$tip.offset(offset)
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
}
CSTooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
this.arrow()
.css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
.css(isVertical ? 'top' : 'left', '')
}
CSTooltip.prototype.setContent = function () {
var $tip = this.tip()
var title = this.getTitle()
$tip.find('.cs-tooltip-inner')[this.options.html ? 'html' : 'text'](title)
$tip.removeClass('fade in top bottom left right')
}
CSTooltip.prototype.hide = function (callback) {
var that = this
var $tip = $(this.$tip)
var e = $.Event('hide.bs.' + this.type)
function complete() {
if (that.hoverState != 'in') $tip.detach()
that.$element
.removeAttr('aria-describedby')
.trigger('hidden.bs.' + that.type)
callback && callback()
}
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$tip.removeClass('in')
$.support.transition && $tip.hasClass('fade') ?
$tip
.one('bsTransitionEnd', complete)
.CSemulateTransitionEnd(CSTooltip.TRANSITION_DURATION) :
complete()
this.hoverState = null
return this
}
CSTooltip.prototype.fixTitle = function () {
var $e = this.$element
if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
}
}
CSTooltip.prototype.hasContent = function () {
return this.getTitle()
}
CSTooltip.prototype.getPosition = function ($element) {
$element = $element || this.$element
var el = $element[0]
var isBody = el.tagName == 'BODY'
var elRect = el.getBoundingClientRect()
if (elRect.width == null) {
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
}
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
return $.extend({}, elRect, scroll, outerDims, elOffset)
}
CSTooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
/* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
}
CSTooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
var delta = { top: 0, left: 0 }
if (!this.$viewport) return delta
var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
var viewportDimensions = this.getPosition(this.$viewport)
if (/right|left/.test(placement)) {
var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
if (topEdgeOffset < viewportDimensions.top) { // top overflow
delta.top = viewportDimensions.top - topEdgeOffset
} else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
}
} else {
var leftEdgeOffset = pos.left - viewportPadding
var rightEdgeOffset = pos.left + viewportPadding + actualWidth
if (leftEdgeOffset < viewportDimensions.left) { // left overflow
delta.left = viewportDimensions.left - leftEdgeOffset
} else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
}
}
return delta
}
CSTooltip.prototype.getTitle = function () {
var title
var $e = this.$element
var o = this.options
title = $e.attr('data-original-title')
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
return title
}
CSTooltip.prototype.getUID = function (prefix) {
do prefix += ~~(Math.random() * 1000000)
while (document.getElementById(prefix))
return prefix
}
CSTooltip.prototype.tip = function () {
return (this.$tip = this.$tip || $(this.options.template))
}
CSTooltip.prototype.arrow = function () {
return (this.$arrow = this.$arrow || this.tip().find('.cs-tooltip-arrow'))
}
CSTooltip.prototype.enable = function () {
this.enabled = true
}
CSTooltip.prototype.disable = function () {
this.enabled = false
}
CSTooltip.prototype.toggleEnabled = function () {
this.enabled = !this.enabled
}
CSTooltip.prototype.toggle = function (e) {
var self = this
if (e) {
self = $(e.currentTarget).data('bs.' + this.type)
if (!self) {
self = new this.constructor(e.currentTarget, this.getDelegateOptions())
$(e.currentTarget).data('bs.' + this.type, self)
}
}
self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
}
CSTooltip.prototype.destroy = function () {
var that = this
clearTimeout(this.timeout)
this.hide(function () {
that.$element.off('.' + that.type).removeData('bs.' + that.type)
})
}
// TOOLTIP PLUGIN DEFINITION
// =========================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.cstooltip')
var options = typeof option == 'object' && option
if (!data && /destroy|hide/.test(option)) return
if (!data) $this.data('bs.cstooltip', (data = new CSTooltip(this, options)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.cstooltip
$.fn.cstooltip = Plugin
$.fn.cstooltip.Constructor = CSTooltip
// TOOLTIP NO CONFLICT
// ===================
$.fn.cstooltip.noConflict = function () {
$.fn.cstooltip = old
return this
}
}(jQuery);
_base.scss 0000644 00000056547 15156000766 0006541 0 ustar 00 .cs-framework{
position: relative;
margin-top: 20px;
margin-right: 20px;
label{
padding: 0;
margin: 0;
display: inline-block;
}
.cs-settings-error{
margin: 0 0 15px 0;
}
.cs-header{
position: relative;
background-color: #050505;
padding: 25px;
@include border-radius(2px 2px 0 0);
h1{
color: #fff;
float: left;
font-size: 1.5em;
line-height: 26px;
font-weight: 400;
margin: 0;
small{
font-size: 11px;
color: #555;
font-weight: 500;
}
}
fieldset{
float: right;
input{
margin: 0 2px;
line-height: 26px;
}
}
}
.cs-body{
position: relative;
background-color: #fff;
}
.cs-nav{
display: block;
position: relative;
z-index: 10;
float: left;
width: 225px;
ul{
clear: left;
margin: 0;
list-style-type: none;
li{
margin-bottom: 0;
a{
font-size: 13px;
position: relative;
display: block;
padding: 15px;
text-decoration: none;
color: #999;
background-color: #222;
border-bottom: 1px solid #2f2f2f;
@include transition(all 0.2s ease-out);
&:hover{
color: #fff;
}
&:focus{
outline: none;
@include box-shadow(none);
}
}
.cs-section-active{
color: #fff;
background-color: #111;
&:after{
content: " ";
position: absolute;
right: 0;
top: 50%;
height: 0;
width: 0;
pointer-events: none;
border: solid transparent;
border-right-color: #fff;
border-width: 4px;
margin-top: -4px;
}
}
.cs-arrow:after{
content: "\e85b";
display: inline-block;
font-family: "temavadisi";
font-size: 9px;
line-height: 1;
position: absolute;
right: 10px;
top: 50%;
margin-top: -4px;
@include transform(rotate(0));
@include transition(transform 0.2s);
}
&.cs-tab-active .cs-arrow:after{
@include transform( rotate(90deg) );
}
}
ul{
display: none;
position: relative;
border-bottom: 1px solid #2f2f2f;
position: relative;
li{
a{
font-size: 12px;
padding: 13px 15px 13px 25px;
background-color: #191919;
border-bottom: 1px solid #222;
}
.cs-section-active{
background-color: #101010;
}
&:last-child a{
border-bottom: 0;
}
}
&:before{
content: '';
position: absolute;
top: 0;
left: 15px;
z-index: 1;
width: 1px;
height: 100%;
background-color: rgba(#222, 0.75);
}
}
}
.cs-icon{
width: 20px;
margin-right: 5px;
font-size: 14px;
text-align: center;
}
.cs-seperator{
color: #fff;
font-weight: 600;
text-transform: uppercase;
padding: 30px 15px 15px 15px;
border-bottom: 1px dashed #2f2f2f;
}
}
.cs-nav-background{
position: absolute;
top: 0;
left: 0;
bottom: 0;
z-index: 9;
width: 225px;
background-color: #222;
}
.cs-content{
position: relative;
margin-left: 225px;
.cs-sections{
float: left;
width: 100%;
}
.cs-section-title{
display: none;
padding: 20px 30px;
background-color: #5bc0de;
h3{
color: #fff;
margin: 0;
padding: 0 !important;
font-weight: bold;
text-transform: uppercase;
@include text-shadow(1px 1px 0 rgba(#44a7c5, 0.5));
}
}
.cs-section{
display:none;
}
}
.cs-footer{
padding: 20px;
color: #555;
text-align: right;
font-size: 11px;
background-color: #050505;
@include border-radius(0 0 2px 2px);
}
.cs-show-all{
.cs-nav-background,
.cs-nav{
display: none;
}
.cs-content{
margin-left: 0;
}
.cs-section-title,
.cs-section{
display: block !important;
}
}
.cs-expand-all{
position: absolute;
right: 40px;
bottom: 5px;
z-index: 1;
color: #555;
font-size: 11px;
font-weight: 500;
text-decoration: none;
&:hover{
color: #fff;
}
&:focus{
@include box-shadow(none);
}
}
}
.cs-metabox-framework{
margin: -6px -12px -12px -12px;
.cs-content{
.cs-section-title{
padding: 20px;
}
}
}
.cs-element{
position: relative;
padding: 30px;
+ .cs-element{
border-top: 1px solid #eee;
}
p:last-child{
margin-bottom: 0 !important;
}
&:after,
&:before{
content: " ";
display: table;
}
&:after{
clear: both;
}
h4{
margin-top: 0;
}
.cs-title{
position: relative;
width: 25%;
float: left;
h4{
margin: 0;
color: #23282d;
}
}
.cs-fieldset{
margin-left: 30%;
}
pre{
clear: both;
color: #ccc;
background-color: #222;
padding: 15px;
overflow: auto;
@include border-radius(2px);
strong{
color: #ffbc00;
}
}
}
.cs-pseudo-field{
padding: 0 5px 0 0 !important;
border: 0;
display: inline-block;
}
.cs-field-text{
input{
width: 340px;
max-width: 100%;
}
}
.cs-field-textarea{
textarea{
width: 100%;
max-width: 100%;
min-height: 125px;
}
.cs-shortcode{
margin-bottom: 10px;
}
}
.cs-field-wysiwyg{
textarea{
width: 100%;
max-width: 100%;
min-height: 125px;
}
.wp-editor-container{
clear: none;
}
}
.cs-field-number{
input{
width: 70px;
}
em{
margin-left: 5px;
color: #bbb;
}
}
.cs-field-select{
select{
max-width: 100%;
}
}
.cs-field-typography{
select,
.chosen-container{
margin-right: 5px;
}
.cs-typo-variant{
min-width: 90px;
}
}
.cs-field-checkbox,
.cs-field-radio{
ul{
margin: 0;
padding: 0;
list-style-type: none;
overflow-y: auto;
max-height: 305px;
}
.horizontal li{
display: inline-block;
margin-right: 15px;
margin-bottom: 15px;
}
input[type="radio"]:checked:before{
line-height: 10px;
}
}
.cs-field-switcher{
label{
display: block;
float: left;
cursor: pointer;
position: relative;
width: 62px;
height: 26px;
padding: 0;
margin: 0;
overflow: hidden;
@include border-radius(20px);
span{
position: absolute;
top: 4px;
left: 4px;
width: 18px;
height: 18px;
background-color: #fff;
@include border-radius(16px);
@include transition(left 0.15s ease-out);
}
input{
position: absolute;
top: 0;
left: 0;
opacity: 0;
&:checked ~ em{
background: #4fb845;
}
&:checked ~ em:before{
opacity: 0;
}
&:checked ~ em:after{
opacity: 1;
}
&:checked ~ span{
left: 40px;
}
}
em{
position: relative;
display: block;
height: inherit;
font-size: 11px;
line-height: 26px;
font-weight: 500;
font-style: normal;
text-transform: uppercase;
color: #fff;
background-color: #ed6f6f;
@include transition(background 0.15s ease-out);
}
em:before, em:after{
position: absolute;
@include transition(opacity 0.15s ease-out);
}
em:before{
content: attr(data-off);
right: 14px;
}
em:after{
content: attr(data-on);
left: 14px;
opacity: 0;
}
}
.cs-text-desc{
float: left;
margin-left: 5px;
margin-top: 0;
padding-top: 4px;
}
}
.cs-field-image_select{
label{
display: inline-block;
margin: 5px;
img{
max-width: 100%;
vertical-align: bottom;
background-color: #fff;
border: 2px solid #eee;
@include opacity(0.75);
@include transition(all 0.15s ease-out);
}
}
input{
display: none;
&:checked ~ img{
border-color: #333;
@include opacity(1);
}
}
}
.cs-field-upload{
input{
width: 420px;
max-width: 100%;
}
}
.cs-field-background{
.cs-field-color_picker{
position: relative;
top: 10px;
}
}
.cs-field-color_picker{
.cs-alpha-wrap{
display: none;
position: relative;
top: -1px;
width: 235px;
padding: 9px 10px;
border: 1px solid #dfdfdf;
border-top: none;
background-color: #fff;
}
.cs-alpha-slider{
position: absolute;
width: 190px;
margin-left: 2px;
height: 18px;
.ui-slider-handle{
position: absolute;
top: -3px;
bottom: -3px;
z-index: 5;
border-color: #aaa;
border-style: solid;
border-width: 4px 3px;
width: 10px;
height: 16px;
margin: 0 -5px;
background: none;
cursor: ew-resize;
@include opacity(0.9);
@include border-radius(4px);
@include box-shadow(0 1px 2px rgba(black, 0.2));
&:before{
content: " ";
position: absolute;
left: -2px;
right: -2px;
top: -3px;
bottom: -3px;
border: 2px solid #fff;
@include border-radius(3px);
}
}
}
.cs-alpha-slider-offset{
height: 18px;
width: 200px;
background: url(../images/checkerboard.png) repeat-y center left scroll #fff;
@include box-shadow(0 0 5px rgba(black, 0.4) inset);
@include border-radius(2px);
}
.cs-alpha-text{
position: absolute;
top: 12px;
right: 10px;
width: 30px;
font-size: 12px;
line-height: 12px;
text-align: center;
color: #999;
}
}
.cs-field-backup{
textarea{
width: 100%;
min-height: 200px;
margin-bottom: 5px;
}
small{
display: inline-block;
margin: 5px;
}
hr{
margin: 30px 0;
}
}
.cs-field-fieldset{
.cs-inner{
border:1px solid #eee;
background-color: #fff;
}
.cs-element{
padding: 20px;
}
}
.cs-field-group{
.cs-element{
padding: 20px;
}
.cs-group{
display: none;
position: relative;
margin-bottom: 5px;
h4{
font-size: 1em;
}
}
.cs-group-content{
border: 1px solid #e5e5e5;
background: #fff;
}
.cs-group-title{
border: 1px solid #e5e5e5;
background: #fafafa;
@include transition(border-color 0.15s);
&:active,
&:hover,
&:focus{
border: 1px solid #bbb;
background: #fafafa;
outline: none;
}
}
.cs-group-title{
display: block;
cursor: pointer;
position: relative;
margin: 0;
padding: 15px;
min-height: 0;
font-size: 100%;
}
.cs-group-content{
padding: 0;
border-top: 0;
}
.widget-placeholder{
margin-bottom: 8px;
}
.ui-accordion .cs-group{
display: block;
}
.ui-accordion-icons{
padding-left: 30px;
}
.ui-accordion-header-icon{
position: absolute;
left: .5em;
top: 50%;
margin-top: -10px;
text-indent: 0;
color: #bbb;
}
.ui-sortable-helper{
.cs-group-content{
display: none !important;
}
}
}
.cs-help{
position: absolute;
top: 5px;
right: 5px;
padding: 5px;
font-size: 14px;
color: #aaa;
}
.cs-field-heading{
font-size: 1.5em;
font-weight: bold;
color: #23282d;
background-color: #f5f5f5 !important;
}
.cs-field-subheading{
font-size: 14px;
font-weight: bold;
padding-top: 17px;
padding-bottom: 17px;
color: #23282d;
background-color: #f7f7f7 !important;
}
.cs-field-notice{
padding: 0 !important;
border: 0 !important;
+ .cs-element{
border-top: 0;
}
.cs-notice{
font-size: 12px;
padding: 17px 30px;
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
}
.cs-success{
color: #3c763d;
border-color: #d6e9c6;
background-color: #dff0d8;
}
.cs-info{
color: #31708f;
border-color: #bce8f1;
background-color: #d9edf7;
}
.cs-warning{
color: #8a6d3b;
border-color: #faebcc;
background-color: #fcf8e3;
}
.cs-danger{
color: #a94442;
border-color: #ebccd1;
background-color: #f2dede;
}
}
.cs-field-icon{
input{
display: none;
}
.button{
margin-right: 5px;
}
.cs-icon-preview i{
display: inline-block;
font-size: 14px;
width: 30px;
height: 26px;
line-height: 26px;
margin-right: 5px;
text-align: center;
vertical-align: top;
color: #555;
border: 1px solid #ccc;
background-color: #f7f7f7;
@include border-radius(3px);
@include box-shadow(0 1px 0 rgba(black, 0.08));
}
}
.cs-field-image{
input{
display: none;
}
.cs-preview{
display: inline-block;
position: relative;
padding: 4px;
min-width: 44px;
min-height: 22px;
margin-bottom: 10px;
border: 1px solid #ccc;
background-color: #f9f9f9;
@include border-radius(2px);
@include box-shadow(0 1px 0 rgba(black, 0.08));
img{
max-height: 90px;
display: inline-block;
vertical-align: middle;
}
}
.cs-remove{
position: absolute;
top: 4px;
right: 4px;
width: 22px;
height: 22px;
font-size: 11px;
line-height: 22px;
text-align: center;
cursor: pointer;
color: #fff;
background-color: #e14d43;
@include opacity(0.8);
@include border-radius(2px);
@include transition(opacity .2s);
&:hover{
@include opacity(1);
}
}
}
.cs-field-gallery{
input{
display: none;
}
ul{
margin: 0;
padding: 0;
list-style-type: none;
li{
display: inline-block;
position: relative;
padding: 4px;
margin: 0 5px 10px 0;
border: 1px solid #ccc;
background-color: #f9f9f9;
@include border-radius(2px);
@include box-shadow(0 1px 0 rgba(black, 0.08));
img{
max-height: 60px;
display: inline-block;
vertical-align: middle;
}
}
}
.button{
margin-right: 5px;
margin-bottom: 5px;
}
}
.cs-field-sorter{
.ui-sortable-placeholder{
height: 20px;
border: 1px dashed #f1c40f;
background-color: #fffae4;
}
.cs-modules{
float: left;
width: 50%;
}
.cs-enabled{
margin-right: 15px;
}
.cs-disabled,
.cs-enabled{
padding: 5px 15px;
border: 1px dashed #ddd;
background-color: #fff;
}
.cs-disabled{
li{
@include transition(opacity 0.15s);
@include opacity(0.5);
}
.ui-sortable-helper{
@include opacity(1);
}
}
h3{
font-size: 14px;
margin: 0 0 15px 0;
}
ul{
list-style-type: none;
margin: 0;
padding: 0;
min-height: 62px;
li{
margin: 10px 0;
padding: 10px 15px;
cursor: move;
font-weight: bold;
text-align: center;
border: 1px solid #e5e5e5;
background-color: #fafafa;
@include transition(border-color 0.15s);
&:hover{
border-color: #bbb;
}
}
}
}
.cs-taxonomy{
margin: 0;
> .cs-element{
border-top: 0;
}
> .cs-field-heading{
font-size: 1.1em;
padding: 20px !important;
border: 1px solid #ddd;
}
> .cs-field-subheading{
font-size: 12px;
padding: 15px !important;
border: 1px solid #ddd;
}
> .cs-field-notice{
.cs-notice{
padding: 15px;
border-left-width: 1px;
border-left-style: solid;
border-right-width: 1px;
border-right-style: solid;
}
}
}
.cs-taxonomy-add-fields{
> .cs-element{
padding: 8px 0;
margin: 0 0 10px;
> .cs-title{
float: none;
width: 100%;
padding: 2px 2px 4px 0;
h4{
font-size: 12px;
font-weight: normal;
}
}
> .cs-fieldset{
margin-left: 0;
> .cs-help{
right: -5px;
}
}
}
}
.cs-taxonomy-edit-fields{
> .cs-element{
padding: 20px 0;
> .cs-title{
width: 225px;
h4{
font-size: 14px;
font-weight: 600;
line-height: 1.3;
display: inline-block;
vertical-align: middle;
}
}
> .cs-fieldset{
margin-left: 225px;
> .cs-help{
top: -5px;
right: -5px;
}
}
}
> .cs-field-notice{
margin: 20px 0;
}
> .cs-field-subheading,
> .cs-field-heading{
margin: 20px 0;
border: 1px solid #ddd;
}
}
.cs-warning-primary{
color: #fff !important;
border-color: #d02c21 #ba281e #ba281e !important;
background: #e14d43 !important;
@include box-shadow(0 1px 0 #ba281e !important);
@include text-shadow(0 -1px 1px #ba281e, 1px 0 1px #ba281e, 0 1px 1px #ba281e, -1px 0 1px #ba281e !important);
&:hover,
&:focus{
border-color: #ba281e !important;
background: #e35950 !important;
@include box-shadow(0 1px 0 #ba281e !important);
}
&:active{
border-color: #ba281e !important;
background: #d02c21 !important;
@include box-shadow(inset 0 2px 0 #ba281e !important);
}
}
.cs-text-desc{
font-style: italic;
font-weight: 400;
margin-top: 10px;
color: #999;
}
.cs-text-success{
color: #2b542c;
}
.cs-text-info{
color: #31708f;
}
.cs-text-warning{
color: #d02c21;
}
.cs-text-muted{
color: #aaa;
}
.cs-text-left{
text-align: left;
}
.cs-text-center{
text-align: center;
}
.cs-text-right{
text-align: right;
}
.cs-block-left{
float: left;
}
.cs-block-right{
float: right;
}
.cs-text-highlight{
padding: 2px 4px;
font-size: 90%;
color: #c7254e;
background-color: #f9f2f4;
@include border-radius(2px);
}
.cs-text-highlight-gray{
padding: 2px 4px;
font-size: 90%;
background-color: #f0f0f0;
@include border-radius(2px);
}
#cs-save-ajax{
display: none;
position: relative;
top: 4px;
right: 5px;
font-size: 12px;
padding: 3px 8px;
color: #fff;
background-color: #27ae60;
@include border-radius(2px);
}
.cs-tooltip{
position: absolute;
z-index: 100103;
display: block;
visibility: visible;
font-size: 12px;
line-height: 1.4;
@include opacity(0);
@include transition(opacity .15s linear);
&.in{
@include opacity(1);
}
}
.cs-tooltip-inner{
max-width: 200px;
padding: 6px 12px;
color: #fff;
text-align: center;
text-decoration: none;
background-color: #000;
background-color: rgba(black, 0.85);
@include border-radius(4px);
}
.cs-dialog{
display: none;
padding: 0;
.cs-dialog-header{
width: 100%;
padding: 16px 0;
background-color: #f5f5f5;
border-bottom: 1px solid #eee;
select,
.chosen-container{
display: block;
margin: 0 auto;
width: 250px !important;
}
}
.cs-element{
padding: 15px 30px 15px 15px;
}
.cs-insert-button{
text-align: center;
width: 100%;
padding: 16px 0;
background-color: #f5f5f5;
border-top: 1px solid #eee;
}
.cs-dialog-load{
min-height: 250px;
overflow: hidden;
overflow-y: auto;
}
.cs-clone-button{
margin: 10px 0;
text-align: center;
}
.cs-shortcode-clone{
position: relative;
border-top: 1px dashed #5cb85c;
.cs-remove-clone{
display:none;
position: absolute;
right: 5px;
top: 5px;
z-index: 1;
padding: 5px;
color: #ed6f6f;
font-size: 14px;
&:hover{
text-decoration: none;
color: darken( #ed6f6f, 10% );
}
}
}
a{
&:active,
&:focus{
outline: none;
@include box-shadow(none);
}
}
h4{
font-size: 13px;
small{
font-style: italic;
font-weight: 400;
color: #aaa;
}
}
}
#cs-icon-dialog{
.cs-icon-search{
width: 250px;
height: 40px;
line-height: 40px;
}
a{
display: inline-block;
padding: 5px;
cursor: pointer;
.cs-icon{
position: relative;
padding: 5px;
display: inline-block;
font-size: 14px;
width: 30px;
height: 26px;
line-height: 26px;
text-align: center;
vertical-align: top;
color: #555;
border: 1px solid #ccc;
background-color: #f7f7f7;
@include border-radius(3px);
@include box-shadow(0 1px 0 rgba(black, 0.08));
}
&:hover .cs-icon{
color: #fff;
border-color: #222;
background-color: #222;
}
}
.cs-icon-loading{
color: #999;
text-align: center;
margin-top: 10px;
}
.cs-icon-title{
padding: 15px;
margin: 10px 0;
text-align: center;
text-transform: uppercase;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
background-color: #fafafa;
&:first-child{
margin-top: 0;
border-top: 0;
}
}
}
.cs-shortcode-scrolling,
.cs-icon-scrolling{
overflow: hidden;
height: 100%;
.wp-full-overlay{
z-index: 1;
}
}
#side-sortables{
.cs-content .cs-section-title{
padding: 12px;
}
.cs-element{
padding: 12px;
.cs-title{
float: none;
width: 100%;
margin-bottom: 10px;
}
.cs-fieldset{
margin-left: 0;
}
}
.cs-field-upload input{
width: 185px;
}
.cs-field-notice .cs-notice{
padding: 12px;
}
}
.widget-content{
.cs-element{
position: relative;
top: -1px;
margin-right: -15px;
margin-left: -15px;
padding: 12px 15px;
&:last-child{
margin-bottom: 15px;
}
.cs-title{
float: none;
width: 100%;
margin-bottom: 5px;
}
.cs-fieldset{
margin-left: 0;
}
}
.cs-field-text input{
width: 100%;
}
.cs-field-upload input{
width: 330px;
}
.cs-field-notice .cs-notice{
padding: 15px;
}
}
#customize-controls{
.customize-control-cs_field{
position: relative;
top: -10px;
margin-bottom: 0;
.chosen-container{
&.chosen-with-drop .chosen-drop{
position: relative;
}
}
}
.cs-element{
margin-right: -15px;
margin-left: -15px;
padding: 12px 15px;
.cs-title{
float: none;
width: 100%;
margin-bottom: 10px;
h4{
font-size: 14px;
font-weight: 600;
color: inherit;
}
}
.cs-fieldset{
margin-left: 0;
}
}
.widget-content{
.cs-element{
margin-right: -10px;
margin-left: -10px;
padding: 10px 12px;
}
}
.cs-field-select select{
width: 100%;
}
.cs-field-upload input{
width: 175px;
margin-right: 5px;
}
.cs-field-heading{
color: inherit;
font-size: 14px;
line-height: 1em;
}
.cs-field-subheading{
color: inherit;
font-size: 11px;
}
.cs-text-desc{
margin-top: 4px;
font-size: 12px;
}
.cs-field-content,
.cs-field-notice .cs-notice{
padding: 15px;
}
}
@media only screen and (max-width:1200px){
.cs-metabox-framework{
.cs-element{
.cs-title{
float: none;
width: 100%;
margin-bottom: 10px;
}
.cs-fieldset{
margin-left: 0;
}
}
}
}
@media only screen and (max-width:782px){
.cs-framework{
.cs-header{
text-align: center;
h1{
width: 100%;
margin-bottom: 10px;
}
fieldset{
float: none;
}
}
.cs-expand-all,
.cs-nav-background,
.cs-nav{
display: none;
}
.cs-content{
margin-left: 0;
}
.cs-section-title,
.cs-section{
display: block !important;
}
.cs-element{
.cs-title{
float: none;
width: 100%;
margin-bottom: 10px;
}
.cs-fieldset{
margin-left: 0;
}
}
}
}
_chosen.scss 0000644 00000031260 15156000766 0007067 0 ustar 00 /* @group Base */
.chosen-container {
position: relative;
display: inline-block;
vertical-align: middle;
font-size: 13px;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.chosen-container * {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.chosen-container .chosen-drop {
position: absolute;
top: 100%;
left: -9999px;
z-index: 1010;
width: 100%;
border: 1px solid #aaa;
border-top: 0;
background: #fff;
box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
}
.chosen-container.chosen-with-drop .chosen-drop {
left: 0;
}
.chosen-container a {
cursor: pointer;
}
.chosen-container .search-choice .group-name, .chosen-container .chosen-single .group-name {
margin-right: 4px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-weight: normal;
color: #999999;
}
.chosen-container .search-choice .group-name:after, .chosen-container .chosen-single .group-name:after {
content: ":";
padding-left: 2px;
vertical-align: top;
}
/* @end */
/* @group Single Chosen */
.chosen-container-single .chosen-single {
position: relative;
display: block;
overflow: hidden;
padding: 0 0 0 8px;
height: 25px;
border: 1px solid #aaa;
border-radius: 5px;
background-color: #fff;
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
background: -webkit-linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
background: -moz-linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
background: -o-linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
background: linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
background-clip: padding-box;
box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1);
color: #444;
text-decoration: none;
white-space: nowrap;
line-height: 24px;
}
.chosen-container-single .chosen-default {
color: #999;
}
.chosen-container-single .chosen-single span {
display: block;
overflow: hidden;
margin-right: 26px;
text-overflow: ellipsis;
white-space: nowrap;
}
.chosen-container-single .chosen-single-with-deselect span {
margin-right: 38px;
}
.chosen-container-single .chosen-single abbr {
position: absolute;
top: 6px;
right: 26px;
display: block;
width: 12px;
height: 12px;
background: url('../images/chosen-sprite.png') -42px 1px no-repeat;
font-size: 1px;
}
.chosen-container-single .chosen-single abbr:hover {
background-position: -42px -10px;
}
.chosen-container-single.chosen-disabled .chosen-single abbr:hover {
background-position: -42px -10px;
}
.chosen-container-single .chosen-single div {
position: absolute;
top: 0;
right: 0;
display: block;
width: 18px;
height: 100%;
}
.chosen-container-single .chosen-single div b {
display: block;
width: 100%;
height: 100%;
background: url('../images/chosen-sprite.png') no-repeat 0px 2px;
}
.chosen-container-single .chosen-search {
position: relative;
z-index: 1010;
margin: 0;
padding: 3px 4px;
white-space: nowrap;
}
.chosen-container-single .chosen-search input[type="text"] {
margin: 1px 0;
padding: 4px 20px 4px 5px;
width: 100%;
height: auto;
outline: 0;
border: 1px solid #aaa;
background: white url('../images/chosen-sprite.png') no-repeat 100% -20px;
background: url('../images/chosen-sprite.png') no-repeat 100% -20px;
font-size: 1em;
font-family: sans-serif;
line-height: normal;
border-radius: 0;
}
.chosen-container-single .chosen-drop {
margin-top: -1px;
border-radius: 0 0 4px 4px;
background-clip: padding-box;
}
.chosen-container-single.chosen-container-single-nosearch .chosen-search {
position: absolute;
left: -9999px;
}
/* @end */
/* @group Results */
.chosen-container .chosen-results {
color: #444;
position: relative;
overflow-x: hidden;
overflow-y: auto;
margin: 0 4px 4px 0;
padding: 0 0 0 4px;
max-height: 240px;
-webkit-overflow-scrolling: touch;
}
.chosen-container .chosen-results li {
display: none;
margin: 0;
padding: 5px 6px;
list-style: none;
line-height: 15px;
word-wrap: break-word;
-webkit-touch-callout: none;
}
.chosen-container .chosen-results li.active-result {
display: list-item;
cursor: pointer;
}
.chosen-container .chosen-results li.disabled-result {
display: list-item;
color: #ccc;
cursor: default;
}
.chosen-container .chosen-results li.highlighted {
background-color: #3875d7;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%);
background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%);
background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%);
background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
color: #fff;
}
.chosen-container .chosen-results li.no-results {
color: #777;
display: list-item;
background: #f4f4f4;
}
.chosen-container .chosen-results li.group-result {
display: list-item;
font-weight: bold;
cursor: default;
}
.chosen-container .chosen-results li.group-option {
padding-left: 15px;
}
.chosen-container .chosen-results li em {
font-style: normal;
text-decoration: underline;
}
/* @end */
/* @group Multi Chosen */
.chosen-container-multi .chosen-choices {
position: relative;
overflow: hidden;
margin: 0;
padding: 0 5px;
width: 100%;
height: auto;
border: 1px solid #aaa;
background-color: #fff;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
cursor: text;
}
.chosen-container-multi .chosen-choices li {
float: left;
list-style: none;
}
.chosen-container-multi .chosen-choices li.search-field {
margin: 0;
padding: 0;
white-space: nowrap;
}
.chosen-container-multi .chosen-choices li.search-field input[type="text"] {
margin: 1px 0;
padding: 0;
height: 25px;
outline: 0;
border: 0 !important;
background: transparent !important;
box-shadow: none;
color: #999;
font-size: 100%;
font-family: sans-serif;
line-height: normal;
border-radius: 0;
}
.chosen-container-multi .chosen-choices li.search-choice {
position: relative;
margin: 3px 5px 3px 0;
padding: 3px 20px 3px 5px;
border: 1px solid #aaa;
max-width: 100%;
border-radius: 3px;
background-color: #eeeeee;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
background-size: 100% 19px;
background-repeat: repeat-x;
background-clip: padding-box;
box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
color: #333;
line-height: 13px;
cursor: default;
}
.chosen-container-multi .chosen-choices li.search-choice span {
word-wrap: break-word;
}
.chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
position: absolute;
top: 4px;
right: 3px;
display: block;
width: 12px;
height: 12px;
background: url('../images/chosen-sprite.png') -42px 1px no-repeat;
font-size: 1px;
}
.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
background-position: -42px -10px;
}
.chosen-container-multi .chosen-choices li.search-choice-disabled {
padding-right: 5px;
border: 1px solid #ccc;
background-color: #e4e4e4;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
color: #666;
}
.chosen-container-multi .chosen-choices li.search-choice-focus {
background: #d4d4d4;
}
.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
background-position: -42px -10px;
}
.chosen-container-multi .chosen-results {
margin: 0;
padding: 0;
}
.chosen-container-multi .chosen-drop .result-selected {
display: list-item;
color: #ccc;
cursor: default;
}
/* @end */
/* @group Active */
.chosen-container-active .chosen-single {
border: 1px solid #5897fb;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}
.chosen-container-active.chosen-with-drop .chosen-single {
border: 1px solid #aaa;
-moz-border-radius-bottomright: 0;
border-bottom-right-radius: 0;
-moz-border-radius-bottomleft: 0;
border-bottom-left-radius: 0;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%);
background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%);
background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%);
background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
box-shadow: 0 1px 0 #fff inset;
}
.chosen-container-active.chosen-with-drop .chosen-single div {
border-left: none;
background: transparent;
}
.chosen-container-active.chosen-with-drop .chosen-single div b {
background-position: -18px 2px;
}
.chosen-container-active .chosen-choices {
border: 1px solid #5897fb;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}
.chosen-container-active .chosen-choices li.search-field input[type="text"] {
color: #222 !important;
}
/* @end */
/* @group Disabled Support */
.chosen-disabled {
opacity: 0.5 !important;
cursor: default;
}
.chosen-disabled .chosen-single {
cursor: default;
}
.chosen-disabled .chosen-choices .search-choice .search-choice-close {
cursor: default;
}
/* @end */
/* @group Right to Left */
.chosen-rtl {
text-align: right;
}
.chosen-rtl .chosen-single {
overflow: visible;
padding: 0 8px 0 0;
}
.chosen-rtl .chosen-single span {
margin-right: 0;
margin-left: 26px;
direction: rtl;
}
.chosen-rtl .chosen-single-with-deselect span {
margin-left: 38px;
}
.chosen-rtl .chosen-single div {
right: auto;
left: 3px;
}
.chosen-rtl .chosen-single abbr {
right: auto;
left: 26px;
}
.chosen-rtl .chosen-choices li {
float: right;
}
.chosen-rtl .chosen-choices li.search-field input[type="text"] {
direction: rtl;
}
.chosen-rtl .chosen-choices li.search-choice {
margin: 3px 5px 3px 0;
padding: 3px 5px 3px 19px;
}
.chosen-rtl .chosen-choices li.search-choice .search-choice-close {
right: auto;
left: 4px;
}
.chosen-rtl.chosen-container-single-nosearch .chosen-search,
.chosen-rtl .chosen-drop {
left: 9999px;
}
.chosen-rtl.chosen-container-single .chosen-results {
margin: 0 0 4px 4px;
padding: 0 4px 0 0;
}
.chosen-rtl .chosen-results li.group-option {
padding-right: 15px;
padding-left: 0;
}
.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
border-right: none;
}
.chosen-rtl .chosen-search input[type="text"] {
padding: 4px 5px 4px 20px;
background: white url('../images/chosen-sprite.png') no-repeat -30px -20px;
background: url('../images/chosen-sprite.png') no-repeat -30px -20px;
direction: rtl;
}
.chosen-rtl.chosen-container-single .chosen-single div b {
background-position: 6px 2px;
}
.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
background-position: -12px 2px;
}
/* @end */
/* @group Retina compatibility */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
.chosen-rtl .chosen-search input[type="text"],
.chosen-container-single .chosen-single abbr,
.chosen-container-single .chosen-single div b,
.chosen-container-single .chosen-search input[type="text"],
.chosen-container-multi .chosen-choices .search-choice .search-choice-close,
.chosen-container .chosen-results-scroll-down span,
.chosen-container .chosen-results-scroll-up span {
background-image: url('../images/chosen-sprite@2x.png') !important;
background-size: 52px 37px !important;
background-repeat: no-repeat !important;
}
}
/* @end */
_mixins.scss 0000644 00000000063 15156000766 0007114 0 ustar 00 @mixin opacity( $opacity ) {
opacity: $opacity;
}