diff --git a/Classes/Application/GetChildrenForTreeNode/GetChildrenForTreeNodeQuery.php b/Classes/Application/GetChildrenForTreeNode/GetChildrenForTreeNodeQuery.php index 328b54e..70e8705 100644 --- a/Classes/Application/GetChildrenForTreeNode/GetChildrenForTreeNodeQuery.php +++ b/Classes/Application/GetChildrenForTreeNode/GetChildrenForTreeNodeQuery.php @@ -12,10 +12,12 @@ namespace Sitegeist\Archaeopteryx\Application\GetChildrenForTreeNode; -use Neos\ContentRepository\Domain\NodeAggregate\NodeAggregateIdentifier; -use Neos\ContentRepository\Domain\NodeType\NodeTypeName; +use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; +use Neos\ContentRepository\Core\NodeType\NodeTypeNames; +use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\Flow\Annotations as Flow; -use Sitegeist\Archaeopteryx\Application\Shared\NodeTypeNames; /** * @internal @@ -23,13 +25,11 @@ #[Flow\Proxy(false)] final class GetChildrenForTreeNodeQuery { - /** - * @param array> $dimensionValues - */ public function __construct( - public readonly string $workspaceName, - public readonly array $dimensionValues, - public readonly NodeAggregateIdentifier $treeNodeId, + public readonly ContentRepositoryId $contentRepositoryId, + public readonly WorkspaceName $workspaceName, + public readonly DimensionSpacePoint $dimensionSpacePoint, + public readonly NodeAggregateId $treeNodeId, public readonly string $nodeTypeFilter, public readonly NodeTypeNames $linkableNodeTypes, ) { @@ -40,6 +40,11 @@ public function __construct( */ public static function fromArray(array $array): self { + isset($array['contentRepositoryId']) + or throw new \InvalidArgumentException('Content Repository Id must be set'); + is_string($array['contentRepositoryId']) + or throw new \InvalidArgumentException('Content Repository Id must be a string'); + isset($array['workspaceName']) or throw new \InvalidArgumentException('Workspace name must be set'); is_string($array['workspaceName']) @@ -62,25 +67,12 @@ public static function fromArray(array $array): self or throw new \InvalidArgumentException('Linkable node types must be an array'); return new self( - workspaceName: $array['workspaceName'], - dimensionValues: $array['dimensionValues'], - treeNodeId: NodeAggregateIdentifier::fromString($array['treeNodeId']), + contentRepositoryId: ContentRepositoryId::fromString($array['contentRepositoryId']), + workspaceName: WorkspaceName::fromString($array['workspaceName']), + dimensionSpacePoint: DimensionSpacePoint::fromLegacyDimensionArray($array['dimensionValues']), + treeNodeId: NodeAggregateId::fromString($array['treeNodeId']), nodeTypeFilter: $array['nodeTypeFilter'] ?? '', linkableNodeTypes: NodeTypeNames::fromArray($array['linkableNodeTypes'] ?? []), ); } - - /** - * @return array - */ - public function getTargetDimensionValues(): array - { - $result = []; - - foreach ($this->dimensionValues as $dimensionName => $fallbackChain) { - $result[$dimensionName] = $fallbackChain[0] ?? ''; - } - - return $result; - } } diff --git a/Classes/Application/GetChildrenForTreeNode/GetChildrenForTreeNodeQueryHandler.php b/Classes/Application/GetChildrenForTreeNode/GetChildrenForTreeNodeQueryHandler.php index 3b41147..549d6bd 100644 --- a/Classes/Application/GetChildrenForTreeNode/GetChildrenForTreeNodeQueryHandler.php +++ b/Classes/Application/GetChildrenForTreeNode/GetChildrenForTreeNodeQueryHandler.php @@ -12,14 +12,14 @@ namespace Sitegeist\Archaeopteryx\Application\GetChildrenForTreeNode; -use Neos\ContentRepository\Domain\Model\Node; -use Neos\ContentRepository\Domain\Service\NodeTypeManager; +use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\NodeType\NodeTypeCriteria; +use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\Flow\Annotations as Flow; -use Neos\Neos\Domain\Service\ContentContextFactory; -use Sitegeist\Archaeopteryx\Application\Shared\NodeWasNotFound; -use Sitegeist\Archaeopteryx\Application\Shared\TreeNodeBuilder; use Sitegeist\Archaeopteryx\Application\Shared\TreeNodes; -use Sitegeist\Archaeopteryx\Infrastructure\ContentRepository\NodeTypeFilter; +use Sitegeist\Archaeopteryx\Infrastructure\ESCR\NodeService; +use Sitegeist\Archaeopteryx\Infrastructure\ESCR\NodeServiceFactory; +use Sitegeist\Archaeopteryx\Infrastructure\ESCR\NodeTypeService; +use Sitegeist\Archaeopteryx\Infrastructure\ESCR\NodeTypeServiceFactory; /** * @internal @@ -28,50 +28,44 @@ final class GetChildrenForTreeNodeQueryHandler { #[Flow\Inject] - protected ContentContextFactory $contentContextFactory; + protected NodeServiceFactory $nodeServiceFactory; #[Flow\Inject] - protected NodeTypeManager $nodeTypeManager; + protected NodeTypeServiceFactory $nodeTypeServiceFactory; public function handle(GetChildrenForTreeNodeQuery $query): GetChildrenForTreeNodeQueryResult { - $contentContext = $this->contentContextFactory->create([ - 'workspaceName' => $query->workspaceName, - 'dimensions' => $query->dimensionValues, - 'targetDimensions' => $query->getTargetDimensionValues(), - 'invisibleContentShown' => true, - 'removedContentShown' => false, - 'inaccessibleContentShown' => true - ]); + $nodeService = $this->nodeServiceFactory->create( + contentRepositoryId: $query->contentRepositoryId, + workspaceName: $query->workspaceName, + dimensionSpacePoint: $query->dimensionSpacePoint, + ); + $nodeTypeService = $this->nodeTypeServiceFactory->create( + contentRepositoryId: $query->contentRepositoryId, + ); - $node = $contentContext->getNodeByIdentifier((string) $query->treeNodeId); - if (!$node instanceof Node) { - throw NodeWasNotFound::becauseNodeWithGivenIdentifierDoesNotExistInContext( - nodeAggregateIdentifier: $query->treeNodeId, - contentContext: $contentContext, - ); - } + $node = $nodeService->requireNodeById($query->treeNodeId); return new GetChildrenForTreeNodeQueryResult( - children: $this->createTreeNodesFromChildrenOfNode($node, $query), + children: $this->createTreeNodesFromChildrenOfNode($nodeService, $nodeTypeService, $node, $query), ); } - private function createTreeNodesFromChildrenOfNode(Node $node, GetChildrenForTreeNodeQuery $query): TreeNodes + private function createTreeNodesFromChildrenOfNode(NodeService $nodeService, NodeTypeService $nodeTypeService, Node $node, GetChildrenForTreeNodeQuery $query): TreeNodes { - $linkableNodeTypesFilter = NodeTypeFilter::fromNodeTypeNames( - nodeTypeNames: $query->linkableNodeTypes, - nodeTypeManager: $this->nodeTypeManager + $linkableNodeTypesFilter = $nodeTypeService->createNodeTypeFilterFromNodeTypeNames( + nodeTypeNames: $query->linkableNodeTypes ); $items = []; + $nodeTypeCriteria = NodeTypeCriteria::fromFilterString($query->nodeTypeFilter); - foreach ($node->getChildNodes($query->nodeTypeFilter) as $childNode) { + foreach ($nodeService->findChildNodes($node, $nodeTypeCriteria) as $childNode) { /** @var Node $childNode */ - $items[] = TreeNodeBuilder::forNode($childNode) + $items[] = $nodeService->createTreeNodeBuilderForNode($childNode) ->setIsMatchedByFilter(true) ->setIsLinkable($linkableNodeTypesFilter->isSatisfiedByNode($childNode)) - ->setHasUnloadedChildren($childNode->getNumberOfChildNodes($query->nodeTypeFilter) > 0) + ->setHasUnloadedChildren($nodeService->getNumberOfChildNodes($childNode, $nodeTypeCriteria) > 0) ->build(); } diff --git a/Classes/Application/GetNodeSummary/GetNodeSummaryQuery.php b/Classes/Application/GetNodeSummary/GetNodeSummaryQuery.php index 3bf747a..07d9f8a 100644 --- a/Classes/Application/GetNodeSummary/GetNodeSummaryQuery.php +++ b/Classes/Application/GetNodeSummary/GetNodeSummaryQuery.php @@ -12,7 +12,10 @@ namespace Sitegeist\Archaeopteryx\Application\GetNodeSummary; -use Neos\ContentRepository\Domain\NodeAggregate\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; +use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\Flow\Annotations as Flow; /** @@ -21,13 +24,11 @@ #[Flow\Proxy(false)] final class GetNodeSummaryQuery { - /** - * @param array> $dimensionValues - */ public function __construct( - public readonly string $workspaceName, - public readonly array $dimensionValues, - public readonly NodeAggregateIdentifier $nodeId, + public readonly ContentRepositoryId $contentRepositoryId, + public readonly WorkspaceName $workspaceName, + public readonly DimensionSpacePoint $dimensionSpacePoint, + public readonly NodeAggregateId $nodeId, ) { } @@ -36,6 +37,11 @@ public function __construct( */ public static function fromArray(array $array): self { + isset($array['contentRepositoryId']) + or throw new \InvalidArgumentException('Content Repository Id must be set'); + is_string($array['contentRepositoryId']) + or throw new \InvalidArgumentException('Content Repository Id must be a string'); + isset($array['workspaceName']) or throw new \InvalidArgumentException('Workspace name must be set'); is_string($array['workspaceName']) @@ -52,23 +58,10 @@ public static function fromArray(array $array): self or throw new \InvalidArgumentException('Node id must be a string'); return new self( - workspaceName: $array['workspaceName'], - dimensionValues: $array['dimensionValues'], - nodeId: NodeAggregateIdentifier::fromString($array['nodeId']), + contentRepositoryId: ContentRepositoryId::fromString($array['contentRepositoryId']), + workspaceName: WorkspaceName::fromString($array['workspaceName']), + dimensionSpacePoint: DimensionSpacePoint::fromLegacyDimensionArray($array['dimensionValues']), + nodeId: NodeAggregateId::fromString($array['nodeId']), ); } - - /** - * @return array - */ - public function getTargetDimensionValues(): array - { - $result = []; - - foreach ($this->dimensionValues as $dimensionName => $fallbackChain) { - $result[$dimensionName] = $fallbackChain[0] ?? ''; - } - - return $result; - } } diff --git a/Classes/Application/GetNodeSummary/GetNodeSummaryQueryHandler.php b/Classes/Application/GetNodeSummary/GetNodeSummaryQueryHandler.php index d2c1453..f0bbfe1 100644 --- a/Classes/Application/GetNodeSummary/GetNodeSummaryQueryHandler.php +++ b/Classes/Application/GetNodeSummary/GetNodeSummaryQueryHandler.php @@ -13,11 +13,10 @@ namespace Sitegeist\Archaeopteryx\Application\GetNodeSummary; use GuzzleHttp\Psr7\Uri; -use Neos\ContentRepository\Domain\Model\Node; -use Neos\ContentRepository\Domain\Service\NodeTypeManager; +use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\Flow\Annotations as Flow; -use Neos\Neos\Domain\Service\ContentContextFactory; -use Sitegeist\Archaeopteryx\Application\Shared\NodeWasNotFound; +use Sitegeist\Archaeopteryx\Infrastructure\ESCR\NodeService; +use Sitegeist\Archaeopteryx\Infrastructure\ESCR\NodeServiceFactory; /** * @internal @@ -26,46 +25,35 @@ final class GetNodeSummaryQueryHandler { #[Flow\Inject] - protected ContentContextFactory $contentContextFactory; - - #[Flow\Inject] - protected NodeTypeManager $nodeTypeManager; + protected NodeServiceFactory $nodeServiceFactory; public function handle(GetNodeSummaryQuery $query): GetNodeSummaryQueryResult { - $contentContext = $this->contentContextFactory->create([ - 'workspaceName' => $query->workspaceName, - 'dimensions' => $query->dimensionValues, - 'targetDimensions' => $query->getTargetDimensionValues(), - 'invisibleContentShown' => true, - 'removedContentShown' => false, - 'inaccessibleContentShown' => true - ]); + $nodeService = $this->nodeServiceFactory->create( + contentRepositoryId: $query->contentRepositoryId, + workspaceName: $query->workspaceName, + dimensionSpacePoint: $query->dimensionSpacePoint, + ); - $node = $contentContext->getNodeByIdentifier((string) $query->nodeId); - if (!$node instanceof Node) { - throw NodeWasNotFound::becauseNodeWithGivenIdentifierDoesNotExistInContext( - nodeAggregateIdentifier: $query->nodeId, - contentContext: $contentContext, - ); - } + $node = $nodeService->requireNodeById($query->nodeId); + $nodeType = $nodeService->requireNodeTypeByName($node->nodeTypeName); return new GetNodeSummaryQueryResult( - icon: $node->getNodeType()->getConfiguration('ui.icon'), - label: $node->getLabel(), - uri: new Uri('node://' . $node->getNodeAggregateIdentifier()), - breadcrumbs: $this->createBreadcrumbsForNode($node) + icon: $nodeType->getConfiguration('ui.icon'), + label: $nodeService->getLabelForNode($node), + uri: new Uri('node://' . $node->aggregateId->value), + breadcrumbs: $this->createBreadcrumbsForNode($nodeService, $node), ); } - private function createBreadcrumbsForNode(Node $node): Breadcrumbs + private function createBreadcrumbsForNode(NodeService $nodeService, Node $node): Breadcrumbs { $items = []; while ($node) { /** @var Node $node */ - $items[] = $this->createBreadcrumbForNode($node); - $node = $node->getParent(); + $items[] = $this->createBreadcrumbForNode($nodeService, $node); + $node = $nodeService->findParentNode($node); } $items = array_slice($items, 0, -2); @@ -74,11 +62,13 @@ private function createBreadcrumbsForNode(Node $node): Breadcrumbs return new Breadcrumbs(...$items); } - private function createBreadcrumbForNode(Node $node): Breadcrumb + private function createBreadcrumbForNode(NodeService $nodeService, Node $node): Breadcrumb { + $nodeType = $nodeService->requireNodeTypeByName($node->nodeTypeName); + return new Breadcrumb( - icon: $node->getNodeType()->getConfiguration('ui.icon') ?? 'questionmark', - label: $node->getLabel(), + icon: $nodeType->getConfiguration('ui.icon') ?? 'questionmark', + label: $nodeService->getLabelForNode($node), ); } } diff --git a/Classes/Application/GetNodeTypeFilterOptions/GetNodeTypeFilterOptionsQuery.php b/Classes/Application/GetNodeTypeFilterOptions/GetNodeTypeFilterOptionsQuery.php index 5933687..9589835 100644 --- a/Classes/Application/GetNodeTypeFilterOptions/GetNodeTypeFilterOptionsQuery.php +++ b/Classes/Application/GetNodeTypeFilterOptions/GetNodeTypeFilterOptionsQuery.php @@ -12,6 +12,8 @@ namespace Sitegeist\Archaeopteryx\Application\GetNodeTypeFilterOptions; +use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\NodeType\NodeTypeCriteria; +use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; use Neos\Flow\Annotations as Flow; /** @@ -21,7 +23,8 @@ final class GetNodeTypeFilterOptionsQuery { public function __construct( - public readonly string $baseNodeTypeFilter, + public readonly ContentRepositoryId $contentRepositoryId, + public readonly NodeTypeCriteria $baseNodeTypeFilter, ) { } @@ -30,13 +33,19 @@ public function __construct( */ public static function fromArray(array $array): self { + isset($array['contentRepositoryId']) + or throw new \InvalidArgumentException('Content Repository Id must be set'); + is_string($array['contentRepositoryId']) + or throw new \InvalidArgumentException('Content Repository Id must be a string'); + isset($array['baseNodeTypeFilter']) or throw new \InvalidArgumentException('Base node type filter must be set'); is_string($array['baseNodeTypeFilter']) or throw new \InvalidArgumentException('Base node type filter must be a string'); return new self( - baseNodeTypeFilter: $array['baseNodeTypeFilter'], + contentRepositoryId: ContentRepositoryId::fromString($array['contentRepositoryId']), + baseNodeTypeFilter: NodeTypeCriteria::fromFilterString($array['baseNodeTypeFilter']), ); } } diff --git a/Classes/Application/GetNodeTypeFilterOptions/GetNodeTypeFilterOptionsQueryHandler.php b/Classes/Application/GetNodeTypeFilterOptions/GetNodeTypeFilterOptionsQueryHandler.php index ed98076..3c49c95 100644 --- a/Classes/Application/GetNodeTypeFilterOptions/GetNodeTypeFilterOptionsQueryHandler.php +++ b/Classes/Application/GetNodeTypeFilterOptions/GetNodeTypeFilterOptionsQueryHandler.php @@ -12,10 +12,10 @@ namespace Sitegeist\Archaeopteryx\Application\GetNodeTypeFilterOptions; -use Neos\ContentRepository\Domain\NodeType\NodeTypeConstraintFactory; -use Neos\ContentRepository\Domain\Service\NodeTypeManager; use Neos\Flow\Annotations as Flow; -use Sitegeist\Archaeopteryx\Infrastructure\ContentRepository\NodeTypeFilter; +use Sitegeist\Archaeopteryx\Infrastructure\ESCR\NodeTypeServiceFactory; +use Sitegeist\Archaeopteryx\Presentation\Option\Options; +use Sitegeist\Archaeopteryx\Presentation\Option\OptionsFactory; /** * @internal @@ -28,17 +28,17 @@ final class GetNodeTypeFilterOptionsQueryHandler protected array $nodeTreePresets; #[Flow\Inject] - protected NodeTypeManager $nodeTypeManager; + protected NodeTypeServiceFactory $nodeTypeServiceFactory; #[Flow\Inject] - protected NodeTypeConstraintFactory $nodeTypeConstraintFactory; + protected OptionsFactory $optionsFactory; public function handle(GetNodeTypeFilterOptionsQuery $query): GetNodeTypeFilterOptionsQueryResult { return new GetNodeTypeFilterOptionsQueryResult( options: $this->thereAreNodeTreePresetsOtherThanDefault() - ? $this->createNodeTypeFilterOptionsForNodeTreePresets() - : $this->createNodeTypeFilterOptionsForNodeTypes($query->baseNodeTypeFilter), + ? $this->renderOptionsForNodeTreePresets() + : $this->renderOptionsForNodeTypes($query), ); } @@ -51,25 +51,19 @@ private function thereAreNodeTreePresetsOtherThanDefault(): bool || (!$defaultExists && $numberOfPresets > 0); } - private function createNodeTypeFilterOptionsForNodeTreePresets(): NodeTypeFilterOptions + private function renderOptionsForNodeTreePresets(): Options { - return NodeTypeFilterOptions::fromNodeTreePresetsConfiguration( - $this->nodeTreePresets - ); + return $this->optionsFactory->forNodeTreePresets($this->nodeTreePresets); } - private function createNodeTypeFilterOptionsForNodeTypes( - string $baseNodeTypeFilter - ): NodeTypeFilterOptions { - $nodeTypeFilter = NodeTypeFilter::fromFilterString( - $baseNodeTypeFilter, - $this->nodeTypeConstraintFactory, - $this->nodeTypeManager, + private function renderOptionsForNodeTypes(GetNodeTypeFilterOptionsQuery $query): Options + { + $nodeTypeService = $this->nodeTypeServiceFactory->create( + contentRepositoryId: $query->contentRepositoryId, ); - return NodeTypeFilterOptions::fromNodeTypeNames( - $nodeTypeFilter->allowedNodeTypeNames, - $this->nodeTypeManager, + return $this->optionsFactory->forNodeTypes( + ...$nodeTypeService->getAllNodeTypesMatching($query->baseNodeTypeFilter) ); } } diff --git a/Classes/Application/GetNodeTypeFilterOptions/GetNodeTypeFilterOptionsQueryResult.php b/Classes/Application/GetNodeTypeFilterOptions/GetNodeTypeFilterOptionsQueryResult.php index aff0a71..deddaa0 100644 --- a/Classes/Application/GetNodeTypeFilterOptions/GetNodeTypeFilterOptionsQueryResult.php +++ b/Classes/Application/GetNodeTypeFilterOptions/GetNodeTypeFilterOptionsQueryResult.php @@ -13,6 +13,7 @@ namespace Sitegeist\Archaeopteryx\Application\GetNodeTypeFilterOptions; use Neos\Flow\Annotations as Flow; +use Sitegeist\Archaeopteryx\Presentation\Option\Options; /** * @internal @@ -21,7 +22,7 @@ final class GetNodeTypeFilterOptionsQueryResult implements \JsonSerializable { public function __construct( - public readonly NodeTypeFilterOptions $options, + public readonly Options $options, ) { } diff --git a/Classes/Application/GetNodeTypeFilterOptions/NodeTypeFilterOption.php b/Classes/Application/GetNodeTypeFilterOptions/NodeTypeFilterOption.php deleted file mode 100644 index 717d744..0000000 --- a/Classes/Application/GetNodeTypeFilterOptions/NodeTypeFilterOption.php +++ /dev/null @@ -1,62 +0,0 @@ -getName(), - icon: $nodeType->getConfiguration('ui.icon'), - label: $nodeType->getConfiguration('ui.label'), - ); - } - - /** - * @param array $preset - */ - public static function fromNodeTreePresetConfiguration(array $preset): self - { - return new self( - value: isset($preset['baseNodeType']) && is_string($preset['baseNodeType']) - ? $preset['baseNodeType'] - : '', - icon: isset($preset['ui']['icon']) && is_string($preset['ui']['icon']) - ? $preset['ui']['icon'] - : 'filter', - label: isset($preset['ui']['label']) && is_string($preset['ui']['label']) - ? $preset['ui']['label'] - : 'N/A', - ); - } - - public function jsonSerialize(): mixed - { - return get_object_vars($this); - } -} diff --git a/Classes/Application/GetNodeTypeFilterOptions/NodeTypeFilterOptions.php b/Classes/Application/GetNodeTypeFilterOptions/NodeTypeFilterOptions.php deleted file mode 100644 index db5dcdf..0000000 --- a/Classes/Application/GetNodeTypeFilterOptions/NodeTypeFilterOptions.php +++ /dev/null @@ -1,70 +0,0 @@ -items = array_values($items); - } - - /** - * @param array $nodeTypeNames - */ - public static function fromNodeTypeNames(array $nodeTypeNames, NodeTypeManager $nodeTypeManager): self - { - $items = []; - - foreach ($nodeTypeNames as $nodeTypeName) { - $nodeType = $nodeTypeManager->getNodeType((string) $nodeTypeName); - $items[] = NodeTypeFilterOption::fromNodeType($nodeType); - } - - return new self(...$items); - } - - /** - * @param array> $presets - */ - public static function fromNodeTreePresetsConfiguration(array $presets): self - { - $items = []; - - foreach ($presets as $presetName => $preset) { - if ($presetName === 'default') { - continue; - } - - $items[] = NodeTypeFilterOption::fromNodeTreePresetConfiguration($preset); - } - - return new self(...$items); - } - - public function jsonSerialize(): mixed - { - return $this->items; - } -} diff --git a/Classes/Application/GetTree/GetTreeQuery.php b/Classes/Application/GetTree/GetTreeQuery.php index 05c22f0..a1f7689 100644 --- a/Classes/Application/GetTree/GetTreeQuery.php +++ b/Classes/Application/GetTree/GetTreeQuery.php @@ -12,11 +12,13 @@ namespace Sitegeist\Archaeopteryx\Application\GetTree; -use Neos\ContentRepository\Domain\ContentSubgraph\NodePath; -use Neos\ContentRepository\Domain\NodeAggregate\NodeAggregateIdentifier; -use Neos\ContentRepository\Domain\NodeType\NodeTypeName; +use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; +use Neos\ContentRepository\Core\NodeType\NodeTypeNames; +use Neos\ContentRepository\Core\Projection\ContentGraph\AbsoluteNodePath; +use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\Flow\Annotations as Flow; -use Sitegeist\Archaeopteryx\Application\Shared\NodeTypeNames; /** * @internal @@ -24,19 +26,17 @@ #[Flow\Proxy(false)] final class GetTreeQuery { - /** - * @param array> $dimensionValues - */ public function __construct( - public readonly string $workspaceName, - public readonly array $dimensionValues, - public readonly NodePath $startingPoint, + public readonly ContentRepositoryId $contentRepositoryId, + public readonly WorkspaceName $workspaceName, + public readonly DimensionSpacePoint $dimensionSpacePoint, + public readonly AbsoluteNodePath $startingPoint, public readonly int $loadingDepth, public readonly string $baseNodeTypeFilter, public readonly NodeTypeNames $linkableNodeTypes, public readonly string $narrowNodeTypeFilter, public readonly string $searchTerm, - public readonly ?NodeAggregateIdentifier $selectedNodeId, + public readonly ?NodeAggregateId $selectedNodeId, ) { } @@ -45,6 +45,11 @@ public function __construct( */ public static function fromArray(array $array): self { + isset($array['contentRepositoryId']) + or throw new \InvalidArgumentException('Content Repository Id must be set'); + is_string($array['contentRepositoryId']) + or throw new \InvalidArgumentException('Content Repository Id must be a string'); + isset($array['workspaceName']) or throw new \InvalidArgumentException('Workspace name must be set'); is_string($array['workspaceName']) @@ -84,31 +89,18 @@ public static function fromArray(array $array): self or throw new \InvalidArgumentException('Selected node id term must be a string'); return new self( - workspaceName: $array['workspaceName'], - dimensionValues: $array['dimensionValues'], - startingPoint: NodePath::fromString($array['startingPoint']), + contentRepositoryId: ContentRepositoryId::fromString($array['contentRepositoryId']), + workspaceName: WorkspaceName::fromString($array['workspaceName']), + dimensionSpacePoint: DimensionSpacePoint::fromLegacyDimensionArray($array['dimensionValues']), + startingPoint: AbsoluteNodePath::fromString($array['startingPoint']), loadingDepth: $array['loadingDepth'], baseNodeTypeFilter: $array['baseNodeTypeFilter'] ?? '', - linkableNodeTypes: NodeTypeNames::fromArray($array['linkableNodeTypes'] ?? []), + linkableNodeTypes: NodeTypeNames::fromStringArray($array['linkableNodeTypes'] ?? []), narrowNodeTypeFilter: $array['narrowNodeTypeFilter'] ?? '', searchTerm: $array['searchTerm'] ?? '', selectedNodeId: isset($array['selectedNodeId']) - ? NodeAggregateIdentifier::fromString($array['selectedNodeId']) + ? NodeAggregateId::fromString($array['selectedNodeId']) : null, ); } - - /** - * @return array - */ - public function getTargetDimensionValues(): array - { - $result = []; - - foreach ($this->dimensionValues as $dimensionName => $fallbackChain) { - $result[$dimensionName] = $fallbackChain[0] ?? ''; - } - - return $result; - } } diff --git a/Classes/Application/GetTree/GetTreeQueryHandler.php b/Classes/Application/GetTree/GetTreeQueryHandler.php index 369b57f..dda3498 100644 --- a/Classes/Application/GetTree/GetTreeQueryHandler.php +++ b/Classes/Application/GetTree/GetTreeQueryHandler.php @@ -12,17 +12,15 @@ namespace Sitegeist\Archaeopteryx\Application\GetTree; -use Neos\ContentRepository\Domain\Model\Node; -use Neos\ContentRepository\Domain\NodeType\NodeTypeConstraintFactory; -use Neos\ContentRepository\Domain\Service\NodeTypeManager; +use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\Flow\Annotations as Flow; -use Neos\Neos\Domain\Service\ContentContextFactory; use Sitegeist\Archaeopteryx\Application\Shared\TreeNode; -use Sitegeist\Archaeopteryx\Infrastructure\ContentRepository\LinkableNodeSpecification; -use Sitegeist\Archaeopteryx\Infrastructure\ContentRepository\NodeSearchService; -use Sitegeist\Archaeopteryx\Infrastructure\ContentRepository\NodeSearchSpecification; -use Sitegeist\Archaeopteryx\Infrastructure\ContentRepository\NodeTypeFilter; -use Sitegeist\Archaeopteryx\Infrastructure\ContentRepository\TreeBuilder; +use Sitegeist\Archaeopteryx\Infrastructure\ESCR\LinkableNodeSpecification; +use Sitegeist\Archaeopteryx\Infrastructure\ESCR\NodeSearchSpecification; +use Sitegeist\Archaeopteryx\Infrastructure\ESCR\NodeService; +use Sitegeist\Archaeopteryx\Infrastructure\ESCR\NodeServiceFactory; +use Sitegeist\Archaeopteryx\Infrastructure\ESCR\NodeTypeService; +use Sitegeist\Archaeopteryx\Infrastructure\ESCR\NodeTypeServiceFactory; /** * @internal @@ -31,103 +29,103 @@ final class GetTreeQueryHandler { #[Flow\Inject] - protected ContentContextFactory $contentContextFactory; + protected NodeServiceFactory $nodeServiceFactory; #[Flow\Inject] - protected NodeTypeManager $nodeTypeManager; - - #[Flow\Inject] - protected NodeSearchService $nodeSearchService; - - #[Flow\Inject] - protected NodeTypeConstraintFactory $nodeTypeConstraintFactory; + protected NodeTypeServiceFactory $nodeTypeServiceFactory; public function handle(GetTreeQuery $query): GetTreeQueryResult { - $contentContext = $this->contentContextFactory->create([ - 'workspaceName' => $query->workspaceName, - 'dimensions' => $query->dimensionValues, - 'targetDimensions' => $query->getTargetDimensionValues(), - 'invisibleContentShown' => true, - 'removedContentShown' => false, - 'inaccessibleContentShown' => true - ]); - - $rootNode = $contentContext->getNode((string) $query->startingPoint); - if (!$rootNode instanceof Node) { - throw StartingPointWasNotFound::becauseNodeWithGivenPathDoesNotExistInContext( + $nodeService = $this->nodeServiceFactory->create( + contentRepositoryId: $query->contentRepositoryId, + workspaceName: $query->workspaceName, + dimensionSpacePoint: $query->dimensionSpacePoint, + ); + $nodeTypeService = $this->nodeTypeServiceFactory->create( + contentRepositoryId: $query->contentRepositoryId, + ); + + $rootNode = $nodeService->findNodeByAbsoluteNodePath($query->startingPoint); + if ($rootNode === null) { + throw StartingPointWasNotFound::becauseNodeWithGivenPathDoesNotExistInCurrentSubgraph( nodePath: $query->startingPoint, - contentContext: $contentContext, + subgraph: $nodeService->subgraph, ); } return new GetTreeQueryResult( - root: $tree = empty($query->searchTerm) && empty($query->narrowNodeTypeFilter) - ? $this->loadTree($rootNode, $query, $query->loadingDepth) - : $this->performSearch($rootNode, $query), + root: empty($query->searchTerm) && empty($query->narrowNodeTypeFilter) + ? $this->loadTree($nodeService, $nodeTypeService, $rootNode, $query, $query->loadingDepth) + : $this->performSearch($nodeService, $nodeTypeService, $rootNode, $query), ); } - private function performSearch(Node $rootNode, GetTreeQuery $query): TreeNode - { - $baseNodeTypeFilter = NodeTypeFilter::fromFilterString( - $query->baseNodeTypeFilter, - $this->nodeTypeConstraintFactory, - $this->nodeTypeManager, + private function performSearch( + NodeService $nodeService, + NodeTypeService $nodeTypeService, + Node $rootNode, + GetTreeQuery $query, + ): TreeNode { + $baseNodeTypeFilter = $nodeTypeService->createNodeTypeFilterFromFilterString( + filterString: $query->baseNodeTypeFilter, ); - $narrowNodeTypeFilter = NodeTypeFilter::fromFilterString( - $query->narrowNodeTypeFilter, - $this->nodeTypeConstraintFactory, - $this->nodeTypeManager, + $narrowNodeTypeFilter = $nodeTypeService->createNodeTypeFilterFromFilterString( + filterString: $query->narrowNodeTypeFilter, ); - $matchingNodes = $this->nodeSearchService->search( - $query->searchTerm, - $narrowNodeTypeFilter, - $rootNode + $matchingNodes = $nodeService->search( + rootNode: $rootNode, + searchTerm: $query->searchTerm, + nodeTypeFilter: $narrowNodeTypeFilter, ); - $treeBuilder = TreeBuilder::forRootNode( + $treeBuilder = $nodeService->createTreeBuilderForRootNode( rootNode: $rootNode, nodeSearchSpecification: new NodeSearchSpecification( baseNodeTypeFilter: $baseNodeTypeFilter, narrowNodeTypeFilter: $narrowNodeTypeFilter, searchTerm: $query->searchTerm, + nodeService: $nodeService, ), linkableNodeSpecification: new LinkableNodeSpecification( - linkableNodeTypes: NodeTypeFilter::fromNodeTypeNames( + linkableNodeTypes: $nodeTypeService->createNodeTypeFilterFromNodeTypeNames( nodeTypeNames: $query->linkableNodeTypes, - nodeTypeManager: $this->nodeTypeManager, ), ), ); foreach ($matchingNodes as $matchingNode) { - $treeBuilder->addNodeWithAncestors($matchingNode); + $treeBuilder->addNodeWithAncestors( + node: $matchingNode, + ancestors: $nodeService->findAncestorNodes($matchingNode), + ); } return $treeBuilder->build(); } - private function loadTree(Node $node, GetTreeQuery $query, int $remainingDepth): TreeNode - { - $baseNodeTypeFilter = NodeTypeFilter::fromFilterString( - $query->baseNodeTypeFilter, - $this->nodeTypeConstraintFactory, - $this->nodeTypeManager, + private function loadTree( + NodeService $nodeService, + NodeTypeService $nodeTypeService, + Node $node, + GetTreeQuery $query, + int $remainingDepth, + ): TreeNode { + $baseNodeTypeFilter = $nodeTypeService->createNodeTypeFilterFromFilterString( + filterString: $query->baseNodeTypeFilter, ); - $treeBuilder = TreeBuilder::forRootNode( + $treeBuilder = $nodeService->createTreeBuilderForRootNode( rootNode: $node, nodeSearchSpecification: new NodeSearchSpecification( baseNodeTypeFilter: $baseNodeTypeFilter, narrowNodeTypeFilter: null, searchTerm: null, + nodeService: $nodeService, ), linkableNodeSpecification: new LinkableNodeSpecification( - linkableNodeTypes: NodeTypeFilter::fromNodeTypeNames( + linkableNodeTypes: $nodeTypeService->createNodeTypeFilterFromNodeTypeNames( nodeTypeNames: $query->linkableNodeTypes, - nodeTypeManager: $this->nodeTypeManager, ), ), ); @@ -135,7 +133,7 @@ private function loadTree(Node $node, GetTreeQuery $query, int $remainingDepth): $treeBuilder->addNodeWithDescendants($node, $remainingDepth); if ($query->selectedNodeId) { - $selectedNode = $node->getContext()->getNodeByIdentifier((string) $query->selectedNodeId); + $selectedNode = $nodeService->findNodeById($query->selectedNodeId); if ($selectedNode) { /** @var Node $selectedNode */ $treeBuilder->addNodeWithSiblingsAndAncestors($selectedNode); diff --git a/Classes/Application/GetTree/StartingPointWasNotFound.php b/Classes/Application/GetTree/StartingPointWasNotFound.php index 88a2737..44887b0 100644 --- a/Classes/Application/GetTree/StartingPointWasNotFound.php +++ b/Classes/Application/GetTree/StartingPointWasNotFound.php @@ -12,8 +12,8 @@ namespace Sitegeist\Archaeopteryx\Application\GetTree; -use Neos\ContentRepository\Domain\ContentSubgraph\NodePath; -use Neos\ContentRepository\Domain\Service\Context as ContentContext; +use Neos\ContentRepository\Core\Projection\ContentGraph\AbsoluteNodePath; +use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface; use Neos\Flow\Annotations as Flow; /** @@ -27,15 +27,19 @@ private function __construct(string $message, int $code) parent::__construct($message, $code); } - public static function becauseNodeWithGivenPathDoesNotExistInContext( - NodePath $nodePath, - ContentContext $contentContext, + public static function becauseNodeWithGivenPathDoesNotExistInCurrentSubgraph( + AbsoluteNodePath $nodePath, + ContentSubgraphInterface $subgraph, ): self { return new self( sprintf( - 'The starting point at path "%s" does not exist in context: %s', - (string) $nodePath, - json_encode($contentContext->getProperties(), JSON_PRETTY_PRINT), + 'The starting point at path "%s" does not exist in subgraph: %s', + $nodePath->serializeToString(), + json_encode([ + 'contentRepositoryId' => $subgraph->getContentRepositoryId(), + 'workspaceName' => $subgraph->getWorkspaceName(), + 'dimensionSpacePoint' => $subgraph->getDimensionSpacePoint(), + ], JSON_PRETTY_PRINT), ), 1715082893 ); diff --git a/Classes/Application/Shared/NodeTypeNames.php b/Classes/Application/Shared/NodeTypeNames.php deleted file mode 100644 index 8b74d5e..0000000 --- a/Classes/Application/Shared/NodeTypeNames.php +++ /dev/null @@ -1,63 +0,0 @@ -items = array_values($items); - } - - /** - * @param array $array - */ - public static function fromArray(array $array): self - { - $items = []; - foreach ($array as $nodeTypeNameAsString) { - is_string($nodeTypeNameAsString) - or throw new \InvalidArgumentException('Node type name must be a string'); - - $items[] = NodeTypeName::fromString($nodeTypeNameAsString); - } - - return new self(...$items); - } - - public function includesSuperTypeOf(NodeType $nodeType): bool - { - if (empty($this->items)) { - return true; - } - - foreach ($this->items as $item) { - if ($nodeType->isOfType((string) $item)) { - return true; - } - } - - return false; - } -} diff --git a/Classes/Application/Shared/NodeTypeWasNotFound.php b/Classes/Application/Shared/NodeTypeWasNotFound.php new file mode 100644 index 0000000..764b9fe --- /dev/null +++ b/Classes/Application/Shared/NodeTypeWasNotFound.php @@ -0,0 +1,43 @@ +value, + $contentRepositoryId->value, + ), + 1721047345 + ); + } +} diff --git a/Classes/Application/Shared/NodeWasNotFound.php b/Classes/Application/Shared/NodeWasNotFound.php index e19e4a0..12b584a 100644 --- a/Classes/Application/Shared/NodeWasNotFound.php +++ b/Classes/Application/Shared/NodeWasNotFound.php @@ -12,8 +12,8 @@ namespace Sitegeist\Archaeopteryx\Application\Shared; -use Neos\ContentRepository\Domain\NodeAggregate\NodeAggregateIdentifier; -use Neos\ContentRepository\Domain\Service\Context as ContentContext; +use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\Flow\Annotations as Flow; /** @@ -27,15 +27,19 @@ private function __construct(string $message, int $code) parent::__construct($message, $code); } - public static function becauseNodeWithGivenIdentifierDoesNotExistInContext( - NodeAggregateIdentifier $nodeAggregateIdentifier, - ContentContext $contentContext, + public static function becauseNodeWithGivenIdentifierDoesNotExistInCurrentSubgraph( + NodeAggregateId $nodeAggregateId, + ContentSubgraphInterface $subgraph, ): self { return new self( sprintf( - 'A node with the identifier "%s" does not exist in context: %s', - (string) $nodeAggregateIdentifier, - json_encode($contentContext->getProperties(), JSON_PRETTY_PRINT), + 'A node with the identifier "%s" does not exist in subgraph: %s', + $nodeAggregateId->value, + json_encode([ + 'contentRepositoryId' => $subgraph->getContentRepositoryId(), + 'workspaceName' => $subgraph->getWorkspaceName(), + 'dimensionSpacePoint' => $subgraph->getDimensionSpacePoint(), + ], JSON_PRETTY_PRINT), ), 1715082627 ); diff --git a/Classes/Application/Shared/TreeNode.php b/Classes/Application/Shared/TreeNode.php index 79daf3a..2c42074 100644 --- a/Classes/Application/Shared/TreeNode.php +++ b/Classes/Application/Shared/TreeNode.php @@ -12,7 +12,7 @@ namespace Sitegeist\Archaeopteryx\Application\Shared; -use Neos\ContentRepository\Domain\NodeAggregate\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\Flow\Annotations as Flow; /** @@ -22,7 +22,7 @@ final class TreeNode implements \JsonSerializable { public function __construct( - public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, + public readonly NodeAggregateId $nodeAggregateIdentifier, public readonly string $icon, public readonly string $label, public readonly string $nodeTypeLabel, diff --git a/Classes/Application/Shared/TreeNodeBuilder.php b/Classes/Application/Shared/TreeNodeBuilder.php index 014ccbf..bc7d6b9 100644 --- a/Classes/Application/Shared/TreeNodeBuilder.php +++ b/Classes/Application/Shared/TreeNodeBuilder.php @@ -12,8 +12,7 @@ namespace Sitegeist\Archaeopteryx\Application\Shared; -use Neos\ContentRepository\Domain\Model\Node; -use Neos\ContentRepository\Domain\NodeAggregate\NodeAggregateIdentifier; +use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\Flow\Annotations as Flow; /** @@ -28,9 +27,9 @@ final class TreeNodeBuilder /** * @param TreeNodeBuilder[] $children */ - private function __construct( + public function __construct( public readonly int $sortingIndex, - private NodeAggregateIdentifier $nodeAggregateIdentifier, + private NodeAggregateId $nodeAggregateId, private string $icon, private string $label, private string $nodeTypeLabel, @@ -44,27 +43,6 @@ private function __construct( ) { } - public static function forNode(Node $node): self - { - return new self( - // @phpstan-ignore-next-line - sortingIndex: $node->getIndex() ?? 0, - nodeAggregateIdentifier: $node->getNodeAggregateIdentifier(), - icon: $node->getNodeType()->getConfiguration('ui.icon') ?? 'questionmark', - label: $node->getLabel(), - nodeTypeLabel: $node->getNodeType()->getLabel(), - isMatchedByFilter: false, - isLinkable: false, - isDisabled: !$node->isVisible(), - isHiddenInMenu: $node->isHiddenInIndex(), - hasScheduledDisabledState: - $node->getHiddenBeforeDateTime() !== null - || $node->getHiddenAfterDateTime() !== null, - hasUnloadedChildren: false, - children: [], - ); - } - public function setIsMatchedByFilter(bool $value): self { $this->isMatchedByFilter = $value; @@ -85,9 +63,9 @@ public function setHasUnloadedChildren(bool $value): self public function addChild(TreeNodeBuilder $childBuilder): self { - if (!isset($this->childrenByIdentifier[(string) $childBuilder->nodeAggregateIdentifier])) { + if (!isset($this->childrenByIdentifier[$childBuilder->nodeAggregateId->value])) { $this->children[] = $childBuilder; - $this->childrenByIdentifier[(string) $childBuilder->nodeAggregateIdentifier] = $childBuilder; + $this->childrenByIdentifier[$childBuilder->nodeAggregateId->value] = $childBuilder; } return $this; @@ -96,7 +74,7 @@ public function addChild(TreeNodeBuilder $childBuilder): self public function build(): TreeNode { return new TreeNode( - nodeAggregateIdentifier: $this->nodeAggregateIdentifier, + nodeAggregateIdentifier: $this->nodeAggregateId, icon: $this->icon, label: $this->label, nodeTypeLabel: $this->nodeTypeLabel, diff --git a/Classes/Framework/MVC/QueryController.php b/Classes/Framework/MVC/QueryController.php index 3d5d1c2..9edebba 100644 --- a/Classes/Framework/MVC/QueryController.php +++ b/Classes/Framework/MVC/QueryController.php @@ -15,6 +15,7 @@ use Neos\Flow\Mvc\ActionRequest; use Neos\Flow\Mvc\ActionResponse; use Neos\Flow\Mvc\Controller\ControllerInterface; +use Neos\Neos\FrontendRouting\SiteDetection\SiteDetectionResult; abstract class QueryController implements ControllerInterface { @@ -24,7 +25,15 @@ public function processRequest(ActionRequest $request, ActionResponse $response) $response->setContentType('application/json'); try { - $queryResponse = $this->processQuery($request->getArguments()); + // @TODO: It should not be necessary to inject the contentRepositoryId + // like this. For the time being, it's the only way though. + $arguments = $request->getArguments(); + if (!isset($arguments['contentRepositoryId'])) { + $siteDetectionResult = SiteDetectionResult::fromRequest($request->getHttpRequest()); + $arguments['contentRepositoryId'] = $siteDetectionResult->contentRepositoryId->value; + } + + $queryResponse = $this->processQuery($arguments); } catch (\InvalidArgumentException $e) { $queryResponse = QueryResponse::clientError($e); } catch (\Exception $e) { diff --git a/Classes/Infrastructure/ContentRepository/NodeSearchService.php b/Classes/Infrastructure/ContentRepository/NodeSearchService.php deleted file mode 100644 index a34c090..0000000 --- a/Classes/Infrastructure/ContentRepository/NodeSearchService.php +++ /dev/null @@ -1,83 +0,0 @@ - - */ - public function search( - string $searchTerm, - NodeTypeFilter $nodeTypeFilter, - Node $rootNode, - ): \Traversable { - /** @var NeosNodeSearchService $nodeSearchService */ - $nodeSearchService = $this->nodeSearchService; - $searchTerm = trim($searchTerm); - $context = $rootNode->getContext(); - - if ($searchTerm) { - /** @var Node[] $result */ - $result = $nodeSearchService->findByProperties( - $searchTerm, - $nodeTypeFilter->allowedNodeTypeNames, - $context, - $rootNode - ); - - yield from $result; - } else { - // - // This algorithm has been copied from the UI core, which uses the - // NodeDataRepository as well (which it visibly regrets doing). - // - // Everything is going to be better in Neos 9.0. - // - $nodeDataRecords = $this->nodeDataRepository - ->findByParentAndNodeTypeRecursively( - $rootNode->getPath(), - implode(',', $nodeTypeFilter->allowedNodeTypeNames), - $context->getWorkspace(), - $context->getDimensions() - ); - foreach ($nodeDataRecords as $nodeData) { - $matchedNode = $this->nodeFactory->createFromNodeData($nodeData, $context); - if ($matchedNode !== null) { - /** @var Node $matchedNode */ - yield $matchedNode; - } - } - } - } -} diff --git a/Classes/Infrastructure/ContentRepository/NodeTypeFilter.php b/Classes/Infrastructure/ContentRepository/NodeTypeFilter.php deleted file mode 100644 index 958f160..0000000 --- a/Classes/Infrastructure/ContentRepository/NodeTypeFilter.php +++ /dev/null @@ -1,97 +0,0 @@ -parseFilterString($filterString); - $allowedNodeTypeNames = []; - - foreach ($nodeTypeManager->getNodeTypes(false) as $nodeType) { - $nodeTypeName = $nodeType->getName(); - if ($nodeTypeConstraints->matches(NodeTypeName::fromString($nodeTypeName))) { - $allowedNodeTypeNames[] = $nodeTypeName; - } - } - - return new self($filterString, $allowedNodeTypeNames); - } - - public static function fromNodeTypeNames( - NodeTypeNames $nodeTypeNames, - NodeTypeManager $nodeTypeManager, - ): self { - $allowedNodeTypeNames = []; - - foreach ($nodeTypeManager->getNodeTypes(false) as $nodeType) { - $nodeTypeName = $nodeType->getName(); - - if ($nodeTypeNames->includesSuperTypeOf($nodeType)) { - $allowedNodeTypeNames[] = $nodeTypeName; - } - } - - return new self(null, $allowedNodeTypeNames); - } - - public function toFilterString(): string - { - return $this->filterString ?? implode(',', $this->allowedNodeTypeNames); - } - - public function isSatisfiedByNode(Node $node): bool - { - return $this->isSatisfiedByNodeTypeName($node->getNodeTypeName()); - } - - public function isSatisfiedByNodeType(NodeType $nodeType): bool - { - return $this->isSatisfiedByNodeTypeNameString($nodeType->getName()); - } - - public function isSatisfiedByNodeTypeName(NodeTypeName $nodeTypeName): bool - { - return $this->isSatisfiedByNodeTypeNameString((string) $nodeTypeName); - } - - private function isSatisfiedByNodeTypeNameString(string $nodeTypeNameString): bool - { - return in_array($nodeTypeNameString, $this->allowedNodeTypeNames); - } -} diff --git a/Classes/Infrastructure/ContentRepository/LinkableNodeSpecification.php b/Classes/Infrastructure/ESCR/LinkableNodeSpecification.php similarity index 84% rename from Classes/Infrastructure/ContentRepository/LinkableNodeSpecification.php rename to Classes/Infrastructure/ESCR/LinkableNodeSpecification.php index f09ccc1..e0d5e48 100644 --- a/Classes/Infrastructure/ContentRepository/LinkableNodeSpecification.php +++ b/Classes/Infrastructure/ESCR/LinkableNodeSpecification.php @@ -10,9 +10,9 @@ declare(strict_types=1); -namespace Sitegeist\Archaeopteryx\Infrastructure\ContentRepository; +namespace Sitegeist\Archaeopteryx\Infrastructure\ESCR; -use Neos\ContentRepository\Domain\Model\Node; +use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\Flow\Annotations as Flow; /** diff --git a/Classes/Infrastructure/ContentRepository/NodeSearchSpecification.php b/Classes/Infrastructure/ESCR/NodeSearchSpecification.php similarity index 66% rename from Classes/Infrastructure/ContentRepository/NodeSearchSpecification.php rename to Classes/Infrastructure/ESCR/NodeSearchSpecification.php index 00552a8..a982558 100644 --- a/Classes/Infrastructure/ContentRepository/NodeSearchSpecification.php +++ b/Classes/Infrastructure/ESCR/NodeSearchSpecification.php @@ -10,9 +10,9 @@ declare(strict_types=1); -namespace Sitegeist\Archaeopteryx\Infrastructure\ContentRepository; +namespace Sitegeist\Archaeopteryx\Infrastructure\ESCR; -use Neos\ContentRepository\Domain\Model\Node; +use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\Flow\Annotations as Flow; use Neos\Utility\Unicode\Functions as UnicodeFunctions; @@ -26,6 +26,7 @@ public function __construct( public readonly NodeTypeFilter $baseNodeTypeFilter, public readonly ?NodeTypeFilter $narrowNodeTypeFilter, public readonly ?string $searchTerm, + private readonly NodeService $nodeService, ) { } @@ -55,9 +56,11 @@ private function nodeContainsSearchTerm(Node $node): bool $term = json_encode(UnicodeFunctions::strtolower($this->searchTerm), JSON_UNESCAPED_UNICODE); $term = trim($term ? $term : '', '"'); + $label = $this->nodeService->getLabelForNode($node); + /** @var int|false $positionOfTermInLabel */ $positionOfTermInLabel = UnicodeFunctions::strpos( - UnicodeFunctions::strtolower($node->getLabel()), + UnicodeFunctions::strtolower($label), $term ); @@ -66,19 +69,10 @@ private function nodeContainsSearchTerm(Node $node): bool return true; } - // - // In case the term cannot be found in the node label, we need to - // replicate how the term is matched against the node properties in the - // node data repository. - // - // Yeah, I know :( - // - $nodeData = $node->getNodeData(); - $reflectionNodeData = new \ReflectionObject($nodeData); - $reflectionProperties = $reflectionNodeData->getProperty('properties'); - $reflectionProperties->setAccessible(true); - $properties = $reflectionProperties->getValue($nodeData); - $properties = json_encode($properties, JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT | JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE); + $properties = json_encode( + $node->properties->serialized(), + JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT | JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE + ); return UnicodeFunctions::strpos($properties, $term) !== false; } diff --git a/Classes/Infrastructure/ESCR/NodeService.php b/Classes/Infrastructure/ESCR/NodeService.php new file mode 100644 index 0000000..dc1448b --- /dev/null +++ b/Classes/Infrastructure/ESCR/NodeService.php @@ -0,0 +1,181 @@ +findNodeById($nodeAggregateId); + if ($node === null) { + throw NodeWasNotFound::becauseNodeWithGivenIdentifierDoesNotExistInCurrentSubgraph( + nodeAggregateId: $nodeAggregateId, + subgraph: $this->subgraph, + ); + } + + return $node; + } + + public function findNodeById(NodeAggregateId $nodeAggregateId): ?Node + { + return $this->subgraph->findNodeById($nodeAggregateId); + } + + public function requireNodeTypeByName(NodeTypeName $nodeTypeName): NodeType + { + $nodeType = $this->contentRepository->getNodeTypeManager()->getNodeType($nodeTypeName); + if ($nodeType === null) { + throw NodeTypeWasNotFound::becauseNodeTypeWithGivenNameDoesNotExistInCurrentSchema( + nodeTypeName: $nodeTypeName, + contentRepositoryId: $this->contentRepository->id, + ); + } + + return $nodeType; + } + + public function getLabelForNode(Node $node): string + { + return $this->nodeLabelGenerator->getLabel($node); + } + + public function findParentNode(Node $node): ?Node + { + return $this->subgraph->findParentNode($node->aggregateId); + } + + public function findPrecedingSiblingNodes(Node $node): Nodes + { + $filter = FindPrecedingSiblingNodesFilter::create(); + + return $this->subgraph->findPrecedingSiblingNodes($node->aggregateId, $filter); + } + + public function findSucceedingSiblingNodes(Node $node): Nodes + { + $filter = FindSucceedingSiblingNodesFilter::create(); + + return $this->subgraph->findSucceedingSiblingNodes($node->aggregateId, $filter); + } + + public function findNodeByAbsoluteNodePath(AbsoluteNodePath $path): ?Node + { + return $this->subgraph->findNodeByAbsolutePath($path); + } + + public function search(Node $rootNode, string $searchTerm, NodeTypeFilter $nodeTypeFilter): Nodes + { + $filter = FindDescendantNodesFilter::create( + searchTerm: $searchTerm, + nodeTypes: $nodeTypeFilter->nodeTypeCriteria + ); + + return $this->subgraph->findDescendantNodes($rootNode->aggregateId, $filter); + } + + public function createTreeBuilderForRootNode( + Node $rootNode, + NodeSearchSpecification $nodeSearchSpecification, + LinkableNodeSpecification $linkableNodeSpecification, + ): TreeBuilder { + return new TreeBuilder( + rootNode: $rootNode, + nodeService: $this, + rootTreeNodeBuilder: $this->createTreeNodeBuilderForNode($rootNode), + nodeSearchSpecification: $nodeSearchSpecification, + linkableNodeSpecification: $linkableNodeSpecification, + ); + } + + public function createTreeNodeBuilderForNode(Node $node): TreeNodeBuilder + { + $nodeType = $this->requireNodeTypeByName($node->nodeTypeName); + + return new TreeNodeBuilder( + // @TODO: Figure this one out + sortingIndex: 0, + nodeAggregateId: $node->aggregateId, + icon: $nodeType->getConfiguration('ui.icon') ?? 'questionmark', + label: $this->getLabelForNode($node), + nodeTypeLabel: $nodeType->getLabel(), + isMatchedByFilter: false, + isLinkable: false, + isDisabled: $node->tags->withoutInherited()->contain(SubtreeTag::disabled()), + isHiddenInMenu: $node->getProperty('hiddenInMenu') ?? false, + hasScheduledDisabledState: + $node->getProperty('enableAfterDateTime') instanceof \DateTimeInterface + || $node->getProperty('disableAfterDateTime') instanceof \DateTimeInterface, + hasUnloadedChildren: false, + children: [], + ); + } + + public function findChildNodes(Node $parentNode, NodeTypeCriteria $nodeTypeCriteria): Nodes + { + $filter = FindChildNodesFilter::create( + nodeTypes: $nodeTypeCriteria, + ); + + return $this->subgraph->findChildNodes($parentNode->aggregateId, $filter); + } + + public function getNumberOfChildNodes(Node $parentNode, NodeTypeCriteria $nodeTypeCriteria): int + { + $filter = CountChildNodesFilter::create( + nodeTypes: $nodeTypeCriteria, + ); + + return $this->subgraph->countChildNodes($parentNode->aggregateId, $filter); + } + + public function findAncestorNodes(Node $node): Nodes + { + $filter = FindAncestorNodesFilter::create(); + + return $this->subgraph->findAncestorNodes($node->aggregateId, $filter); + } +} diff --git a/Classes/Infrastructure/ESCR/NodeServiceFactory.php b/Classes/Infrastructure/ESCR/NodeServiceFactory.php new file mode 100644 index 0000000..2e5b974 --- /dev/null +++ b/Classes/Infrastructure/ESCR/NodeServiceFactory.php @@ -0,0 +1,55 @@ +contentRepositoryRegistry + ->get($contentRepositoryId); + $subgraph = $contentRepository + ->getContentGraph($workspaceName) + ->getSubgraph( + $dimensionSpacePoint, + VisibilityConstraints::withoutRestrictions() + ); + + return new NodeService( + contentRepository: $contentRepository, + subgraph: $subgraph, + nodeLabelGenerator: $this->nodeLabelGenerator, + ); + } +} diff --git a/Classes/Infrastructure/ESCR/NodeTypeFilter.php b/Classes/Infrastructure/ESCR/NodeTypeFilter.php new file mode 100644 index 0000000..b9f19e1 --- /dev/null +++ b/Classes/Infrastructure/ESCR/NodeTypeFilter.php @@ -0,0 +1,65 @@ +allowedNodeTypeNames; + } + + public function toFilterString(): string + { + throw new \Exception(__METHOD__ . ' is not implemented yet!'); + } + + public function isSatisfiedByNode(Node $node): bool + { + return $this->isSatisfiedByNodeTypeName($node->nodeTypeName); + } + + public function isSatisfiedByNodeType(NodeType $nodeType): bool + { + return $this->isSatisfiedByNodeTypeName($nodeType->name); + } + + public function isSatisfiedByNodeTypeName(NodeTypeName $nodeTypeName): bool + { + // @TODO: This is VERY inefficient + foreach ($this->allowedNodeTypeNames as $allowedNodeTypeName) { + if ($nodeTypeName->equals($allowedNodeTypeName)) { + return true; + } + } + + return false; + } +} diff --git a/Classes/Infrastructure/ESCR/NodeTypeService.php b/Classes/Infrastructure/ESCR/NodeTypeService.php new file mode 100644 index 0000000..b3749be --- /dev/null +++ b/Classes/Infrastructure/ESCR/NodeTypeService.php @@ -0,0 +1,141 @@ +contentRepository->getNodeTypeManager()->getNodeType($nodeTypeName); + if ($nodeType === null) { + throw NodeTypeWasNotFound::becauseNodeTypeWithGivenNameDoesNotExistInCurrentSchema( + nodeTypeName: $nodeTypeName, + contentRepositoryId: $this->contentRepository->id, + ); + } + + return $nodeType; + } + + /** @return NodeType[] */ + public function getAllNodeTypesMatching(NodeTypeCriteria $nodeTypeCriteria): array + { + $nodeTypeManager = $this->contentRepository->getNodeTypeManager(); + $explicitlyAllowedNodeTypeNames = $nodeTypeCriteria->explicitlyAllowedNodeTypeNames->toStringArray(); + $explicitlyDisallowedNodeTypeNames = $nodeTypeCriteria->explicitlyDisallowedNodeTypeNames->toStringArray(); + $isEmpty = $nodeTypeCriteria->explicitlyAllowedNodeTypeNames->isEmpty() + && $nodeTypeCriteria->explicitlyDisallowedNodeTypeNames->isEmpty(); + + $result = []; + foreach ($nodeTypeManager->getNodeTypes(false) as $candidateNodeType) { + if ($isEmpty) { + $result[] = $candidateNodeType; + continue; + } + + foreach ($explicitlyDisallowedNodeTypeNames as $disallowedNodeTypeName) { + if ($candidateNodeType->isOfType($disallowedNodeTypeName)) { + continue 2; + } + } + + foreach ($explicitlyAllowedNodeTypeNames as $allowedNodeTypeName) { + if ($candidateNodeType->isOfType($allowedNodeTypeName)) { + $result[] = $candidateNodeType; + continue 2; + } + } + } + + return $result; + } + + public function createNodeTypeFilterFromFilterString(string $filterString): NodeTypeFilter + { + $nodeTypeManager = $this->contentRepository->getNodeTypeManager(); + $nodeTypeCriteria = NodeTypeCriteria::fromFilterString($filterString); + $explicitlyAllowedNodeTypeNames = $nodeTypeCriteria->explicitlyAllowedNodeTypeNames->toStringArray(); + $explicitlyDisallowedNodeTypeNames = $nodeTypeCriteria->explicitlyDisallowedNodeTypeNames->toStringArray(); + $isEmpty = $nodeTypeCriteria->explicitlyAllowedNodeTypeNames->isEmpty() + && $nodeTypeCriteria->explicitlyDisallowedNodeTypeNames->isEmpty(); + + $allowedNodeTypeNames = []; + foreach ($nodeTypeManager->getNodeTypes(true) as $candidateNodeType) { + if ($isEmpty) { + $allowedNodeTypeNames[] = $candidateNodeType->name; + continue; + } + + foreach ($explicitlyDisallowedNodeTypeNames as $disallowedNodeTypeName) { + if ($candidateNodeType->isOfType($disallowedNodeTypeName)) { + continue 2; + } + } + + foreach ($explicitlyAllowedNodeTypeNames as $allowedNodeTypeName) { + if ($candidateNodeType->isOfType($allowedNodeTypeName)) { + $allowedNodeTypeNames[] = $candidateNodeType->name; + continue 2; + } + } + } + + return new NodeTypeFilter( + nodeTypeCriteria: $nodeTypeCriteria, + allowedNodeTypeNames: NodeTypeNames::fromArray($allowedNodeTypeNames) + ); + } + + public function createNodeTypeFilterFromNodeTypeNames(NodeTypeNames $nodeTypeNames): NodeTypeFilter + { + $nodeTypeManager = $this->contentRepository->getNodeTypeManager(); + $isEmpty = $nodeTypeNames->isEmpty(); + + $allowedNodeTypeNames = []; + foreach ($nodeTypeManager->getNodeTypes(true) as $candidateNodeType) { + if ($isEmpty) { + $allowedNodeTypeNames[] = $candidateNodeType->name; + continue; + } + + foreach ($nodeTypeNames as $nodeTypeName) { + if ($candidateNodeType->isOfType($nodeTypeName)) { + $allowedNodeTypeNames[] = $candidateNodeType->name; + continue 2; + } + } + } + + return new NodeTypeFilter( + nodeTypeCriteria: NodeTypeCriteria::createWithAllowedNodeTypeNames($nodeTypeNames), + allowedNodeTypeNames: NodeTypeNames::fromArray($allowedNodeTypeNames) + ); + } +} diff --git a/Classes/Infrastructure/ESCR/NodeTypeServiceFactory.php b/Classes/Infrastructure/ESCR/NodeTypeServiceFactory.php new file mode 100644 index 0000000..36833ed --- /dev/null +++ b/Classes/Infrastructure/ESCR/NodeTypeServiceFactory.php @@ -0,0 +1,35 @@ +contentRepositoryRegistry + ->get($contentRepositoryId), + ); + } +} diff --git a/Classes/Infrastructure/ContentRepository/TreeBuilder.php b/Classes/Infrastructure/ESCR/TreeBuilder.php similarity index 63% rename from Classes/Infrastructure/ContentRepository/TreeBuilder.php rename to Classes/Infrastructure/ESCR/TreeBuilder.php index 6939c7f..eabac39 100644 --- a/Classes/Infrastructure/ContentRepository/TreeBuilder.php +++ b/Classes/Infrastructure/ESCR/TreeBuilder.php @@ -10,9 +10,10 @@ declare(strict_types=1); -namespace Sitegeist\Archaeopteryx\Infrastructure\ContentRepository; +namespace Sitegeist\Archaeopteryx\Infrastructure\ESCR; -use Neos\ContentRepository\Domain\Model\Node; +use Neos\ContentRepository\Core\Projection\ContentGraph\Node; +use Neos\ContentRepository\Core\Projection\ContentGraph\Nodes; use Neos\Flow\Annotations as Flow; use Sitegeist\Archaeopteryx\Application\Shared\TreeNode; use Sitegeist\Archaeopteryx\Application\Shared\TreeNodeBuilder; @@ -26,26 +27,14 @@ final class TreeBuilder /** @var array */ private array $treeNodeBuildersByNodeAggregateIdentifier; - private function __construct( + public function __construct( Node $rootNode, + private readonly NodeService $nodeService, private readonly TreeNodeBuilder $rootTreeNodeBuilder, private readonly NodeSearchSpecification $nodeSearchSpecification, private readonly LinkableNodeSpecification $linkableNodeSpecification, ) { - $this->treeNodeBuildersByNodeAggregateIdentifier[(string) $rootNode->getNodeAggregateIdentifier()] = $rootTreeNodeBuilder; - } - - public static function forRootNode( - Node $rootNode, - NodeSearchSpecification $nodeSearchSpecification, - LinkableNodeSpecification $linkableNodeSpecification, - ): self { - return new self( - rootNode: $rootNode, - rootTreeNodeBuilder: TreeNodeBuilder::forNode($rootNode), - nodeSearchSpecification: $nodeSearchSpecification, - linkableNodeSpecification: $linkableNodeSpecification, - ); + $this->treeNodeBuildersByNodeAggregateIdentifier[$rootNode->aggregateId->value] = $rootTreeNodeBuilder; } public function addNodeWithDescendants(Node $node, int $loadingDepth): self @@ -55,10 +44,15 @@ public function addNodeWithDescendants(Node $node, int $loadingDepth): self if ($loadingDepth === 0) { $treeNodeBuilder->setHasUnloadedChildren( - $node->getNumberOfChildNodes($this->nodeSearchSpecification->baseNodeTypeFilter->toFilterString()) > 0, + $this->nodeService->getNumberOfChildNodes($node, $this->nodeSearchSpecification->baseNodeTypeFilter->nodeTypeCriteria) > 0, ); } else { - foreach ($node->getChildNodes($this->nodeSearchSpecification->baseNodeTypeFilter->toFilterString()) as $childNode) { + $childNodes = $this->nodeService->findChildNodes( + $node, + $this->nodeSearchSpecification->baseNodeTypeFilter->nodeTypeCriteria + ); + + foreach ($childNodes as $childNode) { /** @var Node $childNode */ $treeNodeBuilder->addChild( $addNodeWithChildrenRecursively($childNode, $loadingDepth - 1) @@ -73,21 +67,15 @@ public function addNodeWithDescendants(Node $node, int $loadingDepth): self return $this; } - public function addNodeWithAncestors(Node $node): self + public function addNodeWithAncestors(Node $node, Nodes $ancestors): self { - $addNodeAndParentRecursively = function (Node $node) use (&$addNodeAndParentRecursively): TreeNodeBuilder { - $treeNodeBuilder = $this->addNode($node); - - if ($parentNode = $node->getParent()) { - /** @var Node $parentNode */ - $parentTreeNodeBuilder = $addNodeAndParentRecursively($parentNode); - $parentTreeNodeBuilder->addChild($treeNodeBuilder); - } - - return $treeNodeBuilder; - }; + $treeNodeBuilder = $this->addNode($node); + foreach ($ancestors as $parentNode) { + $parentTreeNodeBuilder = $this->addNode($parentNode); + $parentTreeNodeBuilder->addChild($treeNodeBuilder); + $treeNodeBuilder = $parentTreeNodeBuilder; + } - $addNodeAndParentRecursively($node); return $this; } @@ -95,16 +83,16 @@ public function addNodeWithSiblingsAndAncestors(Node $node): self { $addNodeWithSiblingsAndParentRecursively = function (Node $node) use (&$addNodeWithSiblingsAndParentRecursively): TreeNodeBuilder { $treeNodeBuilder = $this->addNode($node); - if ($parentNode = $node->getParent()) { + if ($parentNode = $this->nodeService->findParentNode($node)) { /** @var Node $parentNode */ $parentTreeNodeBuilder = $addNodeWithSiblingsAndParentRecursively($parentNode); - foreach ($parentNode->findChildNodes()->previousAll($node)->toArray() as $siblingNode) { + foreach ($this->nodeService->findPrecedingSiblingNodes($node) as $siblingNode) { /** @var Node $siblingNode */ if ($this->nodeSearchSpecification->baseNodeTypeFilter->isSatisfiedByNode($siblingNode)) { $siblingTreeNodeBuilder = $this->addNode($siblingNode); $siblingTreeNodeBuilder->setHasUnloadedChildren( - $siblingNode->getNumberOfChildNodes($this->nodeSearchSpecification->baseNodeTypeFilter->toFilterString()) > 0, + $this->nodeService->getNumberOfChildNodes($siblingNode, $this->nodeSearchSpecification->baseNodeTypeFilter->nodeTypeCriteria) > 0, ); $parentTreeNodeBuilder->addChild($siblingTreeNodeBuilder); @@ -113,12 +101,12 @@ public function addNodeWithSiblingsAndAncestors(Node $node): self $parentTreeNodeBuilder->addChild($treeNodeBuilder); - foreach ($parentNode->findChildNodes()->nextAll($node)->toArray() as $siblingNode) { + foreach ($this->nodeService->findSucceedingSiblingNodes($node) as $siblingNode) { /** @var Node $siblingNode */ if ($this->nodeSearchSpecification->baseNodeTypeFilter->isSatisfiedByNode($siblingNode)) { $siblingTreeNodeBuilder = $this->addNode($siblingNode); $siblingTreeNodeBuilder->setHasUnloadedChildren( - $siblingNode->getNumberOfChildNodes($this->nodeSearchSpecification->baseNodeTypeFilter->toFilterString()) > 0, + $this->nodeService->getNumberOfChildNodes($siblingNode, $this->nodeSearchSpecification->baseNodeTypeFilter->nodeTypeCriteria) > 0, ); $parentTreeNodeBuilder->addChild($siblingTreeNodeBuilder); @@ -133,7 +121,7 @@ public function addNodeWithSiblingsAndAncestors(Node $node): self $leafTreeNodeBuilder = $addNodeWithSiblingsAndParentRecursively($node); $leafTreeNodeBuilder->setHasUnloadedChildren( - $node->getNumberOfChildNodes($this->nodeSearchSpecification->baseNodeTypeFilter->toFilterString()) > 0, + $this->nodeService->getNumberOfChildNodes($node, $this->nodeSearchSpecification->baseNodeTypeFilter->nodeTypeCriteria) > 0, ); return $this; @@ -147,8 +135,8 @@ public function build(): TreeNode private function addNode(Node $node): TreeNodeBuilder { $treeNodeBuilder = $this->treeNodeBuildersByNodeAggregateIdentifier[ - (string) $node->getNodeAggregateIdentifier() - ] ??= TreeNodeBuilder::forNode($node); + $node->aggregateId->value + ] ??= $this->nodeService->createTreeNodeBuilderForNode($node); $treeNodeBuilder->setIsMatchedByFilter( $this->nodeSearchSpecification->isSatisfiedByNode($node) diff --git a/Classes/Presentation/IconLabel/IconLabel.php b/Classes/Presentation/IconLabel/IconLabel.php new file mode 100644 index 0000000..3e1aa7f --- /dev/null +++ b/Classes/Presentation/IconLabel/IconLabel.php @@ -0,0 +1,33 @@ + $nodeTreePreset */ + public function forNodeTreePreset(array $nodeTreePreset): IconLabel + { + return new IconLabel( + icon: isset($nodeTreePreset['ui']['icon']) && is_string($nodeTreePreset['ui']['icon']) + ? $nodeTreePreset['ui']['icon'] + : 'filter', + label: isset($nodeTreePreset['ui']['label']) && is_string($nodeTreePreset['ui']['label']) + ? $nodeTreePreset['ui']['label'] + : 'N/A', + ); + } + + public function forNodeType(NodeType $nodeType): IconLabel + { + return new IconLabel( + icon: $nodeType->getConfiguration('ui.icon') ?? 'questionmark', + label: $nodeType->getConfiguration('ui.label') ?? 'N/A', + ); + } +} diff --git a/Classes/Presentation/Option/Option.php b/Classes/Presentation/Option/Option.php new file mode 100644 index 0000000..6fb8e70 --- /dev/null +++ b/Classes/Presentation/Option/Option.php @@ -0,0 +1,34 @@ + $nodeTreePreset */ + public function forNodeTreePreset(array $nodeTreePreset): Option + { + return new Option( + value: isset($nodeTreePreset['baseNodeType']) && is_string($nodeTreePreset['baseNodeType']) + ? $nodeTreePreset['baseNodeType'] + : '', + label: $this->iconLabelFactory->forNodeTreePreset($nodeTreePreset), + ); + } + + public function forNodeType(NodeType $nodeType): Option + { + return new Option( + value: $nodeType->name->value, + label: $this->iconLabelFactory->forNodeType($nodeType), + ); + } +} diff --git a/Classes/Presentation/Option/Options.php b/Classes/Presentation/Option/Options.php new file mode 100644 index 0000000..b8cf76b --- /dev/null +++ b/Classes/Presentation/Option/Options.php @@ -0,0 +1,35 @@ +items = array_values($items); + } + + public function jsonSerialize(): mixed + { + return $this->items; + } +} diff --git a/Classes/Presentation/Option/OptionsFactory.php b/Classes/Presentation/Option/OptionsFactory.php new file mode 100644 index 0000000..484b5a8 --- /dev/null +++ b/Classes/Presentation/Option/OptionsFactory.php @@ -0,0 +1,49 @@ +> $nodeTreePresets */ + public function forNodeTreePresets(array $nodeTreePresets): Options + { + $items = []; + + foreach ($nodeTreePresets as $presetName => $preset) { + $items[] = $this->optionFactory->forNodeTreePreset($preset); + } + + return new Options(...$items); + } + + public function forNodeTypes(NodeType ...$nodeTypes): Options + { + return new Options(...array_map( + fn (NodeType $nodeType) => + $this->optionFactory->forNodeType($nodeType), + $nodeTypes, + )); + } +} diff --git a/Makefile b/Makefile index 9c9d280..c69b564 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ lint:: Classes/ Tests/ analyse:: - @$(PHP) bin/phpstan analyse --level 8 Classes + @$(PHP) bin/phpstan analyse --level 8 Classes Tests test:: @$(PHP) bin/phpunit -c phpunit.xml \ @@ -50,4 +50,4 @@ test-isolated:: Tests github-action:: - @act -P ubuntu-20.04=shivammathur/node:focal \ No newline at end of file + @act -P ubuntu-20.04=shivammathur/node:focal diff --git a/Neos.Ui/custom-node-tree/src/application/SelectNodeTypeFilter.tsx b/Neos.Ui/custom-node-tree/src/application/SelectNodeTypeFilter.tsx index 7d83510..fe43b2a 100644 --- a/Neos.Ui/custom-node-tree/src/application/SelectNodeTypeFilter.tsx +++ b/Neos.Ui/custom-node-tree/src/application/SelectNodeTypeFilter.tsx @@ -43,8 +43,9 @@ export const SelectNodeTypeFilter: React.FC = (props) => { if ("success" in result) { return result.success.options.map((option) => ({ - ...option, - label: i18n(option.label) + value: option.value, + icon: option.label.icon, + label: i18n(option.label.label) })); } diff --git a/Neos.Ui/custom-node-tree/src/domain/NodeTypeFilterOptionDTO.ts b/Neos.Ui/custom-node-tree/src/domain/NodeTypeFilterOptionDTO.ts index e7a1b0d..ff44f6f 100644 --- a/Neos.Ui/custom-node-tree/src/domain/NodeTypeFilterOptionDTO.ts +++ b/Neos.Ui/custom-node-tree/src/domain/NodeTypeFilterOptionDTO.ts @@ -7,6 +7,8 @@ */ export type NodeTypeFilterOptionDTO = { value: string; - icon: string; - label: string; + label: { + icon: string; + label: string; + }; }; diff --git a/Resources/Public/JavaScript/Plugin.js b/Resources/Public/JavaScript/Plugin.js index a0776cc..85dcaf9 100644 --- a/Resources/Public/JavaScript/Plugin.js +++ b/Resources/Public/JavaScript/Plugin.js @@ -1,3 +1,3 @@ /*! For license information please see Plugin.js.LICENSE.txt */ -!function(w){var $={};function __webpack_require__(x){if($[x])return $[x].exports;var E=$[x]={i:x,l:!1,exports:{}};return w[x].call(E.exports,E,E.exports,__webpack_require__),E.l=!0,E.exports}__webpack_require__.m=w,__webpack_require__.c=$,__webpack_require__.d=function(w,$,x){__webpack_require__.o(w,$)||Object.defineProperty(w,$,{enumerable:!0,get:x})},__webpack_require__.r=function(w){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(w,"__esModule",{value:!0})},__webpack_require__.t=function(w,$){if(1&$&&(w=__webpack_require__(w)),8&$)return w;if(4&$&&"object"==typeof w&&w&&w.__esModule)return w;var x=Object.create(null);if(__webpack_require__.r(x),Object.defineProperty(x,"default",{enumerable:!0,value:w}),2&$&&"string"!=typeof w)for(var E in w)__webpack_require__.d(x,E,function($){return w[$]}.bind(null,E));return x},__webpack_require__.n=function(w){var $=w&&w.__esModule?function getDefault(){return w.default}:function getModuleExports(){return w};return __webpack_require__.d($,"a",$),$},__webpack_require__.o=function(w,$){return Object.prototype.hasOwnProperty.call(w,$)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=130)}([function(w,$,x){"use strict";var E=function _interopRequireDefault(w){return w&&w.__esModule?w:{default:w}}(x(52));w.exports=(0,E.default)("vendor")().React},function(w,$,x){"use strict";x.r($),x.d($,"__extends",(function(){return __extends})),x.d($,"__assign",(function(){return __assign})),x.d($,"__rest",(function(){return __rest})),x.d($,"__decorate",(function(){return __decorate})),x.d($,"__param",(function(){return __param})),x.d($,"__metadata",(function(){return __metadata})),x.d($,"__awaiter",(function(){return __awaiter})),x.d($,"__generator",(function(){return __generator})),x.d($,"__createBinding",(function(){return __createBinding})),x.d($,"__exportStar",(function(){return __exportStar})),x.d($,"__values",(function(){return __values})),x.d($,"__read",(function(){return __read})),x.d($,"__spread",(function(){return __spread})),x.d($,"__spreadArrays",(function(){return __spreadArrays})),x.d($,"__await",(function(){return __await})),x.d($,"__asyncGenerator",(function(){return __asyncGenerator})),x.d($,"__asyncDelegator",(function(){return __asyncDelegator})),x.d($,"__asyncValues",(function(){return __asyncValues})),x.d($,"__makeTemplateObject",(function(){return __makeTemplateObject})),x.d($,"__importStar",(function(){return __importStar})),x.d($,"__importDefault",(function(){return __importDefault})),x.d($,"__classPrivateFieldGet",(function(){return __classPrivateFieldGet})),x.d($,"__classPrivateFieldSet",(function(){return __classPrivateFieldSet}));var extendStatics=function(w,$){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,$){w.__proto__=$}||function(w,$){for(var x in $)$.hasOwnProperty(x)&&(w[x]=$[x])})(w,$)};function __extends(w,$){function __(){this.constructor=w}extendStatics(w,$),w.prototype=null===$?Object.create($):(__.prototype=$.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function __assign(w){for(var $,x=1,E=arguments.length;x=0;R--)(C=w[R])&&(I=(k<3?C(I):k>3?C($,x,I):C($,x))||I);return k>3&&I&&Object.defineProperty($,x,I),I}function __param(w,$){return function(x,E){$(x,E,w)}}function __metadata(w,$){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(w,$)}function __awaiter(w,$,x,E){return new(x||(x=Promise))((function(C,k){function fulfilled(w){try{step(E.next(w))}catch(w){k(w)}}function rejected(w){try{step(E.throw(w))}catch(w){k(w)}}function step(w){w.done?C(w.value):function adopt(w){return w instanceof x?w:new x((function($){$(w)}))}(w.value).then(fulfilled,rejected)}step((E=E.apply(w,$||[])).next())}))}function __generator(w,$){var x,E,C,k,I={label:0,sent:function(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return k={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k;function verb(k){return function(R){return function step(k){if(x)throw new TypeError("Generator is already executing.");for(;I;)try{if(x=1,E&&(C=2&k[0]?E.return:k[0]?E.throw||((C=E.return)&&C.call(E),0):E.next)&&!(C=C.call(E,k[1])).done)return C;switch(E=0,C&&(k=[2&k[0],C.value]),k[0]){case 0:case 1:C=k;break;case 4:return I.label++,{value:k[1],done:!1};case 5:I.label++,E=k[1],k=[0];continue;case 7:k=I.ops.pop(),I.trys.pop();continue;default:if(!(C=I.trys,(C=C.length>0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]=w.length&&(w=void 0),{value:w&&w[E++],done:!w}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I}function __spread(){for(var w=[],$=0;$1||resume(w,$)}))})}function resume(w,$){try{!function step(w){w.value instanceof __await?Promise.resolve(w.value.v).then(fulfill,reject):settle(k[0][2],w)}(C[w]($))}catch(w){settle(k[0][3],w)}}function fulfill(w){resume("next",w)}function reject(w){resume("throw",w)}function settle(w,$){w($),k.shift(),k.length&&resume(k[0][0],k[0][1])}}function __asyncDelegator(w){var $,x;return $={},verb("next"),verb("throw",(function(w){throw w})),verb("return"),$[Symbol.iterator]=function(){return this},$;function verb(E,C){$[E]=w[E]?function($){return(x=!x)?{value:__await(w[E]($)),done:"return"===E}:C?C($):$}:C}}function __asyncValues(w){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var $,x=w[Symbol.asyncIterator];return x?x.call(w):(w=__values(w),$={},verb("next"),verb("throw"),verb("return"),$[Symbol.asyncIterator]=function(){return this},$);function verb(x){$[x]=w[x]&&function($){return new Promise((function(E,C){(function settle(w,$,x,E){Promise.resolve(E).then((function($){w({value:$,done:x})}),$)})(E,C,($=w[x]($)).done,$.value)}))}}}function __makeTemplateObject(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w}function __importStar(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)Object.hasOwnProperty.call(w,x)&&($[x]=w[x]);return $.default=w,$}function __importDefault(w){return w&&w.__esModule?w:{default:w}}function __classPrivateFieldGet(w,$){if(!$.has(w))throw new TypeError("attempted to get private field on non-instance");return $.get(w)}function __classPrivateFieldSet(w,$,x){if(!$.has(w))throw new TypeError("attempted to set private field on non-instance");return $.set(w,x),x}},function(w,$,x){"use strict";x.d($,"a",(function(){return V}));var E=x(1),C=x(29),k=x(66),I=x(6),R=x(50),D=x(19),W=x(41),V=function(w){function Subscriber($,x,E){var C=w.call(this)||this;switch(C.syncErrorValue=null,C.syncErrorThrown=!1,C.syncErrorThrowable=!1,C.isStopped=!1,arguments.length){case 0:C.destination=k.a;break;case 1:if(!$){C.destination=k.a;break}if("object"==typeof $){$ instanceof Subscriber?(C.syncErrorThrowable=$.syncErrorThrowable,C.destination=$,$.add(C)):(C.syncErrorThrowable=!0,C.destination=new G(C,$));break}default:C.syncErrorThrowable=!0,C.destination=new G(C,$,x,E)}return C}return E.__extends(Subscriber,w),Subscriber.prototype[R.a]=function(){return this},Subscriber.create=function(w,$,x){var E=new Subscriber(w,$,x);return E.syncErrorThrowable=!1,E},Subscriber.prototype.next=function(w){this.isStopped||this._next(w)},Subscriber.prototype.error=function(w){this.isStopped||(this.isStopped=!0,this._error(w))},Subscriber.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},Subscriber.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,w.prototype.unsubscribe.call(this))},Subscriber.prototype._next=function(w){this.destination.next(w)},Subscriber.prototype._error=function(w){this.destination.error(w),this.unsubscribe()},Subscriber.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},Subscriber.prototype._unsubscribeAndRecycle=function(){var w=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=w,this},Subscriber}(I.a),G=function(w){function SafeSubscriber($,x,E,I){var R,D=w.call(this)||this;D._parentSubscriber=$;var W=D;return Object(C.a)(x)?R=x:x&&(R=x.next,E=x.error,I=x.complete,x!==k.a&&(W=Object.create(x),Object(C.a)(W.unsubscribe)&&D.add(W.unsubscribe.bind(W)),W.unsubscribe=D.unsubscribe.bind(D))),D._context=W,D._next=R,D._error=E,D._complete=I,D}return E.__extends(SafeSubscriber,w),SafeSubscriber.prototype.next=function(w){if(!this.isStopped&&this._next){var $=this._parentSubscriber;D.a.useDeprecatedSynchronousErrorHandling&&$.syncErrorThrowable?this.__tryOrSetError($,this._next,w)&&this.unsubscribe():this.__tryOrUnsub(this._next,w)}},SafeSubscriber.prototype.error=function(w){if(!this.isStopped){var $=this._parentSubscriber,x=D.a.useDeprecatedSynchronousErrorHandling;if(this._error)x&&$.syncErrorThrowable?(this.__tryOrSetError($,this._error,w),this.unsubscribe()):(this.__tryOrUnsub(this._error,w),this.unsubscribe());else if($.syncErrorThrowable)x?($.syncErrorValue=w,$.syncErrorThrown=!0):Object(W.a)(w),this.unsubscribe();else{if(this.unsubscribe(),x)throw w;Object(W.a)(w)}}},SafeSubscriber.prototype.complete=function(){var w=this;if(!this.isStopped){var $=this._parentSubscriber;if(this._complete){var wrappedComplete=function(){return w._complete.call(w._context)};D.a.useDeprecatedSynchronousErrorHandling&&$.syncErrorThrowable?(this.__tryOrSetError($,wrappedComplete),this.unsubscribe()):(this.__tryOrUnsub(wrappedComplete),this.unsubscribe())}else this.unsubscribe()}},SafeSubscriber.prototype.__tryOrUnsub=function(w,$){try{w.call(this._context,$)}catch(w){if(this.unsubscribe(),D.a.useDeprecatedSynchronousErrorHandling)throw w;Object(W.a)(w)}},SafeSubscriber.prototype.__tryOrSetError=function(w,$,x){if(!D.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{$.call(this._context,x)}catch($){return D.a.useDeprecatedSynchronousErrorHandling?(w.syncErrorValue=$,w.syncErrorThrown=!0,!0):(Object(W.a)($),!0)}return!1},SafeSubscriber.prototype._unsubscribe=function(){var w=this._parentSubscriber;this._context=null,this._parentSubscriber=null,w.unsubscribe()},SafeSubscriber}(V)},function(w,$,x){"use strict";x.d($,"a",(function(){return R})),x.d($,"b",(function(){return D})),x.d($,"c",(function(){return innerSubscribe}));var E=x(1),C=x(2),k=x(4),I=x(40),R=function(w){function SimpleInnerSubscriber($){var x=w.call(this)||this;return x.parent=$,x}return E.__extends(SimpleInnerSubscriber,w),SimpleInnerSubscriber.prototype._next=function(w){this.parent.notifyNext(w)},SimpleInnerSubscriber.prototype._error=function(w){this.parent.notifyError(w),this.unsubscribe()},SimpleInnerSubscriber.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},SimpleInnerSubscriber}(C.a),D=(C.a,function(w){function SimpleOuterSubscriber(){return null!==w&&w.apply(this,arguments)||this}return E.__extends(SimpleOuterSubscriber,w),SimpleOuterSubscriber.prototype.notifyNext=function(w){this.destination.next(w)},SimpleOuterSubscriber.prototype.notifyError=function(w){this.destination.error(w)},SimpleOuterSubscriber.prototype.notifyComplete=function(){this.destination.complete()},SimpleOuterSubscriber}(C.a));C.a;function innerSubscribe(w,$){if(!$.closed){if(w instanceof k.a)return w.subscribe($);var x;try{x=Object(I.a)(w)($)}catch(w){$.error(w)}return x}}},function(w,$,x){"use strict";x.d($,"a",(function(){return V}));var E=x(64),C=x(2),k=x(50),I=x(66);var R=x(26),D=x(48),W=x(19),V=function(){function Observable(w){this._isScalar=!1,w&&(this._subscribe=w)}return Observable.prototype.lift=function(w){var $=new Observable;return $.source=this,$.operator=w,$},Observable.prototype.subscribe=function(w,$,x){var E=this.operator,R=function toSubscriber(w,$,x){if(w){if(w instanceof C.a)return w;if(w[k.a])return w[k.a]()}return w||$||x?new C.a(w,$,x):new C.a(I.a)}(w,$,x);if(E?R.add(E.call(R,this.source)):R.add(this.source||W.a.useDeprecatedSynchronousErrorHandling&&!R.syncErrorThrowable?this._subscribe(R):this._trySubscribe(R)),W.a.useDeprecatedSynchronousErrorHandling&&R.syncErrorThrowable&&(R.syncErrorThrowable=!1,R.syncErrorThrown))throw R.syncErrorValue;return R},Observable.prototype._trySubscribe=function(w){try{return this._subscribe(w)}catch($){W.a.useDeprecatedSynchronousErrorHandling&&(w.syncErrorThrown=!0,w.syncErrorValue=$),Object(E.a)(w)?w.error($):console.warn($)}},Observable.prototype.forEach=function(w,$){var x=this;return new($=getPromiseCtor($))((function($,E){var C;C=x.subscribe((function($){try{w($)}catch(w){E(w),C&&C.unsubscribe()}}),E,$)}))},Observable.prototype._subscribe=function(w){var $=this.source;return $&&$.subscribe(w)},Observable.prototype[R.a]=function(){return this},Observable.prototype.pipe=function(){for(var w=[],$=0;$=0;R--)(C=w[R])&&(I=(k<3?C(I):k>3?C($,x,I):C($,x))||I);return k>3&&I&&Object.defineProperty($,x,I),I}function __param(w,$){return function(x,E){$(x,E,w)}}function __metadata(w,$){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(w,$)}function __awaiter(w,$,x,E){return new(x||(x=Promise))((function(C,k){function fulfilled(w){try{step(E.next(w))}catch(w){k(w)}}function rejected(w){try{step(E.throw(w))}catch(w){k(w)}}function step(w){w.done?C(w.value):function adopt(w){return w instanceof x?w:new x((function($){$(w)}))}(w.value).then(fulfilled,rejected)}step((E=E.apply(w,$||[])).next())}))}function __generator(w,$){var x,E,C,k,I={label:0,sent:function(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return k={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k;function verb(k){return function(R){return function step(k){if(x)throw new TypeError("Generator is already executing.");for(;I;)try{if(x=1,E&&(C=2&k[0]?E.return:k[0]?E.throw||((C=E.return)&&C.call(E),0):E.next)&&!(C=C.call(E,k[1])).done)return C;switch(E=0,C&&(k=[2&k[0],C.value]),k[0]){case 0:case 1:C=k;break;case 4:return I.label++,{value:k[1],done:!1};case 5:I.label++,E=k[1],k=[0];continue;case 7:k=I.ops.pop(),I.trys.pop();continue;default:if(!(C=I.trys,(C=C.length>0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]=w.length&&(w=void 0),{value:w&&w[E++],done:!w}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I}function __spread(){for(var w=[],$=0;$1||resume(w,$)}))})}function resume(w,$){try{!function step(w){w.value instanceof __await?Promise.resolve(w.value.v).then(fulfill,reject):settle(k[0][2],w)}(C[w]($))}catch(w){settle(k[0][3],w)}}function fulfill(w){resume("next",w)}function reject(w){resume("throw",w)}function settle(w,$){w($),k.shift(),k.length&&resume(k[0][0],k[0][1])}}function __asyncDelegator(w){var $,x;return $={},verb("next"),verb("throw",(function(w){throw w})),verb("return"),$[Symbol.iterator]=function(){return this},$;function verb(E,C){$[E]=w[E]?function($){return(x=!x)?{value:__await(w[E]($)),done:"return"===E}:C?C($):$}:C}}function __asyncValues(w){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var $,x=w[Symbol.asyncIterator];return x?x.call(w):(w=__values(w),$={},verb("next"),verb("throw"),verb("return"),$[Symbol.asyncIterator]=function(){return this},$);function verb(x){$[x]=w[x]&&function($){return new Promise((function(E,C){(function settle(w,$,x,E){Promise.resolve(E).then((function($){w({value:$,done:x})}),$)})(E,C,($=w[x]($)).done,$.value)}))}}}function __makeTemplateObject(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w}var C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$};function __importStar(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$}function __importDefault(w){return w&&w.__esModule?w:{default:w}}function __classPrivateFieldGet(w,$,x,E){if("a"===x&&!E)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof $?w!==$||!E:!$.has(w))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===x?E:"a"===x?E.call(w):E?E.value:$.get(w)}function __classPrivateFieldSet(w,$,x,E,C){if("m"===E)throw new TypeError("Private method is not writable");if("a"===E&&!C)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof $?w!==$||!C:!$.has(w))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===E?C.call(w,x):C?C.value=x:$.set(w,x),x}},function(w,$,x){"use strict";x.d($,"a",(function(){return R}));var E=x(9),C=x(63),k=x(29),I=x(51),R=function(){function Subscription(w){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,w&&(this._ctorUnsubscribe=!0,this._unsubscribe=w)}var w;return Subscription.prototype.unsubscribe=function(){var w;if(!this.closed){var $=this._parentOrParents,x=this._ctorUnsubscribe,R=this._unsubscribe,D=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,$ instanceof Subscription)$.remove(this);else if(null!==$)for(var W=0;W<$.length;++W){$[W].remove(this)}if(Object(k.a)(R)){x&&(this._unsubscribe=void 0);try{R.call(this)}catch($){w=$ instanceof I.a?flattenUnsubscriptionErrors($.errors):[$]}}if(Object(E.a)(D)){W=-1;for(var V=D.length;++W1?$-1:0),E=1;E<$;E++)x[E-1]=arguments[E];throw new Error("An error occurred. See https://git.io/JUIaE#"+w+" for more information."+(x.length>0?" Args: "+x.join(", "):""))}var le=function(){function e(w){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=w}var w=e.prototype;return w.indexOfGroup=function(w){for(var $=0,x=0;x=this.groupSizes.length){for(var x=this.groupSizes,E=x.length,C=E;w>=C;)(C<<=1)<0&&j(16,""+w);this.groupSizes=new Uint32Array(C),this.groupSizes.set(x),this.length=C;for(var k=E;k=this.length||0===this.groupSizes[w])return $;for(var x=this.groupSizes[w],E=this.indexOfGroup(w),C=E+x,k=E;k=0;x--){var E=$[x];if(E&&1===E.nodeType&&E.hasAttribute(oe))return E}}(x),k=void 0!==C?C.nextSibling:null;E.setAttribute(oe,"active"),E.setAttribute("data-styled-version","5.3.0");var I=q();return I&&E.setAttribute("nonce",I),x.insertBefore(E,k),E},we=function(){function e(w){var $=this.element=H(w);$.appendChild(document.createTextNode("")),this.sheet=function(w){if(w.sheet)return w.sheet;for(var $=document.styleSheets,x=0,E=$.length;x=0){var x=document.createTextNode($),E=this.nodes[w];return this.element.insertBefore(x,E||null),this.length++,!0}return!1},w.deleteRule=function(w){this.element.removeChild(this.nodes[w]),this.length--},w.getRule=function(w){return w0&&(W+=w+",")})),E+=""+R+D+'{content:"'+W+'"}/*!sc*/\n'}}}return E}(this)},e}(),Le=/(a)(d)/gi,Q=function(w){return String.fromCharCode(w+(w>25?39:97))};function ee(w){var $,x="";for($=Math.abs(w);$>52;$=$/52|0)x=Q($%52)+x;return(Q($%52)+x).replace(Le,"$1-$2")}var te=function(w,$){for(var x=$.length;x;)w=33*w^$.charCodeAt(--x);return w},ne=function(w){return te(5381,w)};function re(w){for(var $=0;$>>0);if(!$.hasNameForId(E,I)){var R=x(k,"."+I,void 0,E);$.insertRules(E,I,R)}C.push(I),this.staticRulesId=I}else{for(var D=this.rules.length,W=te(this.baseHash,x.hash),V="",G=0;G>>0);if(!$.hasNameForId(E,oe)){var ue=x(V,"."+oe,void 0,E);$.insertRules(E,oe,ue)}C.push(oe)}}return C.join(" ")},e}(),ze=/^\s*\/\/.*$/gm,He=[":","[",".","#"];function ce(w){var $,x,E,C,k=void 0===w?ie:w,I=k.options,R=void 0===I?ie:I,W=k.plugins,V=void 0===W?J:W,G=new D.a(R),K=[],oe=function(w){function t($){if($)try{w($+"}")}catch(w){}}return function($,x,E,C,k,I,R,D,W,V){switch($){case 1:if(0===W&&64===x.charCodeAt(0))return w(x+";"),"";break;case 2:if(0===D)return x+"/*|*/";break;case 3:switch(D){case 102:case 112:return w(E[0]+x),"";default:return x+(0===V?"/*|*/":"")}case-2:x.split("/*|*/}").forEach(t)}}}((function(w){K.push(w)})),f=function(w,E,k){return 0===E&&-1!==He.indexOf(k[x.length])||k.match(C)?w:"."+$};function m(w,k,I,R){void 0===R&&(R="&");var D=w.replace(ze,""),W=k&&I?I+" "+k+" { "+D+" }":D;return $=R,x=k,E=new RegExp("\\"+x+"\\b","g"),C=new RegExp("(\\"+x+"\\b){2,}"),G(I||!k?"":k,W)}return G.use([].concat(V,[function(w,$,C){2===w&&C.length&&C[0].lastIndexOf(x)>0&&(C[0]=C[0].replace(E,f))},oe,function(w){if(-2===w){var $=K;return K=[],$}}])),m.hash=V.length?V.reduce((function(w,$){return $.name||j(15),te(w,$.name)}),5381).toString():"",m}var Ke=k.a.createContext(),Ze=Ke.Consumer,Qe=k.a.createContext(),et=(Qe.Consumer,new Re),tt=ce();function fe(){return Object(C.useContext)(Ke)||et}function me(){return Object(C.useContext)(Qe)||tt}function ye(w){var $=Object(C.useState)(w.stylisPlugins),x=$[0],E=$[1],I=fe(),D=Object(C.useMemo)((function(){var $=I;return w.sheet?$=w.sheet:w.target&&($=$.reconstructWithOptions({target:w.target},!1)),w.disableCSSOMInjection&&($=$.reconstructWithOptions({useCSSOMInjection:!1})),$}),[w.disableCSSOMInjection,w.sheet,w.target]),W=Object(C.useMemo)((function(){return ce({options:{prefix:!w.disableVendorPrefixes},plugins:x})}),[w.disableVendorPrefixes,x]);return Object(C.useEffect)((function(){R()(x,w.stylisPlugins)||E(w.stylisPlugins)}),[w.stylisPlugins]),k.a.createElement(Ke.Provider,{value:D},k.a.createElement(Qe.Provider,{value:W},w.children))}var rt=function(){function e(w,$){var x=this;this.inject=function(w,$){void 0===$&&($=tt);var E=x.name+$.hash;w.hasNameForId(x.id,E)||w.insertRules(x.id,E,$(x.rules,E,"@keyframes"))},this.toString=function(){return j(12,String(x.name))},this.name=w,this.id="sc-keyframes-"+w,this.rules=$}return e.prototype.getName=function(w){return void 0===w&&(w=tt),this.name+w.hash},e}(),nt=/([A-Z])/,it=/([A-Z])/g,ot=/^ms-/,Ee=function(w){return"-"+w.toLowerCase()};function be(w){return nt.test(w)?w.replace(it,Ee).replace(ot,"-ms-"):w}var _e=function(w){return null==w||!1===w||""===w};function Ne(w,$,x,E){if(Array.isArray(w)){for(var C,k=[],I=0,R=w.length;I1?$-1:0),E=1;E<$;E++)x[E-1]=arguments[E];return b(w)||S(w)?Ne(g(J,[w].concat(x))):0===x.length&&1===w.length&&"string"==typeof w[0]?w:Ne(g(w,x))}new Set;var Oe=function(w,$,x){return void 0===x&&(x=ie),w.theme!==x.theme&&w.theme||$||x.theme},ut=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,at=/(^-|-$)/g;function je(w){return w.replace(ut,"-").replace(at,"")}var Te=function(w){return ee(ne(w)>>>0)};function ke(w){return"string"==typeof w&&!0}var xe=function(w){return"function"==typeof w||"object"==typeof w&&null!==w&&!Array.isArray(w)},Ve=function(w){return"__proto__"!==w&&"constructor"!==w&&"prototype"!==w};function Be(w,$,x){var E=w[x];xe($)&&xe(E)?Me(E,$):w[x]=$}function Me(w){for(var $=arguments.length,x=new Array($>1?$-1:0),E=1;E<$;E++)x[E-1]=arguments[E];for(var C=0,k=x;C=0||(C[x]=w[x]);return C}($,["componentId"]),k=E&&E+"-"+(ke(w)?w:je(_(w)));return Ye(w,v({},C,{attrs:se,componentId:k}),x)},Object.defineProperty(le,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function($){this._foldedDefaultProps=E?Me({},w.defaultProps,$):$}}),le.toString=function(){return"."+le.styledComponentId},I&&K()(le,w,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),le}var qe=function(w){return function e(w,$,x){if(void 0===x&&(x=ie),!Object(E.isValidElementType)($))return j(1,String($));var i=function(){return w($,x,Ae.apply(void 0,arguments))};return i.withConfig=function(E){return e(w,$,v({},x,{},E))},i.attrs=function(E){return e(w,$,v({},x,{attrs:Array.prototype.concat(x.attrs,E).filter(Boolean)}))},i}(Ye,w)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(w){qe[w]=qe(w)}));var lt=function(){function e(w,$){this.rules=w,this.componentId=$,this.isStatic=re(w),Re.registerId(this.componentId+1)}var w=e.prototype;return w.createStyles=function(w,$,x,E){var C=E(Ne(this.rules,$,x,E).join(""),""),k=this.componentId+w;x.insertRules(k,k,C)},w.removeStyles=function(w,$){$.clearRules(this.componentId+w)},w.renderStyles=function(w,$,x,E){w>2&&Re.registerId(this.componentId+w),this.removeStyles(w,x),this.createStyles(w,$,x,E)},e}();function $e(w){for(var $=arguments.length,x=new Array($>1?$-1:0),E=1;E<$;E++)x[E-1]=arguments[E];var I=Ae.apply(void 0,[w].concat(x)),R="sc-global-"+Te(JSON.stringify(I)),D=new lt(I,R);function l(w){var $=fe(),x=me(),E=Object(C.useContext)(st),k=Object(C.useRef)($.allocateGSInstance(R)).current;return Object(C.useLayoutEffect)((function(){return h(k,w,$,E,x),function(){return D.removeStyles(k,$)}}),[k,w,$,E,x]),null}function h(w,$,x,E,C){if(D.isStatic)D.renderStyles(w,de,x,C);else{var k=v({},$,{theme:Oe($,E,l.defaultProps)});D.renderStyles(w,k,x,C)}}return k.a.memo(l)}function We(w){for(var $=arguments.length,x=new Array($>1?$-1:0),E=1;E<$;E++)x[E-1]=arguments[E];var C=Ae.apply(void 0,[w].concat(x)).join(""),k=Te(C);return new rt(k,C)}var ft=function(){function e(){var w=this;this._emitSheetCSS=function(){var $=w.instance.toString(),x=q();return""},this.getStyleTags=function(){return w.sealed?j(2):w._emitSheetCSS()},this.getStyleElement=function(){var $;if(w.sealed)return j(2);var x=(($={})[oe]="",$["data-styled-version"]="5.3.0",$.dangerouslySetInnerHTML={__html:w.instance.toString()},$),E=q();return E&&(x.nonce=E),[k.a.createElement("style",v({},x,{key:"sc-0-0"}))]},this.seal=function(){w.sealed=!0},this.instance=new Re({isServer:!0}),this.sealed=!1}var w=e.prototype;return w.collectStyles=function(w){return this.sealed?j(2):k.a.createElement(ye,{sheet:this.instance},w)},w.interleaveWithNodeStream=function(w){return j(3)},e}(),Je=function(w){var $=k.a.forwardRef((function($,x){var E=Object(C.useContext)(st),I=w.defaultProps,R=Oe($,E,I);return k.a.createElement(w,v({},$,{theme:R,ref:x}))}));return K()($,w),$.displayName="WithTheme("+_(w)+")",$},Xe=function(){return Object(C.useContext)(st)},pt={StyleSheet:Re,masterSheet:et};$.default=qe}.call(this,x(44))},function(w,$,x){"use strict";x.d($,"a",(function(){return subscribeToResult}));var E=x(1),C=function(w){function InnerSubscriber($,x,E){var C=w.call(this)||this;return C.parent=$,C.outerValue=x,C.outerIndex=E,C.index=0,C}return E.__extends(InnerSubscriber,w),InnerSubscriber.prototype._next=function(w){this.parent.notifyNext(this.outerValue,w,this.outerIndex,this.index++,this)},InnerSubscriber.prototype._error=function(w){this.parent.notifyError(w,this),this.unsubscribe()},InnerSubscriber.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},InnerSubscriber}(x(2).a),k=x(40),I=x(4);function subscribeToResult(w,$,x,E,R){if(void 0===R&&(R=new C(w,x,E)),!R.closed)return $ instanceof I.a?$.subscribe(R):Object(k.a)($)(R)}},function(w,$,x){"use strict";x.d($,"a",(function(){return C}));var E=!1,C={Promise:void 0,set useDeprecatedSynchronousErrorHandling(w){w&&(new Error).stack;E=w},get useDeprecatedSynchronousErrorHandling(){return E}}},function(w,$,x){"use strict";function identity(w){return w}x.d($,"a",(function(){return identity}))},function(w,$,x){"use strict";x.d($,"a",(function(){return C}));var E=x(1),C=function(w){function OuterSubscriber(){return null!==w&&w.apply(this,arguments)||this}return E.__extends(OuterSubscriber,w),OuterSubscriber.prototype.notifyNext=function(w,$,x,E,C){this.destination.next($)},OuterSubscriber.prototype.notifyError=function(w,$){this.destination.error(w)},OuterSubscriber.prototype.notifyComplete=function(w){this.destination.complete()},OuterSubscriber}(x(2).a)},function(w,$,x){"use strict";x.d($,"a",(function(){return filter}));var E=x(1),C=x(2);function filter(w,$){return function filterOperatorFunction(x){return x.lift(new k(w,$))}}var k=function(){function FilterOperator(w,$){this.predicate=w,this.thisArg=$}return FilterOperator.prototype.call=function(w,$){return $.subscribe(new I(w,this.predicate,this.thisArg))},FilterOperator}(),I=function(w){function FilterSubscriber($,x,E){var C=w.call(this,$)||this;return C.predicate=x,C.thisArg=E,C.count=0,C}return E.__extends(FilterSubscriber,w),FilterSubscriber.prototype._next=function(w){var $;try{$=this.predicate.call(this.thisArg,w,this.count++)}catch(w){return void this.destination.error(w)}$&&this.destination.next(w)},FilterSubscriber}(C.a)},function(w,$,x){"use strict";x.d($,"b",(function(){return E})),x.d($,"a",(function(){return R}));var E,C=x(13),k=x(45),I=x(58);E||(E={});var R=function(){function Notification(w,$,x){this.kind=w,this.value=$,this.error=x,this.hasValue="N"===w}return Notification.prototype.observe=function(w){switch(this.kind){case"N":return w.next&&w.next(this.value);case"E":return w.error&&w.error(this.error);case"C":return w.complete&&w.complete()}},Notification.prototype.do=function(w,$,x){switch(this.kind){case"N":return w&&w(this.value);case"E":return $&&$(this.error);case"C":return x&&x()}},Notification.prototype.accept=function(w,$,x){return w&&"function"==typeof w.next?this.observe(w):this.do(w,$,x)},Notification.prototype.toObservable=function(){switch(this.kind){case"N":return Object(k.a)(this.value);case"E":return Object(I.a)(this.error);case"C":return Object(C.b)()}throw new Error("unexpected notification kind value")},Notification.createNext=function(w){return void 0!==w?new Notification("N",w):Notification.undefinedValueNotification},Notification.createError=function(w){return new Notification("E",void 0,w)},Notification.createComplete=function(){return Notification.completeNotification},Notification.completeNotification=new Notification("C"),Notification.undefinedValueNotification=new Notification("N",void 0),Notification}()},function(w,$,x){"use strict";function getSymbolIterator(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}x.d($,"a",(function(){return E}));var E=getSymbolIterator()},function(w,$,x){"use strict";function noop(){}x.d($,"a",(function(){return noop}))},function(w,$,x){"use strict";x.d($,"a",(function(){return E}));var E=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}()},function(w,$,x){"use strict";x.d($,"a",(function(){return E}));var E=function(){function ObjectUnsubscribedErrorImpl(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return ObjectUnsubscribedErrorImpl.prototype=Object.create(Error.prototype),ObjectUnsubscribedErrorImpl}()},function(w,$,x){"use strict";x.d($,"a",(function(){return E}));var E=function(){function ArgumentOutOfRangeErrorImpl(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return ArgumentOutOfRangeErrorImpl.prototype=Object.create(Error.prototype),ArgumentOutOfRangeErrorImpl}()},function(w,$,x){"use strict";function isFunction(w){return"function"==typeof w}x.d($,"a",(function(){return isFunction}))},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.useEditorTransactions=$.useEditorState=$.EditorContext=$.createEditor=$.useSortedAndFilteredLinkTypes=$.useLinkTypeForHref=$.useLinkTypes=$.makeLinkType=void 0;var E=x(173);Object.defineProperty($,"makeLinkType",{enumerable:!0,get:function get(){return E.makeLinkType}}),Object.defineProperty($,"useLinkTypes",{enumerable:!0,get:function get(){return E.useLinkTypes}}),Object.defineProperty($,"useLinkTypeForHref",{enumerable:!0,get:function get(){return E.useLinkTypeForHref}}),Object.defineProperty($,"useSortedAndFilteredLinkTypes",{enumerable:!0,get:function get(){return E.useSortedAndFilteredLinkTypes}});var C=x(114);Object.defineProperty($,"createEditor",{enumerable:!0,get:function get(){return C.createEditor}}),Object.defineProperty($,"EditorContext",{enumerable:!0,get:function get(){return C.EditorContext}}),Object.defineProperty($,"useEditorState",{enumerable:!0,get:function get(){return C.useEditorState}}),Object.defineProperty($,"useEditorTransactions",{enumerable:!0,get:function get(){return C.useEditorTransactions}})},function(w,$,x){"use strict";x.d($,"a",(function(){return E}));var E=function(){function EmptyErrorImpl(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return EmptyErrorImpl.prototype=Object.create(Error.prototype),EmptyErrorImpl}()},function(w,$,x){"use strict";x.d($,"b",(function(){return mergeMap})),x.d($,"a",(function(){return W}));var E=x(1),C=x(10),k=x(14),I=x(3);function mergeMap(w,$,x){return void 0===x&&(x=Number.POSITIVE_INFINITY),"function"==typeof $?function(E){return E.pipe(mergeMap((function(x,E){return Object(k.a)(w(x,E)).pipe(Object(C.a)((function(w,C){return $(x,w,E,C)})))}),x))}:("number"==typeof $&&(x=$),function($){return $.lift(new R(w,x))})}var R=function(){function MergeMapOperator(w,$){void 0===$&&($=Number.POSITIVE_INFINITY),this.project=w,this.concurrent=$}return MergeMapOperator.prototype.call=function(w,$){return $.subscribe(new D(w,this.project,this.concurrent))},MergeMapOperator}(),D=function(w){function MergeMapSubscriber($,x,E){void 0===E&&(E=Number.POSITIVE_INFINITY);var C=w.call(this,$)||this;return C.project=x,C.concurrent=E,C.hasCompleted=!1,C.buffer=[],C.active=0,C.index=0,C}return E.__extends(MergeMapSubscriber,w),MergeMapSubscriber.prototype._next=function(w){this.active0?this._next(w.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},MergeMapSubscriber}(I.b),W=mergeMap},function(w,$,x){"use strict";x.d($,"a",(function(){return fromArray}));var E=x(4),C=x(89),k=x(65);function fromArray(w,$){return $?Object(k.a)(w,$):new E.a(Object(C.a)(w))}},function(w,$,x){"use strict";x.d($,"a",(function(){return k}));var E=x(1),C=x(71),k=function(w){function AsyncScheduler($,x){void 0===x&&(x=C.a.now);var E=w.call(this,$,(function(){return AsyncScheduler.delegate&&AsyncScheduler.delegate!==E?AsyncScheduler.delegate.now():x()}))||this;return E.actions=[],E.active=!1,E.scheduled=void 0,E}return E.__extends(AsyncScheduler,w),AsyncScheduler.prototype.schedule=function($,x,E){return void 0===x&&(x=0),AsyncScheduler.delegate&&AsyncScheduler.delegate!==this?AsyncScheduler.delegate.schedule($,x,E):w.prototype.schedule.call(this,$,x,E)},AsyncScheduler.prototype.flush=function(w){var $=this.actions;if(this.active)$.push(w);else{var x;this.active=!0;do{if(x=w.execute(w.state,w.delay))break}while(w=$.shift());if(this.active=!1,x){for(;w=$.shift();)w.unsubscribe();throw x}}},AsyncScheduler}(C.a)},function(w,$,x){"use strict";x.d($,"a",(function(){return I}));var E=x(1),C=x(7),k=x(6),I=function(w){function AsyncSubject(){var $=null!==w&&w.apply(this,arguments)||this;return $.value=null,$.hasNext=!1,$.hasCompleted=!1,$}return E.__extends(AsyncSubject,w),AsyncSubject.prototype._subscribe=function($){return this.hasError?($.error(this.thrownError),k.a.EMPTY):this.hasCompleted&&this.hasNext?($.next(this.value),$.complete(),k.a.EMPTY):w.prototype._subscribe.call(this,$)},AsyncSubject.prototype.next=function(w){this.hasCompleted||(this.value=w,this.hasNext=!0)},AsyncSubject.prototype.error=function($){this.hasCompleted||w.prototype.error.call(this,$)},AsyncSubject.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&w.prototype.next.call(this,this.value),w.prototype.complete.call(this)},AsyncSubject}(C.a)},function(w,$,x){"use strict";x.d($,"a",(function(){return C}));var E=x(1),C=function(w){function AsyncAction($,x){var E=w.call(this,$,x)||this;return E.scheduler=$,E.work=x,E.pending=!1,E}return E.__extends(AsyncAction,w),AsyncAction.prototype.schedule=function(w,$){if(void 0===$&&($=0),this.closed)return this;this.state=w;var x=this.id,E=this.scheduler;return null!=x&&(this.id=this.recycleAsyncId(E,x,$)),this.pending=!0,this.delay=$,this.id=this.id||this.requestAsyncId(E,this.id,$),this},AsyncAction.prototype.requestAsyncId=function(w,$,x){return void 0===x&&(x=0),setInterval(w.flush.bind(w,this),x)},AsyncAction.prototype.recycleAsyncId=function(w,$,x){if(void 0===x&&(x=0),null!==x&&this.delay===x&&!1===this.pending)return $;clearInterval($)},AsyncAction.prototype.execute=function(w,$){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var x=this._execute(w,$);if(x)return x;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},AsyncAction.prototype._execute=function(w,$){var x=!1,E=void 0;try{this.work(w)}catch(w){x=!0,E=!!w&&w||new Error(w)}if(x)return this.unsubscribe(),E},AsyncAction.prototype._unsubscribe=function(){var w=this.id,$=this.scheduler,x=$.actions,E=x.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==E&&x.splice(E,1),null!=w&&(this.id=this.recycleAsyncId($,w,null)),this.delay=null},AsyncAction}(function(w){function Action($,x){return w.call(this)||this}return E.__extends(Action,w),Action.prototype.schedule=function(w,$){return void 0===$&&($=0),this},Action}(x(6).a))},function(w,$,x){"use strict";x.d($,"a",(function(){return isNumeric}));var E=x(9);function isNumeric(w){return!Object(E.a)(w)&&w-parseFloat(w)+1>=0}},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.Layout=$.IconLabel=$.Deletable=$.Modal=$.Form=$.Tabs=$.ImageCard=$.IconCard=void 0;var k=x(198);Object.defineProperty($,"IconCard",{enumerable:!0,get:function get(){return k.IconCard}});var I=x(200);Object.defineProperty($,"ImageCard",{enumerable:!0,get:function get(){return I.ImageCard}});var R=x(201);Object.defineProperty($,"Tabs",{enumerable:!0,get:function get(){return R.Tabs}});var D=x(202);Object.defineProperty($,"Form",{enumerable:!0,get:function get(){return D.Form}});var W=x(203);Object.defineProperty($,"Modal",{enumerable:!0,get:function get(){return W.Modal}});var V=x(205);Object.defineProperty($,"Deletable",{enumerable:!0,get:function get(){return V.Deletable}});var G=x(206);Object.defineProperty($,"IconLabel",{enumerable:!0,get:function get(){return G.IconLabel}}),$.Layout=__importStar(x(207))},function(w,$,x){"use strict";x.d($,"a",(function(){return concat}));var E=x(45),C=x(83);function concat(){for(var w=[],$=0;$1)for(var x=1;x0?w.prototype.requestAsyncId.call(this,$,x,E):($.actions.push(this),$.scheduled||($.scheduled=Immediate_setImmediate($.flush.bind($,null))))},AsapAction.prototype.recycleAsyncId=function($,x,E){if(void 0===E&&(E=0),null!==E&&E>0||null===E&&this.delay>0)return w.prototype.recycleAsyncId.call(this,$,x,E);0===$.actions.length&&(Immediate_clearImmediate(x),$.scheduled=void 0)},AsapAction}(x(36).a),D=new(function(w){function AsapScheduler(){return null!==w&&w.apply(this,arguments)||this}return E.__extends(AsapScheduler,w),AsapScheduler.prototype.flush=function(w){this.active=!0,this.scheduled=void 0;var $,x=this.actions,E=-1,C=x.length;w=w||x.shift();do{if($=w.execute(w.state,w.delay))break}while(++Ew?exec():!0!==$&&(C=setTimeout(E?clear:exec,void 0===E?w-G:w)))}return"boolean"!=typeof $&&(E=x,x=$,$=void 0),wrapper.cancel=function cancel(){clearExistingTimeout(),k=!0},wrapper}var Re=["mousemove","mousedown","resize","keydown","touchstart","wheel"],esm_useIdle=function(w,$,x){void 0===w&&(w=6e4),void 0===$&&($=!1),void 0===x&&(x=Re);var C=Object(E.useState)($),k=C[0],I=C[1];return Object(E.useEffect)((function(){for(var $,E=!0,C=k,set=function(w){E&&(C=w,I(w))},R=throttle(50,(function(){C&&set(!1),clearTimeout($),$=setTimeout((function(){return set(!0)}),w)})),onVisibility=function(){document.hidden||R()},D=0;D=$[1]?1:-1}))}),[w]);return k.reduce((function(w,$){var E=$[0],C=$[1];return x>=C?E:w}),k[0][0])}},esm_useKeyPress=function(w){var $=Object(E.useState)([!1,null]),x=$[0],C=$[1];return esm_useKey(w,(function(w){return C([!0,w])}),{event:"keydown"},[x]),esm_useKey(w,(function(w){return C([!1,w])}),{event:"keyup"},[x]),x},esm_useKeyPressEvent=function(w,$,x,E){void 0===E&&(E=esm_useKeyPress);var C=E(w),k=C[0],I=C[1];esm_useUpdateEffect((function(){!k&&x?x(I):k&&$&&$(I)}),[k])},esm_useLatest=function(w){var $=Object(E.useRef)(w);return $.current=w,$},esm_useLifecycles=function(w,$){Object(E.useEffect)((function(){return w&&w(),function(){$&&$()}}),[])};var Le=function useList(w){void 0===w&&(w=[]);var $=Object(E.useRef)(resolveHookState(w)),x=useUpdate(),C=Object(E.useMemo)((function(){var E={set:function(w){$.current=resolveHookState(w,$.current),x()},push:function(){for(var w=[],$=0;$E.length?E[w]=$:E.splice(w,0,$),E}))},update:function(w,$){C.set((function(x){return x.map((function(x){return w(x,$)?$:x}))}))},updateFirst:function(w,x){var E=$.current.findIndex((function($){return w($,x)}));E>=0&&C.updateAt(E,x)},upsert:function(w,x){var E=$.current.findIndex((function($){return w($,x)}));E>=0?C.updateAt(E,x):C.push(x)},sort:function(w){C.set((function($){return $.slice().sort(w)}))},filter:function(w,$){C.set((function(x){return x.slice().filter(w,$)}))},removeAt:function(w){C.set((function($){var x=$.slice();return x.splice(w,1),x}))},clear:function(){C.set([])},reset:function(){C.set(resolveHookState(w).slice())}};return E.remove=E.removeAt,E}),[]);return[$.current,C]},esm_useLocalStorage=function(w,$,x){if(!I)return[$,noop,noop];if(!w)throw new Error("useLocalStorage key may not be falsy");var C=x?x.raw?function(w){return w}:x.deserializer:JSON.parse,k=Object(E.useRef)((function(w){try{var E=x?x.raw?String:x.serializer:JSON.stringify,k=localStorage.getItem(w);return null!==k?C(k):($&&localStorage.setItem(w,E($)),$)}catch(w){return $}})),R=Object(E.useState)((function(){return k.current(w)})),D=R[0],W=R[1];Object(E.useLayoutEffect)((function(){return W(k.current(w))}),[w]);var V=Object(E.useCallback)((function($){try{var E="function"==typeof $?$(D):$;if(void 0===E)return;var k=void 0;k=x?x.raw?"string"==typeof E?E:JSON.stringify(E):x.serializer?x.serializer(E):JSON.stringify(E):JSON.stringify(E),localStorage.setItem(w,k),W(C(k))}catch(w){}}),[w,W]),G=Object(E.useCallback)((function(){try{localStorage.removeItem(w),W(void 0)}catch(w){}}),[w,W]);return[D,V,G]},patchHistoryMethod=function(w){var $=window.history,x=$[w];$[w]=function($){var E=x.apply(this,arguments),C=new Event(w.toLowerCase());return C.state=$,window.dispatchEvent(C),E}};I&&(patchHistoryMethod("pushState"),patchHistoryMethod("replaceState"));var buildState=function(w){var $=window.history,x=$.state,E=$.length,C=window.location;return{trigger:w,state:x,length:E,hash:C.hash,host:C.host,hostname:C.hostname,href:C.href,origin:C.origin,pathname:C.pathname,port:C.port,protocol:C.protocol,search:C.search}},De="function"==typeof Event,Ue=I&&De?function(){var w=Object(E.useState)(buildState("load")),$=w[0],x=w[1];return Object(E.useEffect)((function(){var onPopstate=function(){return x(buildState("popstate"))},onPushstate=function(){return x(buildState("pushstate"))},onReplacestate=function(){return x(buildState("replacestate"))};return on(window,"popstate",onPopstate),on(window,"pushstate",onPushstate),on(window,"replacestate",onReplacestate),function(){off(window,"popstate",onPopstate),off(window,"pushstate",onPushstate),off(window,"replacestate",onReplacestate)}}),[]),$}:function(){return{trigger:"load",length:1}};function getClosestBody(w){if(!w)return null;if("BODY"===w.tagName)return w;if("IFRAME"===w.tagName){var $=w.contentDocument;return $?$.body:null}return w.offsetParent?getClosestBody(w.offsetParent):null}function preventDefault(w){var $=w||window.event;return $.touches.length>1||($.preventDefault&&$.preventDefault(),!1)}var ze=I&&window.navigator&&window.navigator.platform&&/iP(ad|hone|od)/.test(window.navigator.platform),He=new Map,Ke="object"==typeof document?document:void 0,Ze=!1,Qe=Ke?function useLockBody(w,$){void 0===w&&(w=!0);var x=Object(E.useRef)(Ke.body);$=$||x;var unlock=function(w){var $=He.get(w);$&&(1===$.counter?(He.delete(w),ze?(w.ontouchmove=null,Ze&&(off(document,"touchmove",preventDefault),Ze=!1)):w.style.overflow=$.initialOverflow):He.set(w,{counter:$.counter-1,initialOverflow:$.initialOverflow}))};Object(E.useEffect)((function(){var x=getClosestBody($.current);x&&(w?function(w){var $=He.get(w);$?He.set(w,{counter:$.counter+1,initialOverflow:$.initialOverflow}):(He.set(w,{counter:1,initialOverflow:w.style.overflow}),ze?Ze||(on(document,"touchmove",preventDefault,{passive:!1}),Ze=!0):w.style.overflow="hidden")}(x):unlock(x))}),[w,$.current]),Object(E.useEffect)((function(){var w=getClosestBody($.current);if(w)return function(){unlock(w)}}),[])}:function useLockBodyMock(w,$){void 0===w&&(w=!0)},esm_useLogger=function(w){for(var $=[],x=1;x1?R=1:R<0&&(R=0),D&&(R=1-R),V({value:R}),($.onScrub||noop)(R)}}))};return on(w.current,"mousedown",onMouseDown_1),on(w.current,"touchstart",onTouchStart_1),function(){off(w.current,"mousedown",onMouseDown_1),off(w.current,"touchstart",onTouchStart_1)}}}),[w,$.vertical]),W},bt=I&&"object"==typeof window.speechSynthesis?window.speechSynthesis.getVoices():[],esm_useSpeech=function(w,$){void 0===$&&($={});var x=esm_useSetState({isPlaying:!1,lang:$.lang||"default",voice:$.voice||bt[0],rate:$.rate||1,pitch:$.pitch||1,volume:$.volume||1}),C=x[0],k=x[1],I=Object(E.useRef)(null);return esm_useMount((function(){var x=new SpeechSynthesisUtterance(w);$.lang&&(x.lang=$.lang),$.voice&&(x.voice=$.voice),x.rate=$.rate||1,x.pitch=$.pitch||1,x.volume=$.volume||1,x.onstart=function(){return k({isPlaying:!0})},x.onresume=function(){return k({isPlaying:!0})},x.onend=function(){return k({isPlaying:!1})},x.onpause=function(){return k({isPlaying:!1})},I.current=x,window.speechSynthesis.speak(I.current)})),C},esm_useStartTyping=function(w){he((function(){var keydown=function($){var x,E,C,k,I;!function(){var w=document.activeElement,$=document.body;if(!w)return!1;if(w===$)return!1;switch(w.tagName){case"INPUT":case"TEXTAREA":return!0}return w.hasAttribute("contenteditable")}()&&(E=(x=$).keyCode,C=x.metaKey,k=x.ctrlKey,I=x.altKey,!(C||k||I)&&(E>=48&&E<=57||E>=65&&E<=90))&&w($)};return on(document,"keydown",keydown),function(){off(document,"keydown",keydown)}}),[])};function useStateWithHistory(w,$,x){if(void 0===$&&($=10),$<1)throw new Error("Capacity has to be greater than 1, got '"+$+"'");var C=useFirstMountState(),k=Object(E.useState)(w),I=k[0],R=k[1],D=Object(E.useRef)(null!=x?x:[]),W=Object(E.useRef)(0);return C&&(D.current.length?(D.current[D.current.length-1]!==w&&D.current.push(w),D.current.length>$&&(D.current=D.current.slice(D.current.length-$))):D.current.push(w),W.current=D.current.length&&D.current.length-1),[I,Object(E.useCallback)((function(w){R((function(x){return(w=resolveHookState(w,x))!==x&&(W.current$&&(D.current=D.current.slice(D.current.length-$))),w}))}),[I,$]),Object(E.useMemo)((function(){return{history:D.current,position:W.current,capacity:$,back:function(w){void 0===w&&(w=1),W.current&&R((function(){return W.current-=Math.min(w,W.current),D.current[W.current]}))},forward:function(w){void 0===w&&(w=1),W.current!==D.current.length-1&&R((function(){return W.current=Math.min(W.current+w,D.current.length-1),D.current[W.current]}))},go:function(w){w!==W.current&&R((function(){return W.current=w<0?Math.max(D.current.length+w,0):Math.min(D.current.length-1,w),D.current[W.current]}))}}}),[I])]}function useStateList(w){void 0===w&&(w=[]);var $=useMountedState(),x=useUpdate(),k=Object(E.useRef)(0);esm_useUpdateEffect((function(){w.length<=k.current&&(k.current=w.length-1,x())}),[w.length]);var I=Object(E.useMemo)((function(){return{next:function(){return I.setStateAt(k.current+1)},prev:function(){return I.setStateAt(k.current-1)},setStateAt:function(E){$()&&w.length&&E!==k.current&&(k.current=E>=0?E%w.length:w.length+E%w.length,x())},setState:function(E){if($()){var C=w.length?w.indexOf(E):-1;if(-1===C)throw new Error("State '"+E+"' is not a valid state (does not exist in state list)");k.current=C,x()}}}}),[w]);return Object(C.__assign)({state:w[k.current],currentIndex:k.current},I)}var esm_useThrottle=function(w,$){void 0===$&&($=200);var x=Object(E.useState)(w),C=x[0],k=x[1],I=Object(E.useRef)(),R=Object(E.useRef)(null),D=Object(E.useRef)(0);return Object(E.useEffect)((function(){if(I.current)R.current=w,D.current=!0;else{k(w);var timeoutCallback_1=function(){D.current?(D.current=!1,k(R.current),I.current=setTimeout(timeoutCallback_1,$)):I.current=void 0};I.current=setTimeout(timeoutCallback_1,$)}}),[w]),esm_useUnmount((function(){I.current&&clearTimeout(I.current)})),C},esm_useThrottleFn=function(w,$,x){void 0===$&&($=200);var C=Object(E.useState)(null),k=C[0],I=C[1],R=Object(E.useRef)(),D=Object(E.useRef)();return Object(E.useEffect)((function(){if(R.current)D.current=x;else{I(w.apply(void 0,x));var timeoutCallback_1=function(){D.current?(I(w.apply(void 0,D.current)),D.current=void 0,R.current=setTimeout(timeoutCallback_1,$)):R.current=void 0};R.current=setTimeout(timeoutCallback_1,$)}}),x),esm_useUnmount((function(){R.current&&clearTimeout(R.current)})),k};function useTimeout(w){return void 0===w&&(w=0),useTimeoutFn(useUpdate(),w)}var vt={restoreOnUnmount:!1};var yt="undefined"!=typeof document?function useTitle(w,$){void 0===$&&($=vt);var x=Object(E.useRef)(document.title);document.title=w,Object(E.useEffect)((function(){return $&&$.restoreOnUnmount?function(){document.title=x.current}:void 0}),[])}:function(w){},mt=x(126),esm_useTween=function(w,$,x){return void 0===w&&(w="inCirc"),void 0===$&&($=200),void 0===x&&(x=0),(0,mt.easing[w])(esm_useRaf($,x))},esm_useUnmountPromise=function(){var w=Object(E.useRef)(!1);return esm_useEffectOnce((function(){return function(){w.current=!0}})),Object(E.useMemo)((function(){return function($,x){return new Promise((function(E,C){$.then((function($){w.current||E($)}),(function($){w.current?x?x($):console.error("useUnmountPromise",$):C($)}))}))}}),[])};function useUpsert(w,$){void 0===$&&($=[]);var x=Le($),E=x[0],k=x[1];return[E,Object(C.__assign)(Object(C.__assign)({},k),{upsert:function($){k.upsert(w,$)}})]}var gt=R&&"vibrate"in navigator?function useVibrate(w,$,x){void 0===w&&(w=!0),void 0===$&&($=[1e3,1e3]),void 0===x&&(x=!0),Object(E.useEffect)((function(){var E;if(w&&(navigator.vibrate($),x)){var C=$ instanceof Array?$.reduce((function(w,$){return w+$})):$;E=setInterval((function(){navigator.vibrate($)}),C)}return function(){w&&(navigator.vibrate(0),x&&clearInterval(E))}}),[w])}:noop,St=createHTMLMediaHook("video");function useStateValidator(w,$,x){void 0===x&&(x=[void 0]);var C=Object(E.useRef)($),k=Object(E.useRef)(w);C.current=$,k.current=w;var I=Object(E.useState)(x),R=I[0],D=I[1],W=Object(E.useCallback)((function(){C.current.length>=2?C.current(k.current,D):D(C.current(k.current))}),[D]);return Object(E.useEffect)((function(){W()}),[w]),[R,W]}var e=function(w){if("undefined"==typeof document)return 0;if(document.body&&(!document.readyState||"loading"!==document.readyState)){if(!0!==w&&"number"==typeof e.__cache)return e.__cache;var $=document.createElement("div"),x=$.style;x.display="block",x.position="absolute",x.width="100px",x.height="100px",x.left="-999px",x.top="-999px",x.overflow="scroll",document.body.insertBefore($,null);var E=$.clientWidth;if(0!==E)return e.__cache=100-E,document.body.removeChild($),e.__cache;document.body.removeChild($)}};function useScrollbarWidth(){var w=Object(E.useState)(e()),$=w[0],x=w[1];return Object(E.useEffect)((function(){if(void 0===$){var w=requestAnimationFrame((function(){x(e())}));return function(){return cancelAnimationFrame(w)}}}),[]),$}function useMultiStateValidator(w,$,x){if(void 0===x&&(x=[void 0]),"object"!=typeof w)throw new Error("states expected to be an object or array, got "+typeof w);var C=Object(E.useRef)($),k=Object(E.useRef)(w);C.current=$,k.current=w;var I=Object(E.useState)(x),R=I[0],D=I[1],W=Object(E.useCallback)((function(){C.current.length>=2?C.current(k.current,D):D(C.current(k.current))}),[D]);return Object(E.useEffect)((function(){W()}),Object.values(w)),[R,W]}var esm_useWindowScroll=function(){var w=esm_useRafState((function(){return{x:I?window.pageXOffset:0,y:I?window.pageYOffset:0}})),$=w[0],x=w[1];return Object(E.useEffect)((function(){var handler=function(){x((function(w){var $=window.pageXOffset,x=window.pageYOffset;return w.x!==$||w.y!==x?{x:$,y:x}:w}))};return handler(),on(window,"scroll",handler,{capture:!1,passive:!0}),function(){off(window,"scroll",handler)}}),[]),$},esm_useWindowSize=function(w,$){void 0===w&&(w=1/0),void 0===$&&($=1/0);var x=esm_useRafState({width:I?window.innerWidth:w,height:I?window.innerHeight:$}),C=x[0],k=x[1];return Object(E.useEffect)((function(){if(I){var handler_1=function(){k({width:window.innerWidth,height:window.innerHeight})};return on(window,"resize",handler_1),function(){off(window,"resize",handler_1)}}}),[]),C},wt={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};var _t=I&&void 0!==window.ResizeObserver?function useMeasure(){var w=Object(E.useState)(null),$=w[0],x=w[1],C=Object(E.useState)(wt),k=C[0],I=C[1],R=Object(E.useMemo)((function(){return new window.ResizeObserver((function(w){if(w[0]){var $=w[0].contentRect,x=$.x,E=$.y,C=$.width,k=$.height,R=$.top,D=$.left,W=$.bottom,V=$.right;I({x:x,y:E,width:C,height:k,top:R,left:D,bottom:W,right:V})}}))}),[]);return he((function(){if($)return R.observe($),function(){R.disconnect()}}),[$]),[x,k]}:function(){return[noop,wt]};function useRendersCount(){return++Object(E.useRef)(0).current}var esm_useSet=function(w){void 0===w&&(w=new Set);var $=Object(E.useState)(w),x=$[0],k=$[1],I=Object(E.useMemo)((function(){return{add:function(w){return k((function($){return new Set(Object(C.__spreadArrays)(Array.from($),[w]))}))},remove:function(w){return k((function($){return new Set(Array.from($).filter((function($){return $!==w})))}))},toggle:function(w){return k((function($){return $.has(w)?new Set(Array.from($).filter((function($){return $!==w}))):new Set(Object(C.__spreadArrays)(Array.from($),[w]))}))},reset:function(){return k(w)}}}),[k]),R=Object(C.__assign)({has:Object(E.useCallback)((function(w){return x.has(w)}),[x])},I);return[x,R]};function createGlobalState(w){var $={state:w instanceof Function?w():w,setState:function(w){$.state=resolveHookState(w,$.state),$.setters.forEach((function(w){return w($.state)}))},setters:[]};return function(){var w=Object(E.useState)($.state),x=w[0],C=w[1];return esm_useEffectOnce((function(){return function(){$.setters=$.setters.filter((function(w){return w!==C}))}})),he((function(){$.setters.includes(C)||$.setters.push(C)})),[x,$.setState]}}var useHash=function(){var w=Object(E.useState)((function(){return window.location.hash})),$=w[0],x=w[1],C=Object(E.useCallback)((function(){x(window.location.hash)}),[]);esm_useLifecycles((function(){on(window,"hashchange",C)}),(function(){off(window,"hashchange",C)}));var k=Object(E.useCallback)((function(w){w!==$&&(window.location.hash=w)}),[$]);return[$,k]}},function(w,$,x){"use strict";x.d($,"a",(function(){return refCount}));var E=x(1),C=x(2);function refCount(){return function refCountOperatorFunction(w){return w.lift(new k(w))}}var k=function(){function RefCountOperator(w){this.connectable=w}return RefCountOperator.prototype.call=function(w,$){var x=this.connectable;x._refCount++;var E=new I(w,x),C=$.subscribe(E);return E.closed||(E.connection=x.connect()),C},RefCountOperator}(),I=function(w){function RefCountSubscriber($,x){var E=w.call(this,$)||this;return E.connectable=x,E}return E.__extends(RefCountSubscriber,w),RefCountSubscriber.prototype._unsubscribe=function(){var w=this.connectable;if(w){this.connectable=null;var $=w._refCount;if($<=0)this.connection=null;else if(w._refCount=$-1,$>1)this.connection=null;else{var x=this.connection,E=w._connection;this.connection=null,!E||x&&E!==x||E.unsubscribe()}}else this.connection=null},RefCountSubscriber}(C.a)},function(w,$,x){"use strict";x.d($,"a",(function(){return V}));var E=x(1),C=x(7),k=x(70),I=x(6),R=x(81),D=x(27),W=x(88),V=function(w){function ReplaySubject($,x,E){void 0===$&&($=Number.POSITIVE_INFINITY),void 0===x&&(x=Number.POSITIVE_INFINITY);var C=w.call(this)||this;return C.scheduler=E,C._events=[],C._infiniteTimeWindow=!1,C._bufferSize=$<1?1:$,C._windowTime=x<1?1:x,x===Number.POSITIVE_INFINITY?(C._infiniteTimeWindow=!0,C.next=C.nextInfiniteTimeWindow):C.next=C.nextTimeWindow,C}return E.__extends(ReplaySubject,w),ReplaySubject.prototype.nextInfiniteTimeWindow=function($){if(!this.isStopped){var x=this._events;x.push($),x.length>this._bufferSize&&x.shift()}w.prototype.next.call(this,$)},ReplaySubject.prototype.nextTimeWindow=function($){this.isStopped||(this._events.push(new G(this._getNow(),$)),this._trimBufferThenGetEvents()),w.prototype.next.call(this,$)},ReplaySubject.prototype._subscribe=function(w){var $,x=this._infiniteTimeWindow,E=x?this._events:this._trimBufferThenGetEvents(),C=this.scheduler,k=E.length;if(this.closed)throw new D.a;if(this.isStopped||this.hasError?$=I.a.EMPTY:(this.observers.push(w),$=new W.a(this,w)),C&&w.add(w=new R.a(w,C)),x)for(var V=0;V$&&(k=Math.max(k,C-$)),k>0&&E.splice(0,k),E},ReplaySubject}(C.a),G=function(){return function ReplayEvent(w,$){this.time=w,this.value=$}}()},function(w,$,x){"use strict";x.d($,"a",(function(){return throwError}));var E=x(4);function throwError(w,$){return $?new E.a((function(x){return $.schedule(dispatch,0,{error:w,subscriber:x})})):new E.a((function($){return $.error(w)}))}function dispatch(w){var $=w.error;w.subscriber.error($)}},function(w,$,x){"use strict";x.d($,"b",(function(){return combineLatest})),x.d($,"a",(function(){return V}));var E=x(1),C=x(11),k=x(9),I=x(21),R=x(18),D=x(33),W={};function combineLatest(){for(var w=[],$=0;$this.index},StaticArrayIterator.prototype.hasCompleted=function(){return this.array.length===this.index},StaticArrayIterator}(),J=function(w){function ZipBufferIterator($,x,E){var C=w.call(this,$)||this;return C.parent=x,C.observable=E,C.stillUnsubscribed=!0,C.buffer=[],C.isComplete=!1,C}return E.__extends(ZipBufferIterator,w),ZipBufferIterator.prototype[R.a]=function(){return this},ZipBufferIterator.prototype.next=function(){var w=this.buffer;return 0===w.length&&this.isComplete?{value:null,done:!0}:{value:w.shift(),done:!1}},ZipBufferIterator.prototype.hasValue=function(){return this.buffer.length>0},ZipBufferIterator.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},ZipBufferIterator.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},ZipBufferIterator.prototype.notifyNext=function(w){this.buffer.push(w),this.parent.checkIterators()},ZipBufferIterator.prototype.subscribe=function(){return Object(D.c)(this.observable,new D.a(this))},ZipBufferIterator}(D.b)},function(w,$,x){"use strict";function isObject(w){return null!==w&&"object"==typeof w}x.d($,"a",(function(){return isObject}))},function(w,$,x){"use strict";x.d($,"a",(function(){return canReportError}));var E=x(2);function canReportError(w){for(;w;){var $=w,x=$.closed,C=$.destination,k=$.isStopped;if(x||k)return!1;w=C&&C instanceof E.a?C:null}return!0}},function(w,$,x){"use strict";x.d($,"a",(function(){return scheduleArray}));var E=x(4),C=x(6);function scheduleArray(w,$){return new E.a((function(x){var E=new C.a,k=0;return E.add($.schedule((function(){k!==w.length?(x.next(w[k++]),x.closed||E.add(this.schedule())):x.complete()}))),E}))}},function(w,$,x){"use strict";x.d($,"a",(function(){return k}));var E=x(19),C=x(41),k={closed:!0,next:function(w){},error:function(w){if(E.a.useDeprecatedSynchronousErrorHandling)throw w;Object(C.a)(w)},complete:function(){}}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.Deletable=$.useEditorTransactions=$.useEditorState=$.EditorContext=$.createEditor=$.useLinkTypeForHref=$.makeLinkType=$.registerDialog=$.registerLinkTypes=void 0;var E=x(139);Object.defineProperty($,"registerLinkTypes",{enumerable:!0,get:function get(){return E.registerLinkTypes}}),Object.defineProperty($,"registerDialog",{enumerable:!0,get:function get(){return E.registerDialog}});var C=x(30);Object.defineProperty($,"makeLinkType",{enumerable:!0,get:function get(){return C.makeLinkType}}),Object.defineProperty($,"useLinkTypeForHref",{enumerable:!0,get:function get(){return C.useLinkTypeForHref}}),Object.defineProperty($,"createEditor",{enumerable:!0,get:function get(){return C.createEditor}}),Object.defineProperty($,"EditorContext",{enumerable:!0,get:function get(){return C.EditorContext}}),Object.defineProperty($,"useEditorState",{enumerable:!0,get:function get(){return C.useEditorState}}),Object.defineProperty($,"useEditorTransactions",{enumerable:!0,get:function get(){return C.useEditorTransactions}});var k=x(38);Object.defineProperty($,"Deletable",{enumerable:!0,get:function get(){return k.Deletable}})},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.useNeos=$.NeosContext=void 0;var k=__importStar(x(0));$.NeosContext=k.createContext(null),$.useNeos=function useNeos(){var w=k.useContext($.NeosContext);if(!w)throw new Error("[Sitegeist.Archaeopteryx]: Could not determine Neos Context.");return w}},function(w,$,x){"use strict";function _extends(){return(_extends=Object.assign||function(w){for(var $=1;$=0||(C[x]=w[x]);return C}x.r($),x.d($,"Field",(function(){return De})),x.d($,"Form",(function(){return ReactFinalForm})),x.d($,"FormSpy",(function(){return FormSpy})),x.d($,"useField",(function(){return useField})),x.d($,"useForm",(function(){return useForm})),x.d($,"useFormState",(function(){return useFormState})),x.d($,"version",(function(){return ve})),x.d($,"withTypes",(function(){return withTypes}));var E=x(0),C=x.n(E),k={},I=/[.[\]]+/,R=function toPath(w){if(null==w||!w.length)return[];if("string"!=typeof w)throw new Error("toPath() expects a string");return null==k[w]&&(k[w]=w.split(I).filter(Boolean)),k[w]},D=function getIn(w,$){for(var x=R($),E=w,C=0;C=x.length)return E;var k=x[$];if(isNaN(k)){var I;if(null==w){var R,D=setInRecursor(void 0,$+1,x,E,C);return void 0===D?void 0:((R={})[k]=D,R)}if(Array.isArray(w))throw new Error("Cannot set a non-numeric property on an array");var W=setInRecursor(w[k],$+1,x,E,C);if(void 0===W){var V=Object.keys(w).length;if(void 0===w[k]&&0===V)return;if(void 0!==w[k]&&V<=1)return isNaN(x[$-1])||C?void 0:{};w[k];return _objectWithoutPropertiesLoose(w,[k].map(_toPropertyKey))}return _extends({},w,((I={})[k]=W,I))}var G=Number(k);if(null==w){var K=setInRecursor(void 0,$+1,x,E,C);if(void 0===K)return;var J=[];return J[G]=K,J}if(!Array.isArray(w))throw new Error("Cannot set a numeric property on an object");var ie=setInRecursor(w[G],$+1,x,E,C),oe=[].concat(w);if(C&&void 0===ie){if(oe.splice(G,1),0===oe.length)return}else oe[G]=ie;return oe}(w,0,R($),x,E)},V="FINAL_FORM/array-error";function publishFieldState(w,$){var x=w.errors,E=w.initialValues,C=w.lastSubmittedValues,k=w.submitErrors,I=w.submitFailed,R=w.submitSucceeded,W=w.submitting,G=w.values,K=$.active,J=$.blur,ie=$.change,oe=$.data,ue=$.focus,ae=$.modified,se=$.modifiedSinceLastSubmit,de=$.name,le=$.touched,pe=$.validating,he=$.visited,ve=D(G,de),ge=D(x,de);ge&&ge[V]&&(ge=ge[V]);var Se=k&&D(k,de),we=E&&D(E,de),Ce=$.isEqual(we,ve),Pe=!ge&&!Se;return{active:K,blur:J,change:ie,data:oe,dirty:!Ce,dirtySinceLastSubmit:!(!C||$.isEqual(D(C,de),ve)),error:ge,focus:ue,initial:we,invalid:!Pe,length:Array.isArray(ve)?ve.length:void 0,modified:ae,modifiedSinceLastSubmit:se,name:de,pristine:Ce,submitError:Se,submitFailed:I,submitSucceeded:R,submitting:W,touched:le,valid:Pe,value:ve,visited:he,validating:pe}}var G=["active","data","dirty","dirtySinceLastSubmit","error","initial","invalid","length","modified","modifiedSinceLastSubmit","pristine","submitError","submitFailed","submitSucceeded","submitting","touched","valid","value","visited","validating"],K=function shallowEqual(w,$){if(w===$)return!0;if("object"!=typeof w||!w||"object"!=typeof $||!$)return!1;var x=Object.keys(w),E=Object.keys($);if(x.length!==E.length)return!1;for(var C=Object.prototype.hasOwnProperty.bind($),k=0;k0,pe=++he,ge=Promise.all(se).then(function clearAsyncValidationPromise(w){return function($){return delete ve[w],$}}(pe));de&&(ve[pe]=ge);var Se=function processErrors(){var w=_extends({},I?E.errors:{},oe),$=function forEachError($){k.forEach((function(E){if(x[E]){var k=D(oe,E),W=D(w,E),V=Pe(C[E]).length,G=ae[E];$(E,V&&G||R&&k||(k||I?void 0:W))}}))};$((function($,x){w=W(w,$,x)||{}})),$((function($,x){if(x&&x[V]){var E=D(w,$),C=[].concat(E);C[V]=x[V],w=W(w,$,C)}})),K(E.errors,w)||(E.errors=w),E.error=oe["FINAL_FORM/form-error"]};if(Se(),$(),de){J.formState.validating++,$();var we=function afterPromise(){J.formState.validating--,$()};ge.then((function(){he>pe||Se()})).then(we,we)}}else $()},Fe=function notifyFieldListeners(w){if(!oe){var $=J.fields,x=J.fieldSubscribers,E=J.formState,C=_extends({},$),k=function notifyField(w){var $=C[w],k=publishFieldState(E,$),I=$.lastFieldState;$.lastFieldState=k;var R=x[w];R&¬ify(R,k,I,ie,void 0===I)};w?k(w):Object.keys(C).forEach(k)}},Re=function markAllFieldsTouched(){Object.keys(J.fields).forEach((function(w){J.fields[w].touched=!0}))},Le=function calculateNextFormState(){var w=J.fields,$=J.formState,x=J.lastFormState,E=_extends({},w),C=Object.keys(E),k=!1,I=C.reduce((function(w,x){return!E[x].isEqual(D($.values,x),D($.initialValues||{},x))&&(k=!0,w[x]=!0),w}),{}),R=C.reduce((function(w,x){var C=$.lastSubmittedValues||{};return E[x].isEqual(D($.values,x),D(C,x))||(w[x]=!0),w}),{});$.pristine=!k,$.dirtySinceLastSubmit=!(!$.lastSubmittedValues||!Object.values(R).some((function(w){return w}))),$.modifiedSinceLastSubmit=!(!$.lastSubmittedValues||!Object.keys(E).some((function(w){return E[w].modifiedSinceLastSubmit}))),$.valid=!($.error||$.submitError||de($.errors)||$.submitErrors&&de($.submitErrors));var W=function convertToExternalFormState(w){var $=w.active,x=w.dirtySinceLastSubmit,E=w.modifiedSinceLastSubmit,C=w.error,k=w.errors,I=w.initialValues,R=w.pristine,D=w.submitting,W=w.submitFailed,V=w.submitSucceeded,G=w.submitError,K=w.submitErrors,J=w.valid,ie=w.validating,oe=w.values;return{active:$,dirty:!R,dirtySinceLastSubmit:x,modifiedSinceLastSubmit:E,error:C,errors:k,hasSubmitErrors:!!(G||K&&de(K)),hasValidationErrors:!(!C&&!de(k)),invalid:!J,initialValues:I,pristine:R,submitting:D,submitFailed:W,submitSucceeded:V,submitError:G,submitErrors:K,valid:J,validating:ie>0,values:oe}}($),V=C.reduce((function(w,$){return w.modified[$]=E[$].modified,w.touched[$]=E[$].touched,w.visited[$]=E[$].visited,w}),{modified:{},touched:{},visited:{}}),G=V.modified,ie=V.touched,oe=V.visited;return W.dirtyFields=x&&K(x.dirtyFields,I)?x.dirtyFields:I,W.dirtyFieldsSinceLastSubmit=x&&K(x.dirtyFieldsSinceLastSubmit,R)?x.dirtyFieldsSinceLastSubmit:R,W.modified=x&&K(x.modified,G)?x.modified:G,W.touched=x&&K(x.touched,ie)?x.touched:ie,W.visited=x&&K(x.visited,oe)?x.visited:oe,x&&K(x,W)?x:W},De=!1,Ue=!1,ze=function notifyFormListeners(){if(De)Ue=!0;else{if(De=!0,function callDebug(){$&&$(Le(),Object.keys(J.fields).reduce((function(w,$){return w[$]=J.fields[$],w}),{}))}(),!(oe||ue&&pe)){var w=J.lastFormState,x=Le();x!==w&&(J.lastFormState=x,notify(J.subscribers,x,w,filterFormState))}De=!1,Ue&&(Ue=!1,notifyFormListeners())}};Ie(void 0,(function(){ze()}));var He={batch:function batch(w){oe++,w(),oe--,Fe(),ze()},blur:function blur(w){var $=J.fields,x=J.formState,E=$[w];E&&(delete x.active,$[w]=_extends({},E,{active:!1,touched:!0}),G?Ie(w,(function(){Fe(),ze()})):(Fe(),ze()))},change:function change(w,$){var x=J.fields,E=J.formState;if(D(E.values,w)!==$){ge(J,w,(function(){return $}));var C=x[w];C&&(x[w]=_extends({},C,{modified:!0,modifiedSinceLastSubmit:!!E.lastSubmittedValues})),G?(Fe(),ze()):Ie(w,(function(){Fe(),ze()}))}},get destroyOnUnregister(){return!!x},set destroyOnUnregister(w){x=w},focus:function focus(w){var $=J.fields[w];$&&!$.active&&(J.formState.active=w,$.active=!0,$.visited=!0,Fe(),ze())},mutators:Ce,getFieldState:function getFieldState(w){var $=J.fields[w];return $&&$.lastFieldState},getRegisteredFields:function getRegisteredFields(){return Object.keys(J.fields)},getState:function getState(){return Le()},initialize:function initialize(w){var $=J.fields,x=J.formState,C=_extends({},$),k="function"==typeof w?w(x.values):w;E||(x.values=k);var I=E?Object.keys(C).reduce((function(w,$){return C[$].isEqual(D(x.values,$),D(x.initialValues||{},$))||(w[$]=D(x.values,$)),w}),{}):{};x.initialValues=k,x.values=k,Object.keys(I).forEach((function(w){x.values=W(x.values,w,I[w])})),Ie(void 0,(function(){Fe(),ze()}))},isValidationPaused:function isValidationPaused(){return ue},pauseValidation:function pauseValidation(w){void 0===w&&(w=!0),ue=!0,pe=w},registerField:function registerField(w,$,E,C){void 0===E&&(E={}),J.fieldSubscribers[w]||(J.fieldSubscribers[w]={index:0,entries:{}});var k=J.fieldSubscribers[w].index++;J.fieldSubscribers[w].entries[k]={subscriber:ae($),subscription:E,notified:!1},J.fields[w]||(J.fields[w]={active:!1,afterSubmit:C&&C.afterSubmit,beforeSubmit:C&&C.beforeSubmit,blur:function blur(){return He.blur(w)},change:function change($){return He.change(w,$)},data:C&&C.data||{},focus:function focus(){return He.focus(w)},isEqual:C&&C.isEqual||se,lastFieldState:void 0,modified:!1,modifiedSinceLastSubmit:!1,name:w,touched:!1,valid:!0,validateFields:C&&C.validateFields,validators:{},validating:!1,visited:!1});var I=!1,R=C&&C.silent,V=function notify(){R?Fe(w):(ze(),Fe())};if(C){I=!(!C.getValidator||!C.getValidator()),C.getValidator&&(J.fields[w].validators[k]=C.getValidator);var G=void 0===D(J.formState.values,w);void 0===C.initialValue||!G||void 0!==D(J.formState.values,w)&&D(J.formState.values,w)!==D(J.formState.initialValues,w)||(J.formState.initialValues=W(J.formState.initialValues||{},w,C.initialValue),J.formState.values=W(J.formState.values,w,C.initialValue),Ie(void 0,V)),void 0!==C.defaultValue&&void 0===C.initialValue&&void 0===D(J.formState.initialValues,w)&&G&&(J.formState.values=W(J.formState.values,w,C.defaultValue))}return I?Ie(void 0,V):V(),function(){var $=!1;J.fields[w]&&($=!(!J.fields[w].validators[k]||!J.fields[w].validators[k]()),delete J.fields[w].validators[k]);var E=!!J.fieldSubscribers[w];E&&delete J.fieldSubscribers[w].entries[k];var C=E&&!Object.keys(J.fieldSubscribers[w].entries).length;C&&(delete J.fieldSubscribers[w],delete J.fields[w],$&&(J.formState.errors=W(J.formState.errors,w,void 0)||{}),x&&(J.formState.values=W(J.formState.values,w,void 0,!0)||{})),R||($?Ie(void 0,(function(){ze(),Fe()})):C&&ze())}},reset:function reset(w){void 0===w&&(w=J.formState.initialValues),J.formState.submitting&&(J.formState.resetWhileSubmitting=!0),J.formState.submitFailed=!1,J.formState.submitSucceeded=!1,delete J.formState.submitError,delete J.formState.submitErrors,delete J.formState.lastSubmittedValues,He.initialize(w||{})},resetFieldState:function resetFieldState(w){J.fields[w]=_extends({},J.fields[w],{active:!1,lastFieldState:void 0,modified:!1,touched:!1,valid:!0,validating:!1,visited:!1}),Ie(void 0,(function(){Fe(),ze()}))},restart:function restart(w){void 0===w&&(w=J.formState.initialValues),He.batch((function(){for(var $ in J.fields)He.resetFieldState($),J.fields[$]=_extends({},J.fields[$],{active:!1,lastFieldState:void 0,modified:!1,modifiedSinceLastSubmit:!1,touched:!1,valid:!0,validating:!1,visited:!1});He.reset(w)}))},resumeValidation:function resumeValidation(){ue=!1,pe=!1,le&&Ie(void 0,(function(){Fe(),ze()})),le=!1},setConfig:function setConfig(w,C){switch(w){case"debug":$=C;break;case"destroyOnUnregister":x=C;break;case"initialValues":He.initialize(C);break;case"keepDirtyOnReinitialize":E=C;break;case"mutators":k=C,C?(Object.keys(Ce).forEach((function(w){w in C||delete Ce[w]})),Object.keys(C).forEach((function(w){Ce[w]=we(w)}))):Object.keys(Ce).forEach((function(w){delete Ce[w]}));break;case"onSubmit":I=C;break;case"validate":R=C,Ie(void 0,(function(){Fe(),ze()}));break;case"validateOnBlur":G=C;break;default:throw new Error("Unrecognised option "+w)}},submit:function submit(){var w=J.formState;if(!w.submitting){if(delete w.submitErrors,delete w.submitError,w.lastSubmittedValues=_extends({},w.values),function hasSyncErrors(){return!(!J.formState.error&&!de(J.formState.errors))}())return Re(),J.formState.submitFailed=!0,ze(),void Fe();var $=Object.keys(ve);if($.length)Promise.all($.map((function(w){return ve[Number(w)]}))).then(He.submit,console.error);else if(!function beforeSubmit(){return Object.keys(J.fields).some((function(w){return J.fields[w].beforeSubmit&&!1===J.fields[w].beforeSubmit()}))}()){var x,E=!1,C=function complete($){w.submitting=!1;var C=w.resetWhileSubmitting;return C&&(w.resetWhileSubmitting=!1),$&&de($)?(w.submitFailed=!0,w.submitSucceeded=!1,w.submitErrors=$,w.submitError=$["FINAL_FORM/form-error"],Re()):(C||(w.submitFailed=!1,w.submitSucceeded=!0),function afterSubmit(){Object.keys(J.fields).forEach((function(w){return J.fields[w].afterSubmit&&J.fields[w].afterSubmit()}))}()),ze(),Fe(),E=!0,x&&x($),$};w.submitting=!0,w.submitFailed=!1,w.submitSucceeded=!1,w.lastSubmittedValues=_extends({},w.values),function resetModifiedAfterSubmit(){Object.keys(J.fields).forEach((function(w){return J.fields[w].modifiedSinceLastSubmit=!1}))}();var k=I(w.values,He,C);if(!E){if(k&&isPromise(k))return ze(),Fe(),k.then(C,(function(w){throw C(),w}));if(I.length>=3)return ze(),Fe(),new Promise((function(w){x=w}));C(k)}}}},subscribe:function subscribe(w,$){if(!w)throw new Error("No callback given.");if(!$)throw new Error("No subscription provided. What values do you want to listen to?");var x=ae(w),E=J.subscribers,C=E.index++;E.entries[C]={subscriber:x,subscription:$,notified:!1};var k=Le();return notifySubscriber(x,$,k,k,filterFormState,!0),function(){delete E.entries[C]}}};return He}function renderComponent(w,$,x){var C=w.render,k=w.children,I=w.component,R=_objectWithoutPropertiesLoose(w,["render","children","component"]);if(I)return E.createElement(I,Object.assign($,R,{children:k,render:C}));if(C)return C(void 0===k?Object.assign($,R):Object.assign($,R,{children:k}));if("function"!=typeof k)throw new Error("Must specify either a render prop, a render function as children, or a component prop to "+x);return k(Object.assign($,R))}function useWhenValueChanges(w,$,x){void 0===x&&(x=function isEqual(w,$){return w===$});var E=C.a.useRef(w);C.a.useEffect((function(){x(w,E.current)||($(),E.current=w)}))}var le=function shallowEqual(w,$){if(w===$)return!0;if("object"!=typeof w||!w||"object"!=typeof $||!$)return!1;var x=Object.keys(w),E=Object.keys($);if(x.length!==E.length)return!1;for(var C=Object.prototype.hasOwnProperty.bind($),k=0;k component");return $}function useFormState(w){var $=void 0===w?{}:w,x=$.onChange,C=$.subscription,k=void 0===C?Ce:C,I=useForm("useFormState"),R=E.useRef(!0),D=E.useRef(x);D.current=x;var W=E.useState((function(){var w={};return I.subscribe((function($){w=$}),k)(),x&&x(w),w})),V=W[0],G=W[1];E.useEffect((function(){return I.subscribe((function(w){R.current?R.current=!1:(G(w),D.current&&D.current(w))}),k)}),[]);var K={};return Se(K,V),K}function FormSpy(w){var $=w.onChange,x=w.subscription,E=_objectWithoutPropertiesLoose(w,["onChange","subscription"]),C=useForm("FormSpy"),k=useFormState({onChange:$,subscription:x});if($)return null;var I={form:_extends({},C,{reset:function reset(w){pe(w)?C.reset():C.reset(w)}})};return renderComponent(_extends({},E,I),k,"FormSpy")}var Pe="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product,Ie=G.reduce((function(w,$){return w[$]=!0,w}),{}),Fe=function defaultFormat(w,$){return void 0===w?"":w},Re=function defaultParse(w,$){return""===w?void 0:w},Le=function defaultIsEqual(w,$){return w===$};function useField(w,$){void 0===$&&($={});var x=$,C=x.afterSubmit,k=x.allowNull,I=x.component,R=x.data,D=x.defaultValue,W=x.format,V=void 0===W?Fe:W,G=x.formatOnBlur,K=x.initialValue,J=x.multiple,ie=x.parse,oe=void 0===ie?Re:ie,ue=x.subscription,ae=void 0===ue?Ie:ue,se=x.type,de=x.validateFields,le=x.value,pe=useForm("useField"),he=useLatest($),ve=function register($,x){return pe.registerField(w,$,ae,{afterSubmit:C,beforeSubmit:function beforeSubmit(){var $=he.current,beforeSubmit=$.beforeSubmit,x=$.formatOnBlur,E=$.format,C=void 0===E?Fe:E;if(x){var k=pe.getFieldState(w).value,I=C(k,w);I!==k&&pe.change(w,I)}return beforeSubmit&&beforeSubmit()},data:R,defaultValue:D,getValidator:function getValidator(){return he.current.validate},initialValue:K,isEqual:function isEqual(w,$){return(he.current.isEqual||Le)(w,$)},silent:x,validateFields:de})},Se=E.useRef(!0),we=E.useState((function(){var w={},$=pe.destroyOnUnregister;return pe.destroyOnUnregister=!1,ve((function($){w=$}),!0)(),pe.destroyOnUnregister=$,w})),Ce=we[0],De=we[1];E.useEffect((function(){return ve((function(w){Se.current?Se.current=!1:De(w)}),!1)}),[w,R,D,K]);var Ue={onBlur:E.useCallback((function(w){if(Ce.blur(),G){var $=pe.getFieldState(Ce.name);Ce.change(V($.value,Ce.name))}}),[Ce.blur,Ce.name,V,G]),onChange:E.useCallback((function($){var x=$&&$.target?function getValue(w,$,x,E){if(!E&&w.nativeEvent&&void 0!==w.nativeEvent.text)return w.nativeEvent.text;if(E&&w.nativeEvent)return w.nativeEvent.text;var C=w.target,k=C.type,I=C.value,R=C.checked;switch(k){case"checkbox":if(void 0!==x){if(R)return Array.isArray($)?$.concat(x):[x];if(!Array.isArray($))return $;var D=$.indexOf(x);return D<0?$:$.slice(0,D).concat($.slice(D+1))}return!!R;case"select-multiple":return function getSelectedValues(w){var $=[];if(w)for(var x=0;x component");return renderComponent(_extends({children:I,component:R,ref:$},he),ve,"Field("+oe+")")}));function withTypes(){return{Form:ReactFinalForm,FormSpy:FormSpy}}},function(w,$,x){"use strict";x.d($,"b",(function(){return k})),x.d($,"a",(function(){return I}));var E=x(1),C=function(w){function QueueAction($,x){var E=w.call(this,$,x)||this;return E.scheduler=$,E.work=x,E}return E.__extends(QueueAction,w),QueueAction.prototype.schedule=function($,x){return void 0===x&&(x=0),x>0?w.prototype.schedule.call(this,$,x):(this.delay=x,this.state=$,this.scheduler.flush(this),this)},QueueAction.prototype.execute=function($,x){return x>0||this.closed?w.prototype.execute.call(this,$,x):this._execute($,x)},QueueAction.prototype.requestAsyncId=function($,x,E){return void 0===E&&(E=0),null!==E&&E>0||null===E&&this.delay>0?w.prototype.requestAsyncId.call(this,$,x,E):$.flush(this)},QueueAction}(x(36).a),k=new(function(w){function QueueScheduler(){return null!==w&&w.apply(this,arguments)||this}return E.__extends(QueueScheduler,w),QueueScheduler}(x(34).a))(C),I=k},function(w,$,x){"use strict";x.d($,"a",(function(){return E}));var E=function(){function Scheduler(w,$){void 0===$&&($=Scheduler.now),this.SchedulerAction=w,this.now=$}return Scheduler.prototype.schedule=function(w,$,x){return void 0===$&&($=0),new this.SchedulerAction(this,w).schedule(x,$)},Scheduler.now=function(){return Date.now()},Scheduler}()},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__read=function(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.useSelector=void 0;var k=__importStar(x(0)),I=x(68);$.useSelector=function useSelector(w){var $=I.useNeos(),x=__read(k.useState(w($.store.getState())),2),E=x[0],C=x[1];return k.useEffect((function(){return $.store.subscribe((function(){var x=$.store.getState(),E=w(x);C(E)}))}),[]),E}},function(w,$,x){var E=x(175),C=x(75),k=x(194),I=x(54).isError,R=k.sprintf;function parseConstructorArguments(w){var $,x,C,k;if(E.object(w,"args"),E.bool(w.strict,"args.strict"),E.array(w.argv,"args.argv"),0===($=w.argv).length)x={},C=[];else if(I($[0]))x={cause:$[0]},C=$.slice(1);else if("object"==typeof $[0]){for(k in x={},$[0])x[k]=$[0][k];C=$.slice(1)}else E.string($[0],"first argument to VError, SError, or WError constructor must be a string, object, or Error"),x={},C=$;return E.object(x),x.strict||w.strict||(C=C.map((function(w){return null===w?"null":void 0===w?"undefined":w}))),{options:x,shortmessage:0===C.length?"":R.apply(null,C)}}function VError(){var w,$,x,C,k,R,D;if(w=Array.prototype.slice.call(arguments,0),!(this instanceof VError))return $=Object.create(VError.prototype),VError.apply($,arguments),$;if((x=parseConstructorArguments({argv:w,strict:!1})).options.name&&(E.string(x.options.name,'error\'s "name" must be a string'),this.name=x.options.name),this.jse_shortmsg=x.shortmessage,R=x.shortmessage,(C=x.options.cause)&&(E.ok(I(C),"cause is not an Error"),this.jse_cause=C,x.options.skipCauseMessage||(R+=": "+C.message)),this.jse_info={},x.options.info)for(D in x.options.info)this.jse_info[D]=x.options.info[D];return this.message=R,Error.call(this,R),Error.captureStackTrace&&(k=x.options.constructorOpt||this.constructor,Error.captureStackTrace(this,k)),this}function SError(){var w,$,x,E;return w=Array.prototype.slice.call(arguments,0),this instanceof SError?(E=(x=parseConstructorArguments({argv:w,strict:!0})).options,VError.call(this,E,"%s",x.shortmessage),this):($=Object.create(SError.prototype),SError.apply($,arguments),$)}function MultiError(w){E.array(w,"list of errors"),E.ok(w.length>0,"must be at least one error"),this.ase_errors=w,VError.call(this,{cause:w[0]},"first of %d error%s",w.length,1==w.length?"":"s")}function WError(){var w,$,x,E;return w=Array.prototype.slice.call(arguments,0),this instanceof WError?((E=(x=parseConstructorArguments({argv:w,strict:!1})).options).skipCauseMessage=!0,VError.call(this,E,"%s",x.shortmessage),this):($=Object.create(WError.prototype),WError.apply($,w),$)}w.exports=VError,VError.VError=VError,VError.SError=SError,VError.WError=WError,VError.MultiError=MultiError,C.inherits(VError,Error),VError.prototype.name="VError",VError.prototype.toString=function ve_toString(){var w=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(w+=": "+this.message),w},VError.prototype.cause=function ve_cause(){var w=VError.cause(this);return null===w?void 0:w},VError.cause=function(w){return E.ok(I(w),"err must be an Error"),I(w.jse_cause)?w.jse_cause:null},VError.info=function(w){var $,x,C;if(E.ok(I(w),"err must be an Error"),$=null!==(x=VError.cause(w))?VError.info(x):{},"object"==typeof w.jse_info&&null!==w.jse_info)for(C in w.jse_info)$[C]=w.jse_info[C];return $},VError.findCauseByName=function(w,$){var x;for(E.ok(I(w),"err must be an Error"),E.string($,"name"),E.ok($.length>0,"name cannot be empty"),x=w;null!==x;x=VError.cause(x))if(E.ok(I(x)),x.name==$)return x;return null},VError.hasCauseWithName=function(w,$){return null!==VError.findCauseByName(w,$)},VError.fullStack=function(w){E.ok(I(w),"err must be an Error");var $=VError.cause(w);return $?w.stack+"\ncaused by: "+VError.fullStack($):w.stack},VError.errorFromList=function(w){return E.arrayOfObject(w,"errors"),0===w.length?null:(w.forEach((function(w){E.ok(I(w))})),1==w.length?w[0]:new MultiError(w))},VError.errorForEach=function(w,$){E.ok(I(w),"err must be an Error"),E.func($,"func"),w instanceof MultiError?w.errors().forEach((function iterError(w){$(w)})):$(w)},C.inherits(SError,VError),C.inherits(MultiError,VError),MultiError.prototype.name="MultiError",MultiError.prototype.errors=function me_errors(){return this.ase_errors.slice(0)},C.inherits(WError,VError),WError.prototype.name="WError",WError.prototype.toString=function we_toString(){var w=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(w+=": "+this.message),this.jse_cause&&this.jse_cause.message&&(w+="; caused by "+this.jse_cause.toString()),w},WError.prototype.cause=function we_cause(w){return I(w)&&(this.jse_cause=w),this.jse_cause}},function(w,$,x){"use strict";(function(w){var E=x(176),C=x(177),k=x(107);function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(w,$){if(kMaxLength()<$)throw new RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(w=new Uint8Array($)).__proto__=Buffer.prototype:(null===w&&(w=new Buffer($)),w.length=$),w}function Buffer(w,$,x){if(!(Buffer.TYPED_ARRAY_SUPPORT||this instanceof Buffer))return new Buffer(w,$,x);if("number"==typeof w){if("string"==typeof $)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,w)}return from(this,w,$,x)}function from(w,$,x,E){if("number"==typeof $)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&$ instanceof ArrayBuffer?function fromArrayBuffer(w,$,x,E){if($.byteLength,x<0||$.byteLength=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|w}function byteLength(w,$){if(Buffer.isBuffer(w))return w.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(w)||w instanceof ArrayBuffer))return w.byteLength;"string"!=typeof w&&(w=""+w);var x=w.length;if(0===x)return 0;for(var E=!1;;)switch($){case"ascii":case"latin1":case"binary":return x;case"utf8":case"utf-8":case void 0:return utf8ToBytes(w).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*x;case"hex":return x>>>1;case"base64":return base64ToBytes(w).length;default:if(E)return utf8ToBytes(w).length;$=(""+$).toLowerCase(),E=!0}}function slowToString(w,$,x){var E=!1;if((void 0===$||$<0)&&($=0),$>this.length)return"";if((void 0===x||x>this.length)&&(x=this.length),x<=0)return"";if((x>>>=0)<=($>>>=0))return"";for(w||(w="utf8");;)switch(w){case"hex":return hexSlice(this,$,x);case"utf8":case"utf-8":return utf8Slice(this,$,x);case"ascii":return asciiSlice(this,$,x);case"latin1":case"binary":return latin1Slice(this,$,x);case"base64":return base64Slice(this,$,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,$,x);default:if(E)throw new TypeError("Unknown encoding: "+w);w=(w+"").toLowerCase(),E=!0}}function swap(w,$,x){var E=w[$];w[$]=w[x],w[x]=E}function bidirectionalIndexOf(w,$,x,E,C){if(0===w.length)return-1;if("string"==typeof x?(E=x,x=0):x>2147483647?x=2147483647:x<-2147483648&&(x=-2147483648),x=+x,isNaN(x)&&(x=C?0:w.length-1),x<0&&(x=w.length+x),x>=w.length){if(C)return-1;x=w.length-1}else if(x<0){if(!C)return-1;x=0}if("string"==typeof $&&($=Buffer.from($,E)),Buffer.isBuffer($))return 0===$.length?-1:arrayIndexOf(w,$,x,E,C);if("number"==typeof $)return $&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?C?Uint8Array.prototype.indexOf.call(w,$,x):Uint8Array.prototype.lastIndexOf.call(w,$,x):arrayIndexOf(w,[$],x,E,C);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(w,$,x,E,C){var k,I=1,R=w.length,D=$.length;if(void 0!==E&&("ucs2"===(E=String(E).toLowerCase())||"ucs-2"===E||"utf16le"===E||"utf-16le"===E)){if(w.length<2||$.length<2)return-1;I=2,R/=2,D/=2,x/=2}function read(w,$){return 1===I?w[$]:w.readUInt16BE($*I)}if(C){var W=-1;for(k=x;kR&&(x=R-D),k=x;k>=0;k--){for(var V=!0,G=0;GC&&(E=C):E=C;var k=$.length;if(k%2!=0)throw new TypeError("Invalid hex string");E>k/2&&(E=k/2);for(var I=0;I>8,C=x%256,k.push(C),k.push(E);return k}($,w.length-x),w,x,E)}function base64Slice(w,$,x){return 0===$&&x===w.length?E.fromByteArray(w):E.fromByteArray(w.slice($,x))}function utf8Slice(w,$,x){x=Math.min(w.length,x);for(var E=[],C=$;C239?4:W>223?3:W>191?2:1;if(C+G<=x)switch(G){case 1:W<128&&(V=W);break;case 2:128==(192&(k=w[C+1]))&&(D=(31&W)<<6|63&k)>127&&(V=D);break;case 3:k=w[C+1],I=w[C+2],128==(192&k)&&128==(192&I)&&(D=(15&W)<<12|(63&k)<<6|63&I)>2047&&(D<55296||D>57343)&&(V=D);break;case 4:k=w[C+1],I=w[C+2],R=w[C+3],128==(192&k)&&128==(192&I)&&128==(192&R)&&(D=(15&W)<<18|(63&k)<<12|(63&I)<<6|63&R)>65535&&D<1114112&&(V=D)}null===V?(V=65533,G=1):V>65535&&(V-=65536,E.push(V>>>10&1023|55296),V=56320|1023&V),E.push(V),C+=G}return function decodeCodePointsArray(w){var $=w.length;if($<=4096)return String.fromCharCode.apply(String,w);var x="",E=0;for(;E<$;)x+=String.fromCharCode.apply(String,w.slice(E,E+=4096));return x}(E)}$.Buffer=Buffer,$.SlowBuffer=function SlowBuffer(w){+w!=w&&(w=0);return Buffer.alloc(+w)},$.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==w.TYPED_ARRAY_SUPPORT?w.TYPED_ARRAY_SUPPORT:function typedArraySupport(){try{var w=new Uint8Array(1);return w.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===w.foo()&&"function"==typeof w.subarray&&0===w.subarray(1,1).byteLength}catch(w){return!1}}(),$.kMaxLength=kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(w){return w.__proto__=Buffer.prototype,w},Buffer.from=function(w,$,x){return from(null,w,$,x)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(w,$,x){return function alloc(w,$,x,E){return assertSize($),$<=0?createBuffer(w,$):void 0!==x?"string"==typeof E?createBuffer(w,$).fill(x,E):createBuffer(w,$).fill(x):createBuffer(w,$)}(null,w,$,x)},Buffer.allocUnsafe=function(w){return allocUnsafe(null,w)},Buffer.allocUnsafeSlow=function(w){return allocUnsafe(null,w)},Buffer.isBuffer=function isBuffer(w){return!(null==w||!w._isBuffer)},Buffer.compare=function compare(w,$){if(!Buffer.isBuffer(w)||!Buffer.isBuffer($))throw new TypeError("Arguments must be Buffers");if(w===$)return 0;for(var x=w.length,E=$.length,C=0,k=Math.min(x,E);C0&&(w=this.toString("hex",0,x).match(/.{2}/g).join(" "),this.length>x&&(w+=" ... ")),""},Buffer.prototype.compare=function compare(w,$,x,E,C){if(!Buffer.isBuffer(w))throw new TypeError("Argument must be a Buffer");if(void 0===$&&($=0),void 0===x&&(x=w?w.length:0),void 0===E&&(E=0),void 0===C&&(C=this.length),$<0||x>w.length||E<0||C>this.length)throw new RangeError("out of range index");if(E>=C&&$>=x)return 0;if(E>=C)return-1;if($>=x)return 1;if(this===w)return 0;for(var k=(C>>>=0)-(E>>>=0),I=(x>>>=0)-($>>>=0),R=Math.min(k,I),D=this.slice(E,C),W=w.slice($,x),V=0;VC)&&(x=C),w.length>0&&(x<0||$<0)||$>this.length)throw new RangeError("Attempt to write outside buffer bounds");E||(E="utf8");for(var k=!1;;)switch(E){case"hex":return hexWrite(this,w,$,x);case"utf8":case"utf-8":return utf8Write(this,w,$,x);case"ascii":return asciiWrite(this,w,$,x);case"latin1":case"binary":return latin1Write(this,w,$,x);case"base64":return base64Write(this,w,$,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,w,$,x);default:if(k)throw new TypeError("Unknown encoding: "+E);E=(""+E).toLowerCase(),k=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function asciiSlice(w,$,x){var E="";x=Math.min(w.length,x);for(var C=$;CE)&&(x=E);for(var C="",k=$;kx)throw new RangeError("Trying to access beyond buffer length")}function checkInt(w,$,x,E,C,k){if(!Buffer.isBuffer(w))throw new TypeError('"buffer" argument must be a Buffer instance');if($>C||$w.length)throw new RangeError("Index out of range")}function objectWriteUInt16(w,$,x,E){$<0&&($=65535+$+1);for(var C=0,k=Math.min(w.length-x,2);C>>8*(E?C:1-C)}function objectWriteUInt32(w,$,x,E){$<0&&($=4294967295+$+1);for(var C=0,k=Math.min(w.length-x,4);C>>8*(E?C:3-C)&255}function checkIEEE754(w,$,x,E,C,k){if(x+E>w.length)throw new RangeError("Index out of range");if(x<0)throw new RangeError("Index out of range")}function writeFloat(w,$,x,E,k){return k||checkIEEE754(w,0,x,4),C.write(w,$,x,E,23,4),x+4}function writeDouble(w,$,x,E,k){return k||checkIEEE754(w,0,x,8),C.write(w,$,x,E,52,8),x+8}Buffer.prototype.slice=function slice(w,$){var x,E=this.length;if((w=~~w)<0?(w+=E)<0&&(w=0):w>E&&(w=E),($=void 0===$?E:~~$)<0?($+=E)<0&&($=0):$>E&&($=E),$0&&(C*=256);)E+=this[w+--$]*C;return E},Buffer.prototype.readUInt8=function readUInt8(w,$){return $||checkOffset(w,1,this.length),this[w]},Buffer.prototype.readUInt16LE=function readUInt16LE(w,$){return $||checkOffset(w,2,this.length),this[w]|this[w+1]<<8},Buffer.prototype.readUInt16BE=function readUInt16BE(w,$){return $||checkOffset(w,2,this.length),this[w]<<8|this[w+1]},Buffer.prototype.readUInt32LE=function readUInt32LE(w,$){return $||checkOffset(w,4,this.length),(this[w]|this[w+1]<<8|this[w+2]<<16)+16777216*this[w+3]},Buffer.prototype.readUInt32BE=function readUInt32BE(w,$){return $||checkOffset(w,4,this.length),16777216*this[w]+(this[w+1]<<16|this[w+2]<<8|this[w+3])},Buffer.prototype.readIntLE=function readIntLE(w,$,x){w|=0,$|=0,x||checkOffset(w,$,this.length);for(var E=this[w],C=1,k=0;++k<$&&(C*=256);)E+=this[w+k]*C;return E>=(C*=128)&&(E-=Math.pow(2,8*$)),E},Buffer.prototype.readIntBE=function readIntBE(w,$,x){w|=0,$|=0,x||checkOffset(w,$,this.length);for(var E=$,C=1,k=this[w+--E];E>0&&(C*=256);)k+=this[w+--E]*C;return k>=(C*=128)&&(k-=Math.pow(2,8*$)),k},Buffer.prototype.readInt8=function readInt8(w,$){return $||checkOffset(w,1,this.length),128&this[w]?-1*(255-this[w]+1):this[w]},Buffer.prototype.readInt16LE=function readInt16LE(w,$){$||checkOffset(w,2,this.length);var x=this[w]|this[w+1]<<8;return 32768&x?4294901760|x:x},Buffer.prototype.readInt16BE=function readInt16BE(w,$){$||checkOffset(w,2,this.length);var x=this[w+1]|this[w]<<8;return 32768&x?4294901760|x:x},Buffer.prototype.readInt32LE=function readInt32LE(w,$){return $||checkOffset(w,4,this.length),this[w]|this[w+1]<<8|this[w+2]<<16|this[w+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(w,$){return $||checkOffset(w,4,this.length),this[w]<<24|this[w+1]<<16|this[w+2]<<8|this[w+3]},Buffer.prototype.readFloatLE=function readFloatLE(w,$){return $||checkOffset(w,4,this.length),C.read(this,w,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(w,$){return $||checkOffset(w,4,this.length),C.read(this,w,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(w,$){return $||checkOffset(w,8,this.length),C.read(this,w,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(w,$){return $||checkOffset(w,8,this.length),C.read(this,w,!1,52,8)},Buffer.prototype.writeUIntLE=function writeUIntLE(w,$,x,E){(w=+w,$|=0,x|=0,E)||checkInt(this,w,$,x,Math.pow(2,8*x)-1,0);var C=1,k=0;for(this[$]=255&w;++k=0&&(k*=256);)this[$+C]=w/k&255;return $+x},Buffer.prototype.writeUInt8=function writeUInt8(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(w=Math.floor(w)),this[$]=255&w,$+1},Buffer.prototype.writeUInt16LE=function writeUInt16LE(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[$]=255&w,this[$+1]=w>>>8):objectWriteUInt16(this,w,$,!0),$+2},Buffer.prototype.writeUInt16BE=function writeUInt16BE(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[$]=w>>>8,this[$+1]=255&w):objectWriteUInt16(this,w,$,!1),$+2},Buffer.prototype.writeUInt32LE=function writeUInt32LE(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[$+3]=w>>>24,this[$+2]=w>>>16,this[$+1]=w>>>8,this[$]=255&w):objectWriteUInt32(this,w,$,!0),$+4},Buffer.prototype.writeUInt32BE=function writeUInt32BE(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[$]=w>>>24,this[$+1]=w>>>16,this[$+2]=w>>>8,this[$+3]=255&w):objectWriteUInt32(this,w,$,!1),$+4},Buffer.prototype.writeIntLE=function writeIntLE(w,$,x,E){if(w=+w,$|=0,!E){var C=Math.pow(2,8*x-1);checkInt(this,w,$,x,C-1,-C)}var k=0,I=1,R=0;for(this[$]=255&w;++k>0)-R&255;return $+x},Buffer.prototype.writeIntBE=function writeIntBE(w,$,x,E){if(w=+w,$|=0,!E){var C=Math.pow(2,8*x-1);checkInt(this,w,$,x,C-1,-C)}var k=x-1,I=1,R=0;for(this[$+k]=255&w;--k>=0&&(I*=256);)w<0&&0===R&&0!==this[$+k+1]&&(R=1),this[$+k]=(w/I>>0)-R&255;return $+x},Buffer.prototype.writeInt8=function writeInt8(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(w=Math.floor(w)),w<0&&(w=255+w+1),this[$]=255&w,$+1},Buffer.prototype.writeInt16LE=function writeInt16LE(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[$]=255&w,this[$+1]=w>>>8):objectWriteUInt16(this,w,$,!0),$+2},Buffer.prototype.writeInt16BE=function writeInt16BE(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[$]=w>>>8,this[$+1]=255&w):objectWriteUInt16(this,w,$,!1),$+2},Buffer.prototype.writeInt32LE=function writeInt32LE(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[$]=255&w,this[$+1]=w>>>8,this[$+2]=w>>>16,this[$+3]=w>>>24):objectWriteUInt32(this,w,$,!0),$+4},Buffer.prototype.writeInt32BE=function writeInt32BE(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,4,2147483647,-2147483648),w<0&&(w=4294967295+w+1),Buffer.TYPED_ARRAY_SUPPORT?(this[$]=w>>>24,this[$+1]=w>>>16,this[$+2]=w>>>8,this[$+3]=255&w):objectWriteUInt32(this,w,$,!1),$+4},Buffer.prototype.writeFloatLE=function writeFloatLE(w,$,x){return writeFloat(this,w,$,!0,x)},Buffer.prototype.writeFloatBE=function writeFloatBE(w,$,x){return writeFloat(this,w,$,!1,x)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(w,$,x){return writeDouble(this,w,$,!0,x)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(w,$,x){return writeDouble(this,w,$,!1,x)},Buffer.prototype.copy=function copy(w,$,x,E){if(x||(x=0),E||0===E||(E=this.length),$>=w.length&&($=w.length),$||($=0),E>0&&E=this.length)throw new RangeError("sourceStart out of bounds");if(E<0)throw new RangeError("sourceEnd out of bounds");E>this.length&&(E=this.length),w.length-$=0;--C)w[C+$]=this[C+x];else if(k<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(C=0;C>>=0,x=void 0===x?this.length:x>>>0,w||(w=0),"number"==typeof w)for(k=$;k55295&&x<57344){if(!C){if(x>56319){($-=3)>-1&&k.push(239,191,189);continue}if(I+1===E){($-=3)>-1&&k.push(239,191,189);continue}C=x;continue}if(x<56320){($-=3)>-1&&k.push(239,191,189),C=x;continue}x=65536+(C-55296<<10|x-56320)}else C&&($-=3)>-1&&k.push(239,191,189);if(C=null,x<128){if(($-=1)<0)break;k.push(x)}else if(x<2048){if(($-=2)<0)break;k.push(x>>6|192,63&x|128)}else if(x<65536){if(($-=3)<0)break;k.push(x>>12|224,x>>6&63|128,63&x|128)}else{if(!(x<1114112))throw new Error("Invalid code point");if(($-=4)<0)break;k.push(x>>18|240,x>>12&63|128,x>>6&63|128,63&x|128)}}return k}function base64ToBytes(w){return E.toByteArray(function base64clean(w){if((w=function stringtrim(w){return w.trim?w.trim():w.replace(/^\s+|\s+$/g,"")}(w).replace(I,"")).length<2)return"";for(;w.length%4!=0;)w+="=";return w}(w))}function blitBuffer(w,$,x,E){for(var C=0;C=$.length||C>=w.length);++C)$[C+x]=w[C];return C}}).call(this,x(46))},function(w,$,x){(function(w){var E=Object.getOwnPropertyDescriptors||function getOwnPropertyDescriptors(w){for(var $=Object.keys(w),x={},E=0;E<$.length;E++)x[$[E]]=Object.getOwnPropertyDescriptor(w,$[E]);return x},C=/%[sdj%]/g;$.format=function(w){if(!isString(w)){for(var $=[],x=0;x=k)return w;switch(w){case"%s":return String(E[x++]);case"%d":return Number(E[x++]);case"%j":try{return JSON.stringify(E[x++])}catch(w){return"[Circular]"}default:return w}})),R=E[x];x=3&&(E.depth=arguments[2]),arguments.length>=4&&(E.colors=arguments[3]),isBoolean(x)?E.showHidden=x:x&&$._extend(E,x),isUndefined(E.showHidden)&&(E.showHidden=!1),isUndefined(E.depth)&&(E.depth=2),isUndefined(E.colors)&&(E.colors=!1),isUndefined(E.customInspect)&&(E.customInspect=!0),E.colors&&(E.stylize=stylizeWithColor),formatValue(E,w,E.depth)}function stylizeWithColor(w,$){var x=inspect.styles[$];return x?"["+inspect.colors[x][0]+"m"+w+"["+inspect.colors[x][1]+"m":w}function stylizeNoColor(w,$){return w}function formatValue(w,x,E){if(w.customInspect&&x&&isFunction(x.inspect)&&x.inspect!==$.inspect&&(!x.constructor||x.constructor.prototype!==x)){var C=x.inspect(E,w);return isString(C)||(C=formatValue(w,C,E)),C}var k=function formatPrimitive(w,$){if(isUndefined($))return w.stylize("undefined","undefined");if(isString($)){var x="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return w.stylize(x,"string")}if(isNumber($))return w.stylize(""+$,"number");if(isBoolean($))return w.stylize(""+$,"boolean");if(isNull($))return w.stylize("null","null")}(w,x);if(k)return k;var I=Object.keys(x),R=function arrayToHash(w){var $={};return w.forEach((function(w,x){$[w]=!0})),$}(I);if(w.showHidden&&(I=Object.getOwnPropertyNames(x)),isError(x)&&(I.indexOf("message")>=0||I.indexOf("description")>=0))return formatError(x);if(0===I.length){if(isFunction(x)){var D=x.name?": "+x.name:"";return w.stylize("[Function"+D+"]","special")}if(isRegExp(x))return w.stylize(RegExp.prototype.toString.call(x),"regexp");if(isDate(x))return w.stylize(Date.prototype.toString.call(x),"date");if(isError(x))return formatError(x)}var W,V="",G=!1,K=["{","}"];(isArray(x)&&(G=!0,K=["[","]"]),isFunction(x))&&(V=" [Function"+(x.name?": "+x.name:"")+"]");return isRegExp(x)&&(V=" "+RegExp.prototype.toString.call(x)),isDate(x)&&(V=" "+Date.prototype.toUTCString.call(x)),isError(x)&&(V=" "+formatError(x)),0!==I.length||G&&0!=x.length?E<0?isRegExp(x)?w.stylize(RegExp.prototype.toString.call(x),"regexp"):w.stylize("[Object]","special"):(w.seen.push(x),W=G?function formatArray(w,$,x,E,C){for(var k=[],I=0,R=$.length;I=0&&0,w+$.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return x[0]+(""===$?"":$+"\n ")+" "+w.join(",\n ")+" "+x[1];return x[0]+$+" "+w.join(", ")+" "+x[1]}(W,V,K)):K[0]+V+K[1]}function formatError(w){return"["+Error.prototype.toString.call(w)+"]"}function formatProperty(w,$,x,E,C,k){var I,R,D;if((D=Object.getOwnPropertyDescriptor($,C)||{value:$[C]}).get?R=D.set?w.stylize("[Getter/Setter]","special"):w.stylize("[Getter]","special"):D.set&&(R=w.stylize("[Setter]","special")),hasOwnProperty(E,C)||(I="["+C+"]"),R||(w.seen.indexOf(D.value)<0?(R=isNull(x)?formatValue(w,D.value,null):formatValue(w,D.value,x-1)).indexOf("\n")>-1&&(R=k?R.split("\n").map((function(w){return" "+w})).join("\n").substr(2):"\n"+R.split("\n").map((function(w){return" "+w})).join("\n")):R=w.stylize("[Circular]","special")),isUndefined(I)){if(k&&C.match(/^\d+$/))return R;(I=JSON.stringify(""+C)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(I=I.substr(1,I.length-2),I=w.stylize(I,"name")):(I=I.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),I=w.stylize(I,"string"))}return I+": "+R}function isArray(w){return Array.isArray(w)}function isBoolean(w){return"boolean"==typeof w}function isNull(w){return null===w}function isNumber(w){return"number"==typeof w}function isString(w){return"string"==typeof w}function isUndefined(w){return void 0===w}function isRegExp(w){return isObject(w)&&"[object RegExp]"===objectToString(w)}function isObject(w){return"object"==typeof w&&null!==w}function isDate(w){return isObject(w)&&"[object Date]"===objectToString(w)}function isError(w){return isObject(w)&&("[object Error]"===objectToString(w)||w instanceof Error)}function isFunction(w){return"function"==typeof w}function objectToString(w){return Object.prototype.toString.call(w)}function pad(w){return w<10?"0"+w.toString(10):w.toString(10)}$.debuglog=function(x){if(isUndefined(k)&&(k=w.env.NODE_DEBUG||""),x=x.toUpperCase(),!I[x])if(new RegExp("\\b"+x+"\\b","i").test(k)){var E=w.pid;I[x]=function(){var w=$.format.apply($,arguments);console.error("%s %d: %s",x,E,w)}}else I[x]=function(){};return I[x]},$.inspect=inspect,inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},$.isArray=isArray,$.isBoolean=isBoolean,$.isNull=isNull,$.isNullOrUndefined=function isNullOrUndefined(w){return null==w},$.isNumber=isNumber,$.isString=isString,$.isSymbol=function isSymbol(w){return"symbol"==typeof w},$.isUndefined=isUndefined,$.isRegExp=isRegExp,$.isObject=isObject,$.isDate=isDate,$.isError=isError,$.isFunction=isFunction,$.isPrimitive=function isPrimitive(w){return null===w||"boolean"==typeof w||"number"==typeof w||"string"==typeof w||"symbol"==typeof w||void 0===w},$.isBuffer=x(179);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var w=new Date,$=[pad(w.getHours()),pad(w.getMinutes()),pad(w.getSeconds())].join(":");return[w.getDate(),R[w.getMonth()],$].join(" ")}function hasOwnProperty(w,$){return Object.prototype.hasOwnProperty.call(w,$)}$.log=function(){console.log("%s - %s",timestamp(),$.format.apply($,arguments))},$.inherits=x(180),$._extend=function(w,$){if(!$||!isObject($))return w;for(var x=Object.keys($),E=x.length;E--;)w[x[E]]=$[x[E]];return w};var D="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function callbackifyOnRejected(w,$){if(!w){var x=new Error("Promise was rejected with a falsy value");x.reason=w,w=x}return $(w)}$.promisify=function promisify(w){if("function"!=typeof w)throw new TypeError('The "original" argument must be of type Function');if(D&&w[D]){var $;if("function"!=typeof($=w[D]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty($,D,{value:$,enumerable:!1,writable:!1,configurable:!0}),$}function $(){for(var $,x,E=new Promise((function(w,E){$=w,x=E})),C=[],k=0;k1&&"number"==typeof w[w.length-1]&&(x=w.pop())):"number"==typeof D&&(x=w.pop()),null===R&&1===w.length&&w[0]instanceof E.a?w[0]:Object(k.a)(x)(Object(I.a)(w,R))}},function(w,$,x){"use strict";x.d($,"a",(function(){return race}));var E=x(1),C=x(9),k=x(33),I=x(21),R=x(18);function race(){for(var w=[],$=0;$0&&I.length>C&&!I.warned){I.warned=!0;var R=new Error("Possible EventEmitter memory leak detected. "+I.length+" "+String($)+" listeners added. Use emitter.setMaxListeners() to increase limit");R.name="MaxListenersExceededWarning",R.emitter=w,R.type=$,R.count=I.length,function ProcessEmitWarning(w){console&&console.warn&&console.warn(w)}(R)}return w}function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(w,$,x){var E={fired:!1,wrapFn:void 0,target:w,type:$,listener:x},C=onceWrapper.bind(E);return C.listener=x,E.wrapFn=C,C}function _listeners(w,$,x){var E=w._events;if(void 0===E)return[];var C=E[$];return void 0===C?[]:"function"==typeof C?x?[C.listener||C]:[C]:x?function unwrapListeners(w){for(var $=new Array(w.length),x=0;x<$.length;++x)$[x]=w[x].listener||w[x];return $}(C):arrayClone(C,C.length)}function listenerCount(w){var $=this._events;if(void 0!==$){var x=$[w];if("function"==typeof x)return 1;if(void 0!==x)return x.length}return 0}function arrayClone(w,$){for(var x=new Array($),E=0;E<$;++E)x[E]=w[E];return x}function eventTargetAgnosticAddListener(w,$,x,E){if("function"==typeof w.on)E.once?w.once($,x):w.on($,x);else{if("function"!=typeof w.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof w);w.addEventListener($,(function wrapListener(C){E.once&&w.removeEventListener($,wrapListener),x(C)}))}}Object.defineProperty(EventEmitter,"defaultMaxListeners",{enumerable:!0,get:function(){return R},set:function(w){if("number"!=typeof w||w<0||I(w))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+w+".");R=w}}),EventEmitter.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},EventEmitter.prototype.setMaxListeners=function setMaxListeners(w){if("number"!=typeof w||w<0||I(w))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+w+".");return this._maxListeners=w,this},EventEmitter.prototype.getMaxListeners=function getMaxListeners(){return _getMaxListeners(this)},EventEmitter.prototype.emit=function emit(w){for(var $=[],x=1;x0&&(I=$[0]),I instanceof Error)throw I;var R=new Error("Unhandled error."+(I?" ("+I.message+")":""));throw R.context=I,R}var D=C[w];if(void 0===D)return!1;if("function"==typeof D)k(D,this,$);else{var W=D.length,V=arrayClone(D,W);for(x=0;x=0;k--)if(x[k]===$||x[k].listener===$){I=x[k].listener,C=k;break}if(C<0)return this;0===C?x.shift():function spliceOne(w,$){for(;$+1=0;E--)this.removeListener(w,$[E]);return this},EventEmitter.prototype.listeners=function listeners(w){return _listeners(this,w,!0)},EventEmitter.prototype.rawListeners=function rawListeners(w){return _listeners(this,w,!1)},EventEmitter.listenerCount=function(w,$){return"function"==typeof w.listenerCount?w.listenerCount($):listenerCount.call(w,$)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?E(this._events):[]}},function(w,$,x){($=w.exports=x(109)).Stream=$,$.Readable=$,$.Writable=x(97),$.Duplex=x(47),$.Transform=x(113),$.PassThrough=x(189)},function(w,$,x){var E=x(74),C=E.Buffer;function copyProps(w,$){for(var x in w)$[x]=w[x]}function SafeBuffer(w,$,x){return C(w,$,x)}C.from&&C.alloc&&C.allocUnsafe&&C.allocUnsafeSlow?w.exports=E:(copyProps(E,$),$.Buffer=SafeBuffer),copyProps(C,SafeBuffer),SafeBuffer.from=function(w,$,x){if("number"==typeof w)throw new TypeError("Argument must not be a number");return C(w,$,x)},SafeBuffer.alloc=function(w,$,x){if("number"!=typeof w)throw new TypeError("Argument must be a number");var E=C(w);return void 0!==$?"string"==typeof x?E.fill($,x):E.fill($):E.fill(0),E},SafeBuffer.allocUnsafe=function(w){if("number"!=typeof w)throw new TypeError("Argument must be a number");return C(w)},SafeBuffer.allocUnsafeSlow=function(w){if("number"!=typeof w)throw new TypeError("Argument must be a number");return E.SlowBuffer(w)}},function(w,$,x){"use strict";(function($,E,C){var k=x(76);function CorkedRequest(w){var $=this;this.next=null,this.entry=null,this.finish=function(){!function onCorkedFinish(w,$,x){var E=w.entry;w.entry=null;for(;E;){var C=E.callback;$.pendingcb--,C(x),E=E.next}$.corkedRequestsFree?$.corkedRequestsFree.next=w:$.corkedRequestsFree=w}($,w)}}w.exports=Writable;var I,R=!$.browser&&["v0.10","v0.9."].indexOf($.version.slice(0,5))>-1?E:k.nextTick;Writable.WritableState=WritableState;var D=Object.create(x(54));D.inherits=x(53);var W={deprecate:x(187)},V=x(110),G=x(96).Buffer,K=C.Uint8Array||function(){};var J,ie=x(111);function nop(){}function WritableState(w,$){I=I||x(47),w=w||{};var E=$ instanceof I;this.objectMode=!!w.objectMode,E&&(this.objectMode=this.objectMode||!!w.writableObjectMode);var C=w.highWaterMark,D=w.writableHighWaterMark,W=this.objectMode?16:16384;this.highWaterMark=C||0===C?C:E&&(D||0===D)?D:W,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var V=!1===w.decodeStrings;this.decodeStrings=!V,this.defaultEncoding=w.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(w){!function onwrite(w,$){var x=w._writableState,E=x.sync,C=x.writecb;if(function onwriteStateUpdate(w){w.writing=!1,w.writecb=null,w.length-=w.writelen,w.writelen=0}(x),$)!function onwriteError(w,$,x,E,C){--$.pendingcb,x?(k.nextTick(C,E),k.nextTick(finishMaybe,w,$),w._writableState.errorEmitted=!0,w.emit("error",E)):(C(E),w._writableState.errorEmitted=!0,w.emit("error",E),finishMaybe(w,$))}(w,x,E,$,C);else{var I=needFinish(x);I||x.corked||x.bufferProcessing||!x.bufferedRequest||clearBuffer(w,x),E?R(afterWrite,w,x,I,C):afterWrite(w,x,I,C)}}($,w)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(w){if(I=I||x(47),!(J.call(Writable,this)||this instanceof I))return new Writable(w);this._writableState=new WritableState(w,this),this.writable=!0,w&&("function"==typeof w.write&&(this._write=w.write),"function"==typeof w.writev&&(this._writev=w.writev),"function"==typeof w.destroy&&(this._destroy=w.destroy),"function"==typeof w.final&&(this._final=w.final)),V.call(this)}function doWrite(w,$,x,E,C,k,I){$.writelen=E,$.writecb=I,$.writing=!0,$.sync=!0,x?w._writev(C,$.onwrite):w._write(C,k,$.onwrite),$.sync=!1}function afterWrite(w,$,x,E){x||function onwriteDrain(w,$){0===$.length&&$.needDrain&&($.needDrain=!1,w.emit("drain"))}(w,$),$.pendingcb--,E(),finishMaybe(w,$)}function clearBuffer(w,$){$.bufferProcessing=!0;var x=$.bufferedRequest;if(w._writev&&x&&x.next){var E=$.bufferedRequestCount,C=new Array(E),k=$.corkedRequestsFree;k.entry=x;for(var I=0,R=!0;x;)C[I]=x,x.isBuf||(R=!1),x=x.next,I+=1;C.allBuffers=R,doWrite(w,$,!0,$.length,C,"",k.finish),$.pendingcb++,$.lastBufferedRequest=null,k.next?($.corkedRequestsFree=k.next,k.next=null):$.corkedRequestsFree=new CorkedRequest($),$.bufferedRequestCount=0}else{for(;x;){var D=x.chunk,W=x.encoding,V=x.callback;if(doWrite(w,$,!1,$.objectMode?1:D.length,D,W,V),x=x.next,$.bufferedRequestCount--,$.writing)break}null===x&&($.lastBufferedRequest=null)}$.bufferedRequest=x,$.bufferProcessing=!1}function needFinish(w){return w.ending&&0===w.length&&null===w.bufferedRequest&&!w.finished&&!w.writing}function callFinal(w,$){w._final((function(x){$.pendingcb--,x&&w.emit("error",x),$.prefinished=!0,w.emit("prefinish"),finishMaybe(w,$)}))}function finishMaybe(w,$){var x=needFinish($);return x&&(!function prefinish(w,$){$.prefinished||$.finalCalled||("function"==typeof w._final?($.pendingcb++,$.finalCalled=!0,k.nextTick(callFinal,w,$)):($.prefinished=!0,w.emit("prefinish")))}(w,$),0===$.pendingcb&&($.finished=!0,w.emit("finish"))),x}D.inherits(Writable,V),WritableState.prototype.getBuffer=function getBuffer(){for(var w=this.bufferedRequest,$=[];w;)$.push(w),w=w.next;return $},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:W.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(w){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(J=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(w){return!!J.call(this,w)||this===Writable&&(w&&w._writableState instanceof WritableState)}})):J=function(w){return w instanceof this},Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Writable.prototype.write=function(w,$,x){var E=this._writableState,C=!1,I=!E.objectMode&&function _isUint8Array(w){return G.isBuffer(w)||w instanceof K}(w);return I&&!G.isBuffer(w)&&(w=function _uint8ArrayToBuffer(w){return G.from(w)}(w)),"function"==typeof $&&(x=$,$=null),I?$="buffer":$||($=E.defaultEncoding),"function"!=typeof x&&(x=nop),E.ended?function writeAfterEnd(w,$){var x=new Error("write after end");w.emit("error",x),k.nextTick($,x)}(this,x):(I||function validChunk(w,$,x,E){var C=!0,I=!1;return null===x?I=new TypeError("May not write null values to stream"):"string"==typeof x||void 0===x||$.objectMode||(I=new TypeError("Invalid non-string/buffer chunk")),I&&(w.emit("error",I),k.nextTick(E,I),C=!1),C}(this,E,w,x))&&(E.pendingcb++,C=function writeOrBuffer(w,$,x,E,C,k){if(!x){var I=function decodeChunk(w,$,x){w.objectMode||!1===w.decodeStrings||"string"!=typeof $||($=G.from($,x));return $}($,E,C);E!==I&&(x=!0,C="buffer",E=I)}var R=$.objectMode?1:E.length;$.length+=R;var D=$.length<$.highWaterMark;D||($.needDrain=!0);if($.writing||$.corked){var W=$.lastBufferedRequest;$.lastBufferedRequest={chunk:E,encoding:C,isBuf:x,callback:k,next:null},W?W.next=$.lastBufferedRequest:$.bufferedRequest=$.lastBufferedRequest,$.bufferedRequestCount+=1}else doWrite(w,$,!1,R,E,C,k);return D}(this,E,I,w,$,x)),C},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var w=this._writableState;w.corked&&(w.corked--,w.writing||w.corked||w.finished||w.bufferProcessing||!w.bufferedRequest||clearBuffer(this,w))},Writable.prototype.setDefaultEncoding=function setDefaultEncoding(w){if("string"==typeof w&&(w=w.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((w+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+w);return this._writableState.defaultEncoding=w,this},Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(w,$,x){x(new Error("_write() is not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(w,$,x){var E=this._writableState;"function"==typeof w?(x=w,w=null,$=null):"function"==typeof $&&(x=$,$=null),null!=w&&this.write(w,$),E.corked&&(E.corked=1,this.uncork()),E.ending||E.finished||function endWritable(w,$,x){$.ending=!0,finishMaybe(w,$),x&&($.finished?k.nextTick(x):w.once("finish",x));$.ended=!0,w.writable=!1}(this,E,x)},Object.defineProperty(Writable.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(w){this._writableState&&(this._writableState.destroyed=w)}}),Writable.prototype.destroy=ie.destroy,Writable.prototype._undestroy=ie.undestroy,Writable.prototype._destroy=function(w,$){this.end(),$(w)}}).call(this,x(44),x(185).setImmediate,x(46))},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.getTree=$.getNodeTypeFilterOptions=$.getChildrenForTreeNode=void 0;var E=x(221);Object.defineProperty($,"getChildrenForTreeNode",{enumerable:!0,get:function get(){return E.getChildrenForTreeNode}});var C=x(222);Object.defineProperty($,"getNodeTypeFilterOptions",{enumerable:!0,get:function get(){return C.getNodeTypeFilterOptions}});var k=x(223);Object.defineProperty($,"getTree",{enumerable:!0,get:function get(){return k.getTree}})},function(w,$,x){"use strict";w.exports=x(169)},function(w,$,x){"use strict";var E=x(170),C={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},k={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},I={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},R={};function getStatics(w){return E.isMemo(w)?I:R[w.$$typeof]||C}R[E.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},R[E.Memo]=I;var D=Object.defineProperty,W=Object.getOwnPropertyNames,V=Object.getOwnPropertySymbols,G=Object.getOwnPropertyDescriptor,K=Object.getPrototypeOf,J=Object.prototype;w.exports=function hoistNonReactStatics(w,$,x){if("string"!=typeof $){if(J){var E=K($);E&&E!==J&&hoistNonReactStatics(w,E,x)}var C=W($);V&&(C=C.concat(V($)));for(var I=getStatics(w),R=getStatics($),ie=0;ie15,isFn=function(w){return"function"==typeof w};$.default=function(w,$){for(var x=[],I=2;I=0;W--)if(G[W]!==K[W])return!1;for(W=G.length-1;W>=0;W--)if(D=G[W],!_deepEqual(w[D],$[D],x,E))return!1;return!0}(w,$,x,E))}return x?w===$:w==$}function isArguments(w){return"[object Arguments]"==Object.prototype.toString.call(w)}function expectedException(w,$){if(!w||!$)return!1;if("[object RegExp]"==Object.prototype.toString.call($))return $.test(w);try{if(w instanceof $)return!0}catch(w){}return!Error.isPrototypeOf($)&&!0===$.call({},w)}function _throws(w,$,x,E){var k;if("function"!=typeof $)throw new TypeError('"block" argument must be a function');"string"==typeof x&&(E=x,x=null),k=function _tryBlock(w){var $;try{w()}catch(w){$=w}return $}($),E=(x&&x.name?" ("+x.name+").":".")+(E?" "+E:"."),w&&!k&&fail(k,x,"Missing expected exception"+E);var I="string"==typeof E,R=!w&&k&&!x;if((!w&&C.isError(k)&&I&&expectedException(k,x)||R)&&fail(k,x,"Got unwanted exception"+E),w&&k&&x&&!expectedException(k,x)||!w&&k)throw k}D.AssertionError=function AssertionError(w){this.name="AssertionError",this.actual=w.actual,this.expected=w.expected,this.operator=w.operator,w.message?(this.message=w.message,this.generatedMessage=!1):(this.message=function getMessage(w){return truncate(inspect(w.actual),128)+" "+w.operator+" "+truncate(inspect(w.expected),128)}(this),this.generatedMessage=!0);var $=w.stackStartFunction||fail;if(Error.captureStackTrace)Error.captureStackTrace(this,$);else{var x=new Error;if(x.stack){var E=x.stack,C=getName($),k=E.indexOf("\n"+C);if(k>=0){var I=E.indexOf("\n",k+1);E=E.substring(I+1)}this.stack=E}}},C.inherits(D.AssertionError,Error),D.fail=fail,D.ok=ok,D.equal=function equal(w,$,x){w!=$&&fail(w,$,x,"==",D.equal)},D.notEqual=function notEqual(w,$,x){w==$&&fail(w,$,x,"!=",D.notEqual)},D.deepEqual=function deepEqual(w,$,x){_deepEqual(w,$,!1)||fail(w,$,x,"deepEqual",D.deepEqual)},D.deepStrictEqual=function deepStrictEqual(w,$,x){_deepEqual(w,$,!0)||fail(w,$,x,"deepStrictEqual",D.deepStrictEqual)},D.notDeepEqual=function notDeepEqual(w,$,x){_deepEqual(w,$,!1)&&fail(w,$,x,"notDeepEqual",D.notDeepEqual)},D.notDeepStrictEqual=function notDeepStrictEqual(w,$,x){_deepEqual(w,$,!0)&&fail(w,$,x,"notDeepStrictEqual",notDeepStrictEqual)},D.strictEqual=function strictEqual(w,$,x){w!==$&&fail(w,$,x,"===",D.strictEqual)},D.notStrictEqual=function notStrictEqual(w,$,x){w===$&&fail(w,$,x,"!==",D.notStrictEqual)},D.throws=function(w,$,x){_throws(!0,w,$,x)},D.doesNotThrow=function(w,$,x){_throws(!1,w,$,x)},D.ifError=function(w){if(w)throw w},D.strict=E((function strict(w,$){w||fail(w,!0,$,"==",strict)}),D,{equal:D.strictEqual,deepEqual:D.deepStrictEqual,notEqual:D.notStrictEqual,notDeepEqual:D.notDeepStrictEqual}),D.strict.strict=D.strict;var V=Object.keys||function(w){var $=[];for(var x in w)k.call(w,x)&&$.push(x);return $}}).call(this,x(46))},function(w,$,x){"use strict";(function($,E){var C=x(76);w.exports=Readable;var k,I=x(107);Readable.ReadableState=ReadableState;x(94).EventEmitter;var EElistenerCount=function(w,$){return w.listeners($).length},R=x(110),D=x(96).Buffer,W=$.Uint8Array||function(){};var V=Object.create(x(54));V.inherits=x(53);var G=x(182),K=void 0;K=G&&G.debuglog?G.debuglog("stream"):function(){};var J,ie=x(183),oe=x(111);V.inherits(Readable,R);var ue=["error","close","destroy","pause","resume"];function ReadableState(w,$){w=w||{};var E=$ instanceof(k=k||x(47));this.objectMode=!!w.objectMode,E&&(this.objectMode=this.objectMode||!!w.readableObjectMode);var C=w.highWaterMark,I=w.readableHighWaterMark,R=this.objectMode?16:16384;this.highWaterMark=C||0===C?C:E&&(I||0===I)?I:R,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new ie,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=w.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,w.encoding&&(J||(J=x(112).StringDecoder),this.decoder=new J(w.encoding),this.encoding=w.encoding)}function Readable(w){if(k=k||x(47),!(this instanceof Readable))return new Readable(w);this._readableState=new ReadableState(w,this),this.readable=!0,w&&("function"==typeof w.read&&(this._read=w.read),"function"==typeof w.destroy&&(this._destroy=w.destroy)),R.call(this)}function readableAddChunk(w,$,x,E,C){var k,I=w._readableState;null===$?(I.reading=!1,function onEofChunk(w,$){if($.ended)return;if($.decoder){var x=$.decoder.end();x&&x.length&&($.buffer.push(x),$.length+=$.objectMode?1:x.length)}$.ended=!0,emitReadable(w)}(w,I)):(C||(k=function chunkInvalid(w,$){var x;(function _isUint8Array(w){return D.isBuffer(w)||w instanceof W})($)||"string"==typeof $||void 0===$||w.objectMode||(x=new TypeError("Invalid non-string/buffer chunk"));return x}(I,$)),k?w.emit("error",k):I.objectMode||$&&$.length>0?("string"==typeof $||I.objectMode||Object.getPrototypeOf($)===D.prototype||($=function _uint8ArrayToBuffer(w){return D.from(w)}($)),E?I.endEmitted?w.emit("error",new Error("stream.unshift() after end event")):addChunk(w,I,$,!0):I.ended?w.emit("error",new Error("stream.push() after EOF")):(I.reading=!1,I.decoder&&!x?($=I.decoder.write($),I.objectMode||0!==$.length?addChunk(w,I,$,!1):maybeReadMore(w,I)):addChunk(w,I,$,!1))):E||(I.reading=!1));return function needMoreData(w){return!w.ended&&(w.needReadable||w.length$.highWaterMark&&($.highWaterMark=function computeNewHighWaterMark(w){return w>=8388608?w=8388608:(w--,w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,w|=w>>>16,w++),w}(w)),w<=$.length?w:$.ended?$.length:($.needReadable=!0,0))}function emitReadable(w){var $=w._readableState;$.needReadable=!1,$.emittedReadable||(K("emitReadable",$.flowing),$.emittedReadable=!0,$.sync?C.nextTick(emitReadable_,w):emitReadable_(w))}function emitReadable_(w){K("emit readable"),w.emit("readable"),flow(w)}function maybeReadMore(w,$){$.readingMore||($.readingMore=!0,C.nextTick(maybeReadMore_,w,$))}function maybeReadMore_(w,$){for(var x=$.length;!$.reading&&!$.flowing&&!$.ended&&$.length<$.highWaterMark&&(K("maybeReadMore read 0"),w.read(0),x!==$.length);)x=$.length;$.readingMore=!1}function nReadingNextTick(w){K("readable nexttick read 0"),w.read(0)}function resume_(w,$){$.reading||(K("resume read 0"),w.read(0)),$.resumeScheduled=!1,$.awaitDrain=0,w.emit("resume"),flow(w),$.flowing&&!$.reading&&w.read(0)}function flow(w){var $=w._readableState;for(K("flow",$.flowing);$.flowing&&null!==w.read(););}function fromList(w,$){return 0===$.length?null:($.objectMode?x=$.buffer.shift():!w||w>=$.length?(x=$.decoder?$.buffer.join(""):1===$.buffer.length?$.buffer.head.data:$.buffer.concat($.length),$.buffer.clear()):x=function fromListPartial(w,$,x){var E;w<$.head.data.length?(E=$.head.data.slice(0,w),$.head.data=$.head.data.slice(w)):E=w===$.head.data.length?$.shift():x?function copyFromBufferString(w,$){var x=$.head,E=1,C=x.data;w-=C.length;for(;x=x.next;){var k=x.data,I=w>k.length?k.length:w;if(I===k.length?C+=k:C+=k.slice(0,w),0===(w-=I)){I===k.length?(++E,x.next?$.head=x.next:$.head=$.tail=null):($.head=x,x.data=k.slice(I));break}++E}return $.length-=E,C}(w,$):function copyFromBuffer(w,$){var x=D.allocUnsafe(w),E=$.head,C=1;E.data.copy(x),w-=E.data.length;for(;E=E.next;){var k=E.data,I=w>k.length?k.length:w;if(k.copy(x,x.length-w,0,I),0===(w-=I)){I===k.length?(++C,E.next?$.head=E.next:$.head=$.tail=null):($.head=E,E.data=k.slice(I));break}++C}return $.length-=C,x}(w,$);return E}(w,$.buffer,$.decoder),x);var x}function endReadable(w){var $=w._readableState;if($.length>0)throw new Error('"endReadable()" called on non-empty stream');$.endEmitted||($.ended=!0,C.nextTick(endReadableNT,$,w))}function endReadableNT(w,$){w.endEmitted||0!==w.length||(w.endEmitted=!0,$.readable=!1,$.emit("end"))}function indexOf(w,$){for(var x=0,E=w.length;x=$.highWaterMark||$.ended))return K("read: emitReadable",$.length,$.ended),0===$.length&&$.ended?endReadable(this):emitReadable(this),null;if(0===(w=howMuchToRead(w,$))&&$.ended)return 0===$.length&&endReadable(this),null;var E,C=$.needReadable;return K("need readable",C),(0===$.length||$.length-w<$.highWaterMark)&&K("length less than watermark",C=!0),$.ended||$.reading?K("reading or ended",C=!1):C&&(K("do read"),$.reading=!0,$.sync=!0,0===$.length&&($.needReadable=!0),this._read($.highWaterMark),$.sync=!1,$.reading||(w=howMuchToRead(x,$))),null===(E=w>0?fromList(w,$):null)?($.needReadable=!0,w=0):$.length-=w,0===$.length&&($.ended||($.needReadable=!0),x!==w&&$.ended&&endReadable(this)),null!==E&&this.emit("data",E),E},Readable.prototype._read=function(w){this.emit("error",new Error("_read() is not implemented"))},Readable.prototype.pipe=function(w,$){var x=this,k=this._readableState;switch(k.pipesCount){case 0:k.pipes=w;break;case 1:k.pipes=[k.pipes,w];break;default:k.pipes.push(w)}k.pipesCount+=1,K("pipe count=%d opts=%j",k.pipesCount,$);var R=(!$||!1!==$.end)&&w!==E.stdout&&w!==E.stderr?onend:unpipe;function onunpipe($,E){K("onunpipe"),$===x&&E&&!1===E.hasUnpiped&&(E.hasUnpiped=!0,function cleanup(){K("cleanup"),w.removeListener("close",onclose),w.removeListener("finish",onfinish),w.removeListener("drain",D),w.removeListener("error",onerror),w.removeListener("unpipe",onunpipe),x.removeListener("end",onend),x.removeListener("end",unpipe),x.removeListener("data",ondata),W=!0,!k.awaitDrain||w._writableState&&!w._writableState.needDrain||D()}())}function onend(){K("onend"),w.end()}k.endEmitted?C.nextTick(R):x.once("end",R),w.on("unpipe",onunpipe);var D=function pipeOnDrain(w){return function(){var $=w._readableState;K("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,0===$.awaitDrain&&EElistenerCount(w,"data")&&($.flowing=!0,flow(w))}}(x);w.on("drain",D);var W=!1;var V=!1;function ondata($){K("ondata"),V=!1,!1!==w.write($)||V||((1===k.pipesCount&&k.pipes===w||k.pipesCount>1&&-1!==indexOf(k.pipes,w))&&!W&&(K("false write response, pause",x._readableState.awaitDrain),x._readableState.awaitDrain++,V=!0),x.pause())}function onerror($){K("onerror",$),unpipe(),w.removeListener("error",onerror),0===EElistenerCount(w,"error")&&w.emit("error",$)}function onclose(){w.removeListener("finish",onfinish),unpipe()}function onfinish(){K("onfinish"),w.removeListener("close",onclose),unpipe()}function unpipe(){K("unpipe"),x.unpipe(w)}return x.on("data",ondata),function prependListener(w,$,x){if("function"==typeof w.prependListener)return w.prependListener($,x);w._events&&w._events[$]?I(w._events[$])?w._events[$].unshift(x):w._events[$]=[x,w._events[$]]:w.on($,x)}(w,"error",onerror),w.once("close",onclose),w.once("finish",onfinish),w.emit("pipe",x),k.flowing||(K("pipe resume"),x.resume()),w},Readable.prototype.unpipe=function(w){var $=this._readableState,x={hasUnpiped:!1};if(0===$.pipesCount)return this;if(1===$.pipesCount)return w&&w!==$.pipes||(w||(w=$.pipes),$.pipes=null,$.pipesCount=0,$.flowing=!1,w&&w.emit("unpipe",this,x)),this;if(!w){var E=$.pipes,C=$.pipesCount;$.pipes=null,$.pipesCount=0,$.flowing=!1;for(var k=0;k>5==6?2:w>>4==14?3:w>>3==30?4:w>>6==2?-1:-2}function utf8FillLast(w){var $=this.lastTotal-this.lastNeed,x=function utf8CheckExtraBytes(w,$,x){if(128!=(192&$[0]))return w.lastNeed=0,"�";if(w.lastNeed>1&&$.length>1){if(128!=(192&$[1]))return w.lastNeed=1,"�";if(w.lastNeed>2&&$.length>2&&128!=(192&$[2]))return w.lastNeed=2,"�"}}(this,w);return void 0!==x?x:this.lastNeed<=w.length?(w.copy(this.lastChar,$,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(w.copy(this.lastChar,$,0,w.length),void(this.lastNeed-=w.length))}function utf16Text(w,$){if((w.length-$)%2==0){var x=w.toString("utf16le",$);if(x){var E=x.charCodeAt(x.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1],x.slice(0,-1)}return x}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=w[w.length-1],w.toString("utf16le",$,w.length-1)}function utf16End(w){var $=w&&w.length?this.write(w):"";if(this.lastNeed){var x=this.lastTotal-this.lastNeed;return $+this.lastChar.toString("utf16le",0,x)}return $}function base64Text(w,$){var x=(w.length-$)%3;return 0===x?w.toString("base64",$):(this.lastNeed=3-x,this.lastTotal=3,1===x?this.lastChar[0]=w[w.length-1]:(this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1]),w.toString("base64",$,w.length-x))}function base64End(w){var $=w&&w.length?this.write(w):"";return this.lastNeed?$+this.lastChar.toString("base64",0,3-this.lastNeed):$}function simpleWrite(w){return w.toString(this.encoding)}function simpleEnd(w){return w&&w.length?this.write(w):""}$.StringDecoder=StringDecoder,StringDecoder.prototype.write=function(w){if(0===w.length)return"";var $,x;if(this.lastNeed){if(void 0===($=this.fillLast(w)))return"";x=this.lastNeed,this.lastNeed=0}else x=0;return x=0)return C>0&&(w.lastNeed=C-1),C;if(--E=0)return C>0&&(w.lastNeed=C-2),C;if(--E=0)return C>0&&(2===C?C=0:w.lastNeed=C-3),C;return 0}(this,w,$);if(!this.lastNeed)return w.toString("utf8",$);this.lastTotal=x;var E=w.length-(x-this.lastNeed);return w.copy(this.lastChar,0,E),w.toString("utf8",$,E)},StringDecoder.prototype.fillLast=function(w){if(this.lastNeed<=w.length)return w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,w.length),this.lastNeed-=w.length}},function(w,$,x){"use strict";w.exports=Transform;var E=x(47),C=Object.create(x(54));function afterTransform(w,$){var x=this._transformState;x.transforming=!1;var E=x.writecb;if(!E)return this.emit("error",new Error("write callback called multiple times"));x.writechunk=null,x.writecb=null,null!=$&&this.push($),E(w);var C=this._readableState;C.reading=!1,(C.needReadable||C.length>>0).toString(36)}(x.stringify(w))},selector:function(w,$){return w+(":"===$[0]?"":" ")+$},putRaw:function(w){x.raw+=w}},w);return x.client&&(x.sh||document.head.appendChild(x.sh=document.createElement("style")),x.putRaw=function(w){var $=x.sh.sheet;try{$.insertRule(w,$.cssRules.length)}catch(w){}}),x.put=function(w,$,E){var C,k,I="",R=[];for(C in $)(k=$[C])instanceof Object&&!(k instanceof Array)?R.push(C):I+=x.decl(C,k,w,E);I&&(I=w+"{"+I+"}",x.putRaw(E?E+"{"+I+"}":I));for(var D=0;D-1,W=x.split(",");if(D)for(var V=0;VE&&(E=($=$.trim()).charCodeAt(0)),E){case 38:return $.replace(R,"$1"+w.trim());case 58:return w.trim()+$.replace(R,"$1"+w.trim());default:if(0<1*x&&0<$.indexOf("\f"))return $.replace(R,(58===w.charCodeAt(0)?"":"$1")+w.trim())}return w+$}function P(w,$,x,I){var R=w+";",D=2*$+3*x+4*I;if(944===D){w=R.indexOf(":",9)+1;var W=R.substring(w,R.length-1).trim();return W=R.substring(0,w).trim()+W+";",1===pe||2===pe&&L(W,1)?"-webkit-"+W+W:W}if(0===pe||2===pe&&!L(R,1))return R;switch(D){case 1015:return 97===R.charCodeAt(10)?"-webkit-"+R+R:R;case 951:return 116===R.charCodeAt(3)?"-webkit-"+R+R:R;case 963:return 110===R.charCodeAt(5)?"-webkit-"+R+R:R;case 1009:if(100!==R.charCodeAt(4))break;case 969:case 942:return"-webkit-"+R+R;case 978:return"-webkit-"+R+"-moz-"+R+R;case 1019:case 983:return"-webkit-"+R+"-moz-"+R+"-ms-"+R+R;case 883:if(45===R.charCodeAt(8))return"-webkit-"+R+R;if(0W.charCodeAt(8))break;case 115:R=R.replace(W,"-webkit-"+W)+";"+R;break;case 207:case 102:R=R.replace(W,"-webkit-"+(102C.charCodeAt(0)&&(C=C.trim()),C=[C],0R)&&(De=(He=He.replace(" ",":")).length),0=0)){if(Pe.push(w),ve[w]){var R=Ie(ve[w],!0);try{for(var D=E.__values(R),W=D.next();!W.done;W=D.next()){var V=W.value;addToResults(ve[w][V],$)}}catch(w){x={error:w}}finally{try{W&&!W.done&&(C=D.return)&&C.call(D)}finally{if(x)throw x.error}}}if($.push(w),ge[w]){var G=Ie(ge[w],!1);try{for(var K=E.__values(G),J=K.next();!J.done;J=K.next()){V=J.value;addToResults(ge[w][V],$)}}catch(w){k={error:w}}finally{try{J&&!J.done&&(I=K.return)&&I.call(K)}finally{if(k)throw k.error}}}}}))};try{for(var Re=E.__values(Ie(pe,!1)),Le=Re.next();!Le.done;Le=Re.next()){var De=Le.value;Fe(pe[De],Se)}}catch(w){C={error:w}}finally{try{Le&&!Le.done&&(k=Re.return)&&k.call(Re)}finally{if(C)throw C.error}}try{for(var Ue=E.__values(Ie(le,!0)),ze=Ue.next();!ze.done;ze=Ue.next()){De=ze.value;Fe(le[De],we)}}catch(w){I={error:w}}finally{try{ze&&!ze.done&&(R=Ue.return)&&R.call(Ue)}finally{if(I)throw I.error}}try{for(var He=E.__values(Ie(he,!0)),Ke=He.next();!Ke.done;Ke=He.next()){De=Ke.value;Fe(he[De],Ce)}}catch(w){D={error:w}}finally{try{Ke&&!Ke.done&&(W=He.return)&&W.call(He)}finally{if(D)throw D.error}}try{for(var Ze=E.__values(Object.keys(ve)),Qe=Ze.next();!Qe.done;Qe=Ze.next()){var et=Qe.value;if(!(Pe.indexOf(et)>=0))try{for(var tt=(K=void 0,E.__values(Ie(ve[et],!1))),rt=tt.next();!rt.done;rt=tt.next()){De=rt.value;Fe(ve[et][De],Se)}}catch(w){K={error:w}}finally{try{rt&&!rt.done&&(J=tt.return)&&J.call(tt)}finally{if(K)throw K.error}}}}catch(w){V={error:w}}finally{try{Qe&&!Qe.done&&(G=Ze.return)&&G.call(Ze)}finally{if(V)throw V.error}}try{for(var nt=E.__values(Object.keys(ge)),it=nt.next();!it.done;it=nt.next()){et=it.value;if(!(Pe.indexOf(et)>=0))try{for(var ot=(ue=void 0,E.__values(Ie(ge[et],!1))),ut=ot.next();!ut.done;ut=ot.next()){De=ut.value;Fe(ge[et][De],we)}}catch(w){ue={error:w}}finally{try{ut&&!ut.done&&(ae=ot.return)&&ae.call(ot)}finally{if(ue)throw ue.error}}}}catch(w){ie={error:w}}finally{try{it&&!it.done&&(oe=nt.return)&&oe.call(nt)}finally{if(ie)throw ie.error}}return E.__spread(Se,we,Ce).map((function(w){return de[w]})).map((function($){return w[$]}))}},function(w,$,x){"use strict";$.__esModule=!0;var E=x(1),C=function(w){function SynchronousMetaRegistry(){return null!==w&&w.apply(this,arguments)||this}return E.__extends(SynchronousMetaRegistry,w),SynchronousMetaRegistry.prototype.set=function($,x){if("d8a5aa78-978e-11e6-ae22-56b6b6499611"!==x.SERIAL_VERSION_UID)throw new Error("You can only add registries to a meta registry");return w.prototype.set.call(this,$,x)},SynchronousMetaRegistry}(E.__importDefault(x(103)).default);$.default=C},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.registerDialog=$.registerLinkTypes=void 0;var E=x(140);Object.defineProperty($,"registerLinkTypes",{enumerable:!0,get:function get(){return E.registerLinkTypes}});var C=x(239);Object.defineProperty($,"registerDialog",{enumerable:!0,get:function get(){return C.registerDialog}})},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.registerLinkTypes=void 0;var E=x(102),C=x(141),k=x(208),I=x(230),R=x(233),D=x(235),W=x(237);$.registerLinkTypes=function registerLinkTypes(w){var $=new E.SynchronousRegistry("\n # Sitegeist.Archaeopteryx LinkType Registry\n ");$.set(k.Node.id,k.Node),$.set(I.Asset.id,I.Asset),$.set(C.Web.id,C.Web),$.set(R.MailTo.id,R.MailTo),$.set(D.PhoneNumber.id,D.PhoneNumber),$.set(W.CustomLink.id,W.CustomLink),w.set("@sitegeist/archaeopteryx/link-types",$)}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.Web=void 0;var E=x(142);Object.defineProperty($,"Web",{enumerable:!0,get:function get(){return E.Web}})},function(w,$,x){"use strict";var __assign=function(){return(__assign=Object.assign||function(w){for(var $,x=1,E=arguments.length;x0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.Web=void 0;var k=__importStar(x(0)),I=x(0),R=x(69),D=x(16),W=x(12),V=x(43),G=x(30),K=x(38);function removeHttp(w){return w.replace(/^https?:\/\//,"")}$.Web=G.makeLinkType("Sitegeist.Archaeopteryx:Web",(function(w){var $=w.createError;return{supportedLinkOptions:["anchor","title","targetBlank","relNofollow"],isSuitableFor:function isSuitableFor(w){var $=w.href.startsWith("http://"),x=w.href.startsWith("https://");return $||x},useResolvedModel:function useResolvedModel(w){var x=w.href.match(/^(https?):\/\/(.*)$/);if(x){var E=__read(x,3),C=E[1],k=E[2];return V.Process.success({protocol:C,urlWithoutProtocol:k})}return V.Process.error($('Cannot handle href "'+w.href+'".'))},convertModelToLink:function convertModelToLink(w){return{href:w.protocol+"://"+removeHttp(w.urlWithoutProtocol)}},TabHeader:function TabHeader(){var w=W.useI18n();return k.createElement(K.IconLabel,{icon:"globe"},w("Sitegeist.Archaeopteryx:LinkTypes.Web:title"))},Preview:function Preview(w){var $=w.model;return k.createElement(K.IconCard,{icon:"external-link",title:$.protocol+"://"+removeHttp($.urlWithoutProtocol)})},Editor:function Editor(w){var $,x=w.model,E=__read(I.useState(""),2),C=E[0],G=E[1],K=W.useI18n();return k.createElement("div",null,k.createElement("label",{htmlFor:"linkTypeProps.Sitegeist_Archaeopteryx:Web.urlWithoutProtocol"},K("Sitegeist.Archaeopteryx:LinkTypes.Web:label.link"),":"),k.createElement("div",{style:{display:"grid",gridTemplateColumns:"160px 1fr",minWidth:"600px"}},k.createElement(V.Field,{name:"protocol",format:function format(w){return void 0===w&&""===w||G(w),void 0===w&&R.useForm().change("linkTypeProps.Sitegeist_Archaeopteryx:Web.protocol",C),w},initialValue:null!==($=null==x?void 0:x.protocol)&&void 0!==$?$:"https",validate:function validate(w){if(!w)return K("Sitegeist.Archaeopteryx:LinkTypes.Web:protocol.validation.required")}},(function(w){var $=w.input;return k.createElement(D.SelectBox,{onValueChange:$.onChange,allowEmpty:!1,value:$.value,options:[{value:"https",label:"HTTPS",icon:"lock"},{value:"http",label:"HTTP",icon:"unlock"}]})})),k.createElement(V.Field,{name:"urlWithoutProtocol",initialValue:null==x?void 0:x.urlWithoutProtocol,format:function format(w){var $=null==w?void 0:w.match(/^(https?):\/\/(.*)$/);return $?__read($,3)[2]:w},parse:function parse(w){var $=null==w?void 0:w.match(/^(https?):\/\/(.*)$/);if($){var x=__read($,3),E=x[1],C=x[2];return R.useForm().change("linkTypeProps.Sitegeist_Archaeopteryx:Web.protocol",E),C}return w},validate:function validate(w){if(!w)return K("Sitegeist.Archaeopteryx:LinkTypes.Web:urlWithoutProtocol.validation.required")}},(function(w){var $=w.input;return k.createElement(D.TextInput,__assign({id:$.name,type:"text",placeholder:K("Sitegeist.Archaeopteryx:LinkTypes.Web:urlWithoutProtocol.placeholder")},$))}))))}}}))},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.fetchWithErrorHandling=void 0;var E=x(144);Object.defineProperty($,"fetchWithErrorHandling",{enumerable:!0,get:function get(){return E.fetchWithErrorHandling}})},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.fetchWithErrorHandling=void 0;var E=x(104);$.fetchWithErrorHandling=E.fetchWithErrorHandling},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.useAssetSummary=$.useI18n=$.useSelector=$.useRoutes=$.useConfiguration=$.useGlobalRegistry=$.useNeos=$.NeosContext=$.usePersonalWorkspaceName=$.useDimensionValues=$.useDocumentNodeContextPath=$.useSiteNodeContextPath=$.ContextPath=void 0;var E=x(146);Object.defineProperty($,"ContextPath",{enumerable:!0,get:function get(){return E.ContextPath}}),Object.defineProperty($,"useSiteNodeContextPath",{enumerable:!0,get:function get(){return E.useSiteNodeContextPath}}),Object.defineProperty($,"useDocumentNodeContextPath",{enumerable:!0,get:function get(){return E.useDocumentNodeContextPath}}),Object.defineProperty($,"useDimensionValues",{enumerable:!0,get:function get(){return E.useDimensionValues}}),Object.defineProperty($,"usePersonalWorkspaceName",{enumerable:!0,get:function get(){return E.usePersonalWorkspaceName}});var C=x(150);Object.defineProperty($,"NeosContext",{enumerable:!0,get:function get(){return C.NeosContext}}),Object.defineProperty($,"useNeos",{enumerable:!0,get:function get(){return C.useNeos}}),Object.defineProperty($,"useGlobalRegistry",{enumerable:!0,get:function get(){return C.useGlobalRegistry}}),Object.defineProperty($,"useConfiguration",{enumerable:!0,get:function get(){return C.useConfiguration}}),Object.defineProperty($,"useRoutes",{enumerable:!0,get:function get(){return C.useRoutes}}),Object.defineProperty($,"useSelector",{enumerable:!0,get:function get(){return C.useSelector}}),Object.defineProperty($,"useI18n",{enumerable:!0,get:function get(){return C.useI18n}});var k=x(154);Object.defineProperty($,"useAssetSummary",{enumerable:!0,get:function get(){return k.useAssetSummary}})},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.usePersonalWorkspaceName=$.useDimensionValues=$.useDocumentNodeContextPath=$.useSiteNodeContextPath=$.ContextPath=void 0;var E=x(147);Object.defineProperty($,"ContextPath",{enumerable:!0,get:function get(){return E.ContextPath}}),Object.defineProperty($,"useSiteNodeContextPath",{enumerable:!0,get:function get(){return E.useSiteNodeContextPath}}),Object.defineProperty($,"useDocumentNodeContextPath",{enumerable:!0,get:function get(){return E.useDocumentNodeContextPath}});var C=x(148);Object.defineProperty($,"useDimensionValues",{enumerable:!0,get:function get(){return C.useDimensionValues}});var k=x(149);Object.defineProperty($,"usePersonalWorkspaceName",{enumerable:!0,get:function get(){return k.usePersonalWorkspaceName}})},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__read=function(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I},__values=function(w){var $="function"==typeof Symbol&&Symbol.iterator,x=$&&w[$],E=0;if(x)return x.call(w);if(w&&"number"==typeof w.length)return{next:function next(){return w&&E>=w.length&&(w=void 0),{value:w&&w[E++],done:!w}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty($,"__esModule",{value:!0}),$.useDocumentNodeContextPath=$.useSiteNodeContextPath=$.ContextPath=void 0;var k=__importStar(x(0)),I=x(72),R=function(){function ContextPath(w,$){this.path=w,this.context=$}return ContextPath.fromString=function(w){var $=__read((null!=w?w:"").split("@"),2),x=$[0],E=$[1];return x&&w?new ContextPath(x,E):null},ContextPath.prototype.adopt=function(w){var $=__read((null!=w?w:"").split("@"),1)[0];return $?new ContextPath($,this.context):null},ContextPath.prototype.getIntermediateContextPaths=function(w){var $,x;if(w.path.startsWith(this.path)){var E=w.path.split("/"),C=[];try{for(var k=__values(E.entries()),I=k.next();!I.done;I=k.next()){var R=__read(I.value,1)[0],D=E.slice(0,-R).join("/");if(D&&C.push(new ContextPath(D,this.context)),D===this.path)break}}catch(w){$={error:w}}finally{try{I&&!I.done&&(x=k.return)&&x.call(k)}finally{if($)throw $.error}}return C}return[]},ContextPath.prototype.equals=function(w){return this.path===w.path&&this.context===w.context},ContextPath.prototype.toString=function(){return this.path+"@"+this.context},Object.defineProperty(ContextPath.prototype,"depth",{get:function get(){var w,$;return null!==($=null===(w=this.path.match(/\//g))||void 0===w?void 0:w.length)&&void 0!==$?$:0},enumerable:!1,configurable:!0}),ContextPath}();$.ContextPath=R,$.useSiteNodeContextPath=function useSiteNodeContextPath(){var w=I.useSelector((function(w){var $,x;return null===(x=null===($=w.cr)||void 0===$?void 0:$.nodes)||void 0===x?void 0:x.siteNode}));return k.useMemo((function(){return w?R.fromString(w):null}),[w])},$.useDocumentNodeContextPath=function useDocumentNodeContextPath(){var w=I.useSelector((function(w){var $,x;return null===(x=null===($=w.cr)||void 0===$?void 0:$.nodes)||void 0===x?void 0:x.documentNode}));return k.useMemo((function(){return w?R.fromString(w):null}),[w])}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.useDimensionValues=void 0;var E=x(72);$.useDimensionValues=function useDimensionValues(){var w=E.useSelector((function(w){var $,x;return null===(x=null===($=w.cr)||void 0===$?void 0:$.contentDimensions)||void 0===x?void 0:x.active}));return null!=w?w:null}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.usePersonalWorkspaceName=void 0;var E=x(72);$.usePersonalWorkspaceName=function usePersonalWorkspaceName(){var w=E.useSelector((function(w){var $,x,E;return null===(E=null===(x=null===($=w.cr)||void 0===$?void 0:$.workspaces)||void 0===x?void 0:x.personalWorkspace)||void 0===E?void 0:E.name}));return null!=w?w:null}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.useI18n=$.useSelector=$.useNeos=$.NeosContext=$.useRoutes=$.useConfiguration=$.useGlobalRegistry=void 0;var E=x(105);Object.defineProperty($,"useGlobalRegistry",{enumerable:!0,get:function get(){return E.useGlobalRegistry}});var C=x(151);Object.defineProperty($,"useConfiguration",{enumerable:!0,get:function get(){return C.useConfiguration}});var k=x(152);Object.defineProperty($,"useRoutes",{enumerable:!0,get:function get(){return k.useRoutes}});var I=x(68);Object.defineProperty($,"NeosContext",{enumerable:!0,get:function get(){return I.NeosContext}}),Object.defineProperty($,"useNeos",{enumerable:!0,get:function get(){return I.useNeos}});var R=x(72);Object.defineProperty($,"useSelector",{enumerable:!0,get:function get(){return R.useSelector}});var D=x(153);Object.defineProperty($,"useI18n",{enumerable:!0,get:function get(){return D.useI18n}})},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.useConfiguration=void 0;var E=x(68);$.useConfiguration=function useConfiguration(w){var $=E.useNeos();return w?w($.configuration):$.configuration}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.useRoutes=void 0;var E=x(68);$.useRoutes=function useRoutes(w){var $=E.useNeos();if($.routes)return w?w($.routes):$.routes}},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.useI18n=void 0;var k=__importStar(x(0)),I=x(105);$.useI18n=function useI18n(){var w=I.useGlobalRegistry().get("i18n");return k.useMemo((function(){return function($,x,E,C,k,I){return void 0===E&&(E={}),void 0===C&&(C="Neos.Neos"),void 0===k&&(k="Main"),void 0===I&&(I=0),w.translate($,x,E,C,k,I)}}),[w])}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.useAssetSummary=void 0;var E=x(155);Object.defineProperty($,"useAssetSummary",{enumerable:!0,get:function get(){return E.useAssetSummary}})},function(w,$,x){"use strict";var __awaiter=function(w,$,x,E){return new(x||(x=Promise))((function(C,k){function fulfilled(w){try{step(E.next(w))}catch(w){k(w)}}function rejected(w){try{step(E.throw(w))}catch(w){k(w)}}function step(w){w.done?C(w.value):function adopt(w){return w instanceof x?w:new x((function($){$(w)}))}(w.value).then(fulfilled,rejected)}step((E=E.apply(w,$||[])).next())}))},__generator=function(w,$){var x,E,C,k,I={label:0,sent:function sent(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return k={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k;function verb(k){return function(R){return function step(k){if(x)throw new TypeError("Generator is already executing.");for(;I;)try{if(x=1,E&&(C=2&k[0]?E.return:k[0]?E.throw||((C=E.return)&&C.call(E),0):E.next)&&!(C=C.call(E,k[1])).done)return C;switch(E=0,C&&(k=[2&k[0],C.value]),k[0]){case 0:case 1:C=k;break;case 4:return I.label++,{value:k[1],done:!1};case 5:I.label++,E=k[1],k=[0];continue;case 7:k=I.ops.pop(),I.trys.pop();continue;default:if(!(C=I.trys,(C=C.length>0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]=0;){if(E[$]===w){x.deleteRule($);break}$--}}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.divWrapper=void 0;var E=x(5),C=E.__importStar(x(0)),k=E.__importDefault(x(159)),I=C.createElement,noWrap=function(w,$,x,C){var k;return I(w,$?E.__assign(((k={})[$]=C,k),x):E.__assign(E.__assign({},C),x))};$.divWrapper=function(w,$,x,E){return I("div",null,noWrap(w,$,x,E))};$.default=function(w,$,x){void 0===x&&(x=noWrap);var enhancer=function(E,C,R){void 0===C&&(C=$),void 0===R&&(R=null);var D="string"==typeof E;if(D)return function(w){return enhancer(w,E||$,C)};var Enhanced=function($){return I(w,R,(function(w){return x(E,C,$,w)}))};return D?k.default(Enhanced):Enhanced};return enhancer}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0});var E=x(5).__importDefault(x(160));$.default=function(w){return!w.prototype?E.default(w):w}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0});var E=x(5),C=E.__importStar(x(0));$.default=function(w){return function($){function class_1(){return null!==$&&$.apply(this,arguments)||this}return E.__extends(class_1,$),class_1.prototype.render=function(){return w(this.props,this.context)},class_1}(C.Component)}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0});var E=x(5).__importDefault(x(106)),defaultMapPropsToArgs=function(w){return[w]};$.default=function(w,$){return void 0===$&&($=defaultMapPropsToArgs),function(x){return E.default(x,w.apply(void 0,$(x)))}}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.endpoints=void 0;var E=x(163);Object.defineProperty($,"endpoints",{enumerable:!0,get:function get(){return E.endpoints}})},function(w,$,x){"use strict";var __importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.endpoints=void 0;var E=__importDefault(x(104));$.endpoints=function endpoints(){return E.default.get().endpoints}},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.Process=void 0,$.Process=__importStar(x(165))},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.fromAsyncState=$.success=$.error=$.busy=void 0;var E={busy:!0,error:null,result:null};$.busy=function busy(){return E},$.error=function error(w){return{busy:!1,error:w,result:null}},$.success=function success(w){return{busy:!1,error:null,result:w}},$.fromAsyncState=function fromAsyncState(w){var $,x;return{busy:w.loading,error:null!==($=w.error)&&void 0!==$?$:null,result:null!==(x=w.value)&&void 0!==x?x:null}}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.EditorEnvelope=$.FieldGroup=$.Field=void 0;var E=x(167);Object.defineProperty($,"Field",{enumerable:!0,get:function get(){return E.Field}}),Object.defineProperty($,"FieldGroup",{enumerable:!0,get:function get(){return E.FieldGroup}});var C=x(168);Object.defineProperty($,"EditorEnvelope",{enumerable:!0,get:function get(){return C.EditorEnvelope}})},function(w,$,x){"use strict";var __assign=function(){return(__assign=Object.assign||function(w){for(var $,x=1,E=arguments.length;x0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I},__spreadArray=function(w,$){for(var x=0,E=$.length,C=w.length;x=w.length&&(w=void 0),{value:w&&w[E++],done:!w}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.useSortedAndFilteredLinkTypes=$.useLinkTypeForHref=$.useLinkTypes=$.makeLinkType=void 0;var k=__importStar(x(0)),I=x(73),R=__importDefault(x(195)),D=x(12),W=x(114);function useLinkTypes(){var w,$;return null!==($=null===(w=D.useGlobalRegistry().get("@sitegeist/archaeopteryx/link-types"))||void 0===w?void 0:w.getAllAsList())&&void 0!==$?$:[]}$.makeLinkType=function makeLinkType(w,$){var x,E,C=$({createError:function createError($,x){return x?new I.VError(x,"["+w+"]: "+$):new I.VError("["+w+"]: "+$)}});return __assign(__assign({id:w,supportedLinkOptions:[]},C),{LoadingPreview:null!==(x=C.LoadingPreview)&&void 0!==x?x:function(){return k.createElement("div",{},"Loading...")},LoadingEditor:null!==(E=C.LoadingEditor)&&void 0!==E?E:function(){return k.createElement("div",{},"Loading...")}})},$.useLinkTypes=useLinkTypes,$.useLinkTypeForHref=function useLinkTypeForHref(w){var $=useLinkTypes();return k.useMemo((function(){var x,E;if(null===w)return null;try{for(var C=__values(__spreadArray([],__read($)).reverse()),k=C.next();!k.done;k=C.next()){var I=k.value;if(I.isSuitableFor({href:w}))return I}}catch(w){x={error:w}}finally{try{k&&!k.done&&(E=C.return)&&E.call(C)}finally{if(x)throw x.error}}return null}),[$,w])},$.useSortedAndFilteredLinkTypes=function useSortedAndFilteredLinkTypes(){var w=useLinkTypes(),$=W.useEditorState().editorOptions,x=w.map((function(w){var x;return{linkType:w,options:null===(x=$.linkTypes)||void 0===x?void 0:x[w.id]}}));return R.default(x,(function(w){var $=w.options;return null==$?void 0:$.position})).filter((function(w){var $=w.options;return!$||!("enabled"in $)||$.enabled})).map((function(w){return w.linkType}))}},function(w,$,x){(function($,E){var C=x(108),k=x(181).Stream,I=x(75),R=/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;function _capitalize(w){return w.charAt(0).toUpperCase()+w.slice(1)}function _toss(w,$,x,E,k){throw new C.AssertionError({message:I.format("%s (%s) is required",w,$),actual:void 0===k?typeof E:k(E),expected:$,operator:x||"===",stackStartFunction:_toss.caller})}function _getClass(w){return Object.prototype.toString.call(w).slice(8,-1)}function noop(){}var D={bool:{check:function(w){return"boolean"==typeof w}},func:{check:function(w){return"function"==typeof w}},string:{check:function(w){return"string"==typeof w}},object:{check:function(w){return"object"==typeof w&&null!==w}},number:{check:function(w){return"number"==typeof w&&!isNaN(w)}},finite:{check:function(w){return"number"==typeof w&&!isNaN(w)&&isFinite(w)}},buffer:{check:function(w){return $.isBuffer(w)},operator:"Buffer.isBuffer"},array:{check:function(w){return Array.isArray(w)},operator:"Array.isArray"},stream:{check:function(w){return w instanceof k},operator:"instanceof",actual:_getClass},date:{check:function(w){return w instanceof Date},operator:"instanceof",actual:_getClass},regexp:{check:function(w){return w instanceof RegExp},operator:"instanceof",actual:_getClass},uuid:{check:function(w){return"string"==typeof w&&R.test(w)},operator:"isUUID"}};w.exports=function _setExports(w){var $,x=Object.keys(D);return $=E.env.NODE_NDEBUG?noop:function(w,$){w||_toss($,"true",w)},x.forEach((function(x){if(w)$[x]=noop;else{var E=D[x];$[x]=function(w,$){E.check(w)||_toss($,x,E.operator,w,E.actual)}}})),x.forEach((function(x){var E="optional"+_capitalize(x);if(w)$[E]=noop;else{var C=D[x];$[E]=function(w,$){null!=w&&(C.check(w)||_toss($,x,C.operator,w,C.actual))}}})),x.forEach((function(x){var E="arrayOf"+_capitalize(x);if(w)$[E]=noop;else{var C=D[x],k="["+x+"]";$[E]=function(w,$){var x;for(Array.isArray(w)||_toss($,k,C.operator,w,C.actual),x=0;x0?I-4:I;for(x=0;x>16&255,D[W++]=$>>8&255,D[W++]=255&$;2===R&&($=C[w.charCodeAt(x)]<<2|C[w.charCodeAt(x+1)]>>4,D[W++]=255&$);1===R&&($=C[w.charCodeAt(x)]<<10|C[w.charCodeAt(x+1)]<<4|C[w.charCodeAt(x+2)]>>2,D[W++]=$>>8&255,D[W++]=255&$);return D},$.fromByteArray=function fromByteArray(w){for(var $,x=w.length,C=x%3,k=[],I=0,R=x-C;IR?R:I+16383));1===C?($=w[x-1],k.push(E[$>>2]+E[$<<4&63]+"==")):2===C&&($=(w[x-2]<<8)+w[x-1],k.push(E[$>>10]+E[$>>4&63]+E[$<<2&63]+"="));return k.join("")};for(var E=[],C=[],k="undefined"!=typeof Uint8Array?Uint8Array:Array,I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R=0,D=I.length;R0)throw new Error("Invalid string. Length must be a multiple of 4");var x=w.indexOf("=");return-1===x&&(x=$),[x,x===$?0:4-x%4]}function encodeChunk(w,$,x){for(var C,k,I=[],R=$;R>18&63]+E[k>>12&63]+E[k>>6&63]+E[63&k]);return I.join("")}C["-".charCodeAt(0)]=62,C["_".charCodeAt(0)]=63},function(w,$){$.read=function(w,$,x,E,C){var k,I,R=8*C-E-1,D=(1<>1,V=-7,G=x?C-1:0,K=x?-1:1,J=w[$+G];for(G+=K,k=J&(1<<-V)-1,J>>=-V,V+=R;V>0;k=256*k+w[$+G],G+=K,V-=8);for(I=k&(1<<-V)-1,k>>=-V,V+=E;V>0;I=256*I+w[$+G],G+=K,V-=8);if(0===k)k=1-W;else{if(k===D)return I?NaN:1/0*(J?-1:1);I+=Math.pow(2,E),k-=W}return(J?-1:1)*I*Math.pow(2,k-E)},$.write=function(w,$,x,E,C,k){var I,R,D,W=8*k-C-1,V=(1<>1,K=23===C?Math.pow(2,-24)-Math.pow(2,-77):0,J=E?0:k-1,ie=E?1:-1,oe=$<0||0===$&&1/$<0?1:0;for($=Math.abs($),isNaN($)||$===1/0?(R=isNaN($)?1:0,I=V):(I=Math.floor(Math.log($)/Math.LN2),$*(D=Math.pow(2,-I))<1&&(I--,D*=2),($+=I+G>=1?K/D:K*Math.pow(2,1-G))*D>=2&&(I++,D/=2),I+G>=V?(R=0,I=V):I+G>=1?(R=($*D-1)*Math.pow(2,C),I+=G):(R=$*Math.pow(2,G-1)*Math.pow(2,C),I=0));C>=8;w[x+J]=255&R,J+=ie,R/=256,C-=8);for(I=I<0;w[x+J]=255&I,J+=ie,I/=256,W-=8);w[x+J-ie]|=128*oe}},function(w,$,x){"use strict";var E=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;function toObject(w){if(null==w)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(w)}w.exports=function shouldUseNative(){try{if(!Object.assign)return!1;var w=new String("abc");if(w[5]="de","5"===Object.getOwnPropertyNames(w)[0])return!1;for(var $={},x=0;x<10;x++)$["_"+String.fromCharCode(x)]=x;if("0123456789"!==Object.getOwnPropertyNames($).map((function(w){return $[w]})).join(""))return!1;var E={};return"abcdefghijklmnopqrst".split("").forEach((function(w){E[w]=w})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},E)).join("")}catch(w){return!1}}()?Object.assign:function(w,$){for(var x,I,R=toObject(w),D=1;D0?this.tail.next=$:this.head=$,this.tail=$,++this.length},BufferList.prototype.unshift=function unshift(w){var $={data:w,next:this.head};0===this.length&&(this.tail=$),this.head=$,++this.length},BufferList.prototype.shift=function shift(){if(0!==this.length){var w=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,w}},BufferList.prototype.clear=function clear(){this.head=this.tail=null,this.length=0},BufferList.prototype.join=function join(w){if(0===this.length)return"";for(var $=this.head,x=""+$.data;$=$.next;)x+=w+$.data;return x},BufferList.prototype.concat=function concat(w){if(0===this.length)return E.alloc(0);if(1===this.length)return this.head.data;for(var $,x,C,k=E.allocUnsafe(w>>>0),I=this.head,R=0;I;)$=I.data,x=k,C=R,$.copy(x,C),R+=I.data.length,I=I.next;return k},BufferList}(),C&&C.inspect&&C.inspect.custom&&(w.exports.prototype[C.inspect.custom]=function(){var w=C.inspect({length:this.length});return this.constructor.name+" "+w})},function(w,$){},function(w,$,x){(function(w){var E=void 0!==w&&w||"undefined"!=typeof self&&self||window,C=Function.prototype.apply;function Timeout(w,$){this._id=w,this._clearFn=$}$.setTimeout=function(){return new Timeout(C.call(setTimeout,E,arguments),clearTimeout)},$.setInterval=function(){return new Timeout(C.call(setInterval,E,arguments),clearInterval)},$.clearTimeout=$.clearInterval=function(w){w&&w.close()},Timeout.prototype.unref=Timeout.prototype.ref=function(){},Timeout.prototype.close=function(){this._clearFn.call(E,this._id)},$.enroll=function(w,$){clearTimeout(w._idleTimeoutId),w._idleTimeout=$},$.unenroll=function(w){clearTimeout(w._idleTimeoutId),w._idleTimeout=-1},$._unrefActive=$.active=function(w){clearTimeout(w._idleTimeoutId);var $=w._idleTimeout;$>=0&&(w._idleTimeoutId=setTimeout((function onTimeout(){w._onTimeout&&w._onTimeout()}),$))},x(186),$.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==w&&w.setImmediate||this&&this.setImmediate,$.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==w&&w.clearImmediate||this&&this.clearImmediate}).call(this,x(46))},function(w,$,x){(function(w,$){!function(w,x){"use strict";if(!w.setImmediate){var E,C=1,k={},I=!1,R=w.document,D=Object.getPrototypeOf&&Object.getPrototypeOf(w);D=D&&D.setTimeout?D:w,"[object process]"==={}.toString.call(w.process)?function installNextTickImplementation(){E=function(w){$.nextTick((function(){runIfPresent(w)}))}}():!function canUsePostMessage(){if(w.postMessage&&!w.importScripts){var $=!0,x=w.onmessage;return w.onmessage=function(){$=!1},w.postMessage("","*"),w.onmessage=x,$}}()?w.MessageChannel?function installMessageChannelImplementation(){var w=new MessageChannel;w.port1.onmessage=function(w){runIfPresent(w.data)},E=function($){w.port2.postMessage($)}}():R&&"onreadystatechange"in R.createElement("script")?function installReadyStateChangeImplementation(){var w=R.documentElement;E=function($){var x=R.createElement("script");x.onreadystatechange=function(){runIfPresent($),x.onreadystatechange=null,w.removeChild(x),x=null},w.appendChild(x)}}():function installSetTimeoutImplementation(){E=function(w){setTimeout(runIfPresent,0,w)}}():function installPostMessageImplementation(){var $="setImmediate$"+Math.random()+"$",onGlobalMessage=function(x){x.source===w&&"string"==typeof x.data&&0===x.data.indexOf($)&&runIfPresent(+x.data.slice($.length))};w.addEventListener?w.addEventListener("message",onGlobalMessage,!1):w.attachEvent("onmessage",onGlobalMessage),E=function(x){w.postMessage($+x,"*")}}(),D.setImmediate=function setImmediate(w){"function"!=typeof w&&(w=new Function(""+w));for(var $=new Array(arguments.length-1),x=0;x<$.length;x++)$[x]=arguments[x+1];var I={callback:w,args:$};return k[C]=I,E(C),C++},D.clearImmediate=clearImmediate}function clearImmediate(w){delete k[w]}function runIfPresent(w){if(I)setTimeout(runIfPresent,0,w);else{var $=k[w];if($){I=!0;try{!function run(w){var $=w.callback,x=w.args;switch(x.length){case 0:$();break;case 1:$(x[0]);break;case 2:$(x[0],x[1]);break;case 3:$(x[0],x[1],x[2]);break;default:$.apply(void 0,x)}}($)}finally{clearImmediate(w),I=!1}}}}}("undefined"==typeof self?void 0===w?this:w:self)}).call(this,x(46),x(44))},function(w,$,x){(function($){function config(w){try{if(!$.localStorage)return!1}catch(w){return!1}var x=$.localStorage[w];return null!=x&&"true"===String(x).toLowerCase()}w.exports=function deprecate(w,$){if(config("noDeprecation"))return w;var x=!1;return function deprecated(){if(!x){if(config("throwDeprecation"))throw new Error($);config("traceDeprecation")?console.trace($):console.warn($),x=!0}return w.apply(this,arguments)}}}).call(this,x(46))},function(w,$,x){var E=x(74),C=E.Buffer;function copyProps(w,$){for(var x in w)$[x]=w[x]}function SafeBuffer(w,$,x){return C(w,$,x)}C.from&&C.alloc&&C.allocUnsafe&&C.allocUnsafeSlow?w.exports=E:(copyProps(E,$),$.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(C.prototype),copyProps(C,SafeBuffer),SafeBuffer.from=function(w,$,x){if("number"==typeof w)throw new TypeError("Argument must not be a number");return C(w,$,x)},SafeBuffer.alloc=function(w,$,x){if("number"!=typeof w)throw new TypeError("Argument must be a number");var E=C(w);return void 0!==$?"string"==typeof x?E.fill($,x):E.fill($):E.fill(0),E},SafeBuffer.allocUnsafe=function(w){if("number"!=typeof w)throw new TypeError("Argument must be a number");return C(w)},SafeBuffer.allocUnsafeSlow=function(w){if("number"!=typeof w)throw new TypeError("Argument must be a number");return E.SlowBuffer(w)}},function(w,$,x){"use strict";w.exports=PassThrough;var E=x(113),C=Object.create(x(54));function PassThrough(w){if(!(this instanceof PassThrough))return new PassThrough(w);E.call(this,w)}C.inherits=x(53),C.inherits(PassThrough,E),PassThrough.prototype._transform=function(w,$,x){x(null,w)}},function(w,$,x){w.exports=x(97)},function(w,$,x){w.exports=x(47)},function(w,$,x){w.exports=x(95).Transform},function(w,$,x){w.exports=x(95).PassThrough},function(w,$,x){(function(w){var E=x(108),C=x(75);function jsSprintf(w){var $,x,k,I,R,D,W,V,G,K,J,ie=["([^%]*)","%","(['\\-+ #0]*?)","([1-9]\\d*)?","(\\.([1-9]\\d*))?","[lhjztL]*?","([diouxXfFeEgGaAcCsSp%jr])"].join(""),oe=new RegExp(ie),ue=Array.prototype.slice.call(arguments,1),ae=w,se="",de=1,le=0;for(E.equal("string",typeof ae,"first argument must be a format string");null!==(G=oe.exec(ae));)if(se+=G[1],ae=ae.substring(G[0].length),J=G[0].substring(G[1].length),K=le+G[1].length+1,le+=G[0].length,$=G[2]||"",x=G[3]||0,k=G[4]||"",R=!1,W=!1,D=" ","%"!=(I=G[6])){if(0===ue.length)throw jsError(w,K,J,"has no matching argument (too few arguments passed)");if(V=ue.shift(),de++,$.match(/[\' #]/))throw jsError(w,K,J,"uses unsupported flags");if(k.length>0)throw jsError(w,K,J,"uses non-zero precision (not supported)");switch($.match(/-/)&&(R=!0),$.match(/0/)&&(D="0"),$.match(/\+/)&&(W=!0),I){case"s":if(null==V)throw jsError(w,K,J,"attempted to print undefined or null as a string (argument "+de+" to sprintf)");se+=doPad(D,x,R,V.toString());break;case"d":V=Math.floor(V);case"f":se+=(W=W&&V>0?"+":"")+doPad(D,x,R,V.toString());break;case"x":se+=doPad(D,x,R,V.toString(16));break;case"j":0===x&&(x=10),se+=C.inspect(V,!1,x);break;case"r":se+=dumpException(V);break;default:throw jsError(w,K,J,"is not supported")}}else se+="%";return se+=ae}function jsError(w,$,x,C){return E.equal(typeof w,"string"),E.equal(typeof x,"string"),E.equal(typeof $,"number"),E.equal(typeof C,"string"),new Error('format string "'+w+'": conversion specifier "'+x+'" at character '+$+" "+C)}function jsFprintf(w){var $=Array.prototype.slice.call(arguments,1);return w.write(jsSprintf.apply(this,$))}function doPad(w,$,x,E){for(var C=E;C.length<$;)x?C+=w:C=w+C;return C}function dumpException(w){var $;if(!(w instanceof Error))throw new Error(jsSprintf("invalid type for %%r: %j",w));if($="EXCEPTION: "+w.constructor.name+": "+w.stack,w.cause&&"function"==typeof w.cause){var x=w.cause();x&&($+="\nCaused by: "+dumpException(x))}return $}$.sprintf=jsSprintf,$.printf=function jsPrintf(){var $=Array.prototype.slice.call(arguments);$.unshift(w.stdout),jsFprintf.apply(null,$)},$.fprintf=jsFprintf}).call(this,x(44))},function(w,$,x){"use strict";$.__esModule=!0;var E=x(1);$.default=function positionalArraySorter(w,$,x){var C,k,I,R,D,W,V,G,K,J,ie,oe,ue,ae;void 0===$&&($="position"),void 0===x&&(x="key");var se="string"==typeof $?function(w){return w[$]}:$,de={},le={},pe={},he={},ve={},ge={};w.forEach((function(w,$){var E=w[x]?w[x]:String($);de[E]=$;var C=se(w),k=String(C||$),I=!1;if(k.startsWith("start")){var R=(D=k.match(/start\s+(\d+)/))&&D[1]?Number(D[1]):0;pe[R]||(pe[R]=[]),pe[R].push(E)}else if(k.startsWith("end")){var D;R=(D=k.match(/end\s+(\d+)/))&&D[1]?Number(D[1]):0;he[R]||(he[R]=[]),he[R].push(E)}else if(k.startsWith("before")){if(V=k.match(/before\s+(\S+)(\s+(\d+))?/)){var W=V[1];R=V[3]?Number(V[3]):0;ve[W]||(ve[W]={}),ve[W][R]||(ve[W][R]=[]),ve[W][R].push(E)}else I=!0}else if(k.startsWith("after")){var V;if(V=k.match(/after\s+(\S+)(\s+(\d+))?/)){W=V[1],R=V[3]?Number(V[3]):0;ge[W]||(ge[W]={}),ge[W][R]||(ge[W][R]=[]),ge[W][R].push(E)}else I=!0}else I=!0;if(I){var G=parseFloat(k);!isNaN(G)&&isFinite(G)||(G=$),le[G]||(le[G]=[]),le[G].push(E)}}));var Se=[],we=[],Ce=[],Pe=[],Ie=function sortedWeights(w,$){var x=Object.keys(w).map((function(w){return Number(w)})).sort((function(w,$){return w-$}));return $?x:x.reverse()},Fe=function addToResults(w,$){w.forEach((function(w){var x,C,k,I;if(!(Pe.indexOf(w)>=0)){if(Pe.push(w),ve[w]){var R=Ie(ve[w],!0);try{for(var D=E.__values(R),W=D.next();!W.done;W=D.next()){var V=W.value;addToResults(ve[w][V],$)}}catch(w){x={error:w}}finally{try{W&&!W.done&&(C=D.return)&&C.call(D)}finally{if(x)throw x.error}}}if($.push(w),ge[w]){var G=Ie(ge[w],!1);try{for(var K=E.__values(G),J=K.next();!J.done;J=K.next()){V=J.value;addToResults(ge[w][V],$)}}catch(w){k={error:w}}finally{try{J&&!J.done&&(I=K.return)&&I.call(K)}finally{if(k)throw k.error}}}}}))};try{for(var Re=E.__values(Ie(pe,!1)),Le=Re.next();!Le.done;Le=Re.next()){var De=Le.value;Fe(pe[De],Se)}}catch(w){C={error:w}}finally{try{Le&&!Le.done&&(k=Re.return)&&k.call(Re)}finally{if(C)throw C.error}}try{for(var Ue=E.__values(Ie(le,!0)),ze=Ue.next();!ze.done;ze=Ue.next()){De=ze.value;Fe(le[De],we)}}catch(w){I={error:w}}finally{try{ze&&!ze.done&&(R=Ue.return)&&R.call(Ue)}finally{if(I)throw I.error}}try{for(var He=E.__values(Ie(he,!0)),Ke=He.next();!Ke.done;Ke=He.next()){De=Ke.value;Fe(he[De],Ce)}}catch(w){D={error:w}}finally{try{Ke&&!Ke.done&&(W=He.return)&&W.call(He)}finally{if(D)throw D.error}}try{for(var Ze=E.__values(Object.keys(ve)),Qe=Ze.next();!Qe.done;Qe=Ze.next()){var et=Qe.value;if(!(Pe.indexOf(et)>=0))try{for(var tt=(K=void 0,E.__values(Ie(ve[et],!1))),rt=tt.next();!rt.done;rt=tt.next()){De=rt.value;Fe(ve[et][De],Se)}}catch(w){K={error:w}}finally{try{rt&&!rt.done&&(J=tt.return)&&J.call(tt)}finally{if(K)throw K.error}}}}catch(w){V={error:w}}finally{try{Qe&&!Qe.done&&(G=Ze.return)&&G.call(Ze)}finally{if(V)throw V.error}}try{for(var nt=E.__values(Object.keys(ge)),it=nt.next();!it.done;it=nt.next()){et=it.value;if(!(Pe.indexOf(et)>=0))try{for(var ot=(ue=void 0,E.__values(Ie(ge[et],!1))),ut=ot.next();!ut.done;ut=ot.next()){De=ut.value;Fe(ge[et][De],we)}}catch(w){ue={error:w}}finally{try{ut&&!ut.done&&(ae=ot.return)&&ae.call(ot)}finally{if(ue)throw ue.error}}}}catch(w){ie={error:w}}finally{try{it&&!it.done&&(oe=nt.return)&&oe.call(nt)}finally{if(ie)throw ie.error}}return E.__spread(Se,we,Ce).map((function(w){return de[w]})).map((function($){return w[$]}))}},function(w,$,x){"use strict";var __assign=function(){return(__assign=Object.assign||function(w){for(var $,x=1,E=arguments.length;x0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.useEditorTransactions=$.useEditorState=$.EditorContext=$.createEditor=$.editorReducer=void 0;var k=__importStar(x(0)),I=x(115),R=x(249),D=x(247),W=__importStar(x(197)),V={enabledLinkOptions:[],editorOptions:{},isOpen:!1,initialValue:null};function editorReducer(w,$){switch(void 0===w&&(w=V),$.type){case I.getType(W.EditorWasOpened):return __assign(__assign({},$.payload),{isOpen:!0});case I.getType(W.EditorWasDismissed):case I.getType(W.ValueWasUnset):case I.getType(W.ValueWasApplied):return V;default:return w}}function createEditor(){var w=new R.Subject,$=function dispatch($){return w.next($)},x=new R.BehaviorSubject(V);w.pipe(D.scan(editorReducer,V),D.shareReplay(1)).subscribe(x);return{state$:x,tx:{dismiss:function dismiss(){return $(W.EditorWasDismissed())},unset:function unset(){return $(W.ValueWasUnset())},apply:function apply(w){return $(W.ValueWasApplied(w))},editLink:function editLink(x,E,C){return void 0===E&&(E=[]),void 0===C&&(C={}),new Promise((function(k){$(W.EditorWasOpened(x,E,C)),w.subscribe((function(w){switch(w.type){case I.getType(W.EditorWasDismissed):return k({change:!1});case I.getType(W.ValueWasUnset):return k({change:!0,value:null});case I.getType(W.ValueWasApplied):return k({change:!0,value:w.payload});default:return}}))}))}},initialState:V}}$.editorReducer=editorReducer,$.createEditor=createEditor,$.EditorContext=k.createContext(createEditor()),$.useEditorState=function useEditorState(){var w=k.useContext($.EditorContext).state$,x=__read(k.useState(w.getValue()),2),E=x[0],C=x[1];return k.useEffect((function(){var $=w.subscribe(C);return function(){return $.unsubscribe()}}),[w]),E},$.useEditorTransactions=function useEditorTransactions(){return k.useContext($.EditorContext).tx}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.ValueWasApplied=$.ValueWasUnset=$.EditorWasDismissed=$.EditorWasOpened=void 0;var E=x(115);$.EditorWasOpened=E.createAction("http://sitegeist.de/Sitegeist.Archaeopteryx/EditorWasOpened",(function(w,$,x){return void 0===x&&(x={}),{initialValue:w,enabledLinkOptions:$,editorOptions:x}}))(),$.EditorWasDismissed=E.createAction("http://sitegeist.de/Sitegeist.Archaeopteryx/EditorWasDismissed")(),$.ValueWasUnset=E.createAction("http://sitegeist.de/Sitegeist.Archaeopteryx/ValueWasUnset")(),$.ValueWasApplied=E.createAction("http://sitegeist.de/Sitegeist.Archaeopteryx/ValueWasApplied",(function(w){return w}))()},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.IconCard=void 0;var k,I,R=__importStar(x(0)),D=__importDefault(x(17)),W=x(16),V=x(116),G=x(199),K=D.default.div(k||(k=__makeTemplateObject(["\n display: grid;\n grid-gap: 8px;\n grid-template-columns: 20px 1fr;\n grid-template-rows: repeat(2, 1fr);\n background-color: #141414;\n padding: 8px 16px;\n min-height: 50px;\n"],["\n display: grid;\n grid-gap: 8px;\n grid-template-columns: 20px 1fr;\n grid-template-rows: repeat(2, 1fr);\n background-color: #141414;\n padding: 8px 16px;\n min-height: 50px;\n"]))),J=D.default.span(I||(I=__makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n grid-column: 1 / span 1;\n grid-row: 1 / span ",";\n"],["\n display: flex;\n justify-content: center;\n align-items: center;\n grid-column: 1 / span 1;\n grid-row: 1 / span ",";\n"])),(function(w){return w.span}));$.IconCard=function IconCard(w){return R.createElement(K,null,R.createElement(J,{span:w.subTitle?1:2},R.createElement(W.Icon,{icon:w.icon})),R.createElement(V.CardTitle,{span:w.subTitle?1:2},w.title),R.createElement(G.CardSubTitle,null,w.subTitle))}},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.CardSubTitle=void 0;var k,I=__importStar(x(0)),R=__importDefault(x(17)),D=x(117),W=R.default.span(k||(k=__makeTemplateObject(["\n display: flex;\n align-items: center;\n line-height: 1;\n font-size: 12px;\n color: #999;\n grid-column: 1 / span 2;\n grid-row: 2 / span 1;\n min-width: 0;\n"],["\n display: flex;\n align-items: center;\n line-height: 1;\n font-size: 12px;\n color: #999;\n grid-column: 1 / span 2;\n grid-row: 2 / span 1;\n min-width: 0;\n"])));$.CardSubTitle=function CardSubTitle(w){return I.createElement(W,null,I.createElement(D.Ellipsis,null,w.children))}},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.ImageCard=void 0;var k,I,R=__importStar(x(0)),D=__importDefault(x(17)),W=x(116),V=D.default.div(k||(k=__makeTemplateObject(["\n display: grid;\n grid-gap: 8px;\n grid-template-columns: 75px 1fr;\n background-color: #141414;\n padding: 0 16px 0 0;\n"],["\n display: grid;\n grid-gap: 8px;\n grid-template-columns: 75px 1fr;\n background-color: #141414;\n padding: 0 16px 0 0;\n"]))),G=D.default.img(I||(I=__makeTemplateObject(["\n display: block;\n grid-column: 1 / span 1;\n width: 100%;\n height: 56px;\n object-fit: contain;\n background-color: #fff;\n background-size: 10px 10px;\n background-position: 0 0, 25px 25px;\n background-image: linear-gradient(45deg, #cccccc 25%, transparent 25%, transparent 75%, #cccccc 75%, #cccccc), linear-gradient(45deg, #cccccc 25%, transparent 25%, transparent 75%, #cccccc 75%, #cccccc);\n"],["\n display: block;\n grid-column: 1 / span 1;\n width: 100%;\n height: 56px;\n object-fit: contain;\n background-color: #fff;\n background-size: 10px 10px;\n background-position: 0 0, 25px 25px;\n background-image: linear-gradient(45deg, #cccccc 25%, transparent 25%, transparent 75%, #cccccc 75%, #cccccc), linear-gradient(45deg, #cccccc 25%, transparent 25%, transparent 75%, #cccccc 75%, #cccccc);\n"])));$.ImageCard=function ImageCard(w){return R.createElement(V,null,R.createElement(G,{src:w.src}),R.createElement(W.CardTitle,{span:1},w.label))}},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.Tabs=void 0;var k,I,R,D,W,V,G,K=__importStar(x(0)),J=__importStar(x(17)),ie=J.default.ul(k||(k=__makeTemplateObject(["\n display: flex;\n margin: 0 0 -1px 0;\n padding: 0;\n list-style-type: none;\n\n > * + * {\n margin-left: -1px;\n }\n"],["\n display: flex;\n margin: 0 0 -1px 0;\n padding: 0;\n list-style-type: none;\n\n > * + * {\n margin-left: -1px;\n }\n"]))),oe=J.default.button(V||(V=__makeTemplateObject(["\n height: 40px;\n ","\n ","\n border-right: 1px solid #3f3f3f;\n border-left: 1px solid #3f3f3f;\n color: #FFF;\n background-color: #222;\n line-height: 40px;\n padding: 0 16px;\n cursor: pointer;\n"],["\n height: 40px;\n ","\n ","\n border-right: 1px solid #3f3f3f;\n border-left: 1px solid #3f3f3f;\n color: #FFF;\n background-color: #222;\n line-height: 40px;\n padding: 0 16px;\n cursor: pointer;\n"])),(function(w){return w.isActive?J.css(I||(I=__makeTemplateObject(["border-top: 2px solid #00adee;"],["border-top: 2px solid #00adee;"]))):J.css(R||(R=__makeTemplateObject(["border-top: 1px solid #3f3f3f;"],["border-top: 1px solid #3f3f3f;"])))}),(function(w){return w.isActive?J.css(D||(D=__makeTemplateObject(["border-bottom: 1px solid #222;"],["border-bottom: 1px solid #222;"]))):J.css(W||(W=__makeTemplateObject(["border-bottom: 1px solid #3f3f3f;"],["border-bottom: 1px solid #3f3f3f;"])))})),ue=J.default.div(G||(G=__makeTemplateObject(["\n padding: 16px;\n background-color: #222;\n border: 1px solid #3f3f3f;\n"],["\n padding: 16px;\n background-color: #222;\n border: 1px solid #3f3f3f;\n"])));$.Tabs=function Tabs(w){if(w.from.length<1)throw new Error("[Sitegeist.Archaeopteryx]: Tabs must have at least one item!");var $=K.createElement("header",null,K.createElement("nav",null,K.createElement(ie,null,w.from.map((function($){return K.createElement("li",{key:w.getKey($)},K.createElement(oe,{type:"button",isActive:w.getKey($)===w.activeItemKey,onClick:function onClick(){w.onSwitchTab&&w.onSwitchTab(w.getKey($))}},w.renderHeader($)))}))))),x=w.lazy?K.createElement("div",null,w.from.filter((function($){return w.getKey($)===w.activeItemKey})).map((function($){return K.createElement(ue,{key:w.getKey($)},w.renderPanel($))}))):K.createElement("div",null,w.from.map((function($){return K.createElement(ue,{key:w.getKey($),hidden:w.getKey($)!==w.activeItemKey},w.renderPanel($))})));return K.createElement("div",null,$,x)}},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.Form=void 0;var k,I,R,D=__importStar(x(0)),W=__importDefault(x(17)),V=W.default.form(k||(k=__makeTemplateObject(["\n > * + * {\n margin-top: 16px;\n }\n"],["\n > * + * {\n margin-top: 16px;\n }\n"]))),G=W.default.div(I||(I=__makeTemplateObject(["\n padding: 0 16px;\n"],["\n padding: 0 16px;\n"]))),K=W.default.div(R||(R=__makeTemplateObject(["\n display: flex;\n justify-content: flex-end;\n"],["\n display: flex;\n justify-content: flex-end;\n"])));$.Form=function Form(w){return D.createElement(V,{onSubmit:w.onSubmit},D.createElement(G,null,w.renderBody()),D.createElement(K,null,w.renderActions()))}},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.Modal=void 0;var k,I=__importStar(x(0)),R=__importStar(x(204)),D=__importDefault(x(17)),W=x(16),V=D.default(W.Dialog)(k||(k=__makeTemplateObject(['\n [class*="_dialog__contentsPosition "],\n [class$="_dialog__contentsPosition"] {\n top: 50%;\n transform: translateY(-50%)translateX(-50%)scale(1);\n }\n [class*="_dialog__contents "],\n [class$="_dialog__contents"] {\n width: auto;\n max-width: calc(100vw - 40px * 2);\n }\n [class*="_dialog__body "],\n [class$="_dialog__body"] {\n max-height: 80vh;\n }\n'],['\n [class*="_dialog__contentsPosition "],\n [class$="_dialog__contentsPosition"] {\n top: 50%;\n transform: translateY(-50%)translateX(-50%)scale(1);\n }\n [class*="_dialog__contents "],\n [class$="_dialog__contents"] {\n width: auto;\n max-width: calc(100vw - 40px * 2);\n }\n [class*="_dialog__body "],\n [class$="_dialog__body"] {\n max-height: 80vh;\n }\n'])));$.Modal=function Modal(w){return R.createPortal(I.createElement(V,{isOpen:!0,title:w.renderTitle(),onRequestClose:function onRequestClose(){},preventClosing:!0},w.renderBody()),document.body)}},function(w,$,x){"use strict";var E=function _interopRequireDefault(w){return w&&w.__esModule?w:{default:w}}(x(52));w.exports=(0,E.default)("vendor")().ReactDOM},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.Deletable=void 0;var k,I,R=__importStar(x(0)),D=__importDefault(x(17)),W=x(16),V=D.default.div(k||(k=__makeTemplateObject(["\n display: grid;\n grid-template-columns: 1fr 40px;\n justify-content: stretch;\n border: 1px solid #3f3f3f;\n max-width: 420px;\n"],["\n display: grid;\n grid-template-columns: 1fr 40px;\n justify-content: stretch;\n border: 1px solid #3f3f3f;\n max-width: 420px;\n"]))),G=D.default(W.IconButton)(I||(I=__makeTemplateObject(["\n height: 100%;\n"],["\n height: 100%;\n"])));$.Deletable=function Deletable(w){return R.createElement(V,null,R.createElement("div",null,w.children),R.createElement(G,{icon:"trash",hoverStyle:"error",onClick:w.onDelete}))}},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.IconLabel=void 0;var k,I=__importStar(x(0)),R=__importDefault(x(17)),D=x(16),W=R.default.div(k||(k=__makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 8px;\n"],["\n display: flex;\n align-items: center;\n gap: 8px;\n"])));$.IconLabel=function IconLabel(w){return I.createElement(W,null,I.createElement(D.Icon,{icon:w.icon}),w.children)}},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.Columns=$.Stack=$.Container=void 0;var E,C,k,I=__importDefault(x(17));$.Container=I.default.div(E||(E=__makeTemplateObject(["\n padding: 16px;\n"],["\n padding: 16px;\n"]))),$.Stack=I.default.div(C||(C=__makeTemplateObject(["\n > * + * {\n margin-top: 16px;\n }\n"],["\n > * + * {\n margin-top: 16px;\n }\n"]))),$.Columns=I.default.div(k||(k=__makeTemplateObject(["\n display: grid;\n gap: 16px;\n grid-template-columns: repeat(auto-fill, minmax(max(160px, calc(50% - 8px)), calc(33.3333% - 8px)));\n min-width: 600px;\n"],["\n display: grid;\n gap: 16px;\n grid-template-columns: repeat(auto-fill, minmax(max(160px, calc(50% - 8px)), calc(33.3333% - 8px)));\n min-width: 600px;\n"])))},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.Node=void 0;var E=x(209);Object.defineProperty($,"Node",{enumerable:!0,get:function get(){return E.Node}})},function(w,$,x){"use strict";var __awaiter=function(w,$,x,E){return new(x||(x=Promise))((function(C,k){function fulfilled(w){try{step(E.next(w))}catch(w){k(w)}}function rejected(w){try{step(E.throw(w))}catch(w){k(w)}}function step(w){w.done?C(w.value):function adopt(w){return w instanceof x?w:new x((function($){$(w)}))}(w.value).then(fulfilled,rejected)}step((E=E.apply(w,$||[])).next())}))},__generator=function(w,$){var x,E,C,k,I={label:0,sent:function sent(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return k={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k;function verb(k){return function(R){return function step(k){if(x)throw new TypeError("Generator is already executing.");for(;I;)try{if(x=1,E&&(C=2&k[0]?E.return:k[0]?E.throw||((C=E.return)&&C.call(E),0):E.next)&&!(C=C.call(E,k[1])).done)return C;switch(E=0,C&&(k=[2&k[0],C.value]),k[0]){case 0:case 1:C=k;break;case 4:return I.label++,{value:k[1],done:!1};case 5:I.label++,E=k[1],k=[0];continue;case 7:k=I.ops.pop(),I.trys.pop();continue;default:if(!(C=I.trys,(C=C.length>0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1] ");return E.default.createElement(D.IconCard,{icon:null!==(I=null===(x=ie.value)||void 0===x?void 0:x.icon)&&void 0!==I?I:"ban",title:null!==(W=null===(R=ie.value)||void 0===R?void 0:R.label)&&void 0!==W?W:"["+G("Sitegeist.Archaeopteryx:LinkTypes.Node:labelOfNonExistingNode")+"]",subTitle:null!=oe?oe:"node://"+w.nodeId})};$.Node=R.makeLinkType("Sitegeist.Archaeopteryx:Node",(function(w){var $=w.createError;return{supportedLinkOptions:["anchor","title","targetBlank","relNofollow"],isSuitableFor:function isSuitableFor(w){return w.href.startsWith("node://")},useResolvedModel:function useResolvedModel(w){var x=/node:\/\/(.*)/.exec(w.href);if(!x)throw $('Cannot handle href "'+w.href+'".');var E=x[1];return W.Process.success({nodeId:E})},convertModelToLink:function convertModelToLink(w){return{href:"node://"+w.nodeId}},TabHeader:function TabHeader(){var w=k.useI18n();return E.default.createElement(D.IconLabel,{icon:"file"},w("Sitegeist.Archaeopteryx:LinkTypes.Node:title"))},Preview:function Preview(w){return E.default.createElement(G,{nodeId:w.model.nodeId})},Editor:function Editor(w){var x,C,R,D=w.model,V=w.options,G=k.useI18n(),K=k.usePersonalWorkspaceName(),J=k.useDimensionValues(),ie=k.useSiteNodeContextPath(),oe=null!==(x=k.useConfiguration((function(w){var $;return null===($=w.nodeTree)||void 0===$?void 0:$.loadingDepth})))&&void 0!==x?x:4,ue=null!==(C=k.useSelector((function(w){var $,x;return null===(x=null===($=w.ui)||void 0===$?void 0:$.pageTree)||void 0===x?void 0:x.query})))&&void 0!==C?C:"",ae=null!==(R=k.useSelector((function(w){var $,x;return null===(x=null===($=w.ui)||void 0===$?void 0:$.pageTree)||void 0===x?void 0:x.filterNodeType})))&&void 0!==R?R:"",se=E.default.useMemo((function(){var w;return null!==(w=V.startingPoint)&&void 0!==w?w:null==ie?void 0:ie.path}),[V.startingPoint,ie]);if(se){if(K){if(J)return E.default.createElement(W.Field,{name:"nodeId",initialValue:null==D?void 0:D.nodeId,validate:function validate(w){if(!w)return G("Sitegeist.Archaeopteryx:LinkTypes.Node:node.validation.required")}},(function(w){var $,x,C,k=w.input;return E.default.createElement(I.Tree,{initialSearchTerm:ue,workspaceName:K,dimensionValues:J,startingPoint:se,loadingDepth:null!==($=V.loadingDepth)&&void 0!==$?$:oe,baseNodeTypeFilter:null!==(x=V.baseNodeType)&&void 0!==x?x:"Neos.Neos:Document",initialNarrowNodeTypeFilter:ae,linkableNodeTypes:V.allowedNodeTypes,selectedTreeNodeId:null!==(C=k.value)&&void 0!==C?C:void 0,options:{enableSearch:!0,enableNodeTypeFilter:!0},onSelect:function onSelect(w){k.onChange(w)}})}));throw $("Could not load node tree, because dimensionValues could not be determined.")}throw $("Could not load node tree, because workspaceName could not be determined.")}throw $("Could not load node tree, because startingPoint could not be determined.")}}}))},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.Tree=void 0;var E=x(211);Object.defineProperty($,"Tree",{enumerable:!0,get:function get(){return E.Tree}})},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.Tree=void 0;var E=x(212);Object.defineProperty($,"Tree",{enumerable:!0,get:function get(){return E.Tree}})},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__awaiter=function(w,$,x,E){return new(x||(x=Promise))((function(C,k){function fulfilled(w){try{step(E.next(w))}catch(w){k(w)}}function rejected(w){try{step(E.throw(w))}catch(w){k(w)}}function step(w){w.done?C(w.value):function adopt(w){return w instanceof x?w:new x((function($){$(w)}))}(w.value).then(fulfilled,rejected)}step((E=E.apply(w,$||[])).next())}))},__generator=function(w,$){var x,E,C,k,I={label:0,sent:function sent(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return k={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k;function verb(k){return function(R){return function step(k){if(x)throw new TypeError("Generator is already executing.");for(;I;)try{if(x=1,E&&(C=2&k[0]?E.return:k[0]?E.throw||((C=E.return)&&C.call(E),0):E.next)&&!(C=C.call(E,k[1])).done)return C;switch(E=0,C&&(k=[2&k[0],C.value]),k[0]){case 0:case 1:C=k;break;case 4:return I.label++,{value:k[1],done:!1};case 5:I.label++,E=k[1],k=[0];continue;case 7:k=I.ops.pop(),I.trys.pop();continue;default:if(!(C=I.trys,(C=C.length>0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.Tree=void 0;var k=__importStar(x(0)),I=x(55),R=x(73),D=x(16),W=x(78),V=x(220),G=x(224),K=x(227),J=x(98);$.Tree=function Tree(w){var $,x,E,C,ie,oe,ue=__read(k.useState(null!==($=w.initialSearchTerm)&&void 0!==$?$:""),2),ae=ue[0],se=ue[1],de=__read(k.useState(null!==(x=w.initialNarrowNodeTypeFilter)&&void 0!==x?x:""),2),le=de[0],pe=de[1],he=I.useAsync((function(){return __awaiter(void 0,void 0,void 0,(function(){var $;return __generator(this,(function(x){switch(x.label){case 0:return[4,J.getTree({workspaceName:w.workspaceName,dimensionValues:w.dimensionValues,startingPoint:w.startingPoint,loadingDepth:w.loadingDepth,baseNodeTypeFilter:w.baseNodeTypeFilter,linkableNodeTypes:w.linkableNodeTypes,selectedNodeId:w.selectedTreeNodeId,narrowNodeTypeFilter:le,searchTerm:ae})];case 1:if("success"in($=x.sent()))return[2,$.success];if("error"in $)throw new R.VError($.error.message);throw new R.VError("Something went wrong while fetching the tree.")}}))}))}),[w.workspaceName,w.dimensionValues,w.startingPoint,w.loadingDepth,w.baseNodeTypeFilter,w.linkableNodeTypes,le,ae]),ve=k.useCallback((function($){w.onSelect($)}),[]),ge=k.useCallback((function(w){se(w)}),[]),Se=k.useCallback((function(w){pe(w)}),[]);if(he.error)throw new R.VError(W.decodeError(he.error),"NodeTree could not be loaded.");oe=he.loading||!he.value?k.createElement("div",null,"Loading..."):k.createElement(D.Tree,null,k.createElement(V.TreeNode,{workspaceName:w.workspaceName,dimensionValues:w.dimensionValues,baseNodeTypeFilter:w.baseNodeTypeFilter,treeNode:he.value.root,selectedTreeNodeId:w.selectedTreeNodeId,level:1,onClick:ve}));var we=null;(null===(E=w.options)||void 0===E?void 0:E.enableSearch)&&(we=k.createElement(G.Search,{initialValue:null!==(C=w.initialSearchTerm)&&void 0!==C?C:"",onChange:ge}));var Ce=null;return(null===(ie=w.options)||void 0===ie?void 0:ie.enableNodeTypeFilter)&&(Ce=k.createElement(K.SelectNodeTypeFilter,{baseNodeTypeFilter:w.baseNodeTypeFilter,value:le,onChange:Se})),k.createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",backgroundColor:"#141414",border:"1px solid #3f3f3f"}},we?k.createElement("div",{style:{gridColumn:Ce?"1 / span 1":"1 / span 2"}},we):null,Ce?k.createElement("div",{style:{gridColumn:we?"2 / span 1":"1 / span 2"}},Ce):null,oe?k.createElement("div",{style:{marginTop:"-5px",borderTop:"1px solid #3f3f3f",gridColumn:"1 / span 2",height:"50vh",maxHeight:"300px",overflowY:"auto"}},oe):null)}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.decodeError=$.ErrorBoundary=void 0;var E=x(214);Object.defineProperty($,"ErrorBoundary",{enumerable:!0,get:function get(){return E.ErrorBoundary}});var C=x(219);Object.defineProperty($,"decodeError",{enumerable:!0,get:function get(){return C.decodeError}})},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.ErrorBoundary=void 0;var k=__importStar(x(0)),I=x(215),R=x(73),D=x(216),W=function ErrorFallback(w){var $=Boolean(document.querySelector('[data-env^="Development"]'));return k.createElement(D.Alert,{title:""+w.error.name},k.createElement("div",null,w.error.message),w.error instanceof R.VError?k.createElement(V,{error:w.error,level:0}):null,$?k.createElement(D.Trace,{title:"Stacktrace"},w.error.stack):null)},V=function RecursiveCauseChain(w){return w.error?k.createElement(D.Trace,{title:"Cause: "+w.error.name},w.error.message,w.error instanceof R.VError&&w.level<10?k.createElement(RecursiveCauseChain,{error:w.error.cause(),level:w.level+1}):null):null};function logError(w,$){console.warn("[Sitegeist.Archaeopteryx::"+w.name+"]: An error occurred."),console.error("[Sitegeist.Archaeopteryx::"+w.name+"]: ",w),console.error("[Sitegeist.Archaeopteryx::"+w.name+"]: Component Stack:",$.componentStack)}$.ErrorBoundary=function ErrorBoundary(w){return k.createElement(I.ErrorBoundary,{fallbackRender:W,onError:logError},w.children)}},function(w,$,x){!function(w,$){"use strict";function _interopNamespace(w){if(w&&w.__esModule)return w;var $=Object.create(null);return w&&Object.keys(w).forEach((function(x){if("default"!==x){var E=Object.getOwnPropertyDescriptor(w,x);Object.defineProperty($,x,E.get?E:{enumerable:!0,get:function(){return w[x]}})}})),$.default=w,Object.freeze($)}var x=_interopNamespace($);function _setPrototypeOf(w,$){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(w,$){return w.__proto__=$,w})(w,$)}var E={error:null},C=function(w){function ErrorBoundary(){for(var $,x=arguments.length,C=new Array(x),k=0;k * + * {\n margin-top: 8px;\n }\n"],["\n padding: 8px;\n background-color: #ff6a3c;\n color: #fff;\n\n > * + * {\n margin-top: 8px;\n }\n"]))),G=D.default.header(I||(I=__makeTemplateObject(["\n display: flex;\n gap: 8px;\n align-items: center;\n"],["\n display: flex;\n gap: 8px;\n align-items: center;\n"])));$.Alert=function Alert(w){return R.createElement(V,{role:"alert"},R.createElement(G,null,R.createElement(W.Icon,{icon:"exclamation-triangle"}),w.title),w.children)}},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.Trace=void 0;var k,I,R,D=__importStar(x(0)),W=__importDefault(x(17)),V=W.default.details(k||(k=__makeTemplateObject(["\n"],["\n"]))),G=W.default.summary(I||(I=__makeTemplateObject(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"]))),K=W.default.pre(R||(R=__makeTemplateObject(["\n height: 60vh;\n max-height: 600px;\n padding: 8px;\n margin: 0;\n overflow: scroll;\n background-color: #111;\n box-shadow: inset 5px 5px 5px #000;\n"],["\n height: 60vh;\n max-height: 600px;\n padding: 8px;\n margin: 0;\n overflow: scroll;\n background-color: #111;\n box-shadow: inset 5px 5px 5px #000;\n"])));$.Trace=function Trace(w){return D.createElement(V,null,D.createElement(G,null,w.title),D.createElement(K,null,w.children))}},function(w,$,x){"use strict";function decodeErrorMessage(w){var $;if(w.includes("")){var x=(new DOMParser).parseFromString(w,"text/html");return"["+x.title+"] "+(null===($=x.querySelector("h1"))||void 0===$?void 0:$.innerText)}return w}Object.defineProperty($,"__esModule",{value:!0}),$.decodeError=void 0,$.decodeError=function decodeError(w){return w instanceof Error?(w.message=decodeErrorMessage(w.message),w):new Error(decodeErrorMessage(w))}},function(w,$,x){"use strict";var __assign=function(){return(__assign=Object.assign||function(w){for(var $,x=1,E=arguments.length;x0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.TreeNode=void 0;var E=__importDefault(x(0)),C=x(16),k=x(98);$.TreeNode=function TreeNode(w){var x=w.selectedTreeNodeId===w.treeNode.nodeAggregateIdentifier,I=w.treeNode.children.length>0||w.treeNode.hasUnloadedChildren,R=__read(E.default.useState(w.treeNode.hasUnloadedChildren),2),D=R[0],W=R[1],V=__read(E.default.useState(!1),2),G=V[0],K=V[1],J=__read(E.default.useState(w.treeNode.children),2),ie=J[0],oe=J[1],ue=__read(E.default.useState(!1),2),ae=ue[0],se=ue[1],de=E.default.useMemo((function(){if(w.treeNode.hasScheduledDisabledState){var $=w.treeNode.isDisabled?"error":"primaryBlue";return E.default.createElement("span",{className:"fa-layers fa-fw"},E.default.createElement(C.Icon,{icon:w.treeNode.icon}),E.default.createElement(C.Icon,{icon:"circle",color:$,transform:"shrink-5 down-6 right-4"}),E.default.createElement(C.Icon,{icon:"clock",transform:"shrink-9 down-6 right-4"}))}return w.treeNode.isDisabled?E.default.createElement("span",{className:"fa-layers fa-fw"},E.default.createElement(C.Icon,{icon:w.treeNode.icon}),E.default.createElement(C.Icon,{icon:"circle",color:"error",transform:"shrink-3 down-6 right-4"}),E.default.createElement(C.Icon,{icon:"times",transform:"shrink-7 down-6 right-4"})):null}),[w.treeNode.hasScheduledDisabledState,w.treeNode.isDisabled,w.treeNode.icon]),le=E.default.useCallback((function(){return __awaiter(void 0,void 0,void 0,(function(){var $;return __generator(this,(function(x){switch(x.label){case 0:if(!D||!w.treeNode.hasUnloadedChildren||0!==ie.length)return[3,5];K(!0),x.label=1;case 1:return x.trys.push([1,3,,4]),[4,k.getChildrenForTreeNode({workspaceName:w.workspaceName,dimensionValues:w.dimensionValues,treeNodeId:w.treeNode.nodeAggregateIdentifier,nodeTypeFilter:w.baseNodeTypeFilter})];case 2:return"success"in($=x.sent())&&oe($.success.children),"error"in $&&se(!0),[3,4];case 3:return x.sent(),se(!0),[3,4];case 4:return K(!1),W(!1),[3,6];case 5:W((function(w){return!w})),x.label=6;case 6:return[2]}}))}))}),[w.workspaceName,w.dimensionValues,w.treeNode.nodeAggregateIdentifier,w.baseNodeTypeFilter,ie.length]),pe=E.default.useCallback((function(){w.treeNode.isMatchedByFilter&&w.treeNode.isLinkable&&w.onClick(w.treeNode.nodeAggregateIdentifier)}),[w.treeNode.isMatchedByFilter,w.treeNode.nodeAggregateIdentifier]);return E.default.createElement(C.Tree.Node,null,E.default.createElement(C.Tree.Node.Header,{labelIdentifier:"labelIdentifier",id:w.treeNode.nodeAggregateIdentifier,hasChildren:I,isLastChild:!0,isCollapsed:D,isActive:x,isFocused:x,isLoading:G,isDirty:!1,isHidden:w.treeNode.isDisabled,isHiddenInIndex:w.treeNode.isHiddenInMenu||!w.treeNode.isMatchedByFilter||!w.treeNode.isLinkable,isDragging:!1,hasError:ae,label:w.treeNode.label,icon:w.treeNode.isLinkable?w.treeNode.icon:"fas fa-unlink",customIconComponent:de,iconLabel:w.treeNode.nodeTypeLabel,level:w.level,onToggle:le,onClick:pe,dragForbidden:!0,title:w.treeNode.label}),D?null:ie.map((function(x){return E.default.createElement($.TreeNode,__assign({},w,{treeNode:x,level:w.level+1}))})))}},function(w,$,x){"use strict";var __awaiter=function(w,$,x,E){return new(x||(x=Promise))((function(C,k){function fulfilled(w){try{step(E.next(w))}catch(w){k(w)}}function rejected(w){try{step(E.throw(w))}catch(w){k(w)}}function step(w){w.done?C(w.value):function adopt(w){return w instanceof x?w:new x((function($){$(w)}))}(w.value).then(fulfilled,rejected)}step((E=E.apply(w,$||[])).next())}))},__generator=function(w,$){var x,E,C,k,I={label:0,sent:function sent(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return k={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k;function verb(k){return function(R){return function step(k){if(x)throw new TypeError("Generator is already executing.");for(;I;)try{if(x=1,E&&(C=2&k[0]?E.return:k[0]?E.throw||((C=E.return)&&C.call(E),0):E.next)&&!(C=C.call(E,k[1])).done)return C;switch(E=0,C&&(k=[2&k[0],C.value]),k[0]){case 0:case 1:C=k;break;case 4:return I.label++,{value:k[1],done:!1};case 5:I.label++,E=k[1],k=[0];continue;case 7:k=I.ops.pop(),I.trys.pop();continue;default:if(!(C=I.trys,(C=C.length>0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]=w.length&&(w=void 0),{value:w&&w[E++],done:!w}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=function(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.getChildrenForTreeNode=void 0;var E=x(12);$.getChildrenForTreeNode=function getChildrenForTreeNode(w){return __awaiter(this,void 0,void 0,(function(){var $,x,C,k,I,R,D,W,V,G,K,J,ie,oe,ue;return __generator(this,(function(ae){switch(ae.label){case 0:($=new URLSearchParams).set("workspaceName",w.workspaceName);try{for(x=__values(Object.entries(w.dimensionValues)),C=x.next();!C.done;C=x.next()){k=__read(C.value,2),I=k[0],R=k[1];try{for(oe=void 0,D=__values(R),W=D.next();!W.done;W=D.next())V=W.value,$.set("dimensionValues["+I+"][]",V)}catch(w){oe={error:w}}finally{try{W&&!W.done&&(ue=D.return)&&ue.call(D)}finally{if(oe)throw oe.error}}}}catch(w){J={error:w}}finally{try{C&&!C.done&&(ie=x.return)&&ie.call(x)}finally{if(J)throw J.error}}$.set("treeNodeId",w.treeNodeId),$.set("nodeTypeFilter",w.nodeTypeFilter),ae.label=1;case 1:return ae.trys.push([1,3,,4]),[4,E.fetchWithErrorHandling.withCsrfToken((function(w){return{url:"/sitegeist/archaeopteryx/get-children-for-tree-node?"+$.toString(),method:"GET",credentials:"include",headers:{"X-Flow-Csrftoken":w,"Content-Type":"application/json"}}}))];case 2:return G=ae.sent(),[2,E.fetchWithErrorHandling.parseJson(G)];case 3:throw K=ae.sent(),E.fetchWithErrorHandling.generalErrorHandler(K),K;case 4:return[2]}}))}))}},function(w,$,x){"use strict";var __awaiter=function(w,$,x,E){return new(x||(x=Promise))((function(C,k){function fulfilled(w){try{step(E.next(w))}catch(w){k(w)}}function rejected(w){try{step(E.throw(w))}catch(w){k(w)}}function step(w){w.done?C(w.value):function adopt(w){return w instanceof x?w:new x((function($){$(w)}))}(w.value).then(fulfilled,rejected)}step((E=E.apply(w,$||[])).next())}))},__generator=function(w,$){var x,E,C,k,I={label:0,sent:function sent(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return k={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k;function verb(k){return function(R){return function step(k){if(x)throw new TypeError("Generator is already executing.");for(;I;)try{if(x=1,E&&(C=2&k[0]?E.return:k[0]?E.throw||((C=E.return)&&C.call(E),0):E.next)&&!(C=C.call(E,k[1])).done)return C;switch(E=0,C&&(k=[2&k[0],C.value]),k[0]){case 0:case 1:C=k;break;case 4:return I.label++,{value:k[1],done:!1};case 5:I.label++,E=k[1],k=[0];continue;case 7:k=I.ops.pop(),I.trys.pop();continue;default:if(!(C=I.trys,(C=C.length>0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]=w.length&&(w=void 0),{value:w&&w[E++],done:!w}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=function(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.getTree=void 0;var E=x(12);$.getTree=function getTree(w){var $;return __awaiter(this,void 0,void 0,(function(){var x,C,k,I,R,D,W,V,G,K,J,ie,oe,ue,ae,se,de,le,pe,he;return __generator(this,(function(ve){switch(ve.label){case 0:(x=new URLSearchParams).set("workspaceName",w.workspaceName);try{for(C=__values(Object.entries(w.dimensionValues)),k=C.next();!k.done;k=C.next()){I=__read(k.value,2),R=I[0],D=I[1];try{for(de=void 0,W=__values(D),V=W.next();!V.done;V=W.next())G=V.value,x.set("dimensionValues["+R+"][]",G)}catch(w){de={error:w}}finally{try{V&&!V.done&&(le=W.return)&&le.call(W)}finally{if(de)throw de.error}}}}catch(w){ae={error:w}}finally{try{k&&!k.done&&(se=C.return)&&se.call(C)}finally{if(ae)throw ae.error}}x.set("startingPoint",w.startingPoint),x.set("loadingDepth",String(w.loadingDepth)),x.set("baseNodeTypeFilter",w.baseNodeTypeFilter);try{for(K=__values(null!==($=w.linkableNodeTypes)&&void 0!==$?$:[]),J=K.next();!J.done;J=K.next())ie=J.value,x.append("linkableNodeTypes[]",ie)}catch(w){pe={error:w}}finally{try{J&&!J.done&&(he=K.return)&&he.call(K)}finally{if(pe)throw pe.error}}x.set("narrowNodeTypeFilter",w.narrowNodeTypeFilter),x.set("searchTerm",w.searchTerm),w.selectedNodeId&&x.set("selectedNodeId",w.selectedNodeId),ve.label=1;case 1:return ve.trys.push([1,3,,4]),[4,E.fetchWithErrorHandling.withCsrfToken((function(w){return{url:"/sitegeist/archaeopteryx/get-tree?"+x.toString(),method:"GET",credentials:"include",headers:{"X-Flow-Csrftoken":w,"Content-Type":"application/json"}}}))];case 2:return oe=ve.sent(),[2,E.fetchWithErrorHandling.parseJson(oe)];case 3:throw ue=ve.sent(),E.fetchWithErrorHandling.generalErrorHandler(ue),ue;case 4:return[2]}}))}))}},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__read=function(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.Search=void 0;var k=__importStar(x(0)),I=x(55),R=x(225);$.Search=function Search(w){var $=__read(k.useState(w.initialValue),2),x=$[0],E=$[1],C=k.useCallback((function(){E("")}),[E]);return I.useDebounce((function(){w.onChange(x)}),300,[x]),k.createElement(R.SearchInput,{value:x,onChange:E,onClear:C})}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.SearchInput=void 0;var E=x(226);Object.defineProperty($,"SearchInput",{enumerable:!0,get:function get(){return E.SearchInput}})},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.SearchInput=void 0;var k,I,R,D,W=__importStar(x(0)),V=__importDefault(x(17)),G=x(16),K=x(12),J=V.default(G.Icon)(k||(k=__makeTemplateObject(["\n position: absolute;\n top: 50%;\n left: 21px;\n transform: translate(-50%, -50%);\n"],["\n position: absolute;\n top: 50%;\n left: 21px;\n transform: translate(-50%, -50%);\n"]))),ie=V.default(G.IconButton)(I||(I=__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n color: #000;\n"],["\n position: absolute;\n top: 0;\n right: 0;\n color: #000;\n"]))),oe=V.default(G.TextInput)(R||(R=__makeTemplateObject(["\n padding-left: 42px;\n\n &:focus {\n background: #3f3f3f;\n color: #fff;\n }\n"],["\n padding-left: 42px;\n\n &:focus {\n background: #3f3f3f;\n color: #fff;\n }\n"]))),ue=V.default.div(D||(D=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));$.SearchInput=function SearchInput(w){var $=K.useI18n(),x=W.useRef(w.value);return W.useEffect((function(){x.current===w.value||w.value||w.onClear(),x.current=w.value}),[w.value]),W.createElement(ue,null,W.createElement(J,{icon:"search"}),W.createElement(oe,{type:"search",value:w.value,placeholder:$("Neos.Neos:Main:search"),onChange:w.onChange}),w.value&&W.createElement(ie,{icon:"times",onClick:w.onClear}))}},function(w,$,x){"use strict";var __assign=function(){return(__assign=Object.assign||function(w){for(var $,x=1,E=arguments.length;x0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.SelectNodeTypeFilter=void 0;var k=__importStar(x(0)),I=x(55),R=x(73),D=x(16),W=x(12),V=x(98);$.SelectNodeTypeFilter=function SelectNodeTypeFilter(w){var $=W.useI18n(),x=__read(k.useState(""),2),E=x[0],C=x[1],G=I.useAsync((function(){return __awaiter(void 0,void 0,void 0,(function(){var x;return __generator(this,(function(E){switch(E.label){case 0:return[4,V.getNodeTypeFilterOptions({baseNodeTypeFilter:w.baseNodeTypeFilter})];case 1:if("success"in(x=E.sent()))return[2,x.success.options.map((function(w){return __assign(__assign({},w),{label:$(w.label)})}))];if("error"in x)throw new R.VError(x.error.message);throw new R.VError("Unable to fetch node type filter options")}}))}))}),[w.baseNodeTypeFilter]),K=k.useMemo((function(){var w;return function searchNodeTypeFilterOptions(w,$){return $.filter((function($){return-1!==$.label.toLowerCase().indexOf(w.toLowerCase())}))}(E,null!==(w=G.value)&&void 0!==w?w:[])}),[E,G.value]);return k.createElement(D.SelectBox,{disabled:G.loading||G.error,placeholder:$("Neos.Neos:Main:filter"),placeholderIcon:"filter",onValueChange:w.onChange,allowEmpty:!0,value:w.value,options:K,displaySearchBox:!0,searchTerm:E,onSearchTermChange:C,threshold:0,noMatchesFoundLabel:$("Neos.Neos:Main:noMatchesFound"),searchBoxLeftToTypeLabel:$("Neos.Neos:Main:searchBoxLeftToType")})}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.getNodeSummary=void 0;var E=x(229);Object.defineProperty($,"getNodeSummary",{enumerable:!0,get:function get(){return E.getNodeSummary}})},function(w,$,x){"use strict";var __awaiter=function(w,$,x,E){return new(x||(x=Promise))((function(C,k){function fulfilled(w){try{step(E.next(w))}catch(w){k(w)}}function rejected(w){try{step(E.throw(w))}catch(w){k(w)}}function step(w){w.done?C(w.value):function adopt(w){return w instanceof x?w:new x((function($){$(w)}))}(w.value).then(fulfilled,rejected)}step((E=E.apply(w,$||[])).next())}))},__generator=function(w,$){var x,E,C,k,I={label:0,sent:function sent(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return k={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k;function verb(k){return function(R){return function step(k){if(x)throw new TypeError("Generator is already executing.");for(;I;)try{if(x=1,E&&(C=2&k[0]?E.return:k[0]?E.throw||((C=E.return)&&C.call(E),0):E.next)&&!(C=C.call(E,k[1])).done)return C;switch(E=0,C&&(k=[2&k[0],C.value]),k[0]){case 0:case 1:C=k;break;case 4:return I.label++,{value:k[1],done:!1};case 5:I.label++,E=k[1],k=[0];continue;case 7:k=I.ops.pop(),I.trys.pop();continue;default:if(!(C=I.trys,(C=C.length>0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]=w.length&&(w=void 0),{value:w&&w[E++],done:!w}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=function(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.getNodeSummary=void 0;var E=x(12);$.getNodeSummary=function getNodeSummary(w){return __awaiter(this,void 0,void 0,(function(){var $,x,C,k,I,R,D,W,V,G,K,J,ie,oe,ue;return __generator(this,(function(ae){switch(ae.label){case 0:($=new URLSearchParams).set("workspaceName",w.workspaceName);try{for(x=__values(Object.entries(w.dimensionValues)),C=x.next();!C.done;C=x.next()){k=__read(C.value,2),I=k[0],R=k[1];try{for(oe=void 0,D=__values(R),W=D.next();!W.done;W=D.next())V=W.value,$.set("dimensionValues["+I+"][]",V)}catch(w){oe={error:w}}finally{try{W&&!W.done&&(ue=D.return)&&ue.call(D)}finally{if(oe)throw oe.error}}}}catch(w){J={error:w}}finally{try{C&&!C.done&&(ie=x.return)&&ie.call(x)}finally{if(J)throw J.error}}$.set("nodeId",w.nodeId),ae.label=1;case 1:return ae.trys.push([1,3,,4]),[4,E.fetchWithErrorHandling.withCsrfToken((function(w){return{url:"/sitegeist/archaeopteryx/get-node-summary?"+$.toString(),method:"GET",credentials:"include",headers:{"X-Flow-Csrftoken":w,"Content-Type":"application/json"}}}))];case 2:return G=ae.sent(),[2,E.fetchWithErrorHandling.parseJson(G)];case 3:throw K=ae.sent(),E.fetchWithErrorHandling.generalErrorHandler(K),K;case 4:return[2]}}))}))}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.Asset=void 0;var E=x(231);Object.defineProperty($,"Asset",{enumerable:!0,get:function get(){return E.Asset}})},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.Asset=void 0;var k=__importStar(x(0)),I=x(12),R=x(43),D=x(30),W=x(38),V=x(232);$.Asset=D.makeLinkType("Sitegeist.Archaeopteryx:Asset",(function(w){var $=w.createError;return{supportedLinkOptions:["title","targetBlank","relNofollow"],isSuitableFor:function isSuitableFor(w){return w.href.startsWith("asset://")},useResolvedModel:function useResolvedModel(w){var x=/asset:\/\/(.*)/.exec(w.href);return x?R.Process.success({identifier:x[1]}):R.Process.error($('Cannot handle href "'+w.href+'".'))},convertModelToLink:function convertModelToLink(w){return{href:"asset://"+w.identifier}},TabHeader:function TabHeader(){var w=I.useI18n();return k.createElement(W.IconLabel,{icon:"camera"},w("Sitegeist.Archaeopteryx:LinkTypes.Asset:title"))},Preview:function Preview(w){var $,x,E=w.model,C=I.useAssetSummary(E.identifier);return C.value?k.createElement(W.ImageCard,{label:null===($=C.value)||void 0===$?void 0:$.label,src:null===(x=C.value)||void 0===x?void 0:x.preview}):null},Editor:function Editor(w){var $=w.model,x=I.useI18n();return k.createElement(R.Field,{name:"identifier",initialValue:null==$?void 0:$.identifier,validate:function validate(w){if(!w)return x("Sitegeist.Archaeopteryx:LinkTypes.Asset:identifier.validation.required")}},(function(w){var $=w.input;return k.createElement(V.MediaBrowser,{assetIdentifier:$.value,onSelectAsset:$.onChange})}))}}}))},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.MediaBrowser=void 0;var k=__importStar(x(0)),I=x(12);$.MediaBrowser=function MediaBrowser(w){var $=I.useRoutes((function(w){var $,x;return null===(x=null===($=w.core)||void 0===$?void 0:$.modules)||void 0===x?void 0:x.mediaBrowser}));if(k.useEffect((function(){window.NeosMediaBrowserCallbacks={assetChosen:function assetChosen($){w.onSelectAsset($)}}}),[w.onSelectAsset]),!$)throw new Error("[Sitegeist.Archaeopteryx]: Could not resolve mediaBrowserUri.");return w.assetIdentifier?k.createElement("iframe",{name:"neos-media-selection-screen",src:$+"/images/edit.html?asset[__identity]="+w.assetIdentifier,style:{width:"calc(100vw - 160px)",maxWidth:"1260px",height:"calc(100vh - 480px)"},frameBorder:"0",onLoad:function onLoad(w){var $,x,E=w.target.contentDocument;E&&(E.body.style.overflowX="hidden",E.body.style.padding="0",null===($=E.querySelector("form > .neos-footer"))||void 0===$||$.remove(),null===(x=E.querySelectorAll("input, select, textarea"))||void 0===x||x.forEach((function(w){w.readOnly=!0})))}}):k.createElement("iframe",{name:"neos-media-selection-screen",src:$+"/assets/index.html",style:{width:"calc(100vw - 160px)",maxWidth:"1260px",height:"calc(100vh - 480px)"},frameBorder:"0",onLoad:function onLoad(w){var $=w.target.contentDocument;$&&($.body.style.overflowX="hidden",$.body.style.padding="0")}})}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.MailTo=void 0;var E=x(234);Object.defineProperty($,"MailTo",{enumerable:!0,get:function get(){return E.MailTo}})},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.MailTo=void 0;var k=__importStar(x(0)),I=x(12),R=x(43),D=x(30),W=x(38),V=/^[^\s@]+@[^\s@]+$/;$.MailTo=D.makeLinkType("Sitegeist.Archaeopteryx:MailTo",(function(w){var $=w.createError;return{isSuitableFor:function isSuitableFor(w){return w.href.startsWith("mailto:")},useResolvedModel:function useResolvedModel(w){var x,E,C,k;if(!w.href.startsWith("mailto:"))return R.Process.error($('Cannot handle href "'+w.href+'".'));var I=new URL(w.href);return R.Process.success({recipient:I.pathname,subject:null!==(x=I.searchParams.get("subject"))&&void 0!==x?x:void 0,cc:null!==(E=I.searchParams.get("cc"))&&void 0!==E?E:void 0,bcc:null!==(C=I.searchParams.get("bcc"))&&void 0!==C?C:void 0,body:null!==(k=I.searchParams.get("body"))&&void 0!==k?k:void 0})},convertModelToLink:function convertModelToLink(w){var $="mailto:"+w.recipient+"?";return w.subject&&($+="subject="+w.subject),w.cc&&!w.subject?$+="cc="+w.cc:w.cc&&($+="&cc="+w.cc),!w.bcc||w.subject||w.cc?w.bcc&&($+="&bcc="+w.bcc):$+="bcc="+w.bcc,!w.body||w.subject||w.cc||w.bcc?w.body&&($+="&body="+w.body):$+="body="+w.body,{href:$}},TabHeader:function TabHeader(){var w=I.useI18n();return k.createElement(W.IconLabel,{icon:"envelope"},w("Sitegeist.Archaeopteryx:LinkTypes.MailTo:title"))},Preview:function Preview(w){var $,x,E=w.model;return k.createElement(W.IconCard,{icon:"envelope",title:E.recipient,subTitle:E.subject||E.body?((null!==($=E.subject)&&void 0!==$?$:"")+" "+(null!==(x=E.body)&&void 0!==x?x:"")).trim():void 0})},Editor:function Editor(w){var $,x,E,C,D=w.model,G=w.options,K=I.useI18n();return k.createElement(W.Layout.Columns,null,k.createElement(R.Field,{name:"recipient",initialValue:null==D?void 0:D.recipient,validate:function validate(w){return w?V.test(w)?void 0:K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:recipient.validation.email"):K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:recipient.validation.required")}},(function(w){var $=w.input,x=w.meta;return k.createElement("div",{style:{gridColumn:"1 / -1"}},k.createElement(R.EditorEnvelope,{label:K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:recipient.label"),editor:"Neos.Neos/Inspector/Editors/TextFieldEditor",input:$,meta:x}))})),!1!==(null===($=G.enabledFields)||void 0===$?void 0:$.subject)?k.createElement(R.Field,{name:"subject",initialValue:null==D?void 0:D.subject},(function(w){var $=w.input,x=w.meta;return k.createElement("div",{style:{gridColumn:"1 / -1"}},k.createElement(R.EditorEnvelope,{label:K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:subject.label"),editor:"Neos.Neos/Inspector/Editors/TextFieldEditor",input:$,meta:x}))})):null,!1!==(null===(x=G.enabledFields)||void 0===x?void 0:x.cc)?k.createElement(R.Field,{name:"cc",initialValue:null==D?void 0:D.cc,validate:function validate(w){if(null!=w&&!w.split(",").every((function(w){return V.test(w.trim())})))return K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:cc.validation.emaillist")}},(function(w){var $=w.input,x=w.meta;return k.createElement("div",{style:{gridColumn:"1 / -1"}},k.createElement(R.EditorEnvelope,{label:K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:cc.label"),editor:"Neos.Neos/Inspector/Editors/TextFieldEditor",editorOptions:{placeholder:K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:cc.placeholder")},input:$,meta:x}))})):null,!1!==(null===(E=G.enabledFields)||void 0===E?void 0:E.bcc)?k.createElement(R.Field,{name:"bcc",initialValue:null==D?void 0:D.bcc,validate:function validate(w){if(null!=w&&!w.split(",").every((function(w){return V.test(w.trim())})))return K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:bcc.validation.emaillist")}},(function(w){var $=w.input,x=w.meta;return k.createElement("div",{style:{gridColumn:"1 / -1"}},k.createElement(R.EditorEnvelope,{label:K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:bcc.label"),editor:"Neos.Neos/Inspector/Editors/TextFieldEditor",editorOptions:{placeholder:K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:bcc.placeholder")},input:$,meta:x}))})):null,!1!==(null===(C=G.enabledFields)||void 0===C?void 0:C.body)?k.createElement(R.Field,{name:"body",initialValue:null==D?void 0:D.body},(function(w){var $=w.input,x=w.meta;return k.createElement("div",{style:{gridColumn:"1 / -1"}},k.createElement(R.EditorEnvelope,{label:K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:body.label"),editor:"Neos.Neos/Inspector/Editors/TextAreaEditor",input:$,meta:x}))})):null)}}}))},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.PhoneNumber=void 0;var E=x(236);Object.defineProperty($,"PhoneNumber",{enumerable:!0,get:function get(){return E.PhoneNumber}})},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__read=function(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.PhoneNumber=void 0;var k=__importStar(x(0)),I=x(0),R=x(69),D=x(16),W=x(12),V=x(248),G=x(30),K=x(43),J=x(38);$.PhoneNumber=G.makeLinkType("Sitegeist.Archaeopteryx:PhoneNumber",(function(w){var $=w.createError;return{isSuitableFor:function isSuitableFor(w){return w.href.startsWith("tel:")},useResolvedModel:function useResolvedModel(w){var x=V.parsePhoneNumber(w.href.replace("tel:",""));return x?K.Process.success({phoneNumber:x.number.replace("+"+x.countryCallingCode,""),countryCallingCode:"+"+x.countryCallingCode.toString()}):K.Process.error($('Cannot handle href "'+w.href+'".'))},convertModelToLink:function convertModelToLink(w){return{href:"tel:"+w.countryCallingCode+w.phoneNumber}},TabHeader:function TabHeader(){var w=W.useI18n();return k.createElement(J.IconLabel,{icon:"phone-alt"},w("Sitegeist.Archaeopteryx:LinkTypes.PhoneNumber:title"))},Preview:function Preview(w){var $=w.model;return k.createElement(J.IconCard,{icon:"phone-alt",title:(new V.AsYouType).input(""+$.countryCallingCode+$.phoneNumber)})},Editor:function Editor(w){var $,x=w.model,E=w.options,C=(null==x?void 0:x.countryCallingCode)||((null==E?void 0:E.defaultCountry)?"+"+V.getCountryCallingCode(null==E?void 0:E.defaultCountry).toString():"+"+V.getCountryCallingCode(V.getCountries()[0]).toString()),G=__read(I.useState(C),2),J=G[0],ie=G[1],oe=W.useI18n(),ue={};null===($=E.favoredCountries)||void 0===$||$.map((function(w){ue["+"+V.getCountryCallingCode(w)]?ue["+"+V.getCountryCallingCode(w)]={value:"+"+V.getCountryCallingCode(w),label:ue["+"+V.getCountryCallingCode(w)].label.split(/\s\+/)[0]+", "+w+" +"+V.getCountryCallingCode(w)}:ue["+"+V.getCountryCallingCode(w)]={value:"+"+V.getCountryCallingCode(w),label:w+" +"+V.getCountryCallingCode(w)}})),V.getCountries().map((function(w){var $;(null===($=E.favoredCountries)||void 0===$?void 0:$.includes(w))||(ue["+"+V.getCountryCallingCode(w)]?ue["+"+V.getCountryCallingCode(w)]={value:"+"+V.getCountryCallingCode(w),label:ue["+"+V.getCountryCallingCode(w)].label.split(/\s\+/)[0]+", "+w+" +"+V.getCountryCallingCode(w)}:ue["+"+V.getCountryCallingCode(w)]={value:"+"+V.getCountryCallingCode(w),label:w+" +"+V.getCountryCallingCode(w)})}));var ae=/^[1-9][0-9]*$/;return k.createElement("div",null,k.createElement("label",{htmlFor:"linkTypeProps.Sitegeist_Archaeopteryx:PhoneNumber.phoneNumber"},oe("Sitegeist.Archaeopteryx:LinkTypes.PhoneNumber:phoneNumber.label")),k.createElement("div",{style:{display:"grid",gridTemplateColumns:"160px 1fr",minWidth:"600px"}},k.createElement(K.Field,{name:"countryCallingCode",format:function format(w){return void 0===w&&""===w||ie(w),""!==w&&void 0!==w||R.useForm().change("linkTypeProps.Sitegeist_Archaeopteryx:PhoneNumber.countryCallingCode",J),w},initialValue:J||C,validate:function validate(w){if(!w)return oe("Sitegeist.Archaeopteryx:LinkTypes.PhoneNumber:countryCallingCode.validation.required")}},(function(w){var $=w.input;return k.createElement("div",{style:{margin:"0.25rem 0 0 0"}},k.createElement(D.SelectBox,{allowEmpty:!1,options:Object.values(ue),onValueChange:function onValueChange(w){ie(w),$.onChange(w)},value:$.value}))})),k.createElement(K.Field,{name:"phoneNumber",initialValue:null==x?void 0:x.phoneNumber,validate:function validate(w){return w?ae.test(w)?void 0:oe("Sitegeist.Archaeopteryx:LinkTypes.PhoneNumber:phoneNumber.validation.numbersOnly"):oe("Sitegeist.Archaeopteryx:LinkTypes.PhoneNumber:phoneNumber.validation.required")}},(function(w){var $=w.input,x=w.meta;return k.createElement(K.EditorEnvelope,{label:"",editor:"Neos.Neos/Inspector/Editors/TextFieldEditor",editorOptions:{placeholder:oe("Sitegeist.Archaeopteryx:LinkTypes.PhoneNumber:phoneNumber.placeholder")},input:$,meta:x})}))))}}}))},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.CustomLink=void 0;var E=x(238);Object.defineProperty($,"CustomLink",{enumerable:!0,get:function get(){return E.CustomLink}})},function(w,$,x){"use strict";var __assign=function(){return(__assign=Object.assign||function(w){for(var $,x=1,E=arguments.length;x...'})},Editor:function Editor(w){var $=w.model,x=I.useI18n();return k.createElement("div",null,k.createElement("label",null,x("Sitegeist.Archaeopteryx:LinkTypes.CustomLink:customLink.label")),k.createElement("div",{style:{display:"grid",gridTemplateColumns:"400px 1fr",minWidth:"600px"}},k.createElement(W.Field,{name:"customLink",initialValue:null==$?void 0:$.customLink,validate:function validate(w){if(!w)return x("Sitegeist.Archaeopteryx:LinkTypes.CustomLink:validation.required")}},(function(w){var $=w.input;return k.createElement(R.TextInput,__assign({id:$.name,type:"text",placeHolder:x("Sitegeist.Archaeopteryx:LinkTypes.CustomLink:customLink.placeholder")},$))}))))}}}))},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.registerDialog=void 0;var k=__importStar(x(0)),I=x(12),R=x(30),D=x(240);$.registerDialog=function registerDialog(w,$){var x=w.globalRegistry.get("containers");null==x||x.set("Modals/Sitegeist.Archaeopteryx",(function(x){return k.createElement(I.NeosContext.Provider,{value:w},k.createElement(R.EditorContext.Provider,{value:$},k.createElement(D.Dialog,x)))}))}},function(w,$,x){"use strict";var __assign=function(){return(__assign=Object.assign||function(w){for(var $,x=1,E=arguments.length;x0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.Dialog=void 0;var k=__importStar(x(0)),I=x(69),R=x(55),D=x(16),W=x(12),V=x(78),G=x(43),K=x(30),J=x(38),ie=x(241),oe=x(242);$.Dialog=function Dialog(){var w=W.useI18n(),$=K.useLinkTypes(),x=W.useSelector((function(w){var $;return!(null===($=w.system)||void 0===$?void 0:$.authenticationTimeout)})),E=K.useEditorTransactions(),C=E.dismiss,G=E.apply,ie=E.unset,oe=K.useEditorState(),se=oe.isOpen,de=oe.initialValue,le=__read(k.useState(!1),2),pe=le[0],he=le[1],ve=k.useCallback((function(w){var x,E=$.find((function($){return $.id===w.linkTypeId}));if(E){var C=null===(x=w.linkTypeProps)||void 0===x?void 0:x[E.id.split(".").join("_")];if(C){var k=__assign(__assign({},E.convertModelToLink(C)),{options:w.options?Object.keys(w.options).filter((function(w){return E.supportedLinkOptions.includes(w)})).reduce((function($,x){return $[x]=w.options[x],$}),{}):{}});G(k),he(!1)}}else pe&&(ie(),he(!1))}),[$,pe]);return R.useKey("Escape",C),se&&x?k.createElement(J.Modal,{renderTitle:function renderTitle(){return k.createElement("div",null,w("Sitegeist.Archaeopteryx:Main:dialog.title"))},renderBody:function renderBody(){return k.createElement(I.Form,{onSubmit:ve},(function($){var x=$.handleSubmit,E=$.valid,I=$.dirty;$.values;return k.createElement(V.ErrorBoundary,null,k.createElement(J.Form,{renderBody:function renderBody(){return null===de||pe?k.createElement(ue,{valid:E,onDelete:function onDelete(){return he(!0)}}):k.createElement(ae,{value:de,onDelete:function onDelete(){return he(!0)}})},renderActions:function renderActions(){return k.createElement(k.Fragment,null,k.createElement(D.Button,{onClick:C},w("Sitegeist.Archaeopteryx:Main:dialog.action.cancel")),E&&I||!pe?k.createElement(D.Button,{style:"success",type:"submit",disabled:!E||!I},w("Sitegeist.Archaeopteryx:Main:dialog.action.apply")):k.createElement(D.Button,{style:"success",type:"button",onClick:ie},w("Sitegeist.Archaeopteryx:Main:dialog.action.apply")))},onSubmit:x}))}))}}):(pe&&he(!1),null)};var ue=function DialogWithEmptyValue(w){var $,x=I.useForm(),E=K.useEditorState(),C=E.enabledLinkOptions,R=E.editorOptions,D=K.useSortedAndFilteredLinkTypes();return k.createElement(G.Field,{name:"linkTypeId",initialValue:null===($=D[0])||void 0===$?void 0:$.id},(function($){var E=$.input;return k.createElement(J.Tabs,{lazy:!0,from:D,activeItemKey:E.value,getKey:function getKey(w){return w.id},renderHeader:function renderHeader(w){var $,x,E=w.id,C=w.TabHeader;return k.createElement(C,{options:null!==(x=null===($=R.linkTypes)||void 0===$?void 0:$[E])&&void 0!==x?x:{}})},renderPanel:function renderPanel($){var E,I,D,W,G=$.Preview,K=null===(E=x.getState().values.linkTypeProps)||void 0===E?void 0:E[$.id.split(".").join("_")];return k.createElement(J.Layout.Stack,null,w.valid&&K?k.createElement(J.Deletable,{onDelete:function onDelete(){w.onDelete(),x.change("linkTypeProps",null)}},k.createElement(V.ErrorBoundary,null,k.createElement(G,{model:null===(I=x.getState().values.linkTypeProps)||void 0===I?void 0:I[$.id.split(".").join("_")],options:null!==(W=null===(D=R.linkTypes)||void 0===D?void 0:D[$.id])&&void 0!==W?W:{},link:{href:""}}))):null,k.createElement("div",{style:{overflow:"auto"}},k.createElement(ie.LinkEditor,{key:$.id,link:null,linkType:$}),C.length&&$.supportedLinkOptions.length?k.createElement(oe.Settings,{enabledLinkOptions:C.filter((function(w){return $.supportedLinkOptions.includes(w)}))}):null))},onSwitchTab:E.onChange})}))},ae=function DialogWithValue(w){var $,x,E,C=I.useForm(),R=K.useEditorState(),D=R.enabledLinkOptions,W=R.editorOptions,ue=K.useLinkTypeForHref(w.value.href),ae=ue.useResolvedModel(w.value).result,se=ue.Preview,de=C.getState(),le=null!==(x=de.valid?null===($=de.values.linkTypeProps)||void 0===$?void 0:$[ue.id.split(".").join("_")]:ae)&&void 0!==x?x:ae,pe=K.useSortedAndFilteredLinkTypes();return k.createElement(G.Field,{name:"linkTypeId",initialValue:null===(E=pe[0])||void 0===E?void 0:E.id},(function($){var x=$.input;return k.createElement(J.Tabs,{lazy:!0,from:pe,activeItemKey:x.value||ue.id,getKey:function getKey(w){return w.id},renderHeader:function renderHeader(w){var $,x,E=w.id,C=w.TabHeader;return k.createElement(C,{options:null!==(x=null===($=W.linkTypes)||void 0===$?void 0:$[E])&&void 0!==x?x:{}})},renderPanel:function renderPanel($){var x,E,I,R=null===(x=C.getState().values.linkTypeProps)||void 0===x?void 0:x[$.id.split(".").join("_")],G=$.Preview,K=R;return(!R||"Sitegeist.Archaeopteryx:Web"===$.id&&!(null==R?void 0:R.urlWithoutProtocol)||"Sitegeist.Archaeopteryx:PhoneNumber"===$.id&&!(null==R?void 0:R.phoneNumber)||"Sitegeist.Archaeopteryx:CustomLink"===$.id&&!(null==R?void 0:R.CustomLink))&&(G=se,K=le),k.createElement(J.Layout.Stack,null,K?k.createElement(J.Deletable,{onDelete:function onDelete(){w.onDelete(),C.change("linkTypeProps",null)}},k.createElement(V.ErrorBoundary,null,k.createElement(G,{model:K,options:null!==(I=null===(E=W.linkTypes)||void 0===E?void 0:E[$.id])&&void 0!==I?I:{},link:w.value}))):null,k.createElement(ie.LinkEditor,{key:$.id,link:$.isSuitableFor(w.value)?w.value:null,linkType:$}),D.length&&$.supportedLinkOptions.length?k.createElement(oe.Settings,{initialValue:w.value.options,enabledLinkOptions:D.filter((function(w){return $.supportedLinkOptions.includes(w)}))}):null)},onSwitchTab:x.onChange})}))}},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.LinkEditor=void 0;var k=__importStar(x(0)),I=x(78),R=x(43),D=x(30);$.LinkEditor=function LinkEditor(w){return k.createElement(I.ErrorBoundary,null,null===w.link?k.createElement(W,{linkType:w.linkType}):k.createElement(V,{link:w.link,linkType:w.linkType}))};var W=function LinkEditorWithoutValue(w){var $,x,E=D.useEditorState().editorOptions,C=w.linkType.Editor,I="linkTypeProps."+w.linkType.id.split(".").join("_");return k.createElement(R.FieldGroup,{prefix:I},k.createElement(C,{model:null,options:null!==(x=null===($=E.linkTypes)||void 0===$?void 0:$[w.linkType.id])&&void 0!==x?x:{},link:null}))},V=function LinkEditorWithValue(w){var $,x,E,C,I,W=D.useEditorState().editorOptions,V=w.linkType.useResolvedModel(w.link),G=V.busy,K=V.error,J=function useLastNonNull(w){var $=k.useRef(w);return null!==w&&($.current=w),$.current}(V.result),ie=w.linkType,oe=ie.Editor,ue=ie.LoadingEditor;if(K)throw K;return G&&!J?k.createElement(ue,{link:null!==($=w.link)&&void 0!==$?$:void 0,options:null!==(E=null===(x=W.linkTypes)||void 0===x?void 0:x[w.linkType.id])&&void 0!==E?E:{}}):k.createElement(R.FieldGroup,{prefix:"linkTypeProps."+w.linkType.id.split(".").join("_")},k.createElement(oe,{model:J,options:null!==(I=null===(C=W.linkTypes)||void 0===C?void 0:C[w.linkType.id])&&void 0!==I?I:{},link:w.link}))}},function(w,$,x){"use strict";var __assign=function(){return(__assign=Object.assign||function(w){for(var $,x=1,E=arguments.length;x0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.LinkButton=void 0;var k=__importStar(x(0)),I=x(16),R=x(67),D=x(12);$.LinkButton=function LinkButton(w){var $,x,E,C,W,V,G,K,J=D.useI18n(),ie=R.useEditorTransactions(),oe=__assign(__assign({},null===(x=null===($=w.inlineEditorOptions)||void 0===$?void 0:$.linking)||void 0===x?void 0:x["Sitegeist.Archaeopteryx"]),{linkTypes:__assign({},null===(W=null===(C=null===(E=w.inlineEditorOptions)||void 0===E?void 0:E.linking)||void 0===C?void 0:C["Sitegeist.Archaeopteryx"])||void 0===W?void 0:W.linkTypes)});(null===(G=null===(V=w.inlineEditorOptions)||void 0===V?void 0:V.linking)||void 0===G?void 0:G.startingPoint)&&(oe.linkTypes["Sitegeist.Archaeopteryx:Node"]=__assign(__assign({},oe.linkTypes["Sitegeist.Archaeopteryx:Node"]),{startingPoint:null!==(K=oe.linkTypes["Sitegeist.Archaeopteryx:Node"].startingPoint)&&void 0!==K?K:w.inlineEditorOptions.linking.startingPoint}));var ue=k.useCallback((function(){return __awaiter(void 0,void 0,void 0,(function(){var $,x,E,C,k,I,R,D,W,V;return __generator(this,(function(G){switch(G.label){case 0:return $=function(){if(w.formattingUnderCursor.link){var $=__read(w.formattingUnderCursor.link.split("#"),2);return{href:$[0],options:{anchor:$[1],title:w.formattingUnderCursor.linkTitle,targetBlank:w.formattingUnderCursor.linkTargetBlank,relNofollow:w.formattingUnderCursor.linkRelNofollow}}}return null}(),x=function(){var $,x,E,C,k,I,R,D,W=[];return(null===(x=null===($=w.inlineEditorOptions)||void 0===$?void 0:$.linking)||void 0===x?void 0:x.anchor)&&W.push("anchor"),(null===(C=null===(E=w.inlineEditorOptions)||void 0===E?void 0:E.linking)||void 0===C?void 0:C.title)&&W.push("title"),(null===(I=null===(k=w.inlineEditorOptions)||void 0===k?void 0:k.linking)||void 0===I?void 0:I.relNofollow)&&W.push("relNofollow"),(null===(D=null===(R=w.inlineEditorOptions)||void 0===R?void 0:R.linking)||void 0===D?void 0:D.targetBlank)&&W.push("targetBlank"),W}(),[4,ie.editLink($,x,oe)];case 1:return(E=G.sent()).change?null===E.value?(w.executeCommand("linkTitle",!1,!1),w.executeCommand("linkRelNofollow",!1,!1),w.executeCommand("linkTargetBlank",!1,!1),w.executeCommand("unlink",void 0,!0)):(w.executeCommand("linkTitle",(null===(C=E.value.options)||void 0===C?void 0:C.title)||!1,!1),w.executeCommand("linkTargetBlank",null!==(I=null===(k=E.value.options)||void 0===k?void 0:k.targetBlank)&&void 0!==I&&I,!1),w.executeCommand("linkRelNofollow",null!==(D=null===(R=E.value.options)||void 0===R?void 0:R.relNofollow)&&void 0!==D&&D,!1),(null===(W=E.value.options)||void 0===W?void 0:W.anchor)?w.executeCommand("link",E.value.href+"#"+(null===(V=E.value.options)||void 0===V?void 0:V.anchor),!0):w.executeCommand("link",E.value.href,!0)):(w.executeCommand("undo",void 0,!0),w.executeCommand("redo",void 0,!0)),[2]}}))}))}),[w.executeCommand,w.formattingUnderCursor.link,ie,oe]);return k.createElement(I.IconButton,{title:J("Sitegeist.Archaeopteryx:Main:linkButton.title"),isActive:Boolean(w.formattingUnderCursor.link),icon:Boolean(w.formattingUnderCursor.link)?"unlink":"link",onClick:ue})}},function(w,$,x){"use strict";x.r($),x.d($,"audit",(function(){return audit})),x.d($,"auditTime",(function(){return auditTime})),x.d($,"buffer",(function(){return buffer_buffer})),x.d($,"bufferCount",(function(){return bufferCount})),x.d($,"bufferTime",(function(){return bufferTime})),x.d($,"bufferToggle",(function(){return bufferToggle})),x.d($,"bufferWhen",(function(){return bufferWhen})),x.d($,"catchError",(function(){return catchError})),x.d($,"combineAll",(function(){return combineAll})),x.d($,"combineLatest",(function(){return combineLatest_combineLatest})),x.d($,"concat",(function(){return concat_concat})),x.d($,"concatAll",(function(){return Le.a})),x.d($,"concatMap",(function(){return concatMap})),x.d($,"concatMapTo",(function(){return concatMapTo})),x.d($,"count",(function(){return count_count})),x.d($,"debounce",(function(){return debounce})),x.d($,"debounceTime",(function(){return debounceTime})),x.d($,"defaultIfEmpty",(function(){return defaultIfEmpty})),x.d($,"delay",(function(){return delay_delay})),x.d($,"delayWhen",(function(){return delayWhen})),x.d($,"dematerialize",(function(){return dematerialize})),x.d($,"distinct",(function(){return distinct})),x.d($,"distinctUntilChanged",(function(){return distinctUntilChanged})),x.d($,"distinctUntilKeyChanged",(function(){return distinctUntilKeyChanged})),x.d($,"elementAt",(function(){return elementAt})),x.d($,"endWith",(function(){return endWith})),x.d($,"every",(function(){return every})),x.d($,"exhaust",(function(){return exhaust})),x.d($,"exhaustMap",(function(){return exhaustMap})),x.d($,"expand",(function(){return expand})),x.d($,"filter",(function(){return mt.a})),x.d($,"finalize",(function(){return finalize})),x.d($,"find",(function(){return find})),x.d($,"findIndex",(function(){return findIndex})),x.d($,"first",(function(){return first})),x.d($,"groupBy",(function(){return Dt.b})),x.d($,"ignoreElements",(function(){return ignoreElements})),x.d($,"isEmpty",(function(){return isEmpty})),x.d($,"last",(function(){return last})),x.d($,"map",(function(){return Tt.a})),x.d($,"mapTo",(function(){return mapTo})),x.d($,"materialize",(function(){return materialize})),x.d($,"max",(function(){return max_max})),x.d($,"merge",(function(){return merge_merge})),x.d($,"mergeAll",(function(){return tr.a})),x.d($,"mergeMap",(function(){return De.b})),x.d($,"flatMap",(function(){return De.a})),x.d($,"mergeMapTo",(function(){return mergeMapTo})),x.d($,"mergeScan",(function(){return mergeScan})),x.d($,"min",(function(){return min_min})),x.d($,"multicast",(function(){return multicast})),x.d($,"observeOn",(function(){return ur.b})),x.d($,"onErrorResumeNext",(function(){return onErrorResumeNext})),x.d($,"pairwise",(function(){return pairwise})),x.d($,"partition",(function(){return partition})),x.d($,"pluck",(function(){return pluck})),x.d($,"publish",(function(){return publish})),x.d($,"publishBehavior",(function(){return publishBehavior})),x.d($,"publishLast",(function(){return publishLast})),x.d($,"publishReplay",(function(){return publishReplay})),x.d($,"race",(function(){return race_race})),x.d($,"reduce",(function(){return reduce})),x.d($,"repeat",(function(){return repeat})),x.d($,"repeatWhen",(function(){return repeatWhen})),x.d($,"retry",(function(){return retry})),x.d($,"retryWhen",(function(){return retryWhen})),x.d($,"refCount",(function(){return Or.a})),x.d($,"sample",(function(){return sample})),x.d($,"sampleTime",(function(){return sampleTime})),x.d($,"scan",(function(){return scan})),x.d($,"sequenceEqual",(function(){return sequenceEqual})),x.d($,"share",(function(){return share})),x.d($,"shareReplay",(function(){return shareReplay})),x.d($,"single",(function(){return single})),x.d($,"skip",(function(){return skip})),x.d($,"skipLast",(function(){return skipLast})),x.d($,"skipUntil",(function(){return skipUntil})),x.d($,"skipWhile",(function(){return skipWhile})),x.d($,"startWith",(function(){return startWith})),x.d($,"subscribeOn",(function(){return subscribeOn})),x.d($,"switchAll",(function(){return switchAll})),x.d($,"switchMap",(function(){return switchMap})),x.d($,"switchMapTo",(function(){return switchMapTo})),x.d($,"take",(function(){return take})),x.d($,"takeLast",(function(){return takeLast})),x.d($,"takeUntil",(function(){return takeUntil})),x.d($,"takeWhile",(function(){return takeWhile})),x.d($,"tap",(function(){return tap})),x.d($,"throttle",(function(){return throttle})),x.d($,"throttleTime",(function(){return throttleTime})),x.d($,"throwIfEmpty",(function(){return throwIfEmpty})),x.d($,"timeInterval",(function(){return timeInterval})),x.d($,"timeout",(function(){return timeout})),x.d($,"timeoutWith",(function(){return timeoutWith})),x.d($,"timestamp",(function(){return timestamp})),x.d($,"toArray",(function(){return toArray})),x.d($,"window",(function(){return window_window})),x.d($,"windowCount",(function(){return windowCount})),x.d($,"windowTime",(function(){return windowTime_windowTime})),x.d($,"windowToggle",(function(){return windowToggle})),x.d($,"windowWhen",(function(){return windowWhen})),x.d($,"withLatestFrom",(function(){return withLatestFrom})),x.d($,"zip",(function(){return zip_zip})),x.d($,"zipAll",(function(){return zipAll}));var E=x(1),C=x(3);function audit(w){return function auditOperatorFunction($){return $.lift(new k(w))}}var k=function(){function AuditOperator(w){this.durationSelector=w}return AuditOperator.prototype.call=function(w,$){return $.subscribe(new I(w,this.durationSelector))},AuditOperator}(),I=function(w){function AuditSubscriber($,x){var E=w.call(this,$)||this;return E.durationSelector=x,E.hasValue=!1,E}return E.__extends(AuditSubscriber,w),AuditSubscriber.prototype._next=function(w){if(this.value=w,this.hasValue=!0,!this.throttled){var $=void 0;try{$=(0,this.durationSelector)(w)}catch(w){return this.destination.error(w)}var x=Object(C.c)($,new C.a(this));!x||x.closed?this.clearThrottle():this.add(this.throttled=x)}},AuditSubscriber.prototype.clearThrottle=function(){var w=this.value,$=this.hasValue,x=this.throttled;x&&(this.remove(x),this.throttled=void 0,x.unsubscribe()),$&&(this.value=void 0,this.hasValue=!1,this.destination.next(w))},AuditSubscriber.prototype.notifyNext=function(){this.clearThrottle()},AuditSubscriber.prototype.notifyComplete=function(){this.clearThrottle()},AuditSubscriber}(C.b),R=x(8),D=x(86);function auditTime(w,$){return void 0===$&&($=R.a),audit((function(){return Object(D.a)(w,$)}))}function buffer_buffer(w){return function bufferOperatorFunction($){return $.lift(new W(w))}}var W=function(){function BufferOperator(w){this.closingNotifier=w}return BufferOperator.prototype.call=function(w,$){return $.subscribe(new V(w,this.closingNotifier))},BufferOperator}(),V=function(w){function BufferSubscriber($,x){var E=w.call(this,$)||this;return E.buffer=[],E.add(Object(C.c)(x,new C.a(E))),E}return E.__extends(BufferSubscriber,w),BufferSubscriber.prototype._next=function(w){this.buffer.push(w)},BufferSubscriber.prototype.notifyNext=function(){var w=this.buffer;this.buffer=[],this.destination.next(w)},BufferSubscriber}(C.b),G=x(2);function bufferCount(w,$){return void 0===$&&($=null),function bufferCountOperatorFunction(x){return x.lift(new K(w,$))}}var K=function(){function BufferCountOperator(w,$){this.bufferSize=w,this.startBufferEvery=$,this.subscriberClass=$&&w!==$?ie:J}return BufferCountOperator.prototype.call=function(w,$){return $.subscribe(new this.subscriberClass(w,this.bufferSize,this.startBufferEvery))},BufferCountOperator}(),J=function(w){function BufferCountSubscriber($,x){var E=w.call(this,$)||this;return E.bufferSize=x,E.buffer=[],E}return E.__extends(BufferCountSubscriber,w),BufferCountSubscriber.prototype._next=function(w){var $=this.buffer;$.push(w),$.length==this.bufferSize&&(this.destination.next($),this.buffer=[])},BufferCountSubscriber.prototype._complete=function(){var $=this.buffer;$.length>0&&this.destination.next($),w.prototype._complete.call(this)},BufferCountSubscriber}(G.a),ie=function(w){function BufferSkipCountSubscriber($,x,E){var C=w.call(this,$)||this;return C.bufferSize=x,C.startBufferEvery=E,C.buffers=[],C.count=0,C}return E.__extends(BufferSkipCountSubscriber,w),BufferSkipCountSubscriber.prototype._next=function(w){var $=this.bufferSize,x=this.startBufferEvery,E=this.buffers,C=this.count;this.count++,C%x==0&&E.push([]);for(var k=E.length;k--;){var I=E[k];I.push(w),I.length===$&&(E.splice(k,1),this.destination.next(I))}},BufferSkipCountSubscriber.prototype._complete=function(){for(var $=this.buffers,x=this.destination;$.length>0;){var E=$.shift();E.length>0&&x.next(E)}w.prototype._complete.call(this)},BufferSkipCountSubscriber}(G.a),oe=x(11);function bufferTime(w){var $=arguments.length,x=R.a;Object(oe.a)(arguments[arguments.length-1])&&(x=arguments[arguments.length-1],$--);var E=null;$>=2&&(E=arguments[1]);var C=Number.POSITIVE_INFINITY;return $>=3&&(C=arguments[2]),function bufferTimeOperatorFunction($){return $.lift(new ue(w,E,C,x))}}var ue=function(){function BufferTimeOperator(w,$,x,E){this.bufferTimeSpan=w,this.bufferCreationInterval=$,this.maxBufferSize=x,this.scheduler=E}return BufferTimeOperator.prototype.call=function(w,$){return $.subscribe(new se(w,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},BufferTimeOperator}(),ae=function(){return function Context(){this.buffer=[]}}(),se=function(w){function BufferTimeSubscriber($,x,E,C,k){var I=w.call(this,$)||this;I.bufferTimeSpan=x,I.bufferCreationInterval=E,I.maxBufferSize=C,I.scheduler=k,I.contexts=[];var R=I.openContext();if(I.timespanOnly=null==E||E<0,I.timespanOnly){var D={subscriber:I,context:R,bufferTimeSpan:x};I.add(R.closeAction=k.schedule(dispatchBufferTimeSpanOnly,x,D))}else{var W={subscriber:I,context:R},V={bufferTimeSpan:x,bufferCreationInterval:E,subscriber:I,scheduler:k};I.add(R.closeAction=k.schedule(dispatchBufferClose,x,W)),I.add(k.schedule(dispatchBufferCreation,E,V))}return I}return E.__extends(BufferTimeSubscriber,w),BufferTimeSubscriber.prototype._next=function(w){for(var $,x=this.contexts,E=x.length,C=0;C0;){var E=$.shift();x.next(E.buffer)}w.prototype._complete.call(this)},BufferTimeSubscriber.prototype._unsubscribe=function(){this.contexts=null},BufferTimeSubscriber.prototype.onBufferFull=function(w){this.closeContext(w);var $=w.closeAction;if($.unsubscribe(),this.remove($),!this.closed&&this.timespanOnly){w=this.openContext();var x=this.bufferTimeSpan,E={subscriber:this,context:w,bufferTimeSpan:x};this.add(w.closeAction=this.scheduler.schedule(dispatchBufferTimeSpanOnly,x,E))}},BufferTimeSubscriber.prototype.openContext=function(){var w=new ae;return this.contexts.push(w),w},BufferTimeSubscriber.prototype.closeContext=function(w){this.destination.next(w.buffer);var $=this.contexts;($?$.indexOf(w):-1)>=0&&$.splice($.indexOf(w),1)},BufferTimeSubscriber}(G.a);function dispatchBufferTimeSpanOnly(w){var $=w.subscriber,x=w.context;x&&$.closeContext(x),$.closed||(w.context=$.openContext(),w.context.closeAction=this.schedule(w,w.bufferTimeSpan))}function dispatchBufferCreation(w){var $=w.bufferCreationInterval,x=w.bufferTimeSpan,E=w.subscriber,C=w.scheduler,k=E.openContext();E.closed||(E.add(k.closeAction=C.schedule(dispatchBufferClose,x,{subscriber:E,context:k})),this.schedule(w,$))}function dispatchBufferClose(w){var $=w.subscriber,x=w.context;$.closeContext(x)}var de=x(6),le=x(18),pe=x(21);function bufferToggle(w,$){return function bufferToggleOperatorFunction(x){return x.lift(new he(w,$))}}var he=function(){function BufferToggleOperator(w,$){this.openings=w,this.closingSelector=$}return BufferToggleOperator.prototype.call=function(w,$){return $.subscribe(new ve(w,this.openings,this.closingSelector))},BufferToggleOperator}(),ve=function(w){function BufferToggleSubscriber($,x,E){var C=w.call(this,$)||this;return C.closingSelector=E,C.contexts=[],C.add(Object(le.a)(C,x)),C}return E.__extends(BufferToggleSubscriber,w),BufferToggleSubscriber.prototype._next=function(w){for(var $=this.contexts,x=$.length,E=0;E0;){var E=x.shift();E.subscription.unsubscribe(),E.buffer=null,E.subscription=null}this.contexts=null,w.prototype._error.call(this,$)},BufferToggleSubscriber.prototype._complete=function(){for(var $=this.contexts;$.length>0;){var x=$.shift();this.destination.next(x.buffer),x.subscription.unsubscribe(),x.buffer=null,x.subscription=null}this.contexts=null,w.prototype._complete.call(this)},BufferToggleSubscriber.prototype.notifyNext=function(w,$){w?this.closeBuffer(w):this.openBuffer($)},BufferToggleSubscriber.prototype.notifyComplete=function(w){this.closeBuffer(w.context)},BufferToggleSubscriber.prototype.openBuffer=function(w){try{var $=this.closingSelector.call(this,w);$&&this.trySubscribe($)}catch(w){this._error(w)}},BufferToggleSubscriber.prototype.closeBuffer=function(w){var $=this.contexts;if($&&w){var x=w.buffer,E=w.subscription;this.destination.next(x),$.splice($.indexOf(w),1),this.remove(E),E.unsubscribe()}},BufferToggleSubscriber.prototype.trySubscribe=function(w){var $=this.contexts,x=new de.a,E={buffer:[],subscription:x};$.push(E);var C=Object(le.a)(this,w,E);!C||C.closed?this.closeBuffer(E):(C.context=E,this.add(C),x.add(C))},BufferToggleSubscriber}(pe.a);function bufferWhen(w){return function($){return $.lift(new ge(w))}}var ge=function(){function BufferWhenOperator(w){this.closingSelector=w}return BufferWhenOperator.prototype.call=function(w,$){return $.subscribe(new Se(w,this.closingSelector))},BufferWhenOperator}(),Se=function(w){function BufferWhenSubscriber($,x){var E=w.call(this,$)||this;return E.closingSelector=x,E.subscribing=!1,E.openBuffer(),E}return E.__extends(BufferWhenSubscriber,w),BufferWhenSubscriber.prototype._next=function(w){this.buffer.push(w)},BufferWhenSubscriber.prototype._complete=function(){var $=this.buffer;$&&this.destination.next($),w.prototype._complete.call(this)},BufferWhenSubscriber.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},BufferWhenSubscriber.prototype.notifyNext=function(){this.openBuffer()},BufferWhenSubscriber.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},BufferWhenSubscriber.prototype.openBuffer=function(){var w=this.closingSubscription;w&&(this.remove(w),w.unsubscribe());var $,x=this.buffer;this.buffer&&this.destination.next(x),this.buffer=[];try{$=(0,this.closingSelector)()}catch(w){return this.error(w)}w=new de.a,this.closingSubscription=w,this.add(w),this.subscribing=!0,w.add(Object(C.c)($,new C.a(this))),this.subscribing=!1},BufferWhenSubscriber}(C.b);function catchError(w){return function catchErrorOperatorFunction($){var x=new we(w),E=$.lift(x);return x.caught=E}}var we=function(){function CatchOperator(w){this.selector=w}return CatchOperator.prototype.call=function(w,$){return $.subscribe(new Ce(w,this.selector,this.caught))},CatchOperator}(),Ce=function(w){function CatchSubscriber($,x,E){var C=w.call(this,$)||this;return C.selector=x,C.caught=E,C}return E.__extends(CatchSubscriber,w),CatchSubscriber.prototype.error=function($){if(!this.isStopped){var x=void 0;try{x=this.selector($,this.caught)}catch($){return void w.prototype.error.call(this,$)}this._unsubscribeAndRecycle();var E=new C.a(this);this.add(E);var k=Object(C.c)(x,E);k!==E&&this.add(k)}},CatchSubscriber}(C.b),Pe=x(59);function combineAll(w){return function($){return $.lift(new Pe.a(w))}}var Ie=x(9),Fe=x(14);function combineLatest_combineLatest(){for(var w=[],$=0;$0&&x[0].time-E.now()<=0;)x.shift().notification.observe(C);if(x.length>0){var k=Math.max(0,x[0].time-E.now());this.schedule(w,k)}else this.unsubscribe(),$.active=!1},DelaySubscriber.prototype._schedule=function(w){this.active=!0,this.destination.add(w.schedule(DelaySubscriber.dispatch,this.delay,{source:this,destination:this.destination,scheduler:w}))},DelaySubscriber.prototype.scheduleNotification=function(w){if(!0!==this.errored){var $=this.scheduler,x=new ot($.now()+this.delay,w);this.queue.push(x),!1===this.active&&this._schedule($)}},DelaySubscriber.prototype._next=function(w){this.scheduleNotification(rt.a.createNext(w))},DelaySubscriber.prototype._error=function(w){this.errored=!0,this.queue=[],this.destination.error(w),this.unsubscribe()},DelaySubscriber.prototype._complete=function(){this.scheduleNotification(rt.a.createComplete()),this.unsubscribe()},DelaySubscriber}(G.a),ot=function(){return function DelayMessage(w,$){this.time=w,this.notification=$}}(),ut=x(4);function delayWhen(w,$){return $?function(x){return new ct(x,$).lift(new at(w))}:function($){return $.lift(new at(w))}}var at=function(){function DelayWhenOperator(w){this.delayDurationSelector=w}return DelayWhenOperator.prototype.call=function(w,$){return $.subscribe(new st(w,this.delayDurationSelector))},DelayWhenOperator}(),st=function(w){function DelayWhenSubscriber($,x){var E=w.call(this,$)||this;return E.delayDurationSelector=x,E.completed=!1,E.delayNotifierSubscriptions=[],E.index=0,E}return E.__extends(DelayWhenSubscriber,w),DelayWhenSubscriber.prototype.notifyNext=function(w,$,x,E,C){this.destination.next(w),this.removeSubscription(C),this.tryComplete()},DelayWhenSubscriber.prototype.notifyError=function(w,$){this._error(w)},DelayWhenSubscriber.prototype.notifyComplete=function(w){var $=this.removeSubscription(w);$&&this.destination.next($),this.tryComplete()},DelayWhenSubscriber.prototype._next=function(w){var $=this.index++;try{var x=this.delayDurationSelector(w,$);x&&this.tryDelay(x,w)}catch(w){this.destination.error(w)}},DelayWhenSubscriber.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},DelayWhenSubscriber.prototype.removeSubscription=function(w){w.unsubscribe();var $=this.delayNotifierSubscriptions.indexOf(w);return-1!==$&&this.delayNotifierSubscriptions.splice($,1),w.outerValue},DelayWhenSubscriber.prototype.tryDelay=function(w,$){var x=Object(le.a)(this,w,$);x&&!x.closed&&(this.destination.add(x),this.delayNotifierSubscriptions.push(x))},DelayWhenSubscriber.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},DelayWhenSubscriber}(pe.a),ct=function(w){function SubscriptionDelayObservable($,x){var E=w.call(this)||this;return E.source=$,E.subscriptionDelay=x,E}return E.__extends(SubscriptionDelayObservable,w),SubscriptionDelayObservable.prototype._subscribe=function(w){this.subscriptionDelay.subscribe(new dt(w,this.source))},SubscriptionDelayObservable}(ut.a),dt=function(w){function SubscriptionDelaySubscriber($,x){var E=w.call(this)||this;return E.parent=$,E.source=x,E.sourceSubscribed=!1,E}return E.__extends(SubscriptionDelaySubscriber,w),SubscriptionDelaySubscriber.prototype._next=function(w){this.subscribeToSource()},SubscriptionDelaySubscriber.prototype._error=function(w){this.unsubscribe(),this.parent.error(w)},SubscriptionDelaySubscriber.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},SubscriptionDelaySubscriber.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},SubscriptionDelaySubscriber}(G.a);function dematerialize(){return function dematerializeOperatorFunction(w){return w.lift(new lt)}}var lt=function(){function DeMaterializeOperator(){}return DeMaterializeOperator.prototype.call=function(w,$){return $.subscribe(new ft(w))},DeMaterializeOperator}(),ft=function(w){function DeMaterializeSubscriber($){return w.call(this,$)||this}return E.__extends(DeMaterializeSubscriber,w),DeMaterializeSubscriber.prototype._next=function(w){w.observe(this.destination)},DeMaterializeSubscriber}(G.a);function distinct(w,$){return function(x){return x.lift(new pt(w,$))}}var pt=function(){function DistinctOperator(w,$){this.keySelector=w,this.flushes=$}return DistinctOperator.prototype.call=function(w,$){return $.subscribe(new ht(w,this.keySelector,this.flushes))},DistinctOperator}(),ht=function(w){function DistinctSubscriber($,x,E){var k=w.call(this,$)||this;return k.keySelector=x,k.values=new Set,E&&k.add(Object(C.c)(E,new C.a(k))),k}return E.__extends(DistinctSubscriber,w),DistinctSubscriber.prototype.notifyNext=function(){this.values.clear()},DistinctSubscriber.prototype.notifyError=function(w){this._error(w)},DistinctSubscriber.prototype._next=function(w){this.keySelector?this._useKeySelector(w):this._finalizeNext(w,w)},DistinctSubscriber.prototype._useKeySelector=function(w){var $,x=this.destination;try{$=this.keySelector(w)}catch(w){return void x.error(w)}this._finalizeNext($,w)},DistinctSubscriber.prototype._finalizeNext=function(w,$){var x=this.values;x.has(w)||(x.add(w),this.destination.next($))},DistinctSubscriber}(C.b);function distinctUntilChanged(w,$){return function(x){return x.lift(new bt(w,$))}}var bt=function(){function DistinctUntilChangedOperator(w,$){this.compare=w,this.keySelector=$}return DistinctUntilChangedOperator.prototype.call=function(w,$){return $.subscribe(new vt(w,this.compare,this.keySelector))},DistinctUntilChangedOperator}(),vt=function(w){function DistinctUntilChangedSubscriber($,x,E){var C=w.call(this,$)||this;return C.keySelector=E,C.hasKey=!1,"function"==typeof x&&(C.compare=x),C}return E.__extends(DistinctUntilChangedSubscriber,w),DistinctUntilChangedSubscriber.prototype.compare=function(w,$){return w===$},DistinctUntilChangedSubscriber.prototype._next=function(w){var $;try{var x=this.keySelector;$=x?x(w):w}catch(w){return this.destination.error(w)}var E=!1;if(this.hasKey)try{E=(0,this.compare)(this.key,$)}catch(w){return this.destination.error(w)}else this.hasKey=!0;E||(this.key=$,this.destination.next(w))},DistinctUntilChangedSubscriber}(G.a);function distinctUntilKeyChanged(w,$){return distinctUntilChanged((function(x,E){return $?$(x[w],E[w]):x[w]===E[w]}))}var yt=x(28),mt=x(22),gt=x(31);function throwIfEmpty(w){return void 0===w&&(w=defaultErrorFactory),function($){return $.lift(new St(w))}}var St=function(){function ThrowIfEmptyOperator(w){this.errorFactory=w}return ThrowIfEmptyOperator.prototype.call=function(w,$){return $.subscribe(new wt(w,this.errorFactory))},ThrowIfEmptyOperator}(),wt=function(w){function ThrowIfEmptySubscriber($,x){var E=w.call(this,$)||this;return E.errorFactory=x,E.hasValue=!1,E}return E.__extends(ThrowIfEmptySubscriber,w),ThrowIfEmptySubscriber.prototype._next=function(w){this.hasValue=!0,this.destination.next(w)},ThrowIfEmptySubscriber.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var w=void 0;try{w=this.errorFactory()}catch($){w=$}this.destination.error(w)},ThrowIfEmptySubscriber}(G.a);function defaultErrorFactory(){return new gt.a}var _t=x(13);function take(w){return function($){return 0===w?Object(_t.b)():$.lift(new $t(w))}}var $t=function(){function TakeOperator(w){if(this.total=w,this.total<0)throw new yt.a}return TakeOperator.prototype.call=function(w,$){return $.subscribe(new xt(w,this.total))},TakeOperator}(),xt=function(w){function TakeSubscriber($,x){var E=w.call(this,$)||this;return E.total=x,E.count=0,E}return E.__extends(TakeSubscriber,w),TakeSubscriber.prototype._next=function(w){var $=this.total,x=++this.count;x<=$&&(this.destination.next(w),x===$&&(this.destination.complete(),this.unsubscribe()))},TakeSubscriber}(G.a);function elementAt(w,$){if(w<0)throw new yt.a;var x=arguments.length>=2;return function(E){return E.pipe(Object(mt.a)((function($,x){return x===w})),take(1),x?defaultIfEmpty($):throwIfEmpty((function(){return new yt.a})))}}var Ot=x(45);function endWith(){for(var w=[],$=0;$0&&this._next(w.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},ExpandSubscriber}(C.b);function finalize(w){return function($){return $.lift(new Mt(w))}}var Mt=function(){function FinallyOperator(w){this.callback=w}return FinallyOperator.prototype.call=function(w,$){return $.subscribe(new Ft(w,this.callback))},FinallyOperator}(),Ft=function(w){function FinallySubscriber($,x){var E=w.call(this,$)||this;return E.add(new de.a(x)),E}return E.__extends(FinallySubscriber,w),FinallySubscriber}(G.a);function find(w,$){if("function"!=typeof w)throw new TypeError("predicate is not a function");return function(x){return x.lift(new Rt(w,x,!1,$))}}var Rt=function(){function FindValueOperator(w,$,x,E){this.predicate=w,this.source=$,this.yieldIndex=x,this.thisArg=E}return FindValueOperator.prototype.call=function(w,$){return $.subscribe(new Lt(w,this.predicate,this.source,this.yieldIndex,this.thisArg))},FindValueOperator}(),Lt=function(w){function FindValueSubscriber($,x,E,C,k){var I=w.call(this,$)||this;return I.predicate=x,I.source=E,I.yieldIndex=C,I.thisArg=k,I.index=0,I}return E.__extends(FindValueSubscriber,w),FindValueSubscriber.prototype.notifyComplete=function(w){var $=this.destination;$.next(w),$.complete(),this.unsubscribe()},FindValueSubscriber.prototype._next=function(w){var $=this.predicate,x=this.thisArg,E=this.index++;try{$.call(x||this,w,E,this.source)&&this.notifyComplete(this.yieldIndex?E:w)}catch(w){this.destination.error(w)}},FindValueSubscriber.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},FindValueSubscriber}(G.a);function findIndex(w,$){return function(x){return x.lift(new Rt(w,x,!0,$))}}var Bt=x(20);function first(w,$){var x=arguments.length>=2;return function(E){return E.pipe(w?Object(mt.a)((function($,x){return w($,x,E)})):Bt.a,take(1),x?defaultIfEmpty($):throwIfEmpty((function(){return new gt.a})))}}var Dt=x(77);function ignoreElements(){return function ignoreElementsOperatorFunction(w){return w.lift(new Wt)}}var Wt=function(){function IgnoreElementsOperator(){}return IgnoreElementsOperator.prototype.call=function(w,$){return $.subscribe(new Vt(w))},IgnoreElementsOperator}(),Vt=function(w){function IgnoreElementsSubscriber(){return null!==w&&w.apply(this,arguments)||this}return E.__extends(IgnoreElementsSubscriber,w),IgnoreElementsSubscriber.prototype._next=function(w){},IgnoreElementsSubscriber}(G.a);function isEmpty(){return function(w){return w.lift(new Ut)}}var Ut=function(){function IsEmptyOperator(){}return IsEmptyOperator.prototype.call=function(w,$){return $.subscribe(new qt(w))},IsEmptyOperator}(),qt=function(w){function IsEmptySubscriber($){return w.call(this,$)||this}return E.__extends(IsEmptySubscriber,w),IsEmptySubscriber.prototype.notifyComplete=function(w){var $=this.destination;$.next(w),$.complete()},IsEmptySubscriber.prototype._next=function(w){this.notifyComplete(!1)},IsEmptySubscriber.prototype._complete=function(){this.notifyComplete(!0)},IsEmptySubscriber}(G.a);function takeLast(w){return function takeLastOperatorFunction($){return 0===w?Object(_t.b)():$.lift(new zt(w))}}var zt=function(){function TakeLastOperator(w){if(this.total=w,this.total<0)throw new yt.a}return TakeLastOperator.prototype.call=function(w,$){return $.subscribe(new Gt(w,this.total))},TakeLastOperator}(),Gt=function(w){function TakeLastSubscriber($,x){var E=w.call(this,$)||this;return E.total=x,E.ring=new Array,E.count=0,E}return E.__extends(TakeLastSubscriber,w),TakeLastSubscriber.prototype._next=function(w){var $=this.ring,x=this.total,E=this.count++;$.length0)for(var x=this.count>=this.total?this.total:this.count,E=this.ring,C=0;C=2;return function(E){return E.pipe(w?Object(mt.a)((function($,x){return w($,x,E)})):Bt.a,takeLast(1),x?defaultIfEmpty($):throwIfEmpty((function(){return new gt.a})))}}function mapTo(w){return function($){return $.lift(new Yt(w))}}var Yt=function(){function MapToOperator(w){this.value=w}return MapToOperator.prototype.call=function(w,$){return $.subscribe(new Ht(w,this.value))},MapToOperator}(),Ht=function(w){function MapToSubscriber($,x){var E=w.call(this,$)||this;return E.value=x,E}return E.__extends(MapToSubscriber,w),MapToSubscriber.prototype._next=function(w){this.destination.next(this.value)},MapToSubscriber}(G.a);function materialize(){return function materializeOperatorFunction(w){return w.lift(new Kt)}}var Kt=function(){function MaterializeOperator(){}return MaterializeOperator.prototype.call=function(w,$){return $.subscribe(new Xt(w))},MaterializeOperator}(),Xt=function(w){function MaterializeSubscriber($){return w.call(this,$)||this}return E.__extends(MaterializeSubscriber,w),MaterializeSubscriber.prototype._next=function(w){this.destination.next(rt.a.createNext(w))},MaterializeSubscriber.prototype._error=function(w){var $=this.destination;$.next(rt.a.createError(w)),$.complete()},MaterializeSubscriber.prototype._complete=function(){var w=this.destination;w.next(rt.a.createComplete()),w.complete()},MaterializeSubscriber}(G.a);function scan(w,$){var x=!1;return arguments.length>=2&&(x=!0),function scanOperatorFunction(E){return E.lift(new Zt(w,$,x))}}var Zt=function(){function ScanOperator(w,$,x){void 0===x&&(x=!1),this.accumulator=w,this.seed=$,this.hasSeed=x}return ScanOperator.prototype.call=function(w,$){return $.subscribe(new Jt(w,this.accumulator,this.seed,this.hasSeed))},ScanOperator}(),Jt=function(w){function ScanSubscriber($,x,E,C){var k=w.call(this,$)||this;return k.accumulator=x,k._seed=E,k.hasSeed=C,k.index=0,k}return E.__extends(ScanSubscriber,w),Object.defineProperty(ScanSubscriber.prototype,"seed",{get:function(){return this._seed},set:function(w){this.hasSeed=!0,this._seed=w},enumerable:!0,configurable:!0}),ScanSubscriber.prototype._next=function(w){if(this.hasSeed)return this._tryNext(w);this.seed=w,this.destination.next(w)},ScanSubscriber.prototype._tryNext=function(w){var $,x=this.index++;try{$=this.accumulator(this.seed,w,x)}catch(w){this.destination.error(w)}this.seed=$,this.destination.next($)},ScanSubscriber}(G.a),Qt=x(48);function reduce(w,$){return arguments.length>=2?function reduceOperatorFunctionWithSeed(x){return Object(Qt.a)(scan(w,$),takeLast(1),defaultIfEmpty($))(x)}:function reduceOperatorFunction($){return Object(Qt.a)(scan((function($,x,E){return w($,x,E+1)})),takeLast(1))($)}}function max_max(w){return reduce("function"==typeof w?function($,x){return w($,x)>0?$:x}:function(w,$){return w>$?w:$})}var er=x(84);function merge_merge(){for(var w=[],$=0;$0?this._next(w.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},MergeScanSubscriber}(C.b);function min_min(w){return reduce("function"==typeof w?function($,x){return w($,x)<0?$:x}:function(w,$){return w<$?w:$})}var ir=x(79);function multicast(w,$){return function multicastOperatorFunction(x){var E;if(E="function"==typeof w?w:function subjectFactory(){return w},"function"==typeof $)return x.lift(new or(E,$));var C=Object.create(x,ir.b);return C.source=x,C.subjectFactory=E,C}}var or=function(){function MulticastOperator(w,$){this.subjectFactory=w,this.selector=$}return MulticastOperator.prototype.call=function(w,$){var x=this.selector,E=this.subjectFactory(),C=x(E).subscribe(w);return C.add($.subscribe(E)),C},MulticastOperator}(),ur=x(81);function onErrorResumeNext(){for(var w=[],$=0;$-1&&(this.count=x-1),$.subscribe(this._unsubscribeAndRecycle())}},RepeatSubscriber}(G.a);function repeatWhen(w){return function($){return $.lift(new gr(w))}}var gr=function(){function RepeatWhenOperator(w){this.notifier=w}return RepeatWhenOperator.prototype.call=function(w,$){return $.subscribe(new Sr(w,this.notifier,$))},RepeatWhenOperator}(),Sr=function(w){function RepeatWhenSubscriber($,x,E){var C=w.call(this,$)||this;return C.notifier=x,C.source=E,C.sourceIsBeingSubscribedTo=!0,C}return E.__extends(RepeatWhenSubscriber,w),RepeatWhenSubscriber.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},RepeatWhenSubscriber.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return w.prototype.complete.call(this)},RepeatWhenSubscriber.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return w.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},RepeatWhenSubscriber.prototype._unsubscribe=function(){var w=this.notifications,$=this.retriesSubscription;w&&(w.unsubscribe(),this.notifications=void 0),$&&($.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},RepeatWhenSubscriber.prototype._unsubscribeAndRecycle=function(){var $=this._unsubscribe;return this._unsubscribe=null,w.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=$,this},RepeatWhenSubscriber.prototype.subscribeToRetries=function(){var $;this.notifications=new fr.a;try{$=(0,this.notifier)(this.notifications)}catch($){return w.prototype.complete.call(this)}this.retries=$,this.retriesSubscription=Object(C.c)($,new C.a(this))},RepeatWhenSubscriber}(C.b);function retry(w){return void 0===w&&(w=-1),function($){return $.lift(new wr(w,$))}}var wr=function(){function RetryOperator(w,$){this.count=w,this.source=$}return RetryOperator.prototype.call=function(w,$){return $.subscribe(new _r(w,this.count,this.source))},RetryOperator}(),_r=function(w){function RetrySubscriber($,x,E){var C=w.call(this,$)||this;return C.count=x,C.source=E,C}return E.__extends(RetrySubscriber,w),RetrySubscriber.prototype.error=function($){if(!this.isStopped){var x=this.source,E=this.count;if(0===E)return w.prototype.error.call(this,$);E>-1&&(this.count=E-1),x.subscribe(this._unsubscribeAndRecycle())}},RetrySubscriber}(G.a);function retryWhen(w){return function($){return $.lift(new $r(w,$))}}var $r=function(){function RetryWhenOperator(w,$){this.notifier=w,this.source=$}return RetryWhenOperator.prototype.call=function(w,$){return $.subscribe(new xr(w,this.notifier,this.source))},RetryWhenOperator}(),xr=function(w){function RetryWhenSubscriber($,x,E){var C=w.call(this,$)||this;return C.notifier=x,C.source=E,C}return E.__extends(RetryWhenSubscriber,w),RetryWhenSubscriber.prototype.error=function($){if(!this.isStopped){var x=this.errors,E=this.retries,k=this.retriesSubscription;if(E)this.errors=void 0,this.retriesSubscription=void 0;else{x=new fr.a;try{E=(0,this.notifier)(x)}catch($){return w.prototype.error.call(this,$)}k=Object(C.c)(E,new C.a(this))}this._unsubscribeAndRecycle(),this.errors=x,this.retries=E,this.retriesSubscription=k,x.next($)}},RetryWhenSubscriber.prototype._unsubscribe=function(){var w=this.errors,$=this.retriesSubscription;w&&(w.unsubscribe(),this.errors=void 0),$&&($.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},RetryWhenSubscriber.prototype.notifyNext=function(){var w=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=w,this.source.subscribe(this)},RetryWhenSubscriber}(C.b),Or=x(56);function sample(w){return function($){return $.lift(new Er(w))}}var Er=function(){function SampleOperator(w){this.notifier=w}return SampleOperator.prototype.call=function(w,$){var x=new Cr(w),E=$.subscribe(x);return E.add(Object(C.c)(this.notifier,new C.a(x))),E},SampleOperator}(),Cr=function(w){function SampleSubscriber(){var $=null!==w&&w.apply(this,arguments)||this;return $.hasValue=!1,$}return E.__extends(SampleSubscriber,w),SampleSubscriber.prototype._next=function(w){this.value=w,this.hasValue=!0},SampleSubscriber.prototype.notifyNext=function(){this.emitValue()},SampleSubscriber.prototype.notifyComplete=function(){this.emitValue()},SampleSubscriber.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},SampleSubscriber}(C.b);function sampleTime(w,$){return void 0===$&&($=R.a),function(x){return x.lift(new Pr(w,$))}}var Pr=function(){function SampleTimeOperator(w,$){this.period=w,this.scheduler=$}return SampleTimeOperator.prototype.call=function(w,$){return $.subscribe(new jr(w,this.period,this.scheduler))},SampleTimeOperator}(),jr=function(w){function SampleTimeSubscriber($,x,E){var C=w.call(this,$)||this;return C.period=x,C.scheduler=E,C.hasValue=!1,C.add(E.schedule(dispatchNotification,x,{subscriber:C,period:x})),C}return E.__extends(SampleTimeSubscriber,w),SampleTimeSubscriber.prototype._next=function(w){this.lastValue=w,this.hasValue=!0},SampleTimeSubscriber.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},SampleTimeSubscriber}(G.a);function dispatchNotification(w){var $=w.subscriber,x=w.period;$.notifyNext(),this.schedule(w,x)}function sequenceEqual(w,$){return function(x){return x.lift(new Tr(w,$))}}var Tr=function(){function SequenceEqualOperator(w,$){this.compareTo=w,this.comparator=$}return SequenceEqualOperator.prototype.call=function(w,$){return $.subscribe(new kr(w,this.compareTo,this.comparator))},SequenceEqualOperator}(),kr=function(w){function SequenceEqualSubscriber($,x,E){var C=w.call(this,$)||this;return C.compareTo=x,C.comparator=E,C._a=[],C._b=[],C._oneComplete=!1,C.destination.add(x.subscribe(new Nr($,C))),C}return E.__extends(SequenceEqualSubscriber,w),SequenceEqualSubscriber.prototype._next=function(w){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(w),this.checkValues())},SequenceEqualSubscriber.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},SequenceEqualSubscriber.prototype.checkValues=function(){for(var w=this._a,$=this._b,x=this.comparator;w.length>0&&$.length>0;){var E=w.shift(),C=$.shift(),k=!1;try{k=x?x(E,C):E===C}catch(w){this.destination.error(w)}k||this.emit(!1)}},SequenceEqualSubscriber.prototype.emit=function(w){var $=this.destination;$.next(w),$.complete()},SequenceEqualSubscriber.prototype.nextB=function(w){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(w),this.checkValues())},SequenceEqualSubscriber.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},SequenceEqualSubscriber}(G.a),Nr=function(w){function SequenceEqualCompareToSubscriber($,x){var E=w.call(this,$)||this;return E.parent=x,E}return E.__extends(SequenceEqualCompareToSubscriber,w),SequenceEqualCompareToSubscriber.prototype._next=function(w){this.parent.nextB(w)},SequenceEqualCompareToSubscriber.prototype._error=function(w){this.parent.error(w),this.unsubscribe()},SequenceEqualCompareToSubscriber.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},SequenceEqualCompareToSubscriber}(G.a);function shareSubjectFactory(){return new fr.a}function share(){return function(w){return Object(Or.a)()(multicast(shareSubjectFactory)(w))}}function shareReplay(w,$,x){var E;return E=w&&"object"==typeof w?w:{bufferSize:w,windowTime:$,refCount:!1,scheduler:x},function(w){return w.lift(function shareReplayOperator(w){var $,x,E=w.bufferSize,C=void 0===E?Number.POSITIVE_INFINITY:E,k=w.windowTime,I=void 0===k?Number.POSITIVE_INFINITY:k,R=w.refCount,D=w.scheduler,W=0,V=!1,G=!1;return function shareReplayOperation(w){var E;W++,!$||V?(V=!1,$=new br.a(C,I,D),E=$.subscribe(this),x=w.subscribe({next:function(w){$.next(w)},error:function(w){V=!0,$.error(w)},complete:function(){G=!0,x=void 0,$.complete()}}),G&&(x=void 0)):E=$.subscribe(this),this.add((function(){W--,E.unsubscribe(),E=void 0,x&&!G&&R&&0===W&&(x.unsubscribe(),x=void 0,$=void 0)}))}}(E))}}function single(w){return function($){return $.lift(new Ar(w,$))}}var Ar=function(){function SingleOperator(w,$){this.predicate=w,this.source=$}return SingleOperator.prototype.call=function(w,$){return $.subscribe(new Ir(w,this.predicate,this.source))},SingleOperator}(),Ir=function(w){function SingleSubscriber($,x,E){var C=w.call(this,$)||this;return C.predicate=x,C.source=E,C.seenValue=!1,C.index=0,C}return E.__extends(SingleSubscriber,w),SingleSubscriber.prototype.applySingleValue=function(w){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=w)},SingleSubscriber.prototype._next=function(w){var $=this.index++;this.predicate?this.tryNext(w,$):this.applySingleValue(w)},SingleSubscriber.prototype.tryNext=function(w,$){try{this.predicate(w,$,this.source)&&this.applySingleValue(w)}catch(w){this.destination.error(w)}},SingleSubscriber.prototype._complete=function(){var w=this.destination;this.index>0?(w.next(this.seenValue?this.singleValue:void 0),w.complete()):w.error(new gt.a)},SingleSubscriber}(G.a);function skip(w){return function($){return $.lift(new Mr(w))}}var Mr=function(){function SkipOperator(w){this.total=w}return SkipOperator.prototype.call=function(w,$){return $.subscribe(new Fr(w,this.total))},SkipOperator}(),Fr=function(w){function SkipSubscriber($,x){var E=w.call(this,$)||this;return E.total=x,E.count=0,E}return E.__extends(SkipSubscriber,w),SkipSubscriber.prototype._next=function(w){++this.count>this.total&&this.destination.next(w)},SkipSubscriber}(G.a);function skipLast(w){return function($){return $.lift(new Rr(w))}}var Rr=function(){function SkipLastOperator(w){if(this._skipCount=w,this._skipCount<0)throw new yt.a}return SkipLastOperator.prototype.call=function(w,$){return 0===this._skipCount?$.subscribe(new G.a(w)):$.subscribe(new Lr(w,this._skipCount))},SkipLastOperator}(),Lr=function(w){function SkipLastSubscriber($,x){var E=w.call(this,$)||this;return E._skipCount=x,E._count=0,E._ring=new Array(x),E}return E.__extends(SkipLastSubscriber,w),SkipLastSubscriber.prototype._next=function(w){var $=this._skipCount,x=this._count++;if(x<$)this._ring[x]=w;else{var E=x%$,C=this._ring,k=C[E];C[E]=w,this.destination.next(k)}},SkipLastSubscriber}(G.a);function skipUntil(w){return function($){return $.lift(new Br(w))}}var Br=function(){function SkipUntilOperator(w){this.notifier=w}return SkipUntilOperator.prototype.call=function(w,$){return $.subscribe(new Dr(w,this.notifier))},SkipUntilOperator}(),Dr=function(w){function SkipUntilSubscriber($,x){var E=w.call(this,$)||this;E.hasValue=!1;var k=new C.a(E);E.add(k),E.innerSubscription=k;var I=Object(C.c)(x,k);return I!==k&&(E.add(I),E.innerSubscription=I),E}return E.__extends(SkipUntilSubscriber,w),SkipUntilSubscriber.prototype._next=function($){this.hasValue&&w.prototype._next.call(this,$)},SkipUntilSubscriber.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},SkipUntilSubscriber.prototype.notifyComplete=function(){},SkipUntilSubscriber}(C.b);function skipWhile(w){return function($){return $.lift(new Wr(w))}}var Wr=function(){function SkipWhileOperator(w){this.predicate=w}return SkipWhileOperator.prototype.call=function(w,$){return $.subscribe(new Vr(w,this.predicate))},SkipWhileOperator}(),Vr=function(w){function SkipWhileSubscriber($,x){var E=w.call(this,$)||this;return E.predicate=x,E.skipping=!0,E.index=0,E}return E.__extends(SkipWhileSubscriber,w),SkipWhileSubscriber.prototype._next=function(w){var $=this.destination;this.skipping&&this.tryCallPredicate(w),this.skipping||$.next(w)},SkipWhileSubscriber.prototype.tryCallPredicate=function(w){try{var $=this.predicate(w,this.index++);this.skipping=Boolean($)}catch(w){this.destination.error(w)}},SkipWhileSubscriber}(G.a);function startWith(){for(var w=[],$=0;$0?this.startWindowEvery:this.windowSize,x=this.destination,E=this.windowSize,C=this.windows,k=C.length,I=0;I=0&&R%$==0&&!this.closed&&C.shift().complete(),++this.count%$==0&&!this.closed){var D=new fr.a;C.push(D),x.next(D)}},WindowCountSubscriber.prototype._error=function(w){var $=this.windows;if($)for(;$.length>0&&!this.closed;)$.shift().error(w);this.destination.error(w)},WindowCountSubscriber.prototype._complete=function(){var w=this.windows;if(w)for(;w.length>0&&!this.closed;)w.shift().complete();this.destination.complete()},WindowCountSubscriber.prototype._unsubscribe=function(){this.count=0,this.windows=null},WindowCountSubscriber}(G.a);function windowTime_windowTime(w){var $=R.a,x=null,E=Number.POSITIVE_INFINITY;return Object(oe.a)(arguments[3])&&($=arguments[3]),Object(oe.a)(arguments[2])?$=arguments[2]:Object(qr.a)(arguments[2])&&(E=Number(arguments[2])),Object(oe.a)(arguments[1])?$=arguments[1]:Object(qr.a)(arguments[1])&&(x=Number(arguments[1])),function windowTimeOperatorFunction(C){return C.lift(new wn(w,x,E,$))}}var wn=function(){function WindowTimeOperator(w,$,x,E){this.windowTimeSpan=w,this.windowCreationInterval=$,this.maxWindowSize=x,this.scheduler=E}return WindowTimeOperator.prototype.call=function(w,$){return $.subscribe(new $n(w,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},WindowTimeOperator}(),_n=function(w){function CountedSubject(){var $=null!==w&&w.apply(this,arguments)||this;return $._numberOfNextedValues=0,$}return E.__extends(CountedSubject,w),CountedSubject.prototype.next=function($){this._numberOfNextedValues++,w.prototype.next.call(this,$)},Object.defineProperty(CountedSubject.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),CountedSubject}(fr.a),$n=function(w){function WindowTimeSubscriber($,x,E,C,k){var I=w.call(this,$)||this;I.destination=$,I.windowTimeSpan=x,I.windowCreationInterval=E,I.maxWindowSize=C,I.scheduler=k,I.windows=[];var R=I.openWindow();if(null!==E&&E>=0){var D={subscriber:I,window:R,context:null},W={windowTimeSpan:x,windowCreationInterval:E,subscriber:I,scheduler:k};I.add(k.schedule(dispatchWindowClose,x,D)),I.add(k.schedule(dispatchWindowCreation,E,W))}else{var V={subscriber:I,window:R,windowTimeSpan:x};I.add(k.schedule(dispatchWindowTimeSpanOnly,x,V))}return I}return E.__extends(WindowTimeSubscriber,w),WindowTimeSubscriber.prototype._next=function(w){for(var $=this.windows,x=$.length,E=0;E=this.maxWindowSize&&this.closeWindow(C))}},WindowTimeSubscriber.prototype._error=function(w){for(var $=this.windows;$.length>0;)$.shift().error(w);this.destination.error(w)},WindowTimeSubscriber.prototype._complete=function(){for(var w=this.windows;w.length>0;){var $=w.shift();$.closed||$.complete()}this.destination.complete()},WindowTimeSubscriber.prototype.openWindow=function(){var w=new _n;return this.windows.push(w),this.destination.next(w),w},WindowTimeSubscriber.prototype.closeWindow=function(w){w.complete();var $=this.windows;$.splice($.indexOf(w),1)},WindowTimeSubscriber}(G.a);function dispatchWindowTimeSpanOnly(w){var $=w.subscriber,x=w.windowTimeSpan,E=w.window;E&&$.closeWindow(E),w.window=$.openWindow(),this.schedule(w,x)}function dispatchWindowCreation(w){var $=w.windowTimeSpan,x=w.subscriber,E=w.scheduler,C=w.windowCreationInterval,k=x.openWindow(),I={action:this,subscription:null},R={subscriber:x,window:k,context:I};I.subscription=E.schedule(dispatchWindowClose,$,R),this.add(I.subscription),this.schedule(w,C)}function dispatchWindowClose(w){var $=w.subscriber,x=w.window,E=w.context;E&&E.action&&E.subscription&&E.action.remove(E.subscription),$.closeWindow(x)}function windowToggle(w,$){return function(x){return x.lift(new xn(w,$))}}var xn=function(){function WindowToggleOperator(w,$){this.openings=w,this.closingSelector=$}return WindowToggleOperator.prototype.call=function(w,$){return $.subscribe(new On(w,this.openings,this.closingSelector))},WindowToggleOperator}(),On=function(w){function WindowToggleSubscriber($,x,E){var C=w.call(this,$)||this;return C.openings=x,C.closingSelector=E,C.contexts=[],C.add(C.openSubscription=Object(le.a)(C,x,x)),C}return E.__extends(WindowToggleSubscriber,w),WindowToggleSubscriber.prototype._next=function(w){var $=this.contexts;if($)for(var x=$.length,E=0;E0){var C=E.indexOf(x);-1!==C&&E.splice(C,1)}},WithLatestFromSubscriber.prototype.notifyComplete=function(){},WithLatestFromSubscriber.prototype._next=function(w){if(0===this.toRespond.length){var $=[w].concat(this.values);this.project?this._tryProject($):this.destination.next($)}},WithLatestFromSubscriber.prototype._tryProject=function(w){var $;try{$=this.project.apply(this,w)}catch(w){return void this.destination.error(w)}this.destination.next($)},WithLatestFromSubscriber}(pe.a),Tn=x(62);function zip_zip(){for(var w=[],$=0;$I)return 1;if(I>k)return-1;if(!isNaN(k)&&isNaN(I))return 1;if(isNaN(k)&&!isNaN(I))return-1}return w[1]&&$[1]?w[1]>$[1]?1:w[1]<$[1]?-1:0:!w[1]&&$[1]?1:w[1]&&!$[1]?-1:0};function _typeof(w){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(w){return typeof w}:function _typeof(w){return w&&"function"==typeof Symbol&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w})(w)}function metadata_classCallCheck(w,$){if(!(w instanceof $))throw new TypeError("Cannot call a class as a function")}function _defineProperties(w,$){for(var x=0;x<$.length;x++){var E=$[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}function _createClass(w,$,x){return $&&_defineProperties(w.prototype,$),x&&_defineProperties(w,x),w}var R=/^\d+$/,D=function(){function Metadata(w){metadata_classCallCheck(this,Metadata),function validateMetadata(w){if(!w)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!J(w)||!J(w.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(J(w)?"an object of shape: { "+Object.keys(w).join(", ")+" }":"a "+ie(w)+": "+w,"."))}(w),this.metadata=w,setVersion.call(this,w)}return _createClass(Metadata,[{key:"getCountries",value:function getCountries(){return Object.keys(this.metadata.countries).filter((function(w){return"001"!==w}))}},{key:"getCountryMetadata",value:function getCountryMetadata(w){return this.metadata.countries[w]}},{key:"nonGeographic",value:function nonGeographic(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function hasCountry(w){return void 0!==this.getCountryMetadata(w)}},{key:"hasCallingCode",value:function hasCallingCode(w){if(this.getCountryCodesForCallingCode(w))return!0;if(this.nonGeographic()){if(this.nonGeographic()[w])return!0}else{var $=this.countryCallingCodes()[w];if($&&1===$.length&&"001"===$[0])return!0}}},{key:"isNonGeographicCallingCode",value:function isNonGeographicCallingCode(w){return this.nonGeographic()?!!this.nonGeographic()[w]:!this.getCountryCodesForCallingCode(w)}},{key:"country",value:function country(w){return this.selectNumberingPlan(w)}},{key:"selectNumberingPlan",value:function selectNumberingPlan(w,$){if(w&&R.test(w)&&($=w,w=null),w&&"001"!==w){if(!this.hasCountry(w))throw new Error("Unknown country: ".concat(w));this.numberingPlan=new W(this.getCountryMetadata(w),this)}else if($){if(!this.hasCallingCode($))throw new Error("Unknown calling code: ".concat($));this.numberingPlan=new W(this.getNumberingPlanMetadata($),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function getCountryCodesForCallingCode(w){var $=this.countryCallingCodes()[w];if($){if(1===$.length&&3===$[0].length)return;return $}}},{key:"getCountryCodeForCallingCode",value:function getCountryCodeForCallingCode(w){var $=this.getCountryCodesForCallingCode(w);if($)return $[0]}},{key:"getNumberingPlanMetadata",value:function getNumberingPlanMetadata(w){var $=this.getCountryCodeForCallingCode(w);if($)return this.getCountryMetadata($);if(this.nonGeographic()){var x=this.nonGeographic()[w];if(x)return x}else{var E=this.countryCallingCodes()[w];if(E&&1===E.length&&"001"===E[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function countryCallingCode(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function IDDPrefix(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function defaultIDDPrefix(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function nationalNumberPattern(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function possibleLengths(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function formats(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function nationalPrefixForParsing(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function nationalPrefixTransformRule(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function leadingDigits(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function hasTypes(){return this.numberingPlan.hasTypes()}},{key:"type",value:function type(w){return this.numberingPlan.type(w)}},{key:"ext",value:function ext(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function countryCallingCodes(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function chooseCountryByCountryCallingCode(w){return this.selectNumberingPlan(w)}},{key:"hasSelectedNumberingPlan",value:function hasSelectedNumberingPlan(){return void 0!==this.numberingPlan}}]),Metadata}(),W=function(){function NumberingPlan(w,$){metadata_classCallCheck(this,NumberingPlan),this.globalMetadataObject=$,this.metadata=w,setVersion.call(this,$.metadata)}return _createClass(NumberingPlan,[{key:"callingCode",value:function callingCode(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function getDefaultCountryMetadataForRegion(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function IDDPrefix(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function defaultIDDPrefix(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function nationalNumberPattern(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function possibleLengths(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function _getFormats(w){return w[this.v1?2:this.v2?3:4]}},{key:"formats",value:function formats(){var w=this,formats=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return formats.map((function($){return new V($,w)}))}},{key:"nationalPrefix",value:function nationalPrefix(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function _getNationalPrefixFormattingRule(w){return w[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function nationalPrefixFormattingRule(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function _nationalPrefixForParsing(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function nationalPrefixForParsing(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function nationalPrefixTransformRule(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function _getNationalPrefixIsOptionalWhenFormatting(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function nationalPrefixIsOptionalWhenFormattingInNationalFormat(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function leadingDigits(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function types(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function hasTypes(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function type(w){if(this.hasTypes()&&metadata_getType(this.types(),w))return new K(metadata_getType(this.types(),w),this)}},{key:"ext",value:function ext(){return this.v1||this.v2?" ext. ":this.metadata[13]||" ext. "}}]),NumberingPlan}(),V=function(){function Format(w,$){metadata_classCallCheck(this,Format),this._format=w,this.metadata=$}return _createClass(Format,[{key:"pattern",value:function pattern(){return this._format[0]}},{key:"format",value:function format(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function leadingDigitsPatterns(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function nationalPrefixFormattingRule(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function nationalPrefixIsOptionalWhenFormattingInNationalFormat(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function nationalPrefixIsMandatoryWhenFormattingInNationalFormat(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function usesNationalPrefix(){return!(!this.nationalPrefixFormattingRule()||G.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function internationalFormat(){return this._format[5]||this.format()}}]),Format}(),G=/^\(?\$1\)?$/,K=function(){function Type(w,$){metadata_classCallCheck(this,Type),this.type=w,this.metadata=$}return _createClass(Type,[{key:"pattern",value:function pattern(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function possibleLengths(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),Type}();function metadata_getType(w,$){switch($){case"FIXED_LINE":return w[0];case"MOBILE":return w[1];case"TOLL_FREE":return w[2];case"PREMIUM_RATE":return w[3];case"PERSONAL_NUMBER":return w[4];case"VOICEMAIL":return w[5];case"UAN":return w[6];case"PAGER":return w[7];case"VOIP":return w[8];case"SHARED_COST":return w[9]}}var J=function is_object(w){return"object"===_typeof(w)},ie=function type_of(w){return _typeof(w)};function getExtPrefix(w,$){return($=new D($)).hasCountry(w)?$.country(w).ext():" ext. "}function getCountryCallingCode(w,$){if(($=new D($)).hasCountry(w))return $.country(w).countryCallingCode();throw new Error("Unknown country: ".concat(w))}function isSupportedCountry(w,$){return void 0!==$.countries[w]}function setVersion(w){var $=w.version;"number"==typeof $?(this.v1=1===$,this.v2=2===$,this.v3=3===$,this.v4=4===$):$?-1===semver_compare($,"1.2.0")?this.v2=!0:-1===semver_compare($,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var oe=function getExtensionDigitsPattern(w){return"([".concat("0-90-9٠-٩۰-۹","]{1,").concat(w,"})")};function createExtensionPattern(w){return";ext="+oe("20")+"|"+("[  \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[  \\t,-]*"+oe("20")+"#?")+"|"+("[  \\t,]*(?:[xx##~~]|int|int)[:\\..]?[  \\t,-]*"+oe("9")+"#?")+"|"+("[- ]+"+oe("6")+"#")+"|"+("[  \\t]*(?:,{2}|;)[:\\..]?[  \\t,-]*"+oe("15")+"#?")+"|"+("[  \\t]*(?:,)+[:\\..]?[  \\t,-]*"+oe("9")+"#?")}var ue="[++]{0,1}(?:["+k+"]*[0-90-9٠-٩۰-۹]){3,}["+k+"0-90-9٠-٩۰-۹]*",ae=new RegExp("^[++]{0,1}(?:["+k+"]*[0-90-9٠-٩۰-۹]){1,2}$","i"),se=ue+"(?:"+createExtensionPattern()+")?",de=new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^"+se+"$","i");function isViablePhoneNumber(w){return w.length>=2&&de.test(w)}var le=new RegExp("(?:"+createExtensionPattern()+")$","i");var pe={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function parseDigit(w){return pe[w]}function parseDigits(w){var $="",x=w.split(""),E=Array.isArray(x),C=0;for(x=E?x:x[Symbol.iterator]();;){var k;if(E){if(C>=x.length)break;k=x[C++]}else{if((C=x.next()).done)break;k=C.value}var I=parseDigit(k);I&&($+=I)}return $}function parseIncompletePhoneNumber(w){var $="",x=w.split(""),E=Array.isArray(x),C=0;for(x=E?x:x[Symbol.iterator]();;){var k;if(E){if(C>=x.length)break;k=x[C++]}else{if((C=x.next()).done)break;k=C.value}$+=parsePhoneNumberCharacter(k,$)||""}return $}function parsePhoneNumberCharacter(w,$){if("+"===w){if($)return;return"+"}return parseDigit(w)}function checkNumberLength(w,$){return function checkNumberLengthForType(w,$,x){var E=x.type($),C=E&&E.possibleLengths()||x.possibleLengths();if(!C)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===$){if(!x.type("FIXED_LINE"))return checkNumberLengthForType(w,"MOBILE",x);var k=x.type("MOBILE");k&&(C=function mergeArrays(w,$){var x=w.slice(),E=$,C=Array.isArray(E),k=0;for(E=C?E:E[Symbol.iterator]();;){var I;if(C){if(k>=E.length)break;I=E[k++]}else{if((k=E.next()).done)break;I=k.value}var R=I;w.indexOf(R)<0&&x.push(R)}return x.sort((function(w,$){return w-$}))}(C,k.possibleLengths()))}else if($&&!E)return"INVALID_LENGTH";var I=w.length,R=C[0];if(R===I)return"IS_POSSIBLE";if(R>I)return"TOO_SHORT";if(C[C.length-1]=0?"IS_POSSIBLE":"INVALID_LENGTH"}(w,void 0,$)}function isPossibleNumber(w,$){switch(checkNumberLength(w,$)){case"IS_POSSIBLE":return!0;default:return!1}}function _slicedToArray(w,$){return function _arrayWithHoles(w){if(Array.isArray(w))return w}(w)||function _iterableToArrayLimit(w,$){var x=[],E=!0,C=!1,k=void 0;try{for(var I,R=w[Symbol.iterator]();!(E=(I=R.next()).done)&&(x.push(I.value),!$||x.length!==$);E=!0);}catch(w){C=!0,k=w}finally{try{E||null==R.return||R.return()}finally{if(C)throw k}}return x}(w,$)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function parseRFC3966(w){var $,x,E=(w=w.replace(/^tel:/,"tel=")).split(";"),C=Array.isArray(E),k=0;for(E=C?E:E[Symbol.iterator]();;){var I;if(C){if(k>=E.length)break;I=E[k++]}else{if((k=E.next()).done)break;I=k.value}var R=_slicedToArray(I.split("="),2),D=R[0],W=R[1];switch(D){case"tel":$=W;break;case"ext":x=W;break;case"phone-context":"+"===W[0]&&($=W+$)}}if(!isViablePhoneNumber($))return{};var V={number:$};return x&&(V.ext=x),V}function formatRFC3966(w){var $=w.number,x=w.ext;if(!$)return"";if("+"!==$[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat($).concat(x?";ext="+x:"")}function matchesEntirely(w,$){return w=w||"",new RegExp("^(?:"+$+")$").test(w)}var he=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function getNumberType(w,$,x){if($=$||{},w.country){(x=new D(x)).selectNumberingPlan(w.country,w.countryCallingCode);var E=$.v2?w.nationalNumber:w.phone;if(matchesEntirely(E,x.nationalNumberPattern())){if(isNumberTypeEqualTo(E,"FIXED_LINE",x))return x.type("MOBILE")&&""===x.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":x.type("MOBILE")?isNumberTypeEqualTo(E,"MOBILE",x)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var C=0,k=he;C=x.length)break;k=x[C++]}else{if((C=x.next()).done)break;k=C.value}var I=k;if(I.leadingDigitsPatterns().length>0){var R=I.leadingDigitsPatterns()[I.leadingDigitsPatterns().length-1];if(0!==$.search(R))continue}if(matchesEntirely($,I.pattern()))return I}}(E.formats(),w);return k?formatNationalNumberUsingFormat(w,k,{useInternationalFormat:"INTERNATIONAL"===x,withNationalPrefix:!k.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!C||!1!==C.nationalPrefix,carrierCode:$,metadata:E}):w}function addExtension(w,$,x,E){return $?E(w,$,x):w}function PhoneNumber_defineProperty(w,$,x){return $ in w?Object.defineProperty(w,$,{value:x,enumerable:!0,configurable:!0,writable:!0}):w[$]=x,w}function PhoneNumber_defineProperties(w,$){for(var x=0;x<$.length;x++){var E=$[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}var we=function(){function PhoneNumber(w,$,x){if(function PhoneNumber_classCallCheck(w,$){if(!(w instanceof $))throw new TypeError("Cannot call a class as a function")}(this,PhoneNumber),!w)throw new TypeError("`country` or `countryCallingCode` not passed");if(!$)throw new TypeError("`nationalNumber` not passed");if(!x)throw new TypeError("`metadata` not passed");var E=new D(x);Ce(w)&&(this.country=w,E.country(w),w=E.countryCallingCode()),this.countryCallingCode=w,this.nationalNumber=$,this.number="+"+this.countryCallingCode+this.nationalNumber,this.metadata=x}return function PhoneNumber_createClass(w,$,x){return $&&PhoneNumber_defineProperties(w.prototype,$),x&&PhoneNumber_defineProperties(w,x),w}(PhoneNumber,[{key:"setExt",value:function setExt(w){this.ext=w}},{key:"isPossible",value:function isPossible(){return function isPossiblePhoneNumber(w,$,x){if(void 0===$&&($={}),x=new D(x),$.v2){if(!w.countryCallingCode)throw new Error("Invalid phone number object passed");x.selectNumberingPlan(w.countryCallingCode)}else{if(!w.phone)return!1;if(w.country){if(!x.hasCountry(w.country))throw new Error("Unknown country: ".concat(w.country));x.country(w.country)}else{if(!w.countryCallingCode)throw new Error("Invalid phone number object passed");x.selectNumberingPlan(w.countryCallingCode)}}if(x.possibleLengths())return isPossibleNumber(w.phone||w.nationalNumber,x);if(w.countryCallingCode&&x.isNonGeographicCallingCode(w.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.metadata)}},{key:"isValid",value:function isValid(){return isValidNumber(this,{v2:!0},this.metadata)}},{key:"isNonGeographic",value:function isNonGeographic(){return new D(this.metadata).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function isEqual(w){return this.number===w.number&&this.ext===w.ext}},{key:"getType",value:function getType(){return getNumberType(this,{v2:!0},this.metadata)}},{key:"format",value:function format(w,$){return format_formatNumber(this,w,$?function PhoneNumber_objectSpread(w){for(var $=1;$0&&"0"===I[1]))return w}}}function extractNationalNumberFromPossiblyIncompleteNumber(w,$){if(w&&$.numberingPlan.nationalPrefixForParsing()){var x=new RegExp("^(?:"+$.numberingPlan.nationalPrefixForParsing()+")"),E=x.exec(w);if(E){var C,k,I,R=E.length-1,D=R>0&&E[R];if($.nationalPrefixTransformRule()&&D)C=w.replace(x,$.nationalPrefixTransformRule()),R>1&&(k=E[1]);else{var W=E[0];C=w.slice(W.length),D&&(k=E[1])}if(D){var V=w.indexOf(E[1]);w.slice(0,V)===$.numberingPlan.nationalPrefix()&&(I=$.numberingPlan.nationalPrefix())}else I=E[0];return{nationalNumber:C,nationalPrefix:I,carrierCode:k}}}return{nationalNumber:w}}function extractNationalNumber(w,$){var x=extractNationalNumberFromPossiblyIncompleteNumber(w,$),E=x.nationalNumber,C=x.carrierCode;if(!function shouldExtractNationalPrefix(w,$,x){if(matchesEntirely(w,x.nationalNumberPattern())&&!matchesEntirely($,x.nationalNumberPattern()))return!1;return!0}(w,E,$))return{nationalNumber:w};if(w.length!==E.length+(C?C.length:0)&&$.possibleLengths())switch(checkNumberLength(E,$)){case"TOO_SHORT":case"INVALID_LENGTH":return{nationalNumber:w}}return{nationalNumber:E,carrierCode:C}}function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(w,$,x,E){var C=$?getCountryCallingCode($,E):x;if(0===w.indexOf(C)){(E=new D(E)).selectNumberingPlan($,x);var k=w.slice(C.length),I=extractNationalNumber(k,E).nationalNumber,R=extractNationalNumber(w,E).nationalNumber;if(!matchesEntirely(R,E.nationalNumberPattern())&&matchesEntirely(I,E.nationalNumberPattern())||"TOO_LONG"===checkNumberLength(R,E))return{countryCallingCode:C,number:k}}return{number:w}}function extractCountryCallingCode_extractCountryCallingCode(w,$,x,E){if(!w)return{};if("+"!==w[0]){var C=stripIddPrefix(w,$,x,E);if(!C||C===w){if($||x){var k=extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(w,$,x,E),I=k.countryCallingCode,R=k.number;if(I)return{countryCallingCode:I,number:R}}return{number:w}}w="+"+C}if("0"===w[1])return{};E=new D(E);for(var W=2;W-1<=3&&W<=w.length;){var V=w.slice(1,W);if(E.hasCallingCode(V))return E.selectNumberingPlan(V),{countryCallingCode:V,number:w.slice(W)};W++}return{}}function getCountryByCallingCode(w,$,x){var E=x.getCountryCodesForCallingCode(w);if(E)return 1===E.length?E[0]:function selectCountryFromList(w,$,x){x=new D(x);var E=w,C=Array.isArray(E),k=0;for(E=C?E:E[Symbol.iterator]();;){var I;if(C){if(k>=E.length)break;I=E[k++]}else{if((k=E.next()).done)break;I=k.value}var R=I;if(x.country(R),x.leadingDigits()){if($&&0===$.search(x.leadingDigits()))return R}else if(getNumberType({phone:$,country:R},void 0,x.metadata))return R}}(E,$,x.metadata)}var Ie=new RegExp("[++0-90-9٠-٩۰-۹]"),Fe=new RegExp("[^0-90-9٠-٩۰-۹#]+$");function parse(w,$,x){if($=$||{},x=new D(x),$.defaultCountry&&!x.hasCountry($.defaultCountry)){if($.v2)throw new I("INVALID_COUNTRY");throw new Error("Unknown country: ".concat($.defaultCountry))}var E=function parseInput(w,$,x){if(w&&0===w.indexOf("tel:"))return parseRFC3966(w);var E=function extractFormattedPhoneNumber(w,$,x){if(!w)return;if(w.length>250){if(x)throw new I("TOO_LONG");return}if(!1===$)return w;var E=w.search(Ie);if(E<0)return;return w.slice(E).replace(Fe,"")}(w,x,$);if(!E)return{};if(!isViablePhoneNumber(E))return function isViablePhoneNumberStart(w){return ae.test(w)}(E)?{error:"TOO_SHORT"}:{};var C=function extractExtension(w){var $=w.search(le);if($<0)return{};for(var x=w.slice(0,$),E=w.match(le),C=1;C17){if($.v2)throw new I("TOO_LONG");return{}}if($.v2){var ie=new we(K,G,x.metadata);return V&&(ie.country=V),J&&(ie.carrierCode=J),k&&(ie.ext=k),ie}var oe=!!($.extended?x.hasSelectedNumberingPlan():V)&&matchesEntirely(G,x.nationalNumberPattern());return $.extended?{country:V,countryCallingCode:K,carrierCode:J,valid:oe,possible:!!oe||!(!0!==$.extended||!x.possibleLengths()||!isPossibleNumber(G,x)),phone:G,ext:k}:oe?function parse_result(w,$,x){var E={country:w,phone:$};x&&(E.ext=x);return E}(V,G,k):{}}function parsePhoneNumber_defineProperty(w,$,x){return $ in w?Object.defineProperty(w,$,{value:x,enumerable:!0,configurable:!0,writable:!0}):w[$]=x,w}function parsePhoneNumber_parsePhoneNumber(w,$,x){return parse(w,function parsePhoneNumber_objectSpread(w){for(var $=1;$2&&void 0!==arguments[2]?arguments[2]:null,E=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;LRUCache_classCallCheck(this,Node),this.key=w,this.value=$,this.next=x,this.prev=E},De=function(){function LRUCache(){var w=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;LRUCache_classCallCheck(this,LRUCache),this.size=0,this.limit=w,this.head=null,this.tail=null,this.cache={}}return function LRUCache_createClass(w,$,x){return $&&LRUCache_defineProperties(w.prototype,$),x&&LRUCache_defineProperties(w,x),w}(LRUCache,[{key:"put",value:function put(w,$){if(this.ensureLimit(),this.head){var x=new Le(w,$,this.head);this.head.prev=x,this.head=x}else this.head=this.tail=new Le(w,$);this.cache[w]=this.head,this.size++}},{key:"get",value:function get(w){if(this.cache[w]){var $=this.cache[w].value;return this.remove(w),this.put(w,$),$}console.log("Item not available in cache for key ".concat(w))}},{key:"ensureLimit",value:function ensureLimit(){this.size===this.limit&&this.remove(this.tail.key)}},{key:"remove",value:function remove(w){var $=this.cache[w];null!==$.prev?$.prev.next=$.next:this.head=$.next,null!==$.next?$.next.prev=$.prev:this.tail=$.prev,delete this.cache[w],this.size--}},{key:"clear",value:function clear(){this.head=null,this.tail=null,this.size=0,this.cache={}}}]),LRUCache}();function RegExpCache_defineProperties(w,$){for(var x=0;x<$.length;x++){var E=$[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}var Ue=function(){function RegExpCache(w){!function RegExpCache_classCallCheck(w,$){if(!(w instanceof $))throw new TypeError("Cannot call a class as a function")}(this,RegExpCache),this.cache=new De(w)}return function RegExpCache_createClass(w,$,x){return $&&RegExpCache_defineProperties(w.prototype,$),x&&RegExpCache_defineProperties(w,x),w}(RegExpCache,[{key:"getPatternForRegExp",value:function getPatternForRegExp(w){var $=this.cache.get(w);return $||($=new RegExp("^"+w),this.cache.put(w,$)),$}}]),RegExpCache}();function limit(w,$){if(w<0||$<=0||$=0?$.slice(0,x):$}var ze="   ᠎ - \u2028\u2029   ",He="[".concat(ze,"]"),Ke="[^".concat(ze,"]"),Ze="[".concat("0-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹0-9","]"),Qe="A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",et="[".concat(Qe,"]"),tt=new RegExp(et),rt="[".concat("$¢-¥֏؋৲৳৻૱௹฿៛₠-₹꠸﷼﹩$¢£¥₩","]"),nt=new RegExp(rt),it="[".concat("̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ࣾऀ-ंऺ़ु-ै्॑-ॗॢॣঁ়ু-ৄ্ৢৣਁਂ਼ੁੂੇੈੋ-੍ੑੰੱੵઁં઼ુ-ૅેૈ્ૢૣଁ଼ିୁ-ୄ୍ୖୢୣஂீ்ా-ీె-ైొ-్ౕౖౢౣ಼ಿೆೌ್ೢೣു-ൄ്ൢൣ්ි-ුූัิ-ฺ็-๎ັິ-ູົຼ່-ໍཱ༹༘༙༵༷-ཾྀ-྄྆྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္်ွှၘၙၞ-ၠၱ-ၴႂႅႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧᤨᤲ᤹-᤻ᨘᨗᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀᮁᮢ-ᮥᮨᮩ᯦᮫ᯨᯩᯭᯯ-ᯱᰬ-ᰳᰶ᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᷀-ᷦ᷼-᷿⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〭꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠥꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꨩ-ꨮꨱꨲꨵꨶꩃꩌꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫬꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︦","]"),ot=new RegExp(it),ut=new RegExp("[\0-€-ÿĀ-ſḀ-ỿƀ-ɏ̀-ͯ]");function isLatinLetter(w){return!(!tt.test(w)&&!ot.test(w))&&ut.test(w)}function isInvalidPunctuationSymbol(w){return"%"===w||nt.test(w)}var at={POSSIBLE:function POSSIBLE(w,$,x){return!0},VALID:function VALID(w,$,x){return!(!isValidNumber(w,void 0,x)||!containsOnlyValidXChars(w,$.toString(),x))},STRICT_GROUPING:function STRICT_GROUPING(w,$,x,E){var C=$.toString();return!(!isValidNumber(w,void 0,x)||!containsOnlyValidXChars(w,C,x)||containsMoreThanOneSlashInNationalNumber(w,C)||!isNationalPrefixPresentIfRequired(w,x))&&checkNumberGroupingIsValid(w,$,x,allNumberGroupsRemainGrouped,E)},EXACT_GROUPING:function EXACT_GROUPING(w,$,x,E){var C=$.toString();return!(!isValidNumber(w,void 0,x)||!containsOnlyValidXChars(w,C,x)||containsMoreThanOneSlashInNationalNumber(w,C)||!isNationalPrefixPresentIfRequired(w,x))&&checkNumberGroupingIsValid(w,$,x,allNumberGroupsAreExactlyPresent,E)}};function containsOnlyValidXChars(w,$,x){for(var E=0;E<$.length-1;E++){var C=$.charAt(E);if("x"===C||"X"===C){var k=$.charAt(E+1);if("x"===k||"X"===k){if(E++,util.isNumberMatch(w,$.substring(E))!=MatchType.NSN_MATCH)return!1}else if(parseDigits($.substring(E))!==w.ext)return!1}}return!0}function isNationalPrefixPresentIfRequired(w,$){if("FROM_DEFAULT_COUNTRY"!=w.getCountryCodeSource())return!0;var x=util.getRegionCodeForCountryCode(w.getCountryCode()),E=util.getMetadataForRegion(x);if(null==E)return!0;var C=util.getNationalSignificantNumber(w),k=util.chooseFormattingPatternForNumber(E.numberFormats(),C);if(k&&k.getNationalPrefixFormattingRule().length>0){if(k.getNationalPrefixOptionalWhenFormatting())return!0;if(PhoneNumberUtil.formattingRuleHasFirstGroupOnly(k.getNationalPrefixFormattingRule()))return!0;var I=PhoneNumberUtil.normalizeDigitsOnly(w.getRawInput());return util.maybeStripNationalPrefixAndCarrierCode(I,E,null)}return!0}function containsMoreThanOneSlashInNationalNumber(w,$){var x=$.indexOf("/");if(x<0)return!1;var E=$.indexOf("/",x+1);return!(E<0)&&(!(w.getCountryCodeSource()===CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN||w.getCountryCodeSource()===CountryCodeSource.FROM_NUMBER_WITHOUT_PLUS_SIGN)||PhoneNumberUtil.normalizeDigitsOnly($.substring(0,x))!==String(w.getCountryCode())||$.slice(E+1).indexOf("/")>=0)}function checkNumberGroupingIsValid(w,$,x,E,C){var k=normalizeDigits($,!0),I=getNationalNumberGroups(x,w,null);if(E(x,w,k,I))return!0;var R=MetadataManager.getAlternateFormatsForCountry(w.getCountryCode()),D=util.getNationalSignificantNumber(w);if(R){var W=R.numberFormats(),V=Array.isArray(W),G=0;for(W=V?W:W[Symbol.iterator]();;){var K;if(V){if(G>=W.length)break;K=W[G++]}else{if((G=W.next()).done)break;K=G.value}var J=K;if(J.leadingDigitsPatterns().length>0)if(!C.getPatternForRegExp("^"+J.leadingDigitsPatterns()[0]).test(D))continue;if(E(x,w,k,I=getNationalNumberGroups(x,w,J)))return!0}}return!1}function getNationalNumberGroups(w,$,x){if(x){var E=util.getNationalSignificantNumber($);return util.formatNsnUsingPattern(E,x,"RFC3966",w).split("-")}var C=formatNumber($,"RFC3966",w),k=C.indexOf(";");k<0&&(k=C.length);var I=C.indexOf("-")+1;return C.slice(I,k).split("-")}function allNumberGroupsAreExactlyPresent(w,$,x,E){var C=x.split(NON_DIGITS_PATTERN),k=$.hasExtension()?C.length-2:C.length-1;if(1==C.length||C[k].contains(util.getNationalSignificantNumber($)))return!0;for(var I=E.length-1;I>0&&k>=0;){if(C[k]!==E[I])return!1;I--,k--}return k>=0&&function endsWith(w,$){return w.indexOf($,w.length-$.length)===w.length-$.length}(C[k],E[0])}function allNumberGroupsRemainGrouped(w,$,x,E){var C,k,I=0;if($.getCountryCodeSource()!==CountryCodeSource.FROM_DEFAULT_COUNTRY){var R=String($.getCountryCode());I=x.indexOf(R)+R.length()}for(var D=0;D0&&void 0!==arguments[0]?arguments[0]:"",$=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x=arguments.length>2?arguments[2]:void 0;if(PhoneNumberMatcher_classCallCheck(this,PhoneNumberMatcher),PhoneNumberMatcher_defineProperty(this,"state","NOT_READY"),PhoneNumberMatcher_defineProperty(this,"searchIndex",0),PhoneNumberMatcher_defineProperty(this,"regExpCache",new Ue(32)),!($=PhoneNumberMatcher_objectSpread({},$,{defaultCallingCode:$.defaultCallingCode,defaultCountry:$.defaultCountry&&isSupportedCountry($.defaultCountry,x)?$.defaultCountry:void 0,leniency:$.leniency||$.extended?"POSSIBLE":"VALID",maxTries:$.maxTries||Ct})).leniency)throw new TypeError("`Leniency` not supplied");if($.maxTries<0)throw new TypeError("`maxTries` not supplied");if(this.text=w,this.options=$,this.metadata=x,this.leniency=at[$.leniency],!this.leniency)throw new TypeError("Unknown leniency: ".concat($.leniency,"."));this.maxTries=$.maxTries,this.PATTERN=new RegExp(Ot,"ig")}return function PhoneNumberMatcher_createClass(w,$,x){return $&&PhoneNumberMatcher_defineProperties(w.prototype,$),x&&PhoneNumberMatcher_defineProperties(w,x),w}(PhoneNumberMatcher,[{key:"find",value:function find(){for(var w;this.maxTries>0&&null!==(w=this.PATTERN.exec(this.text));){var $=w[0],x=w.index;if(isValidPreCandidate($=parsePreCandidate($),x,this.text)){var E=this.parseAndVerify($,x,this.text)||this.extractInnerMatch($,x,this.text);if(E){if(this.options.v2){var C=new we(E.country||E.countryCallingCode,E.phone,this.metadata);return E.ext&&(C.ext=E.ext),{startsAt:E.startsAt,endsAt:E.endsAt,number:C}}return E}}this.maxTries--}}},{key:"extractInnerMatch",value:function extractInnerMatch(w,$,x){for(var E=0,C=gt;E0&&null!==(I=R.exec(w));){if(k){var D=trimAfterFirstMatch(Et,w.slice(0,I.index)),W=this.parseAndVerify(D,$,x);if(W)return W;this.maxTries--,k=!1}var V=trimAfterFirstMatch(Et,I[1]),G=w.indexOf(V,I.index),K=this.parseAndVerify(V,$+G,x);if(K)return K;this.maxTries--}}},{key:"parseAndVerify",value:function parseAndVerify(w,$,x){if(function isValidCandidate(w,$,x,E){if(vt.test(w)&&!yt.test(w)){if("POSSIBLE"!==E){if($>0&&!ht.test(w)){var C=x[$-1];if(isInvalidPunctuationSymbol(C)||isLatinLetter(C))return!1}var k=$+w.length;if(k1;)1&$&&(x+=w),$>>=1,w+=w;return x+w}function cutAndStripNonPairedParens(w,$){return")"===w[$]&&$++,function stripNonPairedParens(w){var $=[],x=0;for(;x1&&void 0!==arguments[1]?arguments[1]:{},x=$.allowOverflow;if(!w)throw new Error("String is required");var E=AsYouTypeFormatter_PatternMatcher_match(w.split(""),this.matchTree,!0);if(E&&E.match&&delete E.matchedChars,!E||!E.overflow||x)return E}}]),PatternMatcher}();function AsYouTypeFormatter_PatternMatcher_match(w,$,x){if("string"==typeof $){if(x&&w.length>$.length)return{overflow:!0};var E=w.join("");return 0===$.indexOf(E)?w.length===$.length?{match:!0,matchedChars:w}:{partialMatch:!0}:0===E.indexOf($)?{match:!0,matchedChars:w.slice(0,$.length)}:void 0}if(Array.isArray($)){for(var C=w.slice(),k=0;k<$.length;){var I=AsYouTypeFormatter_PatternMatcher_match(C,$[k],x&&k===$.length-1);if(!I)return;if(I.overflow)return I;if(!I.match){if(I.partialMatch)return{partialMatch:!0};throw new Error("Unsupported match result:\n".concat(JSON.stringify(I,null,2)))}if(0===(C=C.slice(I.matchedChars.length)).length)return k===$.length-1?{match:!0,matchedChars:w}:{partialMatch:!0};k++}return x?{overflow:!0}:{match:!0,matchedChars:w.slice(0,w.length-C.length)}}switch($.op){case"|":var R,D=$.args,W=Array.isArray(D),V=0;for(D=W?D:D[Symbol.iterator]();;){var G;if(W){if(V>=D.length)break;G=D[V++]}else{if((V=D.next()).done)break;G=V.value}var K=AsYouTypeFormatter_PatternMatcher_match(w,G,x);if(K){if(K.overflow)return K;if(K.match)return{match:!0,matchedChars:K.matchedChars};if(!K.partialMatch)throw new Error("Unsupported match result:\n".concat(JSON.stringify(K,null,2)));R=!0}}return R?{partialMatch:!0}:void 0;case"[]":var J=$.args,ie=Array.isArray(J),oe=0;for(J=ie?J:J[Symbol.iterator]();;){var ue;if(ie){if(oe>=J.length)break;ue=J[oe++]}else{if((oe=J.next()).done)break;ue=oe.value}var ae=ue;if(w[0]===ae)return 1===w.length?{match:!0,matchedChars:w}:x?{overflow:!0}:{match:!0,matchedChars:[ae]}}return;default:throw new Error("Unsupported instruction tree: ".concat($))}}var It=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])"),Mt=/[\(\)\[\]\?\:\|]/,Ft=function(){function PatternParser(){AsYouTypeFormatter_PatternMatcher_classCallCheck(this,PatternParser)}return AsYouTypeFormatter_PatternMatcher_createClass(PatternParser,[{key:"parse",value:function parse(w){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(w),1!==this.context.length)throw new Error("Non-finalized contexts left when pattern parse ended");var $=this.context[0],x=$.branches,E=$.instructions;if(x)return[{op:"|",args:x.concat([E])}];if(0===E.length)throw new Error("Pattern is required");return E}},{key:"startContext",value:function startContext(w){this.context.push(w)}},{key:"endContext",value:function endContext(){this.context.pop()}},{key:"getContext",value:function getContext(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function parsePattern(w){if(!w)throw new Error("Pattern is required");var $=w.match(It);if($){var x=$[1],E=w.slice(0,$.index),C=w.slice($.index+x.length);switch(x){case"(?:":E&&this.parsePattern(E),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(E&&this.parsePattern(E),0===this.getContext().instructions.length)throw new Error('No instructions found after "|" operator in an "or" group');var k=this.getContext().branches;k.push(this.getContext().instructions),this.endContext(),this.getContext().instructions.push({op:"|",args:k});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(E&&this.parsePattern(E),!this.getContext().branches){if(1!==this.context.length)throw new Error('"branches" not found in an "or" group context');this.getContext().branches=[]}this.getContext().branches.push(this.getContext().instructions),this.getContext().instructions=[];break;case"[":E&&this.parsePattern(E),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:parseOneOfSet(E)});break;default:throw new Error("Unknown operator: ".concat(x))}C&&this.parsePattern(C)}else{if(Mt.test(w))throw new Error("Illegal characters found in a pattern: ".concat(w));this.getContext().instructions=this.getContext().instructions.concat(w.split(""))}}}]),PatternParser}();function parseOneOfSet(w){for(var $=[],x=0;x=E.length)break;I=E[k++]}else{if((k=E.next()).done)break;I=k.value}var format=I,R=formatCompleteNumber($,format,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function shouldTryNationalPrefixFormattingRule(w){return x.shouldTryNationalPrefixFormattingRule(w,{international:$.international,nationalPrefix:$.nationalPrefix})},getSeparatorAfterNationalPrefix:this.getSeparatorAfterNationalPrefix});if(R)return this.resetFormat(),this.chosenFormat=format,this.setNationalNumberTemplate(R.replace(/\d/g,kt),$),this.populatedNationalNumberTemplate=R,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(kt),R}}return this.formatNationalNumberWithNextDigits(w,$)}},{key:"formatNationalNumberWithNextDigits",value:function formatNationalNumberWithNextDigits(w,$){var x=this.chosenFormat,E=this.chooseFormat($);if(E)return E===x?this.formatNextNationalNumberDigits(w):this.formatNextNationalNumberDigits($.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function narrowDownMatchingFormats(w){var $=this,x=w.nationalSignificantNumber,E=w.nationalPrefix,C=w.international,k=x,I=k.length-3;I<0&&(I=0),this.matchingFormats=this.matchingFormats.filter((function(w){return $.formatSuits(w,C,E)&&$.formatMatches(w,k,I)})),this.chosenFormat&&-1===this.matchingFormats.indexOf(this.chosenFormat)&&this.resetFormat()}},{key:"formatSuits",value:function formatSuits(w,$,x){return!(x&&!w.usesNationalPrefix()&&!w.nationalPrefixIsOptionalWhenFormattingInNationalFormat())&&!(!$&&!x&&w.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function formatMatches(w,$,x){var E=w.leadingDigitsPatterns().length;if(0===E)return!0;x=Math.min(x,E-1);var C=w.leadingDigitsPatterns()[x];if($.length<3)try{return void 0!==new At(C).match($,{allowOverflow:!0})}catch(w){return console.error(w),!0}return new RegExp("^(".concat(C,")")).test($)}},{key:"getFormatFormat",value:function getFormatFormat(w,$){return $?w.internationalFormat():w.format()}},{key:"chooseFormat",value:function chooseFormat(w){var $=this,x=function _loop2(){if(C){if(k>=E.length)return"break";I=E[k++]}else{if((k=E.next()).done)return"break";I=k.value}var x=I;return $.chosenFormat===x?"break":Bt.test($.getFormatFormat(x,w.international))?$.createTemplateForFormat(x,w)?($.chosenFormat=x,"break"):($.matchingFormats=$.matchingFormats.filter((function(w){return w!==x})),"continue"):"continue"};var E=this.matchingFormats.slice(),C=Array.isArray(E),k=0;e:for(E=C?E:E[Symbol.iterator]();;){var I;switch(x()){case"break":break e;case"continue":continue}}return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function createTemplateForFormat(w,$){if(!(w.pattern().indexOf("|")>=0)){var x=this.getTemplateForFormat(w,$);return x?(this.setNationalNumberTemplate(x,$),!0):void 0}}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function getInternationalPrefixBeforeCountryCallingCode(w,$){var x=w.IDDPrefix,E=w.missingPlus;return x?$&&!1===$.spacing?x:x+" ":E?"":"+"}},{key:"getTemplate",value:function getTemplate(w){if(this.template){for(var $=-1,x=0,E=w.international?this.getInternationalPrefixBeforeCountryCallingCode(w,{spacing:!1}):"";xR.length)){var D=new RegExp("^"+I+"$"),W=x.replace(/\d/g,"9");D.test(W)&&(R=W);var V,G=this.getFormatFormat(w,E);if(this.shouldTryNationalPrefixFormattingRule(w,{international:E,nationalPrefix:C})){var K=G.replace(ve,w.nationalPrefixFormattingRule());if(parseDigits(w.nationalPrefixFormattingRule())===(C||"")+parseDigits("$1")&&(G=K,V=!0,C))for(var J=C.length;J>0;)G=G.replace(/\d/,kt),J--}var ie=R.replace(new RegExp(I),G).replace(new RegExp("9","g"),kt);return V||(k?ie=repeat(kt,k.length)+" "+ie:C&&(ie=repeat(kt,C.length)+this.getSeparatorAfterNationalPrefix(w)+ie)),E&&(ie=applyInternationalSeparatorStyle(ie)),ie}}},{key:"formatNextNationalNumberDigits",value:function formatNextNationalNumberDigits(w){var $=function populateTemplateWithDigits(w,$,x){var E=x.split(""),C=Array.isArray(E),k=0;for(E=C?E:E[Symbol.iterator]();;){var I;if(C){if(k>=E.length)break;I=E[k++]}else{if((k=E.next()).done)break;I=k.value}var R=I;if(w.slice($+1).search(Nt)<0)return;$=w.search(Nt),w=w.replace(Nt,R)}return[w,$]}(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,w);if($)return this.populatedNationalNumberTemplate=$[0],this.populatedNationalNumberTemplatePosition=$[1],cutAndStripNonPairedParens(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1);this.resetFormat()}}]),AsYouTypeFormatter}();function AsYouTypeParser_slicedToArray(w,$){return function AsYouTypeParser_arrayWithHoles(w){if(Array.isArray(w))return w}(w)||function AsYouTypeParser_iterableToArrayLimit(w,$){var x=[],E=!0,C=!1,k=void 0;try{for(var I,R=w[Symbol.iterator]();!(E=(I=R.next()).done)&&(x.push(I.value),!$||x.length!==$);E=!0);}catch(w){C=!0,k=w}finally{try{E||null==R.return||R.return()}finally{if(C)throw k}}return x}(w,$)||function AsYouTypeParser_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function AsYouTypeParser_defineProperties(w,$){for(var x=0;x<$.length;x++){var E=$[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}var Wt=new RegExp("^"+("["+k+"0-90-9٠-٩۰-۹]+")+"$","i"),Vt="(?:[++]["+k+"0-90-9٠-٩۰-۹]*|["+k+"0-90-9٠-٩۰-۹]+)",Ut=new RegExp("[^"+k+"0-90-9٠-٩۰-۹]+.*$"),qt=/[^\d\[\]]/,zt=function(){function AsYouTypeParser(w){var $=w.defaultCountry,x=w.defaultCallingCode,E=w.metadata,C=w.onNationalSignificantNumberChange;!function AsYouTypeParser_classCallCheck(w,$){if(!(w instanceof $))throw new TypeError("Cannot call a class as a function")}(this,AsYouTypeParser),this.defaultCountry=$,this.defaultCallingCode=x,this.metadata=E,this.onNationalSignificantNumberChange=C}return function AsYouTypeParser_createClass(w,$,x){return $&&AsYouTypeParser_defineProperties(w.prototype,$),x&&AsYouTypeParser_defineProperties(w,x),w}(AsYouTypeParser,[{key:"input",value:function input(w,$){var x,E=function extractFormattedDigitsAndPlus(w){var $=AsYouTypeParser_slicedToArray(function _extractFormattedDigitsAndPlus(w){var $=function AsYouTypeParser_extractFormattedPhoneNumber(w){var $,x=w.search(Vt);if(x<0)return;"+"===(w=w.slice(x))[0]&&($=!0,w=w.slice("+".length));w=w.replace(Ut,""),$&&(w="+"+w);return w}(w)||"";if("+"===$[0])return[$.slice("+".length),!0];return[$]}(w),2),x=$[0],E=$[1];Wt.test(x)||(x="");return[x,E]}(w),C=AsYouTypeParser_slicedToArray(E,2),k=C[0],I=C[1],R=parseDigits(k);return I&&($.digits||($.startInternationalNumber(),R||(x=!0))),R&&this.inputDigits(R,$),{digits:R,justLeadingPlus:x}}},{key:"inputDigits",value:function inputDigits(w,$){var x=$.digits,E=x.length<3&&x.length+w.length>=3;if($.appendDigits(w),E&&this.extractIddPrefix($),this.isWaitingForCountryCallingCode($)){if(!this.extractCountryCallingCode($))return}else $.appendNationalSignificantNumberDigits(w);$.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber($.getNationalDigits(),$.update)}},{key:"isWaitingForCountryCallingCode",value:function isWaitingForCountryCallingCode(w){var $=w.international,x=w.callingCode;return $&&!x}},{key:"extractCountryCallingCode",value:function extractCountryCallingCode(w){var $=extractCountryCallingCode_extractCountryCallingCode("+"+w.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),x=$.countryCallingCode,E=$.number;if(x)return w.setCallingCode(x),w.update({nationalSignificantNumber:E}),!0}},{key:"reset",value:function reset(w){if(w){this.hasSelectedNumberingPlan=!0;var $=w._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=$&&qt.test($)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function extractNationalSignificantNumber(w,$){if(this.hasSelectedNumberingPlan){var x=extractNationalNumberFromPossiblyIncompleteNumber(w,this.metadata),E=x.nationalPrefix,C=x.nationalNumber,k=x.carrierCode;if(C!==w)return this.onExtractedNationalNumber(E,k,C,w,$),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function extractAnotherNationalSignificantNumber(w,$,x){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(w,x);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var E=extractNationalNumberFromPossiblyIncompleteNumber(w,this.metadata),C=E.nationalPrefix,k=E.nationalNumber,I=E.carrierCode;if(k!==$)return this.onExtractedNationalNumber(C,I,k,w,x),!0}}},{key:"onExtractedNationalNumber",value:function onExtractedNationalNumber(w,$,x,E,C){var k,I,R=E.lastIndexOf(x);if(R>=0&&R===E.length-x.length){I=!0;var D=E.slice(0,R);D!==w&&(k=D)}C({nationalPrefix:w,carrierCode:$,nationalSignificantNumber:x,nationalSignificantNumberMatchesInput:I,complexPrefixBeforeNationalSignificantNumber:k}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function reExtractNationalSignificantNumber(w){return!!this.extractAnotherNationalSignificantNumber(w.getNationalDigits(),w.nationalSignificantNumber,w.update)||(this.extractIddPrefix(w)||this.fixMissingPlus(w)?(this.extractCallingCodeAndNationalSignificantNumber(w),!0):void 0)}},{key:"extractIddPrefix",value:function extractIddPrefix(w){var $=w.international,x=w.IDDPrefix,E=w.digits;w.nationalSignificantNumber;if(!$&&!x){var C=stripIddPrefix(E,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);return void 0!==C&&C!==E?(w.update({IDDPrefix:E.slice(0,E.length-C.length)}),this.startInternationalNumber(w),!0):void 0}}},{key:"fixMissingPlus",value:function fixMissingPlus(w){if(!w.international){var $=extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(w.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),x=$.countryCallingCode;$.number;if(x)return w.update({missingPlus:!0}),this.startInternationalNumber(w),!0}}},{key:"startInternationalNumber",value:function startInternationalNumber(w){w.startInternationalNumber(),w.nationalSignificantNumber&&(w.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function extractCallingCodeAndNationalSignificantNumber(w){this.extractCountryCallingCode(w)&&this.extractNationalSignificantNumber(w.getNationalDigits(),w.update)}}]),AsYouTypeParser}();function AsYouType_typeof(w){return(AsYouType_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(w){return typeof w}:function _typeof(w){return w&&"function"==typeof Symbol&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w})(w)}function AsYouType_slicedToArray(w,$){return function AsYouType_arrayWithHoles(w){if(Array.isArray(w))return w}(w)||function AsYouType_iterableToArrayLimit(w,$){var x=[],E=!0,C=!1,k=void 0;try{for(var I,R=w[Symbol.iterator]();!(E=(I=R.next()).done)&&(x.push(I.value),!$||x.length!==$);E=!0);}catch(w){C=!0,k=w}finally{try{E||null==R.return||R.return()}finally{if(C)throw k}}return x}(w,$)||function AsYouType_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function AsYouType_defineProperties(w,$){for(var x=0;x<$.length;x++){var E=$[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}var Gt=function(){function AsYouType(w,$){!function AsYouType_classCallCheck(w,$){if(!(w instanceof $))throw new TypeError("Cannot call a class as a function")}(this,AsYouType),this.metadata=new D($);var x=AsYouType_slicedToArray(this.getCountryAndCallingCode(w),2),E=x[0],C=x[1];this.defaultCountry=E,this.defaultCallingCode=C,this.reset()}return function AsYouType_createClass(w,$,x){return $&&AsYouType_defineProperties(w.prototype,$),x&&AsYouType_defineProperties(w,x),w}(AsYouType,[{key:"getCountryAndCallingCode",value:function getCountryAndCallingCode(w){var $,x;return w&&("object"===AsYouType_typeof(w)?($=w.defaultCountry,x=w.defaultCallingCode):$=w),$&&!this.metadata.hasCountry($)&&($=void 0),[$,x]}},{key:"input",value:function input(w){var $=this.parser.input(w,this.state),x=$.digits;if($.justLeadingPlus)this.formattedOutput="+";else if(x){var E;if(this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state),this.metadata.hasSelectedNumberingPlan()&&(E=this.formatter.format(x,this.state)),void 0===E&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var C=this.state.getNationalDigits();C&&(E=this.formatter.format(C,this.state))}this.formattedOutput=E?this.getFullNumber(E):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function reset(){var w=this;return this.state=new Tt({onCountryChange:function onCountryChange($){w.country=$},onCallingCodeChange:function onCallingCodeChange($,x){w.metadata.selectNumberingPlan($,x),w.formatter.reset(w.metadata.numberingPlan,w.state),w.parser.reset(w.metadata.numberingPlan)}}),this.formatter=new Dt({state:this.state,metadata:this.metadata}),this.parser=new zt({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function onNationalSignificantNumberChange(){w.determineTheCountryIfNeeded(),w.formatter.reset(w.metadata.numberingPlan,w.state)}}),this.state.reset(this.defaultCountry,this.defaultCallingCode),this.formattedOutput="",this}},{key:"isInternational",value:function isInternational(){return this.state.international}},{key:"getCallingCode",value:function getCallingCode(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function getCountryCallingCode(){return this.getCallingCode()}},{key:"getCountry",value:function getCountry(){if(this.state.digits)return this._getCountry()}},{key:"_getCountry",value:function _getCountry(){var w=this.state.country;return w}},{key:"determineTheCountryIfNeeded",value:function determineTheCountryIfNeeded(){this.state.country&&!this.isCountryCallingCodeAmbiguous()||this.determineTheCountry()}},{key:"getFullNumber",value:function getFullNumber(w){var $=this;if(this.isInternational()){var x=function prefix(w){return $.formatter.getInternationalPrefixBeforeCountryCallingCode($.state,{spacing:!!w})+w},E=this.state.callingCode;return x(E?w?"".concat(E," ").concat(w):E:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return w}},{key:"getNonFormattedNationalNumberWithPrefix",value:function getNonFormattedNationalNumberWithPrefix(){var w=this.state,$=w.nationalSignificantNumber,x=w.complexPrefixBeforeNationalSignificantNumber,E=w.nationalPrefix,C=$,k=x||E;return k&&(C=k+C),C}},{key:"getNonFormattedNumber",value:function getNonFormattedNumber(){var w=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(w?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function getNonFormattedTemplate(){var w=this.getNonFormattedNumber();if(w)return w.replace(/[\+\d]/g,kt)}},{key:"isCountryCallingCodeAmbiguous",value:function isCountryCallingCodeAmbiguous(){var w=this.state.callingCode,$=this.metadata.getCountryCodesForCallingCode(w);return $&&$.length>1}},{key:"determineTheCountry",value:function determineTheCountry(){this.state.setCountry(getCountryByCallingCode(this.isInternational()?this.state.callingCode:this.defaultCallingCode,this.state.nationalSignificantNumber,this.metadata))}},{key:"getNumberValue",value:function getNumberValue(){var w=this.state,$=w.digits,x=w.callingCode,E=w.country,C=w.nationalSignificantNumber;if($)return this.isInternational()?x?"+"+x+C:"+"+$:E||x?"+"+(E?this.metadata.countryCallingCode():x)+C:void 0}},{key:"getNumber",value:function getNumber(){var w=this.state,$=w.nationalSignificantNumber,x=w.carrierCode,E=w.callingCode,C=this._getCountry();if($&&(C||E)){var k=new we(C||E,$,this.metadata.metadata);return x&&(k.carrierCode=x),k}}},{key:"isPossible",value:function isPossible(){var w=this.getNumber();return!!w&&w.isPossible()}},{key:"isValid",value:function isValid(){var w=this.getNumber();return!!w&&w.isValid()}},{key:"getNationalNumber",value:function getNationalNumber(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function getChars(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function getTemplate(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}]),AsYouType}();function exports_AsYouType_AsYouType(w){return Gt.call(this,w,C)}function isSupportedCountry_isSupportedCountry(){return withMetadata(isSupportedCountry,arguments)}function getCountries(w){return new D(w).getCountries()}function getCountries_getCountries(){return withMetadata(getCountries,arguments)}function getCountryCallingCode_getCountryCallingCode(){return withMetadata(getCountryCallingCode,arguments)}function getExtPrefix_getExtPrefix(){return withMetadata(getExtPrefix,arguments)}function Metadata_Metadata(){return D.call(this,C)}function getExampleNumber(w,$,x){if($[w])return new we(w,$[w],x)}function getExampleNumber_getExampleNumber(){return withMetadata(getExampleNumber,arguments)}function formatIncompletePhoneNumber(w,$,x){return x||(x=$,$=void 0),new Gt($,x).input(w)}function formatIncompletePhoneNumber_formatIncompletePhoneNumber(){return withMetadata(formatIncompletePhoneNumber,arguments)}exports_AsYouType_AsYouType.prototype=Object.create(Gt.prototype,{}),exports_AsYouType_AsYouType.prototype.constructor=exports_AsYouType_AsYouType,Metadata_Metadata.prototype=Object.create(D.prototype,{}),Metadata_Metadata.prototype.constructor=Metadata_Metadata},function(w,$,x){"use strict";x.r($),x.d($,"Observable",(function(){return E.a})),x.d($,"ConnectableObservable",(function(){return C.a})),x.d($,"GroupedObservable",(function(){return k.a})),x.d($,"observable",(function(){return I.a})),x.d($,"Subject",(function(){return R.a})),x.d($,"BehaviorSubject",(function(){return D.a})),x.d($,"ReplaySubject",(function(){return W.a})),x.d($,"AsyncSubject",(function(){return V.a})),x.d($,"asap",(function(){return G.a})),x.d($,"asapScheduler",(function(){return G.b})),x.d($,"async",(function(){return K.a})),x.d($,"asyncScheduler",(function(){return K.b})),x.d($,"queue",(function(){return J.a})),x.d($,"queueScheduler",(function(){return J.b})),x.d($,"animationFrame",(function(){return de})),x.d($,"animationFrameScheduler",(function(){return se})),x.d($,"VirtualTimeScheduler",(function(){return le})),x.d($,"VirtualAction",(function(){return pe})),x.d($,"Scheduler",(function(){return he.a})),x.d($,"Subscription",(function(){return ve.a})),x.d($,"Subscriber",(function(){return ge.a})),x.d($,"Notification",(function(){return Se.a})),x.d($,"NotificationKind",(function(){return Se.b})),x.d($,"pipe",(function(){return we.a})),x.d($,"noop",(function(){return Ce.a})),x.d($,"identity",(function(){return Pe.a})),x.d($,"isObservable",(function(){return isObservable})),x.d($,"ArgumentOutOfRangeError",(function(){return Ie.a})),x.d($,"EmptyError",(function(){return Fe.a})),x.d($,"ObjectUnsubscribedError",(function(){return Re.a})),x.d($,"UnsubscriptionError",(function(){return Le.a})),x.d($,"TimeoutError",(function(){return De.a})),x.d($,"bindCallback",(function(){return bindCallback})),x.d($,"bindNodeCallback",(function(){return bindNodeCallback})),x.d($,"combineLatest",(function(){return Ze.b})),x.d($,"concat",(function(){return Qe.a})),x.d($,"defer",(function(){return et.a})),x.d($,"empty",(function(){return tt.b})),x.d($,"forkJoin",(function(){return forkJoin})),x.d($,"from",(function(){return nt.a})),x.d($,"fromEvent",(function(){return fromEvent})),x.d($,"fromEventPattern",(function(){return fromEventPattern})),x.d($,"generate",(function(){return generate})),x.d($,"iif",(function(){return iif})),x.d($,"interval",(function(){return interval})),x.d($,"merge",(function(){return ut.a})),x.d($,"never",(function(){return never})),x.d($,"of",(function(){return st.a})),x.d($,"onErrorResumeNext",(function(){return onErrorResumeNext})),x.d($,"pairs",(function(){return pairs})),x.d($,"partition",(function(){return partition})),x.d($,"race",(function(){return ft.a})),x.d($,"range",(function(){return range})),x.d($,"throwError",(function(){return pt.a})),x.d($,"timer",(function(){return ht.a})),x.d($,"using",(function(){return using})),x.d($,"zip",(function(){return bt.b})),x.d($,"scheduled",(function(){return vt.a})),x.d($,"EMPTY",(function(){return tt.a})),x.d($,"NEVER",(function(){return at})),x.d($,"config",(function(){return yt.a}));var E=x(4),C=x(79),k=x(77),I=x(26),R=x(7),D=x(80),W=x(57),V=x(35),G=x(49),K=x(8),J=x(70),ie=x(1),oe=x(36),ue=function(w){function AnimationFrameAction($,x){var E=w.call(this,$,x)||this;return E.scheduler=$,E.work=x,E}return ie.__extends(AnimationFrameAction,w),AnimationFrameAction.prototype.requestAsyncId=function($,x,E){return void 0===E&&(E=0),null!==E&&E>0?w.prototype.requestAsyncId.call(this,$,x,E):($.actions.push(this),$.scheduled||($.scheduled=requestAnimationFrame((function(){return $.flush(null)}))))},AnimationFrameAction.prototype.recycleAsyncId=function($,x,E){if(void 0===E&&(E=0),null!==E&&E>0||null===E&&this.delay>0)return w.prototype.recycleAsyncId.call(this,$,x,E);0===$.actions.length&&(cancelAnimationFrame(x),$.scheduled=void 0)},AnimationFrameAction}(oe.a),ae=x(34),se=new(function(w){function AnimationFrameScheduler(){return null!==w&&w.apply(this,arguments)||this}return ie.__extends(AnimationFrameScheduler,w),AnimationFrameScheduler.prototype.flush=function(w){this.active=!0,this.scheduled=void 0;var $,x=this.actions,E=-1,C=x.length;w=w||x.shift();do{if($=w.execute(w.state,w.delay))break}while(++E$.index?1:-1:w.delay>$.delay?1:-1},VirtualAction}(oe.a),he=x(71),ve=x(6),ge=x(2),Se=x(23),we=x(48),Ce=x(25),Pe=x(20);function isObservable(w){return!!w&&(w instanceof E.a||"function"==typeof w.lift&&"function"==typeof w.subscribe)}var Ie=x(28),Fe=x(31),Re=x(27),Le=x(51),De=x(82),Ue=x(10),ze=x(64),He=x(9),Ke=x(11);function bindCallback(w,$,x){if($){if(!Object(Ke.a)($))return function(){for(var E=[],C=0;C1?E.next(Array.prototype.slice.call(arguments)):E.next(w)}),E,x)}))}function fromEventPattern(w,$,x){return x?fromEventPattern(w,$).pipe(Object(Ue.a)((function(w){return Object(He.a)(w)?x.apply(void 0,w):x(w)}))):new E.a((function(x){var E,handler=function(){for(var w=[],$=0;$=$){E.complete();break}if(E.next(k++),E.closed)break}}))}function range_dispatch(w){var $=w.start,x=w.index,E=w.count,C=w.subscriber;x>=E?C.complete():(C.next($),C.closed||(w.index=x+1,w.start=$+1,this.schedule(w)))}var pt=x(58),ht=x(86);function using(w,$){return new E.a((function(x){var E,C;try{E=w()}catch(w){return void x.error(w)}try{C=$(E)}catch(w){return void x.error(w)}var k=(C?Object(nt.a)(C):tt.a).subscribe(x);return function(){k.unsubscribe(),E&&E.unsubscribe()}}))}var bt=x(62),vt=x(87),yt=x(19)}]); +!function(w){var $={};function __webpack_require__(x){if($[x])return $[x].exports;var E=$[x]={i:x,l:!1,exports:{}};return w[x].call(E.exports,E,E.exports,__webpack_require__),E.l=!0,E.exports}__webpack_require__.m=w,__webpack_require__.c=$,__webpack_require__.d=function(w,$,x){__webpack_require__.o(w,$)||Object.defineProperty(w,$,{enumerable:!0,get:x})},__webpack_require__.r=function(w){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(w,"__esModule",{value:!0})},__webpack_require__.t=function(w,$){if(1&$&&(w=__webpack_require__(w)),8&$)return w;if(4&$&&"object"==typeof w&&w&&w.__esModule)return w;var x=Object.create(null);if(__webpack_require__.r(x),Object.defineProperty(x,"default",{enumerable:!0,value:w}),2&$&&"string"!=typeof w)for(var E in w)__webpack_require__.d(x,E,function($){return w[$]}.bind(null,E));return x},__webpack_require__.n=function(w){var $=w&&w.__esModule?function getDefault(){return w.default}:function getModuleExports(){return w};return __webpack_require__.d($,"a",$),$},__webpack_require__.o=function(w,$){return Object.prototype.hasOwnProperty.call(w,$)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=130)}([function(w,$,x){"use strict";var E=function _interopRequireDefault(w){return w&&w.__esModule?w:{default:w}}(x(52));w.exports=(0,E.default)("vendor")().React},function(w,$,x){"use strict";x.r($),x.d($,"__extends",(function(){return __extends})),x.d($,"__assign",(function(){return __assign})),x.d($,"__rest",(function(){return __rest})),x.d($,"__decorate",(function(){return __decorate})),x.d($,"__param",(function(){return __param})),x.d($,"__metadata",(function(){return __metadata})),x.d($,"__awaiter",(function(){return __awaiter})),x.d($,"__generator",(function(){return __generator})),x.d($,"__createBinding",(function(){return __createBinding})),x.d($,"__exportStar",(function(){return __exportStar})),x.d($,"__values",(function(){return __values})),x.d($,"__read",(function(){return __read})),x.d($,"__spread",(function(){return __spread})),x.d($,"__spreadArrays",(function(){return __spreadArrays})),x.d($,"__await",(function(){return __await})),x.d($,"__asyncGenerator",(function(){return __asyncGenerator})),x.d($,"__asyncDelegator",(function(){return __asyncDelegator})),x.d($,"__asyncValues",(function(){return __asyncValues})),x.d($,"__makeTemplateObject",(function(){return __makeTemplateObject})),x.d($,"__importStar",(function(){return __importStar})),x.d($,"__importDefault",(function(){return __importDefault})),x.d($,"__classPrivateFieldGet",(function(){return __classPrivateFieldGet})),x.d($,"__classPrivateFieldSet",(function(){return __classPrivateFieldSet}));var extendStatics=function(w,$){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,$){w.__proto__=$}||function(w,$){for(var x in $)$.hasOwnProperty(x)&&(w[x]=$[x])})(w,$)};function __extends(w,$){function __(){this.constructor=w}extendStatics(w,$),w.prototype=null===$?Object.create($):(__.prototype=$.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function __assign(w){for(var $,x=1,E=arguments.length;x=0;R--)(C=w[R])&&(I=(k<3?C(I):k>3?C($,x,I):C($,x))||I);return k>3&&I&&Object.defineProperty($,x,I),I}function __param(w,$){return function(x,E){$(x,E,w)}}function __metadata(w,$){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(w,$)}function __awaiter(w,$,x,E){return new(x||(x=Promise))((function(C,k){function fulfilled(w){try{step(E.next(w))}catch(w){k(w)}}function rejected(w){try{step(E.throw(w))}catch(w){k(w)}}function step(w){w.done?C(w.value):function adopt(w){return w instanceof x?w:new x((function($){$(w)}))}(w.value).then(fulfilled,rejected)}step((E=E.apply(w,$||[])).next())}))}function __generator(w,$){var x,E,C,k,I={label:0,sent:function(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return k={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k;function verb(k){return function(R){return function step(k){if(x)throw new TypeError("Generator is already executing.");for(;I;)try{if(x=1,E&&(C=2&k[0]?E.return:k[0]?E.throw||((C=E.return)&&C.call(E),0):E.next)&&!(C=C.call(E,k[1])).done)return C;switch(E=0,C&&(k=[2&k[0],C.value]),k[0]){case 0:case 1:C=k;break;case 4:return I.label++,{value:k[1],done:!1};case 5:I.label++,E=k[1],k=[0];continue;case 7:k=I.ops.pop(),I.trys.pop();continue;default:if(!(C=I.trys,(C=C.length>0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]=w.length&&(w=void 0),{value:w&&w[E++],done:!w}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I}function __spread(){for(var w=[],$=0;$1||resume(w,$)}))})}function resume(w,$){try{!function step(w){w.value instanceof __await?Promise.resolve(w.value.v).then(fulfill,reject):settle(k[0][2],w)}(C[w]($))}catch(w){settle(k[0][3],w)}}function fulfill(w){resume("next",w)}function reject(w){resume("throw",w)}function settle(w,$){w($),k.shift(),k.length&&resume(k[0][0],k[0][1])}}function __asyncDelegator(w){var $,x;return $={},verb("next"),verb("throw",(function(w){throw w})),verb("return"),$[Symbol.iterator]=function(){return this},$;function verb(E,C){$[E]=w[E]?function($){return(x=!x)?{value:__await(w[E]($)),done:"return"===E}:C?C($):$}:C}}function __asyncValues(w){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var $,x=w[Symbol.asyncIterator];return x?x.call(w):(w=__values(w),$={},verb("next"),verb("throw"),verb("return"),$[Symbol.asyncIterator]=function(){return this},$);function verb(x){$[x]=w[x]&&function($){return new Promise((function(E,C){(function settle(w,$,x,E){Promise.resolve(E).then((function($){w({value:$,done:x})}),$)})(E,C,($=w[x]($)).done,$.value)}))}}}function __makeTemplateObject(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w}function __importStar(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)Object.hasOwnProperty.call(w,x)&&($[x]=w[x]);return $.default=w,$}function __importDefault(w){return w&&w.__esModule?w:{default:w}}function __classPrivateFieldGet(w,$){if(!$.has(w))throw new TypeError("attempted to get private field on non-instance");return $.get(w)}function __classPrivateFieldSet(w,$,x){if(!$.has(w))throw new TypeError("attempted to set private field on non-instance");return $.set(w,x),x}},function(w,$,x){"use strict";x.d($,"a",(function(){return V}));var E=x(1),C=x(29),k=x(66),I=x(6),R=x(50),D=x(19),W=x(41),V=function(w){function Subscriber($,x,E){var C=w.call(this)||this;switch(C.syncErrorValue=null,C.syncErrorThrown=!1,C.syncErrorThrowable=!1,C.isStopped=!1,arguments.length){case 0:C.destination=k.a;break;case 1:if(!$){C.destination=k.a;break}if("object"==typeof $){$ instanceof Subscriber?(C.syncErrorThrowable=$.syncErrorThrowable,C.destination=$,$.add(C)):(C.syncErrorThrowable=!0,C.destination=new G(C,$));break}default:C.syncErrorThrowable=!0,C.destination=new G(C,$,x,E)}return C}return E.__extends(Subscriber,w),Subscriber.prototype[R.a]=function(){return this},Subscriber.create=function(w,$,x){var E=new Subscriber(w,$,x);return E.syncErrorThrowable=!1,E},Subscriber.prototype.next=function(w){this.isStopped||this._next(w)},Subscriber.prototype.error=function(w){this.isStopped||(this.isStopped=!0,this._error(w))},Subscriber.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},Subscriber.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,w.prototype.unsubscribe.call(this))},Subscriber.prototype._next=function(w){this.destination.next(w)},Subscriber.prototype._error=function(w){this.destination.error(w),this.unsubscribe()},Subscriber.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},Subscriber.prototype._unsubscribeAndRecycle=function(){var w=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=w,this},Subscriber}(I.a),G=function(w){function SafeSubscriber($,x,E,I){var R,D=w.call(this)||this;D._parentSubscriber=$;var W=D;return Object(C.a)(x)?R=x:x&&(R=x.next,E=x.error,I=x.complete,x!==k.a&&(W=Object.create(x),Object(C.a)(W.unsubscribe)&&D.add(W.unsubscribe.bind(W)),W.unsubscribe=D.unsubscribe.bind(D))),D._context=W,D._next=R,D._error=E,D._complete=I,D}return E.__extends(SafeSubscriber,w),SafeSubscriber.prototype.next=function(w){if(!this.isStopped&&this._next){var $=this._parentSubscriber;D.a.useDeprecatedSynchronousErrorHandling&&$.syncErrorThrowable?this.__tryOrSetError($,this._next,w)&&this.unsubscribe():this.__tryOrUnsub(this._next,w)}},SafeSubscriber.prototype.error=function(w){if(!this.isStopped){var $=this._parentSubscriber,x=D.a.useDeprecatedSynchronousErrorHandling;if(this._error)x&&$.syncErrorThrowable?(this.__tryOrSetError($,this._error,w),this.unsubscribe()):(this.__tryOrUnsub(this._error,w),this.unsubscribe());else if($.syncErrorThrowable)x?($.syncErrorValue=w,$.syncErrorThrown=!0):Object(W.a)(w),this.unsubscribe();else{if(this.unsubscribe(),x)throw w;Object(W.a)(w)}}},SafeSubscriber.prototype.complete=function(){var w=this;if(!this.isStopped){var $=this._parentSubscriber;if(this._complete){var wrappedComplete=function(){return w._complete.call(w._context)};D.a.useDeprecatedSynchronousErrorHandling&&$.syncErrorThrowable?(this.__tryOrSetError($,wrappedComplete),this.unsubscribe()):(this.__tryOrUnsub(wrappedComplete),this.unsubscribe())}else this.unsubscribe()}},SafeSubscriber.prototype.__tryOrUnsub=function(w,$){try{w.call(this._context,$)}catch(w){if(this.unsubscribe(),D.a.useDeprecatedSynchronousErrorHandling)throw w;Object(W.a)(w)}},SafeSubscriber.prototype.__tryOrSetError=function(w,$,x){if(!D.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{$.call(this._context,x)}catch($){return D.a.useDeprecatedSynchronousErrorHandling?(w.syncErrorValue=$,w.syncErrorThrown=!0,!0):(Object(W.a)($),!0)}return!1},SafeSubscriber.prototype._unsubscribe=function(){var w=this._parentSubscriber;this._context=null,this._parentSubscriber=null,w.unsubscribe()},SafeSubscriber}(V)},function(w,$,x){"use strict";x.d($,"a",(function(){return R})),x.d($,"b",(function(){return D})),x.d($,"c",(function(){return innerSubscribe}));var E=x(1),C=x(2),k=x(4),I=x(40),R=function(w){function SimpleInnerSubscriber($){var x=w.call(this)||this;return x.parent=$,x}return E.__extends(SimpleInnerSubscriber,w),SimpleInnerSubscriber.prototype._next=function(w){this.parent.notifyNext(w)},SimpleInnerSubscriber.prototype._error=function(w){this.parent.notifyError(w),this.unsubscribe()},SimpleInnerSubscriber.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},SimpleInnerSubscriber}(C.a),D=(C.a,function(w){function SimpleOuterSubscriber(){return null!==w&&w.apply(this,arguments)||this}return E.__extends(SimpleOuterSubscriber,w),SimpleOuterSubscriber.prototype.notifyNext=function(w){this.destination.next(w)},SimpleOuterSubscriber.prototype.notifyError=function(w){this.destination.error(w)},SimpleOuterSubscriber.prototype.notifyComplete=function(){this.destination.complete()},SimpleOuterSubscriber}(C.a));C.a;function innerSubscribe(w,$){if(!$.closed){if(w instanceof k.a)return w.subscribe($);var x;try{x=Object(I.a)(w)($)}catch(w){$.error(w)}return x}}},function(w,$,x){"use strict";x.d($,"a",(function(){return V}));var E=x(64),C=x(2),k=x(50),I=x(66);var R=x(26),D=x(48),W=x(19),V=function(){function Observable(w){this._isScalar=!1,w&&(this._subscribe=w)}return Observable.prototype.lift=function(w){var $=new Observable;return $.source=this,$.operator=w,$},Observable.prototype.subscribe=function(w,$,x){var E=this.operator,R=function toSubscriber(w,$,x){if(w){if(w instanceof C.a)return w;if(w[k.a])return w[k.a]()}return w||$||x?new C.a(w,$,x):new C.a(I.a)}(w,$,x);if(E?R.add(E.call(R,this.source)):R.add(this.source||W.a.useDeprecatedSynchronousErrorHandling&&!R.syncErrorThrowable?this._subscribe(R):this._trySubscribe(R)),W.a.useDeprecatedSynchronousErrorHandling&&R.syncErrorThrowable&&(R.syncErrorThrowable=!1,R.syncErrorThrown))throw R.syncErrorValue;return R},Observable.prototype._trySubscribe=function(w){try{return this._subscribe(w)}catch($){W.a.useDeprecatedSynchronousErrorHandling&&(w.syncErrorThrown=!0,w.syncErrorValue=$),Object(E.a)(w)?w.error($):console.warn($)}},Observable.prototype.forEach=function(w,$){var x=this;return new($=getPromiseCtor($))((function($,E){var C;C=x.subscribe((function($){try{w($)}catch(w){E(w),C&&C.unsubscribe()}}),E,$)}))},Observable.prototype._subscribe=function(w){var $=this.source;return $&&$.subscribe(w)},Observable.prototype[R.a]=function(){return this},Observable.prototype.pipe=function(){for(var w=[],$=0;$=0;R--)(C=w[R])&&(I=(k<3?C(I):k>3?C($,x,I):C($,x))||I);return k>3&&I&&Object.defineProperty($,x,I),I}function __param(w,$){return function(x,E){$(x,E,w)}}function __metadata(w,$){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(w,$)}function __awaiter(w,$,x,E){return new(x||(x=Promise))((function(C,k){function fulfilled(w){try{step(E.next(w))}catch(w){k(w)}}function rejected(w){try{step(E.throw(w))}catch(w){k(w)}}function step(w){w.done?C(w.value):function adopt(w){return w instanceof x?w:new x((function($){$(w)}))}(w.value).then(fulfilled,rejected)}step((E=E.apply(w,$||[])).next())}))}function __generator(w,$){var x,E,C,k,I={label:0,sent:function(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return k={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k;function verb(k){return function(R){return function step(k){if(x)throw new TypeError("Generator is already executing.");for(;I;)try{if(x=1,E&&(C=2&k[0]?E.return:k[0]?E.throw||((C=E.return)&&C.call(E),0):E.next)&&!(C=C.call(E,k[1])).done)return C;switch(E=0,C&&(k=[2&k[0],C.value]),k[0]){case 0:case 1:C=k;break;case 4:return I.label++,{value:k[1],done:!1};case 5:I.label++,E=k[1],k=[0];continue;case 7:k=I.ops.pop(),I.trys.pop();continue;default:if(!(C=I.trys,(C=C.length>0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]=w.length&&(w=void 0),{value:w&&w[E++],done:!w}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I}function __spread(){for(var w=[],$=0;$1||resume(w,$)}))})}function resume(w,$){try{!function step(w){w.value instanceof __await?Promise.resolve(w.value.v).then(fulfill,reject):settle(k[0][2],w)}(C[w]($))}catch(w){settle(k[0][3],w)}}function fulfill(w){resume("next",w)}function reject(w){resume("throw",w)}function settle(w,$){w($),k.shift(),k.length&&resume(k[0][0],k[0][1])}}function __asyncDelegator(w){var $,x;return $={},verb("next"),verb("throw",(function(w){throw w})),verb("return"),$[Symbol.iterator]=function(){return this},$;function verb(E,C){$[E]=w[E]?function($){return(x=!x)?{value:__await(w[E]($)),done:"return"===E}:C?C($):$}:C}}function __asyncValues(w){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var $,x=w[Symbol.asyncIterator];return x?x.call(w):(w=__values(w),$={},verb("next"),verb("throw"),verb("return"),$[Symbol.asyncIterator]=function(){return this},$);function verb(x){$[x]=w[x]&&function($){return new Promise((function(E,C){(function settle(w,$,x,E){Promise.resolve(E).then((function($){w({value:$,done:x})}),$)})(E,C,($=w[x]($)).done,$.value)}))}}}function __makeTemplateObject(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w}var C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$};function __importStar(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$}function __importDefault(w){return w&&w.__esModule?w:{default:w}}function __classPrivateFieldGet(w,$,x,E){if("a"===x&&!E)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof $?w!==$||!E:!$.has(w))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===x?E:"a"===x?E.call(w):E?E.value:$.get(w)}function __classPrivateFieldSet(w,$,x,E,C){if("m"===E)throw new TypeError("Private method is not writable");if("a"===E&&!C)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof $?w!==$||!C:!$.has(w))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===E?C.call(w,x):C?C.value=x:$.set(w,x),x}},function(w,$,x){"use strict";x.d($,"a",(function(){return R}));var E=x(9),C=x(63),k=x(29),I=x(51),R=function(){function Subscription(w){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,w&&(this._ctorUnsubscribe=!0,this._unsubscribe=w)}var w;return Subscription.prototype.unsubscribe=function(){var w;if(!this.closed){var $=this._parentOrParents,x=this._ctorUnsubscribe,R=this._unsubscribe,D=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,$ instanceof Subscription)$.remove(this);else if(null!==$)for(var W=0;W<$.length;++W){$[W].remove(this)}if(Object(k.a)(R)){x&&(this._unsubscribe=void 0);try{R.call(this)}catch($){w=$ instanceof I.a?flattenUnsubscriptionErrors($.errors):[$]}}if(Object(E.a)(D)){W=-1;for(var V=D.length;++W1?$-1:0),E=1;E<$;E++)x[E-1]=arguments[E];throw new Error("An error occurred. See https://git.io/JUIaE#"+w+" for more information."+(x.length>0?" Args: "+x.join(", "):""))}var le=function(){function e(w){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=w}var w=e.prototype;return w.indexOfGroup=function(w){for(var $=0,x=0;x=this.groupSizes.length){for(var x=this.groupSizes,E=x.length,C=E;w>=C;)(C<<=1)<0&&j(16,""+w);this.groupSizes=new Uint32Array(C),this.groupSizes.set(x),this.length=C;for(var k=E;k=this.length||0===this.groupSizes[w])return $;for(var x=this.groupSizes[w],E=this.indexOfGroup(w),C=E+x,k=E;k=0;x--){var E=$[x];if(E&&1===E.nodeType&&E.hasAttribute(oe))return E}}(x),k=void 0!==C?C.nextSibling:null;E.setAttribute(oe,"active"),E.setAttribute("data-styled-version","5.3.0");var I=q();return I&&E.setAttribute("nonce",I),x.insertBefore(E,k),E},we=function(){function e(w){var $=this.element=H(w);$.appendChild(document.createTextNode("")),this.sheet=function(w){if(w.sheet)return w.sheet;for(var $=document.styleSheets,x=0,E=$.length;x=0){var x=document.createTextNode($),E=this.nodes[w];return this.element.insertBefore(x,E||null),this.length++,!0}return!1},w.deleteRule=function(w){this.element.removeChild(this.nodes[w]),this.length--},w.getRule=function(w){return w0&&(W+=w+",")})),E+=""+R+D+'{content:"'+W+'"}/*!sc*/\n'}}}return E}(this)},e}(),Le=/(a)(d)/gi,Q=function(w){return String.fromCharCode(w+(w>25?39:97))};function ee(w){var $,x="";for($=Math.abs(w);$>52;$=$/52|0)x=Q($%52)+x;return(Q($%52)+x).replace(Le,"$1-$2")}var te=function(w,$){for(var x=$.length;x;)w=33*w^$.charCodeAt(--x);return w},ne=function(w){return te(5381,w)};function re(w){for(var $=0;$>>0);if(!$.hasNameForId(E,I)){var R=x(k,"."+I,void 0,E);$.insertRules(E,I,R)}C.push(I),this.staticRulesId=I}else{for(var D=this.rules.length,W=te(this.baseHash,x.hash),V="",G=0;G>>0);if(!$.hasNameForId(E,oe)){var ue=x(V,"."+oe,void 0,E);$.insertRules(E,oe,ue)}C.push(oe)}}return C.join(" ")},e}(),ze=/^\s*\/\/.*$/gm,He=[":","[",".","#"];function ce(w){var $,x,E,C,k=void 0===w?ie:w,I=k.options,R=void 0===I?ie:I,W=k.plugins,V=void 0===W?J:W,G=new D.a(R),K=[],oe=function(w){function t($){if($)try{w($+"}")}catch(w){}}return function($,x,E,C,k,I,R,D,W,V){switch($){case 1:if(0===W&&64===x.charCodeAt(0))return w(x+";"),"";break;case 2:if(0===D)return x+"/*|*/";break;case 3:switch(D){case 102:case 112:return w(E[0]+x),"";default:return x+(0===V?"/*|*/":"")}case-2:x.split("/*|*/}").forEach(t)}}}((function(w){K.push(w)})),f=function(w,E,k){return 0===E&&-1!==He.indexOf(k[x.length])||k.match(C)?w:"."+$};function m(w,k,I,R){void 0===R&&(R="&");var D=w.replace(ze,""),W=k&&I?I+" "+k+" { "+D+" }":D;return $=R,x=k,E=new RegExp("\\"+x+"\\b","g"),C=new RegExp("(\\"+x+"\\b){2,}"),G(I||!k?"":k,W)}return G.use([].concat(V,[function(w,$,C){2===w&&C.length&&C[0].lastIndexOf(x)>0&&(C[0]=C[0].replace(E,f))},oe,function(w){if(-2===w){var $=K;return K=[],$}}])),m.hash=V.length?V.reduce((function(w,$){return $.name||j(15),te(w,$.name)}),5381).toString():"",m}var Ke=k.a.createContext(),Ze=Ke.Consumer,Qe=k.a.createContext(),et=(Qe.Consumer,new Re),tt=ce();function fe(){return Object(C.useContext)(Ke)||et}function me(){return Object(C.useContext)(Qe)||tt}function ye(w){var $=Object(C.useState)(w.stylisPlugins),x=$[0],E=$[1],I=fe(),D=Object(C.useMemo)((function(){var $=I;return w.sheet?$=w.sheet:w.target&&($=$.reconstructWithOptions({target:w.target},!1)),w.disableCSSOMInjection&&($=$.reconstructWithOptions({useCSSOMInjection:!1})),$}),[w.disableCSSOMInjection,w.sheet,w.target]),W=Object(C.useMemo)((function(){return ce({options:{prefix:!w.disableVendorPrefixes},plugins:x})}),[w.disableVendorPrefixes,x]);return Object(C.useEffect)((function(){R()(x,w.stylisPlugins)||E(w.stylisPlugins)}),[w.stylisPlugins]),k.a.createElement(Ke.Provider,{value:D},k.a.createElement(Qe.Provider,{value:W},w.children))}var rt=function(){function e(w,$){var x=this;this.inject=function(w,$){void 0===$&&($=tt);var E=x.name+$.hash;w.hasNameForId(x.id,E)||w.insertRules(x.id,E,$(x.rules,E,"@keyframes"))},this.toString=function(){return j(12,String(x.name))},this.name=w,this.id="sc-keyframes-"+w,this.rules=$}return e.prototype.getName=function(w){return void 0===w&&(w=tt),this.name+w.hash},e}(),nt=/([A-Z])/,it=/([A-Z])/g,ot=/^ms-/,Ee=function(w){return"-"+w.toLowerCase()};function be(w){return nt.test(w)?w.replace(it,Ee).replace(ot,"-ms-"):w}var _e=function(w){return null==w||!1===w||""===w};function Ne(w,$,x,E){if(Array.isArray(w)){for(var C,k=[],I=0,R=w.length;I1?$-1:0),E=1;E<$;E++)x[E-1]=arguments[E];return b(w)||S(w)?Ne(g(J,[w].concat(x))):0===x.length&&1===w.length&&"string"==typeof w[0]?w:Ne(g(w,x))}new Set;var Oe=function(w,$,x){return void 0===x&&(x=ie),w.theme!==x.theme&&w.theme||$||x.theme},ut=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,at=/(^-|-$)/g;function je(w){return w.replace(ut,"-").replace(at,"")}var Te=function(w){return ee(ne(w)>>>0)};function ke(w){return"string"==typeof w&&!0}var xe=function(w){return"function"==typeof w||"object"==typeof w&&null!==w&&!Array.isArray(w)},Ve=function(w){return"__proto__"!==w&&"constructor"!==w&&"prototype"!==w};function Be(w,$,x){var E=w[x];xe($)&&xe(E)?Me(E,$):w[x]=$}function Me(w){for(var $=arguments.length,x=new Array($>1?$-1:0),E=1;E<$;E++)x[E-1]=arguments[E];for(var C=0,k=x;C=0||(C[x]=w[x]);return C}($,["componentId"]),k=E&&E+"-"+(ke(w)?w:je(_(w)));return Ye(w,v({},C,{attrs:se,componentId:k}),x)},Object.defineProperty(le,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function($){this._foldedDefaultProps=E?Me({},w.defaultProps,$):$}}),le.toString=function(){return"."+le.styledComponentId},I&&K()(le,w,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),le}var qe=function(w){return function e(w,$,x){if(void 0===x&&(x=ie),!Object(E.isValidElementType)($))return j(1,String($));var i=function(){return w($,x,Ae.apply(void 0,arguments))};return i.withConfig=function(E){return e(w,$,v({},x,{},E))},i.attrs=function(E){return e(w,$,v({},x,{attrs:Array.prototype.concat(x.attrs,E).filter(Boolean)}))},i}(Ye,w)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(w){qe[w]=qe(w)}));var lt=function(){function e(w,$){this.rules=w,this.componentId=$,this.isStatic=re(w),Re.registerId(this.componentId+1)}var w=e.prototype;return w.createStyles=function(w,$,x,E){var C=E(Ne(this.rules,$,x,E).join(""),""),k=this.componentId+w;x.insertRules(k,k,C)},w.removeStyles=function(w,$){$.clearRules(this.componentId+w)},w.renderStyles=function(w,$,x,E){w>2&&Re.registerId(this.componentId+w),this.removeStyles(w,x),this.createStyles(w,$,x,E)},e}();function $e(w){for(var $=arguments.length,x=new Array($>1?$-1:0),E=1;E<$;E++)x[E-1]=arguments[E];var I=Ae.apply(void 0,[w].concat(x)),R="sc-global-"+Te(JSON.stringify(I)),D=new lt(I,R);function l(w){var $=fe(),x=me(),E=Object(C.useContext)(st),k=Object(C.useRef)($.allocateGSInstance(R)).current;return Object(C.useLayoutEffect)((function(){return h(k,w,$,E,x),function(){return D.removeStyles(k,$)}}),[k,w,$,E,x]),null}function h(w,$,x,E,C){if(D.isStatic)D.renderStyles(w,de,x,C);else{var k=v({},$,{theme:Oe($,E,l.defaultProps)});D.renderStyles(w,k,x,C)}}return k.a.memo(l)}function We(w){for(var $=arguments.length,x=new Array($>1?$-1:0),E=1;E<$;E++)x[E-1]=arguments[E];var C=Ae.apply(void 0,[w].concat(x)).join(""),k=Te(C);return new rt(k,C)}var ft=function(){function e(){var w=this;this._emitSheetCSS=function(){var $=w.instance.toString(),x=q();return""},this.getStyleTags=function(){return w.sealed?j(2):w._emitSheetCSS()},this.getStyleElement=function(){var $;if(w.sealed)return j(2);var x=(($={})[oe]="",$["data-styled-version"]="5.3.0",$.dangerouslySetInnerHTML={__html:w.instance.toString()},$),E=q();return E&&(x.nonce=E),[k.a.createElement("style",v({},x,{key:"sc-0-0"}))]},this.seal=function(){w.sealed=!0},this.instance=new Re({isServer:!0}),this.sealed=!1}var w=e.prototype;return w.collectStyles=function(w){return this.sealed?j(2):k.a.createElement(ye,{sheet:this.instance},w)},w.interleaveWithNodeStream=function(w){return j(3)},e}(),Je=function(w){var $=k.a.forwardRef((function($,x){var E=Object(C.useContext)(st),I=w.defaultProps,R=Oe($,E,I);return k.a.createElement(w,v({},$,{theme:R,ref:x}))}));return K()($,w),$.displayName="WithTheme("+_(w)+")",$},Xe=function(){return Object(C.useContext)(st)},pt={StyleSheet:Re,masterSheet:et};$.default=qe}.call(this,x(44))},function(w,$,x){"use strict";x.d($,"a",(function(){return subscribeToResult}));var E=x(1),C=function(w){function InnerSubscriber($,x,E){var C=w.call(this)||this;return C.parent=$,C.outerValue=x,C.outerIndex=E,C.index=0,C}return E.__extends(InnerSubscriber,w),InnerSubscriber.prototype._next=function(w){this.parent.notifyNext(this.outerValue,w,this.outerIndex,this.index++,this)},InnerSubscriber.prototype._error=function(w){this.parent.notifyError(w,this),this.unsubscribe()},InnerSubscriber.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},InnerSubscriber}(x(2).a),k=x(40),I=x(4);function subscribeToResult(w,$,x,E,R){if(void 0===R&&(R=new C(w,x,E)),!R.closed)return $ instanceof I.a?$.subscribe(R):Object(k.a)($)(R)}},function(w,$,x){"use strict";x.d($,"a",(function(){return C}));var E=!1,C={Promise:void 0,set useDeprecatedSynchronousErrorHandling(w){w&&(new Error).stack;E=w},get useDeprecatedSynchronousErrorHandling(){return E}}},function(w,$,x){"use strict";function identity(w){return w}x.d($,"a",(function(){return identity}))},function(w,$,x){"use strict";x.d($,"a",(function(){return C}));var E=x(1),C=function(w){function OuterSubscriber(){return null!==w&&w.apply(this,arguments)||this}return E.__extends(OuterSubscriber,w),OuterSubscriber.prototype.notifyNext=function(w,$,x,E,C){this.destination.next($)},OuterSubscriber.prototype.notifyError=function(w,$){this.destination.error(w)},OuterSubscriber.prototype.notifyComplete=function(w){this.destination.complete()},OuterSubscriber}(x(2).a)},function(w,$,x){"use strict";x.d($,"a",(function(){return filter}));var E=x(1),C=x(2);function filter(w,$){return function filterOperatorFunction(x){return x.lift(new k(w,$))}}var k=function(){function FilterOperator(w,$){this.predicate=w,this.thisArg=$}return FilterOperator.prototype.call=function(w,$){return $.subscribe(new I(w,this.predicate,this.thisArg))},FilterOperator}(),I=function(w){function FilterSubscriber($,x,E){var C=w.call(this,$)||this;return C.predicate=x,C.thisArg=E,C.count=0,C}return E.__extends(FilterSubscriber,w),FilterSubscriber.prototype._next=function(w){var $;try{$=this.predicate.call(this.thisArg,w,this.count++)}catch(w){return void this.destination.error(w)}$&&this.destination.next(w)},FilterSubscriber}(C.a)},function(w,$,x){"use strict";x.d($,"b",(function(){return E})),x.d($,"a",(function(){return R}));var E,C=x(13),k=x(45),I=x(58);E||(E={});var R=function(){function Notification(w,$,x){this.kind=w,this.value=$,this.error=x,this.hasValue="N"===w}return Notification.prototype.observe=function(w){switch(this.kind){case"N":return w.next&&w.next(this.value);case"E":return w.error&&w.error(this.error);case"C":return w.complete&&w.complete()}},Notification.prototype.do=function(w,$,x){switch(this.kind){case"N":return w&&w(this.value);case"E":return $&&$(this.error);case"C":return x&&x()}},Notification.prototype.accept=function(w,$,x){return w&&"function"==typeof w.next?this.observe(w):this.do(w,$,x)},Notification.prototype.toObservable=function(){switch(this.kind){case"N":return Object(k.a)(this.value);case"E":return Object(I.a)(this.error);case"C":return Object(C.b)()}throw new Error("unexpected notification kind value")},Notification.createNext=function(w){return void 0!==w?new Notification("N",w):Notification.undefinedValueNotification},Notification.createError=function(w){return new Notification("E",void 0,w)},Notification.createComplete=function(){return Notification.completeNotification},Notification.completeNotification=new Notification("C"),Notification.undefinedValueNotification=new Notification("N",void 0),Notification}()},function(w,$,x){"use strict";function getSymbolIterator(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}x.d($,"a",(function(){return E}));var E=getSymbolIterator()},function(w,$,x){"use strict";function noop(){}x.d($,"a",(function(){return noop}))},function(w,$,x){"use strict";x.d($,"a",(function(){return E}));var E=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}()},function(w,$,x){"use strict";x.d($,"a",(function(){return E}));var E=function(){function ObjectUnsubscribedErrorImpl(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return ObjectUnsubscribedErrorImpl.prototype=Object.create(Error.prototype),ObjectUnsubscribedErrorImpl}()},function(w,$,x){"use strict";x.d($,"a",(function(){return E}));var E=function(){function ArgumentOutOfRangeErrorImpl(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return ArgumentOutOfRangeErrorImpl.prototype=Object.create(Error.prototype),ArgumentOutOfRangeErrorImpl}()},function(w,$,x){"use strict";function isFunction(w){return"function"==typeof w}x.d($,"a",(function(){return isFunction}))},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.useEditorTransactions=$.useEditorState=$.EditorContext=$.createEditor=$.useSortedAndFilteredLinkTypes=$.useLinkTypeForHref=$.useLinkTypes=$.makeLinkType=void 0;var E=x(173);Object.defineProperty($,"makeLinkType",{enumerable:!0,get:function get(){return E.makeLinkType}}),Object.defineProperty($,"useLinkTypes",{enumerable:!0,get:function get(){return E.useLinkTypes}}),Object.defineProperty($,"useLinkTypeForHref",{enumerable:!0,get:function get(){return E.useLinkTypeForHref}}),Object.defineProperty($,"useSortedAndFilteredLinkTypes",{enumerable:!0,get:function get(){return E.useSortedAndFilteredLinkTypes}});var C=x(114);Object.defineProperty($,"createEditor",{enumerable:!0,get:function get(){return C.createEditor}}),Object.defineProperty($,"EditorContext",{enumerable:!0,get:function get(){return C.EditorContext}}),Object.defineProperty($,"useEditorState",{enumerable:!0,get:function get(){return C.useEditorState}}),Object.defineProperty($,"useEditorTransactions",{enumerable:!0,get:function get(){return C.useEditorTransactions}})},function(w,$,x){"use strict";x.d($,"a",(function(){return E}));var E=function(){function EmptyErrorImpl(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return EmptyErrorImpl.prototype=Object.create(Error.prototype),EmptyErrorImpl}()},function(w,$,x){"use strict";x.d($,"b",(function(){return mergeMap})),x.d($,"a",(function(){return W}));var E=x(1),C=x(10),k=x(14),I=x(3);function mergeMap(w,$,x){return void 0===x&&(x=Number.POSITIVE_INFINITY),"function"==typeof $?function(E){return E.pipe(mergeMap((function(x,E){return Object(k.a)(w(x,E)).pipe(Object(C.a)((function(w,C){return $(x,w,E,C)})))}),x))}:("number"==typeof $&&(x=$),function($){return $.lift(new R(w,x))})}var R=function(){function MergeMapOperator(w,$){void 0===$&&($=Number.POSITIVE_INFINITY),this.project=w,this.concurrent=$}return MergeMapOperator.prototype.call=function(w,$){return $.subscribe(new D(w,this.project,this.concurrent))},MergeMapOperator}(),D=function(w){function MergeMapSubscriber($,x,E){void 0===E&&(E=Number.POSITIVE_INFINITY);var C=w.call(this,$)||this;return C.project=x,C.concurrent=E,C.hasCompleted=!1,C.buffer=[],C.active=0,C.index=0,C}return E.__extends(MergeMapSubscriber,w),MergeMapSubscriber.prototype._next=function(w){this.active0?this._next(w.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},MergeMapSubscriber}(I.b),W=mergeMap},function(w,$,x){"use strict";x.d($,"a",(function(){return fromArray}));var E=x(4),C=x(89),k=x(65);function fromArray(w,$){return $?Object(k.a)(w,$):new E.a(Object(C.a)(w))}},function(w,$,x){"use strict";x.d($,"a",(function(){return k}));var E=x(1),C=x(71),k=function(w){function AsyncScheduler($,x){void 0===x&&(x=C.a.now);var E=w.call(this,$,(function(){return AsyncScheduler.delegate&&AsyncScheduler.delegate!==E?AsyncScheduler.delegate.now():x()}))||this;return E.actions=[],E.active=!1,E.scheduled=void 0,E}return E.__extends(AsyncScheduler,w),AsyncScheduler.prototype.schedule=function($,x,E){return void 0===x&&(x=0),AsyncScheduler.delegate&&AsyncScheduler.delegate!==this?AsyncScheduler.delegate.schedule($,x,E):w.prototype.schedule.call(this,$,x,E)},AsyncScheduler.prototype.flush=function(w){var $=this.actions;if(this.active)$.push(w);else{var x;this.active=!0;do{if(x=w.execute(w.state,w.delay))break}while(w=$.shift());if(this.active=!1,x){for(;w=$.shift();)w.unsubscribe();throw x}}},AsyncScheduler}(C.a)},function(w,$,x){"use strict";x.d($,"a",(function(){return I}));var E=x(1),C=x(7),k=x(6),I=function(w){function AsyncSubject(){var $=null!==w&&w.apply(this,arguments)||this;return $.value=null,$.hasNext=!1,$.hasCompleted=!1,$}return E.__extends(AsyncSubject,w),AsyncSubject.prototype._subscribe=function($){return this.hasError?($.error(this.thrownError),k.a.EMPTY):this.hasCompleted&&this.hasNext?($.next(this.value),$.complete(),k.a.EMPTY):w.prototype._subscribe.call(this,$)},AsyncSubject.prototype.next=function(w){this.hasCompleted||(this.value=w,this.hasNext=!0)},AsyncSubject.prototype.error=function($){this.hasCompleted||w.prototype.error.call(this,$)},AsyncSubject.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&w.prototype.next.call(this,this.value),w.prototype.complete.call(this)},AsyncSubject}(C.a)},function(w,$,x){"use strict";x.d($,"a",(function(){return C}));var E=x(1),C=function(w){function AsyncAction($,x){var E=w.call(this,$,x)||this;return E.scheduler=$,E.work=x,E.pending=!1,E}return E.__extends(AsyncAction,w),AsyncAction.prototype.schedule=function(w,$){if(void 0===$&&($=0),this.closed)return this;this.state=w;var x=this.id,E=this.scheduler;return null!=x&&(this.id=this.recycleAsyncId(E,x,$)),this.pending=!0,this.delay=$,this.id=this.id||this.requestAsyncId(E,this.id,$),this},AsyncAction.prototype.requestAsyncId=function(w,$,x){return void 0===x&&(x=0),setInterval(w.flush.bind(w,this),x)},AsyncAction.prototype.recycleAsyncId=function(w,$,x){if(void 0===x&&(x=0),null!==x&&this.delay===x&&!1===this.pending)return $;clearInterval($)},AsyncAction.prototype.execute=function(w,$){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var x=this._execute(w,$);if(x)return x;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},AsyncAction.prototype._execute=function(w,$){var x=!1,E=void 0;try{this.work(w)}catch(w){x=!0,E=!!w&&w||new Error(w)}if(x)return this.unsubscribe(),E},AsyncAction.prototype._unsubscribe=function(){var w=this.id,$=this.scheduler,x=$.actions,E=x.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==E&&x.splice(E,1),null!=w&&(this.id=this.recycleAsyncId($,w,null)),this.delay=null},AsyncAction}(function(w){function Action($,x){return w.call(this)||this}return E.__extends(Action,w),Action.prototype.schedule=function(w,$){return void 0===$&&($=0),this},Action}(x(6).a))},function(w,$,x){"use strict";x.d($,"a",(function(){return isNumeric}));var E=x(9);function isNumeric(w){return!Object(E.a)(w)&&w-parseFloat(w)+1>=0}},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.Layout=$.IconLabel=$.Deletable=$.Modal=$.Form=$.Tabs=$.ImageCard=$.IconCard=void 0;var k=x(198);Object.defineProperty($,"IconCard",{enumerable:!0,get:function get(){return k.IconCard}});var I=x(200);Object.defineProperty($,"ImageCard",{enumerable:!0,get:function get(){return I.ImageCard}});var R=x(201);Object.defineProperty($,"Tabs",{enumerable:!0,get:function get(){return R.Tabs}});var D=x(202);Object.defineProperty($,"Form",{enumerable:!0,get:function get(){return D.Form}});var W=x(203);Object.defineProperty($,"Modal",{enumerable:!0,get:function get(){return W.Modal}});var V=x(205);Object.defineProperty($,"Deletable",{enumerable:!0,get:function get(){return V.Deletable}});var G=x(206);Object.defineProperty($,"IconLabel",{enumerable:!0,get:function get(){return G.IconLabel}}),$.Layout=__importStar(x(207))},function(w,$,x){"use strict";x.d($,"a",(function(){return concat}));var E=x(45),C=x(83);function concat(){for(var w=[],$=0;$1)for(var x=1;x0?w.prototype.requestAsyncId.call(this,$,x,E):($.actions.push(this),$.scheduled||($.scheduled=Immediate_setImmediate($.flush.bind($,null))))},AsapAction.prototype.recycleAsyncId=function($,x,E){if(void 0===E&&(E=0),null!==E&&E>0||null===E&&this.delay>0)return w.prototype.recycleAsyncId.call(this,$,x,E);0===$.actions.length&&(Immediate_clearImmediate(x),$.scheduled=void 0)},AsapAction}(x(36).a),D=new(function(w){function AsapScheduler(){return null!==w&&w.apply(this,arguments)||this}return E.__extends(AsapScheduler,w),AsapScheduler.prototype.flush=function(w){this.active=!0,this.scheduled=void 0;var $,x=this.actions,E=-1,C=x.length;w=w||x.shift();do{if($=w.execute(w.state,w.delay))break}while(++Ew?exec():!0!==$&&(C=setTimeout(E?clear:exec,void 0===E?w-G:w)))}return"boolean"!=typeof $&&(E=x,x=$,$=void 0),wrapper.cancel=function cancel(){clearExistingTimeout(),k=!0},wrapper}var Re=["mousemove","mousedown","resize","keydown","touchstart","wheel"],esm_useIdle=function(w,$,x){void 0===w&&(w=6e4),void 0===$&&($=!1),void 0===x&&(x=Re);var C=Object(E.useState)($),k=C[0],I=C[1];return Object(E.useEffect)((function(){for(var $,E=!0,C=k,set=function(w){E&&(C=w,I(w))},R=throttle(50,(function(){C&&set(!1),clearTimeout($),$=setTimeout((function(){return set(!0)}),w)})),onVisibility=function(){document.hidden||R()},D=0;D=$[1]?1:-1}))}),[w]);return k.reduce((function(w,$){var E=$[0],C=$[1];return x>=C?E:w}),k[0][0])}},esm_useKeyPress=function(w){var $=Object(E.useState)([!1,null]),x=$[0],C=$[1];return esm_useKey(w,(function(w){return C([!0,w])}),{event:"keydown"},[x]),esm_useKey(w,(function(w){return C([!1,w])}),{event:"keyup"},[x]),x},esm_useKeyPressEvent=function(w,$,x,E){void 0===E&&(E=esm_useKeyPress);var C=E(w),k=C[0],I=C[1];esm_useUpdateEffect((function(){!k&&x?x(I):k&&$&&$(I)}),[k])},esm_useLatest=function(w){var $=Object(E.useRef)(w);return $.current=w,$},esm_useLifecycles=function(w,$){Object(E.useEffect)((function(){return w&&w(),function(){$&&$()}}),[])};var Le=function useList(w){void 0===w&&(w=[]);var $=Object(E.useRef)(resolveHookState(w)),x=useUpdate(),C=Object(E.useMemo)((function(){var E={set:function(w){$.current=resolveHookState(w,$.current),x()},push:function(){for(var w=[],$=0;$E.length?E[w]=$:E.splice(w,0,$),E}))},update:function(w,$){C.set((function(x){return x.map((function(x){return w(x,$)?$:x}))}))},updateFirst:function(w,x){var E=$.current.findIndex((function($){return w($,x)}));E>=0&&C.updateAt(E,x)},upsert:function(w,x){var E=$.current.findIndex((function($){return w($,x)}));E>=0?C.updateAt(E,x):C.push(x)},sort:function(w){C.set((function($){return $.slice().sort(w)}))},filter:function(w,$){C.set((function(x){return x.slice().filter(w,$)}))},removeAt:function(w){C.set((function($){var x=$.slice();return x.splice(w,1),x}))},clear:function(){C.set([])},reset:function(){C.set(resolveHookState(w).slice())}};return E.remove=E.removeAt,E}),[]);return[$.current,C]},esm_useLocalStorage=function(w,$,x){if(!I)return[$,noop,noop];if(!w)throw new Error("useLocalStorage key may not be falsy");var C=x?x.raw?function(w){return w}:x.deserializer:JSON.parse,k=Object(E.useRef)((function(w){try{var E=x?x.raw?String:x.serializer:JSON.stringify,k=localStorage.getItem(w);return null!==k?C(k):($&&localStorage.setItem(w,E($)),$)}catch(w){return $}})),R=Object(E.useState)((function(){return k.current(w)})),D=R[0],W=R[1];Object(E.useLayoutEffect)((function(){return W(k.current(w))}),[w]);var V=Object(E.useCallback)((function($){try{var E="function"==typeof $?$(D):$;if(void 0===E)return;var k=void 0;k=x?x.raw?"string"==typeof E?E:JSON.stringify(E):x.serializer?x.serializer(E):JSON.stringify(E):JSON.stringify(E),localStorage.setItem(w,k),W(C(k))}catch(w){}}),[w,W]),G=Object(E.useCallback)((function(){try{localStorage.removeItem(w),W(void 0)}catch(w){}}),[w,W]);return[D,V,G]},patchHistoryMethod=function(w){var $=window.history,x=$[w];$[w]=function($){var E=x.apply(this,arguments),C=new Event(w.toLowerCase());return C.state=$,window.dispatchEvent(C),E}};I&&(patchHistoryMethod("pushState"),patchHistoryMethod("replaceState"));var buildState=function(w){var $=window.history,x=$.state,E=$.length,C=window.location;return{trigger:w,state:x,length:E,hash:C.hash,host:C.host,hostname:C.hostname,href:C.href,origin:C.origin,pathname:C.pathname,port:C.port,protocol:C.protocol,search:C.search}},De="function"==typeof Event,Ue=I&&De?function(){var w=Object(E.useState)(buildState("load")),$=w[0],x=w[1];return Object(E.useEffect)((function(){var onPopstate=function(){return x(buildState("popstate"))},onPushstate=function(){return x(buildState("pushstate"))},onReplacestate=function(){return x(buildState("replacestate"))};return on(window,"popstate",onPopstate),on(window,"pushstate",onPushstate),on(window,"replacestate",onReplacestate),function(){off(window,"popstate",onPopstate),off(window,"pushstate",onPushstate),off(window,"replacestate",onReplacestate)}}),[]),$}:function(){return{trigger:"load",length:1}};function getClosestBody(w){if(!w)return null;if("BODY"===w.tagName)return w;if("IFRAME"===w.tagName){var $=w.contentDocument;return $?$.body:null}return w.offsetParent?getClosestBody(w.offsetParent):null}function preventDefault(w){var $=w||window.event;return $.touches.length>1||($.preventDefault&&$.preventDefault(),!1)}var ze=I&&window.navigator&&window.navigator.platform&&/iP(ad|hone|od)/.test(window.navigator.platform),He=new Map,Ke="object"==typeof document?document:void 0,Ze=!1,Qe=Ke?function useLockBody(w,$){void 0===w&&(w=!0);var x=Object(E.useRef)(Ke.body);$=$||x;var unlock=function(w){var $=He.get(w);$&&(1===$.counter?(He.delete(w),ze?(w.ontouchmove=null,Ze&&(off(document,"touchmove",preventDefault),Ze=!1)):w.style.overflow=$.initialOverflow):He.set(w,{counter:$.counter-1,initialOverflow:$.initialOverflow}))};Object(E.useEffect)((function(){var x=getClosestBody($.current);x&&(w?function(w){var $=He.get(w);$?He.set(w,{counter:$.counter+1,initialOverflow:$.initialOverflow}):(He.set(w,{counter:1,initialOverflow:w.style.overflow}),ze?Ze||(on(document,"touchmove",preventDefault,{passive:!1}),Ze=!0):w.style.overflow="hidden")}(x):unlock(x))}),[w,$.current]),Object(E.useEffect)((function(){var w=getClosestBody($.current);if(w)return function(){unlock(w)}}),[])}:function useLockBodyMock(w,$){void 0===w&&(w=!0)},esm_useLogger=function(w){for(var $=[],x=1;x1?R=1:R<0&&(R=0),D&&(R=1-R),V({value:R}),($.onScrub||noop)(R)}}))};return on(w.current,"mousedown",onMouseDown_1),on(w.current,"touchstart",onTouchStart_1),function(){off(w.current,"mousedown",onMouseDown_1),off(w.current,"touchstart",onTouchStart_1)}}}),[w,$.vertical]),W},bt=I&&"object"==typeof window.speechSynthesis?window.speechSynthesis.getVoices():[],esm_useSpeech=function(w,$){void 0===$&&($={});var x=esm_useSetState({isPlaying:!1,lang:$.lang||"default",voice:$.voice||bt[0],rate:$.rate||1,pitch:$.pitch||1,volume:$.volume||1}),C=x[0],k=x[1],I=Object(E.useRef)(null);return esm_useMount((function(){var x=new SpeechSynthesisUtterance(w);$.lang&&(x.lang=$.lang),$.voice&&(x.voice=$.voice),x.rate=$.rate||1,x.pitch=$.pitch||1,x.volume=$.volume||1,x.onstart=function(){return k({isPlaying:!0})},x.onresume=function(){return k({isPlaying:!0})},x.onend=function(){return k({isPlaying:!1})},x.onpause=function(){return k({isPlaying:!1})},I.current=x,window.speechSynthesis.speak(I.current)})),C},esm_useStartTyping=function(w){he((function(){var keydown=function($){var x,E,C,k,I;!function(){var w=document.activeElement,$=document.body;if(!w)return!1;if(w===$)return!1;switch(w.tagName){case"INPUT":case"TEXTAREA":return!0}return w.hasAttribute("contenteditable")}()&&(E=(x=$).keyCode,C=x.metaKey,k=x.ctrlKey,I=x.altKey,!(C||k||I)&&(E>=48&&E<=57||E>=65&&E<=90))&&w($)};return on(document,"keydown",keydown),function(){off(document,"keydown",keydown)}}),[])};function useStateWithHistory(w,$,x){if(void 0===$&&($=10),$<1)throw new Error("Capacity has to be greater than 1, got '"+$+"'");var C=useFirstMountState(),k=Object(E.useState)(w),I=k[0],R=k[1],D=Object(E.useRef)(null!=x?x:[]),W=Object(E.useRef)(0);return C&&(D.current.length?(D.current[D.current.length-1]!==w&&D.current.push(w),D.current.length>$&&(D.current=D.current.slice(D.current.length-$))):D.current.push(w),W.current=D.current.length&&D.current.length-1),[I,Object(E.useCallback)((function(w){R((function(x){return(w=resolveHookState(w,x))!==x&&(W.current$&&(D.current=D.current.slice(D.current.length-$))),w}))}),[I,$]),Object(E.useMemo)((function(){return{history:D.current,position:W.current,capacity:$,back:function(w){void 0===w&&(w=1),W.current&&R((function(){return W.current-=Math.min(w,W.current),D.current[W.current]}))},forward:function(w){void 0===w&&(w=1),W.current!==D.current.length-1&&R((function(){return W.current=Math.min(W.current+w,D.current.length-1),D.current[W.current]}))},go:function(w){w!==W.current&&R((function(){return W.current=w<0?Math.max(D.current.length+w,0):Math.min(D.current.length-1,w),D.current[W.current]}))}}}),[I])]}function useStateList(w){void 0===w&&(w=[]);var $=useMountedState(),x=useUpdate(),k=Object(E.useRef)(0);esm_useUpdateEffect((function(){w.length<=k.current&&(k.current=w.length-1,x())}),[w.length]);var I=Object(E.useMemo)((function(){return{next:function(){return I.setStateAt(k.current+1)},prev:function(){return I.setStateAt(k.current-1)},setStateAt:function(E){$()&&w.length&&E!==k.current&&(k.current=E>=0?E%w.length:w.length+E%w.length,x())},setState:function(E){if($()){var C=w.length?w.indexOf(E):-1;if(-1===C)throw new Error("State '"+E+"' is not a valid state (does not exist in state list)");k.current=C,x()}}}}),[w]);return Object(C.__assign)({state:w[k.current],currentIndex:k.current},I)}var esm_useThrottle=function(w,$){void 0===$&&($=200);var x=Object(E.useState)(w),C=x[0],k=x[1],I=Object(E.useRef)(),R=Object(E.useRef)(null),D=Object(E.useRef)(0);return Object(E.useEffect)((function(){if(I.current)R.current=w,D.current=!0;else{k(w);var timeoutCallback_1=function(){D.current?(D.current=!1,k(R.current),I.current=setTimeout(timeoutCallback_1,$)):I.current=void 0};I.current=setTimeout(timeoutCallback_1,$)}}),[w]),esm_useUnmount((function(){I.current&&clearTimeout(I.current)})),C},esm_useThrottleFn=function(w,$,x){void 0===$&&($=200);var C=Object(E.useState)(null),k=C[0],I=C[1],R=Object(E.useRef)(),D=Object(E.useRef)();return Object(E.useEffect)((function(){if(R.current)D.current=x;else{I(w.apply(void 0,x));var timeoutCallback_1=function(){D.current?(I(w.apply(void 0,D.current)),D.current=void 0,R.current=setTimeout(timeoutCallback_1,$)):R.current=void 0};R.current=setTimeout(timeoutCallback_1,$)}}),x),esm_useUnmount((function(){R.current&&clearTimeout(R.current)})),k};function useTimeout(w){return void 0===w&&(w=0),useTimeoutFn(useUpdate(),w)}var vt={restoreOnUnmount:!1};var yt="undefined"!=typeof document?function useTitle(w,$){void 0===$&&($=vt);var x=Object(E.useRef)(document.title);document.title=w,Object(E.useEffect)((function(){return $&&$.restoreOnUnmount?function(){document.title=x.current}:void 0}),[])}:function(w){},mt=x(126),esm_useTween=function(w,$,x){return void 0===w&&(w="inCirc"),void 0===$&&($=200),void 0===x&&(x=0),(0,mt.easing[w])(esm_useRaf($,x))},esm_useUnmountPromise=function(){var w=Object(E.useRef)(!1);return esm_useEffectOnce((function(){return function(){w.current=!0}})),Object(E.useMemo)((function(){return function($,x){return new Promise((function(E,C){$.then((function($){w.current||E($)}),(function($){w.current?x?x($):console.error("useUnmountPromise",$):C($)}))}))}}),[])};function useUpsert(w,$){void 0===$&&($=[]);var x=Le($),E=x[0],k=x[1];return[E,Object(C.__assign)(Object(C.__assign)({},k),{upsert:function($){k.upsert(w,$)}})]}var gt=R&&"vibrate"in navigator?function useVibrate(w,$,x){void 0===w&&(w=!0),void 0===$&&($=[1e3,1e3]),void 0===x&&(x=!0),Object(E.useEffect)((function(){var E;if(w&&(navigator.vibrate($),x)){var C=$ instanceof Array?$.reduce((function(w,$){return w+$})):$;E=setInterval((function(){navigator.vibrate($)}),C)}return function(){w&&(navigator.vibrate(0),x&&clearInterval(E))}}),[w])}:noop,St=createHTMLMediaHook("video");function useStateValidator(w,$,x){void 0===x&&(x=[void 0]);var C=Object(E.useRef)($),k=Object(E.useRef)(w);C.current=$,k.current=w;var I=Object(E.useState)(x),R=I[0],D=I[1],W=Object(E.useCallback)((function(){C.current.length>=2?C.current(k.current,D):D(C.current(k.current))}),[D]);return Object(E.useEffect)((function(){W()}),[w]),[R,W]}var e=function(w){if("undefined"==typeof document)return 0;if(document.body&&(!document.readyState||"loading"!==document.readyState)){if(!0!==w&&"number"==typeof e.__cache)return e.__cache;var $=document.createElement("div"),x=$.style;x.display="block",x.position="absolute",x.width="100px",x.height="100px",x.left="-999px",x.top="-999px",x.overflow="scroll",document.body.insertBefore($,null);var E=$.clientWidth;if(0!==E)return e.__cache=100-E,document.body.removeChild($),e.__cache;document.body.removeChild($)}};function useScrollbarWidth(){var w=Object(E.useState)(e()),$=w[0],x=w[1];return Object(E.useEffect)((function(){if(void 0===$){var w=requestAnimationFrame((function(){x(e())}));return function(){return cancelAnimationFrame(w)}}}),[]),$}function useMultiStateValidator(w,$,x){if(void 0===x&&(x=[void 0]),"object"!=typeof w)throw new Error("states expected to be an object or array, got "+typeof w);var C=Object(E.useRef)($),k=Object(E.useRef)(w);C.current=$,k.current=w;var I=Object(E.useState)(x),R=I[0],D=I[1],W=Object(E.useCallback)((function(){C.current.length>=2?C.current(k.current,D):D(C.current(k.current))}),[D]);return Object(E.useEffect)((function(){W()}),Object.values(w)),[R,W]}var esm_useWindowScroll=function(){var w=esm_useRafState((function(){return{x:I?window.pageXOffset:0,y:I?window.pageYOffset:0}})),$=w[0],x=w[1];return Object(E.useEffect)((function(){var handler=function(){x((function(w){var $=window.pageXOffset,x=window.pageYOffset;return w.x!==$||w.y!==x?{x:$,y:x}:w}))};return handler(),on(window,"scroll",handler,{capture:!1,passive:!0}),function(){off(window,"scroll",handler)}}),[]),$},esm_useWindowSize=function(w,$){void 0===w&&(w=1/0),void 0===$&&($=1/0);var x=esm_useRafState({width:I?window.innerWidth:w,height:I?window.innerHeight:$}),C=x[0],k=x[1];return Object(E.useEffect)((function(){if(I){var handler_1=function(){k({width:window.innerWidth,height:window.innerHeight})};return on(window,"resize",handler_1),function(){off(window,"resize",handler_1)}}}),[]),C},wt={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};var _t=I&&void 0!==window.ResizeObserver?function useMeasure(){var w=Object(E.useState)(null),$=w[0],x=w[1],C=Object(E.useState)(wt),k=C[0],I=C[1],R=Object(E.useMemo)((function(){return new window.ResizeObserver((function(w){if(w[0]){var $=w[0].contentRect,x=$.x,E=$.y,C=$.width,k=$.height,R=$.top,D=$.left,W=$.bottom,V=$.right;I({x:x,y:E,width:C,height:k,top:R,left:D,bottom:W,right:V})}}))}),[]);return he((function(){if($)return R.observe($),function(){R.disconnect()}}),[$]),[x,k]}:function(){return[noop,wt]};function useRendersCount(){return++Object(E.useRef)(0).current}var esm_useSet=function(w){void 0===w&&(w=new Set);var $=Object(E.useState)(w),x=$[0],k=$[1],I=Object(E.useMemo)((function(){return{add:function(w){return k((function($){return new Set(Object(C.__spreadArrays)(Array.from($),[w]))}))},remove:function(w){return k((function($){return new Set(Array.from($).filter((function($){return $!==w})))}))},toggle:function(w){return k((function($){return $.has(w)?new Set(Array.from($).filter((function($){return $!==w}))):new Set(Object(C.__spreadArrays)(Array.from($),[w]))}))},reset:function(){return k(w)}}}),[k]),R=Object(C.__assign)({has:Object(E.useCallback)((function(w){return x.has(w)}),[x])},I);return[x,R]};function createGlobalState(w){var $={state:w instanceof Function?w():w,setState:function(w){$.state=resolveHookState(w,$.state),$.setters.forEach((function(w){return w($.state)}))},setters:[]};return function(){var w=Object(E.useState)($.state),x=w[0],C=w[1];return esm_useEffectOnce((function(){return function(){$.setters=$.setters.filter((function(w){return w!==C}))}})),he((function(){$.setters.includes(C)||$.setters.push(C)})),[x,$.setState]}}var useHash=function(){var w=Object(E.useState)((function(){return window.location.hash})),$=w[0],x=w[1],C=Object(E.useCallback)((function(){x(window.location.hash)}),[]);esm_useLifecycles((function(){on(window,"hashchange",C)}),(function(){off(window,"hashchange",C)}));var k=Object(E.useCallback)((function(w){w!==$&&(window.location.hash=w)}),[$]);return[$,k]}},function(w,$,x){"use strict";x.d($,"a",(function(){return refCount}));var E=x(1),C=x(2);function refCount(){return function refCountOperatorFunction(w){return w.lift(new k(w))}}var k=function(){function RefCountOperator(w){this.connectable=w}return RefCountOperator.prototype.call=function(w,$){var x=this.connectable;x._refCount++;var E=new I(w,x),C=$.subscribe(E);return E.closed||(E.connection=x.connect()),C},RefCountOperator}(),I=function(w){function RefCountSubscriber($,x){var E=w.call(this,$)||this;return E.connectable=x,E}return E.__extends(RefCountSubscriber,w),RefCountSubscriber.prototype._unsubscribe=function(){var w=this.connectable;if(w){this.connectable=null;var $=w._refCount;if($<=0)this.connection=null;else if(w._refCount=$-1,$>1)this.connection=null;else{var x=this.connection,E=w._connection;this.connection=null,!E||x&&E!==x||E.unsubscribe()}}else this.connection=null},RefCountSubscriber}(C.a)},function(w,$,x){"use strict";x.d($,"a",(function(){return V}));var E=x(1),C=x(7),k=x(70),I=x(6),R=x(81),D=x(27),W=x(88),V=function(w){function ReplaySubject($,x,E){void 0===$&&($=Number.POSITIVE_INFINITY),void 0===x&&(x=Number.POSITIVE_INFINITY);var C=w.call(this)||this;return C.scheduler=E,C._events=[],C._infiniteTimeWindow=!1,C._bufferSize=$<1?1:$,C._windowTime=x<1?1:x,x===Number.POSITIVE_INFINITY?(C._infiniteTimeWindow=!0,C.next=C.nextInfiniteTimeWindow):C.next=C.nextTimeWindow,C}return E.__extends(ReplaySubject,w),ReplaySubject.prototype.nextInfiniteTimeWindow=function($){if(!this.isStopped){var x=this._events;x.push($),x.length>this._bufferSize&&x.shift()}w.prototype.next.call(this,$)},ReplaySubject.prototype.nextTimeWindow=function($){this.isStopped||(this._events.push(new G(this._getNow(),$)),this._trimBufferThenGetEvents()),w.prototype.next.call(this,$)},ReplaySubject.prototype._subscribe=function(w){var $,x=this._infiniteTimeWindow,E=x?this._events:this._trimBufferThenGetEvents(),C=this.scheduler,k=E.length;if(this.closed)throw new D.a;if(this.isStopped||this.hasError?$=I.a.EMPTY:(this.observers.push(w),$=new W.a(this,w)),C&&w.add(w=new R.a(w,C)),x)for(var V=0;V$&&(k=Math.max(k,C-$)),k>0&&E.splice(0,k),E},ReplaySubject}(C.a),G=function(){return function ReplayEvent(w,$){this.time=w,this.value=$}}()},function(w,$,x){"use strict";x.d($,"a",(function(){return throwError}));var E=x(4);function throwError(w,$){return $?new E.a((function(x){return $.schedule(dispatch,0,{error:w,subscriber:x})})):new E.a((function($){return $.error(w)}))}function dispatch(w){var $=w.error;w.subscriber.error($)}},function(w,$,x){"use strict";x.d($,"b",(function(){return combineLatest})),x.d($,"a",(function(){return V}));var E=x(1),C=x(11),k=x(9),I=x(21),R=x(18),D=x(33),W={};function combineLatest(){for(var w=[],$=0;$this.index},StaticArrayIterator.prototype.hasCompleted=function(){return this.array.length===this.index},StaticArrayIterator}(),J=function(w){function ZipBufferIterator($,x,E){var C=w.call(this,$)||this;return C.parent=x,C.observable=E,C.stillUnsubscribed=!0,C.buffer=[],C.isComplete=!1,C}return E.__extends(ZipBufferIterator,w),ZipBufferIterator.prototype[R.a]=function(){return this},ZipBufferIterator.prototype.next=function(){var w=this.buffer;return 0===w.length&&this.isComplete?{value:null,done:!0}:{value:w.shift(),done:!1}},ZipBufferIterator.prototype.hasValue=function(){return this.buffer.length>0},ZipBufferIterator.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},ZipBufferIterator.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},ZipBufferIterator.prototype.notifyNext=function(w){this.buffer.push(w),this.parent.checkIterators()},ZipBufferIterator.prototype.subscribe=function(){return Object(D.c)(this.observable,new D.a(this))},ZipBufferIterator}(D.b)},function(w,$,x){"use strict";function isObject(w){return null!==w&&"object"==typeof w}x.d($,"a",(function(){return isObject}))},function(w,$,x){"use strict";x.d($,"a",(function(){return canReportError}));var E=x(2);function canReportError(w){for(;w;){var $=w,x=$.closed,C=$.destination,k=$.isStopped;if(x||k)return!1;w=C&&C instanceof E.a?C:null}return!0}},function(w,$,x){"use strict";x.d($,"a",(function(){return scheduleArray}));var E=x(4),C=x(6);function scheduleArray(w,$){return new E.a((function(x){var E=new C.a,k=0;return E.add($.schedule((function(){k!==w.length?(x.next(w[k++]),x.closed||E.add(this.schedule())):x.complete()}))),E}))}},function(w,$,x){"use strict";x.d($,"a",(function(){return k}));var E=x(19),C=x(41),k={closed:!0,next:function(w){},error:function(w){if(E.a.useDeprecatedSynchronousErrorHandling)throw w;Object(C.a)(w)},complete:function(){}}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.Deletable=$.useEditorTransactions=$.useEditorState=$.EditorContext=$.createEditor=$.useLinkTypeForHref=$.makeLinkType=$.registerDialog=$.registerLinkTypes=void 0;var E=x(139);Object.defineProperty($,"registerLinkTypes",{enumerable:!0,get:function get(){return E.registerLinkTypes}}),Object.defineProperty($,"registerDialog",{enumerable:!0,get:function get(){return E.registerDialog}});var C=x(30);Object.defineProperty($,"makeLinkType",{enumerable:!0,get:function get(){return C.makeLinkType}}),Object.defineProperty($,"useLinkTypeForHref",{enumerable:!0,get:function get(){return C.useLinkTypeForHref}}),Object.defineProperty($,"createEditor",{enumerable:!0,get:function get(){return C.createEditor}}),Object.defineProperty($,"EditorContext",{enumerable:!0,get:function get(){return C.EditorContext}}),Object.defineProperty($,"useEditorState",{enumerable:!0,get:function get(){return C.useEditorState}}),Object.defineProperty($,"useEditorTransactions",{enumerable:!0,get:function get(){return C.useEditorTransactions}});var k=x(38);Object.defineProperty($,"Deletable",{enumerable:!0,get:function get(){return k.Deletable}})},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.useNeos=$.NeosContext=void 0;var k=__importStar(x(0));$.NeosContext=k.createContext(null),$.useNeos=function useNeos(){var w=k.useContext($.NeosContext);if(!w)throw new Error("[Sitegeist.Archaeopteryx]: Could not determine Neos Context.");return w}},function(w,$,x){"use strict";function _extends(){return(_extends=Object.assign||function(w){for(var $=1;$=0||(C[x]=w[x]);return C}x.r($),x.d($,"Field",(function(){return De})),x.d($,"Form",(function(){return ReactFinalForm})),x.d($,"FormSpy",(function(){return FormSpy})),x.d($,"useField",(function(){return useField})),x.d($,"useForm",(function(){return useForm})),x.d($,"useFormState",(function(){return useFormState})),x.d($,"version",(function(){return ve})),x.d($,"withTypes",(function(){return withTypes}));var E=x(0),C=x.n(E),k={},I=/[.[\]]+/,R=function toPath(w){if(null==w||!w.length)return[];if("string"!=typeof w)throw new Error("toPath() expects a string");return null==k[w]&&(k[w]=w.split(I).filter(Boolean)),k[w]},D=function getIn(w,$){for(var x=R($),E=w,C=0;C=x.length)return E;var k=x[$];if(isNaN(k)){var I;if(null==w){var R,D=setInRecursor(void 0,$+1,x,E,C);return void 0===D?void 0:((R={})[k]=D,R)}if(Array.isArray(w))throw new Error("Cannot set a non-numeric property on an array");var W=setInRecursor(w[k],$+1,x,E,C);if(void 0===W){var V=Object.keys(w).length;if(void 0===w[k]&&0===V)return;if(void 0!==w[k]&&V<=1)return isNaN(x[$-1])||C?void 0:{};w[k];return _objectWithoutPropertiesLoose(w,[k].map(_toPropertyKey))}return _extends({},w,((I={})[k]=W,I))}var G=Number(k);if(null==w){var K=setInRecursor(void 0,$+1,x,E,C);if(void 0===K)return;var J=[];return J[G]=K,J}if(!Array.isArray(w))throw new Error("Cannot set a numeric property on an object");var ie=setInRecursor(w[G],$+1,x,E,C),oe=[].concat(w);if(C&&void 0===ie){if(oe.splice(G,1),0===oe.length)return}else oe[G]=ie;return oe}(w,0,R($),x,E)},V="FINAL_FORM/array-error";function publishFieldState(w,$){var x=w.errors,E=w.initialValues,C=w.lastSubmittedValues,k=w.submitErrors,I=w.submitFailed,R=w.submitSucceeded,W=w.submitting,G=w.values,K=$.active,J=$.blur,ie=$.change,oe=$.data,ue=$.focus,ae=$.modified,se=$.modifiedSinceLastSubmit,de=$.name,le=$.touched,pe=$.validating,he=$.visited,ve=D(G,de),ge=D(x,de);ge&&ge[V]&&(ge=ge[V]);var Se=k&&D(k,de),we=E&&D(E,de),Ce=$.isEqual(we,ve),Pe=!ge&&!Se;return{active:K,blur:J,change:ie,data:oe,dirty:!Ce,dirtySinceLastSubmit:!(!C||$.isEqual(D(C,de),ve)),error:ge,focus:ue,initial:we,invalid:!Pe,length:Array.isArray(ve)?ve.length:void 0,modified:ae,modifiedSinceLastSubmit:se,name:de,pristine:Ce,submitError:Se,submitFailed:I,submitSucceeded:R,submitting:W,touched:le,valid:Pe,value:ve,visited:he,validating:pe}}var G=["active","data","dirty","dirtySinceLastSubmit","error","initial","invalid","length","modified","modifiedSinceLastSubmit","pristine","submitError","submitFailed","submitSucceeded","submitting","touched","valid","value","visited","validating"],K=function shallowEqual(w,$){if(w===$)return!0;if("object"!=typeof w||!w||"object"!=typeof $||!$)return!1;var x=Object.keys(w),E=Object.keys($);if(x.length!==E.length)return!1;for(var C=Object.prototype.hasOwnProperty.bind($),k=0;k0,pe=++he,ge=Promise.all(se).then(function clearAsyncValidationPromise(w){return function($){return delete ve[w],$}}(pe));de&&(ve[pe]=ge);var Se=function processErrors(){var w=_extends({},I?E.errors:{},oe),$=function forEachError($){k.forEach((function(E){if(x[E]){var k=D(oe,E),W=D(w,E),V=Pe(C[E]).length,G=ae[E];$(E,V&&G||R&&k||(k||I?void 0:W))}}))};$((function($,x){w=W(w,$,x)||{}})),$((function($,x){if(x&&x[V]){var E=D(w,$),C=[].concat(E);C[V]=x[V],w=W(w,$,C)}})),K(E.errors,w)||(E.errors=w),E.error=oe["FINAL_FORM/form-error"]};if(Se(),$(),de){J.formState.validating++,$();var we=function afterPromise(){J.formState.validating--,$()};ge.then((function(){he>pe||Se()})).then(we,we)}}else $()},Fe=function notifyFieldListeners(w){if(!oe){var $=J.fields,x=J.fieldSubscribers,E=J.formState,C=_extends({},$),k=function notifyField(w){var $=C[w],k=publishFieldState(E,$),I=$.lastFieldState;$.lastFieldState=k;var R=x[w];R&¬ify(R,k,I,ie,void 0===I)};w?k(w):Object.keys(C).forEach(k)}},Re=function markAllFieldsTouched(){Object.keys(J.fields).forEach((function(w){J.fields[w].touched=!0}))},Le=function calculateNextFormState(){var w=J.fields,$=J.formState,x=J.lastFormState,E=_extends({},w),C=Object.keys(E),k=!1,I=C.reduce((function(w,x){return!E[x].isEqual(D($.values,x),D($.initialValues||{},x))&&(k=!0,w[x]=!0),w}),{}),R=C.reduce((function(w,x){var C=$.lastSubmittedValues||{};return E[x].isEqual(D($.values,x),D(C,x))||(w[x]=!0),w}),{});$.pristine=!k,$.dirtySinceLastSubmit=!(!$.lastSubmittedValues||!Object.values(R).some((function(w){return w}))),$.modifiedSinceLastSubmit=!(!$.lastSubmittedValues||!Object.keys(E).some((function(w){return E[w].modifiedSinceLastSubmit}))),$.valid=!($.error||$.submitError||de($.errors)||$.submitErrors&&de($.submitErrors));var W=function convertToExternalFormState(w){var $=w.active,x=w.dirtySinceLastSubmit,E=w.modifiedSinceLastSubmit,C=w.error,k=w.errors,I=w.initialValues,R=w.pristine,D=w.submitting,W=w.submitFailed,V=w.submitSucceeded,G=w.submitError,K=w.submitErrors,J=w.valid,ie=w.validating,oe=w.values;return{active:$,dirty:!R,dirtySinceLastSubmit:x,modifiedSinceLastSubmit:E,error:C,errors:k,hasSubmitErrors:!!(G||K&&de(K)),hasValidationErrors:!(!C&&!de(k)),invalid:!J,initialValues:I,pristine:R,submitting:D,submitFailed:W,submitSucceeded:V,submitError:G,submitErrors:K,valid:J,validating:ie>0,values:oe}}($),V=C.reduce((function(w,$){return w.modified[$]=E[$].modified,w.touched[$]=E[$].touched,w.visited[$]=E[$].visited,w}),{modified:{},touched:{},visited:{}}),G=V.modified,ie=V.touched,oe=V.visited;return W.dirtyFields=x&&K(x.dirtyFields,I)?x.dirtyFields:I,W.dirtyFieldsSinceLastSubmit=x&&K(x.dirtyFieldsSinceLastSubmit,R)?x.dirtyFieldsSinceLastSubmit:R,W.modified=x&&K(x.modified,G)?x.modified:G,W.touched=x&&K(x.touched,ie)?x.touched:ie,W.visited=x&&K(x.visited,oe)?x.visited:oe,x&&K(x,W)?x:W},De=!1,Ue=!1,ze=function notifyFormListeners(){if(De)Ue=!0;else{if(De=!0,function callDebug(){$&&$(Le(),Object.keys(J.fields).reduce((function(w,$){return w[$]=J.fields[$],w}),{}))}(),!(oe||ue&&pe)){var w=J.lastFormState,x=Le();x!==w&&(J.lastFormState=x,notify(J.subscribers,x,w,filterFormState))}De=!1,Ue&&(Ue=!1,notifyFormListeners())}};Ie(void 0,(function(){ze()}));var He={batch:function batch(w){oe++,w(),oe--,Fe(),ze()},blur:function blur(w){var $=J.fields,x=J.formState,E=$[w];E&&(delete x.active,$[w]=_extends({},E,{active:!1,touched:!0}),G?Ie(w,(function(){Fe(),ze()})):(Fe(),ze()))},change:function change(w,$){var x=J.fields,E=J.formState;if(D(E.values,w)!==$){ge(J,w,(function(){return $}));var C=x[w];C&&(x[w]=_extends({},C,{modified:!0,modifiedSinceLastSubmit:!!E.lastSubmittedValues})),G?(Fe(),ze()):Ie(w,(function(){Fe(),ze()}))}},get destroyOnUnregister(){return!!x},set destroyOnUnregister(w){x=w},focus:function focus(w){var $=J.fields[w];$&&!$.active&&(J.formState.active=w,$.active=!0,$.visited=!0,Fe(),ze())},mutators:Ce,getFieldState:function getFieldState(w){var $=J.fields[w];return $&&$.lastFieldState},getRegisteredFields:function getRegisteredFields(){return Object.keys(J.fields)},getState:function getState(){return Le()},initialize:function initialize(w){var $=J.fields,x=J.formState,C=_extends({},$),k="function"==typeof w?w(x.values):w;E||(x.values=k);var I=E?Object.keys(C).reduce((function(w,$){return C[$].isEqual(D(x.values,$),D(x.initialValues||{},$))||(w[$]=D(x.values,$)),w}),{}):{};x.initialValues=k,x.values=k,Object.keys(I).forEach((function(w){x.values=W(x.values,w,I[w])})),Ie(void 0,(function(){Fe(),ze()}))},isValidationPaused:function isValidationPaused(){return ue},pauseValidation:function pauseValidation(w){void 0===w&&(w=!0),ue=!0,pe=w},registerField:function registerField(w,$,E,C){void 0===E&&(E={}),J.fieldSubscribers[w]||(J.fieldSubscribers[w]={index:0,entries:{}});var k=J.fieldSubscribers[w].index++;J.fieldSubscribers[w].entries[k]={subscriber:ae($),subscription:E,notified:!1},J.fields[w]||(J.fields[w]={active:!1,afterSubmit:C&&C.afterSubmit,beforeSubmit:C&&C.beforeSubmit,blur:function blur(){return He.blur(w)},change:function change($){return He.change(w,$)},data:C&&C.data||{},focus:function focus(){return He.focus(w)},isEqual:C&&C.isEqual||se,lastFieldState:void 0,modified:!1,modifiedSinceLastSubmit:!1,name:w,touched:!1,valid:!0,validateFields:C&&C.validateFields,validators:{},validating:!1,visited:!1});var I=!1,R=C&&C.silent,V=function notify(){R?Fe(w):(ze(),Fe())};if(C){I=!(!C.getValidator||!C.getValidator()),C.getValidator&&(J.fields[w].validators[k]=C.getValidator);var G=void 0===D(J.formState.values,w);void 0===C.initialValue||!G||void 0!==D(J.formState.values,w)&&D(J.formState.values,w)!==D(J.formState.initialValues,w)||(J.formState.initialValues=W(J.formState.initialValues||{},w,C.initialValue),J.formState.values=W(J.formState.values,w,C.initialValue),Ie(void 0,V)),void 0!==C.defaultValue&&void 0===C.initialValue&&void 0===D(J.formState.initialValues,w)&&G&&(J.formState.values=W(J.formState.values,w,C.defaultValue))}return I?Ie(void 0,V):V(),function(){var $=!1;J.fields[w]&&($=!(!J.fields[w].validators[k]||!J.fields[w].validators[k]()),delete J.fields[w].validators[k]);var E=!!J.fieldSubscribers[w];E&&delete J.fieldSubscribers[w].entries[k];var C=E&&!Object.keys(J.fieldSubscribers[w].entries).length;C&&(delete J.fieldSubscribers[w],delete J.fields[w],$&&(J.formState.errors=W(J.formState.errors,w,void 0)||{}),x&&(J.formState.values=W(J.formState.values,w,void 0,!0)||{})),R||($?Ie(void 0,(function(){ze(),Fe()})):C&&ze())}},reset:function reset(w){void 0===w&&(w=J.formState.initialValues),J.formState.submitting&&(J.formState.resetWhileSubmitting=!0),J.formState.submitFailed=!1,J.formState.submitSucceeded=!1,delete J.formState.submitError,delete J.formState.submitErrors,delete J.formState.lastSubmittedValues,He.initialize(w||{})},resetFieldState:function resetFieldState(w){J.fields[w]=_extends({},J.fields[w],{active:!1,lastFieldState:void 0,modified:!1,touched:!1,valid:!0,validating:!1,visited:!1}),Ie(void 0,(function(){Fe(),ze()}))},restart:function restart(w){void 0===w&&(w=J.formState.initialValues),He.batch((function(){for(var $ in J.fields)He.resetFieldState($),J.fields[$]=_extends({},J.fields[$],{active:!1,lastFieldState:void 0,modified:!1,modifiedSinceLastSubmit:!1,touched:!1,valid:!0,validating:!1,visited:!1});He.reset(w)}))},resumeValidation:function resumeValidation(){ue=!1,pe=!1,le&&Ie(void 0,(function(){Fe(),ze()})),le=!1},setConfig:function setConfig(w,C){switch(w){case"debug":$=C;break;case"destroyOnUnregister":x=C;break;case"initialValues":He.initialize(C);break;case"keepDirtyOnReinitialize":E=C;break;case"mutators":k=C,C?(Object.keys(Ce).forEach((function(w){w in C||delete Ce[w]})),Object.keys(C).forEach((function(w){Ce[w]=we(w)}))):Object.keys(Ce).forEach((function(w){delete Ce[w]}));break;case"onSubmit":I=C;break;case"validate":R=C,Ie(void 0,(function(){Fe(),ze()}));break;case"validateOnBlur":G=C;break;default:throw new Error("Unrecognised option "+w)}},submit:function submit(){var w=J.formState;if(!w.submitting){if(delete w.submitErrors,delete w.submitError,w.lastSubmittedValues=_extends({},w.values),function hasSyncErrors(){return!(!J.formState.error&&!de(J.formState.errors))}())return Re(),J.formState.submitFailed=!0,ze(),void Fe();var $=Object.keys(ve);if($.length)Promise.all($.map((function(w){return ve[Number(w)]}))).then(He.submit,console.error);else if(!function beforeSubmit(){return Object.keys(J.fields).some((function(w){return J.fields[w].beforeSubmit&&!1===J.fields[w].beforeSubmit()}))}()){var x,E=!1,C=function complete($){w.submitting=!1;var C=w.resetWhileSubmitting;return C&&(w.resetWhileSubmitting=!1),$&&de($)?(w.submitFailed=!0,w.submitSucceeded=!1,w.submitErrors=$,w.submitError=$["FINAL_FORM/form-error"],Re()):(C||(w.submitFailed=!1,w.submitSucceeded=!0),function afterSubmit(){Object.keys(J.fields).forEach((function(w){return J.fields[w].afterSubmit&&J.fields[w].afterSubmit()}))}()),ze(),Fe(),E=!0,x&&x($),$};w.submitting=!0,w.submitFailed=!1,w.submitSucceeded=!1,w.lastSubmittedValues=_extends({},w.values),function resetModifiedAfterSubmit(){Object.keys(J.fields).forEach((function(w){return J.fields[w].modifiedSinceLastSubmit=!1}))}();var k=I(w.values,He,C);if(!E){if(k&&isPromise(k))return ze(),Fe(),k.then(C,(function(w){throw C(),w}));if(I.length>=3)return ze(),Fe(),new Promise((function(w){x=w}));C(k)}}}},subscribe:function subscribe(w,$){if(!w)throw new Error("No callback given.");if(!$)throw new Error("No subscription provided. What values do you want to listen to?");var x=ae(w),E=J.subscribers,C=E.index++;E.entries[C]={subscriber:x,subscription:$,notified:!1};var k=Le();return notifySubscriber(x,$,k,k,filterFormState,!0),function(){delete E.entries[C]}}};return He}function renderComponent(w,$,x){var C=w.render,k=w.children,I=w.component,R=_objectWithoutPropertiesLoose(w,["render","children","component"]);if(I)return E.createElement(I,Object.assign($,R,{children:k,render:C}));if(C)return C(void 0===k?Object.assign($,R):Object.assign($,R,{children:k}));if("function"!=typeof k)throw new Error("Must specify either a render prop, a render function as children, or a component prop to "+x);return k(Object.assign($,R))}function useWhenValueChanges(w,$,x){void 0===x&&(x=function isEqual(w,$){return w===$});var E=C.a.useRef(w);C.a.useEffect((function(){x(w,E.current)||($(),E.current=w)}))}var le=function shallowEqual(w,$){if(w===$)return!0;if("object"!=typeof w||!w||"object"!=typeof $||!$)return!1;var x=Object.keys(w),E=Object.keys($);if(x.length!==E.length)return!1;for(var C=Object.prototype.hasOwnProperty.bind($),k=0;k component");return $}function useFormState(w){var $=void 0===w?{}:w,x=$.onChange,C=$.subscription,k=void 0===C?Ce:C,I=useForm("useFormState"),R=E.useRef(!0),D=E.useRef(x);D.current=x;var W=E.useState((function(){var w={};return I.subscribe((function($){w=$}),k)(),x&&x(w),w})),V=W[0],G=W[1];E.useEffect((function(){return I.subscribe((function(w){R.current?R.current=!1:(G(w),D.current&&D.current(w))}),k)}),[]);var K={};return Se(K,V),K}function FormSpy(w){var $=w.onChange,x=w.subscription,E=_objectWithoutPropertiesLoose(w,["onChange","subscription"]),C=useForm("FormSpy"),k=useFormState({onChange:$,subscription:x});if($)return null;var I={form:_extends({},C,{reset:function reset(w){pe(w)?C.reset():C.reset(w)}})};return renderComponent(_extends({},E,I),k,"FormSpy")}var Pe="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product,Ie=G.reduce((function(w,$){return w[$]=!0,w}),{}),Fe=function defaultFormat(w,$){return void 0===w?"":w},Re=function defaultParse(w,$){return""===w?void 0:w},Le=function defaultIsEqual(w,$){return w===$};function useField(w,$){void 0===$&&($={});var x=$,C=x.afterSubmit,k=x.allowNull,I=x.component,R=x.data,D=x.defaultValue,W=x.format,V=void 0===W?Fe:W,G=x.formatOnBlur,K=x.initialValue,J=x.multiple,ie=x.parse,oe=void 0===ie?Re:ie,ue=x.subscription,ae=void 0===ue?Ie:ue,se=x.type,de=x.validateFields,le=x.value,pe=useForm("useField"),he=useLatest($),ve=function register($,x){return pe.registerField(w,$,ae,{afterSubmit:C,beforeSubmit:function beforeSubmit(){var $=he.current,beforeSubmit=$.beforeSubmit,x=$.formatOnBlur,E=$.format,C=void 0===E?Fe:E;if(x){var k=pe.getFieldState(w).value,I=C(k,w);I!==k&&pe.change(w,I)}return beforeSubmit&&beforeSubmit()},data:R,defaultValue:D,getValidator:function getValidator(){return he.current.validate},initialValue:K,isEqual:function isEqual(w,$){return(he.current.isEqual||Le)(w,$)},silent:x,validateFields:de})},Se=E.useRef(!0),we=E.useState((function(){var w={},$=pe.destroyOnUnregister;return pe.destroyOnUnregister=!1,ve((function($){w=$}),!0)(),pe.destroyOnUnregister=$,w})),Ce=we[0],De=we[1];E.useEffect((function(){return ve((function(w){Se.current?Se.current=!1:De(w)}),!1)}),[w,R,D,K]);var Ue={onBlur:E.useCallback((function(w){if(Ce.blur(),G){var $=pe.getFieldState(Ce.name);Ce.change(V($.value,Ce.name))}}),[Ce.blur,Ce.name,V,G]),onChange:E.useCallback((function($){var x=$&&$.target?function getValue(w,$,x,E){if(!E&&w.nativeEvent&&void 0!==w.nativeEvent.text)return w.nativeEvent.text;if(E&&w.nativeEvent)return w.nativeEvent.text;var C=w.target,k=C.type,I=C.value,R=C.checked;switch(k){case"checkbox":if(void 0!==x){if(R)return Array.isArray($)?$.concat(x):[x];if(!Array.isArray($))return $;var D=$.indexOf(x);return D<0?$:$.slice(0,D).concat($.slice(D+1))}return!!R;case"select-multiple":return function getSelectedValues(w){var $=[];if(w)for(var x=0;x component");return renderComponent(_extends({children:I,component:R,ref:$},he),ve,"Field("+oe+")")}));function withTypes(){return{Form:ReactFinalForm,FormSpy:FormSpy}}},function(w,$,x){"use strict";x.d($,"b",(function(){return k})),x.d($,"a",(function(){return I}));var E=x(1),C=function(w){function QueueAction($,x){var E=w.call(this,$,x)||this;return E.scheduler=$,E.work=x,E}return E.__extends(QueueAction,w),QueueAction.prototype.schedule=function($,x){return void 0===x&&(x=0),x>0?w.prototype.schedule.call(this,$,x):(this.delay=x,this.state=$,this.scheduler.flush(this),this)},QueueAction.prototype.execute=function($,x){return x>0||this.closed?w.prototype.execute.call(this,$,x):this._execute($,x)},QueueAction.prototype.requestAsyncId=function($,x,E){return void 0===E&&(E=0),null!==E&&E>0||null===E&&this.delay>0?w.prototype.requestAsyncId.call(this,$,x,E):$.flush(this)},QueueAction}(x(36).a),k=new(function(w){function QueueScheduler(){return null!==w&&w.apply(this,arguments)||this}return E.__extends(QueueScheduler,w),QueueScheduler}(x(34).a))(C),I=k},function(w,$,x){"use strict";x.d($,"a",(function(){return E}));var E=function(){function Scheduler(w,$){void 0===$&&($=Scheduler.now),this.SchedulerAction=w,this.now=$}return Scheduler.prototype.schedule=function(w,$,x){return void 0===$&&($=0),new this.SchedulerAction(this,w).schedule(x,$)},Scheduler.now=function(){return Date.now()},Scheduler}()},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__read=function(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.useSelector=void 0;var k=__importStar(x(0)),I=x(68);$.useSelector=function useSelector(w){var $=I.useNeos(),x=__read(k.useState(w($.store.getState())),2),E=x[0],C=x[1];return k.useEffect((function(){return $.store.subscribe((function(){var x=$.store.getState(),E=w(x);C(E)}))}),[]),E}},function(w,$,x){var E=x(175),C=x(75),k=x(194),I=x(54).isError,R=k.sprintf;function parseConstructorArguments(w){var $,x,C,k;if(E.object(w,"args"),E.bool(w.strict,"args.strict"),E.array(w.argv,"args.argv"),0===($=w.argv).length)x={},C=[];else if(I($[0]))x={cause:$[0]},C=$.slice(1);else if("object"==typeof $[0]){for(k in x={},$[0])x[k]=$[0][k];C=$.slice(1)}else E.string($[0],"first argument to VError, SError, or WError constructor must be a string, object, or Error"),x={},C=$;return E.object(x),x.strict||w.strict||(C=C.map((function(w){return null===w?"null":void 0===w?"undefined":w}))),{options:x,shortmessage:0===C.length?"":R.apply(null,C)}}function VError(){var w,$,x,C,k,R,D;if(w=Array.prototype.slice.call(arguments,0),!(this instanceof VError))return $=Object.create(VError.prototype),VError.apply($,arguments),$;if((x=parseConstructorArguments({argv:w,strict:!1})).options.name&&(E.string(x.options.name,'error\'s "name" must be a string'),this.name=x.options.name),this.jse_shortmsg=x.shortmessage,R=x.shortmessage,(C=x.options.cause)&&(E.ok(I(C),"cause is not an Error"),this.jse_cause=C,x.options.skipCauseMessage||(R+=": "+C.message)),this.jse_info={},x.options.info)for(D in x.options.info)this.jse_info[D]=x.options.info[D];return this.message=R,Error.call(this,R),Error.captureStackTrace&&(k=x.options.constructorOpt||this.constructor,Error.captureStackTrace(this,k)),this}function SError(){var w,$,x,E;return w=Array.prototype.slice.call(arguments,0),this instanceof SError?(E=(x=parseConstructorArguments({argv:w,strict:!0})).options,VError.call(this,E,"%s",x.shortmessage),this):($=Object.create(SError.prototype),SError.apply($,arguments),$)}function MultiError(w){E.array(w,"list of errors"),E.ok(w.length>0,"must be at least one error"),this.ase_errors=w,VError.call(this,{cause:w[0]},"first of %d error%s",w.length,1==w.length?"":"s")}function WError(){var w,$,x,E;return w=Array.prototype.slice.call(arguments,0),this instanceof WError?((E=(x=parseConstructorArguments({argv:w,strict:!1})).options).skipCauseMessage=!0,VError.call(this,E,"%s",x.shortmessage),this):($=Object.create(WError.prototype),WError.apply($,w),$)}w.exports=VError,VError.VError=VError,VError.SError=SError,VError.WError=WError,VError.MultiError=MultiError,C.inherits(VError,Error),VError.prototype.name="VError",VError.prototype.toString=function ve_toString(){var w=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(w+=": "+this.message),w},VError.prototype.cause=function ve_cause(){var w=VError.cause(this);return null===w?void 0:w},VError.cause=function(w){return E.ok(I(w),"err must be an Error"),I(w.jse_cause)?w.jse_cause:null},VError.info=function(w){var $,x,C;if(E.ok(I(w),"err must be an Error"),$=null!==(x=VError.cause(w))?VError.info(x):{},"object"==typeof w.jse_info&&null!==w.jse_info)for(C in w.jse_info)$[C]=w.jse_info[C];return $},VError.findCauseByName=function(w,$){var x;for(E.ok(I(w),"err must be an Error"),E.string($,"name"),E.ok($.length>0,"name cannot be empty"),x=w;null!==x;x=VError.cause(x))if(E.ok(I(x)),x.name==$)return x;return null},VError.hasCauseWithName=function(w,$){return null!==VError.findCauseByName(w,$)},VError.fullStack=function(w){E.ok(I(w),"err must be an Error");var $=VError.cause(w);return $?w.stack+"\ncaused by: "+VError.fullStack($):w.stack},VError.errorFromList=function(w){return E.arrayOfObject(w,"errors"),0===w.length?null:(w.forEach((function(w){E.ok(I(w))})),1==w.length?w[0]:new MultiError(w))},VError.errorForEach=function(w,$){E.ok(I(w),"err must be an Error"),E.func($,"func"),w instanceof MultiError?w.errors().forEach((function iterError(w){$(w)})):$(w)},C.inherits(SError,VError),C.inherits(MultiError,VError),MultiError.prototype.name="MultiError",MultiError.prototype.errors=function me_errors(){return this.ase_errors.slice(0)},C.inherits(WError,VError),WError.prototype.name="WError",WError.prototype.toString=function we_toString(){var w=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(w+=": "+this.message),this.jse_cause&&this.jse_cause.message&&(w+="; caused by "+this.jse_cause.toString()),w},WError.prototype.cause=function we_cause(w){return I(w)&&(this.jse_cause=w),this.jse_cause}},function(w,$,x){"use strict";(function(w){var E=x(176),C=x(177),k=x(107);function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(w,$){if(kMaxLength()<$)throw new RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(w=new Uint8Array($)).__proto__=Buffer.prototype:(null===w&&(w=new Buffer($)),w.length=$),w}function Buffer(w,$,x){if(!(Buffer.TYPED_ARRAY_SUPPORT||this instanceof Buffer))return new Buffer(w,$,x);if("number"==typeof w){if("string"==typeof $)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,w)}return from(this,w,$,x)}function from(w,$,x,E){if("number"==typeof $)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&$ instanceof ArrayBuffer?function fromArrayBuffer(w,$,x,E){if($.byteLength,x<0||$.byteLength=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|w}function byteLength(w,$){if(Buffer.isBuffer(w))return w.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(w)||w instanceof ArrayBuffer))return w.byteLength;"string"!=typeof w&&(w=""+w);var x=w.length;if(0===x)return 0;for(var E=!1;;)switch($){case"ascii":case"latin1":case"binary":return x;case"utf8":case"utf-8":case void 0:return utf8ToBytes(w).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*x;case"hex":return x>>>1;case"base64":return base64ToBytes(w).length;default:if(E)return utf8ToBytes(w).length;$=(""+$).toLowerCase(),E=!0}}function slowToString(w,$,x){var E=!1;if((void 0===$||$<0)&&($=0),$>this.length)return"";if((void 0===x||x>this.length)&&(x=this.length),x<=0)return"";if((x>>>=0)<=($>>>=0))return"";for(w||(w="utf8");;)switch(w){case"hex":return hexSlice(this,$,x);case"utf8":case"utf-8":return utf8Slice(this,$,x);case"ascii":return asciiSlice(this,$,x);case"latin1":case"binary":return latin1Slice(this,$,x);case"base64":return base64Slice(this,$,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,$,x);default:if(E)throw new TypeError("Unknown encoding: "+w);w=(w+"").toLowerCase(),E=!0}}function swap(w,$,x){var E=w[$];w[$]=w[x],w[x]=E}function bidirectionalIndexOf(w,$,x,E,C){if(0===w.length)return-1;if("string"==typeof x?(E=x,x=0):x>2147483647?x=2147483647:x<-2147483648&&(x=-2147483648),x=+x,isNaN(x)&&(x=C?0:w.length-1),x<0&&(x=w.length+x),x>=w.length){if(C)return-1;x=w.length-1}else if(x<0){if(!C)return-1;x=0}if("string"==typeof $&&($=Buffer.from($,E)),Buffer.isBuffer($))return 0===$.length?-1:arrayIndexOf(w,$,x,E,C);if("number"==typeof $)return $&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?C?Uint8Array.prototype.indexOf.call(w,$,x):Uint8Array.prototype.lastIndexOf.call(w,$,x):arrayIndexOf(w,[$],x,E,C);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(w,$,x,E,C){var k,I=1,R=w.length,D=$.length;if(void 0!==E&&("ucs2"===(E=String(E).toLowerCase())||"ucs-2"===E||"utf16le"===E||"utf-16le"===E)){if(w.length<2||$.length<2)return-1;I=2,R/=2,D/=2,x/=2}function read(w,$){return 1===I?w[$]:w.readUInt16BE($*I)}if(C){var W=-1;for(k=x;kR&&(x=R-D),k=x;k>=0;k--){for(var V=!0,G=0;GC&&(E=C):E=C;var k=$.length;if(k%2!=0)throw new TypeError("Invalid hex string");E>k/2&&(E=k/2);for(var I=0;I>8,C=x%256,k.push(C),k.push(E);return k}($,w.length-x),w,x,E)}function base64Slice(w,$,x){return 0===$&&x===w.length?E.fromByteArray(w):E.fromByteArray(w.slice($,x))}function utf8Slice(w,$,x){x=Math.min(w.length,x);for(var E=[],C=$;C239?4:W>223?3:W>191?2:1;if(C+G<=x)switch(G){case 1:W<128&&(V=W);break;case 2:128==(192&(k=w[C+1]))&&(D=(31&W)<<6|63&k)>127&&(V=D);break;case 3:k=w[C+1],I=w[C+2],128==(192&k)&&128==(192&I)&&(D=(15&W)<<12|(63&k)<<6|63&I)>2047&&(D<55296||D>57343)&&(V=D);break;case 4:k=w[C+1],I=w[C+2],R=w[C+3],128==(192&k)&&128==(192&I)&&128==(192&R)&&(D=(15&W)<<18|(63&k)<<12|(63&I)<<6|63&R)>65535&&D<1114112&&(V=D)}null===V?(V=65533,G=1):V>65535&&(V-=65536,E.push(V>>>10&1023|55296),V=56320|1023&V),E.push(V),C+=G}return function decodeCodePointsArray(w){var $=w.length;if($<=4096)return String.fromCharCode.apply(String,w);var x="",E=0;for(;E<$;)x+=String.fromCharCode.apply(String,w.slice(E,E+=4096));return x}(E)}$.Buffer=Buffer,$.SlowBuffer=function SlowBuffer(w){+w!=w&&(w=0);return Buffer.alloc(+w)},$.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==w.TYPED_ARRAY_SUPPORT?w.TYPED_ARRAY_SUPPORT:function typedArraySupport(){try{var w=new Uint8Array(1);return w.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===w.foo()&&"function"==typeof w.subarray&&0===w.subarray(1,1).byteLength}catch(w){return!1}}(),$.kMaxLength=kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(w){return w.__proto__=Buffer.prototype,w},Buffer.from=function(w,$,x){return from(null,w,$,x)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(w,$,x){return function alloc(w,$,x,E){return assertSize($),$<=0?createBuffer(w,$):void 0!==x?"string"==typeof E?createBuffer(w,$).fill(x,E):createBuffer(w,$).fill(x):createBuffer(w,$)}(null,w,$,x)},Buffer.allocUnsafe=function(w){return allocUnsafe(null,w)},Buffer.allocUnsafeSlow=function(w){return allocUnsafe(null,w)},Buffer.isBuffer=function isBuffer(w){return!(null==w||!w._isBuffer)},Buffer.compare=function compare(w,$){if(!Buffer.isBuffer(w)||!Buffer.isBuffer($))throw new TypeError("Arguments must be Buffers");if(w===$)return 0;for(var x=w.length,E=$.length,C=0,k=Math.min(x,E);C0&&(w=this.toString("hex",0,x).match(/.{2}/g).join(" "),this.length>x&&(w+=" ... ")),""},Buffer.prototype.compare=function compare(w,$,x,E,C){if(!Buffer.isBuffer(w))throw new TypeError("Argument must be a Buffer");if(void 0===$&&($=0),void 0===x&&(x=w?w.length:0),void 0===E&&(E=0),void 0===C&&(C=this.length),$<0||x>w.length||E<0||C>this.length)throw new RangeError("out of range index");if(E>=C&&$>=x)return 0;if(E>=C)return-1;if($>=x)return 1;if(this===w)return 0;for(var k=(C>>>=0)-(E>>>=0),I=(x>>>=0)-($>>>=0),R=Math.min(k,I),D=this.slice(E,C),W=w.slice($,x),V=0;VC)&&(x=C),w.length>0&&(x<0||$<0)||$>this.length)throw new RangeError("Attempt to write outside buffer bounds");E||(E="utf8");for(var k=!1;;)switch(E){case"hex":return hexWrite(this,w,$,x);case"utf8":case"utf-8":return utf8Write(this,w,$,x);case"ascii":return asciiWrite(this,w,$,x);case"latin1":case"binary":return latin1Write(this,w,$,x);case"base64":return base64Write(this,w,$,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,w,$,x);default:if(k)throw new TypeError("Unknown encoding: "+E);E=(""+E).toLowerCase(),k=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function asciiSlice(w,$,x){var E="";x=Math.min(w.length,x);for(var C=$;CE)&&(x=E);for(var C="",k=$;kx)throw new RangeError("Trying to access beyond buffer length")}function checkInt(w,$,x,E,C,k){if(!Buffer.isBuffer(w))throw new TypeError('"buffer" argument must be a Buffer instance');if($>C||$w.length)throw new RangeError("Index out of range")}function objectWriteUInt16(w,$,x,E){$<0&&($=65535+$+1);for(var C=0,k=Math.min(w.length-x,2);C>>8*(E?C:1-C)}function objectWriteUInt32(w,$,x,E){$<0&&($=4294967295+$+1);for(var C=0,k=Math.min(w.length-x,4);C>>8*(E?C:3-C)&255}function checkIEEE754(w,$,x,E,C,k){if(x+E>w.length)throw new RangeError("Index out of range");if(x<0)throw new RangeError("Index out of range")}function writeFloat(w,$,x,E,k){return k||checkIEEE754(w,0,x,4),C.write(w,$,x,E,23,4),x+4}function writeDouble(w,$,x,E,k){return k||checkIEEE754(w,0,x,8),C.write(w,$,x,E,52,8),x+8}Buffer.prototype.slice=function slice(w,$){var x,E=this.length;if((w=~~w)<0?(w+=E)<0&&(w=0):w>E&&(w=E),($=void 0===$?E:~~$)<0?($+=E)<0&&($=0):$>E&&($=E),$0&&(C*=256);)E+=this[w+--$]*C;return E},Buffer.prototype.readUInt8=function readUInt8(w,$){return $||checkOffset(w,1,this.length),this[w]},Buffer.prototype.readUInt16LE=function readUInt16LE(w,$){return $||checkOffset(w,2,this.length),this[w]|this[w+1]<<8},Buffer.prototype.readUInt16BE=function readUInt16BE(w,$){return $||checkOffset(w,2,this.length),this[w]<<8|this[w+1]},Buffer.prototype.readUInt32LE=function readUInt32LE(w,$){return $||checkOffset(w,4,this.length),(this[w]|this[w+1]<<8|this[w+2]<<16)+16777216*this[w+3]},Buffer.prototype.readUInt32BE=function readUInt32BE(w,$){return $||checkOffset(w,4,this.length),16777216*this[w]+(this[w+1]<<16|this[w+2]<<8|this[w+3])},Buffer.prototype.readIntLE=function readIntLE(w,$,x){w|=0,$|=0,x||checkOffset(w,$,this.length);for(var E=this[w],C=1,k=0;++k<$&&(C*=256);)E+=this[w+k]*C;return E>=(C*=128)&&(E-=Math.pow(2,8*$)),E},Buffer.prototype.readIntBE=function readIntBE(w,$,x){w|=0,$|=0,x||checkOffset(w,$,this.length);for(var E=$,C=1,k=this[w+--E];E>0&&(C*=256);)k+=this[w+--E]*C;return k>=(C*=128)&&(k-=Math.pow(2,8*$)),k},Buffer.prototype.readInt8=function readInt8(w,$){return $||checkOffset(w,1,this.length),128&this[w]?-1*(255-this[w]+1):this[w]},Buffer.prototype.readInt16LE=function readInt16LE(w,$){$||checkOffset(w,2,this.length);var x=this[w]|this[w+1]<<8;return 32768&x?4294901760|x:x},Buffer.prototype.readInt16BE=function readInt16BE(w,$){$||checkOffset(w,2,this.length);var x=this[w+1]|this[w]<<8;return 32768&x?4294901760|x:x},Buffer.prototype.readInt32LE=function readInt32LE(w,$){return $||checkOffset(w,4,this.length),this[w]|this[w+1]<<8|this[w+2]<<16|this[w+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(w,$){return $||checkOffset(w,4,this.length),this[w]<<24|this[w+1]<<16|this[w+2]<<8|this[w+3]},Buffer.prototype.readFloatLE=function readFloatLE(w,$){return $||checkOffset(w,4,this.length),C.read(this,w,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(w,$){return $||checkOffset(w,4,this.length),C.read(this,w,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(w,$){return $||checkOffset(w,8,this.length),C.read(this,w,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(w,$){return $||checkOffset(w,8,this.length),C.read(this,w,!1,52,8)},Buffer.prototype.writeUIntLE=function writeUIntLE(w,$,x,E){(w=+w,$|=0,x|=0,E)||checkInt(this,w,$,x,Math.pow(2,8*x)-1,0);var C=1,k=0;for(this[$]=255&w;++k=0&&(k*=256);)this[$+C]=w/k&255;return $+x},Buffer.prototype.writeUInt8=function writeUInt8(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(w=Math.floor(w)),this[$]=255&w,$+1},Buffer.prototype.writeUInt16LE=function writeUInt16LE(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[$]=255&w,this[$+1]=w>>>8):objectWriteUInt16(this,w,$,!0),$+2},Buffer.prototype.writeUInt16BE=function writeUInt16BE(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[$]=w>>>8,this[$+1]=255&w):objectWriteUInt16(this,w,$,!1),$+2},Buffer.prototype.writeUInt32LE=function writeUInt32LE(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[$+3]=w>>>24,this[$+2]=w>>>16,this[$+1]=w>>>8,this[$]=255&w):objectWriteUInt32(this,w,$,!0),$+4},Buffer.prototype.writeUInt32BE=function writeUInt32BE(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[$]=w>>>24,this[$+1]=w>>>16,this[$+2]=w>>>8,this[$+3]=255&w):objectWriteUInt32(this,w,$,!1),$+4},Buffer.prototype.writeIntLE=function writeIntLE(w,$,x,E){if(w=+w,$|=0,!E){var C=Math.pow(2,8*x-1);checkInt(this,w,$,x,C-1,-C)}var k=0,I=1,R=0;for(this[$]=255&w;++k>0)-R&255;return $+x},Buffer.prototype.writeIntBE=function writeIntBE(w,$,x,E){if(w=+w,$|=0,!E){var C=Math.pow(2,8*x-1);checkInt(this,w,$,x,C-1,-C)}var k=x-1,I=1,R=0;for(this[$+k]=255&w;--k>=0&&(I*=256);)w<0&&0===R&&0!==this[$+k+1]&&(R=1),this[$+k]=(w/I>>0)-R&255;return $+x},Buffer.prototype.writeInt8=function writeInt8(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(w=Math.floor(w)),w<0&&(w=255+w+1),this[$]=255&w,$+1},Buffer.prototype.writeInt16LE=function writeInt16LE(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[$]=255&w,this[$+1]=w>>>8):objectWriteUInt16(this,w,$,!0),$+2},Buffer.prototype.writeInt16BE=function writeInt16BE(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[$]=w>>>8,this[$+1]=255&w):objectWriteUInt16(this,w,$,!1),$+2},Buffer.prototype.writeInt32LE=function writeInt32LE(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[$]=255&w,this[$+1]=w>>>8,this[$+2]=w>>>16,this[$+3]=w>>>24):objectWriteUInt32(this,w,$,!0),$+4},Buffer.prototype.writeInt32BE=function writeInt32BE(w,$,x){return w=+w,$|=0,x||checkInt(this,w,$,4,2147483647,-2147483648),w<0&&(w=4294967295+w+1),Buffer.TYPED_ARRAY_SUPPORT?(this[$]=w>>>24,this[$+1]=w>>>16,this[$+2]=w>>>8,this[$+3]=255&w):objectWriteUInt32(this,w,$,!1),$+4},Buffer.prototype.writeFloatLE=function writeFloatLE(w,$,x){return writeFloat(this,w,$,!0,x)},Buffer.prototype.writeFloatBE=function writeFloatBE(w,$,x){return writeFloat(this,w,$,!1,x)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(w,$,x){return writeDouble(this,w,$,!0,x)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(w,$,x){return writeDouble(this,w,$,!1,x)},Buffer.prototype.copy=function copy(w,$,x,E){if(x||(x=0),E||0===E||(E=this.length),$>=w.length&&($=w.length),$||($=0),E>0&&E=this.length)throw new RangeError("sourceStart out of bounds");if(E<0)throw new RangeError("sourceEnd out of bounds");E>this.length&&(E=this.length),w.length-$=0;--C)w[C+$]=this[C+x];else if(k<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(C=0;C>>=0,x=void 0===x?this.length:x>>>0,w||(w=0),"number"==typeof w)for(k=$;k55295&&x<57344){if(!C){if(x>56319){($-=3)>-1&&k.push(239,191,189);continue}if(I+1===E){($-=3)>-1&&k.push(239,191,189);continue}C=x;continue}if(x<56320){($-=3)>-1&&k.push(239,191,189),C=x;continue}x=65536+(C-55296<<10|x-56320)}else C&&($-=3)>-1&&k.push(239,191,189);if(C=null,x<128){if(($-=1)<0)break;k.push(x)}else if(x<2048){if(($-=2)<0)break;k.push(x>>6|192,63&x|128)}else if(x<65536){if(($-=3)<0)break;k.push(x>>12|224,x>>6&63|128,63&x|128)}else{if(!(x<1114112))throw new Error("Invalid code point");if(($-=4)<0)break;k.push(x>>18|240,x>>12&63|128,x>>6&63|128,63&x|128)}}return k}function base64ToBytes(w){return E.toByteArray(function base64clean(w){if((w=function stringtrim(w){return w.trim?w.trim():w.replace(/^\s+|\s+$/g,"")}(w).replace(I,"")).length<2)return"";for(;w.length%4!=0;)w+="=";return w}(w))}function blitBuffer(w,$,x,E){for(var C=0;C=$.length||C>=w.length);++C)$[C+x]=w[C];return C}}).call(this,x(46))},function(w,$,x){(function(w){var E=Object.getOwnPropertyDescriptors||function getOwnPropertyDescriptors(w){for(var $=Object.keys(w),x={},E=0;E<$.length;E++)x[$[E]]=Object.getOwnPropertyDescriptor(w,$[E]);return x},C=/%[sdj%]/g;$.format=function(w){if(!isString(w)){for(var $=[],x=0;x=k)return w;switch(w){case"%s":return String(E[x++]);case"%d":return Number(E[x++]);case"%j":try{return JSON.stringify(E[x++])}catch(w){return"[Circular]"}default:return w}})),R=E[x];x=3&&(E.depth=arguments[2]),arguments.length>=4&&(E.colors=arguments[3]),isBoolean(x)?E.showHidden=x:x&&$._extend(E,x),isUndefined(E.showHidden)&&(E.showHidden=!1),isUndefined(E.depth)&&(E.depth=2),isUndefined(E.colors)&&(E.colors=!1),isUndefined(E.customInspect)&&(E.customInspect=!0),E.colors&&(E.stylize=stylizeWithColor),formatValue(E,w,E.depth)}function stylizeWithColor(w,$){var x=inspect.styles[$];return x?"["+inspect.colors[x][0]+"m"+w+"["+inspect.colors[x][1]+"m":w}function stylizeNoColor(w,$){return w}function formatValue(w,x,E){if(w.customInspect&&x&&isFunction(x.inspect)&&x.inspect!==$.inspect&&(!x.constructor||x.constructor.prototype!==x)){var C=x.inspect(E,w);return isString(C)||(C=formatValue(w,C,E)),C}var k=function formatPrimitive(w,$){if(isUndefined($))return w.stylize("undefined","undefined");if(isString($)){var x="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return w.stylize(x,"string")}if(isNumber($))return w.stylize(""+$,"number");if(isBoolean($))return w.stylize(""+$,"boolean");if(isNull($))return w.stylize("null","null")}(w,x);if(k)return k;var I=Object.keys(x),R=function arrayToHash(w){var $={};return w.forEach((function(w,x){$[w]=!0})),$}(I);if(w.showHidden&&(I=Object.getOwnPropertyNames(x)),isError(x)&&(I.indexOf("message")>=0||I.indexOf("description")>=0))return formatError(x);if(0===I.length){if(isFunction(x)){var D=x.name?": "+x.name:"";return w.stylize("[Function"+D+"]","special")}if(isRegExp(x))return w.stylize(RegExp.prototype.toString.call(x),"regexp");if(isDate(x))return w.stylize(Date.prototype.toString.call(x),"date");if(isError(x))return formatError(x)}var W,V="",G=!1,K=["{","}"];(isArray(x)&&(G=!0,K=["[","]"]),isFunction(x))&&(V=" [Function"+(x.name?": "+x.name:"")+"]");return isRegExp(x)&&(V=" "+RegExp.prototype.toString.call(x)),isDate(x)&&(V=" "+Date.prototype.toUTCString.call(x)),isError(x)&&(V=" "+formatError(x)),0!==I.length||G&&0!=x.length?E<0?isRegExp(x)?w.stylize(RegExp.prototype.toString.call(x),"regexp"):w.stylize("[Object]","special"):(w.seen.push(x),W=G?function formatArray(w,$,x,E,C){for(var k=[],I=0,R=$.length;I=0&&0,w+$.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return x[0]+(""===$?"":$+"\n ")+" "+w.join(",\n ")+" "+x[1];return x[0]+$+" "+w.join(", ")+" "+x[1]}(W,V,K)):K[0]+V+K[1]}function formatError(w){return"["+Error.prototype.toString.call(w)+"]"}function formatProperty(w,$,x,E,C,k){var I,R,D;if((D=Object.getOwnPropertyDescriptor($,C)||{value:$[C]}).get?R=D.set?w.stylize("[Getter/Setter]","special"):w.stylize("[Getter]","special"):D.set&&(R=w.stylize("[Setter]","special")),hasOwnProperty(E,C)||(I="["+C+"]"),R||(w.seen.indexOf(D.value)<0?(R=isNull(x)?formatValue(w,D.value,null):formatValue(w,D.value,x-1)).indexOf("\n")>-1&&(R=k?R.split("\n").map((function(w){return" "+w})).join("\n").substr(2):"\n"+R.split("\n").map((function(w){return" "+w})).join("\n")):R=w.stylize("[Circular]","special")),isUndefined(I)){if(k&&C.match(/^\d+$/))return R;(I=JSON.stringify(""+C)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(I=I.substr(1,I.length-2),I=w.stylize(I,"name")):(I=I.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),I=w.stylize(I,"string"))}return I+": "+R}function isArray(w){return Array.isArray(w)}function isBoolean(w){return"boolean"==typeof w}function isNull(w){return null===w}function isNumber(w){return"number"==typeof w}function isString(w){return"string"==typeof w}function isUndefined(w){return void 0===w}function isRegExp(w){return isObject(w)&&"[object RegExp]"===objectToString(w)}function isObject(w){return"object"==typeof w&&null!==w}function isDate(w){return isObject(w)&&"[object Date]"===objectToString(w)}function isError(w){return isObject(w)&&("[object Error]"===objectToString(w)||w instanceof Error)}function isFunction(w){return"function"==typeof w}function objectToString(w){return Object.prototype.toString.call(w)}function pad(w){return w<10?"0"+w.toString(10):w.toString(10)}$.debuglog=function(x){if(isUndefined(k)&&(k=w.env.NODE_DEBUG||""),x=x.toUpperCase(),!I[x])if(new RegExp("\\b"+x+"\\b","i").test(k)){var E=w.pid;I[x]=function(){var w=$.format.apply($,arguments);console.error("%s %d: %s",x,E,w)}}else I[x]=function(){};return I[x]},$.inspect=inspect,inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},$.isArray=isArray,$.isBoolean=isBoolean,$.isNull=isNull,$.isNullOrUndefined=function isNullOrUndefined(w){return null==w},$.isNumber=isNumber,$.isString=isString,$.isSymbol=function isSymbol(w){return"symbol"==typeof w},$.isUndefined=isUndefined,$.isRegExp=isRegExp,$.isObject=isObject,$.isDate=isDate,$.isError=isError,$.isFunction=isFunction,$.isPrimitive=function isPrimitive(w){return null===w||"boolean"==typeof w||"number"==typeof w||"string"==typeof w||"symbol"==typeof w||void 0===w},$.isBuffer=x(179);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var w=new Date,$=[pad(w.getHours()),pad(w.getMinutes()),pad(w.getSeconds())].join(":");return[w.getDate(),R[w.getMonth()],$].join(" ")}function hasOwnProperty(w,$){return Object.prototype.hasOwnProperty.call(w,$)}$.log=function(){console.log("%s - %s",timestamp(),$.format.apply($,arguments))},$.inherits=x(180),$._extend=function(w,$){if(!$||!isObject($))return w;for(var x=Object.keys($),E=x.length;E--;)w[x[E]]=$[x[E]];return w};var D="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function callbackifyOnRejected(w,$){if(!w){var x=new Error("Promise was rejected with a falsy value");x.reason=w,w=x}return $(w)}$.promisify=function promisify(w){if("function"!=typeof w)throw new TypeError('The "original" argument must be of type Function');if(D&&w[D]){var $;if("function"!=typeof($=w[D]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty($,D,{value:$,enumerable:!1,writable:!1,configurable:!0}),$}function $(){for(var $,x,E=new Promise((function(w,E){$=w,x=E})),C=[],k=0;k1&&"number"==typeof w[w.length-1]&&(x=w.pop())):"number"==typeof D&&(x=w.pop()),null===R&&1===w.length&&w[0]instanceof E.a?w[0]:Object(k.a)(x)(Object(I.a)(w,R))}},function(w,$,x){"use strict";x.d($,"a",(function(){return race}));var E=x(1),C=x(9),k=x(33),I=x(21),R=x(18);function race(){for(var w=[],$=0;$0&&I.length>C&&!I.warned){I.warned=!0;var R=new Error("Possible EventEmitter memory leak detected. "+I.length+" "+String($)+" listeners added. Use emitter.setMaxListeners() to increase limit");R.name="MaxListenersExceededWarning",R.emitter=w,R.type=$,R.count=I.length,function ProcessEmitWarning(w){console&&console.warn&&console.warn(w)}(R)}return w}function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(w,$,x){var E={fired:!1,wrapFn:void 0,target:w,type:$,listener:x},C=onceWrapper.bind(E);return C.listener=x,E.wrapFn=C,C}function _listeners(w,$,x){var E=w._events;if(void 0===E)return[];var C=E[$];return void 0===C?[]:"function"==typeof C?x?[C.listener||C]:[C]:x?function unwrapListeners(w){for(var $=new Array(w.length),x=0;x<$.length;++x)$[x]=w[x].listener||w[x];return $}(C):arrayClone(C,C.length)}function listenerCount(w){var $=this._events;if(void 0!==$){var x=$[w];if("function"==typeof x)return 1;if(void 0!==x)return x.length}return 0}function arrayClone(w,$){for(var x=new Array($),E=0;E<$;++E)x[E]=w[E];return x}function eventTargetAgnosticAddListener(w,$,x,E){if("function"==typeof w.on)E.once?w.once($,x):w.on($,x);else{if("function"!=typeof w.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof w);w.addEventListener($,(function wrapListener(C){E.once&&w.removeEventListener($,wrapListener),x(C)}))}}Object.defineProperty(EventEmitter,"defaultMaxListeners",{enumerable:!0,get:function(){return R},set:function(w){if("number"!=typeof w||w<0||I(w))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+w+".");R=w}}),EventEmitter.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},EventEmitter.prototype.setMaxListeners=function setMaxListeners(w){if("number"!=typeof w||w<0||I(w))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+w+".");return this._maxListeners=w,this},EventEmitter.prototype.getMaxListeners=function getMaxListeners(){return _getMaxListeners(this)},EventEmitter.prototype.emit=function emit(w){for(var $=[],x=1;x0&&(I=$[0]),I instanceof Error)throw I;var R=new Error("Unhandled error."+(I?" ("+I.message+")":""));throw R.context=I,R}var D=C[w];if(void 0===D)return!1;if("function"==typeof D)k(D,this,$);else{var W=D.length,V=arrayClone(D,W);for(x=0;x=0;k--)if(x[k]===$||x[k].listener===$){I=x[k].listener,C=k;break}if(C<0)return this;0===C?x.shift():function spliceOne(w,$){for(;$+1=0;E--)this.removeListener(w,$[E]);return this},EventEmitter.prototype.listeners=function listeners(w){return _listeners(this,w,!0)},EventEmitter.prototype.rawListeners=function rawListeners(w){return _listeners(this,w,!1)},EventEmitter.listenerCount=function(w,$){return"function"==typeof w.listenerCount?w.listenerCount($):listenerCount.call(w,$)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?E(this._events):[]}},function(w,$,x){($=w.exports=x(109)).Stream=$,$.Readable=$,$.Writable=x(97),$.Duplex=x(47),$.Transform=x(113),$.PassThrough=x(189)},function(w,$,x){var E=x(74),C=E.Buffer;function copyProps(w,$){for(var x in w)$[x]=w[x]}function SafeBuffer(w,$,x){return C(w,$,x)}C.from&&C.alloc&&C.allocUnsafe&&C.allocUnsafeSlow?w.exports=E:(copyProps(E,$),$.Buffer=SafeBuffer),copyProps(C,SafeBuffer),SafeBuffer.from=function(w,$,x){if("number"==typeof w)throw new TypeError("Argument must not be a number");return C(w,$,x)},SafeBuffer.alloc=function(w,$,x){if("number"!=typeof w)throw new TypeError("Argument must be a number");var E=C(w);return void 0!==$?"string"==typeof x?E.fill($,x):E.fill($):E.fill(0),E},SafeBuffer.allocUnsafe=function(w){if("number"!=typeof w)throw new TypeError("Argument must be a number");return C(w)},SafeBuffer.allocUnsafeSlow=function(w){if("number"!=typeof w)throw new TypeError("Argument must be a number");return E.SlowBuffer(w)}},function(w,$,x){"use strict";(function($,E,C){var k=x(76);function CorkedRequest(w){var $=this;this.next=null,this.entry=null,this.finish=function(){!function onCorkedFinish(w,$,x){var E=w.entry;w.entry=null;for(;E;){var C=E.callback;$.pendingcb--,C(x),E=E.next}$.corkedRequestsFree?$.corkedRequestsFree.next=w:$.corkedRequestsFree=w}($,w)}}w.exports=Writable;var I,R=!$.browser&&["v0.10","v0.9."].indexOf($.version.slice(0,5))>-1?E:k.nextTick;Writable.WritableState=WritableState;var D=Object.create(x(54));D.inherits=x(53);var W={deprecate:x(187)},V=x(110),G=x(96).Buffer,K=C.Uint8Array||function(){};var J,ie=x(111);function nop(){}function WritableState(w,$){I=I||x(47),w=w||{};var E=$ instanceof I;this.objectMode=!!w.objectMode,E&&(this.objectMode=this.objectMode||!!w.writableObjectMode);var C=w.highWaterMark,D=w.writableHighWaterMark,W=this.objectMode?16:16384;this.highWaterMark=C||0===C?C:E&&(D||0===D)?D:W,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var V=!1===w.decodeStrings;this.decodeStrings=!V,this.defaultEncoding=w.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(w){!function onwrite(w,$){var x=w._writableState,E=x.sync,C=x.writecb;if(function onwriteStateUpdate(w){w.writing=!1,w.writecb=null,w.length-=w.writelen,w.writelen=0}(x),$)!function onwriteError(w,$,x,E,C){--$.pendingcb,x?(k.nextTick(C,E),k.nextTick(finishMaybe,w,$),w._writableState.errorEmitted=!0,w.emit("error",E)):(C(E),w._writableState.errorEmitted=!0,w.emit("error",E),finishMaybe(w,$))}(w,x,E,$,C);else{var I=needFinish(x);I||x.corked||x.bufferProcessing||!x.bufferedRequest||clearBuffer(w,x),E?R(afterWrite,w,x,I,C):afterWrite(w,x,I,C)}}($,w)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(w){if(I=I||x(47),!(J.call(Writable,this)||this instanceof I))return new Writable(w);this._writableState=new WritableState(w,this),this.writable=!0,w&&("function"==typeof w.write&&(this._write=w.write),"function"==typeof w.writev&&(this._writev=w.writev),"function"==typeof w.destroy&&(this._destroy=w.destroy),"function"==typeof w.final&&(this._final=w.final)),V.call(this)}function doWrite(w,$,x,E,C,k,I){$.writelen=E,$.writecb=I,$.writing=!0,$.sync=!0,x?w._writev(C,$.onwrite):w._write(C,k,$.onwrite),$.sync=!1}function afterWrite(w,$,x,E){x||function onwriteDrain(w,$){0===$.length&&$.needDrain&&($.needDrain=!1,w.emit("drain"))}(w,$),$.pendingcb--,E(),finishMaybe(w,$)}function clearBuffer(w,$){$.bufferProcessing=!0;var x=$.bufferedRequest;if(w._writev&&x&&x.next){var E=$.bufferedRequestCount,C=new Array(E),k=$.corkedRequestsFree;k.entry=x;for(var I=0,R=!0;x;)C[I]=x,x.isBuf||(R=!1),x=x.next,I+=1;C.allBuffers=R,doWrite(w,$,!0,$.length,C,"",k.finish),$.pendingcb++,$.lastBufferedRequest=null,k.next?($.corkedRequestsFree=k.next,k.next=null):$.corkedRequestsFree=new CorkedRequest($),$.bufferedRequestCount=0}else{for(;x;){var D=x.chunk,W=x.encoding,V=x.callback;if(doWrite(w,$,!1,$.objectMode?1:D.length,D,W,V),x=x.next,$.bufferedRequestCount--,$.writing)break}null===x&&($.lastBufferedRequest=null)}$.bufferedRequest=x,$.bufferProcessing=!1}function needFinish(w){return w.ending&&0===w.length&&null===w.bufferedRequest&&!w.finished&&!w.writing}function callFinal(w,$){w._final((function(x){$.pendingcb--,x&&w.emit("error",x),$.prefinished=!0,w.emit("prefinish"),finishMaybe(w,$)}))}function finishMaybe(w,$){var x=needFinish($);return x&&(!function prefinish(w,$){$.prefinished||$.finalCalled||("function"==typeof w._final?($.pendingcb++,$.finalCalled=!0,k.nextTick(callFinal,w,$)):($.prefinished=!0,w.emit("prefinish")))}(w,$),0===$.pendingcb&&($.finished=!0,w.emit("finish"))),x}D.inherits(Writable,V),WritableState.prototype.getBuffer=function getBuffer(){for(var w=this.bufferedRequest,$=[];w;)$.push(w),w=w.next;return $},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:W.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(w){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(J=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(w){return!!J.call(this,w)||this===Writable&&(w&&w._writableState instanceof WritableState)}})):J=function(w){return w instanceof this},Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Writable.prototype.write=function(w,$,x){var E=this._writableState,C=!1,I=!E.objectMode&&function _isUint8Array(w){return G.isBuffer(w)||w instanceof K}(w);return I&&!G.isBuffer(w)&&(w=function _uint8ArrayToBuffer(w){return G.from(w)}(w)),"function"==typeof $&&(x=$,$=null),I?$="buffer":$||($=E.defaultEncoding),"function"!=typeof x&&(x=nop),E.ended?function writeAfterEnd(w,$){var x=new Error("write after end");w.emit("error",x),k.nextTick($,x)}(this,x):(I||function validChunk(w,$,x,E){var C=!0,I=!1;return null===x?I=new TypeError("May not write null values to stream"):"string"==typeof x||void 0===x||$.objectMode||(I=new TypeError("Invalid non-string/buffer chunk")),I&&(w.emit("error",I),k.nextTick(E,I),C=!1),C}(this,E,w,x))&&(E.pendingcb++,C=function writeOrBuffer(w,$,x,E,C,k){if(!x){var I=function decodeChunk(w,$,x){w.objectMode||!1===w.decodeStrings||"string"!=typeof $||($=G.from($,x));return $}($,E,C);E!==I&&(x=!0,C="buffer",E=I)}var R=$.objectMode?1:E.length;$.length+=R;var D=$.length<$.highWaterMark;D||($.needDrain=!0);if($.writing||$.corked){var W=$.lastBufferedRequest;$.lastBufferedRequest={chunk:E,encoding:C,isBuf:x,callback:k,next:null},W?W.next=$.lastBufferedRequest:$.bufferedRequest=$.lastBufferedRequest,$.bufferedRequestCount+=1}else doWrite(w,$,!1,R,E,C,k);return D}(this,E,I,w,$,x)),C},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var w=this._writableState;w.corked&&(w.corked--,w.writing||w.corked||w.finished||w.bufferProcessing||!w.bufferedRequest||clearBuffer(this,w))},Writable.prototype.setDefaultEncoding=function setDefaultEncoding(w){if("string"==typeof w&&(w=w.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((w+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+w);return this._writableState.defaultEncoding=w,this},Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(w,$,x){x(new Error("_write() is not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(w,$,x){var E=this._writableState;"function"==typeof w?(x=w,w=null,$=null):"function"==typeof $&&(x=$,$=null),null!=w&&this.write(w,$),E.corked&&(E.corked=1,this.uncork()),E.ending||E.finished||function endWritable(w,$,x){$.ending=!0,finishMaybe(w,$),x&&($.finished?k.nextTick(x):w.once("finish",x));$.ended=!0,w.writable=!1}(this,E,x)},Object.defineProperty(Writable.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(w){this._writableState&&(this._writableState.destroyed=w)}}),Writable.prototype.destroy=ie.destroy,Writable.prototype._undestroy=ie.undestroy,Writable.prototype._destroy=function(w,$){this.end(),$(w)}}).call(this,x(44),x(185).setImmediate,x(46))},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.getTree=$.getNodeTypeFilterOptions=$.getChildrenForTreeNode=void 0;var E=x(221);Object.defineProperty($,"getChildrenForTreeNode",{enumerable:!0,get:function get(){return E.getChildrenForTreeNode}});var C=x(222);Object.defineProperty($,"getNodeTypeFilterOptions",{enumerable:!0,get:function get(){return C.getNodeTypeFilterOptions}});var k=x(223);Object.defineProperty($,"getTree",{enumerable:!0,get:function get(){return k.getTree}})},function(w,$,x){"use strict";w.exports=x(169)},function(w,$,x){"use strict";var E=x(170),C={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},k={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},I={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},R={};function getStatics(w){return E.isMemo(w)?I:R[w.$$typeof]||C}R[E.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},R[E.Memo]=I;var D=Object.defineProperty,W=Object.getOwnPropertyNames,V=Object.getOwnPropertySymbols,G=Object.getOwnPropertyDescriptor,K=Object.getPrototypeOf,J=Object.prototype;w.exports=function hoistNonReactStatics(w,$,x){if("string"!=typeof $){if(J){var E=K($);E&&E!==J&&hoistNonReactStatics(w,E,x)}var C=W($);V&&(C=C.concat(V($)));for(var I=getStatics(w),R=getStatics($),ie=0;ie15,isFn=function(w){return"function"==typeof w};$.default=function(w,$){for(var x=[],I=2;I=0;W--)if(G[W]!==K[W])return!1;for(W=G.length-1;W>=0;W--)if(D=G[W],!_deepEqual(w[D],$[D],x,E))return!1;return!0}(w,$,x,E))}return x?w===$:w==$}function isArguments(w){return"[object Arguments]"==Object.prototype.toString.call(w)}function expectedException(w,$){if(!w||!$)return!1;if("[object RegExp]"==Object.prototype.toString.call($))return $.test(w);try{if(w instanceof $)return!0}catch(w){}return!Error.isPrototypeOf($)&&!0===$.call({},w)}function _throws(w,$,x,E){var k;if("function"!=typeof $)throw new TypeError('"block" argument must be a function');"string"==typeof x&&(E=x,x=null),k=function _tryBlock(w){var $;try{w()}catch(w){$=w}return $}($),E=(x&&x.name?" ("+x.name+").":".")+(E?" "+E:"."),w&&!k&&fail(k,x,"Missing expected exception"+E);var I="string"==typeof E,R=!w&&k&&!x;if((!w&&C.isError(k)&&I&&expectedException(k,x)||R)&&fail(k,x,"Got unwanted exception"+E),w&&k&&x&&!expectedException(k,x)||!w&&k)throw k}D.AssertionError=function AssertionError(w){this.name="AssertionError",this.actual=w.actual,this.expected=w.expected,this.operator=w.operator,w.message?(this.message=w.message,this.generatedMessage=!1):(this.message=function getMessage(w){return truncate(inspect(w.actual),128)+" "+w.operator+" "+truncate(inspect(w.expected),128)}(this),this.generatedMessage=!0);var $=w.stackStartFunction||fail;if(Error.captureStackTrace)Error.captureStackTrace(this,$);else{var x=new Error;if(x.stack){var E=x.stack,C=getName($),k=E.indexOf("\n"+C);if(k>=0){var I=E.indexOf("\n",k+1);E=E.substring(I+1)}this.stack=E}}},C.inherits(D.AssertionError,Error),D.fail=fail,D.ok=ok,D.equal=function equal(w,$,x){w!=$&&fail(w,$,x,"==",D.equal)},D.notEqual=function notEqual(w,$,x){w==$&&fail(w,$,x,"!=",D.notEqual)},D.deepEqual=function deepEqual(w,$,x){_deepEqual(w,$,!1)||fail(w,$,x,"deepEqual",D.deepEqual)},D.deepStrictEqual=function deepStrictEqual(w,$,x){_deepEqual(w,$,!0)||fail(w,$,x,"deepStrictEqual",D.deepStrictEqual)},D.notDeepEqual=function notDeepEqual(w,$,x){_deepEqual(w,$,!1)&&fail(w,$,x,"notDeepEqual",D.notDeepEqual)},D.notDeepStrictEqual=function notDeepStrictEqual(w,$,x){_deepEqual(w,$,!0)&&fail(w,$,x,"notDeepStrictEqual",notDeepStrictEqual)},D.strictEqual=function strictEqual(w,$,x){w!==$&&fail(w,$,x,"===",D.strictEqual)},D.notStrictEqual=function notStrictEqual(w,$,x){w===$&&fail(w,$,x,"!==",D.notStrictEqual)},D.throws=function(w,$,x){_throws(!0,w,$,x)},D.doesNotThrow=function(w,$,x){_throws(!1,w,$,x)},D.ifError=function(w){if(w)throw w},D.strict=E((function strict(w,$){w||fail(w,!0,$,"==",strict)}),D,{equal:D.strictEqual,deepEqual:D.deepStrictEqual,notEqual:D.notStrictEqual,notDeepEqual:D.notDeepStrictEqual}),D.strict.strict=D.strict;var V=Object.keys||function(w){var $=[];for(var x in w)k.call(w,x)&&$.push(x);return $}}).call(this,x(46))},function(w,$,x){"use strict";(function($,E){var C=x(76);w.exports=Readable;var k,I=x(107);Readable.ReadableState=ReadableState;x(94).EventEmitter;var EElistenerCount=function(w,$){return w.listeners($).length},R=x(110),D=x(96).Buffer,W=$.Uint8Array||function(){};var V=Object.create(x(54));V.inherits=x(53);var G=x(182),K=void 0;K=G&&G.debuglog?G.debuglog("stream"):function(){};var J,ie=x(183),oe=x(111);V.inherits(Readable,R);var ue=["error","close","destroy","pause","resume"];function ReadableState(w,$){w=w||{};var E=$ instanceof(k=k||x(47));this.objectMode=!!w.objectMode,E&&(this.objectMode=this.objectMode||!!w.readableObjectMode);var C=w.highWaterMark,I=w.readableHighWaterMark,R=this.objectMode?16:16384;this.highWaterMark=C||0===C?C:E&&(I||0===I)?I:R,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new ie,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=w.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,w.encoding&&(J||(J=x(112).StringDecoder),this.decoder=new J(w.encoding),this.encoding=w.encoding)}function Readable(w){if(k=k||x(47),!(this instanceof Readable))return new Readable(w);this._readableState=new ReadableState(w,this),this.readable=!0,w&&("function"==typeof w.read&&(this._read=w.read),"function"==typeof w.destroy&&(this._destroy=w.destroy)),R.call(this)}function readableAddChunk(w,$,x,E,C){var k,I=w._readableState;null===$?(I.reading=!1,function onEofChunk(w,$){if($.ended)return;if($.decoder){var x=$.decoder.end();x&&x.length&&($.buffer.push(x),$.length+=$.objectMode?1:x.length)}$.ended=!0,emitReadable(w)}(w,I)):(C||(k=function chunkInvalid(w,$){var x;(function _isUint8Array(w){return D.isBuffer(w)||w instanceof W})($)||"string"==typeof $||void 0===$||w.objectMode||(x=new TypeError("Invalid non-string/buffer chunk"));return x}(I,$)),k?w.emit("error",k):I.objectMode||$&&$.length>0?("string"==typeof $||I.objectMode||Object.getPrototypeOf($)===D.prototype||($=function _uint8ArrayToBuffer(w){return D.from(w)}($)),E?I.endEmitted?w.emit("error",new Error("stream.unshift() after end event")):addChunk(w,I,$,!0):I.ended?w.emit("error",new Error("stream.push() after EOF")):(I.reading=!1,I.decoder&&!x?($=I.decoder.write($),I.objectMode||0!==$.length?addChunk(w,I,$,!1):maybeReadMore(w,I)):addChunk(w,I,$,!1))):E||(I.reading=!1));return function needMoreData(w){return!w.ended&&(w.needReadable||w.length$.highWaterMark&&($.highWaterMark=function computeNewHighWaterMark(w){return w>=8388608?w=8388608:(w--,w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,w|=w>>>16,w++),w}(w)),w<=$.length?w:$.ended?$.length:($.needReadable=!0,0))}function emitReadable(w){var $=w._readableState;$.needReadable=!1,$.emittedReadable||(K("emitReadable",$.flowing),$.emittedReadable=!0,$.sync?C.nextTick(emitReadable_,w):emitReadable_(w))}function emitReadable_(w){K("emit readable"),w.emit("readable"),flow(w)}function maybeReadMore(w,$){$.readingMore||($.readingMore=!0,C.nextTick(maybeReadMore_,w,$))}function maybeReadMore_(w,$){for(var x=$.length;!$.reading&&!$.flowing&&!$.ended&&$.length<$.highWaterMark&&(K("maybeReadMore read 0"),w.read(0),x!==$.length);)x=$.length;$.readingMore=!1}function nReadingNextTick(w){K("readable nexttick read 0"),w.read(0)}function resume_(w,$){$.reading||(K("resume read 0"),w.read(0)),$.resumeScheduled=!1,$.awaitDrain=0,w.emit("resume"),flow(w),$.flowing&&!$.reading&&w.read(0)}function flow(w){var $=w._readableState;for(K("flow",$.flowing);$.flowing&&null!==w.read(););}function fromList(w,$){return 0===$.length?null:($.objectMode?x=$.buffer.shift():!w||w>=$.length?(x=$.decoder?$.buffer.join(""):1===$.buffer.length?$.buffer.head.data:$.buffer.concat($.length),$.buffer.clear()):x=function fromListPartial(w,$,x){var E;w<$.head.data.length?(E=$.head.data.slice(0,w),$.head.data=$.head.data.slice(w)):E=w===$.head.data.length?$.shift():x?function copyFromBufferString(w,$){var x=$.head,E=1,C=x.data;w-=C.length;for(;x=x.next;){var k=x.data,I=w>k.length?k.length:w;if(I===k.length?C+=k:C+=k.slice(0,w),0===(w-=I)){I===k.length?(++E,x.next?$.head=x.next:$.head=$.tail=null):($.head=x,x.data=k.slice(I));break}++E}return $.length-=E,C}(w,$):function copyFromBuffer(w,$){var x=D.allocUnsafe(w),E=$.head,C=1;E.data.copy(x),w-=E.data.length;for(;E=E.next;){var k=E.data,I=w>k.length?k.length:w;if(k.copy(x,x.length-w,0,I),0===(w-=I)){I===k.length?(++C,E.next?$.head=E.next:$.head=$.tail=null):($.head=E,E.data=k.slice(I));break}++C}return $.length-=C,x}(w,$);return E}(w,$.buffer,$.decoder),x);var x}function endReadable(w){var $=w._readableState;if($.length>0)throw new Error('"endReadable()" called on non-empty stream');$.endEmitted||($.ended=!0,C.nextTick(endReadableNT,$,w))}function endReadableNT(w,$){w.endEmitted||0!==w.length||(w.endEmitted=!0,$.readable=!1,$.emit("end"))}function indexOf(w,$){for(var x=0,E=w.length;x=$.highWaterMark||$.ended))return K("read: emitReadable",$.length,$.ended),0===$.length&&$.ended?endReadable(this):emitReadable(this),null;if(0===(w=howMuchToRead(w,$))&&$.ended)return 0===$.length&&endReadable(this),null;var E,C=$.needReadable;return K("need readable",C),(0===$.length||$.length-w<$.highWaterMark)&&K("length less than watermark",C=!0),$.ended||$.reading?K("reading or ended",C=!1):C&&(K("do read"),$.reading=!0,$.sync=!0,0===$.length&&($.needReadable=!0),this._read($.highWaterMark),$.sync=!1,$.reading||(w=howMuchToRead(x,$))),null===(E=w>0?fromList(w,$):null)?($.needReadable=!0,w=0):$.length-=w,0===$.length&&($.ended||($.needReadable=!0),x!==w&&$.ended&&endReadable(this)),null!==E&&this.emit("data",E),E},Readable.prototype._read=function(w){this.emit("error",new Error("_read() is not implemented"))},Readable.prototype.pipe=function(w,$){var x=this,k=this._readableState;switch(k.pipesCount){case 0:k.pipes=w;break;case 1:k.pipes=[k.pipes,w];break;default:k.pipes.push(w)}k.pipesCount+=1,K("pipe count=%d opts=%j",k.pipesCount,$);var R=(!$||!1!==$.end)&&w!==E.stdout&&w!==E.stderr?onend:unpipe;function onunpipe($,E){K("onunpipe"),$===x&&E&&!1===E.hasUnpiped&&(E.hasUnpiped=!0,function cleanup(){K("cleanup"),w.removeListener("close",onclose),w.removeListener("finish",onfinish),w.removeListener("drain",D),w.removeListener("error",onerror),w.removeListener("unpipe",onunpipe),x.removeListener("end",onend),x.removeListener("end",unpipe),x.removeListener("data",ondata),W=!0,!k.awaitDrain||w._writableState&&!w._writableState.needDrain||D()}())}function onend(){K("onend"),w.end()}k.endEmitted?C.nextTick(R):x.once("end",R),w.on("unpipe",onunpipe);var D=function pipeOnDrain(w){return function(){var $=w._readableState;K("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,0===$.awaitDrain&&EElistenerCount(w,"data")&&($.flowing=!0,flow(w))}}(x);w.on("drain",D);var W=!1;var V=!1;function ondata($){K("ondata"),V=!1,!1!==w.write($)||V||((1===k.pipesCount&&k.pipes===w||k.pipesCount>1&&-1!==indexOf(k.pipes,w))&&!W&&(K("false write response, pause",x._readableState.awaitDrain),x._readableState.awaitDrain++,V=!0),x.pause())}function onerror($){K("onerror",$),unpipe(),w.removeListener("error",onerror),0===EElistenerCount(w,"error")&&w.emit("error",$)}function onclose(){w.removeListener("finish",onfinish),unpipe()}function onfinish(){K("onfinish"),w.removeListener("close",onclose),unpipe()}function unpipe(){K("unpipe"),x.unpipe(w)}return x.on("data",ondata),function prependListener(w,$,x){if("function"==typeof w.prependListener)return w.prependListener($,x);w._events&&w._events[$]?I(w._events[$])?w._events[$].unshift(x):w._events[$]=[x,w._events[$]]:w.on($,x)}(w,"error",onerror),w.once("close",onclose),w.once("finish",onfinish),w.emit("pipe",x),k.flowing||(K("pipe resume"),x.resume()),w},Readable.prototype.unpipe=function(w){var $=this._readableState,x={hasUnpiped:!1};if(0===$.pipesCount)return this;if(1===$.pipesCount)return w&&w!==$.pipes||(w||(w=$.pipes),$.pipes=null,$.pipesCount=0,$.flowing=!1,w&&w.emit("unpipe",this,x)),this;if(!w){var E=$.pipes,C=$.pipesCount;$.pipes=null,$.pipesCount=0,$.flowing=!1;for(var k=0;k>5==6?2:w>>4==14?3:w>>3==30?4:w>>6==2?-1:-2}function utf8FillLast(w){var $=this.lastTotal-this.lastNeed,x=function utf8CheckExtraBytes(w,$,x){if(128!=(192&$[0]))return w.lastNeed=0,"�";if(w.lastNeed>1&&$.length>1){if(128!=(192&$[1]))return w.lastNeed=1,"�";if(w.lastNeed>2&&$.length>2&&128!=(192&$[2]))return w.lastNeed=2,"�"}}(this,w);return void 0!==x?x:this.lastNeed<=w.length?(w.copy(this.lastChar,$,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(w.copy(this.lastChar,$,0,w.length),void(this.lastNeed-=w.length))}function utf16Text(w,$){if((w.length-$)%2==0){var x=w.toString("utf16le",$);if(x){var E=x.charCodeAt(x.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1],x.slice(0,-1)}return x}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=w[w.length-1],w.toString("utf16le",$,w.length-1)}function utf16End(w){var $=w&&w.length?this.write(w):"";if(this.lastNeed){var x=this.lastTotal-this.lastNeed;return $+this.lastChar.toString("utf16le",0,x)}return $}function base64Text(w,$){var x=(w.length-$)%3;return 0===x?w.toString("base64",$):(this.lastNeed=3-x,this.lastTotal=3,1===x?this.lastChar[0]=w[w.length-1]:(this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1]),w.toString("base64",$,w.length-x))}function base64End(w){var $=w&&w.length?this.write(w):"";return this.lastNeed?$+this.lastChar.toString("base64",0,3-this.lastNeed):$}function simpleWrite(w){return w.toString(this.encoding)}function simpleEnd(w){return w&&w.length?this.write(w):""}$.StringDecoder=StringDecoder,StringDecoder.prototype.write=function(w){if(0===w.length)return"";var $,x;if(this.lastNeed){if(void 0===($=this.fillLast(w)))return"";x=this.lastNeed,this.lastNeed=0}else x=0;return x=0)return C>0&&(w.lastNeed=C-1),C;if(--E=0)return C>0&&(w.lastNeed=C-2),C;if(--E=0)return C>0&&(2===C?C=0:w.lastNeed=C-3),C;return 0}(this,w,$);if(!this.lastNeed)return w.toString("utf8",$);this.lastTotal=x;var E=w.length-(x-this.lastNeed);return w.copy(this.lastChar,0,E),w.toString("utf8",$,E)},StringDecoder.prototype.fillLast=function(w){if(this.lastNeed<=w.length)return w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,w.length),this.lastNeed-=w.length}},function(w,$,x){"use strict";w.exports=Transform;var E=x(47),C=Object.create(x(54));function afterTransform(w,$){var x=this._transformState;x.transforming=!1;var E=x.writecb;if(!E)return this.emit("error",new Error("write callback called multiple times"));x.writechunk=null,x.writecb=null,null!=$&&this.push($),E(w);var C=this._readableState;C.reading=!1,(C.needReadable||C.length>>0).toString(36)}(x.stringify(w))},selector:function(w,$){return w+(":"===$[0]?"":" ")+$},putRaw:function(w){x.raw+=w}},w);return x.client&&(x.sh||document.head.appendChild(x.sh=document.createElement("style")),x.putRaw=function(w){var $=x.sh.sheet;try{$.insertRule(w,$.cssRules.length)}catch(w){}}),x.put=function(w,$,E){var C,k,I="",R=[];for(C in $)(k=$[C])instanceof Object&&!(k instanceof Array)?R.push(C):I+=x.decl(C,k,w,E);I&&(I=w+"{"+I+"}",x.putRaw(E?E+"{"+I+"}":I));for(var D=0;D-1,W=x.split(",");if(D)for(var V=0;VE&&(E=($=$.trim()).charCodeAt(0)),E){case 38:return $.replace(R,"$1"+w.trim());case 58:return w.trim()+$.replace(R,"$1"+w.trim());default:if(0<1*x&&0<$.indexOf("\f"))return $.replace(R,(58===w.charCodeAt(0)?"":"$1")+w.trim())}return w+$}function P(w,$,x,I){var R=w+";",D=2*$+3*x+4*I;if(944===D){w=R.indexOf(":",9)+1;var W=R.substring(w,R.length-1).trim();return W=R.substring(0,w).trim()+W+";",1===pe||2===pe&&L(W,1)?"-webkit-"+W+W:W}if(0===pe||2===pe&&!L(R,1))return R;switch(D){case 1015:return 97===R.charCodeAt(10)?"-webkit-"+R+R:R;case 951:return 116===R.charCodeAt(3)?"-webkit-"+R+R:R;case 963:return 110===R.charCodeAt(5)?"-webkit-"+R+R:R;case 1009:if(100!==R.charCodeAt(4))break;case 969:case 942:return"-webkit-"+R+R;case 978:return"-webkit-"+R+"-moz-"+R+R;case 1019:case 983:return"-webkit-"+R+"-moz-"+R+"-ms-"+R+R;case 883:if(45===R.charCodeAt(8))return"-webkit-"+R+R;if(0W.charCodeAt(8))break;case 115:R=R.replace(W,"-webkit-"+W)+";"+R;break;case 207:case 102:R=R.replace(W,"-webkit-"+(102C.charCodeAt(0)&&(C=C.trim()),C=[C],0R)&&(De=(He=He.replace(" ",":")).length),0=0)){if(Pe.push(w),ve[w]){var R=Ie(ve[w],!0);try{for(var D=E.__values(R),W=D.next();!W.done;W=D.next()){var V=W.value;addToResults(ve[w][V],$)}}catch(w){x={error:w}}finally{try{W&&!W.done&&(C=D.return)&&C.call(D)}finally{if(x)throw x.error}}}if($.push(w),ge[w]){var G=Ie(ge[w],!1);try{for(var K=E.__values(G),J=K.next();!J.done;J=K.next()){V=J.value;addToResults(ge[w][V],$)}}catch(w){k={error:w}}finally{try{J&&!J.done&&(I=K.return)&&I.call(K)}finally{if(k)throw k.error}}}}}))};try{for(var Re=E.__values(Ie(pe,!1)),Le=Re.next();!Le.done;Le=Re.next()){var De=Le.value;Fe(pe[De],Se)}}catch(w){C={error:w}}finally{try{Le&&!Le.done&&(k=Re.return)&&k.call(Re)}finally{if(C)throw C.error}}try{for(var Ue=E.__values(Ie(le,!0)),ze=Ue.next();!ze.done;ze=Ue.next()){De=ze.value;Fe(le[De],we)}}catch(w){I={error:w}}finally{try{ze&&!ze.done&&(R=Ue.return)&&R.call(Ue)}finally{if(I)throw I.error}}try{for(var He=E.__values(Ie(he,!0)),Ke=He.next();!Ke.done;Ke=He.next()){De=Ke.value;Fe(he[De],Ce)}}catch(w){D={error:w}}finally{try{Ke&&!Ke.done&&(W=He.return)&&W.call(He)}finally{if(D)throw D.error}}try{for(var Ze=E.__values(Object.keys(ve)),Qe=Ze.next();!Qe.done;Qe=Ze.next()){var et=Qe.value;if(!(Pe.indexOf(et)>=0))try{for(var tt=(K=void 0,E.__values(Ie(ve[et],!1))),rt=tt.next();!rt.done;rt=tt.next()){De=rt.value;Fe(ve[et][De],Se)}}catch(w){K={error:w}}finally{try{rt&&!rt.done&&(J=tt.return)&&J.call(tt)}finally{if(K)throw K.error}}}}catch(w){V={error:w}}finally{try{Qe&&!Qe.done&&(G=Ze.return)&&G.call(Ze)}finally{if(V)throw V.error}}try{for(var nt=E.__values(Object.keys(ge)),it=nt.next();!it.done;it=nt.next()){et=it.value;if(!(Pe.indexOf(et)>=0))try{for(var ot=(ue=void 0,E.__values(Ie(ge[et],!1))),ut=ot.next();!ut.done;ut=ot.next()){De=ut.value;Fe(ge[et][De],we)}}catch(w){ue={error:w}}finally{try{ut&&!ut.done&&(ae=ot.return)&&ae.call(ot)}finally{if(ue)throw ue.error}}}}catch(w){ie={error:w}}finally{try{it&&!it.done&&(oe=nt.return)&&oe.call(nt)}finally{if(ie)throw ie.error}}return E.__spread(Se,we,Ce).map((function(w){return de[w]})).map((function($){return w[$]}))}},function(w,$,x){"use strict";$.__esModule=!0;var E=x(1),C=function(w){function SynchronousMetaRegistry(){return null!==w&&w.apply(this,arguments)||this}return E.__extends(SynchronousMetaRegistry,w),SynchronousMetaRegistry.prototype.set=function($,x){if("d8a5aa78-978e-11e6-ae22-56b6b6499611"!==x.SERIAL_VERSION_UID)throw new Error("You can only add registries to a meta registry");return w.prototype.set.call(this,$,x)},SynchronousMetaRegistry}(E.__importDefault(x(103)).default);$.default=C},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.registerDialog=$.registerLinkTypes=void 0;var E=x(140);Object.defineProperty($,"registerLinkTypes",{enumerable:!0,get:function get(){return E.registerLinkTypes}});var C=x(239);Object.defineProperty($,"registerDialog",{enumerable:!0,get:function get(){return C.registerDialog}})},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.registerLinkTypes=void 0;var E=x(102),C=x(141),k=x(208),I=x(230),R=x(233),D=x(235),W=x(237);$.registerLinkTypes=function registerLinkTypes(w){var $=new E.SynchronousRegistry("\n # Sitegeist.Archaeopteryx LinkType Registry\n ");$.set(k.Node.id,k.Node),$.set(I.Asset.id,I.Asset),$.set(C.Web.id,C.Web),$.set(R.MailTo.id,R.MailTo),$.set(D.PhoneNumber.id,D.PhoneNumber),$.set(W.CustomLink.id,W.CustomLink),w.set("@sitegeist/archaeopteryx/link-types",$)}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.Web=void 0;var E=x(142);Object.defineProperty($,"Web",{enumerable:!0,get:function get(){return E.Web}})},function(w,$,x){"use strict";var __assign=function(){return(__assign=Object.assign||function(w){for(var $,x=1,E=arguments.length;x0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.Web=void 0;var k=__importStar(x(0)),I=x(0),R=x(69),D=x(16),W=x(12),V=x(43),G=x(30),K=x(38);function removeHttp(w){return w.replace(/^https?:\/\//,"")}$.Web=G.makeLinkType("Sitegeist.Archaeopteryx:Web",(function(w){var $=w.createError;return{supportedLinkOptions:["anchor","title","targetBlank","relNofollow"],isSuitableFor:function isSuitableFor(w){var $=w.href.startsWith("http://"),x=w.href.startsWith("https://");return $||x},useResolvedModel:function useResolvedModel(w){var x=w.href.match(/^(https?):\/\/(.*)$/);if(x){var E=__read(x,3),C=E[1],k=E[2];return V.Process.success({protocol:C,urlWithoutProtocol:k})}return V.Process.error($('Cannot handle href "'+w.href+'".'))},convertModelToLink:function convertModelToLink(w){return{href:w.protocol+"://"+removeHttp(w.urlWithoutProtocol)}},TabHeader:function TabHeader(){var w=W.useI18n();return k.createElement(K.IconLabel,{icon:"globe"},w("Sitegeist.Archaeopteryx:LinkTypes.Web:title"))},Preview:function Preview(w){var $=w.model;return k.createElement(K.IconCard,{icon:"external-link",title:$.protocol+"://"+removeHttp($.urlWithoutProtocol)})},Editor:function Editor(w){var $,x=w.model,E=__read(I.useState(""),2),C=E[0],G=E[1],K=W.useI18n();return k.createElement("div",null,k.createElement("label",{htmlFor:"linkTypeProps.Sitegeist_Archaeopteryx:Web.urlWithoutProtocol"},K("Sitegeist.Archaeopteryx:LinkTypes.Web:label.link"),":"),k.createElement("div",{style:{display:"grid",gridTemplateColumns:"160px 1fr",minWidth:"600px"}},k.createElement(V.Field,{name:"protocol",format:function format(w){return void 0===w&&""===w||G(w),void 0===w&&R.useForm().change("linkTypeProps.Sitegeist_Archaeopteryx:Web.protocol",C),w},initialValue:null!==($=null==x?void 0:x.protocol)&&void 0!==$?$:"https",validate:function validate(w){if(!w)return K("Sitegeist.Archaeopteryx:LinkTypes.Web:protocol.validation.required")}},(function(w){var $=w.input;return k.createElement(D.SelectBox,{onValueChange:$.onChange,allowEmpty:!1,value:$.value,options:[{value:"https",label:"HTTPS",icon:"lock"},{value:"http",label:"HTTP",icon:"unlock"}]})})),k.createElement(V.Field,{name:"urlWithoutProtocol",initialValue:null==x?void 0:x.urlWithoutProtocol,format:function format(w){var $=null==w?void 0:w.match(/^(https?):\/\/(.*)$/);return $?__read($,3)[2]:w},parse:function parse(w){var $=null==w?void 0:w.match(/^(https?):\/\/(.*)$/);if($){var x=__read($,3),E=x[1],C=x[2];return R.useForm().change("linkTypeProps.Sitegeist_Archaeopteryx:Web.protocol",E),C}return w},validate:function validate(w){if(!w)return K("Sitegeist.Archaeopteryx:LinkTypes.Web:urlWithoutProtocol.validation.required")}},(function(w){var $=w.input;return k.createElement(D.TextInput,__assign({id:$.name,type:"text",placeholder:K("Sitegeist.Archaeopteryx:LinkTypes.Web:urlWithoutProtocol.placeholder")},$))}))))}}}))},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.fetchWithErrorHandling=void 0;var E=x(144);Object.defineProperty($,"fetchWithErrorHandling",{enumerable:!0,get:function get(){return E.fetchWithErrorHandling}})},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.fetchWithErrorHandling=void 0;var E=x(104);$.fetchWithErrorHandling=E.fetchWithErrorHandling},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.useAssetSummary=$.useI18n=$.useSelector=$.useRoutes=$.useConfiguration=$.useGlobalRegistry=$.useNeos=$.NeosContext=$.usePersonalWorkspaceName=$.useDimensionValues=$.useDocumentNodeContextPath=$.useSiteNodeContextPath=$.ContextPath=void 0;var E=x(146);Object.defineProperty($,"ContextPath",{enumerable:!0,get:function get(){return E.ContextPath}}),Object.defineProperty($,"useSiteNodeContextPath",{enumerable:!0,get:function get(){return E.useSiteNodeContextPath}}),Object.defineProperty($,"useDocumentNodeContextPath",{enumerable:!0,get:function get(){return E.useDocumentNodeContextPath}}),Object.defineProperty($,"useDimensionValues",{enumerable:!0,get:function get(){return E.useDimensionValues}}),Object.defineProperty($,"usePersonalWorkspaceName",{enumerable:!0,get:function get(){return E.usePersonalWorkspaceName}});var C=x(150);Object.defineProperty($,"NeosContext",{enumerable:!0,get:function get(){return C.NeosContext}}),Object.defineProperty($,"useNeos",{enumerable:!0,get:function get(){return C.useNeos}}),Object.defineProperty($,"useGlobalRegistry",{enumerable:!0,get:function get(){return C.useGlobalRegistry}}),Object.defineProperty($,"useConfiguration",{enumerable:!0,get:function get(){return C.useConfiguration}}),Object.defineProperty($,"useRoutes",{enumerable:!0,get:function get(){return C.useRoutes}}),Object.defineProperty($,"useSelector",{enumerable:!0,get:function get(){return C.useSelector}}),Object.defineProperty($,"useI18n",{enumerable:!0,get:function get(){return C.useI18n}});var k=x(154);Object.defineProperty($,"useAssetSummary",{enumerable:!0,get:function get(){return k.useAssetSummary}})},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.usePersonalWorkspaceName=$.useDimensionValues=$.useDocumentNodeContextPath=$.useSiteNodeContextPath=$.ContextPath=void 0;var E=x(147);Object.defineProperty($,"ContextPath",{enumerable:!0,get:function get(){return E.ContextPath}}),Object.defineProperty($,"useSiteNodeContextPath",{enumerable:!0,get:function get(){return E.useSiteNodeContextPath}}),Object.defineProperty($,"useDocumentNodeContextPath",{enumerable:!0,get:function get(){return E.useDocumentNodeContextPath}});var C=x(148);Object.defineProperty($,"useDimensionValues",{enumerable:!0,get:function get(){return C.useDimensionValues}});var k=x(149);Object.defineProperty($,"usePersonalWorkspaceName",{enumerable:!0,get:function get(){return k.usePersonalWorkspaceName}})},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__read=function(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I},__values=function(w){var $="function"==typeof Symbol&&Symbol.iterator,x=$&&w[$],E=0;if(x)return x.call(w);if(w&&"number"==typeof w.length)return{next:function next(){return w&&E>=w.length&&(w=void 0),{value:w&&w[E++],done:!w}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty($,"__esModule",{value:!0}),$.useDocumentNodeContextPath=$.useSiteNodeContextPath=$.ContextPath=void 0;var k=__importStar(x(0)),I=x(72),R=function(){function ContextPath(w,$){this.path=w,this.context=$}return ContextPath.fromString=function(w){var $=__read((null!=w?w:"").split("@"),2),x=$[0],E=$[1];return x&&w?new ContextPath(x,E):null},ContextPath.prototype.adopt=function(w){var $=__read((null!=w?w:"").split("@"),1)[0];return $?new ContextPath($,this.context):null},ContextPath.prototype.getIntermediateContextPaths=function(w){var $,x;if(w.path.startsWith(this.path)){var E=w.path.split("/"),C=[];try{for(var k=__values(E.entries()),I=k.next();!I.done;I=k.next()){var R=__read(I.value,1)[0],D=E.slice(0,-R).join("/");if(D&&C.push(new ContextPath(D,this.context)),D===this.path)break}}catch(w){$={error:w}}finally{try{I&&!I.done&&(x=k.return)&&x.call(k)}finally{if($)throw $.error}}return C}return[]},ContextPath.prototype.equals=function(w){return this.path===w.path&&this.context===w.context},ContextPath.prototype.toString=function(){return this.path+"@"+this.context},Object.defineProperty(ContextPath.prototype,"depth",{get:function get(){var w,$;return null!==($=null===(w=this.path.match(/\//g))||void 0===w?void 0:w.length)&&void 0!==$?$:0},enumerable:!1,configurable:!0}),ContextPath}();$.ContextPath=R,$.useSiteNodeContextPath=function useSiteNodeContextPath(){var w=I.useSelector((function(w){var $,x;return null===(x=null===($=w.cr)||void 0===$?void 0:$.nodes)||void 0===x?void 0:x.siteNode}));return k.useMemo((function(){return w?R.fromString(w):null}),[w])},$.useDocumentNodeContextPath=function useDocumentNodeContextPath(){var w=I.useSelector((function(w){var $,x;return null===(x=null===($=w.cr)||void 0===$?void 0:$.nodes)||void 0===x?void 0:x.documentNode}));return k.useMemo((function(){return w?R.fromString(w):null}),[w])}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.useDimensionValues=void 0;var E=x(72);$.useDimensionValues=function useDimensionValues(){var w=E.useSelector((function(w){var $,x;return null===(x=null===($=w.cr)||void 0===$?void 0:$.contentDimensions)||void 0===x?void 0:x.active}));return null!=w?w:null}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.usePersonalWorkspaceName=void 0;var E=x(72);$.usePersonalWorkspaceName=function usePersonalWorkspaceName(){var w=E.useSelector((function(w){var $,x,E;return null===(E=null===(x=null===($=w.cr)||void 0===$?void 0:$.workspaces)||void 0===x?void 0:x.personalWorkspace)||void 0===E?void 0:E.name}));return null!=w?w:null}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.useI18n=$.useSelector=$.useNeos=$.NeosContext=$.useRoutes=$.useConfiguration=$.useGlobalRegistry=void 0;var E=x(105);Object.defineProperty($,"useGlobalRegistry",{enumerable:!0,get:function get(){return E.useGlobalRegistry}});var C=x(151);Object.defineProperty($,"useConfiguration",{enumerable:!0,get:function get(){return C.useConfiguration}});var k=x(152);Object.defineProperty($,"useRoutes",{enumerable:!0,get:function get(){return k.useRoutes}});var I=x(68);Object.defineProperty($,"NeosContext",{enumerable:!0,get:function get(){return I.NeosContext}}),Object.defineProperty($,"useNeos",{enumerable:!0,get:function get(){return I.useNeos}});var R=x(72);Object.defineProperty($,"useSelector",{enumerable:!0,get:function get(){return R.useSelector}});var D=x(153);Object.defineProperty($,"useI18n",{enumerable:!0,get:function get(){return D.useI18n}})},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.useConfiguration=void 0;var E=x(68);$.useConfiguration=function useConfiguration(w){var $=E.useNeos();return w?w($.configuration):$.configuration}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.useRoutes=void 0;var E=x(68);$.useRoutes=function useRoutes(w){var $=E.useNeos();if($.routes)return w?w($.routes):$.routes}},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.useI18n=void 0;var k=__importStar(x(0)),I=x(105);$.useI18n=function useI18n(){var w=I.useGlobalRegistry().get("i18n");return k.useMemo((function(){return function($,x,E,C,k,I){return void 0===E&&(E={}),void 0===C&&(C="Neos.Neos"),void 0===k&&(k="Main"),void 0===I&&(I=0),w.translate($,x,E,C,k,I)}}),[w])}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.useAssetSummary=void 0;var E=x(155);Object.defineProperty($,"useAssetSummary",{enumerable:!0,get:function get(){return E.useAssetSummary}})},function(w,$,x){"use strict";var __awaiter=function(w,$,x,E){return new(x||(x=Promise))((function(C,k){function fulfilled(w){try{step(E.next(w))}catch(w){k(w)}}function rejected(w){try{step(E.throw(w))}catch(w){k(w)}}function step(w){w.done?C(w.value):function adopt(w){return w instanceof x?w:new x((function($){$(w)}))}(w.value).then(fulfilled,rejected)}step((E=E.apply(w,$||[])).next())}))},__generator=function(w,$){var x,E,C,k,I={label:0,sent:function sent(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return k={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k;function verb(k){return function(R){return function step(k){if(x)throw new TypeError("Generator is already executing.");for(;I;)try{if(x=1,E&&(C=2&k[0]?E.return:k[0]?E.throw||((C=E.return)&&C.call(E),0):E.next)&&!(C=C.call(E,k[1])).done)return C;switch(E=0,C&&(k=[2&k[0],C.value]),k[0]){case 0:case 1:C=k;break;case 4:return I.label++,{value:k[1],done:!1};case 5:I.label++,E=k[1],k=[0];continue;case 7:k=I.ops.pop(),I.trys.pop();continue;default:if(!(C=I.trys,(C=C.length>0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]=0;){if(E[$]===w){x.deleteRule($);break}$--}}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.divWrapper=void 0;var E=x(5),C=E.__importStar(x(0)),k=E.__importDefault(x(159)),I=C.createElement,noWrap=function(w,$,x,C){var k;return I(w,$?E.__assign(((k={})[$]=C,k),x):E.__assign(E.__assign({},C),x))};$.divWrapper=function(w,$,x,E){return I("div",null,noWrap(w,$,x,E))};$.default=function(w,$,x){void 0===x&&(x=noWrap);var enhancer=function(E,C,R){void 0===C&&(C=$),void 0===R&&(R=null);var D="string"==typeof E;if(D)return function(w){return enhancer(w,E||$,C)};var Enhanced=function($){return I(w,R,(function(w){return x(E,C,$,w)}))};return D?k.default(Enhanced):Enhanced};return enhancer}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0});var E=x(5).__importDefault(x(160));$.default=function(w){return!w.prototype?E.default(w):w}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0});var E=x(5),C=E.__importStar(x(0));$.default=function(w){return function($){function class_1(){return null!==$&&$.apply(this,arguments)||this}return E.__extends(class_1,$),class_1.prototype.render=function(){return w(this.props,this.context)},class_1}(C.Component)}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0});var E=x(5).__importDefault(x(106)),defaultMapPropsToArgs=function(w){return[w]};$.default=function(w,$){return void 0===$&&($=defaultMapPropsToArgs),function(x){return E.default(x,w.apply(void 0,$(x)))}}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.endpoints=void 0;var E=x(163);Object.defineProperty($,"endpoints",{enumerable:!0,get:function get(){return E.endpoints}})},function(w,$,x){"use strict";var __importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.endpoints=void 0;var E=__importDefault(x(104));$.endpoints=function endpoints(){return E.default.get().endpoints}},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.Process=void 0,$.Process=__importStar(x(165))},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.fromAsyncState=$.success=$.error=$.busy=void 0;var E={busy:!0,error:null,result:null};$.busy=function busy(){return E},$.error=function error(w){return{busy:!1,error:w,result:null}},$.success=function success(w){return{busy:!1,error:null,result:w}},$.fromAsyncState=function fromAsyncState(w){var $,x;return{busy:w.loading,error:null!==($=w.error)&&void 0!==$?$:null,result:null!==(x=w.value)&&void 0!==x?x:null}}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.EditorEnvelope=$.FieldGroup=$.Field=void 0;var E=x(167);Object.defineProperty($,"Field",{enumerable:!0,get:function get(){return E.Field}}),Object.defineProperty($,"FieldGroup",{enumerable:!0,get:function get(){return E.FieldGroup}});var C=x(168);Object.defineProperty($,"EditorEnvelope",{enumerable:!0,get:function get(){return C.EditorEnvelope}})},function(w,$,x){"use strict";var __assign=function(){return(__assign=Object.assign||function(w){for(var $,x=1,E=arguments.length;x0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I},__spreadArray=function(w,$){for(var x=0,E=$.length,C=w.length;x=w.length&&(w=void 0),{value:w&&w[E++],done:!w}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.useSortedAndFilteredLinkTypes=$.useLinkTypeForHref=$.useLinkTypes=$.makeLinkType=void 0;var k=__importStar(x(0)),I=x(73),R=__importDefault(x(195)),D=x(12),W=x(114);function useLinkTypes(){var w,$;return null!==($=null===(w=D.useGlobalRegistry().get("@sitegeist/archaeopteryx/link-types"))||void 0===w?void 0:w.getAllAsList())&&void 0!==$?$:[]}$.makeLinkType=function makeLinkType(w,$){var x,E,C=$({createError:function createError($,x){return x?new I.VError(x,"["+w+"]: "+$):new I.VError("["+w+"]: "+$)}});return __assign(__assign({id:w,supportedLinkOptions:[]},C),{LoadingPreview:null!==(x=C.LoadingPreview)&&void 0!==x?x:function(){return k.createElement("div",{},"Loading...")},LoadingEditor:null!==(E=C.LoadingEditor)&&void 0!==E?E:function(){return k.createElement("div",{},"Loading...")}})},$.useLinkTypes=useLinkTypes,$.useLinkTypeForHref=function useLinkTypeForHref(w){var $=useLinkTypes();return k.useMemo((function(){var x,E;if(null===w)return null;try{for(var C=__values(__spreadArray([],__read($)).reverse()),k=C.next();!k.done;k=C.next()){var I=k.value;if(I.isSuitableFor({href:w}))return I}}catch(w){x={error:w}}finally{try{k&&!k.done&&(E=C.return)&&E.call(C)}finally{if(x)throw x.error}}return null}),[$,w])},$.useSortedAndFilteredLinkTypes=function useSortedAndFilteredLinkTypes(){var w=useLinkTypes(),$=W.useEditorState().editorOptions,x=w.map((function(w){var x;return{linkType:w,options:null===(x=$.linkTypes)||void 0===x?void 0:x[w.id]}}));return R.default(x,(function(w){var $=w.options;return null==$?void 0:$.position})).filter((function(w){var $=w.options;return!$||!("enabled"in $)||$.enabled})).map((function(w){return w.linkType}))}},function(w,$,x){(function($,E){var C=x(108),k=x(181).Stream,I=x(75),R=/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;function _capitalize(w){return w.charAt(0).toUpperCase()+w.slice(1)}function _toss(w,$,x,E,k){throw new C.AssertionError({message:I.format("%s (%s) is required",w,$),actual:void 0===k?typeof E:k(E),expected:$,operator:x||"===",stackStartFunction:_toss.caller})}function _getClass(w){return Object.prototype.toString.call(w).slice(8,-1)}function noop(){}var D={bool:{check:function(w){return"boolean"==typeof w}},func:{check:function(w){return"function"==typeof w}},string:{check:function(w){return"string"==typeof w}},object:{check:function(w){return"object"==typeof w&&null!==w}},number:{check:function(w){return"number"==typeof w&&!isNaN(w)}},finite:{check:function(w){return"number"==typeof w&&!isNaN(w)&&isFinite(w)}},buffer:{check:function(w){return $.isBuffer(w)},operator:"Buffer.isBuffer"},array:{check:function(w){return Array.isArray(w)},operator:"Array.isArray"},stream:{check:function(w){return w instanceof k},operator:"instanceof",actual:_getClass},date:{check:function(w){return w instanceof Date},operator:"instanceof",actual:_getClass},regexp:{check:function(w){return w instanceof RegExp},operator:"instanceof",actual:_getClass},uuid:{check:function(w){return"string"==typeof w&&R.test(w)},operator:"isUUID"}};w.exports=function _setExports(w){var $,x=Object.keys(D);return $=E.env.NODE_NDEBUG?noop:function(w,$){w||_toss($,"true",w)},x.forEach((function(x){if(w)$[x]=noop;else{var E=D[x];$[x]=function(w,$){E.check(w)||_toss($,x,E.operator,w,E.actual)}}})),x.forEach((function(x){var E="optional"+_capitalize(x);if(w)$[E]=noop;else{var C=D[x];$[E]=function(w,$){null!=w&&(C.check(w)||_toss($,x,C.operator,w,C.actual))}}})),x.forEach((function(x){var E="arrayOf"+_capitalize(x);if(w)$[E]=noop;else{var C=D[x],k="["+x+"]";$[E]=function(w,$){var x;for(Array.isArray(w)||_toss($,k,C.operator,w,C.actual),x=0;x0?I-4:I;for(x=0;x>16&255,D[W++]=$>>8&255,D[W++]=255&$;2===R&&($=C[w.charCodeAt(x)]<<2|C[w.charCodeAt(x+1)]>>4,D[W++]=255&$);1===R&&($=C[w.charCodeAt(x)]<<10|C[w.charCodeAt(x+1)]<<4|C[w.charCodeAt(x+2)]>>2,D[W++]=$>>8&255,D[W++]=255&$);return D},$.fromByteArray=function fromByteArray(w){for(var $,x=w.length,C=x%3,k=[],I=0,R=x-C;IR?R:I+16383));1===C?($=w[x-1],k.push(E[$>>2]+E[$<<4&63]+"==")):2===C&&($=(w[x-2]<<8)+w[x-1],k.push(E[$>>10]+E[$>>4&63]+E[$<<2&63]+"="));return k.join("")};for(var E=[],C=[],k="undefined"!=typeof Uint8Array?Uint8Array:Array,I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R=0,D=I.length;R0)throw new Error("Invalid string. Length must be a multiple of 4");var x=w.indexOf("=");return-1===x&&(x=$),[x,x===$?0:4-x%4]}function encodeChunk(w,$,x){for(var C,k,I=[],R=$;R>18&63]+E[k>>12&63]+E[k>>6&63]+E[63&k]);return I.join("")}C["-".charCodeAt(0)]=62,C["_".charCodeAt(0)]=63},function(w,$){$.read=function(w,$,x,E,C){var k,I,R=8*C-E-1,D=(1<>1,V=-7,G=x?C-1:0,K=x?-1:1,J=w[$+G];for(G+=K,k=J&(1<<-V)-1,J>>=-V,V+=R;V>0;k=256*k+w[$+G],G+=K,V-=8);for(I=k&(1<<-V)-1,k>>=-V,V+=E;V>0;I=256*I+w[$+G],G+=K,V-=8);if(0===k)k=1-W;else{if(k===D)return I?NaN:1/0*(J?-1:1);I+=Math.pow(2,E),k-=W}return(J?-1:1)*I*Math.pow(2,k-E)},$.write=function(w,$,x,E,C,k){var I,R,D,W=8*k-C-1,V=(1<>1,K=23===C?Math.pow(2,-24)-Math.pow(2,-77):0,J=E?0:k-1,ie=E?1:-1,oe=$<0||0===$&&1/$<0?1:0;for($=Math.abs($),isNaN($)||$===1/0?(R=isNaN($)?1:0,I=V):(I=Math.floor(Math.log($)/Math.LN2),$*(D=Math.pow(2,-I))<1&&(I--,D*=2),($+=I+G>=1?K/D:K*Math.pow(2,1-G))*D>=2&&(I++,D/=2),I+G>=V?(R=0,I=V):I+G>=1?(R=($*D-1)*Math.pow(2,C),I+=G):(R=$*Math.pow(2,G-1)*Math.pow(2,C),I=0));C>=8;w[x+J]=255&R,J+=ie,R/=256,C-=8);for(I=I<0;w[x+J]=255&I,J+=ie,I/=256,W-=8);w[x+J-ie]|=128*oe}},function(w,$,x){"use strict";var E=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;function toObject(w){if(null==w)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(w)}w.exports=function shouldUseNative(){try{if(!Object.assign)return!1;var w=new String("abc");if(w[5]="de","5"===Object.getOwnPropertyNames(w)[0])return!1;for(var $={},x=0;x<10;x++)$["_"+String.fromCharCode(x)]=x;if("0123456789"!==Object.getOwnPropertyNames($).map((function(w){return $[w]})).join(""))return!1;var E={};return"abcdefghijklmnopqrst".split("").forEach((function(w){E[w]=w})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},E)).join("")}catch(w){return!1}}()?Object.assign:function(w,$){for(var x,I,R=toObject(w),D=1;D0?this.tail.next=$:this.head=$,this.tail=$,++this.length},BufferList.prototype.unshift=function unshift(w){var $={data:w,next:this.head};0===this.length&&(this.tail=$),this.head=$,++this.length},BufferList.prototype.shift=function shift(){if(0!==this.length){var w=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,w}},BufferList.prototype.clear=function clear(){this.head=this.tail=null,this.length=0},BufferList.prototype.join=function join(w){if(0===this.length)return"";for(var $=this.head,x=""+$.data;$=$.next;)x+=w+$.data;return x},BufferList.prototype.concat=function concat(w){if(0===this.length)return E.alloc(0);if(1===this.length)return this.head.data;for(var $,x,C,k=E.allocUnsafe(w>>>0),I=this.head,R=0;I;)$=I.data,x=k,C=R,$.copy(x,C),R+=I.data.length,I=I.next;return k},BufferList}(),C&&C.inspect&&C.inspect.custom&&(w.exports.prototype[C.inspect.custom]=function(){var w=C.inspect({length:this.length});return this.constructor.name+" "+w})},function(w,$){},function(w,$,x){(function(w){var E=void 0!==w&&w||"undefined"!=typeof self&&self||window,C=Function.prototype.apply;function Timeout(w,$){this._id=w,this._clearFn=$}$.setTimeout=function(){return new Timeout(C.call(setTimeout,E,arguments),clearTimeout)},$.setInterval=function(){return new Timeout(C.call(setInterval,E,arguments),clearInterval)},$.clearTimeout=$.clearInterval=function(w){w&&w.close()},Timeout.prototype.unref=Timeout.prototype.ref=function(){},Timeout.prototype.close=function(){this._clearFn.call(E,this._id)},$.enroll=function(w,$){clearTimeout(w._idleTimeoutId),w._idleTimeout=$},$.unenroll=function(w){clearTimeout(w._idleTimeoutId),w._idleTimeout=-1},$._unrefActive=$.active=function(w){clearTimeout(w._idleTimeoutId);var $=w._idleTimeout;$>=0&&(w._idleTimeoutId=setTimeout((function onTimeout(){w._onTimeout&&w._onTimeout()}),$))},x(186),$.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==w&&w.setImmediate||this&&this.setImmediate,$.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==w&&w.clearImmediate||this&&this.clearImmediate}).call(this,x(46))},function(w,$,x){(function(w,$){!function(w,x){"use strict";if(!w.setImmediate){var E,C=1,k={},I=!1,R=w.document,D=Object.getPrototypeOf&&Object.getPrototypeOf(w);D=D&&D.setTimeout?D:w,"[object process]"==={}.toString.call(w.process)?function installNextTickImplementation(){E=function(w){$.nextTick((function(){runIfPresent(w)}))}}():!function canUsePostMessage(){if(w.postMessage&&!w.importScripts){var $=!0,x=w.onmessage;return w.onmessage=function(){$=!1},w.postMessage("","*"),w.onmessage=x,$}}()?w.MessageChannel?function installMessageChannelImplementation(){var w=new MessageChannel;w.port1.onmessage=function(w){runIfPresent(w.data)},E=function($){w.port2.postMessage($)}}():R&&"onreadystatechange"in R.createElement("script")?function installReadyStateChangeImplementation(){var w=R.documentElement;E=function($){var x=R.createElement("script");x.onreadystatechange=function(){runIfPresent($),x.onreadystatechange=null,w.removeChild(x),x=null},w.appendChild(x)}}():function installSetTimeoutImplementation(){E=function(w){setTimeout(runIfPresent,0,w)}}():function installPostMessageImplementation(){var $="setImmediate$"+Math.random()+"$",onGlobalMessage=function(x){x.source===w&&"string"==typeof x.data&&0===x.data.indexOf($)&&runIfPresent(+x.data.slice($.length))};w.addEventListener?w.addEventListener("message",onGlobalMessage,!1):w.attachEvent("onmessage",onGlobalMessage),E=function(x){w.postMessage($+x,"*")}}(),D.setImmediate=function setImmediate(w){"function"!=typeof w&&(w=new Function(""+w));for(var $=new Array(arguments.length-1),x=0;x<$.length;x++)$[x]=arguments[x+1];var I={callback:w,args:$};return k[C]=I,E(C),C++},D.clearImmediate=clearImmediate}function clearImmediate(w){delete k[w]}function runIfPresent(w){if(I)setTimeout(runIfPresent,0,w);else{var $=k[w];if($){I=!0;try{!function run(w){var $=w.callback,x=w.args;switch(x.length){case 0:$();break;case 1:$(x[0]);break;case 2:$(x[0],x[1]);break;case 3:$(x[0],x[1],x[2]);break;default:$.apply(void 0,x)}}($)}finally{clearImmediate(w),I=!1}}}}}("undefined"==typeof self?void 0===w?this:w:self)}).call(this,x(46),x(44))},function(w,$,x){(function($){function config(w){try{if(!$.localStorage)return!1}catch(w){return!1}var x=$.localStorage[w];return null!=x&&"true"===String(x).toLowerCase()}w.exports=function deprecate(w,$){if(config("noDeprecation"))return w;var x=!1;return function deprecated(){if(!x){if(config("throwDeprecation"))throw new Error($);config("traceDeprecation")?console.trace($):console.warn($),x=!0}return w.apply(this,arguments)}}}).call(this,x(46))},function(w,$,x){var E=x(74),C=E.Buffer;function copyProps(w,$){for(var x in w)$[x]=w[x]}function SafeBuffer(w,$,x){return C(w,$,x)}C.from&&C.alloc&&C.allocUnsafe&&C.allocUnsafeSlow?w.exports=E:(copyProps(E,$),$.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(C.prototype),copyProps(C,SafeBuffer),SafeBuffer.from=function(w,$,x){if("number"==typeof w)throw new TypeError("Argument must not be a number");return C(w,$,x)},SafeBuffer.alloc=function(w,$,x){if("number"!=typeof w)throw new TypeError("Argument must be a number");var E=C(w);return void 0!==$?"string"==typeof x?E.fill($,x):E.fill($):E.fill(0),E},SafeBuffer.allocUnsafe=function(w){if("number"!=typeof w)throw new TypeError("Argument must be a number");return C(w)},SafeBuffer.allocUnsafeSlow=function(w){if("number"!=typeof w)throw new TypeError("Argument must be a number");return E.SlowBuffer(w)}},function(w,$,x){"use strict";w.exports=PassThrough;var E=x(113),C=Object.create(x(54));function PassThrough(w){if(!(this instanceof PassThrough))return new PassThrough(w);E.call(this,w)}C.inherits=x(53),C.inherits(PassThrough,E),PassThrough.prototype._transform=function(w,$,x){x(null,w)}},function(w,$,x){w.exports=x(97)},function(w,$,x){w.exports=x(47)},function(w,$,x){w.exports=x(95).Transform},function(w,$,x){w.exports=x(95).PassThrough},function(w,$,x){(function(w){var E=x(108),C=x(75);function jsSprintf(w){var $,x,k,I,R,D,W,V,G,K,J,ie=["([^%]*)","%","(['\\-+ #0]*?)","([1-9]\\d*)?","(\\.([1-9]\\d*))?","[lhjztL]*?","([diouxXfFeEgGaAcCsSp%jr])"].join(""),oe=new RegExp(ie),ue=Array.prototype.slice.call(arguments,1),ae=w,se="",de=1,le=0;for(E.equal("string",typeof ae,"first argument must be a format string");null!==(G=oe.exec(ae));)if(se+=G[1],ae=ae.substring(G[0].length),J=G[0].substring(G[1].length),K=le+G[1].length+1,le+=G[0].length,$=G[2]||"",x=G[3]||0,k=G[4]||"",R=!1,W=!1,D=" ","%"!=(I=G[6])){if(0===ue.length)throw jsError(w,K,J,"has no matching argument (too few arguments passed)");if(V=ue.shift(),de++,$.match(/[\' #]/))throw jsError(w,K,J,"uses unsupported flags");if(k.length>0)throw jsError(w,K,J,"uses non-zero precision (not supported)");switch($.match(/-/)&&(R=!0),$.match(/0/)&&(D="0"),$.match(/\+/)&&(W=!0),I){case"s":if(null==V)throw jsError(w,K,J,"attempted to print undefined or null as a string (argument "+de+" to sprintf)");se+=doPad(D,x,R,V.toString());break;case"d":V=Math.floor(V);case"f":se+=(W=W&&V>0?"+":"")+doPad(D,x,R,V.toString());break;case"x":se+=doPad(D,x,R,V.toString(16));break;case"j":0===x&&(x=10),se+=C.inspect(V,!1,x);break;case"r":se+=dumpException(V);break;default:throw jsError(w,K,J,"is not supported")}}else se+="%";return se+=ae}function jsError(w,$,x,C){return E.equal(typeof w,"string"),E.equal(typeof x,"string"),E.equal(typeof $,"number"),E.equal(typeof C,"string"),new Error('format string "'+w+'": conversion specifier "'+x+'" at character '+$+" "+C)}function jsFprintf(w){var $=Array.prototype.slice.call(arguments,1);return w.write(jsSprintf.apply(this,$))}function doPad(w,$,x,E){for(var C=E;C.length<$;)x?C+=w:C=w+C;return C}function dumpException(w){var $;if(!(w instanceof Error))throw new Error(jsSprintf("invalid type for %%r: %j",w));if($="EXCEPTION: "+w.constructor.name+": "+w.stack,w.cause&&"function"==typeof w.cause){var x=w.cause();x&&($+="\nCaused by: "+dumpException(x))}return $}$.sprintf=jsSprintf,$.printf=function jsPrintf(){var $=Array.prototype.slice.call(arguments);$.unshift(w.stdout),jsFprintf.apply(null,$)},$.fprintf=jsFprintf}).call(this,x(44))},function(w,$,x){"use strict";$.__esModule=!0;var E=x(1);$.default=function positionalArraySorter(w,$,x){var C,k,I,R,D,W,V,G,K,J,ie,oe,ue,ae;void 0===$&&($="position"),void 0===x&&(x="key");var se="string"==typeof $?function(w){return w[$]}:$,de={},le={},pe={},he={},ve={},ge={};w.forEach((function(w,$){var E=w[x]?w[x]:String($);de[E]=$;var C=se(w),k=String(C||$),I=!1;if(k.startsWith("start")){var R=(D=k.match(/start\s+(\d+)/))&&D[1]?Number(D[1]):0;pe[R]||(pe[R]=[]),pe[R].push(E)}else if(k.startsWith("end")){var D;R=(D=k.match(/end\s+(\d+)/))&&D[1]?Number(D[1]):0;he[R]||(he[R]=[]),he[R].push(E)}else if(k.startsWith("before")){if(V=k.match(/before\s+(\S+)(\s+(\d+))?/)){var W=V[1];R=V[3]?Number(V[3]):0;ve[W]||(ve[W]={}),ve[W][R]||(ve[W][R]=[]),ve[W][R].push(E)}else I=!0}else if(k.startsWith("after")){var V;if(V=k.match(/after\s+(\S+)(\s+(\d+))?/)){W=V[1],R=V[3]?Number(V[3]):0;ge[W]||(ge[W]={}),ge[W][R]||(ge[W][R]=[]),ge[W][R].push(E)}else I=!0}else I=!0;if(I){var G=parseFloat(k);!isNaN(G)&&isFinite(G)||(G=$),le[G]||(le[G]=[]),le[G].push(E)}}));var Se=[],we=[],Ce=[],Pe=[],Ie=function sortedWeights(w,$){var x=Object.keys(w).map((function(w){return Number(w)})).sort((function(w,$){return w-$}));return $?x:x.reverse()},Fe=function addToResults(w,$){w.forEach((function(w){var x,C,k,I;if(!(Pe.indexOf(w)>=0)){if(Pe.push(w),ve[w]){var R=Ie(ve[w],!0);try{for(var D=E.__values(R),W=D.next();!W.done;W=D.next()){var V=W.value;addToResults(ve[w][V],$)}}catch(w){x={error:w}}finally{try{W&&!W.done&&(C=D.return)&&C.call(D)}finally{if(x)throw x.error}}}if($.push(w),ge[w]){var G=Ie(ge[w],!1);try{for(var K=E.__values(G),J=K.next();!J.done;J=K.next()){V=J.value;addToResults(ge[w][V],$)}}catch(w){k={error:w}}finally{try{J&&!J.done&&(I=K.return)&&I.call(K)}finally{if(k)throw k.error}}}}}))};try{for(var Re=E.__values(Ie(pe,!1)),Le=Re.next();!Le.done;Le=Re.next()){var De=Le.value;Fe(pe[De],Se)}}catch(w){C={error:w}}finally{try{Le&&!Le.done&&(k=Re.return)&&k.call(Re)}finally{if(C)throw C.error}}try{for(var Ue=E.__values(Ie(le,!0)),ze=Ue.next();!ze.done;ze=Ue.next()){De=ze.value;Fe(le[De],we)}}catch(w){I={error:w}}finally{try{ze&&!ze.done&&(R=Ue.return)&&R.call(Ue)}finally{if(I)throw I.error}}try{for(var He=E.__values(Ie(he,!0)),Ke=He.next();!Ke.done;Ke=He.next()){De=Ke.value;Fe(he[De],Ce)}}catch(w){D={error:w}}finally{try{Ke&&!Ke.done&&(W=He.return)&&W.call(He)}finally{if(D)throw D.error}}try{for(var Ze=E.__values(Object.keys(ve)),Qe=Ze.next();!Qe.done;Qe=Ze.next()){var et=Qe.value;if(!(Pe.indexOf(et)>=0))try{for(var tt=(K=void 0,E.__values(Ie(ve[et],!1))),rt=tt.next();!rt.done;rt=tt.next()){De=rt.value;Fe(ve[et][De],Se)}}catch(w){K={error:w}}finally{try{rt&&!rt.done&&(J=tt.return)&&J.call(tt)}finally{if(K)throw K.error}}}}catch(w){V={error:w}}finally{try{Qe&&!Qe.done&&(G=Ze.return)&&G.call(Ze)}finally{if(V)throw V.error}}try{for(var nt=E.__values(Object.keys(ge)),it=nt.next();!it.done;it=nt.next()){et=it.value;if(!(Pe.indexOf(et)>=0))try{for(var ot=(ue=void 0,E.__values(Ie(ge[et],!1))),ut=ot.next();!ut.done;ut=ot.next()){De=ut.value;Fe(ge[et][De],we)}}catch(w){ue={error:w}}finally{try{ut&&!ut.done&&(ae=ot.return)&&ae.call(ot)}finally{if(ue)throw ue.error}}}}catch(w){ie={error:w}}finally{try{it&&!it.done&&(oe=nt.return)&&oe.call(nt)}finally{if(ie)throw ie.error}}return E.__spread(Se,we,Ce).map((function(w){return de[w]})).map((function($){return w[$]}))}},function(w,$,x){"use strict";var __assign=function(){return(__assign=Object.assign||function(w){for(var $,x=1,E=arguments.length;x0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.useEditorTransactions=$.useEditorState=$.EditorContext=$.createEditor=$.editorReducer=void 0;var k=__importStar(x(0)),I=x(115),R=x(249),D=x(247),W=__importStar(x(197)),V={enabledLinkOptions:[],editorOptions:{},isOpen:!1,initialValue:null};function editorReducer(w,$){switch(void 0===w&&(w=V),$.type){case I.getType(W.EditorWasOpened):return __assign(__assign({},$.payload),{isOpen:!0});case I.getType(W.EditorWasDismissed):case I.getType(W.ValueWasUnset):case I.getType(W.ValueWasApplied):return V;default:return w}}function createEditor(){var w=new R.Subject,$=function dispatch($){return w.next($)},x=new R.BehaviorSubject(V);w.pipe(D.scan(editorReducer,V),D.shareReplay(1)).subscribe(x);return{state$:x,tx:{dismiss:function dismiss(){return $(W.EditorWasDismissed())},unset:function unset(){return $(W.ValueWasUnset())},apply:function apply(w){return $(W.ValueWasApplied(w))},editLink:function editLink(x,E,C){return void 0===E&&(E=[]),void 0===C&&(C={}),new Promise((function(k){$(W.EditorWasOpened(x,E,C)),w.subscribe((function(w){switch(w.type){case I.getType(W.EditorWasDismissed):return k({change:!1});case I.getType(W.ValueWasUnset):return k({change:!0,value:null});case I.getType(W.ValueWasApplied):return k({change:!0,value:w.payload});default:return}}))}))}},initialState:V}}$.editorReducer=editorReducer,$.createEditor=createEditor,$.EditorContext=k.createContext(createEditor()),$.useEditorState=function useEditorState(){var w=k.useContext($.EditorContext).state$,x=__read(k.useState(w.getValue()),2),E=x[0],C=x[1];return k.useEffect((function(){var $=w.subscribe(C);return function(){return $.unsubscribe()}}),[w]),E},$.useEditorTransactions=function useEditorTransactions(){return k.useContext($.EditorContext).tx}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.ValueWasApplied=$.ValueWasUnset=$.EditorWasDismissed=$.EditorWasOpened=void 0;var E=x(115);$.EditorWasOpened=E.createAction("http://sitegeist.de/Sitegeist.Archaeopteryx/EditorWasOpened",(function(w,$,x){return void 0===x&&(x={}),{initialValue:w,enabledLinkOptions:$,editorOptions:x}}))(),$.EditorWasDismissed=E.createAction("http://sitegeist.de/Sitegeist.Archaeopteryx/EditorWasDismissed")(),$.ValueWasUnset=E.createAction("http://sitegeist.de/Sitegeist.Archaeopteryx/ValueWasUnset")(),$.ValueWasApplied=E.createAction("http://sitegeist.de/Sitegeist.Archaeopteryx/ValueWasApplied",(function(w){return w}))()},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.IconCard=void 0;var k,I,R=__importStar(x(0)),D=__importDefault(x(17)),W=x(16),V=x(116),G=x(199),K=D.default.div(k||(k=__makeTemplateObject(["\n display: grid;\n grid-gap: 8px;\n grid-template-columns: 20px 1fr;\n grid-template-rows: repeat(2, 1fr);\n background-color: #141414;\n padding: 8px 16px;\n min-height: 50px;\n"],["\n display: grid;\n grid-gap: 8px;\n grid-template-columns: 20px 1fr;\n grid-template-rows: repeat(2, 1fr);\n background-color: #141414;\n padding: 8px 16px;\n min-height: 50px;\n"]))),J=D.default.span(I||(I=__makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n grid-column: 1 / span 1;\n grid-row: 1 / span ",";\n"],["\n display: flex;\n justify-content: center;\n align-items: center;\n grid-column: 1 / span 1;\n grid-row: 1 / span ",";\n"])),(function(w){return w.span}));$.IconCard=function IconCard(w){return R.createElement(K,null,R.createElement(J,{span:w.subTitle?1:2},R.createElement(W.Icon,{icon:w.icon})),R.createElement(V.CardTitle,{span:w.subTitle?1:2},w.title),R.createElement(G.CardSubTitle,null,w.subTitle))}},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.CardSubTitle=void 0;var k,I=__importStar(x(0)),R=__importDefault(x(17)),D=x(117),W=R.default.span(k||(k=__makeTemplateObject(["\n display: flex;\n align-items: center;\n line-height: 1;\n font-size: 12px;\n color: #999;\n grid-column: 1 / span 2;\n grid-row: 2 / span 1;\n min-width: 0;\n"],["\n display: flex;\n align-items: center;\n line-height: 1;\n font-size: 12px;\n color: #999;\n grid-column: 1 / span 2;\n grid-row: 2 / span 1;\n min-width: 0;\n"])));$.CardSubTitle=function CardSubTitle(w){return I.createElement(W,null,I.createElement(D.Ellipsis,null,w.children))}},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.ImageCard=void 0;var k,I,R=__importStar(x(0)),D=__importDefault(x(17)),W=x(116),V=D.default.div(k||(k=__makeTemplateObject(["\n display: grid;\n grid-gap: 8px;\n grid-template-columns: 75px 1fr;\n background-color: #141414;\n padding: 0 16px 0 0;\n"],["\n display: grid;\n grid-gap: 8px;\n grid-template-columns: 75px 1fr;\n background-color: #141414;\n padding: 0 16px 0 0;\n"]))),G=D.default.img(I||(I=__makeTemplateObject(["\n display: block;\n grid-column: 1 / span 1;\n width: 100%;\n height: 56px;\n object-fit: contain;\n background-color: #fff;\n background-size: 10px 10px;\n background-position: 0 0, 25px 25px;\n background-image: linear-gradient(45deg, #cccccc 25%, transparent 25%, transparent 75%, #cccccc 75%, #cccccc), linear-gradient(45deg, #cccccc 25%, transparent 25%, transparent 75%, #cccccc 75%, #cccccc);\n"],["\n display: block;\n grid-column: 1 / span 1;\n width: 100%;\n height: 56px;\n object-fit: contain;\n background-color: #fff;\n background-size: 10px 10px;\n background-position: 0 0, 25px 25px;\n background-image: linear-gradient(45deg, #cccccc 25%, transparent 25%, transparent 75%, #cccccc 75%, #cccccc), linear-gradient(45deg, #cccccc 25%, transparent 25%, transparent 75%, #cccccc 75%, #cccccc);\n"])));$.ImageCard=function ImageCard(w){return R.createElement(V,null,R.createElement(G,{src:w.src}),R.createElement(W.CardTitle,{span:1},w.label))}},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.Tabs=void 0;var k,I,R,D,W,V,G,K=__importStar(x(0)),J=__importStar(x(17)),ie=J.default.ul(k||(k=__makeTemplateObject(["\n display: flex;\n margin: 0 0 -1px 0;\n padding: 0;\n list-style-type: none;\n\n > * + * {\n margin-left: -1px;\n }\n"],["\n display: flex;\n margin: 0 0 -1px 0;\n padding: 0;\n list-style-type: none;\n\n > * + * {\n margin-left: -1px;\n }\n"]))),oe=J.default.button(V||(V=__makeTemplateObject(["\n height: 40px;\n ","\n ","\n border-right: 1px solid #3f3f3f;\n border-left: 1px solid #3f3f3f;\n color: #FFF;\n background-color: #222;\n line-height: 40px;\n padding: 0 16px;\n cursor: pointer;\n"],["\n height: 40px;\n ","\n ","\n border-right: 1px solid #3f3f3f;\n border-left: 1px solid #3f3f3f;\n color: #FFF;\n background-color: #222;\n line-height: 40px;\n padding: 0 16px;\n cursor: pointer;\n"])),(function(w){return w.isActive?J.css(I||(I=__makeTemplateObject(["border-top: 2px solid #00adee;"],["border-top: 2px solid #00adee;"]))):J.css(R||(R=__makeTemplateObject(["border-top: 1px solid #3f3f3f;"],["border-top: 1px solid #3f3f3f;"])))}),(function(w){return w.isActive?J.css(D||(D=__makeTemplateObject(["border-bottom: 1px solid #222;"],["border-bottom: 1px solid #222;"]))):J.css(W||(W=__makeTemplateObject(["border-bottom: 1px solid #3f3f3f;"],["border-bottom: 1px solid #3f3f3f;"])))})),ue=J.default.div(G||(G=__makeTemplateObject(["\n padding: 16px;\n background-color: #222;\n border: 1px solid #3f3f3f;\n"],["\n padding: 16px;\n background-color: #222;\n border: 1px solid #3f3f3f;\n"])));$.Tabs=function Tabs(w){if(w.from.length<1)throw new Error("[Sitegeist.Archaeopteryx]: Tabs must have at least one item!");var $=K.createElement("header",null,K.createElement("nav",null,K.createElement(ie,null,w.from.map((function($){return K.createElement("li",{key:w.getKey($)},K.createElement(oe,{type:"button",isActive:w.getKey($)===w.activeItemKey,onClick:function onClick(){w.onSwitchTab&&w.onSwitchTab(w.getKey($))}},w.renderHeader($)))}))))),x=w.lazy?K.createElement("div",null,w.from.filter((function($){return w.getKey($)===w.activeItemKey})).map((function($){return K.createElement(ue,{key:w.getKey($)},w.renderPanel($))}))):K.createElement("div",null,w.from.map((function($){return K.createElement(ue,{key:w.getKey($),hidden:w.getKey($)!==w.activeItemKey},w.renderPanel($))})));return K.createElement("div",null,$,x)}},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.Form=void 0;var k,I,R,D=__importStar(x(0)),W=__importDefault(x(17)),V=W.default.form(k||(k=__makeTemplateObject(["\n > * + * {\n margin-top: 16px;\n }\n"],["\n > * + * {\n margin-top: 16px;\n }\n"]))),G=W.default.div(I||(I=__makeTemplateObject(["\n padding: 0 16px;\n"],["\n padding: 0 16px;\n"]))),K=W.default.div(R||(R=__makeTemplateObject(["\n display: flex;\n justify-content: flex-end;\n"],["\n display: flex;\n justify-content: flex-end;\n"])));$.Form=function Form(w){return D.createElement(V,{onSubmit:w.onSubmit},D.createElement(G,null,w.renderBody()),D.createElement(K,null,w.renderActions()))}},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.Modal=void 0;var k,I=__importStar(x(0)),R=__importStar(x(204)),D=__importDefault(x(17)),W=x(16),V=D.default(W.Dialog)(k||(k=__makeTemplateObject(['\n [class*="_dialog__contentsPosition "],\n [class$="_dialog__contentsPosition"] {\n top: 50%;\n transform: translateY(-50%)translateX(-50%)scale(1);\n }\n [class*="_dialog__contents "],\n [class$="_dialog__contents"] {\n width: auto;\n max-width: calc(100vw - 40px * 2);\n }\n [class*="_dialog__body "],\n [class$="_dialog__body"] {\n max-height: 80vh;\n }\n'],['\n [class*="_dialog__contentsPosition "],\n [class$="_dialog__contentsPosition"] {\n top: 50%;\n transform: translateY(-50%)translateX(-50%)scale(1);\n }\n [class*="_dialog__contents "],\n [class$="_dialog__contents"] {\n width: auto;\n max-width: calc(100vw - 40px * 2);\n }\n [class*="_dialog__body "],\n [class$="_dialog__body"] {\n max-height: 80vh;\n }\n'])));$.Modal=function Modal(w){return R.createPortal(I.createElement(V,{isOpen:!0,title:w.renderTitle(),onRequestClose:function onRequestClose(){},preventClosing:!0},w.renderBody()),document.body)}},function(w,$,x){"use strict";var E=function _interopRequireDefault(w){return w&&w.__esModule?w:{default:w}}(x(52));w.exports=(0,E.default)("vendor")().ReactDOM},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.Deletable=void 0;var k,I,R=__importStar(x(0)),D=__importDefault(x(17)),W=x(16),V=D.default.div(k||(k=__makeTemplateObject(["\n display: grid;\n grid-template-columns: 1fr 40px;\n justify-content: stretch;\n border: 1px solid #3f3f3f;\n max-width: 420px;\n"],["\n display: grid;\n grid-template-columns: 1fr 40px;\n justify-content: stretch;\n border: 1px solid #3f3f3f;\n max-width: 420px;\n"]))),G=D.default(W.IconButton)(I||(I=__makeTemplateObject(["\n height: 100%;\n"],["\n height: 100%;\n"])));$.Deletable=function Deletable(w){return R.createElement(V,null,R.createElement("div",null,w.children),R.createElement(G,{icon:"trash",hoverStyle:"error",onClick:w.onDelete}))}},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.IconLabel=void 0;var k,I=__importStar(x(0)),R=__importDefault(x(17)),D=x(16),W=R.default.div(k||(k=__makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 8px;\n"],["\n display: flex;\n align-items: center;\n gap: 8px;\n"])));$.IconLabel=function IconLabel(w){return I.createElement(W,null,I.createElement(D.Icon,{icon:w.icon}),w.children)}},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.Columns=$.Stack=$.Container=void 0;var E,C,k,I=__importDefault(x(17));$.Container=I.default.div(E||(E=__makeTemplateObject(["\n padding: 16px;\n"],["\n padding: 16px;\n"]))),$.Stack=I.default.div(C||(C=__makeTemplateObject(["\n > * + * {\n margin-top: 16px;\n }\n"],["\n > * + * {\n margin-top: 16px;\n }\n"]))),$.Columns=I.default.div(k||(k=__makeTemplateObject(["\n display: grid;\n gap: 16px;\n grid-template-columns: repeat(auto-fill, minmax(max(160px, calc(50% - 8px)), calc(33.3333% - 8px)));\n min-width: 600px;\n"],["\n display: grid;\n gap: 16px;\n grid-template-columns: repeat(auto-fill, minmax(max(160px, calc(50% - 8px)), calc(33.3333% - 8px)));\n min-width: 600px;\n"])))},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.Node=void 0;var E=x(209);Object.defineProperty($,"Node",{enumerable:!0,get:function get(){return E.Node}})},function(w,$,x){"use strict";var __awaiter=function(w,$,x,E){return new(x||(x=Promise))((function(C,k){function fulfilled(w){try{step(E.next(w))}catch(w){k(w)}}function rejected(w){try{step(E.throw(w))}catch(w){k(w)}}function step(w){w.done?C(w.value):function adopt(w){return w instanceof x?w:new x((function($){$(w)}))}(w.value).then(fulfilled,rejected)}step((E=E.apply(w,$||[])).next())}))},__generator=function(w,$){var x,E,C,k,I={label:0,sent:function sent(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return k={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k;function verb(k){return function(R){return function step(k){if(x)throw new TypeError("Generator is already executing.");for(;I;)try{if(x=1,E&&(C=2&k[0]?E.return:k[0]?E.throw||((C=E.return)&&C.call(E),0):E.next)&&!(C=C.call(E,k[1])).done)return C;switch(E=0,C&&(k=[2&k[0],C.value]),k[0]){case 0:case 1:C=k;break;case 4:return I.label++,{value:k[1],done:!1};case 5:I.label++,E=k[1],k=[0];continue;case 7:k=I.ops.pop(),I.trys.pop();continue;default:if(!(C=I.trys,(C=C.length>0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1] ");return E.default.createElement(D.IconCard,{icon:null!==(I=null===(x=ie.value)||void 0===x?void 0:x.icon)&&void 0!==I?I:"ban",title:null!==(W=null===(R=ie.value)||void 0===R?void 0:R.label)&&void 0!==W?W:"["+G("Sitegeist.Archaeopteryx:LinkTypes.Node:labelOfNonExistingNode")+"]",subTitle:null!=oe?oe:"node://"+w.nodeId})};$.Node=R.makeLinkType("Sitegeist.Archaeopteryx:Node",(function(w){var $=w.createError;return{supportedLinkOptions:["anchor","title","targetBlank","relNofollow"],isSuitableFor:function isSuitableFor(w){return w.href.startsWith("node://")},useResolvedModel:function useResolvedModel(w){var x=/node:\/\/(.*)/.exec(w.href);if(!x)throw $('Cannot handle href "'+w.href+'".');var E=x[1];return W.Process.success({nodeId:E})},convertModelToLink:function convertModelToLink(w){return{href:"node://"+w.nodeId}},TabHeader:function TabHeader(){var w=k.useI18n();return E.default.createElement(D.IconLabel,{icon:"file"},w("Sitegeist.Archaeopteryx:LinkTypes.Node:title"))},Preview:function Preview(w){return E.default.createElement(G,{nodeId:w.model.nodeId})},Editor:function Editor(w){var x,C,R,D=w.model,V=w.options,G=k.useI18n(),K=k.usePersonalWorkspaceName(),J=k.useDimensionValues(),ie=k.useSiteNodeContextPath(),oe=null!==(x=k.useConfiguration((function(w){var $;return null===($=w.nodeTree)||void 0===$?void 0:$.loadingDepth})))&&void 0!==x?x:4,ue=null!==(C=k.useSelector((function(w){var $,x;return null===(x=null===($=w.ui)||void 0===$?void 0:$.pageTree)||void 0===x?void 0:x.query})))&&void 0!==C?C:"",ae=null!==(R=k.useSelector((function(w){var $,x;return null===(x=null===($=w.ui)||void 0===$?void 0:$.pageTree)||void 0===x?void 0:x.filterNodeType})))&&void 0!==R?R:"",se=E.default.useMemo((function(){var w;return null!==(w=V.startingPoint)&&void 0!==w?w:null==ie?void 0:ie.path}),[V.startingPoint,ie]);if(se){if(K){if(J)return E.default.createElement(W.Field,{name:"nodeId",initialValue:null==D?void 0:D.nodeId,validate:function validate(w){if(!w)return G("Sitegeist.Archaeopteryx:LinkTypes.Node:node.validation.required")}},(function(w){var $,x,C,k=w.input;return E.default.createElement(I.Tree,{initialSearchTerm:ue,workspaceName:K,dimensionValues:J,startingPoint:se,loadingDepth:null!==($=V.loadingDepth)&&void 0!==$?$:oe,baseNodeTypeFilter:null!==(x=V.baseNodeType)&&void 0!==x?x:"Neos.Neos:Document",initialNarrowNodeTypeFilter:ae,linkableNodeTypes:V.allowedNodeTypes,selectedTreeNodeId:null!==(C=k.value)&&void 0!==C?C:void 0,options:{enableSearch:!0,enableNodeTypeFilter:!0},onSelect:function onSelect(w){k.onChange(w)}})}));throw $("Could not load node tree, because dimensionValues could not be determined.")}throw $("Could not load node tree, because workspaceName could not be determined.")}throw $("Could not load node tree, because startingPoint could not be determined.")}}}))},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.Tree=void 0;var E=x(211);Object.defineProperty($,"Tree",{enumerable:!0,get:function get(){return E.Tree}})},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.Tree=void 0;var E=x(212);Object.defineProperty($,"Tree",{enumerable:!0,get:function get(){return E.Tree}})},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__awaiter=function(w,$,x,E){return new(x||(x=Promise))((function(C,k){function fulfilled(w){try{step(E.next(w))}catch(w){k(w)}}function rejected(w){try{step(E.throw(w))}catch(w){k(w)}}function step(w){w.done?C(w.value):function adopt(w){return w instanceof x?w:new x((function($){$(w)}))}(w.value).then(fulfilled,rejected)}step((E=E.apply(w,$||[])).next())}))},__generator=function(w,$){var x,E,C,k,I={label:0,sent:function sent(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return k={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k;function verb(k){return function(R){return function step(k){if(x)throw new TypeError("Generator is already executing.");for(;I;)try{if(x=1,E&&(C=2&k[0]?E.return:k[0]?E.throw||((C=E.return)&&C.call(E),0):E.next)&&!(C=C.call(E,k[1])).done)return C;switch(E=0,C&&(k=[2&k[0],C.value]),k[0]){case 0:case 1:C=k;break;case 4:return I.label++,{value:k[1],done:!1};case 5:I.label++,E=k[1],k=[0];continue;case 7:k=I.ops.pop(),I.trys.pop();continue;default:if(!(C=I.trys,(C=C.length>0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.Tree=void 0;var k=__importStar(x(0)),I=x(55),R=x(73),D=x(16),W=x(78),V=x(220),G=x(224),K=x(227),J=x(98);$.Tree=function Tree(w){var $,x,E,C,ie,oe,ue=__read(k.useState(null!==($=w.initialSearchTerm)&&void 0!==$?$:""),2),ae=ue[0],se=ue[1],de=__read(k.useState(null!==(x=w.initialNarrowNodeTypeFilter)&&void 0!==x?x:""),2),le=de[0],pe=de[1],he=I.useAsync((function(){return __awaiter(void 0,void 0,void 0,(function(){var $;return __generator(this,(function(x){switch(x.label){case 0:return[4,J.getTree({workspaceName:w.workspaceName,dimensionValues:w.dimensionValues,startingPoint:w.startingPoint,loadingDepth:w.loadingDepth,baseNodeTypeFilter:w.baseNodeTypeFilter,linkableNodeTypes:w.linkableNodeTypes,selectedNodeId:w.selectedTreeNodeId,narrowNodeTypeFilter:le,searchTerm:ae})];case 1:if("success"in($=x.sent()))return[2,$.success];if("error"in $)throw new R.VError($.error.message);throw new R.VError("Something went wrong while fetching the tree.")}}))}))}),[w.workspaceName,w.dimensionValues,w.startingPoint,w.loadingDepth,w.baseNodeTypeFilter,w.linkableNodeTypes,le,ae]),ve=k.useCallback((function($){w.onSelect($)}),[]),ge=k.useCallback((function(w){se(w)}),[]),Se=k.useCallback((function(w){pe(w)}),[]);if(he.error)throw new R.VError(W.decodeError(he.error),"NodeTree could not be loaded.");oe=he.loading||!he.value?k.createElement("div",null,"Loading..."):k.createElement(D.Tree,null,k.createElement(V.TreeNode,{workspaceName:w.workspaceName,dimensionValues:w.dimensionValues,baseNodeTypeFilter:w.baseNodeTypeFilter,treeNode:he.value.root,selectedTreeNodeId:w.selectedTreeNodeId,level:1,onClick:ve}));var we=null;(null===(E=w.options)||void 0===E?void 0:E.enableSearch)&&(we=k.createElement(G.Search,{initialValue:null!==(C=w.initialSearchTerm)&&void 0!==C?C:"",onChange:ge}));var Ce=null;return(null===(ie=w.options)||void 0===ie?void 0:ie.enableNodeTypeFilter)&&(Ce=k.createElement(K.SelectNodeTypeFilter,{baseNodeTypeFilter:w.baseNodeTypeFilter,value:le,onChange:Se})),k.createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",backgroundColor:"#141414",border:"1px solid #3f3f3f"}},we?k.createElement("div",{style:{gridColumn:Ce?"1 / span 1":"1 / span 2"}},we):null,Ce?k.createElement("div",{style:{gridColumn:we?"2 / span 1":"1 / span 2"}},Ce):null,oe?k.createElement("div",{style:{marginTop:"-5px",borderTop:"1px solid #3f3f3f",gridColumn:"1 / span 2",height:"50vh",maxHeight:"300px",overflowY:"auto"}},oe):null)}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.decodeError=$.ErrorBoundary=void 0;var E=x(214);Object.defineProperty($,"ErrorBoundary",{enumerable:!0,get:function get(){return E.ErrorBoundary}});var C=x(219);Object.defineProperty($,"decodeError",{enumerable:!0,get:function get(){return C.decodeError}})},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.ErrorBoundary=void 0;var k=__importStar(x(0)),I=x(215),R=x(73),D=x(216),W=function ErrorFallback(w){var $=Boolean(document.querySelector('[data-env^="Development"]'));return k.createElement(D.Alert,{title:""+w.error.name},k.createElement("div",null,w.error.message),w.error instanceof R.VError?k.createElement(V,{error:w.error,level:0}):null,$?k.createElement(D.Trace,{title:"Stacktrace"},w.error.stack):null)},V=function RecursiveCauseChain(w){return w.error?k.createElement(D.Trace,{title:"Cause: "+w.error.name},w.error.message,w.error instanceof R.VError&&w.level<10?k.createElement(RecursiveCauseChain,{error:w.error.cause(),level:w.level+1}):null):null};function logError(w,$){console.warn("[Sitegeist.Archaeopteryx::"+w.name+"]: An error occurred."),console.error("[Sitegeist.Archaeopteryx::"+w.name+"]: ",w),console.error("[Sitegeist.Archaeopteryx::"+w.name+"]: Component Stack:",$.componentStack)}$.ErrorBoundary=function ErrorBoundary(w){return k.createElement(I.ErrorBoundary,{fallbackRender:W,onError:logError},w.children)}},function(w,$,x){!function(w,$){"use strict";function _interopNamespace(w){if(w&&w.__esModule)return w;var $=Object.create(null);return w&&Object.keys(w).forEach((function(x){if("default"!==x){var E=Object.getOwnPropertyDescriptor(w,x);Object.defineProperty($,x,E.get?E:{enumerable:!0,get:function(){return w[x]}})}})),$.default=w,Object.freeze($)}var x=_interopNamespace($);function _setPrototypeOf(w,$){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(w,$){return w.__proto__=$,w})(w,$)}var E={error:null},C=function(w){function ErrorBoundary(){for(var $,x=arguments.length,C=new Array(x),k=0;k * + * {\n margin-top: 8px;\n }\n"],["\n padding: 8px;\n background-color: #ff6a3c;\n color: #fff;\n\n > * + * {\n margin-top: 8px;\n }\n"]))),G=D.default.header(I||(I=__makeTemplateObject(["\n display: flex;\n gap: 8px;\n align-items: center;\n"],["\n display: flex;\n gap: 8px;\n align-items: center;\n"])));$.Alert=function Alert(w){return R.createElement(V,{role:"alert"},R.createElement(G,null,R.createElement(W.Icon,{icon:"exclamation-triangle"}),w.title),w.children)}},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.Trace=void 0;var k,I,R,D=__importStar(x(0)),W=__importDefault(x(17)),V=W.default.details(k||(k=__makeTemplateObject(["\n"],["\n"]))),G=W.default.summary(I||(I=__makeTemplateObject(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"]))),K=W.default.pre(R||(R=__makeTemplateObject(["\n height: 60vh;\n max-height: 600px;\n padding: 8px;\n margin: 0;\n overflow: scroll;\n background-color: #111;\n box-shadow: inset 5px 5px 5px #000;\n"],["\n height: 60vh;\n max-height: 600px;\n padding: 8px;\n margin: 0;\n overflow: scroll;\n background-color: #111;\n box-shadow: inset 5px 5px 5px #000;\n"])));$.Trace=function Trace(w){return D.createElement(V,null,D.createElement(G,null,w.title),D.createElement(K,null,w.children))}},function(w,$,x){"use strict";function decodeErrorMessage(w){var $;if(w.includes("")){var x=(new DOMParser).parseFromString(w,"text/html");return"["+x.title+"] "+(null===($=x.querySelector("h1"))||void 0===$?void 0:$.innerText)}return w}Object.defineProperty($,"__esModule",{value:!0}),$.decodeError=void 0,$.decodeError=function decodeError(w){return w instanceof Error?(w.message=decodeErrorMessage(w.message),w):new Error(decodeErrorMessage(w))}},function(w,$,x){"use strict";var __assign=function(){return(__assign=Object.assign||function(w){for(var $,x=1,E=arguments.length;x0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.TreeNode=void 0;var E=__importDefault(x(0)),C=x(16),k=x(98);$.TreeNode=function TreeNode(w){var x=w.selectedTreeNodeId===w.treeNode.nodeAggregateIdentifier,I=w.treeNode.children.length>0||w.treeNode.hasUnloadedChildren,R=__read(E.default.useState(w.treeNode.hasUnloadedChildren),2),D=R[0],W=R[1],V=__read(E.default.useState(!1),2),G=V[0],K=V[1],J=__read(E.default.useState(w.treeNode.children),2),ie=J[0],oe=J[1],ue=__read(E.default.useState(!1),2),ae=ue[0],se=ue[1],de=E.default.useMemo((function(){if(w.treeNode.hasScheduledDisabledState){var $=w.treeNode.isDisabled?"error":"primaryBlue";return E.default.createElement("span",{className:"fa-layers fa-fw"},E.default.createElement(C.Icon,{icon:w.treeNode.icon}),E.default.createElement(C.Icon,{icon:"circle",color:$,transform:"shrink-5 down-6 right-4"}),E.default.createElement(C.Icon,{icon:"clock",transform:"shrink-9 down-6 right-4"}))}return w.treeNode.isDisabled?E.default.createElement("span",{className:"fa-layers fa-fw"},E.default.createElement(C.Icon,{icon:w.treeNode.icon}),E.default.createElement(C.Icon,{icon:"circle",color:"error",transform:"shrink-3 down-6 right-4"}),E.default.createElement(C.Icon,{icon:"times",transform:"shrink-7 down-6 right-4"})):null}),[w.treeNode.hasScheduledDisabledState,w.treeNode.isDisabled,w.treeNode.icon]),le=E.default.useCallback((function(){return __awaiter(void 0,void 0,void 0,(function(){var $;return __generator(this,(function(x){switch(x.label){case 0:if(!D||!w.treeNode.hasUnloadedChildren||0!==ie.length)return[3,5];K(!0),x.label=1;case 1:return x.trys.push([1,3,,4]),[4,k.getChildrenForTreeNode({workspaceName:w.workspaceName,dimensionValues:w.dimensionValues,treeNodeId:w.treeNode.nodeAggregateIdentifier,nodeTypeFilter:w.baseNodeTypeFilter})];case 2:return"success"in($=x.sent())&&oe($.success.children),"error"in $&&se(!0),[3,4];case 3:return x.sent(),se(!0),[3,4];case 4:return K(!1),W(!1),[3,6];case 5:W((function(w){return!w})),x.label=6;case 6:return[2]}}))}))}),[w.workspaceName,w.dimensionValues,w.treeNode.nodeAggregateIdentifier,w.baseNodeTypeFilter,ie.length]),pe=E.default.useCallback((function(){w.treeNode.isMatchedByFilter&&w.treeNode.isLinkable&&w.onClick(w.treeNode.nodeAggregateIdentifier)}),[w.treeNode.isMatchedByFilter,w.treeNode.nodeAggregateIdentifier]);return E.default.createElement(C.Tree.Node,null,E.default.createElement(C.Tree.Node.Header,{labelIdentifier:"labelIdentifier",id:w.treeNode.nodeAggregateIdentifier,hasChildren:I,isLastChild:!0,isCollapsed:D,isActive:x,isFocused:x,isLoading:G,isDirty:!1,isHidden:w.treeNode.isDisabled,isHiddenInIndex:w.treeNode.isHiddenInMenu||!w.treeNode.isMatchedByFilter||!w.treeNode.isLinkable,isDragging:!1,hasError:ae,label:w.treeNode.label,icon:w.treeNode.isLinkable?w.treeNode.icon:"fas fa-unlink",customIconComponent:de,iconLabel:w.treeNode.nodeTypeLabel,level:w.level,onToggle:le,onClick:pe,dragForbidden:!0,title:w.treeNode.label}),D?null:ie.map((function(x){return E.default.createElement($.TreeNode,__assign({},w,{treeNode:x,level:w.level+1}))})))}},function(w,$,x){"use strict";var __awaiter=function(w,$,x,E){return new(x||(x=Promise))((function(C,k){function fulfilled(w){try{step(E.next(w))}catch(w){k(w)}}function rejected(w){try{step(E.throw(w))}catch(w){k(w)}}function step(w){w.done?C(w.value):function adopt(w){return w instanceof x?w:new x((function($){$(w)}))}(w.value).then(fulfilled,rejected)}step((E=E.apply(w,$||[])).next())}))},__generator=function(w,$){var x,E,C,k,I={label:0,sent:function sent(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return k={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k;function verb(k){return function(R){return function step(k){if(x)throw new TypeError("Generator is already executing.");for(;I;)try{if(x=1,E&&(C=2&k[0]?E.return:k[0]?E.throw||((C=E.return)&&C.call(E),0):E.next)&&!(C=C.call(E,k[1])).done)return C;switch(E=0,C&&(k=[2&k[0],C.value]),k[0]){case 0:case 1:C=k;break;case 4:return I.label++,{value:k[1],done:!1};case 5:I.label++,E=k[1],k=[0];continue;case 7:k=I.ops.pop(),I.trys.pop();continue;default:if(!(C=I.trys,(C=C.length>0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]=w.length&&(w=void 0),{value:w&&w[E++],done:!w}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=function(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.getChildrenForTreeNode=void 0;var E=x(12);$.getChildrenForTreeNode=function getChildrenForTreeNode(w){return __awaiter(this,void 0,void 0,(function(){var $,x,C,k,I,R,D,W,V,G,K,J,ie,oe,ue;return __generator(this,(function(ae){switch(ae.label){case 0:($=new URLSearchParams).set("workspaceName",w.workspaceName);try{for(x=__values(Object.entries(w.dimensionValues)),C=x.next();!C.done;C=x.next()){k=__read(C.value,2),I=k[0],R=k[1];try{for(oe=void 0,D=__values(R),W=D.next();!W.done;W=D.next())V=W.value,$.set("dimensionValues["+I+"][]",V)}catch(w){oe={error:w}}finally{try{W&&!W.done&&(ue=D.return)&&ue.call(D)}finally{if(oe)throw oe.error}}}}catch(w){J={error:w}}finally{try{C&&!C.done&&(ie=x.return)&&ie.call(x)}finally{if(J)throw J.error}}$.set("treeNodeId",w.treeNodeId),$.set("nodeTypeFilter",w.nodeTypeFilter),ae.label=1;case 1:return ae.trys.push([1,3,,4]),[4,E.fetchWithErrorHandling.withCsrfToken((function(w){return{url:"/sitegeist/archaeopteryx/get-children-for-tree-node?"+$.toString(),method:"GET",credentials:"include",headers:{"X-Flow-Csrftoken":w,"Content-Type":"application/json"}}}))];case 2:return G=ae.sent(),[2,E.fetchWithErrorHandling.parseJson(G)];case 3:throw K=ae.sent(),E.fetchWithErrorHandling.generalErrorHandler(K),K;case 4:return[2]}}))}))}},function(w,$,x){"use strict";var __awaiter=function(w,$,x,E){return new(x||(x=Promise))((function(C,k){function fulfilled(w){try{step(E.next(w))}catch(w){k(w)}}function rejected(w){try{step(E.throw(w))}catch(w){k(w)}}function step(w){w.done?C(w.value):function adopt(w){return w instanceof x?w:new x((function($){$(w)}))}(w.value).then(fulfilled,rejected)}step((E=E.apply(w,$||[])).next())}))},__generator=function(w,$){var x,E,C,k,I={label:0,sent:function sent(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return k={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k;function verb(k){return function(R){return function step(k){if(x)throw new TypeError("Generator is already executing.");for(;I;)try{if(x=1,E&&(C=2&k[0]?E.return:k[0]?E.throw||((C=E.return)&&C.call(E),0):E.next)&&!(C=C.call(E,k[1])).done)return C;switch(E=0,C&&(k=[2&k[0],C.value]),k[0]){case 0:case 1:C=k;break;case 4:return I.label++,{value:k[1],done:!1};case 5:I.label++,E=k[1],k=[0];continue;case 7:k=I.ops.pop(),I.trys.pop();continue;default:if(!(C=I.trys,(C=C.length>0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]=w.length&&(w=void 0),{value:w&&w[E++],done:!w}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=function(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.getTree=void 0;var E=x(12);$.getTree=function getTree(w){var $;return __awaiter(this,void 0,void 0,(function(){var x,C,k,I,R,D,W,V,G,K,J,ie,oe,ue,ae,se,de,le,pe,he;return __generator(this,(function(ve){switch(ve.label){case 0:(x=new URLSearchParams).set("workspaceName",w.workspaceName);try{for(C=__values(Object.entries(w.dimensionValues)),k=C.next();!k.done;k=C.next()){I=__read(k.value,2),R=I[0],D=I[1];try{for(de=void 0,W=__values(D),V=W.next();!V.done;V=W.next())G=V.value,x.set("dimensionValues["+R+"][]",G)}catch(w){de={error:w}}finally{try{V&&!V.done&&(le=W.return)&&le.call(W)}finally{if(de)throw de.error}}}}catch(w){ae={error:w}}finally{try{k&&!k.done&&(se=C.return)&&se.call(C)}finally{if(ae)throw ae.error}}x.set("startingPoint",w.startingPoint),x.set("loadingDepth",String(w.loadingDepth)),x.set("baseNodeTypeFilter",w.baseNodeTypeFilter);try{for(K=__values(null!==($=w.linkableNodeTypes)&&void 0!==$?$:[]),J=K.next();!J.done;J=K.next())ie=J.value,x.append("linkableNodeTypes[]",ie)}catch(w){pe={error:w}}finally{try{J&&!J.done&&(he=K.return)&&he.call(K)}finally{if(pe)throw pe.error}}x.set("narrowNodeTypeFilter",w.narrowNodeTypeFilter),x.set("searchTerm",w.searchTerm),w.selectedNodeId&&x.set("selectedNodeId",w.selectedNodeId),ve.label=1;case 1:return ve.trys.push([1,3,,4]),[4,E.fetchWithErrorHandling.withCsrfToken((function(w){return{url:"/sitegeist/archaeopteryx/get-tree?"+x.toString(),method:"GET",credentials:"include",headers:{"X-Flow-Csrftoken":w,"Content-Type":"application/json"}}}))];case 2:return oe=ve.sent(),[2,E.fetchWithErrorHandling.parseJson(oe)];case 3:throw ue=ve.sent(),E.fetchWithErrorHandling.generalErrorHandler(ue),ue;case 4:return[2]}}))}))}},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__read=function(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.Search=void 0;var k=__importStar(x(0)),I=x(55),R=x(225);$.Search=function Search(w){var $=__read(k.useState(w.initialValue),2),x=$[0],E=$[1],C=k.useCallback((function(){E("")}),[E]);return I.useDebounce((function(){w.onChange(x)}),300,[x]),k.createElement(R.SearchInput,{value:x,onChange:E,onClear:C})}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.SearchInput=void 0;var E=x(226);Object.defineProperty($,"SearchInput",{enumerable:!0,get:function get(){return E.SearchInput}})},function(w,$,x){"use strict";var __makeTemplateObject=function(w,$){return Object.defineProperty?Object.defineProperty(w,"raw",{value:$}):w.raw=$,w},E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__importDefault=function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty($,"__esModule",{value:!0}),$.SearchInput=void 0;var k,I,R,D,W=__importStar(x(0)),V=__importDefault(x(17)),G=x(16),K=x(12),J=V.default(G.Icon)(k||(k=__makeTemplateObject(["\n position: absolute;\n top: 50%;\n left: 21px;\n transform: translate(-50%, -50%);\n"],["\n position: absolute;\n top: 50%;\n left: 21px;\n transform: translate(-50%, -50%);\n"]))),ie=V.default(G.IconButton)(I||(I=__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n color: #000;\n"],["\n position: absolute;\n top: 0;\n right: 0;\n color: #000;\n"]))),oe=V.default(G.TextInput)(R||(R=__makeTemplateObject(["\n padding-left: 42px;\n\n &:focus {\n background: #3f3f3f;\n color: #fff;\n }\n"],["\n padding-left: 42px;\n\n &:focus {\n background: #3f3f3f;\n color: #fff;\n }\n"]))),ue=V.default.div(D||(D=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));$.SearchInput=function SearchInput(w){var $=K.useI18n(),x=W.useRef(w.value);return W.useEffect((function(){x.current===w.value||w.value||w.onClear(),x.current=w.value}),[w.value]),W.createElement(ue,null,W.createElement(J,{icon:"search"}),W.createElement(oe,{type:"search",value:w.value,placeholder:$("Neos.Neos:Main:search"),onChange:w.onChange}),w.value&&W.createElement(ie,{icon:"times",onClick:w.onClear}))}},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__awaiter=function(w,$,x,E){return new(x||(x=Promise))((function(C,k){function fulfilled(w){try{step(E.next(w))}catch(w){k(w)}}function rejected(w){try{step(E.throw(w))}catch(w){k(w)}}function step(w){w.done?C(w.value):function adopt(w){return w instanceof x?w:new x((function($){$(w)}))}(w.value).then(fulfilled,rejected)}step((E=E.apply(w,$||[])).next())}))},__generator=function(w,$){var x,E,C,k,I={label:0,sent:function sent(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return k={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k;function verb(k){return function(R){return function step(k){if(x)throw new TypeError("Generator is already executing.");for(;I;)try{if(x=1,E&&(C=2&k[0]?E.return:k[0]?E.throw||((C=E.return)&&C.call(E),0):E.next)&&!(C=C.call(E,k[1])).done)return C;switch(E=0,C&&(k=[2&k[0],C.value]),k[0]){case 0:case 1:C=k;break;case 4:return I.label++,{value:k[1],done:!1};case 5:I.label++,E=k[1],k=[0];continue;case 7:k=I.ops.pop(),I.trys.pop();continue;default:if(!(C=I.trys,(C=C.length>0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.SelectNodeTypeFilter=void 0;var k=__importStar(x(0)),I=x(55),R=x(73),D=x(16),W=x(12),V=x(98);$.SelectNodeTypeFilter=function SelectNodeTypeFilter(w){var $=W.useI18n(),x=__read(k.useState(""),2),E=x[0],C=x[1],G=I.useAsync((function(){return __awaiter(void 0,void 0,void 0,(function(){var x;return __generator(this,(function(E){switch(E.label){case 0:return[4,V.getNodeTypeFilterOptions({baseNodeTypeFilter:w.baseNodeTypeFilter})];case 1:if("success"in(x=E.sent()))return[2,x.success.options.map((function(w){return{value:w.value,icon:w.label.icon,label:$(w.label.label)}}))];if("error"in x)throw new R.VError(x.error.message);throw new R.VError("Unable to fetch node type filter options")}}))}))}),[w.baseNodeTypeFilter]),K=k.useMemo((function(){var w;return function searchNodeTypeFilterOptions(w,$){return $.filter((function($){return-1!==$.label.toLowerCase().indexOf(w.toLowerCase())}))}(E,null!==(w=G.value)&&void 0!==w?w:[])}),[E,G.value]);return k.createElement(D.SelectBox,{disabled:G.loading||G.error,placeholder:$("Neos.Neos:Main:filter"),placeholderIcon:"filter",onValueChange:w.onChange,allowEmpty:!0,value:w.value,options:K,displaySearchBox:!0,searchTerm:E,onSearchTermChange:C,threshold:0,noMatchesFoundLabel:$("Neos.Neos:Main:noMatchesFound"),searchBoxLeftToTypeLabel:$("Neos.Neos:Main:searchBoxLeftToType")})}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.getNodeSummary=void 0;var E=x(229);Object.defineProperty($,"getNodeSummary",{enumerable:!0,get:function get(){return E.getNodeSummary}})},function(w,$,x){"use strict";var __awaiter=function(w,$,x,E){return new(x||(x=Promise))((function(C,k){function fulfilled(w){try{step(E.next(w))}catch(w){k(w)}}function rejected(w){try{step(E.throw(w))}catch(w){k(w)}}function step(w){w.done?C(w.value):function adopt(w){return w instanceof x?w:new x((function($){$(w)}))}(w.value).then(fulfilled,rejected)}step((E=E.apply(w,$||[])).next())}))},__generator=function(w,$){var x,E,C,k,I={label:0,sent:function sent(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return k={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k;function verb(k){return function(R){return function step(k){if(x)throw new TypeError("Generator is already executing.");for(;I;)try{if(x=1,E&&(C=2&k[0]?E.return:k[0]?E.throw||((C=E.return)&&C.call(E),0):E.next)&&!(C=C.call(E,k[1])).done)return C;switch(E=0,C&&(k=[2&k[0],C.value]),k[0]){case 0:case 1:C=k;break;case 4:return I.label++,{value:k[1],done:!1};case 5:I.label++,E=k[1],k=[0];continue;case 7:k=I.ops.pop(),I.trys.pop();continue;default:if(!(C=I.trys,(C=C.length>0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]=w.length&&(w=void 0),{value:w&&w[E++],done:!w}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=function(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.getNodeSummary=void 0;var E=x(12);$.getNodeSummary=function getNodeSummary(w){return __awaiter(this,void 0,void 0,(function(){var $,x,C,k,I,R,D,W,V,G,K,J,ie,oe,ue;return __generator(this,(function(ae){switch(ae.label){case 0:($=new URLSearchParams).set("workspaceName",w.workspaceName);try{for(x=__values(Object.entries(w.dimensionValues)),C=x.next();!C.done;C=x.next()){k=__read(C.value,2),I=k[0],R=k[1];try{for(oe=void 0,D=__values(R),W=D.next();!W.done;W=D.next())V=W.value,$.set("dimensionValues["+I+"][]",V)}catch(w){oe={error:w}}finally{try{W&&!W.done&&(ue=D.return)&&ue.call(D)}finally{if(oe)throw oe.error}}}}catch(w){J={error:w}}finally{try{C&&!C.done&&(ie=x.return)&&ie.call(x)}finally{if(J)throw J.error}}$.set("nodeId",w.nodeId),ae.label=1;case 1:return ae.trys.push([1,3,,4]),[4,E.fetchWithErrorHandling.withCsrfToken((function(w){return{url:"/sitegeist/archaeopteryx/get-node-summary?"+$.toString(),method:"GET",credentials:"include",headers:{"X-Flow-Csrftoken":w,"Content-Type":"application/json"}}}))];case 2:return G=ae.sent(),[2,E.fetchWithErrorHandling.parseJson(G)];case 3:throw K=ae.sent(),E.fetchWithErrorHandling.generalErrorHandler(K),K;case 4:return[2]}}))}))}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.Asset=void 0;var E=x(231);Object.defineProperty($,"Asset",{enumerable:!0,get:function get(){return E.Asset}})},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.Asset=void 0;var k=__importStar(x(0)),I=x(12),R=x(43),D=x(30),W=x(38),V=x(232);$.Asset=D.makeLinkType("Sitegeist.Archaeopteryx:Asset",(function(w){var $=w.createError;return{supportedLinkOptions:["title","targetBlank","relNofollow"],isSuitableFor:function isSuitableFor(w){return w.href.startsWith("asset://")},useResolvedModel:function useResolvedModel(w){var x=/asset:\/\/(.*)/.exec(w.href);return x?R.Process.success({identifier:x[1]}):R.Process.error($('Cannot handle href "'+w.href+'".'))},convertModelToLink:function convertModelToLink(w){return{href:"asset://"+w.identifier}},TabHeader:function TabHeader(){var w=I.useI18n();return k.createElement(W.IconLabel,{icon:"camera"},w("Sitegeist.Archaeopteryx:LinkTypes.Asset:title"))},Preview:function Preview(w){var $,x,E=w.model,C=I.useAssetSummary(E.identifier);return C.value?k.createElement(W.ImageCard,{label:null===($=C.value)||void 0===$?void 0:$.label,src:null===(x=C.value)||void 0===x?void 0:x.preview}):null},Editor:function Editor(w){var $=w.model,x=I.useI18n();return k.createElement(R.Field,{name:"identifier",initialValue:null==$?void 0:$.identifier,validate:function validate(w){if(!w)return x("Sitegeist.Archaeopteryx:LinkTypes.Asset:identifier.validation.required")}},(function(w){var $=w.input;return k.createElement(V.MediaBrowser,{assetIdentifier:$.value,onSelectAsset:$.onChange})}))}}}))},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.MediaBrowser=void 0;var k=__importStar(x(0)),I=x(12);$.MediaBrowser=function MediaBrowser(w){var $=I.useRoutes((function(w){var $,x;return null===(x=null===($=w.core)||void 0===$?void 0:$.modules)||void 0===x?void 0:x.mediaBrowser}));if(k.useEffect((function(){window.NeosMediaBrowserCallbacks={assetChosen:function assetChosen($){w.onSelectAsset($)}}}),[w.onSelectAsset]),!$)throw new Error("[Sitegeist.Archaeopteryx]: Could not resolve mediaBrowserUri.");return w.assetIdentifier?k.createElement("iframe",{name:"neos-media-selection-screen",src:$+"/images/edit.html?asset[__identity]="+w.assetIdentifier,style:{width:"calc(100vw - 160px)",maxWidth:"1260px",height:"calc(100vh - 480px)"},frameBorder:"0",onLoad:function onLoad(w){var $,x,E=w.target.contentDocument;E&&(E.body.style.overflowX="hidden",E.body.style.padding="0",null===($=E.querySelector("form > .neos-footer"))||void 0===$||$.remove(),null===(x=E.querySelectorAll("input, select, textarea"))||void 0===x||x.forEach((function(w){w.readOnly=!0})))}}):k.createElement("iframe",{name:"neos-media-selection-screen",src:$+"/assets/index.html",style:{width:"calc(100vw - 160px)",maxWidth:"1260px",height:"calc(100vh - 480px)"},frameBorder:"0",onLoad:function onLoad(w){var $=w.target.contentDocument;$&&($.body.style.overflowX="hidden",$.body.style.padding="0")}})}},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.MailTo=void 0;var E=x(234);Object.defineProperty($,"MailTo",{enumerable:!0,get:function get(){return E.MailTo}})},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.MailTo=void 0;var k=__importStar(x(0)),I=x(12),R=x(43),D=x(30),W=x(38),V=/^[^\s@]+@[^\s@]+$/;$.MailTo=D.makeLinkType("Sitegeist.Archaeopteryx:MailTo",(function(w){var $=w.createError;return{isSuitableFor:function isSuitableFor(w){return w.href.startsWith("mailto:")},useResolvedModel:function useResolvedModel(w){var x,E,C,k;if(!w.href.startsWith("mailto:"))return R.Process.error($('Cannot handle href "'+w.href+'".'));var I=new URL(w.href);return R.Process.success({recipient:I.pathname,subject:null!==(x=I.searchParams.get("subject"))&&void 0!==x?x:void 0,cc:null!==(E=I.searchParams.get("cc"))&&void 0!==E?E:void 0,bcc:null!==(C=I.searchParams.get("bcc"))&&void 0!==C?C:void 0,body:null!==(k=I.searchParams.get("body"))&&void 0!==k?k:void 0})},convertModelToLink:function convertModelToLink(w){var $="mailto:"+w.recipient+"?";return w.subject&&($+="subject="+w.subject),w.cc&&!w.subject?$+="cc="+w.cc:w.cc&&($+="&cc="+w.cc),!w.bcc||w.subject||w.cc?w.bcc&&($+="&bcc="+w.bcc):$+="bcc="+w.bcc,!w.body||w.subject||w.cc||w.bcc?w.body&&($+="&body="+w.body):$+="body="+w.body,{href:$}},TabHeader:function TabHeader(){var w=I.useI18n();return k.createElement(W.IconLabel,{icon:"envelope"},w("Sitegeist.Archaeopteryx:LinkTypes.MailTo:title"))},Preview:function Preview(w){var $,x,E=w.model;return k.createElement(W.IconCard,{icon:"envelope",title:E.recipient,subTitle:E.subject||E.body?((null!==($=E.subject)&&void 0!==$?$:"")+" "+(null!==(x=E.body)&&void 0!==x?x:"")).trim():void 0})},Editor:function Editor(w){var $,x,E,C,D=w.model,G=w.options,K=I.useI18n();return k.createElement(W.Layout.Columns,null,k.createElement(R.Field,{name:"recipient",initialValue:null==D?void 0:D.recipient,validate:function validate(w){return w?V.test(w)?void 0:K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:recipient.validation.email"):K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:recipient.validation.required")}},(function(w){var $=w.input,x=w.meta;return k.createElement("div",{style:{gridColumn:"1 / -1"}},k.createElement(R.EditorEnvelope,{label:K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:recipient.label"),editor:"Neos.Neos/Inspector/Editors/TextFieldEditor",input:$,meta:x}))})),!1!==(null===($=G.enabledFields)||void 0===$?void 0:$.subject)?k.createElement(R.Field,{name:"subject",initialValue:null==D?void 0:D.subject},(function(w){var $=w.input,x=w.meta;return k.createElement("div",{style:{gridColumn:"1 / -1"}},k.createElement(R.EditorEnvelope,{label:K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:subject.label"),editor:"Neos.Neos/Inspector/Editors/TextFieldEditor",input:$,meta:x}))})):null,!1!==(null===(x=G.enabledFields)||void 0===x?void 0:x.cc)?k.createElement(R.Field,{name:"cc",initialValue:null==D?void 0:D.cc,validate:function validate(w){if(null!=w&&!w.split(",").every((function(w){return V.test(w.trim())})))return K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:cc.validation.emaillist")}},(function(w){var $=w.input,x=w.meta;return k.createElement("div",{style:{gridColumn:"1 / -1"}},k.createElement(R.EditorEnvelope,{label:K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:cc.label"),editor:"Neos.Neos/Inspector/Editors/TextFieldEditor",editorOptions:{placeholder:K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:cc.placeholder")},input:$,meta:x}))})):null,!1!==(null===(E=G.enabledFields)||void 0===E?void 0:E.bcc)?k.createElement(R.Field,{name:"bcc",initialValue:null==D?void 0:D.bcc,validate:function validate(w){if(null!=w&&!w.split(",").every((function(w){return V.test(w.trim())})))return K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:bcc.validation.emaillist")}},(function(w){var $=w.input,x=w.meta;return k.createElement("div",{style:{gridColumn:"1 / -1"}},k.createElement(R.EditorEnvelope,{label:K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:bcc.label"),editor:"Neos.Neos/Inspector/Editors/TextFieldEditor",editorOptions:{placeholder:K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:bcc.placeholder")},input:$,meta:x}))})):null,!1!==(null===(C=G.enabledFields)||void 0===C?void 0:C.body)?k.createElement(R.Field,{name:"body",initialValue:null==D?void 0:D.body},(function(w){var $=w.input,x=w.meta;return k.createElement("div",{style:{gridColumn:"1 / -1"}},k.createElement(R.EditorEnvelope,{label:K("Sitegeist.Archaeopteryx:LinkTypes.MailTo:body.label"),editor:"Neos.Neos/Inspector/Editors/TextAreaEditor",input:$,meta:x}))})):null)}}}))},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.PhoneNumber=void 0;var E=x(236);Object.defineProperty($,"PhoneNumber",{enumerable:!0,get:function get(){return E.PhoneNumber}})},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$},__read=function(w,$){var x="function"==typeof Symbol&&w[Symbol.iterator];if(!x)return w;var E,C,k=x.call(w),I=[];try{for(;(void 0===$||$-- >0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.PhoneNumber=void 0;var k=__importStar(x(0)),I=x(0),R=x(69),D=x(16),W=x(12),V=x(248),G=x(30),K=x(43),J=x(38);$.PhoneNumber=G.makeLinkType("Sitegeist.Archaeopteryx:PhoneNumber",(function(w){var $=w.createError;return{isSuitableFor:function isSuitableFor(w){return w.href.startsWith("tel:")},useResolvedModel:function useResolvedModel(w){var x=V.parsePhoneNumber(w.href.replace("tel:",""));return x?K.Process.success({phoneNumber:x.number.replace("+"+x.countryCallingCode,""),countryCallingCode:"+"+x.countryCallingCode.toString()}):K.Process.error($('Cannot handle href "'+w.href+'".'))},convertModelToLink:function convertModelToLink(w){return{href:"tel:"+w.countryCallingCode+w.phoneNumber}},TabHeader:function TabHeader(){var w=W.useI18n();return k.createElement(J.IconLabel,{icon:"phone-alt"},w("Sitegeist.Archaeopteryx:LinkTypes.PhoneNumber:title"))},Preview:function Preview(w){var $=w.model;return k.createElement(J.IconCard,{icon:"phone-alt",title:(new V.AsYouType).input(""+$.countryCallingCode+$.phoneNumber)})},Editor:function Editor(w){var $,x=w.model,E=w.options,C=(null==x?void 0:x.countryCallingCode)||((null==E?void 0:E.defaultCountry)?"+"+V.getCountryCallingCode(null==E?void 0:E.defaultCountry).toString():"+"+V.getCountryCallingCode(V.getCountries()[0]).toString()),G=__read(I.useState(C),2),J=G[0],ie=G[1],oe=W.useI18n(),ue={};null===($=E.favoredCountries)||void 0===$||$.map((function(w){ue["+"+V.getCountryCallingCode(w)]?ue["+"+V.getCountryCallingCode(w)]={value:"+"+V.getCountryCallingCode(w),label:ue["+"+V.getCountryCallingCode(w)].label.split(/\s\+/)[0]+", "+w+" +"+V.getCountryCallingCode(w)}:ue["+"+V.getCountryCallingCode(w)]={value:"+"+V.getCountryCallingCode(w),label:w+" +"+V.getCountryCallingCode(w)}})),V.getCountries().map((function(w){var $;(null===($=E.favoredCountries)||void 0===$?void 0:$.includes(w))||(ue["+"+V.getCountryCallingCode(w)]?ue["+"+V.getCountryCallingCode(w)]={value:"+"+V.getCountryCallingCode(w),label:ue["+"+V.getCountryCallingCode(w)].label.split(/\s\+/)[0]+", "+w+" +"+V.getCountryCallingCode(w)}:ue["+"+V.getCountryCallingCode(w)]={value:"+"+V.getCountryCallingCode(w),label:w+" +"+V.getCountryCallingCode(w)})}));var ae=/^[1-9][0-9]*$/;return k.createElement("div",null,k.createElement("label",{htmlFor:"linkTypeProps.Sitegeist_Archaeopteryx:PhoneNumber.phoneNumber"},oe("Sitegeist.Archaeopteryx:LinkTypes.PhoneNumber:phoneNumber.label")),k.createElement("div",{style:{display:"grid",gridTemplateColumns:"160px 1fr",minWidth:"600px"}},k.createElement(K.Field,{name:"countryCallingCode",format:function format(w){return void 0===w&&""===w||ie(w),""!==w&&void 0!==w||R.useForm().change("linkTypeProps.Sitegeist_Archaeopteryx:PhoneNumber.countryCallingCode",J),w},initialValue:J||C,validate:function validate(w){if(!w)return oe("Sitegeist.Archaeopteryx:LinkTypes.PhoneNumber:countryCallingCode.validation.required")}},(function(w){var $=w.input;return k.createElement("div",{style:{margin:"0.25rem 0 0 0"}},k.createElement(D.SelectBox,{allowEmpty:!1,options:Object.values(ue),onValueChange:function onValueChange(w){ie(w),$.onChange(w)},value:$.value}))})),k.createElement(K.Field,{name:"phoneNumber",initialValue:null==x?void 0:x.phoneNumber,validate:function validate(w){return w?ae.test(w)?void 0:oe("Sitegeist.Archaeopteryx:LinkTypes.PhoneNumber:phoneNumber.validation.numbersOnly"):oe("Sitegeist.Archaeopteryx:LinkTypes.PhoneNumber:phoneNumber.validation.required")}},(function(w){var $=w.input,x=w.meta;return k.createElement(K.EditorEnvelope,{label:"",editor:"Neos.Neos/Inspector/Editors/TextFieldEditor",editorOptions:{placeholder:oe("Sitegeist.Archaeopteryx:LinkTypes.PhoneNumber:phoneNumber.placeholder")},input:$,meta:x})}))))}}}))},function(w,$,x){"use strict";Object.defineProperty($,"__esModule",{value:!0}),$.CustomLink=void 0;var E=x(238);Object.defineProperty($,"CustomLink",{enumerable:!0,get:function get(){return E.CustomLink}})},function(w,$,x){"use strict";var __assign=function(){return(__assign=Object.assign||function(w){for(var $,x=1,E=arguments.length;x...'})},Editor:function Editor(w){var $=w.model,x=I.useI18n();return k.createElement("div",null,k.createElement("label",null,x("Sitegeist.Archaeopteryx:LinkTypes.CustomLink:customLink.label")),k.createElement("div",{style:{display:"grid",gridTemplateColumns:"400px 1fr",minWidth:"600px"}},k.createElement(W.Field,{name:"customLink",initialValue:null==$?void 0:$.customLink,validate:function validate(w){if(!w)return x("Sitegeist.Archaeopteryx:LinkTypes.CustomLink:validation.required")}},(function(w){var $=w.input;return k.createElement(R.TextInput,__assign({id:$.name,type:"text",placeHolder:x("Sitegeist.Archaeopteryx:LinkTypes.CustomLink:customLink.placeholder")},$))}))))}}}))},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.registerDialog=void 0;var k=__importStar(x(0)),I=x(12),R=x(30),D=x(240);$.registerDialog=function registerDialog(w,$){var x=w.globalRegistry.get("containers");null==x||x.set("Modals/Sitegeist.Archaeopteryx",(function(x){return k.createElement(I.NeosContext.Provider,{value:w},k.createElement(R.EditorContext.Provider,{value:$},k.createElement(D.Dialog,x)))}))}},function(w,$,x){"use strict";var __assign=function(){return(__assign=Object.assign||function(w){for(var $,x=1,E=arguments.length;x0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.Dialog=void 0;var k=__importStar(x(0)),I=x(69),R=x(55),D=x(16),W=x(12),V=x(78),G=x(43),K=x(30),J=x(38),ie=x(241),oe=x(242);$.Dialog=function Dialog(){var w=W.useI18n(),$=K.useLinkTypes(),x=W.useSelector((function(w){var $;return!(null===($=w.system)||void 0===$?void 0:$.authenticationTimeout)})),E=K.useEditorTransactions(),C=E.dismiss,G=E.apply,ie=E.unset,oe=K.useEditorState(),se=oe.isOpen,de=oe.initialValue,le=__read(k.useState(!1),2),pe=le[0],he=le[1],ve=k.useCallback((function(w){var x,E=$.find((function($){return $.id===w.linkTypeId}));if(E){var C=null===(x=w.linkTypeProps)||void 0===x?void 0:x[E.id.split(".").join("_")];if(C){var k=__assign(__assign({},E.convertModelToLink(C)),{options:w.options?Object.keys(w.options).filter((function(w){return E.supportedLinkOptions.includes(w)})).reduce((function($,x){return $[x]=w.options[x],$}),{}):{}});G(k),he(!1)}}else pe&&(ie(),he(!1))}),[$,pe]);return R.useKey("Escape",C),se&&x?k.createElement(J.Modal,{renderTitle:function renderTitle(){return k.createElement("div",null,w("Sitegeist.Archaeopteryx:Main:dialog.title"))},renderBody:function renderBody(){return k.createElement(I.Form,{onSubmit:ve},(function($){var x=$.handleSubmit,E=$.valid,I=$.dirty;$.values;return k.createElement(V.ErrorBoundary,null,k.createElement(J.Form,{renderBody:function renderBody(){return null===de||pe?k.createElement(ue,{valid:E,onDelete:function onDelete(){return he(!0)}}):k.createElement(ae,{value:de,onDelete:function onDelete(){return he(!0)}})},renderActions:function renderActions(){return k.createElement(k.Fragment,null,k.createElement(D.Button,{onClick:C},w("Sitegeist.Archaeopteryx:Main:dialog.action.cancel")),E&&I||!pe?k.createElement(D.Button,{style:"success",type:"submit",disabled:!E||!I},w("Sitegeist.Archaeopteryx:Main:dialog.action.apply")):k.createElement(D.Button,{style:"success",type:"button",onClick:ie},w("Sitegeist.Archaeopteryx:Main:dialog.action.apply")))},onSubmit:x}))}))}}):(pe&&he(!1),null)};var ue=function DialogWithEmptyValue(w){var $,x=I.useForm(),E=K.useEditorState(),C=E.enabledLinkOptions,R=E.editorOptions,D=K.useSortedAndFilteredLinkTypes();return k.createElement(G.Field,{name:"linkTypeId",initialValue:null===($=D[0])||void 0===$?void 0:$.id},(function($){var E=$.input;return k.createElement(J.Tabs,{lazy:!0,from:D,activeItemKey:E.value,getKey:function getKey(w){return w.id},renderHeader:function renderHeader(w){var $,x,E=w.id,C=w.TabHeader;return k.createElement(C,{options:null!==(x=null===($=R.linkTypes)||void 0===$?void 0:$[E])&&void 0!==x?x:{}})},renderPanel:function renderPanel($){var E,I,D,W,G=$.Preview,K=null===(E=x.getState().values.linkTypeProps)||void 0===E?void 0:E[$.id.split(".").join("_")];return k.createElement(J.Layout.Stack,null,w.valid&&K?k.createElement(J.Deletable,{onDelete:function onDelete(){w.onDelete(),x.change("linkTypeProps",null)}},k.createElement(V.ErrorBoundary,null,k.createElement(G,{model:null===(I=x.getState().values.linkTypeProps)||void 0===I?void 0:I[$.id.split(".").join("_")],options:null!==(W=null===(D=R.linkTypes)||void 0===D?void 0:D[$.id])&&void 0!==W?W:{},link:{href:""}}))):null,k.createElement("div",{style:{overflow:"auto"}},k.createElement(ie.LinkEditor,{key:$.id,link:null,linkType:$}),C.length&&$.supportedLinkOptions.length?k.createElement(oe.Settings,{enabledLinkOptions:C.filter((function(w){return $.supportedLinkOptions.includes(w)}))}):null))},onSwitchTab:E.onChange})}))},ae=function DialogWithValue(w){var $,x,E,C=I.useForm(),R=K.useEditorState(),D=R.enabledLinkOptions,W=R.editorOptions,ue=K.useLinkTypeForHref(w.value.href),ae=ue.useResolvedModel(w.value).result,se=ue.Preview,de=C.getState(),le=null!==(x=de.valid?null===($=de.values.linkTypeProps)||void 0===$?void 0:$[ue.id.split(".").join("_")]:ae)&&void 0!==x?x:ae,pe=K.useSortedAndFilteredLinkTypes();return k.createElement(G.Field,{name:"linkTypeId",initialValue:null===(E=pe[0])||void 0===E?void 0:E.id},(function($){var x=$.input;return k.createElement(J.Tabs,{lazy:!0,from:pe,activeItemKey:x.value||ue.id,getKey:function getKey(w){return w.id},renderHeader:function renderHeader(w){var $,x,E=w.id,C=w.TabHeader;return k.createElement(C,{options:null!==(x=null===($=W.linkTypes)||void 0===$?void 0:$[E])&&void 0!==x?x:{}})},renderPanel:function renderPanel($){var x,E,I,R=null===(x=C.getState().values.linkTypeProps)||void 0===x?void 0:x[$.id.split(".").join("_")],G=$.Preview,K=R;return(!R||"Sitegeist.Archaeopteryx:Web"===$.id&&!(null==R?void 0:R.urlWithoutProtocol)||"Sitegeist.Archaeopteryx:PhoneNumber"===$.id&&!(null==R?void 0:R.phoneNumber)||"Sitegeist.Archaeopteryx:CustomLink"===$.id&&!(null==R?void 0:R.CustomLink))&&(G=se,K=le),k.createElement(J.Layout.Stack,null,K?k.createElement(J.Deletable,{onDelete:function onDelete(){w.onDelete(),C.change("linkTypeProps",null)}},k.createElement(V.ErrorBoundary,null,k.createElement(G,{model:K,options:null!==(I=null===(E=W.linkTypes)||void 0===E?void 0:E[$.id])&&void 0!==I?I:{},link:w.value}))):null,k.createElement(ie.LinkEditor,{key:$.id,link:$.isSuitableFor(w.value)?w.value:null,linkType:$}),D.length&&$.supportedLinkOptions.length?k.createElement(oe.Settings,{initialValue:w.value.options,enabledLinkOptions:D.filter((function(w){return $.supportedLinkOptions.includes(w)}))}):null)},onSwitchTab:x.onChange})}))}},function(w,$,x){"use strict";var E=Object.create?function(w,$,x,E){void 0===E&&(E=x),Object.defineProperty(w,E,{enumerable:!0,get:function get(){return $[x]}})}:function(w,$,x,E){void 0===E&&(E=x),w[E]=$[x]},C=Object.create?function(w,$){Object.defineProperty(w,"default",{enumerable:!0,value:$})}:function(w,$){w.default=$},__importStar=function(w){if(w&&w.__esModule)return w;var $={};if(null!=w)for(var x in w)"default"!==x&&Object.prototype.hasOwnProperty.call(w,x)&&E($,w,x);return C($,w),$};Object.defineProperty($,"__esModule",{value:!0}),$.LinkEditor=void 0;var k=__importStar(x(0)),I=x(78),R=x(43),D=x(30);$.LinkEditor=function LinkEditor(w){return k.createElement(I.ErrorBoundary,null,null===w.link?k.createElement(W,{linkType:w.linkType}):k.createElement(V,{link:w.link,linkType:w.linkType}))};var W=function LinkEditorWithoutValue(w){var $,x,E=D.useEditorState().editorOptions,C=w.linkType.Editor,I="linkTypeProps."+w.linkType.id.split(".").join("_");return k.createElement(R.FieldGroup,{prefix:I},k.createElement(C,{model:null,options:null!==(x=null===($=E.linkTypes)||void 0===$?void 0:$[w.linkType.id])&&void 0!==x?x:{},link:null}))},V=function LinkEditorWithValue(w){var $,x,E,C,I,W=D.useEditorState().editorOptions,V=w.linkType.useResolvedModel(w.link),G=V.busy,K=V.error,J=function useLastNonNull(w){var $=k.useRef(w);return null!==w&&($.current=w),$.current}(V.result),ie=w.linkType,oe=ie.Editor,ue=ie.LoadingEditor;if(K)throw K;return G&&!J?k.createElement(ue,{link:null!==($=w.link)&&void 0!==$?$:void 0,options:null!==(E=null===(x=W.linkTypes)||void 0===x?void 0:x[w.linkType.id])&&void 0!==E?E:{}}):k.createElement(R.FieldGroup,{prefix:"linkTypeProps."+w.linkType.id.split(".").join("_")},k.createElement(oe,{model:J,options:null!==(I=null===(C=W.linkTypes)||void 0===C?void 0:C[w.linkType.id])&&void 0!==I?I:{},link:w.link}))}},function(w,$,x){"use strict";var __assign=function(){return(__assign=Object.assign||function(w){for(var $,x=1,E=arguments.length;x0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]0&&C[C.length-1])||6!==k[0]&&2!==k[0])){I=0;continue}if(3===k[0]&&(!C||k[1]>C[0]&&k[1]0)&&!(E=k.next()).done;)I.push(E.value)}catch(w){C={error:w}}finally{try{E&&!E.done&&(x=k.return)&&x.call(k)}finally{if(C)throw C.error}}return I};Object.defineProperty($,"__esModule",{value:!0}),$.LinkButton=void 0;var k=__importStar(x(0)),I=x(16),R=x(67),D=x(12);$.LinkButton=function LinkButton(w){var $,x,E,C,W,V,G,K,J=D.useI18n(),ie=R.useEditorTransactions(),oe=__assign(__assign({},null===(x=null===($=w.inlineEditorOptions)||void 0===$?void 0:$.linking)||void 0===x?void 0:x["Sitegeist.Archaeopteryx"]),{linkTypes:__assign({},null===(W=null===(C=null===(E=w.inlineEditorOptions)||void 0===E?void 0:E.linking)||void 0===C?void 0:C["Sitegeist.Archaeopteryx"])||void 0===W?void 0:W.linkTypes)});(null===(G=null===(V=w.inlineEditorOptions)||void 0===V?void 0:V.linking)||void 0===G?void 0:G.startingPoint)&&(oe.linkTypes["Sitegeist.Archaeopteryx:Node"]=__assign(__assign({},oe.linkTypes["Sitegeist.Archaeopteryx:Node"]),{startingPoint:null!==(K=oe.linkTypes["Sitegeist.Archaeopteryx:Node"].startingPoint)&&void 0!==K?K:w.inlineEditorOptions.linking.startingPoint}));var ue=k.useCallback((function(){return __awaiter(void 0,void 0,void 0,(function(){var $,x,E,C,k,I,R,D,W,V;return __generator(this,(function(G){switch(G.label){case 0:return $=function(){if(w.formattingUnderCursor.link){var $=__read(w.formattingUnderCursor.link.split("#"),2);return{href:$[0],options:{anchor:$[1],title:w.formattingUnderCursor.linkTitle,targetBlank:w.formattingUnderCursor.linkTargetBlank,relNofollow:w.formattingUnderCursor.linkRelNofollow}}}return null}(),x=function(){var $,x,E,C,k,I,R,D,W=[];return(null===(x=null===($=w.inlineEditorOptions)||void 0===$?void 0:$.linking)||void 0===x?void 0:x.anchor)&&W.push("anchor"),(null===(C=null===(E=w.inlineEditorOptions)||void 0===E?void 0:E.linking)||void 0===C?void 0:C.title)&&W.push("title"),(null===(I=null===(k=w.inlineEditorOptions)||void 0===k?void 0:k.linking)||void 0===I?void 0:I.relNofollow)&&W.push("relNofollow"),(null===(D=null===(R=w.inlineEditorOptions)||void 0===R?void 0:R.linking)||void 0===D?void 0:D.targetBlank)&&W.push("targetBlank"),W}(),[4,ie.editLink($,x,oe)];case 1:return(E=G.sent()).change?null===E.value?(w.executeCommand("linkTitle",!1,!1),w.executeCommand("linkRelNofollow",!1,!1),w.executeCommand("linkTargetBlank",!1,!1),w.executeCommand("unlink",void 0,!0)):(w.executeCommand("linkTitle",(null===(C=E.value.options)||void 0===C?void 0:C.title)||!1,!1),w.executeCommand("linkTargetBlank",null!==(I=null===(k=E.value.options)||void 0===k?void 0:k.targetBlank)&&void 0!==I&&I,!1),w.executeCommand("linkRelNofollow",null!==(D=null===(R=E.value.options)||void 0===R?void 0:R.relNofollow)&&void 0!==D&&D,!1),(null===(W=E.value.options)||void 0===W?void 0:W.anchor)?w.executeCommand("link",E.value.href+"#"+(null===(V=E.value.options)||void 0===V?void 0:V.anchor),!0):w.executeCommand("link",E.value.href,!0)):(w.executeCommand("undo",void 0,!0),w.executeCommand("redo",void 0,!0)),[2]}}))}))}),[w.executeCommand,w.formattingUnderCursor.link,ie,oe]);return k.createElement(I.IconButton,{title:J("Sitegeist.Archaeopteryx:Main:linkButton.title"),isActive:Boolean(w.formattingUnderCursor.link),icon:Boolean(w.formattingUnderCursor.link)?"unlink":"link",onClick:ue})}},function(w,$,x){"use strict";x.r($),x.d($,"audit",(function(){return audit})),x.d($,"auditTime",(function(){return auditTime})),x.d($,"buffer",(function(){return buffer_buffer})),x.d($,"bufferCount",(function(){return bufferCount})),x.d($,"bufferTime",(function(){return bufferTime})),x.d($,"bufferToggle",(function(){return bufferToggle})),x.d($,"bufferWhen",(function(){return bufferWhen})),x.d($,"catchError",(function(){return catchError})),x.d($,"combineAll",(function(){return combineAll})),x.d($,"combineLatest",(function(){return combineLatest_combineLatest})),x.d($,"concat",(function(){return concat_concat})),x.d($,"concatAll",(function(){return Le.a})),x.d($,"concatMap",(function(){return concatMap})),x.d($,"concatMapTo",(function(){return concatMapTo})),x.d($,"count",(function(){return count_count})),x.d($,"debounce",(function(){return debounce})),x.d($,"debounceTime",(function(){return debounceTime})),x.d($,"defaultIfEmpty",(function(){return defaultIfEmpty})),x.d($,"delay",(function(){return delay_delay})),x.d($,"delayWhen",(function(){return delayWhen})),x.d($,"dematerialize",(function(){return dematerialize})),x.d($,"distinct",(function(){return distinct})),x.d($,"distinctUntilChanged",(function(){return distinctUntilChanged})),x.d($,"distinctUntilKeyChanged",(function(){return distinctUntilKeyChanged})),x.d($,"elementAt",(function(){return elementAt})),x.d($,"endWith",(function(){return endWith})),x.d($,"every",(function(){return every})),x.d($,"exhaust",(function(){return exhaust})),x.d($,"exhaustMap",(function(){return exhaustMap})),x.d($,"expand",(function(){return expand})),x.d($,"filter",(function(){return mt.a})),x.d($,"finalize",(function(){return finalize})),x.d($,"find",(function(){return find})),x.d($,"findIndex",(function(){return findIndex})),x.d($,"first",(function(){return first})),x.d($,"groupBy",(function(){return Dt.b})),x.d($,"ignoreElements",(function(){return ignoreElements})),x.d($,"isEmpty",(function(){return isEmpty})),x.d($,"last",(function(){return last})),x.d($,"map",(function(){return Tt.a})),x.d($,"mapTo",(function(){return mapTo})),x.d($,"materialize",(function(){return materialize})),x.d($,"max",(function(){return max_max})),x.d($,"merge",(function(){return merge_merge})),x.d($,"mergeAll",(function(){return tr.a})),x.d($,"mergeMap",(function(){return De.b})),x.d($,"flatMap",(function(){return De.a})),x.d($,"mergeMapTo",(function(){return mergeMapTo})),x.d($,"mergeScan",(function(){return mergeScan})),x.d($,"min",(function(){return min_min})),x.d($,"multicast",(function(){return multicast})),x.d($,"observeOn",(function(){return ur.b})),x.d($,"onErrorResumeNext",(function(){return onErrorResumeNext})),x.d($,"pairwise",(function(){return pairwise})),x.d($,"partition",(function(){return partition})),x.d($,"pluck",(function(){return pluck})),x.d($,"publish",(function(){return publish})),x.d($,"publishBehavior",(function(){return publishBehavior})),x.d($,"publishLast",(function(){return publishLast})),x.d($,"publishReplay",(function(){return publishReplay})),x.d($,"race",(function(){return race_race})),x.d($,"reduce",(function(){return reduce})),x.d($,"repeat",(function(){return repeat})),x.d($,"repeatWhen",(function(){return repeatWhen})),x.d($,"retry",(function(){return retry})),x.d($,"retryWhen",(function(){return retryWhen})),x.d($,"refCount",(function(){return Or.a})),x.d($,"sample",(function(){return sample})),x.d($,"sampleTime",(function(){return sampleTime})),x.d($,"scan",(function(){return scan})),x.d($,"sequenceEqual",(function(){return sequenceEqual})),x.d($,"share",(function(){return share})),x.d($,"shareReplay",(function(){return shareReplay})),x.d($,"single",(function(){return single})),x.d($,"skip",(function(){return skip})),x.d($,"skipLast",(function(){return skipLast})),x.d($,"skipUntil",(function(){return skipUntil})),x.d($,"skipWhile",(function(){return skipWhile})),x.d($,"startWith",(function(){return startWith})),x.d($,"subscribeOn",(function(){return subscribeOn})),x.d($,"switchAll",(function(){return switchAll})),x.d($,"switchMap",(function(){return switchMap})),x.d($,"switchMapTo",(function(){return switchMapTo})),x.d($,"take",(function(){return take})),x.d($,"takeLast",(function(){return takeLast})),x.d($,"takeUntil",(function(){return takeUntil})),x.d($,"takeWhile",(function(){return takeWhile})),x.d($,"tap",(function(){return tap})),x.d($,"throttle",(function(){return throttle})),x.d($,"throttleTime",(function(){return throttleTime})),x.d($,"throwIfEmpty",(function(){return throwIfEmpty})),x.d($,"timeInterval",(function(){return timeInterval})),x.d($,"timeout",(function(){return timeout})),x.d($,"timeoutWith",(function(){return timeoutWith})),x.d($,"timestamp",(function(){return timestamp})),x.d($,"toArray",(function(){return toArray})),x.d($,"window",(function(){return window_window})),x.d($,"windowCount",(function(){return windowCount})),x.d($,"windowTime",(function(){return windowTime_windowTime})),x.d($,"windowToggle",(function(){return windowToggle})),x.d($,"windowWhen",(function(){return windowWhen})),x.d($,"withLatestFrom",(function(){return withLatestFrom})),x.d($,"zip",(function(){return zip_zip})),x.d($,"zipAll",(function(){return zipAll}));var E=x(1),C=x(3);function audit(w){return function auditOperatorFunction($){return $.lift(new k(w))}}var k=function(){function AuditOperator(w){this.durationSelector=w}return AuditOperator.prototype.call=function(w,$){return $.subscribe(new I(w,this.durationSelector))},AuditOperator}(),I=function(w){function AuditSubscriber($,x){var E=w.call(this,$)||this;return E.durationSelector=x,E.hasValue=!1,E}return E.__extends(AuditSubscriber,w),AuditSubscriber.prototype._next=function(w){if(this.value=w,this.hasValue=!0,!this.throttled){var $=void 0;try{$=(0,this.durationSelector)(w)}catch(w){return this.destination.error(w)}var x=Object(C.c)($,new C.a(this));!x||x.closed?this.clearThrottle():this.add(this.throttled=x)}},AuditSubscriber.prototype.clearThrottle=function(){var w=this.value,$=this.hasValue,x=this.throttled;x&&(this.remove(x),this.throttled=void 0,x.unsubscribe()),$&&(this.value=void 0,this.hasValue=!1,this.destination.next(w))},AuditSubscriber.prototype.notifyNext=function(){this.clearThrottle()},AuditSubscriber.prototype.notifyComplete=function(){this.clearThrottle()},AuditSubscriber}(C.b),R=x(8),D=x(86);function auditTime(w,$){return void 0===$&&($=R.a),audit((function(){return Object(D.a)(w,$)}))}function buffer_buffer(w){return function bufferOperatorFunction($){return $.lift(new W(w))}}var W=function(){function BufferOperator(w){this.closingNotifier=w}return BufferOperator.prototype.call=function(w,$){return $.subscribe(new V(w,this.closingNotifier))},BufferOperator}(),V=function(w){function BufferSubscriber($,x){var E=w.call(this,$)||this;return E.buffer=[],E.add(Object(C.c)(x,new C.a(E))),E}return E.__extends(BufferSubscriber,w),BufferSubscriber.prototype._next=function(w){this.buffer.push(w)},BufferSubscriber.prototype.notifyNext=function(){var w=this.buffer;this.buffer=[],this.destination.next(w)},BufferSubscriber}(C.b),G=x(2);function bufferCount(w,$){return void 0===$&&($=null),function bufferCountOperatorFunction(x){return x.lift(new K(w,$))}}var K=function(){function BufferCountOperator(w,$){this.bufferSize=w,this.startBufferEvery=$,this.subscriberClass=$&&w!==$?ie:J}return BufferCountOperator.prototype.call=function(w,$){return $.subscribe(new this.subscriberClass(w,this.bufferSize,this.startBufferEvery))},BufferCountOperator}(),J=function(w){function BufferCountSubscriber($,x){var E=w.call(this,$)||this;return E.bufferSize=x,E.buffer=[],E}return E.__extends(BufferCountSubscriber,w),BufferCountSubscriber.prototype._next=function(w){var $=this.buffer;$.push(w),$.length==this.bufferSize&&(this.destination.next($),this.buffer=[])},BufferCountSubscriber.prototype._complete=function(){var $=this.buffer;$.length>0&&this.destination.next($),w.prototype._complete.call(this)},BufferCountSubscriber}(G.a),ie=function(w){function BufferSkipCountSubscriber($,x,E){var C=w.call(this,$)||this;return C.bufferSize=x,C.startBufferEvery=E,C.buffers=[],C.count=0,C}return E.__extends(BufferSkipCountSubscriber,w),BufferSkipCountSubscriber.prototype._next=function(w){var $=this.bufferSize,x=this.startBufferEvery,E=this.buffers,C=this.count;this.count++,C%x==0&&E.push([]);for(var k=E.length;k--;){var I=E[k];I.push(w),I.length===$&&(E.splice(k,1),this.destination.next(I))}},BufferSkipCountSubscriber.prototype._complete=function(){for(var $=this.buffers,x=this.destination;$.length>0;){var E=$.shift();E.length>0&&x.next(E)}w.prototype._complete.call(this)},BufferSkipCountSubscriber}(G.a),oe=x(11);function bufferTime(w){var $=arguments.length,x=R.a;Object(oe.a)(arguments[arguments.length-1])&&(x=arguments[arguments.length-1],$--);var E=null;$>=2&&(E=arguments[1]);var C=Number.POSITIVE_INFINITY;return $>=3&&(C=arguments[2]),function bufferTimeOperatorFunction($){return $.lift(new ue(w,E,C,x))}}var ue=function(){function BufferTimeOperator(w,$,x,E){this.bufferTimeSpan=w,this.bufferCreationInterval=$,this.maxBufferSize=x,this.scheduler=E}return BufferTimeOperator.prototype.call=function(w,$){return $.subscribe(new se(w,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},BufferTimeOperator}(),ae=function(){return function Context(){this.buffer=[]}}(),se=function(w){function BufferTimeSubscriber($,x,E,C,k){var I=w.call(this,$)||this;I.bufferTimeSpan=x,I.bufferCreationInterval=E,I.maxBufferSize=C,I.scheduler=k,I.contexts=[];var R=I.openContext();if(I.timespanOnly=null==E||E<0,I.timespanOnly){var D={subscriber:I,context:R,bufferTimeSpan:x};I.add(R.closeAction=k.schedule(dispatchBufferTimeSpanOnly,x,D))}else{var W={subscriber:I,context:R},V={bufferTimeSpan:x,bufferCreationInterval:E,subscriber:I,scheduler:k};I.add(R.closeAction=k.schedule(dispatchBufferClose,x,W)),I.add(k.schedule(dispatchBufferCreation,E,V))}return I}return E.__extends(BufferTimeSubscriber,w),BufferTimeSubscriber.prototype._next=function(w){for(var $,x=this.contexts,E=x.length,C=0;C0;){var E=$.shift();x.next(E.buffer)}w.prototype._complete.call(this)},BufferTimeSubscriber.prototype._unsubscribe=function(){this.contexts=null},BufferTimeSubscriber.prototype.onBufferFull=function(w){this.closeContext(w);var $=w.closeAction;if($.unsubscribe(),this.remove($),!this.closed&&this.timespanOnly){w=this.openContext();var x=this.bufferTimeSpan,E={subscriber:this,context:w,bufferTimeSpan:x};this.add(w.closeAction=this.scheduler.schedule(dispatchBufferTimeSpanOnly,x,E))}},BufferTimeSubscriber.prototype.openContext=function(){var w=new ae;return this.contexts.push(w),w},BufferTimeSubscriber.prototype.closeContext=function(w){this.destination.next(w.buffer);var $=this.contexts;($?$.indexOf(w):-1)>=0&&$.splice($.indexOf(w),1)},BufferTimeSubscriber}(G.a);function dispatchBufferTimeSpanOnly(w){var $=w.subscriber,x=w.context;x&&$.closeContext(x),$.closed||(w.context=$.openContext(),w.context.closeAction=this.schedule(w,w.bufferTimeSpan))}function dispatchBufferCreation(w){var $=w.bufferCreationInterval,x=w.bufferTimeSpan,E=w.subscriber,C=w.scheduler,k=E.openContext();E.closed||(E.add(k.closeAction=C.schedule(dispatchBufferClose,x,{subscriber:E,context:k})),this.schedule(w,$))}function dispatchBufferClose(w){var $=w.subscriber,x=w.context;$.closeContext(x)}var de=x(6),le=x(18),pe=x(21);function bufferToggle(w,$){return function bufferToggleOperatorFunction(x){return x.lift(new he(w,$))}}var he=function(){function BufferToggleOperator(w,$){this.openings=w,this.closingSelector=$}return BufferToggleOperator.prototype.call=function(w,$){return $.subscribe(new ve(w,this.openings,this.closingSelector))},BufferToggleOperator}(),ve=function(w){function BufferToggleSubscriber($,x,E){var C=w.call(this,$)||this;return C.closingSelector=E,C.contexts=[],C.add(Object(le.a)(C,x)),C}return E.__extends(BufferToggleSubscriber,w),BufferToggleSubscriber.prototype._next=function(w){for(var $=this.contexts,x=$.length,E=0;E0;){var E=x.shift();E.subscription.unsubscribe(),E.buffer=null,E.subscription=null}this.contexts=null,w.prototype._error.call(this,$)},BufferToggleSubscriber.prototype._complete=function(){for(var $=this.contexts;$.length>0;){var x=$.shift();this.destination.next(x.buffer),x.subscription.unsubscribe(),x.buffer=null,x.subscription=null}this.contexts=null,w.prototype._complete.call(this)},BufferToggleSubscriber.prototype.notifyNext=function(w,$){w?this.closeBuffer(w):this.openBuffer($)},BufferToggleSubscriber.prototype.notifyComplete=function(w){this.closeBuffer(w.context)},BufferToggleSubscriber.prototype.openBuffer=function(w){try{var $=this.closingSelector.call(this,w);$&&this.trySubscribe($)}catch(w){this._error(w)}},BufferToggleSubscriber.prototype.closeBuffer=function(w){var $=this.contexts;if($&&w){var x=w.buffer,E=w.subscription;this.destination.next(x),$.splice($.indexOf(w),1),this.remove(E),E.unsubscribe()}},BufferToggleSubscriber.prototype.trySubscribe=function(w){var $=this.contexts,x=new de.a,E={buffer:[],subscription:x};$.push(E);var C=Object(le.a)(this,w,E);!C||C.closed?this.closeBuffer(E):(C.context=E,this.add(C),x.add(C))},BufferToggleSubscriber}(pe.a);function bufferWhen(w){return function($){return $.lift(new ge(w))}}var ge=function(){function BufferWhenOperator(w){this.closingSelector=w}return BufferWhenOperator.prototype.call=function(w,$){return $.subscribe(new Se(w,this.closingSelector))},BufferWhenOperator}(),Se=function(w){function BufferWhenSubscriber($,x){var E=w.call(this,$)||this;return E.closingSelector=x,E.subscribing=!1,E.openBuffer(),E}return E.__extends(BufferWhenSubscriber,w),BufferWhenSubscriber.prototype._next=function(w){this.buffer.push(w)},BufferWhenSubscriber.prototype._complete=function(){var $=this.buffer;$&&this.destination.next($),w.prototype._complete.call(this)},BufferWhenSubscriber.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},BufferWhenSubscriber.prototype.notifyNext=function(){this.openBuffer()},BufferWhenSubscriber.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},BufferWhenSubscriber.prototype.openBuffer=function(){var w=this.closingSubscription;w&&(this.remove(w),w.unsubscribe());var $,x=this.buffer;this.buffer&&this.destination.next(x),this.buffer=[];try{$=(0,this.closingSelector)()}catch(w){return this.error(w)}w=new de.a,this.closingSubscription=w,this.add(w),this.subscribing=!0,w.add(Object(C.c)($,new C.a(this))),this.subscribing=!1},BufferWhenSubscriber}(C.b);function catchError(w){return function catchErrorOperatorFunction($){var x=new we(w),E=$.lift(x);return x.caught=E}}var we=function(){function CatchOperator(w){this.selector=w}return CatchOperator.prototype.call=function(w,$){return $.subscribe(new Ce(w,this.selector,this.caught))},CatchOperator}(),Ce=function(w){function CatchSubscriber($,x,E){var C=w.call(this,$)||this;return C.selector=x,C.caught=E,C}return E.__extends(CatchSubscriber,w),CatchSubscriber.prototype.error=function($){if(!this.isStopped){var x=void 0;try{x=this.selector($,this.caught)}catch($){return void w.prototype.error.call(this,$)}this._unsubscribeAndRecycle();var E=new C.a(this);this.add(E);var k=Object(C.c)(x,E);k!==E&&this.add(k)}},CatchSubscriber}(C.b),Pe=x(59);function combineAll(w){return function($){return $.lift(new Pe.a(w))}}var Ie=x(9),Fe=x(14);function combineLatest_combineLatest(){for(var w=[],$=0;$0&&x[0].time-E.now()<=0;)x.shift().notification.observe(C);if(x.length>0){var k=Math.max(0,x[0].time-E.now());this.schedule(w,k)}else this.unsubscribe(),$.active=!1},DelaySubscriber.prototype._schedule=function(w){this.active=!0,this.destination.add(w.schedule(DelaySubscriber.dispatch,this.delay,{source:this,destination:this.destination,scheduler:w}))},DelaySubscriber.prototype.scheduleNotification=function(w){if(!0!==this.errored){var $=this.scheduler,x=new ot($.now()+this.delay,w);this.queue.push(x),!1===this.active&&this._schedule($)}},DelaySubscriber.prototype._next=function(w){this.scheduleNotification(rt.a.createNext(w))},DelaySubscriber.prototype._error=function(w){this.errored=!0,this.queue=[],this.destination.error(w),this.unsubscribe()},DelaySubscriber.prototype._complete=function(){this.scheduleNotification(rt.a.createComplete()),this.unsubscribe()},DelaySubscriber}(G.a),ot=function(){return function DelayMessage(w,$){this.time=w,this.notification=$}}(),ut=x(4);function delayWhen(w,$){return $?function(x){return new ct(x,$).lift(new at(w))}:function($){return $.lift(new at(w))}}var at=function(){function DelayWhenOperator(w){this.delayDurationSelector=w}return DelayWhenOperator.prototype.call=function(w,$){return $.subscribe(new st(w,this.delayDurationSelector))},DelayWhenOperator}(),st=function(w){function DelayWhenSubscriber($,x){var E=w.call(this,$)||this;return E.delayDurationSelector=x,E.completed=!1,E.delayNotifierSubscriptions=[],E.index=0,E}return E.__extends(DelayWhenSubscriber,w),DelayWhenSubscriber.prototype.notifyNext=function(w,$,x,E,C){this.destination.next(w),this.removeSubscription(C),this.tryComplete()},DelayWhenSubscriber.prototype.notifyError=function(w,$){this._error(w)},DelayWhenSubscriber.prototype.notifyComplete=function(w){var $=this.removeSubscription(w);$&&this.destination.next($),this.tryComplete()},DelayWhenSubscriber.prototype._next=function(w){var $=this.index++;try{var x=this.delayDurationSelector(w,$);x&&this.tryDelay(x,w)}catch(w){this.destination.error(w)}},DelayWhenSubscriber.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},DelayWhenSubscriber.prototype.removeSubscription=function(w){w.unsubscribe();var $=this.delayNotifierSubscriptions.indexOf(w);return-1!==$&&this.delayNotifierSubscriptions.splice($,1),w.outerValue},DelayWhenSubscriber.prototype.tryDelay=function(w,$){var x=Object(le.a)(this,w,$);x&&!x.closed&&(this.destination.add(x),this.delayNotifierSubscriptions.push(x))},DelayWhenSubscriber.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},DelayWhenSubscriber}(pe.a),ct=function(w){function SubscriptionDelayObservable($,x){var E=w.call(this)||this;return E.source=$,E.subscriptionDelay=x,E}return E.__extends(SubscriptionDelayObservable,w),SubscriptionDelayObservable.prototype._subscribe=function(w){this.subscriptionDelay.subscribe(new dt(w,this.source))},SubscriptionDelayObservable}(ut.a),dt=function(w){function SubscriptionDelaySubscriber($,x){var E=w.call(this)||this;return E.parent=$,E.source=x,E.sourceSubscribed=!1,E}return E.__extends(SubscriptionDelaySubscriber,w),SubscriptionDelaySubscriber.prototype._next=function(w){this.subscribeToSource()},SubscriptionDelaySubscriber.prototype._error=function(w){this.unsubscribe(),this.parent.error(w)},SubscriptionDelaySubscriber.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},SubscriptionDelaySubscriber.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},SubscriptionDelaySubscriber}(G.a);function dematerialize(){return function dematerializeOperatorFunction(w){return w.lift(new lt)}}var lt=function(){function DeMaterializeOperator(){}return DeMaterializeOperator.prototype.call=function(w,$){return $.subscribe(new ft(w))},DeMaterializeOperator}(),ft=function(w){function DeMaterializeSubscriber($){return w.call(this,$)||this}return E.__extends(DeMaterializeSubscriber,w),DeMaterializeSubscriber.prototype._next=function(w){w.observe(this.destination)},DeMaterializeSubscriber}(G.a);function distinct(w,$){return function(x){return x.lift(new pt(w,$))}}var pt=function(){function DistinctOperator(w,$){this.keySelector=w,this.flushes=$}return DistinctOperator.prototype.call=function(w,$){return $.subscribe(new ht(w,this.keySelector,this.flushes))},DistinctOperator}(),ht=function(w){function DistinctSubscriber($,x,E){var k=w.call(this,$)||this;return k.keySelector=x,k.values=new Set,E&&k.add(Object(C.c)(E,new C.a(k))),k}return E.__extends(DistinctSubscriber,w),DistinctSubscriber.prototype.notifyNext=function(){this.values.clear()},DistinctSubscriber.prototype.notifyError=function(w){this._error(w)},DistinctSubscriber.prototype._next=function(w){this.keySelector?this._useKeySelector(w):this._finalizeNext(w,w)},DistinctSubscriber.prototype._useKeySelector=function(w){var $,x=this.destination;try{$=this.keySelector(w)}catch(w){return void x.error(w)}this._finalizeNext($,w)},DistinctSubscriber.prototype._finalizeNext=function(w,$){var x=this.values;x.has(w)||(x.add(w),this.destination.next($))},DistinctSubscriber}(C.b);function distinctUntilChanged(w,$){return function(x){return x.lift(new bt(w,$))}}var bt=function(){function DistinctUntilChangedOperator(w,$){this.compare=w,this.keySelector=$}return DistinctUntilChangedOperator.prototype.call=function(w,$){return $.subscribe(new vt(w,this.compare,this.keySelector))},DistinctUntilChangedOperator}(),vt=function(w){function DistinctUntilChangedSubscriber($,x,E){var C=w.call(this,$)||this;return C.keySelector=E,C.hasKey=!1,"function"==typeof x&&(C.compare=x),C}return E.__extends(DistinctUntilChangedSubscriber,w),DistinctUntilChangedSubscriber.prototype.compare=function(w,$){return w===$},DistinctUntilChangedSubscriber.prototype._next=function(w){var $;try{var x=this.keySelector;$=x?x(w):w}catch(w){return this.destination.error(w)}var E=!1;if(this.hasKey)try{E=(0,this.compare)(this.key,$)}catch(w){return this.destination.error(w)}else this.hasKey=!0;E||(this.key=$,this.destination.next(w))},DistinctUntilChangedSubscriber}(G.a);function distinctUntilKeyChanged(w,$){return distinctUntilChanged((function(x,E){return $?$(x[w],E[w]):x[w]===E[w]}))}var yt=x(28),mt=x(22),gt=x(31);function throwIfEmpty(w){return void 0===w&&(w=defaultErrorFactory),function($){return $.lift(new St(w))}}var St=function(){function ThrowIfEmptyOperator(w){this.errorFactory=w}return ThrowIfEmptyOperator.prototype.call=function(w,$){return $.subscribe(new wt(w,this.errorFactory))},ThrowIfEmptyOperator}(),wt=function(w){function ThrowIfEmptySubscriber($,x){var E=w.call(this,$)||this;return E.errorFactory=x,E.hasValue=!1,E}return E.__extends(ThrowIfEmptySubscriber,w),ThrowIfEmptySubscriber.prototype._next=function(w){this.hasValue=!0,this.destination.next(w)},ThrowIfEmptySubscriber.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var w=void 0;try{w=this.errorFactory()}catch($){w=$}this.destination.error(w)},ThrowIfEmptySubscriber}(G.a);function defaultErrorFactory(){return new gt.a}var _t=x(13);function take(w){return function($){return 0===w?Object(_t.b)():$.lift(new $t(w))}}var $t=function(){function TakeOperator(w){if(this.total=w,this.total<0)throw new yt.a}return TakeOperator.prototype.call=function(w,$){return $.subscribe(new xt(w,this.total))},TakeOperator}(),xt=function(w){function TakeSubscriber($,x){var E=w.call(this,$)||this;return E.total=x,E.count=0,E}return E.__extends(TakeSubscriber,w),TakeSubscriber.prototype._next=function(w){var $=this.total,x=++this.count;x<=$&&(this.destination.next(w),x===$&&(this.destination.complete(),this.unsubscribe()))},TakeSubscriber}(G.a);function elementAt(w,$){if(w<0)throw new yt.a;var x=arguments.length>=2;return function(E){return E.pipe(Object(mt.a)((function($,x){return x===w})),take(1),x?defaultIfEmpty($):throwIfEmpty((function(){return new yt.a})))}}var Ot=x(45);function endWith(){for(var w=[],$=0;$0&&this._next(w.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},ExpandSubscriber}(C.b);function finalize(w){return function($){return $.lift(new Mt(w))}}var Mt=function(){function FinallyOperator(w){this.callback=w}return FinallyOperator.prototype.call=function(w,$){return $.subscribe(new Ft(w,this.callback))},FinallyOperator}(),Ft=function(w){function FinallySubscriber($,x){var E=w.call(this,$)||this;return E.add(new de.a(x)),E}return E.__extends(FinallySubscriber,w),FinallySubscriber}(G.a);function find(w,$){if("function"!=typeof w)throw new TypeError("predicate is not a function");return function(x){return x.lift(new Rt(w,x,!1,$))}}var Rt=function(){function FindValueOperator(w,$,x,E){this.predicate=w,this.source=$,this.yieldIndex=x,this.thisArg=E}return FindValueOperator.prototype.call=function(w,$){return $.subscribe(new Lt(w,this.predicate,this.source,this.yieldIndex,this.thisArg))},FindValueOperator}(),Lt=function(w){function FindValueSubscriber($,x,E,C,k){var I=w.call(this,$)||this;return I.predicate=x,I.source=E,I.yieldIndex=C,I.thisArg=k,I.index=0,I}return E.__extends(FindValueSubscriber,w),FindValueSubscriber.prototype.notifyComplete=function(w){var $=this.destination;$.next(w),$.complete(),this.unsubscribe()},FindValueSubscriber.prototype._next=function(w){var $=this.predicate,x=this.thisArg,E=this.index++;try{$.call(x||this,w,E,this.source)&&this.notifyComplete(this.yieldIndex?E:w)}catch(w){this.destination.error(w)}},FindValueSubscriber.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},FindValueSubscriber}(G.a);function findIndex(w,$){return function(x){return x.lift(new Rt(w,x,!0,$))}}var Bt=x(20);function first(w,$){var x=arguments.length>=2;return function(E){return E.pipe(w?Object(mt.a)((function($,x){return w($,x,E)})):Bt.a,take(1),x?defaultIfEmpty($):throwIfEmpty((function(){return new gt.a})))}}var Dt=x(77);function ignoreElements(){return function ignoreElementsOperatorFunction(w){return w.lift(new Wt)}}var Wt=function(){function IgnoreElementsOperator(){}return IgnoreElementsOperator.prototype.call=function(w,$){return $.subscribe(new Vt(w))},IgnoreElementsOperator}(),Vt=function(w){function IgnoreElementsSubscriber(){return null!==w&&w.apply(this,arguments)||this}return E.__extends(IgnoreElementsSubscriber,w),IgnoreElementsSubscriber.prototype._next=function(w){},IgnoreElementsSubscriber}(G.a);function isEmpty(){return function(w){return w.lift(new Ut)}}var Ut=function(){function IsEmptyOperator(){}return IsEmptyOperator.prototype.call=function(w,$){return $.subscribe(new qt(w))},IsEmptyOperator}(),qt=function(w){function IsEmptySubscriber($){return w.call(this,$)||this}return E.__extends(IsEmptySubscriber,w),IsEmptySubscriber.prototype.notifyComplete=function(w){var $=this.destination;$.next(w),$.complete()},IsEmptySubscriber.prototype._next=function(w){this.notifyComplete(!1)},IsEmptySubscriber.prototype._complete=function(){this.notifyComplete(!0)},IsEmptySubscriber}(G.a);function takeLast(w){return function takeLastOperatorFunction($){return 0===w?Object(_t.b)():$.lift(new zt(w))}}var zt=function(){function TakeLastOperator(w){if(this.total=w,this.total<0)throw new yt.a}return TakeLastOperator.prototype.call=function(w,$){return $.subscribe(new Gt(w,this.total))},TakeLastOperator}(),Gt=function(w){function TakeLastSubscriber($,x){var E=w.call(this,$)||this;return E.total=x,E.ring=new Array,E.count=0,E}return E.__extends(TakeLastSubscriber,w),TakeLastSubscriber.prototype._next=function(w){var $=this.ring,x=this.total,E=this.count++;$.length0)for(var x=this.count>=this.total?this.total:this.count,E=this.ring,C=0;C=2;return function(E){return E.pipe(w?Object(mt.a)((function($,x){return w($,x,E)})):Bt.a,takeLast(1),x?defaultIfEmpty($):throwIfEmpty((function(){return new gt.a})))}}function mapTo(w){return function($){return $.lift(new Yt(w))}}var Yt=function(){function MapToOperator(w){this.value=w}return MapToOperator.prototype.call=function(w,$){return $.subscribe(new Ht(w,this.value))},MapToOperator}(),Ht=function(w){function MapToSubscriber($,x){var E=w.call(this,$)||this;return E.value=x,E}return E.__extends(MapToSubscriber,w),MapToSubscriber.prototype._next=function(w){this.destination.next(this.value)},MapToSubscriber}(G.a);function materialize(){return function materializeOperatorFunction(w){return w.lift(new Kt)}}var Kt=function(){function MaterializeOperator(){}return MaterializeOperator.prototype.call=function(w,$){return $.subscribe(new Xt(w))},MaterializeOperator}(),Xt=function(w){function MaterializeSubscriber($){return w.call(this,$)||this}return E.__extends(MaterializeSubscriber,w),MaterializeSubscriber.prototype._next=function(w){this.destination.next(rt.a.createNext(w))},MaterializeSubscriber.prototype._error=function(w){var $=this.destination;$.next(rt.a.createError(w)),$.complete()},MaterializeSubscriber.prototype._complete=function(){var w=this.destination;w.next(rt.a.createComplete()),w.complete()},MaterializeSubscriber}(G.a);function scan(w,$){var x=!1;return arguments.length>=2&&(x=!0),function scanOperatorFunction(E){return E.lift(new Zt(w,$,x))}}var Zt=function(){function ScanOperator(w,$,x){void 0===x&&(x=!1),this.accumulator=w,this.seed=$,this.hasSeed=x}return ScanOperator.prototype.call=function(w,$){return $.subscribe(new Jt(w,this.accumulator,this.seed,this.hasSeed))},ScanOperator}(),Jt=function(w){function ScanSubscriber($,x,E,C){var k=w.call(this,$)||this;return k.accumulator=x,k._seed=E,k.hasSeed=C,k.index=0,k}return E.__extends(ScanSubscriber,w),Object.defineProperty(ScanSubscriber.prototype,"seed",{get:function(){return this._seed},set:function(w){this.hasSeed=!0,this._seed=w},enumerable:!0,configurable:!0}),ScanSubscriber.prototype._next=function(w){if(this.hasSeed)return this._tryNext(w);this.seed=w,this.destination.next(w)},ScanSubscriber.prototype._tryNext=function(w){var $,x=this.index++;try{$=this.accumulator(this.seed,w,x)}catch(w){this.destination.error(w)}this.seed=$,this.destination.next($)},ScanSubscriber}(G.a),Qt=x(48);function reduce(w,$){return arguments.length>=2?function reduceOperatorFunctionWithSeed(x){return Object(Qt.a)(scan(w,$),takeLast(1),defaultIfEmpty($))(x)}:function reduceOperatorFunction($){return Object(Qt.a)(scan((function($,x,E){return w($,x,E+1)})),takeLast(1))($)}}function max_max(w){return reduce("function"==typeof w?function($,x){return w($,x)>0?$:x}:function(w,$){return w>$?w:$})}var er=x(84);function merge_merge(){for(var w=[],$=0;$0?this._next(w.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},MergeScanSubscriber}(C.b);function min_min(w){return reduce("function"==typeof w?function($,x){return w($,x)<0?$:x}:function(w,$){return w<$?w:$})}var ir=x(79);function multicast(w,$){return function multicastOperatorFunction(x){var E;if(E="function"==typeof w?w:function subjectFactory(){return w},"function"==typeof $)return x.lift(new or(E,$));var C=Object.create(x,ir.b);return C.source=x,C.subjectFactory=E,C}}var or=function(){function MulticastOperator(w,$){this.subjectFactory=w,this.selector=$}return MulticastOperator.prototype.call=function(w,$){var x=this.selector,E=this.subjectFactory(),C=x(E).subscribe(w);return C.add($.subscribe(E)),C},MulticastOperator}(),ur=x(81);function onErrorResumeNext(){for(var w=[],$=0;$-1&&(this.count=x-1),$.subscribe(this._unsubscribeAndRecycle())}},RepeatSubscriber}(G.a);function repeatWhen(w){return function($){return $.lift(new gr(w))}}var gr=function(){function RepeatWhenOperator(w){this.notifier=w}return RepeatWhenOperator.prototype.call=function(w,$){return $.subscribe(new Sr(w,this.notifier,$))},RepeatWhenOperator}(),Sr=function(w){function RepeatWhenSubscriber($,x,E){var C=w.call(this,$)||this;return C.notifier=x,C.source=E,C.sourceIsBeingSubscribedTo=!0,C}return E.__extends(RepeatWhenSubscriber,w),RepeatWhenSubscriber.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},RepeatWhenSubscriber.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return w.prototype.complete.call(this)},RepeatWhenSubscriber.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return w.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},RepeatWhenSubscriber.prototype._unsubscribe=function(){var w=this.notifications,$=this.retriesSubscription;w&&(w.unsubscribe(),this.notifications=void 0),$&&($.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},RepeatWhenSubscriber.prototype._unsubscribeAndRecycle=function(){var $=this._unsubscribe;return this._unsubscribe=null,w.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=$,this},RepeatWhenSubscriber.prototype.subscribeToRetries=function(){var $;this.notifications=new fr.a;try{$=(0,this.notifier)(this.notifications)}catch($){return w.prototype.complete.call(this)}this.retries=$,this.retriesSubscription=Object(C.c)($,new C.a(this))},RepeatWhenSubscriber}(C.b);function retry(w){return void 0===w&&(w=-1),function($){return $.lift(new wr(w,$))}}var wr=function(){function RetryOperator(w,$){this.count=w,this.source=$}return RetryOperator.prototype.call=function(w,$){return $.subscribe(new _r(w,this.count,this.source))},RetryOperator}(),_r=function(w){function RetrySubscriber($,x,E){var C=w.call(this,$)||this;return C.count=x,C.source=E,C}return E.__extends(RetrySubscriber,w),RetrySubscriber.prototype.error=function($){if(!this.isStopped){var x=this.source,E=this.count;if(0===E)return w.prototype.error.call(this,$);E>-1&&(this.count=E-1),x.subscribe(this._unsubscribeAndRecycle())}},RetrySubscriber}(G.a);function retryWhen(w){return function($){return $.lift(new $r(w,$))}}var $r=function(){function RetryWhenOperator(w,$){this.notifier=w,this.source=$}return RetryWhenOperator.prototype.call=function(w,$){return $.subscribe(new xr(w,this.notifier,this.source))},RetryWhenOperator}(),xr=function(w){function RetryWhenSubscriber($,x,E){var C=w.call(this,$)||this;return C.notifier=x,C.source=E,C}return E.__extends(RetryWhenSubscriber,w),RetryWhenSubscriber.prototype.error=function($){if(!this.isStopped){var x=this.errors,E=this.retries,k=this.retriesSubscription;if(E)this.errors=void 0,this.retriesSubscription=void 0;else{x=new fr.a;try{E=(0,this.notifier)(x)}catch($){return w.prototype.error.call(this,$)}k=Object(C.c)(E,new C.a(this))}this._unsubscribeAndRecycle(),this.errors=x,this.retries=E,this.retriesSubscription=k,x.next($)}},RetryWhenSubscriber.prototype._unsubscribe=function(){var w=this.errors,$=this.retriesSubscription;w&&(w.unsubscribe(),this.errors=void 0),$&&($.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},RetryWhenSubscriber.prototype.notifyNext=function(){var w=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=w,this.source.subscribe(this)},RetryWhenSubscriber}(C.b),Or=x(56);function sample(w){return function($){return $.lift(new Er(w))}}var Er=function(){function SampleOperator(w){this.notifier=w}return SampleOperator.prototype.call=function(w,$){var x=new Cr(w),E=$.subscribe(x);return E.add(Object(C.c)(this.notifier,new C.a(x))),E},SampleOperator}(),Cr=function(w){function SampleSubscriber(){var $=null!==w&&w.apply(this,arguments)||this;return $.hasValue=!1,$}return E.__extends(SampleSubscriber,w),SampleSubscriber.prototype._next=function(w){this.value=w,this.hasValue=!0},SampleSubscriber.prototype.notifyNext=function(){this.emitValue()},SampleSubscriber.prototype.notifyComplete=function(){this.emitValue()},SampleSubscriber.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},SampleSubscriber}(C.b);function sampleTime(w,$){return void 0===$&&($=R.a),function(x){return x.lift(new Pr(w,$))}}var Pr=function(){function SampleTimeOperator(w,$){this.period=w,this.scheduler=$}return SampleTimeOperator.prototype.call=function(w,$){return $.subscribe(new jr(w,this.period,this.scheduler))},SampleTimeOperator}(),jr=function(w){function SampleTimeSubscriber($,x,E){var C=w.call(this,$)||this;return C.period=x,C.scheduler=E,C.hasValue=!1,C.add(E.schedule(dispatchNotification,x,{subscriber:C,period:x})),C}return E.__extends(SampleTimeSubscriber,w),SampleTimeSubscriber.prototype._next=function(w){this.lastValue=w,this.hasValue=!0},SampleTimeSubscriber.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},SampleTimeSubscriber}(G.a);function dispatchNotification(w){var $=w.subscriber,x=w.period;$.notifyNext(),this.schedule(w,x)}function sequenceEqual(w,$){return function(x){return x.lift(new Tr(w,$))}}var Tr=function(){function SequenceEqualOperator(w,$){this.compareTo=w,this.comparator=$}return SequenceEqualOperator.prototype.call=function(w,$){return $.subscribe(new kr(w,this.compareTo,this.comparator))},SequenceEqualOperator}(),kr=function(w){function SequenceEqualSubscriber($,x,E){var C=w.call(this,$)||this;return C.compareTo=x,C.comparator=E,C._a=[],C._b=[],C._oneComplete=!1,C.destination.add(x.subscribe(new Nr($,C))),C}return E.__extends(SequenceEqualSubscriber,w),SequenceEqualSubscriber.prototype._next=function(w){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(w),this.checkValues())},SequenceEqualSubscriber.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},SequenceEqualSubscriber.prototype.checkValues=function(){for(var w=this._a,$=this._b,x=this.comparator;w.length>0&&$.length>0;){var E=w.shift(),C=$.shift(),k=!1;try{k=x?x(E,C):E===C}catch(w){this.destination.error(w)}k||this.emit(!1)}},SequenceEqualSubscriber.prototype.emit=function(w){var $=this.destination;$.next(w),$.complete()},SequenceEqualSubscriber.prototype.nextB=function(w){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(w),this.checkValues())},SequenceEqualSubscriber.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},SequenceEqualSubscriber}(G.a),Nr=function(w){function SequenceEqualCompareToSubscriber($,x){var E=w.call(this,$)||this;return E.parent=x,E}return E.__extends(SequenceEqualCompareToSubscriber,w),SequenceEqualCompareToSubscriber.prototype._next=function(w){this.parent.nextB(w)},SequenceEqualCompareToSubscriber.prototype._error=function(w){this.parent.error(w),this.unsubscribe()},SequenceEqualCompareToSubscriber.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},SequenceEqualCompareToSubscriber}(G.a);function shareSubjectFactory(){return new fr.a}function share(){return function(w){return Object(Or.a)()(multicast(shareSubjectFactory)(w))}}function shareReplay(w,$,x){var E;return E=w&&"object"==typeof w?w:{bufferSize:w,windowTime:$,refCount:!1,scheduler:x},function(w){return w.lift(function shareReplayOperator(w){var $,x,E=w.bufferSize,C=void 0===E?Number.POSITIVE_INFINITY:E,k=w.windowTime,I=void 0===k?Number.POSITIVE_INFINITY:k,R=w.refCount,D=w.scheduler,W=0,V=!1,G=!1;return function shareReplayOperation(w){var E;W++,!$||V?(V=!1,$=new br.a(C,I,D),E=$.subscribe(this),x=w.subscribe({next:function(w){$.next(w)},error:function(w){V=!0,$.error(w)},complete:function(){G=!0,x=void 0,$.complete()}}),G&&(x=void 0)):E=$.subscribe(this),this.add((function(){W--,E.unsubscribe(),E=void 0,x&&!G&&R&&0===W&&(x.unsubscribe(),x=void 0,$=void 0)}))}}(E))}}function single(w){return function($){return $.lift(new Ar(w,$))}}var Ar=function(){function SingleOperator(w,$){this.predicate=w,this.source=$}return SingleOperator.prototype.call=function(w,$){return $.subscribe(new Ir(w,this.predicate,this.source))},SingleOperator}(),Ir=function(w){function SingleSubscriber($,x,E){var C=w.call(this,$)||this;return C.predicate=x,C.source=E,C.seenValue=!1,C.index=0,C}return E.__extends(SingleSubscriber,w),SingleSubscriber.prototype.applySingleValue=function(w){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=w)},SingleSubscriber.prototype._next=function(w){var $=this.index++;this.predicate?this.tryNext(w,$):this.applySingleValue(w)},SingleSubscriber.prototype.tryNext=function(w,$){try{this.predicate(w,$,this.source)&&this.applySingleValue(w)}catch(w){this.destination.error(w)}},SingleSubscriber.prototype._complete=function(){var w=this.destination;this.index>0?(w.next(this.seenValue?this.singleValue:void 0),w.complete()):w.error(new gt.a)},SingleSubscriber}(G.a);function skip(w){return function($){return $.lift(new Mr(w))}}var Mr=function(){function SkipOperator(w){this.total=w}return SkipOperator.prototype.call=function(w,$){return $.subscribe(new Fr(w,this.total))},SkipOperator}(),Fr=function(w){function SkipSubscriber($,x){var E=w.call(this,$)||this;return E.total=x,E.count=0,E}return E.__extends(SkipSubscriber,w),SkipSubscriber.prototype._next=function(w){++this.count>this.total&&this.destination.next(w)},SkipSubscriber}(G.a);function skipLast(w){return function($){return $.lift(new Rr(w))}}var Rr=function(){function SkipLastOperator(w){if(this._skipCount=w,this._skipCount<0)throw new yt.a}return SkipLastOperator.prototype.call=function(w,$){return 0===this._skipCount?$.subscribe(new G.a(w)):$.subscribe(new Lr(w,this._skipCount))},SkipLastOperator}(),Lr=function(w){function SkipLastSubscriber($,x){var E=w.call(this,$)||this;return E._skipCount=x,E._count=0,E._ring=new Array(x),E}return E.__extends(SkipLastSubscriber,w),SkipLastSubscriber.prototype._next=function(w){var $=this._skipCount,x=this._count++;if(x<$)this._ring[x]=w;else{var E=x%$,C=this._ring,k=C[E];C[E]=w,this.destination.next(k)}},SkipLastSubscriber}(G.a);function skipUntil(w){return function($){return $.lift(new Br(w))}}var Br=function(){function SkipUntilOperator(w){this.notifier=w}return SkipUntilOperator.prototype.call=function(w,$){return $.subscribe(new Dr(w,this.notifier))},SkipUntilOperator}(),Dr=function(w){function SkipUntilSubscriber($,x){var E=w.call(this,$)||this;E.hasValue=!1;var k=new C.a(E);E.add(k),E.innerSubscription=k;var I=Object(C.c)(x,k);return I!==k&&(E.add(I),E.innerSubscription=I),E}return E.__extends(SkipUntilSubscriber,w),SkipUntilSubscriber.prototype._next=function($){this.hasValue&&w.prototype._next.call(this,$)},SkipUntilSubscriber.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},SkipUntilSubscriber.prototype.notifyComplete=function(){},SkipUntilSubscriber}(C.b);function skipWhile(w){return function($){return $.lift(new Wr(w))}}var Wr=function(){function SkipWhileOperator(w){this.predicate=w}return SkipWhileOperator.prototype.call=function(w,$){return $.subscribe(new Vr(w,this.predicate))},SkipWhileOperator}(),Vr=function(w){function SkipWhileSubscriber($,x){var E=w.call(this,$)||this;return E.predicate=x,E.skipping=!0,E.index=0,E}return E.__extends(SkipWhileSubscriber,w),SkipWhileSubscriber.prototype._next=function(w){var $=this.destination;this.skipping&&this.tryCallPredicate(w),this.skipping||$.next(w)},SkipWhileSubscriber.prototype.tryCallPredicate=function(w){try{var $=this.predicate(w,this.index++);this.skipping=Boolean($)}catch(w){this.destination.error(w)}},SkipWhileSubscriber}(G.a);function startWith(){for(var w=[],$=0;$0?this.startWindowEvery:this.windowSize,x=this.destination,E=this.windowSize,C=this.windows,k=C.length,I=0;I=0&&R%$==0&&!this.closed&&C.shift().complete(),++this.count%$==0&&!this.closed){var D=new fr.a;C.push(D),x.next(D)}},WindowCountSubscriber.prototype._error=function(w){var $=this.windows;if($)for(;$.length>0&&!this.closed;)$.shift().error(w);this.destination.error(w)},WindowCountSubscriber.prototype._complete=function(){var w=this.windows;if(w)for(;w.length>0&&!this.closed;)w.shift().complete();this.destination.complete()},WindowCountSubscriber.prototype._unsubscribe=function(){this.count=0,this.windows=null},WindowCountSubscriber}(G.a);function windowTime_windowTime(w){var $=R.a,x=null,E=Number.POSITIVE_INFINITY;return Object(oe.a)(arguments[3])&&($=arguments[3]),Object(oe.a)(arguments[2])?$=arguments[2]:Object(qr.a)(arguments[2])&&(E=Number(arguments[2])),Object(oe.a)(arguments[1])?$=arguments[1]:Object(qr.a)(arguments[1])&&(x=Number(arguments[1])),function windowTimeOperatorFunction(C){return C.lift(new wn(w,x,E,$))}}var wn=function(){function WindowTimeOperator(w,$,x,E){this.windowTimeSpan=w,this.windowCreationInterval=$,this.maxWindowSize=x,this.scheduler=E}return WindowTimeOperator.prototype.call=function(w,$){return $.subscribe(new $n(w,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},WindowTimeOperator}(),_n=function(w){function CountedSubject(){var $=null!==w&&w.apply(this,arguments)||this;return $._numberOfNextedValues=0,$}return E.__extends(CountedSubject,w),CountedSubject.prototype.next=function($){this._numberOfNextedValues++,w.prototype.next.call(this,$)},Object.defineProperty(CountedSubject.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),CountedSubject}(fr.a),$n=function(w){function WindowTimeSubscriber($,x,E,C,k){var I=w.call(this,$)||this;I.destination=$,I.windowTimeSpan=x,I.windowCreationInterval=E,I.maxWindowSize=C,I.scheduler=k,I.windows=[];var R=I.openWindow();if(null!==E&&E>=0){var D={subscriber:I,window:R,context:null},W={windowTimeSpan:x,windowCreationInterval:E,subscriber:I,scheduler:k};I.add(k.schedule(dispatchWindowClose,x,D)),I.add(k.schedule(dispatchWindowCreation,E,W))}else{var V={subscriber:I,window:R,windowTimeSpan:x};I.add(k.schedule(dispatchWindowTimeSpanOnly,x,V))}return I}return E.__extends(WindowTimeSubscriber,w),WindowTimeSubscriber.prototype._next=function(w){for(var $=this.windows,x=$.length,E=0;E=this.maxWindowSize&&this.closeWindow(C))}},WindowTimeSubscriber.prototype._error=function(w){for(var $=this.windows;$.length>0;)$.shift().error(w);this.destination.error(w)},WindowTimeSubscriber.prototype._complete=function(){for(var w=this.windows;w.length>0;){var $=w.shift();$.closed||$.complete()}this.destination.complete()},WindowTimeSubscriber.prototype.openWindow=function(){var w=new _n;return this.windows.push(w),this.destination.next(w),w},WindowTimeSubscriber.prototype.closeWindow=function(w){w.complete();var $=this.windows;$.splice($.indexOf(w),1)},WindowTimeSubscriber}(G.a);function dispatchWindowTimeSpanOnly(w){var $=w.subscriber,x=w.windowTimeSpan,E=w.window;E&&$.closeWindow(E),w.window=$.openWindow(),this.schedule(w,x)}function dispatchWindowCreation(w){var $=w.windowTimeSpan,x=w.subscriber,E=w.scheduler,C=w.windowCreationInterval,k=x.openWindow(),I={action:this,subscription:null},R={subscriber:x,window:k,context:I};I.subscription=E.schedule(dispatchWindowClose,$,R),this.add(I.subscription),this.schedule(w,C)}function dispatchWindowClose(w){var $=w.subscriber,x=w.window,E=w.context;E&&E.action&&E.subscription&&E.action.remove(E.subscription),$.closeWindow(x)}function windowToggle(w,$){return function(x){return x.lift(new xn(w,$))}}var xn=function(){function WindowToggleOperator(w,$){this.openings=w,this.closingSelector=$}return WindowToggleOperator.prototype.call=function(w,$){return $.subscribe(new On(w,this.openings,this.closingSelector))},WindowToggleOperator}(),On=function(w){function WindowToggleSubscriber($,x,E){var C=w.call(this,$)||this;return C.openings=x,C.closingSelector=E,C.contexts=[],C.add(C.openSubscription=Object(le.a)(C,x,x)),C}return E.__extends(WindowToggleSubscriber,w),WindowToggleSubscriber.prototype._next=function(w){var $=this.contexts;if($)for(var x=$.length,E=0;E0){var C=E.indexOf(x);-1!==C&&E.splice(C,1)}},WithLatestFromSubscriber.prototype.notifyComplete=function(){},WithLatestFromSubscriber.prototype._next=function(w){if(0===this.toRespond.length){var $=[w].concat(this.values);this.project?this._tryProject($):this.destination.next($)}},WithLatestFromSubscriber.prototype._tryProject=function(w){var $;try{$=this.project.apply(this,w)}catch(w){return void this.destination.error(w)}this.destination.next($)},WithLatestFromSubscriber}(pe.a),Tn=x(62);function zip_zip(){for(var w=[],$=0;$I)return 1;if(I>k)return-1;if(!isNaN(k)&&isNaN(I))return 1;if(isNaN(k)&&!isNaN(I))return-1}return w[1]&&$[1]?w[1]>$[1]?1:w[1]<$[1]?-1:0:!w[1]&&$[1]?1:w[1]&&!$[1]?-1:0};function _typeof(w){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(w){return typeof w}:function _typeof(w){return w&&"function"==typeof Symbol&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w})(w)}function metadata_classCallCheck(w,$){if(!(w instanceof $))throw new TypeError("Cannot call a class as a function")}function _defineProperties(w,$){for(var x=0;x<$.length;x++){var E=$[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}function _createClass(w,$,x){return $&&_defineProperties(w.prototype,$),x&&_defineProperties(w,x),w}var R=/^\d+$/,D=function(){function Metadata(w){metadata_classCallCheck(this,Metadata),function validateMetadata(w){if(!w)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!J(w)||!J(w.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(J(w)?"an object of shape: { "+Object.keys(w).join(", ")+" }":"a "+ie(w)+": "+w,"."))}(w),this.metadata=w,setVersion.call(this,w)}return _createClass(Metadata,[{key:"getCountries",value:function getCountries(){return Object.keys(this.metadata.countries).filter((function(w){return"001"!==w}))}},{key:"getCountryMetadata",value:function getCountryMetadata(w){return this.metadata.countries[w]}},{key:"nonGeographic",value:function nonGeographic(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function hasCountry(w){return void 0!==this.getCountryMetadata(w)}},{key:"hasCallingCode",value:function hasCallingCode(w){if(this.getCountryCodesForCallingCode(w))return!0;if(this.nonGeographic()){if(this.nonGeographic()[w])return!0}else{var $=this.countryCallingCodes()[w];if($&&1===$.length&&"001"===$[0])return!0}}},{key:"isNonGeographicCallingCode",value:function isNonGeographicCallingCode(w){return this.nonGeographic()?!!this.nonGeographic()[w]:!this.getCountryCodesForCallingCode(w)}},{key:"country",value:function country(w){return this.selectNumberingPlan(w)}},{key:"selectNumberingPlan",value:function selectNumberingPlan(w,$){if(w&&R.test(w)&&($=w,w=null),w&&"001"!==w){if(!this.hasCountry(w))throw new Error("Unknown country: ".concat(w));this.numberingPlan=new W(this.getCountryMetadata(w),this)}else if($){if(!this.hasCallingCode($))throw new Error("Unknown calling code: ".concat($));this.numberingPlan=new W(this.getNumberingPlanMetadata($),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function getCountryCodesForCallingCode(w){var $=this.countryCallingCodes()[w];if($){if(1===$.length&&3===$[0].length)return;return $}}},{key:"getCountryCodeForCallingCode",value:function getCountryCodeForCallingCode(w){var $=this.getCountryCodesForCallingCode(w);if($)return $[0]}},{key:"getNumberingPlanMetadata",value:function getNumberingPlanMetadata(w){var $=this.getCountryCodeForCallingCode(w);if($)return this.getCountryMetadata($);if(this.nonGeographic()){var x=this.nonGeographic()[w];if(x)return x}else{var E=this.countryCallingCodes()[w];if(E&&1===E.length&&"001"===E[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function countryCallingCode(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function IDDPrefix(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function defaultIDDPrefix(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function nationalNumberPattern(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function possibleLengths(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function formats(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function nationalPrefixForParsing(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function nationalPrefixTransformRule(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function leadingDigits(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function hasTypes(){return this.numberingPlan.hasTypes()}},{key:"type",value:function type(w){return this.numberingPlan.type(w)}},{key:"ext",value:function ext(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function countryCallingCodes(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function chooseCountryByCountryCallingCode(w){return this.selectNumberingPlan(w)}},{key:"hasSelectedNumberingPlan",value:function hasSelectedNumberingPlan(){return void 0!==this.numberingPlan}}]),Metadata}(),W=function(){function NumberingPlan(w,$){metadata_classCallCheck(this,NumberingPlan),this.globalMetadataObject=$,this.metadata=w,setVersion.call(this,$.metadata)}return _createClass(NumberingPlan,[{key:"callingCode",value:function callingCode(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function getDefaultCountryMetadataForRegion(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function IDDPrefix(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function defaultIDDPrefix(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function nationalNumberPattern(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function possibleLengths(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function _getFormats(w){return w[this.v1?2:this.v2?3:4]}},{key:"formats",value:function formats(){var w=this,formats=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return formats.map((function($){return new V($,w)}))}},{key:"nationalPrefix",value:function nationalPrefix(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function _getNationalPrefixFormattingRule(w){return w[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function nationalPrefixFormattingRule(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function _nationalPrefixForParsing(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function nationalPrefixForParsing(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function nationalPrefixTransformRule(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function _getNationalPrefixIsOptionalWhenFormatting(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function nationalPrefixIsOptionalWhenFormattingInNationalFormat(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function leadingDigits(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function types(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function hasTypes(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function type(w){if(this.hasTypes()&&metadata_getType(this.types(),w))return new K(metadata_getType(this.types(),w),this)}},{key:"ext",value:function ext(){return this.v1||this.v2?" ext. ":this.metadata[13]||" ext. "}}]),NumberingPlan}(),V=function(){function Format(w,$){metadata_classCallCheck(this,Format),this._format=w,this.metadata=$}return _createClass(Format,[{key:"pattern",value:function pattern(){return this._format[0]}},{key:"format",value:function format(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function leadingDigitsPatterns(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function nationalPrefixFormattingRule(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function nationalPrefixIsOptionalWhenFormattingInNationalFormat(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function nationalPrefixIsMandatoryWhenFormattingInNationalFormat(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function usesNationalPrefix(){return!(!this.nationalPrefixFormattingRule()||G.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function internationalFormat(){return this._format[5]||this.format()}}]),Format}(),G=/^\(?\$1\)?$/,K=function(){function Type(w,$){metadata_classCallCheck(this,Type),this.type=w,this.metadata=$}return _createClass(Type,[{key:"pattern",value:function pattern(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function possibleLengths(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),Type}();function metadata_getType(w,$){switch($){case"FIXED_LINE":return w[0];case"MOBILE":return w[1];case"TOLL_FREE":return w[2];case"PREMIUM_RATE":return w[3];case"PERSONAL_NUMBER":return w[4];case"VOICEMAIL":return w[5];case"UAN":return w[6];case"PAGER":return w[7];case"VOIP":return w[8];case"SHARED_COST":return w[9]}}var J=function is_object(w){return"object"===_typeof(w)},ie=function type_of(w){return _typeof(w)};function getExtPrefix(w,$){return($=new D($)).hasCountry(w)?$.country(w).ext():" ext. "}function getCountryCallingCode(w,$){if(($=new D($)).hasCountry(w))return $.country(w).countryCallingCode();throw new Error("Unknown country: ".concat(w))}function isSupportedCountry(w,$){return void 0!==$.countries[w]}function setVersion(w){var $=w.version;"number"==typeof $?(this.v1=1===$,this.v2=2===$,this.v3=3===$,this.v4=4===$):$?-1===semver_compare($,"1.2.0")?this.v2=!0:-1===semver_compare($,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var oe=function getExtensionDigitsPattern(w){return"([".concat("0-90-9٠-٩۰-۹","]{1,").concat(w,"})")};function createExtensionPattern(w){return";ext="+oe("20")+"|"+("[  \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[  \\t,-]*"+oe("20")+"#?")+"|"+("[  \\t,]*(?:[xx##~~]|int|int)[:\\..]?[  \\t,-]*"+oe("9")+"#?")+"|"+("[- ]+"+oe("6")+"#")+"|"+("[  \\t]*(?:,{2}|;)[:\\..]?[  \\t,-]*"+oe("15")+"#?")+"|"+("[  \\t]*(?:,)+[:\\..]?[  \\t,-]*"+oe("9")+"#?")}var ue="[++]{0,1}(?:["+k+"]*[0-90-9٠-٩۰-۹]){3,}["+k+"0-90-9٠-٩۰-۹]*",ae=new RegExp("^[++]{0,1}(?:["+k+"]*[0-90-9٠-٩۰-۹]){1,2}$","i"),se=ue+"(?:"+createExtensionPattern()+")?",de=new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^"+se+"$","i");function isViablePhoneNumber(w){return w.length>=2&&de.test(w)}var le=new RegExp("(?:"+createExtensionPattern()+")$","i");var pe={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function parseDigit(w){return pe[w]}function parseDigits(w){var $="",x=w.split(""),E=Array.isArray(x),C=0;for(x=E?x:x[Symbol.iterator]();;){var k;if(E){if(C>=x.length)break;k=x[C++]}else{if((C=x.next()).done)break;k=C.value}var I=parseDigit(k);I&&($+=I)}return $}function parseIncompletePhoneNumber(w){var $="",x=w.split(""),E=Array.isArray(x),C=0;for(x=E?x:x[Symbol.iterator]();;){var k;if(E){if(C>=x.length)break;k=x[C++]}else{if((C=x.next()).done)break;k=C.value}$+=parsePhoneNumberCharacter(k,$)||""}return $}function parsePhoneNumberCharacter(w,$){if("+"===w){if($)return;return"+"}return parseDigit(w)}function checkNumberLength(w,$){return function checkNumberLengthForType(w,$,x){var E=x.type($),C=E&&E.possibleLengths()||x.possibleLengths();if(!C)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===$){if(!x.type("FIXED_LINE"))return checkNumberLengthForType(w,"MOBILE",x);var k=x.type("MOBILE");k&&(C=function mergeArrays(w,$){var x=w.slice(),E=$,C=Array.isArray(E),k=0;for(E=C?E:E[Symbol.iterator]();;){var I;if(C){if(k>=E.length)break;I=E[k++]}else{if((k=E.next()).done)break;I=k.value}var R=I;w.indexOf(R)<0&&x.push(R)}return x.sort((function(w,$){return w-$}))}(C,k.possibleLengths()))}else if($&&!E)return"INVALID_LENGTH";var I=w.length,R=C[0];if(R===I)return"IS_POSSIBLE";if(R>I)return"TOO_SHORT";if(C[C.length-1]=0?"IS_POSSIBLE":"INVALID_LENGTH"}(w,void 0,$)}function isPossibleNumber(w,$){switch(checkNumberLength(w,$)){case"IS_POSSIBLE":return!0;default:return!1}}function _slicedToArray(w,$){return function _arrayWithHoles(w){if(Array.isArray(w))return w}(w)||function _iterableToArrayLimit(w,$){var x=[],E=!0,C=!1,k=void 0;try{for(var I,R=w[Symbol.iterator]();!(E=(I=R.next()).done)&&(x.push(I.value),!$||x.length!==$);E=!0);}catch(w){C=!0,k=w}finally{try{E||null==R.return||R.return()}finally{if(C)throw k}}return x}(w,$)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function parseRFC3966(w){var $,x,E=(w=w.replace(/^tel:/,"tel=")).split(";"),C=Array.isArray(E),k=0;for(E=C?E:E[Symbol.iterator]();;){var I;if(C){if(k>=E.length)break;I=E[k++]}else{if((k=E.next()).done)break;I=k.value}var R=_slicedToArray(I.split("="),2),D=R[0],W=R[1];switch(D){case"tel":$=W;break;case"ext":x=W;break;case"phone-context":"+"===W[0]&&($=W+$)}}if(!isViablePhoneNumber($))return{};var V={number:$};return x&&(V.ext=x),V}function formatRFC3966(w){var $=w.number,x=w.ext;if(!$)return"";if("+"!==$[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat($).concat(x?";ext="+x:"")}function matchesEntirely(w,$){return w=w||"",new RegExp("^(?:"+$+")$").test(w)}var he=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function getNumberType(w,$,x){if($=$||{},w.country){(x=new D(x)).selectNumberingPlan(w.country,w.countryCallingCode);var E=$.v2?w.nationalNumber:w.phone;if(matchesEntirely(E,x.nationalNumberPattern())){if(isNumberTypeEqualTo(E,"FIXED_LINE",x))return x.type("MOBILE")&&""===x.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":x.type("MOBILE")?isNumberTypeEqualTo(E,"MOBILE",x)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var C=0,k=he;C=x.length)break;k=x[C++]}else{if((C=x.next()).done)break;k=C.value}var I=k;if(I.leadingDigitsPatterns().length>0){var R=I.leadingDigitsPatterns()[I.leadingDigitsPatterns().length-1];if(0!==$.search(R))continue}if(matchesEntirely($,I.pattern()))return I}}(E.formats(),w);return k?formatNationalNumberUsingFormat(w,k,{useInternationalFormat:"INTERNATIONAL"===x,withNationalPrefix:!k.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!C||!1!==C.nationalPrefix,carrierCode:$,metadata:E}):w}function addExtension(w,$,x,E){return $?E(w,$,x):w}function PhoneNumber_defineProperty(w,$,x){return $ in w?Object.defineProperty(w,$,{value:x,enumerable:!0,configurable:!0,writable:!0}):w[$]=x,w}function PhoneNumber_defineProperties(w,$){for(var x=0;x<$.length;x++){var E=$[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}var we=function(){function PhoneNumber(w,$,x){if(function PhoneNumber_classCallCheck(w,$){if(!(w instanceof $))throw new TypeError("Cannot call a class as a function")}(this,PhoneNumber),!w)throw new TypeError("`country` or `countryCallingCode` not passed");if(!$)throw new TypeError("`nationalNumber` not passed");if(!x)throw new TypeError("`metadata` not passed");var E=new D(x);Ce(w)&&(this.country=w,E.country(w),w=E.countryCallingCode()),this.countryCallingCode=w,this.nationalNumber=$,this.number="+"+this.countryCallingCode+this.nationalNumber,this.metadata=x}return function PhoneNumber_createClass(w,$,x){return $&&PhoneNumber_defineProperties(w.prototype,$),x&&PhoneNumber_defineProperties(w,x),w}(PhoneNumber,[{key:"setExt",value:function setExt(w){this.ext=w}},{key:"isPossible",value:function isPossible(){return function isPossiblePhoneNumber(w,$,x){if(void 0===$&&($={}),x=new D(x),$.v2){if(!w.countryCallingCode)throw new Error("Invalid phone number object passed");x.selectNumberingPlan(w.countryCallingCode)}else{if(!w.phone)return!1;if(w.country){if(!x.hasCountry(w.country))throw new Error("Unknown country: ".concat(w.country));x.country(w.country)}else{if(!w.countryCallingCode)throw new Error("Invalid phone number object passed");x.selectNumberingPlan(w.countryCallingCode)}}if(x.possibleLengths())return isPossibleNumber(w.phone||w.nationalNumber,x);if(w.countryCallingCode&&x.isNonGeographicCallingCode(w.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.metadata)}},{key:"isValid",value:function isValid(){return isValidNumber(this,{v2:!0},this.metadata)}},{key:"isNonGeographic",value:function isNonGeographic(){return new D(this.metadata).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function isEqual(w){return this.number===w.number&&this.ext===w.ext}},{key:"getType",value:function getType(){return getNumberType(this,{v2:!0},this.metadata)}},{key:"format",value:function format(w,$){return format_formatNumber(this,w,$?function PhoneNumber_objectSpread(w){for(var $=1;$0&&"0"===I[1]))return w}}}function extractNationalNumberFromPossiblyIncompleteNumber(w,$){if(w&&$.numberingPlan.nationalPrefixForParsing()){var x=new RegExp("^(?:"+$.numberingPlan.nationalPrefixForParsing()+")"),E=x.exec(w);if(E){var C,k,I,R=E.length-1,D=R>0&&E[R];if($.nationalPrefixTransformRule()&&D)C=w.replace(x,$.nationalPrefixTransformRule()),R>1&&(k=E[1]);else{var W=E[0];C=w.slice(W.length),D&&(k=E[1])}if(D){var V=w.indexOf(E[1]);w.slice(0,V)===$.numberingPlan.nationalPrefix()&&(I=$.numberingPlan.nationalPrefix())}else I=E[0];return{nationalNumber:C,nationalPrefix:I,carrierCode:k}}}return{nationalNumber:w}}function extractNationalNumber(w,$){var x=extractNationalNumberFromPossiblyIncompleteNumber(w,$),E=x.nationalNumber,C=x.carrierCode;if(!function shouldExtractNationalPrefix(w,$,x){if(matchesEntirely(w,x.nationalNumberPattern())&&!matchesEntirely($,x.nationalNumberPattern()))return!1;return!0}(w,E,$))return{nationalNumber:w};if(w.length!==E.length+(C?C.length:0)&&$.possibleLengths())switch(checkNumberLength(E,$)){case"TOO_SHORT":case"INVALID_LENGTH":return{nationalNumber:w}}return{nationalNumber:E,carrierCode:C}}function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(w,$,x,E){var C=$?getCountryCallingCode($,E):x;if(0===w.indexOf(C)){(E=new D(E)).selectNumberingPlan($,x);var k=w.slice(C.length),I=extractNationalNumber(k,E).nationalNumber,R=extractNationalNumber(w,E).nationalNumber;if(!matchesEntirely(R,E.nationalNumberPattern())&&matchesEntirely(I,E.nationalNumberPattern())||"TOO_LONG"===checkNumberLength(R,E))return{countryCallingCode:C,number:k}}return{number:w}}function extractCountryCallingCode_extractCountryCallingCode(w,$,x,E){if(!w)return{};if("+"!==w[0]){var C=stripIddPrefix(w,$,x,E);if(!C||C===w){if($||x){var k=extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(w,$,x,E),I=k.countryCallingCode,R=k.number;if(I)return{countryCallingCode:I,number:R}}return{number:w}}w="+"+C}if("0"===w[1])return{};E=new D(E);for(var W=2;W-1<=3&&W<=w.length;){var V=w.slice(1,W);if(E.hasCallingCode(V))return E.selectNumberingPlan(V),{countryCallingCode:V,number:w.slice(W)};W++}return{}}function getCountryByCallingCode(w,$,x){var E=x.getCountryCodesForCallingCode(w);if(E)return 1===E.length?E[0]:function selectCountryFromList(w,$,x){x=new D(x);var E=w,C=Array.isArray(E),k=0;for(E=C?E:E[Symbol.iterator]();;){var I;if(C){if(k>=E.length)break;I=E[k++]}else{if((k=E.next()).done)break;I=k.value}var R=I;if(x.country(R),x.leadingDigits()){if($&&0===$.search(x.leadingDigits()))return R}else if(getNumberType({phone:$,country:R},void 0,x.metadata))return R}}(E,$,x.metadata)}var Ie=new RegExp("[++0-90-9٠-٩۰-۹]"),Fe=new RegExp("[^0-90-9٠-٩۰-۹#]+$");function parse(w,$,x){if($=$||{},x=new D(x),$.defaultCountry&&!x.hasCountry($.defaultCountry)){if($.v2)throw new I("INVALID_COUNTRY");throw new Error("Unknown country: ".concat($.defaultCountry))}var E=function parseInput(w,$,x){if(w&&0===w.indexOf("tel:"))return parseRFC3966(w);var E=function extractFormattedPhoneNumber(w,$,x){if(!w)return;if(w.length>250){if(x)throw new I("TOO_LONG");return}if(!1===$)return w;var E=w.search(Ie);if(E<0)return;return w.slice(E).replace(Fe,"")}(w,x,$);if(!E)return{};if(!isViablePhoneNumber(E))return function isViablePhoneNumberStart(w){return ae.test(w)}(E)?{error:"TOO_SHORT"}:{};var C=function extractExtension(w){var $=w.search(le);if($<0)return{};for(var x=w.slice(0,$),E=w.match(le),C=1;C17){if($.v2)throw new I("TOO_LONG");return{}}if($.v2){var ie=new we(K,G,x.metadata);return V&&(ie.country=V),J&&(ie.carrierCode=J),k&&(ie.ext=k),ie}var oe=!!($.extended?x.hasSelectedNumberingPlan():V)&&matchesEntirely(G,x.nationalNumberPattern());return $.extended?{country:V,countryCallingCode:K,carrierCode:J,valid:oe,possible:!!oe||!(!0!==$.extended||!x.possibleLengths()||!isPossibleNumber(G,x)),phone:G,ext:k}:oe?function parse_result(w,$,x){var E={country:w,phone:$};x&&(E.ext=x);return E}(V,G,k):{}}function parsePhoneNumber_defineProperty(w,$,x){return $ in w?Object.defineProperty(w,$,{value:x,enumerable:!0,configurable:!0,writable:!0}):w[$]=x,w}function parsePhoneNumber_parsePhoneNumber(w,$,x){return parse(w,function parsePhoneNumber_objectSpread(w){for(var $=1;$2&&void 0!==arguments[2]?arguments[2]:null,E=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;LRUCache_classCallCheck(this,Node),this.key=w,this.value=$,this.next=x,this.prev=E},De=function(){function LRUCache(){var w=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;LRUCache_classCallCheck(this,LRUCache),this.size=0,this.limit=w,this.head=null,this.tail=null,this.cache={}}return function LRUCache_createClass(w,$,x){return $&&LRUCache_defineProperties(w.prototype,$),x&&LRUCache_defineProperties(w,x),w}(LRUCache,[{key:"put",value:function put(w,$){if(this.ensureLimit(),this.head){var x=new Le(w,$,this.head);this.head.prev=x,this.head=x}else this.head=this.tail=new Le(w,$);this.cache[w]=this.head,this.size++}},{key:"get",value:function get(w){if(this.cache[w]){var $=this.cache[w].value;return this.remove(w),this.put(w,$),$}console.log("Item not available in cache for key ".concat(w))}},{key:"ensureLimit",value:function ensureLimit(){this.size===this.limit&&this.remove(this.tail.key)}},{key:"remove",value:function remove(w){var $=this.cache[w];null!==$.prev?$.prev.next=$.next:this.head=$.next,null!==$.next?$.next.prev=$.prev:this.tail=$.prev,delete this.cache[w],this.size--}},{key:"clear",value:function clear(){this.head=null,this.tail=null,this.size=0,this.cache={}}}]),LRUCache}();function RegExpCache_defineProperties(w,$){for(var x=0;x<$.length;x++){var E=$[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}var Ue=function(){function RegExpCache(w){!function RegExpCache_classCallCheck(w,$){if(!(w instanceof $))throw new TypeError("Cannot call a class as a function")}(this,RegExpCache),this.cache=new De(w)}return function RegExpCache_createClass(w,$,x){return $&&RegExpCache_defineProperties(w.prototype,$),x&&RegExpCache_defineProperties(w,x),w}(RegExpCache,[{key:"getPatternForRegExp",value:function getPatternForRegExp(w){var $=this.cache.get(w);return $||($=new RegExp("^"+w),this.cache.put(w,$)),$}}]),RegExpCache}();function limit(w,$){if(w<0||$<=0||$=0?$.slice(0,x):$}var ze="   ᠎ - \u2028\u2029   ",He="[".concat(ze,"]"),Ke="[^".concat(ze,"]"),Ze="[".concat("0-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹0-9","]"),Qe="A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",et="[".concat(Qe,"]"),tt=new RegExp(et),rt="[".concat("$¢-¥֏؋৲৳৻૱௹฿៛₠-₹꠸﷼﹩$¢£¥₩","]"),nt=new RegExp(rt),it="[".concat("̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ࣾऀ-ंऺ़ु-ै्॑-ॗॢॣঁ়ু-ৄ্ৢৣਁਂ਼ੁੂੇੈੋ-੍ੑੰੱੵઁં઼ુ-ૅેૈ્ૢૣଁ଼ିୁ-ୄ୍ୖୢୣஂீ்ా-ీె-ైొ-్ౕౖౢౣ಼ಿೆೌ್ೢೣു-ൄ്ൢൣ්ි-ුූัิ-ฺ็-๎ັິ-ູົຼ່-ໍཱ༹༘༙༵༷-ཾྀ-྄྆྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္်ွှၘၙၞ-ၠၱ-ၴႂႅႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧᤨᤲ᤹-᤻ᨘᨗᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀᮁᮢ-ᮥᮨᮩ᯦᮫ᯨᯩᯭᯯ-ᯱᰬ-ᰳᰶ᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᷀-ᷦ᷼-᷿⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〭꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠥꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꨩ-ꨮꨱꨲꨵꨶꩃꩌꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫬꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︦","]"),ot=new RegExp(it),ut=new RegExp("[\0-€-ÿĀ-ſḀ-ỿƀ-ɏ̀-ͯ]");function isLatinLetter(w){return!(!tt.test(w)&&!ot.test(w))&&ut.test(w)}function isInvalidPunctuationSymbol(w){return"%"===w||nt.test(w)}var at={POSSIBLE:function POSSIBLE(w,$,x){return!0},VALID:function VALID(w,$,x){return!(!isValidNumber(w,void 0,x)||!containsOnlyValidXChars(w,$.toString(),x))},STRICT_GROUPING:function STRICT_GROUPING(w,$,x,E){var C=$.toString();return!(!isValidNumber(w,void 0,x)||!containsOnlyValidXChars(w,C,x)||containsMoreThanOneSlashInNationalNumber(w,C)||!isNationalPrefixPresentIfRequired(w,x))&&checkNumberGroupingIsValid(w,$,x,allNumberGroupsRemainGrouped,E)},EXACT_GROUPING:function EXACT_GROUPING(w,$,x,E){var C=$.toString();return!(!isValidNumber(w,void 0,x)||!containsOnlyValidXChars(w,C,x)||containsMoreThanOneSlashInNationalNumber(w,C)||!isNationalPrefixPresentIfRequired(w,x))&&checkNumberGroupingIsValid(w,$,x,allNumberGroupsAreExactlyPresent,E)}};function containsOnlyValidXChars(w,$,x){for(var E=0;E<$.length-1;E++){var C=$.charAt(E);if("x"===C||"X"===C){var k=$.charAt(E+1);if("x"===k||"X"===k){if(E++,util.isNumberMatch(w,$.substring(E))!=MatchType.NSN_MATCH)return!1}else if(parseDigits($.substring(E))!==w.ext)return!1}}return!0}function isNationalPrefixPresentIfRequired(w,$){if("FROM_DEFAULT_COUNTRY"!=w.getCountryCodeSource())return!0;var x=util.getRegionCodeForCountryCode(w.getCountryCode()),E=util.getMetadataForRegion(x);if(null==E)return!0;var C=util.getNationalSignificantNumber(w),k=util.chooseFormattingPatternForNumber(E.numberFormats(),C);if(k&&k.getNationalPrefixFormattingRule().length>0){if(k.getNationalPrefixOptionalWhenFormatting())return!0;if(PhoneNumberUtil.formattingRuleHasFirstGroupOnly(k.getNationalPrefixFormattingRule()))return!0;var I=PhoneNumberUtil.normalizeDigitsOnly(w.getRawInput());return util.maybeStripNationalPrefixAndCarrierCode(I,E,null)}return!0}function containsMoreThanOneSlashInNationalNumber(w,$){var x=$.indexOf("/");if(x<0)return!1;var E=$.indexOf("/",x+1);return!(E<0)&&(!(w.getCountryCodeSource()===CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN||w.getCountryCodeSource()===CountryCodeSource.FROM_NUMBER_WITHOUT_PLUS_SIGN)||PhoneNumberUtil.normalizeDigitsOnly($.substring(0,x))!==String(w.getCountryCode())||$.slice(E+1).indexOf("/")>=0)}function checkNumberGroupingIsValid(w,$,x,E,C){var k=normalizeDigits($,!0),I=getNationalNumberGroups(x,w,null);if(E(x,w,k,I))return!0;var R=MetadataManager.getAlternateFormatsForCountry(w.getCountryCode()),D=util.getNationalSignificantNumber(w);if(R){var W=R.numberFormats(),V=Array.isArray(W),G=0;for(W=V?W:W[Symbol.iterator]();;){var K;if(V){if(G>=W.length)break;K=W[G++]}else{if((G=W.next()).done)break;K=G.value}var J=K;if(J.leadingDigitsPatterns().length>0)if(!C.getPatternForRegExp("^"+J.leadingDigitsPatterns()[0]).test(D))continue;if(E(x,w,k,I=getNationalNumberGroups(x,w,J)))return!0}}return!1}function getNationalNumberGroups(w,$,x){if(x){var E=util.getNationalSignificantNumber($);return util.formatNsnUsingPattern(E,x,"RFC3966",w).split("-")}var C=formatNumber($,"RFC3966",w),k=C.indexOf(";");k<0&&(k=C.length);var I=C.indexOf("-")+1;return C.slice(I,k).split("-")}function allNumberGroupsAreExactlyPresent(w,$,x,E){var C=x.split(NON_DIGITS_PATTERN),k=$.hasExtension()?C.length-2:C.length-1;if(1==C.length||C[k].contains(util.getNationalSignificantNumber($)))return!0;for(var I=E.length-1;I>0&&k>=0;){if(C[k]!==E[I])return!1;I--,k--}return k>=0&&function endsWith(w,$){return w.indexOf($,w.length-$.length)===w.length-$.length}(C[k],E[0])}function allNumberGroupsRemainGrouped(w,$,x,E){var C,k,I=0;if($.getCountryCodeSource()!==CountryCodeSource.FROM_DEFAULT_COUNTRY){var R=String($.getCountryCode());I=x.indexOf(R)+R.length()}for(var D=0;D0&&void 0!==arguments[0]?arguments[0]:"",$=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x=arguments.length>2?arguments[2]:void 0;if(PhoneNumberMatcher_classCallCheck(this,PhoneNumberMatcher),PhoneNumberMatcher_defineProperty(this,"state","NOT_READY"),PhoneNumberMatcher_defineProperty(this,"searchIndex",0),PhoneNumberMatcher_defineProperty(this,"regExpCache",new Ue(32)),!($=PhoneNumberMatcher_objectSpread({},$,{defaultCallingCode:$.defaultCallingCode,defaultCountry:$.defaultCountry&&isSupportedCountry($.defaultCountry,x)?$.defaultCountry:void 0,leniency:$.leniency||$.extended?"POSSIBLE":"VALID",maxTries:$.maxTries||Ct})).leniency)throw new TypeError("`Leniency` not supplied");if($.maxTries<0)throw new TypeError("`maxTries` not supplied");if(this.text=w,this.options=$,this.metadata=x,this.leniency=at[$.leniency],!this.leniency)throw new TypeError("Unknown leniency: ".concat($.leniency,"."));this.maxTries=$.maxTries,this.PATTERN=new RegExp(Ot,"ig")}return function PhoneNumberMatcher_createClass(w,$,x){return $&&PhoneNumberMatcher_defineProperties(w.prototype,$),x&&PhoneNumberMatcher_defineProperties(w,x),w}(PhoneNumberMatcher,[{key:"find",value:function find(){for(var w;this.maxTries>0&&null!==(w=this.PATTERN.exec(this.text));){var $=w[0],x=w.index;if(isValidPreCandidate($=parsePreCandidate($),x,this.text)){var E=this.parseAndVerify($,x,this.text)||this.extractInnerMatch($,x,this.text);if(E){if(this.options.v2){var C=new we(E.country||E.countryCallingCode,E.phone,this.metadata);return E.ext&&(C.ext=E.ext),{startsAt:E.startsAt,endsAt:E.endsAt,number:C}}return E}}this.maxTries--}}},{key:"extractInnerMatch",value:function extractInnerMatch(w,$,x){for(var E=0,C=gt;E0&&null!==(I=R.exec(w));){if(k){var D=trimAfterFirstMatch(Et,w.slice(0,I.index)),W=this.parseAndVerify(D,$,x);if(W)return W;this.maxTries--,k=!1}var V=trimAfterFirstMatch(Et,I[1]),G=w.indexOf(V,I.index),K=this.parseAndVerify(V,$+G,x);if(K)return K;this.maxTries--}}},{key:"parseAndVerify",value:function parseAndVerify(w,$,x){if(function isValidCandidate(w,$,x,E){if(vt.test(w)&&!yt.test(w)){if("POSSIBLE"!==E){if($>0&&!ht.test(w)){var C=x[$-1];if(isInvalidPunctuationSymbol(C)||isLatinLetter(C))return!1}var k=$+w.length;if(k1;)1&$&&(x+=w),$>>=1,w+=w;return x+w}function cutAndStripNonPairedParens(w,$){return")"===w[$]&&$++,function stripNonPairedParens(w){var $=[],x=0;for(;x1&&void 0!==arguments[1]?arguments[1]:{},x=$.allowOverflow;if(!w)throw new Error("String is required");var E=AsYouTypeFormatter_PatternMatcher_match(w.split(""),this.matchTree,!0);if(E&&E.match&&delete E.matchedChars,!E||!E.overflow||x)return E}}]),PatternMatcher}();function AsYouTypeFormatter_PatternMatcher_match(w,$,x){if("string"==typeof $){if(x&&w.length>$.length)return{overflow:!0};var E=w.join("");return 0===$.indexOf(E)?w.length===$.length?{match:!0,matchedChars:w}:{partialMatch:!0}:0===E.indexOf($)?{match:!0,matchedChars:w.slice(0,$.length)}:void 0}if(Array.isArray($)){for(var C=w.slice(),k=0;k<$.length;){var I=AsYouTypeFormatter_PatternMatcher_match(C,$[k],x&&k===$.length-1);if(!I)return;if(I.overflow)return I;if(!I.match){if(I.partialMatch)return{partialMatch:!0};throw new Error("Unsupported match result:\n".concat(JSON.stringify(I,null,2)))}if(0===(C=C.slice(I.matchedChars.length)).length)return k===$.length-1?{match:!0,matchedChars:w}:{partialMatch:!0};k++}return x?{overflow:!0}:{match:!0,matchedChars:w.slice(0,w.length-C.length)}}switch($.op){case"|":var R,D=$.args,W=Array.isArray(D),V=0;for(D=W?D:D[Symbol.iterator]();;){var G;if(W){if(V>=D.length)break;G=D[V++]}else{if((V=D.next()).done)break;G=V.value}var K=AsYouTypeFormatter_PatternMatcher_match(w,G,x);if(K){if(K.overflow)return K;if(K.match)return{match:!0,matchedChars:K.matchedChars};if(!K.partialMatch)throw new Error("Unsupported match result:\n".concat(JSON.stringify(K,null,2)));R=!0}}return R?{partialMatch:!0}:void 0;case"[]":var J=$.args,ie=Array.isArray(J),oe=0;for(J=ie?J:J[Symbol.iterator]();;){var ue;if(ie){if(oe>=J.length)break;ue=J[oe++]}else{if((oe=J.next()).done)break;ue=oe.value}var ae=ue;if(w[0]===ae)return 1===w.length?{match:!0,matchedChars:w}:x?{overflow:!0}:{match:!0,matchedChars:[ae]}}return;default:throw new Error("Unsupported instruction tree: ".concat($))}}var It=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])"),Mt=/[\(\)\[\]\?\:\|]/,Ft=function(){function PatternParser(){AsYouTypeFormatter_PatternMatcher_classCallCheck(this,PatternParser)}return AsYouTypeFormatter_PatternMatcher_createClass(PatternParser,[{key:"parse",value:function parse(w){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(w),1!==this.context.length)throw new Error("Non-finalized contexts left when pattern parse ended");var $=this.context[0],x=$.branches,E=$.instructions;if(x)return[{op:"|",args:x.concat([E])}];if(0===E.length)throw new Error("Pattern is required");return E}},{key:"startContext",value:function startContext(w){this.context.push(w)}},{key:"endContext",value:function endContext(){this.context.pop()}},{key:"getContext",value:function getContext(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function parsePattern(w){if(!w)throw new Error("Pattern is required");var $=w.match(It);if($){var x=$[1],E=w.slice(0,$.index),C=w.slice($.index+x.length);switch(x){case"(?:":E&&this.parsePattern(E),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(E&&this.parsePattern(E),0===this.getContext().instructions.length)throw new Error('No instructions found after "|" operator in an "or" group');var k=this.getContext().branches;k.push(this.getContext().instructions),this.endContext(),this.getContext().instructions.push({op:"|",args:k});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(E&&this.parsePattern(E),!this.getContext().branches){if(1!==this.context.length)throw new Error('"branches" not found in an "or" group context');this.getContext().branches=[]}this.getContext().branches.push(this.getContext().instructions),this.getContext().instructions=[];break;case"[":E&&this.parsePattern(E),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:parseOneOfSet(E)});break;default:throw new Error("Unknown operator: ".concat(x))}C&&this.parsePattern(C)}else{if(Mt.test(w))throw new Error("Illegal characters found in a pattern: ".concat(w));this.getContext().instructions=this.getContext().instructions.concat(w.split(""))}}}]),PatternParser}();function parseOneOfSet(w){for(var $=[],x=0;x=E.length)break;I=E[k++]}else{if((k=E.next()).done)break;I=k.value}var format=I,R=formatCompleteNumber($,format,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function shouldTryNationalPrefixFormattingRule(w){return x.shouldTryNationalPrefixFormattingRule(w,{international:$.international,nationalPrefix:$.nationalPrefix})},getSeparatorAfterNationalPrefix:this.getSeparatorAfterNationalPrefix});if(R)return this.resetFormat(),this.chosenFormat=format,this.setNationalNumberTemplate(R.replace(/\d/g,kt),$),this.populatedNationalNumberTemplate=R,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(kt),R}}return this.formatNationalNumberWithNextDigits(w,$)}},{key:"formatNationalNumberWithNextDigits",value:function formatNationalNumberWithNextDigits(w,$){var x=this.chosenFormat,E=this.chooseFormat($);if(E)return E===x?this.formatNextNationalNumberDigits(w):this.formatNextNationalNumberDigits($.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function narrowDownMatchingFormats(w){var $=this,x=w.nationalSignificantNumber,E=w.nationalPrefix,C=w.international,k=x,I=k.length-3;I<0&&(I=0),this.matchingFormats=this.matchingFormats.filter((function(w){return $.formatSuits(w,C,E)&&$.formatMatches(w,k,I)})),this.chosenFormat&&-1===this.matchingFormats.indexOf(this.chosenFormat)&&this.resetFormat()}},{key:"formatSuits",value:function formatSuits(w,$,x){return!(x&&!w.usesNationalPrefix()&&!w.nationalPrefixIsOptionalWhenFormattingInNationalFormat())&&!(!$&&!x&&w.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function formatMatches(w,$,x){var E=w.leadingDigitsPatterns().length;if(0===E)return!0;x=Math.min(x,E-1);var C=w.leadingDigitsPatterns()[x];if($.length<3)try{return void 0!==new At(C).match($,{allowOverflow:!0})}catch(w){return console.error(w),!0}return new RegExp("^(".concat(C,")")).test($)}},{key:"getFormatFormat",value:function getFormatFormat(w,$){return $?w.internationalFormat():w.format()}},{key:"chooseFormat",value:function chooseFormat(w){var $=this,x=function _loop2(){if(C){if(k>=E.length)return"break";I=E[k++]}else{if((k=E.next()).done)return"break";I=k.value}var x=I;return $.chosenFormat===x?"break":Bt.test($.getFormatFormat(x,w.international))?$.createTemplateForFormat(x,w)?($.chosenFormat=x,"break"):($.matchingFormats=$.matchingFormats.filter((function(w){return w!==x})),"continue"):"continue"};var E=this.matchingFormats.slice(),C=Array.isArray(E),k=0;e:for(E=C?E:E[Symbol.iterator]();;){var I;switch(x()){case"break":break e;case"continue":continue}}return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function createTemplateForFormat(w,$){if(!(w.pattern().indexOf("|")>=0)){var x=this.getTemplateForFormat(w,$);return x?(this.setNationalNumberTemplate(x,$),!0):void 0}}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function getInternationalPrefixBeforeCountryCallingCode(w,$){var x=w.IDDPrefix,E=w.missingPlus;return x?$&&!1===$.spacing?x:x+" ":E?"":"+"}},{key:"getTemplate",value:function getTemplate(w){if(this.template){for(var $=-1,x=0,E=w.international?this.getInternationalPrefixBeforeCountryCallingCode(w,{spacing:!1}):"";xR.length)){var D=new RegExp("^"+I+"$"),W=x.replace(/\d/g,"9");D.test(W)&&(R=W);var V,G=this.getFormatFormat(w,E);if(this.shouldTryNationalPrefixFormattingRule(w,{international:E,nationalPrefix:C})){var K=G.replace(ve,w.nationalPrefixFormattingRule());if(parseDigits(w.nationalPrefixFormattingRule())===(C||"")+parseDigits("$1")&&(G=K,V=!0,C))for(var J=C.length;J>0;)G=G.replace(/\d/,kt),J--}var ie=R.replace(new RegExp(I),G).replace(new RegExp("9","g"),kt);return V||(k?ie=repeat(kt,k.length)+" "+ie:C&&(ie=repeat(kt,C.length)+this.getSeparatorAfterNationalPrefix(w)+ie)),E&&(ie=applyInternationalSeparatorStyle(ie)),ie}}},{key:"formatNextNationalNumberDigits",value:function formatNextNationalNumberDigits(w){var $=function populateTemplateWithDigits(w,$,x){var E=x.split(""),C=Array.isArray(E),k=0;for(E=C?E:E[Symbol.iterator]();;){var I;if(C){if(k>=E.length)break;I=E[k++]}else{if((k=E.next()).done)break;I=k.value}var R=I;if(w.slice($+1).search(Nt)<0)return;$=w.search(Nt),w=w.replace(Nt,R)}return[w,$]}(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,w);if($)return this.populatedNationalNumberTemplate=$[0],this.populatedNationalNumberTemplatePosition=$[1],cutAndStripNonPairedParens(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1);this.resetFormat()}}]),AsYouTypeFormatter}();function AsYouTypeParser_slicedToArray(w,$){return function AsYouTypeParser_arrayWithHoles(w){if(Array.isArray(w))return w}(w)||function AsYouTypeParser_iterableToArrayLimit(w,$){var x=[],E=!0,C=!1,k=void 0;try{for(var I,R=w[Symbol.iterator]();!(E=(I=R.next()).done)&&(x.push(I.value),!$||x.length!==$);E=!0);}catch(w){C=!0,k=w}finally{try{E||null==R.return||R.return()}finally{if(C)throw k}}return x}(w,$)||function AsYouTypeParser_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function AsYouTypeParser_defineProperties(w,$){for(var x=0;x<$.length;x++){var E=$[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}var Wt=new RegExp("^"+("["+k+"0-90-9٠-٩۰-۹]+")+"$","i"),Vt="(?:[++]["+k+"0-90-9٠-٩۰-۹]*|["+k+"0-90-9٠-٩۰-۹]+)",Ut=new RegExp("[^"+k+"0-90-9٠-٩۰-۹]+.*$"),qt=/[^\d\[\]]/,zt=function(){function AsYouTypeParser(w){var $=w.defaultCountry,x=w.defaultCallingCode,E=w.metadata,C=w.onNationalSignificantNumberChange;!function AsYouTypeParser_classCallCheck(w,$){if(!(w instanceof $))throw new TypeError("Cannot call a class as a function")}(this,AsYouTypeParser),this.defaultCountry=$,this.defaultCallingCode=x,this.metadata=E,this.onNationalSignificantNumberChange=C}return function AsYouTypeParser_createClass(w,$,x){return $&&AsYouTypeParser_defineProperties(w.prototype,$),x&&AsYouTypeParser_defineProperties(w,x),w}(AsYouTypeParser,[{key:"input",value:function input(w,$){var x,E=function extractFormattedDigitsAndPlus(w){var $=AsYouTypeParser_slicedToArray(function _extractFormattedDigitsAndPlus(w){var $=function AsYouTypeParser_extractFormattedPhoneNumber(w){var $,x=w.search(Vt);if(x<0)return;"+"===(w=w.slice(x))[0]&&($=!0,w=w.slice("+".length));w=w.replace(Ut,""),$&&(w="+"+w);return w}(w)||"";if("+"===$[0])return[$.slice("+".length),!0];return[$]}(w),2),x=$[0],E=$[1];Wt.test(x)||(x="");return[x,E]}(w),C=AsYouTypeParser_slicedToArray(E,2),k=C[0],I=C[1],R=parseDigits(k);return I&&($.digits||($.startInternationalNumber(),R||(x=!0))),R&&this.inputDigits(R,$),{digits:R,justLeadingPlus:x}}},{key:"inputDigits",value:function inputDigits(w,$){var x=$.digits,E=x.length<3&&x.length+w.length>=3;if($.appendDigits(w),E&&this.extractIddPrefix($),this.isWaitingForCountryCallingCode($)){if(!this.extractCountryCallingCode($))return}else $.appendNationalSignificantNumberDigits(w);$.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber($.getNationalDigits(),$.update)}},{key:"isWaitingForCountryCallingCode",value:function isWaitingForCountryCallingCode(w){var $=w.international,x=w.callingCode;return $&&!x}},{key:"extractCountryCallingCode",value:function extractCountryCallingCode(w){var $=extractCountryCallingCode_extractCountryCallingCode("+"+w.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),x=$.countryCallingCode,E=$.number;if(x)return w.setCallingCode(x),w.update({nationalSignificantNumber:E}),!0}},{key:"reset",value:function reset(w){if(w){this.hasSelectedNumberingPlan=!0;var $=w._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=$&&qt.test($)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function extractNationalSignificantNumber(w,$){if(this.hasSelectedNumberingPlan){var x=extractNationalNumberFromPossiblyIncompleteNumber(w,this.metadata),E=x.nationalPrefix,C=x.nationalNumber,k=x.carrierCode;if(C!==w)return this.onExtractedNationalNumber(E,k,C,w,$),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function extractAnotherNationalSignificantNumber(w,$,x){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(w,x);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var E=extractNationalNumberFromPossiblyIncompleteNumber(w,this.metadata),C=E.nationalPrefix,k=E.nationalNumber,I=E.carrierCode;if(k!==$)return this.onExtractedNationalNumber(C,I,k,w,x),!0}}},{key:"onExtractedNationalNumber",value:function onExtractedNationalNumber(w,$,x,E,C){var k,I,R=E.lastIndexOf(x);if(R>=0&&R===E.length-x.length){I=!0;var D=E.slice(0,R);D!==w&&(k=D)}C({nationalPrefix:w,carrierCode:$,nationalSignificantNumber:x,nationalSignificantNumberMatchesInput:I,complexPrefixBeforeNationalSignificantNumber:k}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function reExtractNationalSignificantNumber(w){return!!this.extractAnotherNationalSignificantNumber(w.getNationalDigits(),w.nationalSignificantNumber,w.update)||(this.extractIddPrefix(w)||this.fixMissingPlus(w)?(this.extractCallingCodeAndNationalSignificantNumber(w),!0):void 0)}},{key:"extractIddPrefix",value:function extractIddPrefix(w){var $=w.international,x=w.IDDPrefix,E=w.digits;w.nationalSignificantNumber;if(!$&&!x){var C=stripIddPrefix(E,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);return void 0!==C&&C!==E?(w.update({IDDPrefix:E.slice(0,E.length-C.length)}),this.startInternationalNumber(w),!0):void 0}}},{key:"fixMissingPlus",value:function fixMissingPlus(w){if(!w.international){var $=extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(w.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),x=$.countryCallingCode;$.number;if(x)return w.update({missingPlus:!0}),this.startInternationalNumber(w),!0}}},{key:"startInternationalNumber",value:function startInternationalNumber(w){w.startInternationalNumber(),w.nationalSignificantNumber&&(w.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function extractCallingCodeAndNationalSignificantNumber(w){this.extractCountryCallingCode(w)&&this.extractNationalSignificantNumber(w.getNationalDigits(),w.update)}}]),AsYouTypeParser}();function AsYouType_typeof(w){return(AsYouType_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(w){return typeof w}:function _typeof(w){return w&&"function"==typeof Symbol&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w})(w)}function AsYouType_slicedToArray(w,$){return function AsYouType_arrayWithHoles(w){if(Array.isArray(w))return w}(w)||function AsYouType_iterableToArrayLimit(w,$){var x=[],E=!0,C=!1,k=void 0;try{for(var I,R=w[Symbol.iterator]();!(E=(I=R.next()).done)&&(x.push(I.value),!$||x.length!==$);E=!0);}catch(w){C=!0,k=w}finally{try{E||null==R.return||R.return()}finally{if(C)throw k}}return x}(w,$)||function AsYouType_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function AsYouType_defineProperties(w,$){for(var x=0;x<$.length;x++){var E=$[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}var Gt=function(){function AsYouType(w,$){!function AsYouType_classCallCheck(w,$){if(!(w instanceof $))throw new TypeError("Cannot call a class as a function")}(this,AsYouType),this.metadata=new D($);var x=AsYouType_slicedToArray(this.getCountryAndCallingCode(w),2),E=x[0],C=x[1];this.defaultCountry=E,this.defaultCallingCode=C,this.reset()}return function AsYouType_createClass(w,$,x){return $&&AsYouType_defineProperties(w.prototype,$),x&&AsYouType_defineProperties(w,x),w}(AsYouType,[{key:"getCountryAndCallingCode",value:function getCountryAndCallingCode(w){var $,x;return w&&("object"===AsYouType_typeof(w)?($=w.defaultCountry,x=w.defaultCallingCode):$=w),$&&!this.metadata.hasCountry($)&&($=void 0),[$,x]}},{key:"input",value:function input(w){var $=this.parser.input(w,this.state),x=$.digits;if($.justLeadingPlus)this.formattedOutput="+";else if(x){var E;if(this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state),this.metadata.hasSelectedNumberingPlan()&&(E=this.formatter.format(x,this.state)),void 0===E&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var C=this.state.getNationalDigits();C&&(E=this.formatter.format(C,this.state))}this.formattedOutput=E?this.getFullNumber(E):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function reset(){var w=this;return this.state=new Tt({onCountryChange:function onCountryChange($){w.country=$},onCallingCodeChange:function onCallingCodeChange($,x){w.metadata.selectNumberingPlan($,x),w.formatter.reset(w.metadata.numberingPlan,w.state),w.parser.reset(w.metadata.numberingPlan)}}),this.formatter=new Dt({state:this.state,metadata:this.metadata}),this.parser=new zt({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function onNationalSignificantNumberChange(){w.determineTheCountryIfNeeded(),w.formatter.reset(w.metadata.numberingPlan,w.state)}}),this.state.reset(this.defaultCountry,this.defaultCallingCode),this.formattedOutput="",this}},{key:"isInternational",value:function isInternational(){return this.state.international}},{key:"getCallingCode",value:function getCallingCode(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function getCountryCallingCode(){return this.getCallingCode()}},{key:"getCountry",value:function getCountry(){if(this.state.digits)return this._getCountry()}},{key:"_getCountry",value:function _getCountry(){var w=this.state.country;return w}},{key:"determineTheCountryIfNeeded",value:function determineTheCountryIfNeeded(){this.state.country&&!this.isCountryCallingCodeAmbiguous()||this.determineTheCountry()}},{key:"getFullNumber",value:function getFullNumber(w){var $=this;if(this.isInternational()){var x=function prefix(w){return $.formatter.getInternationalPrefixBeforeCountryCallingCode($.state,{spacing:!!w})+w},E=this.state.callingCode;return x(E?w?"".concat(E," ").concat(w):E:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return w}},{key:"getNonFormattedNationalNumberWithPrefix",value:function getNonFormattedNationalNumberWithPrefix(){var w=this.state,$=w.nationalSignificantNumber,x=w.complexPrefixBeforeNationalSignificantNumber,E=w.nationalPrefix,C=$,k=x||E;return k&&(C=k+C),C}},{key:"getNonFormattedNumber",value:function getNonFormattedNumber(){var w=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(w?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function getNonFormattedTemplate(){var w=this.getNonFormattedNumber();if(w)return w.replace(/[\+\d]/g,kt)}},{key:"isCountryCallingCodeAmbiguous",value:function isCountryCallingCodeAmbiguous(){var w=this.state.callingCode,$=this.metadata.getCountryCodesForCallingCode(w);return $&&$.length>1}},{key:"determineTheCountry",value:function determineTheCountry(){this.state.setCountry(getCountryByCallingCode(this.isInternational()?this.state.callingCode:this.defaultCallingCode,this.state.nationalSignificantNumber,this.metadata))}},{key:"getNumberValue",value:function getNumberValue(){var w=this.state,$=w.digits,x=w.callingCode,E=w.country,C=w.nationalSignificantNumber;if($)return this.isInternational()?x?"+"+x+C:"+"+$:E||x?"+"+(E?this.metadata.countryCallingCode():x)+C:void 0}},{key:"getNumber",value:function getNumber(){var w=this.state,$=w.nationalSignificantNumber,x=w.carrierCode,E=w.callingCode,C=this._getCountry();if($&&(C||E)){var k=new we(C||E,$,this.metadata.metadata);return x&&(k.carrierCode=x),k}}},{key:"isPossible",value:function isPossible(){var w=this.getNumber();return!!w&&w.isPossible()}},{key:"isValid",value:function isValid(){var w=this.getNumber();return!!w&&w.isValid()}},{key:"getNationalNumber",value:function getNationalNumber(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function getChars(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function getTemplate(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}]),AsYouType}();function exports_AsYouType_AsYouType(w){return Gt.call(this,w,C)}function isSupportedCountry_isSupportedCountry(){return withMetadata(isSupportedCountry,arguments)}function getCountries(w){return new D(w).getCountries()}function getCountries_getCountries(){return withMetadata(getCountries,arguments)}function getCountryCallingCode_getCountryCallingCode(){return withMetadata(getCountryCallingCode,arguments)}function getExtPrefix_getExtPrefix(){return withMetadata(getExtPrefix,arguments)}function Metadata_Metadata(){return D.call(this,C)}function getExampleNumber(w,$,x){if($[w])return new we(w,$[w],x)}function getExampleNumber_getExampleNumber(){return withMetadata(getExampleNumber,arguments)}function formatIncompletePhoneNumber(w,$,x){return x||(x=$,$=void 0),new Gt($,x).input(w)}function formatIncompletePhoneNumber_formatIncompletePhoneNumber(){return withMetadata(formatIncompletePhoneNumber,arguments)}exports_AsYouType_AsYouType.prototype=Object.create(Gt.prototype,{}),exports_AsYouType_AsYouType.prototype.constructor=exports_AsYouType_AsYouType,Metadata_Metadata.prototype=Object.create(D.prototype,{}),Metadata_Metadata.prototype.constructor=Metadata_Metadata},function(w,$,x){"use strict";x.r($),x.d($,"Observable",(function(){return E.a})),x.d($,"ConnectableObservable",(function(){return C.a})),x.d($,"GroupedObservable",(function(){return k.a})),x.d($,"observable",(function(){return I.a})),x.d($,"Subject",(function(){return R.a})),x.d($,"BehaviorSubject",(function(){return D.a})),x.d($,"ReplaySubject",(function(){return W.a})),x.d($,"AsyncSubject",(function(){return V.a})),x.d($,"asap",(function(){return G.a})),x.d($,"asapScheduler",(function(){return G.b})),x.d($,"async",(function(){return K.a})),x.d($,"asyncScheduler",(function(){return K.b})),x.d($,"queue",(function(){return J.a})),x.d($,"queueScheduler",(function(){return J.b})),x.d($,"animationFrame",(function(){return de})),x.d($,"animationFrameScheduler",(function(){return se})),x.d($,"VirtualTimeScheduler",(function(){return le})),x.d($,"VirtualAction",(function(){return pe})),x.d($,"Scheduler",(function(){return he.a})),x.d($,"Subscription",(function(){return ve.a})),x.d($,"Subscriber",(function(){return ge.a})),x.d($,"Notification",(function(){return Se.a})),x.d($,"NotificationKind",(function(){return Se.b})),x.d($,"pipe",(function(){return we.a})),x.d($,"noop",(function(){return Ce.a})),x.d($,"identity",(function(){return Pe.a})),x.d($,"isObservable",(function(){return isObservable})),x.d($,"ArgumentOutOfRangeError",(function(){return Ie.a})),x.d($,"EmptyError",(function(){return Fe.a})),x.d($,"ObjectUnsubscribedError",(function(){return Re.a})),x.d($,"UnsubscriptionError",(function(){return Le.a})),x.d($,"TimeoutError",(function(){return De.a})),x.d($,"bindCallback",(function(){return bindCallback})),x.d($,"bindNodeCallback",(function(){return bindNodeCallback})),x.d($,"combineLatest",(function(){return Ze.b})),x.d($,"concat",(function(){return Qe.a})),x.d($,"defer",(function(){return et.a})),x.d($,"empty",(function(){return tt.b})),x.d($,"forkJoin",(function(){return forkJoin})),x.d($,"from",(function(){return nt.a})),x.d($,"fromEvent",(function(){return fromEvent})),x.d($,"fromEventPattern",(function(){return fromEventPattern})),x.d($,"generate",(function(){return generate})),x.d($,"iif",(function(){return iif})),x.d($,"interval",(function(){return interval})),x.d($,"merge",(function(){return ut.a})),x.d($,"never",(function(){return never})),x.d($,"of",(function(){return st.a})),x.d($,"onErrorResumeNext",(function(){return onErrorResumeNext})),x.d($,"pairs",(function(){return pairs})),x.d($,"partition",(function(){return partition})),x.d($,"race",(function(){return ft.a})),x.d($,"range",(function(){return range})),x.d($,"throwError",(function(){return pt.a})),x.d($,"timer",(function(){return ht.a})),x.d($,"using",(function(){return using})),x.d($,"zip",(function(){return bt.b})),x.d($,"scheduled",(function(){return vt.a})),x.d($,"EMPTY",(function(){return tt.a})),x.d($,"NEVER",(function(){return at})),x.d($,"config",(function(){return yt.a}));var E=x(4),C=x(79),k=x(77),I=x(26),R=x(7),D=x(80),W=x(57),V=x(35),G=x(49),K=x(8),J=x(70),ie=x(1),oe=x(36),ue=function(w){function AnimationFrameAction($,x){var E=w.call(this,$,x)||this;return E.scheduler=$,E.work=x,E}return ie.__extends(AnimationFrameAction,w),AnimationFrameAction.prototype.requestAsyncId=function($,x,E){return void 0===E&&(E=0),null!==E&&E>0?w.prototype.requestAsyncId.call(this,$,x,E):($.actions.push(this),$.scheduled||($.scheduled=requestAnimationFrame((function(){return $.flush(null)}))))},AnimationFrameAction.prototype.recycleAsyncId=function($,x,E){if(void 0===E&&(E=0),null!==E&&E>0||null===E&&this.delay>0)return w.prototype.recycleAsyncId.call(this,$,x,E);0===$.actions.length&&(cancelAnimationFrame(x),$.scheduled=void 0)},AnimationFrameAction}(oe.a),ae=x(34),se=new(function(w){function AnimationFrameScheduler(){return null!==w&&w.apply(this,arguments)||this}return ie.__extends(AnimationFrameScheduler,w),AnimationFrameScheduler.prototype.flush=function(w){this.active=!0,this.scheduled=void 0;var $,x=this.actions,E=-1,C=x.length;w=w||x.shift();do{if($=w.execute(w.state,w.delay))break}while(++E$.index?1:-1:w.delay>$.delay?1:-1},VirtualAction}(oe.a),he=x(71),ve=x(6),ge=x(2),Se=x(23),we=x(48),Ce=x(25),Pe=x(20);function isObservable(w){return!!w&&(w instanceof E.a||"function"==typeof w.lift&&"function"==typeof w.subscribe)}var Ie=x(28),Fe=x(31),Re=x(27),Le=x(51),De=x(82),Ue=x(10),ze=x(64),He=x(9),Ke=x(11);function bindCallback(w,$,x){if($){if(!Object(Ke.a)($))return function(){for(var E=[],C=0;C1?E.next(Array.prototype.slice.call(arguments)):E.next(w)}),E,x)}))}function fromEventPattern(w,$,x){return x?fromEventPattern(w,$).pipe(Object(Ue.a)((function(w){return Object(He.a)(w)?x.apply(void 0,w):x(w)}))):new E.a((function(x){var E,handler=function(){for(var w=[],$=0;$=$){E.complete();break}if(E.next(k++),E.closed)break}}))}function range_dispatch(w){var $=w.start,x=w.index,E=w.count,C=w.subscriber;x>=E?C.complete():(C.next($),C.closed||(w.index=x+1,w.start=$+1,this.schedule(w)))}var pt=x(58),ht=x(86);function using(w,$){return new E.a((function(x){var E,C;try{E=w()}catch(w){return void x.error(w)}try{C=$(E)}catch(w){return void x.error(w)}var k=(C?Object(nt.a)(C):tt.a).subscribe(x);return function(){k.unsubscribe(),E&&E.unsubscribe()}}))}var bt=x(62),vt=x(87),yt=x(19)}]); //# sourceMappingURL=Plugin.js.map \ No newline at end of file diff --git a/Tests/Unit/Presentation/IconLabel/IconLabelFactoryTest.php b/Tests/Unit/Presentation/IconLabel/IconLabelFactoryTest.php new file mode 100644 index 0000000..cc248e3 --- /dev/null +++ b/Tests/Unit/Presentation/IconLabel/IconLabelFactoryTest.php @@ -0,0 +1,184 @@ + */ + public static function forNodeTreePresetSamples(): \Traversable + { + yield 'empty node tree preset' => + [ + [], + new IconLabel( + icon: 'filter', + label: 'N/A', + ), + ]; + + yield 'node tree preset with empty ui configuration' => + [ + ['ui' => []], + new IconLabel( + icon: 'filter', + label: 'N/A', + ), + ]; + + yield 'node tree preset with just an icon' => + [ + ['ui' => ['icon' => 'globe']], + new IconLabel( + icon: 'globe', + label: 'N/A', + ), + ]; + + yield 'node tree preset with just a label' => + [ + ['ui' => ['label' => 'The Node Tree Preset']], + new IconLabel( + icon: 'filter', + label: 'The Node Tree Preset', + ), + ]; + + yield 'node tree preset with icon and label' => + [ + [ + 'ui' => [ + 'icon' => 'globe', + 'label' => 'The Node Tree Preset', + ], + ], + new IconLabel( + icon: 'globe', + label: 'The Node Tree Preset', + ), + ]; + } + + /** + * @dataProvider forNodeTreePresetSamples + * @test + * @param array $nodeTreePreset + */ + public function createsIconLabelsForNodeTreePresets( + array $nodeTreePreset, + IconLabel $expectedIconLabel, + ): void { + $iconLabelFactory = new IconLabelFactory(); + + Assert::assertEquals( + expected: $expectedIconLabel, + actual: $iconLabelFactory->forNodeTreePreset($nodeTreePreset), + ); + } + + /** @return \Traversable */ + public static function forNodeTypeSamples(): \Traversable + { + yield 'node type without ui configuration' => + [ + new NodeType( + name: NodeTypeName::fromString('Vendor.Site:Foo'), + declaredSuperTypes: [], + configuration: [], + ), + new IconLabel( + icon: 'questionmark', + label: 'N/A', + ) + ]; + + yield 'node type with empty ui configuration' => + [ + new NodeType( + name: NodeTypeName::fromString('Vendor.Site:Foo'), + declaredSuperTypes: [], + configuration: ['ui' => []], + ), + new IconLabel( + icon: 'questionmark', + label: 'N/A', + ) + ]; + + yield 'node type with just an icon' => + [ + new NodeType( + name: NodeTypeName::fromString('Vendor.Site:Foo'), + declaredSuperTypes: [], + configuration: ['ui' => ['icon' => 'file']], + ), + new IconLabel( + icon: 'file', + label: 'N/A', + ) + ]; + + yield 'node type with just a label' => + [ + new NodeType( + name: NodeTypeName::fromString('Vendor.Site:Foo'), + declaredSuperTypes: [], + configuration: ['ui' => ['label' => 'Blog Post']], + ), + new IconLabel( + icon: 'questionmark', + label: 'Blog Post', + ) + ]; + + yield 'node type with an icon and a label' => + [ + new NodeType( + name: NodeTypeName::fromString('Vendor.Site:Foo'), + declaredSuperTypes: [], + configuration: [ + 'ui' => [ + 'icon' => 'file', + 'label' => 'Blog Post', + ], + ], + ), + new IconLabel( + icon: 'file', + label: 'Blog Post', + ) + ]; + } + + /** + * @dataProvider forNodeTypeSamples + * @test + */ + public function createsIconLabelsForNodeTypes( + NodeType $nodeType, + IconLabel $expectedIconLabel, + ): void { + $iconLabelFactory = new IconLabelFactory(); + + Assert::assertEquals( + expected: $expectedIconLabel, + actual: $iconLabelFactory->forNodeType($nodeType), + ); + } +} diff --git a/Tests/Unit/Presentation/Option/OptionFactoryTest.php b/Tests/Unit/Presentation/Option/OptionFactoryTest.php new file mode 100644 index 0000000..41d9e0c --- /dev/null +++ b/Tests/Unit/Presentation/Option/OptionFactoryTest.php @@ -0,0 +1,161 @@ + */ + public static function forNodeTreePresetSamples(): \Traversable + { + yield 'empty node tree preset' => + [ + [], + new Option( + value: '', + label: new IconLabel( + icon: 'filter', + label: 'N/A', + ), + ), + ]; + + yield 'node tree preset with simple baseNodeType configuration' => + [ + ['baseNodeType' => 'Neos.Neos:Document'], + new Option( + value: 'Neos.Neos:Document', + label: new IconLabel( + icon: 'filter', + label: 'N/A', + ), + ), + ]; + + yield 'node tree preset with complex baseNodeType configuration' => + [ + ['baseNodeType' => 'Vendor.Site:Foo,Vendor.Site:Bar,!Vendor.Site:Baz,!Vendor.Site:Qux,Vendor.Site:Quux'], + new Option( + value: 'Vendor.Site:Foo,Vendor.Site:Bar,!Vendor.Site:Baz,!Vendor.Site:Qux,Vendor.Site:Quux', + label: new IconLabel( + icon: 'filter', + label: 'N/A', + ), + ), + ]; + + yield 'node tree preset with ui configuration' => + [ + [ + 'baseNodeType' => 'Neos.Neos:Document', + 'ui' => [ + 'icon' => 'file', + 'label' => 'Documents', + ], + ], + new Option( + value: 'Neos.Neos:Document', + label: new IconLabel( + icon: 'file', + label: 'Documents', + ), + ), + ]; + } + + /** + * @dataProvider forNodeTreePresetSamples + * @test + * @param array $nodeTreePreset + */ + public function createsOptionsForNodeTreePresets( + array $nodeTreePreset, + Option $expectedOption, + ): void { + $optionFactory = new OptionFactory( + iconLabelFactory: new IconLabelFactory(), + ); + + Assert::assertEquals( + expected: $expectedOption, + actual: $optionFactory->forNodeTreePreset($nodeTreePreset), + ); + } + + /** @return \Traversable */ + public static function forNodeTypeSamples(): \Traversable + { + yield 'node type without ui configuration' => + [ + new NodeType( + name: NodeTypeName::fromString('Vendor.Site:Foo'), + declaredSuperTypes: [], + configuration: [], + ), + new Option( + value: 'Vendor.Site:Foo', + label: new IconLabel( + icon: 'questionmark', + label: 'N/A', + ), + ), + ]; + + yield 'node type with ui configuration' => + [ + new NodeType( + name: NodeTypeName::fromString('Vendor.Site:Townmap'), + declaredSuperTypes: [], + configuration: [ + 'ui' => [ + 'icon' => 'map', + 'label' => 'Townmap', + ] + ], + ), + new Option( + value: 'Vendor.Site:Townmap', + label: new IconLabel( + icon: 'map', + label: 'Townmap', + ), + ), + ]; + } + + /** + * @dataProvider forNodeTypeSamples + * @test + */ + public function createsOptionsForNodeTypes( + NodeType $nodeType, + Option $expectedOption, + ): void { + $optionFactory = new OptionFactory( + iconLabelFactory: new IconLabelFactory(), + ); + + Assert::assertEquals( + expected: $expectedOption, + actual: $optionFactory->forNodeType($nodeType), + ); + } +} diff --git a/Tests/Unit/Presentation/Option/OptionsFactoryTest.php b/Tests/Unit/Presentation/Option/OptionsFactoryTest.php new file mode 100644 index 0000000..511aeba --- /dev/null +++ b/Tests/Unit/Presentation/Option/OptionsFactoryTest.php @@ -0,0 +1,235 @@ + */ + public static function forNodeTreePresetsSamples(): \Traversable + { + yield 'empty node tree presets' => + [ + [], + new Options(), + ]; + + yield 'node tree presets with jus a simple default' => + [ + [ + 'default' => [ + 'baseNodeType' => 'Neos.Neos:Document', + 'ui' => [ + 'icon' => 'file', + 'label' => 'Documents', + ], + ], + ], + new Options( + new Option( + value: 'Neos.Neos:Document', + label: new IconLabel( + icon: 'file', + label: 'Documents', + ), + ), + ), + ]; + + yield 'some more node tree presets' => + [ + [ + 'default' => [ + 'baseNodeType' => 'Neos.Neos:Document', + 'ui' => [ + 'icon' => 'file', + 'label' => 'Documents', + ], + ], + 'custom-1' => [ + 'baseNodeType' => 'Neos.Neos:Document,!Vendor.Site:Forbidden', + 'ui' => [ + 'icon' => 'alert', + 'label' => 'Custom Preset #1', + ], + ], + 'custom-2' => [ + 'baseNodeType' => 'Vendor.Site:Allowed,!Vendor.Site:Forbidden', + 'ui' => [ + 'icon' => 'globe', + 'label' => 'Custom Preset #2', + ], + ], + ], + new Options( + new Option( + value: 'Neos.Neos:Document', + label: new IconLabel( + icon: 'file', + label: 'Documents', + ), + ), + new Option( + value: 'Neos.Neos:Document,!Vendor.Site:Forbidden', + label: new IconLabel( + icon: 'alert', + label: 'Custom Preset #1', + ), + ), + new Option( + value: 'Vendor.Site:Allowed,!Vendor.Site:Forbidden', + label: new IconLabel( + icon: 'globe', + label: 'Custom Preset #2', + ), + ), + ), + ]; + } + + /** + * @dataProvider forNodeTreePresetsSamples + * @test + * @param array $nodeTreePresets + */ + public function createsOptionsForNodeTreePresets( + array $nodeTreePresets, + Options $expectedOptions, + ): void { + $optionsFactory = new OptionsFactory( + optionFactory: new OptionFactory( + iconLabelFactory: new IconLabelFactory(), + ), + ); + + Assert::assertEquals( + expected: $expectedOptions, + actual: $optionsFactory->forNodeTreePresets($nodeTreePresets), + ); + } + + /** @return \Traversable */ + public static function forNodeTypesSamples(): \Traversable + { + yield 'no node types' => + [ + [], + new Options(), + ]; + + yield 'one node type' => + [ + [ + new NodeType( + name: NodeTypeName::fromString('Vendor.Site:Foo'), + declaredSuperTypes: [], + configuration: [], + ), + ], + new Options( + new Option( + value: 'Vendor.Site:Foo', + label: new IconLabel( + icon: 'questionmark', + label: 'N/A', + ), + ), + ), + ]; + + yield 'more node types' => + [ + [ + new NodeType( + name: NodeTypeName::fromString('Vendor.Site:Foo'), + declaredSuperTypes: [], + configuration: [], + ), + new NodeType( + name: NodeTypeName::fromString('Vendor.Site:Bar'), + declaredSuperTypes: [], + configuration: [ + 'ui' => [ + 'icon' => 'file', + 'label' => 'Custom Node Type #1', + ] + ], + ), + new NodeType( + name: NodeTypeName::fromString('Vendor.Site:Baz'), + declaredSuperTypes: [], + configuration: [ + 'ui' => [ + 'icon' => 'globe', + 'label' => 'Custom Node Type #2', + ] + ], + ), + ], + new Options( + new Option( + value: 'Vendor.Site:Foo', + label: new IconLabel( + icon: 'questionmark', + label: 'N/A', + ), + ), + new Option( + value: 'Vendor.Site:Bar', + label: new IconLabel( + icon: 'file', + label: 'Custom Node Type #1', + ), + ), + new Option( + value: 'Vendor.Site:Baz', + label: new IconLabel( + icon: 'globe', + label: 'Custom Node Type #2', + ), + ), + ), + ]; + } + + /** + * @dataProvider forNodeTypesSamples + * @test + * @param NodeType[] $nodeTypes + */ + public function createsOptionsForNodeTypes( + array $nodeTypes, + Options $expectedOptions, + ): void { + $optionsFactory = new OptionsFactory( + optionFactory: new OptionFactory( + iconLabelFactory: new IconLabelFactory(), + ), + ); + + Assert::assertEquals( + expected: $expectedOptions, + actual: $optionsFactory->forNodeTypes(...$nodeTypes), + ); + } +} diff --git a/composer.json b/composer.json index 3136586..58c8637 100644 --- a/composer.json +++ b/composer.json @@ -16,12 +16,15 @@ } ], "require": { - "neos/neos": "^5.3 || ^7.0 || ^8.0 || ^9.0 || dev-master" + "neos/neos": "^9.0 || dev-master" }, "require-dev": { "phpunit/phpunit": "^9.4", "phpstan/phpstan": "^1.10.67", - "neos/buildessentials": "^6.3", + "neos/flow-development-collection": "9.0.x-dev", + "neos/neos-development-collection": "9.0.x-dev", + "neos/behat": "9.0.x-dev", + "neos/buildessentials": "9.0.x-dev", "mikey179/vfsstream": "^1.6", "squizlabs/php_codesniffer": "^3.5" },