diff options
author | Pierre-Charles David | 2019-06-04 07:41:42 +0000 |
---|---|---|
committer | Pierre-Charles David | 2019-06-11 13:59:47 +0000 |
commit | 68910c674f45af659acda33b0db9c9aa0493437a (patch) | |
tree | 66f89783996bc93eeaca6ce6dca24accb2467a84 | |
parent | 53c90af1a0faa875454fe42ce18830832267ac57 (diff) | |
download | org.eclipse.sirius-68910c674f45af659acda33b0db9c9aa0493437a.tar.gz org.eclipse.sirius-68910c674f45af659acda33b0db9c9aa0493437a.tar.xz org.eclipse.sirius-68910c674f45af659acda33b0db9c9aa0493437a.zip |
[547951] Add experimental Sprotty-based diagram server code
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=547951
Change-Id: I7f5cf60a04e7a5c08d83586ee9921e29421e34f6
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
79 files changed, 26786 insertions, 0 deletions
diff --git a/packaging/org.eclipse.sirius.parent/pom.xml b/packaging/org.eclipse.sirius.parent/pom.xml index 3b4fdd8d86..53893b672f 100644 --- a/packaging/org.eclipse.sirius.parent/pom.xml +++ b/packaging/org.eclipse.sirius.parent/pom.xml @@ -383,6 +383,10 @@ <module>../../plugins/org.eclipse.sirius.server.application</module> <module>../../plugins/org.eclipse.sirius.server.backend</module> <module>../../plugins/org.eclipse.sirius.server.diagram</module> + <!-- Disabled by default, see the README inside the plug-in for more details --> + <!-- + <module>../../plugins/org.eclipse.sirius.server.diagram.sprotty</module> + --> <module>../../plugins/org.eclipse.sirius.server.frontend</module> <module>../../plugins/org.eclipse.sirius.server.frontend.workflow</module> <module>../../plugins/org.eclipse.sirius.server.graphql</module> diff --git a/packaging/org.eclipse.sirius.server.feature/feature.xml b/packaging/org.eclipse.sirius.server.feature/feature.xml index 2da6e178fa..c609159470 100644 --- a/packaging/org.eclipse.sirius.server.feature/feature.xml +++ b/packaging/org.eclipse.sirius.server.feature/feature.xml @@ -67,6 +67,15 @@ version="0.0.0" unpack="false"/> + <!--Disabled by default + <plugin + id="org.eclipse.sirius.server.diagram.sprotty" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + --> + <plugin id="org.eclipse.sirius.services.diagram" download-size="0" diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/.classpath b/plugins/org.eclipse.sirius.server.diagram.sprotty/.classpath new file mode 100644 index 0000000000..c1de8f514d --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/.classpath @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="lib" path="lib/org.eclipse.sprotty-0.6.0.jar" sourcepath="lib_src/org.eclipse.sprotty-0.6.0-sources.jar"> + <attributes> + <attribute name="javadoc_location" value="jar:platform:/resource/org.eclipse.sirius.server/lib_src/org.eclipse.sprotty-0.6.0-javadoc.jar!/"/> + </attributes> + </classpathentry> + <classpathentry kind="lib" path="lib/org.eclipse.sprotty.layout-0.6.0.jar" sourcepath="lib_src/org.eclipse.sprotty.layout-0.6.0-sources.jar"> + <attributes> + <attribute name="javadoc_location" value="jar:platform:/resource/org.eclipse.sirius.server/lib_src/org.eclipse.sprotty.layout-0.6.0-javadoc.jar!/"/> + </attributes> + </classpathentry> + <classpathentry kind="lib" path="lib/org.eclipse.sprotty.server-0.6.0.jar" sourcepath="lib_src/org.eclipse.sprotty.server-0.6.0-sources.jar"> + <attributes> + <attribute name="javadoc_location" value="jar:platform:/resource/org.eclipse.sirius.server/lib_src/org.eclipse.sprotty.server-0.6.0-javadoc.jar!/"/> + </attributes> + </classpathentry> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/.project b/plugins/org.eclipse.sirius.server.diagram.sprotty/.project new file mode 100644 index 0000000000..5644622a7c --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.server.diagram.sprotty</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.server.diagram.sprotty/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..523c3d606b --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,398 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter= +org.eclipse.jdt.core.circularClasspath=error +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=warning +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=error +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=error +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=warning +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=120 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=150 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/.settings/org.eclipse.jdt.launching.prefs b/plugins/org.eclipse.sirius.server.diagram.sprotty/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 0000000000..3bb235278e --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=ignore diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.sirius.server.diagram.sprotty/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000..3e1d90bc04 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,67 @@ +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=com;java;javax;org; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * Return the ${bare_field_name}.\n *\n * @return the ${bare_field_name}\n */</template><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * Sets the ${bare_field_name}.\n *\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) 2018 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * Obeo - initial API and implementation\n *******************************************************************************/</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * {@inheritDoc}\n *\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">e.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="false" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return this.${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> +sp_cleanup.add_default_serial_version_id=false +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=false +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=true +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=false +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=false +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=false +sp_cleanup.remove_redundant_type_arguments=false +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=false +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=false +sp_cleanup.remove_unused_private_types=false +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_lambda=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_type_arguments=false diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/.settings/org.eclipse.pde.core.prefs b/plugins/org.eclipse.sirius.server.diagram.sprotty/.settings/org.eclipse.pde.core.prefs new file mode 100644 index 0000000000..923c37fb8d --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/.settings/org.eclipse.pde.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +resolve.requirebundle=false diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.sirius.server.diagram.sprotty/.settings/org.eclipse.pde.prefs new file mode 100644 index 0000000000..12b4bcc1a4 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/.settings/org.eclipse.pde.prefs @@ -0,0 +1,32 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=1 +compilers.p.build.encodings=1 +compilers.p.build.java.compiler=1 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=1 +compilers.p.build.source.library=1 +compilers.p.build.src.includes=1 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=1 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=0 +compilers.p.missing-version-require-bundle=0 +compilers.p.no-required-att=0 +compilers.p.not-externalized-att=0 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +eclipse.preferences.version=1 diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.server.diagram.sprotty/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..ce288f8b21 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/META-INF/MANIFEST.MF @@ -0,0 +1,45 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.sirius.server.diagram.sprotty;singleton:=true +Bundle-Version: 6.2.1.qualifier +Bundle-Vendor: %providerName +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-Localization: plugin +Bundle-ActivationPolicy: lazy +Bundle-Activator: org.eclipse.sirius.server.diagram.internal.SiriusDiagramServerPlugin$Implementation +Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0", + org.eclipse.emf.common;bundle-version="[2.8.0,3.0.0)", + javax.servlet;bundle-version="[3.1.0,4.0.0)", + javax.websocket;bundle-version="1.0.0", + org.eclipse.jetty.http;bundle-version="[9.0.0,10.0.0)", + org.eclipse.jetty.server;bundle-version="[9.0.0,10.0.0)", + org.eclipse.jetty.servlet;bundle-version="[9.0.0,10.0.0)", + org.eclipse.jetty.util;bundle-version="[9.0.0,10.0.0)", + org.eclipse.jetty.websocket.javax.websocket;bundle-version="[9.0.0,10.0.0)", + org.eclipse.jetty.websocket.javax.websocket.server;bundle-version="[9.0.0,10.0.0)", + org.eclipse.emf.ecore;bundle-version="2.13.0", + org.eclipse.elk.core;bundle-version="0.4.0", + org.eclipse.elk.graph;bundle-version="0.4.0", + org.eclipse.elk.alg.layered;bundle-version="0.4.0", + org.apache.log4j;bundle-version="1.2.15", + com.google.gson;bundle-version="2.7.0", + org.eclipse.xtext.xbase;bundle-version="2.12.0", + org.eclipse.emf.transaction;bundle-version="1.9.0", + org.eclipse.sirius;bundle-version="6.0.0", + org.eclipse.sirius.diagram;bundle-version="6.0.0", + org.eclipse.sirius.ecore.extender;bundle-version="6.0.0", + org.eclipse.sirius.common.interpreter;bundle-version="6.0.0", + org.eclipse.sirius.common;bundle-version="6.0.0", + org.eclipse.sirius.server;bundle-version="6.0.0" +Export-Package: org.eclipse.sirius.server.diagram.internal;x-internal:=true, + org.eclipse.sirius.server.diagram.internal.actions;x-internal:=true, + org.eclipse.sirius.server.diagram.internal.actions.handlers;x-internal:=true, + org.eclipse.sirius.server.diagram.internal.entities;x-internal:=true, + org.eclipse.sirius.server.diagram.internal.interpreter;x-internal:=true +Bundle-ClassPath: ., + lib/org.eclipse.sprotty-0.6.0.jar, + lib/org.eclipse.sprotty.layout-0.6.0.jar, + lib/org.eclipse.sprotty.server-0.6.0.jar +Eclipse-BundleShape: dir +Automatic-Module-Name: org.eclipse.sirius.server.diagram diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/README.md b/plugins/org.eclipse.sirius.server.diagram.sprotty/README.md new file mode 100644 index 0000000000..a9e6297534 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/README.md @@ -0,0 +1,34 @@ +# org.eclipse.sirius.server.diagram.sprotty + +The code in this plug-in is experimental. It is made available for +interested people to experiment with it, but is not supported. + +Note that it does not build out-of-the box, so by default it is not +integrated into the main build: it depends on Eclipse Sprotty 0.6.0 +which at this time can not be easily consumed by other "classical" +Eclipse projects (at least ones made of Eclipse Platform Plug-ins). + +If you want to build it, you will need to: + +1. Get the official Sprotty 0.6.0 JARs [from Maven + Central](https://search.maven.org/search?q=g:org.eclipse.sprotty) + (here with their SHA1) and put them inside the `lib` and `lib_src` + folders inside this plug-ins: + + - `9080e69f2669a0e7c64072b98bc75beb0667abac` `lib/org.eclipse.sprotty-0.6.0.jar` + - `66ac6d156cd92241a87448b75a55503174ba8006` `lib/org.eclipse.sprotty.layout-0.6.0.jar` + - `ba72351a960b3d9d60c654b65ad48369a447db69` `lib/org.eclipse.sprotty.server-0.6.0.jar` + - `6557f422ccd50cb861feb24b03073cd7fc80f8b4` `lib_src/org.eclipse.sprotty-0.6.0-javadoc.jar` + - `bd2b961981f8f810e060c8e0569b65bf64a18626` `lib_src/org.eclipse.sprotty-0.6.0-sources.jar` + - `dd6b278a592376c59530bee3603401229b2be1fa` `lib_src/org.eclipse.sprotty.layout-0.6.0-javadoc.jar` + - `ee9378042abd40ed9d5aaac635492122ab6e8178` `lib_src/org.eclipse.sprotty.layout-0.6.0-sources.jar` + - `b193cb530b4393949c5070563a534a45929dfa26` `lib_src/org.eclipse.sprotty.server-0.6.0-javadoc.jar` + - `81d229f90609a3d96cc1002c2f935424e7c9f716` `lib_src/org.eclipse.sprotty.server-0.6.0-sources.jar` + +2. In `packaging/org.eclipse.sirius.parent/pom.xml`, enable the + `org.eclipse.sirius.server.diagram.sprotty` module (found inside + the `headless-server` profile), which is commented out by default. + +3. In `packaging/org.eclipse.sirius.server.feature/feature.xml`, enable the + `org.eclipse.sirius.server.diagram.sprotty` plug-in, which is commented out + by default. diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/about.html b/plugins/org.eclipse.sirius.server.diagram.sprotty/about.html new file mode 100644 index 0000000000..420ad0f930 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/about.html @@ -0,0 +1,27 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<!-- saved from url=(0043)http://www.eclipse.org/legal/epl/about.html --> +<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> + +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<p>June 5, 2006</p> +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> + + +</body></html>
\ No newline at end of file diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/build.properties b/plugins/org.eclipse.sirius.server.diagram.sprotty/build.properties new file mode 100644 index 0000000000..e9de1a0169 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/build.properties @@ -0,0 +1,20 @@ +# ==================================================================== +# Copyright (c) 2018 Obeo +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Obeo - initial API and implementation +# ==================================================================== +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.properties,\ + about.html,\ + lib/,\ + webapp/,\ + plugin.xml +javacProjectSettings = true diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/lib/.gitkeep b/plugins/org.eclipse.sirius.server.diagram.sprotty/lib/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/lib/.gitkeep diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/lib_src/.gitkeep b/plugins/org.eclipse.sirius.server.diagram.sprotty/lib_src/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/lib_src/.gitkeep diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/plugin.properties b/plugins/org.eclipse.sirius.server.diagram.sprotty/plugin.properties new file mode 100644 index 0000000000..e7ec00416a --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/plugin.properties @@ -0,0 +1,13 @@ +# ==================================================================== +# Copyright (c) 2018 Obeo +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Obeo - initial API and implementation +# ==================================================================== + +pluginName = Sirius Diagram Server +providerName = Eclipse Modeling Project diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/plugin.xml b/plugins/org.eclipse.sirius.server.diagram.sprotty/plugin.xml new file mode 100644 index 0000000000..e2e1944f99 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/plugin.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<plugin> + <extension + point="org.eclipse.sirius.server.siriusServerConfigurator"> + <descriptor + class="org.eclipse.sirius.server.diagram.internal.SiriusServerDiagramConfigurator" + id="org.eclipse.sirius.server.diagram.SiriusServerDiagramConfiguratorOld"> + </descriptor> + </extension> + <extension + id="SiriusServer" + point="org.eclipse.core.runtime.applications"> + <application + cardinality="singleton-global" + thread="any" + visible="true"> + <run + class="org.eclipse.sirius.server.diagram.internal.SiriusDiagramServerLauncher"> + </run> + </application> + </extension> + +</plugin> diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/pom.xml b/plugins/org.eclipse.sirius.server.diagram.sprotty/pom.xml new file mode 100644 index 0000000000..1f7d4badaf --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/pom.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Copyright (c) 2018 Obeo. +All rights reserved. This program and the accompanying materials +are made available under the terms of the Eclipse Public License v2.0 +which accompanies this distribution, and is available at +https://www.eclipse.org/legal/epl-2.0/ + +Contributors: + Obeo - initial API and implementation +--> +<project + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.eclipse.sirius</groupId> + <artifactId>sirius-parent</artifactId> + <version>6.2.1-SNAPSHOT</version> + <relativePath>../../packaging/org.eclipse.sirius.parent</relativePath> + </parent> + + <artifactId>org.eclipse.sirius.server.diagram.sprotty</artifactId> + <packaging>eclipse-plugin</packaging> + <version>6.2.1-SNAPSHOT</version> + +</project>
\ No newline at end of file diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramGenerator.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramGenerator.java new file mode 100644 index 0000000000..7519be8576 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramGenerator.java @@ -0,0 +1,649 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal; + +import com.google.gson.Gson; +import com.google.gson.JsonObject; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.Optional; +import java.util.stream.Collectors; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.Path; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.sirius.diagram.ContainerLayout; +import org.eclipse.sirius.diagram.ContainerStyle; +import org.eclipse.sirius.diagram.DDiagram; +import org.eclipse.sirius.diagram.DDiagramElement; +import org.eclipse.sirius.diagram.DDiagramElementContainer; +import org.eclipse.sirius.diagram.DEdge; +import org.eclipse.sirius.diagram.DNode; +import org.eclipse.sirius.diagram.DNodeContainer; +import org.eclipse.sirius.diagram.DNodeList; +import org.eclipse.sirius.diagram.DNodeListElement; +import org.eclipse.sirius.diagram.EdgeStyle; +import org.eclipse.sirius.diagram.FlatContainerStyle; +import org.eclipse.sirius.diagram.LabelPosition; +import org.eclipse.sirius.diagram.NodeStyle; +import org.eclipse.sirius.diagram.Square; +import org.eclipse.sirius.diagram.WorkspaceImage; +import org.eclipse.sirius.server.diagram.internal.entities.SiriusEdge; +import org.eclipse.sirius.server.diagram.internal.entities.SiriusFreeFormFlatContainerNode; +import org.eclipse.sirius.server.diagram.internal.entities.SiriusLabel; +import org.eclipse.sirius.server.diagram.internal.entities.SiriusListFlatContainerNode; +import org.eclipse.sirius.server.diagram.internal.entities.SiriusListFlatContainerNodeBodyCompartment; +import org.eclipse.sirius.server.diagram.internal.entities.SiriusListFlatContainerNodeLabelCompartment; +import org.eclipse.sirius.server.diagram.internal.entities.SiriusSquareBorderNode; +import org.eclipse.sirius.server.diagram.internal.entities.SiriusSquareNode; +import org.eclipse.sirius.server.diagram.internal.entities.SiriusSvgBorderNode; +import org.eclipse.sirius.server.diagram.internal.entities.SiriusSvgNode; +import org.eclipse.sirius.viewpoint.LabelAlignment; +import org.eclipse.sirius.viewpoint.RGBValues; +import org.eclipse.sirius.viewpoint.Style; +import org.eclipse.sprotty.LayoutOptions; +import org.eclipse.sprotty.RequestModelAction; +import org.eclipse.sprotty.SEdge; +import org.eclipse.sprotty.SGraph; +import org.eclipse.sprotty.SLabel; +import org.eclipse.sprotty.SModelElement; +import org.eclipse.sprotty.SNode; +import org.eclipse.sprotty.SPort; + +/** + * The {@link SiriusDiagramGenerator} is used to compute a Sprotty diagram from Sirius. + * + * @author sbegaudeau + */ +public class SiriusDiagramGenerator { + + /** + * Computes the diagram. + * + * @param action + * The request model action + * + * @return The diagram computed + */ + public SGraph computeDiagram(SiriusDiagramServer siriusDiagramServer, RequestModelAction action) { + DDiagram dDiagram = siriusDiagramServer.getDDiagram(); + SGraph sGraph = this.convert(dDiagram); + return sGraph; + } + + /** + * Converts the given {@link DDiagram} to an {@link SGraph}. + * + * @param dDiagram + * The Sirius Diagram + * @return The {@link SGraph} computed from the {@link DDiagram} + */ + private SGraph convert(DDiagram dDiagram) { + SGraph sGraph = new SGraph((graph) -> { + graph.setId(dDiagram.getUid()); + graph.setType("graph"); //$NON-NLS-1$ + graph.setChildren(new ArrayList<>()); + }); + + // @formatter:off + dDiagram.getOwnedDiagramElements().stream() + .filter(DDiagramElement::isVisible) + .filter(DNode.class::isInstance) + .map(DNode.class::cast) + .map(this::convertDNode) + .filter(Optional::isPresent) + .map(Optional::get) + .forEach(sGraph.getChildren()::add); + + dDiagram.getOwnedDiagramElements().stream() + .filter(DDiagramElement::isVisible) + .filter(DNodeContainer.class::isInstance) + .map(DNodeContainer.class::cast) + .map(this::convertDNodeContainer) + .filter(Optional::isPresent) + .map(Optional::get) + .forEach(sGraph.getChildren()::add); + + dDiagram.getOwnedDiagramElements().stream() + .filter(DDiagramElement::isVisible) + .filter(DNodeList.class::isInstance) + .map(DNodeList.class::cast) + .map(this::convertDNodeList) + .filter(Optional::isPresent) + .map(Optional::get) + .forEach(sGraph.getChildren()::add); + + dDiagram.getOwnedDiagramElements().stream() + .filter(DDiagramElement::isVisible) + .filter(DEdge.class::isInstance) + .map(DEdge.class::cast) + .map(this::convertDEdge) + .filter(Optional::isPresent) + .map(Optional::get) + .forEach(sGraph.getChildren()::add); + // @formatter:on + + return sGraph; + } + + /** + * Dispatch the transformation of the given diagram element to the proper method. + * + * @param element + * The element to convert + * @return The element converted + */ + private Optional<SModelElement> convertDDiagramElement(DDiagramElement element) { + Optional<SModelElement> optionalSModelElement = Optional.empty(); + if (element instanceof DNode) { + Optional<SNode> optionalSNode = this.convertDNode((DNode) element); + if (optionalSNode.isPresent()) { + optionalSModelElement = Optional.of(optionalSNode.get()); + } + } else if (element instanceof DNodeContainer) { + Optional<SNode> optionalSNode = this.convertDNodeContainer((DNodeContainer) element); + if (optionalSNode.isPresent()) { + optionalSModelElement = Optional.of(optionalSNode.get()); + } + } else if (element instanceof DNodeList) { + Optional<SNode> optionalSNode = this.convertDNodeList((DNodeList) element); + if (optionalSNode.isPresent()) { + optionalSModelElement = Optional.of(optionalSNode.get()); + } + } + return optionalSModelElement; + } + + /** + * Converts the given {@link DNode} to an {@link SNode}. + * + * @param dNode + * The {@link DNode} to convert + * @return The {@link SNode} computed from the {@link DNode} + */ + private Optional<SNode> convertDNode(DNode dNode) { + Optional<SNode> optionalSNode = Optional.empty(); + + Style style = dNode.getStyle(); + if (style instanceof WorkspaceImage) { + WorkspaceImage workspaceImage = (WorkspaceImage) style; + optionalSNode = this.convertSVGNode(dNode, workspaceImage); + } else if (style instanceof Square) { + Square square = (Square) style; + optionalSNode = this.convertSquareNode(dNode, square); + } + + optionalSNode.ifPresent(sNode -> { + if (style instanceof NodeStyle) { + NodeStyle nodeStyle = (NodeStyle) style; + this.convertLabel(sNode.getId(), dNode.getName(), nodeStyle).ifPresent(sNode.getChildren()::add); + } + // @formatter:off + dNode.getOwnedBorderedNodes().stream() + .map(this::convertBorderedNode) + .filter(Optional::isPresent) + .map(Optional::get) + .forEach(sNode.getChildren()::add); + // @formatter:on + }); + + return optionalSNode; + } + + /** + * Converts the given {@link DNode} into an {@link SNode}. + * + * @param dNode + * The DNode + * @param square + * The square + * @return The SNode computed from the DNode + */ + private Optional<SNode> convertSquareNode(DNode dNode, Square square) { + String identifier = EcoreUtil.getURI(dNode).fragment(); + + RGBValues borderColor = square.getBorderColor(); + RGBValues color = square.getColor(); + Integer borderSize = square.getBorderSize(); + + JsonObject styleJsonObject = new JsonObject(); + styleJsonObject.addProperty("fill", //$NON-NLS-1$ + "rgb(" + color.getRed() + ", " + color.getGreen() + ", " + color.getBlue() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + styleJsonObject.addProperty("stroke", //$NON-NLS-1$ + "rgb(" + borderColor.getRed() + ", " + borderColor.getGreen() + ", " + borderColor.getBlue() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + styleJsonObject.addProperty("stroke-width", borderSize); //$NON-NLS-1$ + + String styleJson = new Gson().toJson(styleJsonObject); + + SiriusSquareNode siriusSquareNode = new SiriusSquareNode(identifier); + siriusSquareNode.setStyle(styleJson); + return Optional.of(siriusSquareNode); + } + + /** + * Converts the given {@link DNode} into an {@link SNode}. + * + * @param dNode + * The DNode + * @param workspaceImage + * The workspace image used as the style of the DNode + * @return The SNode computed from the DNonde + */ + private Optional<SNode> convertSVGNode(DNode dNode, WorkspaceImage workspaceImage) { + String identifier = EcoreUtil.getURI(dNode).fragment(); + + String svgData = ""; //$NON-NLS-1$ + String workspacePath = workspaceImage.getWorkspacePath(); + IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(workspacePath)); + if (file.exists() && file.getFileExtension().equals("svg")) { //$NON-NLS-1$ + try { + svgData = new BufferedReader(new InputStreamReader(file.getContents())).lines().collect(Collectors.joining("\n")); //$NON-NLS-1$ + } catch (CoreException e) { + e.printStackTrace(); + } + } + + SiriusSvgNode siriusSvgNode = new SiriusSvgNode(identifier); + siriusSvgNode.setSvgData(svgData); + + return Optional.of(siriusSvgNode); + } + + /** + * Computes the label from the given node style. + * + * @param nodeIdentifier + * The identifier of the node containing the label + * @param label + * The text to be displayed in the label + * @param nodeStyle + * The style of the node containing the label + * @return The label computed + */ + private Optional<SLabel> convertLabel(String nodeIdentifier, String label, NodeStyle nodeStyle) { + LabelAlignment labelAlignment = nodeStyle.getLabelAlignment(); + LabelPosition labelPosition = nodeStyle.getLabelPosition(); + RGBValues labelColor = nodeStyle.getLabelColor(); + + String labelIdentifier = nodeIdentifier + "__label"; //$NON-NLS-1$ + SiriusLabel siriusLabel = new SiriusLabel(labelIdentifier, label); + + // Colors + JsonObject styleJsonObject = new JsonObject(); + styleJsonObject.addProperty("fill", //$NON-NLS-1$ + "rgb(" + labelColor.getRed() + ", " + labelColor.getGreen() + ", " + labelColor.getBlue() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + + String styleJson = new Gson().toJson(styleJsonObject); + siriusLabel.setStyle(styleJson); + + // Alignment and position + if (LabelAlignment.LEFT_VALUE == labelAlignment.getValue() && LabelPosition.BORDER == labelPosition.getValue()) { + siriusLabel.setType(SiriusLabel.OUTSIDE_LEFT__LABEL_TYPE); + } else if (LabelAlignment.CENTER_VALUE == labelAlignment.getValue() && LabelPosition.BORDER == labelPosition.getValue()) { + siriusLabel.setType(SiriusLabel.OUTSIDE_CENTER__LABEL_TYPE); + } else if (LabelAlignment.RIGHT_VALUE == labelAlignment.getValue() && LabelPosition.BORDER == labelPosition.getValue()) { + siriusLabel.setType(SiriusLabel.OUTSIDE_RIGHT__LABEL_TYPE); + } else if (LabelAlignment.LEFT_VALUE == labelAlignment.getValue() && LabelPosition.NODE == labelPosition.getValue()) { + siriusLabel.setType(SiriusLabel.INSIDE_LEFT__LABEL_TYPE); + } else if (LabelAlignment.CENTER_VALUE == labelAlignment.getValue() && LabelPosition.NODE == labelPosition.getValue()) { + siriusLabel.setType(SiriusLabel.INSIDE_CENTER__LABEL_TYPE); + } else if (LabelAlignment.RIGHT_VALUE == labelAlignment.getValue() && LabelPosition.NODE == labelPosition.getValue()) { + siriusLabel.setType(SiriusLabel.INSIDE_RIGHT__LABEL_TYPE); + } + + return Optional.of(siriusLabel); + } + + /** + * Converts the given {@link DNode} to an {@link SPort}. + * + * @param borderedNode + * The bordered node + * @return The {@link SNode} computed from the {@link DNode} + */ + private Optional<SPort> convertBorderedNode(DNode borderedNode) { + Optional<SPort> optionalSPort = Optional.empty(); + + Style style = borderedNode.getStyle(); + if (style instanceof WorkspaceImage) { + WorkspaceImage workspaceImage = (WorkspaceImage) style; + optionalSPort = this.convertSVGBorderedNode(borderedNode, workspaceImage); + } else if (style instanceof Square) { + Square square = (Square) style; + optionalSPort = this.convertSquareBorderedNode(borderedNode, square); + } + + return optionalSPort; + } + + /** + * Converts the given {@link DNode} into an {@link SPort}. + * + * @param dNode + * The DNode + * @param square + * The square + * @return The SNode computed from the DNode + */ + private Optional<SPort> convertSquareBorderedNode(DNode dNode, Square square) { + + String identifier = EcoreUtil.getURI(dNode).fragment(); + + RGBValues borderColor = square.getBorderColor(); + RGBValues color = square.getColor(); + Integer borderSize = square.getBorderSize(); + + JsonObject styleJsonObject = new JsonObject(); + styleJsonObject.addProperty("fill", //$NON-NLS-1$ + "rgb(" + color.getRed() + ", " + color.getGreen() + ", " + color.getBlue() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + styleJsonObject.addProperty("stroke", //$NON-NLS-1$ + "rgb(" + borderColor.getRed() + ", " + borderColor.getGreen() + ", " + borderColor.getBlue() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + styleJsonObject.addProperty("stroke-width", borderSize); //$NON-NLS-1$ + + String styleJson = new Gson().toJson(styleJsonObject); + + SiriusSquareBorderNode siriusSquareBorderNode = new SiriusSquareBorderNode(identifier); + siriusSquareBorderNode.setStyle(styleJson); + return Optional.of(siriusSquareBorderNode); + } + + /** + * Converts the given {@link DNode} into an {@link SNode}. + * + * @param dNode + * The DNode + * @param workspaceImage + * The workspace image used as the style of the DNode + * @return The SNode computed from the DNonde + */ + private Optional<SPort> convertSVGBorderedNode(DNode dNode, WorkspaceImage workspaceImage) { + String identifier = EcoreUtil.getURI(dNode).fragment(); + + String workspacePath = workspaceImage.getWorkspacePath(); + SiriusSvgBorderNode siriusSvgBorderNode = new SiriusSvgBorderNode(identifier); + siriusSvgBorderNode.setUrl("http://localhost:8080/images" + workspacePath); //$NON-NLS-1$ + + return Optional.of(siriusSvgBorderNode); + } + + /** + * Converts the given {@link DNodeContainer} to an {@link SNode}. + * + * @param dNodeContainer + * The container + * @return The {@link SNode} computed from the {@link DNodeContainer} + */ + private Optional<SNode> convertDNodeContainer(DNodeContainer dNodeContainer) { + Optional<SNode> optionalSNode = Optional.empty(); + + ContainerLayout containerLayout = dNodeContainer.getChildrenPresentation(); + Style style = dNodeContainer.getStyle(); + if (ContainerLayout.FREE_FORM_VALUE == containerLayout.getValue() && style instanceof FlatContainerStyle) { + FlatContainerStyle flatContainerStyle = (FlatContainerStyle) style; + optionalSNode = this.convertFreeFormFlatContainer(dNodeContainer, flatContainerStyle); + } else if (ContainerLayout.LIST_VALUE == containerLayout.getValue() && style instanceof FlatContainerStyle) { + FlatContainerStyle flatContainerStyle = (FlatContainerStyle) style; + optionalSNode = this.convertListFlatContainer(dNodeContainer, flatContainerStyle); + } + + optionalSNode.ifPresent(sNode -> { + if (style instanceof ContainerStyle) { + ContainerStyle containerStyle = (ContainerStyle) style; + this.convertLabel(sNode.getId(), dNodeContainer.getName(), containerStyle).ifPresent(sNode.getChildren()::add); + } + // @formatter:off + dNodeContainer.getOwnedBorderedNodes().stream() + .filter(DDiagramElement::isVisible) + .map(this::convertBorderedNode) + .filter(Optional::isPresent) + .map(Optional::get) + .forEach(sNode.getChildren()::add); + // @formatter:on + + // @formatter:off + dNodeContainer.getOwnedDiagramElements().stream() + .filter(DDiagramElement::isVisible) + .map(this::convertDDiagramElement) + .filter(Optional::isPresent) + .map(Optional::get) + .forEach(sNode.getChildren()::add); + // @formatter:on + }); + + return optionalSNode; + } + + /** + * Converts the given {@link DDiagramElementContainer} into an {@link SNode}. + * + * @param dDiagramElementContainer + * The {@link DDiagramElementContainer} + * @param flatContainerStyle + * The style of the container + * @return The {@link SNode} computed from the container + */ + private Optional<SNode> convertFreeFormFlatContainer(DDiagramElementContainer dDiagramElementContainer, FlatContainerStyle flatContainerStyle) { + String identifier = EcoreUtil.getURI(dDiagramElementContainer).fragment(); + + RGBValues borderColor = flatContainerStyle.getBorderColor(); + RGBValues color = flatContainerStyle.getBackgroundColor(); + Integer borderSize = flatContainerStyle.getBorderSize(); + + JsonObject styleJsonObject = new JsonObject(); + styleJsonObject.addProperty("fill", //$NON-NLS-1$ + "rgb(" + color.getRed() + ", " + color.getGreen() + ", " + color.getBlue() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + styleJsonObject.addProperty("stroke", //$NON-NLS-1$ + "rgb(" + borderColor.getRed() + ", " + borderColor.getGreen() + ", " + borderColor.getBlue() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + styleJsonObject.addProperty("stroke-width", borderSize); //$NON-NLS-1$ + + String styleJson = new Gson().toJson(styleJsonObject); + + SiriusFreeFormFlatContainerNode siriusFreeFormFlatContainerNode = new SiriusFreeFormFlatContainerNode(identifier); + siriusFreeFormFlatContainerNode.setStyle(styleJson); + return Optional.of(siriusFreeFormFlatContainerNode); + } + + /** + * Converts the given {@link DNodeList} to an {@link SNode}. + * + * @param dNodeList + * The container + * @return The {@link SNode} computed from the {@link DNodeList} + */ + private Optional<SNode> convertDNodeList(DNodeList dNodeList) { + Optional<SNode> optionalSNode = Optional.empty(); + + Style style = dNodeList.getStyle(); + if (style instanceof FlatContainerStyle) { + FlatContainerStyle flatContainerStyle = (FlatContainerStyle) style; + optionalSNode = this.convertListFlatContainer(dNodeList, flatContainerStyle); + } + + optionalSNode.ifPresent(sNode -> { + final Double GAP = Double.valueOf(5.0); + + LayoutOptions labelCompartmentLayoutOptions = new LayoutOptions(); + labelCompartmentLayoutOptions.setHAlign("left"); //$NON-NLS-1$ + labelCompartmentLayoutOptions.setHGap(GAP); + + SiriusListFlatContainerNodeLabelCompartment labelCompartment = new SiriusListFlatContainerNodeLabelCompartment( + sNode.getId() + "__label-compartement"); //$NON-NLS-1$ + labelCompartment.setLayoutOptions(labelCompartmentLayoutOptions); + + LayoutOptions bodyCompartmentLayoutOptions = new LayoutOptions(); + bodyCompartmentLayoutOptions.setHAlign("left"); //$NON-NLS-1$ + bodyCompartmentLayoutOptions.setHGap(GAP); + bodyCompartmentLayoutOptions.setVGap(GAP); + + SiriusListFlatContainerNodeBodyCompartment bodyCompartment = new SiriusListFlatContainerNodeBodyCompartment( + sNode.getId() + "__body-compartement"); //$NON-NLS-1$ + bodyCompartment.setLayoutOptions(bodyCompartmentLayoutOptions); + + sNode.getChildren().add(labelCompartment); + sNode.getChildren().add(bodyCompartment); + + if (style instanceof ContainerStyle) { + ContainerStyle containerStyle = (ContainerStyle) style; + this.convertLabel(sNode.getId(), dNodeList.getName(), containerStyle).ifPresent(labelCompartment.getChildren()::add); + } + // @formatter:off + dNodeList.getOwnedBorderedNodes().stream() + .filter(DDiagramElement::isVisible) + .map(this::convertBorderedNode) + .filter(Optional::isPresent) + .map(Optional::get) + .forEach(sNode.getChildren()::add); + // @formatter:on + + // @formatter:off + dNodeList.getOwnedElements().stream() + .filter(DNodeListElement::isVisible) + .map(this::convertDNodeListElement) + .filter(Optional::isPresent) + .map(Optional::get) + .forEach(bodyCompartment.getChildren()::add); + // @formatter:on + }); + + return optionalSNode; + } + + /** + * Converts the given {@link DDiagramElementContainer} into an {@link SNode}. + * + * @param dDiagramElementContainer + * The {@link DDiagramElementContainer} + * @param flatContainerStyle + * The style of the container + * @return The {@link SNode} computed from the container + */ + private Optional<SNode> convertListFlatContainer(DDiagramElementContainer dDiagramElementContainer, FlatContainerStyle flatContainerStyle) { + String identifier = EcoreUtil.getURI(dDiagramElementContainer).fragment(); + + RGBValues borderColor = flatContainerStyle.getBorderColor(); + RGBValues color = flatContainerStyle.getForegroundColor(); + Integer borderSize = flatContainerStyle.getBorderSize(); + + JsonObject styleJsonObject = new JsonObject(); + styleJsonObject.addProperty("fill", //$NON-NLS-1$ + "rgb(" + color.getRed() + ", " + color.getGreen() + ", " + color.getBlue() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + styleJsonObject.addProperty("stroke", //$NON-NLS-1$ + "rgb(" + borderColor.getRed() + ", " + borderColor.getGreen() + ", " + borderColor.getBlue() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + styleJsonObject.addProperty("stroke-width", borderSize); //$NON-NLS-1$ + + String styleJson = new Gson().toJson(styleJsonObject); + + SiriusListFlatContainerNode siriusListFlatContainerNode = new SiriusListFlatContainerNode(identifier); + siriusListFlatContainerNode.setStyle(styleJson); + return Optional.of(siriusListFlatContainerNode); + } + + /** + * Converts the given {@link DNodeListElement} to an {@link SLabel}. + * + * @param dNodeList + * The container + * @return The {@link SLabel} computed from the {@link DNodeListElement} + */ + private Optional<SLabel> convertDNodeListElement(DNodeListElement dNodeListElement) { + String identifier = EcoreUtil.getURI(dNodeListElement).fragment(); + String label = dNodeListElement.getName(); + + SiriusLabel siriusLabel = new SiriusLabel(identifier, label); + siriusLabel.setType(SiriusLabel.INSIDE_LEFT__LABEL_TYPE); + + JsonObject styleJsonObject = new JsonObject(); + styleJsonObject.addProperty("fill", "black"); //$NON-NLS-1$//$NON-NLS-2$ + + String styleJson = new Gson().toJson(styleJsonObject); + siriusLabel.setStyle(styleJson); + + return Optional.of(siriusLabel); + } + + /** + * Converts the label from the given container style. + * + * @param containerIdentifier + * The identifier of the container + * @param label + * The text to be displayed in the label + * @param containerStyle + * The style of the container + * @return The {@link SLabel} converted + */ + private Optional<SLabel> convertLabel(String containerIdentifier, String label, ContainerStyle containerStyle) { + LabelAlignment labelAlignment = containerStyle.getLabelAlignment(); + RGBValues labelColor = containerStyle.getLabelColor(); + + String labelIdentifier = containerIdentifier + "__label"; //$NON-NLS-1$ + SiriusLabel siriusLabel = new SiriusLabel(labelIdentifier, label); + + // Colors + JsonObject styleJsonObject = new JsonObject(); + styleJsonObject.addProperty("fill", //$NON-NLS-1$ + "rgb(" + labelColor.getRed() + ", " + labelColor.getGreen() + ", " + labelColor.getBlue() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + + String styleJson = new Gson().toJson(styleJsonObject); + siriusLabel.setStyle(styleJson); + + // Alignment and position + if (LabelAlignment.LEFT_VALUE == labelAlignment.getValue()) { + siriusLabel.setType(SiriusLabel.INSIDE_LEFT__LABEL_TYPE); + } else if (LabelAlignment.CENTER_VALUE == labelAlignment.getValue()) { + siriusLabel.setType(SiriusLabel.INSIDE_CENTER__LABEL_TYPE); + } else if (LabelAlignment.RIGHT_VALUE == labelAlignment.getValue()) { + siriusLabel.setType(SiriusLabel.INSIDE_RIGHT__LABEL_TYPE); + } + + return Optional.of(siriusLabel); + } + + /** + * Converts the given {@link DEdge} into an {@link SEdge}. + * + * @param dEdge + * The {@link DEdge} to convert + * @return The {@link SEdge} computed from the {@link DEdge} + */ + private Optional<SEdge> convertDEdge(DEdge dEdge) { + SiriusEdge siriusEdge = new SiriusEdge(); + + siriusEdge.setId(EcoreUtil.getURI(dEdge).fragment()); + siriusEdge.setType("edge:straight"); //$NON-NLS-1$ + siriusEdge.setSourceId(EcoreUtil.getURI(dEdge.getSourceNode()).fragment()); + siriusEdge.setTargetId(EcoreUtil.getURI(dEdge.getTargetNode()).fragment()); + + Style style = dEdge.getStyle(); + if (style instanceof EdgeStyle) { + EdgeStyle edgeStyle = (EdgeStyle) style; + RGBValues strokeColor = edgeStyle.getStrokeColor(); + Integer size = edgeStyle.getSize(); + + JsonObject styleJsonObject = new JsonObject(); + styleJsonObject.addProperty("stroke", //$NON-NLS-1$ + "rgb(" + strokeColor.getRed() + ", " + strokeColor.getGreen() + ", " + strokeColor.getBlue() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + styleJsonObject.addProperty("stroke-width", size); //$NON-NLS-1$ + + String styleJson = new Gson().toJson(styleJsonObject); + siriusEdge.setStyle(styleJson); + } + + return Optional.of(siriusEdge); + } + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramPreCommitListener.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramPreCommitListener.java new file mode 100644 index 0000000000..340340cd87 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramPreCommitListener.java @@ -0,0 +1,84 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal; + +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.CompoundCommand; +import org.eclipse.emf.transaction.ResourceSetChangeEvent; +import org.eclipse.emf.transaction.ResourceSetListenerImpl; +import org.eclipse.emf.transaction.RollbackException; +import org.eclipse.sirius.business.api.dialect.command.RefreshRepresentationsCommand; +import org.eclipse.sirius.tools.api.ui.RefreshHelper; + +/** + * The pre-commit listener used to detect if the sirius session needs to be refresh. + * + * @author gcoutable + * + */ +public class SiriusDiagramPreCommitListener extends ResourceSetListenerImpl { + + /** + * The diagram server. + */ + private SiriusDiagramServer diagramServer; + + /** + * Constructor. + * + * @param diagramServer + * The sirius diagram server + */ + public SiriusDiagramPreCommitListener(SiriusDiagramServer diagramServer) { + this.diagramServer = diagramServer; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.emf.transaction.ResourceSetListenerImpl#isPrecommitOnly() + */ + @Override + public boolean isPrecommitOnly() { + return true; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.emf.transaction.ResourceSetListenerImpl#isAggregatePrecommitListener() + */ + @Override + public boolean isAggregatePrecommitListener() { + return true; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.emf.transaction.ResourceSetListenerImpl#transactionAboutToCommit(org.eclipse.emf.transaction.ResourceSetChangeEvent) + */ + @Override + public Command transactionAboutToCommit(ResourceSetChangeEvent event) throws RollbackException { + CompoundCommand compoundCommand = new CompoundCommand(); + if (RefreshHelper.isImpactingNotification(event.getNotifications())) { + RefreshRepresentationsCommand command = new RefreshRepresentationsCommand(event.getEditingDomain(), new NullProgressMonitor(), + this.diagramServer.getDDiagram()); + // FIXME: will work only in our context !!!!!!!! + compoundCommand.append(command); + } + return compoundCommand; + } + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramServer.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramServer.java new file mode 100644 index 0000000000..0e86f861c5 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramServer.java @@ -0,0 +1,113 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal; + +import java.util.Optional; + +import org.eclipse.emf.transaction.ResourceSetListener; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.diagram.DDiagram; +import org.eclipse.sirius.server.diagram.internal.actions.ISiriusActionHandler; +import org.eclipse.sirius.server.diagram.internal.actions.SiriusOptionalActionHandlerSwitch; +import org.eclipse.sprotty.Action; +import org.eclipse.sprotty.ActionMessage; +import org.eclipse.sprotty.DefaultDiagramServer; +import org.eclipse.sprotty.ILayoutEngine; +import org.eclipse.sprotty.SModelRoot; + +/** + * The {@link SiriusDiagramServer} is used to communicate with clients. + * + * @author sbegaudeau + */ +public class SiriusDiagramServer extends DefaultDiagramServer { + + /** + * The Sirius session. + */ + private Session session; + + /** + * The representation. + */ + private DDiagram dDiagram; + + /** + * The listener used to update the model when a modification occurs in Sirius. + */ + private ResourceSetListener resourceSetListener; + + private ResourceSetListener preCommitListener; + + public SiriusDiagramServer(Session session, DDiagram dDiagram, String clientId) { + this.session = session; + this.dDiagram = dDiagram; + this.setClientId(clientId); + + this.resourceSetListener = new SiriusResourceSetListener(this); + // FIXME We are never removing this listener, this is a memory leak! + this.session.getTransactionalEditingDomain().addResourceSetListener(this.resourceSetListener); + + this.preCommitListener = new SiriusDiagramPreCommitListener(this); + // FIXME We are never removing this listener, this is a memory leak! + this.session.getTransactionalEditingDomain().addResourceSetListener(this.preCommitListener); + } + + @Override + public void accept(ActionMessage message) { + Action action = message.getAction(); + Optional<ISiriusActionHandler> optionalHandler = new SiriusOptionalActionHandlerSwitch().doSwitch(action); + if (optionalHandler.isPresent()) { + // @formatter:off + optionalHandler.filter(handler -> handler.canHandle(this, action)) + .ifPresent(handler -> handler.handle(this, action)); + // @formatter:on + } else { + super.accept(message); + } + } + + @Override + protected boolean needsClientLayout(SModelRoot root) { + /* + * The client layout is necessary in order to have Sprotty compute some information which are necessary for ELK + * to to its job. As an example, the internal layout of a node needs to be computed by Sprotty in order to know + * the real size of the various elements after the use of CSS. Sprotty can then communicate this information to + * ELK which can thus start to compute a meaningful layout which will be then returned to Sprotty. + **/ + return true; + } + + @Override + protected ILayoutEngine getLayoutEngine() { + return new SiriusLayoutEngine(); + } + + /** + * Return the session. + * + * @return the session + */ + public Session getSession() { + return this.session; + } + + /** + * Return the DDiagram. + * + * @return the DDiagram + */ + public DDiagram getDDiagram() { + return this.dDiagram; + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramServerEndpoint.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramServerEndpoint.java new file mode 100644 index 0000000000..f3792b77e5 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramServerEndpoint.java @@ -0,0 +1,77 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + +import javax.websocket.CloseReason; +import javax.websocket.EndpointConfig; +import javax.websocket.Session; + +import org.apache.log4j.Logger; +import org.eclipse.sirius.server.diagram.internal.actions.SiriusActionTypeAdapter; +import org.eclipse.sprotty.ActionMessage; +import org.eclipse.sprotty.server.websocket.DiagramServerEndpoint; + +/** + * The {@link SiriusServerEndpoint} is used to log the various interactions between the client and the server. + * + * @author sbegaudeau + */ +public class SiriusDiagramServerEndpoint extends DiagramServerEndpoint { + /** + * The logger. + */ + private static Logger LOG = Logger.getLogger(SiriusDiagramServerEndpoint.class); + + /** + * The gson object used to deserialize actions. + */ + private Gson gson; + + @Override + public void onOpen(Session session, EndpointConfig config) { + LOG.info("Opened connection " + session.getId()); //$NON-NLS-1$ + super.onOpen(session, config); + } + + @Override + public void onClose(Session session, CloseReason closeReason) { + LOG.info("Closed connection " + session.getId()); //$NON-NLS-1$ + super.onClose(session, closeReason); + } + + @Override + public void accept(ActionMessage message) { + initializeGson(); + String json = gson.toJson(message, ActionMessage.class); + getSession().getAsyncRemote().sendText(json); + } + + @Override + protected void fireMessageReceived(ActionMessage message) { + LOG.info("CLIENT " + message); //$NON-NLS-1$ + super.fireMessageReceived(message); + } + + @Override + protected void initializeGson() { + if (gson == null) { + GsonBuilder gsonBuilder = new GsonBuilder(); + SiriusActionTypeAdapter.configureGson(gsonBuilder); + this.gson = gsonBuilder.create(); + this.setGson(gson); + } + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramServerLauncher.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramServerLauncher.java new file mode 100644 index 0000000000..36edb12de1 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramServerLauncher.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal; + +import org.eclipse.equinox.app.IApplication; +import org.eclipse.equinox.app.IApplicationContext; + +/** + * The main application for the Sirius Server. + * + * @author gcoutable + * + */ +public class SiriusDiagramServerLauncher implements IApplication { + + /** + * The application context. + */ + private IApplicationContext appContext; + + @Override + public Object start(IApplicationContext context) throws Exception { + this.appContext = context; + return IApplicationContext.EXIT_ASYNC_RESULT; + } + + @Override + public void stop() { + appContext.setResult(EXIT_OK, this); + } + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramServerPlugin.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramServerPlugin.java new file mode 100644 index 0000000000..895aed8c15 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramServerPlugin.java @@ -0,0 +1,84 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal; + +import org.eclipse.emf.common.EMFPlugin; +import org.eclipse.emf.common.util.ResourceLocator; +import org.osgi.framework.BundleContext; + +/** + * @author sbegaudeau + */ +public class SiriusDiagramServerPlugin extends EMFPlugin { + /** + * The identifier of the plugin. + */ + public static final String PLUGIN_ID = "org.eclipse.sirius.server.diagram"; //$NON-NLS-1$ + + /** + * The sole instance of the plugin. + */ + public static final SiriusDiagramServerPlugin INSTANCE = new SiriusDiagramServerPlugin(); + + /** + * The sole instance of the bundle activator. + */ + private static Implementation plugin; + + /** + * The constructor. + */ + public SiriusDiagramServerPlugin() { + super(new ResourceLocator[0]); + } + + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * @return the singleton instance. + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The bundle activator. + * + * @author sbegaudeau + */ + public static class Implementation extends EclipsePlugin { + + /** + * The constructor. + */ + public Implementation() { + super(); + SiriusDiagramServerPlugin.plugin = this; + } + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + } + + @Override + public void stop(BundleContext context) throws Exception { + super.stop(context); + } + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramService.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramService.java new file mode 100644 index 0000000000..f4958bddd1 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusDiagramService.java @@ -0,0 +1,186 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +import javax.servlet.http.HttpSessionEvent; +import javax.servlet.http.HttpSessionListener; + +import org.apache.log4j.Logger; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.sirius.business.api.dialect.DialectManager; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.business.api.session.SessionManager; +import org.eclipse.sirius.diagram.DDiagram; +import org.eclipse.sirius.viewpoint.DRepresentation; +import org.eclipse.sprotty.IDiagramServer; +import org.eclipse.sprotty.IDiagramServer.Provider; + +/** + * The {@link SiriusDiagramService} is used to create new instances of the {@link SiriusDiagramServer}. + * + * @author sbegaudeau + */ +public class SiriusDiagramService implements HttpSessionListener, Provider { + + /** + * The prefix of the project part of the client identifier. + */ + private static final String PROJECT__PREFIX = "__PROJECT__"; //$NON-NLS-1$ + + /** + * The prefix of the aird part of the client identifier. + */ + private static final String AIRD__PREFIX = "__AIRD__"; //$NON-NLS-1$ + + /** + * The prefix of the representation part of the client identifier. + */ + private static final String REPRESENTATION__PREFIX = "__REPRESENTATION__"; //$NON-NLS-1$ + + /** + * The prefix of the client id part of the client identifier. + */ + private static final String CLIENT_ID__PREFIX = "__CLIENT_ID__"; //$NON-NLS-1$ + + /** + * The logger. + */ + private static Logger LOG = Logger.getLogger(SiriusDiagramService.class); + + /** + * The map of all the {@link SiriusDiagramServer} and their identifier. + */ + private Map<String, SiriusDiagramServer> diagramServers = new HashMap<>(); + + /** + * {@inheritDoc} + * + * @see org.eclipse.sprotty.IDiagramServer.Provider#getDiagramServer(java.lang.String) + */ + @Override + public IDiagramServer getDiagramServer(String clientId) { + synchronized (this.diagramServers) { + Optional<SiriusDiagramServer> optionalSiriusDiagramServer = Optional.ofNullable(this.diagramServers.get(clientId)); + if (!optionalSiriusDiagramServer.isPresent()) { + return this.createDiagramServer(clientId).orElse(null); + } + return optionalSiriusDiagramServer.orElse(null); + } + } + + /** + * Creates and registers the {@link SiriusDiagramServer} for the given client identifier. + * + * @param clientId + * The client identifier + * @return The {@link SiriusDiagramServer} for the given client identifier or an empty optional if the identifier is + * not relevant + */ + private Optional<SiriusDiagramServer> createDiagramServer(String clientId) { + int projectPrefixIndex = clientId.indexOf(PROJECT__PREFIX); + int airdPrefixIndex = clientId.indexOf(AIRD__PREFIX); + int representationPrefixIndex = clientId.indexOf(REPRESENTATION__PREFIX); + int clientIdPrefixIndex = clientId.indexOf(CLIENT_ID__PREFIX); + + String projectName = clientId.substring(projectPrefixIndex + PROJECT__PREFIX.length(), airdPrefixIndex); + String airdFullPath = clientId.substring(airdPrefixIndex + AIRD__PREFIX.length(), representationPrefixIndex); + String representationName = clientId.substring(representationPrefixIndex + REPRESENTATION__PREFIX.length(), clientIdPrefixIndex); + + Optional<Session> optionalSession = this.getSession(projectName, airdFullPath); + Optional<DDiagram> optionalDDiagram = optionalSession.flatMap(session -> this.getDDiagramFromSession(session, representationName)); + if (optionalSession.isPresent() && optionalDDiagram.isPresent()) { + Session session = optionalSession.get(); + DDiagram dDiagram = optionalDDiagram.get(); + + SiriusDiagramServer siriusDiagramServer = new SiriusDiagramServer(session, dDiagram, clientId); + this.diagramServers.put(clientId, siriusDiagramServer); + return Optional.of(siriusDiagramServer); + } + return Optional.empty(); + } + + /** + * Returns the {@link Session} found for the given project name and aird path. + * + * @param projectName + * The name of the project containing the aird + * @param airdFullPath + * The path of the aird in the project + * @return The {@link Session} found or an empty optional + */ + private Optional<Session> getSession(String projectName, String airdFullPath) { + Optional<String> optionalProjectName = Optional.ofNullable(projectName); + Optional<String> optionalAird = Optional.ofNullable(airdFullPath); + + Optional<IProject> optionalProject = optionalProjectName.map(ResourcesPlugin.getWorkspace().getRoot()::getProject); + Optional<IFile> optionalFile = optionalProject.flatMap(project -> optionalAird.map(Path::new).map(project::getFile)); + + // @formatter:off + return SessionManager.INSTANCE.getSessions().stream().filter(session -> { + Resource sessionResource = session.getSessionResource(); + URI sessionResourceURI = sessionResource.getURI(); + + Optional<URI> optionalAirdFileURI = optionalFile.filter(IFile::exists) + .map(IFile::getFullPath) + .map(IPath::toString) + .map(fullPath -> URI.createPlatformResourceURI(fullPath, true)); + + return optionalAirdFileURI.map(sessionResourceURI::equals).orElse(Boolean.FALSE).booleanValue(); + }).findFirst(); + // @formatter:on + } + + /** + * Returns the {@link DDiagram} found for the given {@link Session} and the representation name. + * + * @param session + * The {@link Session} + * @param representationName + * The name of the {@link DDiagram} + * @return The {@link DDiagram} found or an empty optional + */ + private Optional<DDiagram> getDDiagramFromSession(Session session, String representationName) { + Collection<DRepresentation> representations = DialectManager.INSTANCE.getAllRepresentations(session); + // @formatter:off + return representations.stream() + .filter(DDiagram.class::isInstance) + .map(DDiagram.class::cast) + .filter(dDiagram -> { + return Optional.ofNullable(representationName).orElse("").equals(dDiagram.getName()); //$NON-NLS-1$ + }) + .findFirst(); + // @formatter:on + } + + @Override + public void sessionCreated(HttpSessionEvent se) { + LOG.info("Session created"); //$NON-NLS-1$ + } + + @Override + public void sessionDestroyed(HttpSessionEvent se) { + LOG.info("Session destroyed"); //$NON-NLS-1$ + } + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusEndpointConfigurator.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusEndpointConfigurator.java new file mode 100644 index 0000000000..47c615197a --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusEndpointConfigurator.java @@ -0,0 +1,83 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal; + +import java.util.List; + +import javax.websocket.Extension; +import javax.websocket.HandshakeResponse; +import javax.websocket.server.HandshakeRequest; +import javax.websocket.server.ServerEndpointConfig; +import javax.websocket.server.ServerEndpointConfig.Configurator; + +import org.apache.log4j.Logger; +import org.eclipse.jetty.websocket.jsr356.server.ContainerDefaultConfigurator; + +/** + * The {@link SiriusEndpointConfigurator} is used to connect the {@link SiriusDiagramService} to the + * {@link SiriusDiagramServerEndpoint}. + * + * @author sbegaudeau + */ +public class SiriusEndpointConfigurator extends Configurator { + /** + * The logger. + */ + private static Logger LOG = Logger.getLogger(SiriusEndpointConfigurator.class); + + /** + * The diagram service. + */ + private SiriusDiagramService diagramService; + + /** + * The constructor. + * + * @param diagramService + * The diagram service + */ + public SiriusEndpointConfigurator(SiriusDiagramService diagramService) { + this.diagramService = diagramService; + } + + @Override + public <T> T getEndpointInstance(Class<T> endpointClass) throws InstantiationException { + T instance = new ContainerDefaultConfigurator().getEndpointInstance(endpointClass); + if (instance instanceof SiriusDiagramServerEndpoint) { + SiriusDiagramServerEndpoint testServerEndpoint = (SiriusDiagramServerEndpoint) instance; + testServerEndpoint.setDiagramServerProvider(this.diagramService); + testServerEndpoint.setExceptionHandler((exception) -> LOG.warn(exception)); + } + return instance; + } + + @Override + public boolean checkOrigin(String originHeaderValue) { + return true; + } + + @Override + public String getNegotiatedSubprotocol(List<String> supported, List<String> requested) { + return new ContainerDefaultConfigurator().getNegotiatedSubprotocol(supported, requested); + } + + @Override + public List<Extension> getNegotiatedExtensions(List<Extension> installed, List<Extension> requested) { + return requested; + } + + @Override + public void modifyHandshake(ServerEndpointConfig sec, HandshakeRequest request, HandshakeResponse response) { + // Do nothing because why not :) + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusLayoutEngine.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusLayoutEngine.java new file mode 100644 index 0000000000..a02b9e85d0 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusLayoutEngine.java @@ -0,0 +1,124 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.EnumSet; +import java.util.HashMap; + +import org.apache.log4j.Logger; +import org.eclipse.elk.alg.layered.options.LayeredOptions; +import org.eclipse.elk.alg.layered.options.LayeringStrategy; +import org.eclipse.elk.core.math.KVector; +import org.eclipse.elk.core.options.CoreOptions; +import org.eclipse.elk.core.options.HierarchyHandling; +import org.eclipse.elk.core.options.NodeLabelPlacement; +import org.eclipse.elk.core.options.PortSide; +import org.eclipse.elk.core.options.SizeConstraint; +import org.eclipse.elk.core.options.SizeOptions; +import org.eclipse.elk.graph.ElkNode; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.sirius.server.diagram.internal.entities.SiriusSquareBorderNode; +import org.eclipse.sirius.server.diagram.internal.entities.SiriusSvgBorderNode; +import org.eclipse.sprotty.SGraph; +import org.eclipse.sprotty.SModelRoot; +import org.eclipse.sprotty.layout.ElkLayoutEngine; +import org.eclipse.sprotty.layout.SprottyLayoutConfigurator; + +/** + * The {@link SiriusLayoutEngine} defines the configuration of the layout that ELK should apply to a given Sprotty + * model. + * + * @author sbegaudeau + */ +public class SiriusLayoutEngine extends ElkLayoutEngine { + /** + * The logger. + */ + private static final Logger LOG = Logger.getLogger(SiriusLayoutEngine.class); + + /** + * The space between two nodes. + */ + private static final Double SPACING_NODE_NODE = Double.valueOf(50.0); + + /** + * The space between node and edges. + */ + private static final Double SPACING_NODE_EDGE = Double.valueOf(30.0); + + @Override + public void layout(SModelRoot root) { + if (root instanceof SGraph) { + SprottyLayoutConfigurator configurator = new SprottyLayoutConfigurator(); + configurator.configureByType("graph") //$NON-NLS-1$ + .setProperty(CoreOptions.ALGORITHM, LayeredOptions.ALGORITHM_ID) + .setProperty(CoreOptions.HIERARCHY_HANDLING, HierarchyHandling.INCLUDE_CHILDREN) + .setProperty(LayeredOptions.LAYERING_STRATEGY, LayeringStrategy.NETWORK_SIMPLEX) + .setProperty(LayeredOptions.SPACING_NODE_NODE, SPACING_NODE_NODE) + .setProperty(LayeredOptions.SPACING_NODE_NODE_BETWEEN_LAYERS, SPACING_NODE_NODE) + .setProperty(LayeredOptions.SPACING_EDGE_NODE, SPACING_NODE_EDGE) + .setProperty(LayeredOptions.SPACING_EDGE_NODE_BETWEEN_LAYERS, SPACING_NODE_EDGE); + + configurator.configureByType("node:flatcontainer") //$NON-NLS-1$ + .setProperty(CoreOptions.NODE_SIZE_CONSTRAINTS, SizeConstraint.free()) + .setProperty(CoreOptions.NODE_SIZE_MINIMUM, new KVector(120, 100)) + .setProperty(CoreOptions.NODE_LABELS_PLACEMENT, NodeLabelPlacement.insideTopCenter()); + + configurator.configureByType("node:freeformflatcontainer") //$NON-NLS-1$ + .setProperty(CoreOptions.NODE_SIZE_CONSTRAINTS, SizeConstraint.free()) + .setProperty(CoreOptions.NODE_SIZE_MINIMUM, new KVector(120, 100)) + .setProperty(CoreOptions.NODE_LABELS_PLACEMENT, NodeLabelPlacement.insideTopCenter()); + + configurator.configureByType("node:svg") //$NON-NLS-1$ + .setProperty(CoreOptions.NODE_SIZE_CONSTRAINTS, SizeConstraint.free()) + .setProperty(CoreOptions.NODE_SIZE_MINIMUM, new KVector(30, 30)) + .setProperty(CoreOptions.NODE_LABELS_PLACEMENT, NodeLabelPlacement.outsideBottomCenter()); + + configurator.configureByType("node:listflatcontainer") //$NON-NLS-1$ + .setProperty(CoreOptions.NODE_SIZE_CONSTRAINTS, SizeConstraint.free()) + .setProperty(CoreOptions.NODE_SIZE_MINIMUM, new KVector(120, 100)) + .setProperty(CoreOptions.NODE_SIZE_OPTIONS, EnumSet.of(SizeOptions.DEFAULT_MINIMUM_SIZE)); + + configurator.configureByType(SiriusSquareBorderNode.TYPE).setProperty(LayeredOptions.PORT_SIDE, PortSide.WEST); + configurator.configureByType(SiriusSvgBorderNode.TYPE).setProperty(LayeredOptions.PORT_SIDE, PortSide.WEST); + + this.layout((SGraph) root, configurator); + } + } + + @Override + protected void applyEngine(ElkNode elkGraph) { + /* + * Transform the ELK model into XMI in order to log it. This code allow us to have some information in order to + * be able to debug the behavior of ELK. It does not give us a full understanding of the behavior of ELK but it + * give us the shape of the constraints that ELK has understood from our code above. + **/ + ResourceSet resourceSet = new ResourceSetImpl(); + Resource resource = resourceSet.createResource(URI.createFileURI("output.elkg")); //$NON-NLS-1$ + resource.getContents().add(elkGraph); + try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) { + resource.save(outputStream, new HashMap<>()); + String elkData = outputStream.toString(); + LOG.info(elkData); + } catch (IOException e) { + e.printStackTrace(); + } + + super.applyEngine(elkGraph); + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusResourceSetListener.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusResourceSetListener.java new file mode 100644 index 0000000000..8da269ddd5 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusResourceSetListener.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal; + +import org.eclipse.emf.transaction.ResourceSetChangeEvent; +import org.eclipse.emf.transaction.ResourceSetListenerImpl; +import org.eclipse.sirius.server.diagram.internal.actions.RequestLayersAction; +import org.eclipse.sirius.server.diagram.internal.actions.RequestToolsAction; +import org.eclipse.sprotty.ActionMessage; +import org.eclipse.sprotty.RequestModelAction; + +/** + * A resource set listener allowing us to refresh the diagram. + * + * @author sbegaudeau + */ +public class SiriusResourceSetListener extends ResourceSetListenerImpl { + + /** + * The Sirius diagram server. + */ + private SiriusDiagramServer siriusDiagramServer; + + /** + * The constructor. + * + */ + public SiriusResourceSetListener(SiriusDiagramServer siriusDiagramServer) { + this.siriusDiagramServer = siriusDiagramServer; + } + + @Override + public void resourceSetChanged(ResourceSetChangeEvent event) { + super.resourceSetChanged(event); + + ActionMessage requestModelActionMessage = new ActionMessage(); + requestModelActionMessage.setClientId(this.siriusDiagramServer.getClientId()); + requestModelActionMessage.setAction(new RequestModelAction()); + this.siriusDiagramServer.accept(requestModelActionMessage); + + ActionMessage requestToolsActionMessage = new ActionMessage(); + requestToolsActionMessage.setClientId(this.siriusDiagramServer.getClientId()); + requestToolsActionMessage.setAction(new RequestToolsAction()); + this.siriusDiagramServer.accept(requestToolsActionMessage); + + ActionMessage requestLayersActionMessage = new ActionMessage(); + requestLayersActionMessage.setClientId(this.siriusDiagramServer.getClientId()); + requestLayersActionMessage.setAction(new RequestLayersAction()); + this.siriusDiagramServer.accept(requestLayersActionMessage); + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusServerDiagramConfigurator.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusServerDiagramConfigurator.java new file mode 100644 index 0000000000..8edde398e4 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/SiriusServerDiagramConfigurator.java @@ -0,0 +1,100 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal; + +import java.io.File; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; + +import javax.servlet.ServletException; +import javax.websocket.DeploymentException; +import javax.websocket.server.ServerContainer; +import javax.websocket.server.ServerEndpointConfig; +import javax.websocket.server.ServerEndpointConfig.Builder; + +import org.eclipse.core.runtime.FileLocator; +import org.eclipse.elk.alg.layered.options.LayeredOptions; +import org.eclipse.elk.core.util.persistence.ElkGraphResourceFactory; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.jetty.server.Handler; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.handler.HandlerCollection; +import org.eclipse.jetty.servlet.DefaultServlet; +import org.eclipse.jetty.servlet.ServletContextHandler; +import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer; +import org.eclipse.sirius.server.api.ISiriusServerConfigurator; +import org.eclipse.sprotty.layout.ElkLayoutEngine; +import org.osgi.framework.Bundle; + +/** + * The configurator used to connect the support for diagrams to the Sirius server. + * + * @author sbegaudeau + */ +public class SiriusServerDiagramConfigurator implements ISiriusServerConfigurator { + + /** + * The default context path. + */ + private static final String CONTEXT_PATH = "/diagrams"; //$NON-NLS-1$ + + /** + * The default servlet holder name. + */ + private static final String SERVLET_HOLDER_NAME = "Sirius Diagrams"; //$NON-NLS-1$ + + @Override + public void configure(Server server) { + Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("elkg", new ElkGraphResourceFactory()); //$NON-NLS-1$ + ElkLayoutEngine.initialize(new LayeredOptions()); + SiriusDiagramService siriusDiagramService = new SiriusDiagramService(); + + try { + server.setStopAtShutdown(true); + + ServletContextHandler servletContextHandler = new ServletContextHandler(ServletContextHandler.SESSIONS | ServletContextHandler.GZIP); + servletContextHandler.setContextPath(CONTEXT_PATH); + servletContextHandler.addEventListener(siriusDiagramService); + + Handler handler = server.getHandler(); + if (handler instanceof HandlerCollection) { + HandlerCollection handlerCollection = (HandlerCollection) handler; + handlerCollection.addHandler(servletContextHandler); + } + + ServletHolder servletHolder = new ServletHolder(SERVLET_HOLDER_NAME, new DefaultServlet()); + + Bundle bundle = SiriusDiagramServerPlugin.getPlugin().getBundle(); + URL webappFolderUrl = bundle.getResource("./webapp"); //$NON-NLS-1$ + URI webappFolderUri = FileLocator.resolve(webappFolderUrl).toURI(); + String webappFolderAbsolutePath = new File(webappFolderUri).getAbsolutePath(); + + servletHolder.setInitParameter("resourceBase", webappFolderAbsolutePath); //$NON-NLS-1$ + servletHolder.setInitParameter("dirAllowed", "false"); //$NON-NLS-1$ //$NON-NLS-2$ + servletContextHandler.addServlet(servletHolder, "/"); //$NON-NLS-1$ + + SiriusEndpointConfigurator siriusEndpointConfigurator = new SiriusEndpointConfigurator(siriusDiagramService); + ServerContainer container = WebSocketServerContainerInitializer.configureContext(servletContextHandler); + container.setDefaultMaxSessionIdleTimeout(0); + Builder endpointConfigBuilder = ServerEndpointConfig.Builder.create(SiriusDiagramServerEndpoint.class, "/api"); //$NON-NLS-1$ + endpointConfigBuilder.configurator(siriusEndpointConfigurator); + container.addEndpoint(endpointConfigBuilder.build()); + } catch (ServletException | URISyntaxException | IOException | DeploymentException exception) { + exception.printStackTrace(); + } + } + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/ExecuteContainerCreationToolAction.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/ExecuteContainerCreationToolAction.java new file mode 100644 index 0000000000..b8e2612cf3 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/ExecuteContainerCreationToolAction.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions; + +import org.eclipse.sirius.diagram.description.tool.ContainerCreationDescription; +import org.eclipse.sprotty.Action; + +/** + * Sent from the client to the server in order to execute the sirius {@link ContainerCreationDescription} tool. + * + * @author sbegaudeau + */ +public class ExecuteContainerCreationToolAction implements Action { + /** + * The kind of the action. + */ + public static final String KIND = "executeContainerCreationTool"; //$NON-NLS-1$ + + /** + * The kind of the action. + */ + private String kind = KIND; + + /** + * The tool name to execute. + */ + private String toolName; + + @Override + public String getKind() { + return this.kind; + } + + /** + * Returns the tool name to apply. + * + * @return The tool name to apply + */ + public String getToolName() { + return toolName; + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/ExecuteNodeCreationToolAction.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/ExecuteNodeCreationToolAction.java new file mode 100644 index 0000000000..6253b095ab --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/ExecuteNodeCreationToolAction.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions; + +import org.eclipse.sirius.diagram.description.tool.NodeCreationDescription; +import org.eclipse.sprotty.Action; + +/** + * Sent from the client to the server in order to execute the sirius {@link NodeCreationDescription} tool. + * + * @author gcoutable + */ +public class ExecuteNodeCreationToolAction implements Action { + + /** + * The kind of the action + */ + public static final String KIND = "executeNodeCreationTool"; //$NON-NLS-1$ + + /** + * The kind of the action. + */ + private String kind = KIND; + + /** + * The tool name to execute. + */ + private String toolName; + + @Override + public String getKind() { + return this.kind; + } + + /** + * Returns the tool name to apply. + * + * @return The tool name to apply + */ + public String getToolName() { + return toolName; + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/ExecuteToolAction.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/ExecuteToolAction.java new file mode 100644 index 0000000000..0130f820e1 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/ExecuteToolAction.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions; + +import org.eclipse.sprotty.Action; + +/** + * Sent from the client to the server in order to execute the sirius tool. + * + * @author sbegaudeau + */ +public class ExecuteToolAction implements Action { + /** + * The kind of the action. + */ + public static final String KIND = "executeTool"; //$NON-NLS-1$ + + /** + * The kind of the action. + */ + private String kind = KIND; + + /** + * The tool name to execute. + */ + private String toolName; + + @Override + public String getKind() { + return this.kind; + } + + /** + * Returns the tool name to apply. + * + * @return The tool name to apply + */ + public String getToolName() { + return toolName; + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/ISiriusActionHandler.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/ISiriusActionHandler.java new file mode 100644 index 0000000000..e5cb4b037a --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/ISiriusActionHandler.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright (c) 2018 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions; + +import org.eclipse.sirius.server.diagram.internal.SiriusDiagramServer; + +import org.eclipse.sprotty.Action; + +/** + * Utility interface to handle an {@link Action}. + * + * @author sbegaudeau + */ +public interface ISiriusActionHandler { + + /** + * Indicates if the handler can handler the given {@link Action}. + * + * @param server + * The server + * @param action + * The action + * @return <code>true</code> if the action can be handled, <code>false</code> otherwise + */ + boolean canHandle(SiriusDiagramServer server, Action action); + + /** + * Handles the given {@link Action}. + * + * @param server + * The server + * @param action + * The action + */ + void handle(SiriusDiagramServer server, Action action); +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/RequestLayersAction.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/RequestLayersAction.java new file mode 100644 index 0000000000..78ae59e7c9 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/RequestLayersAction.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions; + +import org.eclipse.sprotty.Action; + +/** + * Action used to request the layers of the diagram. + * + * @author gcoutable + */ +public class RequestLayersAction implements Action { + + /** + * The kind of the action. + */ + public static final String KIND = "requestLayers"; //$NON-NLS-1$ + + /** + * The kind of the action. + */ + private String kind = KIND; + + @Override + public String getKind() { + return kind; + } + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/RequestToolsAction.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/RequestToolsAction.java new file mode 100644 index 0000000000..6fd0b8881a --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/RequestToolsAction.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions; + +import org.eclipse.sprotty.Action; + +/** + * Sent from the client to the server in order to request applicable tools. + * + * @author gcoutable + */ +public class RequestToolsAction implements Action { + + /** + * The kind of the action. + */ + public static final String KIND = "requestTools"; //$NON-NLS-1$ + + /** + * The kind of the action. + */ + private String kind = KIND; + + @Override + public String getKind() { + return this.kind; + } + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SetLayersAction.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SetLayersAction.java new file mode 100644 index 0000000000..c957383ef2 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SetLayersAction.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.sprotty.Action; + +/** + * Sent from the server to the client in order to give the layers. + * + * @author gcoutable + */ +public class SetLayersAction implements Action { + + /** + * The kind of the action. + */ + public static final String KIND = "setLayers"; //$NON-NLS-1$ + + /** + * The kind of the action. + */ + private String kind = KIND; + + /** + * The layers. + */ + private List<SiriusLayer> layers; + + /** + * Constructor. + * + * @param layers + * The list of layers + */ + public SetLayersAction(List<SiriusLayer> layers) { + this.layers = new ArrayList<>(layers); + } + + @Override + public String getKind() { + return kind; + } + + /** + * Return the layers. + * + * @return the layers + */ + public List<SiriusLayer> getLayers() { + return this.layers; + } + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SetToolsAction.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SetToolsAction.java new file mode 100644 index 0000000000..bcbdd655fc --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SetToolsAction.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.sprotty.Action; + +/** + * Sent from the server to the client in order to give the available tools. + * + * @author gcoutable + */ +public class SetToolsAction implements Action { + + /** + * The kind of the action. + */ + public static final String KIND = "setTools"; //$NON-NLS-1$ + + /** + * The kind of the action. + */ + private String kind = KIND; + + /** + * The list of tools to send. + */ + private List<SiriusTool> tools; + + /** + * Constructor. + * + * @param tools + * The list of tools + */ + public SetToolsAction(List<SiriusTool> tools) { + this.tools = new ArrayList<>(tools); + } + + @Override + public String getKind() { + return this.kind; + } + + /** + * Return the tools. + * + * @return the tools + */ + public List<SiriusTool> getTools() { + return this.tools; + } + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SiriusActionSwitch.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SiriusActionSwitch.java new file mode 100644 index 0000000000..4e412583ee --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SiriusActionSwitch.java @@ -0,0 +1,497 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions; + +import org.eclipse.sprotty.Action; +import org.eclipse.sprotty.CenterAction; +import org.eclipse.sprotty.CollapseExpandAction; +import org.eclipse.sprotty.CollapseExpandAllAction; +import org.eclipse.sprotty.ComputedBoundsAction; +import org.eclipse.sprotty.ExportSvgAction; +import org.eclipse.sprotty.FitToScreenAction; +import org.eclipse.sprotty.OpenAction; +import org.eclipse.sprotty.RequestBoundsAction; +import org.eclipse.sprotty.RequestExportSvgAction; +import org.eclipse.sprotty.RequestModelAction; +import org.eclipse.sprotty.RequestPopupModelAction; +import org.eclipse.sprotty.SelectAction; +import org.eclipse.sprotty.SelectAllAction; +import org.eclipse.sprotty.ServerStatusAction; +import org.eclipse.sprotty.SetBoundsAction; +import org.eclipse.sprotty.SetModelAction; +import org.eclipse.sprotty.SetPopupModelAction; +import org.eclipse.sprotty.UpdateModelAction; + +/** + * Switch used to handle the various actions. + * + * @author sbegaudeau + * + * @param <T> + * The type of result expected by the switch + */ +public class SiriusActionSwitch<T> { + + /** + * Returns the default value. + * + * @return The default value + */ + protected T getDefaultValue() { + return null; + } + + /** + * Dispatch the action. + * + * @param action + * The action + * @return The expected result + */ + public T doSwitch(Action action) { + T result = this.getDefaultValue(); + switch (action.getKind()) { + case CenterAction.KIND: + if (action instanceof CenterAction) { + result = this.caseCenterAction((CenterAction) action); + } + break; + case CollapseExpandAction.KIND: + if (action instanceof CollapseExpandAction) { + result = this.caseCollapseExpandAction((CollapseExpandAction) action); + } + break; + case CollapseExpandAllAction.KIND: + if (action instanceof CollapseExpandAllAction) { + result = this.caseCollapseExpandAllAction((CollapseExpandAllAction) action); + } + break; + case ComputedBoundsAction.KIND: + if (action instanceof ComputedBoundsAction) { + result = this.caseComputedBoundsAction((ComputedBoundsAction) action); + } + break; + case ExecuteContainerCreationToolAction.KIND: + if (action instanceof ExecuteContainerCreationToolAction) { + result = this.caseExecuteContainerCreationToolAction((ExecuteContainerCreationToolAction) action); + } + break; + case ExecuteNodeCreationToolAction.KIND: + if (action instanceof ExecuteNodeCreationToolAction) { + result = this.caseExecuteNodeCreationToolAction((ExecuteNodeCreationToolAction) action); + } + break; + case ExecuteToolAction.KIND: + if (action instanceof ExecuteToolAction) { + result = this.caseExecuteToolAction((ExecuteToolAction) action); + } + break; + case ExportSvgAction.KIND: + if (action instanceof ExportSvgAction) { + result = this.caseExportSvgAction((ExportSvgAction) action); + } + break; + case FitToScreenAction.KIND: + if (action instanceof FitToScreenAction) { + result = this.caseFitToScreenAction((FitToScreenAction) action); + } + break; + case OpenAction.KIND: + if (action instanceof OpenAction) { + result = this.caseOpenAction((OpenAction) action); + } + break; + case RequestBoundsAction.KIND: + if (action instanceof RequestBoundsAction) { + result = this.caseRequestBoundsAction((RequestBoundsAction) action); + } + break; + case RequestExportSvgAction.KIND: + if (action instanceof RequestExportSvgAction) { + result = this.caseRequestExportSvgAction((RequestExportSvgAction) action); + } + break; + case RequestModelAction.KIND: + if (action instanceof RequestModelAction) { + result = this.caseRequestModelAction((RequestModelAction) action); + } + break; + case RequestPopupModelAction.KIND: + if (action instanceof RequestPopupModelAction) { + result = this.caseRequestPopupModelAction((RequestPopupModelAction) action); + } + break; + case RequestLayersAction.KIND: + if (action instanceof RequestLayersAction) { + result = this.caseRequestLayersAction((RequestLayersAction) action); + } + break; + case RequestToolsAction.KIND: + if (action instanceof RequestToolsAction) { + result = this.caseRequestToolsAction((RequestToolsAction) action); + } + break; + case SelectAction.KIND: + if (action instanceof SelectAction) { + result = this.caseSelectAction((SelectAction) action); + } + break; + case SelectAllAction.KIND: + if (action instanceof SelectAllAction) { + result = this.caseSelectAllAction((SelectAllAction) action); + } + break; + case ServerStatusAction.KIND: + if (action instanceof ServerStatusAction) { + result = this.caseServerStatusAction((ServerStatusAction) action); + } + break; + case SetBoundsAction.KIND: + if (action instanceof SetBoundsAction) { + result = this.caseSetBoundsAction((SetBoundsAction) action); + } + break; + case SetLayersAction.KIND: + if (action instanceof SetLayersAction) { + result = this.caseSetLayersAction((SetLayersAction) action); + } + break; + case SetModelAction.KIND: + if (action instanceof SetModelAction) { + result = this.caseSetModelAction((SetModelAction) action); + } + break; + case SetPopupModelAction.KIND: + if (action instanceof SetPopupModelAction) { + result = this.caseSetPopupModelAction((SetPopupModelAction) action); + } + break; + case SetToolsAction.KIND: + if (action instanceof SetToolsAction) { + result = this.caseSetToolsAction((SetToolsAction) action); + } + break; + case ToggleLayerAction.KIND: + if (action instanceof ToggleLayerAction) { + result = this.caseToggleLayerAction((ToggleLayerAction) action); + } + break; + case UpdateModelAction.KIND: + if (action instanceof UpdateModelAction) { + result = this.caseUpdateModelAction((UpdateModelAction) action); + } + break; + default: + result = this.defaultCase(action); + } + return result; + } + + /** + * Handles the {@link CenterAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseCenterAction(CenterAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link CollapseExpandAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseCollapseExpandAction(CollapseExpandAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link CollapseExpandAllAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseCollapseExpandAllAction(CollapseExpandAllAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link ComputedBoundsAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseComputedBoundsAction(ComputedBoundsAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link ExecuteContainerCreationToolAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseExecuteContainerCreationToolAction(ExecuteContainerCreationToolAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link ExecuteNodeCreationToolAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseExecuteNodeCreationToolAction(ExecuteNodeCreationToolAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link ExecuteToolAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseExecuteToolAction(ExecuteToolAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link ExportSvgAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseExportSvgAction(ExportSvgAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link FitToScreenAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseFitToScreenAction(FitToScreenAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link OpenAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseOpenAction(OpenAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link RequestBoundsAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseRequestBoundsAction(RequestBoundsAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link RequestExportSvgAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseRequestExportSvgAction(RequestExportSvgAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link RequestModelAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseRequestModelAction(RequestModelAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link RequestPopupModelAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseRequestPopupModelAction(RequestPopupModelAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link RequestLayersAction}. + * + * @param action + * The action + * + * @return The expected result + */ + public T caseRequestLayersAction(RequestLayersAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link RequestToolsAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseRequestToolsAction(RequestToolsAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link SelectAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseSelectAction(SelectAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link SelectAllAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseSelectAllAction(SelectAllAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link ServerStatusAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseServerStatusAction(ServerStatusAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link SetBoundsAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseSetBoundsAction(SetBoundsAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link SetLayersAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseSetLayersAction(SetLayersAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link SetModelAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseSetModelAction(SetModelAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link SetPopupModelAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseSetPopupModelAction(SetPopupModelAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link SetToolsAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseSetToolsAction(SetToolsAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link ToggleLayerAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseToggleLayerAction(ToggleLayerAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the {@link UpdateModelAction}. + * + * @param action + * The action + * @return The expected result + */ + public T caseUpdateModelAction(UpdateModelAction action) { + return this.getDefaultValue(); + } + + /** + * Handles the default case. + * + * @param action + * The action + * @return The expected result + */ + public T defaultCase(Action action) { + return this.getDefaultValue(); + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SiriusActionTypeAdapter.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SiriusActionTypeAdapter.java new file mode 100644 index 0000000000..c3a01da2cb --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SiriusActionTypeAdapter.java @@ -0,0 +1,81 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + +import java.util.Map; + +import org.eclipse.sprotty.Action; +import org.eclipse.sprotty.server.json.ActionTypeAdapter; +import org.eclipse.sprotty.server.json.EnumTypeAdapter; + +/** + * Gson type adapter for sirius sprotty actions. + * + * @author gcoutable + * + */ +public class SiriusActionTypeAdapter extends ActionTypeAdapter { + + /** + * Constructor. + * + * @param gson + * The {@link Gson} object + * @param actionKinds + * The map of action kind to {@link Action} + */ + public SiriusActionTypeAdapter(Gson gson, Map<String, Class<? extends Action>> actionKinds) { + super(gson, actionKinds); + } + + /** + * Configure a Gson builder with sirius sprotty actions. + */ + public static GsonBuilder configureGson(GsonBuilder gsonBuilder) { + gsonBuilder.registerTypeAdapterFactory(new SiriusActionTypeAdapter.SiriusFactory()); + gsonBuilder.registerTypeAdapterFactory(new EnumTypeAdapter.Factory()); + return gsonBuilder; + } + + /** + * Type adapter factory for sirius sprotty actions. Action classes are registered via their {@code kind} attribute + * using {@link #addActionKind(String, Class)}. + */ + public static class SiriusFactory extends Factory { + + /** + * Constructor. + */ + public SiriusFactory() { + super(); + addSiriusActionKinds(); + } + + /** + * Register sirius sprotty actions. + */ + private void addSiriusActionKinds() { + addActionKind(ExecuteContainerCreationToolAction.KIND, ExecuteContainerCreationToolAction.class); + addActionKind(ExecuteNodeCreationToolAction.KIND, ExecuteNodeCreationToolAction.class); + addActionKind(ExecuteToolAction.KIND, ExecuteToolAction.class); + addActionKind(RequestLayersAction.KIND, RequestLayersAction.class); + addActionKind(RequestToolsAction.KIND, RequestToolsAction.class); + addActionKind(SetLayersAction.KIND, SetLayersAction.class); + addActionKind(SetToolsAction.KIND, SetToolsAction.class); + addActionKind(ToggleLayerAction.KIND, ToggleLayerAction.class); + } + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SiriusLayer.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SiriusLayer.java new file mode 100644 index 0000000000..c4f37ac155 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SiriusLayer.java @@ -0,0 +1,96 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions; + +import org.eclipse.sirius.diagram.description.Layer; + +/** + * Class used to be serialize from the server in order to send data about {@link Layer} to the client. + * + * @author gcoutable + */ +public class SiriusLayer { + + /** + * The name of the {@link org.eclipse.sirius.diagram.description.Layer}. + */ + private String id; + + /** + * The label of the {@link org.eclipse.sirius.diagram.description.Layer}. + */ + private String name; + + /** + * If the layer is active. + */ + private boolean isActive; + + /** + * Return the id. + * + * @return the id + */ + public String getId() { + return this.id; + } + + /** + * Sets the id. + * + * @param id + * the id to set + */ + public void setId(String id) { + this.id = id; + } + + /** + * Return the name. + * + * @return the name + */ + public String getName() { + return this.name; + } + + /** + * Sets the name. + * + * @param name + * the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * Return the isActive. + * + * @return the isActive + */ + public boolean isActive() { + return this.isActive; + } + + /** + * Sets the isActive. + * + * @param isActive + * the isActive to set + */ + public void setActive(boolean isActive) { + this.isActive = isActive; + } + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SiriusOptionalActionHandlerSwitch.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SiriusOptionalActionHandlerSwitch.java new file mode 100644 index 0000000000..11907008be --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SiriusOptionalActionHandlerSwitch.java @@ -0,0 +1,73 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions; + +import java.util.Optional; + +import org.eclipse.sirius.server.diagram.internal.actions.handlers.SiriusExecuteContainerCreationToolActionHandler; +import org.eclipse.sirius.server.diagram.internal.actions.handlers.SiriusExecuteNodeCreationToolActionHandler; +import org.eclipse.sirius.server.diagram.internal.actions.handlers.SiriusExecuteToolActionHandler; +import org.eclipse.sirius.server.diagram.internal.actions.handlers.SiriusRequestLayersActionHandler; +import org.eclipse.sirius.server.diagram.internal.actions.handlers.SiriusRequestModelActionHandler; +import org.eclipse.sirius.server.diagram.internal.actions.handlers.SiriusRequestToolsActionHandler; +import org.eclipse.sirius.server.diagram.internal.actions.handlers.SiriusToggleLayerActionHandler; +import org.eclipse.sprotty.Action; +import org.eclipse.sprotty.RequestModelAction; + +/** + * Switch used to return optional consumers of {@link Action}. + * + * @author sbegaudeau + */ +public class SiriusOptionalActionHandlerSwitch extends SiriusActionSwitch<Optional<ISiriusActionHandler>> { + + @Override + protected Optional<ISiriusActionHandler> getDefaultValue() { + return Optional.empty(); + } + + @Override + public Optional<ISiriusActionHandler> caseRequestModelAction(RequestModelAction action) { + return Optional.of(new SiriusRequestModelActionHandler()); + } + + @Override + public Optional<ISiriusActionHandler> caseExecuteContainerCreationToolAction(ExecuteContainerCreationToolAction action) { + return Optional.of(new SiriusExecuteContainerCreationToolActionHandler()); + } + + @Override + public Optional<ISiriusActionHandler> caseExecuteNodeCreationToolAction(ExecuteNodeCreationToolAction action) { + return Optional.of(new SiriusExecuteNodeCreationToolActionHandler()); + } + + @Override + public Optional<ISiriusActionHandler> caseExecuteToolAction(ExecuteToolAction action) { + return Optional.of(new SiriusExecuteToolActionHandler()); + } + + @Override + public Optional<ISiriusActionHandler> caseRequestToolsAction(RequestToolsAction action) { + return Optional.of(new SiriusRequestToolsActionHandler()); + } + + @Override + public Optional<ISiriusActionHandler> caseRequestLayersAction(RequestLayersAction action) { + return Optional.of(new SiriusRequestLayersActionHandler()); + } + + @Override + public Optional<ISiriusActionHandler> caseToggleLayerAction(ToggleLayerAction action) { + return Optional.of(new SiriusToggleLayerActionHandler()); + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SiriusTool.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SiriusTool.java new file mode 100644 index 0000000000..428014ff42 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/SiriusTool.java @@ -0,0 +1,95 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions; + +import org.eclipse.sirius.viewpoint.description.tool.AbstractToolDescription; + +/** + * Class used to be serialize from the server in order to send data about {@link AbstractToolDescription} to the client + * + * @author gcoutable + */ +public class SiriusTool { + + /** + * The name of the {@link AbstractToolDescription}. + */ + private String id; + + /** + * The label of the {@link AbstractToolDescription}. + */ + private String name; + + /** + * The simple class name of the {@link AbstractToolDescription} subclass. + */ + private String toolType; + + /** + * Return the id. + * + * @return the id + */ + public String getId() { + return this.id; + } + + /** + * Sets the id. + * + * @param id + * the id to set + */ + public void setId(String id) { + this.id = id; + } + + /** + * Return the name. + * + * @return the name + */ + public String getName() { + return this.name; + } + + /** + * Sets the name. + * + * @param name + * the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * Return the toolType. + * + * @return the toolType + */ + public String getToolType() { + return this.toolType; + } + + /** + * Sets the toolType. + * + * @param toolType + * the toolType to set + */ + public void setToolType(String toolType) { + this.toolType = toolType; + } +}
\ No newline at end of file diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/ToggleLayerAction.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/ToggleLayerAction.java new file mode 100644 index 0000000000..5ffe1113fc --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/ToggleLayerAction.java @@ -0,0 +1,67 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions; + +import org.eclipse.sprotty.Action; + +/** + * Sent from the client to the server in order to toggle a layer. + * + * @author gcoutable + */ +public class ToggleLayerAction implements Action { + + /** + * The kind of the action. + */ + public static final String KIND = "toggleLayer"; //$NON-NLS-1$ + + /** + * The kind of the action. + */ + private String kind = ToggleLayerAction.KIND; + + /** + * The name of the layer. + */ + private String layerName; + + /** + * The new state of the layer. + */ + private boolean newState; + + @Override + public String getKind() { + return this.kind; + } + + /** + * Return the layerName. + * + * @return the layerName + */ + public String getLayerName() { + return this.layerName; + } + + /** + * Return the newState. + * + * @return the newState + */ + public boolean isNewState() { + return this.newState; + } + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusExecuteContainerCreationToolActionHandler.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusExecuteContainerCreationToolActionHandler.java new file mode 100644 index 0000000000..551c702401 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusExecuteContainerCreationToolActionHandler.java @@ -0,0 +1,106 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions.handlers; + +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.diagram.DDiagram; +import org.eclipse.sirius.diagram.DSemanticDiagram; +import org.eclipse.sirius.diagram.description.tool.ContainerCreationDescription; +import org.eclipse.sirius.server.diagram.internal.SiriusDiagramServer; +import org.eclipse.sirius.server.diagram.internal.actions.ExecuteContainerCreationToolAction; +import org.eclipse.sirius.server.diagram.internal.actions.ISiriusActionHandler; +import org.eclipse.sirius.server.diagram.internal.interpreter.InterpreterVariables; +import org.eclipse.sirius.server.diagram.internal.interpreter.SiriusServerInterpreter; +import org.eclipse.sirius.viewpoint.description.tool.ModelOperation; +import org.eclipse.sprotty.Action; + +/** + * Handler for the {@link ExecuteContainerCreationToolAction} received by the {@link SiriusDiagramServer}. + * + * @author sbegaudeau + */ +public class SiriusExecuteContainerCreationToolActionHandler implements ISiriusActionHandler { + /** + * The aql expression used to execute a {@link ModelOperation} programmatically. + */ + private static final String AQL_EXECUTE_OPERATION = "aql:self.executeOperation('%1$s')"; //$NON-NLS-1$ + + @Override + public boolean canHandle(SiriusDiagramServer server, Action action) { + return action instanceof ExecuteContainerCreationToolAction; + } + + @Override + public void handle(SiriusDiagramServer siriusDiagramServer, Action action) { + if (action instanceof ExecuteContainerCreationToolAction) { + this.executeContainerCreationToolAction(siriusDiagramServer, (ExecuteContainerCreationToolAction) action); + } + } + + /** + * Execute the tool identified by its name. + * + * @param siriusDiagramServer + * The {@link SiriusDiagramServer} + * @param action + * The action + */ + private void executeContainerCreationToolAction(SiriusDiagramServer siriusDiagramServer, ExecuteContainerCreationToolAction action) { + Session session = siriusDiagramServer.getSession(); + DDiagram dDiagram = siriusDiagramServer.getDDiagram(); + + // @formatter:off + Optional<ContainerCreationDescription> optionalContainerCreationDescription = dDiagram.getDescription() + .getAllTools() + .stream() + .filter(tool -> action.getToolName().equals(tool.getName())) + .filter(ContainerCreationDescription.class::isInstance) + .map(ContainerCreationDescription.class::cast) + .findFirst(); + // @formatter:on + + optionalContainerCreationDescription.ifPresent(tool -> this.executeCreationTool(session, dDiagram, tool)); + } + + /** + * Execute a {@link ContainerCreationDescription} tool. + * + * @param session + * The session + * @param representation + * The representation + * @param tool + * The {@link ContainerCreationDescription} tool + */ + private void executeCreationTool(Session session, DDiagram representation, ContainerCreationDescription tool) { + ModelOperation modelOperation = tool.getInitialOperation().getFirstModelOperations(); + + String expression = EcoreUtil.getURI(modelOperation).toString(); + expression = expression.replace("'", "\\'"); //$NON-NLS-1$//$NON-NLS-2$ + String expr = String.format(AQL_EXECUTE_OPERATION, expression); + Map<String, Object> variables = new HashMap<>(); + if (representation instanceof DSemanticDiagram) { + DSemanticDiagram dsd = (DSemanticDiagram) representation; + variables.put(InterpreterVariables.SELF_VARIABLE, dsd.getTarget()); + variables.put(InterpreterVariables.CONTAINER_VARIABLE, dsd.getTarget()); + variables.put(InterpreterVariables.CONTAINER_VIEW_VARIABLE, dsd); + } + + SiriusServerInterpreter.executeExpression(session, variables, expr); + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusExecuteNodeCreationToolActionHandler.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusExecuteNodeCreationToolActionHandler.java new file mode 100644 index 0000000000..0599d54830 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusExecuteNodeCreationToolActionHandler.java @@ -0,0 +1,108 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions.handlers; + +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.diagram.DDiagram; +import org.eclipse.sirius.diagram.DSemanticDiagram; +import org.eclipse.sirius.diagram.description.tool.NodeCreationDescription; +import org.eclipse.sirius.server.diagram.internal.SiriusDiagramServer; +import org.eclipse.sirius.server.diagram.internal.actions.ExecuteNodeCreationToolAction; +import org.eclipse.sirius.server.diagram.internal.actions.ISiriusActionHandler; +import org.eclipse.sirius.server.diagram.internal.interpreter.InterpreterVariables; +import org.eclipse.sirius.server.diagram.internal.interpreter.SiriusServerInterpreter; +import org.eclipse.sirius.viewpoint.description.tool.ModelOperation; +import org.eclipse.sprotty.Action; + +/** + * Handler for the {@link ExecuteNodeCreationToolAction} received by the {@link SiriusDiagramServer}. + * + * @author gcoutable + */ +public class SiriusExecuteNodeCreationToolActionHandler implements ISiriusActionHandler { + + /** + * The aql expression used to execute a {@link ModelOperation} programmatically. + */ + private static final String AQL_EXECUTE_OPERATION = "aql:self.executeOperation('%1$s')"; //$NON-NLS-1$ + + @Override + public boolean canHandle(SiriusDiagramServer server, Action action) { + return action instanceof ExecuteNodeCreationToolAction; + } + + @Override + public void handle(SiriusDiagramServer siriusDiagramServer, Action action) { + if (action instanceof ExecuteNodeCreationToolAction) { + this.executeNodeCreationToolAction(siriusDiagramServer, (ExecuteNodeCreationToolAction) action); + } + } + + /** + * Execute the tool identified by its name. + * + * @param siriusDiagramServer + * The {@link SiriusDiagramServer} + * @param action + * The action + */ + private void executeNodeCreationToolAction(SiriusDiagramServer siriusDiagramServer, ExecuteNodeCreationToolAction action) { + Session session = siriusDiagramServer.getSession(); + DDiagram dDiagram = siriusDiagramServer.getDDiagram(); + + // @formatter:off + Optional<NodeCreationDescription> optionalNodeCreationDescription = dDiagram.getDescription() + .getAllTools() + .stream() + .filter(tool -> action.getToolName().equals(tool.getName())) + .filter(NodeCreationDescription.class::isInstance) + .map(NodeCreationDescription.class::cast) + .findFirst(); + // @formatter:on + + optionalNodeCreationDescription.ifPresent(tool -> this.executeCreationTool(session, dDiagram, tool)); + } + + /** + * Execute a {@link NodeCreationDescription} tool. + * + * @param session + * The session + * @param representation + * The representation + * @param tool + * The {@link NodeCreationDescription} tool + */ + private void executeCreationTool(Session session, DDiagram representation, NodeCreationDescription tool) { + ModelOperation modelOperation = tool.getInitialOperation().getFirstModelOperations(); + + String expression = EcoreUtil.getURI(modelOperation).toString(); + expression = expression.replace("'", "\\'"); //$NON-NLS-1$//$NON-NLS-2$ + String expr = String.format(AQL_EXECUTE_OPERATION, expression); + Map<String, Object> variables = new HashMap<>(); + if (representation instanceof DSemanticDiagram) { + DSemanticDiagram dsd = (DSemanticDiagram) representation; + variables.put(InterpreterVariables.SELF_VARIABLE, dsd.getTarget()); + variables.put(InterpreterVariables.CONTAINER_VARIABLE, dsd.getTarget()); + variables.put(InterpreterVariables.CONTAINER_VIEW_VARIABLE, dsd); + } + + SiriusServerInterpreter.executeExpression(session, variables, expr); + } + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusExecuteToolActionHandler.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusExecuteToolActionHandler.java new file mode 100644 index 0000000000..d72484e54b --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusExecuteToolActionHandler.java @@ -0,0 +1,104 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions.handlers; + +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.diagram.DDiagram; +import org.eclipse.sirius.diagram.DSemanticDiagram; +import org.eclipse.sirius.server.diagram.internal.SiriusDiagramServer; +import org.eclipse.sirius.server.diagram.internal.actions.ExecuteToolAction; +import org.eclipse.sirius.server.diagram.internal.actions.ISiriusActionHandler; +import org.eclipse.sirius.server.diagram.internal.interpreter.InterpreterVariables; +import org.eclipse.sirius.server.diagram.internal.interpreter.SiriusServerInterpreter; +import org.eclipse.sirius.viewpoint.description.tool.ModelOperation; +import org.eclipse.sirius.viewpoint.description.tool.ToolDescription; +import org.eclipse.sprotty.Action; + +/** + * Handler for the {@link ExecuteToolAction} received by the {@link SiriusDiagramServer}. + * + * @author sbegaudeau + */ +public class SiriusExecuteToolActionHandler implements ISiriusActionHandler { + /** + * The aql expression used to execute a {@link ModelOperation} programmatically. + */ + private static final String AQL_EXECUTE_OPERATION = "aql:self.executeOperation('%1$s')"; //$NON-NLS-1$ + + @Override + public boolean canHandle(SiriusDiagramServer server, Action action) { + return action instanceof ExecuteToolAction; + } + + @Override + public void handle(SiriusDiagramServer siriusDiagramServer, Action action) { + if (action instanceof ExecuteToolAction) { + this.executeToolAction(siriusDiagramServer, (ExecuteToolAction) action); + } + } + + /** + * Execute the tool identified by its name. + * + * @param siriusDiagramServer + * The {@link SiriusDiagramServer} + * @param action + * The action + */ + private void executeToolAction(SiriusDiagramServer siriusDiagramServer, ExecuteToolAction action) { + Session session = siriusDiagramServer.getSession(); + DDiagram dDiagram = siriusDiagramServer.getDDiagram(); + + // @formatter:off + Optional<ToolDescription> optionalDescription = dDiagram.getDescription() + .getAllTools() + .stream() + .filter(tool -> action.getToolName().equals(tool.getName())) + .filter(ToolDescription.class::isInstance) + .map(ToolDescription.class::cast) + .findFirst(); + // @formatter:on + + optionalDescription.ifPresent(tool -> this.executeTool(session, dDiagram, tool)); + } + + /** + * Execute a {@link ToolDescription} tool. + * + * @param session + * The session + * @param representation + * The representation + * @param tool + * The {@link ToolDescription} tool + */ + private void executeTool(Session session, DDiagram representation, ToolDescription tool) { + ModelOperation modelOperation = tool.getInitialOperation().getFirstModelOperations(); + + String expression = EcoreUtil.getURI(modelOperation).toString(); + expression = expression.replace("'", "\\'"); //$NON-NLS-1$//$NON-NLS-2$ + String expr = String.format(AQL_EXECUTE_OPERATION, expression); + Map<String, Object> variables = new HashMap<>(); + if (representation instanceof DSemanticDiagram) { + DSemanticDiagram dsd = (DSemanticDiagram) representation; + variables.put(InterpreterVariables.SELF_VARIABLE, dsd.getTarget()); + } + + SiriusServerInterpreter.executeExpression(session, variables, expr); + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusRequestLayersActionHandler.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusRequestLayersActionHandler.java new file mode 100644 index 0000000000..476a22c8c3 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusRequestLayersActionHandler.java @@ -0,0 +1,94 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions.handlers; + +import java.util.List; +import java.util.stream.Collectors; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.sirius.diagram.DDiagram; +import org.eclipse.sirius.diagram.business.internal.metamodel.helper.LayerHelper; +import org.eclipse.sirius.diagram.description.AdditionalLayer; +import org.eclipse.sirius.diagram.description.Layer; +import org.eclipse.sirius.server.diagram.internal.SiriusDiagramServer; +import org.eclipse.sirius.server.diagram.internal.actions.ISiriusActionHandler; +import org.eclipse.sirius.server.diagram.internal.actions.RequestLayersAction; +import org.eclipse.sirius.server.diagram.internal.actions.SetLayersAction; +import org.eclipse.sirius.server.diagram.internal.actions.SiriusLayer; +import org.eclipse.sprotty.Action; + +/** + * Handler for the {@link RequestLayersAction} received by the {@link SiriusDiagramServer}. + * + * @author gcoutable + */ +public class SiriusRequestLayersActionHandler implements ISiriusActionHandler { + + @Override + public boolean canHandle(SiriusDiagramServer server, Action action) { + return action instanceof RequestLayersAction; + } + + @Override + public void handle(SiriusDiagramServer siriusDiagramServer, Action action) { + if (action instanceof RequestLayersAction) { + SetLayersAction setLayersAction = this.computeLayersList(siriusDiagramServer, (RequestLayersAction) action); + siriusDiagramServer.dispatch(setLayersAction); + } + } + + /** + * Computes the lists of sirius layers for the requested representation. + * + * @param siriusDiagramServer + * The {@link SiriusDiagramServer} + * @param action + * The action + * @return The sirius layers list + */ + private SetLayersAction computeLayersList(SiriusDiagramServer siriusDiagramServer, RequestLayersAction action) { + DDiagram dDiagram = siriusDiagramServer.getDDiagram(); + + EList<Layer> allLayers = LayerHelper.getAllLayers(dDiagram.getDescription()); + EList<Layer> activatedLayers = dDiagram.getActivatedLayers(); + //@formatter:off + List<SiriusLayer> siriusLayers = allLayers.stream() + .filter(AdditionalLayer.class::isInstance) + .map(layer -> { + boolean isActive = activatedLayers.contains(layer); + return computeSiriusLayerFromLayer(layer, isActive); + }) + .collect(Collectors.toList()); + //@formatter:on + + return new SetLayersAction(siriusLayers); + } + + /** + * Computes the {@link SiriusLayer} for the given layer. + * + * @param layer + * The layer + * @param isActive + * Indicates if the layer is active or not + * @return The {@link SiriusLayer} + */ + private SiriusLayer computeSiriusLayerFromLayer(Layer layer, boolean isActive) { + SiriusLayer siriusLayer = new SiriusLayer(); + siriusLayer.setId(layer.getName()); + siriusLayer.setName(layer.getLabel()); + siriusLayer.setActive(isActive); + return siriusLayer; + } + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusRequestModelActionHandler.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusRequestModelActionHandler.java new file mode 100644 index 0000000000..0ffec06c1a --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusRequestModelActionHandler.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions.handlers; + +import org.eclipse.sirius.server.diagram.internal.SiriusDiagramGenerator; +import org.eclipse.sirius.server.diagram.internal.SiriusDiagramServer; +import org.eclipse.sirius.server.diagram.internal.actions.ISiriusActionHandler; +import org.eclipse.sprotty.Action; +import org.eclipse.sprotty.RequestModelAction; +import org.eclipse.sprotty.SGraph; + +/** + * Handler for the {@link RequestModelAction} received by the {@link SiriusDiagramServer}. + * + * @author sbegaudeau + */ +public class SiriusRequestModelActionHandler implements ISiriusActionHandler { + + /** + * The diagram generator. + */ + private SiriusDiagramGenerator diagramGenerator = new SiriusDiagramGenerator(); + + @Override + public boolean canHandle(SiriusDiagramServer server, Action action) { + return action instanceof RequestModelAction; + } + + @Override + public void handle(SiriusDiagramServer siriusDiagramServer, Action action) { + if (action instanceof RequestModelAction) { + SGraph sGraph = this.diagramGenerator.computeDiagram(siriusDiagramServer, (RequestModelAction) action); + siriusDiagramServer.updateModel(sGraph); + } + } + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusRequestToolsActionHandler.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusRequestToolsActionHandler.java new file mode 100644 index 0000000000..0ab544c003 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusRequestToolsActionHandler.java @@ -0,0 +1,98 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions.handlers; + +import java.util.List; +import java.util.stream.Collectors; + +import org.eclipse.sirius.diagram.DDiagram; +import org.eclipse.sirius.diagram.description.Layer; +import org.eclipse.sirius.server.diagram.internal.SiriusDiagramServer; +import org.eclipse.sirius.server.diagram.internal.actions.ISiriusActionHandler; +import org.eclipse.sirius.server.diagram.internal.actions.RequestToolsAction; +import org.eclipse.sirius.server.diagram.internal.actions.SetToolsAction; +import org.eclipse.sirius.server.diagram.internal.actions.SiriusTool; +import org.eclipse.sirius.viewpoint.description.tool.AbstractToolDescription; +import org.eclipse.sprotty.Action; + +/** + * Handler for the {@link RequestToolsAction} received by the {@link SiriusDiagramServer}. + * + * @author gcoutable + */ +public class SiriusRequestToolsActionHandler implements ISiriusActionHandler { + + @Override + public boolean canHandle(SiriusDiagramServer server, Action action) { + return action instanceof RequestToolsAction; + } + + @Override + public void handle(SiriusDiagramServer siriusDiagramServer, Action action) { + if (action instanceof RequestToolsAction) { + SetToolsAction setToolsAction = this.computeToolsList(siriusDiagramServer, (RequestToolsAction) action); + siriusDiagramServer.dispatch(setToolsAction); + } + } + + /** + * Computes the lists of available sirius tools for the requested representation. + * + * @param siriusDiagramServer + * The {@link SiriusDiagramServer} + * + * @param action + * The action + * + * @return The sirius tools list + */ + private SetToolsAction computeToolsList(SiriusDiagramServer siriusDiagramServer, RequestToolsAction action) { + DDiagram dDiagram = siriusDiagramServer.getDDiagram(); + List<AbstractToolDescription> dDiagramTools = this.getAllRepresentationTools(dDiagram); + List<SiriusTool> tools = dDiagramTools.stream().map(this::mapToolFromToolDescription).collect(Collectors.toList()); + return new SetToolsAction(tools); + } + + /** + * Returns the list of all {@link AbstractToolDescription}. + * + * @param dDiagram + * The DDiagram + * + * @return The tools of the representation + */ + private List<AbstractToolDescription> getAllRepresentationTools(DDiagram dDiagram) { + // @formatter:off + return dDiagram.getActivatedLayers().stream() + .map(Layer::getAllTools) + .flatMap(List::stream) + .collect(Collectors.toList()); + // @formatter:on + } + + /** + * Creates a {@link SiriusTool} from the given {@link AbstractToolDescription}. + * + * @param toolDesc + * The {@link AbstractToolDescription} + * + * @return The {@link SiriusTool} created from the {@link AbstractToolDescription} + */ + private SiriusTool mapToolFromToolDescription(AbstractToolDescription toolDesc) { + SiriusTool tool = new SiriusTool(); + tool.setId(toolDesc.getName()); + tool.setName(toolDesc.getLabel()); + tool.setToolType(toolDesc.getClass().getSimpleName()); + return tool; + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusToggleLayerActionHandler.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusToggleLayerActionHandler.java new file mode 100644 index 0000000000..fb6c599350 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/actions/handlers/SiriusToggleLayerActionHandler.java @@ -0,0 +1,86 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.actions.handlers; + +import java.util.Optional; + +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.diagram.DDiagram; +import org.eclipse.sirius.diagram.business.internal.metamodel.helper.LayerHelper; +import org.eclipse.sirius.diagram.description.Layer; +import org.eclipse.sirius.diagram.tools.api.command.ChangeLayerActivationCommand; +import org.eclipse.sirius.server.diagram.internal.SiriusDiagramServer; +import org.eclipse.sirius.server.diagram.internal.actions.ISiriusActionHandler; +import org.eclipse.sirius.server.diagram.internal.actions.ToggleLayerAction; +import org.eclipse.sprotty.Action; + +/** + * Handler used to toggle on and off layers of the diagram. + * + * @author gcoutable + */ +public class SiriusToggleLayerActionHandler implements ISiriusActionHandler { + + @Override + public boolean canHandle(SiriusDiagramServer server, Action action) { + return action instanceof ToggleLayerAction; + } + + @Override + public void handle(SiriusDiagramServer siriusDiagramServer, Action action) { + if (action instanceof ToggleLayerAction) { + this.executeToggleLayerAction(siriusDiagramServer, (ToggleLayerAction) action); + } + } + + /** + * Toggles the layer depending on the new state of the layer returned by the client. + * + * @param siriusDiagramServer + * The {@link SiriusDiagramServer} + * @param action + * The action + */ + private void executeToggleLayerAction(SiriusDiagramServer siriusDiagramServer, ToggleLayerAction action) { + Session session = siriusDiagramServer.getSession(); + DDiagram dDiagram = siriusDiagramServer.getDDiagram(); + + //@formatter:off + + Optional<Layer> optionalLayer = LayerHelper.getAllLayers(dDiagram.getDescription()) + .stream() + .filter(Layer -> Layer.getName().equals(action.getLayerName())) + .findFirst(); + optionalLayer.ifPresent(layer -> this.toggleLayer(session, dDiagram, layer)); + //@formatter:on + } + + /** + * Toggles the layer. + * + * @param session + * The sirius session + * @param dDiagram + * The diagram description + * @param layer + * The layer to toggle + */ + private void toggleLayer(Session session, DDiagram dDiagram, Layer layer) { + TransactionalEditingDomain ted = session.getTransactionalEditingDomain(); + ChangeLayerActivationCommand command = new ChangeLayerActivationCommand(ted, dDiagram, layer, new NullProgressMonitor()); + ted.getCommandStack().execute(command); + } + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusEdge.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusEdge.java new file mode 100644 index 0000000000..5be2cbfaf3 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusEdge.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.entities; + +import org.eclipse.sprotty.SEdge; + +/** + * A Sirius specific edge. + * + * @author sbegaudeau + */ +public class SiriusEdge extends SEdge { + /** + * The style of the edge. + */ + private String style; + + /** + * The constructor. + */ + public SiriusEdge() { + super(); + } + + /** + * Sets the style. + * + * @param style + * the style to set + */ + public void setStyle(String style) { + this.style = style; + } + + /** + * Return the style. + * + * @return the style + */ + public String getStyle() { + return this.style; + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusFreeFormFlatContainerNode.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusFreeFormFlatContainerNode.java new file mode 100644 index 0000000000..ef8496de47 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusFreeFormFlatContainerNode.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.entities; + +import java.util.ArrayList; + +import org.eclipse.sprotty.SNode; + +/** + * A Sirius free form container with a flat based style. + * + * @author sbegaudeau + */ +public class SiriusFreeFormFlatContainerNode extends SNode { + /** + * The type of the {@link SiriusFreeFormFlatContainerNode}. + */ + private static final String TYPE = "node:freeformflatcontainer"; //$NON-NLS-1$ + + /** + * The style of the node. + */ + private String style; + + /** + * The constructor. + * + * @param identifier + * The identifier + */ + public SiriusFreeFormFlatContainerNode(String identifier) { + this.setId(identifier); + this.setType(TYPE); + this.setChildren(new ArrayList<>()); + } + + /** + * Return the style. + * + * @return the style + */ + public String getStyle() { + return this.style; + } + + /** + * Sets the style. + * + * @param style + * the style to set + */ + public void setStyle(String style) { + this.style = style; + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusLabel.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusLabel.java new file mode 100644 index 0000000000..4585dddc77 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusLabel.java @@ -0,0 +1,91 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.entities; + +import org.eclipse.sprotty.SLabel; + +/** + * The Sirius label. + * + * @author sbegaudeau + */ +public class SiriusLabel extends SLabel { + + /** + * The type of the left-aligned labels located inside a node. + */ + public static final String INSIDE_LEFT__LABEL_TYPE = "label:inside-left"; //$NON-NLS-1$ + + /** + * The type of the center-aligned labels located inside a node. + */ + public static final String INSIDE_CENTER__LABEL_TYPE = "label:inside-center"; //$NON-NLS-1$ + + /** + * The type of the right-aligned labels located inside a node. + */ + public static final String INSIDE_RIGHT__LABEL_TYPE = "label:inside-right"; //$NON-NLS-1$ + + /** + * The type of the left-aligned labels located outside a node. + */ + public static final String OUTSIDE_LEFT__LABEL_TYPE = "label:outside-left"; //$NON-NLS-1$ + + /** + * The type of the center-aligned labels located outside a node. + */ + public static final String OUTSIDE_CENTER__LABEL_TYPE = "label:outside-center"; //$NON-NLS-1$ + + /** + * The type of the right-aligned labels located outside a node. + */ + public static final String OUTSIDE_RIGHT__LABEL_TYPE = "label:outside-right"; //$NON-NLS-1$ + + /** + * The style of the edge. + */ + private String style; + + /** + * The constructor. + * + * @param identifier + * The identifier + * @param label + * The label + */ + public SiriusLabel(String identifier, String label) { + super(); + this.setId(identifier); + this.setText(label); + } + + /** + * Sets the style. + * + * @param style + * the style to set + */ + public void setStyle(String style) { + this.style = style; + } + + /** + * Return the style. + * + * @return the style + */ + public String getStyle() { + return this.style; + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusListFlatContainerNode.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusListFlatContainerNode.java new file mode 100644 index 0000000000..5c4af6241c --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusListFlatContainerNode.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.entities; + +import java.util.ArrayList; + +import org.eclipse.sprotty.SNode; + +/** + * A Sirius list container with a flat based style. + * + * @author sbegaudeau + */ +public class SiriusListFlatContainerNode extends SNode { + /** + * The type of the {@link SiriusListFlatContainerNode}. + */ + private static final String TYPE = "node:listflatcontainer"; //$NON-NLS-1$ + + /** + * The style of the node. + */ + private String style; + + /** + * The constructor. + * + * @param identifier + * The identifier + */ + public SiriusListFlatContainerNode(String identifier) { + this.setId(identifier); + this.setType(TYPE); + this.setLayout("vbox"); //$NON-NLS-1$ + this.setChildren(new ArrayList<>()); + } + + /** + * Return the style. + * + * @return the style + */ + public String getStyle() { + return this.style; + } + + /** + * Sets the style. + * + * @param style + * the style to set + */ + public void setStyle(String style) { + this.style = style; + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusListFlatContainerNodeBodyCompartment.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusListFlatContainerNodeBodyCompartment.java new file mode 100644 index 0000000000..d35ce0fa17 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusListFlatContainerNodeBodyCompartment.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.entities; + +import java.util.ArrayList; + +import org.eclipse.sprotty.SCompartment; + +/** + * The body compartment of the {@link SiriusListFlatContainerNode}. + * + * @author sbegaudeau + */ +public class SiriusListFlatContainerNodeBodyCompartment extends SCompartment { + + /** + * The type of the {@link SiriusListFlatContainerNodeLabelCompartment}. + */ + private static final String TYPE = "comp:listflatcontainer_body"; //$NON-NLS-1$ + + /** + * The constructor. + * + * @param identifier + * The identifier + */ + public SiriusListFlatContainerNodeBodyCompartment(String identifier) { + this.setId(identifier); + this.setType(TYPE); + this.setLayout("vbox"); //$NON-NLS-1$ + this.setChildren(new ArrayList<>()); + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusListFlatContainerNodeLabelCompartment.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusListFlatContainerNodeLabelCompartment.java new file mode 100644 index 0000000000..791afe838a --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusListFlatContainerNodeLabelCompartment.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.entities; + +import java.util.ArrayList; + +import org.eclipse.sprotty.SCompartment; + +/** + * The label compartment of the {@link SiriusListFlatContainerNode}. + * + * @author sbegaudeau + */ +public class SiriusListFlatContainerNodeLabelCompartment extends SCompartment { + + /** + * The type of the {@link SiriusListFlatContainerNodeLabelCompartment}. + */ + private static final String TYPE = "comp:listflatcontainer_label"; //$NON-NLS-1$ + + /** + * The constructor. + * + * @param identifier + * The identifier + */ + public SiriusListFlatContainerNodeLabelCompartment(String identifier) { + this.setId(identifier); + this.setType(TYPE); + this.setLayout("hbox"); //$NON-NLS-1$ + this.setChildren(new ArrayList<>()); + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusSquareBorderNode.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusSquareBorderNode.java new file mode 100644 index 0000000000..101150360c --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusSquareBorderNode.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.entities; + +import java.util.ArrayList; + +import org.eclipse.sprotty.SPort; + +/** + * A Sirius border node with a square based style. + * + * @author hmarchadour + */ +public class SiriusSquareBorderNode extends SPort { + /** + * The type of the {@link SiriusSquareBorderNode}. + */ + public static final String TYPE = "port:square"; //$NON-NLS-1$ + + /** + * The style of the node. + */ + private String style; + + /** + * The constructor. + * + * @param identifier + * The identifier + */ + public SiriusSquareBorderNode(String identifier) { + this.setId(identifier); + this.setType(TYPE); + this.setChildren(new ArrayList<>()); + } + + /** + * Return the style. + * + * @return the style + */ + public String getStyle() { + return this.style; + } + + /** + * Sets the style. + * + * @param style + * the style to set + */ + public void setStyle(String style) { + this.style = style; + } +}
\ No newline at end of file diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusSquareNode.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusSquareNode.java new file mode 100644 index 0000000000..6bd17c3e17 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusSquareNode.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.entities; + +import java.util.ArrayList; + +import org.eclipse.sprotty.SNode; + +/** + * A Sirius node with a square based style. + * + * @author sbegaudeau + */ +public class SiriusSquareNode extends SNode { + /** + * The type of the {@link SiriusSquareNode}. + */ + private static final String TYPE = "node:square"; //$NON-NLS-1$ + + /** + * The style of the node. + */ + private String style; + + /** + * The constructor. + * + * @param identifier + * The identifier + */ + public SiriusSquareNode(String identifier) { + this.setId(identifier); + this.setType(TYPE); + this.setChildren(new ArrayList<>()); + } + + /** + * Return the style. + * + * @return the style + */ + public String getStyle() { + return this.style; + } + + /** + * Sets the style. + * + * @param style + * the style to set + */ + public void setStyle(String style) { + this.style = style; + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusSvgBorderNode.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusSvgBorderNode.java new file mode 100644 index 0000000000..685b1ad3d3 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusSvgBorderNode.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.entities; + +import java.util.ArrayList; + +import org.eclipse.sprotty.SPort; + +/** + * A Sirius border node with a SVG image style. + * + * @author sbegaudeau + */ +public class SiriusSvgBorderNode extends SPort { + /** + * The type. + */ + public static final String TYPE = "port:image"; //$NON-NLS-1$ + + /** + * The data of the SVG figure. + */ + private String url; + + /** + * The constructor. + * + * @param identifier + * The identifier + */ + public SiriusSvgBorderNode(String identifier) { + this.setId(identifier); + this.setType(TYPE); + this.setChildren(new ArrayList<>()); + } + + /** + * Sets the url. + * + * @param url + * the url to set + */ + public void setUrl(String url) { + this.url = url; + } + + /** + * Return the url. + * + * @return the url + */ + public String getUrl() { + return this.url; + } +}
\ No newline at end of file diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusSvgNode.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusSvgNode.java new file mode 100644 index 0000000000..22d0ad7cb9 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/entities/SiriusSvgNode.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.entities; + +import java.util.ArrayList; + +import org.eclipse.sprotty.SNode; + +/** + * A Sirius node with a SVG image style. + * + * @author sbegaudeau + */ +public class SiriusSvgNode extends SNode { + /** + * The type of the {@link SiriusSvgNode}. + */ + private static final String TYPE = "node:svg"; //$NON-NLS-1$ + + /** + * The data of the SVG figure. + */ + private String svgData; + + /** + * The constructor. + * + * @param identifier + * The identifier + */ + public SiriusSvgNode(String identifier) { + this.setId(identifier); + this.setType(TYPE); + this.setChildren(new ArrayList<>()); + } + + /** + * Sets the svgData. + * + * @param svgData + * the svgData to set + */ + public void setSvgData(String svgData) { + this.svgData = svgData; + } + + /** + * Return the svgData. + * + * @return the svgData + */ + public String getSvgData() { + return this.svgData; + } +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/interpreter/InterpreterVariables.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/interpreter/InterpreterVariables.java new file mode 100644 index 0000000000..b4f914363a --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/interpreter/InterpreterVariables.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.interpreter; + +/** + * Interfaces to store interpreter variables. + * + * @author gcoutable + */ +public interface InterpreterVariables { + + /** + * The self variable. + */ + static final String SELF_VARIABLE = "self"; //$NON-NLS-1$ + + /** + * The container variable. + */ + static final String CONTAINER_VARIABLE = "container"; //$NON-NLS-1$ + + /** + * The containerView variable. + */ + static final String CONTAINER_VIEW_VARIABLE = "containerView"; //$NON-NLS-1$ + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/interpreter/SiriusServerInterpreter.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/interpreter/SiriusServerInterpreter.java new file mode 100644 index 0000000000..34f79569b5 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/interpreter/SiriusServerInterpreter.java @@ -0,0 +1,116 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.interpreter; + +import java.util.Collection; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Objects; +import java.util.Set; + +import org.eclipse.emf.common.util.BasicDiagnostic; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.common.interpreter.api.EvaluationResult; +import org.eclipse.sirius.common.interpreter.api.IEvaluationResult; +import org.eclipse.sirius.common.tools.api.interpreter.EvaluationException; +import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter; + +/** + * Provides an implementation of {@link IInterpreter} backed by an old-style {@link IInterpreterWithDiagnostic}. + * + * @author pcdavid + */ +public class SiriusServerInterpreter implements org.eclipse.sirius.common.interpreter.api.IInterpreter { + + private IInterpreter interpreter; + + /** + * The constructor. + * + * @param session + * The Sirius session + */ + public SiriusServerInterpreter(Session session) { + this(session.getInterpreter()); + } + + /** + * The constructor. + * + * @param interpreterWithDiagnostic + * An interpreter + */ + public SiriusServerInterpreter(IInterpreter interpreterWithDiagnostic) { + this.interpreter = Objects.requireNonNull(interpreterWithDiagnostic); + } + + @Override + public IEvaluationResult evaluateExpression(Map<String, Object> variables, String expr) { + IEvaluationResult result = EvaluationResult.noEvaluation(); + Object self = variables.get("self"); //$NON-NLS-1$ + if (self instanceof EObject) { + try { + setupInterpreter(variables); + + org.eclipse.sirius.common.tools.api.interpreter.IEvaluationResult evaluationResult = this.interpreter + .evaluateExpression((EObject) self, expr); + result = EvaluationResult.of(evaluationResult.getValue(), evaluationResult.getDiagnostic()); + } catch (EvaluationException e) { + result = EvaluationResult.withError(BasicDiagnostic.toDiagnostic(e)); + } finally { + tearDownInterpreter(variables); + } + } + return result; + } + + private void setupInterpreter(Map<String, Object> variables) { + org.eclipse.sirius.common.tools.api.interpreter.IInterpreter i = this.interpreter; + i.addImport(SiriusServerServices.class.getName()); + declareLocals(variables, i); + } + + private void declareLocals(Map<String, Object> variables, org.eclipse.sirius.common.tools.api.interpreter.IInterpreter i) { + Set<Entry<String, Object>> entries = variables.entrySet(); + for (Entry<String, Object> entry : entries) { + i.setVariable(entry.getKey(), entry.getValue()); + } + } + + private void tearDownInterpreter(Map<String, Object> variables) { + unsetLocals(variables, this.interpreter); + } + + private void unsetLocals(Map<String, Object> variables, org.eclipse.sirius.common.tools.api.interpreter.IInterpreter i) { + Set<Entry<String, Object>> entries = variables.entrySet(); + for (Entry<String, Object> entry : entries) { + i.unSetVariable(entry.getKey()); + } + } + + public static Collection<?> executeExpression(Session session, Map<String, Object> variables, String expression) { + TransactionalEditingDomain ted = session.getTransactionalEditingDomain(); + RecordingCommand cmd = new RecordingCommand(ted) { + @Override + protected void doExecute() { + new SiriusServerInterpreter(session).evaluateExpression(variables, expression); + } + }; + ted.getCommandStack().execute(cmd); + return cmd.getResult(); + } + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/interpreter/SiriusServerServices.java b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/interpreter/SiriusServerServices.java new file mode 100644 index 0000000000..66afee0cc6 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/src/org/eclipse/sirius/server/diagram/internal/interpreter/SiriusServerServices.java @@ -0,0 +1,115 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 Obeo + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.server.diagram.internal.interpreter; + +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.Set; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.sirius.business.api.helper.task.ICommandTask; +import org.eclipse.sirius.business.api.helper.task.TaskHelper; +import org.eclipse.sirius.business.api.query.EObjectQuery; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.ecore.extender.business.api.accessor.ModelAccessor; +import org.eclipse.sirius.tools.api.command.SiriusCommand; +import org.eclipse.sirius.viewpoint.SiriusPlugin; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.sirius.viewpoint.description.tool.ModelOperation; + +/** + * This class contains various services. + * + * @author gcoutable + */ +public class SiriusServerServices { + + /** + * Executes the operation with the given URI. + * + * @param eObject + * The EObject to use as the operation's context + * @param initialCommandUri + * the URI of the operation to execute + * @return the model element on which the tool was executed. + */ + public EObject executeOperation(EObject eObject, String initialCommandUri) { + if (!eObject.eIsProxy()) { + Session session = new EObjectQuery(eObject).getSession(); + if (session != null) { + ModelOperation modelOperation = findModelOperation(initialCommandUri, session); + if (modelOperation != null) { + ModelAccessor modelAccessor = session.getModelAccessor(); + ICommandTask task = new TaskHelper(modelAccessor, SiriusPlugin.getDefault().getUiCallback()).buildTaskFromModelOperation(eObject, + modelOperation); + SiriusCommand command = new SiriusCommand(session.getTransactionalEditingDomain(), "SiriusServerServices#executeOperation"); //$NON-NLS-1$ + command.getTasks().add(task); + try { + if (command.canExecute()) { + command.execute(); + } + } finally { + command.dispose(); + } + } + } + } + return eObject; + } + + /** + * Resolves the actual {@link ModelOperation} to execute given its URI. + * + * @param initialCommandUri + * the URI of the operation to search for. + * @param session + * the Sirius session which determines the scope to search into. + * @return the {@link ModelOperation} instance found at the specified URI, either in one of the VSMs for which at + * least one Viewpoint is currently enabled in the session, or from the default ruleset, or + * <code>null</code> if no matching operation could be located. + */ + private ModelOperation findModelOperation(String initialCommandUri, Session session) { + URI commandResourceURI = URI.createURI(initialCommandUri).trimFragment(); + for (Resource res : getResourcesInScope(session)) { + if (commandResourceURI.equals(res.getURI())) { + EObject modelOperationEObject = res.getEObject(URI.createURI(initialCommandUri).fragment()); + if (modelOperationEObject instanceof ModelOperation) { + return ((ModelOperation) modelOperationEObject); + } + } + } + return null; + } + + /** + * Returns all the (VSM-like) resources in which to search for the {@link ModelOperation} to execute. + * + * @param session + * the Sirius session. + * @return all the resources in which to look for the ModelOperation, in order of preference. + */ + private Set<Resource> getResourcesInScope(Session session) { + Set<Resource> result = new LinkedHashSet<>(); + Collection<Viewpoint> selectedViewpoints = session.getSelectedViewpoints(true); + for (Viewpoint viewpoint : selectedViewpoints) { + Resource eResource = viewpoint.eResource(); + if (eResource != null) { + result.add(eResource); + } + } + return result; + } + +} diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/EndEvent.svg b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/EndEvent.svg new file mode 100644 index 0000000000..35ad3e6e3d --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/EndEvent.svg @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="31.999998" + height="31.999998" + id="svg3961" + version="1.1" + inkscape:version="0.48.3.1 r9886" + sodipodi:docname="EndEvent.svg"> + <defs + id="defs3963" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="5.6568543" + inkscape:cx="9.6343602" + inkscape:cy="14.065261" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:document-units="px" + inkscape:grid-bbox="true" + inkscape:window-width="1337" + inkscape:window-height="728" + inkscape:window-x="2060" + inkscape:window-y="103" + inkscape:window-maximized="0" + showborder="true" + inkscape:showpageshadow="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0"> + <inkscape:grid + type="xygrid" + id="grid4797" + empspacing="5" + visible="true" + enabled="true" + snapvisiblegridlinesonly="true" + originx="-10.330873px" + originy="-10.643382px" /> + </sodipodi:namedview> + <metadata + id="metadata3966"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer" + transform="translate(-10.330873,-21.356616)"> + <path + sodipodi:type="arc" + style="fill:#ffd5d5;fill-opacity:1;stroke:#550000;stroke-width:1.45696676;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + id="path3774" + sodipodi:cx="-22.629553" + sodipodi:cy="22.61429" + sodipodi:rx="10" + sodipodi:ry="10" + d="m -12.629553,22.61429 a 10,10 0 1 1 -20,0 10,10 0 1 1 20,0 z" + transform="matrix(1.4913571,0,0,1.4913571,59.879753,3.8304962)" /> + </g> +</svg> diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/LaneSet.png b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/LaneSet.png Binary files differnew file mode 100644 index 0000000000..72eb441e54 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/LaneSet.png diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/StartEvent.svg b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/StartEvent.svg new file mode 100644 index 0000000000..7b0dae28bd --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/StartEvent.svg @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="31.999998" + height="31.999998" + id="svg3961" + version="1.1" + inkscape:version="0.48.3.1 r9886" + sodipodi:docname="StartEvent.svg"> + <defs + id="defs3963" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="8.0000001" + inkscape:cx="4.9356293" + inkscape:cy="11.486226" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:document-units="px" + inkscape:grid-bbox="true" + inkscape:window-width="1337" + inkscape:window-height="728" + inkscape:window-x="2146" + inkscape:window-y="155" + inkscape:window-maximized="0" + showborder="true" + inkscape:showpageshadow="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0"> + <inkscape:grid + type="xygrid" + id="grid4797" + empspacing="5" + visible="true" + enabled="true" + snapvisiblegridlinesonly="true" + originx="-10.330873px" + originy="-10.643382px" /> + </sodipodi:namedview> + <metadata + id="metadata3966"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer" + transform="translate(-10.330873,-21.356616)"> + <path + sodipodi:type="arc" + style="fill:#f6ffd5;fill-opacity:1;stroke:#668000;stroke-width:1.19224322;stroke-miterlimit:4;stroke-dasharray:none" + id="path3774" + sodipodi:cx="-22.629553" + sodipodi:cy="22.61429" + sodipodi:rx="10" + sodipodi:ry="10" + d="m -12.629553,22.61429 c 0,5.522848 -4.477152,10 -10,10 -5.522847,0 -10,-4.477152 -10,-10 0,-5.522847 4.477153,-10 10,-10 5.522848,0 10,4.477153 10,10 z" + transform="matrix(1.5099864,0,0,1.5099864,60.50119,3.2093447)" /> + </g> +</svg> diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/Task.svg b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/Task.svg new file mode 100644 index 0000000000..864dba04b3 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/Task.svg @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="100" + height="51" + id="svg3961" + version="1.1" + inkscape:version="0.48.3.1 r9886" + sodipodi:docname="Task.svg"> + <defs + id="defs3963" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="8.0000001" + inkscape:cx="32.700377" + inkscape:cy="32.204978" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:document-units="px" + inkscape:grid-bbox="true" + inkscape:window-width="1535" + inkscape:window-height="795" + inkscape:window-x="47" + inkscape:window-y="144" + inkscape:window-maximized="0" + showborder="true" + inkscape:showpageshadow="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0"> + <inkscape:grid + type="xygrid" + id="grid4797" + empspacing="5" + visible="true" + enabled="true" + snapvisiblegridlinesonly="true" + originx="7.012877px" + originy="10.01287px" /> + </sodipodi:namedview> + <metadata + id="metadata3966"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer" + transform="translate(7.012877,-23.012866)"> + <rect + style="fill:#d5e5ff;fill-opacity:1;stroke:#000080;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + id="rect2986" + width="98" + height="49" + x="-16.330873" + y="2.6433802" + transform="translate(10.330873,21.356616)" + ry="10" /> + </g> +</svg> diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/ToolDescription.gif b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/ToolDescription.gif Binary files differnew file mode 100644 index 0000000000..fcc842f14e --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/ToolDescription.gif diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/end.svg b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/end.svg new file mode 100644 index 0000000000..9c8ab0e17d --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/end.svg @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="32" + height="32" + id="svg5795" + version="1.1" + inkscape:version="0.48.5 r10040" + sodipodi:docname="end.svg"> + <defs + id="defs5797" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="14.65625" + inkscape:cx="4.9808102" + inkscape:cy="12.285388" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="966" + inkscape:window-height="852" + inkscape:window-x="1575" + inkscape:window-y="284" + inkscape:window-maximized="0" /> + <metadata + id="metadata5800"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Calque 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-1020.3622)"> + <g + id="g4674" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + inkscape:export-filename="/Volumes/partage/private/marketing/Design/Produits/BPMN/design/nodes/boundary-events/png/none.png" + style="fill:#881a1c;fill-opacity:1;stroke:#881a1c;stroke-opacity:1" + transform="translate(-103.30869,1000.0944)"> + <path + transform="matrix(0.34661363,0,0,0.26862556,81.181191,9.9219258)" + d="m 154.28571,98.076469 c 0,31.559131 -19.82739,57.142861 -44.28571,57.142861 -24.458324,0 -44.285713,-25.58373 -44.285713,-57.142861 0,-31.559128 19.827389,-57.142856 44.285713,-57.142856 24.45832,0 44.28571,25.583728 44.28571,57.142856 z" + sodipodi:ry="57.142857" + sodipodi:rx="44.285713" + sodipodi:cy="98.076469" + sodipodi:cx="110" + id="path3753" + style="fill:#881a1c;fill-opacity:1;stroke:#881a1c;stroke-width:4.26015568;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + sodipodi:type="arc" /> + <path + transform="matrix(0.26081651,0,0,0.20213279,90.618876,16.443302)" + d="m 154.28571,98.076469 c 0,31.559131 -19.82739,57.142861 -44.28571,57.142861 -24.458324,0 -44.285713,-25.58373 -44.285713,-57.142861 0,-31.559128 19.827389,-57.142856 44.285713,-57.142856 24.45832,0 44.28571,25.583728 44.28571,57.142856 z" + sodipodi:ry="57.142857" + sodipodi:rx="44.285713" + sodipodi:cy="98.076469" + sodipodi:cx="110" + id="path3753-2" + style="fill:#ffffff;fill-opacity:1;stroke:none" + sodipodi:type="arc" /> + </g> + </g> +</svg> diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/event-based-gateway.svg b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/event-based-gateway.svg new file mode 100644 index 0000000000..cb8c7535b3 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/event-based-gateway.svg @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="40.513111" + height="40.513111" + id="svg4239" + version="1.1" + inkscape:version="0.48.5 r10040" + sodipodi:docname="event-based.svg"> + <defs + id="defs4241" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="3.959798" + inkscape:cx="69.038564" + inkscape:cy="20.901572" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:showpageshadow="false" + inkscape:window-width="979" + inkscape:window-height="588" + inkscape:window-x="1461" + inkscape:window-y="551" + inkscape:window-maximized="0" /> + <metadata + id="metadata4244"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Calque 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-235.25076,-401.63386)"> + <g + id="g4184" + transform="matrix(0.968523,0,0,0.968523,54.257962,386.824)"> + <rect + transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,0,0)" + y="158.3922" + x="107.19135" + height="28.284271" + width="28.284271" + id="rect4721-5-0-7" + style="fill:#ffffff;fill-opacity:1;stroke:#fcb018;stroke-width:1.29999995;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.25648646,0,0,0.198777,179.58242,16.709121)" + d="m 154.28571,98.076469 c 0,31.559131 -19.82739,57.142861 -44.28571,57.142861 -24.458324,0 -44.285713,-25.58373 -44.285713,-57.142861 0,-31.559128 19.827389,-57.142856 44.285713,-57.142856 24.45832,0 44.28571,25.583728 44.28571,57.142856 z" + sodipodi:ry="57.142857" + sodipodi:rx="44.285713" + sodipodi:cy="98.076469" + sodipodi:cx="110" + id="path5233" + style="fill:#ffffff;fill-opacity:1;stroke:#fcb018;stroke-width:5.75742197;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + sodipodi:type="arc" /> + <path + transform="matrix(0.19299848,0,0,0.14957381,186.5661,21.534796)" + d="m 154.28571,98.076469 c 0,31.559131 -19.82739,57.142861 -44.28571,57.142861 -24.458324,0 -44.285713,-25.58373 -44.285713,-57.142861 0,-31.559128 19.827389,-57.142856 44.285713,-57.142856 24.45832,0 44.28571,25.583728 44.28571,57.142856 z" + sodipodi:ry="57.142857" + sodipodi:rx="44.285713" + sodipodi:cy="98.076469" + sodipodi:cx="110" + id="path5235" + style="fill:#ffffff;fill-opacity:1;stroke:#fcb018;stroke-width:7.65136003;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + sodipodi:type="arc" /> + <path + sodipodi:nodetypes="cccccc" + inkscape:connector-curvature="0" + id="path5237" + d="m 207.79594,31.01668 5.38931,3.400739 -2.11292,6.574764 -6.5528,0 -2.11292,-6.574764 z" + style="fill:none;stroke:#fcb018;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + </g> + </g> +</svg> diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/man.svg b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/man.svg new file mode 100644 index 0000000000..ca6b64d15d --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/man.svg @@ -0,0 +1,668 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="255.12059" + height="255.1181" + id="svg6897" + version="1.1" + inkscape:version="0.48.5 r10040" + sodipodi:docname="man.svg"> + <defs + id="defs3"> + <linearGradient + id="linearGradient19633"> + <stop + id="stop19635" + offset="0" + style="stop-color:#f2d8bc;stop-opacity:1;" /> + <stop + style="stop-color:#f2d9bc;stop-opacity:1;" + offset="0.46557674" + id="stop19639" /> + <stop + id="stop19637" + offset="1" + style="stop-color:#ebc599;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient15560"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564" /> + </linearGradient> + <linearGradient + id="linearGradient15560-6"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562-8" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564-7" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6" + id="radialGradient15574-0" + cx="172.14285" + cy="126.64789" + fx="172.14285" + fy="126.64789" + r="127.55905" + gradientTransform="matrix(1,0,0,1.0001349,0,-0.01708751)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + id="linearGradient19560"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop19562" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop19564" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633" + id="linearGradient19660" + gradientUnits="userSpaceOnUse" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6" + id="radialGradient19662" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560" + id="radialGradient19664" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.0001349,0,-0.01708751)" + cx="172.14285" + cy="126.64789" + fx="172.14285" + fy="126.64789" + r="127.55905" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560" + id="radialGradient19666" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="171.22086" + cy="85.898735" + fx="171.22086" + fy="85.898735" + r="49.222404" /> + <linearGradient + id="linearGradient19633-1"> + <stop + id="stop19635-0" + offset="0" + style="stop-color:#f2d8bc;stop-opacity:1;" /> + <stop + style="stop-color:#f2d9bc;stop-opacity:1;" + offset="0.46557674" + id="stop19639-6" /> + <stop + id="stop19637-3" + offset="1" + style="stop-color:#ebc599;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient15560-6-0"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562-8-4" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564-7-4" /> + </linearGradient> + <linearGradient + id="linearGradient15560-8"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562-81" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564-6" /> + </linearGradient> + <linearGradient + id="linearGradient19692"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop19694" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop19696" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-8-6" + id="radialGradient19664-7-1" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.0001349,0,-0.01708751)" + cx="172.14285" + cy="126.64789" + fx="172.14285" + fy="126.64789" + r="127.55905" /> + <linearGradient + id="linearGradient15560-8-6"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562-81-4" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564-6-7" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-8-6" + id="radialGradient19666-0-0" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="171.22086" + cy="85.898735" + fx="171.22086" + fy="85.898735" + r="49.222404" /> + <linearGradient + id="linearGradient19797"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop19799" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop19801" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633-8" + id="linearGradient19660-5" + gradientUnits="userSpaceOnUse" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <linearGradient + id="linearGradient19633-8"> + <stop + id="stop19635-7" + offset="0" + style="stop-color:#f2d8bc;stop-opacity:1;" /> + <stop + style="stop-color:#f2d9bc;stop-opacity:1;" + offset="0.46557674" + id="stop19639-9" /> + <stop + id="stop19637-8" + offset="1" + style="stop-color:#ebc599;stop-opacity:1;" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6-7" + id="radialGradient19662-8" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <linearGradient + id="linearGradient15560-6-7"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562-8-9" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564-7-5" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633" + id="linearGradient19967" + gradientUnits="userSpaceOnUse" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6" + id="radialGradient19969" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-8-6" + id="radialGradient19971" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.0001349,0,-0.01708751)" + cx="172.14285" + cy="126.64789" + fx="172.14285" + fy="126.64789" + r="127.55905" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-8-6" + id="radialGradient19973" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="171.22086" + cy="85.898735" + fx="171.22086" + fy="85.898735" + r="49.222404" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633" + id="linearGradient19975" + gradientUnits="userSpaceOnUse" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" + gradientTransform="translate(0,-0.37711)" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6" + id="radialGradient19977" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633-0" + id="linearGradient19975-0" + gradientUnits="userSpaceOnUse" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <linearGradient + id="linearGradient19633-0"> + <stop + id="stop19635-77" + offset="0" + style="stop-color:#f2d8bc;stop-opacity:1;" /> + <stop + style="stop-color:#f2d9bc;stop-opacity:1;" + offset="0.46557674" + id="stop19639-64" /> + <stop + id="stop19637-6" + offset="1" + style="stop-color:#ebc599;stop-opacity:1;" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6-4" + id="radialGradient19977-7" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <linearGradient + id="linearGradient15560-6-4"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562-8-47" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564-7-6" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633" + id="linearGradient20057" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(0,-0.37711)" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6" + id="radialGradient20059" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <linearGradient + id="linearGradient15560-8-6-1"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562-81-4-7" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564-6-7-3" /> + </linearGradient> + <linearGradient + id="linearGradient3106"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop3108" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop3110" /> + </linearGradient> + <linearGradient + id="linearGradient19633-05"> + <stop + id="stop19635-3" + offset="0" + style="stop-color:#f2d8bc;stop-opacity:1;" /> + <stop + style="stop-color:#f2d9bc;stop-opacity:1;" + offset="0.46557674" + id="stop19639-0" /> + <stop + id="stop19637-0" + offset="1" + style="stop-color:#ebc599;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient15560-6-04"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562-8-6" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564-7-9" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633-05" + id="linearGradient4020" + gradientUnits="userSpaceOnUse" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6-04" + id="radialGradient4022" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-8-6-1" + id="radialGradient4024" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.0001349,0,-0.01708751)" + cx="172.14285" + cy="126.64789" + fx="172.14285" + fy="126.64789" + r="127.55905" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-8-6-1" + id="radialGradient4026" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="171.22086" + cy="85.898735" + fx="171.22086" + fy="85.898735" + r="49.222404" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633-0" + id="linearGradient4028" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(0,-0.37711)" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6-4" + id="radialGradient4030" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633-05" + id="linearGradient4082" + gradientUnits="userSpaceOnUse" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6-04" + id="radialGradient4084" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-8-6-1" + id="radialGradient4086" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.0001349,0,-0.01708751)" + cx="172.14285" + cy="126.64789" + fx="172.14285" + fy="126.64789" + r="127.55905" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-8-6-1" + id="radialGradient4088" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="171.22086" + cy="85.898735" + fx="171.22086" + fy="85.898735" + r="49.222404" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633-0" + id="linearGradient4090" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(0,-0.37711)" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6-4" + id="radialGradient4092" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + </defs> + <sodipodi:namedview + inkscape:document-units="mm" + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.24748738" + inkscape:cx="99.7399" + inkscape:cy="-300.22866" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1574" + inkscape:window-height="1008" + inkscape:window-x="37" + inkscape:window-y="105" + inkscape:window-maximized="0" + units="mm" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" /> + <metadata + id="metadata4"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-408.15524,-46.324276)"> + <g + id="g19649" + transform="matrix(1,0,0,0.96598873,40,55.864721)" + inkscape:export-filename="/Volumes/partage/private/marketing/Design/Produits/Sirius/png/man_16.png" + inkscape:export-xdpi="5.6444445" + inkscape:export-ydpi="5.6444445"> + <g + id="g19911" + inkscape:export-filename="/Volumes/partage/private/marketing/Design/Produits/Sirius/png/man_32.png" + inkscape:export-xdpi="11.28878" + inkscape:export-ydpi="11.28878"> + <path + id="path8747-8-7" + style="fill:url(#linearGradient19660);fill-opacity:1;fill-rule:nonzero;stroke:none" + d="m 567.90313,185.53891 c -33.4352,-12.1813 -44.12152,-26.51434 -44.12152,-48.52471 0,-13.1894 10.19902,-8.90494 14.67658,-33.09948 1.8733,-9.99707 10.8876,-0.16818 12.61788,-23.102434 0,-9.07299 -4.93971,-11.341214 -4.93971,-11.341214 0,0 2.52879,-13.525442 3.5034,-23.942542 1.1931,-13.02136 -7.48529,-46.45689 -53.92547,-46.45689 -46.43139,0 -55.14332,33.43553 -53.92505,46.45689 0.97417,10.4171 3.50296,23.942542 3.50296,23.942542 0,0 -4.93973,2.268224 -4.93973,11.341214 1.73075,22.934384 10.74503,13.105364 12.61833,23.102434 4.47756,24.19454 14.68452,19.91008 14.68452,33.09948 0,22.01037 -10.69426,36.34341 -44.12992,48.52471 -33.56983,12.26528 -55.37016,20.69861 -55.37016,29.18353 0,8.48484 0,39.50171 0,39.50171 l 255.11809,0 c 0,0 0,-31.01687 0,-39.50171 0,-8.48492 -21.80035,-16.91825 -55.3702,-29.18353" + inkscape:connector-curvature="0" + sodipodi:nodetypes="csccccsccccscsccsc" /> + <path + id="path8747-2-2" + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" + d="m 531.90313,163.5389 c 15.92247,21.6274 91.87528,34.36486 91.3702,51.18354 -0.12735,4.24051 0,2.02364 0,10.74424 0,8.72061 -20,28.38062 -20,28.38062 l -215.11809,0 c 0,0 -20,-19.66001 -20,-28.38062 0,-8.7206 0,-6.50182 0,-10.74424 0,-8.48492 80.77,-32.38606 91.37017,-51.18354 25.36834,23.52394 51.15632,22.62639 72.37772,0 z" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cssccsscc" /> + <path + sodipodi:type="arc" + style="fill:url(#radialGradient19662);fill-opacity:1;stroke:#e6b57e;stroke-width:2.48031497;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="path15558-1" + sodipodi:cx="171.22086" + sodipodi:cy="85.898735" + sodipodi:rx="47.982246" + sodipodi:ry="67.427681" + d="m 219.2031,85.898735 c 0,37.239275 -21.48238,67.427685 -47.98224,67.427685 -26.49987,0 -47.98225,-30.18841 -47.98225,-67.427685 0,-37.23928 21.48238,-67.427681 47.98225,-67.427681 26.49986,0 47.98224,30.188401 47.98224,67.427681 z" + transform="matrix(1,0,0,1.0773453,323.06636,-19.92)" /> + <path + style="fill:#493225;fill-opacity:1;stroke:none" + d="m 445.78938,73.769474 c 1.31756,-1.756746 -0.79399,-0.315053 -3.39632,-5.612402 C 438.74122,50.294047 428.99625,15.0747 459.43694,-1.732 c 47.76132,-22.78746 92.04457,5.0573029 90.19329,48.64577 -1.76788,16.170177 -1.34166,19.523769 -8.75345,27.926388 1.65191,-2.145951 -5.96808,-36.444157 -13.79781,-44.898176 -10.1635,-10.97387 -7.09096,0.387162 -8.1605,-1.392307 -3.64784,-6.069137 -7.61704,-9.246016 -11.73967,-11.042003 0.48194,6.653529 1.60809,13.544249 -0.28073,10.245671 -3.21674,-5.617618 -23.25719,-14.519286 -18.83286,-9.295438 2.80224,3.308629 4.09372,12.2227 3.05381,10.843939 -7.6944,-10.201575 -20.94634,-6.037529 -25.68243,-4.531289 -7.98586,3.520797 -9.43386,-1.835007 -7.57578,23.703051 -4.21302,4.266354 -10.70103,21.991886 -12.07143,25.295868 z" + id="path15556-1" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccsscsssccc" /> + <path + sodipodi:nodetypes="cccccccc" + inkscape:connector-curvature="0" + d="m 532.96732,163.5389 c 10.07764,22.45347 90.29857,26.00795 90.30601,49.18341 l 0,41.12373 -255.11809,0.001 0,-41.12473 c 0.35714,-17.41349 75.80033,-25.13266 89.37017,-49.18367 14.01254,26.26353 22.5624,42.66513 35.66919,69.60296 3.01312,3.95605 2.02625,5.07735 5.03937,0" + style="fill:#56a6d1;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="path19619" /> + </g> + </g> + <g + inkscape:export-ydpi="5.6444445" + inkscape:export-xdpi="5.6444445" + inkscape:export-filename="/Volumes/partage/private/marketing/Design/Produits/Sirius/png/man_16.png" + transform="matrix(0.78977954,0,0,0.76291812,-43.100336,434.7796)" + id="g19918"> + <g + inkscape:export-ydpi="11.28878" + inkscape:export-xdpi="11.28878" + inkscape:export-filename="/Volumes/partage/private/marketing/Design/Produits/Sirius/png/man_32.png" + id="g19920"> + <g + id="g19936" /> + </g> + </g> + </g> +</svg> diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/start.svg b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/start.svg new file mode 100644 index 0000000000..56f42cb77d --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/start.svg @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="32" + height="32" + id="svg5795" + version="1.1" + inkscape:version="0.48.5 r10040" + sodipodi:docname="none.svg"> + <defs + id="defs5797" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="14.65625" + inkscape:cx="2.7633262" + inkscape:cy="23.202232" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="966" + inkscape:window-height="852" + inkscape:window-x="1598" + inkscape:window-y="324" + inkscape:window-maximized="0" /> + <metadata + id="metadata5800"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Calque 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-1020.3622)"> + <g + transform="translate(-103.60098,681.57143)" + id="g5762" + inkscape:export-filename="/Volumes/partage/private/marketing/Design/Produits/BPMN/design/nodes/boundary-events/png/multiple.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + style="stroke:#8dc03d;stroke-opacity:1"> + <g + style="stroke:#8dc03d;stroke-opacity:1" + inkscape:export-filename="/Volumes/partage/private/marketing/Design/Produits/BPMN/design/nodes/boundary-events/png/none.png" + inkscape:export-ydpi="90" + inkscape:export-xdpi="90" + id="g5231" + transform="translate(0.2922897,318.523)"> + <path + sodipodi:type="arc" + style="fill:#ffffff;fill-opacity:1;stroke:#8dc03d;stroke-width:4.26015567999999956;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + id="path5233" + sodipodi:cx="110" + sodipodi:cy="98.076469" + sodipodi:rx="44.285713" + sodipodi:ry="57.142857" + d="m 154.28571,98.076469 a 44.285713,57.142857 0 1 1 -88.571423,0 44.285713,57.142857 0 1 1 88.571423,0 z" + transform="matrix(0.34661363,0,0,0.26862556,81.181191,9.9219258)" /> + </g> + </g> + </g> +</svg> diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/woman.svg b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/woman.svg new file mode 100644 index 0000000000..c55b2641a9 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/assets/woman.svg @@ -0,0 +1,656 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="255.11809" + height="255.11812" + id="svg6897" + version="1.1" + inkscape:version="0.48.5 r10040" + sodipodi:docname="woman.svg"> + <defs + id="defs3"> + <linearGradient + id="linearGradient19633"> + <stop + id="stop19635" + offset="0" + style="stop-color:#f2d8bc;stop-opacity:1;" /> + <stop + style="stop-color:#f2d9bc;stop-opacity:1;" + offset="0.46557674" + id="stop19639" /> + <stop + id="stop19637" + offset="1" + style="stop-color:#ebc599;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient15560"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564" /> + </linearGradient> + <linearGradient + id="linearGradient15560-6"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562-8" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564-7" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6" + id="radialGradient15574-0" + cx="172.14285" + cy="126.64789" + fx="172.14285" + fy="126.64789" + r="127.55905" + gradientTransform="matrix(1,0,0,1.0001349,0,-0.01708751)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + id="linearGradient19560"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop19562" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop19564" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633" + id="linearGradient19660" + gradientUnits="userSpaceOnUse" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6" + id="radialGradient19662" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560" + id="radialGradient19664" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.0001349,0,-0.01708751)" + cx="172.14285" + cy="126.64789" + fx="172.14285" + fy="126.64789" + r="127.55905" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560" + id="radialGradient19666" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="171.22086" + cy="85.898735" + fx="171.22086" + fy="85.898735" + r="49.222404" /> + <linearGradient + id="linearGradient19633-1"> + <stop + id="stop19635-0" + offset="0" + style="stop-color:#f2d8bc;stop-opacity:1;" /> + <stop + style="stop-color:#f2d9bc;stop-opacity:1;" + offset="0.46557674" + id="stop19639-6" /> + <stop + id="stop19637-3" + offset="1" + style="stop-color:#ebc599;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient15560-6-0"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562-8-4" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564-7-4" /> + </linearGradient> + <linearGradient + id="linearGradient15560-8"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562-81" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564-6" /> + </linearGradient> + <linearGradient + id="linearGradient19692"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop19694" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop19696" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-8-6" + id="radialGradient19664-7-1" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.0001349,0,-0.01708751)" + cx="172.14285" + cy="126.64789" + fx="172.14285" + fy="126.64789" + r="127.55905" /> + <linearGradient + id="linearGradient15560-8-6"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562-81-4" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564-6-7" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-8-6" + id="radialGradient19666-0-0" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="171.22086" + cy="85.898735" + fx="171.22086" + fy="85.898735" + r="49.222404" /> + <linearGradient + id="linearGradient19797"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop19799" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop19801" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633-8" + id="linearGradient19660-5" + gradientUnits="userSpaceOnUse" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <linearGradient + id="linearGradient19633-8"> + <stop + id="stop19635-7" + offset="0" + style="stop-color:#f2d8bc;stop-opacity:1;" /> + <stop + style="stop-color:#f2d9bc;stop-opacity:1;" + offset="0.46557674" + id="stop19639-9" /> + <stop + id="stop19637-8" + offset="1" + style="stop-color:#ebc599;stop-opacity:1;" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6-7" + id="radialGradient19662-8" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <linearGradient + id="linearGradient15560-6-7"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562-8-9" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564-7-5" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633" + id="linearGradient19967" + gradientUnits="userSpaceOnUse" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6" + id="radialGradient19969" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-8-6" + id="radialGradient19971" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.0001349,0,-0.01708751)" + cx="172.14285" + cy="126.64789" + fx="172.14285" + fy="126.64789" + r="127.55905" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-8-6" + id="radialGradient19973" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="171.22086" + cy="85.898735" + fx="171.22086" + fy="85.898735" + r="49.222404" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633" + id="linearGradient19975" + gradientUnits="userSpaceOnUse" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" + gradientTransform="translate(0,-0.37711)" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6" + id="radialGradient19977" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633-0" + id="linearGradient19975-0" + gradientUnits="userSpaceOnUse" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <linearGradient + id="linearGradient19633-0"> + <stop + id="stop19635-77" + offset="0" + style="stop-color:#f2d8bc;stop-opacity:1;" /> + <stop + style="stop-color:#f2d9bc;stop-opacity:1;" + offset="0.46557674" + id="stop19639-64" /> + <stop + id="stop19637-6" + offset="1" + style="stop-color:#ebc599;stop-opacity:1;" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6-4" + id="radialGradient19977-7" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <linearGradient + id="linearGradient15560-6-4"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562-8-47" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564-7-6" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633" + id="linearGradient20057" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(0,-0.37711)" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6" + id="radialGradient20059" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <linearGradient + id="linearGradient15560-8-6-1"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562-81-4-7" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564-6-7-3" /> + </linearGradient> + <linearGradient + id="linearGradient3106"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop3108" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop3110" /> + </linearGradient> + <linearGradient + id="linearGradient19633-05"> + <stop + id="stop19635-3" + offset="0" + style="stop-color:#f2d8bc;stop-opacity:1;" /> + <stop + style="stop-color:#f2d9bc;stop-opacity:1;" + offset="0.46557674" + id="stop19639-0" /> + <stop + id="stop19637-0" + offset="1" + style="stop-color:#ebc599;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient15560-6-04"> + <stop + style="stop-color:#f7e7d6;stop-opacity:1;" + offset="0" + id="stop15562-8-6" /> + <stop + style="stop-color:#ebc599;stop-opacity:1;" + offset="1" + id="stop15564-7-9" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633-05" + id="linearGradient4020" + gradientUnits="userSpaceOnUse" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6-04" + id="radialGradient4022" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-8-6-1" + id="radialGradient4024" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.0001349,0,-0.01708751)" + cx="172.14285" + cy="126.64789" + fx="172.14285" + fy="126.64789" + r="127.55905" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-8-6-1" + id="radialGradient4026" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="171.22086" + cy="85.898735" + fx="171.22086" + fy="85.898735" + r="49.222404" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633-0" + id="linearGradient4028" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(0,-0.37711)" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6-4" + id="radialGradient4030" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633-05" + id="linearGradient4082" + gradientUnits="userSpaceOnUse" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6-04" + id="radialGradient4084" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-8-6-1" + id="radialGradient4086" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.0001349,0,-0.01708751)" + cx="172.14285" + cy="126.64789" + fx="172.14285" + fy="126.64789" + r="127.55905" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-8-6-1" + id="radialGradient4088" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="171.22086" + cy="85.898735" + fx="171.22086" + fy="85.898735" + r="49.222404" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient19633-0" + id="linearGradient4090" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(0,-0.37711)" + x1="490.2981" + y1="170.93362" + x2="491.84476" + y2="30.933622" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15560-6-4" + id="radialGradient4092" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.3950525,0,-33.934512)" + cx="151.22086" + cy="82.096695" + fx="151.22086" + fy="82.096695" + r="49.222404" /> + </defs> + <sodipodi:namedview + inkscape:document-units="mm" + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.24748738" + inkscape:cx="-681.7745" + inkscape:cy="-300.22866" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1574" + inkscape:window-height="1008" + inkscape:window-x="19" + inkscape:window-y="75" + inkscape:window-maximized="0" + units="mm" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" /> + <metadata + id="metadata4"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-72.440952,-46.324275)"> + <g + id="g19643-7-4" + transform="matrix(1,0,0,0.96450955,27.857144,56.240766)" + inkscape:export-filename="/Volumes/partage/private/marketing/Design/Produits/Sirius/png/woman_32.png" + inkscape:export-xdpi="11.288889" + inkscape:export-ydpi="11.288889"> + <path + sodipodi:nodetypes="csccccsccccscsccsc" + inkscape:connector-curvature="0" + d="m 244.3317,181.53891 c -33.4352,-12.1813 -44.12152,-22.51434 -44.12152,-44.52471 0,-13.1894 10.19902,-8.90494 14.67658,-33.09948 1.8733,-9.997069 10.8876,-0.16818 12.61788,-23.102435 0,-9.07299 -4.93971,-11.341214 -4.93971,-11.341214 0,0 2.52879,-13.525442 3.5034,-23.942545 1.1931,-13.021361 -7.48529,-46.45688888 -53.92547,-46.45688888 -46.43139,0 -55.14332,33.43552788 -53.92505,46.45688888 0.97417,10.417103 3.50296,23.942545 3.50296,23.942545 0,0 -4.93973,2.268224 -4.93973,11.341214 1.73075,22.934385 10.74503,13.105366 12.61833,23.102435 4.47756,24.19454 14.68452,19.91008 14.68452,33.09948 0,22.01037 -10.69426,32.34341 -44.129922,44.52471 -33.56983,12.26528 -55.37016,24.69861 -55.37016,33.18353 0,8.48484 0,39.50171 0,39.50171 l 255.118092,0 c 0,0 0,-31.01687 0,-39.50171 0,-8.48492 -21.80035,-20.91825 -55.3702,-33.18353" + style="fill:url(#radialGradient19664-7-1);fill-opacity:1;fill-rule:nonzero;stroke:none" + id="path8747-8-0-8" /> + <path + sodipodi:nodetypes="cssccssccccc" + inkscape:connector-curvature="0" + d="m 244.3317,181.5389 c 33.56985,12.26529 55.3702,24.69862 55.3702,33.18354 0,4.24242 0,2.02364 0,10.74424 0,8.72061 -20,28.38062 -20,28.38062 l -215.118092,0 c 0,0 -20,-19.66001 -20,-28.38062 0,-8.7206 0,-6.50182 0,-10.74424 0,-8.48492 21.80033,-20.91825 55.37017,-33.18354 l 54.125912,11.66324 13.54328,42.64516 9.03937,-0.1542 13.54325,-42.49096" + style="fill:#cf118a;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="path8747-2-4-7" /> + <path + transform="matrix(1,0,0,1.0773453,-0.50507627,-19.919998)" + d="m 219.2031,85.898735 c 0,37.239275 -21.48238,67.427685 -47.98224,67.427685 -26.49987,0 -47.98225,-30.18841 -47.98225,-67.427685 0,-37.23928 21.48238,-67.427681 47.98225,-67.427681 26.49986,0 47.98224,30.188401 47.98224,67.427681 z" + sodipodi:ry="67.427681" + sodipodi:rx="47.982246" + sodipodi:cy="85.898735" + sodipodi:cx="171.22086" + id="path15558-4-5" + style="fill:url(#radialGradient19666-0-0);fill-opacity:1;stroke:#e6b57e;stroke-width:2.48031497;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="arc" /> + <path + sodipodi:nodetypes="ccssscccccccc" + inkscape:connector-curvature="0" + id="path15556-5-4" + d="m 146.22702,136.27638 c 4.39007,20.43373 -32.31132,49.76818 -46.233493,33.72347 17.652453,-5.96556 28.866283,-34.62337 22.243603,-25.23444 -3.97589,5.6366 -24.168914,23.13372 -19.12935,13.5085 10.13551,-19.35813 14.01626,-50.06876 8.74431,-75.856506 -3.65184,-17.863028 -6.42727,-67.342708 24.01342,-84.1494025 47.76132,-22.7874615 88.90171,2.20015811 94.19329,48.6457695 2.07368,83.068069 -17.38327,88.572649 6.05927,124.782889 -17.28308,5.20692 -41.12899,-7.1673 -35.812,-38.22667 5.75735,-16.49554 6.85668,-15.07625 8.02973,-39.170423 -11.4533,-35.688339 -58.70475,-17.853611 -66.84809,-81.18674 -0.49637,12.305788 -2.51072,26.510542 -15.29986,46.49276 -2.69779,46.692763 7.77251,66.295743 20.03917,76.670793 z" + style="fill:#493225;fill-opacity:1;stroke:none" /> + </g> + <g + inkscape:export-ydpi="5.6444445" + inkscape:export-xdpi="5.6444445" + inkscape:export-filename="/Volumes/partage/private/marketing/Design/Produits/Sirius/png/man_16.png" + transform="matrix(0.78977954,0,0,0.76291812,-43.100336,434.7796)" + id="g19918"> + <g + inkscape:export-ydpi="11.28878" + inkscape:export-xdpi="11.28878" + inkscape:export-filename="/Volumes/partage/private/marketing/Design/Produits/Sirius/png/man_32.png" + id="g19920"> + <g + id="g19936" /> + </g> + </g> + </g> +</svg> diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/bundle.js b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/bundle.js new file mode 100644 index 0000000000..79fcc7bace --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/bundle.js @@ -0,0 +1,19026 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 310); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var keys = __webpack_require__(5); +exports.METADATA_KEY = keys; +var container_1 = __webpack_require__(223); +exports.Container = container_1.Container; +var literal_types_1 = __webpack_require__(21); +exports.BindingScopeEnum = literal_types_1.BindingScopeEnum; +exports.BindingTypeEnum = literal_types_1.BindingTypeEnum; +exports.TargetTypeEnum = literal_types_1.TargetTypeEnum; +var container_module_1 = __webpack_require__(224); +exports.ContainerModule = container_module_1.ContainerModule; +var injectable_1 = __webpack_require__(213); +exports.injectable = injectable_1.injectable; +var tagged_1 = __webpack_require__(218); +exports.tagged = tagged_1.tagged; +var named_1 = __webpack_require__(215); +exports.named = named_1.named; +var inject_1 = __webpack_require__(122); +exports.inject = inject_1.inject; +exports.LazyServiceIdentifer = inject_1.LazyServiceIdentifer; +var optional_1 = __webpack_require__(216); +exports.optional = optional_1.optional; +var unmanaged_1 = __webpack_require__(220); +exports.unmanaged = unmanaged_1.unmanaged; +var multi_inject_1 = __webpack_require__(214); +exports.multiInject = multi_inject_1.multiInject; +var target_name_1 = __webpack_require__(219); +exports.targetName = target_name_1.targetName; +var post_construct_1 = __webpack_require__(217); +exports.postConstruct = post_construct_1.postConstruct; +var metadata_reader_1 = __webpack_require__(123); +exports.MetadataReader = metadata_reader_1.MetadataReader; +var guid_1 = __webpack_require__(34); +exports.guid = guid_1.guid; +var decorator_utils_1 = __webpack_require__(29); +exports.decorate = decorator_utils_1.decorate; +var constraint_helpers_1 = __webpack_require__(126); +exports.traverseAncerstors = constraint_helpers_1.traverseAncerstors; +exports.taggedConstraint = constraint_helpers_1.taggedConstraint; +exports.namedConstraint = constraint_helpers_1.namedConstraint; +exports.typeConstraint = constraint_helpers_1.typeConstraint; +var serialization_1 = __webpack_require__(47); +exports.getServiceIdentifierAsString = serialization_1.getServiceIdentifierAsString; +var binding_utils_1 = __webpack_require__(238); +exports.multiBindToService = binding_utils_1.multiBindToService; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TYPES = { + IActionDispatcher: Symbol('IActionDispatcher'), + IActionDispatcherProvider: Symbol('IActionDispatcherProvider'), + IActionHandlerInitializer: Symbol('IActionHandlerInitializer'), + ActionHandlerRegistry: Symbol('ActionHandlerRegistry'), + AnimationFrameSyncer: Symbol('AnimationFrameSyncer'), + CommandStackOptions: Symbol('CommandStackOptions'), + IButtonHandler: Symbol('IButtonHandler'), + ICommand: Symbol('ICommand'), + ICommandStack: Symbol('ICommandStack'), + ICommandStackProvider: Symbol('ICommandStackProvider'), + DOMHelper: Symbol('DOMHelper'), + HiddenVNodeDecorator: Symbol('HiddenVNodeDecorator'), + HoverState: Symbol('HoverState'), + KeyListener: Symbol('KeyListener'), + Layouter: Symbol('Layouter'), + LayoutRegistry: Symbol('LayoutRegistry'), + ILogger: Symbol('ILogger'), + LogLevel: Symbol('LogLevel'), + IModelFactory: Symbol('IModelFactory'), + ModelRendererFactory: Symbol('ModelRendererFactory'), + ModelSource: Symbol('ModelSource'), + ModelSourceProvider: Symbol('ModelSourceProvider'), + MouseListener: Symbol('MouseListener'), + PopupModelFactory: Symbol('PopupModelFactory'), + PopupMouseListener: Symbol('PopupMouseListener'), + PopupVNodeDecorator: Symbol('PopupVNodeDecorator'), + SModelStorage: Symbol('SModelStorage'), + StateAwareModelProvider: Symbol('StateAwareModelProvider'), + SvgExporter: Symbol('SvgExporter'), + IViewer: Symbol('IViewer'), + ViewerOptions: Symbol('ViewerOptions'), + IViewerProvider: Symbol('IViewerProvider'), + ViewRegistry: Symbol('ViewRegistry'), + IVNodeDecorator: Symbol('IVNodeDecorator') +}; +//# sourceMappingURL=types.js.map + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var geometry_1 = __webpack_require__(3); +/** + * Base class for all elements of the diagram model. + * Each model element must have a unique ID and a type that is used to look up its view. + */ +var SModelElement = /** @class */ (function () { + function SModelElement() { + } + Object.defineProperty(SModelElement.prototype, "root", { + get: function () { + var current = this; + while (current) { + if (current instanceof SModelRoot) + return current; + else if (current instanceof SChildElement) + current = current.parent; + else + current = undefined; + } + throw new Error("Element has no root"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SModelElement.prototype, "index", { + get: function () { + return this.root.index; + }, + enumerable: true, + configurable: true + }); + /** + * A feature is a symbol identifying some functionality that can be enabled or disabled for + * a model element. The base implementation always returns false, so it disables all features. + */ + SModelElement.prototype.hasFeature = function (feature) { + return false; + }; + return SModelElement; +}()); +exports.SModelElement = SModelElement; +/** + * A parent element may contain child elements, thus the diagram model forms a tree. + */ +var SParentElement = /** @class */ (function (_super) { + __extends(SParentElement, _super); + function SParentElement() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.children = []; + return _this; + } + SParentElement.prototype.add = function (child, i) { + if (i === undefined) { + this.children.push(child); + } + else { + if (i < 0 || i > this.children.length) { + throw "Child index out of bounds " + i + " (0.." + this.children.length + ")"; + } + this.children.splice(i, 0, child); + } + child.parent = this; + this.index.add(child); + }; + SParentElement.prototype.remove = function (child) { + var i = this.children.indexOf(child); + if (i < 0) { + throw "No such child " + child; + } + this.children.splice(i, 1); + delete child.parent; + this.index.remove(child); + }; + SParentElement.prototype.move = function (child, newIndex) { + var i = this.children.indexOf(child); + if (i === -1) { + throw "No such child " + child; + } + else { + if (newIndex < 0 || newIndex > this.children.length - 1) { + throw "Child index out of bounds " + i + " (0.." + this.children.length + ")"; + } + this.children.splice(i, 1); + this.children.splice(newIndex, 0, child); + } + }; + /** + * Transform the given bounds from the local coordinate system of this element to the coordinate + * system of its parent. This function should consider any transformation that is applied to the + * view of this element and its contents. + * The base implementation assumes that this element does not define a local coordinate system, + * so it leaves the bounds unchanged. + */ + SParentElement.prototype.localToParent = function (point) { + return geometry_1.isBounds(point) ? point : { x: point.x, y: point.y, width: -1, height: -1 }; + }; + /** + * Transform the given bounds from the coordinate system of this element's parent to its local + * coordinate system. This function should consider any transformation that is applied to the + * view of this element and its contents. + * The base implementation assumes that this element does not define a local coordinate system, + * so it leaves the bounds unchanged. + */ + SParentElement.prototype.parentToLocal = function (point) { + return geometry_1.isBounds(point) ? point : { x: point.x, y: point.y, width: -1, height: -1 }; + }; + return SParentElement; +}(SModelElement)); +exports.SParentElement = SParentElement; +/** + * A child element is contained in a parent element. All elements except the model root are child + * elements. In order to keep the model class hierarchy simple, every child element is also a + * parent element, although for many elements the array of children is empty (i.e. they are + * leafs in the model element tree). + */ +var SChildElement = /** @class */ (function (_super) { + __extends(SChildElement, _super); + function SChildElement() { + return _super !== null && _super.apply(this, arguments) || this; + } + return SChildElement; +}(SParentElement)); +exports.SChildElement = SChildElement; +/** + * Base class for the root element of the diagram model tree. + */ +var SModelRoot = /** @class */ (function (_super) { + __extends(SModelRoot, _super); + function SModelRoot() { + var _this = _super.call(this) || this; + _this.canvasBounds = geometry_1.EMPTY_BOUNDS; + // Override the index property from SModelElement, which has a getter, with a data property + Object.defineProperty(_this, 'index', { + value: new SModelIndex(), + writable: false + }); + return _this; + } + return SModelRoot; +}(SParentElement)); +exports.SModelRoot = SModelRoot; +/** + * Used to speed up model element lookup by id. + */ +var SModelIndex = /** @class */ (function () { + function SModelIndex() { + this.id2element = new Map; + } + SModelIndex.prototype.add = function (element) { + if (this.contains(element)) { + throw new Error("Duplicate ID in model: " + element.id); + } + this.id2element.set(element.id, element); + if (element.children !== undefined && element.children.constructor === Array) { + for (var _i = 0, _a = element.children; _i < _a.length; _i++) { + var child = _a[_i]; + this.add(child); + } + } + }; + SModelIndex.prototype.remove = function (element) { + this.id2element.delete(element.id); + if (element.children !== undefined && element.children.constructor === Array) { + for (var _i = 0, _a = element.children; _i < _a.length; _i++) { + var child = _a[_i]; + this.remove(child); + } + } + }; + SModelIndex.prototype.contains = function (element) { + return this.id2element.get(element.id) !== undefined; + }; + SModelIndex.prototype.removeById = function (elementId) { + this.id2element.delete(elementId); + }; + SModelIndex.prototype.getById = function (id) { + return this.id2element.get(id); + }; + SModelIndex.prototype.all = function () { + var all = []; + this.id2element.forEach(function (element) { return all.push(element); }); + return all; + }; + return SModelIndex; +}()); +exports.SModelIndex = SModelIndex; +//# sourceMappingURL=smodel.js.map + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * (x,y) coordinates of the origin. + */ +exports.ORIGIN_POINT = Object.freeze({ + x: 0, + y: 0 +}); +/** + * A dimension with both width and height set to a negative value, which is considered as undefined. + */ +exports.EMPTY_DIMENSION = Object.freeze({ + width: -1, + height: -1 +}); +/** + * Checks whether the given dimention is valid, i.e. the width and height are non-zero. + * @param {Dimension} b - Dimension object + * @returns {boolean} + */ +function isValidDimension(d) { + return d.width >= 0 && d.height >= 0; +} +exports.isValidDimension = isValidDimension; +exports.EMPTY_BOUNDS = Object.freeze({ + x: 0, + y: 0, + width: -1, + height: -1 +}); +function isBounds(element) { + return 'x' in element + && 'y' in element + && 'width' in element + && 'height' in element; +} +exports.isBounds = isBounds; +/** + * Combines the bounds of two objects into one, so that the new bounds + * are the minimum bounds that covers both of the original bounds. + * @param {Bounds} b0 - First bounds object + * @param {Bounds} b1 - Second bounds object + * @returns {Bounds} The combined bounds + */ +function combine(b0, b1) { + var minX = Math.min(b0.x, b1.x); + var minY = Math.min(b0.y, b1.y); + var maxX = Math.max(b0.x + (b0.width >= 0 ? b0.width : 0), b1.x + (b1.width >= 0 ? b1.width : 0)); + var maxY = Math.max(b0.y + (b0.height >= 0 ? b0.height : 0), b1.y + (b1.height >= 0 ? b1.height : 0)); + return { + x: minX, y: minY, width: maxX - minX, height: maxY - minY + }; +} +exports.combine = combine; +/** + * Translates the given bounds. + * @param {Bounds} b - Bounds object + * @param {Point} p - Vector by which to translate the bounds + * @returns {Bounds} The translated bounds + */ +function translate(b, p) { + return { + x: b.x + p.x, + y: b.y + p.y, + width: b.width, + height: b.height + }; +} +exports.translate = translate; +/** + * Returns the center point of the bounds of an object + * @param {Bounds} b - Bounds object + * @returns {Point} the center point + */ +function center(b) { + return { + x: b.x + (b.width >= 0 ? 0.5 * b.width : 0), + y: b.y + (b.height >= 0 ? 0.5 * b.height : 0) + }; +} +exports.center = center; +/** + * Checks whether the point p is included in the bounds b. + */ +function includes(b, p) { + return p.x >= b.x && p.x <= b.x + b.width && p.y >= b.y && p.y <= b.y + b.height; +} +exports.includes = includes; +/** + * Enumeration of possible directions (left, right, up, down) + */ +var Direction; +(function (Direction) { + Direction[Direction["left"] = 0] = "left"; + Direction[Direction["right"] = 1] = "right"; + Direction[Direction["up"] = 2] = "up"; + Direction[Direction["down"] = 3] = "down"; +})(Direction = exports.Direction || (exports.Direction = {})); +/** + * Returns the "straight line" distance between two points + * @param {Point} a - First point + * @param {Point} b - Second point + * @returns {number} The eucledian distance + */ +function euclideanDistance(a, b) { + var dx = b.x - a.x; + var dy = b.y - a.y; + return Math.sqrt(dx * dx + dy * dy); +} +exports.euclideanDistance = euclideanDistance; +/** + * Returns the distance between two points in a grid, using a + * strictly vertical and/or horizontal path (versus straight line) + * @param {Point} a - First point + * @param {Point} b - Second point + * @returns {number} The manhattan distance + */ +function manhattanDistance(a, b) { + return Math.abs(b.x - a.x) + Math.abs(b.y - a.y); +} +exports.manhattanDistance = manhattanDistance; +/** + * Returns the distance between two points in a grid, using a + * strictly vertical and/or horizontal path (versus straight line) + * @param {Point} a - First point + * @param {Point} b - Second point + * @returns {number} The manhattan distance + */ +function maxDistance(a, b) { + return Math.max(Math.abs(b.x - a.x), Math.abs(b.y - a.y)); +} +exports.maxDistance = maxDistance; +// range (-PI, PI] +function angle(a, b) { + return Math.atan2(b.y - a.y, b.x - a.x); +} +exports.angle = angle; +/** + * Converts from radians to degrees + * @param {number} a - A value in radians + * @returns {number} The converted value + */ +function toDegrees(a) { + return a * 180 / Math.PI; +} +exports.toDegrees = toDegrees; +/** + * Converts from degrees to radians + * @param {number} a - A value in degrees + * @returns {number} The converted value + */ +function toRadians(a) { + return a * Math.PI / 180; +} +exports.toRadians = toRadians; +/** + * Returns whether two numbers are almost equal, within a small margin (0.001) + * @param {number} a - First number + * @param {number} b - Second number + * @returns {boolean} True if the two numbers are almost equal + */ +function almostEquals(a, b) { + return Math.abs(a - b) < 1e-3; +} +exports.almostEquals = almostEquals; +//# sourceMappingURL=geometry.js.map + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(78)('wks'); +var uid = __webpack_require__(46); +var Symbol = __webpack_require__(6).Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NAMED_TAG = "named"; +exports.NAME_TAG = "name"; +exports.UNMANAGED_TAG = "unmanaged"; +exports.OPTIONAL_TAG = "optional"; +exports.INJECT_TAG = "inject"; +exports.MULTI_INJECT_TAG = "multi_inject"; +exports.TAGGED = "inversify:tagged"; +exports.TAGGED_PROP = "inversify:tagged_props"; +exports.PARAM_TYPES = "inversify:paramtypes"; +exports.DESIGN_PARAM_TYPES = "design:paramtypes"; +exports.POST_CONSTRUCT = "post_construct"; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var SVGNS = 'http://www.w3.org/2000/svg'; +var modulesNS = ['hook', 'on', 'style', 'class', 'props', 'attrs', 'dataset']; +var slice = Array.prototype.slice; + +function isPrimitive(val) { + return typeof val === 'string' || + typeof val === 'number' || + typeof val === 'boolean' || + typeof val === 'symbol' || + val === null || + val === undefined; +} + +function normalizeAttrs(attrs, nsURI, defNS, modules) { + var map = { ns: nsURI }; + for (var i = 0, len = modules.length; i < len; i++) { + var mod = modules[i]; + if(attrs[mod]) + map[mod] = attrs[mod]; + } + for(var key in attrs) { + if(key !== 'key' && key !== 'classNames' && key !== 'selector') { + var idx = key.indexOf('-'); + if(idx > 0) + addAttr(key.slice(0, idx), key.slice(idx+1), attrs[key]); + else if(!map[key]) + addAttr(defNS, key, attrs[key]); + } + } + return map; + + function addAttr(namespace, key, val) { + var ns = map[namespace] || (map[namespace] = {}); + ns[key] = val; + } +} + +function buildFromStringTag(nsURI, defNS, modules, tag, attrs, children) { + + if(attrs.selector) { + tag = tag + attrs.selector; + } + if(attrs.classNames) { + var cns = attrs.classNames; + tag = tag + '.' + ( + Array.isArray(cns) ? cns.join('.') : cns.replace(/\s+/g, '.') + ); + } + + return { + sel : tag, + data : normalizeAttrs(attrs, nsURI, defNS, modules), + children : children.map( function(c) { + return isPrimitive(c) ? {text: c} : c; + }), + key: attrs.key + }; +} + +function buildFromComponent(nsURI, defNS, modules, tag, attrs, children) { + var res; + if(typeof tag === 'function') + res = tag(attrs, children); + else if(tag && typeof tag.view === 'function') + res = tag.view(attrs, children); + else if(tag && typeof tag.render === 'function') + res = tag.render(attrs, children); + else + throw "JSX tag must be either a string, a function or an object with 'view' or 'render' methods"; + res.key = attrs.key; + return res; +} + +function flatten(nested, start, flat) { + for (var i = start, len = nested.length; i < len; i++) { + var item = nested[i]; + if (Array.isArray(item)) { + flatten(item, 0, flat); + } else { + flat.push(item); + } + } +} + +function maybeFlatten(array) { + if (array) { + for (var i = 0, len = array.length; i < len; i++) { + if (Array.isArray(array[i])) { + var flat = array.slice(0, i); + flatten(array, i, flat); + array = flat; + break; + } + } + } + return array; +} + +function buildVnode(nsURI, defNS, modules, tag, attrs, children) { + attrs = attrs || {}; + children = maybeFlatten(children); + if(typeof tag === 'string') { + return buildFromStringTag(nsURI, defNS, modules, tag, attrs, children) + } else { + return buildFromComponent(nsURI, defNS, modules, tag, attrs, children) + } +} + +function JSX(nsURI, defNS, modules) { + return function jsxWithCustomNS(tag, attrs, children) { + if(arguments.length > 3 || !Array.isArray(children)) + children = slice.call(arguments, 2); + return buildVnode(nsURI, defNS || 'props', modules || modulesNS, tag, attrs, children); + }; +} + +module.exports = { + html: JSX(undefined), + svg: JSX(SVGNS, 'attrs'), + JSX: JSX +}; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +/** + * Base class for all commands. + */ +var Command = /** @class */ (function () { + function Command() { + } + return Command; +}()); +exports.Command = Command; +/** + * A mergeable command can accumulate subsequent commands of the same kind. + * + * For example, multiple subsequent move commands can be merged to yield a + * single command, such that undo will roll them back altogether. Otherwise + * the user would have to push CTRL-Z for each mouse move element that + * resuted in a command. + */ +var MergeableCommand = /** @class */ (function (_super) { + __extends(MergeableCommand, _super); + function MergeableCommand() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Tries to merge the given command with this. + * + * @param command + * @param context + */ + MergeableCommand.prototype.merge = function (command, context) { + return false; + }; + return MergeableCommand; +}(Command)); +exports.MergeableCommand = MergeableCommand; +/** + * A hidden command is used to trigger the rendering of a model on a + * hidden canvas. + * + * Some graphical elements are styled using CSS, others have bounds that + * require to layout their children before being computed. In such cases + * we cannot tell about the size of elements without acutally rendering + * the DOM. We render them to an invisible canvas. This can be achieved + * using hidden commands. + * + * Hidden commands do not change the model directly, and are as such + * neither undoable nor redoable. The command stack does not push them on + * any stack and forwards the resulting model to the invisible viewer. + */ +var HiddenCommand = /** @class */ (function (_super) { + __extends(HiddenCommand, _super); + function HiddenCommand() { + return _super !== null && _super.apply(this, arguments) || this; + } + HiddenCommand.prototype.undo = function (context) { + context.logger.error(this, 'Cannot undo a hidden command'); + return context.root; + }; + HiddenCommand.prototype.redo = function (context) { + context.logger.error(this, 'Cannot redo a hidden command'); + return context.root; + }; + return HiddenCommand; +}(Command)); +exports.HiddenCommand = HiddenCommand; +var PopupCommand = /** @class */ (function (_super) { + __extends(PopupCommand, _super); + function PopupCommand() { + return _super !== null && _super.apply(this, arguments) || this; + } + return PopupCommand; +}(Command)); +exports.PopupCommand = PopupCommand; +/** + * A system command is triggered by the system, e.g. in order to update bounds + * in the model with data fetched from the DOM. + * + * As it is automatically triggered it should not count as a single command in + * undo/redo operations. Into the bargain, such an automatic command could occur + * after an undo and as such make the next redo command invalid because it is + * based on a model state that has changed. The command stack handles system + * commands in a special way to overcome these issues. + */ +var SystemCommand = /** @class */ (function (_super) { + __extends(SystemCommand, _super); + function SystemCommand() { + return _super !== null && _super.apply(this, arguments) || this; + } + return SystemCommand; +}(Command)); +exports.SystemCommand = SystemCommand; +var CommandActionHandler = /** @class */ (function () { + function CommandActionHandler(commandType) { + this.commandType = commandType; + } + CommandActionHandler.prototype.handle = function (action) { + return new this.commandType(action); + }; + return CommandActionHandler; +}()); +exports.CommandActionHandler = CommandActionHandler; +var CommandActionHandlerInitializer = /** @class */ (function () { + function CommandActionHandlerInitializer(commandCtrs) { + this.commandCtrs = commandCtrs; + } + CommandActionHandlerInitializer.prototype.initialize = function (registry) { + this.commandCtrs.forEach(function (commandCtr) { return registry.registerCommand(commandCtr); }); + }; + CommandActionHandlerInitializer = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.multiInject(types_1.TYPES.ICommand)), __param(0, inversify_1.optional()), + __metadata("design:paramtypes", [Array]) + ], CommandActionHandlerInitializer); + return CommandActionHandlerInitializer; +}()); +exports.CommandActionHandlerInitializer = CommandActionHandlerInitializer; +//# sourceMappingURL=command.js.map + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var geometry_1 = __webpack_require__(3); +var smodel_1 = __webpack_require__(2); +var smodel_utils_1 = __webpack_require__(13); +exports.boundsFeature = Symbol('boundsFeature'); +exports.layoutContainerFeature = Symbol('layoutContainerFeature'); +exports.layoutableChildFeature = Symbol('layoutableChildFeature'); +exports.alignFeature = Symbol('alignFeature'); +function isBoundsAware(element) { + return 'bounds' in element; +} +exports.isBoundsAware = isBoundsAware; +function isLayoutContainer(element) { + return 'layout' in element + && isBoundsAware(element) + && element.hasFeature(exports.layoutContainerFeature); +} +exports.isLayoutContainer = isLayoutContainer; +function isLayoutableChild(element) { + return isBoundsAware(element) + && element.hasFeature(exports.layoutableChildFeature); +} +exports.isLayoutableChild = isLayoutableChild; +function isSizeable(element) { + return element.hasFeature(exports.boundsFeature) && isBoundsAware(element); +} +exports.isSizeable = isSizeable; +function isAlignable(element) { + return 'alignment' in element + && element.hasFeature(exports.alignFeature); +} +exports.isAlignable = isAlignable; +function getAbsoluteBounds(element) { + var boundsAware = smodel_utils_1.findParentByFeature(element, isBoundsAware); + if (boundsAware !== undefined) { + var bounds = boundsAware.bounds; + var current = boundsAware; + while (current instanceof smodel_1.SChildElement) { + var parent_1 = current.parent; + bounds = parent_1.localToParent(bounds); + current = parent_1; + } + return bounds; + } + else { + return geometry_1.EMPTY_BOUNDS; + } +} +exports.getAbsoluteBounds = getAbsoluteBounds; +/** + * Abstract class for elements with a position and a size. + */ +var SShapeElement = /** @class */ (function (_super) { + __extends(SShapeElement, _super); + function SShapeElement() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.position = geometry_1.ORIGIN_POINT; + _this.size = geometry_1.EMPTY_DIMENSION; + return _this; + } + Object.defineProperty(SShapeElement.prototype, "bounds", { + get: function () { + return { + x: this.position.x, + y: this.position.y, + width: this.size.width, + height: this.size.height + }; + }, + set: function (newBounds) { + this.position = { + x: newBounds.x, + y: newBounds.y + }; + this.size = { + width: newBounds.width, + height: newBounds.height + }; + }, + enumerable: true, + configurable: true + }); + SShapeElement.prototype.localToParent = function (point) { + var result = { + x: point.x + this.position.x, + y: point.y + this.position.y, + width: -1, + height: -1 + }; + if (geometry_1.isBounds(point)) { + result.width = point.width; + result.height = point.height; + } + return result; + }; + SShapeElement.prototype.parentToLocal = function (point) { + var result = { + x: point.x - this.position.x, + y: point.y - this.position.y, + width: -1, + height: -1 + }; + if (geometry_1.isBounds(point)) { + result.width = point.width; + result.height = point.height; + } + return result; + }; + return SShapeElement; +}(smodel_1.SChildElement)); +exports.SShapeElement = SShapeElement; +//# sourceMappingURL=model.js.map + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(6); +var core = __webpack_require__(20); +var hide = __webpack_require__(26); +var redefine = __webpack_require__(28); +var ctx = __webpack_require__(37); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var key, own, out, exp; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // extend global + if (target) redefine(target, key, out, type & $export.U); + // export + if (exports[key] != out) hide(exports, key, exp); + if (IS_PROTO && expProto[key] != out) expProto[key] = out; + } +}; +global.core = core; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(10); +var fails = __webpack_require__(24); +var defined = __webpack_require__(22); +var quot = /"/g; +// B.2.3.2.1 CreateHTML(string, tag, attribute, value) +var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)); + var p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + '</' + tag + '>'; +}; +module.exports = function (NAME, exec) { + var O = {}; + O[NAME] = exec(createHTML); + $export($export.P + $export.F * fails(function () { + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), 'String', O); +}; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DUPLICATED_INJECTABLE_DECORATOR = "Cannot apply @injectable decorator multiple times."; +exports.DUPLICATED_METADATA = "Metadata key was used more than once in a parameter:"; +exports.NULL_ARGUMENT = "NULL argument"; +exports.KEY_NOT_FOUND = "Key Not Found"; +exports.AMBIGUOUS_MATCH = "Ambiguous match found for serviceIdentifier:"; +exports.CANNOT_UNBIND = "Could not unbind serviceIdentifier:"; +exports.NOT_REGISTERED = "No matching bindings found for serviceIdentifier:"; +exports.MISSING_INJECTABLE_ANNOTATION = "Missing required @injectable annotation in:"; +exports.MISSING_INJECT_ANNOTATION = "Missing required @inject or @multiInject annotation in:"; +exports.UNDEFINED_INJECT_ANNOTATION = function (name) { + return "@inject called with undefined this could mean that the class " + name + " has " + + "a circular dependency problem. You can use a LazyServiceIdentifer to " + + "overcome this limitation."; +}; +exports.CIRCULAR_DEPENDENCY = "Circular dependency found:"; +exports.NOT_IMPLEMENTED = "Sorry, this feature is not fully implemented yet."; +exports.INVALID_BINDING_TYPE = "Invalid binding type:"; +exports.NO_MORE_SNAPSHOTS_AVAILABLE = "No snapshot available to restore."; +exports.INVALID_MIDDLEWARE_RETURN = "Invalid return type in middleware. Middleware must return!"; +exports.INVALID_FUNCTION_BINDING = "Value provided to function binding must be a function!"; +exports.INVALID_TO_SELF_VALUE = "The toSelf function can only be applied when a constructor is " + + "used as service identifier"; +exports.INVALID_DECORATOR_OPERATION = "The @inject @multiInject @tagged and @named decorators " + + "must be applied to the parameters of a class constructor or a class property."; +exports.ARGUMENTS_LENGTH_MISMATCH_1 = "The number of constructor arguments in the derived class "; +exports.ARGUMENTS_LENGTH_MISMATCH_2 = " must be >= than the number of constructor arguments of its base class."; +exports.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT = "Invalid Container constructor argument. Container options " + + "must be an object."; +exports.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE = "Invalid Container option. Default scope must " + + "be a string ('singleton' or 'transient')."; +exports.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE = "Invalid Container option. Auto bind injectable must " + + "be a boolean"; +exports.MULTIPLE_POST_CONSTRUCT_METHODS = "Cannot apply @postConstruct decorator multiple times in the same class"; +exports.POST_CONSTRUCT_ERROR = function () { + var values = []; + for (var _i = 0; _i < arguments.length; _i++) { + values[_i] = arguments[_i]; + } + return "@postConstruct error in class " + values[0] + ": " + values[1]; +}; +exports.CIRCULAR_DEPENDENCY_IN_FACTORY = function () { + var values = []; + for (var _i = 0; _i < arguments.length; _i++) { + values[_i] = arguments[_i]; + } + return "It looks like there is a circular dependency " + + ("in one of the '" + values[0] + "' bindings. Please investigate bindings with") + + ("service identifier '" + values[1] + "'."); +}; +exports.STACK_OVERFLOW = "Maximum call stack size exceeded"; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var smodel_1 = __webpack_require__(2); +/** + * Model element types can include a colon to separate the basic type and a sub-type. This function + * extracts the basic type of a model element. + */ +function getBasicType(schema) { + if (!schema.type) + return ''; + var colonIndex = schema.type.indexOf(':'); + if (colonIndex >= 0) + return schema.type.substring(0, colonIndex); + else + return schema.type; +} +exports.getBasicType = getBasicType; +/** + * Model element types can include a colon to separate the basic type and a sub-type. This function + * extracts the sub-type of a model element. + */ +function getSubType(schema) { + if (!schema.type) + return ''; + var colonIndex = schema.type.indexOf(':'); + if (colonIndex >= 0) + return schema.type.substring(colonIndex + 1); + else + return schema.type; +} +exports.getSubType = getSubType; +/** + * Find the element with the given identifier. If you need to find multiple elements, using an + * SModelIndex might be more effective. + */ +function findElement(parent, elementId) { + if (parent.id === elementId) + return parent; + if (parent.children !== undefined) { + for (var _i = 0, _a = parent.children; _i < _a.length; _i++) { + var child = _a[_i]; + var result = findElement(child, elementId); + if (result !== undefined) + return result; + } + } + return undefined; +} +exports.findElement = findElement; +/** + * Find a parent element that satisfies the given predicate. + */ +function findParent(element, predicate) { + var current = element; + while (current !== undefined) { + if (predicate(current)) + return current; + else if (current instanceof smodel_1.SChildElement) + current = current.parent; + else + current = undefined; + } + return current; +} +exports.findParent = findParent; +/** + * Find a parent element that implements the feature identified with the given predicate. + */ +function findParentByFeature(element, predicate) { + var current = element; + while (current !== undefined) { + if (predicate(current)) + return current; + else if (current instanceof smodel_1.SChildElement) + current = current.parent; + else + current = undefined; + } + return current; +} +exports.findParentByFeature = findParentByFeature; +/** + * Translate a point from the coordinate system of the source element to the coordinate system + * of the target element. + */ +function translatePoint(point, source, target) { + if (source !== target) { + // Translate from the source to the root element + while (source instanceof smodel_1.SChildElement) { + point = source.localToParent(point); + source = source.parent; + if (source === target) + return point; + } + // Translate from the root to the target element + var targetTrace = []; + while (target instanceof smodel_1.SChildElement) { + targetTrace.push(target); + target = target.parent; + } + if (source !== target) + throw new Error("Incompatible source and target: " + source.id + ", " + target.id); + for (var i = targetTrace.length - 1; i >= 0; i--) { + point = targetTrace[i].parentToLocal(point); + } + } + return point; +} +exports.translatePoint = translatePoint; +//# sourceMappingURL=smodel-utils.js.map + +/***/ }), +/* 14 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +// ------------------ Base ------------------ +__export(__webpack_require__(86)); +__export(__webpack_require__(85)); +__export(__webpack_require__(38)); +__export(__webpack_require__(48)); +__export(__webpack_require__(39)); +__export(__webpack_require__(129)); +__export(__webpack_require__(247)); +__export(__webpack_require__(130)); +__export(__webpack_require__(8)); +__export(__webpack_require__(60)); +__export(__webpack_require__(49)); +__export(__webpack_require__(17)); +__export(__webpack_require__(87)); +__export(__webpack_require__(13)); +__export(__webpack_require__(2)); +__export(__webpack_require__(35)); +__export(__webpack_require__(30)); +__export(__webpack_require__(131)); +__export(__webpack_require__(132)); +__export(__webpack_require__(133)); +__export(__webpack_require__(250)); +__export(__webpack_require__(134)); +__export(__webpack_require__(135)); +__export(__webpack_require__(18)); +__export(__webpack_require__(1)); +var di_config_1 = __webpack_require__(248); +exports.defaultModule = di_config_1.default; +// ------------------ Features ------------------ +__export(__webpack_require__(50)); +__export(__webpack_require__(90)); +__export(__webpack_require__(9)); +__export(__webpack_require__(138)); +__export(__webpack_require__(136)); +__export(__webpack_require__(137)); +__export(__webpack_require__(91)); +__export(__webpack_require__(92)); +__export(__webpack_require__(61)); +__export(__webpack_require__(93)); +__export(__webpack_require__(256)); +__export(__webpack_require__(139)); +__export(__webpack_require__(62)); +__export(__webpack_require__(40)); +__export(__webpack_require__(94)); +__export(__webpack_require__(51)); +__export(__webpack_require__(52)); +__export(__webpack_require__(63)); +__export(__webpack_require__(41)); +__export(__webpack_require__(64)); +__export(__webpack_require__(95)); +__export(__webpack_require__(140)); +__export(__webpack_require__(31)); +__export(__webpack_require__(141)); +__export(__webpack_require__(96)); +__export(__webpack_require__(97)); +__export(__webpack_require__(98)); +__export(__webpack_require__(99)); +__export(__webpack_require__(32)); +__export(__webpack_require__(142)); +__export(__webpack_require__(100)); +__export(__webpack_require__(42)); +__export(__webpack_require__(143)); +var di_config_2 = __webpack_require__(262); +exports.moveModule = di_config_2.default; +var di_config_3 = __webpack_require__(251); +exports.boundsModule = di_config_3.default; +var di_config_4 = __webpack_require__(258); +exports.fadeModule = di_config_4.default; +var di_config_5 = __webpack_require__(264); +exports.selectModule = di_config_5.default; +var di_config_6 = __webpack_require__(265); +exports.undoRedoModule = di_config_6.default; +var di_config_7 = __webpack_require__(266); +exports.viewportModule = di_config_7.default; +var di_config_8 = __webpack_require__(259); +exports.hoverModule = di_config_8.default; +var di_config_9 = __webpack_require__(257); +exports.exportModule = di_config_9.default; +var di_config_10 = __webpack_require__(255); +exports.expandModule = di_config_10.default; +var di_config_11 = __webpack_require__(263); +exports.openModule = di_config_11.default; +var di_config_12 = __webpack_require__(254); +exports.buttonModule = di_config_12.default; +// ------------------ Graph ------------------ +__export(__webpack_require__(267)); +__export(__webpack_require__(101)); +__export(__webpack_require__(144)); +// ------------------ Library ------------------ +__export(__webpack_require__(268)); +__export(__webpack_require__(269)); +__export(__webpack_require__(270)); +__export(__webpack_require__(271)); +// ------------------ Model Source ------------------ +__export(__webpack_require__(145)); +__export(__webpack_require__(146)); +__export(__webpack_require__(273)); +__export(__webpack_require__(274)); +__export(__webpack_require__(102)); +__export(__webpack_require__(275)); +var di_config_13 = __webpack_require__(272); +exports.modelSourceModule = di_config_13.default; +// ------------------ Utilities ------------------ +__export(__webpack_require__(276)); +__export(__webpack_require__(3)); +__export(__webpack_require__(103)); +__export(__webpack_require__(53)); +//# sourceMappingURL=index.js.map + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var METADATA_KEY = __webpack_require__(5); +var Metadata = (function () { + function Metadata(key, value) { + this.key = key; + this.value = value; + } + Metadata.prototype.toString = function () { + if (this.key === METADATA_KEY.NAMED_TAG) { + return "named: " + this.value.toString() + " "; + } + else { + return "tagged: { key:" + this.key.toString() + ", value: " + this.value + " }"; + } + }; + return Metadata; +}()); +exports.Metadata = Metadata; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var smodel_1 = __webpack_require__(2); +/** + * The default model factory creates SModelRoot for the root element and SChildElement for all other + * model elements. + */ +var SModelFactory = /** @class */ (function () { + function SModelFactory() { + } + SModelFactory.prototype.createElement = function (schema, parent) { + return this.initializeChild(new smodel_1.SChildElement(), schema, parent); + }; + SModelFactory.prototype.createRoot = function (schema) { + return this.initializeRoot(new smodel_1.SModelRoot(), schema); + }; + SModelFactory.prototype.createSchema = function (element) { + var _this = this; + var schema = {}; + for (var key in element) { + if (!this.isReserved(element, key)) { + var value = element[key]; + if (typeof value !== 'function') + schema[key] = value; + } + } + if (element instanceof smodel_1.SParentElement) + schema['children'] = element.children.map(function (child) { return _this.createSchema(child); }); + return schema; + }; + SModelFactory.prototype.initializeElement = function (element, schema) { + for (var key in schema) { + if (!this.isReserved(element, key)) { + var value = schema[key]; + if (typeof value !== 'function') + element[key] = value; + } + } + return element; + }; + SModelFactory.prototype.isReserved = function (element, propertyName) { + if (['children', 'parent', 'index'].indexOf(propertyName) >= 0) + return true; + var obj = element; + do { + var descriptor = Object.getOwnPropertyDescriptor(obj, propertyName); + if (descriptor !== undefined) + return descriptor.get !== undefined; + obj = Object.getPrototypeOf(obj); + } while (obj); + return false; + }; + SModelFactory.prototype.initializeParent = function (parent, schema) { + var _this = this; + this.initializeElement(parent, schema); + if (schema.children !== undefined && schema.children.constructor === Array) { + parent.children = schema.children.map(function (childSchema) { return _this.createElement(childSchema, parent); }); + } + return parent; + }; + SModelFactory.prototype.initializeChild = function (child, schema, parent) { + this.initializeParent(child, schema); + if (parent !== undefined) { + child.parent = parent; + } + return child; + }; + SModelFactory.prototype.initializeRoot = function (root, schema) { + this.initializeParent(root, schema); + root.index.add(root); + return root; + }; + SModelFactory = __decorate([ + inversify_1.injectable() + ], SModelFactory); + return SModelFactory; +}()); +exports.SModelFactory = SModelFactory; +exports.EMPTY_ROOT = Object.freeze({ + type: 'NONE', + id: 'EMPTY' +}); +//# sourceMappingURL=smodel-factory.js.map + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +function setAttr(vnode, name, value) { + getAttrs(vnode)[name] = value; +} +exports.setAttr = setAttr; +function setClass(vnode, name, value) { + getClass(vnode)[name] = value; +} +exports.setClass = setClass; +function copyClassesFromVNode(source, target) { + var classList = getClass(source); + for (var c in classList) { + setClass(target, c, true); + } +} +exports.copyClassesFromVNode = copyClassesFromVNode; +function copyClassesFromElement(element, target) { + var classList = element.classList; + for (var i = 0; i < classList.length; i++) { + setClass(target, classList.item(i), true); + } +} +exports.copyClassesFromElement = copyClassesFromElement; +function mergeStyle(vnode, style) { + getData(vnode).style = __assign({}, (getData(vnode).style || {}), style); +} +exports.mergeStyle = mergeStyle; +function on(vnode, event, listener, element) { + var on = getOn(vnode); + if (on[event]) { + throw new Error('EventListener for ' + event + ' already registered on VNode'); + } + on[event] = [listener, element]; +} +exports.on = on; +function getAttrs(vnode) { + var data = getData(vnode); + if (!data.attrs) + data.attrs = {}; + return data.attrs; +} +exports.getAttrs = getAttrs; +function getData(vnode) { + if (!vnode.data) + vnode.data = {}; + return vnode.data; +} +function getClass(vnode) { + var data = getData(vnode); + if (!data.class) + data.class = {}; + return data.class; +} +function getOn(vnode) { + var data = getData(vnode); + if (!data.on) + data.on = {}; + return data.on; +} +//# sourceMappingURL=vnode-utils.js.map + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(14); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.5.3' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var BindingScopeEnum = { + Request: "Request", + Singleton: "Singleton", + Transient: "Transient" +}; +exports.BindingScopeEnum = BindingScopeEnum; +var BindingTypeEnum = { + ConstantValue: "ConstantValue", + Constructor: "Constructor", + DynamicValue: "DynamicValue", + Factory: "Factory", + Function: "Function", + Instance: "Instance", + Invalid: "Invalid", + Provider: "Provider" +}; +exports.BindingTypeEnum = BindingTypeEnum; +var TargetTypeEnum = { + ClassProperty: "ClassProperty", + ConstructorArgument: "ConstructorArgument", + Variable: "Variable" +}; +exports.TargetTypeEnum = TargetTypeEnum; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(24)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 24 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(27); +var createDesc = __webpack_require__(58); +module.exports = __webpack_require__(23) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(19); +var IE8_DOM_DEFINE = __webpack_require__(105); +var toPrimitive = __webpack_require__(80); +var dP = Object.defineProperty; + +exports.f = __webpack_require__(23) ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(6); +var hide = __webpack_require__(26); +var has = __webpack_require__(25); +var SRC = __webpack_require__(46)('src'); +var TO_STRING = 'toString'; +var $toString = Function[TO_STRING]; +var TPL = ('' + $toString).split(TO_STRING); + +__webpack_require__(20).inspectSource = function (it) { + return $toString.call(it); +}; + +(module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) has(val, 'name') || hide(val, 'name', key); + if (O[key] === val) return; + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + if (O === global) { + O[key] = val; + } else if (!safe) { + delete O[key]; + hide(O, key, val); + } else if (O[key]) { + O[key] = val; + } else { + hide(O, key, val); + } +// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative +})(Function.prototype, TO_STRING, function toString() { + return typeof this == 'function' && this[SRC] || $toString.call(this); +}); + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var ERROR_MSGS = __webpack_require__(12); +var METADATA_KEY = __webpack_require__(5); +function tagParameter(annotationTarget, propertyName, parameterIndex, metadata) { + var metadataKey = METADATA_KEY.TAGGED; + _tagParameterOrProperty(metadataKey, annotationTarget, propertyName, metadata, parameterIndex); +} +exports.tagParameter = tagParameter; +function tagProperty(annotationTarget, propertyName, metadata) { + var metadataKey = METADATA_KEY.TAGGED_PROP; + _tagParameterOrProperty(metadataKey, annotationTarget.constructor, propertyName, metadata); +} +exports.tagProperty = tagProperty; +function _tagParameterOrProperty(metadataKey, annotationTarget, propertyName, metadata, parameterIndex) { + var paramsOrPropertiesMetadata = {}; + var isParameterDecorator = (typeof parameterIndex === "number"); + var key = (parameterIndex !== undefined && isParameterDecorator) ? parameterIndex.toString() : propertyName; + if (isParameterDecorator && propertyName !== undefined) { + throw new Error(ERROR_MSGS.INVALID_DECORATOR_OPERATION); + } + if (Reflect.hasOwnMetadata(metadataKey, annotationTarget)) { + paramsOrPropertiesMetadata = Reflect.getMetadata(metadataKey, annotationTarget); + } + var paramOrPropertyMetadata = paramsOrPropertiesMetadata[key]; + if (!Array.isArray(paramOrPropertyMetadata)) { + paramOrPropertyMetadata = []; + } + else { + for (var _i = 0, paramOrPropertyMetadata_1 = paramOrPropertyMetadata; _i < paramOrPropertyMetadata_1.length; _i++) { + var m = paramOrPropertyMetadata_1[_i]; + if (m.key === metadata.key) { + throw new Error(ERROR_MSGS.DUPLICATED_METADATA + " " + m.key); + } + } + } + paramOrPropertyMetadata.push(metadata); + paramsOrPropertiesMetadata[key] = paramOrPropertyMetadata; + Reflect.defineMetadata(metadataKey, paramsOrPropertiesMetadata, annotationTarget); +} +function _decorate(decorators, target) { + Reflect.decorate(decorators, target); +} +function _param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); }; +} +function decorate(decorator, target, parameterIndex) { + if (typeof parameterIndex === "number") { + _decorate([_param(parameterIndex, decorator)], target); + } + else if (typeof parameterIndex === "string") { + Reflect.decorate([decorator], target, parameterIndex); + } + else { + _decorate([decorator], target); + } +} +exports.decorate = decorate; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var smodel_1 = __webpack_require__(2); +var action_1 = __webpack_require__(86); +var vnode_utils_1 = __webpack_require__(18); +var dom_helper_1 = __webpack_require__(88); +var MouseTool = /** @class */ (function () { + function MouseTool(actionDispatcher, domHelper, mouseListeners) { + if (mouseListeners === void 0) { mouseListeners = []; } + this.actionDispatcher = actionDispatcher; + this.domHelper = domHelper; + this.mouseListeners = mouseListeners; + } + MouseTool.prototype.register = function (mouseListener) { + this.mouseListeners.push(mouseListener); + }; + MouseTool.prototype.deregister = function (mouseListener) { + var index = this.mouseListeners.indexOf(mouseListener); + if (index >= 0) + this.mouseListeners.splice(index, 1); + }; + MouseTool.prototype.getTargetElement = function (model, event) { + var target = event.target; + var index = model.index; + while (target) { + if (target.id) { + var element = index.getById(this.domHelper.findSModelIdByDOMElement(target)); + if (element !== undefined) + return element; + } + target = target.parentNode; + } + return undefined; + }; + MouseTool.prototype.handleEvent = function (methodName, model, event) { + var _this = this; + this.focusOnMouseEvent(methodName, model); + var element = this.getTargetElement(model, event); + if (!element) + return; + var actions = this.mouseListeners + .map(function (listener) { return listener[methodName].apply(listener, [element, event]); }) + .reduce(function (a, b) { return a.concat(b); }); + if (actions.length > 0) { + event.preventDefault(); + for (var _i = 0, actions_1 = actions; _i < actions_1.length; _i++) { + var actionOrPromise = actions_1[_i]; + if (action_1.isAction(actionOrPromise)) { + this.actionDispatcher.dispatch(actionOrPromise); + } + else { + actionOrPromise.then(function (action) { + _this.actionDispatcher.dispatch(action); + }); + } + } + } + }; + MouseTool.prototype.focusOnMouseEvent = function (methodName, model) { + if (document) { + var domElement = document.getElementById(this.domHelper.createUniqueDOMElementId(model)); + if (methodName === 'mouseDown' && domElement !== null && typeof domElement.focus === 'function') + domElement.focus(); + } + }; + MouseTool.prototype.mouseOver = function (model, event) { + this.handleEvent('mouseOver', model, event); + }; + MouseTool.prototype.mouseOut = function (model, event) { + this.handleEvent('mouseOut', model, event); + }; + MouseTool.prototype.mouseEnter = function (model, event) { + this.handleEvent('mouseEnter', model, event); + }; + MouseTool.prototype.mouseLeave = function (model, event) { + this.handleEvent('mouseLeave', model, event); + }; + MouseTool.prototype.mouseDown = function (model, event) { + this.handleEvent('mouseDown', model, event); + }; + MouseTool.prototype.mouseMove = function (model, event) { + this.handleEvent('mouseMove', model, event); + }; + MouseTool.prototype.mouseUp = function (model, event) { + this.handleEvent('mouseUp', model, event); + }; + MouseTool.prototype.wheel = function (model, event) { + this.handleEvent('wheel', model, event); + }; + MouseTool.prototype.doubleClick = function (model, event) { + this.handleEvent('doubleClick', model, event); + }; + MouseTool.prototype.decorate = function (vnode, element) { + if (element instanceof smodel_1.SModelRoot) { + vnode_utils_1.on(vnode, 'mouseover', this.mouseOver.bind(this), element); + vnode_utils_1.on(vnode, 'mouseout', this.mouseOut.bind(this), element); + vnode_utils_1.on(vnode, 'mouseenter', this.mouseEnter.bind(this), element); + vnode_utils_1.on(vnode, 'mouseleave', this.mouseLeave.bind(this), element); + vnode_utils_1.on(vnode, 'mousedown', this.mouseDown.bind(this), element); + vnode_utils_1.on(vnode, 'mouseup', this.mouseUp.bind(this), element); + vnode_utils_1.on(vnode, 'mousemove', this.mouseMove.bind(this), element); + vnode_utils_1.on(vnode, 'wheel', this.wheel.bind(this), element); + vnode_utils_1.on(vnode, 'contextmenu', function (target, event) { + event.preventDefault(); + }, element); + vnode_utils_1.on(vnode, 'dblclick', this.doubleClick.bind(this), element); + } + vnode = this.mouseListeners.reduce(function (vnode, listener) { return listener.decorate(vnode, element); }, vnode); + return vnode; + }; + MouseTool.prototype.postUpdate = function () { + }; + MouseTool = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.IActionDispatcher)), + __param(1, inversify_1.inject(types_1.TYPES.DOMHelper)), + __param(2, inversify_1.multiInject(types_1.TYPES.MouseListener)), __param(2, inversify_1.optional()), + __metadata("design:paramtypes", [Object, dom_helper_1.DOMHelper, Array]) + ], MouseTool); + return MouseTool; +}()); +exports.MouseTool = MouseTool; +var PopupMouseTool = /** @class */ (function (_super) { + __extends(PopupMouseTool, _super); + function PopupMouseTool(actionDispatcher, domHelper, mouseListeners) { + if (mouseListeners === void 0) { mouseListeners = []; } + var _this = _super.call(this, actionDispatcher, domHelper, mouseListeners) || this; + _this.actionDispatcher = actionDispatcher; + _this.domHelper = domHelper; + _this.mouseListeners = mouseListeners; + return _this; + } + PopupMouseTool = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.IActionDispatcher)), + __param(1, inversify_1.inject(types_1.TYPES.DOMHelper)), + __param(2, inversify_1.multiInject(types_1.TYPES.PopupMouseListener)), __param(2, inversify_1.optional()), + __metadata("design:paramtypes", [Object, dom_helper_1.DOMHelper, Array]) + ], PopupMouseTool); + return PopupMouseTool; +}(MouseTool)); +exports.PopupMouseTool = PopupMouseTool; +var MouseListener = /** @class */ (function () { + function MouseListener() { + } + MouseListener.prototype.mouseOver = function (target, event) { + return []; + }; + MouseListener.prototype.mouseOut = function (target, event) { + return []; + }; + MouseListener.prototype.mouseEnter = function (target, event) { + return []; + }; + MouseListener.prototype.mouseLeave = function (target, event) { + return []; + }; + MouseListener.prototype.mouseDown = function (target, event) { + return []; + }; + MouseListener.prototype.mouseMove = function (target, event) { + return []; + }; + MouseListener.prototype.mouseUp = function (target, event) { + return []; + }; + MouseListener.prototype.wheel = function (target, event) { + return []; + }; + MouseListener.prototype.doubleClick = function (target, event) { + return []; + }; + MouseListener.prototype.decorate = function (vnode, element) { + return vnode; + }; + MouseListener = __decorate([ + inversify_1.injectable() + ], MouseListener); + return MouseListener; +}()); +exports.MouseListener = MouseListener; +//# sourceMappingURL=mouse-tool.js.map + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.selectFeature = Symbol('selectFeature'); +function isSelectable(element) { + return element.hasFeature(exports.selectFeature); +} +exports.isSelectable = isSelectable; +//# sourceMappingURL=model.js.map + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var smodel_1 = __webpack_require__(2); +exports.viewportFeature = Symbol('viewportFeature'); +function isViewport(element) { + return element instanceof smodel_1.SModelRoot + && element.hasFeature(exports.viewportFeature) + && 'zoom' in element + && 'scroll' in element; +} +exports.isViewport = isViewport; +//# sourceMappingURL=model.js.map + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(163); +var defined = __webpack_require__(22); +module.exports = function (it) { + return IObject(defined(it)); +}; + + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +function guid() { + function s4() { + return Math.floor((Math.random() + 1) * 0x10000) + .toString(16) + .substring(1); + } + return s4() + s4() + "-" + s4() + "-" + s4() + "-" + + s4() + "-" + s4() + s4() + s4(); +} +exports.guid = guid; + + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var smodel_1 = __webpack_require__(2); +var vnode_utils_1 = __webpack_require__(18); +var KeyTool = /** @class */ (function () { + function KeyTool(actionDispatcher, keyListeners) { + if (keyListeners === void 0) { keyListeners = []; } + this.actionDispatcher = actionDispatcher; + this.keyListeners = keyListeners; + } + KeyTool.prototype.register = function (keyListener) { + this.keyListeners.push(keyListener); + }; + KeyTool.prototype.deregister = function (keyListener) { + var index = this.keyListeners.indexOf(keyListener); + if (index >= 0) + this.keyListeners.splice(index, 1); + }; + KeyTool.prototype.handleEvent = function (methodName, model, event) { + var actions = this.keyListeners + .map(function (listener) { return listener[methodName].apply(listener, [model, event]); }) + .reduce(function (a, b) { return a.concat(b); }); + if (actions.length > 0) { + event.preventDefault(); + this.actionDispatcher.dispatchAll(actions); + } + }; + KeyTool.prototype.keyDown = function (element, event) { + this.handleEvent('keyDown', element, event); + }; + KeyTool.prototype.focus = function () { }; + KeyTool.prototype.decorate = function (vnode, element) { + if (element instanceof smodel_1.SModelRoot) { + vnode_utils_1.on(vnode, 'focus', this.focus.bind(this), element); + vnode_utils_1.on(vnode, 'keydown', this.keyDown.bind(this), element); + } + return vnode; + }; + KeyTool.prototype.postUpdate = function () { + }; + KeyTool = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.IActionDispatcher)), + __param(1, inversify_1.multiInject(types_1.TYPES.KeyListener)), __param(1, inversify_1.optional()), + __metadata("design:paramtypes", [Object, Array]) + ], KeyTool); + return KeyTool; +}()); +exports.KeyTool = KeyTool; +var KeyListener = /** @class */ (function () { + function KeyListener() { + } + KeyListener.prototype.keyDown = function (element, event) { + return []; + }; + KeyListener = __decorate([ + inversify_1.injectable() + ], KeyListener); + return KeyListener; +}()); +exports.KeyListener = KeyListener; +//# sourceMappingURL=key-tool.js.map + +/***/ }), +/* 36 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(54); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var registry_1 = __webpack_require__(53); +var command_1 = __webpack_require__(8); +/** + * The action handler registry maps actions to their handlers using the Action.kind property. + */ +var ActionHandlerRegistry = /** @class */ (function (_super) { + __extends(ActionHandlerRegistry, _super); + function ActionHandlerRegistry(initializers) { + var _this = _super.call(this) || this; + initializers.forEach(function (initializer) { return _this.initializeActionHandler(initializer); }); + return _this; + } + ActionHandlerRegistry.prototype.registerCommand = function (commandType) { + this.register(commandType.KIND, new command_1.CommandActionHandler(commandType)); + }; + ActionHandlerRegistry.prototype.initializeActionHandler = function (initializer) { + initializer.initialize(this); + }; + ActionHandlerRegistry = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.multiInject(types_1.TYPES.IActionHandlerInitializer)), __param(0, inversify_1.optional()), + __metadata("design:paramtypes", [Array]) + ], ActionHandlerRegistry); + return ActionHandlerRegistry; +}(registry_1.MultiInstanceRegistry)); +exports.ActionHandlerRegistry = ActionHandlerRegistry; +//# sourceMappingURL=action-handler.js.map + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var easing_1 = __webpack_require__(129); +/** + * An animation uses the rendering loop of the browser to smoothly + * calculate a transition between two states of a model element. + */ +var Animation = /** @class */ (function () { + function Animation(context, ease) { + if (ease === void 0) { ease = easing_1.easeInOut; } + this.context = context; + this.ease = ease; + } + Animation.prototype.start = function () { + var _this = this; + return new Promise(function (resolve, reject) { + var start = undefined; + var frames = 0; + var lambda = function (time) { + frames++; + var dtime; + if (start === undefined) { + start = time; + dtime = 0; + } + else { + dtime = time - start; + } + var t = Math.min(1, dtime / _this.context.duration); + var current = _this.tween(_this.ease(t), _this.context); + _this.context.modelChanged.update(current); + if (t === 1) { + _this.context.logger.log(_this, (frames * 1000 / _this.context.duration) + ' fps'); + resolve(current); + } + else { + _this.context.syncer.onNextFrame(lambda); + } + }; + if (_this.context.syncer.isAvailable()) { + _this.context.syncer.onNextFrame(lambda); + } + else { + var finalModel = _this.tween(1, _this.context); + resolve(finalModel); + } + }); + }; + return Animation; +}()); +exports.Animation = Animation; +var CompoundAnimation = /** @class */ (function (_super) { + __extends(CompoundAnimation, _super); + function CompoundAnimation(model, context, components, ease) { + if (components === void 0) { components = []; } + if (ease === void 0) { ease = easing_1.easeInOut; } + var _this = _super.call(this, context, ease) || this; + _this.model = model; + _this.context = context; + _this.components = components; + _this.ease = ease; + return _this; + } + CompoundAnimation.prototype.include = function (animation) { + this.components.push(animation); + return this; + }; + CompoundAnimation.prototype.tween = function (t, context) { + for (var _i = 0, _a = this.components; _i < _a.length; _i++) { + var a = _a[_i]; + a.tween(t, context); + } + return this.model; + }; + return CompoundAnimation; +}(Animation)); +exports.CompoundAnimation = CompoundAnimation; +//# sourceMappingURL=animation.js.map + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var model_1 = __webpack_require__(9); +var action_dispatcher_1 = __webpack_require__(85); +var types_1 = __webpack_require__(1); +var geometry_1 = __webpack_require__(3); +var inversify_1 = __webpack_require__(0); +var ExportSvgAction = /** @class */ (function () { + function ExportSvgAction(svg) { + this.svg = svg; + this.kind = ExportSvgAction.KIND; + } + ExportSvgAction.KIND = 'exportSvg'; + return ExportSvgAction; +}()); +exports.ExportSvgAction = ExportSvgAction; +var SvgExporter = /** @class */ (function () { + function SvgExporter(options, actionDispatcher, log) { + this.options = options; + this.actionDispatcher = actionDispatcher; + this.log = log; + } + SvgExporter.prototype.export = function (root) { + if (typeof document !== 'undefined') { + var div = document.getElementById(this.options.hiddenDiv); + if (div !== null && div.firstElementChild && div.firstElementChild.tagName === 'svg') { + var svgElement = div.firstElementChild; + var svg = this.createSvg(svgElement, root); + this.actionDispatcher.dispatch(new ExportSvgAction(svg)); + } + } + }; + SvgExporter.prototype.createSvg = function (svgElementOrig, root) { + var serializer = new XMLSerializer(); + var svgCopy = serializer.serializeToString(svgElementOrig); + var iframe = document.createElement('iframe'); + document.body.appendChild(iframe); + var docCopy = iframe.contentWindow.document; + docCopy.open(); + docCopy.write(svgCopy); + docCopy.close(); + var svgElementNew = docCopy.getElementById(svgElementOrig.id); + svgElementNew.removeAttribute('opacity'); + this.copyStyles(svgElementOrig, svgElementNew, ['width', 'height', 'opacity']); + svgElementNew.setAttribute('version', '1.1'); + var bounds = this.getBounds(root); + svgElementNew.setAttribute('viewBox', bounds.x + " " + bounds.y + " " + bounds.width + " " + bounds.height); + var svgCode = serializer.serializeToString(svgElementNew); + document.body.removeChild(iframe); + return svgCode; + }; + SvgExporter.prototype.copyStyles = function (source, target, skipedProperties) { + var sourceStyle = getComputedStyle(source); + var targetStyle = getComputedStyle(target); + var diffStyle = ''; + for (var i = 0; i < sourceStyle.length; i++) { + var key = sourceStyle[i]; + if (skipedProperties.indexOf(key) === -1) { + var value = sourceStyle.getPropertyValue(key); + if (targetStyle.getPropertyValue(key) !== value) { + diffStyle += key + ":" + value + ";"; + } + } + } + if (diffStyle !== '') + target.setAttribute('style', diffStyle); + // IE doesn't retrun anything on source.children + for (var i = 0; i < source.childNodes.length; ++i) { + var sourceChild = source.childNodes[i]; + var targetChild = target.childNodes[i]; + if (sourceChild instanceof Element) + this.copyStyles(sourceChild, targetChild, []); + } + }; + SvgExporter.prototype.getBounds = function (root) { + var allBounds = [geometry_1.EMPTY_BOUNDS]; + root.children.forEach(function (element) { + if (model_1.isBoundsAware(element)) { + allBounds.push(element.bounds); + } + }); + return allBounds.reduce(function (one, two) { return geometry_1.combine(one, two); }); + }; + SvgExporter = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.ViewerOptions)), + __param(1, inversify_1.inject(types_1.TYPES.IActionDispatcher)), + __param(2, inversify_1.inject(types_1.TYPES.ILogger)), + __metadata("design:paramtypes", [Object, action_dispatcher_1.ActionDispatcher, Object]) + ], SvgExporter); + return SvgExporter; +}()); +exports.SvgExporter = SvgExporter; +//# sourceMappingURL=svg-exporter.js.map + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.moveFeature = Symbol('moveFeature'); +function isLocateable(element) { + return element['position'] !== undefined; +} +exports.isLocateable = isLocateable; +function isMoveable(element) { + return element.hasFeature(exports.moveFeature) && isLocateable(element); +} +exports.isMoveable = isMoveable; +//# sourceMappingURL=model.js.map + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var command_1 = __webpack_require__(8); +var animation_1 = __webpack_require__(39); +var model_1 = __webpack_require__(32); +var ViewportAction = /** @class */ (function () { + function ViewportAction(elementId, newViewport, animate) { + this.elementId = elementId; + this.newViewport = newViewport; + this.animate = animate; + this.kind = ViewportCommand.KIND; + } + return ViewportAction; +}()); +exports.ViewportAction = ViewportAction; +var ViewportCommand = /** @class */ (function (_super) { + __extends(ViewportCommand, _super); + function ViewportCommand(action) { + var _this = _super.call(this) || this; + _this.action = action; + _this.newViewport = action.newViewport; + return _this; + } + ViewportCommand.prototype.execute = function (context) { + var model = context.root; + var element = model.index.getById(this.action.elementId); + if (element && model_1.isViewport(element)) { + this.element = element; + this.oldViewport = { + scroll: this.element.scroll, + zoom: this.element.zoom, + }; + if (this.action.animate) + return new ViewportAnimation(this.element, this.oldViewport, this.newViewport, context).start(); + else { + this.element.scroll = this.newViewport.scroll; + this.element.zoom = this.newViewport.zoom; + } + } + return model; + }; + ViewportCommand.prototype.undo = function (context) { + return new ViewportAnimation(this.element, this.newViewport, this.oldViewport, context).start(); + }; + ViewportCommand.prototype.redo = function (context) { + return new ViewportAnimation(this.element, this.oldViewport, this.newViewport, context).start(); + }; + ViewportCommand.prototype.merge = function (command, context) { + if (!this.action.animate && command instanceof ViewportCommand && this.element === command.element) { + this.newViewport = command.newViewport; + return true; + } + return false; + }; + ViewportCommand.KIND = 'viewport'; + return ViewportCommand; +}(command_1.MergeableCommand)); +exports.ViewportCommand = ViewportCommand; +var ViewportAnimation = /** @class */ (function (_super) { + __extends(ViewportAnimation, _super); + function ViewportAnimation(element, oldViewport, newViewport, context) { + var _this = _super.call(this, context) || this; + _this.element = element; + _this.oldViewport = oldViewport; + _this.newViewport = newViewport; + _this.context = context; + _this.zoomFactor = Math.log(newViewport.zoom / oldViewport.zoom); + return _this; + } + ViewportAnimation.prototype.tween = function (t, context) { + this.element.scroll = { + x: (1 - t) * this.oldViewport.scroll.x + t * this.newViewport.scroll.x, + y: (1 - t) * this.oldViewport.scroll.y + t * this.newViewport.scroll.y + }; + this.element.zoom = this.oldViewport.zoom * Math.exp(t * this.zoomFactor); + return context.root; + }; + return ViewportAnimation; +}(animation_1.Animation)); +exports.ViewportAnimation = ViewportAnimation; +//# sourceMappingURL=viewport.js.map + +/***/ }), +/* 43 */ +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(27).f; +var has = __webpack_require__(25); +var TAG = __webpack_require__(4)('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(59); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + + +/***/ }), +/* 46 */ +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var ERROR_MSGS = __webpack_require__(12); +function getServiceIdentifierAsString(serviceIdentifier) { + if (typeof serviceIdentifier === "function") { + var _serviceIdentifier = serviceIdentifier; + return _serviceIdentifier.name; + } + else if (typeof serviceIdentifier === "symbol") { + return serviceIdentifier.toString(); + } + else { + var _serviceIdentifier = serviceIdentifier; + return _serviceIdentifier; + } +} +exports.getServiceIdentifierAsString = getServiceIdentifierAsString; +function listRegisteredBindingsForServiceIdentifier(container, serviceIdentifier, getBindings) { + var registeredBindingsList = ""; + var registeredBindings = getBindings(container, serviceIdentifier); + if (registeredBindings.length !== 0) { + registeredBindingsList = "\nRegistered bindings:"; + registeredBindings.forEach(function (binding) { + var name = "Object"; + if (binding.implementationType !== null) { + name = getFunctionName(binding.implementationType); + } + registeredBindingsList = registeredBindingsList + "\n " + name; + if (binding.constraint.metaData) { + registeredBindingsList = registeredBindingsList + " - " + binding.constraint.metaData; + } + }); + } + return registeredBindingsList; +} +exports.listRegisteredBindingsForServiceIdentifier = listRegisteredBindingsForServiceIdentifier; +function alreadyDependencyChain(request, serviceIdentifier) { + if (request.parentRequest === null) { + return false; + } + else if (request.parentRequest.serviceIdentifier === serviceIdentifier) { + return true; + } + else { + return alreadyDependencyChain(request.parentRequest, serviceIdentifier); + } +} +function dependencyChainToString(request) { + function _createStringArr(req, result) { + if (result === void 0) { result = []; } + var serviceIdentifier = getServiceIdentifierAsString(req.serviceIdentifier); + result.push(serviceIdentifier); + if (req.parentRequest !== null) { + return _createStringArr(req.parentRequest, result); + } + return result; + } + var stringArr = _createStringArr(request); + return stringArr.reverse().join(" --> "); +} +function circularDependencyToException(request) { + request.childRequests.forEach(function (childRequest) { + if (alreadyDependencyChain(childRequest, childRequest.serviceIdentifier)) { + var services = dependencyChainToString(childRequest); + throw new Error(ERROR_MSGS.CIRCULAR_DEPENDENCY + " " + services); + } + else { + circularDependencyToException(childRequest); + } + }); +} +exports.circularDependencyToException = circularDependencyToException; +function listMetadataForTarget(serviceIdentifierString, target) { + if (target.isTagged() || target.isNamed()) { + var m_1 = ""; + var namedTag = target.getNamedTag(); + var otherTags = target.getCustomTags(); + if (namedTag !== null) { + m_1 += namedTag.toString() + "\n"; + } + if (otherTags !== null) { + otherTags.forEach(function (tag) { + m_1 += tag.toString() + "\n"; + }); + } + return " " + serviceIdentifierString + "\n " + serviceIdentifierString + " - " + m_1; + } + else { + return " " + serviceIdentifierString; + } +} +exports.listMetadataForTarget = listMetadataForTarget; +function getFunctionName(v) { + if (v.name) { + return v.name; + } + else { + var name_1 = v.toString(); + var match = name_1.match(/^function\s*([^\s(]+)/); + return match ? match[1] : "Anonymous function: " + name_1; + } +} +exports.getFunctionName = getFunctionName; + + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var AnimationFrameSyncer = /** @class */ (function () { + function AnimationFrameSyncer() { + this.tasks = []; + this.endTasks = []; + this.triggered = false; + } + AnimationFrameSyncer.prototype.isAvailable = function () { + return typeof requestAnimationFrame === "function"; + }; + AnimationFrameSyncer.prototype.onNextFrame = function (task) { + this.tasks.push(task); + this.trigger(); + }; + AnimationFrameSyncer.prototype.onEndOfNextFrame = function (task) { + this.endTasks.push(task); + this.trigger(); + }; + AnimationFrameSyncer.prototype.trigger = function () { + var _this = this; + if (!this.triggered) { + this.triggered = true; + if (this.isAvailable()) + requestAnimationFrame(function (time) { return _this.run(time); }); + else + setTimeout(function (time) { return _this.run(time); }); + } + }; + AnimationFrameSyncer.prototype.run = function (time) { + var tasks = this.tasks; + var endTasks = this.endTasks; + this.triggered = false; + this.tasks = []; + this.endTasks = []; + tasks.forEach(function (task) { return task.call(undefined, time); }); + endTasks.forEach(function (task) { return task.call(undefined, time); }); + }; + AnimationFrameSyncer = __decorate([ + inversify_1.injectable() + ], AnimationFrameSyncer); + return AnimationFrameSyncer; +}()); +exports.AnimationFrameSyncer = AnimationFrameSyncer; +//# sourceMappingURL=animation-frame-syncer.js.map + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var geometry_1 = __webpack_require__(3); +var command_1 = __webpack_require__(8); +var initialize_canvas_1 = __webpack_require__(60); +/** + * Sent from the client to the model source (e.g. a DiagramServer) in order to request a model. Usually this + * is the first message that is sent to the source, so it is also used to initiate the communication. + * The response is a SetModelAction or an UpdateModelAction. + */ +var RequestModelAction = /** @class */ (function () { + function RequestModelAction(options) { + this.options = options; + this.kind = RequestModelAction.KIND; + } + RequestModelAction.KIND = 'requestModel'; + return RequestModelAction; +}()); +exports.RequestModelAction = RequestModelAction; +/** + * Sent from the model source to the client in order to set the model. If a model is already present, it is replaced. + */ +var SetModelAction = /** @class */ (function () { + function SetModelAction(newRoot, isInitial) { + if (isInitial === void 0) { isInitial = false; } + this.newRoot = newRoot; + this.isInitial = isInitial; + this.kind = SetModelCommand.KIND; + } + return SetModelAction; +}()); +exports.SetModelAction = SetModelAction; +var SetModelCommand = /** @class */ (function (_super) { + __extends(SetModelCommand, _super); + function SetModelCommand(action) { + var _this = _super.call(this) || this; + _this.action = action; + return _this; + } + SetModelCommand.prototype.execute = function (context) { + this.oldRoot = context.modelFactory.createRoot(context.root); + this.newRoot = context.modelFactory.createRoot(this.action.newRoot); + if (geometry_1.isValidDimension(this.oldRoot.canvasBounds)) { + this.newRoot.canvasBounds = this.oldRoot.canvasBounds; + } + return this.newRoot; + }; + SetModelCommand.prototype.undo = function (context) { + return this.oldRoot; + }; + SetModelCommand.prototype.redo = function (context) { + return this.newRoot; + }; + Object.defineProperty(SetModelCommand.prototype, "blockUntilActionKind", { + get: function () { + if (this.action.isInitial) + return initialize_canvas_1.InitializeCanvasBoundsCommand.KIND; + else + return undefined; + }, + enumerable: true, + configurable: true + }); + SetModelCommand.KIND = 'setModel'; + SetModelCommand = __decorate([ + inversify_1.injectable(), + __metadata("design:paramtypes", [SetModelAction]) + ], SetModelCommand); + return SetModelCommand; +}(command_1.Command)); +exports.SetModelCommand = SetModelCommand; +//# sourceMappingURL=set-model.js.map + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var command_1 = __webpack_require__(8); +var model_1 = __webpack_require__(9); +/** + * Sent from the model source (e.g. a DiagramServer) to the client to update the bounds of some + * (or all) model elements. + */ +var SetBoundsAction = /** @class */ (function () { + function SetBoundsAction(bounds) { + this.bounds = bounds; + this.kind = SetBoundsCommand.KIND; + } + return SetBoundsAction; +}()); +exports.SetBoundsAction = SetBoundsAction; +/** + * Sent from the model source to the client to request bounds for the given model. The model is + * rendered invisibly so the bounds can derived from the DOM. The response is a ComputedBoundsAction. + * This hidden rendering round-trip is necessary if the client is responsible for parts of the layout + * (see `needsClientLayout` viewer option). + */ +var RequestBoundsAction = /** @class */ (function () { + function RequestBoundsAction(newRoot) { + this.newRoot = newRoot; + this.kind = RequestBoundsCommand.KIND; + } + return RequestBoundsAction; +}()); +exports.RequestBoundsAction = RequestBoundsAction; +/** + * Sent from the client to the model source (e.g. a DiagramServer) to transmit the result of bounds + * computation as a response to a RequestBoundsAction. If the server is responsible for parts of + * the layout (see `needsServerLayout` viewer option), it can do so after applying the computed bounds + * received with this action. Otherwise there is no need to send the computed bounds to the server, + * so they can be processed locally by the client. + */ +var ComputedBoundsAction = /** @class */ (function () { + function ComputedBoundsAction(bounds, revision, alignments) { + this.bounds = bounds; + this.revision = revision; + this.alignments = alignments; + this.kind = ComputedBoundsAction.KIND; + } + ComputedBoundsAction.KIND = 'computedBounds'; + return ComputedBoundsAction; +}()); +exports.ComputedBoundsAction = ComputedBoundsAction; +var SetBoundsCommand = /** @class */ (function (_super) { + __extends(SetBoundsCommand, _super); + function SetBoundsCommand(action) { + var _this = _super.call(this) || this; + _this.action = action; + _this.bounds = []; + return _this; + } + SetBoundsCommand.prototype.execute = function (context) { + var _this = this; + this.action.bounds.forEach(function (b) { + var element = context.root.index.getById(b.elementId); + if (element && model_1.isBoundsAware(element)) { + _this.bounds.push({ + element: element, + oldBounds: element.bounds, + newBounds: b.newBounds, + }); + } + }); + return this.redo(context); + }; + SetBoundsCommand.prototype.undo = function (context) { + this.bounds.forEach(function (b) { return b.element.bounds = b.oldBounds; }); + return context.root; + }; + SetBoundsCommand.prototype.redo = function (context) { + this.bounds.forEach(function (b) { return b.element.bounds = b.newBounds; }); + return context.root; + }; + SetBoundsCommand.KIND = 'setBounds'; + return SetBoundsCommand; +}(command_1.SystemCommand)); +exports.SetBoundsCommand = SetBoundsCommand; +var RequestBoundsCommand = /** @class */ (function (_super) { + __extends(RequestBoundsCommand, _super); + function RequestBoundsCommand(action) { + var _this = _super.call(this) || this; + _this.action = action; + return _this; + } + RequestBoundsCommand.prototype.execute = function (context) { + return context.modelFactory.createRoot(this.action.newRoot); + }; + Object.defineProperty(RequestBoundsCommand.prototype, "blockUntilActionKind", { + get: function () { + return ComputedBoundsAction.KIND; + }, + enumerable: true, + configurable: true + }); + RequestBoundsCommand.KIND = 'requestBounds'; + return RequestBoundsCommand; +}(command_1.HiddenCommand)); +exports.RequestBoundsCommand = RequestBoundsCommand; +//# sourceMappingURL=bounds-manipulation.js.map + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fadeFeature = Symbol('fadeFeature'); +function isFadeable(element) { + return element.hasFeature(exports.fadeFeature) && element['opacity'] !== undefined; +} +exports.isFadeable = isFadeable; +//# sourceMappingURL=model.js.map + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var mouse_tool_1 = __webpack_require__(30); +var command_1 = __webpack_require__(8); +var smodel_factory_1 = __webpack_require__(17); +var geometry_1 = __webpack_require__(3); +var key_tool_1 = __webpack_require__(35); +var smodel_utils_1 = __webpack_require__(13); +var model_1 = __webpack_require__(9); +var model_2 = __webpack_require__(63); +/** + * Triggered when the user puts the mouse pointer over an element. + */ +var HoverFeedbackAction = /** @class */ (function () { + function HoverFeedbackAction(mouseoverElement, mouseIsOver) { + this.mouseoverElement = mouseoverElement; + this.mouseIsOver = mouseIsOver; + this.kind = HoverFeedbackCommand.KIND; + } + return HoverFeedbackAction; +}()); +exports.HoverFeedbackAction = HoverFeedbackAction; +var HoverFeedbackCommand = /** @class */ (function (_super) { + __extends(HoverFeedbackCommand, _super); + function HoverFeedbackCommand(action) { + var _this = _super.call(this) || this; + _this.action = action; + return _this; + } + HoverFeedbackCommand.prototype.execute = function (context) { + var model = context.root; + var modelElement = model.index.getById(this.action.mouseoverElement); + if (modelElement) { + if (model_2.isHoverable(modelElement)) { + modelElement.hoverFeedback = this.action.mouseIsOver; + } + } + return this.redo(context); + }; + HoverFeedbackCommand.prototype.undo = function (context) { + return context.root; + }; + HoverFeedbackCommand.prototype.redo = function (context) { + return context.root; + }; + HoverFeedbackCommand.KIND = 'hoverFeedback'; + return HoverFeedbackCommand; +}(command_1.Command)); +exports.HoverFeedbackCommand = HoverFeedbackCommand; +/** + * Triggered when the user hovers the mouse pointer over an element to get a popup with details on + * that element. This action is sent from the client to the model source, e.g. a DiagramServer. + * The response is a SetPopupModelAction. + */ +var RequestPopupModelAction = /** @class */ (function () { + function RequestPopupModelAction(elementId, bounds) { + this.elementId = elementId; + this.bounds = bounds; + this.kind = RequestPopupModelAction.KIND; + } + RequestPopupModelAction.KIND = 'requestPopupModel'; + return RequestPopupModelAction; +}()); +exports.RequestPopupModelAction = RequestPopupModelAction; +/** + * Sent from the model source to the client to display a popup in response to a RequestPopupModelAction. + * This action can also be used to remove any existing popup by choosing EMPTY_ROOT as root element. + */ +var SetPopupModelAction = /** @class */ (function () { + function SetPopupModelAction(newRoot) { + this.newRoot = newRoot; + this.kind = SetPopupModelCommand.KIND; + } + return SetPopupModelAction; +}()); +exports.SetPopupModelAction = SetPopupModelAction; +var SetPopupModelCommand = /** @class */ (function (_super) { + __extends(SetPopupModelCommand, _super); + function SetPopupModelCommand(action) { + var _this = _super.call(this) || this; + _this.action = action; + return _this; + } + SetPopupModelCommand.prototype.execute = function (context) { + this.oldRoot = context.root; + this.newRoot = context.modelFactory.createRoot(this.action.newRoot); + return this.newRoot; + }; + SetPopupModelCommand.prototype.undo = function (context) { + return this.oldRoot; + }; + SetPopupModelCommand.prototype.redo = function (context) { + return this.newRoot; + }; + SetPopupModelCommand.KIND = 'setPopupModel'; + return SetPopupModelCommand; +}(command_1.PopupCommand)); +exports.SetPopupModelCommand = SetPopupModelCommand; +var AbstractHoverMouseListener = /** @class */ (function (_super) { + __extends(AbstractHoverMouseListener, _super); + function AbstractHoverMouseListener(options, state) { + var _this = _super.call(this) || this; + _this.options = options; + _this.state = state; + return _this; + } + AbstractHoverMouseListener.prototype.stopMouseOutTimer = function () { + if (this.state.mouseOutTimer !== undefined) { + window.clearTimeout(this.state.mouseOutTimer); + this.state.mouseOutTimer = undefined; + } + }; + AbstractHoverMouseListener.prototype.startMouseOutTimer = function () { + var _this = this; + this.stopMouseOutTimer(); + return new Promise(function (resolve) { + _this.state.mouseOutTimer = window.setTimeout(function () { + _this.state.popupOpen = false; + _this.state.previousPopupElement = undefined; + resolve(new SetPopupModelAction({ type: smodel_factory_1.EMPTY_ROOT.type, id: smodel_factory_1.EMPTY_ROOT.id })); + }, _this.options.popupCloseDelay); + }); + }; + AbstractHoverMouseListener.prototype.stopMouseOverTimer = function () { + if (this.state.mouseOverTimer !== undefined) { + window.clearTimeout(this.state.mouseOverTimer); + this.state.mouseOverTimer = undefined; + } + }; + AbstractHoverMouseListener = __decorate([ + __param(0, inversify_1.inject(types_1.TYPES.ViewerOptions)), + __param(1, inversify_1.inject(types_1.TYPES.HoverState)), + __metadata("design:paramtypes", [Object, Object]) + ], AbstractHoverMouseListener); + return AbstractHoverMouseListener; +}(mouse_tool_1.MouseListener)); +exports.AbstractHoverMouseListener = AbstractHoverMouseListener; +var HoverMouseListener = /** @class */ (function (_super) { + __extends(HoverMouseListener, _super); + function HoverMouseListener() { + return _super !== null && _super.apply(this, arguments) || this; + } + HoverMouseListener.prototype.calculatePopupPosition = function (target, mousePosition) { + var offset = { x: -5, y: 20 }; + var maxDist = 150; + var targetBounds = model_1.getAbsoluteBounds(target); + var canvasBounds = target.root.canvasBounds; + var boundsInWindow = geometry_1.translate(targetBounds, canvasBounds); + var distRight = boundsInWindow.x + boundsInWindow.width - mousePosition.x; + var distBottom = boundsInWindow.y + boundsInWindow.height - mousePosition.y; + if (distBottom <= distRight && distBottom < maxDist) { + offset = { x: -5, y: Math.round(distBottom + 5) }; + } + else if (distRight <= distBottom && distRight < maxDist) { + offset = { x: Math.round(distRight + 5), y: -5 }; + } + var leftPopupPosition = mousePosition.x + offset.x; + var canvasRightBorderPosition = canvasBounds.x + canvasBounds.width; + if (leftPopupPosition > canvasRightBorderPosition) { + leftPopupPosition = canvasRightBorderPosition; + } + var topPopupPosition = mousePosition.y + offset.y; + var canvasBottomBorderPosition = canvasBounds.y + canvasBounds.height; + if (topPopupPosition > canvasBottomBorderPosition) { + topPopupPosition = canvasBottomBorderPosition; + } + return { x: leftPopupPosition, y: topPopupPosition }; + }; + HoverMouseListener.prototype.startMouseOverTimer = function (target, event) { + var _this = this; + this.stopMouseOverTimer(); + return new Promise(function (resolve) { + _this.state.mouseOverTimer = window.setTimeout(function () { + var popupPosition = _this.calculatePopupPosition(target, { x: event.pageX, y: event.pageY }); + resolve(new RequestPopupModelAction(target.id, { + x: popupPosition.x, + y: popupPosition.y, + width: -1, + height: -1 + })); + _this.state.popupOpen = true; + _this.state.previousPopupElement = target; + }, _this.options.popupOpenDelay); + }); + }; + HoverMouseListener.prototype.mouseOver = function (target, event) { + var state = this.state; + var result = []; + var popupTarget = smodel_utils_1.findParent(target, model_2.hasPopupFeature); + if (state.popupOpen && (popupTarget === undefined || + state.previousPopupElement !== undefined && state.previousPopupElement.id !== popupTarget.id)) { + result.push(this.startMouseOutTimer()); + } + else { + this.stopMouseOverTimer(); + this.stopMouseOutTimer(); + } + if (popupTarget !== undefined && + (state.previousPopupElement === undefined || state.previousPopupElement.id !== popupTarget.id)) { + result.push(this.startMouseOverTimer(popupTarget, event)); + } + var hoverTarget = smodel_utils_1.findParentByFeature(target, model_2.isHoverable); + if (hoverTarget !== undefined) + result.push(new HoverFeedbackAction(hoverTarget.id, true)); + return result; + }; + HoverMouseListener.prototype.mouseOut = function (target, event) { + var result = []; + if (!this.state.popupOpen) + this.stopMouseOverTimer(); + var hoverTarget = smodel_utils_1.findParentByFeature(target, model_2.isHoverable); + if (hoverTarget !== undefined) + result.push(new HoverFeedbackAction(hoverTarget.id, false)); + return result; + }; + HoverMouseListener.prototype.mouseMove = function (target, event) { + var popupTarget = smodel_utils_1.findParent(target, model_2.hasPopupFeature); + return this.state.popupOpen || popupTarget === undefined ? [] : [this.startMouseOverTimer(popupTarget, event)]; + }; + HoverMouseListener = __decorate([ + inversify_1.injectable() + ], HoverMouseListener); + return HoverMouseListener; +}(AbstractHoverMouseListener)); +exports.HoverMouseListener = HoverMouseListener; +var PopupHoverMouseListener = /** @class */ (function (_super) { + __extends(PopupHoverMouseListener, _super); + function PopupHoverMouseListener() { + return _super !== null && _super.apply(this, arguments) || this; + } + PopupHoverMouseListener.prototype.mouseOut = function (target, event) { + return [this.startMouseOutTimer()]; + }; + PopupHoverMouseListener.prototype.mouseOver = function (target, event) { + this.stopMouseOutTimer(); + this.stopMouseOverTimer(); + return []; + }; + PopupHoverMouseListener = __decorate([ + inversify_1.injectable() + ], PopupHoverMouseListener); + return PopupHoverMouseListener; +}(AbstractHoverMouseListener)); +exports.PopupHoverMouseListener = PopupHoverMouseListener; +var HoverKeyListener = /** @class */ (function (_super) { + __extends(HoverKeyListener, _super); + function HoverKeyListener() { + return _super !== null && _super.apply(this, arguments) || this; + } + HoverKeyListener.prototype.keyDown = function (element, event) { + if (event.keyCode === 27) { + return [new SetPopupModelAction({ type: smodel_factory_1.EMPTY_ROOT.type, id: smodel_factory_1.EMPTY_ROOT.id })]; + } + return []; + }; + return HoverKeyListener; +}(key_tool_1.KeyListener)); +exports.HoverKeyListener = HoverKeyListener; +//# sourceMappingURL=hover.js.map + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var ProviderRegistry = /** @class */ (function () { + function ProviderRegistry() { + this.elements = new Map; + } + ProviderRegistry.prototype.register = function (key, cstr) { + if (key === undefined) + throw new Error('Key is undefined'); + if (this.hasKey(key)) + throw new Error('Key is already registered: ' + key); + this.elements.set(key, cstr); + }; + ProviderRegistry.prototype.deregister = function (key) { + if (key === undefined) + throw new Error('Key is undefined'); + this.elements.delete(key); + }; + ProviderRegistry.prototype.hasKey = function (key) { + return this.elements.has(key); + }; + ProviderRegistry.prototype.get = function (key, arg) { + var existingCstr = this.elements.get(key); + if (existingCstr) + return new existingCstr(arg); + else + return this.missing(key, arg); + }; + ProviderRegistry.prototype.missing = function (key, arg) { + throw new Error('Unknown registry key: ' + key); + }; + ProviderRegistry = __decorate([ + inversify_1.injectable() + ], ProviderRegistry); + return ProviderRegistry; +}()); +exports.ProviderRegistry = ProviderRegistry; +var InstanceRegistry = /** @class */ (function () { + function InstanceRegistry() { + this.elements = new Map; + } + InstanceRegistry.prototype.register = function (key, instance) { + if (key === undefined) + throw new Error('Key is undefined'); + if (this.hasKey(key)) + throw new Error('Key is already registered: ' + key); + this.elements.set(key, instance); + }; + InstanceRegistry.prototype.deregister = function (key) { + if (key === undefined) + throw new Error('Key is undefined'); + this.elements.delete(key); + }; + InstanceRegistry.prototype.hasKey = function (key) { + return this.elements.has(key); + }; + InstanceRegistry.prototype.get = function (key) { + var existingInstance = this.elements.get(key); + if (existingInstance) + return existingInstance; + else + return this.missing(key); + }; + InstanceRegistry.prototype.missing = function (key) { + throw new Error('Unknown registry key: ' + key); + }; + InstanceRegistry = __decorate([ + inversify_1.injectable() + ], InstanceRegistry); + return InstanceRegistry; +}()); +exports.InstanceRegistry = InstanceRegistry; +var MultiInstanceRegistry = /** @class */ (function () { + function MultiInstanceRegistry() { + this.elements = new Map; + } + MultiInstanceRegistry.prototype.register = function (key, instance) { + if (key === undefined) + throw new Error('Key is undefined'); + var instances = this.elements.get(key); + if (instances !== undefined) + instances.push(instance); + else + this.elements.set(key, [instance]); + }; + MultiInstanceRegistry.prototype.deregisterAll = function (key) { + if (key === undefined) + throw new Error('Key is undefined'); + this.elements.delete(key); + }; + MultiInstanceRegistry.prototype.get = function (key) { + var existingInstances = this.elements.get(key); + if (existingInstances !== undefined) + return existingInstances; + else + return []; + }; + MultiInstanceRegistry = __decorate([ + inversify_1.injectable() + ], MultiInstanceRegistry); + return MultiInstanceRegistry; +}()); +exports.MultiInstanceRegistry = MultiInstanceRegistry; +//# sourceMappingURL=registry.js.map + +/***/ }), +/* 54 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var hide = __webpack_require__(26); +var redefine = __webpack_require__(28); +var fails = __webpack_require__(24); +var defined = __webpack_require__(22); +var wks = __webpack_require__(4); + +module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + var fns = exec(defined, SYMBOL, ''[KEY]); + var strfn = fns[0]; + var rxfn = fns[1]; + if (fails(function () { + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + })) { + redefine(String.prototype, KEY, strfn); + hide(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { return rxfn.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { return rxfn.call(string, this); } + ); + } +}; + + +/***/ }), +/* 56 */ +/***/ (function(module, exports) { + +module.exports = false; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(113); +var enumBugKeys = __webpack_require__(69); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports) { + +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var geometry_1 = __webpack_require__(3); +var smodel_1 = __webpack_require__(2); +var command_1 = __webpack_require__(8); +/** + * Grabs the bounds from the root element in page coordinates and fires a + * InitializeCanvasBoundsAction. This size is needed for other actions such + * as FitToScreenAction. + */ +var CanvasBoundsInitializer = /** @class */ (function () { + function CanvasBoundsInitializer(actionDispatcher) { + this.actionDispatcher = actionDispatcher; + } + CanvasBoundsInitializer.prototype.decorate = function (vnode, element) { + if (element instanceof smodel_1.SModelRoot && !geometry_1.isValidDimension(element.canvasBounds)) { + this.rootAndVnode = [element, vnode]; + } + return vnode; + }; + CanvasBoundsInitializer.prototype.postUpdate = function () { + if (this.rootAndVnode !== undefined) { + var domElement = this.rootAndVnode[1].elm; + var oldBounds = this.rootAndVnode[0].canvasBounds; + if (domElement !== undefined) { + var newBounds = this.getBoundsInPage(domElement); + if (!(geometry_1.almostEquals(newBounds.x, oldBounds.x) + && geometry_1.almostEquals(newBounds.y, oldBounds.y) + && geometry_1.almostEquals(newBounds.width, oldBounds.width) + && geometry_1.almostEquals(newBounds.height, oldBounds.width))) + this.actionDispatcher.dispatch(new InitializeCanvasBoundsAction(newBounds)); + } + this.rootAndVnode = undefined; + } + }; + CanvasBoundsInitializer.prototype.getBoundsInPage = function (element) { + var bounds = element.getBoundingClientRect(); + var scroll = typeof window !== 'undefined' ? { x: window.scrollX, y: window.scrollY } : geometry_1.ORIGIN_POINT; + return { + x: bounds.left + scroll.x, + y: bounds.top + scroll.y, + width: bounds.width, + height: bounds.height + }; + }; + CanvasBoundsInitializer = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.IActionDispatcher)), + __metadata("design:paramtypes", [Object]) + ], CanvasBoundsInitializer); + return CanvasBoundsInitializer; +}()); +exports.CanvasBoundsInitializer = CanvasBoundsInitializer; +var InitializeCanvasBoundsAction = /** @class */ (function () { + function InitializeCanvasBoundsAction(newCanvasBounds) { + this.newCanvasBounds = newCanvasBounds; + this.kind = InitializeCanvasBoundsCommand.KIND; + } + return InitializeCanvasBoundsAction; +}()); +exports.InitializeCanvasBoundsAction = InitializeCanvasBoundsAction; +var InitializeCanvasBoundsCommand = /** @class */ (function (_super) { + __extends(InitializeCanvasBoundsCommand, _super); + function InitializeCanvasBoundsCommand(action) { + var _this = _super.call(this) || this; + _this.action = action; + return _this; + } + InitializeCanvasBoundsCommand.prototype.execute = function (context) { + this.oldCanvasBounds = context.root.canvasBounds; + this.newCanvasBounds = this.action.newCanvasBounds; + context.root.canvasBounds = this.newCanvasBounds; + return context.root; + }; + InitializeCanvasBoundsCommand.prototype.undo = function (context) { + return context.root; + }; + InitializeCanvasBoundsCommand.prototype.redo = function (context) { + return context.root; + }; + InitializeCanvasBoundsCommand.KIND = 'initializeCanvasBounds'; + return InitializeCanvasBoundsCommand; +}(command_1.SystemCommand)); +exports.InitializeCanvasBoundsCommand = InitializeCanvasBoundsCommand; +//# sourceMappingURL=initialize-canvas.js.map + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* +* Copyright (C) 2017 TypeFox and others. +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +*/ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var smodel_utils_1 = __webpack_require__(13); +var model_1 = __webpack_require__(93); +var inversify_1 = __webpack_require__(0); +/** + * Sent from the client to the model source to recalculate a diagram when elements + * are collapsed/expanded by the client. + */ +var CollapseExpandAction = /** @class */ (function () { + function CollapseExpandAction(expandIds, collapseIds) { + this.expandIds = expandIds; + this.collapseIds = collapseIds; + this.kind = CollapseExpandAction.KIND; + } + CollapseExpandAction.KIND = 'collapseExpand'; + return CollapseExpandAction; +}()); +exports.CollapseExpandAction = CollapseExpandAction; +/** + * Programmatic action for expanding or collapsing all elements. + */ +var CollapseExpandAllAction = /** @class */ (function () { + /** + * If `expand` is true, all elements are expanded, othewise they are collapsed. + */ + function CollapseExpandAllAction(expand) { + if (expand === void 0) { expand = true; } + this.expand = expand; + this.kind = CollapseExpandAllAction.KIND; + } + CollapseExpandAllAction.KIND = 'collapseExpandAll'; + return CollapseExpandAllAction; +}()); +exports.CollapseExpandAllAction = CollapseExpandAllAction; +var ExpandButtonHandler = /** @class */ (function () { + function ExpandButtonHandler() { + } + ExpandButtonHandler.prototype.buttonPressed = function (button) { + var expandable = smodel_utils_1.findParentByFeature(button, model_1.isExpandable); + if (expandable !== undefined) { + return [new CollapseExpandAction(expandable.expanded ? [] : [expandable.id], expandable.expanded ? [expandable.id] : [])]; + } + else { + return []; + } + }; + ExpandButtonHandler.TYPE = 'button:expand'; + ExpandButtonHandler = __decorate([ + inversify_1.injectable() + ], ExpandButtonHandler); + return ExpandButtonHandler; +}()); +exports.ExpandButtonHandler = ExpandButtonHandler; +//# sourceMappingURL=expand.js.map + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.exportFeature = Symbol('exportFeature'); +function isExportable(element) { + return element.hasFeature(exports.exportFeature) && element['export'] !== undefined; +} +exports.isExportable = isExportable; +//# sourceMappingURL=model.js.map + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hoverFeedbackFeature = Symbol('hoverFeedbackFeature'); +function isHoverable(element) { + return element.hasFeature(exports.hoverFeedbackFeature); +} +exports.isHoverable = isHoverable; +exports.popupFeature = Symbol('popupFeature'); +function hasPopupFeature(element) { + return element.hasFeature(exports.popupFeature); +} +exports.hasPopupFeature = hasPopupFeature; +//# sourceMappingURL=model.js.map + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var smodel_1 = __webpack_require__(2); +var smodel_2 = __webpack_require__(2); +var smodel_utils_1 = __webpack_require__(13); +var command_1 = __webpack_require__(8); +var animation_1 = __webpack_require__(39); +var mouse_tool_1 = __webpack_require__(30); +var vnode_utils_1 = __webpack_require__(18); +var model_1 = __webpack_require__(32); +var model_2 = __webpack_require__(31); +var model_3 = __webpack_require__(41); +var model_4 = __webpack_require__(9); +var inversify_1 = __webpack_require__(0); +var MoveAction = /** @class */ (function () { + function MoveAction(moves, animate) { + if (animate === void 0) { animate = true; } + this.moves = moves; + this.animate = animate; + this.kind = MoveCommand.KIND; + } + return MoveAction; +}()); +exports.MoveAction = MoveAction; +var MoveCommand = /** @class */ (function (_super) { + __extends(MoveCommand, _super); + function MoveCommand(action) { + var _this = _super.call(this) || this; + _this.action = action; + _this.resolvedMoves = new Map; + return _this; + } + MoveCommand.prototype.execute = function (context) { + var _this = this; + var model = context.root; + this.action.moves.forEach(function (move) { + var resolvedMove = _this.resolve(move, model.index); + if (resolvedMove) { + _this.resolvedMoves.set(resolvedMove.elementId, resolvedMove); + if (!_this.action.animate) { + resolvedMove.element.position = move.toPosition; + } + } + }); + if (this.action.animate) + return new MoveAnimation(model, this.resolvedMoves, context, false).start(); + else + return model; + }; + MoveCommand.prototype.resolve = function (move, index) { + var element = index.getById(move.elementId); + if (element) { + var fromPosition = move.fromPosition || { x: element.position.x, y: element.position.y }; + return { + fromPosition: fromPosition, + elementId: move.elementId, + element: element, + toPosition: move.toPosition + }; + } + return undefined; + }; + MoveCommand.prototype.undo = function (context) { + return new MoveAnimation(context.root, this.resolvedMoves, context, true).start(); + }; + MoveCommand.prototype.redo = function (context) { + return new MoveAnimation(context.root, this.resolvedMoves, context, false).start(); + }; + MoveCommand.prototype.merge = function (command, context) { + var _this = this; + if (!this.action.animate && command instanceof MoveCommand) { + command.action.moves.forEach(function (otherMove) { + var existingMove = _this.resolvedMoves.get(otherMove.elementId); + if (existingMove) { + existingMove.toPosition = otherMove.toPosition; + } + else { + var resolvedMove = _this.resolve(otherMove, context.root.index); + if (resolvedMove) + _this.resolvedMoves.set(resolvedMove.elementId, resolvedMove); + } + }); + return true; + } + return false; + }; + MoveCommand.KIND = 'move'; + return MoveCommand; +}(command_1.MergeableCommand)); +exports.MoveCommand = MoveCommand; +var MoveAnimation = /** @class */ (function (_super) { + __extends(MoveAnimation, _super); + function MoveAnimation(model, elementMoves, context, reverse) { + if (reverse === void 0) { reverse = false; } + var _this = _super.call(this, context) || this; + _this.model = model; + _this.elementMoves = elementMoves; + _this.reverse = reverse; + return _this; + } + MoveAnimation.prototype.tween = function (t) { + var _this = this; + this.elementMoves.forEach(function (elementMove) { + if (_this.reverse) { + elementMove.element.position = { + x: (1 - t) * elementMove.toPosition.x + t * elementMove.fromPosition.x, + y: (1 - t) * elementMove.toPosition.y + t * elementMove.fromPosition.y + }; + } + else { + elementMove.element.position = { + x: (1 - t) * elementMove.fromPosition.x + t * elementMove.toPosition.x, + y: (1 - t) * elementMove.fromPosition.y + t * elementMove.toPosition.y + }; + } + }); + return this.model; + }; + return MoveAnimation; +}(animation_1.Animation)); +exports.MoveAnimation = MoveAnimation; +var MoveMouseListener = /** @class */ (function (_super) { + __extends(MoveMouseListener, _super); + function MoveMouseListener() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.hasDragged = false; + return _this; + } + MoveMouseListener.prototype.mouseDown = function (target, event) { + if (event.button === 0) { + if (model_3.isMoveable(target)) { + this.lastDragPosition = { x: event.pageX, y: event.pageY }; + } + else { + this.lastDragPosition = undefined; + } + this.hasDragged = false; + } + return []; + }; + MoveMouseListener.prototype.mouseMove = function (target, event) { + if (event.buttons === 0) + this.mouseUp(target, event); + else if (this.lastDragPosition) { + var viewport = smodel_utils_1.findParentByFeature(target, model_1.isViewport); + this.hasDragged = true; + var zoom = viewport ? viewport.zoom : 1; + var dx_1 = (event.pageX - this.lastDragPosition.x) / zoom; + var dy_1 = (event.pageY - this.lastDragPosition.y) / zoom; + var root = target.root; + var nodeMoves_1 = []; + root + .index + .all() + .filter(function (element) { return model_2.isSelectable(element) && element.selected; }) + .forEach(function (element) { + if (model_3.isMoveable(element)) { + nodeMoves_1.push({ + elementId: element.id, + toPosition: { + x: element.position.x + dx_1, + y: element.position.y + dy_1 + } + }); + } + }); + this.lastDragPosition = { x: event.pageX, y: event.pageY }; + if (nodeMoves_1.length > 0) + return [new MoveAction(nodeMoves_1, false)]; + } + return []; + }; + MoveMouseListener.prototype.mouseEnter = function (target, event) { + if (target instanceof smodel_2.SModelRoot && event.buttons === 0) + this.mouseUp(target, event); + return []; + }; + MoveMouseListener.prototype.mouseUp = function (target, event) { + this.hasDragged = false; + this.lastDragPosition = undefined; + return []; + }; + MoveMouseListener.prototype.decorate = function (vnode, element) { + return vnode; + }; + return MoveMouseListener; +}(mouse_tool_1.MouseListener)); +exports.MoveMouseListener = MoveMouseListener; +var LocationDecorator = /** @class */ (function () { + function LocationDecorator() { + } + LocationDecorator.prototype.decorate = function (vnode, element) { + var translate = ''; + if (model_3.isLocateable(element) && element instanceof smodel_1.SChildElement && element.parent !== undefined) { + translate = 'translate(' + element.position.x + ', ' + element.position.y + ')'; + } + if (model_4.isAlignable(element)) { + if (translate.length > 0) + translate += ' '; + translate += 'translate(' + element.alignment.x + ', ' + element.alignment.y + ')'; + } + if (translate.length > 0) + vnode_utils_1.setAttr(vnode, 'transform', translate); + return vnode; + }; + LocationDecorator.prototype.postUpdate = function () { + }; + LocationDecorator = __decorate([ + inversify_1.injectable() + ], LocationDecorator); + return LocationDecorator; +}()); +exports.LocationDecorator = LocationDecorator; +//# sourceMappingURL=move.js.map + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Returns whether the mouse or keyboard event includes the CMD key + * on Mac or CTRL key on Linux / others + */ +function isCtrlOrCmd(event) { + if (isMac()) + return event.metaKey; + else + return event.ctrlKey; +} +exports.isCtrlOrCmd = isCtrlOrCmd; +function isMac() { + return window.navigator.userAgent.indexOf("Mac") !== -1; +} +exports.isMac = isMac; +function isCrossSite(url) { + if (url && typeof window !== 'undefined' && window.location) { + var baseURL = ''; + if (window.location.protocol) + baseURL += window.location.protocol + '//'; + if (window.location.host) + baseURL += window.location.host; + return baseURL.length > 0 && !url.startsWith(baseURL); + } + return false; +} +exports.isCrossSite = isCrossSite; +//# sourceMappingURL=browser.js.map + +/***/ }), +/* 66 */ +/***/ (function(module, exports) { + +module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; + + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(36); +var TAG = __webpack_require__(4)('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; + +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(14); +var document = __webpack_require__(6).document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + + +/***/ }), +/* 69 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +var MATCH = __webpack_require__(4)('match'); +module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { /* empty */ } + } return true; +}; + + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(37); +var call = __webpack_require__(166); +var isArrayIter = __webpack_require__(164); +var anObject = __webpack_require__(19); +var toLength = __webpack_require__(45); +var getIterFn = __webpack_require__(181); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(56); +var $export = __webpack_require__(10); +var redefine = __webpack_require__(28); +var hide = __webpack_require__(26); +var has = __webpack_require__(25); +var Iterators = __webpack_require__(43); +var $iterCreate = __webpack_require__(167); +var setToStringTag = __webpack_require__(44); +var getPrototypeOf = __webpack_require__(171); +var ITERATOR = __webpack_require__(4)('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = (!BUGGY && $native) || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +var META = __webpack_require__(46)('meta'); +var isObject = __webpack_require__(14); +var has = __webpack_require__(25); +var setDesc = __webpack_require__(27).f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !__webpack_require__(24)(function () { + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); +}; +var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; + + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(19); +var dPs = __webpack_require__(169); +var enumBugKeys = __webpack_require__(69); +var IE_PROTO = __webpack_require__(77)('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(68)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(104).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), +/* 75 */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + +var redefine = __webpack_require__(28); +module.exports = function (target, src, safe) { + for (var key in src) redefine(target, key, src[key], safe); + return target; +}; + + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(78)('keys'); +var uid = __webpack_require__(46); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(6); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); +module.exports = function (key) { + return store[key] || (store[key] = {}); +}; + + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +// helper for String#{startsWith, endsWith, includes} +var isRegExp = __webpack_require__(106); +var defined = __webpack_require__(22); + +module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); +}; + + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(14); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.3.6 Object.prototype.toString() +var classof = __webpack_require__(67); +var test = {}; +test[__webpack_require__(4)('toStringTag')] = 'z'; +if (test + '' != '[object z]') { + __webpack_require__(28)(Object.prototype, 'toString', function toString() { + return '[object ' + classof(this) + ']'; + }, true); +} + + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(115)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(72)(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); + + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var binding_when_syntax_1 = __webpack_require__(84); +var BindingOnSyntax = (function () { + function BindingOnSyntax(binding) { + this._binding = binding; + } + BindingOnSyntax.prototype.onActivation = function (handler) { + this._binding.onActivation = handler; + return new binding_when_syntax_1.BindingWhenSyntax(this._binding); + }; + return BindingOnSyntax; +}()); +exports.BindingOnSyntax = BindingOnSyntax; + + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var binding_on_syntax_1 = __webpack_require__(83); +var constraint_helpers_1 = __webpack_require__(126); +var BindingWhenSyntax = (function () { + function BindingWhenSyntax(binding) { + this._binding = binding; + } + BindingWhenSyntax.prototype.when = function (constraint) { + this._binding.constraint = constraint; + return new binding_on_syntax_1.BindingOnSyntax(this._binding); + }; + BindingWhenSyntax.prototype.whenTargetNamed = function (name) { + this._binding.constraint = constraint_helpers_1.namedConstraint(name); + return new binding_on_syntax_1.BindingOnSyntax(this._binding); + }; + BindingWhenSyntax.prototype.whenTargetIsDefault = function () { + this._binding.constraint = function (request) { + var targetIsDefault = (request.target !== null) && + (!request.target.isNamed()) && + (!request.target.isTagged()); + return targetIsDefault; + }; + return new binding_on_syntax_1.BindingOnSyntax(this._binding); + }; + BindingWhenSyntax.prototype.whenTargetTagged = function (tag, value) { + this._binding.constraint = constraint_helpers_1.taggedConstraint(tag)(value); + return new binding_on_syntax_1.BindingOnSyntax(this._binding); + }; + BindingWhenSyntax.prototype.whenInjectedInto = function (parent) { + this._binding.constraint = function (request) { + return constraint_helpers_1.typeConstraint(parent)(request.parentRequest); + }; + return new binding_on_syntax_1.BindingOnSyntax(this._binding); + }; + BindingWhenSyntax.prototype.whenParentNamed = function (name) { + this._binding.constraint = function (request) { + return constraint_helpers_1.namedConstraint(name)(request.parentRequest); + }; + return new binding_on_syntax_1.BindingOnSyntax(this._binding); + }; + BindingWhenSyntax.prototype.whenParentTagged = function (tag, value) { + this._binding.constraint = function (request) { + return constraint_helpers_1.taggedConstraint(tag)(value)(request.parentRequest); + }; + return new binding_on_syntax_1.BindingOnSyntax(this._binding); + }; + BindingWhenSyntax.prototype.whenAnyAncestorIs = function (ancestor) { + this._binding.constraint = function (request) { + return constraint_helpers_1.traverseAncerstors(request, constraint_helpers_1.typeConstraint(ancestor)); + }; + return new binding_on_syntax_1.BindingOnSyntax(this._binding); + }; + BindingWhenSyntax.prototype.whenNoAncestorIs = function (ancestor) { + this._binding.constraint = function (request) { + return !constraint_helpers_1.traverseAncerstors(request, constraint_helpers_1.typeConstraint(ancestor)); + }; + return new binding_on_syntax_1.BindingOnSyntax(this._binding); + }; + BindingWhenSyntax.prototype.whenAnyAncestorNamed = function (name) { + this._binding.constraint = function (request) { + return constraint_helpers_1.traverseAncerstors(request, constraint_helpers_1.namedConstraint(name)); + }; + return new binding_on_syntax_1.BindingOnSyntax(this._binding); + }; + BindingWhenSyntax.prototype.whenNoAncestorNamed = function (name) { + this._binding.constraint = function (request) { + return !constraint_helpers_1.traverseAncerstors(request, constraint_helpers_1.namedConstraint(name)); + }; + return new binding_on_syntax_1.BindingOnSyntax(this._binding); + }; + BindingWhenSyntax.prototype.whenAnyAncestorTagged = function (tag, value) { + this._binding.constraint = function (request) { + return constraint_helpers_1.traverseAncerstors(request, constraint_helpers_1.taggedConstraint(tag)(value)); + }; + return new binding_on_syntax_1.BindingOnSyntax(this._binding); + }; + BindingWhenSyntax.prototype.whenNoAncestorTagged = function (tag, value) { + this._binding.constraint = function (request) { + return !constraint_helpers_1.traverseAncerstors(request, constraint_helpers_1.taggedConstraint(tag)(value)); + }; + return new binding_on_syntax_1.BindingOnSyntax(this._binding); + }; + BindingWhenSyntax.prototype.whenAnyAncestorMatches = function (constraint) { + this._binding.constraint = function (request) { + return constraint_helpers_1.traverseAncerstors(request, constraint); + }; + return new binding_on_syntax_1.BindingOnSyntax(this._binding); + }; + BindingWhenSyntax.prototype.whenNoAncestorMatches = function (constraint) { + this._binding.constraint = function (request) { + return !constraint_helpers_1.traverseAncerstors(request, constraint); + }; + return new binding_on_syntax_1.BindingOnSyntax(this._binding); + }; + return BindingWhenSyntax; +}()); +exports.BindingWhenSyntax = BindingWhenSyntax; + + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var smodel_factory_1 = __webpack_require__(17); +var animation_frame_syncer_1 = __webpack_require__(48); +var set_model_1 = __webpack_require__(49); +var undo_redo_1 = __webpack_require__(96); +var action_1 = __webpack_require__(86); +var action_handler_1 = __webpack_require__(38); +/** + * Collects actions, converts them to commands and dispatches them. + * Also acts as the proxy to model sources such as diagram servers. + */ +var ActionDispatcher = /** @class */ (function () { + function ActionDispatcher(actionHandlerRegistry, commandStack, logger, syncer) { + this.actionHandlerRegistry = actionHandlerRegistry; + this.commandStack = commandStack; + this.logger = logger; + this.syncer = syncer; + this.postponedActions = []; + var initialCommand = new set_model_1.SetModelCommand(new set_model_1.SetModelAction(smodel_factory_1.EMPTY_ROOT, true)); + this.blockUntilActionKind = initialCommand.blockUntilActionKind; + this.commandStack.execute(initialCommand); + } + ActionDispatcher.prototype.dispatchAll = function (actions) { + var _this = this; + actions.forEach(function (action) { return _this.dispatch(action); }); + }; + ActionDispatcher.prototype.dispatch = function (action, onExecute) { + var _this = this; + if (action.kind === this.blockUntilActionKind) { + this.blockUntilActionKind = undefined; + this.handleAction(action); + var actions = this.postponedActions; + this.postponedActions = []; + actions.forEach(function (a) { return _this.dispatch(a.action, a.onExecute); }); + return; + } + if (this.blockUntilActionKind !== undefined) { + this.logger.log(this, 'waiting for ' + this.blockUntilActionKind + '. postponing', action); + this.postponedActions.push({ + action: action, + onExecute: onExecute + }); + return; + } + if (onExecute !== undefined) + onExecute.call(null, action); + if (action.kind === undo_redo_1.UndoAction.KIND) { + this.commandStack.undo(); + } + else if (action.kind === undo_redo_1.RedoAction.KIND) { + this.commandStack.redo(); + } + else { + this.handleAction(action); + } + }; + ActionDispatcher.prototype.handleAction = function (action) { + this.logger.log(this, 'handle', action); + var handlers = this.actionHandlerRegistry.get(action.kind); + if (handlers.length > 0) { + for (var _i = 0, handlers_1 = handlers; _i < handlers_1.length; _i++) { + var handler = handlers_1[_i]; + var result = handler.handle(action); + if (action_1.isAction(result)) + this.dispatch(result); + else if (result !== undefined) { + this.commandStack.execute(result); + this.blockUntilActionKind = result.blockUntilActionKind; + } + } + } + else { + this.logger.warn(this, 'missing handler for action', action); + } + }; + ActionDispatcher = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.ActionHandlerRegistry)), + __param(1, inversify_1.inject(types_1.TYPES.ICommandStack)), + __param(2, inversify_1.inject(types_1.TYPES.ILogger)), + __param(3, inversify_1.inject(types_1.TYPES.AnimationFrameSyncer)), + __metadata("design:paramtypes", [action_handler_1.ActionHandlerRegistry, Object, Object, animation_frame_syncer_1.AnimationFrameSyncer]) + ], ActionDispatcher); + return ActionDispatcher; +}()); +exports.ActionDispatcher = ActionDispatcher; +//# sourceMappingURL=action-dispatcher.js.map + +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +function isAction(object) { + return object !== undefined && object.hasOwnProperty('kind') && typeof (object['kind']) === 'string'; +} +exports.isAction = isAction; +//# sourceMappingURL=action.js.map + +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var smodel_factory_1 = __webpack_require__(17); +var SModelStorage = /** @class */ (function () { + function SModelStorage() { + this.localCache = new Map; + } + SModelStorage.prototype.store = function (root) { + if (this.isLocalStorageAvailable()) + localStorage.setItem(this.key, JSON.stringify(root)); + else + this.localCache.set(this.key, JSON.stringify(root)); + }; + SModelStorage.prototype.load = function () { + var schema = (this.isLocalStorageAvailable()) + ? localStorage.getItem(this.key) + : this.localCache.get(this.key); + if (schema) + return JSON.parse(schema); + else + return smodel_factory_1.EMPTY_ROOT; + }; + SModelStorage.prototype.isLocalStorageAvailable = function () { + try { + return typeof localStorage === 'object' && localStorage !== null; + } + catch (e) { + return false; + } + }; + Object.defineProperty(SModelStorage.prototype, "key", { + get: function () { + return this.viewerOptions.baseDiv; + }, + enumerable: true, + configurable: true + }); + __decorate([ + inversify_1.inject(types_1.TYPES.ViewerOptions), + __metadata("design:type", Object) + ], SModelStorage.prototype, "viewerOptions", void 0); + SModelStorage = __decorate([ + inversify_1.injectable() + ], SModelStorage); + return SModelStorage; +}()); +exports.SModelStorage = SModelStorage; +//# sourceMappingURL=smodel-storage.js.map + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var DOMHelper = /** @class */ (function () { + function DOMHelper(viewerOptions) { + this.viewerOptions = viewerOptions; + } + DOMHelper.prototype.getPrefix = function () { + var prefix = this.viewerOptions !== undefined && this.viewerOptions.baseDiv !== undefined ? + this.viewerOptions.baseDiv + "_" : ""; + return prefix; + }; + DOMHelper.prototype.createUniqueDOMElementId = function (element) { + return this.getPrefix() + element.id; + }; + DOMHelper.prototype.findSModelIdByDOMElement = function (element) { + return element.id.replace(this.getPrefix(), ''); + }; + DOMHelper = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.ViewerOptions)), + __metadata("design:paramtypes", [Object]) + ], DOMHelper); + return DOMHelper; +}()); +exports.DOMHelper = DOMHelper; +//# sourceMappingURL=dom-helper.js.map + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var geometry_1 = __webpack_require__(3); +var smodel_1 = __webpack_require__(2); +var model_1 = __webpack_require__(9); +var AbstractLayout = /** @class */ (function () { + function AbstractLayout() { + } + AbstractLayout.prototype.layout = function (container, layouter) { + var boundsData = layouter.getBoundsData(container); + var options = this.getLayoutOptions(container); + var childrenSize = this.getChildrenSize(container, options, layouter); + var maxWidth = options.paddingFactor * (options.resizeContainer + ? childrenSize.width + : Math.max(0, this.getFixedContainerBounds(container, options, layouter).width) - options.paddingLeft - options.paddingRight); + var maxHeight = options.paddingFactor * (options.resizeContainer + ? childrenSize.height + : Math.max(0, this.getFixedContainerBounds(container, options, layouter).height) - options.paddingTop - options.paddingBottom); + if (maxWidth > 0 && maxHeight > 0) { + var offset = this.layoutChildren(container, layouter, options, maxWidth, maxHeight); + boundsData.bounds = this.getFinalContainerBounds(container, offset, options, maxWidth, maxHeight); + boundsData.boundsChanged = true; + } + }; + AbstractLayout.prototype.getFinalContainerBounds = function (container, lastOffset, options, maxWidth, maxHeight) { + return { + x: container.bounds.x, + y: container.bounds.y, + width: maxWidth + options.paddingLeft + options.paddingRight, + height: maxHeight + options.paddingTop + options.paddingBottom + }; + }; + AbstractLayout.prototype.getFixedContainerBounds = function (container, layoutOptions, layouter) { + var currentContainer = container; + while (true) { + if (model_1.isBoundsAware(currentContainer)) { + var bounds = currentContainer.bounds; + if (model_1.isLayoutContainer(currentContainer) && layoutOptions.resizeContainer) + layouter.log.error(currentContainer, 'Resizable container found while detecting fixed bounds'); + if (geometry_1.isValidDimension(bounds)) + return bounds; + } + if (currentContainer instanceof smodel_1.SChildElement) { + currentContainer = currentContainer.parent; + } + else { + layouter.log.error(currentContainer, 'Cannot detect fixed bounds'); + return geometry_1.EMPTY_BOUNDS; + } + } + }; + AbstractLayout.prototype.layoutChildren = function (container, layouter, containerOptions, maxWidth, maxHeight) { + var _this = this; + var currentOffset = { + x: containerOptions.paddingLeft + 0.5 * (maxWidth - (maxWidth / containerOptions.paddingFactor)), + y: containerOptions.paddingTop + 0.5 * (maxHeight - (maxHeight / containerOptions.paddingFactor)) + }; + container.children.forEach(function (child) { + if (model_1.isLayoutableChild(child)) { + var boundsData = layouter.getBoundsData(child); + var bounds = boundsData.bounds; + var childOptions = _this.getChildLayoutOptions(child, containerOptions); + if (bounds !== undefined && geometry_1.isValidDimension(bounds)) { + currentOffset = _this.layoutChild(child, boundsData, bounds, childOptions, containerOptions, currentOffset, maxWidth, maxHeight); + } + } + }); + return currentOffset; + }; + AbstractLayout.prototype.getDx = function (hAlign, bounds, maxWidth) { + switch (hAlign) { + case 'left': + return 0; + case 'center': + return 0.5 * (maxWidth - bounds.width); + case 'right': + return maxWidth - bounds.width; + } + }; + AbstractLayout.prototype.getDy = function (vAlign, bounds, maxHeight) { + switch (vAlign) { + case 'top': + return 0; + case 'center': + return 0.5 * (maxHeight - bounds.height); + case 'bottom': + return maxHeight - bounds.height; + } + }; + AbstractLayout.prototype.getChildLayoutOptions = function (child, containerOptions) { + var layoutOptions = child.layoutOptions; + if (layoutOptions === undefined) + return containerOptions; + else + return this.spread(containerOptions, layoutOptions); + }; + AbstractLayout.prototype.getLayoutOptions = function (element) { + var _this = this; + var current = element; + var allOptions = []; + while (current !== undefined) { + var layoutOptions = current.layoutOptions; + if (layoutOptions !== undefined) + allOptions.push(layoutOptions); + if (current instanceof smodel_1.SChildElement) + current = current.parent; + else + break; + } + return allOptions.reverse().reduce(function (a, b) { return _this.spread(a, b); }, this.getDefaultLayoutOptions()); + }; + return AbstractLayout; +}()); +exports.AbstractLayout = AbstractLayout; +//# sourceMappingURL=abstract-layout.js.map + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var registry_1 = __webpack_require__(53); +var geometry_1 = __webpack_require__(3); +var model_1 = __webpack_require__(9); +var vbox_layout_1 = __webpack_require__(138); +var hbox_layout_1 = __webpack_require__(136); +var stack_layout_1 = __webpack_require__(137); +var LayoutRegistry = /** @class */ (function (_super) { + __extends(LayoutRegistry, _super); + function LayoutRegistry() { + var _this = _super.call(this) || this; + _this.register(vbox_layout_1.VBoxLayouter.KIND, new vbox_layout_1.VBoxLayouter()); + _this.register(hbox_layout_1.HBoxLayouter.KIND, new hbox_layout_1.HBoxLayouter()); + _this.register(stack_layout_1.StackLayouter.KIND, new stack_layout_1.StackLayouter()); + return _this; + } + return LayoutRegistry; +}(registry_1.InstanceRegistry)); +exports.LayoutRegistry = LayoutRegistry; +var Layouter = /** @class */ (function () { + function Layouter(layoutRegistry, logger) { + this.layoutRegistry = layoutRegistry; + this.logger = logger; + } + Layouter.prototype.layout = function (element2boundsData) { + new StatefulLayouter(element2boundsData, this.layoutRegistry, this.logger).layout(); + }; + Layouter = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.LayoutRegistry)), + __param(1, inversify_1.inject(types_1.TYPES.ILogger)), + __metadata("design:paramtypes", [LayoutRegistry, Object]) + ], Layouter); + return Layouter; +}()); +exports.Layouter = Layouter; +var StatefulLayouter = /** @class */ (function () { + function StatefulLayouter(element2boundsData, layoutRegistry, log) { + var _this = this; + this.element2boundsData = element2boundsData; + this.layoutRegistry = layoutRegistry; + this.log = log; + this.toBeLayouted = []; + element2boundsData.forEach(function (data, element) { + if (model_1.isLayoutContainer(element)) + _this.toBeLayouted.push(element); + }); + } + StatefulLayouter.prototype.getBoundsData = function (element) { + var boundsData = this.element2boundsData.get(element); + var bounds = element.bounds; + if (model_1.isLayoutContainer(element) && this.toBeLayouted.indexOf(element) >= 0) { + bounds = this.doLayout(element); + } + if (!boundsData) { + boundsData = { + bounds: bounds, + boundsChanged: false, + alignmentChanged: false + }; + this.element2boundsData.set(element, boundsData); + } + return boundsData; + }; + StatefulLayouter.prototype.layout = function () { + while (this.toBeLayouted.length > 0) { + var element = this.toBeLayouted[0]; + this.doLayout(element); + } + }; + StatefulLayouter.prototype.doLayout = function (element) { + var index = this.toBeLayouted.indexOf(element); + if (index >= 0) + this.toBeLayouted.splice(index, 1); + var layout = this.layoutRegistry.get(element.layout); + if (layout) + layout.layout(element, this); + var boundsData = this.element2boundsData.get(element); + if (boundsData !== undefined && boundsData.bounds !== undefined) { + return boundsData.bounds; + } + else { + this.log.error(element, 'Layout failed'); + return geometry_1.EMPTY_BOUNDS; + } + }; + return StatefulLayouter; +}()); +exports.StatefulLayouter = StatefulLayouter; +//# sourceMappingURL=layout.js.map + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* +* Copyright (C) 2017 TypeFox and others. +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +*/ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var registry_1 = __webpack_require__(53); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var ButtonHandlerRegistry = /** @class */ (function (_super) { + __extends(ButtonHandlerRegistry, _super); + function ButtonHandlerRegistry(buttonHandlerFactories) { + var _this = _super.call(this) || this; + buttonHandlerFactories.forEach(function (factory) { return _this.register(factory.TYPE, new factory()); }); + return _this; + } + ButtonHandlerRegistry = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.multiInject(types_1.TYPES.IButtonHandler)), __param(0, inversify_1.optional()), + __metadata("design:paramtypes", [Array]) + ], ButtonHandlerRegistry); + return ButtonHandlerRegistry; +}(registry_1.InstanceRegistry)); +exports.ButtonHandlerRegistry = ButtonHandlerRegistry; +//# sourceMappingURL=button-handler.js.map + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var model_1 = __webpack_require__(9); +var model_2 = __webpack_require__(51); +var SButton = /** @class */ (function (_super) { + __extends(SButton, _super); + function SButton() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.enabled = true; + return _this; + } + SButton.prototype.hasFeature = function (feature) { + return feature === model_1.boundsFeature || feature === model_2.fadeFeature || feature === model_1.layoutableChildFeature; + }; + return SButton; +}(model_1.SShapeElement)); +exports.SButton = SButton; +//# sourceMappingURL=model.js.map + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.expandFeature = Symbol('expandFeature'); +function isExpandable(element) { + return 'expanded' in element && element.hasFeature(exports.expandFeature); +} +exports.isExpandable = isExpandable; +//# sourceMappingURL=model.js.map + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var animation_1 = __webpack_require__(39); +var smodel_1 = __webpack_require__(2); +var vnode_utils_1 = __webpack_require__(18); +var model_1 = __webpack_require__(51); +var FadeAnimation = /** @class */ (function (_super) { + __extends(FadeAnimation, _super); + function FadeAnimation(model, elementFades, context, removeAfterFadeOut) { + if (removeAfterFadeOut === void 0) { removeAfterFadeOut = false; } + var _this = _super.call(this, context) || this; + _this.model = model; + _this.elementFades = elementFades; + _this.removeAfterFadeOut = removeAfterFadeOut; + return _this; + } + FadeAnimation.prototype.tween = function (t, context) { + for (var _i = 0, _a = this.elementFades; _i < _a.length; _i++) { + var elementFade = _a[_i]; + var element = elementFade.element; + if (elementFade.type === 'in') { + element.opacity = t; + } + else if (elementFade.type === 'out') { + element.opacity = 1 - t; + if (t === 1 && this.removeAfterFadeOut && element instanceof smodel_1.SChildElement) { + element.parent.remove(element); + } + } + } + return this.model; + }; + return FadeAnimation; +}(animation_1.Animation)); +exports.FadeAnimation = FadeAnimation; +var ElementFader = /** @class */ (function () { + function ElementFader() { + } + ElementFader.prototype.decorate = function (vnode, element) { + if (model_1.isFadeable(element)) { + vnode_utils_1.setAttr(vnode, 'opacity', element.opacity); + } + return vnode; + }; + ElementFader.prototype.postUpdate = function () { + }; + ElementFader = __decorate([ + inversify_1.injectable() + ], ElementFader); + return ElementFader; +}()); +exports.ElementFader = ElementFader; +//# sourceMappingURL=fade.js.map + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* +* Copyright (C) 2017 TypeFox and others. +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +*/ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var mouse_tool_1 = __webpack_require__(30); +var smodel_utils_1 = __webpack_require__(13); +var model_1 = __webpack_require__(140); +var OpenAction = /** @class */ (function () { + function OpenAction(elementId) { + this.elementId = elementId; + this.kind = OpenAction.KIND; + } + OpenAction.KIND = 'open'; + return OpenAction; +}()); +exports.OpenAction = OpenAction; +var OpenMouseListener = /** @class */ (function (_super) { + __extends(OpenMouseListener, _super); + function OpenMouseListener() { + return _super !== null && _super.apply(this, arguments) || this; + } + OpenMouseListener.prototype.doubleClick = function (target, event) { + var openableTarget = smodel_utils_1.findParentByFeature(target, model_1.isOpenable); + if (openableTarget !== undefined) { + return [new OpenAction(openableTarget.id)]; + } + return []; + }; + return OpenMouseListener; +}(mouse_tool_1.MouseListener)); +exports.OpenMouseListener = OpenMouseListener; +//# sourceMappingURL=open.js.map + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var browser_1 = __webpack_require__(65); +var key_tool_1 = __webpack_require__(35); +var UndoAction = /** @class */ (function () { + function UndoAction() { + this.kind = UndoAction.KIND; + } + UndoAction.KIND = 'undo'; + return UndoAction; +}()); +exports.UndoAction = UndoAction; +var RedoAction = /** @class */ (function () { + function RedoAction() { + this.kind = RedoAction.KIND; + } + RedoAction.KIND = 'redo'; + return RedoAction; +}()); +exports.RedoAction = RedoAction; +var UndoRedoKeyListener = /** @class */ (function (_super) { + __extends(UndoRedoKeyListener, _super); + function UndoRedoKeyListener() { + return _super !== null && _super.apply(this, arguments) || this; + } + UndoRedoKeyListener.prototype.keyDown = function (element, event) { + if (browser_1.isCtrlOrCmd(event) && event.keyCode === 90) { + if (event.shiftKey) + return [new RedoAction]; + else + return [new UndoAction]; + } + return []; + }; + return UndoRedoKeyListener; +}(key_tool_1.KeyListener)); +exports.UndoRedoKeyListener = UndoRedoKeyListener; +//# sourceMappingURL=undo-redo.js.map + +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var smodel_1 = __webpack_require__(2); +var ModelMatcher = /** @class */ (function () { + function ModelMatcher() { + } + ModelMatcher.prototype.match = function (left, right) { + var result = {}; + this.matchLeft(left, result); + this.matchRight(right, result); + return result; + }; + ModelMatcher.prototype.matchLeft = function (element, result, parentId) { + var match = result[element.id]; + if (match !== undefined) { + match.left = element; + match.leftParentId = parentId; + } + else { + match = { + left: element, + leftParentId: parentId + }; + result[element.id] = match; + } + if (element.children !== undefined) { + for (var _i = 0, _a = element.children; _i < _a.length; _i++) { + var child = _a[_i]; + this.matchLeft(child, result, element.id); + } + } + }; + ModelMatcher.prototype.matchRight = function (element, result, parentId) { + var match = result[element.id]; + if (match !== undefined) { + match.right = element; + match.rightParentId = parentId; + } + else { + match = { + right: element, + rightParentId: parentId + }; + result[element.id] = match; + } + if (element.children !== undefined) { + for (var _i = 0, _a = element.children; _i < _a.length; _i++) { + var child = _a[_i]; + this.matchRight(child, result, element.id); + } + } + }; + return ModelMatcher; +}()); +exports.ModelMatcher = ModelMatcher; +function applyMatches(root, matches) { + var index; + if (root instanceof smodel_1.SModelRoot) { + index = root.index; + } + else { + index = new smodel_1.SModelIndex(); + index.add(root); + } + for (var _i = 0, matches_1 = matches; _i < matches_1.length; _i++) { + var match = matches_1[_i]; + var newElementInserted = false; + if (match.left !== undefined && match.leftParentId !== undefined) { + var parent_1 = index.getById(match.leftParentId); + if (parent_1 !== undefined && parent_1.children !== undefined) { + var i = parent_1.children.indexOf(match.left); + if (i >= 0) { + if (match.right !== undefined && match.leftParentId === match.rightParentId) { + parent_1.children.splice(i, 1, match.right); + newElementInserted = true; + } + else { + parent_1.children.splice(i, 1); + } + } + index.remove(match.left); + } + } + if (!newElementInserted && match.right !== undefined && match.rightParentId !== undefined) { + var parent_2 = index.getById(match.rightParentId); + if (parent_2 !== undefined) { + if (parent_2.children === undefined) + parent_2.children = []; + parent_2.children.push(match.right); + } + } + } +} +exports.applyMatches = applyMatches; +//# sourceMappingURL=model-matching.js.map + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var geometry_1 = __webpack_require__(3); +var animation_1 = __webpack_require__(39); +var command_1 = __webpack_require__(8); +var fade_1 = __webpack_require__(94); +var smodel_1 = __webpack_require__(2); +var move_1 = __webpack_require__(64); +var model_1 = __webpack_require__(51); +var model_2 = __webpack_require__(41); +var model_3 = __webpack_require__(9); +var viewport_root_1 = __webpack_require__(100); +var model_4 = __webpack_require__(31); +var model_matching_1 = __webpack_require__(97); +var resize_1 = __webpack_require__(253); +/** + * Sent from the model source to the client in order to update the model. If no model is present yet, + * this behaves the same as a SetModelAction. The transition from the old model to the new one can be animated. + */ +var UpdateModelAction = /** @class */ (function () { + function UpdateModelAction(newRoot) { + this.newRoot = newRoot; + this.kind = UpdateModelCommand.KIND; + this.animate = true; + } + return UpdateModelAction; +}()); +exports.UpdateModelAction = UpdateModelAction; +var UpdateModelCommand = /** @class */ (function (_super) { + __extends(UpdateModelCommand, _super); + function UpdateModelCommand(action) { + var _this = _super.call(this) || this; + _this.action = action; + if (action.animate === undefined) + action.animate = true; + return _this; + } + UpdateModelCommand.prototype.execute = function (context) { + var newRoot; + if (this.action.newRoot !== undefined) { + newRoot = context.modelFactory.createRoot(this.action.newRoot); + } + else { + newRoot = context.modelFactory.createRoot(context.root); + if (this.action.matches !== undefined) + this.applyMatches(newRoot, this.action.matches, context); + } + this.oldRoot = context.root; + this.newRoot = newRoot; + return this.performUpdate(this.oldRoot, this.newRoot, context); + }; + UpdateModelCommand.prototype.performUpdate = function (oldRoot, newRoot, context) { + if (this.action.animate && oldRoot.id === newRoot.id) { + var matchResult = void 0; + if (this.action.matches === undefined) { + var matcher = new model_matching_1.ModelMatcher(); + matchResult = matcher.match(oldRoot, newRoot); + } + else { + matchResult = this.convertToMatchResult(this.action.matches, oldRoot, newRoot); + } + var animationOrRoot = this.computeAnimation(newRoot, matchResult, context); + if (animationOrRoot instanceof animation_1.Animation) + return animationOrRoot.start(); + else + return animationOrRoot; + } + else { + newRoot.canvasBounds = oldRoot.canvasBounds; + return newRoot; + } + }; + UpdateModelCommand.prototype.applyMatches = function (root, matches, context) { + var index = root.index; + for (var _i = 0, matches_1 = matches; _i < matches_1.length; _i++) { + var match = matches_1[_i]; + if (match.left !== undefined) { + var element = index.getById(match.left.id); + if (element instanceof smodel_1.SChildElement) + element.parent.remove(element); + } + if (match.right !== undefined) { + var element = context.modelFactory.createElement(match.right); + var parent_1 = void 0; + if (match.rightParentId !== undefined) + parent_1 = index.getById(match.rightParentId); + if (parent_1 instanceof smodel_1.SParentElement) + parent_1.add(element); + else + root.add(element); + } + } + }; + UpdateModelCommand.prototype.convertToMatchResult = function (matches, leftRoot, rightRoot) { + var result = {}; + for (var _i = 0, matches_2 = matches; _i < matches_2.length; _i++) { + var match = matches_2[_i]; + var converted = {}; + var id = undefined; + if (match.left !== undefined) { + id = match.left.id; + converted.left = leftRoot.index.getById(id); + converted.leftParentId = match.leftParentId; + } + if (match.right !== undefined) { + id = match.right.id; + converted.right = rightRoot.index.getById(id); + converted.rightParentId = match.rightParentId; + } + if (id !== undefined) + result[id] = converted; + } + return result; + }; + UpdateModelCommand.prototype.computeAnimation = function (newRoot, matchResult, context) { + var animationData = { + fades: [] + }; + for (var id in matchResult) { + var match = matchResult[id]; + if (match.left !== undefined && match.right !== undefined) { + // The element is still there, but may have been moved + this.updateElement(match.left, match.right, animationData); + } + else if (match.right !== undefined) { + // An element has been added + var right = match.right; + if (model_1.isFadeable(right)) { + right.opacity = 0; + animationData.fades.push({ + element: right, + type: 'in' + }); + } + } + else if (match.left instanceof smodel_1.SChildElement) { + // An element has been removed + var left = match.left; + if (model_1.isFadeable(left) && match.leftParentId !== undefined) { + if (newRoot.index.getById(left.id) === undefined) { + var parent_2 = newRoot.index.getById(match.leftParentId); + if (parent_2 instanceof smodel_1.SParentElement) { + var leftCopy = context.modelFactory.createElement(left); + parent_2.add(leftCopy); + animationData.fades.push({ + element: leftCopy, + type: 'out' + }); + } + } + } + } + } + var animations = this.createAnimations(animationData, newRoot, context); + if (animations.length >= 2) { + return new animation_1.CompoundAnimation(newRoot, context, animations); + } + else if (animations.length === 1) { + return animations[0]; + } + else { + return newRoot; + } + }; + UpdateModelCommand.prototype.updateElement = function (left, right, animationData) { + if (model_2.isLocateable(left) && model_2.isLocateable(right)) { + var leftPos = left.position; + var rightPos = right.position; + if (!geometry_1.almostEquals(leftPos.x, rightPos.x) || !geometry_1.almostEquals(leftPos.y, rightPos.y)) { + if (animationData.moves === undefined) + animationData.moves = []; + animationData.moves.push({ + element: right, + elementId: right.id, + fromPosition: leftPos, + toPosition: rightPos + }); + right.position = leftPos; + } + } + if (model_3.isBoundsAware(left) && model_3.isBoundsAware(right)) { + if (!geometry_1.isValidDimension(right.bounds)) { + right.bounds = { + x: right.bounds.x, + y: right.bounds.y, + width: left.bounds.width, + height: left.bounds.height + }; + } + else if (!geometry_1.almostEquals(left.bounds.width, right.bounds.width) + || !geometry_1.almostEquals(left.bounds.height, right.bounds.height)) { + if (animationData.resizes === undefined) + animationData.resizes = []; + animationData.resizes.push({ + element: right, + fromDimension: { + width: left.bounds.width, + height: left.bounds.height, + }, + toDimension: { + width: right.bounds.width, + height: right.bounds.height, + } + }); + } + } + if (model_4.isSelectable(left) && model_4.isSelectable(right)) { + right.selected = left.selected; + } + if (left instanceof smodel_1.SModelRoot && right instanceof smodel_1.SModelRoot) { + right.canvasBounds = left.canvasBounds; + } + if (left instanceof viewport_root_1.ViewportRootElement && right instanceof viewport_root_1.ViewportRootElement) { + right.scroll = left.scroll; + right.zoom = left.zoom; + } + }; + UpdateModelCommand.prototype.createAnimations = function (data, root, context) { + var animations = []; + if (data.fades.length > 0) { + animations.push(new fade_1.FadeAnimation(root, data.fades, context, true)); + } + if (data.moves !== undefined && data.moves.length > 0) { + var movesMap = new Map; + for (var _i = 0, _a = data.moves; _i < _a.length; _i++) { + var move = _a[_i]; + movesMap.set(move.elementId, move); + } + animations.push(new move_1.MoveAnimation(root, movesMap, context, false)); + } + if (data.resizes !== undefined && data.resizes.length > 0) { + var resizesMap = new Map; + for (var _b = 0, _c = data.resizes; _b < _c.length; _b++) { + var resize = _c[_b]; + resizesMap.set(resize.element.id, resize); + } + animations.push(new resize_1.ResizeAnimation(root, resizesMap, context, false)); + } + return animations; + }; + UpdateModelCommand.prototype.undo = function (context) { + return this.performUpdate(this.newRoot, this.oldRoot, context); + }; + UpdateModelCommand.prototype.redo = function (context) { + return this.performUpdate(this.oldRoot, this.newRoot, context); + }; + UpdateModelCommand.KIND = 'updateModel'; + UpdateModelCommand = __decorate([ + inversify_1.injectable(), + __metadata("design:paramtypes", [UpdateModelAction]) + ], UpdateModelCommand); + return UpdateModelCommand; +}(command_1.Command)); +exports.UpdateModelCommand = UpdateModelCommand; +//# sourceMappingURL=update-model.js.map + +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var geometry_1 = __webpack_require__(3); +var browser_1 = __webpack_require__(65); +var smodel_1 = __webpack_require__(2); +var command_1 = __webpack_require__(8); +var key_tool_1 = __webpack_require__(35); +var model_1 = __webpack_require__(9); +var model_2 = __webpack_require__(31); +var viewport_1 = __webpack_require__(42); +var model_3 = __webpack_require__(32); +/** + * Triggered when the user requests the viewer to center on the current model. The resulting + * CenterCommand changes the scroll setting of the viewport accordingly and resets the zoom to its default. + * This action can also be sent from the model source to the client in order to perform such a + * viewport change programmatically. + */ +var CenterAction = /** @class */ (function () { + function CenterAction(elementIds, animate) { + if (animate === void 0) { animate = true; } + this.elementIds = elementIds; + this.animate = animate; + this.kind = CenterCommand.KIND; + } + return CenterAction; +}()); +exports.CenterAction = CenterAction; +/** + * Triggered when the user requests the viewer to fit its content to the available drawing area. + * The resulting FitToScreenCommand changes the zoom and scroll settings of the viewport so the model + * can be shown completely. This action can also be sent from the model source to the client in order + * to perform such a viewport change programmatically. + */ +var FitToScreenAction = /** @class */ (function () { + function FitToScreenAction(elementIds, padding, maxZoom, animate) { + if (animate === void 0) { animate = true; } + this.elementIds = elementIds; + this.padding = padding; + this.maxZoom = maxZoom; + this.animate = animate; + this.kind = FitToScreenCommand.KIND; + } + return FitToScreenAction; +}()); +exports.FitToScreenAction = FitToScreenAction; +var BoundsAwareViewportCommand = /** @class */ (function (_super) { + __extends(BoundsAwareViewportCommand, _super); + function BoundsAwareViewportCommand(animate) { + var _this = _super.call(this) || this; + _this.animate = animate; + return _this; + } + BoundsAwareViewportCommand.prototype.initialize = function (model) { + var _this = this; + if (model_3.isViewport(model)) { + this.oldViewport = { + scroll: model.scroll, + zoom: model.zoom + }; + var allBounds_1 = []; + this.getElementIds().forEach(function (id) { + var element = model.index.getById(id); + if (element && model_1.isBoundsAware(element)) + allBounds_1.push(_this.boundsInViewport(element, element.bounds, model)); + }); + if (allBounds_1.length === 0) { + model.index.all().forEach(function (element) { + if (model_2.isSelectable(element) && element.selected && model_1.isBoundsAware(element)) + allBounds_1.push(_this.boundsInViewport(element, element.bounds, model)); + }); + } + if (allBounds_1.length === 0) { + model.index.all().forEach(function (element) { + if (model_1.isBoundsAware(element)) + allBounds_1.push(_this.boundsInViewport(element, element.bounds, model)); + }); + } + var bounds = allBounds_1.reduce(function (b0, b1) { return b0 === undefined ? b1 : geometry_1.combine(b0, b1); }, undefined); + if (geometry_1.isValidDimension(bounds)) + this.newViewport = this.getNewViewport(bounds, model); + } + }; + BoundsAwareViewportCommand.prototype.boundsInViewport = function (element, bounds, viewport) { + if (element instanceof smodel_1.SChildElement && element.parent !== viewport) + return this.boundsInViewport(element.parent, element.parent.localToParent(bounds), viewport); + else + return bounds; + }; + BoundsAwareViewportCommand.prototype.execute = function (context) { + this.initialize(context.root); + return this.redo(context); + }; + BoundsAwareViewportCommand.prototype.undo = function (context) { + var model = context.root; + if (model_3.isViewport(model) && this.newViewport && !this.equal(this.newViewport, this.oldViewport)) { + if (this.animate) + return new viewport_1.ViewportAnimation(model, this.newViewport, this.oldViewport, context).start(); + else { + model.scroll = this.oldViewport.scroll; + model.zoom = this.oldViewport.zoom; + } + } + return model; + }; + BoundsAwareViewportCommand.prototype.redo = function (context) { + var model = context.root; + if (model_3.isViewport(model) && this.newViewport && !this.equal(this.newViewport, this.oldViewport)) { + if (this.animate) { + return new viewport_1.ViewportAnimation(model, this.oldViewport, this.newViewport, context).start(); + } + else { + model.scroll = this.newViewport.scroll; + model.zoom = this.newViewport.zoom; + } + } + return model; + }; + BoundsAwareViewportCommand.prototype.equal = function (vp1, vp2) { + return vp1.zoom === vp2.zoom && vp1.scroll.x === vp2.scroll.x && vp1.scroll.y === vp2.scroll.y; + }; + return BoundsAwareViewportCommand; +}(command_1.Command)); +exports.BoundsAwareViewportCommand = BoundsAwareViewportCommand; +var CenterCommand = /** @class */ (function (_super) { + __extends(CenterCommand, _super); + function CenterCommand(action) { + var _this = _super.call(this, action.animate) || this; + _this.action = action; + return _this; + } + CenterCommand.prototype.getElementIds = function () { + return this.action.elementIds; + }; + CenterCommand.prototype.getNewViewport = function (bounds, model) { + var c = geometry_1.center(bounds); + return { + scroll: { + x: c.x - 0.5 * model.canvasBounds.width, + y: c.y - 0.5 * model.canvasBounds.height + }, + zoom: 1 + }; + }; + CenterCommand.KIND = 'center'; + return CenterCommand; +}(BoundsAwareViewportCommand)); +exports.CenterCommand = CenterCommand; +var FitToScreenCommand = /** @class */ (function (_super) { + __extends(FitToScreenCommand, _super); + function FitToScreenCommand(action) { + var _this = _super.call(this, action.animate) || this; + _this.action = action; + return _this; + } + FitToScreenCommand.prototype.getElementIds = function () { + return this.action.elementIds; + }; + FitToScreenCommand.prototype.getNewViewport = function (bounds, model) { + var c = geometry_1.center(bounds); + var delta = this.action.padding === undefined + ? 0 + : 2 * this.action.padding; + var zoom = Math.min(model.canvasBounds.width / (bounds.width + delta), model.canvasBounds.height / bounds.height + delta); + if (this.action.maxZoom !== undefined) + zoom = Math.min(zoom, this.action.maxZoom); + return { + scroll: { + x: c.x - 0.5 * model.canvasBounds.width / zoom, + y: c.y - 0.5 * model.canvasBounds.height / zoom + }, + zoom: zoom + }; + }; + FitToScreenCommand.KIND = 'fit'; + return FitToScreenCommand; +}(BoundsAwareViewportCommand)); +exports.FitToScreenCommand = FitToScreenCommand; +var CenterKeyboardListener = /** @class */ (function (_super) { + __extends(CenterKeyboardListener, _super); + function CenterKeyboardListener() { + return _super !== null && _super.apply(this, arguments) || this; + } + CenterKeyboardListener.prototype.keyDown = function (element, event) { + if (browser_1.isCtrlOrCmd(event)) { + switch (event.keyCode) { + case 67: + return [new CenterAction([])]; + case 70: + return [new FitToScreenAction([])]; + } + } + return []; + }; + return CenterKeyboardListener; +}(key_tool_1.KeyListener)); +exports.CenterKeyboardListener = CenterKeyboardListener; +//# sourceMappingURL=center-fit.js.map + +/***/ }), +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var geometry_1 = __webpack_require__(3); +var smodel_1 = __webpack_require__(2); +var model_1 = __webpack_require__(32); +var model_2 = __webpack_require__(62); +/** + * Model root element that defines a viewport, so it transforms the coordinate system with + * a `scroll` translation and a `zoom` scaling. + */ +var ViewportRootElement = /** @class */ (function (_super) { + __extends(ViewportRootElement, _super); + function ViewportRootElement() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.scroll = { x: 0, y: 0 }; + _this.zoom = 1; + _this.export = false; + return _this; + } + ViewportRootElement.prototype.hasFeature = function (feature) { + return feature === model_1.viewportFeature || feature === model_2.exportFeature; + }; + ViewportRootElement.prototype.localToParent = function (point) { + var result = { + x: (point.x - this.scroll.x) * this.zoom, + y: (point.y - this.scroll.y) * this.zoom, + width: -1, + height: -1 + }; + if (geometry_1.isBounds(point)) { + result.width = point.width * this.zoom; + result.height = point.height * this.zoom; + } + return result; + }; + ViewportRootElement.prototype.parentToLocal = function (point) { + var result = { + x: (point.x / this.zoom) + this.scroll.x, + y: (point.y / this.zoom) + this.scroll.y, + width: -1, + height: -1 + }; + if (geometry_1.isBounds(point) && geometry_1.isValidDimension(point)) { + result.width = point.width / this.zoom; + result.height = point.height / this.zoom; + } + return result; + }; + return ViewportRootElement; +}(smodel_1.SModelRoot)); +exports.ViewportRootElement = ViewportRootElement; +//# sourceMappingURL=viewport-root.js.map + +/***/ }), +/* 101 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var smodel_1 = __webpack_require__(2); +var model_1 = __webpack_require__(9); +var model_2 = __webpack_require__(51); +var model_3 = __webpack_require__(63); +var model_4 = __webpack_require__(41); +var model_5 = __webpack_require__(31); +var viewport_root_1 = __webpack_require__(100); +var geometry_1 = __webpack_require__(3); +var model_6 = __webpack_require__(9); +/** + * Root element for graph-like models. + */ +var SGraph = /** @class */ (function (_super) { + __extends(SGraph, _super); + function SGraph() { + return _super !== null && _super.apply(this, arguments) || this; + } + return SGraph; +}(viewport_root_1.ViewportRootElement)); +exports.SGraph = SGraph; +/** + * Model element class for nodes, which are connectable entities in a graph. A node can be connected to + * another node via an SEdge. Such a connection can be direct, i.e. the node is the source or target of + * the edge, or indirect through a port, i.e. it contains an SPort which is the source or target of the edge. + */ +var SNode = /** @class */ (function (_super) { + __extends(SNode, _super); + function SNode() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.hoverFeedback = false; + _this.selected = false; + _this.opacity = 1; + return _this; + } + SNode.prototype.hasFeature = function (feature) { + return feature === model_5.selectFeature || feature === model_4.moveFeature || feature === model_1.boundsFeature + || feature === model_1.layoutContainerFeature || feature === model_2.fadeFeature || feature === model_3.hoverFeedbackFeature + || feature === model_3.popupFeature; + }; + return SNode; +}(model_6.SShapeElement)); +exports.SNode = SNode; +/** + * A port is a connection point for edges. It should always be contained in an SNode. + */ +var SPort = /** @class */ (function (_super) { + __extends(SPort, _super); + function SPort() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.hoverFeedback = false; + _this.selected = false; + _this.opacity = 1; + return _this; + } + SPort.prototype.hasFeature = function (feature) { + return feature === model_5.selectFeature || feature === model_1.boundsFeature || feature === model_2.fadeFeature + || feature === model_3.hoverFeedbackFeature; + }; + return SPort; +}(model_6.SShapeElement)); +exports.SPort = SPort; +/** + * Model element class for edges, which are the connectors in a graph. An edge has a source and a target, + * each of which can be either a node or a port. The source and target elements are referenced via their + * ids and can be resolved with the index stored in the root element. + */ +var SEdge = /** @class */ (function (_super) { + __extends(SEdge, _super); + function SEdge() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.routingPoints = []; + _this.opacity = 1; + return _this; + } + Object.defineProperty(SEdge.prototype, "source", { + get: function () { + return this.index.getById(this.sourceId); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SEdge.prototype, "target", { + get: function () { + return this.index.getById(this.targetId); + }, + enumerable: true, + configurable: true + }); + SEdge.prototype.hasFeature = function (feature) { + return feature === model_2.fadeFeature; + }; + return SEdge; +}(smodel_1.SChildElement)); +exports.SEdge = SEdge; +/** + * A label can be attached to a node, edge, or port, and contains some text to be rendered in its view. + */ +var SLabel = /** @class */ (function (_super) { + __extends(SLabel, _super); + function SLabel() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.selected = false; + _this.alignment = geometry_1.ORIGIN_POINT; + _this.opacity = 1; + return _this; + } + SLabel.prototype.hasFeature = function (feature) { + return feature === model_1.boundsFeature || feature === model_1.alignFeature || feature === model_2.fadeFeature || feature === model_1.layoutableChildFeature; + }; + return SLabel; +}(model_6.SShapeElement)); +exports.SLabel = SLabel; +/** + * A compartment is used to group multiple child elements such as labels of a node. Usually a `vbox` + * or `hbox` layout is used to arrange these children. + */ +var SCompartment = /** @class */ (function (_super) { + __extends(SCompartment, _super); + function SCompartment() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.opacity = 1; + return _this; + } + SCompartment.prototype.hasFeature = function (feature) { + return feature === model_1.boundsFeature || feature === model_1.layoutContainerFeature || feature === model_1.layoutableChildFeature || feature === model_2.fadeFeature; + }; + return SCompartment; +}(model_6.SShapeElement)); +exports.SCompartment = SCompartment; +//# sourceMappingURL=sgraph.js.map + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var action_handler_1 = __webpack_require__(38); +var set_model_1 = __webpack_require__(49); +var svg_exporter_1 = __webpack_require__(40); +/** + * A model source is serving the model to the event cycle. It represents + * the entry point to the client for external sources, such as model + * editors. + * + * As an IActionHandler it listens to actions in and reacts to them with + * commands or actions if necessary. This way, you can implement action + * protocols between the client and the outside world. + * + * There are two default implementations for a ModelSource: + * <ul> + * <li>the LocalModelSource handles the actions to calculate bounds and + * set/update the model</li> + * <li>the DiagramServer connects via websocket to a remote source. It + * can be used to connect to a model editor that provides the model, + * layouts diagrams, transfers selection and answers model queries from + * the client.</li> + */ +var ModelSource = /** @class */ (function () { + function ModelSource(actionDispatcher, actionHandlerRegistry, viewerOptions) { + this.actionDispatcher = actionDispatcher; + this.viewerOptions = viewerOptions; + this.initialize(actionHandlerRegistry); + } + ModelSource.prototype.initialize = function (registry) { + // Register model manipulation commands + registry.registerCommand(set_model_1.SetModelCommand); + // Register this model source + registry.register(set_model_1.RequestModelAction.KIND, this); + registry.register(svg_exporter_1.ExportSvgAction.KIND, this); + }; + ModelSource = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.IActionDispatcher)), + __param(1, inversify_1.inject(types_1.TYPES.ActionHandlerRegistry)), + __param(2, inversify_1.inject(types_1.TYPES.ViewerOptions)), + __metadata("design:paramtypes", [Object, action_handler_1.ActionHandlerRegistry, Object]) + ], ModelSource); + return ModelSource; +}()); +exports.ModelSource = ModelSource; +//# sourceMappingURL=model-source.js.map + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var LogLevel; +(function (LogLevel) { + LogLevel[LogLevel["none"] = 0] = "none"; + LogLevel[LogLevel["error"] = 1] = "error"; + LogLevel[LogLevel["warn"] = 2] = "warn"; + LogLevel[LogLevel["info"] = 3] = "info"; + LogLevel[LogLevel["log"] = 4] = "log"; +})(LogLevel = exports.LogLevel || (exports.LogLevel = {})); +var NullLogger = /** @class */ (function () { + function NullLogger() { + this.logLevel = LogLevel.none; + } + NullLogger.prototype.error = function (thisArg, message) { + var params = []; + for (var _i = 2; _i < arguments.length; _i++) { + params[_i - 2] = arguments[_i]; + } + }; + NullLogger.prototype.warn = function (thisArg, message) { + var params = []; + for (var _i = 2; _i < arguments.length; _i++) { + params[_i - 2] = arguments[_i]; + } + }; + NullLogger.prototype.info = function (thisArg, message) { + var params = []; + for (var _i = 2; _i < arguments.length; _i++) { + params[_i - 2] = arguments[_i]; + } + }; + NullLogger.prototype.log = function (thisArg, message) { + var params = []; + for (var _i = 2; _i < arguments.length; _i++) { + params[_i - 2] = arguments[_i]; + } + }; + NullLogger = __decorate([ + inversify_1.injectable() + ], NullLogger); + return NullLogger; +}()); +exports.NullLogger = NullLogger; +var ConsoleLogger = /** @class */ (function () { + function ConsoleLogger(logLevel, viewOptions) { + if (logLevel === void 0) { logLevel = LogLevel.log; } + if (viewOptions === void 0) { viewOptions = { baseDiv: '' }; } + this.logLevel = logLevel; + this.viewOptions = viewOptions; + } + ConsoleLogger.prototype.error = function (thisArg, message) { + var params = []; + for (var _i = 2; _i < arguments.length; _i++) { + params[_i - 2] = arguments[_i]; + } + if (this.logLevel >= LogLevel.error) + try { + console.error.apply(thisArg, this.consoleArguments(thisArg, message, params)); + } + catch (error) { } + }; + ConsoleLogger.prototype.warn = function (thisArg, message) { + var params = []; + for (var _i = 2; _i < arguments.length; _i++) { + params[_i - 2] = arguments[_i]; + } + if (this.logLevel >= LogLevel.warn) + try { + console.warn.apply(thisArg, this.consoleArguments(thisArg, message, params)); + } + catch (error) { } + }; + ConsoleLogger.prototype.info = function (thisArg, message) { + var params = []; + for (var _i = 2; _i < arguments.length; _i++) { + params[_i - 2] = arguments[_i]; + } + if (this.logLevel >= LogLevel.info) + try { + console.info.apply(thisArg, this.consoleArguments(thisArg, message, params)); + } + catch (error) { } + }; + ConsoleLogger.prototype.log = function (thisArg, message) { + var params = []; + for (var _i = 2; _i < arguments.length; _i++) { + params[_i - 2] = arguments[_i]; + } + if (this.logLevel >= LogLevel.log) + try { + console.log.apply(thisArg, this.consoleArguments(thisArg, message, params)); + } + catch (error) { } + }; + ConsoleLogger.prototype.consoleArguments = function (thisArg, message, params) { + var caller; + if (typeof thisArg === 'object') + caller = thisArg.constructor.name; + else + caller = thisArg; + var date = new Date(); + return [date.toLocaleTimeString() + ' ' + this.viewOptions.baseDiv + ' ' + caller + ': ' + message].concat(params); + }; + ConsoleLogger = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.LogLevel)), + __param(1, inversify_1.inject(types_1.TYPES.ViewerOptions)), + __metadata("design:paramtypes", [Number, Object]) + ], ConsoleLogger); + return ConsoleLogger; +}()); +exports.ConsoleLogger = ConsoleLogger; +//# sourceMappingURL=logging.js.map + +/***/ }), +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { + +var document = __webpack_require__(6).document; +module.exports = document && document.documentElement; + + +/***/ }), +/* 105 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(23) && !__webpack_require__(24)(function () { + return Object.defineProperty(__webpack_require__(68)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.8 IsRegExp(argument) +var isObject = __webpack_require__(14); +var cof = __webpack_require__(36); +var MATCH = __webpack_require__(4)('match'); +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; + + +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +var ITERATOR = __webpack_require__(4)('iterator'); +var SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } + +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; + + +/***/ }), +/* 108 */ +/***/ (function(module, exports) { + +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = __webpack_require__(54); + +function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +} + +module.exports.f = function (C) { + return new PromiseCapability(C); +}; + + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +var pIE = __webpack_require__(75); +var createDesc = __webpack_require__(58); +var toIObject = __webpack_require__(33); +var toPrimitive = __webpack_require__(80); +var has = __webpack_require__(25); +var IE8_DOM_DEFINE = __webpack_require__(105); +var gOPD = Object.getOwnPropertyDescriptor; + +exports.f = __webpack_require__(23) ? gOPD : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return gOPD(O, P); + } catch (e) { /* empty */ } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); +}; + + +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(113); +var hiddenKeys = __webpack_require__(69).concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + + +/***/ }), +/* 112 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), +/* 113 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(25); +var toIObject = __webpack_require__(33); +var arrayIndexOf = __webpack_require__(157)(false); +var IE_PROTO = __webpack_require__(77)('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + + +/***/ }), +/* 114 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(6); +var dP = __webpack_require__(27); +var DESCRIPTORS = __webpack_require__(23); +var SPECIES = __webpack_require__(4)('species'); + +module.exports = function (KEY) { + var C = global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; + + +/***/ }), +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(59); +var defined = __webpack_require__(22); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + + +/***/ }), +/* 116 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(37); +var invoke = __webpack_require__(162); +var html = __webpack_require__(104); +var cel = __webpack_require__(68); +var global = __webpack_require__(6); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function (event) { + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(36)(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; + + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(59); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + + +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(14); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; + + +/***/ }), +/* 119 */ +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__(4); + + +/***/ }), +/* 120 */ +/***/ (function(module, exports, __webpack_require__) { + +var $iterators = __webpack_require__(182); +var getKeys = __webpack_require__(57); +var redefine = __webpack_require__(28); +var global = __webpack_require__(6); +var hide = __webpack_require__(26); +var Iterators = __webpack_require__(43); +var wks = __webpack_require__(4); +var ITERATOR = wks('iterator'); +var TO_STRING_TAG = wks('toStringTag'); +var ArrayValues = Iterators.Array; + +var DOMIterables = { + CSSRuleList: true, // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false +}; + +for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + var key; + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); + } +} + + +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/* FileSaver.js + * A saveAs() FileSaver implementation. + * 1.3.2 + * 2016-06-16 18:25:19 + * + * By Eli Grey, http://eligrey.com + * License: MIT + * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md + */ + +/*global self */ +/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */ + +/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ + +var saveAs = saveAs || (function(view) { + "use strict"; + // IE <10 is explicitly unsupported + if (typeof view === "undefined" || typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) { + return; + } + var + doc = view.document + // only get URL when necessary in case Blob.js hasn't overridden it yet + , get_URL = function() { + return view.URL || view.webkitURL || view; + } + , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a") + , can_use_save_link = "download" in save_link + , click = function(node) { + var event = new MouseEvent("click"); + node.dispatchEvent(event); + } + , is_safari = /constructor/i.test(view.HTMLElement) || view.safari + , is_chrome_ios =/CriOS\/[\d]+/.test(navigator.userAgent) + , throw_outside = function(ex) { + (view.setImmediate || view.setTimeout)(function() { + throw ex; + }, 0); + } + , force_saveable_type = "application/octet-stream" + // the Blob API is fundamentally broken as there is no "downloadfinished" event to subscribe to + , arbitrary_revoke_timeout = 1000 * 40 // in ms + , revoke = function(file) { + var revoker = function() { + if (typeof file === "string") { // file is an object URL + get_URL().revokeObjectURL(file); + } else { // file is a File + file.remove(); + } + }; + setTimeout(revoker, arbitrary_revoke_timeout); + } + , dispatch = function(filesaver, event_types, event) { + event_types = [].concat(event_types); + var i = event_types.length; + while (i--) { + var listener = filesaver["on" + event_types[i]]; + if (typeof listener === "function") { + try { + listener.call(filesaver, event || filesaver); + } catch (ex) { + throw_outside(ex); + } + } + } + } + , auto_bom = function(blob) { + // prepend BOM for UTF-8 XML and text/* types (including HTML) + // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF + if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) { + return new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type}); + } + return blob; + } + , FileSaver = function(blob, name, no_auto_bom) { + if (!no_auto_bom) { + blob = auto_bom(blob); + } + // First try a.download, then web filesystem, then object URLs + var + filesaver = this + , type = blob.type + , force = type === force_saveable_type + , object_url + , dispatch_all = function() { + dispatch(filesaver, "writestart progress write writeend".split(" ")); + } + // on any filesys errors revert to saving with object URLs + , fs_error = function() { + if ((is_chrome_ios || (force && is_safari)) && view.FileReader) { + // Safari doesn't allow downloading of blob urls + var reader = new FileReader(); + reader.onloadend = function() { + var url = is_chrome_ios ? reader.result : reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;'); + var popup = view.open(url, '_blank'); + if(!popup) view.location.href = url; + url=undefined; // release reference before dispatching + filesaver.readyState = filesaver.DONE; + dispatch_all(); + }; + reader.readAsDataURL(blob); + filesaver.readyState = filesaver.INIT; + return; + } + // don't create more object URLs than needed + if (!object_url) { + object_url = get_URL().createObjectURL(blob); + } + if (force) { + view.location.href = object_url; + } else { + var opened = view.open(object_url, "_blank"); + if (!opened) { + // Apple does not allow window.open, see https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/WorkingwithWindowsandTabs/WorkingwithWindowsandTabs.html + view.location.href = object_url; + } + } + filesaver.readyState = filesaver.DONE; + dispatch_all(); + revoke(object_url); + } + ; + filesaver.readyState = filesaver.INIT; + + if (can_use_save_link) { + object_url = get_URL().createObjectURL(blob); + setTimeout(function() { + save_link.href = object_url; + save_link.download = name; + click(save_link); + dispatch_all(); + revoke(object_url); + filesaver.readyState = filesaver.DONE; + }); + return; + } + + fs_error(); + } + , FS_proto = FileSaver.prototype + , saveAs = function(blob, name, no_auto_bom) { + return new FileSaver(blob, name || blob.name || "download", no_auto_bom); + } + ; + // IE 10+ (native saveAs) + if (typeof navigator !== "undefined" && navigator.msSaveOrOpenBlob) { + return function(blob, name, no_auto_bom) { + name = name || blob.name || "download"; + + if (!no_auto_bom) { + blob = auto_bom(blob); + } + return navigator.msSaveOrOpenBlob(blob, name); + }; + } + + FS_proto.abort = function(){}; + FS_proto.readyState = FS_proto.INIT = 0; + FS_proto.WRITING = 1; + FS_proto.DONE = 2; + + FS_proto.error = + FS_proto.onwritestart = + FS_proto.onprogress = + FS_proto.onwrite = + FS_proto.onabort = + FS_proto.onerror = + FS_proto.onwriteend = + null; + + return saveAs; +}( + typeof self !== "undefined" && self + || typeof window !== "undefined" && window + || this.content +)); +// `self` is undefined in Firefox for Android content script context +// while `this` is nsIContentFrameMessageManager +// with an attribute `content` that corresponds to the window + +if (typeof module !== "undefined" && module.exports) { + module.exports.saveAs = saveAs; +} else if (("function" !== "undefined" && __webpack_require__(307) !== null) && (__webpack_require__(308) !== null)) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { + return saveAs; + }.call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +} + + +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var error_msgs_1 = __webpack_require__(12); +var METADATA_KEY = __webpack_require__(5); +var metadata_1 = __webpack_require__(16); +var decorator_utils_1 = __webpack_require__(29); +var LazyServiceIdentifer = (function () { + function LazyServiceIdentifer(cb) { + this._cb = cb; + } + LazyServiceIdentifer.prototype.unwrap = function () { + return this._cb(); + }; + return LazyServiceIdentifer; +}()); +exports.LazyServiceIdentifer = LazyServiceIdentifer; +function inject(serviceIdentifier) { + return function (target, targetKey, index) { + if (serviceIdentifier === undefined) { + throw new Error(error_msgs_1.UNDEFINED_INJECT_ANNOTATION(target.name)); + } + var metadata = new metadata_1.Metadata(METADATA_KEY.INJECT_TAG, serviceIdentifier); + if (typeof index === "number") { + decorator_utils_1.tagParameter(target, targetKey, index, metadata); + } + else { + decorator_utils_1.tagProperty(target, targetKey, metadata); + } + }; +} +exports.inject = inject; + + +/***/ }), +/* 123 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var METADATA_KEY = __webpack_require__(5); +var MetadataReader = (function () { + function MetadataReader() { + } + MetadataReader.prototype.getConstructorMetadata = function (constructorFunc) { + var compilerGeneratedMetadata = Reflect.getMetadata(METADATA_KEY.PARAM_TYPES, constructorFunc); + var userGeneratedMetadata = Reflect.getMetadata(METADATA_KEY.TAGGED, constructorFunc); + return { + compilerGeneratedMetadata: compilerGeneratedMetadata, + userGeneratedMetadata: userGeneratedMetadata || {} + }; + }; + MetadataReader.prototype.getPropertiesMetadata = function (constructorFunc) { + var userGeneratedMetadata = Reflect.getMetadata(METADATA_KEY.TAGGED_PROP, constructorFunc) || []; + return userGeneratedMetadata; + }; + return MetadataReader; +}()); +exports.MetadataReader = MetadataReader; + + +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var METADATA_KEY = __webpack_require__(5); +var guid_1 = __webpack_require__(34); +var metadata_1 = __webpack_require__(16); +var queryable_string_1 = __webpack_require__(230); +var Target = (function () { + function Target(type, name, serviceIdentifier, namedOrTagged) { + this.guid = guid_1.guid(); + this.type = type; + this.serviceIdentifier = serviceIdentifier; + this.name = new queryable_string_1.QueryableString(name || ""); + this.metadata = new Array(); + var metadataItem = null; + if (typeof namedOrTagged === "string") { + metadataItem = new metadata_1.Metadata(METADATA_KEY.NAMED_TAG, namedOrTagged); + } + else if (namedOrTagged instanceof metadata_1.Metadata) { + metadataItem = namedOrTagged; + } + if (metadataItem !== null) { + this.metadata.push(metadataItem); + } + } + Target.prototype.hasTag = function (key) { + for (var _i = 0, _a = this.metadata; _i < _a.length; _i++) { + var m = _a[_i]; + if (m.key === key) { + return true; + } + } + return false; + }; + Target.prototype.isArray = function () { + return this.hasTag(METADATA_KEY.MULTI_INJECT_TAG); + }; + Target.prototype.matchesArray = function (name) { + return this.matchesTag(METADATA_KEY.MULTI_INJECT_TAG)(name); + }; + Target.prototype.isNamed = function () { + return this.hasTag(METADATA_KEY.NAMED_TAG); + }; + Target.prototype.isTagged = function () { + return this.metadata.some(function (m) { + return (m.key !== METADATA_KEY.INJECT_TAG) && + (m.key !== METADATA_KEY.MULTI_INJECT_TAG) && + (m.key !== METADATA_KEY.NAME_TAG) && + (m.key !== METADATA_KEY.UNMANAGED_TAG) && + (m.key !== METADATA_KEY.NAMED_TAG); + }); + }; + Target.prototype.isOptional = function () { + return this.matchesTag(METADATA_KEY.OPTIONAL_TAG)(true); + }; + Target.prototype.getNamedTag = function () { + if (this.isNamed()) { + return this.metadata.filter(function (m) { return m.key === METADATA_KEY.NAMED_TAG; })[0]; + } + return null; + }; + Target.prototype.getCustomTags = function () { + if (this.isTagged()) { + return this.metadata.filter(function (m) { + return (m.key !== METADATA_KEY.INJECT_TAG) && + (m.key !== METADATA_KEY.MULTI_INJECT_TAG) && + (m.key !== METADATA_KEY.NAME_TAG) && + (m.key !== METADATA_KEY.UNMANAGED_TAG) && + (m.key !== METADATA_KEY.NAMED_TAG); + }); + } + return null; + }; + Target.prototype.matchesNamedTag = function (name) { + return this.matchesTag(METADATA_KEY.NAMED_TAG)(name); + }; + Target.prototype.matchesTag = function (key) { + var _this = this; + return function (value) { + for (var _i = 0, _a = _this.metadata; _i < _a.length; _i++) { + var m = _a[_i]; + if (m.key === key && m.value === value) { + return true; + } + } + return false; + }; + }; + return Target; +}()); +exports.Target = Target; + + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var binding_on_syntax_1 = __webpack_require__(83); +var binding_when_syntax_1 = __webpack_require__(84); +var BindingWhenOnSyntax = (function () { + function BindingWhenOnSyntax(binding) { + this._binding = binding; + this._bindingWhenSyntax = new binding_when_syntax_1.BindingWhenSyntax(this._binding); + this._bindingOnSyntax = new binding_on_syntax_1.BindingOnSyntax(this._binding); + } + BindingWhenOnSyntax.prototype.when = function (constraint) { + return this._bindingWhenSyntax.when(constraint); + }; + BindingWhenOnSyntax.prototype.whenTargetNamed = function (name) { + return this._bindingWhenSyntax.whenTargetNamed(name); + }; + BindingWhenOnSyntax.prototype.whenTargetIsDefault = function () { + return this._bindingWhenSyntax.whenTargetIsDefault(); + }; + BindingWhenOnSyntax.prototype.whenTargetTagged = function (tag, value) { + return this._bindingWhenSyntax.whenTargetTagged(tag, value); + }; + BindingWhenOnSyntax.prototype.whenInjectedInto = function (parent) { + return this._bindingWhenSyntax.whenInjectedInto(parent); + }; + BindingWhenOnSyntax.prototype.whenParentNamed = function (name) { + return this._bindingWhenSyntax.whenParentNamed(name); + }; + BindingWhenOnSyntax.prototype.whenParentTagged = function (tag, value) { + return this._bindingWhenSyntax.whenParentTagged(tag, value); + }; + BindingWhenOnSyntax.prototype.whenAnyAncestorIs = function (ancestor) { + return this._bindingWhenSyntax.whenAnyAncestorIs(ancestor); + }; + BindingWhenOnSyntax.prototype.whenNoAncestorIs = function (ancestor) { + return this._bindingWhenSyntax.whenNoAncestorIs(ancestor); + }; + BindingWhenOnSyntax.prototype.whenAnyAncestorNamed = function (name) { + return this._bindingWhenSyntax.whenAnyAncestorNamed(name); + }; + BindingWhenOnSyntax.prototype.whenAnyAncestorTagged = function (tag, value) { + return this._bindingWhenSyntax.whenAnyAncestorTagged(tag, value); + }; + BindingWhenOnSyntax.prototype.whenNoAncestorNamed = function (name) { + return this._bindingWhenSyntax.whenNoAncestorNamed(name); + }; + BindingWhenOnSyntax.prototype.whenNoAncestorTagged = function (tag, value) { + return this._bindingWhenSyntax.whenNoAncestorTagged(tag, value); + }; + BindingWhenOnSyntax.prototype.whenAnyAncestorMatches = function (constraint) { + return this._bindingWhenSyntax.whenAnyAncestorMatches(constraint); + }; + BindingWhenOnSyntax.prototype.whenNoAncestorMatches = function (constraint) { + return this._bindingWhenSyntax.whenNoAncestorMatches(constraint); + }; + BindingWhenOnSyntax.prototype.onActivation = function (handler) { + return this._bindingOnSyntax.onActivation(handler); + }; + return BindingWhenOnSyntax; +}()); +exports.BindingWhenOnSyntax = BindingWhenOnSyntax; + + +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var METADATA_KEY = __webpack_require__(5); +var metadata_1 = __webpack_require__(16); +var traverseAncerstors = function (request, constraint) { + var parent = request.parentRequest; + if (parent !== null) { + return constraint(parent) ? true : traverseAncerstors(parent, constraint); + } + else { + return false; + } +}; +exports.traverseAncerstors = traverseAncerstors; +var taggedConstraint = function (key) { return function (value) { + var constraint = function (request) { + return request !== null && request.target !== null && request.target.matchesTag(key)(value); + }; + constraint.metaData = new metadata_1.Metadata(key, value); + return constraint; +}; }; +exports.taggedConstraint = taggedConstraint; +var namedConstraint = taggedConstraint(METADATA_KEY.NAMED_TAG); +exports.namedConstraint = namedConstraint; +var typeConstraint = function (type) { return function (request) { + var binding = null; + if (request !== null) { + binding = request.bindings[0]; + if (typeof type === "string") { + var serviceIdentifier = binding.serviceIdentifier; + return serviceIdentifier === type; + } + else { + var constructor = request.bindings[0].implementationType; + return type === constructor; + } + } + return false; +}; }; +exports.typeConstraint = typeConstraint; + + +/***/ }), +/* 127 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var ERROR_MSGS = __webpack_require__(12); +function isStackOverflowExeption(error) { + return (error instanceof RangeError || + error.message === ERROR_MSGS.STACK_OVERFLOW); +} +exports.isStackOverflowExeption = isStackOverflowExeption; + + +/***/ }), +/* 128 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +function vnode(sel, data, children, text, elm) { + var key = data === undefined ? undefined : data.key; + return { sel: sel, data: data, children: children, + text: text, elm: elm, key: key }; +} +exports.vnode = vnode; +exports.default = vnode; +//# sourceMappingURL=vnode.js.map + +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Slows down animations towards the begin and the end. + * + * @param x the value between 0 (start of animation) and 1 (end of + * animation) linearly interpolated in time. + * @returns {number} the eased value between 0 and 1 + */ +function easeInOut(x) { + if (x < 0.5) + return x * x * 2; + else + return 1 - (1 - x) * (1 - x) * 2; +} +exports.easeInOut = easeInOut; +//# sourceMappingURL=easing.js.map + +/***/ }), +/* 130 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var smodel_factory_1 = __webpack_require__(17); +var animation_frame_syncer_1 = __webpack_require__(48); +var command_1 = __webpack_require__(8); +/** + * The implementation of the ICommandStack. Clients should not use this + * class directly. + * + * The command stack holds the current model as the result of the current + * promise. When a new command is executed/undone/redone, its execution is + * chained using <code>Promise#then()</code> to the current Promise. This + * way we can handle long running commands without blocking the current + * thread. + * + * The command stack also does the special handling for special commands: + * + * System commands should be transparent to the user and as such be + * automatically undone/redone with the next plain command. Additional care + * must be taken that system commands that are executed after undo don't + * break the correspondence between the topmost commands on the undo and + * redo stacks. + * + * Hidden commands only tell the viewer to render a hidden model such that + * its bounds can be extracted from the DOM and forwarded as separate actions. + * Hidden commands should not leave any trace on the undo/redo/off stacks. + * + * Mergeable commands should be merged with their predecessor if possible, + * such that e.g. multiple subsequent moves of the smae element can be undone + * in one single step. + */ +var CommandStack = /** @class */ (function () { + function CommandStack(modelFactory, viewerProvider, logger, syncer, options) { + this.modelFactory = modelFactory; + this.viewerProvider = viewerProvider; + this.logger = logger; + this.syncer = syncer; + this.options = options; + this.undoStack = []; + this.redoStack = []; + /** + * System commands should be transparent to the user in undo/redo + * operations. When a system command is executed when the redo + * stack is not empty, it is pushed to offStack instead. + * + * On redo, all commands form this stack are undone such that the + * redo operation gets the exact same model as when it was executed + * first. + * + * On undo, all commands form this stack are undone as well as + * system ommands should be transparent to the user. + */ + this.offStack = []; + this.currentPromise = Promise.resolve({ + root: modelFactory.createRoot(smodel_factory_1.EMPTY_ROOT), + hiddenRoot: undefined, + popupRoot: undefined, + rootChanged: false, + hiddenRootChanged: false, + popupChanged: false + }); + } + CommandStack.prototype.executeAll = function (commands) { + var _this = this; + commands.forEach(function (command) { + _this.logger.log(_this, 'Executing', command); + _this.handleCommand(command, command.execute, _this.mergeOrPush); + }); + return this.thenUpdate(); + }; + CommandStack.prototype.execute = function (command) { + this.logger.log(this, 'Executing', command); + this.handleCommand(command, command.execute, this.mergeOrPush); + return this.thenUpdate(); + }; + CommandStack.prototype.undo = function () { + var _this = this; + this.undoOffStackSystemCommands(); + this.undoPreceedingSystemCommands(); + var command = this.undoStack.pop(); + if (command !== undefined) { + this.logger.log(this, 'Undoing', command); + this.handleCommand(command, command.undo, function (command, context) { + _this.redoStack.push(command); + }); + } + return this.thenUpdate(); + }; + CommandStack.prototype.redo = function () { + var _this = this; + this.undoOffStackSystemCommands(); + var command = this.redoStack.pop(); + if (command !== undefined) { + this.logger.log(this, 'Redoing', command); + this.handleCommand(command, command.redo, function (command, context) { + _this.pushToUndoStack(command); + }); + } + this.redoFollowingSystemCommands(); + return this.thenUpdate(); + }; + /** + * Chains the current promise with another Promise that performs the + * given operation on the given command. + * + * @param beforeResolve a function that is called directly before + * resolving the Promise to return the new model. Usually puts the + * command on the appropriate stack. + */ + CommandStack.prototype.handleCommand = function (command, operation, beforeResolve) { + var _this = this; + this.currentPromise = this.currentPromise.then(function (state) { + var promise = new Promise(function (resolve, reject) { + var context = _this.createContext(state.root); + var newResult; + try { + newResult = operation.call(command, context); + } + catch (error) { + _this.logger.error(_this, "Failed to execute command:", error); + newResult = state.root; + } + if (command instanceof command_1.HiddenCommand) { + resolve(__assign({}, state, { + hiddenRoot: newResult, + hiddenRootChanged: true + })); + } + else if (command instanceof command_1.PopupCommand) { + resolve(__assign({}, state, { + popupRoot: newResult, + popupChanged: true + })); + } + else if (newResult instanceof Promise) { + newResult.then(function (newModel) { + beforeResolve.call(_this, command, context); + resolve(__assign({}, state, { + root: newModel, + rootChanged: true + })); + }); + } + else { + beforeResolve.call(_this, command, context); + resolve(__assign({}, state, { + root: newResult, + rootChanged: true + })); + } + }); + return promise; + }); + }; + CommandStack.prototype.pushToUndoStack = function (command) { + this.undoStack.push(command); + if (this.options.undoHistoryLimit >= 0 && this.undoStack.length > this.options.undoHistoryLimit) + this.undoStack.splice(0, this.undoStack.length - this.options.undoHistoryLimit); + }; + /** + * Notifies the Viewer to render the new model and/or the new hidden model + * and returns a Promise for the new model. + */ + CommandStack.prototype.thenUpdate = function () { + var _this = this; + this.currentPromise = this.currentPromise.then(function (state) { + if (state.hiddenRootChanged && state.hiddenRoot !== undefined) + _this.updateHidden(state.hiddenRoot); + if (state.rootChanged) + _this.update(state.root); + if (state.popupChanged && state.popupRoot !== undefined) + _this.updatePopup(state.popupRoot); + return { + root: state.root, + hiddenRoot: undefined, + popupRoot: undefined, + rootChanged: false, + hiddenRootChanged: false, + popupChanged: false + }; + }); + return this.currentPromise.then(function (state) { return state.root; }); + }; + /** + * Notify the <code>Viewer</code> that the model has changed. + */ + CommandStack.prototype.updatePopup = function (model) { + var _this = this; + if (this.viewer) { + this.viewer.updatePopup(model); + return; + } + this.viewerProvider().then(function (viewer) { + _this.viewer = viewer; + _this.updatePopup(model); + }); + }; + /** + * Notify the <code>Viewer</code> that the model has changed. + */ + CommandStack.prototype.update = function (model) { + var _this = this; + if (this.viewer) { + this.viewer.update(model); + return; + } + this.viewerProvider().then(function (viewer) { + _this.viewer = viewer; + _this.update(model); + }); + }; + /** + * Notify the <code>Viewer</code> that the hidden model has changed. + */ + CommandStack.prototype.updateHidden = function (model) { + var _this = this; + if (this.viewer) { + this.viewer.updateHidden(model); + return; + } + this.viewerProvider().then(function (viewer) { + _this.viewer = viewer; + _this.updateHidden(model); + }); + }; + /** + * Handling of commands after their execution. + * + * Hidden commands are not pushed to any stack. + * + * System commands are pushed to the <code>offStack</code> when the redo + * stack is not empty, allowing to undo the before a redo to keep the chain + * of commands consistent. + * + * Mergable commands are merged if possible. + */ + CommandStack.prototype.mergeOrPush = function (command, context) { + var _this = this; + if (command instanceof command_1.HiddenCommand) + return; + if (command instanceof command_1.SystemCommand && this.redoStack.length > 0) { + this.offStack.push(command); + } + else { + this.offStack.forEach(function (command) { return _this.undoStack.push(command); }); + this.offStack = []; + this.redoStack = []; + if (this.undoStack.length > 0) { + var lastCommand = this.undoStack[this.undoStack.length - 1]; + if (lastCommand instanceof command_1.MergeableCommand && lastCommand.merge(command, context)) + return; + } + this.pushToUndoStack(command); + } + }; + /** + * Reverts all system commands on the offStack. + */ + CommandStack.prototype.undoOffStackSystemCommands = function () { + var command = this.offStack.pop(); + while (command !== undefined) { + this.logger.log(this, 'Undoing off-stack', command); + this.handleCommand(command, command.undo, function () { }); + command = this.offStack.pop(); + } + }; + /** + * System commands should be transparent to the user, so this method + * is called from <code>undo()</code> to revert all system commands + * at the top of the undoStack. + */ + CommandStack.prototype.undoPreceedingSystemCommands = function () { + var _this = this; + var command = this.undoStack[this.undoStack.length - 1]; + while (command !== undefined && command instanceof command_1.SystemCommand) { + this.undoStack.pop(); + this.logger.log(this, 'Undoing', command); + this.handleCommand(command, command.undo, function (command, context) { + _this.redoStack.push(command); + }); + command = this.undoStack[this.undoStack.length - 1]; + } + }; + /** + * System commands should be transparent to the user, so this method + * is called from <code>redo()</code> to re-execute all system commands + * at the top of the redoStack. + */ + CommandStack.prototype.redoFollowingSystemCommands = function () { + var _this = this; + var command = this.redoStack[this.redoStack.length - 1]; + while (command !== undefined && command instanceof command_1.SystemCommand) { + this.redoStack.pop(); + this.logger.log(this, 'Redoing ', command); + this.handleCommand(command, command.redo, function (command, context) { + _this.pushToUndoStack(command); + }); + command = this.redoStack[this.redoStack.length - 1]; + } + }; + /** + * Assembles the context object that is passed to the commands execution method. + */ + CommandStack.prototype.createContext = function (currentModel) { + var context = { + root: currentModel, + modelChanged: this, + modelFactory: this.modelFactory, + duration: this.options.defaultDuration, + logger: this.logger, + syncer: this.syncer + }; + return context; + }; + CommandStack = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.IModelFactory)), + __param(1, inversify_1.inject(types_1.TYPES.IViewerProvider)), + __param(2, inversify_1.inject(types_1.TYPES.ILogger)), + __param(3, inversify_1.inject(types_1.TYPES.AnimationFrameSyncer)), + __param(4, inversify_1.inject(types_1.TYPES.CommandStackOptions)), + __metadata("design:paramtypes", [Object, Function, Object, animation_frame_syncer_1.AnimationFrameSyncer, Object]) + ], CommandStack); + return CommandStack; +}()); +exports.CommandStack = CommandStack; +//# sourceMappingURL=command-stack.js.map + +/***/ }), +/* 131 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var snabbdom_1 = __webpack_require__(149); +/** + * An view that avoids calculation and patching of VNodes unless some model properties have changed. + * Based on snabbdom's thunks. + */ +var ThunkView = /** @class */ (function () { + function ThunkView() { + } + ThunkView.prototype.render = function (model, context) { + var _this = this; + return snabbdom_1.h(this.selector(model), { + key: model.id, + hook: { + init: this.init.bind(this), + prepatch: this.prepatch.bind(this) + }, + fn: function () { return _this.renderAndDecorate(model, context); }, + args: this.watchedArgs(model), + thunk: true + }); + }; + ThunkView.prototype.renderAndDecorate = function (model, context) { + var vnode = this.doRender(model, context); + context.decorate(vnode, model); + return vnode; + }; + ThunkView.prototype.copyToThunk = function (vnode, thunk) { + thunk.elm = vnode.elm; + vnode.data.fn = thunk.data.fn; + vnode.data.args = thunk.data.args; + thunk.data = vnode.data; + thunk.children = vnode.children; + thunk.text = vnode.text; + thunk.elm = vnode.elm; + }; + ThunkView.prototype.init = function (thunk) { + var cur = thunk.data; + var vnode = cur.fn.apply(undefined, cur.args); + this.copyToThunk(vnode, thunk); + }; + ThunkView.prototype.prepatch = function (oldVnode, thunk) { + var old = oldVnode.data, cur = thunk.data; + if (!this.equals(old.args, cur.args)) + this.copyToThunk(cur.fn.apply(undefined, cur.args), thunk); + else + this.copyToThunk(oldVnode, thunk); + }; + ThunkView.prototype.equals = function (oldArg, newArg) { + if (Array.isArray(oldArg) && Array.isArray(newArg)) { + if (oldArg.length !== newArg.length) + return false; + for (var i = 0; i < newArg.length; ++i) { + if (!this.equals(oldArg[i], newArg[i])) + return false; + } + } + else if (typeof oldArg === 'object' && typeof newArg === 'object') { + if (Object.keys(oldArg).length !== Object.keys(newArg).length) + return false; + for (var key in oldArg) { + if (key !== 'parent' && key !== 'root' && (!(key in newArg) || !this.equals(oldArg[key], newArg[key]))) + return false; + } + } + else if (oldArg !== newArg) { + return false; + } + return true; + }; + return ThunkView; +}()); +exports.ThunkView = ThunkView; +function isThunk(vnode) { + return 'thunk' in vnode; +} +exports.isThunk = isThunk; +//# sourceMappingURL=thunk-view.js.map + +/***/ }), +/* 132 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var snabbdom = __webpack_require__(7); +var inversify_1 = __webpack_require__(0); +var smodel_factory_1 = __webpack_require__(17); +var registry_1 = __webpack_require__(53); +var geometry_1 = __webpack_require__(3); +var JSX = { createElement: snabbdom.svg }; +/** + * Allows to look up the IView for a given SModelElement based on its type. + */ +var ViewRegistry = /** @class */ (function (_super) { + __extends(ViewRegistry, _super); + function ViewRegistry() { + var _this = _super.call(this) || this; + _this.registerDefaults(); + return _this; + } + ViewRegistry.prototype.registerDefaults = function () { + this.register(smodel_factory_1.EMPTY_ROOT.type, EmptyView); + }; + ViewRegistry.prototype.missing = function (key, element) { + return new MissingView(); + }; + ViewRegistry = __decorate([ + inversify_1.injectable(), + __metadata("design:paramtypes", []) + ], ViewRegistry); + return ViewRegistry; +}(registry_1.ProviderRegistry)); +exports.ViewRegistry = ViewRegistry; +var EmptyView = /** @class */ (function () { + function EmptyView() { + } + EmptyView.prototype.render = function (model, context) { + return JSX.createElement("svg", { "class-sprotty-empty": true }); + }; + return EmptyView; +}()); +exports.EmptyView = EmptyView; +var MissingView = /** @class */ (function () { + function MissingView() { + } + MissingView.prototype.render = function (model, context) { + var position = model.position || geometry_1.ORIGIN_POINT; + return JSX.createElement("text", { "class-sprotty-missing": true, x: position.x, y: position.y }, + "?", + model.id, + "?"); + }; + return MissingView; +}()); +exports.MissingView = MissingView; +//# sourceMappingURL=view.js.map + +/***/ }), +/* 133 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var animation_frame_syncer_1 = __webpack_require__(48); +/** + * Updating the view is rather expensive, and it doesn't make sense to calculate + * more then one update per animation (rendering) frame. So this class batches + * all incoming model changes and only renders the last one when the next animation + * frame comes. + */ +var ViewerCache = /** @class */ (function () { + function ViewerCache(delegate, syncer) { + this.delegate = delegate; + this.syncer = syncer; + } + ViewerCache.prototype.isCacheEmpty = function () { + return this.cachedModelRoot === undefined && this.cachedHiddenModelRoot === undefined && + this.cachedPopup === undefined; + }; + ViewerCache.prototype.updatePopup = function (model) { + var isCacheEmpty = this.isCacheEmpty(); + this.cachedPopup = model; + if (isCacheEmpty) + this.scheduleUpdate(); + }; + ViewerCache.prototype.update = function (model) { + var isCacheEmpty = this.isCacheEmpty(); + this.cachedModelRoot = model; + if (isCacheEmpty) + this.scheduleUpdate(); + }; + ViewerCache.prototype.updateHidden = function (hiddenModel) { + var isCacheEmpty = this.isCacheEmpty(); + this.cachedHiddenModelRoot = hiddenModel; + if (isCacheEmpty) + this.scheduleUpdate(); + }; + ViewerCache.prototype.scheduleUpdate = function () { + var _this = this; + this.syncer.onEndOfNextFrame(function () { + if (_this.cachedHiddenModelRoot) { + var nextHiddenModelRoot = _this.cachedHiddenModelRoot; + _this.delegate.updateHidden(nextHiddenModelRoot); + _this.cachedHiddenModelRoot = undefined; + } + if (_this.cachedModelRoot) { + var nextModelRoot = _this.cachedModelRoot; + _this.delegate.update(nextModelRoot); + _this.cachedModelRoot = undefined; + } + if (_this.cachedPopup) { + var nextModelRoot = _this.cachedPopup; + _this.delegate.updatePopup(nextModelRoot); + _this.cachedPopup = undefined; + } + }); + }; + ViewerCache = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.IViewer)), __param(0, inversify_1.named('delegate')), + __param(1, inversify_1.inject(types_1.TYPES.AnimationFrameSyncer)), + __metadata("design:paramtypes", [Object, animation_frame_syncer_1.AnimationFrameSyncer]) + ], ViewerCache); + return ViewerCache; +}()); +exports.ViewerCache = ViewerCache; +//# sourceMappingURL=viewer-cache.js.map + +/***/ }), +/* 134 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var snabbdom = __webpack_require__(7); +var snabbdom_1 = __webpack_require__(149); +var props_1 = __webpack_require__(282); +var attributes_1 = __webpack_require__(279); +var style_1 = __webpack_require__(283); +var eventlisteners_1 = __webpack_require__(281); +var class_1 = __webpack_require__(280); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var geometry_1 = __webpack_require__(3); +var initialize_canvas_1 = __webpack_require__(60); +var vnode_utils_1 = __webpack_require__(18); +var thunk_view_1 = __webpack_require__(131); +var smodel_factory_1 = __webpack_require__(17); +var JSX = { createElement: snabbdom.html }; // must be html here, as we're creating a div +var ModelRenderer = /** @class */ (function () { + function ModelRenderer(viewRegistry, decorators) { + this.viewRegistry = viewRegistry; + this.decorators = decorators; + } + ModelRenderer.prototype.decorate = function (vnode, element) { + if (thunk_view_1.isThunk(vnode)) + return vnode; + return this.decorators.reduce(function (n, decorator) { return decorator.decorate(n, element); }, vnode); + }; + ModelRenderer.prototype.renderElement = function (element) { + var vNode = this.viewRegistry.get(element.type, element).render(element, this); + return this.decorate(vNode, element); + }; + ModelRenderer.prototype.renderChildren = function (element) { + var _this = this; + return element.children.map(function (child) { return _this.renderElement(child); }); + }; + ModelRenderer.prototype.postUpdate = function () { + this.decorators.forEach(function (decorator) { return decorator.postUpdate(); }); + }; + return ModelRenderer; +}()); +exports.ModelRenderer = ModelRenderer; +/** + * The component that turns the model into an SVG DOM. + * Uses a VDOM based on snabbdom.js for performance. + */ +var Viewer = /** @class */ (function () { + function Viewer(modelRendererFactory, decorators, hiddenDecorators, popupDecorators, options, logger, actiondispatcher) { + var _this = this; + this.decorators = decorators; + this.hiddenDecorators = hiddenDecorators; + this.popupDecorators = popupDecorators; + this.options = options; + this.logger = logger; + this.actiondispatcher = actiondispatcher; + this.onWindowResize = function (vdom) { + var baseDiv = document.getElementById(_this.options.baseDiv); + if (baseDiv !== null) { + var newBounds = _this.getBoundsInPage(baseDiv); + _this.actiondispatcher.dispatch(new initialize_canvas_1.InitializeCanvasBoundsAction(newBounds)); + } + }; + this.patcher = this.createPatcher(); + this.renderer = modelRendererFactory(decorators); + this.hiddenRenderer = modelRendererFactory(hiddenDecorators); + this.popupRenderer = modelRendererFactory(popupDecorators); + } + Viewer.prototype.createModules = function () { + return [ + props_1.propsModule, + attributes_1.attributesModule, + class_1.classModule, + style_1.styleModule, + eventlisteners_1.eventListenersModule + ]; + }; + Viewer.prototype.createPatcher = function () { + return snabbdom_1.init(this.createModules()); + }; + Viewer.prototype.getBoundsInPage = function (element) { + var bounds = element.getBoundingClientRect(); + var scroll = typeof window !== 'undefined' ? { x: window.scrollX, y: window.scrollY } : geometry_1.ORIGIN_POINT; + return { + x: bounds.left + scroll.x, + y: bounds.top + scroll.y, + width: bounds.width, + height: bounds.height + }; + }; + Viewer.prototype.update = function (model) { + var _this = this; + this.logger.log(this, 'rendering', model); + var newVDOM = JSX.createElement("div", { id: this.options.baseDiv }, this.renderer.renderElement(model)); + if (this.lastVDOM !== undefined) { + var hadFocus = this.hasFocus(); + vnode_utils_1.copyClassesFromVNode(this.lastVDOM, newVDOM); + this.lastVDOM = this.patcher.call(this, this.lastVDOM, newVDOM); + this.restoreFocus(hadFocus); + } + else if (typeof document !== 'undefined') { + var placeholder = document.getElementById(this.options.baseDiv); + if (placeholder !== null) { + if (typeof window !== 'undefined') { + window.addEventListener('resize', function () { + _this.onWindowResize(newVDOM); + }); + } + vnode_utils_1.copyClassesFromElement(placeholder, newVDOM); + vnode_utils_1.setClass(newVDOM, this.options.baseClass, true); + this.lastVDOM = this.patcher.call(this, placeholder, newVDOM); + } + else { + this.logger.error(this, 'element not in DOM:', this.options.baseDiv); + } + } + this.renderer.postUpdate(); + }; + Viewer.prototype.hasFocus = function () { + if (typeof document !== 'undefined' && document.activeElement && this.lastVDOM.children && this.lastVDOM.children.length > 0) { + var lastRootVNode = this.lastVDOM.children[0]; + if (typeof lastRootVNode === 'object') { + var lastElement = lastRootVNode.elm; + return document.activeElement === lastElement; + } + } + return false; + }; + Viewer.prototype.restoreFocus = function (focus) { + if (focus && this.lastVDOM.children && this.lastVDOM.children.length > 0) { + var lastRootVNode = this.lastVDOM.children[0]; + if (typeof lastRootVNode === 'object') { + var lastElement = lastRootVNode.elm; + if (lastElement && typeof lastElement.focus === 'function') + lastElement.focus(); + } + } + }; + Viewer.prototype.updateHidden = function (hiddenModel) { + this.logger.log(this, 'rendering hidden'); + var newVDOM; + if (hiddenModel.type === smodel_factory_1.EMPTY_ROOT.type) { + newVDOM = JSX.createElement("div", { id: this.options.hiddenDiv }); + } + else { + var hiddenVNode = this.hiddenRenderer.renderElement(hiddenModel); + vnode_utils_1.setAttr(hiddenVNode, 'opacity', 0); + newVDOM = JSX.createElement("div", { id: this.options.hiddenDiv }, hiddenVNode); + } + if (this.lastHiddenVDOM !== undefined) { + vnode_utils_1.copyClassesFromVNode(this.lastHiddenVDOM, newVDOM); + this.lastHiddenVDOM = this.patcher.call(this, this.lastHiddenVDOM, newVDOM); + } + else { + var placeholder = document.getElementById(this.options.hiddenDiv); + if (placeholder === null) { + placeholder = document.createElement("div"); + document.body.appendChild(placeholder); + } + else { + vnode_utils_1.copyClassesFromElement(placeholder, newVDOM); + } + vnode_utils_1.setClass(newVDOM, this.options.baseClass, true); + vnode_utils_1.setClass(newVDOM, this.options.hiddenClass, true); + this.lastHiddenVDOM = this.patcher.call(this, placeholder, newVDOM); + } + this.hiddenRenderer.postUpdate(); + }; + Viewer.prototype.updatePopup = function (model) { + this.logger.log(this, 'rendering popup', model); + var popupClosed = model.type === smodel_factory_1.EMPTY_ROOT.type; + var newVDOM; + if (popupClosed) { + newVDOM = JSX.createElement("div", { id: this.options.popupDiv }); + } + else { + var position = model.canvasBounds; + var inlineStyle = { + top: position.y + 'px', + left: position.x + 'px' + }; + newVDOM = JSX.createElement("div", { id: this.options.popupDiv, style: inlineStyle }, this.popupRenderer.renderElement(model)); + } + if (this.lastPopupVDOM !== undefined) { + vnode_utils_1.copyClassesFromVNode(this.lastPopupVDOM, newVDOM); + vnode_utils_1.setClass(newVDOM, this.options.popupClosedClass, popupClosed); + this.lastPopupVDOM = this.patcher.call(this, this.lastPopupVDOM, newVDOM); + } + else if (typeof document !== 'undefined') { + var placeholder = document.getElementById(this.options.popupDiv); + if (placeholder === null) { + placeholder = document.createElement("div"); + document.body.appendChild(placeholder); + } + else { + vnode_utils_1.copyClassesFromElement(placeholder, newVDOM); + } + vnode_utils_1.setClass(newVDOM, this.options.popupClass, true); + vnode_utils_1.setClass(newVDOM, this.options.popupClosedClass, popupClosed); + this.lastPopupVDOM = this.patcher.call(this, placeholder, newVDOM); + } + this.popupRenderer.postUpdate(); + }; + Viewer = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.ModelRendererFactory)), + __param(1, inversify_1.multiInject(types_1.TYPES.IVNodeDecorator)), __param(1, inversify_1.optional()), + __param(2, inversify_1.multiInject(types_1.TYPES.HiddenVNodeDecorator)), __param(2, inversify_1.optional()), + __param(3, inversify_1.multiInject(types_1.TYPES.PopupVNodeDecorator)), __param(3, inversify_1.optional()), + __param(4, inversify_1.inject(types_1.TYPES.ViewerOptions)), + __param(5, inversify_1.inject(types_1.TYPES.ILogger)), + __param(6, inversify_1.inject(types_1.TYPES.IActionDispatcher)), + __metadata("design:paramtypes", [Function, Array, Array, Array, Object, Object, Object]) + ], Viewer); + return Viewer; +}()); +exports.Viewer = Viewer; +//# sourceMappingURL=viewer.js.map + +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var vnode_utils_1 = __webpack_require__(18); +var FocusFixDecorator = /** @class */ (function () { + function FocusFixDecorator() { + } + FocusFixDecorator_1 = FocusFixDecorator; + FocusFixDecorator.prototype.decorate = function (vnode, element) { + if (vnode.sel && vnode.sel.startsWith('svg')) + // allows to set focus in Firefox + vnode_utils_1.setAttr(vnode, 'tabindex', ++FocusFixDecorator_1.tabIndex); + return vnode; + }; + FocusFixDecorator.prototype.postUpdate = function () { + }; + FocusFixDecorator.tabIndex = 1000; + FocusFixDecorator = FocusFixDecorator_1 = __decorate([ + inversify_1.injectable() + ], FocusFixDecorator); + return FocusFixDecorator; + var FocusFixDecorator_1; +}()); +exports.FocusFixDecorator = FocusFixDecorator; +//# sourceMappingURL=vnode-decorators.js.map + +/***/ }), +/* 136 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var geometry_1 = __webpack_require__(3); +var abstract_layout_1 = __webpack_require__(89); +/** + * Layouts children of a container in horizontal (left->right) direction. + */ +var HBoxLayouter = /** @class */ (function (_super) { + __extends(HBoxLayouter, _super); + function HBoxLayouter() { + return _super !== null && _super.apply(this, arguments) || this; + } + HBoxLayouter.prototype.getChildrenSize = function (container, containerOptions, layouter) { + var maxWidth = 0; + var maxHeight = -1; + var isFirst = true; + container.children.forEach(function (child) { + var bounds = layouter.getBoundsData(child).bounds; + if (bounds !== undefined && geometry_1.isValidDimension(bounds)) { + if (isFirst) + isFirst = false; + else + maxWidth += containerOptions.hGap; + maxWidth += bounds.width; + maxHeight = Math.max(maxHeight, bounds.height); + } + }); + return { + width: maxWidth, + height: maxHeight + }; + }; + HBoxLayouter.prototype.layoutChild = function (child, boundsData, bounds, childOptions, containerOptions, currentOffset, maxWidth, maxHeight) { + var dy = this.getDy(childOptions.vAlign, bounds, maxHeight); + boundsData.bounds = { + x: currentOffset.x + child.bounds.x - bounds.x, + y: containerOptions.paddingTop + child.bounds.y - bounds.y + dy, + width: bounds.width, + height: bounds.height + }; + boundsData.boundsChanged = true; + return { + x: currentOffset.x + bounds.width + containerOptions.hGap, + y: currentOffset.y + }; + }; + HBoxLayouter.prototype.getDefaultLayoutOptions = function () { + return { + resizeContainer: true, + paddingTop: 5, + paddingBottom: 5, + paddingLeft: 5, + paddingRight: 5, + paddingFactor: 1, + hGap: 1, + vAlign: 'center' + }; + }; + HBoxLayouter.prototype.spread = function (a, b) { + return __assign({}, a, b); + }; + HBoxLayouter.KIND = 'hbox'; + return HBoxLayouter; +}(abstract_layout_1.AbstractLayout)); +exports.HBoxLayouter = HBoxLayouter; +//# sourceMappingURL=hbox-layout.js.map + +/***/ }), +/* 137 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var geometry_1 = __webpack_require__(3); +var abstract_layout_1 = __webpack_require__(89); +var StackLayouter = /** @class */ (function (_super) { + __extends(StackLayouter, _super); + function StackLayouter() { + return _super !== null && _super.apply(this, arguments) || this; + } + StackLayouter.prototype.getChildrenSize = function (container, options, layouter) { + var maxWidth = -1; + var maxHeight = -1; + container.children.forEach(function (child) { + var bounds = layouter.getBoundsData(child).bounds; + if (bounds !== undefined && geometry_1.isValidDimension(bounds)) { + maxWidth = Math.max(maxWidth, bounds.width); + maxHeight = Math.max(maxHeight, bounds.height); + } + }); + return { + width: maxWidth, + height: maxHeight + }; + }; + StackLayouter.prototype.layoutChild = function (child, boundsData, bounds, childOptions, containerOptions, currentOffset, maxWidth, maxHeight) { + var dx = this.getDx(childOptions.hAlign, bounds, maxWidth); + var dy = this.getDy(childOptions.vAlign, bounds, maxHeight); + boundsData.bounds = { + x: containerOptions.paddingLeft + child.bounds.x - bounds.x + dx, + y: containerOptions.paddingTop + child.bounds.y - bounds.y + dy, + width: bounds.width, + height: bounds.height + }; + boundsData.boundsChanged = true; + return currentOffset; + }; + StackLayouter.prototype.getDefaultLayoutOptions = function () { + return { + resizeContainer: true, + paddingTop: 5, + paddingBottom: 5, + paddingLeft: 5, + paddingRight: 5, + paddingFactor: 1, + hAlign: 'center', + vAlign: 'center' + }; + }; + StackLayouter.prototype.spread = function (a, b) { + return __assign({}, a, b); + }; + StackLayouter.KIND = 'stack'; + return StackLayouter; +}(abstract_layout_1.AbstractLayout)); +exports.StackLayouter = StackLayouter; +//# sourceMappingURL=stack-layout.js.map + +/***/ }), +/* 138 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var geometry_1 = __webpack_require__(3); +var abstract_layout_1 = __webpack_require__(89); +/** + * Layouts children of a container in vertical (top->bottom) direction. + */ +var VBoxLayouter = /** @class */ (function (_super) { + __extends(VBoxLayouter, _super); + function VBoxLayouter() { + return _super !== null && _super.apply(this, arguments) || this; + } + VBoxLayouter.prototype.getChildrenSize = function (container, containerOptions, layouter) { + var maxWidth = -1; + var maxHeight = 0; + var isFirst = true; + container.children.forEach(function (child) { + var bounds = layouter.getBoundsData(child).bounds; + if (bounds !== undefined && geometry_1.isValidDimension(bounds)) { + maxHeight += bounds.height; + if (isFirst) + isFirst = false; + else + maxHeight += containerOptions.vGap; + maxWidth = Math.max(maxWidth, bounds.width); + } + }); + return { + width: maxWidth, + height: maxHeight + }; + }; + VBoxLayouter.prototype.layoutChild = function (child, boundsData, bounds, childOptions, containerOptions, currentOffset, maxWidth, maxHeight) { + var dx = this.getDx(childOptions.hAlign, bounds, maxWidth); + boundsData.bounds = { + x: containerOptions.paddingLeft + child.bounds.x - bounds.x + dx, + y: currentOffset.y + child.bounds.y - bounds.y, + width: bounds.width, + height: bounds.height + }; + boundsData.boundsChanged = true; + return { + x: currentOffset.x, + y: currentOffset.y + bounds.height + containerOptions.vGap + }; + }; + VBoxLayouter.prototype.getDefaultLayoutOptions = function () { + return { + resizeContainer: true, + paddingTop: 5, + paddingBottom: 5, + paddingLeft: 5, + paddingRight: 5, + paddingFactor: 1, + vGap: 1, + hAlign: 'center' + }; + }; + VBoxLayouter.prototype.spread = function (a, b) { + return __assign({}, a, b); + }; + VBoxLayouter.KIND = 'vbox'; + return VBoxLayouter; +}(abstract_layout_1.AbstractLayout)); +exports.VBoxLayouter = VBoxLayouter; +//# sourceMappingURL=vbox-layout.js.map + +/***/ }), +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var command_1 = __webpack_require__(8); +var model_1 = __webpack_require__(31); +var smodel_1 = __webpack_require__(2); +var key_tool_1 = __webpack_require__(35); +var browser_1 = __webpack_require__(65); +var model_2 = __webpack_require__(62); +var inversify_1 = __webpack_require__(0); +var svg_exporter_1 = __webpack_require__(40); +var smodel_factory_1 = __webpack_require__(17); +var model_3 = __webpack_require__(32); +var model_4 = __webpack_require__(63); +var types_1 = __webpack_require__(1); +var ExportSvgKeyListener = /** @class */ (function (_super) { + __extends(ExportSvgKeyListener, _super); + function ExportSvgKeyListener() { + return _super !== null && _super.apply(this, arguments) || this; + } + ExportSvgKeyListener.prototype.keyDown = function (element, event) { + if (browser_1.isCtrlOrCmd(event) && event.keyCode === 69) + return [new RequestExportSvgAction()]; + else + return []; + }; + ExportSvgKeyListener = __decorate([ + inversify_1.injectable() + ], ExportSvgKeyListener); + return ExportSvgKeyListener; +}(key_tool_1.KeyListener)); +exports.ExportSvgKeyListener = ExportSvgKeyListener; +var RequestExportSvgAction = /** @class */ (function () { + function RequestExportSvgAction() { + this.kind = ExportSvgCommand.KIND; + } + return RequestExportSvgAction; +}()); +exports.RequestExportSvgAction = RequestExportSvgAction; +var ExportSvgCommand = /** @class */ (function (_super) { + __extends(ExportSvgCommand, _super); + function ExportSvgCommand() { + return _super !== null && _super.apply(this, arguments) || this; + } + ExportSvgCommand.prototype.execute = function (context) { + if (model_2.isExportable(context.root)) { + var root = context.modelFactory.createRoot(context.modelFactory.createSchema(context.root)); + if (model_2.isExportable(root)) { + root.export = true; + if (model_3.isViewport(root)) { + root.zoom = 1; + root.scroll = { + x: 0, + y: 0 + }; + } + root.index.all().forEach(function (element) { + if (model_1.isSelectable(element) && element.selected) + element.selected = false; + if (model_4.isHoverable(element) && element.hoverFeedback) + element.hoverFeedback = false; + }); + return root; + } + } + return context.modelFactory.createRoot(smodel_factory_1.EMPTY_ROOT); + }; + ExportSvgCommand.KIND = 'requestExportSvg'; + return ExportSvgCommand; +}(command_1.HiddenCommand)); +exports.ExportSvgCommand = ExportSvgCommand; +var ExportSvgDecorator = /** @class */ (function () { + function ExportSvgDecorator(svgExporter) { + this.svgExporter = svgExporter; + } + ExportSvgDecorator.prototype.decorate = function (vnode, element) { + if (element instanceof smodel_1.SModelRoot) + this.root = element; + return vnode; + }; + ExportSvgDecorator.prototype.postUpdate = function () { + if (this.root && model_2.isExportable(this.root) && this.root.export) + this.svgExporter.export(this.root); + }; + ExportSvgDecorator = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.SvgExporter)), + __metadata("design:paramtypes", [svg_exporter_1.SvgExporter]) + ], ExportSvgDecorator); + return ExportSvgDecorator; +}()); +exports.ExportSvgDecorator = ExportSvgDecorator; +//# sourceMappingURL=export.js.map + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.openFeature = Symbol('openFeature'); +function isOpenable(element) { + return element.hasFeature(exports.openFeature); +} +exports.isOpenable = isOpenable; +//# sourceMappingURL=model.js.map + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var browser_1 = __webpack_require__(65); +var smodel_1 = __webpack_require__(2); +var smodel_utils_1 = __webpack_require__(13); +var command_1 = __webpack_require__(8); +var sgraph_1 = __webpack_require__(101); +var mouse_tool_1 = __webpack_require__(30); +var key_tool_1 = __webpack_require__(35); +var vnode_utils_1 = __webpack_require__(18); +var model_1 = __webpack_require__(31); +var button_handler_1 = __webpack_require__(91); +var inversify_1 = __webpack_require__(0); +var model_2 = __webpack_require__(92); +/** + * Triggered when the user changes the selection, e.g. by clicking on a selectable element. The resulting + * SelectCommand changes the `selected` state accordingly, so the elements can be rendered differently. + * This action is also forwarded to the diagram server, if present, so it may react on the selection change. + * Furthermore, the server can send such an action to the client in order to change the selection programmatically. + */ +var SelectAction = /** @class */ (function () { + function SelectAction(selectedElementsIDs, deselectedElementsIDs) { + if (selectedElementsIDs === void 0) { selectedElementsIDs = []; } + if (deselectedElementsIDs === void 0) { deselectedElementsIDs = []; } + this.selectedElementsIDs = selectedElementsIDs; + this.deselectedElementsIDs = deselectedElementsIDs; + this.kind = SelectCommand.KIND; + } + return SelectAction; +}()); +exports.SelectAction = SelectAction; +/** + * Programmatic action for selecting or deselecting all elements. + */ +var SelectAllAction = /** @class */ (function () { + /** + * If `select` is true, all elements are selected, othewise they are deselected. + */ + function SelectAllAction(select) { + if (select === void 0) { select = true; } + this.select = select; + this.kind = SelectAllCommand.KIND; + } + return SelectAllAction; +}()); +exports.SelectAllAction = SelectAllAction; +var SelectCommand = /** @class */ (function (_super) { + __extends(SelectCommand, _super); + function SelectCommand(action) { + var _this = _super.call(this) || this; + _this.action = action; + _this.selected = []; + _this.deselected = []; + return _this; + } + SelectCommand.prototype.execute = function (context) { + var _this = this; + var selectedNodeIds = []; + var model = context.root; + this.action.selectedElementsIDs.forEach(function (id) { + var element = model.index.getById(id); + if (element instanceof smodel_1.SChildElement && model_1.isSelectable(element)) { + _this.selected.push({ + element: element, + index: element.parent.children.indexOf(element) + }); + if (element instanceof sgraph_1.SNode) + selectedNodeIds.push(id); + } + }); + if (selectedNodeIds.length > 0) { + var connectedEdges_1 = []; + model.index.all().forEach(function (element) { + if (element instanceof sgraph_1.SEdge + && (selectedNodeIds.indexOf(element.sourceId) >= 0 + || selectedNodeIds.indexOf(element.targetId) >= 0)) { + connectedEdges_1.push({ + element: element, + index: element.parent.children.indexOf(element) + }); + } + }); + this.selected = connectedEdges_1.concat(this.selected); + } + this.action.deselectedElementsIDs.forEach(function (id) { + var element = model.index.getById(id); + if (element instanceof smodel_1.SChildElement && model_1.isSelectable(element)) { + _this.deselected.push({ + element: element, + index: element.parent.children.indexOf(element) + }); + } + }); + return this.redo(context); + }; + SelectCommand.prototype.undo = function (context) { + for (var i = this.selected.length - 1; i >= 0; --i) { + var selection = this.selected[i]; + var element = selection.element; + if (model_1.isSelectable(element)) + element.selected = false; + element.parent.move(element, selection.index); + } + this.deselected.reverse().forEach(function (selection) { + if (model_1.isSelectable(selection.element)) + selection.element.selected = true; + }); + return context.root; + }; + SelectCommand.prototype.redo = function (context) { + for (var i = 0; i < this.selected.length; ++i) { + var selection = this.selected[i]; + var element = selection.element; + var childrenLength = element.parent.children.length; + element.parent.move(element, childrenLength - 1); + } + this.deselected.forEach(function (selection) { + if (model_1.isSelectable(selection.element)) + selection.element.selected = false; + }); + this.selected.forEach(function (selection) { + if (model_1.isSelectable(selection.element)) + selection.element.selected = true; + }); + return context.root; + }; + SelectCommand.KIND = 'elementSelected'; + return SelectCommand; +}(command_1.Command)); +exports.SelectCommand = SelectCommand; +var SelectAllCommand = /** @class */ (function (_super) { + __extends(SelectAllCommand, _super); + function SelectAllCommand(action) { + var _this = _super.call(this) || this; + _this.action = action; + _this.previousSelection = {}; + return _this; + } + SelectAllCommand.prototype.execute = function (context) { + this.selectAll(context.root, this.action.select); + return context.root; + }; + SelectAllCommand.prototype.selectAll = function (element, newState) { + if (model_1.isSelectable(element)) { + this.previousSelection[element.id] = element.selected; + element.selected = newState; + } + for (var _i = 0, _a = element.children; _i < _a.length; _i++) { + var child = _a[_i]; + this.selectAll(child, newState); + } + }; + SelectAllCommand.prototype.undo = function (context) { + var index = context.root.index; + for (var id in this.previousSelection) { + var element = index.getById(id); + if (element !== undefined && model_1.isSelectable(element)) + element.selected = this.previousSelection[id]; + } + return context.root; + }; + SelectAllCommand.prototype.redo = function (context) { + this.selectAll(context.root, this.action.select); + return context.root; + }; + SelectAllCommand.KIND = 'allSelected'; + return SelectAllCommand; +}(command_1.Command)); +exports.SelectAllCommand = SelectAllCommand; +var SelectMouseListener = /** @class */ (function (_super) { + __extends(SelectMouseListener, _super); + function SelectMouseListener(buttonHandlerRegistry) { + var _this = _super.call(this) || this; + _this.buttonHandlerRegistry = buttonHandlerRegistry; + _this.wasSelected = false; + _this.hasDragged = false; + return _this; + } + SelectMouseListener.prototype.mouseDown = function (target, event) { + if (event.button === 0) { + if (this.buttonHandlerRegistry !== undefined && target instanceof model_2.SButton && target.enabled) { + var buttonHandler = this.buttonHandlerRegistry.get(target.type); + if (buttonHandler !== undefined) + return buttonHandler.buttonPressed(target); + } + var selectableTarget = smodel_utils_1.findParentByFeature(target, model_1.isSelectable); + if (selectableTarget !== undefined || target instanceof smodel_1.SModelRoot) { + this.hasDragged = false; + var deselectIds = []; + // multi-selection? + if (!browser_1.isCtrlOrCmd(event)) { + deselectIds = target.root + .index + .all() + .filter(function (element) { return model_1.isSelectable(element) && element.selected; }) + .map(function (element) { return element.id; }); + } + if (selectableTarget !== undefined) { + if (!selectableTarget.selected) { + this.wasSelected = false; + return [new SelectAction([selectableTarget.id], deselectIds)]; + } + else { + if (browser_1.isCtrlOrCmd(event)) { + this.wasSelected = false; + return [new SelectAction([], [selectableTarget.id])]; + } + else { + this.wasSelected = true; + } + } + } + else { + return [new SelectAction([], deselectIds)]; + } + } + } + return []; + }; + SelectMouseListener.prototype.mouseMove = function (target, event) { + this.hasDragged = true; + return []; + }; + SelectMouseListener.prototype.mouseUp = function (target, event) { + if (event.button === 0) { + if (!this.hasDragged) { + var selectableTarget = smodel_utils_1.findParentByFeature(target, model_1.isSelectable); + if (selectableTarget !== undefined && this.wasSelected) { + return [new SelectAction([selectableTarget.id], [])]; + } + } + } + this.hasDragged = false; + return []; + }; + SelectMouseListener.prototype.decorate = function (vnode, element) { + var selectableTarget = smodel_utils_1.findParentByFeature(element, model_1.isSelectable); + if (selectableTarget !== undefined) + vnode_utils_1.setClass(vnode, 'selected', selectableTarget.selected); + return vnode; + }; + SelectMouseListener = __decorate([ + __param(0, inversify_1.inject(button_handler_1.ButtonHandlerRegistry)), __param(0, inversify_1.optional()), + __metadata("design:paramtypes", [button_handler_1.ButtonHandlerRegistry]) + ], SelectMouseListener); + return SelectMouseListener; +}(mouse_tool_1.MouseListener)); +exports.SelectMouseListener = SelectMouseListener; +var SelectKeyboardListener = /** @class */ (function (_super) { + __extends(SelectKeyboardListener, _super); + function SelectKeyboardListener() { + return _super !== null && _super.apply(this, arguments) || this; + } + SelectKeyboardListener.prototype.keyDown = function (element, event) { + if (browser_1.isCtrlOrCmd(event) && event.keyCode === 65) { + return [new SelectAction(element.root.index.all().filter(function (e) { return model_1.isSelectable(e); }).map(function (e) { return e.id; }), [])]; + } + return []; + }; + return SelectKeyboardListener; +}(key_tool_1.KeyListener)); +exports.SelectKeyboardListener = SelectKeyboardListener; +//# sourceMappingURL=select.js.map + +/***/ }), +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var smodel_1 = __webpack_require__(2); +var mouse_tool_1 = __webpack_require__(30); +var smodel_utils_1 = __webpack_require__(13); +var viewport_1 = __webpack_require__(42); +var model_1 = __webpack_require__(32); +var model_2 = __webpack_require__(41); +function isScrollable(element) { + return 'scroll' in element; +} +exports.isScrollable = isScrollable; +var ScrollMouseListener = /** @class */ (function (_super) { + __extends(ScrollMouseListener, _super); + function ScrollMouseListener() { + return _super !== null && _super.apply(this, arguments) || this; + } + ScrollMouseListener.prototype.mouseDown = function (target, event) { + var selectable = smodel_utils_1.findParentByFeature(target, model_2.isMoveable); + if (selectable === undefined) { + var viewport = smodel_utils_1.findParentByFeature(target, model_1.isViewport); + if (viewport) + this.lastScrollPosition = { x: event.pageX, y: event.pageY }; + else + this.lastScrollPosition = undefined; + } + return []; + }; + ScrollMouseListener.prototype.mouseMove = function (target, event) { + if (event.buttons === 0) + this.mouseUp(target, event); + else if (this.lastScrollPosition) { + var viewport = smodel_utils_1.findParentByFeature(target, model_1.isViewport); + if (viewport) { + var dx = (event.pageX - this.lastScrollPosition.x) / viewport.zoom; + var dy = (event.pageY - this.lastScrollPosition.y) / viewport.zoom; + var newViewport = { + scroll: { + x: viewport.scroll.x - dx, + y: viewport.scroll.y - dy, + }, + zoom: viewport.zoom + }; + this.lastScrollPosition = { x: event.pageX, y: event.pageY }; + return [new viewport_1.ViewportAction(viewport.id, newViewport, false)]; + } + } + return []; + }; + ScrollMouseListener.prototype.mouseEnter = function (target, event) { + if (target instanceof smodel_1.SModelRoot && event.buttons === 0) + this.mouseUp(target, event); + return []; + }; + ScrollMouseListener.prototype.mouseUp = function (target, event) { + this.lastScrollPosition = undefined; + return []; + }; + return ScrollMouseListener; +}(mouse_tool_1.MouseListener)); +exports.ScrollMouseListener = ScrollMouseListener; +//# sourceMappingURL=scroll.js.map + +/***/ }), +/* 143 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var mouse_tool_1 = __webpack_require__(30); +var smodel_utils_1 = __webpack_require__(13); +var viewport_1 = __webpack_require__(42); +var model_1 = __webpack_require__(32); +function isZoomable(element) { + return 'zoom' in element; +} +exports.isZoomable = isZoomable; +var ZoomMouseListener = /** @class */ (function (_super) { + __extends(ZoomMouseListener, _super); + function ZoomMouseListener() { + return _super !== null && _super.apply(this, arguments) || this; + } + ZoomMouseListener.prototype.wheel = function (target, event) { + var viewport = smodel_utils_1.findParentByFeature(target, model_1.isViewport); + if (viewport) { + var newZoom = Math.exp(-event.deltaY * 0.005); + var factor = 1. / (newZoom * viewport.zoom) - 1. / viewport.zoom; + var newViewport = { + scroll: { + x: -(factor * event.offsetX - viewport.scroll.x), + y: -(factor * event.offsetY - viewport.scroll.y) + }, + zoom: viewport.zoom * newZoom + }; + return [new viewport_1.ViewportAction(viewport.id, newViewport, false)]; + } + return []; + }; + return ZoomMouseListener; +}(mouse_tool_1.MouseListener)); +exports.ZoomMouseListener = ZoomMouseListener; +//# sourceMappingURL=zoom.js.map + +/***/ }), +/* 144 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var snabbdom = __webpack_require__(7); +var geometry_1 = __webpack_require__(3); +var vnode_utils_1 = __webpack_require__(18); +var smodel_utils_1 = __webpack_require__(13); +var JSX = { createElement: snabbdom.svg }; +/** + * IView component that turns an SGraph element and its children into a tree of virtual DOM elements. + */ +var SGraphView = /** @class */ (function () { + function SGraphView() { + } + SGraphView.prototype.render = function (model, context) { + var transform = "scale(" + model.zoom + ") translate(" + -model.scroll.x + "," + -model.scroll.y + ")"; + return JSX.createElement("svg", { "class-sprotty-graph": true }, + JSX.createElement("g", { transform: transform }, context.renderChildren(model))); + }; + return SGraphView; +}()); +exports.SGraphView = SGraphView; +var AnchorableView = /** @class */ (function () { + function AnchorableView() { + } + AnchorableView.prototype.getStrokeWidth = function (model) { + return 0; + }; + AnchorableView.prototype.getTranslatedAnchor = function (node, refPoint, refContainer, anchorCorrection, edge) { + if (anchorCorrection === void 0) { anchorCorrection = 0; } + var viewContainer = node.parent; + var anchor = this.getAnchor(node, smodel_utils_1.translatePoint(refPoint, refContainer, viewContainer), anchorCorrection); + var edgeContainer = edge.parent; + return smodel_utils_1.translatePoint(anchor, viewContainer, edgeContainer); + }; + return AnchorableView; +}()); +exports.AnchorableView = AnchorableView; +var PolylineEdgeView = /** @class */ (function () { + function PolylineEdgeView() { + this.minimalPointDistance = 2; + } + PolylineEdgeView.prototype.render = function (edge, context) { + var source = edge.source; + if (source === undefined) + return this.renderDanglingEdge("Cannot resolve source", edge, context); + var target = edge.target; + if (target === undefined) + return this.renderDanglingEdge("Cannot resolve target", edge, context); + var sourceView = context.viewRegistry.get(source.type, source); + if (!(sourceView instanceof AnchorableView)) + return this.renderDanglingEdge("Expected source view type: AnchorableView", edge, context); + var targetView = context.viewRegistry.get(target.type, target); + if (!(targetView instanceof AnchorableView)) + return this.renderDanglingEdge("Expected target view type: AnchorableView", edge, context); + var segments = this.computeSegments(edge, source, sourceView, target, targetView); + return JSX.createElement("g", null, + this.renderLine(edge, segments, context), + this.renderAdditionals(edge, segments, context), + context.renderChildren(edge)); + }; + PolylineEdgeView.prototype.computeSegments = function (edge, source, sourceView, target, targetView) { + var sourceAnchor; + if (edge.routingPoints !== undefined && edge.routingPoints.length >= 1) { + // Use the first routing point as start anchor reference + var p0 = edge.routingPoints[0]; + sourceAnchor = sourceView.getTranslatedAnchor(source, p0, edge.parent, this.getSourceAnchorCorrection(edge), edge); + } + else { + // Use the target center as start anchor reference + var reference = geometry_1.center(target.bounds); + sourceAnchor = sourceView.getTranslatedAnchor(source, reference, target.parent, this.getSourceAnchorCorrection(edge), edge); + } + var result = [sourceAnchor]; + var previousPoint = sourceAnchor; + for (var i = 0; i < edge.routingPoints.length - 1; i++) { + var p = edge.routingPoints[i]; + var minDistance = this.minimalPointDistance + ((i === 0) + ? this.getSourceAnchorCorrection(edge) + sourceView.getStrokeWidth(source) + : 0); + if (geometry_1.maxDistance(previousPoint, p) >= minDistance) { + result.push(p); + previousPoint = p; + } + } + var targetAnchor; + if (edge.routingPoints && edge.routingPoints.length >= 2) { + // Use the last routing point as end anchor reference + var pn = edge.routingPoints[edge.routingPoints.length - 1]; + targetAnchor = targetView.getTranslatedAnchor(target, pn, edge.parent, this.getTargetAnchorCorrection(edge), edge); + var minDistance = this.minimalPointDistance + this.getTargetAnchorCorrection(edge) + targetView.getStrokeWidth(source); + if (geometry_1.maxDistance(previousPoint, pn) >= this.minimalPointDistance + && geometry_1.maxDistance(pn, targetAnchor) >= minDistance) { + result.push(pn); + } + } + else { + // Use the source center as end anchor reference + var reference = geometry_1.center(source.bounds); + targetAnchor = targetView.getTranslatedAnchor(target, reference, source.parent, this.getTargetAnchorCorrection(edge), edge); + } + result.push(targetAnchor); + return result; + }; + PolylineEdgeView.prototype.renderLine = function (edge, segments, context) { + var firstPoint = segments[0]; + var path = "M " + firstPoint.x + "," + firstPoint.y; + for (var i = 1; i < segments.length; i++) { + var p = segments[i]; + path += " L " + p.x + "," + p.y; + } + return JSX.createElement("path", { "class-sprotty-edge": true, d: path }); + }; + PolylineEdgeView.prototype.renderAdditionals = function (edge, segments, context) { + return []; + }; + PolylineEdgeView.prototype.renderDanglingEdge = function (message, edge, context) { + return JSX.createElement("text", { "class-sprotty-edge-dangling": true, title: message }, "?"); + }; + PolylineEdgeView.prototype.getSourceAnchorCorrection = function (edge) { + return 0; + }; + PolylineEdgeView.prototype.getTargetAnchorCorrection = function (edge) { + return 0; + }; + return PolylineEdgeView; +}()); +exports.PolylineEdgeView = PolylineEdgeView; +var SLabelView = /** @class */ (function () { + function SLabelView() { + } + SLabelView.prototype.render = function (label, context) { + var vnode = JSX.createElement("text", { "class-sprotty-label": true }, label.text); + var subType = smodel_utils_1.getSubType(label); + if (subType) + vnode_utils_1.setAttr(vnode, 'class', subType); + return vnode; + }; + return SLabelView; +}()); +exports.SLabelView = SLabelView; +var SCompartmentView = /** @class */ (function () { + function SCompartmentView() { + } + SCompartmentView.prototype.render = function (model, context) { + var translate = "translate(" + model.bounds.x + ", " + model.bounds.y + ")"; + var vnode = JSX.createElement("g", { transform: translate, "class-sprotty-comp": "{true}" }, context.renderChildren(model)); + var subType = smodel_utils_1.getSubType(model); + if (subType) + vnode_utils_1.setAttr(vnode, 'class', subType); + return vnode; + }; + return SCompartmentView; +}()); +exports.SCompartmentView = SCompartmentView; +//# sourceMappingURL=views.js.map + +/***/ }), +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var smodel_1 = __webpack_require__(2); +var smodel_storage_1 = __webpack_require__(87); +var action_handler_1 = __webpack_require__(38); +var set_model_1 = __webpack_require__(49); +var update_model_1 = __webpack_require__(98); +var bounds_manipulation_1 = __webpack_require__(50); +var hover_1 = __webpack_require__(52); +var model_source_1 = __webpack_require__(102); +var svg_exporter_1 = __webpack_require__(40); +var file_saver_1 = __webpack_require__(121); +var expand_1 = __webpack_require__(61); +var open_1 = __webpack_require__(95); +function isActionMessage(object) { + return object !== undefined && object.hasOwnProperty('clientId') && object.hasOwnProperty('action'); +} +exports.isActionMessage = isActionMessage; +/** + * Sent by the external server when to signal a state change. + */ +var ServerStatusAction = /** @class */ (function () { + function ServerStatusAction() { + this.kind = ServerStatusAction.KIND; + } + ServerStatusAction.KIND = 'serverStatus'; + return ServerStatusAction; +}()); +exports.ServerStatusAction = ServerStatusAction; +var receivedFromServerProperty = '__receivedFromServer'; +/** + * A ModelSource that communicates with an external model provider, e.g. + * a model editor. + * + * This class defines which actions are sent to and received from the + * external model source. + */ +var DiagramServer = /** @class */ (function (_super) { + __extends(DiagramServer, _super); + function DiagramServer(actionDispatcher, actionHandlerRegistry, viewerOptions, storage, logger) { + var _this = _super.call(this, actionDispatcher, actionHandlerRegistry, viewerOptions) || this; + _this.storage = storage; + _this.logger = logger; + _this.currentRoot = { + type: 'NONE', + id: 'ROOT' + }; + _this.clientId = _this.viewerOptions.baseDiv; + return _this; + } + DiagramServer.prototype.initialize = function (registry) { + _super.prototype.initialize.call(this, registry); + // Register model manipulation commands + registry.registerCommand(update_model_1.UpdateModelCommand); + // Register this model source + registry.register(bounds_manipulation_1.ComputedBoundsAction.KIND, this); + registry.register(bounds_manipulation_1.RequestBoundsCommand.KIND, this); + registry.register(hover_1.RequestPopupModelAction.KIND, this); + registry.register(expand_1.CollapseExpandAction.KIND, this); + registry.register(expand_1.CollapseExpandAllAction.KIND, this); + registry.register(open_1.OpenAction.KIND, this); + registry.register(ServerStatusAction.KIND, this); + }; + DiagramServer.prototype.handle = function (action) { + var forwardToServer = this.handleLocally(action); + if (forwardToServer) { + var message = { + clientId: this.clientId, + action: action + }; + this.logger.log(this, 'sending', message); + this.sendMessage(message); + } + }; + DiagramServer.prototype.messageReceived = function (data) { + var object = typeof (data) === 'string' ? JSON.parse(data) : data; + if (isActionMessage(object) && object.action) { + if (!object.clientId || object.clientId === this.clientId) { + this.logger.log(this, 'receiving', object); + object.action[receivedFromServerProperty] = true; + this.actionDispatcher.dispatch(object.action, this.storeNewModel.bind(this)); + } + } + else { + this.logger.error(this, 'received data is not an action message', object); + } + }; + /** + * Check whether the given action should be handled locally. Returns true if the action should + * still be sent to the server, and false if it's only handled locally. + */ + DiagramServer.prototype.handleLocally = function (action) { + this.storeNewModel(action); + switch (action.kind) { + case bounds_manipulation_1.ComputedBoundsAction.KIND: + return this.handleComputedBounds(action); + case bounds_manipulation_1.RequestBoundsCommand.KIND: + return false; + case svg_exporter_1.ExportSvgAction.KIND: + return this.handleExportSvgAction(action); + case ServerStatusAction.KIND: + return this.handleServerStateAction(action); + } + return !action[receivedFromServerProperty]; + }; + /** + * Put the new model contained in the given action into the model storage, if there is any. + */ + DiagramServer.prototype.storeNewModel = function (action) { + if (action.kind === set_model_1.SetModelCommand.KIND + || action.kind === update_model_1.UpdateModelCommand.KIND + || action.kind === bounds_manipulation_1.RequestBoundsCommand.KIND) { + var newRoot = action.newRoot; + if (newRoot) { + this.currentRoot = newRoot; + this.storage.store(this.currentRoot); + } + } + }; + /** + * If the server requires to compute a layout, the computed bounds are forwarded. Otherwise they + * are applied to the current model locally and a model update is triggered. + */ + DiagramServer.prototype.handleComputedBounds = function (action) { + if (this.viewerOptions.needsServerLayout) { + return true; + } + else { + var index = new smodel_1.SModelIndex(); + index.add(this.currentRoot); + for (var _i = 0, _a = action.bounds; _i < _a.length; _i++) { + var b = _a[_i]; + var element = index.getById(b.elementId); + if (element !== undefined) + this.applyBounds(element, b.newBounds); + } + if (action.alignments !== undefined) { + for (var _b = 0, _c = action.alignments; _b < _c.length; _b++) { + var a = _c[_b]; + var element = index.getById(a.elementId); + if (element !== undefined) + this.applyAlignment(element, a.newAlignment); + } + } + this.actionDispatcher.dispatch(new update_model_1.UpdateModelAction(this.currentRoot)); + return false; + } + }; + DiagramServer.prototype.applyBounds = function (element, newBounds) { + var e = element; + e.position = { x: newBounds.x, y: newBounds.y }; + e.size = { width: newBounds.width, height: newBounds.height }; + }; + DiagramServer.prototype.applyAlignment = function (element, newAlignment) { + var e = element; + e.alignment = { x: newAlignment.x, y: newAlignment.y }; + }; + DiagramServer.prototype.handleExportSvgAction = function (action) { + var blob = new Blob([action.svg], { type: "text/plain;charset=utf-8" }); + file_saver_1.saveAs(blob, "diagram.svg"); + return false; + }; + DiagramServer.prototype.handleServerStateAction = function (action) { + return false; + }; + DiagramServer = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.IActionDispatcher)), + __param(1, inversify_1.inject(types_1.TYPES.ActionHandlerRegistry)), + __param(2, inversify_1.inject(types_1.TYPES.ViewerOptions)), + __param(3, inversify_1.inject(types_1.TYPES.SModelStorage)), + __param(4, inversify_1.inject(types_1.TYPES.ILogger)), + __metadata("design:paramtypes", [Object, action_handler_1.ActionHandlerRegistry, Object, smodel_storage_1.SModelStorage, Object]) + ], DiagramServer); + return DiagramServer; +}(model_source_1.ModelSource)); +exports.DiagramServer = DiagramServer; +//# sourceMappingURL=diagram-server.js.map + +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* +* Copyright (C) 2017 TypeFox and others. +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +*/ +Object.defineProperty(exports, "__esModule", { value: true }); +var ExpansionState = /** @class */ (function () { + function ExpansionState(root) { + this.expandedElementIds = []; + this.initialize(root); + } + ExpansionState.prototype.initialize = function (element) { + var _this = this; + if (element.expanded) + this.expandedElementIds.push(element.id); + if (element.children !== undefined) + element.children.forEach(function (child) { return _this.initialize(child); }); + }; + ExpansionState.prototype.apply = function (action) { + for (var _i = 0, _a = action.collapseIds; _i < _a.length; _i++) { + var collapsed = _a[_i]; + var index = this.expandedElementIds.indexOf(collapsed); + if (index !== -1) + this.expandedElementIds.splice(index, 1); + } + for (var _b = 0, _c = action.expandIds; _b < _c.length; _b++) { + var expanded = _c[_b]; + this.expandedElementIds.push(expanded); + } + }; + ExpansionState.prototype.collapseAll = function () { + this.expandedElementIds = []; + }; + return ExpansionState; +}()); +exports.ExpansionState = ExpansionState; +//# sourceMappingURL=diagram-state.js.map + +/***/ }), +/* 147 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = h; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__vnode__ = __webpack_require__(150); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is__ = __webpack_require__(148); + + +function addNS(data, children, sel) { + data.ns = 'http://www.w3.org/2000/svg'; + if (sel !== 'foreignObject' && children !== undefined) { + for (var i = 0; i < children.length; ++i) { + var childData = children[i].data; + if (childData !== undefined) { + addNS(childData, children[i].children, children[i].sel); + } + } + } +} +function h(sel, b, c) { + var data = {}, children, text, i; + if (c !== undefined) { + data = b; + if (__WEBPACK_IMPORTED_MODULE_1__is__["a" /* array */](c)) { + children = c; + } + else if (__WEBPACK_IMPORTED_MODULE_1__is__["b" /* primitive */](c)) { + text = c; + } + else if (c && c.sel) { + children = [c]; + } + } + else if (b !== undefined) { + if (__WEBPACK_IMPORTED_MODULE_1__is__["a" /* array */](b)) { + children = b; + } + else if (__WEBPACK_IMPORTED_MODULE_1__is__["b" /* primitive */](b)) { + text = b; + } + else if (b && b.sel) { + children = [b]; + } + else { + data = b; + } + } + if (__WEBPACK_IMPORTED_MODULE_1__is__["a" /* array */](children)) { + for (i = 0; i < children.length; ++i) { + if (__WEBPACK_IMPORTED_MODULE_1__is__["b" /* primitive */](children[i])) + children[i] = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__vnode__["b" /* vnode */])(undefined, undefined, undefined, children[i], undefined); + } + } + if (sel[0] === 's' && sel[1] === 'v' && sel[2] === 'g' && + (sel.length === 3 || sel[3] === '.' || sel[3] === '#')) { + addNS(data, children, sel); + } + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__vnode__["b" /* vnode */])(sel, data, children, text, undefined); +} +; +/* unused harmony default export */ var _unused_webpack_default_export = (h); +//# sourceMappingURL=h.js.map + +/***/ }), +/* 148 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return array; }); +/* harmony export (immutable) */ __webpack_exports__["b"] = primitive; +var array = Array.isArray; +function primitive(s) { + return typeof s === 'string' || typeof s === 'number'; +} +//# sourceMappingURL=is.js.map + +/***/ }), +/* 149 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony export (immutable) */ __webpack_exports__["init"] = init; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__vnode__ = __webpack_require__(150); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is__ = __webpack_require__(148); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__htmldomapi__ = __webpack_require__(277); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__h__ = __webpack_require__(147); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_3__h__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thunk__ = __webpack_require__(278); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "thunk", function() { return __WEBPACK_IMPORTED_MODULE_4__thunk__["a"]; }); + + + +function isUndef(s) { return s === undefined; } +function isDef(s) { return s !== undefined; } +var emptyNode = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__vnode__["a" /* default */])('', {}, [], undefined, undefined); +function sameVnode(vnode1, vnode2) { + return vnode1.key === vnode2.key && vnode1.sel === vnode2.sel; +} +function isVnode(vnode) { + return vnode.sel !== undefined; +} +function createKeyToOldIdx(children, beginIdx, endIdx) { + var i, map = {}, key, ch; + for (i = beginIdx; i <= endIdx; ++i) { + ch = children[i]; + if (ch != null) { + key = ch.key; + if (key !== undefined) + map[key] = i; + } + } + return map; +} +var hooks = ['create', 'update', 'remove', 'destroy', 'pre', 'post']; + + +function init(modules, domApi) { + var i, j, cbs = {}; + var api = domApi !== undefined ? domApi : __WEBPACK_IMPORTED_MODULE_2__htmldomapi__["a" /* default */]; + for (i = 0; i < hooks.length; ++i) { + cbs[hooks[i]] = []; + for (j = 0; j < modules.length; ++j) { + var hook = modules[j][hooks[i]]; + if (hook !== undefined) { + cbs[hooks[i]].push(hook); + } + } + } + function emptyNodeAt(elm) { + var id = elm.id ? '#' + elm.id : ''; + var c = elm.className ? '.' + elm.className.split(' ').join('.') : ''; + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__vnode__["a" /* default */])(api.tagName(elm).toLowerCase() + id + c, {}, [], undefined, elm); + } + function createRmCb(childElm, listeners) { + return function rmCb() { + if (--listeners === 0) { + var parent_1 = api.parentNode(childElm); + api.removeChild(parent_1, childElm); + } + }; + } + function createElm(vnode, insertedVnodeQueue) { + var i, data = vnode.data; + if (data !== undefined) { + if (isDef(i = data.hook) && isDef(i = i.init)) { + i(vnode); + data = vnode.data; + } + } + var children = vnode.children, sel = vnode.sel; + if (sel === '!') { + if (isUndef(vnode.text)) { + vnode.text = ''; + } + vnode.elm = api.createComment(vnode.text); + } + else if (sel !== undefined) { + // Parse selector + var hashIdx = sel.indexOf('#'); + var dotIdx = sel.indexOf('.', hashIdx); + var hash = hashIdx > 0 ? hashIdx : sel.length; + var dot = dotIdx > 0 ? dotIdx : sel.length; + var tag = hashIdx !== -1 || dotIdx !== -1 ? sel.slice(0, Math.min(hash, dot)) : sel; + var elm = vnode.elm = isDef(data) && isDef(i = data.ns) ? api.createElementNS(i, tag) + : api.createElement(tag); + if (hash < dot) + elm.setAttribute('id', sel.slice(hash + 1, dot)); + if (dotIdx > 0) + elm.setAttribute('class', sel.slice(dot + 1).replace(/\./g, ' ')); + for (i = 0; i < cbs.create.length; ++i) + cbs.create[i](emptyNode, vnode); + if (__WEBPACK_IMPORTED_MODULE_1__is__["a" /* array */](children)) { + for (i = 0; i < children.length; ++i) { + var ch = children[i]; + if (ch != null) { + api.appendChild(elm, createElm(ch, insertedVnodeQueue)); + } + } + } + else if (__WEBPACK_IMPORTED_MODULE_1__is__["b" /* primitive */](vnode.text)) { + api.appendChild(elm, api.createTextNode(vnode.text)); + } + i = vnode.data.hook; // Reuse variable + if (isDef(i)) { + if (i.create) + i.create(emptyNode, vnode); + if (i.insert) + insertedVnodeQueue.push(vnode); + } + } + else { + vnode.elm = api.createTextNode(vnode.text); + } + return vnode.elm; + } + function addVnodes(parentElm, before, vnodes, startIdx, endIdx, insertedVnodeQueue) { + for (; startIdx <= endIdx; ++startIdx) { + var ch = vnodes[startIdx]; + if (ch != null) { + api.insertBefore(parentElm, createElm(ch, insertedVnodeQueue), before); + } + } + } + function invokeDestroyHook(vnode) { + var i, j, data = vnode.data; + if (data !== undefined) { + if (isDef(i = data.hook) && isDef(i = i.destroy)) + i(vnode); + for (i = 0; i < cbs.destroy.length; ++i) + cbs.destroy[i](vnode); + if (vnode.children !== undefined) { + for (j = 0; j < vnode.children.length; ++j) { + i = vnode.children[j]; + if (i != null && typeof i !== "string") { + invokeDestroyHook(i); + } + } + } + } + } + function removeVnodes(parentElm, vnodes, startIdx, endIdx) { + for (; startIdx <= endIdx; ++startIdx) { + var i_1 = void 0, listeners = void 0, rm = void 0, ch = vnodes[startIdx]; + if (ch != null) { + if (isDef(ch.sel)) { + invokeDestroyHook(ch); + listeners = cbs.remove.length + 1; + rm = createRmCb(ch.elm, listeners); + for (i_1 = 0; i_1 < cbs.remove.length; ++i_1) + cbs.remove[i_1](ch, rm); + if (isDef(i_1 = ch.data) && isDef(i_1 = i_1.hook) && isDef(i_1 = i_1.remove)) { + i_1(ch, rm); + } + else { + rm(); + } + } + else { + api.removeChild(parentElm, ch.elm); + } + } + } + } + function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue) { + var oldStartIdx = 0, newStartIdx = 0; + var oldEndIdx = oldCh.length - 1; + var oldStartVnode = oldCh[0]; + var oldEndVnode = oldCh[oldEndIdx]; + var newEndIdx = newCh.length - 1; + var newStartVnode = newCh[0]; + var newEndVnode = newCh[newEndIdx]; + var oldKeyToIdx; + var idxInOld; + var elmToMove; + var before; + while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) { + if (oldStartVnode == null) { + oldStartVnode = oldCh[++oldStartIdx]; // Vnode might have been moved left + } + else if (oldEndVnode == null) { + oldEndVnode = oldCh[--oldEndIdx]; + } + else if (newStartVnode == null) { + newStartVnode = newCh[++newStartIdx]; + } + else if (newEndVnode == null) { + newEndVnode = newCh[--newEndIdx]; + } + else if (sameVnode(oldStartVnode, newStartVnode)) { + patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue); + oldStartVnode = oldCh[++oldStartIdx]; + newStartVnode = newCh[++newStartIdx]; + } + else if (sameVnode(oldEndVnode, newEndVnode)) { + patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue); + oldEndVnode = oldCh[--oldEndIdx]; + newEndVnode = newCh[--newEndIdx]; + } + else if (sameVnode(oldStartVnode, newEndVnode)) { + patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue); + api.insertBefore(parentElm, oldStartVnode.elm, api.nextSibling(oldEndVnode.elm)); + oldStartVnode = oldCh[++oldStartIdx]; + newEndVnode = newCh[--newEndIdx]; + } + else if (sameVnode(oldEndVnode, newStartVnode)) { + patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue); + api.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm); + oldEndVnode = oldCh[--oldEndIdx]; + newStartVnode = newCh[++newStartIdx]; + } + else { + if (oldKeyToIdx === undefined) { + oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); + } + idxInOld = oldKeyToIdx[newStartVnode.key]; + if (isUndef(idxInOld)) { + api.insertBefore(parentElm, createElm(newStartVnode, insertedVnodeQueue), oldStartVnode.elm); + newStartVnode = newCh[++newStartIdx]; + } + else { + elmToMove = oldCh[idxInOld]; + if (elmToMove.sel !== newStartVnode.sel) { + api.insertBefore(parentElm, createElm(newStartVnode, insertedVnodeQueue), oldStartVnode.elm); + } + else { + patchVnode(elmToMove, newStartVnode, insertedVnodeQueue); + oldCh[idxInOld] = undefined; + api.insertBefore(parentElm, elmToMove.elm, oldStartVnode.elm); + } + newStartVnode = newCh[++newStartIdx]; + } + } + } + if (oldStartIdx <= oldEndIdx || newStartIdx <= newEndIdx) { + if (oldStartIdx > oldEndIdx) { + before = newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].elm; + addVnodes(parentElm, before, newCh, newStartIdx, newEndIdx, insertedVnodeQueue); + } + else { + removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx); + } + } + } + function patchVnode(oldVnode, vnode, insertedVnodeQueue) { + var i, hook; + if (isDef(i = vnode.data) && isDef(hook = i.hook) && isDef(i = hook.prepatch)) { + i(oldVnode, vnode); + } + var elm = vnode.elm = oldVnode.elm; + var oldCh = oldVnode.children; + var ch = vnode.children; + if (oldVnode === vnode) + return; + if (vnode.data !== undefined) { + for (i = 0; i < cbs.update.length; ++i) + cbs.update[i](oldVnode, vnode); + i = vnode.data.hook; + if (isDef(i) && isDef(i = i.update)) + i(oldVnode, vnode); + } + if (isUndef(vnode.text)) { + if (isDef(oldCh) && isDef(ch)) { + if (oldCh !== ch) + updateChildren(elm, oldCh, ch, insertedVnodeQueue); + } + else if (isDef(ch)) { + if (isDef(oldVnode.text)) + api.setTextContent(elm, ''); + addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue); + } + else if (isDef(oldCh)) { + removeVnodes(elm, oldCh, 0, oldCh.length - 1); + } + else if (isDef(oldVnode.text)) { + api.setTextContent(elm, ''); + } + } + else if (oldVnode.text !== vnode.text) { + api.setTextContent(elm, vnode.text); + } + if (isDef(hook) && isDef(i = hook.postpatch)) { + i(oldVnode, vnode); + } + } + return function patch(oldVnode, vnode) { + var i, elm, parent; + var insertedVnodeQueue = []; + for (i = 0; i < cbs.pre.length; ++i) + cbs.pre[i](); + if (!isVnode(oldVnode)) { + oldVnode = emptyNodeAt(oldVnode); + } + if (sameVnode(oldVnode, vnode)) { + patchVnode(oldVnode, vnode, insertedVnodeQueue); + } + else { + elm = oldVnode.elm; + parent = api.parentNode(elm); + createElm(vnode, insertedVnodeQueue); + if (parent !== null) { + api.insertBefore(parent, vnode.elm, api.nextSibling(elm)); + removeVnodes(parent, [oldVnode], 0, 0); + } + } + for (i = 0; i < insertedVnodeQueue.length; ++i) { + insertedVnodeQueue[i].data.hook.insert(insertedVnodeQueue[i]); + } + for (i = 0; i < cbs.post.length; ++i) + cbs.post[i](); + return vnode; + }; +} +//# sourceMappingURL=snabbdom.js.map + +/***/ }), +/* 150 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["b"] = vnode; +function vnode(sel, data, children, text, elm) { + var key = data === undefined ? undefined : data.key; + return { sel: sel, data: data, children: children, + text: text, elm: elm, key: key }; +} +/* harmony default export */ __webpack_exports__["a"] = (vnode); +//# sourceMappingURL=vnode.js.map + +/***/ }), +/* 151 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(81); +__webpack_require__(82); +__webpack_require__(120); +__webpack_require__(183); +module.exports = __webpack_require__(20).Map; + + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(81); +__webpack_require__(82); +__webpack_require__(120); +__webpack_require__(184); +module.exports = __webpack_require__(20).Promise; + + +/***/ }), +/* 153 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(198); +__webpack_require__(202); +__webpack_require__(209); +__webpack_require__(82); +__webpack_require__(193); +__webpack_require__(194); +__webpack_require__(199); +__webpack_require__(203); +__webpack_require__(205); +__webpack_require__(189); +__webpack_require__(190); +__webpack_require__(191); +__webpack_require__(192); +__webpack_require__(195); +__webpack_require__(196); +__webpack_require__(197); +__webpack_require__(200); +__webpack_require__(201); +__webpack_require__(204); +__webpack_require__(206); +__webpack_require__(207); +__webpack_require__(208); +__webpack_require__(185); +__webpack_require__(186); +__webpack_require__(187); +__webpack_require__(188); +module.exports = __webpack_require__(20).String; + + +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(210); +__webpack_require__(81); +module.exports = __webpack_require__(20).Symbol; + + +/***/ }), +/* 155 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/******************************************************************************* + * Copyright (c) 2018 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +__webpack_require__(241); +var standalone_1 = __webpack_require__(292); +standalone_1.initializeSiriusDiagram(); + + +/***/ }), +/* 156 */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.31 Array.prototype[@@unscopables] +var UNSCOPABLES = __webpack_require__(4)('unscopables'); +var ArrayProto = Array.prototype; +if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(26)(ArrayProto, UNSCOPABLES, {}); +module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; +}; + + +/***/ }), +/* 157 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(33); +var toLength = __webpack_require__(45); +var toAbsoluteIndex = __webpack_require__(117); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + + +/***/ }), +/* 158 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var dP = __webpack_require__(27).f; +var create = __webpack_require__(74); +var redefineAll = __webpack_require__(76); +var ctx = __webpack_require__(37); +var anInstance = __webpack_require__(66); +var forOf = __webpack_require__(71); +var $iterDefine = __webpack_require__(72); +var step = __webpack_require__(108); +var setSpecies = __webpack_require__(114); +var DESCRIPTORS = __webpack_require__(23); +var fastKey = __webpack_require__(73).fastKey; +var validate = __webpack_require__(118); +var SIZE = DESCRIPTORS ? '_s' : 'size'; + +var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while (entry = entry ? entry.n : this._f) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + } + }); + if (DESCRIPTORS) dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + } + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } +}; + + +/***/ }), +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(6); +var $export = __webpack_require__(10); +var redefine = __webpack_require__(28); +var redefineAll = __webpack_require__(76); +var meta = __webpack_require__(73); +var forOf = __webpack_require__(71); +var anInstance = __webpack_require__(66); +var isObject = __webpack_require__(14); +var fails = __webpack_require__(24); +var $iterDetect = __webpack_require__(107); +var setToStringTag = __webpack_require__(44); +var inheritIfRequired = __webpack_require__(161); + +module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + var fixMethod = function (KEY) { + var fn = proto[KEY]; + redefine(proto, KEY, + KEY == 'delete' ? function (a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'has' ? function has(a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'get' ? function get(a) { + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; } + : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; } + ); + }; + if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { + new C().entries().next(); + }))) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + var instance = new C(); + // early implementations not supports chaining + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = !IS_WEAK && fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C(); + var index = 5; + while (index--) $instance[ADDER](index, index); + return !$instance.has(-0); + }); + if (!ACCEPT_ITERABLES) { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base(), target, C); + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); + // weak collections should not contains .clear method + if (IS_WEAK && proto.clear) delete proto.clear; + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F * (C != Base), O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; +}; + + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(57); +var gOPS = __webpack_require__(112); +var pIE = __webpack_require__(75); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; + + +/***/ }), +/* 161 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(14); +var setPrototypeOf = __webpack_require__(174).set; +module.exports = function (that, target, C) { + var S = target.constructor; + var P; + if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { + setPrototypeOf(that, P); + } return that; +}; + + +/***/ }), +/* 162 */ +/***/ (function(module, exports) { + +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; + + +/***/ }), +/* 163 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(36); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + + +/***/ }), +/* 164 */ +/***/ (function(module, exports, __webpack_require__) { + +// check on default Array iterator +var Iterators = __webpack_require__(43); +var ITERATOR = __webpack_require__(4)('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + + +/***/ }), +/* 165 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(36); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; + + +/***/ }), +/* 166 */ +/***/ (function(module, exports, __webpack_require__) { + +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(19); +module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } +}; + + +/***/ }), +/* 167 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(74); +var descriptor = __webpack_require__(58); +var setToStringTag = __webpack_require__(44); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(26)(IteratorPrototype, __webpack_require__(4)('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + + +/***/ }), +/* 168 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(6); +var macrotask = __webpack_require__(116).set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = __webpack_require__(36)(process) == 'process'; + +module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + var promise = Promise.resolve(); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; +}; + + +/***/ }), +/* 169 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(27); +var anObject = __webpack_require__(19); +var getKeys = __webpack_require__(57); + +module.exports = __webpack_require__(23) ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + + +/***/ }), +/* 170 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(33); +var gOPN = __webpack_require__(111).f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; + + +/***/ }), +/* 171 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(25); +var toObject = __webpack_require__(179); +var IE_PROTO = __webpack_require__(77)('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + + +/***/ }), +/* 172 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + + +/***/ }), +/* 173 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(19); +var isObject = __webpack_require__(14); +var newPromiseCapability = __webpack_require__(109); + +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; + + +/***/ }), +/* 174 */ +/***/ (function(module, exports, __webpack_require__) { + +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__(14); +var anObject = __webpack_require__(19); +var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = __webpack_require__(37)(Function.call, __webpack_require__(110).f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; + + +/***/ }), +/* 175 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(19); +var aFunction = __webpack_require__(54); +var SPECIES = __webpack_require__(4)('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + + +/***/ }), +/* 176 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var toInteger = __webpack_require__(59); +var defined = __webpack_require__(22); + +module.exports = function repeat(count) { + var str = String(defined(this)); + var res = ''; + var n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); + for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; + return res; +}; + + +/***/ }), +/* 177 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(10); +var defined = __webpack_require__(22); +var fails = __webpack_require__(24); +var spaces = __webpack_require__(178); +var space = '[' + spaces + ']'; +var non = '\u200b\u0085'; +var ltrim = RegExp('^' + space + space + '*'); +var rtrim = RegExp(space + space + '*$'); + +var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); +}; + +// 1 -> String#trimLeft +// 2 -> String#trimRight +// 3 -> String#trim +var trim = exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; +}; + +module.exports = exporter; + + +/***/ }), +/* 178 */ +/***/ (function(module, exports) { + +module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + + +/***/ }), +/* 179 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(22); +module.exports = function (it) { + return Object(defined(it)); +}; + + +/***/ }), +/* 180 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(6); +var core = __webpack_require__(20); +var LIBRARY = __webpack_require__(56); +var wksExt = __webpack_require__(119); +var defineProperty = __webpack_require__(27).f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; + + +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(67); +var ITERATOR = __webpack_require__(4)('iterator'); +var Iterators = __webpack_require__(43); +module.exports = __webpack_require__(20).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + + +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__(156); +var step = __webpack_require__(108); +var Iterators = __webpack_require__(43); +var toIObject = __webpack_require__(33); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(72)(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + + +/***/ }), +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(158); +var validate = __webpack_require__(118); +var MAP = 'Map'; + +// 23.1 Map Objects +module.exports = __webpack_require__(159)(MAP, function (get) { + return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + } +}, strong, true); + + +/***/ }), +/* 184 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(56); +var global = __webpack_require__(6); +var ctx = __webpack_require__(37); +var classof = __webpack_require__(67); +var $export = __webpack_require__(10); +var isObject = __webpack_require__(14); +var aFunction = __webpack_require__(54); +var anInstance = __webpack_require__(66); +var forOf = __webpack_require__(71); +var speciesConstructor = __webpack_require__(175); +var task = __webpack_require__(116).set; +var microtask = __webpack_require__(168)(); +var newPromiseCapabilityModule = __webpack_require__(109); +var perform = __webpack_require__(172); +var promiseResolve = __webpack_require__(173); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[__webpack_require__(4)('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; + } catch (e) { /* empty */ } +}(); + +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); + if (domain) domain.exit(); + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); +}; +var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if (handler = global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; +}; +var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if (handler = global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); +}; +var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } +}; + +// constructor polyfill +if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(76)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); +__webpack_require__(44)($Promise, PROMISE); +__webpack_require__(114)(PROMISE); +Wrapper = __webpack_require__(20)[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(107)(function (iter) { + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); + + +/***/ }), +/* 185 */ +/***/ (function(module, exports, __webpack_require__) { + +// @@match logic +__webpack_require__(55)('match', 1, function (defined, MATCH, $match) { + // 21.1.3.11 String.prototype.match(regexp) + return [function match(regexp) { + 'use strict'; + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, $match]; +}); + + +/***/ }), +/* 186 */ +/***/ (function(module, exports, __webpack_require__) { + +// @@replace logic +__webpack_require__(55)('replace', 2, function (defined, REPLACE, $replace) { + // 21.1.3.14 String.prototype.replace(searchValue, replaceValue) + return [function replace(searchValue, replaceValue) { + 'use strict'; + var O = defined(this); + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, $replace]; +}); + + +/***/ }), +/* 187 */ +/***/ (function(module, exports, __webpack_require__) { + +// @@search logic +__webpack_require__(55)('search', 1, function (defined, SEARCH, $search) { + // 21.1.3.15 String.prototype.search(regexp) + return [function search(regexp) { + 'use strict'; + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, $search]; +}); + + +/***/ }), +/* 188 */ +/***/ (function(module, exports, __webpack_require__) { + +// @@split logic +__webpack_require__(55)('split', 2, function (defined, SPLIT, $split) { + 'use strict'; + var isRegExp = __webpack_require__(106); + var _split = $split; + var $push = [].push; + var $SPLIT = 'split'; + var LENGTH = 'length'; + var LAST_INDEX = 'lastIndex'; + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ) { + var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group + // based on es5-shim implementation, need to rework it + $split = function (separator, limit) { + var string = String(this); + if (separator === undefined && limit === 0) return []; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) return _split.call(string, separator, limit); + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? 4294967295 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var separator2, match, lastIndex, lastLength, i; + // Doesn't need flags gy, but they don't hurt + if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); + while (match = separatorCopy.exec(string)) { + // `separatorCopy.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0][LENGTH]; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG + // eslint-disable-next-line no-loop-func + if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () { + for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined; + }); + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if (output[LENGTH] >= splitLimit) break; + } + if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + } + if (lastLastIndex === string[LENGTH]) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; + // Chakra, V8 + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { + $split = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit); + }; + } + // 21.1.3.17 String.prototype.split(separator, limit) + return [function split(separator, limit) { + var O = defined(this); + var fn = separator == undefined ? undefined : separator[SPLIT]; + return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); + }, $split]; +}); + + +/***/ }), +/* 189 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.2 String.prototype.anchor(name) +__webpack_require__(11)('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; +}); + + +/***/ }), +/* 190 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.3 String.prototype.big() +__webpack_require__(11)('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; +}); + + +/***/ }), +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.4 String.prototype.blink() +__webpack_require__(11)('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; +}); + + +/***/ }), +/* 192 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.5 String.prototype.bold() +__webpack_require__(11)('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; +}); + + +/***/ }), +/* 193 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(10); +var $at = __webpack_require__(115)(false); +$export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + } +}); + + +/***/ }), +/* 194 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + +var $export = __webpack_require__(10); +var toLength = __webpack_require__(45); +var context = __webpack_require__(79); +var ENDS_WITH = 'endsWith'; +var $endsWith = ''[ENDS_WITH]; + +$export($export.P + $export.F * __webpack_require__(70)(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /* , endPosition = @length */) { + var that = context(this, searchString, ENDS_WITH); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + var search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } +}); + + +/***/ }), +/* 195 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.6 String.prototype.fixed() +__webpack_require__(11)('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; +}); + + +/***/ }), +/* 196 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.7 String.prototype.fontcolor(color) +__webpack_require__(11)('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; +}); + + +/***/ }), +/* 197 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.8 String.prototype.fontsize(size) +__webpack_require__(11)('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; +}); + + +/***/ }), +/* 198 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(10); +var toAbsoluteIndex = __webpack_require__(117); +var fromCharCode = String.fromCharCode; +var $fromCodePoint = String.fromCodePoint; + +// length should be 1, old FF problem +$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars + var res = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } +}); + + +/***/ }), +/* 199 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.7 String.prototype.includes(searchString, position = 0) + +var $export = __webpack_require__(10); +var context = __webpack_require__(79); +var INCLUDES = 'includes'; + +$export($export.P + $export.F * __webpack_require__(70)(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } +}); + + +/***/ }), +/* 200 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.9 String.prototype.italics() +__webpack_require__(11)('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; +}); + + +/***/ }), +/* 201 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.10 String.prototype.link(url) +__webpack_require__(11)('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; +}); + + +/***/ }), +/* 202 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(10); +var toIObject = __webpack_require__(33); +var toLength = __webpack_require__(45); + +$export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite) { + var tpl = toIObject(callSite.raw); + var len = toLength(tpl.length); + var aLen = arguments.length; + var res = []; + var i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } return res.join(''); + } +}); + + +/***/ }), +/* 203 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(10); + +$export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: __webpack_require__(176) +}); + + +/***/ }), +/* 204 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.11 String.prototype.small() +__webpack_require__(11)('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; +}); + + +/***/ }), +/* 205 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + +var $export = __webpack_require__(10); +var toLength = __webpack_require__(45); +var context = __webpack_require__(79); +var STARTS_WITH = 'startsWith'; +var $startsWith = ''[STARTS_WITH]; + +$export($export.P + $export.F * __webpack_require__(70)(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /* , position = 0 */) { + var that = context(this, searchString, STARTS_WITH); + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } +}); + + +/***/ }), +/* 206 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.12 String.prototype.strike() +__webpack_require__(11)('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; +}); + + +/***/ }), +/* 207 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.13 String.prototype.sub() +__webpack_require__(11)('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; +}); + + +/***/ }), +/* 208 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.14 String.prototype.sup() +__webpack_require__(11)('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; +}); + + +/***/ }), +/* 209 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 21.1.3.25 String.prototype.trim() +__webpack_require__(177)('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; +}); + + +/***/ }), +/* 210 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// ECMAScript 6 symbols shim +var global = __webpack_require__(6); +var has = __webpack_require__(25); +var DESCRIPTORS = __webpack_require__(23); +var $export = __webpack_require__(10); +var redefine = __webpack_require__(28); +var META = __webpack_require__(73).KEY; +var $fails = __webpack_require__(24); +var shared = __webpack_require__(78); +var setToStringTag = __webpack_require__(44); +var uid = __webpack_require__(46); +var wks = __webpack_require__(4); +var wksExt = __webpack_require__(119); +var wksDefine = __webpack_require__(180); +var enumKeys = __webpack_require__(160); +var isArray = __webpack_require__(165); +var anObject = __webpack_require__(19); +var isObject = __webpack_require__(14); +var toIObject = __webpack_require__(33); +var toPrimitive = __webpack_require__(80); +var createDesc = __webpack_require__(58); +var _create = __webpack_require__(74); +var gOPNExt = __webpack_require__(170); +var $GOPD = __webpack_require__(110); +var $DP = __webpack_require__(27); +var $keys = __webpack_require__(57); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function'; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys(P = toIObject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = toPrimitive(key, true)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(111).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(75).f = $propertyIsEnumerable; + __webpack_require__(112).f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(56)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(26)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); + + +/***/ }), +/* 211 */ +/***/ (function(module, exports, __webpack_require__) { + +var attrRE = /([\w-]+)|=|(['"])([.\s\S]*?)\2/g; +var voidElements = __webpack_require__(306); + +module.exports = function (tag) { + var i = 0; + var key; + var expectingValueAfterEquals = true; + var res = { + type: 'tag', + name: '', + voidElement: false, + attrs: {}, + children: [] + }; + + tag.replace(attrRE, function (match) { + if (match === '=') { + expectingValueAfterEquals = true; + i++; + return; + } + + if (!expectingValueAfterEquals) { + if (key) { + res.attrs[key] = key; // boolean attribute + } + key=match; + } else { + if (i === 0) { + if (voidElements[match] || tag.charAt(tag.length - 2) === '/') { + res.voidElement = true; + } + res.name = match; + } else { + res.attrs[key] = match.replace(/^['"]|['"]$/g, ''); + key=undefined; + } + } + i++; + expectingValueAfterEquals = false; + }); + + return res; +}; + + +/***/ }), +/* 212 */ +/***/ (function(module, exports, __webpack_require__) { + +/*jshint -W030 */ +var tagRE = /(?:<!--[\S\s]*?-->|<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>)/g; +var parseTag = __webpack_require__(211); +// re-used obj for quick lookups of components +var empty = Object.create ? Object.create(null) : {}; +// common logic for pushing a child node onto a list +function pushTextNode(list, html, level, start, ignoreWhitespace) { + // calculate correct end of the content slice in case there's + // no tag after the text node. + var end = html.indexOf('<', start); + var content = html.slice(start, end === -1 ? undefined : end); + // if a node is nothing but whitespace, collapse it as the spec states: + // https://www.w3.org/TR/html4/struct/text.html#h-9.1 + if (/^\s*$/.test(content)) { + content = ' '; + } + // don't add whitespace-only text nodes if they would be trailing text nodes + // or if they would be leading whitespace-only text nodes: + // * end > -1 indicates this is not a trailing text node + // * leading node is when level is -1 and list has length 0 + if ((!ignoreWhitespace && end > -1 && level + list.length >= 0) || content !== ' ') { + list.push({ + type: 'text', + content: content + }); + } +} + +module.exports = function parse(html, options) { + options || (options = {}); + options.components || (options.components = empty); + var result = []; + var current; + var level = -1; + var arr = []; + var byTag = {}; + var inComponent = false; + + html.replace(tagRE, function (tag, index) { + if (inComponent) { + if (tag !== ('</' + current.name + '>')) { + return; + } else { + inComponent = false; + } + } + + var isOpen = tag.charAt(1) !== '/'; + var isComment = tag.indexOf('<!--') === 0; + var start = index + tag.length; + var nextChar = html.charAt(start); + var parent; + + if (isOpen && !isComment) { + level++; + + current = parseTag(tag); + if (current.type === 'tag' && options.components[current.name]) { + current.type = 'component'; + inComponent = true; + } + + if (!current.voidElement && !inComponent && nextChar && nextChar !== '<') { + pushTextNode(current.children, html, level, start, options.ignoreWhitespace); + } + + byTag[current.tagName] = current; + + // if we're at root, push new base node + if (level === 0) { + result.push(current); + } + + parent = arr[level - 1]; + + if (parent) { + parent.children.push(current); + } + + arr[level] = current; + } + + if (isComment || !isOpen || current.voidElement) { + if (!isComment) { + level--; + } + if (!inComponent && nextChar !== '<' && nextChar) { + // trailing text node + // if we're at the root, push a base text node. otherwise add as + // a child to the current node. + parent = level === -1 ? result : arr[level].children; + pushTextNode(parent, html, level, start, options.ignoreWhitespace); + } + } + }); + + // If the "html" passed isn't actually html, add it as a text node. + if (!result.length && html.length) { + pushTextNode(result, html, 0, 0, options.ignoreWhitespace); + } + + return result; +}; + + +/***/ }), +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var ERRORS_MSGS = __webpack_require__(12); +var METADATA_KEY = __webpack_require__(5); +function injectable() { + return function (target) { + if (Reflect.hasOwnMetadata(METADATA_KEY.PARAM_TYPES, target)) { + throw new Error(ERRORS_MSGS.DUPLICATED_INJECTABLE_DECORATOR); + } + var types = Reflect.getMetadata(METADATA_KEY.DESIGN_PARAM_TYPES, target) || []; + Reflect.defineMetadata(METADATA_KEY.PARAM_TYPES, types, target); + return target; + }; +} +exports.injectable = injectable; + + +/***/ }), +/* 214 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var METADATA_KEY = __webpack_require__(5); +var metadata_1 = __webpack_require__(16); +var decorator_utils_1 = __webpack_require__(29); +function multiInject(serviceIdentifier) { + return function (target, targetKey, index) { + var metadata = new metadata_1.Metadata(METADATA_KEY.MULTI_INJECT_TAG, serviceIdentifier); + if (typeof index === "number") { + decorator_utils_1.tagParameter(target, targetKey, index, metadata); + } + else { + decorator_utils_1.tagProperty(target, targetKey, metadata); + } + }; +} +exports.multiInject = multiInject; + + +/***/ }), +/* 215 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var METADATA_KEY = __webpack_require__(5); +var metadata_1 = __webpack_require__(16); +var decorator_utils_1 = __webpack_require__(29); +function named(name) { + return function (target, targetKey, index) { + var metadata = new metadata_1.Metadata(METADATA_KEY.NAMED_TAG, name); + if (typeof index === "number") { + decorator_utils_1.tagParameter(target, targetKey, index, metadata); + } + else { + decorator_utils_1.tagProperty(target, targetKey, metadata); + } + }; +} +exports.named = named; + + +/***/ }), +/* 216 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var METADATA_KEY = __webpack_require__(5); +var metadata_1 = __webpack_require__(16); +var decorator_utils_1 = __webpack_require__(29); +function optional() { + return function (target, targetKey, index) { + var metadata = new metadata_1.Metadata(METADATA_KEY.OPTIONAL_TAG, true); + if (typeof index === "number") { + decorator_utils_1.tagParameter(target, targetKey, index, metadata); + } + else { + decorator_utils_1.tagProperty(target, targetKey, metadata); + } + }; +} +exports.optional = optional; + + +/***/ }), +/* 217 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var ERRORS_MSGS = __webpack_require__(12); +var METADATA_KEY = __webpack_require__(5); +var metadata_1 = __webpack_require__(16); +function postConstruct() { + return function (target, propertyKey, descriptor) { + var metadata = new metadata_1.Metadata(METADATA_KEY.POST_CONSTRUCT, propertyKey); + if (Reflect.hasOwnMetadata(METADATA_KEY.POST_CONSTRUCT, target.constructor)) { + throw new Error(ERRORS_MSGS.MULTIPLE_POST_CONSTRUCT_METHODS); + } + Reflect.defineMetadata(METADATA_KEY.POST_CONSTRUCT, metadata, target.constructor); + }; +} +exports.postConstruct = postConstruct; + + +/***/ }), +/* 218 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var metadata_1 = __webpack_require__(16); +var decorator_utils_1 = __webpack_require__(29); +function tagged(metadataKey, metadataValue) { + return function (target, targetKey, index) { + var metadata = new metadata_1.Metadata(metadataKey, metadataValue); + if (typeof index === "number") { + decorator_utils_1.tagParameter(target, targetKey, index, metadata); + } + else { + decorator_utils_1.tagProperty(target, targetKey, metadata); + } + }; +} +exports.tagged = tagged; + + +/***/ }), +/* 219 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var METADATA_KEY = __webpack_require__(5); +var metadata_1 = __webpack_require__(16); +var decorator_utils_1 = __webpack_require__(29); +function targetName(name) { + return function (target, targetKey, index) { + var metadata = new metadata_1.Metadata(METADATA_KEY.NAME_TAG, name); + decorator_utils_1.tagParameter(target, targetKey, index, metadata); + }; +} +exports.targetName = targetName; + + +/***/ }), +/* 220 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var METADATA_KEY = __webpack_require__(5); +var metadata_1 = __webpack_require__(16); +var decorator_utils_1 = __webpack_require__(29); +function unmanaged() { + return function (target, targetKey, index) { + var metadata = new metadata_1.Metadata(METADATA_KEY.UNMANAGED_TAG, true); + decorator_utils_1.tagParameter(target, targetKey, index, metadata); + }; +} +exports.unmanaged = unmanaged; + + +/***/ }), +/* 221 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var literal_types_1 = __webpack_require__(21); +var guid_1 = __webpack_require__(34); +var Binding = (function () { + function Binding(serviceIdentifier, scope) { + this.guid = guid_1.guid(); + this.activated = false; + this.serviceIdentifier = serviceIdentifier; + this.scope = scope; + this.type = literal_types_1.BindingTypeEnum.Invalid; + this.constraint = function (request) { return true; }; + this.implementationType = null; + this.cache = null; + this.factory = null; + this.provider = null; + this.onActivation = null; + this.dynamicValue = null; + } + Binding.prototype.clone = function () { + var clone = new Binding(this.serviceIdentifier, this.scope); + clone.activated = false; + clone.implementationType = this.implementationType; + clone.dynamicValue = this.dynamicValue; + clone.scope = this.scope; + clone.type = this.type; + clone.factory = this.factory; + clone.provider = this.provider; + clone.constraint = this.constraint; + clone.onActivation = this.onActivation; + clone.cache = this.cache; + return clone; + }; + return Binding; +}()); +exports.Binding = Binding; + + +/***/ }), +/* 222 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var BindingCount = { + MultipleBindingsAvailable: 2, + NoBindingsAvailable: 0, + OnlyOneBindingAvailable: 1 +}; +exports.BindingCount = BindingCount; + + +/***/ }), +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var binding_1 = __webpack_require__(221); +var ERROR_MSGS = __webpack_require__(12); +var literal_types_1 = __webpack_require__(21); +var METADATA_KEY = __webpack_require__(5); +var metadata_reader_1 = __webpack_require__(123); +var planner_1 = __webpack_require__(229); +var resolver_1 = __webpack_require__(234); +var binding_to_syntax_1 = __webpack_require__(237); +var guid_1 = __webpack_require__(34); +var serialization_1 = __webpack_require__(47); +var container_snapshot_1 = __webpack_require__(225); +var lookup_1 = __webpack_require__(226); +var Container = (function () { + function Container(containerOptions) { + if (containerOptions !== undefined) { + if (typeof containerOptions !== "object") { + throw new Error("" + ERROR_MSGS.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT); + } + else { + if (containerOptions.defaultScope !== undefined && + containerOptions.defaultScope !== literal_types_1.BindingScopeEnum.Singleton && + containerOptions.defaultScope !== literal_types_1.BindingScopeEnum.Transient && + containerOptions.defaultScope !== literal_types_1.BindingScopeEnum.Request) { + throw new Error("" + ERROR_MSGS.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE); + } + if (containerOptions.autoBindInjectable !== undefined && + typeof containerOptions.autoBindInjectable !== "boolean") { + throw new Error("" + ERROR_MSGS.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE); + } + } + this.options = { + autoBindInjectable: containerOptions.autoBindInjectable, + defaultScope: containerOptions.defaultScope + }; + } + else { + this.options = { + autoBindInjectable: false, + defaultScope: literal_types_1.BindingScopeEnum.Transient + }; + } + this.guid = guid_1.guid(); + this._bindingDictionary = new lookup_1.Lookup(); + this._snapshots = []; + this._middleware = null; + this.parent = null; + this._metadataReader = new metadata_reader_1.MetadataReader(); + } + Container.merge = function (container1, container2) { + var container = new Container(); + var bindingDictionary = planner_1.getBindingDictionary(container); + var bindingDictionary1 = planner_1.getBindingDictionary(container1); + var bindingDictionary2 = planner_1.getBindingDictionary(container2); + function copyDictionary(origin, destination) { + origin.traverse(function (key, value) { + value.forEach(function (binding) { + destination.add(binding.serviceIdentifier, binding.clone()); + }); + }); + } + copyDictionary(bindingDictionary1, bindingDictionary); + copyDictionary(bindingDictionary2, bindingDictionary); + return container; + }; + Container.prototype.load = function () { + var _this = this; + var modules = []; + for (var _i = 0; _i < arguments.length; _i++) { + modules[_i] = arguments[_i]; + } + var setModuleId = function (bindingToSyntax, moduleId) { + bindingToSyntax._binding.moduleId = moduleId; + }; + var getBindFunction = function (moduleId) { + return function (serviceIdentifier) { + var bindingToSyntax = _this.bind.call(_this, serviceIdentifier); + setModuleId(bindingToSyntax, moduleId); + return bindingToSyntax; + }; + }; + var getUnbindFunction = function (moduleId) { + return function (serviceIdentifier) { + var _unbind = _this.unbind.bind(_this); + _unbind(serviceIdentifier); + }; + }; + var getIsboundFunction = function (moduleId) { + return function (serviceIdentifier) { + var _isBound = _this.isBound.bind(_this); + return _isBound(serviceIdentifier); + }; + }; + var getRebindFunction = function (moduleId) { + return function (serviceIdentifier) { + var bindingToSyntax = _this.rebind.call(_this, serviceIdentifier); + setModuleId(bindingToSyntax, moduleId); + return bindingToSyntax; + }; + }; + modules.forEach(function (module) { + var bindFunction = getBindFunction(module.guid); + var unbindFunction = getUnbindFunction(module.guid); + var isboundFunction = getIsboundFunction(module.guid); + var rebindFunction = getRebindFunction(module.guid); + module.registry(bindFunction, unbindFunction, isboundFunction, rebindFunction); + }); + }; + Container.prototype.unload = function () { + var _this = this; + var modules = []; + for (var _i = 0; _i < arguments.length; _i++) { + modules[_i] = arguments[_i]; + } + var conditionFactory = function (expected) { return function (item) { + return item.moduleId === expected; + }; }; + modules.forEach(function (module) { + var condition = conditionFactory(module.guid); + _this._bindingDictionary.removeByCondition(condition); + }); + }; + Container.prototype.bind = function (serviceIdentifier) { + var scope = this.options.defaultScope || literal_types_1.BindingScopeEnum.Transient; + var binding = new binding_1.Binding(serviceIdentifier, scope); + this._bindingDictionary.add(serviceIdentifier, binding); + return new binding_to_syntax_1.BindingToSyntax(binding); + }; + Container.prototype.rebind = function (serviceIdentifier) { + this.unbind(serviceIdentifier); + return this.bind(serviceIdentifier); + }; + Container.prototype.unbind = function (serviceIdentifier) { + try { + this._bindingDictionary.remove(serviceIdentifier); + } + catch (e) { + throw new Error(ERROR_MSGS.CANNOT_UNBIND + " " + serialization_1.getServiceIdentifierAsString(serviceIdentifier)); + } + }; + Container.prototype.unbindAll = function () { + this._bindingDictionary = new lookup_1.Lookup(); + }; + Container.prototype.isBound = function (serviceIdentifier) { + var bound = this._bindingDictionary.hasKey(serviceIdentifier); + if (!bound && this.parent) { + bound = this.parent.isBound(serviceIdentifier); + } + return bound; + }; + Container.prototype.isBoundNamed = function (serviceIdentifier, named) { + return this.isBoundTagged(serviceIdentifier, METADATA_KEY.NAMED_TAG, named); + }; + Container.prototype.isBoundTagged = function (serviceIdentifier, key, value) { + var bound = false; + if (this._bindingDictionary.hasKey(serviceIdentifier)) { + var bindings = this._bindingDictionary.get(serviceIdentifier); + var request_1 = planner_1.createMockRequest(this, serviceIdentifier, key, value); + bound = bindings.some(function (b) { return b.constraint(request_1); }); + } + if (!bound && this.parent) { + bound = this.parent.isBoundTagged(serviceIdentifier, key, value); + } + return bound; + }; + Container.prototype.snapshot = function () { + this._snapshots.push(container_snapshot_1.ContainerSnapshot.of(this._bindingDictionary.clone(), this._middleware)); + }; + Container.prototype.restore = function () { + var snapshot = this._snapshots.pop(); + if (snapshot === undefined) { + throw new Error(ERROR_MSGS.NO_MORE_SNAPSHOTS_AVAILABLE); + } + this._bindingDictionary = snapshot.bindings; + this._middleware = snapshot.middleware; + }; + Container.prototype.createChild = function () { + var child = new Container(); + child.parent = this; + return child; + }; + Container.prototype.applyMiddleware = function () { + var middlewares = []; + for (var _i = 0; _i < arguments.length; _i++) { + middlewares[_i] = arguments[_i]; + } + var initial = (this._middleware) ? this._middleware : this._planAndResolve(); + this._middleware = middlewares.reduce(function (prev, curr) { return curr(prev); }, initial); + }; + Container.prototype.applyCustomMetadataReader = function (metadataReader) { + this._metadataReader = metadataReader; + }; + Container.prototype.get = function (serviceIdentifier) { + return this._get(false, false, literal_types_1.TargetTypeEnum.Variable, serviceIdentifier); + }; + Container.prototype.getTagged = function (serviceIdentifier, key, value) { + return this._get(false, false, literal_types_1.TargetTypeEnum.Variable, serviceIdentifier, key, value); + }; + Container.prototype.getNamed = function (serviceIdentifier, named) { + return this.getTagged(serviceIdentifier, METADATA_KEY.NAMED_TAG, named); + }; + Container.prototype.getAll = function (serviceIdentifier) { + return this._get(true, true, literal_types_1.TargetTypeEnum.Variable, serviceIdentifier); + }; + Container.prototype.getAllTagged = function (serviceIdentifier, key, value) { + return this._get(false, true, literal_types_1.TargetTypeEnum.Variable, serviceIdentifier, key, value); + }; + Container.prototype.getAllNamed = function (serviceIdentifier, named) { + return this.getAllTagged(serviceIdentifier, METADATA_KEY.NAMED_TAG, named); + }; + Container.prototype.resolve = function (constructorFunction) { + var tempContainer = new Container(); + tempContainer.bind(constructorFunction).toSelf(); + tempContainer.parent = this; + return tempContainer.get(constructorFunction); + }; + Container.prototype._get = function (avoidConstraints, isMultiInject, targetType, serviceIdentifier, key, value) { + var result = null; + var defaultArgs = { + avoidConstraints: avoidConstraints, + contextInterceptor: function (context) { return context; }, + isMultiInject: isMultiInject, + key: key, + serviceIdentifier: serviceIdentifier, + targetType: targetType, + value: value + }; + if (this._middleware) { + result = this._middleware(defaultArgs); + if (result === undefined || result === null) { + throw new Error(ERROR_MSGS.INVALID_MIDDLEWARE_RETURN); + } + } + else { + result = this._planAndResolve()(defaultArgs); + } + return result; + }; + Container.prototype._planAndResolve = function () { + var _this = this; + return function (args) { + var context = planner_1.plan(_this._metadataReader, _this, args.isMultiInject, args.targetType, args.serviceIdentifier, args.key, args.value, args.avoidConstraints); + context = args.contextInterceptor(context); + var result = resolver_1.resolve(context); + return result; + }; + }; + return Container; +}()); +exports.Container = Container; + + +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var guid_1 = __webpack_require__(34); +var ContainerModule = (function () { + function ContainerModule(registry) { + this.guid = guid_1.guid(); + this.registry = registry; + } + return ContainerModule; +}()); +exports.ContainerModule = ContainerModule; + + +/***/ }), +/* 225 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var ContainerSnapshot = (function () { + function ContainerSnapshot() { + } + ContainerSnapshot.of = function (bindings, middleware) { + var snapshot = new ContainerSnapshot(); + snapshot.bindings = bindings; + snapshot.middleware = middleware; + return snapshot; + }; + return ContainerSnapshot; +}()); +exports.ContainerSnapshot = ContainerSnapshot; + + +/***/ }), +/* 226 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var ERROR_MSGS = __webpack_require__(12); +var Lookup = (function () { + function Lookup() { + this._map = new Map(); + } + Lookup.prototype.getMap = function () { + return this._map; + }; + Lookup.prototype.add = function (serviceIdentifier, value) { + if (serviceIdentifier === null || serviceIdentifier === undefined) { + throw new Error(ERROR_MSGS.NULL_ARGUMENT); + } + if (value === null || value === undefined) { + throw new Error(ERROR_MSGS.NULL_ARGUMENT); + } + var entry = this._map.get(serviceIdentifier); + if (entry !== undefined) { + entry.push(value); + this._map.set(serviceIdentifier, entry); + } + else { + this._map.set(serviceIdentifier, [value]); + } + }; + Lookup.prototype.get = function (serviceIdentifier) { + if (serviceIdentifier === null || serviceIdentifier === undefined) { + throw new Error(ERROR_MSGS.NULL_ARGUMENT); + } + var entry = this._map.get(serviceIdentifier); + if (entry !== undefined) { + return entry; + } + else { + throw new Error(ERROR_MSGS.KEY_NOT_FOUND); + } + }; + Lookup.prototype.remove = function (serviceIdentifier) { + if (serviceIdentifier === null || serviceIdentifier === undefined) { + throw new Error(ERROR_MSGS.NULL_ARGUMENT); + } + if (!this._map.delete(serviceIdentifier)) { + throw new Error(ERROR_MSGS.KEY_NOT_FOUND); + } + }; + Lookup.prototype.removeByCondition = function (condition) { + var _this = this; + this._map.forEach(function (entries, key) { + var updatedEntries = entries.filter(function (entry) { return !condition(entry); }); + if (updatedEntries.length > 0) { + _this._map.set(key, updatedEntries); + } + else { + _this._map.delete(key); + } + }); + }; + Lookup.prototype.hasKey = function (serviceIdentifier) { + if (serviceIdentifier === null || serviceIdentifier === undefined) { + throw new Error(ERROR_MSGS.NULL_ARGUMENT); + } + return this._map.has(serviceIdentifier); + }; + Lookup.prototype.clone = function () { + var copy = new Lookup(); + this._map.forEach(function (value, key) { + value.forEach(function (b) { return copy.add(key, b.clone()); }); + }); + return copy; + }; + Lookup.prototype.traverse = function (func) { + this._map.forEach(function (value, key) { + func(key, value); + }); + }; + return Lookup; +}()); +exports.Lookup = Lookup; + + +/***/ }), +/* 227 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var guid_1 = __webpack_require__(34); +var Context = (function () { + function Context(container) { + this.guid = guid_1.guid(); + this.container = container; + } + Context.prototype.addPlan = function (plan) { + this.plan = plan; + }; + Context.prototype.setCurrentRequest = function (currentRequest) { + this.currentRequest = currentRequest; + }; + return Context; +}()); +exports.Context = Context; + + +/***/ }), +/* 228 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var Plan = (function () { + function Plan(parentContext, rootRequest) { + this.parentContext = parentContext; + this.rootRequest = rootRequest; + } + return Plan; +}()); +exports.Plan = Plan; + + +/***/ }), +/* 229 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var binding_count_1 = __webpack_require__(222); +var ERROR_MSGS = __webpack_require__(12); +var literal_types_1 = __webpack_require__(21); +var METADATA_KEY = __webpack_require__(5); +var exceptions_1 = __webpack_require__(127); +var serialization_1 = __webpack_require__(47); +var context_1 = __webpack_require__(227); +var metadata_1 = __webpack_require__(16); +var plan_1 = __webpack_require__(228); +var reflection_utils_1 = __webpack_require__(231); +var request_1 = __webpack_require__(232); +var target_1 = __webpack_require__(124); +function getBindingDictionary(cntnr) { + return cntnr._bindingDictionary; +} +exports.getBindingDictionary = getBindingDictionary; +function _createTarget(isMultiInject, targetType, serviceIdentifier, name, key, value) { + var metadataKey = isMultiInject ? METADATA_KEY.MULTI_INJECT_TAG : METADATA_KEY.INJECT_TAG; + var injectMetadata = new metadata_1.Metadata(metadataKey, serviceIdentifier); + var target = new target_1.Target(targetType, name, serviceIdentifier, injectMetadata); + if (key !== undefined) { + var tagMetadata = new metadata_1.Metadata(key, value); + target.metadata.push(tagMetadata); + } + return target; +} +function _getActiveBindings(metadataReader, avoidConstraints, context, parentRequest, target) { + var bindings = getBindings(context.container, target.serviceIdentifier); + var activeBindings = []; + if (bindings.length === binding_count_1.BindingCount.NoBindingsAvailable && + context.container.options.autoBindInjectable && + typeof target.serviceIdentifier === "function" && + metadataReader.getConstructorMetadata(target.serviceIdentifier).compilerGeneratedMetadata) { + context.container.bind(target.serviceIdentifier).toSelf(); + bindings = getBindings(context.container, target.serviceIdentifier); + } + if (!avoidConstraints) { + activeBindings = bindings.filter(function (binding) { + var request = new request_1.Request(binding.serviceIdentifier, context, parentRequest, binding, target); + return binding.constraint(request); + }); + } + else { + activeBindings = bindings; + } + _validateActiveBindingCount(target.serviceIdentifier, activeBindings, target, context.container); + return activeBindings; +} +function _validateActiveBindingCount(serviceIdentifier, bindings, target, container) { + switch (bindings.length) { + case binding_count_1.BindingCount.NoBindingsAvailable: + if (target.isOptional()) { + return bindings; + } + else { + var serviceIdentifierString = serialization_1.getServiceIdentifierAsString(serviceIdentifier); + var msg = ERROR_MSGS.NOT_REGISTERED; + msg += serialization_1.listMetadataForTarget(serviceIdentifierString, target); + msg += serialization_1.listRegisteredBindingsForServiceIdentifier(container, serviceIdentifierString, getBindings); + throw new Error(msg); + } + case binding_count_1.BindingCount.OnlyOneBindingAvailable: + if (!target.isArray()) { + return bindings; + } + case binding_count_1.BindingCount.MultipleBindingsAvailable: + default: + if (!target.isArray()) { + var serviceIdentifierString = serialization_1.getServiceIdentifierAsString(serviceIdentifier); + var msg = ERROR_MSGS.AMBIGUOUS_MATCH + " " + serviceIdentifierString; + msg += serialization_1.listRegisteredBindingsForServiceIdentifier(container, serviceIdentifierString, getBindings); + throw new Error(msg); + } + else { + return bindings; + } + } +} +function _createSubRequests(metadataReader, avoidConstraints, serviceIdentifier, context, parentRequest, target) { + var activeBindings; + var childRequest; + if (parentRequest === null) { + activeBindings = _getActiveBindings(metadataReader, avoidConstraints, context, null, target); + childRequest = new request_1.Request(serviceIdentifier, context, null, activeBindings, target); + var thePlan = new plan_1.Plan(context, childRequest); + context.addPlan(thePlan); + } + else { + activeBindings = _getActiveBindings(metadataReader, avoidConstraints, context, parentRequest, target); + childRequest = parentRequest.addChildRequest(target.serviceIdentifier, activeBindings, target); + } + activeBindings.forEach(function (binding) { + var subChildRequest = null; + if (target.isArray()) { + subChildRequest = childRequest.addChildRequest(binding.serviceIdentifier, binding, target); + } + else { + if (binding.cache) { + return; + } + subChildRequest = childRequest; + } + if (binding.type === literal_types_1.BindingTypeEnum.Instance && binding.implementationType !== null) { + var dependencies = reflection_utils_1.getDependencies(metadataReader, binding.implementationType); + dependencies.forEach(function (dependency) { + _createSubRequests(metadataReader, false, dependency.serviceIdentifier, context, subChildRequest, dependency); + }); + } + }); +} +function getBindings(container, serviceIdentifier) { + var bindings = []; + var bindingDictionary = getBindingDictionary(container); + if (bindingDictionary.hasKey(serviceIdentifier)) { + bindings = bindingDictionary.get(serviceIdentifier); + } + else if (container.parent !== null) { + bindings = getBindings(container.parent, serviceIdentifier); + } + return bindings; +} +function plan(metadataReader, container, isMultiInject, targetType, serviceIdentifier, key, value, avoidConstraints) { + if (avoidConstraints === void 0) { avoidConstraints = false; } + var context = new context_1.Context(container); + var target = _createTarget(isMultiInject, targetType, serviceIdentifier, "", key, value); + try { + _createSubRequests(metadataReader, avoidConstraints, serviceIdentifier, context, null, target); + return context; + } + catch (error) { + if (exceptions_1.isStackOverflowExeption(error)) { + if (context.plan) { + serialization_1.circularDependencyToException(context.plan.rootRequest); + } + } + throw error; + } +} +exports.plan = plan; +function createMockRequest(container, serviceIdentifier, key, value) { + var target = new target_1.Target(literal_types_1.TargetTypeEnum.Variable, "", serviceIdentifier, new metadata_1.Metadata(key, value)); + var context = new context_1.Context(container); + var request = new request_1.Request(serviceIdentifier, context, null, [], target); + return request; +} +exports.createMockRequest = createMockRequest; + + +/***/ }), +/* 230 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var QueryableString = (function () { + function QueryableString(str) { + this.str = str; + } + QueryableString.prototype.startsWith = function (searchString) { + return this.str.indexOf(searchString) === 0; + }; + QueryableString.prototype.endsWith = function (searchString) { + var reverseString = ""; + var reverseSearchString = searchString.split("").reverse().join(""); + reverseString = this.str.split("").reverse().join(""); + return this.startsWith.call({ str: reverseString }, reverseSearchString); + }; + QueryableString.prototype.contains = function (searchString) { + return (this.str.indexOf(searchString) !== -1); + }; + QueryableString.prototype.equals = function (compareString) { + return this.str === compareString; + }; + QueryableString.prototype.value = function () { + return this.str; + }; + return QueryableString; +}()); +exports.QueryableString = QueryableString; + + +/***/ }), +/* 231 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var inject_1 = __webpack_require__(122); +var ERROR_MSGS = __webpack_require__(12); +var literal_types_1 = __webpack_require__(21); +var METADATA_KEY = __webpack_require__(5); +var serialization_1 = __webpack_require__(47); +var target_1 = __webpack_require__(124); +function getDependencies(metadataReader, func) { + var constructorName = serialization_1.getFunctionName(func); + var targets = getTargets(metadataReader, constructorName, func, false); + return targets; +} +exports.getDependencies = getDependencies; +function getTargets(metadataReader, constructorName, func, isBaseClass) { + var metadata = metadataReader.getConstructorMetadata(func); + var serviceIdentifiers = metadata.compilerGeneratedMetadata; + if (serviceIdentifiers === undefined) { + var msg = ERROR_MSGS.MISSING_INJECTABLE_ANNOTATION + " " + constructorName + "."; + throw new Error(msg); + } + var constructorArgsMetadata = metadata.userGeneratedMetadata; + var keys = Object.keys(constructorArgsMetadata); + var hasUserDeclaredUnknownInjections = (func.length === 0 && keys.length > 0); + var iterations = (hasUserDeclaredUnknownInjections) ? keys.length : func.length; + var constructorTargets = getConstructorArgsAsTargets(isBaseClass, constructorName, serviceIdentifiers, constructorArgsMetadata, iterations); + var propertyTargets = getClassPropsAsTargets(metadataReader, func); + var targets = constructorTargets.concat(propertyTargets); + var baseClassDependencyCount = getBaseClassDependencyCount(metadataReader, func); + if (targets.length < baseClassDependencyCount) { + var error = ERROR_MSGS.ARGUMENTS_LENGTH_MISMATCH_1 + + constructorName + ERROR_MSGS.ARGUMENTS_LENGTH_MISMATCH_2; + throw new Error(error); + } + return targets; +} +function getConstructorArgsAsTarget(index, isBaseClass, constructorName, serviceIdentifiers, constructorArgsMetadata) { + var targetMetadata = constructorArgsMetadata[index.toString()] || []; + var metadata = formatTargetMetadata(targetMetadata); + var isManaged = metadata.unmanaged !== true; + var serviceIdentifier = serviceIdentifiers[index]; + var injectIdentifier = (metadata.inject || metadata.multiInject); + serviceIdentifier = (injectIdentifier) ? (injectIdentifier) : serviceIdentifier; + if (serviceIdentifier instanceof inject_1.LazyServiceIdentifer) { + serviceIdentifier = serviceIdentifier.unwrap(); + } + if (isManaged) { + var isObject = serviceIdentifier === Object; + var isFunction = serviceIdentifier === Function; + var isUndefined = serviceIdentifier === undefined; + var isUnknownType = (isObject || isFunction || isUndefined); + if (!isBaseClass && isUnknownType) { + var msg = ERROR_MSGS.MISSING_INJECT_ANNOTATION + " argument " + index + " in class " + constructorName + "."; + throw new Error(msg); + } + var target = new target_1.Target(literal_types_1.TargetTypeEnum.ConstructorArgument, metadata.targetName, serviceIdentifier); + target.metadata = targetMetadata; + return target; + } + return null; +} +function getConstructorArgsAsTargets(isBaseClass, constructorName, serviceIdentifiers, constructorArgsMetadata, iterations) { + var targets = []; + for (var i = 0; i < iterations; i++) { + var index = i; + var target = getConstructorArgsAsTarget(index, isBaseClass, constructorName, serviceIdentifiers, constructorArgsMetadata); + if (target !== null) { + targets.push(target); + } + } + return targets; +} +function getClassPropsAsTargets(metadataReader, constructorFunc) { + var classPropsMetadata = metadataReader.getPropertiesMetadata(constructorFunc); + var targets = []; + var keys = Object.keys(classPropsMetadata); + for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { + var key = keys_1[_i]; + var targetMetadata = classPropsMetadata[key]; + var metadata = formatTargetMetadata(classPropsMetadata[key]); + var targetName = metadata.targetName || key; + var serviceIdentifier = (metadata.inject || metadata.multiInject); + var target = new target_1.Target(literal_types_1.TargetTypeEnum.ClassProperty, targetName, serviceIdentifier); + target.metadata = targetMetadata; + targets.push(target); + } + var baseConstructor = Object.getPrototypeOf(constructorFunc.prototype).constructor; + if (baseConstructor !== Object) { + var baseTargets = getClassPropsAsTargets(metadataReader, baseConstructor); + targets = targets.concat(baseTargets); + } + return targets; +} +function getBaseClassDependencyCount(metadataReader, func) { + var baseConstructor = Object.getPrototypeOf(func.prototype).constructor; + if (baseConstructor !== Object) { + var baseConstructorName = serialization_1.getFunctionName(baseConstructor); + var targets = getTargets(metadataReader, baseConstructorName, baseConstructor, true); + var metadata = targets.map(function (t) { + return t.metadata.filter(function (m) { + return m.key === METADATA_KEY.UNMANAGED_TAG; + }); + }); + var unmanagedCount = [].concat.apply([], metadata).length; + var dependencyCount = targets.length - unmanagedCount; + if (dependencyCount > 0) { + return dependencyCount; + } + else { + return getBaseClassDependencyCount(metadataReader, baseConstructor); + } + } + else { + return 0; + } +} +function formatTargetMetadata(targetMetadata) { + var targetMetadataMap = {}; + targetMetadata.forEach(function (m) { + targetMetadataMap[m.key.toString()] = m.value; + }); + return { + inject: targetMetadataMap[METADATA_KEY.INJECT_TAG], + multiInject: targetMetadataMap[METADATA_KEY.MULTI_INJECT_TAG], + targetName: targetMetadataMap[METADATA_KEY.NAME_TAG], + unmanaged: targetMetadataMap[METADATA_KEY.UNMANAGED_TAG] + }; +} + + +/***/ }), +/* 232 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var guid_1 = __webpack_require__(34); +var Request = (function () { + function Request(serviceIdentifier, parentContext, parentRequest, bindings, target) { + this.guid = guid_1.guid(); + this.serviceIdentifier = serviceIdentifier; + this.parentContext = parentContext; + this.parentRequest = parentRequest; + this.target = target; + this.childRequests = []; + this.bindings = (Array.isArray(bindings) ? bindings : [bindings]); + this.requestScope = parentRequest === null + ? new Map() + : null; + } + Request.prototype.addChildRequest = function (serviceIdentifier, bindings, target) { + var child = new Request(serviceIdentifier, this.parentContext, this, bindings, target); + this.childRequests.push(child); + return child; + }; + return Request; +}()); +exports.Request = Request; + + +/***/ }), +/* 233 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var error_msgs_1 = __webpack_require__(12); +var literal_types_1 = __webpack_require__(21); +var METADATA_KEY = __webpack_require__(5); +function _injectProperties(instance, childRequests, resolveRequest) { + var propertyInjectionsRequests = childRequests.filter(function (childRequest) { + return (childRequest.target !== null && + childRequest.target.type === literal_types_1.TargetTypeEnum.ClassProperty); + }); + var propertyInjections = propertyInjectionsRequests.map(resolveRequest); + propertyInjectionsRequests.forEach(function (r, index) { + var propertyName = ""; + propertyName = r.target.name.value(); + var injection = propertyInjections[index]; + instance[propertyName] = injection; + }); + return instance; +} +function _createInstance(Func, injections) { + return new (Func.bind.apply(Func, [void 0].concat(injections)))(); +} +function _postConstruct(constr, result) { + if (Reflect.hasMetadata(METADATA_KEY.POST_CONSTRUCT, constr)) { + var data = Reflect.getMetadata(METADATA_KEY.POST_CONSTRUCT, constr); + try { + result[data.value](); + } + catch (e) { + throw new Error(error_msgs_1.POST_CONSTRUCT_ERROR(constr.name, e.message)); + } + } +} +function resolveInstance(constr, childRequests, resolveRequest) { + var result = null; + if (childRequests.length > 0) { + var constructorInjectionsRequests = childRequests.filter(function (childRequest) { + return (childRequest.target !== null && childRequest.target.type === literal_types_1.TargetTypeEnum.ConstructorArgument); + }); + var constructorInjections = constructorInjectionsRequests.map(resolveRequest); + result = _createInstance(constr, constructorInjections); + result = _injectProperties(result, childRequests, resolveRequest); + } + else { + result = new constr(); + } + _postConstruct(constr, result); + return result; +} +exports.resolveInstance = resolveInstance; + + +/***/ }), +/* 234 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var ERROR_MSGS = __webpack_require__(12); +var literal_types_1 = __webpack_require__(21); +var exceptions_1 = __webpack_require__(127); +var serialization_1 = __webpack_require__(47); +var instantiation_1 = __webpack_require__(233); +var invokeFactory = function (factoryType, serviceIdentifier, fn) { + try { + return fn(); + } + catch (error) { + if (exceptions_1.isStackOverflowExeption(error)) { + throw new Error(ERROR_MSGS.CIRCULAR_DEPENDENCY_IN_FACTORY(factoryType, serviceIdentifier.toString())); + } + else { + throw error; + } + } +}; +var _resolveRequest = function (requestScope) { + return function (request) { + request.parentContext.setCurrentRequest(request); + var bindings = request.bindings; + var childRequests = request.childRequests; + var targetIsAnArray = request.target && request.target.isArray(); + var targetParentIsNotAnArray = !request.parentRequest || + !request.parentRequest.target || + !request.target || + !request.parentRequest.target.matchesArray(request.target.serviceIdentifier); + if (targetIsAnArray && targetParentIsNotAnArray) { + return childRequests.map(function (childRequest) { + var _f = _resolveRequest(requestScope); + return _f(childRequest); + }); + } + else { + var result = null; + if (request.target.isOptional() && bindings.length === 0) { + return undefined; + } + var binding_1 = bindings[0]; + var isSingleton = binding_1.scope === literal_types_1.BindingScopeEnum.Singleton; + var isRequestSingleton = binding_1.scope === literal_types_1.BindingScopeEnum.Request; + if (isSingleton && binding_1.activated) { + return binding_1.cache; + } + if (isRequestSingleton && + requestScope !== null && + requestScope.has(binding_1.guid)) { + return requestScope.get(binding_1.guid); + } + if (binding_1.type === literal_types_1.BindingTypeEnum.ConstantValue) { + result = binding_1.cache; + } + else if (binding_1.type === literal_types_1.BindingTypeEnum.Function) { + result = binding_1.cache; + } + else if (binding_1.type === literal_types_1.BindingTypeEnum.Constructor) { + result = binding_1.implementationType; + } + else if (binding_1.type === literal_types_1.BindingTypeEnum.DynamicValue && binding_1.dynamicValue !== null) { + result = invokeFactory("toDynamicValue", binding_1.serviceIdentifier, function () { return binding_1.dynamicValue(request.parentContext); }); + } + else if (binding_1.type === literal_types_1.BindingTypeEnum.Factory && binding_1.factory !== null) { + result = invokeFactory("toFactory", binding_1.serviceIdentifier, function () { return binding_1.factory(request.parentContext); }); + } + else if (binding_1.type === literal_types_1.BindingTypeEnum.Provider && binding_1.provider !== null) { + result = invokeFactory("toProvider", binding_1.serviceIdentifier, function () { return binding_1.provider(request.parentContext); }); + } + else if (binding_1.type === literal_types_1.BindingTypeEnum.Instance && binding_1.implementationType !== null) { + result = instantiation_1.resolveInstance(binding_1.implementationType, childRequests, _resolveRequest(requestScope)); + } + else { + var serviceIdentifier = serialization_1.getServiceIdentifierAsString(request.serviceIdentifier); + throw new Error(ERROR_MSGS.INVALID_BINDING_TYPE + " " + serviceIdentifier); + } + if (typeof binding_1.onActivation === "function") { + result = binding_1.onActivation(request.parentContext, result); + } + if (isSingleton) { + binding_1.cache = result; + binding_1.activated = true; + } + if (isRequestSingleton && + requestScope !== null && + !requestScope.has(binding_1.guid)) { + requestScope.set(binding_1.guid, result); + } + return result; + } + }; +}; +function resolve(context) { + var _f = _resolveRequest(context.plan.rootRequest.requestScope); + return _f(context.plan.rootRequest); +} +exports.resolve = resolve; + + +/***/ }), +/* 235 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var literal_types_1 = __webpack_require__(21); +var binding_when_on_syntax_1 = __webpack_require__(125); +var BindingInSyntax = (function () { + function BindingInSyntax(binding) { + this._binding = binding; + } + BindingInSyntax.prototype.inRequestScope = function () { + this._binding.scope = literal_types_1.BindingScopeEnum.Request; + return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding); + }; + BindingInSyntax.prototype.inSingletonScope = function () { + this._binding.scope = literal_types_1.BindingScopeEnum.Singleton; + return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding); + }; + BindingInSyntax.prototype.inTransientScope = function () { + this._binding.scope = literal_types_1.BindingScopeEnum.Transient; + return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding); + }; + return BindingInSyntax; +}()); +exports.BindingInSyntax = BindingInSyntax; + + +/***/ }), +/* 236 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var binding_in_syntax_1 = __webpack_require__(235); +var binding_on_syntax_1 = __webpack_require__(83); +var binding_when_syntax_1 = __webpack_require__(84); +var BindingInWhenOnSyntax = (function () { + function BindingInWhenOnSyntax(binding) { + this._binding = binding; + this._bindingWhenSyntax = new binding_when_syntax_1.BindingWhenSyntax(this._binding); + this._bindingOnSyntax = new binding_on_syntax_1.BindingOnSyntax(this._binding); + this._bindingInSyntax = new binding_in_syntax_1.BindingInSyntax(binding); + } + BindingInWhenOnSyntax.prototype.inRequestScope = function () { + return this._bindingInSyntax.inRequestScope(); + }; + BindingInWhenOnSyntax.prototype.inSingletonScope = function () { + return this._bindingInSyntax.inSingletonScope(); + }; + BindingInWhenOnSyntax.prototype.inTransientScope = function () { + return this._bindingInSyntax.inTransientScope(); + }; + BindingInWhenOnSyntax.prototype.when = function (constraint) { + return this._bindingWhenSyntax.when(constraint); + }; + BindingInWhenOnSyntax.prototype.whenTargetNamed = function (name) { + return this._bindingWhenSyntax.whenTargetNamed(name); + }; + BindingInWhenOnSyntax.prototype.whenTargetIsDefault = function () { + return this._bindingWhenSyntax.whenTargetIsDefault(); + }; + BindingInWhenOnSyntax.prototype.whenTargetTagged = function (tag, value) { + return this._bindingWhenSyntax.whenTargetTagged(tag, value); + }; + BindingInWhenOnSyntax.prototype.whenInjectedInto = function (parent) { + return this._bindingWhenSyntax.whenInjectedInto(parent); + }; + BindingInWhenOnSyntax.prototype.whenParentNamed = function (name) { + return this._bindingWhenSyntax.whenParentNamed(name); + }; + BindingInWhenOnSyntax.prototype.whenParentTagged = function (tag, value) { + return this._bindingWhenSyntax.whenParentTagged(tag, value); + }; + BindingInWhenOnSyntax.prototype.whenAnyAncestorIs = function (ancestor) { + return this._bindingWhenSyntax.whenAnyAncestorIs(ancestor); + }; + BindingInWhenOnSyntax.prototype.whenNoAncestorIs = function (ancestor) { + return this._bindingWhenSyntax.whenNoAncestorIs(ancestor); + }; + BindingInWhenOnSyntax.prototype.whenAnyAncestorNamed = function (name) { + return this._bindingWhenSyntax.whenAnyAncestorNamed(name); + }; + BindingInWhenOnSyntax.prototype.whenAnyAncestorTagged = function (tag, value) { + return this._bindingWhenSyntax.whenAnyAncestorTagged(tag, value); + }; + BindingInWhenOnSyntax.prototype.whenNoAncestorNamed = function (name) { + return this._bindingWhenSyntax.whenNoAncestorNamed(name); + }; + BindingInWhenOnSyntax.prototype.whenNoAncestorTagged = function (tag, value) { + return this._bindingWhenSyntax.whenNoAncestorTagged(tag, value); + }; + BindingInWhenOnSyntax.prototype.whenAnyAncestorMatches = function (constraint) { + return this._bindingWhenSyntax.whenAnyAncestorMatches(constraint); + }; + BindingInWhenOnSyntax.prototype.whenNoAncestorMatches = function (constraint) { + return this._bindingWhenSyntax.whenNoAncestorMatches(constraint); + }; + BindingInWhenOnSyntax.prototype.onActivation = function (handler) { + return this._bindingOnSyntax.onActivation(handler); + }; + return BindingInWhenOnSyntax; +}()); +exports.BindingInWhenOnSyntax = BindingInWhenOnSyntax; + + +/***/ }), +/* 237 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var ERROR_MSGS = __webpack_require__(12); +var literal_types_1 = __webpack_require__(21); +var binding_in_when_on_syntax_1 = __webpack_require__(236); +var binding_when_on_syntax_1 = __webpack_require__(125); +var BindingToSyntax = (function () { + function BindingToSyntax(binding) { + this._binding = binding; + } + BindingToSyntax.prototype.to = function (constructor) { + this._binding.type = literal_types_1.BindingTypeEnum.Instance; + this._binding.implementationType = constructor; + return new binding_in_when_on_syntax_1.BindingInWhenOnSyntax(this._binding); + }; + BindingToSyntax.prototype.toSelf = function () { + if (typeof this._binding.serviceIdentifier !== "function") { + throw new Error("" + ERROR_MSGS.INVALID_TO_SELF_VALUE); + } + var self = this._binding.serviceIdentifier; + return this.to(self); + }; + BindingToSyntax.prototype.toConstantValue = function (value) { + this._binding.type = literal_types_1.BindingTypeEnum.ConstantValue; + this._binding.cache = value; + this._binding.dynamicValue = null; + this._binding.implementationType = null; + return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding); + }; + BindingToSyntax.prototype.toDynamicValue = function (func) { + this._binding.type = literal_types_1.BindingTypeEnum.DynamicValue; + this._binding.cache = null; + this._binding.dynamicValue = func; + this._binding.implementationType = null; + return new binding_in_when_on_syntax_1.BindingInWhenOnSyntax(this._binding); + }; + BindingToSyntax.prototype.toConstructor = function (constructor) { + this._binding.type = literal_types_1.BindingTypeEnum.Constructor; + this._binding.implementationType = constructor; + return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding); + }; + BindingToSyntax.prototype.toFactory = function (factory) { + this._binding.type = literal_types_1.BindingTypeEnum.Factory; + this._binding.factory = factory; + return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding); + }; + BindingToSyntax.prototype.toFunction = function (func) { + if (typeof func !== "function") { + throw new Error(ERROR_MSGS.INVALID_FUNCTION_BINDING); + } + var bindingWhenOnSyntax = this.toConstantValue(func); + this._binding.type = literal_types_1.BindingTypeEnum.Function; + return bindingWhenOnSyntax; + }; + BindingToSyntax.prototype.toAutoFactory = function (serviceIdentifier) { + this._binding.type = literal_types_1.BindingTypeEnum.Factory; + this._binding.factory = function (context) { + var autofactory = function () { return context.container.get(serviceIdentifier); }; + return autofactory; + }; + return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding); + }; + BindingToSyntax.prototype.toProvider = function (provider) { + this._binding.type = literal_types_1.BindingTypeEnum.Provider; + this._binding.provider = provider; + return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding); + }; + BindingToSyntax.prototype.toService = function (service) { + this.toDynamicValue(function (context) { return context.container.get(service); }); + }; + return BindingToSyntax; +}()); +exports.BindingToSyntax = BindingToSyntax; + + +/***/ }), +/* 238 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.multiBindToService = function (container) { + return function (service) { + return function () { + var types = []; + for (var _i = 0; _i < arguments.length; _i++) { + types[_i] = arguments[_i]; + } + return types.forEach(function (t) { return container.bind(t).toService(service); }); + }; + }; +}; + + +/***/ }), +/* 239 */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), +/* 240 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +; +; +; +var isWebSocket = function (constructor) { + return constructor && constructor.CLOSING === 2; +}; +var isGlobalWebSocket = function () { + return typeof WebSocket !== 'undefined' && isWebSocket(WebSocket); +}; +var getDefaultOptions = function () { return ({ + constructor: isGlobalWebSocket() ? WebSocket : null, + maxReconnectionDelay: 10000, + minReconnectionDelay: 1500, + reconnectionDelayGrowFactor: 1.3, + connectionTimeout: 4000, + maxRetries: Infinity, + debug: false, +}); }; +var bypassProperty = function (src, dst, name) { + Object.defineProperty(dst, name, { + get: function () { return src[name]; }, + set: function (value) { src[name] = value; }, + enumerable: true, + configurable: true, + }); +}; +var initReconnectionDelay = function (config) { + return (config.minReconnectionDelay + Math.random() * config.minReconnectionDelay); +}; +var updateReconnectionDelay = function (config, previousDelay) { + var newDelay = previousDelay * config.reconnectionDelayGrowFactor; + return (newDelay > config.maxReconnectionDelay) + ? config.maxReconnectionDelay + : newDelay; +}; +var LEVEL_0_EVENTS = ['onopen', 'onclose', 'onmessage', 'onerror']; +var reassignEventListeners = function (ws, oldWs, listeners) { + Object.keys(listeners).forEach(function (type) { + listeners[type].forEach(function (_a) { + var listener = _a[0], options = _a[1]; + ws.addEventListener(type, listener, options); + }); + }); + if (oldWs) { + LEVEL_0_EVENTS.forEach(function (name) { + ws[name] = oldWs[name]; + }); + } +}; +var ReconnectingWebsocket = function (url, protocols, options) { + var _this = this; + if (options === void 0) { options = {}; } + var ws; + var connectingTimeout; + var reconnectDelay = 0; + var retriesCount = 0; + var shouldRetry = true; + var savedOnClose = null; + var listeners = {}; + // require new to construct + if (!(this instanceof ReconnectingWebsocket)) { + throw new TypeError("Failed to construct 'ReconnectingWebSocket': Please use the 'new' operator"); + } + // Set config. Not using `Object.assign` because of IE11 + var config = getDefaultOptions(); + Object.keys(config) + .filter(function (key) { return options.hasOwnProperty(key); }) + .forEach(function (key) { return config[key] = options[key]; }); + if (!isWebSocket(config.constructor)) { + throw new TypeError('Invalid WebSocket constructor. Set `options.constructor`'); + } + var log = config.debug ? function () { + var params = []; + for (var _i = 0; _i < arguments.length; _i++) { + params[_i] = arguments[_i]; + } + return console.log.apply(console, ['RWS:'].concat(params)); + } : function () { }; + /** + * Not using dispatchEvent, otherwise we must use a DOM Event object + * Deferred because we want to handle the close event before this + */ + var emitError = function (code, msg) { return setTimeout(function () { + var err = new Error(msg); + err.code = code; + if (Array.isArray(listeners.error)) { + listeners.error.forEach(function (_a) { + var fn = _a[0]; + return fn(err); + }); + } + if (ws.onerror) { + ws.onerror(err); + } + }, 0); }; + var handleClose = function () { + log('handleClose', { shouldRetry: shouldRetry }); + retriesCount++; + log('retries count:', retriesCount); + if (retriesCount > config.maxRetries) { + emitError('EHOSTDOWN', 'Too many failed connection attempts'); + return; + } + if (!reconnectDelay) { + reconnectDelay = initReconnectionDelay(config); + } + else { + reconnectDelay = updateReconnectionDelay(config, reconnectDelay); + } + log('handleClose - reconnectDelay:', reconnectDelay); + if (shouldRetry) { + setTimeout(connect, reconnectDelay); + } + }; + var connect = function () { + if (!shouldRetry) { + return; + } + log('connect'); + var oldWs = ws; + var wsUrl = (typeof url === 'function') ? url() : url; + ws = new config.constructor(wsUrl, protocols); + connectingTimeout = setTimeout(function () { + log('timeout'); + ws.close(); + emitError('ETIMEDOUT', 'Connection timeout'); + }, config.connectionTimeout); + log('bypass properties'); + for (var key in ws) { + // @todo move to constant + if (['addEventListener', 'removeEventListener', 'close', 'send'].indexOf(key) < 0) { + bypassProperty(ws, _this, key); + } + } + ws.addEventListener('open', function () { + clearTimeout(connectingTimeout); + log('open'); + reconnectDelay = initReconnectionDelay(config); + log('reconnectDelay:', reconnectDelay); + retriesCount = 0; + }); + ws.addEventListener('close', handleClose); + reassignEventListeners(ws, oldWs, listeners); + // because when closing with fastClose=true, it is saved and set to null to avoid double calls + ws.onclose = ws.onclose || savedOnClose; + savedOnClose = null; + }; + log('init'); + connect(); + this.close = function (code, reason, _a) { + if (code === void 0) { code = 1000; } + if (reason === void 0) { reason = ''; } + var _b = _a === void 0 ? {} : _a, _c = _b.keepClosed, keepClosed = _c === void 0 ? false : _c, _d = _b.fastClose, fastClose = _d === void 0 ? true : _d, _e = _b.delay, delay = _e === void 0 ? 0 : _e; + log('close - params:', { reason: reason, keepClosed: keepClosed, fastClose: fastClose, delay: delay, retriesCount: retriesCount, maxRetries: config.maxRetries }); + shouldRetry = !keepClosed && retriesCount <= config.maxRetries; + if (delay) { + reconnectDelay = delay; + } + ws.close(code, reason); + if (fastClose) { + var fakeCloseEvent_1 = { + code: code, + reason: reason, + wasClean: true, + }; + // execute close listeners soon with a fake closeEvent + // and remove them from the WS instance so they + // don't get fired on the real close. + handleClose(); + ws.removeEventListener('close', handleClose); + // run and remove level2 + if (Array.isArray(listeners.close)) { + listeners.close.forEach(function (_a) { + var listener = _a[0], options = _a[1]; + listener(fakeCloseEvent_1); + ws.removeEventListener('close', listener, options); + }); + } + // run and remove level0 + if (ws.onclose) { + savedOnClose = ws.onclose; + ws.onclose(fakeCloseEvent_1); + ws.onclose = null; + } + } + }; + this.send = function (data) { + ws.send(data); + }; + this.addEventListener = function (type, listener, options) { + if (Array.isArray(listeners[type])) { + if (!listeners[type].some(function (_a) { + var l = _a[0]; + return l === listener; + })) { + listeners[type].push([listener, options]); + } + } + else { + listeners[type] = [[listener, options]]; + } + ws.addEventListener(type, listener, options); + }; + this.removeEventListener = function (type, listener, options) { + if (Array.isArray(listeners[type])) { + listeners[type] = listeners[type].filter(function (_a) { + var l = _a[0]; + return l !== listener; + }); + } + ws.removeEventListener(type, listener, options); + }; +}; +module.exports = ReconnectingWebsocket; + + +/***/ }), +/* 241 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process, global) {/*! ***************************************************************************** +Copyright (C) Microsoft. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ +var Reflect; +(function (Reflect) { + // Metadata Proposal + // https://rbuckton.github.io/reflect-metadata/ + (function (factory) { + var root = typeof global === "object" ? global : + typeof self === "object" ? self : + typeof this === "object" ? this : + Function("return this;")(); + var exporter = makeExporter(Reflect); + if (typeof root.Reflect === "undefined") { + root.Reflect = Reflect; + } + else { + exporter = makeExporter(root.Reflect, exporter); + } + factory(exporter); + function makeExporter(target, previous) { + return function (key, value) { + if (typeof target[key] !== "function") { + Object.defineProperty(target, key, { configurable: true, writable: true, value: value }); + } + if (previous) + previous(key, value); + }; + } + })(function (exporter) { + var hasOwn = Object.prototype.hasOwnProperty; + // feature test for Symbol support + var supportsSymbol = typeof Symbol === "function"; + var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive"; + var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator"; + var supportsCreate = typeof Object.create === "function"; // feature test for Object.create support + var supportsProto = { __proto__: [] } instanceof Array; // feature test for __proto__ support + var downLevel = !supportsCreate && !supportsProto; + var HashMap = { + // create an object in dictionary mode (a.k.a. "slow" mode in v8) + create: supportsCreate + ? function () { return MakeDictionary(Object.create(null)); } + : supportsProto + ? function () { return MakeDictionary({ __proto__: null }); } + : function () { return MakeDictionary({}); }, + has: downLevel + ? function (map, key) { return hasOwn.call(map, key); } + : function (map, key) { return key in map; }, + get: downLevel + ? function (map, key) { return hasOwn.call(map, key) ? map[key] : undefined; } + : function (map, key) { return map[key]; }, + }; + // Load global or shim versions of Map, Set, and WeakMap + var functionPrototype = Object.getPrototypeOf(Function); + var usePolyfill = typeof process === "object" && process.env && process.env["REFLECT_METADATA_USE_MAP_POLYFILL"] === "true"; + var _Map = !usePolyfill && typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill(); + var _Set = !usePolyfill && typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill(); + var _WeakMap = !usePolyfill && typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill(); + // [[Metadata]] internal slot + // https://rbuckton.github.io/reflect-metadata/#ordinary-object-internal-methods-and-internal-slots + var Metadata = new _WeakMap(); + /** + * Applies a set of decorators to a property of a target object. + * @param decorators An array of decorators. + * @param target The target object. + * @param propertyKey (Optional) The property key to decorate. + * @param attributes (Optional) The property descriptor for the target key. + * @remarks Decorators are applied in reverse order. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * Example = Reflect.decorate(decoratorsArray, Example); + * + * // property (on constructor) + * Reflect.decorate(decoratorsArray, Example, "staticProperty"); + * + * // property (on prototype) + * Reflect.decorate(decoratorsArray, Example.prototype, "property"); + * + * // method (on constructor) + * Object.defineProperty(Example, "staticMethod", + * Reflect.decorate(decoratorsArray, Example, "staticMethod", + * Object.getOwnPropertyDescriptor(Example, "staticMethod"))); + * + * // method (on prototype) + * Object.defineProperty(Example.prototype, "method", + * Reflect.decorate(decoratorsArray, Example.prototype, "method", + * Object.getOwnPropertyDescriptor(Example.prototype, "method"))); + * + */ + function decorate(decorators, target, propertyKey, attributes) { + if (!IsUndefined(propertyKey)) { + if (!IsArray(decorators)) + throw new TypeError(); + if (!IsObject(target)) + throw new TypeError(); + if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes)) + throw new TypeError(); + if (IsNull(attributes)) + attributes = undefined; + propertyKey = ToPropertyKey(propertyKey); + return DecorateProperty(decorators, target, propertyKey, attributes); + } + else { + if (!IsArray(decorators)) + throw new TypeError(); + if (!IsConstructor(target)) + throw new TypeError(); + return DecorateConstructor(decorators, target); + } + } + exporter("decorate", decorate); + // 4.1.2 Reflect.metadata(metadataKey, metadataValue) + // https://rbuckton.github.io/reflect-metadata/#reflect.metadata + /** + * A default metadata decorator factory that can be used on a class, class member, or parameter. + * @param metadataKey The key for the metadata entry. + * @param metadataValue The value for the metadata entry. + * @returns A decorator function. + * @remarks + * If `metadataKey` is already defined for the target and target key, the + * metadataValue for that key will be overwritten. + * @example + * + * // constructor + * @Reflect.metadata(key, value) + * class Example { + * } + * + * // property (on constructor, TypeScript only) + * class Example { + * @Reflect.metadata(key, value) + * static staticProperty; + * } + * + * // property (on prototype, TypeScript only) + * class Example { + * @Reflect.metadata(key, value) + * property; + * } + * + * // method (on constructor) + * class Example { + * @Reflect.metadata(key, value) + * static staticMethod() { } + * } + * + * // method (on prototype) + * class Example { + * @Reflect.metadata(key, value) + * method() { } + * } + * + */ + function metadata(metadataKey, metadataValue) { + function decorator(target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey)) + throw new TypeError(); + OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey); + } + return decorator; + } + exporter("metadata", metadata); + /** + * Define a unique metadata entry on the target. + * @param metadataKey A key used to store and retrieve metadata. + * @param metadataValue A value that contains attached metadata. + * @param target The target object on which to define metadata. + * @param propertyKey (Optional) The property key for the target. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * Reflect.defineMetadata("custom:annotation", options, Example); + * + * // property (on constructor) + * Reflect.defineMetadata("custom:annotation", options, Example, "staticProperty"); + * + * // property (on prototype) + * Reflect.defineMetadata("custom:annotation", options, Example.prototype, "property"); + * + * // method (on constructor) + * Reflect.defineMetadata("custom:annotation", options, Example, "staticMethod"); + * + * // method (on prototype) + * Reflect.defineMetadata("custom:annotation", options, Example.prototype, "method"); + * + * // decorator factory as metadata-producing annotation. + * function MyAnnotation(options): Decorator { + * return (target, key?) => Reflect.defineMetadata("custom:annotation", options, target, key); + * } + * + */ + function defineMetadata(metadataKey, metadataValue, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey); + } + exporter("defineMetadata", defineMetadata); + /** + * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined. + * @param metadataKey A key used to store and retrieve metadata. + * @param target The target object on which the metadata is defined. + * @param propertyKey (Optional) The property key for the target. + * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * result = Reflect.hasMetadata("custom:annotation", Example); + * + * // property (on constructor) + * result = Reflect.hasMetadata("custom:annotation", Example, "staticProperty"); + * + * // property (on prototype) + * result = Reflect.hasMetadata("custom:annotation", Example.prototype, "property"); + * + * // method (on constructor) + * result = Reflect.hasMetadata("custom:annotation", Example, "staticMethod"); + * + * // method (on prototype) + * result = Reflect.hasMetadata("custom:annotation", Example.prototype, "method"); + * + */ + function hasMetadata(metadataKey, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryHasMetadata(metadataKey, target, propertyKey); + } + exporter("hasMetadata", hasMetadata); + /** + * Gets a value indicating whether the target object has the provided metadata key defined. + * @param metadataKey A key used to store and retrieve metadata. + * @param target The target object on which the metadata is defined. + * @param propertyKey (Optional) The property key for the target. + * @returns `true` if the metadata key was defined on the target object; otherwise, `false`. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * result = Reflect.hasOwnMetadata("custom:annotation", Example); + * + * // property (on constructor) + * result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticProperty"); + * + * // property (on prototype) + * result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "property"); + * + * // method (on constructor) + * result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticMethod"); + * + * // method (on prototype) + * result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "method"); + * + */ + function hasOwnMetadata(metadataKey, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey); + } + exporter("hasOwnMetadata", hasOwnMetadata); + /** + * Gets the metadata value for the provided metadata key on the target object or its prototype chain. + * @param metadataKey A key used to store and retrieve metadata. + * @param target The target object on which the metadata is defined. + * @param propertyKey (Optional) The property key for the target. + * @returns The metadata value for the metadata key if found; otherwise, `undefined`. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * result = Reflect.getMetadata("custom:annotation", Example); + * + * // property (on constructor) + * result = Reflect.getMetadata("custom:annotation", Example, "staticProperty"); + * + * // property (on prototype) + * result = Reflect.getMetadata("custom:annotation", Example.prototype, "property"); + * + * // method (on constructor) + * result = Reflect.getMetadata("custom:annotation", Example, "staticMethod"); + * + * // method (on prototype) + * result = Reflect.getMetadata("custom:annotation", Example.prototype, "method"); + * + */ + function getMetadata(metadataKey, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryGetMetadata(metadataKey, target, propertyKey); + } + exporter("getMetadata", getMetadata); + /** + * Gets the metadata value for the provided metadata key on the target object. + * @param metadataKey A key used to store and retrieve metadata. + * @param target The target object on which the metadata is defined. + * @param propertyKey (Optional) The property key for the target. + * @returns The metadata value for the metadata key if found; otherwise, `undefined`. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * result = Reflect.getOwnMetadata("custom:annotation", Example); + * + * // property (on constructor) + * result = Reflect.getOwnMetadata("custom:annotation", Example, "staticProperty"); + * + * // property (on prototype) + * result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "property"); + * + * // method (on constructor) + * result = Reflect.getOwnMetadata("custom:annotation", Example, "staticMethod"); + * + * // method (on prototype) + * result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "method"); + * + */ + function getOwnMetadata(metadataKey, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey); + } + exporter("getOwnMetadata", getOwnMetadata); + /** + * Gets the metadata keys defined on the target object or its prototype chain. + * @param target The target object on which the metadata is defined. + * @param propertyKey (Optional) The property key for the target. + * @returns An array of unique metadata keys. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * result = Reflect.getMetadataKeys(Example); + * + * // property (on constructor) + * result = Reflect.getMetadataKeys(Example, "staticProperty"); + * + * // property (on prototype) + * result = Reflect.getMetadataKeys(Example.prototype, "property"); + * + * // method (on constructor) + * result = Reflect.getMetadataKeys(Example, "staticMethod"); + * + * // method (on prototype) + * result = Reflect.getMetadataKeys(Example.prototype, "method"); + * + */ + function getMetadataKeys(target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryMetadataKeys(target, propertyKey); + } + exporter("getMetadataKeys", getMetadataKeys); + /** + * Gets the unique metadata keys defined on the target object. + * @param target The target object on which the metadata is defined. + * @param propertyKey (Optional) The property key for the target. + * @returns An array of unique metadata keys. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * result = Reflect.getOwnMetadataKeys(Example); + * + * // property (on constructor) + * result = Reflect.getOwnMetadataKeys(Example, "staticProperty"); + * + * // property (on prototype) + * result = Reflect.getOwnMetadataKeys(Example.prototype, "property"); + * + * // method (on constructor) + * result = Reflect.getOwnMetadataKeys(Example, "staticMethod"); + * + * // method (on prototype) + * result = Reflect.getOwnMetadataKeys(Example.prototype, "method"); + * + */ + function getOwnMetadataKeys(target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryOwnMetadataKeys(target, propertyKey); + } + exporter("getOwnMetadataKeys", getOwnMetadataKeys); + /** + * Deletes the metadata entry from the target object with the provided key. + * @param metadataKey A key used to store and retrieve metadata. + * @param target The target object on which the metadata is defined. + * @param propertyKey (Optional) The property key for the target. + * @returns `true` if the metadata entry was found and deleted; otherwise, false. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * result = Reflect.deleteMetadata("custom:annotation", Example); + * + * // property (on constructor) + * result = Reflect.deleteMetadata("custom:annotation", Example, "staticProperty"); + * + * // property (on prototype) + * result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "property"); + * + * // method (on constructor) + * result = Reflect.deleteMetadata("custom:annotation", Example, "staticMethod"); + * + * // method (on prototype) + * result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "method"); + * + */ + function deleteMetadata(metadataKey, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + var metadataMap = GetOrCreateMetadataMap(target, propertyKey, /*Create*/ false); + if (IsUndefined(metadataMap)) + return false; + if (!metadataMap.delete(metadataKey)) + return false; + if (metadataMap.size > 0) + return true; + var targetMetadata = Metadata.get(target); + targetMetadata.delete(propertyKey); + if (targetMetadata.size > 0) + return true; + Metadata.delete(target); + return true; + } + exporter("deleteMetadata", deleteMetadata); + function DecorateConstructor(decorators, target) { + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + var decorated = decorator(target); + if (!IsUndefined(decorated) && !IsNull(decorated)) { + if (!IsConstructor(decorated)) + throw new TypeError(); + target = decorated; + } + } + return target; + } + function DecorateProperty(decorators, target, propertyKey, descriptor) { + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + var decorated = decorator(target, propertyKey, descriptor); + if (!IsUndefined(decorated) && !IsNull(decorated)) { + if (!IsObject(decorated)) + throw new TypeError(); + descriptor = decorated; + } + } + return descriptor; + } + function GetOrCreateMetadataMap(O, P, Create) { + var targetMetadata = Metadata.get(O); + if (IsUndefined(targetMetadata)) { + if (!Create) + return undefined; + targetMetadata = new _Map(); + Metadata.set(O, targetMetadata); + } + var metadataMap = targetMetadata.get(P); + if (IsUndefined(metadataMap)) { + if (!Create) + return undefined; + metadataMap = new _Map(); + targetMetadata.set(P, metadataMap); + } + return metadataMap; + } + // 3.1.1.1 OrdinaryHasMetadata(MetadataKey, O, P) + // https://rbuckton.github.io/reflect-metadata/#ordinaryhasmetadata + function OrdinaryHasMetadata(MetadataKey, O, P) { + var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) + return true; + var parent = OrdinaryGetPrototypeOf(O); + if (!IsNull(parent)) + return OrdinaryHasMetadata(MetadataKey, parent, P); + return false; + } + // 3.1.2.1 OrdinaryHasOwnMetadata(MetadataKey, O, P) + // https://rbuckton.github.io/reflect-metadata/#ordinaryhasownmetadata + function OrdinaryHasOwnMetadata(MetadataKey, O, P) { + var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false); + if (IsUndefined(metadataMap)) + return false; + return ToBoolean(metadataMap.has(MetadataKey)); + } + // 3.1.3.1 OrdinaryGetMetadata(MetadataKey, O, P) + // https://rbuckton.github.io/reflect-metadata/#ordinarygetmetadata + function OrdinaryGetMetadata(MetadataKey, O, P) { + var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) + return OrdinaryGetOwnMetadata(MetadataKey, O, P); + var parent = OrdinaryGetPrototypeOf(O); + if (!IsNull(parent)) + return OrdinaryGetMetadata(MetadataKey, parent, P); + return undefined; + } + // 3.1.4.1 OrdinaryGetOwnMetadata(MetadataKey, O, P) + // https://rbuckton.github.io/reflect-metadata/#ordinarygetownmetadata + function OrdinaryGetOwnMetadata(MetadataKey, O, P) { + var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false); + if (IsUndefined(metadataMap)) + return undefined; + return metadataMap.get(MetadataKey); + } + // 3.1.5.1 OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) + // https://rbuckton.github.io/reflect-metadata/#ordinarydefineownmetadata + function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) { + var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ true); + metadataMap.set(MetadataKey, MetadataValue); + } + // 3.1.6.1 OrdinaryMetadataKeys(O, P) + // https://rbuckton.github.io/reflect-metadata/#ordinarymetadatakeys + function OrdinaryMetadataKeys(O, P) { + var ownKeys = OrdinaryOwnMetadataKeys(O, P); + var parent = OrdinaryGetPrototypeOf(O); + if (parent === null) + return ownKeys; + var parentKeys = OrdinaryMetadataKeys(parent, P); + if (parentKeys.length <= 0) + return ownKeys; + if (ownKeys.length <= 0) + return parentKeys; + var set = new _Set(); + var keys = []; + for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) { + var key = ownKeys_1[_i]; + var hasKey = set.has(key); + if (!hasKey) { + set.add(key); + keys.push(key); + } + } + for (var _a = 0, parentKeys_1 = parentKeys; _a < parentKeys_1.length; _a++) { + var key = parentKeys_1[_a]; + var hasKey = set.has(key); + if (!hasKey) { + set.add(key); + keys.push(key); + } + } + return keys; + } + // 3.1.7.1 OrdinaryOwnMetadataKeys(O, P) + // https://rbuckton.github.io/reflect-metadata/#ordinaryownmetadatakeys + function OrdinaryOwnMetadataKeys(O, P) { + var keys = []; + var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false); + if (IsUndefined(metadataMap)) + return keys; + var keysObj = metadataMap.keys(); + var iterator = GetIterator(keysObj); + var k = 0; + while (true) { + var next = IteratorStep(iterator); + if (!next) { + keys.length = k; + return keys; + } + var nextValue = IteratorValue(next); + try { + keys[k] = nextValue; + } + catch (e) { + try { + IteratorClose(iterator); + } + finally { + throw e; + } + } + k++; + } + } + // 6 ECMAScript Data Typ0es and Values + // https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values + function Type(x) { + if (x === null) + return 1 /* Null */; + switch (typeof x) { + case "undefined": return 0 /* Undefined */; + case "boolean": return 2 /* Boolean */; + case "string": return 3 /* String */; + case "symbol": return 4 /* Symbol */; + case "number": return 5 /* Number */; + case "object": return x === null ? 1 /* Null */ : 6 /* Object */; + default: return 6 /* Object */; + } + } + // 6.1.1 The Undefined Type + // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-undefined-type + function IsUndefined(x) { + return x === undefined; + } + // 6.1.2 The Null Type + // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-null-type + function IsNull(x) { + return x === null; + } + // 6.1.5 The Symbol Type + // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-symbol-type + function IsSymbol(x) { + return typeof x === "symbol"; + } + // 6.1.7 The Object Type + // https://tc39.github.io/ecma262/#sec-object-type + function IsObject(x) { + return typeof x === "object" ? x !== null : typeof x === "function"; + } + // 7.1 Type Conversion + // https://tc39.github.io/ecma262/#sec-type-conversion + // 7.1.1 ToPrimitive(input [, PreferredType]) + // https://tc39.github.io/ecma262/#sec-toprimitive + function ToPrimitive(input, PreferredType) { + switch (Type(input)) { + case 0 /* Undefined */: return input; + case 1 /* Null */: return input; + case 2 /* Boolean */: return input; + case 3 /* String */: return input; + case 4 /* Symbol */: return input; + case 5 /* Number */: return input; + } + var hint = PreferredType === 3 /* String */ ? "string" : PreferredType === 5 /* Number */ ? "number" : "default"; + var exoticToPrim = GetMethod(input, toPrimitiveSymbol); + if (exoticToPrim !== undefined) { + var result = exoticToPrim.call(input, hint); + if (IsObject(result)) + throw new TypeError(); + return result; + } + return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint); + } + // 7.1.1.1 OrdinaryToPrimitive(O, hint) + // https://tc39.github.io/ecma262/#sec-ordinarytoprimitive + function OrdinaryToPrimitive(O, hint) { + if (hint === "string") { + var toString_1 = O.toString; + if (IsCallable(toString_1)) { + var result = toString_1.call(O); + if (!IsObject(result)) + return result; + } + var valueOf = O.valueOf; + if (IsCallable(valueOf)) { + var result = valueOf.call(O); + if (!IsObject(result)) + return result; + } + } + else { + var valueOf = O.valueOf; + if (IsCallable(valueOf)) { + var result = valueOf.call(O); + if (!IsObject(result)) + return result; + } + var toString_2 = O.toString; + if (IsCallable(toString_2)) { + var result = toString_2.call(O); + if (!IsObject(result)) + return result; + } + } + throw new TypeError(); + } + // 7.1.2 ToBoolean(argument) + // https://tc39.github.io/ecma262/2016/#sec-toboolean + function ToBoolean(argument) { + return !!argument; + } + // 7.1.12 ToString(argument) + // https://tc39.github.io/ecma262/#sec-tostring + function ToString(argument) { + return "" + argument; + } + // 7.1.14 ToPropertyKey(argument) + // https://tc39.github.io/ecma262/#sec-topropertykey + function ToPropertyKey(argument) { + var key = ToPrimitive(argument, 3 /* String */); + if (IsSymbol(key)) + return key; + return ToString(key); + } + // 7.2 Testing and Comparison Operations + // https://tc39.github.io/ecma262/#sec-testing-and-comparison-operations + // 7.2.2 IsArray(argument) + // https://tc39.github.io/ecma262/#sec-isarray + function IsArray(argument) { + return Array.isArray + ? Array.isArray(argument) + : argument instanceof Object + ? argument instanceof Array + : Object.prototype.toString.call(argument) === "[object Array]"; + } + // 7.2.3 IsCallable(argument) + // https://tc39.github.io/ecma262/#sec-iscallable + function IsCallable(argument) { + // NOTE: This is an approximation as we cannot check for [[Call]] internal method. + return typeof argument === "function"; + } + // 7.2.4 IsConstructor(argument) + // https://tc39.github.io/ecma262/#sec-isconstructor + function IsConstructor(argument) { + // NOTE: This is an approximation as we cannot check for [[Construct]] internal method. + return typeof argument === "function"; + } + // 7.2.7 IsPropertyKey(argument) + // https://tc39.github.io/ecma262/#sec-ispropertykey + function IsPropertyKey(argument) { + switch (Type(argument)) { + case 3 /* String */: return true; + case 4 /* Symbol */: return true; + default: return false; + } + } + // 7.3 Operations on Objects + // https://tc39.github.io/ecma262/#sec-operations-on-objects + // 7.3.9 GetMethod(V, P) + // https://tc39.github.io/ecma262/#sec-getmethod + function GetMethod(V, P) { + var func = V[P]; + if (func === undefined || func === null) + return undefined; + if (!IsCallable(func)) + throw new TypeError(); + return func; + } + // 7.4 Operations on Iterator Objects + // https://tc39.github.io/ecma262/#sec-operations-on-iterator-objects + function GetIterator(obj) { + var method = GetMethod(obj, iteratorSymbol); + if (!IsCallable(method)) + throw new TypeError(); // from Call + var iterator = method.call(obj); + if (!IsObject(iterator)) + throw new TypeError(); + return iterator; + } + // 7.4.4 IteratorValue(iterResult) + // https://tc39.github.io/ecma262/2016/#sec-iteratorvalue + function IteratorValue(iterResult) { + return iterResult.value; + } + // 7.4.5 IteratorStep(iterator) + // https://tc39.github.io/ecma262/#sec-iteratorstep + function IteratorStep(iterator) { + var result = iterator.next(); + return result.done ? false : result; + } + // 7.4.6 IteratorClose(iterator, completion) + // https://tc39.github.io/ecma262/#sec-iteratorclose + function IteratorClose(iterator) { + var f = iterator["return"]; + if (f) + f.call(iterator); + } + // 9.1 Ordinary Object Internal Methods and Internal Slots + // https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots + // 9.1.1.1 OrdinaryGetPrototypeOf(O) + // https://tc39.github.io/ecma262/#sec-ordinarygetprototypeof + function OrdinaryGetPrototypeOf(O) { + var proto = Object.getPrototypeOf(O); + if (typeof O !== "function" || O === functionPrototype) + return proto; + // TypeScript doesn't set __proto__ in ES5, as it's non-standard. + // Try to determine the superclass constructor. Compatible implementations + // must either set __proto__ on a subclass constructor to the superclass constructor, + // or ensure each class has a valid `constructor` property on its prototype that + // points back to the constructor. + // If this is not the same as Function.[[Prototype]], then this is definately inherited. + // This is the case when in ES6 or when using __proto__ in a compatible browser. + if (proto !== functionPrototype) + return proto; + // If the super prototype is Object.prototype, null, or undefined, then we cannot determine the heritage. + var prototype = O.prototype; + var prototypeProto = prototype && Object.getPrototypeOf(prototype); + if (prototypeProto == null || prototypeProto === Object.prototype) + return proto; + // If the constructor was not a function, then we cannot determine the heritage. + var constructor = prototypeProto.constructor; + if (typeof constructor !== "function") + return proto; + // If we have some kind of self-reference, then we cannot determine the heritage. + if (constructor === O) + return proto; + // we have a pretty good guess at the heritage. + return constructor; + } + // naive Map shim + function CreateMapPolyfill() { + var cacheSentinel = {}; + var arraySentinel = []; + var MapIterator = (function () { + function MapIterator(keys, values, selector) { + this._index = 0; + this._keys = keys; + this._values = values; + this._selector = selector; + } + MapIterator.prototype["@@iterator"] = function () { return this; }; + MapIterator.prototype[iteratorSymbol] = function () { return this; }; + MapIterator.prototype.next = function () { + var index = this._index; + if (index >= 0 && index < this._keys.length) { + var result = this._selector(this._keys[index], this._values[index]); + if (index + 1 >= this._keys.length) { + this._index = -1; + this._keys = arraySentinel; + this._values = arraySentinel; + } + else { + this._index++; + } + return { value: result, done: false }; + } + return { value: undefined, done: true }; + }; + MapIterator.prototype.throw = function (error) { + if (this._index >= 0) { + this._index = -1; + this._keys = arraySentinel; + this._values = arraySentinel; + } + throw error; + }; + MapIterator.prototype.return = function (value) { + if (this._index >= 0) { + this._index = -1; + this._keys = arraySentinel; + this._values = arraySentinel; + } + return { value: value, done: true }; + }; + return MapIterator; + }()); + return (function () { + function Map() { + this._keys = []; + this._values = []; + this._cacheKey = cacheSentinel; + this._cacheIndex = -2; + } + Object.defineProperty(Map.prototype, "size", { + get: function () { return this._keys.length; }, + enumerable: true, + configurable: true + }); + Map.prototype.has = function (key) { return this._find(key, /*insert*/ false) >= 0; }; + Map.prototype.get = function (key) { + var index = this._find(key, /*insert*/ false); + return index >= 0 ? this._values[index] : undefined; + }; + Map.prototype.set = function (key, value) { + var index = this._find(key, /*insert*/ true); + this._values[index] = value; + return this; + }; + Map.prototype.delete = function (key) { + var index = this._find(key, /*insert*/ false); + if (index >= 0) { + var size = this._keys.length; + for (var i = index + 1; i < size; i++) { + this._keys[i - 1] = this._keys[i]; + this._values[i - 1] = this._values[i]; + } + this._keys.length--; + this._values.length--; + if (key === this._cacheKey) { + this._cacheKey = cacheSentinel; + this._cacheIndex = -2; + } + return true; + } + return false; + }; + Map.prototype.clear = function () { + this._keys.length = 0; + this._values.length = 0; + this._cacheKey = cacheSentinel; + this._cacheIndex = -2; + }; + Map.prototype.keys = function () { return new MapIterator(this._keys, this._values, getKey); }; + Map.prototype.values = function () { return new MapIterator(this._keys, this._values, getValue); }; + Map.prototype.entries = function () { return new MapIterator(this._keys, this._values, getEntry); }; + Map.prototype["@@iterator"] = function () { return this.entries(); }; + Map.prototype[iteratorSymbol] = function () { return this.entries(); }; + Map.prototype._find = function (key, insert) { + if (this._cacheKey !== key) { + this._cacheIndex = this._keys.indexOf(this._cacheKey = key); + } + if (this._cacheIndex < 0 && insert) { + this._cacheIndex = this._keys.length; + this._keys.push(key); + this._values.push(undefined); + } + return this._cacheIndex; + }; + return Map; + }()); + function getKey(key, _) { + return key; + } + function getValue(_, value) { + return value; + } + function getEntry(key, value) { + return [key, value]; + } + } + // naive Set shim + function CreateSetPolyfill() { + return (function () { + function Set() { + this._map = new _Map(); + } + Object.defineProperty(Set.prototype, "size", { + get: function () { return this._map.size; }, + enumerable: true, + configurable: true + }); + Set.prototype.has = function (value) { return this._map.has(value); }; + Set.prototype.add = function (value) { return this._map.set(value, value), this; }; + Set.prototype.delete = function (value) { return this._map.delete(value); }; + Set.prototype.clear = function () { this._map.clear(); }; + Set.prototype.keys = function () { return this._map.keys(); }; + Set.prototype.values = function () { return this._map.values(); }; + Set.prototype.entries = function () { return this._map.entries(); }; + Set.prototype["@@iterator"] = function () { return this.keys(); }; + Set.prototype[iteratorSymbol] = function () { return this.keys(); }; + return Set; + }()); + } + // naive WeakMap shim + function CreateWeakMapPolyfill() { + var UUID_SIZE = 16; + var keys = HashMap.create(); + var rootKey = CreateUniqueKey(); + return (function () { + function WeakMap() { + this._key = CreateUniqueKey(); + } + WeakMap.prototype.has = function (target) { + var table = GetOrCreateWeakMapTable(target, /*create*/ false); + return table !== undefined ? HashMap.has(table, this._key) : false; + }; + WeakMap.prototype.get = function (target) { + var table = GetOrCreateWeakMapTable(target, /*create*/ false); + return table !== undefined ? HashMap.get(table, this._key) : undefined; + }; + WeakMap.prototype.set = function (target, value) { + var table = GetOrCreateWeakMapTable(target, /*create*/ true); + table[this._key] = value; + return this; + }; + WeakMap.prototype.delete = function (target) { + var table = GetOrCreateWeakMapTable(target, /*create*/ false); + return table !== undefined ? delete table[this._key] : false; + }; + WeakMap.prototype.clear = function () { + // NOTE: not a real clear, just makes the previous data unreachable + this._key = CreateUniqueKey(); + }; + return WeakMap; + }()); + function CreateUniqueKey() { + var key; + do + key = "@@WeakMap@@" + CreateUUID(); + while (HashMap.has(keys, key)); + keys[key] = true; + return key; + } + function GetOrCreateWeakMapTable(target, create) { + if (!hasOwn.call(target, rootKey)) { + if (!create) + return undefined; + Object.defineProperty(target, rootKey, { value: HashMap.create() }); + } + return target[rootKey]; + } + function FillRandomBytes(buffer, size) { + for (var i = 0; i < size; ++i) + buffer[i] = Math.random() * 0xff | 0; + return buffer; + } + function GenRandomBytes(size) { + if (typeof Uint8Array === "function") { + if (typeof crypto !== "undefined") + return crypto.getRandomValues(new Uint8Array(size)); + if (typeof msCrypto !== "undefined") + return msCrypto.getRandomValues(new Uint8Array(size)); + return FillRandomBytes(new Uint8Array(size), size); + } + return FillRandomBytes(new Array(size), size); + } + function CreateUUID() { + var data = GenRandomBytes(UUID_SIZE); + // mark as random - RFC 4122 § 4.4 + data[6] = data[6] & 0x4f | 0x40; + data[8] = data[8] & 0xbf | 0x80; + var result = ""; + for (var offset = 0; offset < UUID_SIZE; ++offset) { + var byte = data[offset]; + if (offset === 4 || offset === 6 || offset === 8) + result += "-"; + if (byte < 16) + result += "0"; + result += byte.toString(16).toLowerCase(); + } + return result; + } + } + // uses a heuristic used by v8 and chakra to force an object into dictionary mode. + function MakeDictionary(obj) { + obj.__ = undefined; + delete obj.__; + return obj; + } + }); +})(Reflect || (Reflect = {})); +//# sourceMappingURL=Reflect.js.map +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(239), __webpack_require__(309))) + +/***/ }), +/* 242 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (html) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + + var context = options.context || document; + + // If there's nothing here, return null; + if (!html) { + return null; + } + + // Maintain a list of created vnodes so we can call the create hook. + var createdVNodes = []; + + // Parse the string into the AST and convert to VNodes. + var vnodes = convertNodes((0, _parse2.default)(html), createdVNodes, context); + + var res = void 0; + if (!vnodes) { + // If there are no vnodes but there is string content, then the string + // must be just text or at least invalid HTML that we should treat as + // text (since the AST parser didn't find any well-formed HTML). + res = toVNode({ type: 'text', content: html }, createdVNodes, context); + } else if (vnodes.length === 1) { + // If there's only one root node, just return it as opposed to an array. + res = vnodes[0]; + } else { + // Otherwise we have an array of VNodes, which we should return. + res = vnodes; + } + + // Call the 'create' hook for each created node. + options.hooks && options.hooks.create && createdVNodes.forEach(function (node) { + options.hooks.create(node); + }); + return res; +}; + +var _parse = __webpack_require__(212); + +var _parse2 = _interopRequireDefault(_parse); + +var _h = __webpack_require__(245); + +var _h2 = _interopRequireDefault(_h); + +var _utils = __webpack_require__(243); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function convertNodes(nodes, createdVNodes, context) { + if (nodes instanceof Array && nodes.length > 0) { + return nodes.map(function (node) { + return toVNode(node, createdVNodes, context); + }); + } else { + return undefined; + } +} + +function toVNode(node, createdVNodes, context) { + var newNode = void 0; + if (node.type === 'text') { + newNode = (0, _utils.createTextVNode)(node.content, context); + } else { + newNode = (0, _h2.default)(node.name, buildVNodeData(node, context), convertNodes(node.children, createdVNodes, context)); + } + createdVNodes.push(newNode); + return newNode; +} + +function buildVNodeData(node, context) { + var data = {}; + if (!node.attrs) { + return data; + } + + var attrs = Object.keys(node.attrs).reduce(function (memo, name) { + if (name !== 'style' && name !== 'class') { + var val = (0, _utils.unescapeEntities)(node.attrs[name], context); + memo ? memo[name] = val : memo = _defineProperty({}, name, val); + } + return memo; + }, null); + if (attrs) { + data.attrs = attrs; + } + + var style = parseStyle(node); + if (style) { + data.style = style; + } + + var classes = parseClass(node); + if (classes) { + data.class = classes; + } + + return data; +} + +function parseStyle(node) { + try { + return node.attrs.style.split(';').reduce(function (memo, styleProp) { + var res = styleProp.split(':'); + var name = (0, _utils.transformName)(res[0].trim()); + if (name) { + var val = res[1].replace('!important', '').trim(); + memo ? memo[name] = val : memo = _defineProperty({}, name, val); + } + return memo; + }, null); + } catch (e) { + return null; + } +} + +function parseClass(node) { + try { + return node.attrs.class.split(' ').reduce(function (memo, className) { + className = className.trim(); + if (className) { + memo ? memo[className] = true : memo = _defineProperty({}, className, true); + } + return memo; + }, null); + } catch (e) { + return null; + } +} + +/***/ }), +/* 243 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.createTextVNode = createTextVNode; +exports.transformName = transformName; +exports.unescapeEntities = unescapeEntities; + +var _vnode = __webpack_require__(128); + +var _vnode2 = _interopRequireDefault(_vnode); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function createTextVNode(text, context) { + return (0, _vnode2.default)(undefined, undefined, undefined, unescapeEntities(text, context)); +} + +function transformName(name) { + // Replace -a with A to help camel case style property names. + name = name.replace(/-(\w)/g, function _replace($1, $2) { + return $2.toUpperCase(); + }); + // Handle properties that start with a -. + var firstChar = name.charAt(0).toLowerCase(); + return '' + firstChar + name.substring(1); +} + +// Regex for matching HTML entities. +var entityRegex = new RegExp('&[a-z0-9#]+;', 'gi'); +// Element for setting innerHTML for transforming entities. +var el = null; + +function unescapeEntities(text, context) { + // Create the element using the context if it doesn't exist. + if (!el) { + el = context.createElement('div'); + } + return text.replace(entityRegex, function (entity) { + el.innerHTML = entity; + return el.textContent; + }); +} + +/***/ }), +/* 244 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(242); + + +/***/ }), +/* 245 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var vnode_1 = __webpack_require__(128); +var is = __webpack_require__(246); +function addNS(data, children, sel) { + data.ns = 'http://www.w3.org/2000/svg'; + if (sel !== 'foreignObject' && children !== undefined) { + for (var i = 0; i < children.length; ++i) { + var childData = children[i].data; + if (childData !== undefined) { + addNS(childData, children[i].children, children[i].sel); + } + } + } +} +function h(sel, b, c) { + var data = {}, children, text, i; + if (c !== undefined) { + data = b; + if (is.array(c)) { + children = c; + } + else if (is.primitive(c)) { + text = c; + } + else if (c && c.sel) { + children = [c]; + } + } + else if (b !== undefined) { + if (is.array(b)) { + children = b; + } + else if (is.primitive(b)) { + text = b; + } + else if (b && b.sel) { + children = [b]; + } + else { + data = b; + } + } + if (is.array(children)) { + for (i = 0; i < children.length; ++i) { + if (is.primitive(children[i])) + children[i] = vnode_1.vnode(undefined, undefined, undefined, children[i], undefined); + } + } + if (sel[0] === 's' && sel[1] === 'v' && sel[2] === 'g' && + (sel.length === 3 || sel[3] === '.' || sel[3] === '#')) { + addNS(data, children, sel); + } + return vnode_1.vnode(sel, data, children, text, undefined); +} +exports.h = h; +; +exports.default = h; +//# sourceMappingURL=h.js.map + +/***/ }), +/* 246 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.array = Array.isArray; +function primitive(s) { + return typeof s === 'string' || typeof s === 'number'; +} +exports.primitive = primitive; +//# sourceMappingURL=is.js.map + +/***/ }), +/* 247 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var types_1 = __webpack_require__(1); +function overrideCommandStackOptions(container, options) { + var defaultOptions = container.get(types_1.TYPES.CommandStackOptions); + for (var p in options) { + defaultOptions[p] = options[p]; + } + return defaultOptions; +} +exports.overrideCommandStackOptions = overrideCommandStackOptions; +//# sourceMappingURL=command-stack-options.js.map + +/***/ }), +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var smodel_storage_1 = __webpack_require__(87); +var types_1 = __webpack_require__(1); +var initialize_canvas_1 = __webpack_require__(60); +var logging_1 = __webpack_require__(103); +var action_dispatcher_1 = __webpack_require__(85); +var action_handler_1 = __webpack_require__(38); +var command_stack_1 = __webpack_require__(130); +var smodel_factory_1 = __webpack_require__(17); +var animation_frame_syncer_1 = __webpack_require__(48); +var viewer_1 = __webpack_require__(134); +var mouse_tool_1 = __webpack_require__(30); +var key_tool_1 = __webpack_require__(35); +var vnode_decorators_1 = __webpack_require__(135); +var view_1 = __webpack_require__(132); +var viewer_cache_1 = __webpack_require__(133); +var dom_helper_1 = __webpack_require__(88); +var id_decorator_1 = __webpack_require__(249); +var command_1 = __webpack_require__(8); +var defaultContainerModule = new inversify_1.ContainerModule(function (bind) { + // Logging --------------------------------------------- + bind(types_1.TYPES.ILogger).to(logging_1.NullLogger).inSingletonScope(); + bind(types_1.TYPES.LogLevel).toConstantValue(logging_1.LogLevel.warn); + // Registries --------------------------------------------- + bind(types_1.TYPES.ActionHandlerRegistry).to(action_handler_1.ActionHandlerRegistry).inSingletonScope(); + bind(types_1.TYPES.ViewRegistry).to(view_1.ViewRegistry).inSingletonScope(); + // Model Creation --------------------------------------------- + bind(types_1.TYPES.IModelFactory).to(smodel_factory_1.SModelFactory).inSingletonScope(); + // Action Dispatcher --------------------------------------------- + bind(types_1.TYPES.IActionDispatcher).to(action_dispatcher_1.ActionDispatcher).inSingletonScope(); + bind(types_1.TYPES.IActionDispatcherProvider).toProvider(function (context) { + return function () { + return new Promise(function (resolve) { + resolve(context.container.get(types_1.TYPES.IActionDispatcher)); + }); + }; + }); + // Action handler + bind(types_1.TYPES.IActionHandlerInitializer).to(command_1.CommandActionHandlerInitializer); + // Command Stack --------------------------------------------- + bind(types_1.TYPES.ICommandStack).to(command_stack_1.CommandStack).inSingletonScope(); + bind(types_1.TYPES.ICommandStackProvider).toProvider(function (context) { + return function () { + return new Promise(function (resolve) { + resolve(context.container.get(types_1.TYPES.ICommandStack)); + }); + }; + }); + bind(types_1.TYPES.CommandStackOptions).toConstantValue({ + defaultDuration: 250, + undoHistoryLimit: 50 + }); + // Viewer --------------------------------------------- + bind(viewer_1.Viewer).toSelf().inSingletonScope(); + bind(types_1.TYPES.IViewer).toDynamicValue(function (context) { + return context.container.get(viewer_1.Viewer); + }).inSingletonScope().whenTargetNamed('delegate'); + bind(viewer_cache_1.ViewerCache).toSelf().inSingletonScope(); + bind(types_1.TYPES.IViewer).toDynamicValue(function (context) { + return context.container.get(viewer_cache_1.ViewerCache); + }).inSingletonScope().whenTargetIsDefault(); + bind(types_1.TYPES.IViewerProvider).toProvider(function (context) { + return function () { + return new Promise(function (resolve) { + resolve(context.container.get(types_1.TYPES.IViewer)); + }); + }; + }); + bind(types_1.TYPES.ViewerOptions).toConstantValue({ + baseDiv: 'sprotty', + baseClass: 'sprotty', + hiddenDiv: 'sprotty-hidden', + hiddenClass: 'sprotty-hidden', + popupDiv: 'sprotty-popup', + popupClass: 'sprotty-popup', + popupClosedClass: 'sprotty-popup-closed', + needsClientLayout: true, + needsServerLayout: false, + popupOpenDelay: 700, + popupCloseDelay: 300 + }); + bind(types_1.TYPES.DOMHelper).to(dom_helper_1.DOMHelper).inSingletonScope(); + bind(types_1.TYPES.ModelRendererFactory).toFactory(function (context) { + return function (decorators) { + var viewRegistry = context.container.get(types_1.TYPES.ViewRegistry); + return new viewer_1.ModelRenderer(viewRegistry, decorators); + }; + }); + // Tools & Decorators -------------------------------------- + bind(id_decorator_1.IdDecorator).toSelf().inSingletonScope(); + bind(types_1.TYPES.IVNodeDecorator).toDynamicValue(function (context) { + return context.container.get(id_decorator_1.IdDecorator); + }).inSingletonScope(); + bind(mouse_tool_1.MouseTool).toSelf().inSingletonScope(); + bind(types_1.TYPES.IVNodeDecorator).toDynamicValue(function (context) { + return context.container.get(mouse_tool_1.MouseTool); + }).inSingletonScope(); + bind(key_tool_1.KeyTool).toSelf().inSingletonScope(); + bind(types_1.TYPES.IVNodeDecorator).toDynamicValue(function (context) { + return context.container.get(key_tool_1.KeyTool); + }).inSingletonScope(); + bind(vnode_decorators_1.FocusFixDecorator).toSelf().inSingletonScope(); + bind(types_1.TYPES.IVNodeDecorator).toDynamicValue(function (context) { + return context.container.get(vnode_decorators_1.FocusFixDecorator); + }).inSingletonScope(); + bind(types_1.TYPES.PopupVNodeDecorator).toDynamicValue(function (context) { + return context.container.get(id_decorator_1.IdDecorator); + }).inSingletonScope(); + bind(mouse_tool_1.PopupMouseTool).toSelf().inSingletonScope(); + bind(types_1.TYPES.PopupVNodeDecorator).toDynamicValue(function (context) { + return context.container.get(mouse_tool_1.PopupMouseTool); + }).inSingletonScope(); + bind(types_1.TYPES.HiddenVNodeDecorator).toDynamicValue(function (context) { + return context.container.get(id_decorator_1.IdDecorator); + }).inSingletonScope(); + // Animation Frame Sync ------------------------------------------ + bind(types_1.TYPES.AnimationFrameSyncer).to(animation_frame_syncer_1.AnimationFrameSyncer).inSingletonScope(); + // Canvas Initialization --------------------------------------------- + bind(types_1.TYPES.ICommand).toConstructor(initialize_canvas_1.InitializeCanvasBoundsCommand); + bind(initialize_canvas_1.CanvasBoundsInitializer).toSelf().inSingletonScope(); + bind(types_1.TYPES.IVNodeDecorator).toDynamicValue(function (context) { + return context.container.get(initialize_canvas_1.CanvasBoundsInitializer); + }).inSingletonScope(); + bind(types_1.TYPES.SModelStorage).to(smodel_storage_1.SModelStorage).inSingletonScope(); +}); +exports.default = defaultContainerModule; +//# sourceMappingURL=di.config.js.map + +/***/ }), +/* 249 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var dom_helper_1 = __webpack_require__(88); +var vnode_utils_1 = __webpack_require__(18); +var IdDecorator = /** @class */ (function () { + function IdDecorator(logger, domHelper) { + this.logger = logger; + this.domHelper = domHelper; + } + IdDecorator.prototype.decorate = function (vnode, element) { + var attrs = vnode_utils_1.getAttrs(vnode); + if (attrs.id !== undefined) + this.logger.warn(vnode, 'Overriding id of vnode (' + attrs.id + '). Make sure not to set it manually in view.'); + attrs.id = this.domHelper.createUniqueDOMElementId(element); + if (!vnode.key) + vnode.key = element.id; + return vnode; + }; + IdDecorator.prototype.postUpdate = function () { + }; + IdDecorator = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.ILogger)), + __param(1, inversify_1.inject(types_1.TYPES.DOMHelper)), + __metadata("design:paramtypes", [Object, dom_helper_1.DOMHelper]) + ], IdDecorator); + return IdDecorator; +}()); +exports.IdDecorator = IdDecorator; +//# sourceMappingURL=id-decorator.js.map + +/***/ }), +/* 250 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var types_1 = __webpack_require__(1); +function overrideViewerOptions(container, options) { + var defaultOptions = container.get(types_1.TYPES.ViewerOptions); + for (var p in options) { + defaultOptions[p] = options[p]; + } + return defaultOptions; +} +exports.overrideViewerOptions = overrideViewerOptions; +//# sourceMappingURL=viewer-options.js.map + +/***/ }), +/* 251 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var bounds_manipulation_1 = __webpack_require__(50); +var hidden_bounds_updater_1 = __webpack_require__(252); +var layout_1 = __webpack_require__(90); +var boundsModule = new inversify_1.ContainerModule(function (bind) { + bind(types_1.TYPES.ICommand).toConstructor(bounds_manipulation_1.SetBoundsCommand); + bind(types_1.TYPES.ICommand).toConstructor(bounds_manipulation_1.RequestBoundsCommand); + bind(types_1.TYPES.HiddenVNodeDecorator).to(hidden_bounds_updater_1.HiddenBoundsUpdater).inSingletonScope(); + bind(types_1.TYPES.Layouter).to(layout_1.Layouter).inSingletonScope(); + bind(types_1.TYPES.LayoutRegistry).to(layout_1.LayoutRegistry).inSingletonScope(); +}); +exports.default = boundsModule; +//# sourceMappingURL=di.config.js.map + +/***/ }), +/* 252 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var geometry_1 = __webpack_require__(3); +var smodel_1 = __webpack_require__(2); +var bounds_manipulation_1 = __webpack_require__(50); +var model_1 = __webpack_require__(9); +var layout_1 = __webpack_require__(90); +var model_2 = __webpack_require__(62); +var BoundsData = /** @class */ (function () { + function BoundsData() { + } + return BoundsData; +}()); +exports.BoundsData = BoundsData; +/** + * Grabs the bounds from hidden SVG DOM elements, applies layouts and fires + * ComputedBoundsActions. + * + * The actual bounds of an element can usually not be determined from the SModel + * as they depend on the view implementation and CSS stylings. So the best way is + * to grab them from a live (but hidden) SVG using getBBox(). + * + * If an element is Alignable, and the top-left corner of its bounding box is not + * the origin, we also issue a realign with the ComputedBoundsAction. + */ +var HiddenBoundsUpdater = /** @class */ (function () { + function HiddenBoundsUpdater(actionDispatcher, layouter) { + this.actionDispatcher = actionDispatcher; + this.layouter = layouter; + this.element2boundsData = new Map; + } + HiddenBoundsUpdater.prototype.decorate = function (vnode, element) { + if (model_1.isSizeable(element) || model_1.isLayoutContainer(element)) { + this.element2boundsData.set(element, { + vnode: vnode, + bounds: element.bounds, + boundsChanged: false, + alignmentChanged: false + }); + } + if (element instanceof smodel_1.SModelRoot) + this.root = element; + return vnode; + }; + HiddenBoundsUpdater.prototype.postUpdate = function () { + if (this.root !== undefined && model_2.isExportable(this.root) && this.root.export) + return; + this.getBoundsFromDOM(); + this.layouter.layout(this.element2boundsData); + var resizes = []; + var realignments = []; + this.element2boundsData.forEach(function (boundsData, element) { + if (boundsData.boundsChanged && boundsData.bounds !== undefined) + resizes.push({ + elementId: element.id, + newBounds: boundsData.bounds + }); + if (boundsData.alignmentChanged && boundsData.alignment !== undefined) + realignments.push({ + elementId: element.id, + newAlignment: boundsData.alignment + }); + }); + var revision = (this.root !== undefined) ? this.root.revision : undefined; + this.actionDispatcher.dispatch(new bounds_manipulation_1.ComputedBoundsAction(resizes, revision, realignments)); + this.element2boundsData.clear(); + }; + HiddenBoundsUpdater.prototype.getBoundsFromDOM = function () { + var _this = this; + this.element2boundsData.forEach(function (boundsData, element) { + if (boundsData.bounds && model_1.isSizeable(element)) { + var vnode = boundsData.vnode; + if (vnode && vnode.elm) { + var boundingBox = _this.getBounds(vnode.elm, element); + if (model_1.isAlignable(element) && !(geometry_1.almostEquals(boundingBox.x, 0) && geometry_1.almostEquals(boundingBox.y, 0))) { + boundsData.alignment = { + x: -boundingBox.x, + y: -boundingBox.y + }; + boundsData.alignmentChanged = true; + } + var newBounds = { + x: element.bounds.x, + y: element.bounds.y, + width: boundingBox.width, + height: boundingBox.height + }; + if (!(geometry_1.almostEquals(newBounds.x, element.bounds.x) + && geometry_1.almostEquals(newBounds.y, element.bounds.y) + && geometry_1.almostEquals(newBounds.width, element.bounds.width) + && geometry_1.almostEquals(newBounds.height, element.bounds.height))) { + boundsData.bounds = newBounds; + boundsData.boundsChanged = true; + } + } + } + }); + }; + HiddenBoundsUpdater.prototype.getBounds = function (elm, element) { + var bounds = elm.getBBox(); + return { + x: bounds.x, + y: bounds.y, + width: bounds.width, + height: bounds.height + }; + }; + HiddenBoundsUpdater = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.IActionDispatcher)), + __param(1, inversify_1.inject(types_1.TYPES.Layouter)), + __metadata("design:paramtypes", [Object, layout_1.Layouter]) + ], HiddenBoundsUpdater); + return HiddenBoundsUpdater; +}()); +exports.HiddenBoundsUpdater = HiddenBoundsUpdater; +//# sourceMappingURL=hidden-bounds-updater.js.map + +/***/ }), +/* 253 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* +* Copyright (C) 2017 TypeFox and others. +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +*/ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var animation_1 = __webpack_require__(39); +var ResizeAnimation = /** @class */ (function (_super) { + __extends(ResizeAnimation, _super); + function ResizeAnimation(model, elementResizes, context, reverse) { + if (reverse === void 0) { reverse = false; } + var _this = _super.call(this, context) || this; + _this.model = model; + _this.elementResizes = elementResizes; + _this.reverse = reverse; + return _this; + } + ResizeAnimation.prototype.tween = function (t) { + var _this = this; + this.elementResizes.forEach(function (elementResize) { + var element = elementResize.element; + var newDimension = (_this.reverse) ? { + width: (1 - t) * elementResize.toDimension.width + t * elementResize.fromDimension.width, + height: (1 - t) * elementResize.toDimension.height + t * elementResize.fromDimension.height + } : { + width: (1 - t) * elementResize.fromDimension.width + t * elementResize.toDimension.width, + height: (1 - t) * elementResize.fromDimension.height + t * elementResize.toDimension.height + }; + element.bounds = { + x: element.bounds.x, + y: element.bounds.y, + width: newDimension.width, + height: newDimension.height + }; + }); + return this.model; + }; + return ResizeAnimation; +}(animation_1.Animation)); +exports.ResizeAnimation = ResizeAnimation; +//# sourceMappingURL=resize.js.map + +/***/ }), +/* 254 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var button_handler_1 = __webpack_require__(91); +var buttonModule = new inversify_1.ContainerModule(function (bind) { + bind(button_handler_1.ButtonHandlerRegistry).toSelf().inSingletonScope(); +}); +exports.default = buttonModule; +//# sourceMappingURL=di.config.js.map + +/***/ }), +/* 255 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var expand_1 = __webpack_require__(61); +var expandModule = new inversify_1.ContainerModule(function (bind) { + bind(types_1.TYPES.IButtonHandler).toConstructor(expand_1.ExpandButtonHandler); +}); +exports.default = expandModule; +//# sourceMappingURL=di.config.js.map + +/***/ }), +/* 256 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var snabbdom = __webpack_require__(7); +var model_1 = __webpack_require__(93); +var smodel_utils_1 = __webpack_require__(13); +var JSX = { createElement: snabbdom.svg }; +var ExpandButtonView = /** @class */ (function () { + function ExpandButtonView() { + } + ExpandButtonView.prototype.render = function (button, context) { + var expandable = smodel_utils_1.findParentByFeature(button, model_1.isExpandable); + var path = (expandable !== undefined && expandable.expanded) + ? 'M 1,5 L 8,12 L 15,5 Z' + : 'M 1,8 L 8,15 L 8,1 Z'; + return JSX.createElement("g", { "class-sprotty-button": "{true}", "class-enabled": "{button.enabled}" }, + JSX.createElement("rect", { x: 0, y: 0, width: 16, height: 16, opacity: 0 }), + JSX.createElement("path", { d: path })); + }; + return ExpandButtonView; +}()); +exports.ExpandButtonView = ExpandButtonView; +//# sourceMappingURL=views.js.map + +/***/ }), +/* 257 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var export_1 = __webpack_require__(139); +var svg_exporter_1 = __webpack_require__(40); +var exportSvgModule = new inversify_1.ContainerModule(function (bind) { + bind(types_1.TYPES.KeyListener).to(export_1.ExportSvgKeyListener).inSingletonScope(); + bind(types_1.TYPES.HiddenVNodeDecorator).to(export_1.ExportSvgDecorator).inSingletonScope(); + bind(types_1.TYPES.ICommand).toConstructor(export_1.ExportSvgCommand); + bind(types_1.TYPES.SvgExporter).to(svg_exporter_1.SvgExporter).inSingletonScope(); +}); +exports.default = exportSvgModule; +//# sourceMappingURL=di.config.js.map + +/***/ }), +/* 258 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var fade_1 = __webpack_require__(94); +var fadeModule = new inversify_1.ContainerModule(function (bind) { + bind(types_1.TYPES.IVNodeDecorator).to(fade_1.ElementFader).inSingletonScope(); +}); +exports.default = fadeModule; +//# sourceMappingURL=di.config.js.map + +/***/ }), +/* 259 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var hover_1 = __webpack_require__(52); +var popup_position_updater_1 = __webpack_require__(261); +var initializer_1 = __webpack_require__(260); +var hoverModule = new inversify_1.ContainerModule(function (bind) { + bind(types_1.TYPES.PopupVNodeDecorator).to(popup_position_updater_1.PopupPositionUpdater).inSingletonScope(); + bind(types_1.TYPES.IActionHandlerInitializer).to(initializer_1.PopupActionHandlerInitializer); + bind(types_1.TYPES.ICommand).toConstructor(hover_1.HoverFeedbackCommand); + bind(types_1.TYPES.ICommand).toConstructor(hover_1.SetPopupModelCommand); + bind(types_1.TYPES.MouseListener).to(hover_1.HoverMouseListener); + bind(types_1.TYPES.PopupMouseListener).to(hover_1.PopupHoverMouseListener); + bind(types_1.TYPES.KeyListener).to(hover_1.HoverKeyListener); + bind(types_1.TYPES.HoverState).toConstantValue({ + mouseOverTimer: undefined, + mouseOutTimer: undefined, + popupOpen: false, + previousPopupElement: undefined + }); +}); +exports.default = hoverModule; +//# sourceMappingURL=di.config.js.map + +/***/ }), +/* 260 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var hover_1 = __webpack_require__(52); +var smodel_factory_1 = __webpack_require__(17); +var center_fit_1 = __webpack_require__(99); +var viewport_1 = __webpack_require__(42); +var move_1 = __webpack_require__(64); +var ClosePopupActionHandler = /** @class */ (function () { + function ClosePopupActionHandler() { + this.popupOpen = false; + } + ClosePopupActionHandler.prototype.handle = function (action) { + if (action.kind === hover_1.SetPopupModelCommand.KIND) { + this.popupOpen = action.newRoot.type !== smodel_factory_1.EMPTY_ROOT.type; + } + else if (this.popupOpen) { + return new hover_1.SetPopupModelAction({ id: smodel_factory_1.EMPTY_ROOT.id, type: smodel_factory_1.EMPTY_ROOT.type }); + } + }; + return ClosePopupActionHandler; +}()); +var PopupActionHandlerInitializer = /** @class */ (function () { + function PopupActionHandlerInitializer() { + } + PopupActionHandlerInitializer.prototype.initialize = function (registry) { + var closePopupActionHandler = new ClosePopupActionHandler(); + registry.register(center_fit_1.FitToScreenCommand.KIND, closePopupActionHandler); + registry.register(center_fit_1.CenterCommand.KIND, closePopupActionHandler); + registry.register(viewport_1.ViewportCommand.KIND, closePopupActionHandler); + registry.register(hover_1.SetPopupModelCommand.KIND, closePopupActionHandler); + registry.register(move_1.MoveCommand.KIND, closePopupActionHandler); + }; + PopupActionHandlerInitializer = __decorate([ + inversify_1.injectable() + ], PopupActionHandlerInitializer); + return PopupActionHandlerInitializer; +}()); +exports.PopupActionHandlerInitializer = PopupActionHandlerInitializer; +//# sourceMappingURL=initializer.js.map + +/***/ }), +/* 261 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var PopupPositionUpdater = /** @class */ (function () { + function PopupPositionUpdater(options) { + this.options = options; + } + PopupPositionUpdater.prototype.decorate = function (vnode, element) { + return vnode; + }; + PopupPositionUpdater.prototype.postUpdate = function () { + var popupDiv = document.getElementById(this.options.popupDiv); + if (popupDiv !== null && typeof window !== 'undefined') { + var boundingClientRect = popupDiv.getBoundingClientRect(); + if (window.innerHeight < boundingClientRect.height + boundingClientRect.top) { + popupDiv.style.top = (window.scrollY + window.innerHeight - boundingClientRect.height - 5) + 'px'; + } + if (window.innerWidth < boundingClientRect.left + boundingClientRect.width) { + popupDiv.style.left = (window.scrollX + window.innerWidth - boundingClientRect.width - 5) + 'px'; + } + if (boundingClientRect.left < 0) { + popupDiv.style.left = '0px'; + } + if (boundingClientRect.top < 0) { + popupDiv.style.top = '0px'; + } + } + }; + PopupPositionUpdater = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.ViewerOptions)), + __metadata("design:paramtypes", [Object]) + ], PopupPositionUpdater); + return PopupPositionUpdater; +}()); +exports.PopupPositionUpdater = PopupPositionUpdater; +//# sourceMappingURL=popup-position-updater.js.map + +/***/ }), +/* 262 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var move_1 = __webpack_require__(64); +var moveModule = new inversify_1.ContainerModule(function (bind) { + bind(types_1.TYPES.MouseListener).to(move_1.MoveMouseListener); + bind(types_1.TYPES.ICommand).toConstructor(move_1.MoveCommand); + bind(types_1.TYPES.IVNodeDecorator).to(move_1.LocationDecorator); + bind(types_1.TYPES.HiddenVNodeDecorator).to(move_1.LocationDecorator); +}); +exports.default = moveModule; +//# sourceMappingURL=di.config.js.map + +/***/ }), +/* 263 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var open_1 = __webpack_require__(95); +var openModule = new inversify_1.ContainerModule(function (bind) { + bind(types_1.TYPES.MouseListener).to(open_1.OpenMouseListener); +}); +exports.default = openModule; +//# sourceMappingURL=di.config.js.map + +/***/ }), +/* 264 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var select_1 = __webpack_require__(141); +var selectModule = new inversify_1.ContainerModule(function (bind) { + bind(types_1.TYPES.ICommand).toConstructor(select_1.SelectCommand); + bind(types_1.TYPES.ICommand).toConstructor(select_1.SelectAllCommand); + bind(types_1.TYPES.KeyListener).to(select_1.SelectKeyboardListener); + bind(types_1.TYPES.MouseListener).to(select_1.SelectMouseListener); +}); +exports.default = selectModule; +//# sourceMappingURL=di.config.js.map + +/***/ }), +/* 265 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var undo_redo_1 = __webpack_require__(96); +var undoRedoModule = new inversify_1.ContainerModule(function (bind) { + bind(types_1.TYPES.KeyListener).to(undo_redo_1.UndoRedoKeyListener); +}); +exports.default = undoRedoModule; +//# sourceMappingURL=di.config.js.map + +/***/ }), +/* 266 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var center_fit_1 = __webpack_require__(99); +var viewport_1 = __webpack_require__(42); +var scroll_1 = __webpack_require__(142); +var zoom_1 = __webpack_require__(143); +var viewportModule = new inversify_1.ContainerModule(function (bind) { + bind(types_1.TYPES.ICommand).toConstructor(center_fit_1.CenterCommand); + bind(types_1.TYPES.ICommand).toConstructor(center_fit_1.FitToScreenCommand); + bind(types_1.TYPES.ICommand).toConstructor(viewport_1.ViewportCommand); + bind(types_1.TYPES.KeyListener).to(center_fit_1.CenterKeyboardListener); + bind(types_1.TYPES.MouseListener).to(scroll_1.ScrollMouseListener); + bind(types_1.TYPES.MouseListener).to(zoom_1.ZoomMouseListener); +}); +exports.default = viewportModule; +//# sourceMappingURL=di.config.js.map + +/***/ }), +/* 267 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var smodel_factory_1 = __webpack_require__(17); +var smodel_utils_1 = __webpack_require__(13); +var sgraph_1 = __webpack_require__(101); +var model_1 = __webpack_require__(92); +var SGraphFactory = /** @class */ (function (_super) { + __extends(SGraphFactory, _super); + function SGraphFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + SGraphFactory.prototype.createElement = function (schema, parent) { + if (this.isNodeSchema(schema)) + return this.initializeChild(new sgraph_1.SNode(), schema, parent); + else if (this.isPortSchema(schema)) + return this.initializeChild(new sgraph_1.SPort(), schema, parent); + else if (this.isEdgeSchema(schema)) + return this.initializeChild(new sgraph_1.SEdge(), schema, parent); + else if (this.isLabelSchema(schema)) + return this.initializeChild(new sgraph_1.SLabel(), schema, parent); + else if (this.isCompartmentSchema(schema)) + return this.initializeChild(new sgraph_1.SCompartment(), schema, parent); + if (this.isButtonSchema(schema)) + return this.initializeChild(new model_1.SButton(), schema, parent); + else + return _super.prototype.createElement.call(this, schema, parent); + }; + SGraphFactory.prototype.createRoot = function (schema) { + if (this.isGraphSchema(schema)) + return this.initializeRoot(new sgraph_1.SGraph(), schema); + else + return _super.prototype.createRoot.call(this, schema); + }; + SGraphFactory.prototype.isGraphSchema = function (schema) { + return smodel_utils_1.getBasicType(schema) === 'graph'; + }; + SGraphFactory.prototype.isNodeSchema = function (schema) { + return smodel_utils_1.getBasicType(schema) === 'node'; + }; + SGraphFactory.prototype.isPortSchema = function (schema) { + return smodel_utils_1.getBasicType(schema) === 'port'; + }; + SGraphFactory.prototype.isEdgeSchema = function (schema) { + return smodel_utils_1.getBasicType(schema) === 'edge'; + }; + SGraphFactory.prototype.isLabelSchema = function (schema) { + return smodel_utils_1.getBasicType(schema) === 'label'; + }; + SGraphFactory.prototype.isCompartmentSchema = function (schema) { + return smodel_utils_1.getBasicType(schema) === 'comp'; + }; + SGraphFactory.prototype.isButtonSchema = function (schema) { + return smodel_utils_1.getBasicType(schema) === 'button'; + }; + SGraphFactory = __decorate([ + inversify_1.injectable() + ], SGraphFactory); + return SGraphFactory; +}(smodel_factory_1.SModelFactory)); +exports.SGraphFactory = SGraphFactory; +//# sourceMappingURL=sgraph-factory.js.map + +/***/ }), +/* 268 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var strings_1 = __webpack_require__(244); +var PreRenderedView = /** @class */ (function () { + function PreRenderedView() { + } + PreRenderedView.prototype.render = function (model, context) { + var node = strings_1.default(model.code); + this.correctNamespace(node); + return node; + }; + PreRenderedView.prototype.correctNamespace = function (node) { + if (node.sel === 'svg' || node.sel === 'g') + this.setNamespace(node, 'http://www.w3.org/2000/svg'); + }; + PreRenderedView.prototype.setNamespace = function (node, ns) { + if (node.data === undefined) + node.data = {}; + node.data.ns = ns; + var children = node.children; + if (children !== undefined) { + for (var i = 0; i < children.length; i++) { + var child = children[i]; + if (typeof child !== 'string') + this.setNamespace(child, ns); + } + } + }; + return PreRenderedView; +}()); +exports.PreRenderedView = PreRenderedView; +//# sourceMappingURL=generic-views.js.map + +/***/ }), +/* 269 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var snabbdom = __webpack_require__(7); +var vnode_utils_1 = __webpack_require__(18); +var JSX = { createElement: snabbdom.html }; +var HtmlRootView = /** @class */ (function () { + function HtmlRootView() { + } + HtmlRootView.prototype.render = function (model, context) { + var root = JSX.createElement("div", null, context.renderChildren(model)); + for (var _i = 0, _a = model.classes; _i < _a.length; _i++) { + var c = _a[_i]; + vnode_utils_1.setClass(root, c, true); + } + return root; + }; + return HtmlRootView; +}()); +exports.HtmlRootView = HtmlRootView; +//# sourceMappingURL=html-views.js.map + +/***/ }), +/* 270 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var smodel_1 = __webpack_require__(2); +var geometry_1 = __webpack_require__(3); +var model_1 = __webpack_require__(9); +var model_2 = __webpack_require__(41); +var model_3 = __webpack_require__(31); +/** + * Root model element class for HTML content. Usually this is rendered with a `div` DOM element. + */ +var HtmlRoot = /** @class */ (function (_super) { + __extends(HtmlRoot, _super); + function HtmlRoot() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.classes = []; + return _this; + } + return HtmlRoot; +}(smodel_1.SModelRoot)); +exports.HtmlRoot = HtmlRoot; +/** + * Pre-rendered elements contain HTML or SVG code to be transferred to the DOM. This can be useful to + * render complex figures or to compute the view on the server instead of the client code. + */ +var PreRenderedElement = /** @class */ (function (_super) { + __extends(PreRenderedElement, _super); + function PreRenderedElement() { + return _super !== null && _super.apply(this, arguments) || this; + } + return PreRenderedElement; +}(smodel_1.SChildElement)); +exports.PreRenderedElement = PreRenderedElement; +/** + * Same as PreRenderedElement, but with a position and a size. + */ +var ShapedPreRenderedElement = /** @class */ (function (_super) { + __extends(ShapedPreRenderedElement, _super); + function ShapedPreRenderedElement() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.position = geometry_1.ORIGIN_POINT; + _this.size = geometry_1.EMPTY_DIMENSION; + _this.selected = false; + _this.alignment = geometry_1.ORIGIN_POINT; + return _this; + } + Object.defineProperty(ShapedPreRenderedElement.prototype, "bounds", { + get: function () { + return { + x: this.position.x, + y: this.position.y, + width: this.size.width, + height: this.size.height + }; + }, + set: function (newBounds) { + this.position = { + x: newBounds.x, + y: newBounds.y + }; + this.size = { + width: newBounds.width, + height: newBounds.height + }; + }, + enumerable: true, + configurable: true + }); + ShapedPreRenderedElement.prototype.hasFeature = function (feature) { + return feature === model_2.moveFeature || feature === model_1.boundsFeature || feature === model_3.selectFeature || feature === model_1.alignFeature; + }; + return ShapedPreRenderedElement; +}(PreRenderedElement)); +exports.ShapedPreRenderedElement = ShapedPreRenderedElement; +//# sourceMappingURL=model.js.map + +/***/ }), +/* 271 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var snabbdom = __webpack_require__(7); +var geometry_1 = __webpack_require__(3); +var views_1 = __webpack_require__(144); +var JSX = { createElement: snabbdom.svg }; +var SvgViewportView = /** @class */ (function () { + function SvgViewportView() { + } + SvgViewportView.prototype.render = function (model, context) { + var transform = "scale(" + model.zoom + ") translate(" + -model.scroll.x + "," + -model.scroll.y + ")"; + return JSX.createElement("svg", null, + JSX.createElement("g", { transform: transform }, context.renderChildren(model))); + }; + return SvgViewportView; +}()); +exports.SvgViewportView = SvgViewportView; +var CircularNodeView = /** @class */ (function (_super) { + __extends(CircularNodeView, _super); + function CircularNodeView() { + return _super !== null && _super.apply(this, arguments) || this; + } + CircularNodeView.prototype.render = function (node, context) { + var radius = this.getRadius(node); + return JSX.createElement("g", null, + JSX.createElement("circle", { "class-sprotty-node": true, "class-mouseover": node.hoverFeedback, "class-selected": node.selected, r: radius, cx: radius, cy: radius })); + }; + CircularNodeView.prototype.getRadius = function (node) { + var d = Math.min(node.size.width, node.size.height); + if (d > 0) + return d / 2; + else + return 0; + }; + CircularNodeView.prototype.getAnchor = function (node, refPoint, anchorCorrection) { + var radius = this.getRadius(node); + var cx = node.position.x + radius; + var cy = node.position.y + radius; + var dx = cx - refPoint.x; + var dy = cy - refPoint.y; + var distance = Math.sqrt(dx * dx + dy * dy); + var normX = (dx / distance) || 0; + var normY = (dy / distance) || 0; + var strokeCorrection = 0.5 * this.getStrokeWidth(node); + return { + x: cx - normX * (radius + strokeCorrection + anchorCorrection), + y: cy - normY * (radius + strokeCorrection + anchorCorrection) + }; + }; + return CircularNodeView; +}(views_1.AnchorableView)); +exports.CircularNodeView = CircularNodeView; +var RectangularNodeView = /** @class */ (function (_super) { + __extends(RectangularNodeView, _super); + function RectangularNodeView() { + return _super !== null && _super.apply(this, arguments) || this; + } + RectangularNodeView.prototype.render = function (node, context) { + return JSX.createElement("g", null, + JSX.createElement("rect", { "class-sprotty-node": true, "class-mouseover": node.hoverFeedback, "class-selected": node.selected, x: "0", y: "0", width: node.size.width, height: node.size.height })); + }; + RectangularNodeView.prototype.getAnchor = function (node, refPoint, anchorCorrection) { + var bounds = node.bounds; + var correction = 0.5 * this.getStrokeWidth(node) + anchorCorrection; + var c = geometry_1.center(bounds); + var finder = new NearestPointFinder(c, refPoint); + if (!geometry_1.almostEquals(c.y, refPoint.y)) { + var xTop = this.getXIntersection(bounds.y, c, refPoint); + if (xTop >= bounds.x && xTop <= bounds.x + bounds.width) + finder.addCandidate(xTop, bounds.y - correction); + var xBottom = this.getXIntersection(bounds.y + bounds.height, c, refPoint); + if (xBottom >= bounds.x && xBottom <= bounds.x + bounds.width) + finder.addCandidate(xBottom, bounds.y + bounds.height + correction); + } + if (!geometry_1.almostEquals(c.x, refPoint.x)) { + var yLeft = this.getYIntersection(bounds.x, c, refPoint); + if (yLeft >= bounds.y && yLeft <= bounds.y + bounds.height) + finder.addCandidate(bounds.x - correction, yLeft); + var yRight = this.getYIntersection(bounds.x + bounds.width, c, refPoint); + if (yRight >= bounds.y && yRight <= bounds.y + bounds.height) + finder.addCandidate(bounds.x + bounds.width + correction, yRight); + } + return finder.best; + }; + RectangularNodeView.prototype.getXIntersection = function (yIntersection, center, point) { + var t = (yIntersection - center.y) / (point.y - center.y); + return (point.x - center.x) * t + center.x; + }; + RectangularNodeView.prototype.getYIntersection = function (xIntersection, center, point) { + var t = (xIntersection - center.x) / (point.x - center.x); + return (point.y - center.y) * t + center.y; + }; + return RectangularNodeView; +}(views_1.AnchorableView)); +exports.RectangularNodeView = RectangularNodeView; +var NearestPointFinder = /** @class */ (function () { + function NearestPointFinder(center, refPoint) { + this.center = center; + this.refPoint = refPoint; + this.currentDist = -1; + } + NearestPointFinder.prototype.addCandidate = function (x, y) { + var dx = this.refPoint.x - x; + var dy = this.refPoint.y - y; + var dist = dx * dx + dy * dy; + if (this.currentDist < 0 || dist < this.currentDist) { + this.currentBest = { + x: x, + y: y + }; + this.currentDist = dist; + } + }; + Object.defineProperty(NearestPointFinder.prototype, "best", { + get: function () { + if (this.currentBest === undefined) + return this.center; + else + return this.currentBest; + }, + enumerable: true, + configurable: true + }); + return NearestPointFinder; +}()); +//# sourceMappingURL=svg-views.js.map + +/***/ }), +/* 272 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +/** + * This container module does NOT provide any binding for TYPES.ModelSource because that needs to be + * done according to the needs of the application. You can choose between a local (LocalModelSource) + * and a remote (e.g. WebSocketDiagramServer) implementation. + */ +var modelSourceModule = new inversify_1.ContainerModule(function (bind) { + bind(types_1.TYPES.ModelSourceProvider).toProvider(function (context) { + return function () { + return new Promise(function (resolve) { + resolve(context.container.get(types_1.TYPES.ModelSource)); + }); + }; + }); +}); +exports.default = modelSourceModule; +//# sourceMappingURL=di.config.js.map + +/***/ }), +/* 273 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var types_1 = __webpack_require__(1); +var action_handler_1 = __webpack_require__(38); +var smodel_utils_1 = __webpack_require__(13); +var set_model_1 = __webpack_require__(49); +var smodel_1 = __webpack_require__(2); +var bounds_manipulation_1 = __webpack_require__(50); +var model_matching_1 = __webpack_require__(97); +var update_model_1 = __webpack_require__(98); +var hover_1 = __webpack_require__(52); +var model_source_1 = __webpack_require__(102); +var svg_exporter_1 = __webpack_require__(40); +var file_saver_1 = __webpack_require__(121); +var expand_1 = __webpack_require__(61); +var diagram_state_1 = __webpack_require__(146); +/** + * A model source that handles actions for bounds calculation and model + * updates. + */ +var LocalModelSource = /** @class */ (function (_super) { + __extends(LocalModelSource, _super); + function LocalModelSource(actionDispatcher, actionHandlerRegistry, viewerOptions, popupModelFactory, modelProvider) { + var _this = _super.call(this, actionDispatcher, actionHandlerRegistry, viewerOptions) || this; + _this.popupModelFactory = popupModelFactory; + _this.modelProvider = modelProvider; + _this.currentRoot = { + type: 'NONE', + id: 'ROOT' + }; + _this.diagramState = { + expansionState: new diagram_state_1.ExpansionState(_this.currentRoot) + }; + return _this; + } + Object.defineProperty(LocalModelSource.prototype, "model", { + get: function () { + return this.currentRoot; + }, + set: function (root) { + this.setModel(root); + }, + enumerable: true, + configurable: true + }); + LocalModelSource.prototype.initialize = function (registry) { + _super.prototype.initialize.call(this, registry); + // Register model manipulation commands + registry.registerCommand(update_model_1.UpdateModelCommand); + // Register this model source + registry.register(bounds_manipulation_1.ComputedBoundsAction.KIND, this); + registry.register(hover_1.RequestPopupModelAction.KIND, this); + registry.register(expand_1.CollapseExpandAction.KIND, this); + registry.register(expand_1.CollapseExpandAllAction.KIND, this); + }; + LocalModelSource.prototype.setModel = function (newRoot) { + this.currentRoot = newRoot; + this.diagramState = { + expansionState: new diagram_state_1.ExpansionState(newRoot) + }; + this.submitModel(newRoot, false); + }; + LocalModelSource.prototype.updateModel = function (newRoot) { + if (newRoot === undefined) { + this.submitModel(this.currentRoot, true); + } + else { + this.currentRoot = newRoot; + this.submitModel(newRoot, true); + } + }; + LocalModelSource.prototype.submitModel = function (newRoot, update) { + if (this.viewerOptions.needsClientLayout) { + this.actionDispatcher.dispatch(new bounds_manipulation_1.RequestBoundsAction(newRoot)); + } + else { + if (update) { + this.actionDispatcher.dispatch(new update_model_1.UpdateModelAction(newRoot)); + } + else { + this.actionDispatcher.dispatch(new set_model_1.SetModelAction(newRoot)); + } + if (this.onModelSubmitted !== undefined) { + this.onModelSubmitted(newRoot); + } + } + }; + LocalModelSource.prototype.applyMatches = function (matches) { + var root = this.currentRoot; + model_matching_1.applyMatches(root, matches); + if (this.viewerOptions.needsClientLayout) { + this.actionDispatcher.dispatch(new bounds_manipulation_1.RequestBoundsAction(root)); + } + else { + var update = new update_model_1.UpdateModelAction(); + update.matches = matches; + this.actionDispatcher.dispatch(update); + if (this.onModelSubmitted !== undefined) { + this.onModelSubmitted(root); + } + } + }; + LocalModelSource.prototype.addElements = function (elements) { + var matches = []; + for (var i in elements) { + var e = elements[i]; + if (e.element !== undefined && e.parentId !== undefined) { + matches.push({ + right: e.element, + rightParentId: e.parentId + }); + } + else if (e.id !== undefined) { + matches.push({ + right: e, + rightParentId: this.currentRoot.id + }); + } + } + this.applyMatches(matches); + }; + LocalModelSource.prototype.removeElements = function (elements) { + var matches = []; + var index = new smodel_1.SModelIndex(); + index.add(this.currentRoot); + for (var i in elements) { + var e = elements[i]; + if (e.elementId !== undefined && e.parentId !== undefined) { + var element = index.getById(e.elementId); + if (element !== undefined) { + matches.push({ + left: element, + leftParentId: e.parentId + }); + } + } + else { + var element = index.getById(e); + if (element !== undefined) { + matches.push({ + left: element, + leftParentId: this.currentRoot.id + }); + } + } + } + this.applyMatches(matches); + }; + LocalModelSource.prototype.handle = function (action) { + switch (action.kind) { + case set_model_1.RequestModelAction.KIND: + this.handleRequestModel(action); + break; + case bounds_manipulation_1.ComputedBoundsAction.KIND: + this.handleComputedBounds(action); + break; + case hover_1.RequestPopupModelAction.KIND: + this.handleRequestPopupModel(action); + break; + case svg_exporter_1.ExportSvgAction.KIND: + this.handleExportSvgAction(action); + break; + case expand_1.CollapseExpandAction.KIND: + this.handleCollapseExpandAction(action); + break; + case expand_1.CollapseExpandAllAction.KIND: + this.handleCollapseExpandAllAction(action); + break; + } + }; + LocalModelSource.prototype.handleRequestModel = function (action) { + this.submitModel(this.currentRoot, false); + }; + LocalModelSource.prototype.handleComputedBounds = function (action) { + var root = this.currentRoot; + var index = new smodel_1.SModelIndex(); + index.add(root); + for (var _i = 0, _a = action.bounds; _i < _a.length; _i++) { + var b = _a[_i]; + var element = index.getById(b.elementId); + if (element !== undefined) + this.applyBounds(element, b.newBounds); + } + if (action.alignments !== undefined) { + for (var _b = 0, _c = action.alignments; _b < _c.length; _b++) { + var a = _c[_b]; + var element = index.getById(a.elementId); + if (element !== undefined) + this.applyAlignment(element, a.newAlignment); + } + } + this.actionDispatcher.dispatch(new update_model_1.UpdateModelAction(root)); + if (this.onModelSubmitted !== undefined) { + this.onModelSubmitted(root); + } + }; + LocalModelSource.prototype.applyBounds = function (element, newBounds) { + var e = element; + e.position = { x: newBounds.x, y: newBounds.y }; + e.size = { width: newBounds.width, height: newBounds.height }; + }; + LocalModelSource.prototype.applyAlignment = function (element, newAlignment) { + var e = element; + e.alignment = { x: newAlignment.x, y: newAlignment.y }; + }; + LocalModelSource.prototype.handleRequestPopupModel = function (action) { + if (this.popupModelFactory !== undefined) { + var element = smodel_utils_1.findElement(this.currentRoot, action.elementId); + var popupRoot = this.popupModelFactory(action, element); + if (popupRoot !== undefined) { + popupRoot.canvasBounds = action.bounds; + this.actionDispatcher.dispatch(new hover_1.SetPopupModelAction(popupRoot)); + } + } + }; + LocalModelSource.prototype.handleExportSvgAction = function (action) { + var blob = new Blob([action.svg], { type: "text/plain;charset=utf-8" }); + file_saver_1.saveAs(blob, "diagram.svg"); + }; + LocalModelSource.prototype.handleCollapseExpandAction = function (action) { + if (this.modelProvider !== undefined) { + this.diagramState.expansionState.apply(action); + var expandedModel = this.modelProvider.getModel(this.diagramState, this.currentRoot); + this.updateModel(expandedModel); + } + }; + LocalModelSource.prototype.handleCollapseExpandAllAction = function (action) { + if (this.modelProvider !== undefined) { + if (action.expand) { + // Expanding all elements locally is currently not supported + } + else { + this.diagramState.expansionState.collapseAll(); + } + var expandedModel = this.modelProvider.getModel(this.diagramState, this.currentRoot); + this.updateModel(expandedModel); + } + }; + LocalModelSource = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.IActionDispatcher)), + __param(1, inversify_1.inject(types_1.TYPES.ActionHandlerRegistry)), + __param(2, inversify_1.inject(types_1.TYPES.ViewerOptions)), + __param(3, inversify_1.inject(types_1.TYPES.PopupModelFactory)), __param(3, inversify_1.optional()), + __param(4, inversify_1.inject(types_1.TYPES.StateAwareModelProvider)), __param(4, inversify_1.optional()), + __metadata("design:paramtypes", [Object, action_handler_1.ActionHandlerRegistry, Object, Function, Object]) + ], LocalModelSource); + return LocalModelSource; +}(model_source_1.ModelSource)); +exports.LocalModelSource = LocalModelSource; +//# sourceMappingURL=local-model-source.js.map + +/***/ }), +/* 274 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var logging_1 = __webpack_require__(103); +var types_1 = __webpack_require__(1); +var LoggingAction = /** @class */ (function () { + function LoggingAction(severity, time, caller, message, params) { + this.severity = severity; + this.time = time; + this.caller = caller; + this.message = message; + this.params = params; + this.kind = LoggingAction.KIND; + } + LoggingAction.KIND = 'logging'; + return LoggingAction; +}()); +exports.LoggingAction = LoggingAction; +/** + * A logger that forwards messages of type 'error', 'warn', and 'info' to the model source. + */ +var ForwardingLogger = /** @class */ (function () { + function ForwardingLogger(modelSourceProvider, logLevel) { + this.modelSourceProvider = modelSourceProvider; + this.logLevel = logLevel; + } + ForwardingLogger.prototype.error = function (thisArg, message) { + var params = []; + for (var _i = 2; _i < arguments.length; _i++) { + params[_i - 2] = arguments[_i]; + } + if (this.logLevel >= logging_1.LogLevel.error) + this.forward(thisArg, message, logging_1.LogLevel.error, params); + }; + ForwardingLogger.prototype.warn = function (thisArg, message) { + var params = []; + for (var _i = 2; _i < arguments.length; _i++) { + params[_i - 2] = arguments[_i]; + } + if (this.logLevel >= logging_1.LogLevel.warn) + this.forward(thisArg, message, logging_1.LogLevel.warn, params); + }; + ForwardingLogger.prototype.info = function (thisArg, message) { + var params = []; + for (var _i = 2; _i < arguments.length; _i++) { + params[_i - 2] = arguments[_i]; + } + if (this.logLevel >= logging_1.LogLevel.info) + this.forward(thisArg, message, logging_1.LogLevel.info, params); + }; + ForwardingLogger.prototype.log = function (thisArg, message) { + var params = []; + for (var _i = 2; _i < arguments.length; _i++) { + params[_i - 2] = arguments[_i]; + } + if (this.logLevel >= logging_1.LogLevel.log) { + // We cannot forward 'log' level messages since that would lead to endless loops + try { + var caller = typeof thisArg === 'object' ? thisArg.constructor.name : String(thisArg); + console.log.apply(thisArg, [caller + ': ' + message].concat(params)); + } + catch (error) { } + } + }; + ForwardingLogger.prototype.forward = function (thisArg, message, logLevel, params) { + var date = new Date(); + var action = new LoggingAction(logging_1.LogLevel[logLevel], date.toLocaleTimeString(), typeof thisArg === 'object' ? thisArg.constructor.name : String(thisArg), message, params.map(function (p) { return JSON.stringify(p); })); + this.modelSourceProvider().then(function (modelSource) { + try { + modelSource.handle(action); + } + catch (error) { + try { + console.log.apply(thisArg, [message, action, error]); + } + catch (error) { } + } + }); + }; + ForwardingLogger = __decorate([ + inversify_1.injectable(), + __param(0, inversify_1.inject(types_1.TYPES.ModelSourceProvider)), + __param(1, inversify_1.inject(types_1.TYPES.LogLevel)), + __metadata("design:paramtypes", [Function, Number]) + ], ForwardingLogger); + return ForwardingLogger; +}()); +exports.ForwardingLogger = ForwardingLogger; +//# sourceMappingURL=logging.js.map + +/***/ }), +/* 275 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inversify_1 = __webpack_require__(0); +var diagram_server_1 = __webpack_require__(145); +/** + * An external ModelSource that connects to the model provider using a + * websocket. + */ +var WebSocketDiagramServer = /** @class */ (function (_super) { + __extends(WebSocketDiagramServer, _super); + function WebSocketDiagramServer() { + return _super !== null && _super.apply(this, arguments) || this; + } + WebSocketDiagramServer.prototype.listen = function (webSocket) { + var _this = this; + webSocket.addEventListener('message', function (event) { + _this.messageReceived(event.data); + }); + webSocket.addEventListener('error', function (event) { + _this.logger.error(_this, 'error event received', event); + }); + this.webSocket = webSocket; + }; + WebSocketDiagramServer.prototype.disconnect = function () { + if (this.webSocket) { + this.webSocket.close(); + this.webSocket = undefined; + } + }; + WebSocketDiagramServer.prototype.sendMessage = function (message) { + if (this.webSocket) { + this.webSocket.send(JSON.stringify(message)); + } + else { + throw new Error('WebSocket is not connected'); + } + }; + WebSocketDiagramServer = __decorate([ + inversify_1.injectable() + ], WebSocketDiagramServer); + return WebSocketDiagramServer; +}(diagram_server_1.DiagramServer)); +exports.WebSocketDiagramServer = WebSocketDiagramServer; +//# sourceMappingURL=websocket.js.map + +/***/ }), +/* 276 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Copyright (C) 2017 TypeFox and others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +function rgb(red, green, blue) { + return { + red: red, + green: green, + blue: blue + }; +} +exports.rgb = rgb; +function toSVG(c) { + return 'rgb(' + c.red + ',' + c.green + ',' + c.blue + ')'; +} +exports.toSVG = toSVG; +var ColorMap = /** @class */ (function () { + function ColorMap(stops) { + this.stops = stops; + } + ColorMap.prototype.getColor = function (t) { + t = Math.max(0, Math.min(0.99999999, t)); + var i = Math.floor(t * this.stops.length); + return this.stops[i]; + }; + return ColorMap; +}()); +exports.ColorMap = ColorMap; +//# sourceMappingURL=color.js.map + +/***/ }), +/* 277 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* unused harmony export htmlDomApi */ +function createElement(tagName) { + return document.createElement(tagName); +} +function createElementNS(namespaceURI, qualifiedName) { + return document.createElementNS(namespaceURI, qualifiedName); +} +function createTextNode(text) { + return document.createTextNode(text); +} +function createComment(text) { + return document.createComment(text); +} +function insertBefore(parentNode, newNode, referenceNode) { + parentNode.insertBefore(newNode, referenceNode); +} +function removeChild(node, child) { + node.removeChild(child); +} +function appendChild(node, child) { + node.appendChild(child); +} +function parentNode(node) { + return node.parentNode; +} +function nextSibling(node) { + return node.nextSibling; +} +function tagName(elm) { + return elm.tagName; +} +function setTextContent(node, text) { + node.textContent = text; +} +function getTextContent(node) { + return node.textContent; +} +function isElement(node) { + return node.nodeType === 1; +} +function isText(node) { + return node.nodeType === 3; +} +function isComment(node) { + return node.nodeType === 8; +} +var htmlDomApi = { + createElement: createElement, + createElementNS: createElementNS, + createTextNode: createTextNode, + createComment: createComment, + insertBefore: insertBefore, + removeChild: removeChild, + appendChild: appendChild, + parentNode: parentNode, + nextSibling: nextSibling, + tagName: tagName, + setTextContent: setTextContent, + getTextContent: getTextContent, + isElement: isElement, + isText: isText, + isComment: isComment, +}; +/* harmony default export */ __webpack_exports__["a"] = (htmlDomApi); +//# sourceMappingURL=htmldomapi.js.map + +/***/ }), +/* 278 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return thunk; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__h__ = __webpack_require__(147); + +function copyToThunk(vnode, thunk) { + thunk.elm = vnode.elm; + vnode.data.fn = thunk.data.fn; + vnode.data.args = thunk.data.args; + thunk.data = vnode.data; + thunk.children = vnode.children; + thunk.text = vnode.text; + thunk.elm = vnode.elm; +} +function init(thunk) { + var cur = thunk.data; + var vnode = cur.fn.apply(undefined, cur.args); + copyToThunk(vnode, thunk); +} +function prepatch(oldVnode, thunk) { + var i, old = oldVnode.data, cur = thunk.data; + var oldArgs = old.args, args = cur.args; + if (old.fn !== cur.fn || oldArgs.length !== args.length) { + copyToThunk(cur.fn.apply(undefined, args), thunk); + return; + } + for (i = 0; i < args.length; ++i) { + if (oldArgs[i] !== args[i]) { + copyToThunk(cur.fn.apply(undefined, args), thunk); + return; + } + } + copyToThunk(oldVnode, thunk); +} +var thunk = function thunk(sel, key, fn, args) { + if (args === undefined) { + args = fn; + fn = key; + key = undefined; + } + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__h__["a" /* h */])(sel, { + key: key, + hook: { init: init, prepatch: prepatch }, + fn: fn, + args: args + }); +}; +/* unused harmony default export */ var _unused_webpack_default_export = (thunk); +//# sourceMappingURL=thunk.js.map + +/***/ }), +/* 279 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var xlinkNS = 'http://www.w3.org/1999/xlink'; +var xmlNS = 'http://www.w3.org/XML/1998/namespace'; +var colonChar = 58; +var xChar = 120; +function updateAttrs(oldVnode, vnode) { + var key, elm = vnode.elm, oldAttrs = oldVnode.data.attrs, attrs = vnode.data.attrs; + if (!oldAttrs && !attrs) + return; + if (oldAttrs === attrs) + return; + oldAttrs = oldAttrs || {}; + attrs = attrs || {}; + // update modified attributes, add new attributes + for (key in attrs) { + var cur = attrs[key]; + var old = oldAttrs[key]; + if (old !== cur) { + if (cur === true) { + elm.setAttribute(key, ""); + } + else if (cur === false) { + elm.removeAttribute(key); + } + else { + if (key.charCodeAt(0) !== xChar) { + elm.setAttribute(key, cur); + } + else if (key.charCodeAt(3) === colonChar) { + // Assume xml namespace + elm.setAttributeNS(xmlNS, key, cur); + } + else if (key.charCodeAt(5) === colonChar) { + // Assume xlink namespace + elm.setAttributeNS(xlinkNS, key, cur); + } + else { + elm.setAttribute(key, cur); + } + } + } + } + // remove removed attributes + // use `in` operator since the previous `for` iteration uses it (.i.e. add even attributes with undefined value) + // the other option is to remove all attributes with value == undefined + for (key in oldAttrs) { + if (!(key in attrs)) { + elm.removeAttribute(key); + } + } +} +exports.attributesModule = { create: updateAttrs, update: updateAttrs }; +exports.default = exports.attributesModule; +//# sourceMappingURL=attributes.js.map + +/***/ }), +/* 280 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +function updateClass(oldVnode, vnode) { + var cur, name, elm = vnode.elm, oldClass = oldVnode.data.class, klass = vnode.data.class; + if (!oldClass && !klass) + return; + if (oldClass === klass) + return; + oldClass = oldClass || {}; + klass = klass || {}; + for (name in oldClass) { + if (!klass[name]) { + elm.classList.remove(name); + } + } + for (name in klass) { + cur = klass[name]; + if (cur !== oldClass[name]) { + elm.classList[cur ? 'add' : 'remove'](name); + } + } +} +exports.classModule = { create: updateClass, update: updateClass }; +exports.default = exports.classModule; +//# sourceMappingURL=class.js.map + +/***/ }), +/* 281 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +function invokeHandler(handler, vnode, event) { + if (typeof handler === "function") { + // call function handler + handler.call(vnode, event, vnode); + } + else if (typeof handler === "object") { + // call handler with arguments + if (typeof handler[0] === "function") { + // special case for single argument for performance + if (handler.length === 2) { + handler[0].call(vnode, handler[1], event, vnode); + } + else { + var args = handler.slice(1); + args.push(event); + args.push(vnode); + handler[0].apply(vnode, args); + } + } + else { + // call multiple handlers + for (var i = 0; i < handler.length; i++) { + invokeHandler(handler[i]); + } + } + } +} +function handleEvent(event, vnode) { + var name = event.type, on = vnode.data.on; + // call event handler(s) if exists + if (on && on[name]) { + invokeHandler(on[name], vnode, event); + } +} +function createListener() { + return function handler(event) { + handleEvent(event, handler.vnode); + }; +} +function updateEventListeners(oldVnode, vnode) { + var oldOn = oldVnode.data.on, oldListener = oldVnode.listener, oldElm = oldVnode.elm, on = vnode && vnode.data.on, elm = (vnode && vnode.elm), name; + // optimization for reused immutable handlers + if (oldOn === on) { + return; + } + // remove existing listeners which no longer used + if (oldOn && oldListener) { + // if element changed or deleted we remove all existing listeners unconditionally + if (!on) { + for (name in oldOn) { + // remove listener if element was changed or existing listeners removed + oldElm.removeEventListener(name, oldListener, false); + } + } + else { + for (name in oldOn) { + // remove listener if existing listener removed + if (!on[name]) { + oldElm.removeEventListener(name, oldListener, false); + } + } + } + } + // add new listeners which has not already attached + if (on) { + // reuse existing listener or create new + var listener = vnode.listener = oldVnode.listener || createListener(); + // update vnode for listener + listener.vnode = vnode; + // if element changed or added we add all needed listeners unconditionally + if (!oldOn) { + for (name in on) { + // add listener if element was changed or new listeners added + elm.addEventListener(name, listener, false); + } + } + else { + for (name in on) { + // add listener if new listener added + if (!oldOn[name]) { + elm.addEventListener(name, listener, false); + } + } + } + } +} +exports.eventListenersModule = { + create: updateEventListeners, + update: updateEventListeners, + destroy: updateEventListeners +}; +exports.default = exports.eventListenersModule; +//# sourceMappingURL=eventlisteners.js.map + +/***/ }), +/* 282 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +function updateProps(oldVnode, vnode) { + var key, cur, old, elm = vnode.elm, oldProps = oldVnode.data.props, props = vnode.data.props; + if (!oldProps && !props) + return; + if (oldProps === props) + return; + oldProps = oldProps || {}; + props = props || {}; + for (key in oldProps) { + if (!props[key]) { + delete elm[key]; + } + } + for (key in props) { + cur = props[key]; + old = oldProps[key]; + if (old !== cur && (key !== 'value' || elm[key] !== cur)) { + elm[key] = cur; + } + } +} +exports.propsModule = { create: updateProps, update: updateProps }; +exports.default = exports.propsModule; +//# sourceMappingURL=props.js.map + +/***/ }), +/* 283 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var raf = (typeof window !== 'undefined' && window.requestAnimationFrame) || setTimeout; +var nextFrame = function (fn) { raf(function () { raf(fn); }); }; +function setNextFrame(obj, prop, val) { + nextFrame(function () { obj[prop] = val; }); +} +function updateStyle(oldVnode, vnode) { + var cur, name, elm = vnode.elm, oldStyle = oldVnode.data.style, style = vnode.data.style; + if (!oldStyle && !style) + return; + if (oldStyle === style) + return; + oldStyle = oldStyle || {}; + style = style || {}; + var oldHasDel = 'delayed' in oldStyle; + for (name in oldStyle) { + if (!style[name]) { + if (name[0] === '-' && name[1] === '-') { + elm.style.removeProperty(name); + } + else { + elm.style[name] = ''; + } + } + } + for (name in style) { + cur = style[name]; + if (name === 'delayed' && style.delayed) { + for (var name2 in style.delayed) { + cur = style.delayed[name2]; + if (!oldHasDel || cur !== oldStyle.delayed[name2]) { + setNextFrame(elm.style, name2, cur); + } + } + } + else if (name !== 'remove' && cur !== oldStyle[name]) { + if (name[0] === '-' && name[1] === '-') { + elm.style.setProperty(name, cur); + } + else { + elm.style[name] = cur; + } + } + } +} +function applyDestroyStyle(vnode) { + var style, name, elm = vnode.elm, s = vnode.data.style; + if (!s || !(style = s.destroy)) + return; + for (name in style) { + elm.style[name] = style[name]; + } +} +function applyRemoveStyle(vnode, rm) { + var s = vnode.data.style; + if (!s || !s.remove) { + rm(); + return; + } + var name, elm = vnode.elm, i = 0, compStyle, style = s.remove, amount = 0, applied = []; + for (name in style) { + applied.push(name); + elm.style[name] = style[name]; + } + compStyle = getComputedStyle(elm); + var props = compStyle['transition-property'].split(', '); + for (; i < props.length; ++i) { + if (applied.indexOf(props[i]) !== -1) + amount++; + } + elm.addEventListener('transitionend', function (ev) { + if (ev.target === elm) + --amount; + if (amount === 0) + rm(); + }); +} +exports.styleModule = { + create: updateStyle, + update: updateStyle, + destroy: applyDestroyStyle, + remove: applyRemoveStyle +}; +exports.default = exports.styleModule; +//# sourceMappingURL=style.js.map + +/***/ }), +/* 284 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Action used to execute container creation tools. + * + * @sbegaudeau + */ +var ExecuteContainerCreationToolAction = /** @class */ (function () { + /** + * The constructor. + * @param toolName The name of the tool to execute + */ + function ExecuteContainerCreationToolAction(toolName) { + /** + * The kind of the action. + */ + this.kind = ExecuteContainerCreationToolAction.KIND; + this.toolName = toolName; + } + /** + * The kind of the action. + */ + ExecuteContainerCreationToolAction.KIND = 'executeContainerCreationTool'; + /** + * The type of the action. + */ + ExecuteContainerCreationToolAction.TYPE = 'ContainerCreationDescriptionImpl'; + return ExecuteContainerCreationToolAction; +}()); +exports.ExecuteContainerCreationToolAction = ExecuteContainerCreationToolAction; + + +/***/ }), +/* 285 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Action used to execute node creation tools. + * + * @gcoutable + */ +var ExecuteNodeCreationToolAction = /** @class */ (function () { + /** + * The constructor. + * @param toolName The name of the tool to execute + */ + function ExecuteNodeCreationToolAction(toolName) { + /** + * The kind of the action. + */ + this.kind = ExecuteNodeCreationToolAction.KIND; + this.toolName = toolName; + } + /** + * The kind of the action. + */ + ExecuteNodeCreationToolAction.KIND = 'executeNodeCreationTool'; + /** + * The type of the action. + */ + ExecuteNodeCreationToolAction.TYPE = 'NodeCreationDescriptionImpl'; + return ExecuteNodeCreationToolAction; +}()); +exports.ExecuteNodeCreationToolAction = ExecuteNodeCreationToolAction; + + +/***/ }), +/* 286 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Action used to generic tools. + * + * @sbegaudeau + */ +var ExecuteToolAction = /** @class */ (function () { + /** + * The constructor. + * @param toolName The name of the tool to execute + */ + function ExecuteToolAction(toolName) { + /** + * The kind of the action. + */ + this.kind = ExecuteToolAction.KIND; + this.toolName = toolName; + } + /** + * The kind of the action. + */ + ExecuteToolAction.KIND = 'executeTool'; + /** + * The type of the action. + */ + ExecuteToolAction.TYPE = 'ToolDescriptionImpl'; + return ExecuteToolAction; +}()); +exports.ExecuteToolAction = ExecuteToolAction; + + +/***/ }), +/* 287 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Action used to retrieve the layers of the diagram. + * + * @gcoutable + */ +var RequestLayersAction = /** @class */ (function () { + function RequestLayersAction() { + /** + * The kind of the action. + */ + this.kind = RequestLayersAction.KIND; + } + /** + * The kind of the action. + */ + RequestLayersAction.KIND = 'requestLayers'; + return RequestLayersAction; +}()); +exports.RequestLayersAction = RequestLayersAction; + + +/***/ }), +/* 288 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Action used to retrieve the tools of the diagram. + * + * @gcoutable + */ +var RequestToolsAction = /** @class */ (function () { + function RequestToolsAction() { + /** + * The kind of the action. + */ + this.kind = RequestToolsAction.KIND; + } + /** + * The kind of the action. + */ + RequestToolsAction.KIND = 'requestTools'; + return RequestToolsAction; +}()); +exports.RequestToolsAction = RequestToolsAction; + + +/***/ }), +/* 289 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Action used to set the layers of the diagram. + * + * @gcoutable + */ +var SetLayersAction = /** @class */ (function () { + /** + * The constructor. + * @param layers The layers of the diagram + */ + function SetLayersAction(layers) { + /** + * The kind of the action. + */ + this.kind = SetLayersAction.KIND; + this.layers = layers; + } + /** + * The kind of the action. + */ + SetLayersAction.KIND = 'setLayers'; + return SetLayersAction; +}()); +exports.SetLayersAction = SetLayersAction; + + +/***/ }), +/* 290 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Action used to set the tools of the diagram. + * + * @gcoutable + */ +var SetToolsAction = /** @class */ (function () { + /** + * The constructor. + * @param tools The tools of the diagram + */ + function SetToolsAction(tools) { + /** + * The kind of the action. + */ + this.kind = SetToolsAction.KIND; + this.tools = tools; + } + /** + * The kind of the action. + */ + SetToolsAction.KIND = 'setTools'; + return SetToolsAction; +}()); +exports.SetToolsAction = SetToolsAction; + + +/***/ }), +/* 291 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Action used to toggle a layer. + * + * @author gcoutable + */ +var ToggleLayerAction = /** @class */ (function () { + /** + * The constructor. + * @param layerName The name of the layer + * @param newState The new state of the layer + */ + function ToggleLayerAction(layerName, newState) { + /** + * The kind of the action. + */ + this.kind = ToggleLayerAction.KIND; + this.layerName = layerName; + this.newState = newState; + } + /** + * The kind of the action. + */ + ToggleLayerAction.KIND = 'toggleLayer'; + return ToggleLayerAction; +}()); +exports.ToggleLayerAction = ToggleLayerAction; + + +/***/ }), +/* 292 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/******************************************************************************* + * Copyright (c) 2018 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +var lib_1 = __webpack_require__(15); +var request_layers_action_1 = __webpack_require__(287); +var request_tools_action_1 = __webpack_require__(288); +var set_layers_action_1 = __webpack_require__(289); +var set_tools_action_1 = __webpack_require__(290); +var di_config_1 = __webpack_require__(294); +var tools_utils_1 = __webpack_require__(293); +__webpack_require__(240); +/* tslint:disable */ +var SetLayersActionHandler = /** @class */ (function () { + function SetLayersActionHandler(diagramServer) { + this.diagramServer = diagramServer; + } + /** + * Handles the given action received by the server. + * @param action The action + */ + SetLayersActionHandler.prototype.handle = function (action) { + this.handleSetLayersAction(action); + }; + /** + * Handles the set layers action. + * @param action The action + */ + SetLayersActionHandler.prototype.handleSetLayersAction = function (action) { + tools_utils_1.cleanDOMElement(document.getElementById('layers-palette')); + tools_utils_1.createDOMElementForLayers(this.diagramServer, action.layers); + }; + return SetLayersActionHandler; +}()); +exports.SetLayersActionHandler = SetLayersActionHandler; +/* tslint:enable */ +/* tslint:disable */ +var SetToolsActionHandler = /** @class */ (function () { + function SetToolsActionHandler(diagramServer) { + this.diagramServer = diagramServer; + } + /** + * Handles the given action received by the server. + * @param action The action + */ + SetToolsActionHandler.prototype.handle = function (action) { + this.handleSetToolsAction(action); + }; + /** + * Handles the set tools action. + * @param action The action + */ + SetToolsActionHandler.prototype.handleSetToolsAction = function (action) { + var tools = action.tools.filter(function (tool) { + return tools_utils_1.canHandleTool(tool); + }); + tools_utils_1.cleanDOMElement(document.getElementById('tools-palette')); + tools_utils_1.createDOMElementsForTools(this.diagramServer, tools); + }; + return SetToolsActionHandler; +}()); +exports.SetToolsActionHandler = SetToolsActionHandler; +/* tslint:enable */ +/** + * Creates the Sirius diagram and connect it to the server. + * + * @sbegaudeau + */ +function initializeSiriusDiagram() { + var websocket = new WebSocket('ws://' + window.location.host + '/diagrams/api'); + var container = di_config_1.createContainer('sprotty'); + var diagramServer = container.get(lib_1.TYPES.ModelSource); + diagramServer.listen(websocket); + var actionHandlerRegistry = container.get(lib_1.TYPES.ActionHandlerRegistry); + actionHandlerRegistry.register(set_layers_action_1.SetLayersAction.KIND, new SetLayersActionHandler(diagramServer)); + actionHandlerRegistry.register(set_tools_action_1.SetToolsAction.KIND, new SetToolsActionHandler(diagramServer)); + // Connect to the diagram server + websocket.addEventListener('open', function (event) { + var url = new URL(window.location.href); + var parameters = new URLSearchParams(url.search); + var project = parameters.get('project') || ''; + var aird = parameters.get('aird') || ''; + var representationName = parameters.get('representationName') || ''; + diagramServer.clientId = "__PROJECT__" + project + "__AIRD__" + aird + "__REPRESENTATION__" + representationName + "__CLIENT_ID__" + Math.random(); + diagramServer.handle(new request_tools_action_1.RequestToolsAction()); + diagramServer.handle(new request_layers_action_1.RequestLayersAction()); + diagramServer.handle(new lib_1.RequestModelAction({ + project: project, + aird: aird, + representationName: representationName + })); + }); +} +exports.initializeSiriusDiagram = initializeSiriusDiagram; + + +/***/ }), +/* 293 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var execute_container_creation_tool_action_1 = __webpack_require__(284); +var execute_node_creation_tool_action_1 = __webpack_require__(285); +var execute_tool_action_1 = __webpack_require__(286); +var toogle_layers_action_1 = __webpack_require__(291); +/** + * Indicates if the given tool is supported by the diagram. + * @param tool The tool + * @returns true if the tool is supported, false otherwise + */ +function canHandleTool(tool) { + var canHandle = false; + switch (tool.toolType) { + case execute_node_creation_tool_action_1.ExecuteNodeCreationToolAction.TYPE: + canHandle = true; + break; + case execute_container_creation_tool_action_1.ExecuteContainerCreationToolAction.TYPE: + canHandle = true; + break; + case execute_tool_action_1.ExecuteToolAction.TYPE: + canHandle = true; + break; + default: + canHandle = false; + break; + } + return canHandle; +} +exports.canHandleTool = canHandleTool; +/** + * Creates the action for the given tool. + * @param tool The tool + * @returns The action used to run the given tool or null if the tool is not supported + */ +function createToolAction(tool) { + var action = null; + switch (tool.toolType) { + case execute_node_creation_tool_action_1.ExecuteNodeCreationToolAction.TYPE: + action = new execute_node_creation_tool_action_1.ExecuteNodeCreationToolAction(tool.id); + break; + case execute_container_creation_tool_action_1.ExecuteContainerCreationToolAction.TYPE: + action = new execute_container_creation_tool_action_1.ExecuteContainerCreationToolAction(tool.id); + break; + case execute_tool_action_1.ExecuteToolAction.TYPE: + action = new execute_tool_action_1.ExecuteToolAction(tool.id); + default: + break; + } + return action; +} +/** + * Creates the action for the given layer. + * @param layer The layer + * @returns The action used to toggle the given layer + */ +function createLayerAction(layer, newState) { + return new toogle_layers_action_1.ToggleLayerAction(layer.id, newState); +} +/** + * Creates the DOM elements used to execute the given tools. + * @param diagramServer The diagram server + * @param tools The tools to display + */ +function createDOMElementsForTools(diagramServer, tools) { + var toolPaletteElement = document.getElementById('tools-palette'); + if (toolPaletteElement !== null) { + tools.forEach(function (tool) { + var button = document.createElement('button'); + button.setAttribute('type', 'button'); + button.setAttribute('class', 'tool'); + var toolLabel = tool.name || tool.id; + var image = document.createElement('img'); + // FIXME Change the computation of the tool image source + var imageSource = 'assets/ToolDescription.gif'; + if (toolLabel.includes('Woman')) { + imageSource = 'assets/woman.svg'; + } + else if (toolLabel.includes('Man')) { + imageSource = 'assets/man.svg'; + } + else if (toolLabel.includes('New customer')) { + imageSource = 'assets/LaneSet.png'; + } + else if (toolLabel.includes('Start')) { + imageSource = 'assets/start.svg'; + } + else if (toolLabel.includes('Select')) { + imageSource = 'assets/Task.svg'; + } + else if (toolLabel.includes('Order')) { + imageSource = 'assets/Task.svg'; + } + else if (toolLabel.includes('Wait')) { + imageSource = 'assets/event-based-gateway.svg'; + } + else if (toolLabel.includes('Eat')) { + imageSource = 'assets/end.svg'; + } + image.setAttribute('src', imageSource); + button.appendChild(image); + var label = document.createElement('label'); + label.textContent = toolLabel; + button.appendChild(label); + button.addEventListener('click', function (event) { + var toolAction = createToolAction(tool); + if (toolAction !== null) { + diagramServer.handle(toolAction); + } + }); + toolPaletteElement.appendChild(button); + }); + } +} +exports.createDOMElementsForTools = createDOMElementsForTools; +/** + * Creates the DOM elements used to activate or deactivate layers. + * @param diagramServer The diagram server + * @param layers The layers to display + */ +function createDOMElementForLayers(diagramServer, layers) { + var layerPaletteElement = document.getElementById('layers-palette'); + if (layerPaletteElement != null) { + layers.forEach(function (layer) { + var layerId = "layer-" + layer.id; + var layerContainerElement = document.createElement('div'); + layerContainerElement.setAttribute('class', 'layer'); + var layerLabelElement = document.createElement('label'); + layerLabelElement.setAttribute('for', layerId); + layerLabelElement.textContent = (layer.name || layer.id) + " "; + layerContainerElement.appendChild(layerLabelElement); + var layerCheckboxElement = document.createElement('input'); + layerCheckboxElement.setAttribute('type', 'checkbox'); + if (layer.isActive) { + layerCheckboxElement.setAttribute('checked', 'checked'); + } + layerCheckboxElement.setAttribute('id', layerId); + layerCheckboxElement.addEventListener('click', function (event) { + var eventTarget = event.target; + var layerAction = createLayerAction(layer, eventTarget.checked); + if (layerAction !== null) { + diagramServer.handle(layerAction); + } + }); + layerContainerElement.appendChild(layerCheckboxElement); + layerPaletteElement.appendChild(layerContainerElement); + }); + } +} +exports.createDOMElementForLayers = createDOMElementForLayers; +/** + * Cleans the content of the HTMLElement. + * @param element The HTMLElement + */ +function cleanDOMElement(element) { + if (element !== null) { + for (var index = 0; index < element.children.length;) { + var item = element.children.item(index); + element.removeChild(item); + } + } +} +exports.cleanDOMElement = cleanDOMElement; + + +/***/ }), +/* 294 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/******************************************************************************* + * Copyright (c) 2018 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +var inversify_1 = __webpack_require__(0); +var lib_1 = __webpack_require__(15); +var sirius_edge_view_1 = __webpack_require__(298); +var sirius_free_form_flat_container_node_view_1 = __webpack_require__(299); +var sirius_list_flat_container_node_view_1 = __webpack_require__(301); +var sirius_square_border_node_view_1 = __webpack_require__(302); +var sirius_svg_border_node_view_1 = __webpack_require__(304); +var sirius_label_view_1 = __webpack_require__(300); +var sirius_square_node_view_1 = __webpack_require__(303); +var sirius_svg_node_view_1 = __webpack_require__(305); +var sirius_graph_factory_1 = __webpack_require__(296); +var popup_1 = __webpack_require__(295); +var sirius_websocket_diagram_server_1 = __webpack_require__(297); +var siriusContainerModule = new inversify_1.ContainerModule(function (bind, unbind, isBound, rebind) { + rebind(lib_1.TYPES.ILogger) + .to(lib_1.ConsoleLogger) + .inSingletonScope(); + rebind(lib_1.TYPES.LogLevel).toConstantValue(lib_1.LogLevel.log); + rebind(lib_1.TYPES.IModelFactory) + .to(sirius_graph_factory_1.SiriusGraphFactory) + .inSingletonScope(); + bind(lib_1.TYPES.PopupModelFactory).toConstantValue(popup_1.siriusPopupModelFactory); +}); +/** + * Create the dependency injection container. + * @param containerId The identifier of the container + */ +exports.createContainer = function (containerId) { + var container = new inversify_1.Container(); + container.load(lib_1.defaultModule, lib_1.selectModule, lib_1.moveModule, lib_1.boundsModule, lib_1.undoRedoModule, lib_1.viewportModule, lib_1.hoverModule, lib_1.exportModule, siriusContainerModule); + container + .bind(lib_1.TYPES.ModelSource) + .to(sirius_websocket_diagram_server_1.SiriusWebSocketDiagramServer) + .inSingletonScope(); + lib_1.overrideViewerOptions(container, { + needsClientLayout: true, + needsServerLayout: true, + baseDiv: containerId, + hiddenDiv: containerId + '-hidden' + }); + var viewRegistry = container.get(lib_1.TYPES.ViewRegistry); + viewRegistry.register('graph', lib_1.SGraphView); + viewRegistry.register('node:square', sirius_square_node_view_1.SiriusSquareNodeView); + viewRegistry.register('node:svg', sirius_svg_node_view_1.SiriusSVGNodeView); + viewRegistry.register('port:square', sirius_square_border_node_view_1.SiriusSquareBorderNodeView); + viewRegistry.register('port:image', sirius_svg_border_node_view_1.SiriusSvgBorderNodeView); + viewRegistry.register('node:freeformflatcontainer', sirius_free_form_flat_container_node_view_1.SiriusFreeFormFlatContainerNodeView); + viewRegistry.register('node:listflatcontainer', sirius_list_flat_container_node_view_1.SiriusListFlatContainerNodeView); + viewRegistry.register('comp:listflatcontainer_label', lib_1.SCompartmentView); + viewRegistry.register('comp:listflatcontainer_body', lib_1.SCompartmentView); + viewRegistry.register('edge:straight', sirius_edge_view_1.SiriusEdgeView); + viewRegistry.register('label:inside-left', sirius_label_view_1.SiriusLabelView); + viewRegistry.register('label:inside-center', sirius_label_view_1.SiriusLabelView); + viewRegistry.register('label:inside-right', sirius_label_view_1.SiriusLabelView); + viewRegistry.register('label:outside-left', sirius_label_view_1.SiriusLabelView); + viewRegistry.register('label:outside-center', sirius_label_view_1.SiriusLabelView); + viewRegistry.register('label:outside-right', sirius_label_view_1.SiriusLabelView); + viewRegistry.register('label:text', lib_1.SLabelView); + viewRegistry.register('comp:main', lib_1.SCompartmentView); + viewRegistry.register('html', lib_1.HtmlRootView); + viewRegistry.register('pre-rendered', lib_1.PreRenderedView); + return container; +}; + + +/***/ }), +/* 295 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Creates a popup for the given action. + * @param request The request popup model action + * @param element The model element schema + */ +exports.siriusPopupModelFactory = function (request, element) { + if (element !== undefined && element.type === 'node:svg') { + return { + type: 'html', + id: 'popup', + children: [ + { + type: 'pre-rendered', + id: 'popup-title', + code: "<div class=\"popup-title\">Class " + (element.id === 'node0' ? 'Foo' : 'Bar') + "</div>" + }, + { + type: 'pre-rendered', + id: 'popup-body', + code: '<div class="popup-body">Hello World</div>' + } + ] + }; + } + return undefined; +}; + + +/***/ }), +/* 296 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +/******************************************************************************* + * Copyright (c) 2018 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +var lib_1 = __webpack_require__(15); +/** + * The Sirius graph factory used to create all the graph elements. + * + * @sbegaudeau + */ +var SiriusGraphFactory = /** @class */ (function (_super) { + __extends(SiriusGraphFactory, _super); + function SiriusGraphFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Creates the element with the given schema. + * @param schema The model element schema + * @param parent The parent element + */ + SiriusGraphFactory.prototype.createElement = function (schema, parent) { + /*if (this.isNodeSchema(schema)) { + return this.initializeChild(new SiriusNode(), schema, parent) + } else */ + if (this.isPreRenderedSchema(schema)) { + return this.initializeChild(new lib_1.PreRenderedElement(), schema, parent); + } + else { + return _super.prototype.createElement.call(this, schema, parent); + } + }; + /** + * Creates the root for the given schema. + * @param schema The schema + */ + SiriusGraphFactory.prototype.createRoot = function (schema) { + if (this.isHtmlRootSchema(schema)) { + return this.initializeRoot(new lib_1.HtmlRoot(), schema); + } + else { + return _super.prototype.createRoot.call(this, schema); + } + }; + /** + * Indicates if the given schema is an HTML root schema. + * @param schema The model root schema + */ + SiriusGraphFactory.prototype.isHtmlRootSchema = function (schema) { + return lib_1.getBasicType(schema) === 'html'; + }; + /** + * Indicates if the given schema is a pre-rendered schema. + * @param schema The model element schema + */ + SiriusGraphFactory.prototype.isPreRenderedSchema = function (schema) { + return lib_1.getBasicType(schema) === 'pre-rendered'; + }; + return SiriusGraphFactory; +}(lib_1.SGraphFactory)); +exports.SiriusGraphFactory = SiriusGraphFactory; + + +/***/ }), +/* 297 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +/******************************************************************************* + * Copyright (c) 2018 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +var lib_1 = __webpack_require__(15); +/** + * The Sirius WebSocket diagram server used to communicate with the remote server. + * + * @gcoutable + */ +var SiriusWebSocketDiagramServer = /** @class */ (function (_super) { + __extends(SiriusWebSocketDiagramServer, _super); + function SiriusWebSocketDiagramServer() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Initializes the given action handler registry. + * @param registry The action handler registry + */ + SiriusWebSocketDiagramServer.prototype.initialize = function (registry) { + _super.prototype.initialize.call(this, registry); + }; + /** + * Handles the given action received by the server. + * @param action The action + */ + SiriusWebSocketDiagramServer.prototype.handle = function (action) { + switch (action.kind) { + default: + _super.prototype.handle.call(this, action); + break; + } + }; + return SiriusWebSocketDiagramServer; +}(lib_1.WebSocketDiagramServer)); +exports.SiriusWebSocketDiagramServer = SiriusWebSocketDiagramServer; + + +/***/ }), +/* 298 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +/******************************************************************************* + * Copyright (c) 2018 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +var lib_1 = __webpack_require__(15); +var snabbdom = __webpack_require__(7); +var JSX = { createElement: snabbdom.svg }; +/** + * The view used to display Sirius edges. + * + * @sbegaudeau + */ +var SiriusEdgeView = /** @class */ (function (_super) { + __extends(SiriusEdgeView, _super); + function SiriusEdgeView() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Renders the line of the edge with a specific style configured. + * @param edge The edge + * @param segments The segments + * @param context The context + */ + SiriusEdgeView.prototype.renderLine = function (edge, segments, context) { + var style = edge.style; + var firstPoint = segments[0]; + var path = "M " + firstPoint.x + "," + firstPoint.y; + for (var i = 1; i < segments.length; i++) { + var p = segments[i]; + path += " L " + p.x + "," + p.y; + } + return JSX.createElement("path", { "class-sprotty-edge": true, d: path, style: JSON.parse(style) }); + }; + /** + * Renders additionals element for the given Edge. This method is overriden in order to let + * us add decorators to the beggining or the end of the edge (to create an arrow for example). + * @param edge The edge + * @param segments The segments + * @param context The context + */ + SiriusEdgeView.prototype.renderAdditionals = function (edge, segments, context) { + var style = edge.style; + var styleObject = JSON.parse(style); + styleObject.fill = styleObject.stroke; + var p1 = segments[segments.length - 2]; + var p2 = segments[segments.length - 1]; + return [ + JSX.createElement("path", { "class-edge": true, "class-arrow": true, d: "M 0,0 L 6,-3 L 6,3 Z", transform: "rotate(" + lib_1.toDegrees(lib_1.angle(p2, p1)) + " " + p2.x + " " + p2.y + ") translate(" + p2.x + " " + p2.y + ")", style: styleObject }) + ]; + }; + return SiriusEdgeView; +}(lib_1.PolylineEdgeView)); +exports.SiriusEdgeView = SiriusEdgeView; + + +/***/ }), +/* 299 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +/******************************************************************************* + * Copyright (c) 2018 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +var lib_1 = __webpack_require__(15); +var snabbdom = __webpack_require__(7); +var JSX = { createElement: snabbdom.svg }; +/** + * The view used to display free form containers with a flat style. + * + * @sbegaudeau + */ +var SiriusFreeFormFlatContainerNodeView = /** @class */ (function (_super) { + __extends(SiriusFreeFormFlatContainerNodeView, _super); + function SiriusFreeFormFlatContainerNodeView() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Renders the given node in the context. + * @param node The node + * @param context The context + */ + SiriusFreeFormFlatContainerNodeView.prototype.render = function (node, context) { + var style = node.style; + return (JSX.createElement("g", null, + JSX.createElement("rect", { "class-selected": node.selected, "class-mouseover": node.hoverFeedback, x: 0, y: 0, rx: "5", ry: "5", width: Math.max(0, node.bounds.width), height: Math.max(0, node.bounds.height), style: JSON.parse(style) }), + context.renderChildren(node))); + }; + return SiriusFreeFormFlatContainerNodeView; +}(lib_1.RectangularNodeView)); +exports.SiriusFreeFormFlatContainerNodeView = SiriusFreeFormFlatContainerNodeView; + + +/***/ }), +/* 300 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +/******************************************************************************* + * Copyright (c) 2018 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +var lib_1 = __webpack_require__(15); +var snabbdom = __webpack_require__(7); +var JSX = { createElement: snabbdom.svg }; +/** + * The view used to display labels. + * + * @sbegaudeau + */ +var SiriusLabelView = /** @class */ (function (_super) { + __extends(SiriusLabelView, _super); + function SiriusLabelView() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Renders the given label in the context. + * @param label The label + * @param context The context + */ + SiriusLabelView.prototype.render = function (label, context) { + var style = label.style; + var styleObject = JSON.parse(style); + var vnode = JSX.createElement("text", { "class-sprotty-label": true, style: styleObject }, label.text); + var subType = lib_1.getSubType(label); + if (subType) { + lib_1.setAttr(vnode, 'class', subType); + } + return vnode; + }; + return SiriusLabelView; +}(lib_1.SLabelView)); +exports.SiriusLabelView = SiriusLabelView; + + +/***/ }), +/* 301 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +/******************************************************************************* + * Copyright (c) 2018 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +var lib_1 = __webpack_require__(15); +var snabbdom = __webpack_require__(7); +var JSX = { createElement: snabbdom.svg }; +/** + * The view used to display list containers with a flat style. + * + * @sbegaudeau + */ +var SiriusListFlatContainerNodeView = /** @class */ (function (_super) { + __extends(SiriusListFlatContainerNodeView, _super); + function SiriusListFlatContainerNodeView() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Renders the given node in the context. + * @param node The node + * @param context The context + */ + SiriusListFlatContainerNodeView.prototype.render = function (node, context) { + var style = node.style; + return (JSX.createElement("g", null, + JSX.createElement("rect", { "class-selected": node.selected, "class-mouseover": node.hoverFeedback, x: 0, y: 0, rx: "5", ry: "5", width: Math.max(0, node.bounds.width), height: Math.max(0, node.bounds.height), style: JSON.parse(style) }), + context.renderChildren(node))); + }; + return SiriusListFlatContainerNodeView; +}(lib_1.RectangularNodeView)); +exports.SiriusListFlatContainerNodeView = SiriusListFlatContainerNodeView; + + +/***/ }), +/* 302 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +/******************************************************************************* + * Copyright (c) 2018 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +var lib_1 = __webpack_require__(15); +var snabbdom = __webpack_require__(7); +var JSX = { createElement: snabbdom.svg }; +/** + * The view used to display a border node nodes with a square style. + * + * @hmarchadour + */ +var SiriusSquareBorderNodeView = /** @class */ (function (_super) { + __extends(SiriusSquareBorderNodeView, _super); + function SiriusSquareBorderNodeView() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Renders the given port in the context. + * @param port The port + * @param context The context + */ + SiriusSquareBorderNodeView.prototype.render = function (port, context) { + var style = port.style; + return (JSX.createElement("g", null, + JSX.createElement("rect", { "class-selected": port.selected, "class-mouseover": port.hoverFeedback, x: 0, y: 0, width: Math.max(5, port.bounds.width), height: Math.max(5, port.bounds.height), style: JSON.parse(style) }), + context.renderChildren(port))); + }; + return SiriusSquareBorderNodeView; +}(lib_1.RectangularNodeView)); +exports.SiriusSquareBorderNodeView = SiriusSquareBorderNodeView; + + +/***/ }), +/* 303 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +/******************************************************************************* + * Copyright (c) 2018 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +var lib_1 = __webpack_require__(15); +var snabbdom = __webpack_require__(7); +var JSX = { createElement: snabbdom.svg }; +/** + * The view used to display nodes with a square style. + * + * @sbegaudeau + */ +var SiriusSquareNodeView = /** @class */ (function (_super) { + __extends(SiriusSquareNodeView, _super); + function SiriusSquareNodeView() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Renders the given node in the context. + * @param node The node + * @param context The context + */ + SiriusSquareNodeView.prototype.render = function (node, context) { + var style = node.style; + return (JSX.createElement("g", null, + JSX.createElement("rect", { "class-selected": node.selected, "class-mouseover": node.hoverFeedback, x: 0, y: 0, rx: "5", ry: "5", width: Math.max(0, node.bounds.width), height: Math.max(0, node.bounds.height), style: JSON.parse(style) }), + context.renderChildren(node))); + }; + return SiriusSquareNodeView; +}(lib_1.RectangularNodeView)); +exports.SiriusSquareNodeView = SiriusSquareNodeView; + + +/***/ }), +/* 304 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +/******************************************************************************* + * Copyright (c) 2018 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +var lib_1 = __webpack_require__(15); +var snabbdom = __webpack_require__(7); +var JSX = { createElement: snabbdom.svg }; +/** + * The view used to display an SVG border node. + * + * @hmarchadour + */ +var SiriusSvgBorderNodeView = /** @class */ (function (_super) { + __extends(SiriusSvgBorderNodeView, _super); + function SiriusSvgBorderNodeView() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Renders the given port in the context. + * @param port The port + * @param context The context + */ + SiriusSvgBorderNodeView.prototype.render = function (port, context) { + var url = port.url; + return (JSX.createElement("g", null, + JSX.createElement("image", { x: "0", y: "0", height: "10", width: "10", href: url }))); + }; + return SiriusSvgBorderNodeView; +}(lib_1.RectangularNodeView)); +exports.SiriusSvgBorderNodeView = SiriusSvgBorderNodeView; + + +/***/ }), +/* 305 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +/******************************************************************************* + * Copyright (c) 2018 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +var lib_1 = __webpack_require__(15); +var snabbdom = __webpack_require__(7); +var JSX = { createElement: snabbdom.svg }; +/** + * The view used to display nodes with an SVG image. + */ +var SiriusSVGNodeView = /** @class */ (function (_super) { + __extends(SiriusSVGNodeView, _super); + function SiriusSVGNodeView() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Renders the given node in the context. + * @param node The node + * @param context The context + */ + SiriusSVGNodeView.prototype.render = function (node, context) { + var svgData = node.svgData; + return (JSX.createElement("g", null, + JSX.createElement("image", { x: "0", y: "0", href: "data:image/svg+xml;utf," + svgData, width: 30, height: 30 }), + context.renderChildren(node))); + }; + return SiriusSVGNodeView; +}(lib_1.RectangularNodeView)); +exports.SiriusSVGNodeView = SiriusSVGNodeView; + + +/***/ }), +/* 306 */ +/***/ (function(module, exports) { + +/** + * This file automatically generated from `pre-publish.js`. + * Do not manually edit. + */ + +module.exports = { + "area": true, + "base": true, + "br": true, + "col": true, + "embed": true, + "hr": true, + "img": true, + "input": true, + "keygen": true, + "link": true, + "menuitem": true, + "meta": true, + "param": true, + "source": true, + "track": true, + "wbr": true +}; + + +/***/ }), +/* 307 */ +/***/ (function(module, exports) { + +module.exports = function() { + throw new Error("define cannot be used indirect"); +}; + + +/***/ }), +/* 308 */ +/***/ (function(module, exports) { + +/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */ +module.exports = __webpack_amd_options__; + +/* WEBPACK VAR INJECTION */}.call(exports, {})) + +/***/ }), +/* 309 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1,eval)("this"); +} catch(e) { + // This works if the window reference is available + if(typeof window === "object") + g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(151); +__webpack_require__(152); +__webpack_require__(153); +__webpack_require__(154); +module.exports = __webpack_require__(155); + + +/***/ }) +/******/ ]); +//# sourceMappingURL=bundle.js.map
\ No newline at end of file diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/bundle.js.map b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/bundle.js.map new file mode 100644 index 0000000000..eac4086a52 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/bundle.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap de617373a0fa5acf5972","webpack:///./~/inversify/lib/inversify.js","webpack:///./~/sprotty/lib/base/types.js","webpack:///./~/sprotty/lib/base/model/smodel.js","webpack:///./~/sprotty/lib/utils/geometry.js","webpack:///./~/core-js/modules/_wks.js","webpack:///./~/inversify/lib/constants/metadata_keys.js","webpack:///./~/core-js/modules/_global.js","webpack:///./~/snabbdom-jsx/snabbdom-jsx.js","webpack:///./~/sprotty/lib/base/commands/command.js","webpack:///./~/sprotty/lib/features/bounds/model.js","webpack:///./~/core-js/modules/_export.js","webpack:///./~/core-js/modules/_string-html.js","webpack:///./~/inversify/lib/constants/error_msgs.js","webpack:///./~/sprotty/lib/base/model/smodel-utils.js","webpack:///./~/core-js/modules/_is-object.js","webpack:///./~/sprotty/lib/index.js","webpack:///./~/inversify/lib/planning/metadata.js","webpack:///./~/sprotty/lib/base/model/smodel-factory.js","webpack:///./~/sprotty/lib/base/views/vnode-utils.js","webpack:///./~/core-js/modules/_an-object.js","webpack:///./~/core-js/modules/_core.js","webpack:///./~/inversify/lib/constants/literal_types.js","webpack:///./~/core-js/modules/_defined.js","webpack:///./~/core-js/modules/_descriptors.js","webpack:///./~/core-js/modules/_fails.js","webpack:///./~/core-js/modules/_has.js","webpack:///./~/core-js/modules/_hide.js","webpack:///./~/core-js/modules/_object-dp.js","webpack:///./~/core-js/modules/_redefine.js","webpack:///./~/inversify/lib/annotation/decorator_utils.js","webpack:///./~/sprotty/lib/base/views/mouse-tool.js","webpack:///./~/sprotty/lib/features/select/model.js","webpack:///./~/sprotty/lib/features/viewport/model.js","webpack:///./~/core-js/modules/_to-iobject.js","webpack:///./~/inversify/lib/utils/guid.js","webpack:///./~/sprotty/lib/base/views/key-tool.js","webpack:///./~/core-js/modules/_cof.js","webpack:///./~/core-js/modules/_ctx.js","webpack:///./~/sprotty/lib/base/actions/action-handler.js","webpack:///./~/sprotty/lib/base/animations/animation.js","webpack:///./~/sprotty/lib/features/export/svg-exporter.js","webpack:///./~/sprotty/lib/features/move/model.js","webpack:///./~/sprotty/lib/features/viewport/viewport.js","webpack:///./~/core-js/modules/_iterators.js","webpack:///./~/core-js/modules/_set-to-string-tag.js","webpack:///./~/core-js/modules/_to-length.js","webpack:///./~/core-js/modules/_uid.js","webpack:///./~/inversify/lib/utils/serialization.js","webpack:///./~/sprotty/lib/base/animations/animation-frame-syncer.js","webpack:///./~/sprotty/lib/base/features/set-model.js","webpack:///./~/sprotty/lib/features/bounds/bounds-manipulation.js","webpack:///./~/sprotty/lib/features/fade/model.js","webpack:///./~/sprotty/lib/features/hover/hover.js","webpack:///./~/sprotty/lib/utils/registry.js","webpack:///./~/core-js/modules/_a-function.js","webpack:///./~/core-js/modules/_fix-re-wks.js","webpack:///./~/core-js/modules/_library.js","webpack:///./~/core-js/modules/_object-keys.js","webpack:///./~/core-js/modules/_property-desc.js","webpack:///./~/core-js/modules/_to-integer.js","webpack:///./~/sprotty/lib/base/features/initialize-canvas.js","webpack:///./~/sprotty/lib/features/expand/expand.js","webpack:///./~/sprotty/lib/features/export/model.js","webpack:///./~/sprotty/lib/features/hover/model.js","webpack:///./~/sprotty/lib/features/move/move.js","webpack:///./~/sprotty/lib/utils/browser.js","webpack:///./~/core-js/modules/_an-instance.js","webpack:///./~/core-js/modules/_classof.js","webpack:///./~/core-js/modules/_dom-create.js","webpack:///./~/core-js/modules/_enum-bug-keys.js","webpack:///./~/core-js/modules/_fails-is-regexp.js","webpack:///./~/core-js/modules/_for-of.js","webpack:///./~/core-js/modules/_iter-define.js","webpack:///./~/core-js/modules/_meta.js","webpack:///./~/core-js/modules/_object-create.js","webpack:///./~/core-js/modules/_object-pie.js","webpack:///./~/core-js/modules/_redefine-all.js","webpack:///./~/core-js/modules/_shared-key.js","webpack:///./~/core-js/modules/_shared.js","webpack:///./~/core-js/modules/_string-context.js","webpack:///./~/core-js/modules/_to-primitive.js","webpack:///./~/core-js/modules/es6.object.to-string.js","webpack:///./~/core-js/modules/es6.string.iterator.js","webpack:///./~/inversify/lib/syntax/binding_on_syntax.js","webpack:///./~/inversify/lib/syntax/binding_when_syntax.js","webpack:///./~/sprotty/lib/base/actions/action-dispatcher.js","webpack:///./~/sprotty/lib/base/actions/action.js","webpack:///./~/sprotty/lib/base/model/smodel-storage.js","webpack:///./~/sprotty/lib/base/views/dom-helper.js","webpack:///./~/sprotty/lib/features/bounds/abstract-layout.js","webpack:///./~/sprotty/lib/features/bounds/layout.js","webpack:///./~/sprotty/lib/features/button/button-handler.js","webpack:///./~/sprotty/lib/features/button/model.js","webpack:///./~/sprotty/lib/features/expand/model.js","webpack:///./~/sprotty/lib/features/fade/fade.js","webpack:///./~/sprotty/lib/features/open/open.js","webpack:///./~/sprotty/lib/features/undo-redo/undo-redo.js","webpack:///./~/sprotty/lib/features/update/model-matching.js","webpack:///./~/sprotty/lib/features/update/update-model.js","webpack:///./~/sprotty/lib/features/viewport/center-fit.js","webpack:///./~/sprotty/lib/features/viewport/viewport-root.js","webpack:///./~/sprotty/lib/graph/sgraph.js","webpack:///./~/sprotty/lib/model-source/model-source.js","webpack:///./~/sprotty/lib/utils/logging.js","webpack:///./~/core-js/modules/_html.js","webpack:///./~/core-js/modules/_ie8-dom-define.js","webpack:///./~/core-js/modules/_is-regexp.js","webpack:///./~/core-js/modules/_iter-detect.js","webpack:///./~/core-js/modules/_iter-step.js","webpack:///./~/core-js/modules/_new-promise-capability.js","webpack:///./~/core-js/modules/_object-gopd.js","webpack:///./~/core-js/modules/_object-gopn.js","webpack:///./~/core-js/modules/_object-gops.js","webpack:///./~/core-js/modules/_object-keys-internal.js","webpack:///./~/core-js/modules/_set-species.js","webpack:///./~/core-js/modules/_string-at.js","webpack:///./~/core-js/modules/_task.js","webpack:///./~/core-js/modules/_to-absolute-index.js","webpack:///./~/core-js/modules/_validate-collection.js","webpack:///./~/core-js/modules/_wks-ext.js","webpack:///./~/core-js/modules/web.dom.iterable.js","webpack:///./~/file-saver/FileSaver.js","webpack:///./~/inversify/lib/annotation/inject.js","webpack:///./~/inversify/lib/planning/metadata_reader.js","webpack:///./~/inversify/lib/planning/target.js","webpack:///./~/inversify/lib/syntax/binding_when_on_syntax.js","webpack:///./~/inversify/lib/syntax/constraint_helpers.js","webpack:///./~/inversify/lib/utils/exceptions.js","webpack:///./~/snabbdom/vnode.js","webpack:///./~/sprotty/lib/base/animations/easing.js","webpack:///./~/sprotty/lib/base/commands/command-stack.js","webpack:///./~/sprotty/lib/base/views/thunk-view.js","webpack:///./~/sprotty/lib/base/views/view.js","webpack:///./~/sprotty/lib/base/views/viewer-cache.js","webpack:///./~/sprotty/lib/base/views/viewer.js","webpack:///./~/sprotty/lib/base/views/vnode-decorators.js","webpack:///./~/sprotty/lib/features/bounds/hbox-layout.js","webpack:///./~/sprotty/lib/features/bounds/stack-layout.js","webpack:///./~/sprotty/lib/features/bounds/vbox-layout.js","webpack:///./~/sprotty/lib/features/export/export.js","webpack:///./~/sprotty/lib/features/open/model.js","webpack:///./~/sprotty/lib/features/select/select.js","webpack:///./~/sprotty/lib/features/viewport/scroll.js","webpack:///./~/sprotty/lib/features/viewport/zoom.js","webpack:///./~/sprotty/lib/graph/views.js","webpack:///./~/sprotty/lib/model-source/diagram-server.js","webpack:///./~/sprotty/lib/model-source/diagram-state.js","webpack:///./~/sprotty/~/snabbdom/es/h.js","webpack:///./~/sprotty/~/snabbdom/es/is.js","webpack:///./~/sprotty/~/snabbdom/es/snabbdom.js","webpack:///./~/sprotty/~/snabbdom/es/vnode.js","webpack:///./~/core-js/es6/map.js","webpack:///./~/core-js/es6/promise.js","webpack:///./~/core-js/es6/string.js","webpack:///./~/core-js/es6/symbol.js","webpack:///./index.ts","webpack:///./~/core-js/modules/_add-to-unscopables.js","webpack:///./~/core-js/modules/_array-includes.js","webpack:///./~/core-js/modules/_collection-strong.js","webpack:///./~/core-js/modules/_collection.js","webpack:///./~/core-js/modules/_enum-keys.js","webpack:///./~/core-js/modules/_inherit-if-required.js","webpack:///./~/core-js/modules/_invoke.js","webpack:///./~/core-js/modules/_iobject.js","webpack:///./~/core-js/modules/_is-array-iter.js","webpack:///./~/core-js/modules/_is-array.js","webpack:///./~/core-js/modules/_iter-call.js","webpack:///./~/core-js/modules/_iter-create.js","webpack:///./~/core-js/modules/_microtask.js","webpack:///./~/core-js/modules/_object-dps.js","webpack:///./~/core-js/modules/_object-gopn-ext.js","webpack:///./~/core-js/modules/_object-gpo.js","webpack:///./~/core-js/modules/_perform.js","webpack:///./~/core-js/modules/_promise-resolve.js","webpack:///./~/core-js/modules/_set-proto.js","webpack:///./~/core-js/modules/_species-constructor.js","webpack:///./~/core-js/modules/_string-repeat.js","webpack:///./~/core-js/modules/_string-trim.js","webpack:///./~/core-js/modules/_string-ws.js","webpack:///./~/core-js/modules/_to-object.js","webpack:///./~/core-js/modules/_wks-define.js","webpack:///./~/core-js/modules/core.get-iterator-method.js","webpack:///./~/core-js/modules/es6.array.iterator.js","webpack:///./~/core-js/modules/es6.map.js","webpack:///./~/core-js/modules/es6.promise.js","webpack:///./~/core-js/modules/es6.regexp.match.js","webpack:///./~/core-js/modules/es6.regexp.replace.js","webpack:///./~/core-js/modules/es6.regexp.search.js","webpack:///./~/core-js/modules/es6.regexp.split.js","webpack:///./~/core-js/modules/es6.string.anchor.js","webpack:///./~/core-js/modules/es6.string.big.js","webpack:///./~/core-js/modules/es6.string.blink.js","webpack:///./~/core-js/modules/es6.string.bold.js","webpack:///./~/core-js/modules/es6.string.code-point-at.js","webpack:///./~/core-js/modules/es6.string.ends-with.js","webpack:///./~/core-js/modules/es6.string.fixed.js","webpack:///./~/core-js/modules/es6.string.fontcolor.js","webpack:///./~/core-js/modules/es6.string.fontsize.js","webpack:///./~/core-js/modules/es6.string.from-code-point.js","webpack:///./~/core-js/modules/es6.string.includes.js","webpack:///./~/core-js/modules/es6.string.italics.js","webpack:///./~/core-js/modules/es6.string.link.js","webpack:///./~/core-js/modules/es6.string.raw.js","webpack:///./~/core-js/modules/es6.string.repeat.js","webpack:///./~/core-js/modules/es6.string.small.js","webpack:///./~/core-js/modules/es6.string.starts-with.js","webpack:///./~/core-js/modules/es6.string.strike.js","webpack:///./~/core-js/modules/es6.string.sub.js","webpack:///./~/core-js/modules/es6.string.sup.js","webpack:///./~/core-js/modules/es6.string.trim.js","webpack:///./~/core-js/modules/es6.symbol.js","webpack:///./~/html-parse-stringify2/lib/parse-tag.js","webpack:///./~/html-parse-stringify2/lib/parse.js","webpack:///./~/inversify/lib/annotation/injectable.js","webpack:///./~/inversify/lib/annotation/multi_inject.js","webpack:///./~/inversify/lib/annotation/named.js","webpack:///./~/inversify/lib/annotation/optional.js","webpack:///./~/inversify/lib/annotation/post_construct.js","webpack:///./~/inversify/lib/annotation/tagged.js","webpack:///./~/inversify/lib/annotation/target_name.js","webpack:///./~/inversify/lib/annotation/unmanaged.js","webpack:///./~/inversify/lib/bindings/binding.js","webpack:///./~/inversify/lib/bindings/binding_count.js","webpack:///./~/inversify/lib/container/container.js","webpack:///./~/inversify/lib/container/container_module.js","webpack:///./~/inversify/lib/container/container_snapshot.js","webpack:///./~/inversify/lib/container/lookup.js","webpack:///./~/inversify/lib/planning/context.js","webpack:///./~/inversify/lib/planning/plan.js","webpack:///./~/inversify/lib/planning/planner.js","webpack:///./~/inversify/lib/planning/queryable_string.js","webpack:///./~/inversify/lib/planning/reflection_utils.js","webpack:///./~/inversify/lib/planning/request.js","webpack:///./~/inversify/lib/resolution/instantiation.js","webpack:///./~/inversify/lib/resolution/resolver.js","webpack:///./~/inversify/lib/syntax/binding_in_syntax.js","webpack:///./~/inversify/lib/syntax/binding_in_when_on_syntax.js","webpack:///./~/inversify/lib/syntax/binding_to_syntax.js","webpack:///./~/inversify/lib/utils/binding_utils.js","webpack:///./~/process/browser.js","webpack:///./~/reconnecting-websocket/dist/index.js","webpack:///./~/reflect-metadata/Reflect.js","webpack:///./~/snabbdom-virtualize/lib/strings.js","webpack:///./~/snabbdom-virtualize/lib/utils.js","webpack:///./~/snabbdom-virtualize/strings.js","webpack:///./~/snabbdom/h.js","webpack:///./~/snabbdom/is.js","webpack:///./~/sprotty/lib/base/commands/command-stack-options.js","webpack:///./~/sprotty/lib/base/di.config.js","webpack:///./~/sprotty/lib/base/views/id-decorator.js","webpack:///./~/sprotty/lib/base/views/viewer-options.js","webpack:///./~/sprotty/lib/features/bounds/di.config.js","webpack:///./~/sprotty/lib/features/bounds/hidden-bounds-updater.js","webpack:///./~/sprotty/lib/features/bounds/resize.js","webpack:///./~/sprotty/lib/features/button/di.config.js","webpack:///./~/sprotty/lib/features/expand/di.config.js","webpack:///./~/sprotty/lib/features/expand/views.js","webpack:///./~/sprotty/lib/features/export/di.config.js","webpack:///./~/sprotty/lib/features/fade/di.config.js","webpack:///./~/sprotty/lib/features/hover/di.config.js","webpack:///./~/sprotty/lib/features/hover/initializer.js","webpack:///./~/sprotty/lib/features/hover/popup-position-updater.js","webpack:///./~/sprotty/lib/features/move/di.config.js","webpack:///./~/sprotty/lib/features/open/di.config.js","webpack:///./~/sprotty/lib/features/select/di.config.js","webpack:///./~/sprotty/lib/features/undo-redo/di.config.js","webpack:///./~/sprotty/lib/features/viewport/di.config.js","webpack:///./~/sprotty/lib/graph/sgraph-factory.js","webpack:///./~/sprotty/lib/lib/generic-views.js","webpack:///./~/sprotty/lib/lib/html-views.js","webpack:///./~/sprotty/lib/lib/model.js","webpack:///./~/sprotty/lib/lib/svg-views.js","webpack:///./~/sprotty/lib/model-source/di.config.js","webpack:///./~/sprotty/lib/model-source/local-model-source.js","webpack:///./~/sprotty/lib/model-source/logging.js","webpack:///./~/sprotty/lib/model-source/websocket.js","webpack:///./~/sprotty/lib/utils/color.js","webpack:///./~/sprotty/~/snabbdom/es/htmldomapi.js","webpack:///./~/sprotty/~/snabbdom/es/thunk.js","webpack:///./~/sprotty/~/snabbdom/modules/attributes.js","webpack:///./~/sprotty/~/snabbdom/modules/class.js","webpack:///./~/sprotty/~/snabbdom/modules/eventlisteners.js","webpack:///./~/sprotty/~/snabbdom/modules/props.js","webpack:///./~/sprotty/~/snabbdom/modules/style.js","webpack:///./src/actions/execute-container-creation-tool-action.ts","webpack:///./src/actions/execute-node-creation-tool-action.ts","webpack:///./src/actions/execute-tool-action.ts","webpack:///./src/actions/request-layers-action.ts","webpack:///./src/actions/request-tools-action.ts","webpack:///./src/actions/set-layers-action.ts","webpack:///./src/actions/set-tools-action.ts","webpack:///./src/actions/toogle-layers-action.ts","webpack:///./src/app/standalone.ts","webpack:///./src/app/tools-utils.ts","webpack:///./src/di.config.ts","webpack:///./src/popup.ts","webpack:///./src/sirius-graph-factory.ts","webpack:///./src/sirius-websocket-diagram-server.ts","webpack:///./src/views/sirius-edge-view.tsx","webpack:///./src/views/sirius-free-form-flat-container-node-view.tsx","webpack:///./src/views/sirius-label-view.tsx","webpack:///./src/views/sirius-list-flat-container-node-view.tsx","webpack:///./src/views/sirius-square-border-node-view.tsx","webpack:///./src/views/sirius-square-node-view.tsx","webpack:///./src/views/sirius-svg-border-node-view.tsx","webpack:///./src/views/sirius-svg-node-view.tsx","webpack:///./~/void-elements/index.js","webpack:///(webpack)/buildin/amd-define.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///(webpack)/buildin/global.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;AChEA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;AC5CA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gBAAgB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gBAAgB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,0BAA0B,EAAE;AAChF;AACA;AACA;AACA,CAAC;AACD;AACA,kC;;;;;;;AC5MA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,WAAW,UAAU;AACrB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,oC;;;;;;AC5KA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;ACVA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA,yCAAyC;;;;;;;;ACLzC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb,uCAAuC,SAAS;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mDAAmD;AACnD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C,SAAS;AACnD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,uCAAuC,SAAS;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC1HA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,6CAA6C,EAAE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,mC;;;;;;;ACnJA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,iC;;;;;;AChIA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,uBAAuB;AACzG,iEAAiE;AACjE,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,eAAe;AACf,eAAe;AACf,eAAe;AACf,gBAAgB;AAChB;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;AClBA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnDA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,gBAAgB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,wC;;;;;;ACnHA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;ACtHA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,6DAA6D;AAC1F;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AClBA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,kCAAkC,EAAE;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,iDAAiD,EAAE;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD,0C;;;;;;;AC/FA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA,sCAAsC,6BAA6B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uC;;;;;;AC1EA;AACA;AACA;AACA;AACA;;;;;;;ACJA,6BAA6B;AAC7B,uCAAuC;;;;;;;;ACDvC;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxBA;AACA;AACA;AACA;AACA;;;;;;;ACJA;AACA;AACA,iCAAiC,QAAQ,mBAAmB,UAAU,EAAE,EAAE;AAC1E,CAAC;;;;;;;ACHD;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;;;;;ACNA,uBAAuB;AACvB;AACA;AACA;;;;;;;ACHA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;;;;;;ACPA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,YAAY;AACf;AACA;AACA;AACA;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;AACD;AACA,CAAC;;;;;;;;AC9BD;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,uCAAuC;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,qBAAqB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,+DAA+D,EAAE;AACvG,qCAAqC,oBAAoB,EAAE;AAC3D;AACA;AACA,iDAAiD,uBAAuB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,uEAAuE,0CAA0C,EAAE;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,wCAAwC,qBAAqB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,sC;;;;;;;ACnNA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;ACbA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,mBAAmB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,6DAA6D,EAAE;AACrG,qCAAqC,oBAAoB,EAAE;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,oC;;;;;;ACjFA,iBAAiB;;AAEjB;AACA;AACA;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnBA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,mDAAmD,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,0C;;;;;;;AC1DA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,2BAA2B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,oCAAoC,iBAAiB;AACrD,8BAA8B,2BAA2B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,gBAAgB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;AC7FA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,8BAA8B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,qDAAqD,qCAAqC,EAAE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,wC;;;;;;;AC/GA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;ACjBA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,oC;;;;;;AChGA;;;;;;;ACAA;AACA;AACA;;AAEA;AACA,oEAAoE,iCAAiC;AACrG;;;;;;;ACNA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;;;;;;;ACLA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,wBAAwB,EAAE;AACjF;AACA,4CAA4C,wBAAwB,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,mCAAmC,EAAE;AAC5E,0CAA0C,mCAAmC,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kD;;;;;;;ACzDA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;ACjGA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA,0CAA0C,uCAAuC,EAAE;AACnF;AACA;AACA;AACA,0CAA0C,uCAAuC,EAAE;AACnF;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA,+C;;;;;;;ACvHA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;ACbA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6EAA6E;AAC9H,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,iCAAiC;AAC3G;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,6EAA6E;AAC1H;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,iC;;;;;;;AChSA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,oC;;;;;;ACpHA;AACA;AACA;AACA;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,UAAU;AACvC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,gCAAgC,qCAAqC;AACrE;AACA;AACA,2BAA2B,gCAAgC;AAC3D;AACA;AACA;;;;;;;AC3BA;;;;;;;ACAA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,uCAAuC;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,6C;;;;;;;AClHA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,eAAe;AAC/C;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kC;;;;;;;AClEA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;ACbA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;AClBA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0DAA0D,EAAE;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,gC;;;;;;;AC3OA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mC;;;;;;ACnCA;AACA;AACA;AACA,GAAG;AACH;;;;;;;ACJA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB,EAAE;;AAE/C;AACA;AACA;AACA;AACA,GAAG,YAAY;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACNA;AACA;AACA;AACA;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK,YAAY;AACjB,GAAG;AACH;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,iBAAiB,EAAE;AAC1D;AACA;AACA;AACA;AACA;AACA,mEAAmE,gBAAgB;AACnF;AACA;AACA,GAAG,4CAA4C,gCAAgC;AAC/E;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;;AAEA,8BAA8B,aAAa;;AAE3C;AACA;AACA;AACA;AACA;AACA,yCAAyC,oCAAoC;AAC7E,6CAA6C,oCAAoC;AACjF,KAAK,4BAA4B,oCAAoC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA,kCAAkC,2BAA2B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD,CAAC;AACD;AACA,qBAAqB;AACrB;AACA,SAAS;AACT,GAAG,EAAE;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;ACxCA,cAAc;;;;;;;ACAd;AACA;AACA;AACA;AACA;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;ACJA;AACA;AACA,kDAAkD;AAClD;AACA,uCAAuC;AACvC;;;;;;;ACLA,sBAAsB;AACtB;AACA;;AAEA;AACA;AACA;AACA;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;ACTA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B,cAAc;AACd;AACA,CAAC;AACD;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA,UAAU;AACV,CAAC;;;;;;;;AChBD;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACbA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACjGA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,+BAA+B,EAAE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,8CAA8C,EAAE;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,wBAAwB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,6C;;;;;;;AC3GA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA,kC;;;;;;;ACZA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,0C;;;;;;;AChEA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,sC;;;;;;;AC7CA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,2BAA2B,EAAE;AACzF;AACA;AACA,CAAC;AACD;AACA,2C;;;;;;;ACxHA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kC;;;;;;;ACxHA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,oDAAoD,EAAE;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,0C;;;;;;;AChDA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,iC;;;;;;;ACjCA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;ACbA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,4BAA4B;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,gBAAgB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,gC;;;;;;;AC3EA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,gC;;;;;;;AC7CA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;ACrDA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gBAAgB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gBAAgB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,uBAAuB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0C;;;;;;;ACpGA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,uBAAuB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,uBAAuB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,gBAAgB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,gBAAgB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,wC;;;;;;;ACxRA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,+DAA+D,2DAA2D,EAAE;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,sC;;;;;;;ACpNA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;ACnEA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kC;;;;;;;ACnJA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,wC;;;;;;;AClEA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,uDAAuD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,kCAAkC,yBAAyB;AAC3D,qCAAqC,gBAAgB,eAAe;AACpE;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,mC;;;;;;ACrIA;AACA;;;;;;;ACDA;AACA,qEAAsE,mBAAmB,UAAU,EAAE,EAAE;AACvG,CAAC;;;;;;;ACFD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACPA;AACA;;AAEA;AACA;AACA,iCAAiC,qBAAqB;AACtD;AACA,iCAAiC,SAAS,EAAE;AAC5C,CAAC,YAAY;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,SAAS,qBAAqB;AAC3D,iCAAiC,aAAa;AAC9C;AACA,GAAG,YAAY;AACf;AACA;;;;;;;ACrBA;AACA,UAAU;AACV;;;;;;;;ACFA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG,YAAY;AACf;AACA;;;;;;;ACfA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;ACNA;;;;;;;ACAA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC,GAAG;AACH;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACNA;AACA;AACA;AACA;AACA;;;;;;;ACJA;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oDAAoD,wBAAwB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D,0DAA0D,gBAAgB;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,GAAG,yBAAyB;AAC7G;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;AACA;AACA,GAAG;AAAA;AACH;;;;;;;;AC3LA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACpBA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,gBAAgB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,yCAAyC,EAAE;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACzFA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AC5DA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;;;;;;;;ACvCA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,iC;;;;;;;ACTA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA,qBAAqB;AACrB;AACA;AACA,uCAAuC;AACvC;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,0DAA0D,mBAAmB,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,sCAAsC,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,EAAE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;AClWA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,6BAA6B,gDAAgD,EAAE;AAC/E;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,sC;;;;;;;ACpFA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,yCAAyC,8BAA8B;AACvE;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,8DAA8D;AACxG;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,gC;;;;;;;AC9EA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,wC;;;;;;;ACrFA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gCAAgC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,uCAAuC,EAAE;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,mCAAmC,EAAE;AAC3F;AACA;AACA,sDAAsD,+BAA+B,EAAE;AACvF;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,uCAAuC;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,2BAA2B;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,6BAA6B;AAC7E;AACA;AACA;AACA;AACA,gDAAgD,6BAA6B;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,4BAA4B;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,gDAAgD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kC;;;;;;;ACzOA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,4C;;;;;;;ACpCA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA,CAAC;AACD;AACA,uC;;;;;;;ACzFA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA,CAAC;AACD;AACA,wC;;;;;;;AC/EA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA,CAAC;AACD;AACA,uC;;;;;;;ACzFA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kC;;;;;;;ACvHA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;ACbA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,0BAA0B;AACvE,+CAA+C,4BAA4B;AAC3E;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,eAAe;AAC/C;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,gBAAgB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,0DAA0D,EAAE;AAChH,iDAAiD,mBAAmB,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,gCAAgC,EAAE,oBAAoB,aAAa,EAAE;AACxJ;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kC;;;;;;;AClSA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kC;;;;;;;AC7EA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,gC;;;;;;;AClDA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,8BAA8B;AACvE,oCAAoC,uBAAuB;AAC3D;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,sBAAsB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mCAAmC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA,0CAA0C,sCAAsC;AAChF;AACA;AACA;AACA;AACA;AACA,0CAA0C,sDAAsD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,+CAA+C,8BAA8B;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,+CAA+C,KAAK,GAAG;AACnG;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,iC;;;;;;;AChKA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,gBAAgB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,gBAAgB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,kBAAkB;AAClB;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,2CAA2C,mBAAmB,gBAAgB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,0C;;;;;;;AC/MA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,gCAAgC,EAAE;AACzF;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA;AACA;AACA,+CAA+C,gBAAgB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;;;;ACtCgB;AAChB;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6B;;;;;;;;;ACvDA;AACA;AACA;AACA;AACA,8B;;;;;;;;;;;;;;;;ACJA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C,mBAAmB,wBAAwB;AAC3C,qGAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,sBAAsB,aAAa;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY;AACI;AAChB;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yIAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oBAAoB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oBAAoB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,yBAAyB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,+BAA+B;AAClD;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA,oC;;;;;;;;AC/SA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,iC;;;;;;ACNA;AACA;AACA;AACA;AACA;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC1BA;AACA;AACA;;;;;;;;;;ACFA;;;;;;;;;iFASiF;AACjF,yBAA0B;AAC1B,4CAA+D;AAE/D,oCAAuB,EAAE,CAAC;;;;;;;ACb1B;AACA;AACA;AACA,6FAAwF;AACxF;AACA;AACA;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,YAAY,eAAe;AAChC;AACA,KAAK;AACL;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,6BAA6B;AAC7B,0BAA0B;AAC1B,0BAA0B;AAC1B,qBAAqB;AACrB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,8EAA8E,OAAO;AACrF;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC,qBAAqB;AACrB,0BAA0B;AAC1B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;;;;;;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO,mCAAmC,gCAAgC,aAAa;AACvF,8BAA8B,mCAAmC,aAAa;AAC9E;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,qDAAqD;AACrD;AACA,kDAAkD,iBAAiB,EAAE;AACrE;AACA,wDAAwD,aAAa,EAAE,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACLA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;ACPA;AACA;AACA;AACA;AACA;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;;AAEA;AACA,4FAAkF,aAAa,EAAE;;AAEjG;AACA,qDAAqD,4BAA4B;AACjF;AACA;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,uCAAuC,sBAAsB,EAAE;AAC/D;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;ACnEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACZA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;;;;;;AClBA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;ACZA;AACA;AACA,YAAY;AACZ,GAAG;AACH,YAAY;AACZ;AACA;;;;;;;ACNA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA,OAAO,YAAY,cAAc;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ,MAAM;AACd;AACA;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC7BA;AACA;;;;;;;ACDA;AACA;AACA;AACA;AACA;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,sBAAsB;AAChF,kFAAkF,wBAAwB;AAC1G;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,cAAc;AACd,iBAAiB;AACjB;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,mEAAmE;AAC5F,CAAC;AACD;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA,GAAG,YAAY;AACf,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,mBAAmB,kCAAkC;AACrD,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,uCAAuC;AACtD;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH,kBAAkB,yBAAyB,KAAK;AAChD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,wBAAwB;AACxB,gBAAgB;AAChB,oBAAoB;AACpB,wBAAwB;AACxB,gBAAgB;AAChB,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0DAA0D,oBAAoB;AAC9E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,CAAC;;;;;;;AChRD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;ACTD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;ACXD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;ACTD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,mFAAmF;AACnF;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;;ACtED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACND;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACND;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACND;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACND;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACRD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACnBD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACND;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACND;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;ACND;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;;;;;;;;ACtBD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACXD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACND;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;ACND;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;;;;;;;ACjBD;;AAEA;AACA;AACA;AACA,CAAC;;;;;;;;ACLD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACND;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACjBD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACND;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACND;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACND;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACND;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB;AACtB,sBAAsB,uBAAuB,WAAW,IAAI;AAC5D,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA,KAAK;AACL;AACA,sBAAsB,mCAAmC;AACzD,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,gCAAgC;AAChG;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,0DAA0D,kBAAkB;;AAE5E;AACA;AACA;AACA,oBAAoB,uBAAuB;;AAE3C,oDAAoD,6BAA6B;;AAEjF;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH,0BAA0B,eAAe,EAAE;AAC3C,0BAA0B,gBAAgB;AAC1C,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO,QAAQ,iCAAiC;AACpG,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzOA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qCAAqC;AACrC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;ACtGA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,aAAa;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACnCA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA,oDAAoD;AACpD;AACA,UAAU;AACV;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,gCAAgC,EAAE;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,qEAAqE,mBAAmB,EAAE;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,gBAAgB,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AC1PA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACVA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACbA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,0BAA0B,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,iCAAiC,EAAE;AAC3E,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;;;;;;;;AC9EA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AChBA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACTA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,0BAA0B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnJA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,qBAAqB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AC1BA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oBAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/HA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACvBA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mGAAmG,sDAAsD,EAAE;AAC3J;AACA;AACA,8FAA8F,iDAAiD,EAAE;AACjJ;AACA;AACA,+FAA+F,kDAAkD,EAAE;AACnJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjGA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACtBA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACvEA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,iDAAiD;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,uCAAuC,EAAE;AACzF;AACA;AACA,CAAC;AACD;;;;;;;;ACxEA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA,+CAA+C,6CAA6C,EAAE;AAC9F;AACA;AACA;;;;;;;ACZA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;ACvLtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAE;AACH;AACA;AACA,0BAA0B,kBAAkB,EAAE;AAC9C,+BAA+B,mBAAmB,EAAE;AACpD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oCAAoC,EAAE;AACtE,iCAAiC,mCAAmC,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,KAAK,gBAAgB;AACrB;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,KAAK,KAAK;AACV;AACA,4BAA4B,2BAA2B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,aAAa;AAC3C,gCAAgC,aAAa;AAC7C,mCAAmC;AACnC,gCAAgC,wIAAwI;AACxK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;;;;;;ACtNA;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,mDAAmD;AAC3G;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE,6BAA6B,gBAAgB,kBAAkB;AAC/D;AACA;AACA;AACA;AACA,+BAA+B,4CAA4C;AAC3E;AACA,mCAAmC,wBAAwB,kBAAkB,EAAE;AAC/E,mCAAmC,yBAAyB,EAAE,EAAE;AAChE;AACA,uCAAuC,8BAA8B;AACrE,uCAAuC,mBAAmB,EAAE;AAC5D;AACA,uCAAuC,qDAAqD;AAC5F,uCAAuC,iBAAiB,EAAE;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,2CAA2C;AAC3C,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,2CAA2C;AAC3C,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uGAAuG;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,2CAA2C;AAC3C,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,2CAA2C;AAC3C,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,2CAA2C;AAC3C,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,2CAA2C;AAC3C,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,2CAA2C;AAC3C,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,2CAA2C;AAC3C,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,2CAA2C;AAC3C,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,uBAAuB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,0BAA0B;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,aAAa;AAChF,qEAAqE,aAAa;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,0BAA0B,EAAE;AAClE;AACA;AACA,iBAAiB;AACjB,oDAAoD,+CAA+C;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,UAAU;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,0DAA0D;AAC5G,oDAAoD,4DAA4D;AAChH,qDAAqD,4DAA4D;AACjH,2DAA2D,uBAAuB;AAClF,6DAA6D,uBAAuB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,uBAAuB,EAAE;AAC/D;AACA;AACA,iBAAiB;AACjB,sDAAsD,6BAA6B;AACnF,sDAAsD,0CAA0C;AAChG,yDAAyD,gCAAgC;AACzF,mDAAmD,mBAAmB;AACtE,kDAAkD,yBAAyB;AAC3E,oDAAoD,2BAA2B;AAC/E,qDAAqD,4BAA4B;AACjF,2DAA2D,oBAAoB;AAC/E,6DAA6D,oBAAoB;AACjF;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,0BAA0B;AACtF;AACA;AACA;AACA;AACA,+BAA+B,UAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,0BAA0B;AAC3B,mC;;;;;;;;AC3mCA;;AAEA;AACA;AACA,CAAC;;AAED;AACA,0EAA0E;;;AAG1E;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB,8BAA8B;AACrD,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,sCAAsC,uCAAuC,gBAAgB;;AAE7F,2CAA2C,kBAAkB,kCAAkC,qEAAqE,EAAE,EAAE,OAAO,kBAAkB,EAAE,YAAY;;AAE/M;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA,C;;;;;;;ACzIA;;AAEA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,uCAAuC,gBAAgB;;AAE7F;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA,0CAA0C;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,C;;;;;;AC3CA;;;;;;;;ACAA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6B;;;;;;;AC1DA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,8B;;;;;;;ACPA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iD;;;;;;;ACjBA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA,qC;;;;;;;ACtIA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,wC;;;;;;;ACjDA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0C;;;;;;;ACjBA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;ACrBA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,iD;;;;;;;ACxIA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,CAAC;AACD;AACA,kC;;;;;;;ACpDA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;ACdA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;ACfA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,2BAA2B,KAAK,sBAAsB,eAAe,GAAG;AAC/G,uCAAuC,gDAAgD;AACvF,uCAAuC,UAAU;AACjD;AACA;AACA,CAAC;AACD;AACA,iC;;;;;;;AC3BA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;ACnBA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;ACfA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;AACD;AACA,qC;;;;;;;AC7BA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,6EAA6E;AACjI;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,uC;;;;;;;ACnDA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kD;;;;;;;ACvDA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;AClBA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;ACfA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;AClBA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;ACfA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;ACvBA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,0C;;;;;;;ACnFA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yC;;;;;;;ACrCA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,4CAA4C,gBAAgB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,sC;;;;;;;ACzBA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,iC;;;;;;;ACzFA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,uBAAuB;AAC3D;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,wIAAwI;AACjL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,uKAAuK;AAC9M;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,qC;;;;;;;AC7IA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL,CAAC;AACD;AACA,qC;;;;;;;ACzBA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,gBAAgB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,gBAAgB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,kBAAkB;AAClB;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,mBAAmB,gBAAgB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,8C;;;;;;;ACvRA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,4MAA4M,0BAA0B,EAAE;AACxO;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,mC;;;;;;;AC1GA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;ACjEA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,iC;;;;;;;AChCA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sC;;;;;;;;;AC/DY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA;AACA,KAAK;AACL;AACA;AACA,iC;;;;;;;AC5CA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,sC;;;;;;;ACtDA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,iC;;;;;;;ACxBA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0C;;;;;;;AC9FA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,iC;;;;;;;ACzBA;AACA,8CAA8C,cAAc;AAC5D;AACA,+BAA+B,kBAAkB,SAAS,EAAE,EAAE;AAC9D;AACA,2BAA2B,iBAAiB,EAAE;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;;ACzEA;;;;GAIG;AACH;IAsBE;;;OAGG;IACH,4CAAY,QAAgB;QAd5B;;WAEG;QACa,SAAI,GAAG,kCAAkC,CAAC,IAAI,CAAC;QAY7D,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IA1BD;;OAEG;IACoB,uCAAI,GAAG,8BAA8B,CAAC;IAE7D;;OAEG;IACoB,uCAAI,GAAG,kCAAkC,CAAC;IAoBnE,yCAAC;CAAA;AA9BY,gFAAkC;;;;;;;;;;ACL/C;;;;GAIG;AACH;IAsBE;;;OAGG;IACH,uCAAY,QAAgB;QAd5B;;WAEG;QACa,SAAI,GAAG,6BAA6B,CAAC,IAAI,CAAC;QAYxD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IA1BD;;OAEG;IACoB,kCAAI,GAAG,yBAAyB,CAAC;IAExD;;OAEG;IACoB,kCAAI,GAAG,6BAA6B,CAAC;IAoB9D,oCAAC;CAAA;AA9BY,sEAA6B;;;;;;;;;;ACL1C;;;;GAIG;AACH;IAsBE;;;OAGG;IACH,2BAAY,QAAgB;QAd5B;;WAEG;QACa,SAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC;QAY5C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IA1BD;;OAEG;IACoB,sBAAI,GAAG,aAAa,CAAC;IAE5C;;OAEG;IACoB,sBAAI,GAAG,qBAAqB,CAAC;IAoBtD,wBAAC;CAAA;AA9BY,8CAAiB;;;;;;;;;;ACL9B;;;;GAIG;AACH;IAAA;QAOE;;WAEG;QACa,SAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC;IAClD,CAAC;IATC;;OAEG;IACoB,wBAAI,GAAG,eAAe,CAAC;IAMhD,0BAAC;CAAA;AAXY,kDAAmB;;;;;;;;;;ACLhC;;;;GAIG;AACH;IAAA;QAOE;;WAEG;QACa,SAAI,GAAG,kBAAkB,CAAC,IAAI,CAAC;IACjD,CAAC;IATC;;OAEG;IACoB,uBAAI,GAAG,cAAc,CAAC;IAM/C,yBAAC;CAAA;AAXY,gDAAkB;;;;;;;;;;ACH/B;;;;GAIG;AACH;IAgBE;;;OAGG;IACH,yBAAY,MAAiB;QAd7B;;WAEG;QACa,SAAI,GAAG,eAAe,CAAC,IAAI,CAAC;QAY1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IArBD;;OAEG;IACoB,oBAAI,GAAG,WAAW,CAAC;IAmB5C,sBAAC;CAAA;AAvBY,0CAAe;;;;;;;;;;ACL5B;;;;GAIG;AACH;IAgBE;;;OAGG;IACH,wBAAY,KAAe;QAd3B;;WAEG;QACa,SAAI,GAAG,cAAc,CAAC,IAAI,CAAC;QAYzC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IArBD;;OAEG;IACoB,mBAAI,GAAG,UAAU,CAAC;IAmB3C,qBAAC;CAAA;AAvBY,wCAAc;;;;;;;;;;ACP3B;;;;GAIG;AACH;IAsBE;;;;OAIG;IACH,2BAAY,SAAiB,EAAE,QAAiB;QApBhD;;WAEG;QACa,SAAI,GAAW,iBAAiB,CAAC,IAAI,CAAC;QAkBpD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IA5BD;;OAEG;IACoB,sBAAI,GAAW,aAAa,CAAC;IA0BtD,wBAAC;CAAA;AA/BY,8CAAiB;;;;;;;;;;ACjB9B;;;;;;;;;iFASiF;AACjF,oCAAyI;AACzI,uDAAuE;AACvE,sDAAqE;AACrE,mDAA+D;AAC/D,kDAA6D;AAC7D,2CAA+C;AAG/C,6CAAqH;AAErH,mBAAO,CAAC,GAAwB,CAAC,CAAC;AAMlC,oBAAoB;AACpB;IAGE,gCAAY,aAAqC;QAC/C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED;;;OAGG;IACI,uCAAM,GAAb,UAAc,MAAuB;QACnC,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IAED;;;OAGG;IACK,sDAAqB,GAA7B,UAA8B,MAAuB;QACnD,6BAAe,CAAC,QAAQ,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAC3D,uCAAyB,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/D,CAAC;IACH,6BAAC;AAAD,CAAC;AAvBY,wDAAsB;AAwBnC,mBAAmB;AAEnB,oBAAoB;AACpB;IAIE,+BAAY,aAAqC;QAC/C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED;;;OAGG;IACH,sCAAM,GAAN,UAAO,MAAsB;QAC3B,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IAEC;;;KAGC;IACK,oDAAoB,GAA5B,UAA6B,MAAsB;QACjD,IAAM,KAAK,GAAgB,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAC,IAAU;YACxD,MAAM,CAAC,2BAAa,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;QACH,6BAAe,CAAC,QAAQ,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,CAAC;QAC1D,uCAAyB,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;IACvD,CAAC;IACH,4BAAC;AAAD,CAAC;AA3BY,sDAAqB;AA4BlC,mBAAmB;AAEnB;;;;GAIG;AACH;IACE,IAAM,SAAS,GAAG,IAAI,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,eAAe,CAAC,CAAC;IAClF,IAAM,SAAS,GAAG,2BAAe,CAAC,SAAS,CAAC,CAAC;IAE7C,IAAM,aAAa,GAAG,SAAS,CAAC,GAAG,CAA+B,WAAK,CAAC,WAAW,CAAC,CAAC;IACrF,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAEhC,IAAM,qBAAqB,GAAG,SAAS,CAAC,GAAG,CAAwB,WAAK,CAAC,qBAAqB,CAAC,CAAC;IAChG,qBAAqB,CAAC,QAAQ,CAAC,mCAAe,CAAC,IAAI,EAAE,IAAI,sBAAsB,CAAC,aAAa,CAAC,CAAC,CAAC;IAChG,qBAAqB,CAAC,QAAQ,CAAC,iCAAc,CAAC,IAAI,EAAE,IAAI,qBAAqB,CAAC,aAAa,CAAC,CAAC,CAAC;IAE9F,gCAAgC;IAChC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,eAAK;QACtC,IAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAM,UAAU,GAAG,IAAI,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACnD,IAAM,OAAO,GAAW,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACxD,IAAM,IAAI,GAAW,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAClD,IAAM,kBAAkB,GAAW,UAAU,CAAC,GAAG,CAAC,oBAAoB,CAAC,IAAI,EAAE,CAAC;QAE9E,aAAa,CAAC,QAAQ,GAAG,gBAAc,OAAO,gBAAW,IAAI,0BAAqB,kBAAkB,qBAAgB,IAAI,CAAC,MAAM,EAAI,CAAC;QACpI,aAAa,CAAC,MAAM,CAAC,IAAI,yCAAkB,EAAE,CAAC,CAAC;QAC/C,aAAa,CAAC,MAAM,CAAC,IAAI,2CAAmB,EAAE,CAAC,CAAC;QAChD,aAAa,CAAC,MAAM,CAAC,IAAI,wBAAkB,CAAC;YAC1C,OAAO;YACP,IAAI;YACJ,kBAAkB;SACnB,CAAC,CAAC,CAAC;IACN,CAAC,CAAC,CAAC;AACL,CAAC;AA5BD,0DA4BC;;;;;;;;;;AC1GD,wEAAuG;AACvG,mEAA6F;AAC7F,qDAAmE;AACnE,sDAAoE;AAKpE;;;;GAIG;AACH,uBAA8B,IAAU;IACtC,IAAI,SAAS,GAAG,KAAK,CAAC;IACtB,MAAM,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QACtB,KAAK,iEAA6B,CAAC,IAAI;YACrC,SAAS,GAAG,IAAI,CAAC;YACjB,KAAK,CAAC;QACR,KAAK,2EAAkC,CAAC,IAAI;YAC1C,SAAS,GAAG,IAAI,CAAC;YACjB,KAAK,CAAC;QACR,KAAK,uCAAiB,CAAC,IAAI;YACzB,SAAS,GAAG,IAAI,CAAC;YACjB,KAAK,CAAC;QACR;YACE,SAAS,GAAG,KAAK,CAAC;YAClB,KAAK,CAAC;IACV,CAAC;IACD,MAAM,CAAC,SAAS,CAAC;AACnB,CAAC;AAjBD,sCAiBC;AAED;;;;GAIG;AACH,0BAA0B,IAAU;IAClC,IAAI,MAAM,GAAkB,IAAI,CAAC;IACjC,MAAM,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QACtB,KAAK,iEAA6B,CAAC,IAAI;YACrC,MAAM,GAAG,IAAI,iEAA6B,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACpD,KAAK,CAAC;QACR,KAAK,2EAAkC,CAAC,IAAI;YAC1C,MAAM,GAAG,IAAI,2EAAkC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACzD,KAAK,CAAC;QACR,KAAK,uCAAiB,CAAC,IAAI;YACzB,MAAM,GAAG,IAAI,uCAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1C;YACE,KAAK,CAAC;IACV,CAAC;IACD,MAAM,CAAC,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,2BAA2B,KAAY,EAAE,QAAiB;IACxD,MAAM,CAAC,IAAI,wCAAiB,CAAC,KAAK,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;AACnD,CAAC;AAED;;;;GAIG;AACH,mCAA0C,aAAqC,EAAE,KAAkB;IACjG,IAAM,kBAAkB,GAAG,QAAQ,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;IACpE,EAAE,CAAC,CAAC,kBAAkB,KAAK,IAAI,CAAC,CAAC,CAAC;QAC9B,KAAK,CAAC,OAAO,CAAC,cAAI;YAChB,IAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YAChD,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YACtC,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YACrC,IAAM,SAAS,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC;YAEvC,IAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAE5C,wDAAwD;YACxD,IAAI,WAAW,GAAG,4BAA4B,CAAC;YAC/C,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;gBAChC,WAAW,GAAG,kBAAkB,CAAC;YACnC,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBACrC,WAAW,GAAG,gBAAgB,CAAC;YACjC,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;gBAC9C,WAAW,GAAG,oBAAoB,CAAC;YACrC,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;gBACvC,WAAW,GAAG,kBAAkB,CAAC;YACnC,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBACxC,WAAW,GAAG,iBAAiB,CAAC;YAClC,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;gBACvC,WAAW,GAAG,iBAAiB,CAAC;YAClC,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBACtC,WAAW,GAAG,gCAAgC,CAAC;YACjD,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBACrC,WAAW,GAAG,gBAAgB,CAAC;YACjC,CAAC;YAED,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;YACvC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAE1B,IAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YAC9C,KAAK,CAAC,WAAW,GAAG,SAAS,CAAC;YAC9B,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAE1B,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAC,KAAK;gBACrC,IAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;gBAC1C,EAAE,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC;oBACxB,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;gBACnC,CAAC;YACH,CAAC,CAAC,CAAC;YACH,kBAAkB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AA/CD,8DA+CC;AAED;;;;GAIG;AACH,mCAA0C,aAAqC,EAAE,MAAoB;IACnG,IAAM,mBAAmB,GAAG,QAAQ,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;IACtE,EAAE,CAAC,CAAC,mBAAmB,IAAI,IAAI,CAAC,CAAC,CAAC;QAChC,MAAM,CAAC,OAAO,CAAC,UAAC,KAAY;YAC1B,IAAM,OAAO,GAAG,WAAS,KAAK,CAAC,EAAI,CAAC;YACpC,IAAM,qBAAqB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAC5D,qBAAqB,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAErD,IAAM,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YAC1D,iBAAiB,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YAC/C,iBAAiB,CAAC,WAAW,GAAG,CAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,EAAE,OAAG,CAAC;YAC7D,qBAAqB,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;YAErD,IAAM,oBAAoB,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YAC7D,oBAAoB,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;YACtD,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACnB,oBAAoB,CAAC,YAAY,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;YAC1D,CAAC;YACD,oBAAoB,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YACjD,oBAAoB,CAAC,gBAAgB,CAAC,OAAO,EAAE,eAAK;gBAClD,IAAM,WAAW,GAAG,KAAK,CAAC,MAA0B,CAAC;gBACrD,IAAM,WAAW,GAAG,iBAAiB,CAAC,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;gBAClE,EAAE,CAAC,CAAC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC;oBACzB,aAAa,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;gBACpC,CAAC;YACH,CAAC,CAAC,CAAC;YACH,qBAAqB,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;YACxD,mBAAmB,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AA9BD,8DA8BC;AAED;;;GAGG;AACH,yBAAgC,OAA2B;IACzD,EAAE,CAAC,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC;QACrB,GAAG,CAAC,CAAC,IAAM,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;YACvD,IAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC1C,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;AACH,CAAC;AAPD,0CAOC;;;;;;;;;;AChLD;;;;;;;;;iFASiF;AACjF,yCAAuD;AAEvD,oCAmBqB;AAErB,kDAA0D;AAC1D,2EAAwG;AACxG,sEAA+F;AAC/F,gEAAoF;AACpF,6DAA8E;AAC9E,mDAA4D;AAC5D,yDAAuE;AACvE,sDAAiE;AAEjE,sDAA4D;AAE5D,uCAAkD;AAClD,iEAAiF;AAEjF,IAAM,qBAAqB,GAAG,IAAI,2BAAe,CAAC,UAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAC9E,MAAM,CAAC,WAAK,CAAC,OAAO,CAAC;SAClB,EAAE,CAAC,mBAAa,CAAC;SACjB,gBAAgB,EAAE,CAAC;IACtB,MAAM,CAAC,WAAK,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,cAAQ,CAAC,GAAG,CAAC,CAAC;IACrD,MAAM,CAAC,WAAK,CAAC,aAAa,CAAC;SACxB,EAAE,CAAC,yCAAkB,CAAC;SACtB,gBAAgB,EAAE,CAAC;IACtB,IAAI,CAAC,WAAK,CAAC,iBAAiB,CAAC,CAAC,eAAe,CAAC,+BAAuB,CAAC,CAAC;AACzE,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACU,uBAAe,GAAG,UAAC,WAAmB;IACjD,IAAM,SAAS,GAAG,IAAI,qBAAS,EAAE,CAAC;IAClC,SAAS,CAAC,IAAI,CACZ,mBAAa,EACb,kBAAY,EACZ,gBAAU,EACV,kBAAY,EACZ,oBAAc,EACd,oBAAc,EACd,iBAAW,EACX,kBAAY,EACZ,qBAAqB,CACtB,CAAC;IAEF,SAAS;SACN,IAAI,CAAC,WAAK,CAAC,WAAW,CAAC;SACvB,EAAE,CAAC,8DAA4B,CAAC;SAChC,gBAAgB,EAAE,CAAC;IAEtB,2BAAqB,CAAC,SAAS,EAAE;QAC/B,iBAAiB,EAAE,IAAI;QACvB,iBAAiB,EAAE,IAAI;QACvB,OAAO,EAAE,WAAW;QACpB,SAAS,EAAE,WAAW,GAAG,SAAS;KACnC,CAAC,CAAC;IAEH,IAAM,YAAY,GAAG,SAAS,CAAC,GAAG,CAAe,WAAK,CAAC,YAAY,CAAC,CAAC;IACrE,YAAY,CAAC,QAAQ,CAAC,OAAO,EAAE,gBAAU,CAAC,CAAC;IAE3C,YAAY,CAAC,QAAQ,CAAC,aAAa,EAAE,8CAAoB,CAAC,CAAC;IAC3D,YAAY,CAAC,QAAQ,CAAC,UAAU,EAAE,wCAAiB,CAAC,CAAC;IACrD,YAAY,CAAC,QAAQ,CAAC,aAAa,EAAE,2DAA0B,CAAC,CAAC;IACjE,YAAY,CAAC,QAAQ,CAAC,YAAY,EAAE,qDAAuB,CAAC,CAAC;IAC7D,YAAY,CAAC,QAAQ,CAAC,4BAA4B,EAAE,+EAAmC,CAAC,CAAC;IACzF,YAAY,CAAC,QAAQ,CAAC,wBAAwB,EAAE,sEAA+B,CAAC,CAAC;IACjF,YAAY,CAAC,QAAQ,CAAC,8BAA8B,EAAE,sBAAgB,CAAC,CAAC;IACxE,YAAY,CAAC,QAAQ,CAAC,6BAA6B,EAAE,sBAAgB,CAAC,CAAC;IAEvE,YAAY,CAAC,QAAQ,CAAC,eAAe,EAAE,iCAAc,CAAC,CAAC;IAEvD,YAAY,CAAC,QAAQ,CAAC,mBAAmB,EAAE,mCAAe,CAAC,CAAC;IAC5D,YAAY,CAAC,QAAQ,CAAC,qBAAqB,EAAE,mCAAe,CAAC,CAAC;IAC9D,YAAY,CAAC,QAAQ,CAAC,oBAAoB,EAAE,mCAAe,CAAC,CAAC;IAC7D,YAAY,CAAC,QAAQ,CAAC,oBAAoB,EAAE,mCAAe,CAAC,CAAC;IAC7D,YAAY,CAAC,QAAQ,CAAC,sBAAsB,EAAE,mCAAe,CAAC,CAAC;IAC/D,YAAY,CAAC,QAAQ,CAAC,qBAAqB,EAAE,mCAAe,CAAC,CAAC;IAE9D,YAAY,CAAC,QAAQ,CAAC,YAAY,EAAE,gBAAU,CAAC,CAAC;IAChD,YAAY,CAAC,QAAQ,CAAC,WAAW,EAAE,sBAAgB,CAAC,CAAC;IACrD,YAAY,CAAC,QAAQ,CAAC,MAAM,EAAE,kBAAY,CAAC,CAAC;IAC5C,YAAY,CAAC,QAAQ,CAAC,cAAc,EAAE,qBAAe,CAAC,CAAC;IAEvD,MAAM,CAAC,SAAS,CAAC;AACnB,CAAC,CAAC;;;;;;;;;;AClGF;;;;GAIG;AACU,+BAAuB,GAAG,UAAC,OAAgC,EAAE,OAA6B;IACrG,EAAE,CAAC,CAAC,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC;QACzD,MAAM,CAAC;YACL,IAAI,EAAE,MAAM;YACZ,EAAE,EAAE,OAAO;YACX,QAAQ,EAAE;gBACmB;oBACzB,IAAI,EAAE,cAAc;oBACpB,EAAE,EAAE,aAAa;oBACjB,IAAI,EAAE,uCAAkC,OAAO,CAAC,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,YAAQ;iBACvF;gBAC0B;oBACzB,IAAI,EAAE,cAAc;oBACpB,EAAE,EAAE,YAAY;oBAChB,IAAI,EAAE,2CAA2C;iBAClD;aACF;SACF,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,SAAS,CAAC;AACnB,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;AC1CF;;;;;;;;;iFASiF;AACjF,oCAYqB;AAErB;;;;GAIG;AACH;IAAwC,sCAAa;IAArD;;IA4CA,CAAC;IA3CC;;;;OAIG;IACI,0CAAa,GAApB,UAAqB,MAA2B,EAAE,MAAuB;QACvE;;iBAES;QACT,EAAE,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACrC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,wBAAkB,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QACxE,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,iBAAM,aAAa,YAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IAED;;;OAGG;IACI,uCAAU,GAAjB,UAAkB,MAAwB;QACxC,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAClC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,cAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;QACrD,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,iBAAM,UAAU,YAAC,MAAM,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IAED;;;OAGG;IACI,6CAAgB,GAAvB,UAAwB,MAAwB;QAC9C,MAAM,CAAC,kBAAY,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;IACzC,CAAC;IAED;;;OAGG;IACI,gDAAmB,GAA1B,UAA2B,MAA2B;QACpD,MAAM,CAAC,kBAAY,CAAC,MAAM,CAAC,KAAK,cAAc,CAAC;IACjD,CAAC;IACH,yBAAC;AAAD,CAAC,CA5CuC,mBAAa,GA4CpD;AA5CY,gDAAkB;;;;;;;;;;;;;;;;;;;;AC7B/B;;;;;;;;;iFASiF;AACjF,oCAAoF;AAGpF;;;;GAIG;AACH;IAAkD,gDAAsB;IAAxE;;IAqBA,CAAC;IAnBC;;;OAGG;IACI,iDAAU,GAAjB,UAAkB,QAA+B;QAC/C,iBAAM,UAAU,YAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,6CAAM,GAAb,UAAc,MAAc;QAC1B,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;YACpB;gBACE,iBAAM,MAAM,YAAC,MAAM,CAAC,CAAC;gBACvB,KAAK,CAAC;QACR,CAAC;IACH,CAAC;IACH,mCAAC;AAAD,CAAC,CArBiD,4BAAsB,GAqBvE;AArBY,oEAA4B;;;;;;;;;;;;;;;;;;;;AClBzC;;;;;;;;;iFASiF;AACjF,oCAOqB;AAGrB,sCAAyC;AAEzC,IAAM,GAAG,GAAG,EAAC,aAAa,EAAE,QAAQ,CAAC,GAAG,EAAC,CAAC;AAE1C;;;;GAIG;AACH;IAAoC,kCAAgB;IAApD;;IAwCA,CAAC;IAvCC;;;;;OAKG;IACO,mCAAU,GAApB,UAAqB,IAAW,EAAE,QAAiB,EAAE,OAAyB;QAC5E,IAAM,KAAK,GAAY,IAAa,CAAC,KAAK,CAAC;QAE3C,IAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC/B,IAAI,IAAI,GAAG,OAAK,UAAU,CAAC,CAAC,SAAI,UAAU,CAAC,CAAG,CAAC;QAC/C,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACzC,IAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YACtB,IAAI,IAAI,QAAM,CAAC,CAAC,CAAC,SAAI,CAAC,CAAC,CAAG,CAAC;QAC7B,CAAC;QACD,MAAM,CAAC,kDAA0B,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;IAC9E,CAAC;IAED;;;;;;OAMG;IACO,0CAAiB,GAA3B,UAA4B,IAAW,EAAE,QAAiB,EAAE,OAAyB;QACnF,IAAM,KAAK,GAAY,IAAY,CAAC,KAAK,CAAC;QAC1C,IAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACtC,WAAW,CAAC,IAAI,GAAG,WAAW,CAAC,MAAM,CAAC;QAEtC,IAAM,EAAE,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACzC,IAAM,EAAE,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACzC,MAAM,CAAC;YACL,0CAAkB,IAAI,iBACH,IAAI,EAAE,CAAC,EAAC,sBAAsB,EAC3C,SAAS,EAAE,YAAU,eAAS,CAAC,WAAK,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,SAAI,EAAE,CAAC,CAAC,SAAI,EAAE,CAAC,CAAC,oBAAe,EAAE,CAAC,CAAC,SAAI,EAAE,CAAC,CAAC,MAAG,EAC3F,KAAK,EAAE,WAAW,GAAI;SAC7B,CAAC;IACJ,CAAC;IACH,qBAAC;AAAD,CAAC,CAxCmC,sBAAgB,GAwCnD;AAxCY,wCAAc;;;;;;;;;;;;;;;;;;;;AC7B3B;;;;;;;;;iFASiF;AACjF,oCAIqB;AAGrB,sCAAyC;AAEzC,IAAM,GAAG,GAAG,EAAC,aAAa,EAAE,QAAQ,CAAC,GAAG,EAAC,CAAC;AAE1C;;;;GAIG;AACH;IAAyD,uDAAmB;IAA5E;;IAsBA,CAAC;IArBC;;;;OAIG;IACI,oDAAM,GAAb,UAAc,IAAW,EAAE,OAAyB;QAClD,IAAM,KAAK,GAAY,IAAa,CAAC,KAAK,CAAC;QAE3C,MAAM,CAAC,CACL;YACE,8CAAsB,IAAI,CAAC,QAAQ,qBACZ,IAAI,CAAC,aAAa,EACnC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EACV,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EACb,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EACrC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EACvC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAI;YACjC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAC3B,CACL,CAAC;IACJ,CAAC;IACH,0CAAC;AAAD,CAAC,CAtBwD,yBAAmB,GAsB3E;AAtBY,kFAAmC;;;;;;;;;;;;;;;;;;;;AC1BhD;;;;;;;;;iFASiF;AACjF,oCAMqB;AAGrB,sCAAyC;AAEzC,IAAM,GAAG,GAAG,EAAC,aAAa,EAAE,QAAQ,CAAC,GAAG,EAAC,CAAC;AAE1C;;;;GAIG;AACH;IAAqC,mCAAU;IAA/C;;IAiBA,CAAC;IAhBC;;;;OAIG;IACI,gCAAM,GAAb,UAAc,KAAa,EAAE,OAAyB;QACpD,IAAM,KAAK,GAAY,KAAa,CAAC,KAAK,CAAC;QAC3C,IAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAEtC,IAAM,KAAK,GAAG,mDAA2B,IAAI,EAAE,KAAK,EAAE,WAAW,IAAG,KAAK,CAAC,IAAI,CAAQ,CAAC;QACvF,IAAM,OAAO,GAAG,gBAAU,CAAC,KAAK,CAAC,CAAC;QAClC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACZ,aAAO,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QACnC,CAAC;QACD,MAAM,CAAC,KAAK,CAAC;IACf,CAAC;IACH,sBAAC;AAAD,CAAC,CAjBoC,gBAAU,GAiB9C;AAjBY,0CAAe;;;;;;;;;;;;;;;;;;;;AC5B5B;;;;;;;;;iFASiF;AACjF,oCAIqB;AAGrB,sCAAyC;AAEzC,IAAM,GAAG,GAAG,EAAC,aAAa,EAAE,QAAQ,CAAC,GAAG,EAAC,CAAC;AAE1C;;;;GAIG;AACH;IAAqD,mDAAmB;IAAxE;;IAsBA,CAAC;IArBC;;;;OAIG;IACI,gDAAM,GAAb,UAAc,IAAW,EAAE,OAAyB;QAClD,IAAM,KAAK,GAAY,IAAa,CAAC,KAAK,CAAC;QAE3C,MAAM,CAAC,CACL;YACE,8CAAsB,IAAI,CAAC,QAAQ,qBACZ,IAAI,CAAC,aAAa,EACnC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EACV,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EACb,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EACrC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EACvC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAI;YACjC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAC3B,CACL,CAAC;IACJ,CAAC;IACH,sCAAC;AAAD,CAAC,CAtBoD,yBAAmB,GAsBvE;AAtBY,0EAA+B;;;;;;;;;;;;;;;;;;;;AC1B5C;;;;;;;;;iFASiF;AACjF,oCAIqB;AAGrB,sCAAyC;AAEzC,IAAM,GAAG,GAAG,EAAC,aAAa,EAAE,QAAQ,CAAC,GAAG,EAAC,CAAC;AAE1C;;;;GAIG;AACH;IAAgD,8CAAmB;IAAnE;;IAqBA,CAAC;IApBC;;;;OAIG;IACI,2CAAM,GAAb,UAAc,IAAW,EAAE,OAAyB;QAClD,IAAM,KAAK,GAAY,IAAa,CAAC,KAAK,CAAC;QAC3C,MAAM,CAAC,CACL;YACE,8CACsB,IAAI,CAAC,QAAQ,qBACZ,IAAI,CAAC,aAAa,EACnC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAG,CAAC,EACX,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EACrC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EACvC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAI;YACjC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAC3B,CACL,CAAC;IACJ,CAAC;IACH,iCAAC;AAAD,CAAC,CArB+C,yBAAmB,GAqBlE;AArBY,gEAA0B;;;;;;;;;;;;;;;;;;;;AC1BvC;;;;;;;;;iFASiF;AACjF,oCAIqB;AAGrB,sCAAyC;AAEzC,IAAM,GAAG,GAAG,EAAC,aAAa,EAAE,QAAQ,CAAC,GAAG,EAAC,CAAC;AAE1C;;;;GAIG;AACH;IAA0C,wCAAmB;IAA7D;;IAsBA,CAAC;IArBC;;;;OAIG;IACI,qCAAM,GAAb,UAAc,IAAW,EAAE,OAAyB;QAClD,IAAM,KAAK,GAAY,IAAa,CAAC,KAAK,CAAC;QAE3C,MAAM,CAAC,CACL;YACE,8CAAsB,IAAI,CAAC,QAAQ,qBACZ,IAAI,CAAC,aAAa,EACnC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EACV,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EACb,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EACrC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EACvC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAI;YACjC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAC3B,CACL,CAAC;IACJ,CAAC;IACH,2BAAC;AAAD,CAAC,CAtByC,yBAAmB,GAsB5D;AAtBY,oDAAoB;;;;;;;;;;;;;;;;;;;;AC1BjC;;;;;;;;;iFASiF;AACjF,oCAIqB;AAGrB,sCAAyC;AAEzC,IAAM,GAAG,GAAG,EAAC,aAAa,EAAE,QAAQ,CAAC,GAAG,EAAC,CAAC;AAE1C;;;;GAIG;AACH;IAA6C,2CAAmB;IAAhE;;IAcA,CAAC;IAbC;;;;OAIG;IACI,wCAAM,GAAb,UAAc,IAAW,EAAE,OAAyB;QAClD,IAAM,GAAG,GAAI,IAAY,CAAC,GAAG,CAAC;QAC9B,MAAM,CAAC,CACL;YACE,6BAAO,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,EAAC,IAAI,EAAC,IAAI,EAAE,GAAG,GAAG,CACpD,CACL,CAAC;IACJ,CAAC;IACH,8BAAC;AAAD,CAAC,CAd4C,yBAAmB,GAc/D;AAdY,0DAAuB;;;;;;;;;;;;;;;;;;;;AC1BpC;;;;;;;;;iFASiF;AACjF,oCAIqB;AAGrB,sCAAyC;AAEzC,IAAM,GAAG,GAAG,EAAC,aAAa,EAAE,QAAQ,CAAC,GAAG,EAAC,CAAC;AAE1C;;GAEG;AACH;IAAuC,qCAAmB;IAA1D;;IAeA,CAAC;IAdC;;;;OAIG;IACI,kCAAM,GAAb,UAAc,IAAW,EAAE,OAAyB;QAClD,IAAM,OAAO,GAAI,IAAY,CAAC,OAAO,CAAC;QACtC,MAAM,CAAC,CACL;YACE,6BAAO,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAE,4BAA0B,OAAS,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,GAAU;YAC5F,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAC3B,CACL,CAAC;IACJ,CAAC;IACH,wBAAC;AAAD,CAAC,CAfsC,yBAAmB,GAezD;AAfY,8CAAiB;;;;;;;ACxB9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtBA;AACA;AACA;;;;;;;ACFA;AACA;;;;;;;;ACDA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C","file":"bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 310);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap de617373a0fa5acf5972","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar keys = require(\"./constants/metadata_keys\");\nexports.METADATA_KEY = keys;\nvar container_1 = require(\"./container/container\");\nexports.Container = container_1.Container;\nvar literal_types_1 = require(\"./constants/literal_types\");\nexports.BindingScopeEnum = literal_types_1.BindingScopeEnum;\nexports.BindingTypeEnum = literal_types_1.BindingTypeEnum;\nexports.TargetTypeEnum = literal_types_1.TargetTypeEnum;\nvar container_module_1 = require(\"./container/container_module\");\nexports.ContainerModule = container_module_1.ContainerModule;\nvar injectable_1 = require(\"./annotation/injectable\");\nexports.injectable = injectable_1.injectable;\nvar tagged_1 = require(\"./annotation/tagged\");\nexports.tagged = tagged_1.tagged;\nvar named_1 = require(\"./annotation/named\");\nexports.named = named_1.named;\nvar inject_1 = require(\"./annotation/inject\");\nexports.inject = inject_1.inject;\nexports.LazyServiceIdentifer = inject_1.LazyServiceIdentifer;\nvar optional_1 = require(\"./annotation/optional\");\nexports.optional = optional_1.optional;\nvar unmanaged_1 = require(\"./annotation/unmanaged\");\nexports.unmanaged = unmanaged_1.unmanaged;\nvar multi_inject_1 = require(\"./annotation/multi_inject\");\nexports.multiInject = multi_inject_1.multiInject;\nvar target_name_1 = require(\"./annotation/target_name\");\nexports.targetName = target_name_1.targetName;\nvar post_construct_1 = require(\"./annotation/post_construct\");\nexports.postConstruct = post_construct_1.postConstruct;\nvar metadata_reader_1 = require(\"./planning/metadata_reader\");\nexports.MetadataReader = metadata_reader_1.MetadataReader;\nvar guid_1 = require(\"./utils/guid\");\nexports.guid = guid_1.guid;\nvar decorator_utils_1 = require(\"./annotation/decorator_utils\");\nexports.decorate = decorator_utils_1.decorate;\nvar constraint_helpers_1 = require(\"./syntax/constraint_helpers\");\nexports.traverseAncerstors = constraint_helpers_1.traverseAncerstors;\nexports.taggedConstraint = constraint_helpers_1.taggedConstraint;\nexports.namedConstraint = constraint_helpers_1.namedConstraint;\nexports.typeConstraint = constraint_helpers_1.typeConstraint;\nvar serialization_1 = require(\"./utils/serialization\");\nexports.getServiceIdentifierAsString = serialization_1.getServiceIdentifierAsString;\nvar binding_utils_1 = require(\"./utils/binding_utils\");\nexports.multiBindToService = binding_utils_1.multiBindToService;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/inversify.js\n// module id = 0\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TYPES = {\n IActionDispatcher: Symbol('IActionDispatcher'),\n IActionDispatcherProvider: Symbol('IActionDispatcherProvider'),\n IActionHandlerInitializer: Symbol('IActionHandlerInitializer'),\n ActionHandlerRegistry: Symbol('ActionHandlerRegistry'),\n AnimationFrameSyncer: Symbol('AnimationFrameSyncer'),\n CommandStackOptions: Symbol('CommandStackOptions'),\n IButtonHandler: Symbol('IButtonHandler'),\n ICommand: Symbol('ICommand'),\n ICommandStack: Symbol('ICommandStack'),\n ICommandStackProvider: Symbol('ICommandStackProvider'),\n DOMHelper: Symbol('DOMHelper'),\n HiddenVNodeDecorator: Symbol('HiddenVNodeDecorator'),\n HoverState: Symbol('HoverState'),\n KeyListener: Symbol('KeyListener'),\n Layouter: Symbol('Layouter'),\n LayoutRegistry: Symbol('LayoutRegistry'),\n ILogger: Symbol('ILogger'),\n LogLevel: Symbol('LogLevel'),\n IModelFactory: Symbol('IModelFactory'),\n ModelRendererFactory: Symbol('ModelRendererFactory'),\n ModelSource: Symbol('ModelSource'),\n ModelSourceProvider: Symbol('ModelSourceProvider'),\n MouseListener: Symbol('MouseListener'),\n PopupModelFactory: Symbol('PopupModelFactory'),\n PopupMouseListener: Symbol('PopupMouseListener'),\n PopupVNodeDecorator: Symbol('PopupVNodeDecorator'),\n SModelStorage: Symbol('SModelStorage'),\n StateAwareModelProvider: Symbol('StateAwareModelProvider'),\n SvgExporter: Symbol('SvgExporter'),\n IViewer: Symbol('IViewer'),\n ViewerOptions: Symbol('ViewerOptions'),\n IViewerProvider: Symbol('IViewerProvider'),\n ViewRegistry: Symbol('ViewRegistry'),\n IVNodeDecorator: Symbol('IVNodeDecorator')\n};\n//# sourceMappingURL=types.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/types.js\n// module id = 1\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar geometry_1 = require(\"../../utils/geometry\");\n/**\n * Base class for all elements of the diagram model.\n * Each model element must have a unique ID and a type that is used to look up its view.\n */\nvar SModelElement = /** @class */ (function () {\n function SModelElement() {\n }\n Object.defineProperty(SModelElement.prototype, \"root\", {\n get: function () {\n var current = this;\n while (current) {\n if (current instanceof SModelRoot)\n return current;\n else if (current instanceof SChildElement)\n current = current.parent;\n else\n current = undefined;\n }\n throw new Error(\"Element has no root\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SModelElement.prototype, \"index\", {\n get: function () {\n return this.root.index;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * A feature is a symbol identifying some functionality that can be enabled or disabled for\n * a model element. The base implementation always returns false, so it disables all features.\n */\n SModelElement.prototype.hasFeature = function (feature) {\n return false;\n };\n return SModelElement;\n}());\nexports.SModelElement = SModelElement;\n/**\n * A parent element may contain child elements, thus the diagram model forms a tree.\n */\nvar SParentElement = /** @class */ (function (_super) {\n __extends(SParentElement, _super);\n function SParentElement() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.children = [];\n return _this;\n }\n SParentElement.prototype.add = function (child, i) {\n if (i === undefined) {\n this.children.push(child);\n }\n else {\n if (i < 0 || i > this.children.length) {\n throw \"Child index out of bounds \" + i + \" (0..\" + this.children.length + \")\";\n }\n this.children.splice(i, 0, child);\n }\n child.parent = this;\n this.index.add(child);\n };\n SParentElement.prototype.remove = function (child) {\n var i = this.children.indexOf(child);\n if (i < 0) {\n throw \"No such child \" + child;\n }\n this.children.splice(i, 1);\n delete child.parent;\n this.index.remove(child);\n };\n SParentElement.prototype.move = function (child, newIndex) {\n var i = this.children.indexOf(child);\n if (i === -1) {\n throw \"No such child \" + child;\n }\n else {\n if (newIndex < 0 || newIndex > this.children.length - 1) {\n throw \"Child index out of bounds \" + i + \" (0..\" + this.children.length + \")\";\n }\n this.children.splice(i, 1);\n this.children.splice(newIndex, 0, child);\n }\n };\n /**\n * Transform the given bounds from the local coordinate system of this element to the coordinate\n * system of its parent. This function should consider any transformation that is applied to the\n * view of this element and its contents.\n * The base implementation assumes that this element does not define a local coordinate system,\n * so it leaves the bounds unchanged.\n */\n SParentElement.prototype.localToParent = function (point) {\n return geometry_1.isBounds(point) ? point : { x: point.x, y: point.y, width: -1, height: -1 };\n };\n /**\n * Transform the given bounds from the coordinate system of this element's parent to its local\n * coordinate system. This function should consider any transformation that is applied to the\n * view of this element and its contents.\n * The base implementation assumes that this element does not define a local coordinate system,\n * so it leaves the bounds unchanged.\n */\n SParentElement.prototype.parentToLocal = function (point) {\n return geometry_1.isBounds(point) ? point : { x: point.x, y: point.y, width: -1, height: -1 };\n };\n return SParentElement;\n}(SModelElement));\nexports.SParentElement = SParentElement;\n/**\n * A child element is contained in a parent element. All elements except the model root are child\n * elements. In order to keep the model class hierarchy simple, every child element is also a\n * parent element, although for many elements the array of children is empty (i.e. they are\n * leafs in the model element tree).\n */\nvar SChildElement = /** @class */ (function (_super) {\n __extends(SChildElement, _super);\n function SChildElement() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return SChildElement;\n}(SParentElement));\nexports.SChildElement = SChildElement;\n/**\n * Base class for the root element of the diagram model tree.\n */\nvar SModelRoot = /** @class */ (function (_super) {\n __extends(SModelRoot, _super);\n function SModelRoot() {\n var _this = _super.call(this) || this;\n _this.canvasBounds = geometry_1.EMPTY_BOUNDS;\n // Override the index property from SModelElement, which has a getter, with a data property\n Object.defineProperty(_this, 'index', {\n value: new SModelIndex(),\n writable: false\n });\n return _this;\n }\n return SModelRoot;\n}(SParentElement));\nexports.SModelRoot = SModelRoot;\n/**\n * Used to speed up model element lookup by id.\n */\nvar SModelIndex = /** @class */ (function () {\n function SModelIndex() {\n this.id2element = new Map;\n }\n SModelIndex.prototype.add = function (element) {\n if (this.contains(element)) {\n throw new Error(\"Duplicate ID in model: \" + element.id);\n }\n this.id2element.set(element.id, element);\n if (element.children !== undefined && element.children.constructor === Array) {\n for (var _i = 0, _a = element.children; _i < _a.length; _i++) {\n var child = _a[_i];\n this.add(child);\n }\n }\n };\n SModelIndex.prototype.remove = function (element) {\n this.id2element.delete(element.id);\n if (element.children !== undefined && element.children.constructor === Array) {\n for (var _i = 0, _a = element.children; _i < _a.length; _i++) {\n var child = _a[_i];\n this.remove(child);\n }\n }\n };\n SModelIndex.prototype.contains = function (element) {\n return this.id2element.get(element.id) !== undefined;\n };\n SModelIndex.prototype.removeById = function (elementId) {\n this.id2element.delete(elementId);\n };\n SModelIndex.prototype.getById = function (id) {\n return this.id2element.get(id);\n };\n SModelIndex.prototype.all = function () {\n var all = [];\n this.id2element.forEach(function (element) { return all.push(element); });\n return all;\n };\n return SModelIndex;\n}());\nexports.SModelIndex = SModelIndex;\n//# sourceMappingURL=smodel.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/model/smodel.js\n// module id = 2\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * (x,y) coordinates of the origin.\n */\nexports.ORIGIN_POINT = Object.freeze({\n x: 0,\n y: 0\n});\n/**\n * A dimension with both width and height set to a negative value, which is considered as undefined.\n */\nexports.EMPTY_DIMENSION = Object.freeze({\n width: -1,\n height: -1\n});\n/**\n * Checks whether the given dimention is valid, i.e. the width and height are non-zero.\n * @param {Dimension} b - Dimension object\n * @returns {boolean}\n */\nfunction isValidDimension(d) {\n return d.width >= 0 && d.height >= 0;\n}\nexports.isValidDimension = isValidDimension;\nexports.EMPTY_BOUNDS = Object.freeze({\n x: 0,\n y: 0,\n width: -1,\n height: -1\n});\nfunction isBounds(element) {\n return 'x' in element\n && 'y' in element\n && 'width' in element\n && 'height' in element;\n}\nexports.isBounds = isBounds;\n/**\n * Combines the bounds of two objects into one, so that the new bounds\n * are the minimum bounds that covers both of the original bounds.\n * @param {Bounds} b0 - First bounds object\n * @param {Bounds} b1 - Second bounds object\n * @returns {Bounds} The combined bounds\n */\nfunction combine(b0, b1) {\n var minX = Math.min(b0.x, b1.x);\n var minY = Math.min(b0.y, b1.y);\n var maxX = Math.max(b0.x + (b0.width >= 0 ? b0.width : 0), b1.x + (b1.width >= 0 ? b1.width : 0));\n var maxY = Math.max(b0.y + (b0.height >= 0 ? b0.height : 0), b1.y + (b1.height >= 0 ? b1.height : 0));\n return {\n x: minX, y: minY, width: maxX - minX, height: maxY - minY\n };\n}\nexports.combine = combine;\n/**\n * Translates the given bounds.\n * @param {Bounds} b - Bounds object\n * @param {Point} p - Vector by which to translate the bounds\n * @returns {Bounds} The translated bounds\n */\nfunction translate(b, p) {\n return {\n x: b.x + p.x,\n y: b.y + p.y,\n width: b.width,\n height: b.height\n };\n}\nexports.translate = translate;\n/**\n * Returns the center point of the bounds of an object\n * @param {Bounds} b - Bounds object\n * @returns {Point} the center point\n */\nfunction center(b) {\n return {\n x: b.x + (b.width >= 0 ? 0.5 * b.width : 0),\n y: b.y + (b.height >= 0 ? 0.5 * b.height : 0)\n };\n}\nexports.center = center;\n/**\n * Checks whether the point p is included in the bounds b.\n */\nfunction includes(b, p) {\n return p.x >= b.x && p.x <= b.x + b.width && p.y >= b.y && p.y <= b.y + b.height;\n}\nexports.includes = includes;\n/**\n * Enumeration of possible directions (left, right, up, down)\n */\nvar Direction;\n(function (Direction) {\n Direction[Direction[\"left\"] = 0] = \"left\";\n Direction[Direction[\"right\"] = 1] = \"right\";\n Direction[Direction[\"up\"] = 2] = \"up\";\n Direction[Direction[\"down\"] = 3] = \"down\";\n})(Direction = exports.Direction || (exports.Direction = {}));\n/**\n * Returns the \"straight line\" distance between two points\n * @param {Point} a - First point\n * @param {Point} b - Second point\n * @returns {number} The eucledian distance\n */\nfunction euclideanDistance(a, b) {\n var dx = b.x - a.x;\n var dy = b.y - a.y;\n return Math.sqrt(dx * dx + dy * dy);\n}\nexports.euclideanDistance = euclideanDistance;\n/**\n * Returns the distance between two points in a grid, using a\n * strictly vertical and/or horizontal path (versus straight line)\n * @param {Point} a - First point\n * @param {Point} b - Second point\n * @returns {number} The manhattan distance\n */\nfunction manhattanDistance(a, b) {\n return Math.abs(b.x - a.x) + Math.abs(b.y - a.y);\n}\nexports.manhattanDistance = manhattanDistance;\n/**\n * Returns the distance between two points in a grid, using a\n * strictly vertical and/or horizontal path (versus straight line)\n * @param {Point} a - First point\n * @param {Point} b - Second point\n * @returns {number} The manhattan distance\n */\nfunction maxDistance(a, b) {\n return Math.max(Math.abs(b.x - a.x), Math.abs(b.y - a.y));\n}\nexports.maxDistance = maxDistance;\n// range (-PI, PI]\nfunction angle(a, b) {\n return Math.atan2(b.y - a.y, b.x - a.x);\n}\nexports.angle = angle;\n/**\n * Converts from radians to degrees\n * @param {number} a - A value in radians\n * @returns {number} The converted value\n */\nfunction toDegrees(a) {\n return a * 180 / Math.PI;\n}\nexports.toDegrees = toDegrees;\n/**\n * Converts from degrees to radians\n * @param {number} a - A value in degrees\n * @returns {number} The converted value\n */\nfunction toRadians(a) {\n return a * Math.PI / 180;\n}\nexports.toRadians = toRadians;\n/**\n * Returns whether two numbers are almost equal, within a small margin (0.001)\n * @param {number} a - First number\n * @param {number} b - Second number\n * @returns {boolean} True if the two numbers are almost equal\n */\nfunction almostEquals(a, b) {\n return Math.abs(a - b) < 1e-3;\n}\nexports.almostEquals = almostEquals;\n//# sourceMappingURL=geometry.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/utils/geometry.js\n// module id = 3\n// module chunks = 0","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_wks.js\n// module id = 4\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NAMED_TAG = \"named\";\nexports.NAME_TAG = \"name\";\nexports.UNMANAGED_TAG = \"unmanaged\";\nexports.OPTIONAL_TAG = \"optional\";\nexports.INJECT_TAG = \"inject\";\nexports.MULTI_INJECT_TAG = \"multi_inject\";\nexports.TAGGED = \"inversify:tagged\";\nexports.TAGGED_PROP = \"inversify:tagged_props\";\nexports.PARAM_TYPES = \"inversify:paramtypes\";\nexports.DESIGN_PARAM_TYPES = \"design:paramtypes\";\nexports.POST_CONSTRUCT = \"post_construct\";\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/constants/metadata_keys.js\n// module id = 5\n// module chunks = 0","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_global.js\n// module id = 6\n// module chunks = 0","\"use strict\";\r\n\r\nvar SVGNS = 'http://www.w3.org/2000/svg';\r\nvar modulesNS = ['hook', 'on', 'style', 'class', 'props', 'attrs', 'dataset'];\r\nvar slice = Array.prototype.slice;\r\n\r\nfunction isPrimitive(val) {\r\n return typeof val === 'string' ||\r\n typeof val === 'number' ||\r\n typeof val === 'boolean' ||\r\n typeof val === 'symbol' ||\r\n val === null ||\r\n val === undefined;\r\n}\r\n\r\nfunction normalizeAttrs(attrs, nsURI, defNS, modules) {\r\n var map = { ns: nsURI };\r\n for (var i = 0, len = modules.length; i < len; i++) {\r\n var mod = modules[i];\r\n if(attrs[mod])\r\n map[mod] = attrs[mod];\r\n }\r\n for(var key in attrs) {\r\n if(key !== 'key' && key !== 'classNames' && key !== 'selector') {\r\n var idx = key.indexOf('-');\r\n if(idx > 0)\r\n addAttr(key.slice(0, idx), key.slice(idx+1), attrs[key]);\r\n else if(!map[key])\r\n addAttr(defNS, key, attrs[key]);\r\n }\r\n }\r\n return map;\r\n\r\n function addAttr(namespace, key, val) {\r\n var ns = map[namespace] || (map[namespace] = {});\r\n ns[key] = val;\r\n }\r\n}\r\n\r\nfunction buildFromStringTag(nsURI, defNS, modules, tag, attrs, children) {\r\n\r\n if(attrs.selector) {\r\n tag = tag + attrs.selector;\r\n }\r\n if(attrs.classNames) {\r\n var cns = attrs.classNames;\r\n tag = tag + '.' + (\r\n Array.isArray(cns) ? cns.join('.') : cns.replace(/\\s+/g, '.')\r\n );\r\n }\r\n\r\n return {\r\n sel : tag,\r\n data : normalizeAttrs(attrs, nsURI, defNS, modules),\r\n children : children.map( function(c) {\r\n return isPrimitive(c) ? {text: c} : c;\r\n }),\r\n key: attrs.key\r\n };\r\n}\r\n\r\nfunction buildFromComponent(nsURI, defNS, modules, tag, attrs, children) {\r\n var res;\r\n if(typeof tag === 'function')\r\n res = tag(attrs, children);\r\n else if(tag && typeof tag.view === 'function')\r\n res = tag.view(attrs, children);\r\n else if(tag && typeof tag.render === 'function')\r\n res = tag.render(attrs, children);\r\n else\r\n throw \"JSX tag must be either a string, a function or an object with 'view' or 'render' methods\";\r\n res.key = attrs.key;\r\n return res;\r\n}\r\n\r\nfunction flatten(nested, start, flat) {\r\n for (var i = start, len = nested.length; i < len; i++) {\r\n var item = nested[i];\r\n if (Array.isArray(item)) {\r\n flatten(item, 0, flat);\r\n } else {\r\n flat.push(item);\r\n }\r\n }\r\n}\r\n\r\nfunction maybeFlatten(array) {\r\n if (array) {\r\n for (var i = 0, len = array.length; i < len; i++) {\r\n if (Array.isArray(array[i])) {\r\n var flat = array.slice(0, i);\r\n flatten(array, i, flat);\r\n array = flat;\r\n break;\r\n }\r\n }\r\n }\r\n return array;\r\n}\r\n\r\nfunction buildVnode(nsURI, defNS, modules, tag, attrs, children) {\r\n attrs = attrs || {};\r\n children = maybeFlatten(children);\r\n if(typeof tag === 'string') {\r\n return buildFromStringTag(nsURI, defNS, modules, tag, attrs, children)\r\n } else {\r\n return buildFromComponent(nsURI, defNS, modules, tag, attrs, children)\r\n }\r\n}\r\n\r\nfunction JSX(nsURI, defNS, modules) {\r\n return function jsxWithCustomNS(tag, attrs, children) {\r\n if(arguments.length > 3 || !Array.isArray(children))\r\n children = slice.call(arguments, 2);\r\n return buildVnode(nsURI, defNS || 'props', modules || modulesNS, tag, attrs, children);\r\n };\r\n}\r\n\r\nmodule.exports = {\r\n html: JSX(undefined),\r\n svg: JSX(SVGNS, 'attrs'),\r\n JSX: JSX\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/snabbdom-jsx/snabbdom-jsx.js\n// module id = 7\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../types\");\n/**\n * Base class for all commands.\n */\nvar Command = /** @class */ (function () {\n function Command() {\n }\n return Command;\n}());\nexports.Command = Command;\n/**\n * A mergeable command can accumulate subsequent commands of the same kind.\n *\n * For example, multiple subsequent move commands can be merged to yield a\n * single command, such that undo will roll them back altogether. Otherwise\n * the user would have to push CTRL-Z for each mouse move element that\n * resuted in a command.\n */\nvar MergeableCommand = /** @class */ (function (_super) {\n __extends(MergeableCommand, _super);\n function MergeableCommand() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Tries to merge the given command with this.\n *\n * @param command\n * @param context\n */\n MergeableCommand.prototype.merge = function (command, context) {\n return false;\n };\n return MergeableCommand;\n}(Command));\nexports.MergeableCommand = MergeableCommand;\n/**\n * A hidden command is used to trigger the rendering of a model on a\n * hidden canvas.\n *\n * Some graphical elements are styled using CSS, others have bounds that\n * require to layout their children before being computed. In such cases\n * we cannot tell about the size of elements without acutally rendering\n * the DOM. We render them to an invisible canvas. This can be achieved\n * using hidden commands.\n *\n * Hidden commands do not change the model directly, and are as such\n * neither undoable nor redoable. The command stack does not push them on\n * any stack and forwards the resulting model to the invisible viewer.\n */\nvar HiddenCommand = /** @class */ (function (_super) {\n __extends(HiddenCommand, _super);\n function HiddenCommand() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n HiddenCommand.prototype.undo = function (context) {\n context.logger.error(this, 'Cannot undo a hidden command');\n return context.root;\n };\n HiddenCommand.prototype.redo = function (context) {\n context.logger.error(this, 'Cannot redo a hidden command');\n return context.root;\n };\n return HiddenCommand;\n}(Command));\nexports.HiddenCommand = HiddenCommand;\nvar PopupCommand = /** @class */ (function (_super) {\n __extends(PopupCommand, _super);\n function PopupCommand() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return PopupCommand;\n}(Command));\nexports.PopupCommand = PopupCommand;\n/**\n * A system command is triggered by the system, e.g. in order to update bounds\n * in the model with data fetched from the DOM.\n *\n * As it is automatically triggered it should not count as a single command in\n * undo/redo operations. Into the bargain, such an automatic command could occur\n * after an undo and as such make the next redo command invalid because it is\n * based on a model state that has changed. The command stack handles system\n * commands in a special way to overcome these issues.\n */\nvar SystemCommand = /** @class */ (function (_super) {\n __extends(SystemCommand, _super);\n function SystemCommand() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return SystemCommand;\n}(Command));\nexports.SystemCommand = SystemCommand;\nvar CommandActionHandler = /** @class */ (function () {\n function CommandActionHandler(commandType) {\n this.commandType = commandType;\n }\n CommandActionHandler.prototype.handle = function (action) {\n return new this.commandType(action);\n };\n return CommandActionHandler;\n}());\nexports.CommandActionHandler = CommandActionHandler;\nvar CommandActionHandlerInitializer = /** @class */ (function () {\n function CommandActionHandlerInitializer(commandCtrs) {\n this.commandCtrs = commandCtrs;\n }\n CommandActionHandlerInitializer.prototype.initialize = function (registry) {\n this.commandCtrs.forEach(function (commandCtr) { return registry.registerCommand(commandCtr); });\n };\n CommandActionHandlerInitializer = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.multiInject(types_1.TYPES.ICommand)), __param(0, inversify_1.optional()),\n __metadata(\"design:paramtypes\", [Array])\n ], CommandActionHandlerInitializer);\n return CommandActionHandlerInitializer;\n}());\nexports.CommandActionHandlerInitializer = CommandActionHandlerInitializer;\n//# sourceMappingURL=command.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/commands/command.js\n// module id = 8\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar geometry_1 = require(\"../../utils/geometry\");\nvar smodel_1 = require(\"../../base/model/smodel\");\nvar smodel_utils_1 = require(\"../../base/model/smodel-utils\");\nexports.boundsFeature = Symbol('boundsFeature');\nexports.layoutContainerFeature = Symbol('layoutContainerFeature');\nexports.layoutableChildFeature = Symbol('layoutableChildFeature');\nexports.alignFeature = Symbol('alignFeature');\nfunction isBoundsAware(element) {\n return 'bounds' in element;\n}\nexports.isBoundsAware = isBoundsAware;\nfunction isLayoutContainer(element) {\n return 'layout' in element\n && isBoundsAware(element)\n && element.hasFeature(exports.layoutContainerFeature);\n}\nexports.isLayoutContainer = isLayoutContainer;\nfunction isLayoutableChild(element) {\n return isBoundsAware(element)\n && element.hasFeature(exports.layoutableChildFeature);\n}\nexports.isLayoutableChild = isLayoutableChild;\nfunction isSizeable(element) {\n return element.hasFeature(exports.boundsFeature) && isBoundsAware(element);\n}\nexports.isSizeable = isSizeable;\nfunction isAlignable(element) {\n return 'alignment' in element\n && element.hasFeature(exports.alignFeature);\n}\nexports.isAlignable = isAlignable;\nfunction getAbsoluteBounds(element) {\n var boundsAware = smodel_utils_1.findParentByFeature(element, isBoundsAware);\n if (boundsAware !== undefined) {\n var bounds = boundsAware.bounds;\n var current = boundsAware;\n while (current instanceof smodel_1.SChildElement) {\n var parent_1 = current.parent;\n bounds = parent_1.localToParent(bounds);\n current = parent_1;\n }\n return bounds;\n }\n else {\n return geometry_1.EMPTY_BOUNDS;\n }\n}\nexports.getAbsoluteBounds = getAbsoluteBounds;\n/**\n * Abstract class for elements with a position and a size.\n */\nvar SShapeElement = /** @class */ (function (_super) {\n __extends(SShapeElement, _super);\n function SShapeElement() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.position = geometry_1.ORIGIN_POINT;\n _this.size = geometry_1.EMPTY_DIMENSION;\n return _this;\n }\n Object.defineProperty(SShapeElement.prototype, \"bounds\", {\n get: function () {\n return {\n x: this.position.x,\n y: this.position.y,\n width: this.size.width,\n height: this.size.height\n };\n },\n set: function (newBounds) {\n this.position = {\n x: newBounds.x,\n y: newBounds.y\n };\n this.size = {\n width: newBounds.width,\n height: newBounds.height\n };\n },\n enumerable: true,\n configurable: true\n });\n SShapeElement.prototype.localToParent = function (point) {\n var result = {\n x: point.x + this.position.x,\n y: point.y + this.position.y,\n width: -1,\n height: -1\n };\n if (geometry_1.isBounds(point)) {\n result.width = point.width;\n result.height = point.height;\n }\n return result;\n };\n SShapeElement.prototype.parentToLocal = function (point) {\n var result = {\n x: point.x - this.position.x,\n y: point.y - this.position.y,\n width: -1,\n height: -1\n };\n if (geometry_1.isBounds(point)) {\n result.width = point.width;\n result.height = point.height;\n }\n return result;\n };\n return SShapeElement;\n}(smodel_1.SChildElement));\nexports.SShapeElement = SShapeElement;\n//# sourceMappingURL=model.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/bounds/model.js\n// module id = 9\n// module chunks = 0","var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_export.js\n// module id = 10\n// module chunks = 0","var $export = require('./_export');\nvar fails = require('./_fails');\nvar defined = require('./_defined');\nvar quot = /\"/g;\n// B.2.3.2.1 CreateHTML(string, tag, attribute, value)\nvar createHTML = function (string, tag, attribute, value) {\n var S = String(defined(string));\n var p1 = '<' + tag;\n if (attribute !== '') p1 += ' ' + attribute + '=\"' + String(value).replace(quot, '"') + '\"';\n return p1 + '>' + S + '</' + tag + '>';\n};\nmodule.exports = function (NAME, exec) {\n var O = {};\n O[NAME] = exec(createHTML);\n $export($export.P + $export.F * fails(function () {\n var test = ''[NAME]('\"');\n return test !== test.toLowerCase() || test.split('\"').length > 3;\n }), 'String', O);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_string-html.js\n// module id = 11\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DUPLICATED_INJECTABLE_DECORATOR = \"Cannot apply @injectable decorator multiple times.\";\nexports.DUPLICATED_METADATA = \"Metadata key was used more than once in a parameter:\";\nexports.NULL_ARGUMENT = \"NULL argument\";\nexports.KEY_NOT_FOUND = \"Key Not Found\";\nexports.AMBIGUOUS_MATCH = \"Ambiguous match found for serviceIdentifier:\";\nexports.CANNOT_UNBIND = \"Could not unbind serviceIdentifier:\";\nexports.NOT_REGISTERED = \"No matching bindings found for serviceIdentifier:\";\nexports.MISSING_INJECTABLE_ANNOTATION = \"Missing required @injectable annotation in:\";\nexports.MISSING_INJECT_ANNOTATION = \"Missing required @inject or @multiInject annotation in:\";\nexports.UNDEFINED_INJECT_ANNOTATION = function (name) {\n return \"@inject called with undefined this could mean that the class \" + name + \" has \" +\n \"a circular dependency problem. You can use a LazyServiceIdentifer to \" +\n \"overcome this limitation.\";\n};\nexports.CIRCULAR_DEPENDENCY = \"Circular dependency found:\";\nexports.NOT_IMPLEMENTED = \"Sorry, this feature is not fully implemented yet.\";\nexports.INVALID_BINDING_TYPE = \"Invalid binding type:\";\nexports.NO_MORE_SNAPSHOTS_AVAILABLE = \"No snapshot available to restore.\";\nexports.INVALID_MIDDLEWARE_RETURN = \"Invalid return type in middleware. Middleware must return!\";\nexports.INVALID_FUNCTION_BINDING = \"Value provided to function binding must be a function!\";\nexports.INVALID_TO_SELF_VALUE = \"The toSelf function can only be applied when a constructor is \" +\n \"used as service identifier\";\nexports.INVALID_DECORATOR_OPERATION = \"The @inject @multiInject @tagged and @named decorators \" +\n \"must be applied to the parameters of a class constructor or a class property.\";\nexports.ARGUMENTS_LENGTH_MISMATCH_1 = \"The number of constructor arguments in the derived class \";\nexports.ARGUMENTS_LENGTH_MISMATCH_2 = \" must be >= than the number of constructor arguments of its base class.\";\nexports.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT = \"Invalid Container constructor argument. Container options \" +\n \"must be an object.\";\nexports.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE = \"Invalid Container option. Default scope must \" +\n \"be a string ('singleton' or 'transient').\";\nexports.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE = \"Invalid Container option. Auto bind injectable must \" +\n \"be a boolean\";\nexports.MULTIPLE_POST_CONSTRUCT_METHODS = \"Cannot apply @postConstruct decorator multiple times in the same class\";\nexports.POST_CONSTRUCT_ERROR = function () {\n var values = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n values[_i] = arguments[_i];\n }\n return \"@postConstruct error in class \" + values[0] + \": \" + values[1];\n};\nexports.CIRCULAR_DEPENDENCY_IN_FACTORY = function () {\n var values = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n values[_i] = arguments[_i];\n }\n return \"It looks like there is a circular dependency \" +\n (\"in one of the '\" + values[0] + \"' bindings. Please investigate bindings with\") +\n (\"service identifier '\" + values[1] + \"'.\");\n};\nexports.STACK_OVERFLOW = \"Maximum call stack size exceeded\";\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/constants/error_msgs.js\n// module id = 12\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar smodel_1 = require(\"./smodel\");\n/**\n * Model element types can include a colon to separate the basic type and a sub-type. This function\n * extracts the basic type of a model element.\n */\nfunction getBasicType(schema) {\n if (!schema.type)\n return '';\n var colonIndex = schema.type.indexOf(':');\n if (colonIndex >= 0)\n return schema.type.substring(0, colonIndex);\n else\n return schema.type;\n}\nexports.getBasicType = getBasicType;\n/**\n * Model element types can include a colon to separate the basic type and a sub-type. This function\n * extracts the sub-type of a model element.\n */\nfunction getSubType(schema) {\n if (!schema.type)\n return '';\n var colonIndex = schema.type.indexOf(':');\n if (colonIndex >= 0)\n return schema.type.substring(colonIndex + 1);\n else\n return schema.type;\n}\nexports.getSubType = getSubType;\n/**\n * Find the element with the given identifier. If you need to find multiple elements, using an\n * SModelIndex might be more effective.\n */\nfunction findElement(parent, elementId) {\n if (parent.id === elementId)\n return parent;\n if (parent.children !== undefined) {\n for (var _i = 0, _a = parent.children; _i < _a.length; _i++) {\n var child = _a[_i];\n var result = findElement(child, elementId);\n if (result !== undefined)\n return result;\n }\n }\n return undefined;\n}\nexports.findElement = findElement;\n/**\n * Find a parent element that satisfies the given predicate.\n */\nfunction findParent(element, predicate) {\n var current = element;\n while (current !== undefined) {\n if (predicate(current))\n return current;\n else if (current instanceof smodel_1.SChildElement)\n current = current.parent;\n else\n current = undefined;\n }\n return current;\n}\nexports.findParent = findParent;\n/**\n * Find a parent element that implements the feature identified with the given predicate.\n */\nfunction findParentByFeature(element, predicate) {\n var current = element;\n while (current !== undefined) {\n if (predicate(current))\n return current;\n else if (current instanceof smodel_1.SChildElement)\n current = current.parent;\n else\n current = undefined;\n }\n return current;\n}\nexports.findParentByFeature = findParentByFeature;\n/**\n * Translate a point from the coordinate system of the source element to the coordinate system\n * of the target element.\n */\nfunction translatePoint(point, source, target) {\n if (source !== target) {\n // Translate from the source to the root element\n while (source instanceof smodel_1.SChildElement) {\n point = source.localToParent(point);\n source = source.parent;\n if (source === target)\n return point;\n }\n // Translate from the root to the target element\n var targetTrace = [];\n while (target instanceof smodel_1.SChildElement) {\n targetTrace.push(target);\n target = target.parent;\n }\n if (source !== target)\n throw new Error(\"Incompatible source and target: \" + source.id + \", \" + target.id);\n for (var i = targetTrace.length - 1; i >= 0; i--) {\n point = targetTrace[i].parentToLocal(point);\n }\n }\n return point;\n}\nexports.translatePoint = translatePoint;\n//# sourceMappingURL=smodel-utils.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/model/smodel-utils.js\n// module id = 13\n// module chunks = 0","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_is-object.js\n// module id = 14\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// ------------------ Base ------------------\n__export(require(\"./base/actions/action\"));\n__export(require(\"./base/actions/action-dispatcher\"));\n__export(require(\"./base/actions/action-handler\"));\n__export(require(\"./base/animations/animation-frame-syncer\"));\n__export(require(\"./base/animations/animation\"));\n__export(require(\"./base/animations/easing\"));\n__export(require(\"./base/commands/command-stack-options\"));\n__export(require(\"./base/commands/command-stack\"));\n__export(require(\"./base/commands/command\"));\n__export(require(\"./base/features/initialize-canvas\"));\n__export(require(\"./base/features/set-model\"));\n__export(require(\"./base/model/smodel-factory\"));\n__export(require(\"./base/model/smodel-storage\"));\n__export(require(\"./base/model/smodel-utils\"));\n__export(require(\"./base/model/smodel\"));\n__export(require(\"./base/views/key-tool\"));\n__export(require(\"./base/views/mouse-tool\"));\n__export(require(\"./base/views/thunk-view\"));\n__export(require(\"./base/views/view\"));\n__export(require(\"./base/views/viewer-cache\"));\n__export(require(\"./base/views/viewer-options\"));\n__export(require(\"./base/views/viewer\"));\n__export(require(\"./base/views/vnode-decorators\"));\n__export(require(\"./base/views/vnode-utils\"));\n__export(require(\"./base/types\"));\nvar di_config_1 = require(\"./base/di.config\");\nexports.defaultModule = di_config_1.default;\n// ------------------ Features ------------------\n__export(require(\"./features/bounds/bounds-manipulation\"));\n__export(require(\"./features/bounds/layout\"));\n__export(require(\"./features/bounds/model\"));\n__export(require(\"./features/bounds/vbox-layout\"));\n__export(require(\"./features/bounds/hbox-layout\"));\n__export(require(\"./features/bounds/stack-layout\"));\n__export(require(\"./features/button/button-handler\"));\n__export(require(\"./features/button/model\"));\n__export(require(\"./features/expand/expand\"));\n__export(require(\"./features/expand/model\"));\n__export(require(\"./features/expand/views\"));\n__export(require(\"./features/export/export\"));\n__export(require(\"./features/export/model\"));\n__export(require(\"./features/export/svg-exporter\"));\n__export(require(\"./features/fade/fade\"));\n__export(require(\"./features/fade/model\"));\n__export(require(\"./features/hover/hover\"));\n__export(require(\"./features/hover/model\"));\n__export(require(\"./features/move/model\"));\n__export(require(\"./features/move/move\"));\n__export(require(\"./features/open/open\"));\n__export(require(\"./features/open/model\"));\n__export(require(\"./features/select/model\"));\n__export(require(\"./features/select/select\"));\n__export(require(\"./features/undo-redo/undo-redo\"));\n__export(require(\"./features/update/model-matching\"));\n__export(require(\"./features/update/update-model\"));\n__export(require(\"./features/viewport/center-fit\"));\n__export(require(\"./features/viewport/model\"));\n__export(require(\"./features/viewport/scroll\"));\n__export(require(\"./features/viewport/viewport-root\"));\n__export(require(\"./features/viewport/viewport\"));\n__export(require(\"./features/viewport/zoom\"));\nvar di_config_2 = require(\"./features/move/di.config\");\nexports.moveModule = di_config_2.default;\nvar di_config_3 = require(\"./features/bounds/di.config\");\nexports.boundsModule = di_config_3.default;\nvar di_config_4 = require(\"./features/fade/di.config\");\nexports.fadeModule = di_config_4.default;\nvar di_config_5 = require(\"./features/select/di.config\");\nexports.selectModule = di_config_5.default;\nvar di_config_6 = require(\"./features/undo-redo/di.config\");\nexports.undoRedoModule = di_config_6.default;\nvar di_config_7 = require(\"./features/viewport/di.config\");\nexports.viewportModule = di_config_7.default;\nvar di_config_8 = require(\"./features/hover/di.config\");\nexports.hoverModule = di_config_8.default;\nvar di_config_9 = require(\"./features/export/di.config\");\nexports.exportModule = di_config_9.default;\nvar di_config_10 = require(\"./features/expand/di.config\");\nexports.expandModule = di_config_10.default;\nvar di_config_11 = require(\"./features/open/di.config\");\nexports.openModule = di_config_11.default;\nvar di_config_12 = require(\"./features/button/di.config\");\nexports.buttonModule = di_config_12.default;\n// ------------------ Graph ------------------\n__export(require(\"./graph/sgraph-factory\"));\n__export(require(\"./graph/sgraph\"));\n__export(require(\"./graph/views\"));\n// ------------------ Library ------------------\n__export(require(\"./lib/generic-views\"));\n__export(require(\"./lib/html-views\"));\n__export(require(\"./lib/model\"));\n__export(require(\"./lib/svg-views\"));\n// ------------------ Model Source ------------------\n__export(require(\"./model-source/diagram-server\"));\n__export(require(\"./model-source/diagram-state\"));\n__export(require(\"./model-source/local-model-source\"));\n__export(require(\"./model-source/logging\"));\n__export(require(\"./model-source/model-source\"));\n__export(require(\"./model-source/websocket\"));\nvar di_config_13 = require(\"./model-source/di.config\");\nexports.modelSourceModule = di_config_13.default;\n// ------------------ Utilities ------------------\n__export(require(\"./utils/color\"));\n__export(require(\"./utils/geometry\"));\n__export(require(\"./utils/logging\"));\n__export(require(\"./utils/registry\"));\n//# sourceMappingURL=index.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/index.js\n// module id = 15\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar METADATA_KEY = require(\"../constants/metadata_keys\");\nvar Metadata = (function () {\n function Metadata(key, value) {\n this.key = key;\n this.value = value;\n }\n Metadata.prototype.toString = function () {\n if (this.key === METADATA_KEY.NAMED_TAG) {\n return \"named: \" + this.value.toString() + \" \";\n }\n else {\n return \"tagged: { key:\" + this.key.toString() + \", value: \" + this.value + \" }\";\n }\n };\n return Metadata;\n}());\nexports.Metadata = Metadata;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/planning/metadata.js\n// module id = 16\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar smodel_1 = require(\"./smodel\");\n/**\n * The default model factory creates SModelRoot for the root element and SChildElement for all other\n * model elements.\n */\nvar SModelFactory = /** @class */ (function () {\n function SModelFactory() {\n }\n SModelFactory.prototype.createElement = function (schema, parent) {\n return this.initializeChild(new smodel_1.SChildElement(), schema, parent);\n };\n SModelFactory.prototype.createRoot = function (schema) {\n return this.initializeRoot(new smodel_1.SModelRoot(), schema);\n };\n SModelFactory.prototype.createSchema = function (element) {\n var _this = this;\n var schema = {};\n for (var key in element) {\n if (!this.isReserved(element, key)) {\n var value = element[key];\n if (typeof value !== 'function')\n schema[key] = value;\n }\n }\n if (element instanceof smodel_1.SParentElement)\n schema['children'] = element.children.map(function (child) { return _this.createSchema(child); });\n return schema;\n };\n SModelFactory.prototype.initializeElement = function (element, schema) {\n for (var key in schema) {\n if (!this.isReserved(element, key)) {\n var value = schema[key];\n if (typeof value !== 'function')\n element[key] = value;\n }\n }\n return element;\n };\n SModelFactory.prototype.isReserved = function (element, propertyName) {\n if (['children', 'parent', 'index'].indexOf(propertyName) >= 0)\n return true;\n var obj = element;\n do {\n var descriptor = Object.getOwnPropertyDescriptor(obj, propertyName);\n if (descriptor !== undefined)\n return descriptor.get !== undefined;\n obj = Object.getPrototypeOf(obj);\n } while (obj);\n return false;\n };\n SModelFactory.prototype.initializeParent = function (parent, schema) {\n var _this = this;\n this.initializeElement(parent, schema);\n if (schema.children !== undefined && schema.children.constructor === Array) {\n parent.children = schema.children.map(function (childSchema) { return _this.createElement(childSchema, parent); });\n }\n return parent;\n };\n SModelFactory.prototype.initializeChild = function (child, schema, parent) {\n this.initializeParent(child, schema);\n if (parent !== undefined) {\n child.parent = parent;\n }\n return child;\n };\n SModelFactory.prototype.initializeRoot = function (root, schema) {\n this.initializeParent(root, schema);\n root.index.add(root);\n return root;\n };\n SModelFactory = __decorate([\n inversify_1.injectable()\n ], SModelFactory);\n return SModelFactory;\n}());\nexports.SModelFactory = SModelFactory;\nexports.EMPTY_ROOT = Object.freeze({\n type: 'NONE',\n id: 'EMPTY'\n});\n//# sourceMappingURL=smodel-factory.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/model/smodel-factory.js\n// module id = 17\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction setAttr(vnode, name, value) {\n getAttrs(vnode)[name] = value;\n}\nexports.setAttr = setAttr;\nfunction setClass(vnode, name, value) {\n getClass(vnode)[name] = value;\n}\nexports.setClass = setClass;\nfunction copyClassesFromVNode(source, target) {\n var classList = getClass(source);\n for (var c in classList) {\n setClass(target, c, true);\n }\n}\nexports.copyClassesFromVNode = copyClassesFromVNode;\nfunction copyClassesFromElement(element, target) {\n var classList = element.classList;\n for (var i = 0; i < classList.length; i++) {\n setClass(target, classList.item(i), true);\n }\n}\nexports.copyClassesFromElement = copyClassesFromElement;\nfunction mergeStyle(vnode, style) {\n getData(vnode).style = __assign({}, (getData(vnode).style || {}), style);\n}\nexports.mergeStyle = mergeStyle;\nfunction on(vnode, event, listener, element) {\n var on = getOn(vnode);\n if (on[event]) {\n throw new Error('EventListener for ' + event + ' already registered on VNode');\n }\n on[event] = [listener, element];\n}\nexports.on = on;\nfunction getAttrs(vnode) {\n var data = getData(vnode);\n if (!data.attrs)\n data.attrs = {};\n return data.attrs;\n}\nexports.getAttrs = getAttrs;\nfunction getData(vnode) {\n if (!vnode.data)\n vnode.data = {};\n return vnode.data;\n}\nfunction getClass(vnode) {\n var data = getData(vnode);\n if (!data.class)\n data.class = {};\n return data.class;\n}\nfunction getOn(vnode) {\n var data = getData(vnode);\n if (!data.on)\n data.on = {};\n return data.on;\n}\n//# sourceMappingURL=vnode-utils.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/views/vnode-utils.js\n// module id = 18\n// module chunks = 0","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_an-object.js\n// module id = 19\n// module chunks = 0","var core = module.exports = { version: '2.5.3' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_core.js\n// module id = 20\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BindingScopeEnum = {\n Request: \"Request\",\n Singleton: \"Singleton\",\n Transient: \"Transient\"\n};\nexports.BindingScopeEnum = BindingScopeEnum;\nvar BindingTypeEnum = {\n ConstantValue: \"ConstantValue\",\n Constructor: \"Constructor\",\n DynamicValue: \"DynamicValue\",\n Factory: \"Factory\",\n Function: \"Function\",\n Instance: \"Instance\",\n Invalid: \"Invalid\",\n Provider: \"Provider\"\n};\nexports.BindingTypeEnum = BindingTypeEnum;\nvar TargetTypeEnum = {\n ClassProperty: \"ClassProperty\",\n ConstructorArgument: \"ConstructorArgument\",\n Variable: \"Variable\"\n};\nexports.TargetTypeEnum = TargetTypeEnum;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/constants/literal_types.js\n// module id = 21\n// module chunks = 0","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_defined.js\n// module id = 22\n// module chunks = 0","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_descriptors.js\n// module id = 23\n// module chunks = 0","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_fails.js\n// module id = 24\n// module chunks = 0","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_has.js\n// module id = 25\n// module chunks = 0","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_hide.js\n// module id = 26\n// module chunks = 0","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-dp.js\n// module id = 27\n// module chunks = 0","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_redefine.js\n// module id = 28\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ERROR_MSGS = require(\"../constants/error_msgs\");\nvar METADATA_KEY = require(\"../constants/metadata_keys\");\nfunction tagParameter(annotationTarget, propertyName, parameterIndex, metadata) {\n var metadataKey = METADATA_KEY.TAGGED;\n _tagParameterOrProperty(metadataKey, annotationTarget, propertyName, metadata, parameterIndex);\n}\nexports.tagParameter = tagParameter;\nfunction tagProperty(annotationTarget, propertyName, metadata) {\n var metadataKey = METADATA_KEY.TAGGED_PROP;\n _tagParameterOrProperty(metadataKey, annotationTarget.constructor, propertyName, metadata);\n}\nexports.tagProperty = tagProperty;\nfunction _tagParameterOrProperty(metadataKey, annotationTarget, propertyName, metadata, parameterIndex) {\n var paramsOrPropertiesMetadata = {};\n var isParameterDecorator = (typeof parameterIndex === \"number\");\n var key = (parameterIndex !== undefined && isParameterDecorator) ? parameterIndex.toString() : propertyName;\n if (isParameterDecorator && propertyName !== undefined) {\n throw new Error(ERROR_MSGS.INVALID_DECORATOR_OPERATION);\n }\n if (Reflect.hasOwnMetadata(metadataKey, annotationTarget)) {\n paramsOrPropertiesMetadata = Reflect.getMetadata(metadataKey, annotationTarget);\n }\n var paramOrPropertyMetadata = paramsOrPropertiesMetadata[key];\n if (!Array.isArray(paramOrPropertyMetadata)) {\n paramOrPropertyMetadata = [];\n }\n else {\n for (var _i = 0, paramOrPropertyMetadata_1 = paramOrPropertyMetadata; _i < paramOrPropertyMetadata_1.length; _i++) {\n var m = paramOrPropertyMetadata_1[_i];\n if (m.key === metadata.key) {\n throw new Error(ERROR_MSGS.DUPLICATED_METADATA + \" \" + m.key);\n }\n }\n }\n paramOrPropertyMetadata.push(metadata);\n paramsOrPropertiesMetadata[key] = paramOrPropertyMetadata;\n Reflect.defineMetadata(metadataKey, paramsOrPropertiesMetadata, annotationTarget);\n}\nfunction _decorate(decorators, target) {\n Reflect.decorate(decorators, target);\n}\nfunction _param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); };\n}\nfunction decorate(decorator, target, parameterIndex) {\n if (typeof parameterIndex === \"number\") {\n _decorate([_param(parameterIndex, decorator)], target);\n }\n else if (typeof parameterIndex === \"string\") {\n Reflect.decorate([decorator], target, parameterIndex);\n }\n else {\n _decorate([decorator], target);\n }\n}\nexports.decorate = decorate;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/annotation/decorator_utils.js\n// module id = 29\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../types\");\nvar smodel_1 = require(\"../model/smodel\");\nvar action_1 = require(\"../actions/action\");\nvar vnode_utils_1 = require(\"./vnode-utils\");\nvar dom_helper_1 = require(\"./dom-helper\");\nvar MouseTool = /** @class */ (function () {\n function MouseTool(actionDispatcher, domHelper, mouseListeners) {\n if (mouseListeners === void 0) { mouseListeners = []; }\n this.actionDispatcher = actionDispatcher;\n this.domHelper = domHelper;\n this.mouseListeners = mouseListeners;\n }\n MouseTool.prototype.register = function (mouseListener) {\n this.mouseListeners.push(mouseListener);\n };\n MouseTool.prototype.deregister = function (mouseListener) {\n var index = this.mouseListeners.indexOf(mouseListener);\n if (index >= 0)\n this.mouseListeners.splice(index, 1);\n };\n MouseTool.prototype.getTargetElement = function (model, event) {\n var target = event.target;\n var index = model.index;\n while (target) {\n if (target.id) {\n var element = index.getById(this.domHelper.findSModelIdByDOMElement(target));\n if (element !== undefined)\n return element;\n }\n target = target.parentNode;\n }\n return undefined;\n };\n MouseTool.prototype.handleEvent = function (methodName, model, event) {\n var _this = this;\n this.focusOnMouseEvent(methodName, model);\n var element = this.getTargetElement(model, event);\n if (!element)\n return;\n var actions = this.mouseListeners\n .map(function (listener) { return listener[methodName].apply(listener, [element, event]); })\n .reduce(function (a, b) { return a.concat(b); });\n if (actions.length > 0) {\n event.preventDefault();\n for (var _i = 0, actions_1 = actions; _i < actions_1.length; _i++) {\n var actionOrPromise = actions_1[_i];\n if (action_1.isAction(actionOrPromise)) {\n this.actionDispatcher.dispatch(actionOrPromise);\n }\n else {\n actionOrPromise.then(function (action) {\n _this.actionDispatcher.dispatch(action);\n });\n }\n }\n }\n };\n MouseTool.prototype.focusOnMouseEvent = function (methodName, model) {\n if (document) {\n var domElement = document.getElementById(this.domHelper.createUniqueDOMElementId(model));\n if (methodName === 'mouseDown' && domElement !== null && typeof domElement.focus === 'function')\n domElement.focus();\n }\n };\n MouseTool.prototype.mouseOver = function (model, event) {\n this.handleEvent('mouseOver', model, event);\n };\n MouseTool.prototype.mouseOut = function (model, event) {\n this.handleEvent('mouseOut', model, event);\n };\n MouseTool.prototype.mouseEnter = function (model, event) {\n this.handleEvent('mouseEnter', model, event);\n };\n MouseTool.prototype.mouseLeave = function (model, event) {\n this.handleEvent('mouseLeave', model, event);\n };\n MouseTool.prototype.mouseDown = function (model, event) {\n this.handleEvent('mouseDown', model, event);\n };\n MouseTool.prototype.mouseMove = function (model, event) {\n this.handleEvent('mouseMove', model, event);\n };\n MouseTool.prototype.mouseUp = function (model, event) {\n this.handleEvent('mouseUp', model, event);\n };\n MouseTool.prototype.wheel = function (model, event) {\n this.handleEvent('wheel', model, event);\n };\n MouseTool.prototype.doubleClick = function (model, event) {\n this.handleEvent('doubleClick', model, event);\n };\n MouseTool.prototype.decorate = function (vnode, element) {\n if (element instanceof smodel_1.SModelRoot) {\n vnode_utils_1.on(vnode, 'mouseover', this.mouseOver.bind(this), element);\n vnode_utils_1.on(vnode, 'mouseout', this.mouseOut.bind(this), element);\n vnode_utils_1.on(vnode, 'mouseenter', this.mouseEnter.bind(this), element);\n vnode_utils_1.on(vnode, 'mouseleave', this.mouseLeave.bind(this), element);\n vnode_utils_1.on(vnode, 'mousedown', this.mouseDown.bind(this), element);\n vnode_utils_1.on(vnode, 'mouseup', this.mouseUp.bind(this), element);\n vnode_utils_1.on(vnode, 'mousemove', this.mouseMove.bind(this), element);\n vnode_utils_1.on(vnode, 'wheel', this.wheel.bind(this), element);\n vnode_utils_1.on(vnode, 'contextmenu', function (target, event) {\n event.preventDefault();\n }, element);\n vnode_utils_1.on(vnode, 'dblclick', this.doubleClick.bind(this), element);\n }\n vnode = this.mouseListeners.reduce(function (vnode, listener) { return listener.decorate(vnode, element); }, vnode);\n return vnode;\n };\n MouseTool.prototype.postUpdate = function () {\n };\n MouseTool = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.IActionDispatcher)),\n __param(1, inversify_1.inject(types_1.TYPES.DOMHelper)),\n __param(2, inversify_1.multiInject(types_1.TYPES.MouseListener)), __param(2, inversify_1.optional()),\n __metadata(\"design:paramtypes\", [Object, dom_helper_1.DOMHelper, Array])\n ], MouseTool);\n return MouseTool;\n}());\nexports.MouseTool = MouseTool;\nvar PopupMouseTool = /** @class */ (function (_super) {\n __extends(PopupMouseTool, _super);\n function PopupMouseTool(actionDispatcher, domHelper, mouseListeners) {\n if (mouseListeners === void 0) { mouseListeners = []; }\n var _this = _super.call(this, actionDispatcher, domHelper, mouseListeners) || this;\n _this.actionDispatcher = actionDispatcher;\n _this.domHelper = domHelper;\n _this.mouseListeners = mouseListeners;\n return _this;\n }\n PopupMouseTool = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.IActionDispatcher)),\n __param(1, inversify_1.inject(types_1.TYPES.DOMHelper)),\n __param(2, inversify_1.multiInject(types_1.TYPES.PopupMouseListener)), __param(2, inversify_1.optional()),\n __metadata(\"design:paramtypes\", [Object, dom_helper_1.DOMHelper, Array])\n ], PopupMouseTool);\n return PopupMouseTool;\n}(MouseTool));\nexports.PopupMouseTool = PopupMouseTool;\nvar MouseListener = /** @class */ (function () {\n function MouseListener() {\n }\n MouseListener.prototype.mouseOver = function (target, event) {\n return [];\n };\n MouseListener.prototype.mouseOut = function (target, event) {\n return [];\n };\n MouseListener.prototype.mouseEnter = function (target, event) {\n return [];\n };\n MouseListener.prototype.mouseLeave = function (target, event) {\n return [];\n };\n MouseListener.prototype.mouseDown = function (target, event) {\n return [];\n };\n MouseListener.prototype.mouseMove = function (target, event) {\n return [];\n };\n MouseListener.prototype.mouseUp = function (target, event) {\n return [];\n };\n MouseListener.prototype.wheel = function (target, event) {\n return [];\n };\n MouseListener.prototype.doubleClick = function (target, event) {\n return [];\n };\n MouseListener.prototype.decorate = function (vnode, element) {\n return vnode;\n };\n MouseListener = __decorate([\n inversify_1.injectable()\n ], MouseListener);\n return MouseListener;\n}());\nexports.MouseListener = MouseListener;\n//# sourceMappingURL=mouse-tool.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/views/mouse-tool.js\n// module id = 30\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.selectFeature = Symbol('selectFeature');\nfunction isSelectable(element) {\n return element.hasFeature(exports.selectFeature);\n}\nexports.isSelectable = isSelectable;\n//# sourceMappingURL=model.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/select/model.js\n// module id = 31\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar smodel_1 = require(\"../../base/model/smodel\");\nexports.viewportFeature = Symbol('viewportFeature');\nfunction isViewport(element) {\n return element instanceof smodel_1.SModelRoot\n && element.hasFeature(exports.viewportFeature)\n && 'zoom' in element\n && 'scroll' in element;\n}\nexports.isViewport = isViewport;\n//# sourceMappingURL=model.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/viewport/model.js\n// module id = 32\n// module chunks = 0","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_to-iobject.js\n// module id = 33\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction guid() {\n function s4() {\n return Math.floor((Math.random() + 1) * 0x10000)\n .toString(16)\n .substring(1);\n }\n return s4() + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" +\n s4() + \"-\" + s4() + s4() + s4();\n}\nexports.guid = guid;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/utils/guid.js\n// module id = 34\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../types\");\nvar smodel_1 = require(\"../model/smodel\");\nvar vnode_utils_1 = require(\"./vnode-utils\");\nvar KeyTool = /** @class */ (function () {\n function KeyTool(actionDispatcher, keyListeners) {\n if (keyListeners === void 0) { keyListeners = []; }\n this.actionDispatcher = actionDispatcher;\n this.keyListeners = keyListeners;\n }\n KeyTool.prototype.register = function (keyListener) {\n this.keyListeners.push(keyListener);\n };\n KeyTool.prototype.deregister = function (keyListener) {\n var index = this.keyListeners.indexOf(keyListener);\n if (index >= 0)\n this.keyListeners.splice(index, 1);\n };\n KeyTool.prototype.handleEvent = function (methodName, model, event) {\n var actions = this.keyListeners\n .map(function (listener) { return listener[methodName].apply(listener, [model, event]); })\n .reduce(function (a, b) { return a.concat(b); });\n if (actions.length > 0) {\n event.preventDefault();\n this.actionDispatcher.dispatchAll(actions);\n }\n };\n KeyTool.prototype.keyDown = function (element, event) {\n this.handleEvent('keyDown', element, event);\n };\n KeyTool.prototype.focus = function () { };\n KeyTool.prototype.decorate = function (vnode, element) {\n if (element instanceof smodel_1.SModelRoot) {\n vnode_utils_1.on(vnode, 'focus', this.focus.bind(this), element);\n vnode_utils_1.on(vnode, 'keydown', this.keyDown.bind(this), element);\n }\n return vnode;\n };\n KeyTool.prototype.postUpdate = function () {\n };\n KeyTool = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.IActionDispatcher)),\n __param(1, inversify_1.multiInject(types_1.TYPES.KeyListener)), __param(1, inversify_1.optional()),\n __metadata(\"design:paramtypes\", [Object, Array])\n ], KeyTool);\n return KeyTool;\n}());\nexports.KeyTool = KeyTool;\nvar KeyListener = /** @class */ (function () {\n function KeyListener() {\n }\n KeyListener.prototype.keyDown = function (element, event) {\n return [];\n };\n KeyListener = __decorate([\n inversify_1.injectable()\n ], KeyListener);\n return KeyListener;\n}());\nexports.KeyListener = KeyListener;\n//# sourceMappingURL=key-tool.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/views/key-tool.js\n// module id = 35\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_cof.js\n// module id = 36\n// module chunks = 0","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_ctx.js\n// module id = 37\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../types\");\nvar registry_1 = require(\"../../utils/registry\");\nvar command_1 = require(\"../commands/command\");\n/**\n * The action handler registry maps actions to their handlers using the Action.kind property.\n */\nvar ActionHandlerRegistry = /** @class */ (function (_super) {\n __extends(ActionHandlerRegistry, _super);\n function ActionHandlerRegistry(initializers) {\n var _this = _super.call(this) || this;\n initializers.forEach(function (initializer) { return _this.initializeActionHandler(initializer); });\n return _this;\n }\n ActionHandlerRegistry.prototype.registerCommand = function (commandType) {\n this.register(commandType.KIND, new command_1.CommandActionHandler(commandType));\n };\n ActionHandlerRegistry.prototype.initializeActionHandler = function (initializer) {\n initializer.initialize(this);\n };\n ActionHandlerRegistry = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.multiInject(types_1.TYPES.IActionHandlerInitializer)), __param(0, inversify_1.optional()),\n __metadata(\"design:paramtypes\", [Array])\n ], ActionHandlerRegistry);\n return ActionHandlerRegistry;\n}(registry_1.MultiInstanceRegistry));\nexports.ActionHandlerRegistry = ActionHandlerRegistry;\n//# sourceMappingURL=action-handler.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/actions/action-handler.js\n// module id = 38\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar easing_1 = require(\"./easing\");\n/**\n * An animation uses the rendering loop of the browser to smoothly\n * calculate a transition between two states of a model element.\n */\nvar Animation = /** @class */ (function () {\n function Animation(context, ease) {\n if (ease === void 0) { ease = easing_1.easeInOut; }\n this.context = context;\n this.ease = ease;\n }\n Animation.prototype.start = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var start = undefined;\n var frames = 0;\n var lambda = function (time) {\n frames++;\n var dtime;\n if (start === undefined) {\n start = time;\n dtime = 0;\n }\n else {\n dtime = time - start;\n }\n var t = Math.min(1, dtime / _this.context.duration);\n var current = _this.tween(_this.ease(t), _this.context);\n _this.context.modelChanged.update(current);\n if (t === 1) {\n _this.context.logger.log(_this, (frames * 1000 / _this.context.duration) + ' fps');\n resolve(current);\n }\n else {\n _this.context.syncer.onNextFrame(lambda);\n }\n };\n if (_this.context.syncer.isAvailable()) {\n _this.context.syncer.onNextFrame(lambda);\n }\n else {\n var finalModel = _this.tween(1, _this.context);\n resolve(finalModel);\n }\n });\n };\n return Animation;\n}());\nexports.Animation = Animation;\nvar CompoundAnimation = /** @class */ (function (_super) {\n __extends(CompoundAnimation, _super);\n function CompoundAnimation(model, context, components, ease) {\n if (components === void 0) { components = []; }\n if (ease === void 0) { ease = easing_1.easeInOut; }\n var _this = _super.call(this, context, ease) || this;\n _this.model = model;\n _this.context = context;\n _this.components = components;\n _this.ease = ease;\n return _this;\n }\n CompoundAnimation.prototype.include = function (animation) {\n this.components.push(animation);\n return this;\n };\n CompoundAnimation.prototype.tween = function (t, context) {\n for (var _i = 0, _a = this.components; _i < _a.length; _i++) {\n var a = _a[_i];\n a.tween(t, context);\n }\n return this.model;\n };\n return CompoundAnimation;\n}(Animation));\nexports.CompoundAnimation = CompoundAnimation;\n//# sourceMappingURL=animation.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/animations/animation.js\n// module id = 39\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar model_1 = require(\"../bounds/model\");\nvar action_dispatcher_1 = require(\"../../base/actions/action-dispatcher\");\nvar types_1 = require(\"../../base/types\");\nvar geometry_1 = require(\"../../utils/geometry\");\nvar inversify_1 = require(\"inversify\");\nvar ExportSvgAction = /** @class */ (function () {\n function ExportSvgAction(svg) {\n this.svg = svg;\n this.kind = ExportSvgAction.KIND;\n }\n ExportSvgAction.KIND = 'exportSvg';\n return ExportSvgAction;\n}());\nexports.ExportSvgAction = ExportSvgAction;\nvar SvgExporter = /** @class */ (function () {\n function SvgExporter(options, actionDispatcher, log) {\n this.options = options;\n this.actionDispatcher = actionDispatcher;\n this.log = log;\n }\n SvgExporter.prototype.export = function (root) {\n if (typeof document !== 'undefined') {\n var div = document.getElementById(this.options.hiddenDiv);\n if (div !== null && div.firstElementChild && div.firstElementChild.tagName === 'svg') {\n var svgElement = div.firstElementChild;\n var svg = this.createSvg(svgElement, root);\n this.actionDispatcher.dispatch(new ExportSvgAction(svg));\n }\n }\n };\n SvgExporter.prototype.createSvg = function (svgElementOrig, root) {\n var serializer = new XMLSerializer();\n var svgCopy = serializer.serializeToString(svgElementOrig);\n var iframe = document.createElement('iframe');\n document.body.appendChild(iframe);\n var docCopy = iframe.contentWindow.document;\n docCopy.open();\n docCopy.write(svgCopy);\n docCopy.close();\n var svgElementNew = docCopy.getElementById(svgElementOrig.id);\n svgElementNew.removeAttribute('opacity');\n this.copyStyles(svgElementOrig, svgElementNew, ['width', 'height', 'opacity']);\n svgElementNew.setAttribute('version', '1.1');\n var bounds = this.getBounds(root);\n svgElementNew.setAttribute('viewBox', bounds.x + \" \" + bounds.y + \" \" + bounds.width + \" \" + bounds.height);\n var svgCode = serializer.serializeToString(svgElementNew);\n document.body.removeChild(iframe);\n return svgCode;\n };\n SvgExporter.prototype.copyStyles = function (source, target, skipedProperties) {\n var sourceStyle = getComputedStyle(source);\n var targetStyle = getComputedStyle(target);\n var diffStyle = '';\n for (var i = 0; i < sourceStyle.length; i++) {\n var key = sourceStyle[i];\n if (skipedProperties.indexOf(key) === -1) {\n var value = sourceStyle.getPropertyValue(key);\n if (targetStyle.getPropertyValue(key) !== value) {\n diffStyle += key + \":\" + value + \";\";\n }\n }\n }\n if (diffStyle !== '')\n target.setAttribute('style', diffStyle);\n // IE doesn't retrun anything on source.children\n for (var i = 0; i < source.childNodes.length; ++i) {\n var sourceChild = source.childNodes[i];\n var targetChild = target.childNodes[i];\n if (sourceChild instanceof Element)\n this.copyStyles(sourceChild, targetChild, []);\n }\n };\n SvgExporter.prototype.getBounds = function (root) {\n var allBounds = [geometry_1.EMPTY_BOUNDS];\n root.children.forEach(function (element) {\n if (model_1.isBoundsAware(element)) {\n allBounds.push(element.bounds);\n }\n });\n return allBounds.reduce(function (one, two) { return geometry_1.combine(one, two); });\n };\n SvgExporter = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.ViewerOptions)),\n __param(1, inversify_1.inject(types_1.TYPES.IActionDispatcher)),\n __param(2, inversify_1.inject(types_1.TYPES.ILogger)),\n __metadata(\"design:paramtypes\", [Object, action_dispatcher_1.ActionDispatcher, Object])\n ], SvgExporter);\n return SvgExporter;\n}());\nexports.SvgExporter = SvgExporter;\n//# sourceMappingURL=svg-exporter.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/export/svg-exporter.js\n// module id = 40\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.moveFeature = Symbol('moveFeature');\nfunction isLocateable(element) {\n return element['position'] !== undefined;\n}\nexports.isLocateable = isLocateable;\nfunction isMoveable(element) {\n return element.hasFeature(exports.moveFeature) && isLocateable(element);\n}\nexports.isMoveable = isMoveable;\n//# sourceMappingURL=model.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/move/model.js\n// module id = 41\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar command_1 = require(\"../../base/commands/command\");\nvar animation_1 = require(\"../../base/animations/animation\");\nvar model_1 = require(\"./model\");\nvar ViewportAction = /** @class */ (function () {\n function ViewportAction(elementId, newViewport, animate) {\n this.elementId = elementId;\n this.newViewport = newViewport;\n this.animate = animate;\n this.kind = ViewportCommand.KIND;\n }\n return ViewportAction;\n}());\nexports.ViewportAction = ViewportAction;\nvar ViewportCommand = /** @class */ (function (_super) {\n __extends(ViewportCommand, _super);\n function ViewportCommand(action) {\n var _this = _super.call(this) || this;\n _this.action = action;\n _this.newViewport = action.newViewport;\n return _this;\n }\n ViewportCommand.prototype.execute = function (context) {\n var model = context.root;\n var element = model.index.getById(this.action.elementId);\n if (element && model_1.isViewport(element)) {\n this.element = element;\n this.oldViewport = {\n scroll: this.element.scroll,\n zoom: this.element.zoom,\n };\n if (this.action.animate)\n return new ViewportAnimation(this.element, this.oldViewport, this.newViewport, context).start();\n else {\n this.element.scroll = this.newViewport.scroll;\n this.element.zoom = this.newViewport.zoom;\n }\n }\n return model;\n };\n ViewportCommand.prototype.undo = function (context) {\n return new ViewportAnimation(this.element, this.newViewport, this.oldViewport, context).start();\n };\n ViewportCommand.prototype.redo = function (context) {\n return new ViewportAnimation(this.element, this.oldViewport, this.newViewport, context).start();\n };\n ViewportCommand.prototype.merge = function (command, context) {\n if (!this.action.animate && command instanceof ViewportCommand && this.element === command.element) {\n this.newViewport = command.newViewport;\n return true;\n }\n return false;\n };\n ViewportCommand.KIND = 'viewport';\n return ViewportCommand;\n}(command_1.MergeableCommand));\nexports.ViewportCommand = ViewportCommand;\nvar ViewportAnimation = /** @class */ (function (_super) {\n __extends(ViewportAnimation, _super);\n function ViewportAnimation(element, oldViewport, newViewport, context) {\n var _this = _super.call(this, context) || this;\n _this.element = element;\n _this.oldViewport = oldViewport;\n _this.newViewport = newViewport;\n _this.context = context;\n _this.zoomFactor = Math.log(newViewport.zoom / oldViewport.zoom);\n return _this;\n }\n ViewportAnimation.prototype.tween = function (t, context) {\n this.element.scroll = {\n x: (1 - t) * this.oldViewport.scroll.x + t * this.newViewport.scroll.x,\n y: (1 - t) * this.oldViewport.scroll.y + t * this.newViewport.scroll.y\n };\n this.element.zoom = this.oldViewport.zoom * Math.exp(t * this.zoomFactor);\n return context.root;\n };\n return ViewportAnimation;\n}(animation_1.Animation));\nexports.ViewportAnimation = ViewportAnimation;\n//# sourceMappingURL=viewport.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/viewport/viewport.js\n// module id = 42\n// module chunks = 0","module.exports = {};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_iterators.js\n// module id = 43\n// module chunks = 0","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_set-to-string-tag.js\n// module id = 44\n// module chunks = 0","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_to-length.js\n// module id = 45\n// module chunks = 0","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_uid.js\n// module id = 46\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ERROR_MSGS = require(\"../constants/error_msgs\");\nfunction getServiceIdentifierAsString(serviceIdentifier) {\n if (typeof serviceIdentifier === \"function\") {\n var _serviceIdentifier = serviceIdentifier;\n return _serviceIdentifier.name;\n }\n else if (typeof serviceIdentifier === \"symbol\") {\n return serviceIdentifier.toString();\n }\n else {\n var _serviceIdentifier = serviceIdentifier;\n return _serviceIdentifier;\n }\n}\nexports.getServiceIdentifierAsString = getServiceIdentifierAsString;\nfunction listRegisteredBindingsForServiceIdentifier(container, serviceIdentifier, getBindings) {\n var registeredBindingsList = \"\";\n var registeredBindings = getBindings(container, serviceIdentifier);\n if (registeredBindings.length !== 0) {\n registeredBindingsList = \"\\nRegistered bindings:\";\n registeredBindings.forEach(function (binding) {\n var name = \"Object\";\n if (binding.implementationType !== null) {\n name = getFunctionName(binding.implementationType);\n }\n registeredBindingsList = registeredBindingsList + \"\\n \" + name;\n if (binding.constraint.metaData) {\n registeredBindingsList = registeredBindingsList + \" - \" + binding.constraint.metaData;\n }\n });\n }\n return registeredBindingsList;\n}\nexports.listRegisteredBindingsForServiceIdentifier = listRegisteredBindingsForServiceIdentifier;\nfunction alreadyDependencyChain(request, serviceIdentifier) {\n if (request.parentRequest === null) {\n return false;\n }\n else if (request.parentRequest.serviceIdentifier === serviceIdentifier) {\n return true;\n }\n else {\n return alreadyDependencyChain(request.parentRequest, serviceIdentifier);\n }\n}\nfunction dependencyChainToString(request) {\n function _createStringArr(req, result) {\n if (result === void 0) { result = []; }\n var serviceIdentifier = getServiceIdentifierAsString(req.serviceIdentifier);\n result.push(serviceIdentifier);\n if (req.parentRequest !== null) {\n return _createStringArr(req.parentRequest, result);\n }\n return result;\n }\n var stringArr = _createStringArr(request);\n return stringArr.reverse().join(\" --> \");\n}\nfunction circularDependencyToException(request) {\n request.childRequests.forEach(function (childRequest) {\n if (alreadyDependencyChain(childRequest, childRequest.serviceIdentifier)) {\n var services = dependencyChainToString(childRequest);\n throw new Error(ERROR_MSGS.CIRCULAR_DEPENDENCY + \" \" + services);\n }\n else {\n circularDependencyToException(childRequest);\n }\n });\n}\nexports.circularDependencyToException = circularDependencyToException;\nfunction listMetadataForTarget(serviceIdentifierString, target) {\n if (target.isTagged() || target.isNamed()) {\n var m_1 = \"\";\n var namedTag = target.getNamedTag();\n var otherTags = target.getCustomTags();\n if (namedTag !== null) {\n m_1 += namedTag.toString() + \"\\n\";\n }\n if (otherTags !== null) {\n otherTags.forEach(function (tag) {\n m_1 += tag.toString() + \"\\n\";\n });\n }\n return \" \" + serviceIdentifierString + \"\\n \" + serviceIdentifierString + \" - \" + m_1;\n }\n else {\n return \" \" + serviceIdentifierString;\n }\n}\nexports.listMetadataForTarget = listMetadataForTarget;\nfunction getFunctionName(v) {\n if (v.name) {\n return v.name;\n }\n else {\n var name_1 = v.toString();\n var match = name_1.match(/^function\\s*([^\\s(]+)/);\n return match ? match[1] : \"Anonymous function: \" + name_1;\n }\n}\nexports.getFunctionName = getFunctionName;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/utils/serialization.js\n// module id = 47\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar AnimationFrameSyncer = /** @class */ (function () {\n function AnimationFrameSyncer() {\n this.tasks = [];\n this.endTasks = [];\n this.triggered = false;\n }\n AnimationFrameSyncer.prototype.isAvailable = function () {\n return typeof requestAnimationFrame === \"function\";\n };\n AnimationFrameSyncer.prototype.onNextFrame = function (task) {\n this.tasks.push(task);\n this.trigger();\n };\n AnimationFrameSyncer.prototype.onEndOfNextFrame = function (task) {\n this.endTasks.push(task);\n this.trigger();\n };\n AnimationFrameSyncer.prototype.trigger = function () {\n var _this = this;\n if (!this.triggered) {\n this.triggered = true;\n if (this.isAvailable())\n requestAnimationFrame(function (time) { return _this.run(time); });\n else\n setTimeout(function (time) { return _this.run(time); });\n }\n };\n AnimationFrameSyncer.prototype.run = function (time) {\n var tasks = this.tasks;\n var endTasks = this.endTasks;\n this.triggered = false;\n this.tasks = [];\n this.endTasks = [];\n tasks.forEach(function (task) { return task.call(undefined, time); });\n endTasks.forEach(function (task) { return task.call(undefined, time); });\n };\n AnimationFrameSyncer = __decorate([\n inversify_1.injectable()\n ], AnimationFrameSyncer);\n return AnimationFrameSyncer;\n}());\nexports.AnimationFrameSyncer = AnimationFrameSyncer;\n//# sourceMappingURL=animation-frame-syncer.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/animations/animation-frame-syncer.js\n// module id = 48\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar geometry_1 = require(\"../../utils/geometry\");\nvar command_1 = require(\"../commands/command\");\nvar initialize_canvas_1 = require(\"./initialize-canvas\");\n/**\n * Sent from the client to the model source (e.g. a DiagramServer) in order to request a model. Usually this\n * is the first message that is sent to the source, so it is also used to initiate the communication.\n * The response is a SetModelAction or an UpdateModelAction.\n */\nvar RequestModelAction = /** @class */ (function () {\n function RequestModelAction(options) {\n this.options = options;\n this.kind = RequestModelAction.KIND;\n }\n RequestModelAction.KIND = 'requestModel';\n return RequestModelAction;\n}());\nexports.RequestModelAction = RequestModelAction;\n/**\n * Sent from the model source to the client in order to set the model. If a model is already present, it is replaced.\n */\nvar SetModelAction = /** @class */ (function () {\n function SetModelAction(newRoot, isInitial) {\n if (isInitial === void 0) { isInitial = false; }\n this.newRoot = newRoot;\n this.isInitial = isInitial;\n this.kind = SetModelCommand.KIND;\n }\n return SetModelAction;\n}());\nexports.SetModelAction = SetModelAction;\nvar SetModelCommand = /** @class */ (function (_super) {\n __extends(SetModelCommand, _super);\n function SetModelCommand(action) {\n var _this = _super.call(this) || this;\n _this.action = action;\n return _this;\n }\n SetModelCommand.prototype.execute = function (context) {\n this.oldRoot = context.modelFactory.createRoot(context.root);\n this.newRoot = context.modelFactory.createRoot(this.action.newRoot);\n if (geometry_1.isValidDimension(this.oldRoot.canvasBounds)) {\n this.newRoot.canvasBounds = this.oldRoot.canvasBounds;\n }\n return this.newRoot;\n };\n SetModelCommand.prototype.undo = function (context) {\n return this.oldRoot;\n };\n SetModelCommand.prototype.redo = function (context) {\n return this.newRoot;\n };\n Object.defineProperty(SetModelCommand.prototype, \"blockUntilActionKind\", {\n get: function () {\n if (this.action.isInitial)\n return initialize_canvas_1.InitializeCanvasBoundsCommand.KIND;\n else\n return undefined;\n },\n enumerable: true,\n configurable: true\n });\n SetModelCommand.KIND = 'setModel';\n SetModelCommand = __decorate([\n inversify_1.injectable(),\n __metadata(\"design:paramtypes\", [SetModelAction])\n ], SetModelCommand);\n return SetModelCommand;\n}(command_1.Command));\nexports.SetModelCommand = SetModelCommand;\n//# sourceMappingURL=set-model.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/features/set-model.js\n// module id = 49\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar command_1 = require(\"../../base/commands/command\");\nvar model_1 = require(\"./model\");\n/**\n * Sent from the model source (e.g. a DiagramServer) to the client to update the bounds of some\n * (or all) model elements.\n */\nvar SetBoundsAction = /** @class */ (function () {\n function SetBoundsAction(bounds) {\n this.bounds = bounds;\n this.kind = SetBoundsCommand.KIND;\n }\n return SetBoundsAction;\n}());\nexports.SetBoundsAction = SetBoundsAction;\n/**\n * Sent from the model source to the client to request bounds for the given model. The model is\n * rendered invisibly so the bounds can derived from the DOM. The response is a ComputedBoundsAction.\n * This hidden rendering round-trip is necessary if the client is responsible for parts of the layout\n * (see `needsClientLayout` viewer option).\n */\nvar RequestBoundsAction = /** @class */ (function () {\n function RequestBoundsAction(newRoot) {\n this.newRoot = newRoot;\n this.kind = RequestBoundsCommand.KIND;\n }\n return RequestBoundsAction;\n}());\nexports.RequestBoundsAction = RequestBoundsAction;\n/**\n * Sent from the client to the model source (e.g. a DiagramServer) to transmit the result of bounds\n * computation as a response to a RequestBoundsAction. If the server is responsible for parts of\n * the layout (see `needsServerLayout` viewer option), it can do so after applying the computed bounds\n * received with this action. Otherwise there is no need to send the computed bounds to the server,\n * so they can be processed locally by the client.\n */\nvar ComputedBoundsAction = /** @class */ (function () {\n function ComputedBoundsAction(bounds, revision, alignments) {\n this.bounds = bounds;\n this.revision = revision;\n this.alignments = alignments;\n this.kind = ComputedBoundsAction.KIND;\n }\n ComputedBoundsAction.KIND = 'computedBounds';\n return ComputedBoundsAction;\n}());\nexports.ComputedBoundsAction = ComputedBoundsAction;\nvar SetBoundsCommand = /** @class */ (function (_super) {\n __extends(SetBoundsCommand, _super);\n function SetBoundsCommand(action) {\n var _this = _super.call(this) || this;\n _this.action = action;\n _this.bounds = [];\n return _this;\n }\n SetBoundsCommand.prototype.execute = function (context) {\n var _this = this;\n this.action.bounds.forEach(function (b) {\n var element = context.root.index.getById(b.elementId);\n if (element && model_1.isBoundsAware(element)) {\n _this.bounds.push({\n element: element,\n oldBounds: element.bounds,\n newBounds: b.newBounds,\n });\n }\n });\n return this.redo(context);\n };\n SetBoundsCommand.prototype.undo = function (context) {\n this.bounds.forEach(function (b) { return b.element.bounds = b.oldBounds; });\n return context.root;\n };\n SetBoundsCommand.prototype.redo = function (context) {\n this.bounds.forEach(function (b) { return b.element.bounds = b.newBounds; });\n return context.root;\n };\n SetBoundsCommand.KIND = 'setBounds';\n return SetBoundsCommand;\n}(command_1.SystemCommand));\nexports.SetBoundsCommand = SetBoundsCommand;\nvar RequestBoundsCommand = /** @class */ (function (_super) {\n __extends(RequestBoundsCommand, _super);\n function RequestBoundsCommand(action) {\n var _this = _super.call(this) || this;\n _this.action = action;\n return _this;\n }\n RequestBoundsCommand.prototype.execute = function (context) {\n return context.modelFactory.createRoot(this.action.newRoot);\n };\n Object.defineProperty(RequestBoundsCommand.prototype, \"blockUntilActionKind\", {\n get: function () {\n return ComputedBoundsAction.KIND;\n },\n enumerable: true,\n configurable: true\n });\n RequestBoundsCommand.KIND = 'requestBounds';\n return RequestBoundsCommand;\n}(command_1.HiddenCommand));\nexports.RequestBoundsCommand = RequestBoundsCommand;\n//# sourceMappingURL=bounds-manipulation.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/bounds/bounds-manipulation.js\n// module id = 50\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fadeFeature = Symbol('fadeFeature');\nfunction isFadeable(element) {\n return element.hasFeature(exports.fadeFeature) && element['opacity'] !== undefined;\n}\nexports.isFadeable = isFadeable;\n//# sourceMappingURL=model.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/fade/model.js\n// module id = 51\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../../base/types\");\nvar mouse_tool_1 = require(\"../../base/views/mouse-tool\");\nvar command_1 = require(\"../../base/commands/command\");\nvar smodel_factory_1 = require(\"../../base/model/smodel-factory\");\nvar geometry_1 = require(\"../../utils/geometry\");\nvar key_tool_1 = require(\"../../base/views/key-tool\");\nvar smodel_utils_1 = require(\"../../base/model/smodel-utils\");\nvar model_1 = require(\"../bounds/model\");\nvar model_2 = require(\"./model\");\n/**\n * Triggered when the user puts the mouse pointer over an element.\n */\nvar HoverFeedbackAction = /** @class */ (function () {\n function HoverFeedbackAction(mouseoverElement, mouseIsOver) {\n this.mouseoverElement = mouseoverElement;\n this.mouseIsOver = mouseIsOver;\n this.kind = HoverFeedbackCommand.KIND;\n }\n return HoverFeedbackAction;\n}());\nexports.HoverFeedbackAction = HoverFeedbackAction;\nvar HoverFeedbackCommand = /** @class */ (function (_super) {\n __extends(HoverFeedbackCommand, _super);\n function HoverFeedbackCommand(action) {\n var _this = _super.call(this) || this;\n _this.action = action;\n return _this;\n }\n HoverFeedbackCommand.prototype.execute = function (context) {\n var model = context.root;\n var modelElement = model.index.getById(this.action.mouseoverElement);\n if (modelElement) {\n if (model_2.isHoverable(modelElement)) {\n modelElement.hoverFeedback = this.action.mouseIsOver;\n }\n }\n return this.redo(context);\n };\n HoverFeedbackCommand.prototype.undo = function (context) {\n return context.root;\n };\n HoverFeedbackCommand.prototype.redo = function (context) {\n return context.root;\n };\n HoverFeedbackCommand.KIND = 'hoverFeedback';\n return HoverFeedbackCommand;\n}(command_1.Command));\nexports.HoverFeedbackCommand = HoverFeedbackCommand;\n/**\n * Triggered when the user hovers the mouse pointer over an element to get a popup with details on\n * that element. This action is sent from the client to the model source, e.g. a DiagramServer.\n * The response is a SetPopupModelAction.\n */\nvar RequestPopupModelAction = /** @class */ (function () {\n function RequestPopupModelAction(elementId, bounds) {\n this.elementId = elementId;\n this.bounds = bounds;\n this.kind = RequestPopupModelAction.KIND;\n }\n RequestPopupModelAction.KIND = 'requestPopupModel';\n return RequestPopupModelAction;\n}());\nexports.RequestPopupModelAction = RequestPopupModelAction;\n/**\n * Sent from the model source to the client to display a popup in response to a RequestPopupModelAction.\n * This action can also be used to remove any existing popup by choosing EMPTY_ROOT as root element.\n */\nvar SetPopupModelAction = /** @class */ (function () {\n function SetPopupModelAction(newRoot) {\n this.newRoot = newRoot;\n this.kind = SetPopupModelCommand.KIND;\n }\n return SetPopupModelAction;\n}());\nexports.SetPopupModelAction = SetPopupModelAction;\nvar SetPopupModelCommand = /** @class */ (function (_super) {\n __extends(SetPopupModelCommand, _super);\n function SetPopupModelCommand(action) {\n var _this = _super.call(this) || this;\n _this.action = action;\n return _this;\n }\n SetPopupModelCommand.prototype.execute = function (context) {\n this.oldRoot = context.root;\n this.newRoot = context.modelFactory.createRoot(this.action.newRoot);\n return this.newRoot;\n };\n SetPopupModelCommand.prototype.undo = function (context) {\n return this.oldRoot;\n };\n SetPopupModelCommand.prototype.redo = function (context) {\n return this.newRoot;\n };\n SetPopupModelCommand.KIND = 'setPopupModel';\n return SetPopupModelCommand;\n}(command_1.PopupCommand));\nexports.SetPopupModelCommand = SetPopupModelCommand;\nvar AbstractHoverMouseListener = /** @class */ (function (_super) {\n __extends(AbstractHoverMouseListener, _super);\n function AbstractHoverMouseListener(options, state) {\n var _this = _super.call(this) || this;\n _this.options = options;\n _this.state = state;\n return _this;\n }\n AbstractHoverMouseListener.prototype.stopMouseOutTimer = function () {\n if (this.state.mouseOutTimer !== undefined) {\n window.clearTimeout(this.state.mouseOutTimer);\n this.state.mouseOutTimer = undefined;\n }\n };\n AbstractHoverMouseListener.prototype.startMouseOutTimer = function () {\n var _this = this;\n this.stopMouseOutTimer();\n return new Promise(function (resolve) {\n _this.state.mouseOutTimer = window.setTimeout(function () {\n _this.state.popupOpen = false;\n _this.state.previousPopupElement = undefined;\n resolve(new SetPopupModelAction({ type: smodel_factory_1.EMPTY_ROOT.type, id: smodel_factory_1.EMPTY_ROOT.id }));\n }, _this.options.popupCloseDelay);\n });\n };\n AbstractHoverMouseListener.prototype.stopMouseOverTimer = function () {\n if (this.state.mouseOverTimer !== undefined) {\n window.clearTimeout(this.state.mouseOverTimer);\n this.state.mouseOverTimer = undefined;\n }\n };\n AbstractHoverMouseListener = __decorate([\n __param(0, inversify_1.inject(types_1.TYPES.ViewerOptions)),\n __param(1, inversify_1.inject(types_1.TYPES.HoverState)),\n __metadata(\"design:paramtypes\", [Object, Object])\n ], AbstractHoverMouseListener);\n return AbstractHoverMouseListener;\n}(mouse_tool_1.MouseListener));\nexports.AbstractHoverMouseListener = AbstractHoverMouseListener;\nvar HoverMouseListener = /** @class */ (function (_super) {\n __extends(HoverMouseListener, _super);\n function HoverMouseListener() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n HoverMouseListener.prototype.calculatePopupPosition = function (target, mousePosition) {\n var offset = { x: -5, y: 20 };\n var maxDist = 150;\n var targetBounds = model_1.getAbsoluteBounds(target);\n var canvasBounds = target.root.canvasBounds;\n var boundsInWindow = geometry_1.translate(targetBounds, canvasBounds);\n var distRight = boundsInWindow.x + boundsInWindow.width - mousePosition.x;\n var distBottom = boundsInWindow.y + boundsInWindow.height - mousePosition.y;\n if (distBottom <= distRight && distBottom < maxDist) {\n offset = { x: -5, y: Math.round(distBottom + 5) };\n }\n else if (distRight <= distBottom && distRight < maxDist) {\n offset = { x: Math.round(distRight + 5), y: -5 };\n }\n var leftPopupPosition = mousePosition.x + offset.x;\n var canvasRightBorderPosition = canvasBounds.x + canvasBounds.width;\n if (leftPopupPosition > canvasRightBorderPosition) {\n leftPopupPosition = canvasRightBorderPosition;\n }\n var topPopupPosition = mousePosition.y + offset.y;\n var canvasBottomBorderPosition = canvasBounds.y + canvasBounds.height;\n if (topPopupPosition > canvasBottomBorderPosition) {\n topPopupPosition = canvasBottomBorderPosition;\n }\n return { x: leftPopupPosition, y: topPopupPosition };\n };\n HoverMouseListener.prototype.startMouseOverTimer = function (target, event) {\n var _this = this;\n this.stopMouseOverTimer();\n return new Promise(function (resolve) {\n _this.state.mouseOverTimer = window.setTimeout(function () {\n var popupPosition = _this.calculatePopupPosition(target, { x: event.pageX, y: event.pageY });\n resolve(new RequestPopupModelAction(target.id, {\n x: popupPosition.x,\n y: popupPosition.y,\n width: -1,\n height: -1\n }));\n _this.state.popupOpen = true;\n _this.state.previousPopupElement = target;\n }, _this.options.popupOpenDelay);\n });\n };\n HoverMouseListener.prototype.mouseOver = function (target, event) {\n var state = this.state;\n var result = [];\n var popupTarget = smodel_utils_1.findParent(target, model_2.hasPopupFeature);\n if (state.popupOpen && (popupTarget === undefined ||\n state.previousPopupElement !== undefined && state.previousPopupElement.id !== popupTarget.id)) {\n result.push(this.startMouseOutTimer());\n }\n else {\n this.stopMouseOverTimer();\n this.stopMouseOutTimer();\n }\n if (popupTarget !== undefined &&\n (state.previousPopupElement === undefined || state.previousPopupElement.id !== popupTarget.id)) {\n result.push(this.startMouseOverTimer(popupTarget, event));\n }\n var hoverTarget = smodel_utils_1.findParentByFeature(target, model_2.isHoverable);\n if (hoverTarget !== undefined)\n result.push(new HoverFeedbackAction(hoverTarget.id, true));\n return result;\n };\n HoverMouseListener.prototype.mouseOut = function (target, event) {\n var result = [];\n if (!this.state.popupOpen)\n this.stopMouseOverTimer();\n var hoverTarget = smodel_utils_1.findParentByFeature(target, model_2.isHoverable);\n if (hoverTarget !== undefined)\n result.push(new HoverFeedbackAction(hoverTarget.id, false));\n return result;\n };\n HoverMouseListener.prototype.mouseMove = function (target, event) {\n var popupTarget = smodel_utils_1.findParent(target, model_2.hasPopupFeature);\n return this.state.popupOpen || popupTarget === undefined ? [] : [this.startMouseOverTimer(popupTarget, event)];\n };\n HoverMouseListener = __decorate([\n inversify_1.injectable()\n ], HoverMouseListener);\n return HoverMouseListener;\n}(AbstractHoverMouseListener));\nexports.HoverMouseListener = HoverMouseListener;\nvar PopupHoverMouseListener = /** @class */ (function (_super) {\n __extends(PopupHoverMouseListener, _super);\n function PopupHoverMouseListener() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PopupHoverMouseListener.prototype.mouseOut = function (target, event) {\n return [this.startMouseOutTimer()];\n };\n PopupHoverMouseListener.prototype.mouseOver = function (target, event) {\n this.stopMouseOutTimer();\n this.stopMouseOverTimer();\n return [];\n };\n PopupHoverMouseListener = __decorate([\n inversify_1.injectable()\n ], PopupHoverMouseListener);\n return PopupHoverMouseListener;\n}(AbstractHoverMouseListener));\nexports.PopupHoverMouseListener = PopupHoverMouseListener;\nvar HoverKeyListener = /** @class */ (function (_super) {\n __extends(HoverKeyListener, _super);\n function HoverKeyListener() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n HoverKeyListener.prototype.keyDown = function (element, event) {\n if (event.keyCode === 27) {\n return [new SetPopupModelAction({ type: smodel_factory_1.EMPTY_ROOT.type, id: smodel_factory_1.EMPTY_ROOT.id })];\n }\n return [];\n };\n return HoverKeyListener;\n}(key_tool_1.KeyListener));\nexports.HoverKeyListener = HoverKeyListener;\n//# sourceMappingURL=hover.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/hover/hover.js\n// module id = 52\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar ProviderRegistry = /** @class */ (function () {\n function ProviderRegistry() {\n this.elements = new Map;\n }\n ProviderRegistry.prototype.register = function (key, cstr) {\n if (key === undefined)\n throw new Error('Key is undefined');\n if (this.hasKey(key))\n throw new Error('Key is already registered: ' + key);\n this.elements.set(key, cstr);\n };\n ProviderRegistry.prototype.deregister = function (key) {\n if (key === undefined)\n throw new Error('Key is undefined');\n this.elements.delete(key);\n };\n ProviderRegistry.prototype.hasKey = function (key) {\n return this.elements.has(key);\n };\n ProviderRegistry.prototype.get = function (key, arg) {\n var existingCstr = this.elements.get(key);\n if (existingCstr)\n return new existingCstr(arg);\n else\n return this.missing(key, arg);\n };\n ProviderRegistry.prototype.missing = function (key, arg) {\n throw new Error('Unknown registry key: ' + key);\n };\n ProviderRegistry = __decorate([\n inversify_1.injectable()\n ], ProviderRegistry);\n return ProviderRegistry;\n}());\nexports.ProviderRegistry = ProviderRegistry;\nvar InstanceRegistry = /** @class */ (function () {\n function InstanceRegistry() {\n this.elements = new Map;\n }\n InstanceRegistry.prototype.register = function (key, instance) {\n if (key === undefined)\n throw new Error('Key is undefined');\n if (this.hasKey(key))\n throw new Error('Key is already registered: ' + key);\n this.elements.set(key, instance);\n };\n InstanceRegistry.prototype.deregister = function (key) {\n if (key === undefined)\n throw new Error('Key is undefined');\n this.elements.delete(key);\n };\n InstanceRegistry.prototype.hasKey = function (key) {\n return this.elements.has(key);\n };\n InstanceRegistry.prototype.get = function (key) {\n var existingInstance = this.elements.get(key);\n if (existingInstance)\n return existingInstance;\n else\n return this.missing(key);\n };\n InstanceRegistry.prototype.missing = function (key) {\n throw new Error('Unknown registry key: ' + key);\n };\n InstanceRegistry = __decorate([\n inversify_1.injectable()\n ], InstanceRegistry);\n return InstanceRegistry;\n}());\nexports.InstanceRegistry = InstanceRegistry;\nvar MultiInstanceRegistry = /** @class */ (function () {\n function MultiInstanceRegistry() {\n this.elements = new Map;\n }\n MultiInstanceRegistry.prototype.register = function (key, instance) {\n if (key === undefined)\n throw new Error('Key is undefined');\n var instances = this.elements.get(key);\n if (instances !== undefined)\n instances.push(instance);\n else\n this.elements.set(key, [instance]);\n };\n MultiInstanceRegistry.prototype.deregisterAll = function (key) {\n if (key === undefined)\n throw new Error('Key is undefined');\n this.elements.delete(key);\n };\n MultiInstanceRegistry.prototype.get = function (key) {\n var existingInstances = this.elements.get(key);\n if (existingInstances !== undefined)\n return existingInstances;\n else\n return [];\n };\n MultiInstanceRegistry = __decorate([\n inversify_1.injectable()\n ], MultiInstanceRegistry);\n return MultiInstanceRegistry;\n}());\nexports.MultiInstanceRegistry = MultiInstanceRegistry;\n//# sourceMappingURL=registry.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/utils/registry.js\n// module id = 53\n// module chunks = 0","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_a-function.js\n// module id = 54\n// module chunks = 0","'use strict';\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar fails = require('./_fails');\nvar defined = require('./_defined');\nvar wks = require('./_wks');\n\nmodule.exports = function (KEY, length, exec) {\n var SYMBOL = wks(KEY);\n var fns = exec(defined, SYMBOL, ''[KEY]);\n var strfn = fns[0];\n var rxfn = fns[1];\n if (fails(function () {\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n })) {\n redefine(String.prototype, KEY, strfn);\n hide(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return rxfn.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return rxfn.call(string, this); }\n );\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_fix-re-wks.js\n// module id = 55\n// module chunks = 0","module.exports = false;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_library.js\n// module id = 56\n// module chunks = 0","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-keys.js\n// module id = 57\n// module chunks = 0","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_property-desc.js\n// module id = 58\n// module chunks = 0","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_to-integer.js\n// module id = 59\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../types\");\nvar geometry_1 = require(\"../../utils/geometry\");\nvar smodel_1 = require(\"../model/smodel\");\nvar command_1 = require(\"../commands/command\");\n/**\n * Grabs the bounds from the root element in page coordinates and fires a\n * InitializeCanvasBoundsAction. This size is needed for other actions such\n * as FitToScreenAction.\n */\nvar CanvasBoundsInitializer = /** @class */ (function () {\n function CanvasBoundsInitializer(actionDispatcher) {\n this.actionDispatcher = actionDispatcher;\n }\n CanvasBoundsInitializer.prototype.decorate = function (vnode, element) {\n if (element instanceof smodel_1.SModelRoot && !geometry_1.isValidDimension(element.canvasBounds)) {\n this.rootAndVnode = [element, vnode];\n }\n return vnode;\n };\n CanvasBoundsInitializer.prototype.postUpdate = function () {\n if (this.rootAndVnode !== undefined) {\n var domElement = this.rootAndVnode[1].elm;\n var oldBounds = this.rootAndVnode[0].canvasBounds;\n if (domElement !== undefined) {\n var newBounds = this.getBoundsInPage(domElement);\n if (!(geometry_1.almostEquals(newBounds.x, oldBounds.x)\n && geometry_1.almostEquals(newBounds.y, oldBounds.y)\n && geometry_1.almostEquals(newBounds.width, oldBounds.width)\n && geometry_1.almostEquals(newBounds.height, oldBounds.width)))\n this.actionDispatcher.dispatch(new InitializeCanvasBoundsAction(newBounds));\n }\n this.rootAndVnode = undefined;\n }\n };\n CanvasBoundsInitializer.prototype.getBoundsInPage = function (element) {\n var bounds = element.getBoundingClientRect();\n var scroll = typeof window !== 'undefined' ? { x: window.scrollX, y: window.scrollY } : geometry_1.ORIGIN_POINT;\n return {\n x: bounds.left + scroll.x,\n y: bounds.top + scroll.y,\n width: bounds.width,\n height: bounds.height\n };\n };\n CanvasBoundsInitializer = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.IActionDispatcher)),\n __metadata(\"design:paramtypes\", [Object])\n ], CanvasBoundsInitializer);\n return CanvasBoundsInitializer;\n}());\nexports.CanvasBoundsInitializer = CanvasBoundsInitializer;\nvar InitializeCanvasBoundsAction = /** @class */ (function () {\n function InitializeCanvasBoundsAction(newCanvasBounds) {\n this.newCanvasBounds = newCanvasBounds;\n this.kind = InitializeCanvasBoundsCommand.KIND;\n }\n return InitializeCanvasBoundsAction;\n}());\nexports.InitializeCanvasBoundsAction = InitializeCanvasBoundsAction;\nvar InitializeCanvasBoundsCommand = /** @class */ (function (_super) {\n __extends(InitializeCanvasBoundsCommand, _super);\n function InitializeCanvasBoundsCommand(action) {\n var _this = _super.call(this) || this;\n _this.action = action;\n return _this;\n }\n InitializeCanvasBoundsCommand.prototype.execute = function (context) {\n this.oldCanvasBounds = context.root.canvasBounds;\n this.newCanvasBounds = this.action.newCanvasBounds;\n context.root.canvasBounds = this.newCanvasBounds;\n return context.root;\n };\n InitializeCanvasBoundsCommand.prototype.undo = function (context) {\n return context.root;\n };\n InitializeCanvasBoundsCommand.prototype.redo = function (context) {\n return context.root;\n };\n InitializeCanvasBoundsCommand.KIND = 'initializeCanvasBounds';\n return InitializeCanvasBoundsCommand;\n}(command_1.SystemCommand));\nexports.InitializeCanvasBoundsCommand = InitializeCanvasBoundsCommand;\n//# sourceMappingURL=initialize-canvas.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/features/initialize-canvas.js\n// module id = 60\n// module chunks = 0","\"use strict\";\n/*\n* Copyright (C) 2017 TypeFox and others.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar smodel_utils_1 = require(\"../../base/model/smodel-utils\");\nvar model_1 = require(\"./model\");\nvar inversify_1 = require(\"inversify\");\n/**\n * Sent from the client to the model source to recalculate a diagram when elements\n * are collapsed/expanded by the client.\n */\nvar CollapseExpandAction = /** @class */ (function () {\n function CollapseExpandAction(expandIds, collapseIds) {\n this.expandIds = expandIds;\n this.collapseIds = collapseIds;\n this.kind = CollapseExpandAction.KIND;\n }\n CollapseExpandAction.KIND = 'collapseExpand';\n return CollapseExpandAction;\n}());\nexports.CollapseExpandAction = CollapseExpandAction;\n/**\n * Programmatic action for expanding or collapsing all elements.\n */\nvar CollapseExpandAllAction = /** @class */ (function () {\n /**\n * If `expand` is true, all elements are expanded, othewise they are collapsed.\n */\n function CollapseExpandAllAction(expand) {\n if (expand === void 0) { expand = true; }\n this.expand = expand;\n this.kind = CollapseExpandAllAction.KIND;\n }\n CollapseExpandAllAction.KIND = 'collapseExpandAll';\n return CollapseExpandAllAction;\n}());\nexports.CollapseExpandAllAction = CollapseExpandAllAction;\nvar ExpandButtonHandler = /** @class */ (function () {\n function ExpandButtonHandler() {\n }\n ExpandButtonHandler.prototype.buttonPressed = function (button) {\n var expandable = smodel_utils_1.findParentByFeature(button, model_1.isExpandable);\n if (expandable !== undefined) {\n return [new CollapseExpandAction(expandable.expanded ? [] : [expandable.id], expandable.expanded ? [expandable.id] : [])];\n }\n else {\n return [];\n }\n };\n ExpandButtonHandler.TYPE = 'button:expand';\n ExpandButtonHandler = __decorate([\n inversify_1.injectable()\n ], ExpandButtonHandler);\n return ExpandButtonHandler;\n}());\nexports.ExpandButtonHandler = ExpandButtonHandler;\n//# sourceMappingURL=expand.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/expand/expand.js\n// module id = 61\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.exportFeature = Symbol('exportFeature');\nfunction isExportable(element) {\n return element.hasFeature(exports.exportFeature) && element['export'] !== undefined;\n}\nexports.isExportable = isExportable;\n//# sourceMappingURL=model.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/export/model.js\n// module id = 62\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hoverFeedbackFeature = Symbol('hoverFeedbackFeature');\nfunction isHoverable(element) {\n return element.hasFeature(exports.hoverFeedbackFeature);\n}\nexports.isHoverable = isHoverable;\nexports.popupFeature = Symbol('popupFeature');\nfunction hasPopupFeature(element) {\n return element.hasFeature(exports.popupFeature);\n}\nexports.hasPopupFeature = hasPopupFeature;\n//# sourceMappingURL=model.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/hover/model.js\n// module id = 63\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar smodel_1 = require(\"../../base/model/smodel\");\nvar smodel_2 = require(\"../../base/model/smodel\");\nvar smodel_utils_1 = require(\"../../base/model/smodel-utils\");\nvar command_1 = require(\"../../base/commands/command\");\nvar animation_1 = require(\"../../base/animations/animation\");\nvar mouse_tool_1 = require(\"../../base/views/mouse-tool\");\nvar vnode_utils_1 = require(\"../../base/views/vnode-utils\");\nvar model_1 = require(\"../viewport/model\");\nvar model_2 = require(\"../select/model\");\nvar model_3 = require(\"./model\");\nvar model_4 = require(\"../bounds/model\");\nvar inversify_1 = require(\"inversify\");\nvar MoveAction = /** @class */ (function () {\n function MoveAction(moves, animate) {\n if (animate === void 0) { animate = true; }\n this.moves = moves;\n this.animate = animate;\n this.kind = MoveCommand.KIND;\n }\n return MoveAction;\n}());\nexports.MoveAction = MoveAction;\nvar MoveCommand = /** @class */ (function (_super) {\n __extends(MoveCommand, _super);\n function MoveCommand(action) {\n var _this = _super.call(this) || this;\n _this.action = action;\n _this.resolvedMoves = new Map;\n return _this;\n }\n MoveCommand.prototype.execute = function (context) {\n var _this = this;\n var model = context.root;\n this.action.moves.forEach(function (move) {\n var resolvedMove = _this.resolve(move, model.index);\n if (resolvedMove) {\n _this.resolvedMoves.set(resolvedMove.elementId, resolvedMove);\n if (!_this.action.animate) {\n resolvedMove.element.position = move.toPosition;\n }\n }\n });\n if (this.action.animate)\n return new MoveAnimation(model, this.resolvedMoves, context, false).start();\n else\n return model;\n };\n MoveCommand.prototype.resolve = function (move, index) {\n var element = index.getById(move.elementId);\n if (element) {\n var fromPosition = move.fromPosition || { x: element.position.x, y: element.position.y };\n return {\n fromPosition: fromPosition,\n elementId: move.elementId,\n element: element,\n toPosition: move.toPosition\n };\n }\n return undefined;\n };\n MoveCommand.prototype.undo = function (context) {\n return new MoveAnimation(context.root, this.resolvedMoves, context, true).start();\n };\n MoveCommand.prototype.redo = function (context) {\n return new MoveAnimation(context.root, this.resolvedMoves, context, false).start();\n };\n MoveCommand.prototype.merge = function (command, context) {\n var _this = this;\n if (!this.action.animate && command instanceof MoveCommand) {\n command.action.moves.forEach(function (otherMove) {\n var existingMove = _this.resolvedMoves.get(otherMove.elementId);\n if (existingMove) {\n existingMove.toPosition = otherMove.toPosition;\n }\n else {\n var resolvedMove = _this.resolve(otherMove, context.root.index);\n if (resolvedMove)\n _this.resolvedMoves.set(resolvedMove.elementId, resolvedMove);\n }\n });\n return true;\n }\n return false;\n };\n MoveCommand.KIND = 'move';\n return MoveCommand;\n}(command_1.MergeableCommand));\nexports.MoveCommand = MoveCommand;\nvar MoveAnimation = /** @class */ (function (_super) {\n __extends(MoveAnimation, _super);\n function MoveAnimation(model, elementMoves, context, reverse) {\n if (reverse === void 0) { reverse = false; }\n var _this = _super.call(this, context) || this;\n _this.model = model;\n _this.elementMoves = elementMoves;\n _this.reverse = reverse;\n return _this;\n }\n MoveAnimation.prototype.tween = function (t) {\n var _this = this;\n this.elementMoves.forEach(function (elementMove) {\n if (_this.reverse) {\n elementMove.element.position = {\n x: (1 - t) * elementMove.toPosition.x + t * elementMove.fromPosition.x,\n y: (1 - t) * elementMove.toPosition.y + t * elementMove.fromPosition.y\n };\n }\n else {\n elementMove.element.position = {\n x: (1 - t) * elementMove.fromPosition.x + t * elementMove.toPosition.x,\n y: (1 - t) * elementMove.fromPosition.y + t * elementMove.toPosition.y\n };\n }\n });\n return this.model;\n };\n return MoveAnimation;\n}(animation_1.Animation));\nexports.MoveAnimation = MoveAnimation;\nvar MoveMouseListener = /** @class */ (function (_super) {\n __extends(MoveMouseListener, _super);\n function MoveMouseListener() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.hasDragged = false;\n return _this;\n }\n MoveMouseListener.prototype.mouseDown = function (target, event) {\n if (event.button === 0) {\n if (model_3.isMoveable(target)) {\n this.lastDragPosition = { x: event.pageX, y: event.pageY };\n }\n else {\n this.lastDragPosition = undefined;\n }\n this.hasDragged = false;\n }\n return [];\n };\n MoveMouseListener.prototype.mouseMove = function (target, event) {\n if (event.buttons === 0)\n this.mouseUp(target, event);\n else if (this.lastDragPosition) {\n var viewport = smodel_utils_1.findParentByFeature(target, model_1.isViewport);\n this.hasDragged = true;\n var zoom = viewport ? viewport.zoom : 1;\n var dx_1 = (event.pageX - this.lastDragPosition.x) / zoom;\n var dy_1 = (event.pageY - this.lastDragPosition.y) / zoom;\n var root = target.root;\n var nodeMoves_1 = [];\n root\n .index\n .all()\n .filter(function (element) { return model_2.isSelectable(element) && element.selected; })\n .forEach(function (element) {\n if (model_3.isMoveable(element)) {\n nodeMoves_1.push({\n elementId: element.id,\n toPosition: {\n x: element.position.x + dx_1,\n y: element.position.y + dy_1\n }\n });\n }\n });\n this.lastDragPosition = { x: event.pageX, y: event.pageY };\n if (nodeMoves_1.length > 0)\n return [new MoveAction(nodeMoves_1, false)];\n }\n return [];\n };\n MoveMouseListener.prototype.mouseEnter = function (target, event) {\n if (target instanceof smodel_2.SModelRoot && event.buttons === 0)\n this.mouseUp(target, event);\n return [];\n };\n MoveMouseListener.prototype.mouseUp = function (target, event) {\n this.hasDragged = false;\n this.lastDragPosition = undefined;\n return [];\n };\n MoveMouseListener.prototype.decorate = function (vnode, element) {\n return vnode;\n };\n return MoveMouseListener;\n}(mouse_tool_1.MouseListener));\nexports.MoveMouseListener = MoveMouseListener;\nvar LocationDecorator = /** @class */ (function () {\n function LocationDecorator() {\n }\n LocationDecorator.prototype.decorate = function (vnode, element) {\n var translate = '';\n if (model_3.isLocateable(element) && element instanceof smodel_1.SChildElement && element.parent !== undefined) {\n translate = 'translate(' + element.position.x + ', ' + element.position.y + ')';\n }\n if (model_4.isAlignable(element)) {\n if (translate.length > 0)\n translate += ' ';\n translate += 'translate(' + element.alignment.x + ', ' + element.alignment.y + ')';\n }\n if (translate.length > 0)\n vnode_utils_1.setAttr(vnode, 'transform', translate);\n return vnode;\n };\n LocationDecorator.prototype.postUpdate = function () {\n };\n LocationDecorator = __decorate([\n inversify_1.injectable()\n ], LocationDecorator);\n return LocationDecorator;\n}());\nexports.LocationDecorator = LocationDecorator;\n//# sourceMappingURL=move.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/move/move.js\n// module id = 64\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Returns whether the mouse or keyboard event includes the CMD key\n * on Mac or CTRL key on Linux / others\n */\nfunction isCtrlOrCmd(event) {\n if (isMac())\n return event.metaKey;\n else\n return event.ctrlKey;\n}\nexports.isCtrlOrCmd = isCtrlOrCmd;\nfunction isMac() {\n return window.navigator.userAgent.indexOf(\"Mac\") !== -1;\n}\nexports.isMac = isMac;\nfunction isCrossSite(url) {\n if (url && typeof window !== 'undefined' && window.location) {\n var baseURL = '';\n if (window.location.protocol)\n baseURL += window.location.protocol + '//';\n if (window.location.host)\n baseURL += window.location.host;\n return baseURL.length > 0 && !url.startsWith(baseURL);\n }\n return false;\n}\nexports.isCrossSite = isCrossSite;\n//# sourceMappingURL=browser.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/utils/browser.js\n// module id = 65\n// module chunks = 0","module.exports = function (it, Constructor, name, forbiddenField) {\n if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_an-instance.js\n// module id = 66\n// module chunks = 0","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_classof.js\n// module id = 67\n// module chunks = 0","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_dom-create.js\n// module id = 68\n// module chunks = 0","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_enum-bug-keys.js\n// module id = 69\n// module chunks = 0","var MATCH = require('./_wks')('match');\nmodule.exports = function (KEY) {\n var re = /./;\n try {\n '/./'[KEY](re);\n } catch (e) {\n try {\n re[MATCH] = false;\n return !'/./'[KEY](re);\n } catch (f) { /* empty */ }\n } return true;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_fails-is-regexp.js\n// module id = 70\n// module chunks = 0","var ctx = require('./_ctx');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar getIterFn = require('./core.get-iterator-method');\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var length, step, iterator, result;\n if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if (result === BREAK || result === RETURN) return result;\n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n result = call(iterator, f, step.value, entries);\n if (result === BREAK || result === RETURN) return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_for-of.js\n// module id = 71\n// module chunks = 0","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = (!BUGGY && $native) || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_iter-define.js\n// module id = 72\n// module chunks = 0","var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !require('./_fails')(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_meta.js\n// module id = 73\n// module chunks = 0","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-create.js\n// module id = 74\n// module chunks = 0","exports.f = {}.propertyIsEnumerable;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-pie.js\n// module id = 75\n// module chunks = 0","var redefine = require('./_redefine');\nmodule.exports = function (target, src, safe) {\n for (var key in src) redefine(target, key, src[key], safe);\n return target;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_redefine-all.js\n// module id = 76\n// module chunks = 0","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_shared-key.js\n// module id = 77\n// module chunks = 0","var global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function (key) {\n return store[key] || (store[key] = {});\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_shared.js\n// module id = 78\n// module chunks = 0","// helper for String#{startsWith, endsWith, includes}\nvar isRegExp = require('./_is-regexp');\nvar defined = require('./_defined');\n\nmodule.exports = function (that, searchString, NAME) {\n if (isRegExp(searchString)) throw TypeError('String#' + NAME + \" doesn't accept regex!\");\n return String(defined(that));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_string-context.js\n// module id = 79\n// module chunks = 0","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_to-primitive.js\n// module id = 80\n// module chunks = 0","'use strict';\n// 19.1.3.6 Object.prototype.toString()\nvar classof = require('./_classof');\nvar test = {};\ntest[require('./_wks')('toStringTag')] = 'z';\nif (test + '' != '[object z]') {\n require('./_redefine')(Object.prototype, 'toString', function toString() {\n return '[object ' + classof(this) + ']';\n }, true);\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.object.to-string.js\n// module id = 81\n// module chunks = 0","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.iterator.js\n// module id = 82\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar binding_when_syntax_1 = require(\"./binding_when_syntax\");\nvar BindingOnSyntax = (function () {\n function BindingOnSyntax(binding) {\n this._binding = binding;\n }\n BindingOnSyntax.prototype.onActivation = function (handler) {\n this._binding.onActivation = handler;\n return new binding_when_syntax_1.BindingWhenSyntax(this._binding);\n };\n return BindingOnSyntax;\n}());\nexports.BindingOnSyntax = BindingOnSyntax;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/syntax/binding_on_syntax.js\n// module id = 83\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar binding_on_syntax_1 = require(\"./binding_on_syntax\");\nvar constraint_helpers_1 = require(\"./constraint_helpers\");\nvar BindingWhenSyntax = (function () {\n function BindingWhenSyntax(binding) {\n this._binding = binding;\n }\n BindingWhenSyntax.prototype.when = function (constraint) {\n this._binding.constraint = constraint;\n return new binding_on_syntax_1.BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenTargetNamed = function (name) {\n this._binding.constraint = constraint_helpers_1.namedConstraint(name);\n return new binding_on_syntax_1.BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenTargetIsDefault = function () {\n this._binding.constraint = function (request) {\n var targetIsDefault = (request.target !== null) &&\n (!request.target.isNamed()) &&\n (!request.target.isTagged());\n return targetIsDefault;\n };\n return new binding_on_syntax_1.BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenTargetTagged = function (tag, value) {\n this._binding.constraint = constraint_helpers_1.taggedConstraint(tag)(value);\n return new binding_on_syntax_1.BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenInjectedInto = function (parent) {\n this._binding.constraint = function (request) {\n return constraint_helpers_1.typeConstraint(parent)(request.parentRequest);\n };\n return new binding_on_syntax_1.BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenParentNamed = function (name) {\n this._binding.constraint = function (request) {\n return constraint_helpers_1.namedConstraint(name)(request.parentRequest);\n };\n return new binding_on_syntax_1.BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenParentTagged = function (tag, value) {\n this._binding.constraint = function (request) {\n return constraint_helpers_1.taggedConstraint(tag)(value)(request.parentRequest);\n };\n return new binding_on_syntax_1.BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenAnyAncestorIs = function (ancestor) {\n this._binding.constraint = function (request) {\n return constraint_helpers_1.traverseAncerstors(request, constraint_helpers_1.typeConstraint(ancestor));\n };\n return new binding_on_syntax_1.BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenNoAncestorIs = function (ancestor) {\n this._binding.constraint = function (request) {\n return !constraint_helpers_1.traverseAncerstors(request, constraint_helpers_1.typeConstraint(ancestor));\n };\n return new binding_on_syntax_1.BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenAnyAncestorNamed = function (name) {\n this._binding.constraint = function (request) {\n return constraint_helpers_1.traverseAncerstors(request, constraint_helpers_1.namedConstraint(name));\n };\n return new binding_on_syntax_1.BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenNoAncestorNamed = function (name) {\n this._binding.constraint = function (request) {\n return !constraint_helpers_1.traverseAncerstors(request, constraint_helpers_1.namedConstraint(name));\n };\n return new binding_on_syntax_1.BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenAnyAncestorTagged = function (tag, value) {\n this._binding.constraint = function (request) {\n return constraint_helpers_1.traverseAncerstors(request, constraint_helpers_1.taggedConstraint(tag)(value));\n };\n return new binding_on_syntax_1.BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenNoAncestorTagged = function (tag, value) {\n this._binding.constraint = function (request) {\n return !constraint_helpers_1.traverseAncerstors(request, constraint_helpers_1.taggedConstraint(tag)(value));\n };\n return new binding_on_syntax_1.BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenAnyAncestorMatches = function (constraint) {\n this._binding.constraint = function (request) {\n return constraint_helpers_1.traverseAncerstors(request, constraint);\n };\n return new binding_on_syntax_1.BindingOnSyntax(this._binding);\n };\n BindingWhenSyntax.prototype.whenNoAncestorMatches = function (constraint) {\n this._binding.constraint = function (request) {\n return !constraint_helpers_1.traverseAncerstors(request, constraint);\n };\n return new binding_on_syntax_1.BindingOnSyntax(this._binding);\n };\n return BindingWhenSyntax;\n}());\nexports.BindingWhenSyntax = BindingWhenSyntax;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/syntax/binding_when_syntax.js\n// module id = 84\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../types\");\nvar smodel_factory_1 = require(\"../model/smodel-factory\");\nvar animation_frame_syncer_1 = require(\"../animations/animation-frame-syncer\");\nvar set_model_1 = require(\"../features/set-model\");\nvar undo_redo_1 = require(\"../../features/undo-redo/undo-redo\");\nvar action_1 = require(\"./action\");\nvar action_handler_1 = require(\"./action-handler\");\n/**\n * Collects actions, converts them to commands and dispatches them.\n * Also acts as the proxy to model sources such as diagram servers.\n */\nvar ActionDispatcher = /** @class */ (function () {\n function ActionDispatcher(actionHandlerRegistry, commandStack, logger, syncer) {\n this.actionHandlerRegistry = actionHandlerRegistry;\n this.commandStack = commandStack;\n this.logger = logger;\n this.syncer = syncer;\n this.postponedActions = [];\n var initialCommand = new set_model_1.SetModelCommand(new set_model_1.SetModelAction(smodel_factory_1.EMPTY_ROOT, true));\n this.blockUntilActionKind = initialCommand.blockUntilActionKind;\n this.commandStack.execute(initialCommand);\n }\n ActionDispatcher.prototype.dispatchAll = function (actions) {\n var _this = this;\n actions.forEach(function (action) { return _this.dispatch(action); });\n };\n ActionDispatcher.prototype.dispatch = function (action, onExecute) {\n var _this = this;\n if (action.kind === this.blockUntilActionKind) {\n this.blockUntilActionKind = undefined;\n this.handleAction(action);\n var actions = this.postponedActions;\n this.postponedActions = [];\n actions.forEach(function (a) { return _this.dispatch(a.action, a.onExecute); });\n return;\n }\n if (this.blockUntilActionKind !== undefined) {\n this.logger.log(this, 'waiting for ' + this.blockUntilActionKind + '. postponing', action);\n this.postponedActions.push({\n action: action,\n onExecute: onExecute\n });\n return;\n }\n if (onExecute !== undefined)\n onExecute.call(null, action);\n if (action.kind === undo_redo_1.UndoAction.KIND) {\n this.commandStack.undo();\n }\n else if (action.kind === undo_redo_1.RedoAction.KIND) {\n this.commandStack.redo();\n }\n else {\n this.handleAction(action);\n }\n };\n ActionDispatcher.prototype.handleAction = function (action) {\n this.logger.log(this, 'handle', action);\n var handlers = this.actionHandlerRegistry.get(action.kind);\n if (handlers.length > 0) {\n for (var _i = 0, handlers_1 = handlers; _i < handlers_1.length; _i++) {\n var handler = handlers_1[_i];\n var result = handler.handle(action);\n if (action_1.isAction(result))\n this.dispatch(result);\n else if (result !== undefined) {\n this.commandStack.execute(result);\n this.blockUntilActionKind = result.blockUntilActionKind;\n }\n }\n }\n else {\n this.logger.warn(this, 'missing handler for action', action);\n }\n };\n ActionDispatcher = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.ActionHandlerRegistry)),\n __param(1, inversify_1.inject(types_1.TYPES.ICommandStack)),\n __param(2, inversify_1.inject(types_1.TYPES.ILogger)),\n __param(3, inversify_1.inject(types_1.TYPES.AnimationFrameSyncer)),\n __metadata(\"design:paramtypes\", [action_handler_1.ActionHandlerRegistry, Object, Object, animation_frame_syncer_1.AnimationFrameSyncer])\n ], ActionDispatcher);\n return ActionDispatcher;\n}());\nexports.ActionDispatcher = ActionDispatcher;\n//# sourceMappingURL=action-dispatcher.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/actions/action-dispatcher.js\n// module id = 85\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction isAction(object) {\n return object !== undefined && object.hasOwnProperty('kind') && typeof (object['kind']) === 'string';\n}\nexports.isAction = isAction;\n//# sourceMappingURL=action.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/actions/action.js\n// module id = 86\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../types\");\nvar smodel_factory_1 = require(\"./smodel-factory\");\nvar SModelStorage = /** @class */ (function () {\n function SModelStorage() {\n this.localCache = new Map;\n }\n SModelStorage.prototype.store = function (root) {\n if (this.isLocalStorageAvailable())\n localStorage.setItem(this.key, JSON.stringify(root));\n else\n this.localCache.set(this.key, JSON.stringify(root));\n };\n SModelStorage.prototype.load = function () {\n var schema = (this.isLocalStorageAvailable())\n ? localStorage.getItem(this.key)\n : this.localCache.get(this.key);\n if (schema)\n return JSON.parse(schema);\n else\n return smodel_factory_1.EMPTY_ROOT;\n };\n SModelStorage.prototype.isLocalStorageAvailable = function () {\n try {\n return typeof localStorage === 'object' && localStorage !== null;\n }\n catch (e) {\n return false;\n }\n };\n Object.defineProperty(SModelStorage.prototype, \"key\", {\n get: function () {\n return this.viewerOptions.baseDiv;\n },\n enumerable: true,\n configurable: true\n });\n __decorate([\n inversify_1.inject(types_1.TYPES.ViewerOptions),\n __metadata(\"design:type\", Object)\n ], SModelStorage.prototype, \"viewerOptions\", void 0);\n SModelStorage = __decorate([\n inversify_1.injectable()\n ], SModelStorage);\n return SModelStorage;\n}());\nexports.SModelStorage = SModelStorage;\n//# sourceMappingURL=smodel-storage.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/model/smodel-storage.js\n// module id = 87\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../types\");\nvar DOMHelper = /** @class */ (function () {\n function DOMHelper(viewerOptions) {\n this.viewerOptions = viewerOptions;\n }\n DOMHelper.prototype.getPrefix = function () {\n var prefix = this.viewerOptions !== undefined && this.viewerOptions.baseDiv !== undefined ?\n this.viewerOptions.baseDiv + \"_\" : \"\";\n return prefix;\n };\n DOMHelper.prototype.createUniqueDOMElementId = function (element) {\n return this.getPrefix() + element.id;\n };\n DOMHelper.prototype.findSModelIdByDOMElement = function (element) {\n return element.id.replace(this.getPrefix(), '');\n };\n DOMHelper = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.ViewerOptions)),\n __metadata(\"design:paramtypes\", [Object])\n ], DOMHelper);\n return DOMHelper;\n}());\nexports.DOMHelper = DOMHelper;\n//# sourceMappingURL=dom-helper.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/views/dom-helper.js\n// module id = 88\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar geometry_1 = require(\"../../utils/geometry\");\nvar smodel_1 = require(\"../../base/model/smodel\");\nvar model_1 = require(\"./model\");\nvar AbstractLayout = /** @class */ (function () {\n function AbstractLayout() {\n }\n AbstractLayout.prototype.layout = function (container, layouter) {\n var boundsData = layouter.getBoundsData(container);\n var options = this.getLayoutOptions(container);\n var childrenSize = this.getChildrenSize(container, options, layouter);\n var maxWidth = options.paddingFactor * (options.resizeContainer\n ? childrenSize.width\n : Math.max(0, this.getFixedContainerBounds(container, options, layouter).width) - options.paddingLeft - options.paddingRight);\n var maxHeight = options.paddingFactor * (options.resizeContainer\n ? childrenSize.height\n : Math.max(0, this.getFixedContainerBounds(container, options, layouter).height) - options.paddingTop - options.paddingBottom);\n if (maxWidth > 0 && maxHeight > 0) {\n var offset = this.layoutChildren(container, layouter, options, maxWidth, maxHeight);\n boundsData.bounds = this.getFinalContainerBounds(container, offset, options, maxWidth, maxHeight);\n boundsData.boundsChanged = true;\n }\n };\n AbstractLayout.prototype.getFinalContainerBounds = function (container, lastOffset, options, maxWidth, maxHeight) {\n return {\n x: container.bounds.x,\n y: container.bounds.y,\n width: maxWidth + options.paddingLeft + options.paddingRight,\n height: maxHeight + options.paddingTop + options.paddingBottom\n };\n };\n AbstractLayout.prototype.getFixedContainerBounds = function (container, layoutOptions, layouter) {\n var currentContainer = container;\n while (true) {\n if (model_1.isBoundsAware(currentContainer)) {\n var bounds = currentContainer.bounds;\n if (model_1.isLayoutContainer(currentContainer) && layoutOptions.resizeContainer)\n layouter.log.error(currentContainer, 'Resizable container found while detecting fixed bounds');\n if (geometry_1.isValidDimension(bounds))\n return bounds;\n }\n if (currentContainer instanceof smodel_1.SChildElement) {\n currentContainer = currentContainer.parent;\n }\n else {\n layouter.log.error(currentContainer, 'Cannot detect fixed bounds');\n return geometry_1.EMPTY_BOUNDS;\n }\n }\n };\n AbstractLayout.prototype.layoutChildren = function (container, layouter, containerOptions, maxWidth, maxHeight) {\n var _this = this;\n var currentOffset = {\n x: containerOptions.paddingLeft + 0.5 * (maxWidth - (maxWidth / containerOptions.paddingFactor)),\n y: containerOptions.paddingTop + 0.5 * (maxHeight - (maxHeight / containerOptions.paddingFactor))\n };\n container.children.forEach(function (child) {\n if (model_1.isLayoutableChild(child)) {\n var boundsData = layouter.getBoundsData(child);\n var bounds = boundsData.bounds;\n var childOptions = _this.getChildLayoutOptions(child, containerOptions);\n if (bounds !== undefined && geometry_1.isValidDimension(bounds)) {\n currentOffset = _this.layoutChild(child, boundsData, bounds, childOptions, containerOptions, currentOffset, maxWidth, maxHeight);\n }\n }\n });\n return currentOffset;\n };\n AbstractLayout.prototype.getDx = function (hAlign, bounds, maxWidth) {\n switch (hAlign) {\n case 'left':\n return 0;\n case 'center':\n return 0.5 * (maxWidth - bounds.width);\n case 'right':\n return maxWidth - bounds.width;\n }\n };\n AbstractLayout.prototype.getDy = function (vAlign, bounds, maxHeight) {\n switch (vAlign) {\n case 'top':\n return 0;\n case 'center':\n return 0.5 * (maxHeight - bounds.height);\n case 'bottom':\n return maxHeight - bounds.height;\n }\n };\n AbstractLayout.prototype.getChildLayoutOptions = function (child, containerOptions) {\n var layoutOptions = child.layoutOptions;\n if (layoutOptions === undefined)\n return containerOptions;\n else\n return this.spread(containerOptions, layoutOptions);\n };\n AbstractLayout.prototype.getLayoutOptions = function (element) {\n var _this = this;\n var current = element;\n var allOptions = [];\n while (current !== undefined) {\n var layoutOptions = current.layoutOptions;\n if (layoutOptions !== undefined)\n allOptions.push(layoutOptions);\n if (current instanceof smodel_1.SChildElement)\n current = current.parent;\n else\n break;\n }\n return allOptions.reverse().reduce(function (a, b) { return _this.spread(a, b); }, this.getDefaultLayoutOptions());\n };\n return AbstractLayout;\n}());\nexports.AbstractLayout = AbstractLayout;\n//# sourceMappingURL=abstract-layout.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/bounds/abstract-layout.js\n// module id = 89\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../../base/types\");\nvar registry_1 = require(\"../../utils/registry\");\nvar geometry_1 = require(\"../../utils/geometry\");\nvar model_1 = require(\"./model\");\nvar vbox_layout_1 = require(\"./vbox-layout\");\nvar hbox_layout_1 = require(\"./hbox-layout\");\nvar stack_layout_1 = require(\"./stack-layout\");\nvar LayoutRegistry = /** @class */ (function (_super) {\n __extends(LayoutRegistry, _super);\n function LayoutRegistry() {\n var _this = _super.call(this) || this;\n _this.register(vbox_layout_1.VBoxLayouter.KIND, new vbox_layout_1.VBoxLayouter());\n _this.register(hbox_layout_1.HBoxLayouter.KIND, new hbox_layout_1.HBoxLayouter());\n _this.register(stack_layout_1.StackLayouter.KIND, new stack_layout_1.StackLayouter());\n return _this;\n }\n return LayoutRegistry;\n}(registry_1.InstanceRegistry));\nexports.LayoutRegistry = LayoutRegistry;\nvar Layouter = /** @class */ (function () {\n function Layouter(layoutRegistry, logger) {\n this.layoutRegistry = layoutRegistry;\n this.logger = logger;\n }\n Layouter.prototype.layout = function (element2boundsData) {\n new StatefulLayouter(element2boundsData, this.layoutRegistry, this.logger).layout();\n };\n Layouter = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.LayoutRegistry)),\n __param(1, inversify_1.inject(types_1.TYPES.ILogger)),\n __metadata(\"design:paramtypes\", [LayoutRegistry, Object])\n ], Layouter);\n return Layouter;\n}());\nexports.Layouter = Layouter;\nvar StatefulLayouter = /** @class */ (function () {\n function StatefulLayouter(element2boundsData, layoutRegistry, log) {\n var _this = this;\n this.element2boundsData = element2boundsData;\n this.layoutRegistry = layoutRegistry;\n this.log = log;\n this.toBeLayouted = [];\n element2boundsData.forEach(function (data, element) {\n if (model_1.isLayoutContainer(element))\n _this.toBeLayouted.push(element);\n });\n }\n StatefulLayouter.prototype.getBoundsData = function (element) {\n var boundsData = this.element2boundsData.get(element);\n var bounds = element.bounds;\n if (model_1.isLayoutContainer(element) && this.toBeLayouted.indexOf(element) >= 0) {\n bounds = this.doLayout(element);\n }\n if (!boundsData) {\n boundsData = {\n bounds: bounds,\n boundsChanged: false,\n alignmentChanged: false\n };\n this.element2boundsData.set(element, boundsData);\n }\n return boundsData;\n };\n StatefulLayouter.prototype.layout = function () {\n while (this.toBeLayouted.length > 0) {\n var element = this.toBeLayouted[0];\n this.doLayout(element);\n }\n };\n StatefulLayouter.prototype.doLayout = function (element) {\n var index = this.toBeLayouted.indexOf(element);\n if (index >= 0)\n this.toBeLayouted.splice(index, 1);\n var layout = this.layoutRegistry.get(element.layout);\n if (layout)\n layout.layout(element, this);\n var boundsData = this.element2boundsData.get(element);\n if (boundsData !== undefined && boundsData.bounds !== undefined) {\n return boundsData.bounds;\n }\n else {\n this.log.error(element, 'Layout failed');\n return geometry_1.EMPTY_BOUNDS;\n }\n };\n return StatefulLayouter;\n}());\nexports.StatefulLayouter = StatefulLayouter;\n//# sourceMappingURL=layout.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/bounds/layout.js\n// module id = 90\n// module chunks = 0","\"use strict\";\n/*\n* Copyright (C) 2017 TypeFox and others.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n*/\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar registry_1 = require(\"../../utils/registry\");\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../../base/types\");\nvar ButtonHandlerRegistry = /** @class */ (function (_super) {\n __extends(ButtonHandlerRegistry, _super);\n function ButtonHandlerRegistry(buttonHandlerFactories) {\n var _this = _super.call(this) || this;\n buttonHandlerFactories.forEach(function (factory) { return _this.register(factory.TYPE, new factory()); });\n return _this;\n }\n ButtonHandlerRegistry = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.multiInject(types_1.TYPES.IButtonHandler)), __param(0, inversify_1.optional()),\n __metadata(\"design:paramtypes\", [Array])\n ], ButtonHandlerRegistry);\n return ButtonHandlerRegistry;\n}(registry_1.InstanceRegistry));\nexports.ButtonHandlerRegistry = ButtonHandlerRegistry;\n//# sourceMappingURL=button-handler.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/button/button-handler.js\n// module id = 91\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar model_1 = require(\"../bounds/model\");\nvar model_2 = require(\"../fade/model\");\nvar SButton = /** @class */ (function (_super) {\n __extends(SButton, _super);\n function SButton() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.enabled = true;\n return _this;\n }\n SButton.prototype.hasFeature = function (feature) {\n return feature === model_1.boundsFeature || feature === model_2.fadeFeature || feature === model_1.layoutableChildFeature;\n };\n return SButton;\n}(model_1.SShapeElement));\nexports.SButton = SButton;\n//# sourceMappingURL=model.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/button/model.js\n// module id = 92\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.expandFeature = Symbol('expandFeature');\nfunction isExpandable(element) {\n return 'expanded' in element && element.hasFeature(exports.expandFeature);\n}\nexports.isExpandable = isExpandable;\n//# sourceMappingURL=model.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/expand/model.js\n// module id = 93\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar animation_1 = require(\"../../base/animations/animation\");\nvar smodel_1 = require(\"../../base/model/smodel\");\nvar vnode_utils_1 = require(\"../../base/views/vnode-utils\");\nvar model_1 = require(\"./model\");\nvar FadeAnimation = /** @class */ (function (_super) {\n __extends(FadeAnimation, _super);\n function FadeAnimation(model, elementFades, context, removeAfterFadeOut) {\n if (removeAfterFadeOut === void 0) { removeAfterFadeOut = false; }\n var _this = _super.call(this, context) || this;\n _this.model = model;\n _this.elementFades = elementFades;\n _this.removeAfterFadeOut = removeAfterFadeOut;\n return _this;\n }\n FadeAnimation.prototype.tween = function (t, context) {\n for (var _i = 0, _a = this.elementFades; _i < _a.length; _i++) {\n var elementFade = _a[_i];\n var element = elementFade.element;\n if (elementFade.type === 'in') {\n element.opacity = t;\n }\n else if (elementFade.type === 'out') {\n element.opacity = 1 - t;\n if (t === 1 && this.removeAfterFadeOut && element instanceof smodel_1.SChildElement) {\n element.parent.remove(element);\n }\n }\n }\n return this.model;\n };\n return FadeAnimation;\n}(animation_1.Animation));\nexports.FadeAnimation = FadeAnimation;\nvar ElementFader = /** @class */ (function () {\n function ElementFader() {\n }\n ElementFader.prototype.decorate = function (vnode, element) {\n if (model_1.isFadeable(element)) {\n vnode_utils_1.setAttr(vnode, 'opacity', element.opacity);\n }\n return vnode;\n };\n ElementFader.prototype.postUpdate = function () {\n };\n ElementFader = __decorate([\n inversify_1.injectable()\n ], ElementFader);\n return ElementFader;\n}());\nexports.ElementFader = ElementFader;\n//# sourceMappingURL=fade.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/fade/fade.js\n// module id = 94\n// module chunks = 0","\"use strict\";\n/*\n* Copyright (C) 2017 TypeFox and others.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n*/\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar mouse_tool_1 = require(\"../../base/views/mouse-tool\");\nvar smodel_utils_1 = require(\"../../base/model/smodel-utils\");\nvar model_1 = require(\"./model\");\nvar OpenAction = /** @class */ (function () {\n function OpenAction(elementId) {\n this.elementId = elementId;\n this.kind = OpenAction.KIND;\n }\n OpenAction.KIND = 'open';\n return OpenAction;\n}());\nexports.OpenAction = OpenAction;\nvar OpenMouseListener = /** @class */ (function (_super) {\n __extends(OpenMouseListener, _super);\n function OpenMouseListener() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n OpenMouseListener.prototype.doubleClick = function (target, event) {\n var openableTarget = smodel_utils_1.findParentByFeature(target, model_1.isOpenable);\n if (openableTarget !== undefined) {\n return [new OpenAction(openableTarget.id)];\n }\n return [];\n };\n return OpenMouseListener;\n}(mouse_tool_1.MouseListener));\nexports.OpenMouseListener = OpenMouseListener;\n//# sourceMappingURL=open.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/open/open.js\n// module id = 95\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar browser_1 = require(\"../../utils/browser\");\nvar key_tool_1 = require(\"../../base/views/key-tool\");\nvar UndoAction = /** @class */ (function () {\n function UndoAction() {\n this.kind = UndoAction.KIND;\n }\n UndoAction.KIND = 'undo';\n return UndoAction;\n}());\nexports.UndoAction = UndoAction;\nvar RedoAction = /** @class */ (function () {\n function RedoAction() {\n this.kind = RedoAction.KIND;\n }\n RedoAction.KIND = 'redo';\n return RedoAction;\n}());\nexports.RedoAction = RedoAction;\nvar UndoRedoKeyListener = /** @class */ (function (_super) {\n __extends(UndoRedoKeyListener, _super);\n function UndoRedoKeyListener() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n UndoRedoKeyListener.prototype.keyDown = function (element, event) {\n if (browser_1.isCtrlOrCmd(event) && event.keyCode === 90) {\n if (event.shiftKey)\n return [new RedoAction];\n else\n return [new UndoAction];\n }\n return [];\n };\n return UndoRedoKeyListener;\n}(key_tool_1.KeyListener));\nexports.UndoRedoKeyListener = UndoRedoKeyListener;\n//# sourceMappingURL=undo-redo.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/undo-redo/undo-redo.js\n// module id = 96\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar smodel_1 = require(\"../../base/model/smodel\");\nvar ModelMatcher = /** @class */ (function () {\n function ModelMatcher() {\n }\n ModelMatcher.prototype.match = function (left, right) {\n var result = {};\n this.matchLeft(left, result);\n this.matchRight(right, result);\n return result;\n };\n ModelMatcher.prototype.matchLeft = function (element, result, parentId) {\n var match = result[element.id];\n if (match !== undefined) {\n match.left = element;\n match.leftParentId = parentId;\n }\n else {\n match = {\n left: element,\n leftParentId: parentId\n };\n result[element.id] = match;\n }\n if (element.children !== undefined) {\n for (var _i = 0, _a = element.children; _i < _a.length; _i++) {\n var child = _a[_i];\n this.matchLeft(child, result, element.id);\n }\n }\n };\n ModelMatcher.prototype.matchRight = function (element, result, parentId) {\n var match = result[element.id];\n if (match !== undefined) {\n match.right = element;\n match.rightParentId = parentId;\n }\n else {\n match = {\n right: element,\n rightParentId: parentId\n };\n result[element.id] = match;\n }\n if (element.children !== undefined) {\n for (var _i = 0, _a = element.children; _i < _a.length; _i++) {\n var child = _a[_i];\n this.matchRight(child, result, element.id);\n }\n }\n };\n return ModelMatcher;\n}());\nexports.ModelMatcher = ModelMatcher;\nfunction applyMatches(root, matches) {\n var index;\n if (root instanceof smodel_1.SModelRoot) {\n index = root.index;\n }\n else {\n index = new smodel_1.SModelIndex();\n index.add(root);\n }\n for (var _i = 0, matches_1 = matches; _i < matches_1.length; _i++) {\n var match = matches_1[_i];\n var newElementInserted = false;\n if (match.left !== undefined && match.leftParentId !== undefined) {\n var parent_1 = index.getById(match.leftParentId);\n if (parent_1 !== undefined && parent_1.children !== undefined) {\n var i = parent_1.children.indexOf(match.left);\n if (i >= 0) {\n if (match.right !== undefined && match.leftParentId === match.rightParentId) {\n parent_1.children.splice(i, 1, match.right);\n newElementInserted = true;\n }\n else {\n parent_1.children.splice(i, 1);\n }\n }\n index.remove(match.left);\n }\n }\n if (!newElementInserted && match.right !== undefined && match.rightParentId !== undefined) {\n var parent_2 = index.getById(match.rightParentId);\n if (parent_2 !== undefined) {\n if (parent_2.children === undefined)\n parent_2.children = [];\n parent_2.children.push(match.right);\n }\n }\n }\n}\nexports.applyMatches = applyMatches;\n//# sourceMappingURL=model-matching.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/update/model-matching.js\n// module id = 97\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar geometry_1 = require(\"../../utils/geometry\");\nvar animation_1 = require(\"../../base/animations/animation\");\nvar command_1 = require(\"../../base/commands/command\");\nvar fade_1 = require(\"../fade/fade\");\nvar smodel_1 = require(\"../../base/model/smodel\");\nvar move_1 = require(\"../move/move\");\nvar model_1 = require(\"../fade/model\");\nvar model_2 = require(\"../move/model\");\nvar model_3 = require(\"../bounds/model\");\nvar viewport_root_1 = require(\"../viewport/viewport-root\");\nvar model_4 = require(\"../select/model\");\nvar model_matching_1 = require(\"./model-matching\");\nvar resize_1 = require(\"../bounds/resize\");\n/**\n * Sent from the model source to the client in order to update the model. If no model is present yet,\n * this behaves the same as a SetModelAction. The transition from the old model to the new one can be animated.\n */\nvar UpdateModelAction = /** @class */ (function () {\n function UpdateModelAction(newRoot) {\n this.newRoot = newRoot;\n this.kind = UpdateModelCommand.KIND;\n this.animate = true;\n }\n return UpdateModelAction;\n}());\nexports.UpdateModelAction = UpdateModelAction;\nvar UpdateModelCommand = /** @class */ (function (_super) {\n __extends(UpdateModelCommand, _super);\n function UpdateModelCommand(action) {\n var _this = _super.call(this) || this;\n _this.action = action;\n if (action.animate === undefined)\n action.animate = true;\n return _this;\n }\n UpdateModelCommand.prototype.execute = function (context) {\n var newRoot;\n if (this.action.newRoot !== undefined) {\n newRoot = context.modelFactory.createRoot(this.action.newRoot);\n }\n else {\n newRoot = context.modelFactory.createRoot(context.root);\n if (this.action.matches !== undefined)\n this.applyMatches(newRoot, this.action.matches, context);\n }\n this.oldRoot = context.root;\n this.newRoot = newRoot;\n return this.performUpdate(this.oldRoot, this.newRoot, context);\n };\n UpdateModelCommand.prototype.performUpdate = function (oldRoot, newRoot, context) {\n if (this.action.animate && oldRoot.id === newRoot.id) {\n var matchResult = void 0;\n if (this.action.matches === undefined) {\n var matcher = new model_matching_1.ModelMatcher();\n matchResult = matcher.match(oldRoot, newRoot);\n }\n else {\n matchResult = this.convertToMatchResult(this.action.matches, oldRoot, newRoot);\n }\n var animationOrRoot = this.computeAnimation(newRoot, matchResult, context);\n if (animationOrRoot instanceof animation_1.Animation)\n return animationOrRoot.start();\n else\n return animationOrRoot;\n }\n else {\n newRoot.canvasBounds = oldRoot.canvasBounds;\n return newRoot;\n }\n };\n UpdateModelCommand.prototype.applyMatches = function (root, matches, context) {\n var index = root.index;\n for (var _i = 0, matches_1 = matches; _i < matches_1.length; _i++) {\n var match = matches_1[_i];\n if (match.left !== undefined) {\n var element = index.getById(match.left.id);\n if (element instanceof smodel_1.SChildElement)\n element.parent.remove(element);\n }\n if (match.right !== undefined) {\n var element = context.modelFactory.createElement(match.right);\n var parent_1 = void 0;\n if (match.rightParentId !== undefined)\n parent_1 = index.getById(match.rightParentId);\n if (parent_1 instanceof smodel_1.SParentElement)\n parent_1.add(element);\n else\n root.add(element);\n }\n }\n };\n UpdateModelCommand.prototype.convertToMatchResult = function (matches, leftRoot, rightRoot) {\n var result = {};\n for (var _i = 0, matches_2 = matches; _i < matches_2.length; _i++) {\n var match = matches_2[_i];\n var converted = {};\n var id = undefined;\n if (match.left !== undefined) {\n id = match.left.id;\n converted.left = leftRoot.index.getById(id);\n converted.leftParentId = match.leftParentId;\n }\n if (match.right !== undefined) {\n id = match.right.id;\n converted.right = rightRoot.index.getById(id);\n converted.rightParentId = match.rightParentId;\n }\n if (id !== undefined)\n result[id] = converted;\n }\n return result;\n };\n UpdateModelCommand.prototype.computeAnimation = function (newRoot, matchResult, context) {\n var animationData = {\n fades: []\n };\n for (var id in matchResult) {\n var match = matchResult[id];\n if (match.left !== undefined && match.right !== undefined) {\n // The element is still there, but may have been moved\n this.updateElement(match.left, match.right, animationData);\n }\n else if (match.right !== undefined) {\n // An element has been added\n var right = match.right;\n if (model_1.isFadeable(right)) {\n right.opacity = 0;\n animationData.fades.push({\n element: right,\n type: 'in'\n });\n }\n }\n else if (match.left instanceof smodel_1.SChildElement) {\n // An element has been removed\n var left = match.left;\n if (model_1.isFadeable(left) && match.leftParentId !== undefined) {\n if (newRoot.index.getById(left.id) === undefined) {\n var parent_2 = newRoot.index.getById(match.leftParentId);\n if (parent_2 instanceof smodel_1.SParentElement) {\n var leftCopy = context.modelFactory.createElement(left);\n parent_2.add(leftCopy);\n animationData.fades.push({\n element: leftCopy,\n type: 'out'\n });\n }\n }\n }\n }\n }\n var animations = this.createAnimations(animationData, newRoot, context);\n if (animations.length >= 2) {\n return new animation_1.CompoundAnimation(newRoot, context, animations);\n }\n else if (animations.length === 1) {\n return animations[0];\n }\n else {\n return newRoot;\n }\n };\n UpdateModelCommand.prototype.updateElement = function (left, right, animationData) {\n if (model_2.isLocateable(left) && model_2.isLocateable(right)) {\n var leftPos = left.position;\n var rightPos = right.position;\n if (!geometry_1.almostEquals(leftPos.x, rightPos.x) || !geometry_1.almostEquals(leftPos.y, rightPos.y)) {\n if (animationData.moves === undefined)\n animationData.moves = [];\n animationData.moves.push({\n element: right,\n elementId: right.id,\n fromPosition: leftPos,\n toPosition: rightPos\n });\n right.position = leftPos;\n }\n }\n if (model_3.isBoundsAware(left) && model_3.isBoundsAware(right)) {\n if (!geometry_1.isValidDimension(right.bounds)) {\n right.bounds = {\n x: right.bounds.x,\n y: right.bounds.y,\n width: left.bounds.width,\n height: left.bounds.height\n };\n }\n else if (!geometry_1.almostEquals(left.bounds.width, right.bounds.width)\n || !geometry_1.almostEquals(left.bounds.height, right.bounds.height)) {\n if (animationData.resizes === undefined)\n animationData.resizes = [];\n animationData.resizes.push({\n element: right,\n fromDimension: {\n width: left.bounds.width,\n height: left.bounds.height,\n },\n toDimension: {\n width: right.bounds.width,\n height: right.bounds.height,\n }\n });\n }\n }\n if (model_4.isSelectable(left) && model_4.isSelectable(right)) {\n right.selected = left.selected;\n }\n if (left instanceof smodel_1.SModelRoot && right instanceof smodel_1.SModelRoot) {\n right.canvasBounds = left.canvasBounds;\n }\n if (left instanceof viewport_root_1.ViewportRootElement && right instanceof viewport_root_1.ViewportRootElement) {\n right.scroll = left.scroll;\n right.zoom = left.zoom;\n }\n };\n UpdateModelCommand.prototype.createAnimations = function (data, root, context) {\n var animations = [];\n if (data.fades.length > 0) {\n animations.push(new fade_1.FadeAnimation(root, data.fades, context, true));\n }\n if (data.moves !== undefined && data.moves.length > 0) {\n var movesMap = new Map;\n for (var _i = 0, _a = data.moves; _i < _a.length; _i++) {\n var move = _a[_i];\n movesMap.set(move.elementId, move);\n }\n animations.push(new move_1.MoveAnimation(root, movesMap, context, false));\n }\n if (data.resizes !== undefined && data.resizes.length > 0) {\n var resizesMap = new Map;\n for (var _b = 0, _c = data.resizes; _b < _c.length; _b++) {\n var resize = _c[_b];\n resizesMap.set(resize.element.id, resize);\n }\n animations.push(new resize_1.ResizeAnimation(root, resizesMap, context, false));\n }\n return animations;\n };\n UpdateModelCommand.prototype.undo = function (context) {\n return this.performUpdate(this.newRoot, this.oldRoot, context);\n };\n UpdateModelCommand.prototype.redo = function (context) {\n return this.performUpdate(this.oldRoot, this.newRoot, context);\n };\n UpdateModelCommand.KIND = 'updateModel';\n UpdateModelCommand = __decorate([\n inversify_1.injectable(),\n __metadata(\"design:paramtypes\", [UpdateModelAction])\n ], UpdateModelCommand);\n return UpdateModelCommand;\n}(command_1.Command));\nexports.UpdateModelCommand = UpdateModelCommand;\n//# sourceMappingURL=update-model.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/update/update-model.js\n// module id = 98\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar geometry_1 = require(\"../../utils/geometry\");\nvar browser_1 = require(\"../../utils/browser\");\nvar smodel_1 = require(\"../../base/model/smodel\");\nvar command_1 = require(\"../../base/commands/command\");\nvar key_tool_1 = require(\"../../base/views/key-tool\");\nvar model_1 = require(\"../bounds/model\");\nvar model_2 = require(\"../select/model\");\nvar viewport_1 = require(\"./viewport\");\nvar model_3 = require(\"./model\");\n/**\n * Triggered when the user requests the viewer to center on the current model. The resulting\n * CenterCommand changes the scroll setting of the viewport accordingly and resets the zoom to its default.\n * This action can also be sent from the model source to the client in order to perform such a\n * viewport change programmatically.\n */\nvar CenterAction = /** @class */ (function () {\n function CenterAction(elementIds, animate) {\n if (animate === void 0) { animate = true; }\n this.elementIds = elementIds;\n this.animate = animate;\n this.kind = CenterCommand.KIND;\n }\n return CenterAction;\n}());\nexports.CenterAction = CenterAction;\n/**\n * Triggered when the user requests the viewer to fit its content to the available drawing area.\n * The resulting FitToScreenCommand changes the zoom and scroll settings of the viewport so the model\n * can be shown completely. This action can also be sent from the model source to the client in order\n * to perform such a viewport change programmatically.\n */\nvar FitToScreenAction = /** @class */ (function () {\n function FitToScreenAction(elementIds, padding, maxZoom, animate) {\n if (animate === void 0) { animate = true; }\n this.elementIds = elementIds;\n this.padding = padding;\n this.maxZoom = maxZoom;\n this.animate = animate;\n this.kind = FitToScreenCommand.KIND;\n }\n return FitToScreenAction;\n}());\nexports.FitToScreenAction = FitToScreenAction;\nvar BoundsAwareViewportCommand = /** @class */ (function (_super) {\n __extends(BoundsAwareViewportCommand, _super);\n function BoundsAwareViewportCommand(animate) {\n var _this = _super.call(this) || this;\n _this.animate = animate;\n return _this;\n }\n BoundsAwareViewportCommand.prototype.initialize = function (model) {\n var _this = this;\n if (model_3.isViewport(model)) {\n this.oldViewport = {\n scroll: model.scroll,\n zoom: model.zoom\n };\n var allBounds_1 = [];\n this.getElementIds().forEach(function (id) {\n var element = model.index.getById(id);\n if (element && model_1.isBoundsAware(element))\n allBounds_1.push(_this.boundsInViewport(element, element.bounds, model));\n });\n if (allBounds_1.length === 0) {\n model.index.all().forEach(function (element) {\n if (model_2.isSelectable(element) && element.selected && model_1.isBoundsAware(element))\n allBounds_1.push(_this.boundsInViewport(element, element.bounds, model));\n });\n }\n if (allBounds_1.length === 0) {\n model.index.all().forEach(function (element) {\n if (model_1.isBoundsAware(element))\n allBounds_1.push(_this.boundsInViewport(element, element.bounds, model));\n });\n }\n var bounds = allBounds_1.reduce(function (b0, b1) { return b0 === undefined ? b1 : geometry_1.combine(b0, b1); }, undefined);\n if (geometry_1.isValidDimension(bounds))\n this.newViewport = this.getNewViewport(bounds, model);\n }\n };\n BoundsAwareViewportCommand.prototype.boundsInViewport = function (element, bounds, viewport) {\n if (element instanceof smodel_1.SChildElement && element.parent !== viewport)\n return this.boundsInViewport(element.parent, element.parent.localToParent(bounds), viewport);\n else\n return bounds;\n };\n BoundsAwareViewportCommand.prototype.execute = function (context) {\n this.initialize(context.root);\n return this.redo(context);\n };\n BoundsAwareViewportCommand.prototype.undo = function (context) {\n var model = context.root;\n if (model_3.isViewport(model) && this.newViewport && !this.equal(this.newViewport, this.oldViewport)) {\n if (this.animate)\n return new viewport_1.ViewportAnimation(model, this.newViewport, this.oldViewport, context).start();\n else {\n model.scroll = this.oldViewport.scroll;\n model.zoom = this.oldViewport.zoom;\n }\n }\n return model;\n };\n BoundsAwareViewportCommand.prototype.redo = function (context) {\n var model = context.root;\n if (model_3.isViewport(model) && this.newViewport && !this.equal(this.newViewport, this.oldViewport)) {\n if (this.animate) {\n return new viewport_1.ViewportAnimation(model, this.oldViewport, this.newViewport, context).start();\n }\n else {\n model.scroll = this.newViewport.scroll;\n model.zoom = this.newViewport.zoom;\n }\n }\n return model;\n };\n BoundsAwareViewportCommand.prototype.equal = function (vp1, vp2) {\n return vp1.zoom === vp2.zoom && vp1.scroll.x === vp2.scroll.x && vp1.scroll.y === vp2.scroll.y;\n };\n return BoundsAwareViewportCommand;\n}(command_1.Command));\nexports.BoundsAwareViewportCommand = BoundsAwareViewportCommand;\nvar CenterCommand = /** @class */ (function (_super) {\n __extends(CenterCommand, _super);\n function CenterCommand(action) {\n var _this = _super.call(this, action.animate) || this;\n _this.action = action;\n return _this;\n }\n CenterCommand.prototype.getElementIds = function () {\n return this.action.elementIds;\n };\n CenterCommand.prototype.getNewViewport = function (bounds, model) {\n var c = geometry_1.center(bounds);\n return {\n scroll: {\n x: c.x - 0.5 * model.canvasBounds.width,\n y: c.y - 0.5 * model.canvasBounds.height\n },\n zoom: 1\n };\n };\n CenterCommand.KIND = 'center';\n return CenterCommand;\n}(BoundsAwareViewportCommand));\nexports.CenterCommand = CenterCommand;\nvar FitToScreenCommand = /** @class */ (function (_super) {\n __extends(FitToScreenCommand, _super);\n function FitToScreenCommand(action) {\n var _this = _super.call(this, action.animate) || this;\n _this.action = action;\n return _this;\n }\n FitToScreenCommand.prototype.getElementIds = function () {\n return this.action.elementIds;\n };\n FitToScreenCommand.prototype.getNewViewport = function (bounds, model) {\n var c = geometry_1.center(bounds);\n var delta = this.action.padding === undefined\n ? 0\n : 2 * this.action.padding;\n var zoom = Math.min(model.canvasBounds.width / (bounds.width + delta), model.canvasBounds.height / bounds.height + delta);\n if (this.action.maxZoom !== undefined)\n zoom = Math.min(zoom, this.action.maxZoom);\n return {\n scroll: {\n x: c.x - 0.5 * model.canvasBounds.width / zoom,\n y: c.y - 0.5 * model.canvasBounds.height / zoom\n },\n zoom: zoom\n };\n };\n FitToScreenCommand.KIND = 'fit';\n return FitToScreenCommand;\n}(BoundsAwareViewportCommand));\nexports.FitToScreenCommand = FitToScreenCommand;\nvar CenterKeyboardListener = /** @class */ (function (_super) {\n __extends(CenterKeyboardListener, _super);\n function CenterKeyboardListener() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CenterKeyboardListener.prototype.keyDown = function (element, event) {\n if (browser_1.isCtrlOrCmd(event)) {\n switch (event.keyCode) {\n case 67:\n return [new CenterAction([])];\n case 70:\n return [new FitToScreenAction([])];\n }\n }\n return [];\n };\n return CenterKeyboardListener;\n}(key_tool_1.KeyListener));\nexports.CenterKeyboardListener = CenterKeyboardListener;\n//# sourceMappingURL=center-fit.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/viewport/center-fit.js\n// module id = 99\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar geometry_1 = require(\"../../utils/geometry\");\nvar smodel_1 = require(\"../../base/model/smodel\");\nvar model_1 = require(\"./model\");\nvar model_2 = require(\"../export/model\");\n/**\n * Model root element that defines a viewport, so it transforms the coordinate system with\n * a `scroll` translation and a `zoom` scaling.\n */\nvar ViewportRootElement = /** @class */ (function (_super) {\n __extends(ViewportRootElement, _super);\n function ViewportRootElement() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.scroll = { x: 0, y: 0 };\n _this.zoom = 1;\n _this.export = false;\n return _this;\n }\n ViewportRootElement.prototype.hasFeature = function (feature) {\n return feature === model_1.viewportFeature || feature === model_2.exportFeature;\n };\n ViewportRootElement.prototype.localToParent = function (point) {\n var result = {\n x: (point.x - this.scroll.x) * this.zoom,\n y: (point.y - this.scroll.y) * this.zoom,\n width: -1,\n height: -1\n };\n if (geometry_1.isBounds(point)) {\n result.width = point.width * this.zoom;\n result.height = point.height * this.zoom;\n }\n return result;\n };\n ViewportRootElement.prototype.parentToLocal = function (point) {\n var result = {\n x: (point.x / this.zoom) + this.scroll.x,\n y: (point.y / this.zoom) + this.scroll.y,\n width: -1,\n height: -1\n };\n if (geometry_1.isBounds(point) && geometry_1.isValidDimension(point)) {\n result.width = point.width / this.zoom;\n result.height = point.height / this.zoom;\n }\n return result;\n };\n return ViewportRootElement;\n}(smodel_1.SModelRoot));\nexports.ViewportRootElement = ViewportRootElement;\n//# sourceMappingURL=viewport-root.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/viewport/viewport-root.js\n// module id = 100\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar smodel_1 = require(\"../base/model/smodel\");\nvar model_1 = require(\"../features/bounds/model\");\nvar model_2 = require(\"../features/fade/model\");\nvar model_3 = require(\"../features/hover/model\");\nvar model_4 = require(\"../features/move/model\");\nvar model_5 = require(\"../features/select/model\");\nvar viewport_root_1 = require(\"../features/viewport/viewport-root\");\nvar geometry_1 = require(\"../utils/geometry\");\nvar model_6 = require(\"../features/bounds/model\");\n/**\n * Root element for graph-like models.\n */\nvar SGraph = /** @class */ (function (_super) {\n __extends(SGraph, _super);\n function SGraph() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return SGraph;\n}(viewport_root_1.ViewportRootElement));\nexports.SGraph = SGraph;\n/**\n * Model element class for nodes, which are connectable entities in a graph. A node can be connected to\n * another node via an SEdge. Such a connection can be direct, i.e. the node is the source or target of\n * the edge, or indirect through a port, i.e. it contains an SPort which is the source or target of the edge.\n */\nvar SNode = /** @class */ (function (_super) {\n __extends(SNode, _super);\n function SNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.hoverFeedback = false;\n _this.selected = false;\n _this.opacity = 1;\n return _this;\n }\n SNode.prototype.hasFeature = function (feature) {\n return feature === model_5.selectFeature || feature === model_4.moveFeature || feature === model_1.boundsFeature\n || feature === model_1.layoutContainerFeature || feature === model_2.fadeFeature || feature === model_3.hoverFeedbackFeature\n || feature === model_3.popupFeature;\n };\n return SNode;\n}(model_6.SShapeElement));\nexports.SNode = SNode;\n/**\n * A port is a connection point for edges. It should always be contained in an SNode.\n */\nvar SPort = /** @class */ (function (_super) {\n __extends(SPort, _super);\n function SPort() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.hoverFeedback = false;\n _this.selected = false;\n _this.opacity = 1;\n return _this;\n }\n SPort.prototype.hasFeature = function (feature) {\n return feature === model_5.selectFeature || feature === model_1.boundsFeature || feature === model_2.fadeFeature\n || feature === model_3.hoverFeedbackFeature;\n };\n return SPort;\n}(model_6.SShapeElement));\nexports.SPort = SPort;\n/**\n * Model element class for edges, which are the connectors in a graph. An edge has a source and a target,\n * each of which can be either a node or a port. The source and target elements are referenced via their\n * ids and can be resolved with the index stored in the root element.\n */\nvar SEdge = /** @class */ (function (_super) {\n __extends(SEdge, _super);\n function SEdge() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.routingPoints = [];\n _this.opacity = 1;\n return _this;\n }\n Object.defineProperty(SEdge.prototype, \"source\", {\n get: function () {\n return this.index.getById(this.sourceId);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SEdge.prototype, \"target\", {\n get: function () {\n return this.index.getById(this.targetId);\n },\n enumerable: true,\n configurable: true\n });\n SEdge.prototype.hasFeature = function (feature) {\n return feature === model_2.fadeFeature;\n };\n return SEdge;\n}(smodel_1.SChildElement));\nexports.SEdge = SEdge;\n/**\n * A label can be attached to a node, edge, or port, and contains some text to be rendered in its view.\n */\nvar SLabel = /** @class */ (function (_super) {\n __extends(SLabel, _super);\n function SLabel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.selected = false;\n _this.alignment = geometry_1.ORIGIN_POINT;\n _this.opacity = 1;\n return _this;\n }\n SLabel.prototype.hasFeature = function (feature) {\n return feature === model_1.boundsFeature || feature === model_1.alignFeature || feature === model_2.fadeFeature || feature === model_1.layoutableChildFeature;\n };\n return SLabel;\n}(model_6.SShapeElement));\nexports.SLabel = SLabel;\n/**\n * A compartment is used to group multiple child elements such as labels of a node. Usually a `vbox`\n * or `hbox` layout is used to arrange these children.\n */\nvar SCompartment = /** @class */ (function (_super) {\n __extends(SCompartment, _super);\n function SCompartment() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.opacity = 1;\n return _this;\n }\n SCompartment.prototype.hasFeature = function (feature) {\n return feature === model_1.boundsFeature || feature === model_1.layoutContainerFeature || feature === model_1.layoutableChildFeature || feature === model_2.fadeFeature;\n };\n return SCompartment;\n}(model_6.SShapeElement));\nexports.SCompartment = SCompartment;\n//# sourceMappingURL=sgraph.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/graph/sgraph.js\n// module id = 101\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../base/types\");\nvar action_handler_1 = require(\"../base/actions/action-handler\");\nvar set_model_1 = require(\"../base/features/set-model\");\nvar svg_exporter_1 = require(\"../features/export/svg-exporter\");\n/**\n * A model source is serving the model to the event cycle. It represents\n * the entry point to the client for external sources, such as model\n * editors.\n *\n * As an IActionHandler it listens to actions in and reacts to them with\n * commands or actions if necessary. This way, you can implement action\n * protocols between the client and the outside world.\n *\n * There are two default implementations for a ModelSource:\n * <ul>\n * <li>the LocalModelSource handles the actions to calculate bounds and\n * set/update the model</li>\n * <li>the DiagramServer connects via websocket to a remote source. It\n * can be used to connect to a model editor that provides the model,\n * layouts diagrams, transfers selection and answers model queries from\n * the client.</li>\n */\nvar ModelSource = /** @class */ (function () {\n function ModelSource(actionDispatcher, actionHandlerRegistry, viewerOptions) {\n this.actionDispatcher = actionDispatcher;\n this.viewerOptions = viewerOptions;\n this.initialize(actionHandlerRegistry);\n }\n ModelSource.prototype.initialize = function (registry) {\n // Register model manipulation commands\n registry.registerCommand(set_model_1.SetModelCommand);\n // Register this model source\n registry.register(set_model_1.RequestModelAction.KIND, this);\n registry.register(svg_exporter_1.ExportSvgAction.KIND, this);\n };\n ModelSource = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.IActionDispatcher)),\n __param(1, inversify_1.inject(types_1.TYPES.ActionHandlerRegistry)),\n __param(2, inversify_1.inject(types_1.TYPES.ViewerOptions)),\n __metadata(\"design:paramtypes\", [Object, action_handler_1.ActionHandlerRegistry, Object])\n ], ModelSource);\n return ModelSource;\n}());\nexports.ModelSource = ModelSource;\n//# sourceMappingURL=model-source.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/model-source/model-source.js\n// module id = 102\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../base/types\");\nvar LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"none\"] = 0] = \"none\";\n LogLevel[LogLevel[\"error\"] = 1] = \"error\";\n LogLevel[LogLevel[\"warn\"] = 2] = \"warn\";\n LogLevel[LogLevel[\"info\"] = 3] = \"info\";\n LogLevel[LogLevel[\"log\"] = 4] = \"log\";\n})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));\nvar NullLogger = /** @class */ (function () {\n function NullLogger() {\n this.logLevel = LogLevel.none;\n }\n NullLogger.prototype.error = function (thisArg, message) {\n var params = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n params[_i - 2] = arguments[_i];\n }\n };\n NullLogger.prototype.warn = function (thisArg, message) {\n var params = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n params[_i - 2] = arguments[_i];\n }\n };\n NullLogger.prototype.info = function (thisArg, message) {\n var params = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n params[_i - 2] = arguments[_i];\n }\n };\n NullLogger.prototype.log = function (thisArg, message) {\n var params = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n params[_i - 2] = arguments[_i];\n }\n };\n NullLogger = __decorate([\n inversify_1.injectable()\n ], NullLogger);\n return NullLogger;\n}());\nexports.NullLogger = NullLogger;\nvar ConsoleLogger = /** @class */ (function () {\n function ConsoleLogger(logLevel, viewOptions) {\n if (logLevel === void 0) { logLevel = LogLevel.log; }\n if (viewOptions === void 0) { viewOptions = { baseDiv: '' }; }\n this.logLevel = logLevel;\n this.viewOptions = viewOptions;\n }\n ConsoleLogger.prototype.error = function (thisArg, message) {\n var params = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n params[_i - 2] = arguments[_i];\n }\n if (this.logLevel >= LogLevel.error)\n try {\n console.error.apply(thisArg, this.consoleArguments(thisArg, message, params));\n }\n catch (error) { }\n };\n ConsoleLogger.prototype.warn = function (thisArg, message) {\n var params = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n params[_i - 2] = arguments[_i];\n }\n if (this.logLevel >= LogLevel.warn)\n try {\n console.warn.apply(thisArg, this.consoleArguments(thisArg, message, params));\n }\n catch (error) { }\n };\n ConsoleLogger.prototype.info = function (thisArg, message) {\n var params = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n params[_i - 2] = arguments[_i];\n }\n if (this.logLevel >= LogLevel.info)\n try {\n console.info.apply(thisArg, this.consoleArguments(thisArg, message, params));\n }\n catch (error) { }\n };\n ConsoleLogger.prototype.log = function (thisArg, message) {\n var params = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n params[_i - 2] = arguments[_i];\n }\n if (this.logLevel >= LogLevel.log)\n try {\n console.log.apply(thisArg, this.consoleArguments(thisArg, message, params));\n }\n catch (error) { }\n };\n ConsoleLogger.prototype.consoleArguments = function (thisArg, message, params) {\n var caller;\n if (typeof thisArg === 'object')\n caller = thisArg.constructor.name;\n else\n caller = thisArg;\n var date = new Date();\n return [date.toLocaleTimeString() + ' ' + this.viewOptions.baseDiv + ' ' + caller + ': ' + message].concat(params);\n };\n ConsoleLogger = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.LogLevel)),\n __param(1, inversify_1.inject(types_1.TYPES.ViewerOptions)),\n __metadata(\"design:paramtypes\", [Number, Object])\n ], ConsoleLogger);\n return ConsoleLogger;\n}());\nexports.ConsoleLogger = ConsoleLogger;\n//# sourceMappingURL=logging.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/utils/logging.js\n// module id = 103\n// module chunks = 0","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_html.js\n// module id = 104\n// module chunks = 0","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_ie8-dom-define.js\n// module id = 105\n// module chunks = 0","// 7.2.8 IsRegExp(argument)\nvar isObject = require('./_is-object');\nvar cof = require('./_cof');\nvar MATCH = require('./_wks')('match');\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_is-regexp.js\n// module id = 106\n// module chunks = 0","var ITERATOR = require('./_wks')('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_iter-detect.js\n// module id = 107\n// module chunks = 0","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_iter-step.js\n// module id = 108\n// module chunks = 0","'use strict';\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = require('./_a-function');\n\nfunction PromiseCapability(C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n}\n\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_new-promise-capability.js\n// module id = 109\n// module chunks = 0","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-gopd.js\n// module id = 110\n// module chunks = 0","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal');\nvar hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-gopn.js\n// module id = 111\n// module chunks = 0","exports.f = Object.getOwnPropertySymbols;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-gops.js\n// module id = 112\n// module chunks = 0","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-keys-internal.js\n// module id = 113\n// module chunks = 0","'use strict';\nvar global = require('./_global');\nvar dP = require('./_object-dp');\nvar DESCRIPTORS = require('./_descriptors');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (KEY) {\n var C = global[KEY];\n if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_set-species.js\n// module id = 114\n// module chunks = 0","var toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_string-at.js\n// module id = 115\n// module chunks = 0","var ctx = require('./_ctx');\nvar invoke = require('./_invoke');\nvar html = require('./_html');\nvar cel = require('./_dom-create');\nvar global = require('./_global');\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n var id = +this;\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function (event) {\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!setTask || !clearTask) {\n setTask = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (require('./_cof')(process) == 'process') {\n defer = function (id) {\n process.nextTick(ctx(run, id, 1));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if (MessageChannel) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {\n defer = function (id) {\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in cel('script')) {\n defer = function (id) {\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_task.js\n// module id = 116\n// module chunks = 0","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_to-absolute-index.js\n// module id = 117\n// module chunks = 0","var isObject = require('./_is-object');\nmodule.exports = function (it, TYPE) {\n if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');\n return it;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_validate-collection.js\n// module id = 118\n// module chunks = 0","exports.f = require('./_wks');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_wks-ext.js\n// module id = 119\n// module chunks = 0","var $iterators = require('./es6.array.iterator');\nvar getKeys = require('./_object-keys');\nvar redefine = require('./_redefine');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar wks = require('./_wks');\nvar ITERATOR = wks('iterator');\nvar TO_STRING_TAG = wks('toStringTag');\nvar ArrayValues = Iterators.Array;\n\nvar DOMIterables = {\n CSSRuleList: true, // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true, // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true, // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n if (proto) {\n if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);\n if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = ArrayValues;\n if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/web.dom.iterable.js\n// module id = 120\n// module chunks = 0","/* FileSaver.js\n * A saveAs() FileSaver implementation.\n * 1.3.2\n * 2016-06-16 18:25:19\n *\n * By Eli Grey, http://eligrey.com\n * License: MIT\n * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md\n */\n\n/*global self */\n/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */\n\n/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */\n\nvar saveAs = saveAs || (function(view) {\n\t\"use strict\";\n\t// IE <10 is explicitly unsupported\n\tif (typeof view === \"undefined\" || typeof navigator !== \"undefined\" && /MSIE [1-9]\\./.test(navigator.userAgent)) {\n\t\treturn;\n\t}\n\tvar\n\t\t doc = view.document\n\t\t // only get URL when necessary in case Blob.js hasn't overridden it yet\n\t\t, get_URL = function() {\n\t\t\treturn view.URL || view.webkitURL || view;\n\t\t}\n\t\t, save_link = doc.createElementNS(\"http://www.w3.org/1999/xhtml\", \"a\")\n\t\t, can_use_save_link = \"download\" in save_link\n\t\t, click = function(node) {\n\t\t\tvar event = new MouseEvent(\"click\");\n\t\t\tnode.dispatchEvent(event);\n\t\t}\n\t\t, is_safari = /constructor/i.test(view.HTMLElement) || view.safari\n\t\t, is_chrome_ios =/CriOS\\/[\\d]+/.test(navigator.userAgent)\n\t\t, throw_outside = function(ex) {\n\t\t\t(view.setImmediate || view.setTimeout)(function() {\n\t\t\t\tthrow ex;\n\t\t\t}, 0);\n\t\t}\n\t\t, force_saveable_type = \"application/octet-stream\"\n\t\t// the Blob API is fundamentally broken as there is no \"downloadfinished\" event to subscribe to\n\t\t, arbitrary_revoke_timeout = 1000 * 40 // in ms\n\t\t, revoke = function(file) {\n\t\t\tvar revoker = function() {\n\t\t\t\tif (typeof file === \"string\") { // file is an object URL\n\t\t\t\t\tget_URL().revokeObjectURL(file);\n\t\t\t\t} else { // file is a File\n\t\t\t\t\tfile.remove();\n\t\t\t\t}\n\t\t\t};\n\t\t\tsetTimeout(revoker, arbitrary_revoke_timeout);\n\t\t}\n\t\t, dispatch = function(filesaver, event_types, event) {\n\t\t\tevent_types = [].concat(event_types);\n\t\t\tvar i = event_types.length;\n\t\t\twhile (i--) {\n\t\t\t\tvar listener = filesaver[\"on\" + event_types[i]];\n\t\t\t\tif (typeof listener === \"function\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlistener.call(filesaver, event || filesaver);\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\tthrow_outside(ex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t, auto_bom = function(blob) {\n\t\t\t// prepend BOM for UTF-8 XML and text/* types (including HTML)\n\t\t\t// note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n\t\t\tif (/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n\t\t\t\treturn new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type});\n\t\t\t}\n\t\t\treturn blob;\n\t\t}\n\t\t, FileSaver = function(blob, name, no_auto_bom) {\n\t\t\tif (!no_auto_bom) {\n\t\t\t\tblob = auto_bom(blob);\n\t\t\t}\n\t\t\t// First try a.download, then web filesystem, then object URLs\n\t\t\tvar\n\t\t\t\t filesaver = this\n\t\t\t\t, type = blob.type\n\t\t\t\t, force = type === force_saveable_type\n\t\t\t\t, object_url\n\t\t\t\t, dispatch_all = function() {\n\t\t\t\t\tdispatch(filesaver, \"writestart progress write writeend\".split(\" \"));\n\t\t\t\t}\n\t\t\t\t// on any filesys errors revert to saving with object URLs\n\t\t\t\t, fs_error = function() {\n\t\t\t\t\tif ((is_chrome_ios || (force && is_safari)) && view.FileReader) {\n\t\t\t\t\t\t// Safari doesn't allow downloading of blob urls\n\t\t\t\t\t\tvar reader = new FileReader();\n\t\t\t\t\t\treader.onloadend = function() {\n\t\t\t\t\t\t\tvar url = is_chrome_ios ? reader.result : reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;');\n\t\t\t\t\t\t\tvar popup = view.open(url, '_blank');\n\t\t\t\t\t\t\tif(!popup) view.location.href = url;\n\t\t\t\t\t\t\turl=undefined; // release reference before dispatching\n\t\t\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\t\t\tdispatch_all();\n\t\t\t\t\t\t};\n\t\t\t\t\t\treader.readAsDataURL(blob);\n\t\t\t\t\t\tfilesaver.readyState = filesaver.INIT;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// don't create more object URLs than needed\n\t\t\t\t\tif (!object_url) {\n\t\t\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\t\t}\n\t\t\t\t\tif (force) {\n\t\t\t\t\t\tview.location.href = object_url;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar opened = view.open(object_url, \"_blank\");\n\t\t\t\t\t\tif (!opened) {\n\t\t\t\t\t\t\t// Apple does not allow window.open, see https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/WorkingwithWindowsandTabs/WorkingwithWindowsandTabs.html\n\t\t\t\t\t\t\tview.location.href = object_url;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t}\n\t\t\t;\n\t\t\tfilesaver.readyState = filesaver.INIT;\n\n\t\t\tif (can_use_save_link) {\n\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tsave_link.href = object_url;\n\t\t\t\t\tsave_link.download = name;\n\t\t\t\t\tclick(save_link);\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfs_error();\n\t\t}\n\t\t, FS_proto = FileSaver.prototype\n\t\t, saveAs = function(blob, name, no_auto_bom) {\n\t\t\treturn new FileSaver(blob, name || blob.name || \"download\", no_auto_bom);\n\t\t}\n\t;\n\t// IE 10+ (native saveAs)\n\tif (typeof navigator !== \"undefined\" && navigator.msSaveOrOpenBlob) {\n\t\treturn function(blob, name, no_auto_bom) {\n\t\t\tname = name || blob.name || \"download\";\n\n\t\t\tif (!no_auto_bom) {\n\t\t\t\tblob = auto_bom(blob);\n\t\t\t}\n\t\t\treturn navigator.msSaveOrOpenBlob(blob, name);\n\t\t};\n\t}\n\n\tFS_proto.abort = function(){};\n\tFS_proto.readyState = FS_proto.INIT = 0;\n\tFS_proto.WRITING = 1;\n\tFS_proto.DONE = 2;\n\n\tFS_proto.error =\n\tFS_proto.onwritestart =\n\tFS_proto.onprogress =\n\tFS_proto.onwrite =\n\tFS_proto.onabort =\n\tFS_proto.onerror =\n\tFS_proto.onwriteend =\n\t\tnull;\n\n\treturn saveAs;\n}(\n\t typeof self !== \"undefined\" && self\n\t|| typeof window !== \"undefined\" && window\n\t|| this.content\n));\n// `self` is undefined in Firefox for Android content script context\n// while `this` is nsIContentFrameMessageManager\n// with an attribute `content` that corresponds to the window\n\nif (typeof module !== \"undefined\" && module.exports) {\n module.exports.saveAs = saveAs;\n} else if ((typeof define !== \"undefined\" && define !== null) && (define.amd !== null)) {\n define(\"FileSaver.js\", function() {\n return saveAs;\n });\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/file-saver/FileSaver.js\n// module id = 121\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar error_msgs_1 = require(\"../constants/error_msgs\");\nvar METADATA_KEY = require(\"../constants/metadata_keys\");\nvar metadata_1 = require(\"../planning/metadata\");\nvar decorator_utils_1 = require(\"./decorator_utils\");\nvar LazyServiceIdentifer = (function () {\n function LazyServiceIdentifer(cb) {\n this._cb = cb;\n }\n LazyServiceIdentifer.prototype.unwrap = function () {\n return this._cb();\n };\n return LazyServiceIdentifer;\n}());\nexports.LazyServiceIdentifer = LazyServiceIdentifer;\nfunction inject(serviceIdentifier) {\n return function (target, targetKey, index) {\n if (serviceIdentifier === undefined) {\n throw new Error(error_msgs_1.UNDEFINED_INJECT_ANNOTATION(target.name));\n }\n var metadata = new metadata_1.Metadata(METADATA_KEY.INJECT_TAG, serviceIdentifier);\n if (typeof index === \"number\") {\n decorator_utils_1.tagParameter(target, targetKey, index, metadata);\n }\n else {\n decorator_utils_1.tagProperty(target, targetKey, metadata);\n }\n };\n}\nexports.inject = inject;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/annotation/inject.js\n// module id = 122\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar METADATA_KEY = require(\"../constants/metadata_keys\");\nvar MetadataReader = (function () {\n function MetadataReader() {\n }\n MetadataReader.prototype.getConstructorMetadata = function (constructorFunc) {\n var compilerGeneratedMetadata = Reflect.getMetadata(METADATA_KEY.PARAM_TYPES, constructorFunc);\n var userGeneratedMetadata = Reflect.getMetadata(METADATA_KEY.TAGGED, constructorFunc);\n return {\n compilerGeneratedMetadata: compilerGeneratedMetadata,\n userGeneratedMetadata: userGeneratedMetadata || {}\n };\n };\n MetadataReader.prototype.getPropertiesMetadata = function (constructorFunc) {\n var userGeneratedMetadata = Reflect.getMetadata(METADATA_KEY.TAGGED_PROP, constructorFunc) || [];\n return userGeneratedMetadata;\n };\n return MetadataReader;\n}());\nexports.MetadataReader = MetadataReader;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/planning/metadata_reader.js\n// module id = 123\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar METADATA_KEY = require(\"../constants/metadata_keys\");\nvar guid_1 = require(\"../utils/guid\");\nvar metadata_1 = require(\"./metadata\");\nvar queryable_string_1 = require(\"./queryable_string\");\nvar Target = (function () {\n function Target(type, name, serviceIdentifier, namedOrTagged) {\n this.guid = guid_1.guid();\n this.type = type;\n this.serviceIdentifier = serviceIdentifier;\n this.name = new queryable_string_1.QueryableString(name || \"\");\n this.metadata = new Array();\n var metadataItem = null;\n if (typeof namedOrTagged === \"string\") {\n metadataItem = new metadata_1.Metadata(METADATA_KEY.NAMED_TAG, namedOrTagged);\n }\n else if (namedOrTagged instanceof metadata_1.Metadata) {\n metadataItem = namedOrTagged;\n }\n if (metadataItem !== null) {\n this.metadata.push(metadataItem);\n }\n }\n Target.prototype.hasTag = function (key) {\n for (var _i = 0, _a = this.metadata; _i < _a.length; _i++) {\n var m = _a[_i];\n if (m.key === key) {\n return true;\n }\n }\n return false;\n };\n Target.prototype.isArray = function () {\n return this.hasTag(METADATA_KEY.MULTI_INJECT_TAG);\n };\n Target.prototype.matchesArray = function (name) {\n return this.matchesTag(METADATA_KEY.MULTI_INJECT_TAG)(name);\n };\n Target.prototype.isNamed = function () {\n return this.hasTag(METADATA_KEY.NAMED_TAG);\n };\n Target.prototype.isTagged = function () {\n return this.metadata.some(function (m) {\n return (m.key !== METADATA_KEY.INJECT_TAG) &&\n (m.key !== METADATA_KEY.MULTI_INJECT_TAG) &&\n (m.key !== METADATA_KEY.NAME_TAG) &&\n (m.key !== METADATA_KEY.UNMANAGED_TAG) &&\n (m.key !== METADATA_KEY.NAMED_TAG);\n });\n };\n Target.prototype.isOptional = function () {\n return this.matchesTag(METADATA_KEY.OPTIONAL_TAG)(true);\n };\n Target.prototype.getNamedTag = function () {\n if (this.isNamed()) {\n return this.metadata.filter(function (m) { return m.key === METADATA_KEY.NAMED_TAG; })[0];\n }\n return null;\n };\n Target.prototype.getCustomTags = function () {\n if (this.isTagged()) {\n return this.metadata.filter(function (m) {\n return (m.key !== METADATA_KEY.INJECT_TAG) &&\n (m.key !== METADATA_KEY.MULTI_INJECT_TAG) &&\n (m.key !== METADATA_KEY.NAME_TAG) &&\n (m.key !== METADATA_KEY.UNMANAGED_TAG) &&\n (m.key !== METADATA_KEY.NAMED_TAG);\n });\n }\n return null;\n };\n Target.prototype.matchesNamedTag = function (name) {\n return this.matchesTag(METADATA_KEY.NAMED_TAG)(name);\n };\n Target.prototype.matchesTag = function (key) {\n var _this = this;\n return function (value) {\n for (var _i = 0, _a = _this.metadata; _i < _a.length; _i++) {\n var m = _a[_i];\n if (m.key === key && m.value === value) {\n return true;\n }\n }\n return false;\n };\n };\n return Target;\n}());\nexports.Target = Target;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/planning/target.js\n// module id = 124\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar binding_on_syntax_1 = require(\"./binding_on_syntax\");\nvar binding_when_syntax_1 = require(\"./binding_when_syntax\");\nvar BindingWhenOnSyntax = (function () {\n function BindingWhenOnSyntax(binding) {\n this._binding = binding;\n this._bindingWhenSyntax = new binding_when_syntax_1.BindingWhenSyntax(this._binding);\n this._bindingOnSyntax = new binding_on_syntax_1.BindingOnSyntax(this._binding);\n }\n BindingWhenOnSyntax.prototype.when = function (constraint) {\n return this._bindingWhenSyntax.when(constraint);\n };\n BindingWhenOnSyntax.prototype.whenTargetNamed = function (name) {\n return this._bindingWhenSyntax.whenTargetNamed(name);\n };\n BindingWhenOnSyntax.prototype.whenTargetIsDefault = function () {\n return this._bindingWhenSyntax.whenTargetIsDefault();\n };\n BindingWhenOnSyntax.prototype.whenTargetTagged = function (tag, value) {\n return this._bindingWhenSyntax.whenTargetTagged(tag, value);\n };\n BindingWhenOnSyntax.prototype.whenInjectedInto = function (parent) {\n return this._bindingWhenSyntax.whenInjectedInto(parent);\n };\n BindingWhenOnSyntax.prototype.whenParentNamed = function (name) {\n return this._bindingWhenSyntax.whenParentNamed(name);\n };\n BindingWhenOnSyntax.prototype.whenParentTagged = function (tag, value) {\n return this._bindingWhenSyntax.whenParentTagged(tag, value);\n };\n BindingWhenOnSyntax.prototype.whenAnyAncestorIs = function (ancestor) {\n return this._bindingWhenSyntax.whenAnyAncestorIs(ancestor);\n };\n BindingWhenOnSyntax.prototype.whenNoAncestorIs = function (ancestor) {\n return this._bindingWhenSyntax.whenNoAncestorIs(ancestor);\n };\n BindingWhenOnSyntax.prototype.whenAnyAncestorNamed = function (name) {\n return this._bindingWhenSyntax.whenAnyAncestorNamed(name);\n };\n BindingWhenOnSyntax.prototype.whenAnyAncestorTagged = function (tag, value) {\n return this._bindingWhenSyntax.whenAnyAncestorTagged(tag, value);\n };\n BindingWhenOnSyntax.prototype.whenNoAncestorNamed = function (name) {\n return this._bindingWhenSyntax.whenNoAncestorNamed(name);\n };\n BindingWhenOnSyntax.prototype.whenNoAncestorTagged = function (tag, value) {\n return this._bindingWhenSyntax.whenNoAncestorTagged(tag, value);\n };\n BindingWhenOnSyntax.prototype.whenAnyAncestorMatches = function (constraint) {\n return this._bindingWhenSyntax.whenAnyAncestorMatches(constraint);\n };\n BindingWhenOnSyntax.prototype.whenNoAncestorMatches = function (constraint) {\n return this._bindingWhenSyntax.whenNoAncestorMatches(constraint);\n };\n BindingWhenOnSyntax.prototype.onActivation = function (handler) {\n return this._bindingOnSyntax.onActivation(handler);\n };\n return BindingWhenOnSyntax;\n}());\nexports.BindingWhenOnSyntax = BindingWhenOnSyntax;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/syntax/binding_when_on_syntax.js\n// module id = 125\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar METADATA_KEY = require(\"../constants/metadata_keys\");\nvar metadata_1 = require(\"../planning/metadata\");\nvar traverseAncerstors = function (request, constraint) {\n var parent = request.parentRequest;\n if (parent !== null) {\n return constraint(parent) ? true : traverseAncerstors(parent, constraint);\n }\n else {\n return false;\n }\n};\nexports.traverseAncerstors = traverseAncerstors;\nvar taggedConstraint = function (key) { return function (value) {\n var constraint = function (request) {\n return request !== null && request.target !== null && request.target.matchesTag(key)(value);\n };\n constraint.metaData = new metadata_1.Metadata(key, value);\n return constraint;\n}; };\nexports.taggedConstraint = taggedConstraint;\nvar namedConstraint = taggedConstraint(METADATA_KEY.NAMED_TAG);\nexports.namedConstraint = namedConstraint;\nvar typeConstraint = function (type) { return function (request) {\n var binding = null;\n if (request !== null) {\n binding = request.bindings[0];\n if (typeof type === \"string\") {\n var serviceIdentifier = binding.serviceIdentifier;\n return serviceIdentifier === type;\n }\n else {\n var constructor = request.bindings[0].implementationType;\n return type === constructor;\n }\n }\n return false;\n}; };\nexports.typeConstraint = typeConstraint;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/syntax/constraint_helpers.js\n// module id = 126\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ERROR_MSGS = require(\"../constants/error_msgs\");\nfunction isStackOverflowExeption(error) {\n return (error instanceof RangeError ||\n error.message === ERROR_MSGS.STACK_OVERFLOW);\n}\nexports.isStackOverflowExeption = isStackOverflowExeption;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/utils/exceptions.js\n// module id = 127\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction vnode(sel, data, children, text, elm) {\n var key = data === undefined ? undefined : data.key;\n return { sel: sel, data: data, children: children,\n text: text, elm: elm, key: key };\n}\nexports.vnode = vnode;\nexports.default = vnode;\n//# sourceMappingURL=vnode.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/snabbdom/vnode.js\n// module id = 128\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Slows down animations towards the begin and the end.\n *\n * @param x the value between 0 (start of animation) and 1 (end of\n * animation) linearly interpolated in time.\n * @returns {number} the eased value between 0 and 1\n */\nfunction easeInOut(x) {\n if (x < 0.5)\n return x * x * 2;\n else\n return 1 - (1 - x) * (1 - x) * 2;\n}\nexports.easeInOut = easeInOut;\n//# sourceMappingURL=easing.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/animations/easing.js\n// module id = 129\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../types\");\nvar smodel_factory_1 = require(\"../model/smodel-factory\");\nvar animation_frame_syncer_1 = require(\"../animations/animation-frame-syncer\");\nvar command_1 = require(\"./command\");\n/**\n * The implementation of the ICommandStack. Clients should not use this\n * class directly.\n *\n * The command stack holds the current model as the result of the current\n * promise. When a new command is executed/undone/redone, its execution is\n * chained using <code>Promise#then()</code> to the current Promise. This\n * way we can handle long running commands without blocking the current\n * thread.\n *\n * The command stack also does the special handling for special commands:\n *\n * System commands should be transparent to the user and as such be\n * automatically undone/redone with the next plain command. Additional care\n * must be taken that system commands that are executed after undo don't\n * break the correspondence between the topmost commands on the undo and\n * redo stacks.\n *\n * Hidden commands only tell the viewer to render a hidden model such that\n * its bounds can be extracted from the DOM and forwarded as separate actions.\n * Hidden commands should not leave any trace on the undo/redo/off stacks.\n *\n * Mergeable commands should be merged with their predecessor if possible,\n * such that e.g. multiple subsequent moves of the smae element can be undone\n * in one single step.\n */\nvar CommandStack = /** @class */ (function () {\n function CommandStack(modelFactory, viewerProvider, logger, syncer, options) {\n this.modelFactory = modelFactory;\n this.viewerProvider = viewerProvider;\n this.logger = logger;\n this.syncer = syncer;\n this.options = options;\n this.undoStack = [];\n this.redoStack = [];\n /**\n * System commands should be transparent to the user in undo/redo\n * operations. When a system command is executed when the redo\n * stack is not empty, it is pushed to offStack instead.\n *\n * On redo, all commands form this stack are undone such that the\n * redo operation gets the exact same model as when it was executed\n * first.\n *\n * On undo, all commands form this stack are undone as well as\n * system ommands should be transparent to the user.\n */\n this.offStack = [];\n this.currentPromise = Promise.resolve({\n root: modelFactory.createRoot(smodel_factory_1.EMPTY_ROOT),\n hiddenRoot: undefined,\n popupRoot: undefined,\n rootChanged: false,\n hiddenRootChanged: false,\n popupChanged: false\n });\n }\n CommandStack.prototype.executeAll = function (commands) {\n var _this = this;\n commands.forEach(function (command) {\n _this.logger.log(_this, 'Executing', command);\n _this.handleCommand(command, command.execute, _this.mergeOrPush);\n });\n return this.thenUpdate();\n };\n CommandStack.prototype.execute = function (command) {\n this.logger.log(this, 'Executing', command);\n this.handleCommand(command, command.execute, this.mergeOrPush);\n return this.thenUpdate();\n };\n CommandStack.prototype.undo = function () {\n var _this = this;\n this.undoOffStackSystemCommands();\n this.undoPreceedingSystemCommands();\n var command = this.undoStack.pop();\n if (command !== undefined) {\n this.logger.log(this, 'Undoing', command);\n this.handleCommand(command, command.undo, function (command, context) {\n _this.redoStack.push(command);\n });\n }\n return this.thenUpdate();\n };\n CommandStack.prototype.redo = function () {\n var _this = this;\n this.undoOffStackSystemCommands();\n var command = this.redoStack.pop();\n if (command !== undefined) {\n this.logger.log(this, 'Redoing', command);\n this.handleCommand(command, command.redo, function (command, context) {\n _this.pushToUndoStack(command);\n });\n }\n this.redoFollowingSystemCommands();\n return this.thenUpdate();\n };\n /**\n * Chains the current promise with another Promise that performs the\n * given operation on the given command.\n *\n * @param beforeResolve a function that is called directly before\n * resolving the Promise to return the new model. Usually puts the\n * command on the appropriate stack.\n */\n CommandStack.prototype.handleCommand = function (command, operation, beforeResolve) {\n var _this = this;\n this.currentPromise = this.currentPromise.then(function (state) {\n var promise = new Promise(function (resolve, reject) {\n var context = _this.createContext(state.root);\n var newResult;\n try {\n newResult = operation.call(command, context);\n }\n catch (error) {\n _this.logger.error(_this, \"Failed to execute command:\", error);\n newResult = state.root;\n }\n if (command instanceof command_1.HiddenCommand) {\n resolve(__assign({}, state, {\n hiddenRoot: newResult,\n hiddenRootChanged: true\n }));\n }\n else if (command instanceof command_1.PopupCommand) {\n resolve(__assign({}, state, {\n popupRoot: newResult,\n popupChanged: true\n }));\n }\n else if (newResult instanceof Promise) {\n newResult.then(function (newModel) {\n beforeResolve.call(_this, command, context);\n resolve(__assign({}, state, {\n root: newModel,\n rootChanged: true\n }));\n });\n }\n else {\n beforeResolve.call(_this, command, context);\n resolve(__assign({}, state, {\n root: newResult,\n rootChanged: true\n }));\n }\n });\n return promise;\n });\n };\n CommandStack.prototype.pushToUndoStack = function (command) {\n this.undoStack.push(command);\n if (this.options.undoHistoryLimit >= 0 && this.undoStack.length > this.options.undoHistoryLimit)\n this.undoStack.splice(0, this.undoStack.length - this.options.undoHistoryLimit);\n };\n /**\n * Notifies the Viewer to render the new model and/or the new hidden model\n * and returns a Promise for the new model.\n */\n CommandStack.prototype.thenUpdate = function () {\n var _this = this;\n this.currentPromise = this.currentPromise.then(function (state) {\n if (state.hiddenRootChanged && state.hiddenRoot !== undefined)\n _this.updateHidden(state.hiddenRoot);\n if (state.rootChanged)\n _this.update(state.root);\n if (state.popupChanged && state.popupRoot !== undefined)\n _this.updatePopup(state.popupRoot);\n return {\n root: state.root,\n hiddenRoot: undefined,\n popupRoot: undefined,\n rootChanged: false,\n hiddenRootChanged: false,\n popupChanged: false\n };\n });\n return this.currentPromise.then(function (state) { return state.root; });\n };\n /**\n * Notify the <code>Viewer</code> that the model has changed.\n */\n CommandStack.prototype.updatePopup = function (model) {\n var _this = this;\n if (this.viewer) {\n this.viewer.updatePopup(model);\n return;\n }\n this.viewerProvider().then(function (viewer) {\n _this.viewer = viewer;\n _this.updatePopup(model);\n });\n };\n /**\n * Notify the <code>Viewer</code> that the model has changed.\n */\n CommandStack.prototype.update = function (model) {\n var _this = this;\n if (this.viewer) {\n this.viewer.update(model);\n return;\n }\n this.viewerProvider().then(function (viewer) {\n _this.viewer = viewer;\n _this.update(model);\n });\n };\n /**\n * Notify the <code>Viewer</code> that the hidden model has changed.\n */\n CommandStack.prototype.updateHidden = function (model) {\n var _this = this;\n if (this.viewer) {\n this.viewer.updateHidden(model);\n return;\n }\n this.viewerProvider().then(function (viewer) {\n _this.viewer = viewer;\n _this.updateHidden(model);\n });\n };\n /**\n * Handling of commands after their execution.\n *\n * Hidden commands are not pushed to any stack.\n *\n * System commands are pushed to the <code>offStack</code> when the redo\n * stack is not empty, allowing to undo the before a redo to keep the chain\n * of commands consistent.\n *\n * Mergable commands are merged if possible.\n */\n CommandStack.prototype.mergeOrPush = function (command, context) {\n var _this = this;\n if (command instanceof command_1.HiddenCommand)\n return;\n if (command instanceof command_1.SystemCommand && this.redoStack.length > 0) {\n this.offStack.push(command);\n }\n else {\n this.offStack.forEach(function (command) { return _this.undoStack.push(command); });\n this.offStack = [];\n this.redoStack = [];\n if (this.undoStack.length > 0) {\n var lastCommand = this.undoStack[this.undoStack.length - 1];\n if (lastCommand instanceof command_1.MergeableCommand && lastCommand.merge(command, context))\n return;\n }\n this.pushToUndoStack(command);\n }\n };\n /**\n * Reverts all system commands on the offStack.\n */\n CommandStack.prototype.undoOffStackSystemCommands = function () {\n var command = this.offStack.pop();\n while (command !== undefined) {\n this.logger.log(this, 'Undoing off-stack', command);\n this.handleCommand(command, command.undo, function () { });\n command = this.offStack.pop();\n }\n };\n /**\n * System commands should be transparent to the user, so this method\n * is called from <code>undo()</code> to revert all system commands\n * at the top of the undoStack.\n */\n CommandStack.prototype.undoPreceedingSystemCommands = function () {\n var _this = this;\n var command = this.undoStack[this.undoStack.length - 1];\n while (command !== undefined && command instanceof command_1.SystemCommand) {\n this.undoStack.pop();\n this.logger.log(this, 'Undoing', command);\n this.handleCommand(command, command.undo, function (command, context) {\n _this.redoStack.push(command);\n });\n command = this.undoStack[this.undoStack.length - 1];\n }\n };\n /**\n * System commands should be transparent to the user, so this method\n * is called from <code>redo()</code> to re-execute all system commands\n * at the top of the redoStack.\n */\n CommandStack.prototype.redoFollowingSystemCommands = function () {\n var _this = this;\n var command = this.redoStack[this.redoStack.length - 1];\n while (command !== undefined && command instanceof command_1.SystemCommand) {\n this.redoStack.pop();\n this.logger.log(this, 'Redoing ', command);\n this.handleCommand(command, command.redo, function (command, context) {\n _this.pushToUndoStack(command);\n });\n command = this.redoStack[this.redoStack.length - 1];\n }\n };\n /**\n * Assembles the context object that is passed to the commands execution method.\n */\n CommandStack.prototype.createContext = function (currentModel) {\n var context = {\n root: currentModel,\n modelChanged: this,\n modelFactory: this.modelFactory,\n duration: this.options.defaultDuration,\n logger: this.logger,\n syncer: this.syncer\n };\n return context;\n };\n CommandStack = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.IModelFactory)),\n __param(1, inversify_1.inject(types_1.TYPES.IViewerProvider)),\n __param(2, inversify_1.inject(types_1.TYPES.ILogger)),\n __param(3, inversify_1.inject(types_1.TYPES.AnimationFrameSyncer)),\n __param(4, inversify_1.inject(types_1.TYPES.CommandStackOptions)),\n __metadata(\"design:paramtypes\", [Object, Function, Object, animation_frame_syncer_1.AnimationFrameSyncer, Object])\n ], CommandStack);\n return CommandStack;\n}());\nexports.CommandStack = CommandStack;\n//# sourceMappingURL=command-stack.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/commands/command-stack.js\n// module id = 130\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar snabbdom_1 = require(\"snabbdom\");\n/**\n * An view that avoids calculation and patching of VNodes unless some model properties have changed.\n * Based on snabbdom's thunks.\n */\nvar ThunkView = /** @class */ (function () {\n function ThunkView() {\n }\n ThunkView.prototype.render = function (model, context) {\n var _this = this;\n return snabbdom_1.h(this.selector(model), {\n key: model.id,\n hook: {\n init: this.init.bind(this),\n prepatch: this.prepatch.bind(this)\n },\n fn: function () { return _this.renderAndDecorate(model, context); },\n args: this.watchedArgs(model),\n thunk: true\n });\n };\n ThunkView.prototype.renderAndDecorate = function (model, context) {\n var vnode = this.doRender(model, context);\n context.decorate(vnode, model);\n return vnode;\n };\n ThunkView.prototype.copyToThunk = function (vnode, thunk) {\n thunk.elm = vnode.elm;\n vnode.data.fn = thunk.data.fn;\n vnode.data.args = thunk.data.args;\n thunk.data = vnode.data;\n thunk.children = vnode.children;\n thunk.text = vnode.text;\n thunk.elm = vnode.elm;\n };\n ThunkView.prototype.init = function (thunk) {\n var cur = thunk.data;\n var vnode = cur.fn.apply(undefined, cur.args);\n this.copyToThunk(vnode, thunk);\n };\n ThunkView.prototype.prepatch = function (oldVnode, thunk) {\n var old = oldVnode.data, cur = thunk.data;\n if (!this.equals(old.args, cur.args))\n this.copyToThunk(cur.fn.apply(undefined, cur.args), thunk);\n else\n this.copyToThunk(oldVnode, thunk);\n };\n ThunkView.prototype.equals = function (oldArg, newArg) {\n if (Array.isArray(oldArg) && Array.isArray(newArg)) {\n if (oldArg.length !== newArg.length)\n return false;\n for (var i = 0; i < newArg.length; ++i) {\n if (!this.equals(oldArg[i], newArg[i]))\n return false;\n }\n }\n else if (typeof oldArg === 'object' && typeof newArg === 'object') {\n if (Object.keys(oldArg).length !== Object.keys(newArg).length)\n return false;\n for (var key in oldArg) {\n if (key !== 'parent' && key !== 'root' && (!(key in newArg) || !this.equals(oldArg[key], newArg[key])))\n return false;\n }\n }\n else if (oldArg !== newArg) {\n return false;\n }\n return true;\n };\n return ThunkView;\n}());\nexports.ThunkView = ThunkView;\nfunction isThunk(vnode) {\n return 'thunk' in vnode;\n}\nexports.isThunk = isThunk;\n//# sourceMappingURL=thunk-view.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/views/thunk-view.js\n// module id = 131\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar snabbdom = require(\"snabbdom-jsx\");\nvar inversify_1 = require(\"inversify\");\nvar smodel_factory_1 = require(\"../model/smodel-factory\");\nvar registry_1 = require(\"../../utils/registry\");\nvar geometry_1 = require(\"../../utils/geometry\");\nvar JSX = { createElement: snabbdom.svg };\n/**\n * Allows to look up the IView for a given SModelElement based on its type.\n */\nvar ViewRegistry = /** @class */ (function (_super) {\n __extends(ViewRegistry, _super);\n function ViewRegistry() {\n var _this = _super.call(this) || this;\n _this.registerDefaults();\n return _this;\n }\n ViewRegistry.prototype.registerDefaults = function () {\n this.register(smodel_factory_1.EMPTY_ROOT.type, EmptyView);\n };\n ViewRegistry.prototype.missing = function (key, element) {\n return new MissingView();\n };\n ViewRegistry = __decorate([\n inversify_1.injectable(),\n __metadata(\"design:paramtypes\", [])\n ], ViewRegistry);\n return ViewRegistry;\n}(registry_1.ProviderRegistry));\nexports.ViewRegistry = ViewRegistry;\nvar EmptyView = /** @class */ (function () {\n function EmptyView() {\n }\n EmptyView.prototype.render = function (model, context) {\n return JSX.createElement(\"svg\", { \"class-sprotty-empty\": true });\n };\n return EmptyView;\n}());\nexports.EmptyView = EmptyView;\nvar MissingView = /** @class */ (function () {\n function MissingView() {\n }\n MissingView.prototype.render = function (model, context) {\n var position = model.position || geometry_1.ORIGIN_POINT;\n return JSX.createElement(\"text\", { \"class-sprotty-missing\": true, x: position.x, y: position.y },\n \"?\",\n model.id,\n \"?\");\n };\n return MissingView;\n}());\nexports.MissingView = MissingView;\n//# sourceMappingURL=view.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/views/view.js\n// module id = 132\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../types\");\nvar animation_frame_syncer_1 = require(\"../animations/animation-frame-syncer\");\n/**\n * Updating the view is rather expensive, and it doesn't make sense to calculate\n * more then one update per animation (rendering) frame. So this class batches\n * all incoming model changes and only renders the last one when the next animation\n * frame comes.\n */\nvar ViewerCache = /** @class */ (function () {\n function ViewerCache(delegate, syncer) {\n this.delegate = delegate;\n this.syncer = syncer;\n }\n ViewerCache.prototype.isCacheEmpty = function () {\n return this.cachedModelRoot === undefined && this.cachedHiddenModelRoot === undefined &&\n this.cachedPopup === undefined;\n };\n ViewerCache.prototype.updatePopup = function (model) {\n var isCacheEmpty = this.isCacheEmpty();\n this.cachedPopup = model;\n if (isCacheEmpty)\n this.scheduleUpdate();\n };\n ViewerCache.prototype.update = function (model) {\n var isCacheEmpty = this.isCacheEmpty();\n this.cachedModelRoot = model;\n if (isCacheEmpty)\n this.scheduleUpdate();\n };\n ViewerCache.prototype.updateHidden = function (hiddenModel) {\n var isCacheEmpty = this.isCacheEmpty();\n this.cachedHiddenModelRoot = hiddenModel;\n if (isCacheEmpty)\n this.scheduleUpdate();\n };\n ViewerCache.prototype.scheduleUpdate = function () {\n var _this = this;\n this.syncer.onEndOfNextFrame(function () {\n if (_this.cachedHiddenModelRoot) {\n var nextHiddenModelRoot = _this.cachedHiddenModelRoot;\n _this.delegate.updateHidden(nextHiddenModelRoot);\n _this.cachedHiddenModelRoot = undefined;\n }\n if (_this.cachedModelRoot) {\n var nextModelRoot = _this.cachedModelRoot;\n _this.delegate.update(nextModelRoot);\n _this.cachedModelRoot = undefined;\n }\n if (_this.cachedPopup) {\n var nextModelRoot = _this.cachedPopup;\n _this.delegate.updatePopup(nextModelRoot);\n _this.cachedPopup = undefined;\n }\n });\n };\n ViewerCache = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.IViewer)), __param(0, inversify_1.named('delegate')),\n __param(1, inversify_1.inject(types_1.TYPES.AnimationFrameSyncer)),\n __metadata(\"design:paramtypes\", [Object, animation_frame_syncer_1.AnimationFrameSyncer])\n ], ViewerCache);\n return ViewerCache;\n}());\nexports.ViewerCache = ViewerCache;\n//# sourceMappingURL=viewer-cache.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/views/viewer-cache.js\n// module id = 133\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar snabbdom = require(\"snabbdom-jsx\");\nvar snabbdom_1 = require(\"snabbdom\");\nvar props_1 = require(\"snabbdom/modules/props\");\nvar attributes_1 = require(\"snabbdom/modules/attributes\");\nvar style_1 = require(\"snabbdom/modules/style\");\nvar eventlisteners_1 = require(\"snabbdom/modules/eventlisteners\");\nvar class_1 = require(\"snabbdom/modules/class\");\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../types\");\nvar geometry_1 = require(\"../../utils/geometry\");\nvar initialize_canvas_1 = require(\"../features/initialize-canvas\");\nvar vnode_utils_1 = require(\"./vnode-utils\");\nvar thunk_view_1 = require(\"./thunk-view\");\nvar smodel_factory_1 = require(\"../model/smodel-factory\");\nvar JSX = { createElement: snabbdom.html }; // must be html here, as we're creating a div\nvar ModelRenderer = /** @class */ (function () {\n function ModelRenderer(viewRegistry, decorators) {\n this.viewRegistry = viewRegistry;\n this.decorators = decorators;\n }\n ModelRenderer.prototype.decorate = function (vnode, element) {\n if (thunk_view_1.isThunk(vnode))\n return vnode;\n return this.decorators.reduce(function (n, decorator) { return decorator.decorate(n, element); }, vnode);\n };\n ModelRenderer.prototype.renderElement = function (element) {\n var vNode = this.viewRegistry.get(element.type, element).render(element, this);\n return this.decorate(vNode, element);\n };\n ModelRenderer.prototype.renderChildren = function (element) {\n var _this = this;\n return element.children.map(function (child) { return _this.renderElement(child); });\n };\n ModelRenderer.prototype.postUpdate = function () {\n this.decorators.forEach(function (decorator) { return decorator.postUpdate(); });\n };\n return ModelRenderer;\n}());\nexports.ModelRenderer = ModelRenderer;\n/**\n * The component that turns the model into an SVG DOM.\n * Uses a VDOM based on snabbdom.js for performance.\n */\nvar Viewer = /** @class */ (function () {\n function Viewer(modelRendererFactory, decorators, hiddenDecorators, popupDecorators, options, logger, actiondispatcher) {\n var _this = this;\n this.decorators = decorators;\n this.hiddenDecorators = hiddenDecorators;\n this.popupDecorators = popupDecorators;\n this.options = options;\n this.logger = logger;\n this.actiondispatcher = actiondispatcher;\n this.onWindowResize = function (vdom) {\n var baseDiv = document.getElementById(_this.options.baseDiv);\n if (baseDiv !== null) {\n var newBounds = _this.getBoundsInPage(baseDiv);\n _this.actiondispatcher.dispatch(new initialize_canvas_1.InitializeCanvasBoundsAction(newBounds));\n }\n };\n this.patcher = this.createPatcher();\n this.renderer = modelRendererFactory(decorators);\n this.hiddenRenderer = modelRendererFactory(hiddenDecorators);\n this.popupRenderer = modelRendererFactory(popupDecorators);\n }\n Viewer.prototype.createModules = function () {\n return [\n props_1.propsModule,\n attributes_1.attributesModule,\n class_1.classModule,\n style_1.styleModule,\n eventlisteners_1.eventListenersModule\n ];\n };\n Viewer.prototype.createPatcher = function () {\n return snabbdom_1.init(this.createModules());\n };\n Viewer.prototype.getBoundsInPage = function (element) {\n var bounds = element.getBoundingClientRect();\n var scroll = typeof window !== 'undefined' ? { x: window.scrollX, y: window.scrollY } : geometry_1.ORIGIN_POINT;\n return {\n x: bounds.left + scroll.x,\n y: bounds.top + scroll.y,\n width: bounds.width,\n height: bounds.height\n };\n };\n Viewer.prototype.update = function (model) {\n var _this = this;\n this.logger.log(this, 'rendering', model);\n var newVDOM = JSX.createElement(\"div\", { id: this.options.baseDiv }, this.renderer.renderElement(model));\n if (this.lastVDOM !== undefined) {\n var hadFocus = this.hasFocus();\n vnode_utils_1.copyClassesFromVNode(this.lastVDOM, newVDOM);\n this.lastVDOM = this.patcher.call(this, this.lastVDOM, newVDOM);\n this.restoreFocus(hadFocus);\n }\n else if (typeof document !== 'undefined') {\n var placeholder = document.getElementById(this.options.baseDiv);\n if (placeholder !== null) {\n if (typeof window !== 'undefined') {\n window.addEventListener('resize', function () {\n _this.onWindowResize(newVDOM);\n });\n }\n vnode_utils_1.copyClassesFromElement(placeholder, newVDOM);\n vnode_utils_1.setClass(newVDOM, this.options.baseClass, true);\n this.lastVDOM = this.patcher.call(this, placeholder, newVDOM);\n }\n else {\n this.logger.error(this, 'element not in DOM:', this.options.baseDiv);\n }\n }\n this.renderer.postUpdate();\n };\n Viewer.prototype.hasFocus = function () {\n if (typeof document !== 'undefined' && document.activeElement && this.lastVDOM.children && this.lastVDOM.children.length > 0) {\n var lastRootVNode = this.lastVDOM.children[0];\n if (typeof lastRootVNode === 'object') {\n var lastElement = lastRootVNode.elm;\n return document.activeElement === lastElement;\n }\n }\n return false;\n };\n Viewer.prototype.restoreFocus = function (focus) {\n if (focus && this.lastVDOM.children && this.lastVDOM.children.length > 0) {\n var lastRootVNode = this.lastVDOM.children[0];\n if (typeof lastRootVNode === 'object') {\n var lastElement = lastRootVNode.elm;\n if (lastElement && typeof lastElement.focus === 'function')\n lastElement.focus();\n }\n }\n };\n Viewer.prototype.updateHidden = function (hiddenModel) {\n this.logger.log(this, 'rendering hidden');\n var newVDOM;\n if (hiddenModel.type === smodel_factory_1.EMPTY_ROOT.type) {\n newVDOM = JSX.createElement(\"div\", { id: this.options.hiddenDiv });\n }\n else {\n var hiddenVNode = this.hiddenRenderer.renderElement(hiddenModel);\n vnode_utils_1.setAttr(hiddenVNode, 'opacity', 0);\n newVDOM = JSX.createElement(\"div\", { id: this.options.hiddenDiv }, hiddenVNode);\n }\n if (this.lastHiddenVDOM !== undefined) {\n vnode_utils_1.copyClassesFromVNode(this.lastHiddenVDOM, newVDOM);\n this.lastHiddenVDOM = this.patcher.call(this, this.lastHiddenVDOM, newVDOM);\n }\n else {\n var placeholder = document.getElementById(this.options.hiddenDiv);\n if (placeholder === null) {\n placeholder = document.createElement(\"div\");\n document.body.appendChild(placeholder);\n }\n else {\n vnode_utils_1.copyClassesFromElement(placeholder, newVDOM);\n }\n vnode_utils_1.setClass(newVDOM, this.options.baseClass, true);\n vnode_utils_1.setClass(newVDOM, this.options.hiddenClass, true);\n this.lastHiddenVDOM = this.patcher.call(this, placeholder, newVDOM);\n }\n this.hiddenRenderer.postUpdate();\n };\n Viewer.prototype.updatePopup = function (model) {\n this.logger.log(this, 'rendering popup', model);\n var popupClosed = model.type === smodel_factory_1.EMPTY_ROOT.type;\n var newVDOM;\n if (popupClosed) {\n newVDOM = JSX.createElement(\"div\", { id: this.options.popupDiv });\n }\n else {\n var position = model.canvasBounds;\n var inlineStyle = {\n top: position.y + 'px',\n left: position.x + 'px'\n };\n newVDOM = JSX.createElement(\"div\", { id: this.options.popupDiv, style: inlineStyle }, this.popupRenderer.renderElement(model));\n }\n if (this.lastPopupVDOM !== undefined) {\n vnode_utils_1.copyClassesFromVNode(this.lastPopupVDOM, newVDOM);\n vnode_utils_1.setClass(newVDOM, this.options.popupClosedClass, popupClosed);\n this.lastPopupVDOM = this.patcher.call(this, this.lastPopupVDOM, newVDOM);\n }\n else if (typeof document !== 'undefined') {\n var placeholder = document.getElementById(this.options.popupDiv);\n if (placeholder === null) {\n placeholder = document.createElement(\"div\");\n document.body.appendChild(placeholder);\n }\n else {\n vnode_utils_1.copyClassesFromElement(placeholder, newVDOM);\n }\n vnode_utils_1.setClass(newVDOM, this.options.popupClass, true);\n vnode_utils_1.setClass(newVDOM, this.options.popupClosedClass, popupClosed);\n this.lastPopupVDOM = this.patcher.call(this, placeholder, newVDOM);\n }\n this.popupRenderer.postUpdate();\n };\n Viewer = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.ModelRendererFactory)),\n __param(1, inversify_1.multiInject(types_1.TYPES.IVNodeDecorator)), __param(1, inversify_1.optional()),\n __param(2, inversify_1.multiInject(types_1.TYPES.HiddenVNodeDecorator)), __param(2, inversify_1.optional()),\n __param(3, inversify_1.multiInject(types_1.TYPES.PopupVNodeDecorator)), __param(3, inversify_1.optional()),\n __param(4, inversify_1.inject(types_1.TYPES.ViewerOptions)),\n __param(5, inversify_1.inject(types_1.TYPES.ILogger)),\n __param(6, inversify_1.inject(types_1.TYPES.IActionDispatcher)),\n __metadata(\"design:paramtypes\", [Function, Array, Array, Array, Object, Object, Object])\n ], Viewer);\n return Viewer;\n}());\nexports.Viewer = Viewer;\n//# sourceMappingURL=viewer.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/views/viewer.js\n// module id = 134\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar vnode_utils_1 = require(\"./vnode-utils\");\nvar FocusFixDecorator = /** @class */ (function () {\n function FocusFixDecorator() {\n }\n FocusFixDecorator_1 = FocusFixDecorator;\n FocusFixDecorator.prototype.decorate = function (vnode, element) {\n if (vnode.sel && vnode.sel.startsWith('svg'))\n // allows to set focus in Firefox\n vnode_utils_1.setAttr(vnode, 'tabindex', ++FocusFixDecorator_1.tabIndex);\n return vnode;\n };\n FocusFixDecorator.prototype.postUpdate = function () {\n };\n FocusFixDecorator.tabIndex = 1000;\n FocusFixDecorator = FocusFixDecorator_1 = __decorate([\n inversify_1.injectable()\n ], FocusFixDecorator);\n return FocusFixDecorator;\n var FocusFixDecorator_1;\n}());\nexports.FocusFixDecorator = FocusFixDecorator;\n//# sourceMappingURL=vnode-decorators.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/views/vnode-decorators.js\n// module id = 135\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar geometry_1 = require(\"../../utils/geometry\");\nvar abstract_layout_1 = require(\"./abstract-layout\");\n/**\n * Layouts children of a container in horizontal (left->right) direction.\n */\nvar HBoxLayouter = /** @class */ (function (_super) {\n __extends(HBoxLayouter, _super);\n function HBoxLayouter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n HBoxLayouter.prototype.getChildrenSize = function (container, containerOptions, layouter) {\n var maxWidth = 0;\n var maxHeight = -1;\n var isFirst = true;\n container.children.forEach(function (child) {\n var bounds = layouter.getBoundsData(child).bounds;\n if (bounds !== undefined && geometry_1.isValidDimension(bounds)) {\n if (isFirst)\n isFirst = false;\n else\n maxWidth += containerOptions.hGap;\n maxWidth += bounds.width;\n maxHeight = Math.max(maxHeight, bounds.height);\n }\n });\n return {\n width: maxWidth,\n height: maxHeight\n };\n };\n HBoxLayouter.prototype.layoutChild = function (child, boundsData, bounds, childOptions, containerOptions, currentOffset, maxWidth, maxHeight) {\n var dy = this.getDy(childOptions.vAlign, bounds, maxHeight);\n boundsData.bounds = {\n x: currentOffset.x + child.bounds.x - bounds.x,\n y: containerOptions.paddingTop + child.bounds.y - bounds.y + dy,\n width: bounds.width,\n height: bounds.height\n };\n boundsData.boundsChanged = true;\n return {\n x: currentOffset.x + bounds.width + containerOptions.hGap,\n y: currentOffset.y\n };\n };\n HBoxLayouter.prototype.getDefaultLayoutOptions = function () {\n return {\n resizeContainer: true,\n paddingTop: 5,\n paddingBottom: 5,\n paddingLeft: 5,\n paddingRight: 5,\n paddingFactor: 1,\n hGap: 1,\n vAlign: 'center'\n };\n };\n HBoxLayouter.prototype.spread = function (a, b) {\n return __assign({}, a, b);\n };\n HBoxLayouter.KIND = 'hbox';\n return HBoxLayouter;\n}(abstract_layout_1.AbstractLayout));\nexports.HBoxLayouter = HBoxLayouter;\n//# sourceMappingURL=hbox-layout.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/bounds/hbox-layout.js\n// module id = 136\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar geometry_1 = require(\"../../utils/geometry\");\nvar abstract_layout_1 = require(\"./abstract-layout\");\nvar StackLayouter = /** @class */ (function (_super) {\n __extends(StackLayouter, _super);\n function StackLayouter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n StackLayouter.prototype.getChildrenSize = function (container, options, layouter) {\n var maxWidth = -1;\n var maxHeight = -1;\n container.children.forEach(function (child) {\n var bounds = layouter.getBoundsData(child).bounds;\n if (bounds !== undefined && geometry_1.isValidDimension(bounds)) {\n maxWidth = Math.max(maxWidth, bounds.width);\n maxHeight = Math.max(maxHeight, bounds.height);\n }\n });\n return {\n width: maxWidth,\n height: maxHeight\n };\n };\n StackLayouter.prototype.layoutChild = function (child, boundsData, bounds, childOptions, containerOptions, currentOffset, maxWidth, maxHeight) {\n var dx = this.getDx(childOptions.hAlign, bounds, maxWidth);\n var dy = this.getDy(childOptions.vAlign, bounds, maxHeight);\n boundsData.bounds = {\n x: containerOptions.paddingLeft + child.bounds.x - bounds.x + dx,\n y: containerOptions.paddingTop + child.bounds.y - bounds.y + dy,\n width: bounds.width,\n height: bounds.height\n };\n boundsData.boundsChanged = true;\n return currentOffset;\n };\n StackLayouter.prototype.getDefaultLayoutOptions = function () {\n return {\n resizeContainer: true,\n paddingTop: 5,\n paddingBottom: 5,\n paddingLeft: 5,\n paddingRight: 5,\n paddingFactor: 1,\n hAlign: 'center',\n vAlign: 'center'\n };\n };\n StackLayouter.prototype.spread = function (a, b) {\n return __assign({}, a, b);\n };\n StackLayouter.KIND = 'stack';\n return StackLayouter;\n}(abstract_layout_1.AbstractLayout));\nexports.StackLayouter = StackLayouter;\n//# sourceMappingURL=stack-layout.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/bounds/stack-layout.js\n// module id = 137\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar geometry_1 = require(\"../../utils/geometry\");\nvar abstract_layout_1 = require(\"./abstract-layout\");\n/**\n * Layouts children of a container in vertical (top->bottom) direction.\n */\nvar VBoxLayouter = /** @class */ (function (_super) {\n __extends(VBoxLayouter, _super);\n function VBoxLayouter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n VBoxLayouter.prototype.getChildrenSize = function (container, containerOptions, layouter) {\n var maxWidth = -1;\n var maxHeight = 0;\n var isFirst = true;\n container.children.forEach(function (child) {\n var bounds = layouter.getBoundsData(child).bounds;\n if (bounds !== undefined && geometry_1.isValidDimension(bounds)) {\n maxHeight += bounds.height;\n if (isFirst)\n isFirst = false;\n else\n maxHeight += containerOptions.vGap;\n maxWidth = Math.max(maxWidth, bounds.width);\n }\n });\n return {\n width: maxWidth,\n height: maxHeight\n };\n };\n VBoxLayouter.prototype.layoutChild = function (child, boundsData, bounds, childOptions, containerOptions, currentOffset, maxWidth, maxHeight) {\n var dx = this.getDx(childOptions.hAlign, bounds, maxWidth);\n boundsData.bounds = {\n x: containerOptions.paddingLeft + child.bounds.x - bounds.x + dx,\n y: currentOffset.y + child.bounds.y - bounds.y,\n width: bounds.width,\n height: bounds.height\n };\n boundsData.boundsChanged = true;\n return {\n x: currentOffset.x,\n y: currentOffset.y + bounds.height + containerOptions.vGap\n };\n };\n VBoxLayouter.prototype.getDefaultLayoutOptions = function () {\n return {\n resizeContainer: true,\n paddingTop: 5,\n paddingBottom: 5,\n paddingLeft: 5,\n paddingRight: 5,\n paddingFactor: 1,\n vGap: 1,\n hAlign: 'center'\n };\n };\n VBoxLayouter.prototype.spread = function (a, b) {\n return __assign({}, a, b);\n };\n VBoxLayouter.KIND = 'vbox';\n return VBoxLayouter;\n}(abstract_layout_1.AbstractLayout));\nexports.VBoxLayouter = VBoxLayouter;\n//# sourceMappingURL=vbox-layout.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/bounds/vbox-layout.js\n// module id = 138\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar command_1 = require(\"../../base/commands/command\");\nvar model_1 = require(\"../select/model\");\nvar smodel_1 = require(\"../../base/model/smodel\");\nvar key_tool_1 = require(\"../../base/views/key-tool\");\nvar browser_1 = require(\"../../utils/browser\");\nvar model_2 = require(\"./model\");\nvar inversify_1 = require(\"inversify\");\nvar svg_exporter_1 = require(\"./svg-exporter\");\nvar smodel_factory_1 = require(\"../../base/model/smodel-factory\");\nvar model_3 = require(\"../viewport/model\");\nvar model_4 = require(\"../hover/model\");\nvar types_1 = require(\"../../base/types\");\nvar ExportSvgKeyListener = /** @class */ (function (_super) {\n __extends(ExportSvgKeyListener, _super);\n function ExportSvgKeyListener() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ExportSvgKeyListener.prototype.keyDown = function (element, event) {\n if (browser_1.isCtrlOrCmd(event) && event.keyCode === 69)\n return [new RequestExportSvgAction()];\n else\n return [];\n };\n ExportSvgKeyListener = __decorate([\n inversify_1.injectable()\n ], ExportSvgKeyListener);\n return ExportSvgKeyListener;\n}(key_tool_1.KeyListener));\nexports.ExportSvgKeyListener = ExportSvgKeyListener;\nvar RequestExportSvgAction = /** @class */ (function () {\n function RequestExportSvgAction() {\n this.kind = ExportSvgCommand.KIND;\n }\n return RequestExportSvgAction;\n}());\nexports.RequestExportSvgAction = RequestExportSvgAction;\nvar ExportSvgCommand = /** @class */ (function (_super) {\n __extends(ExportSvgCommand, _super);\n function ExportSvgCommand() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ExportSvgCommand.prototype.execute = function (context) {\n if (model_2.isExportable(context.root)) {\n var root = context.modelFactory.createRoot(context.modelFactory.createSchema(context.root));\n if (model_2.isExportable(root)) {\n root.export = true;\n if (model_3.isViewport(root)) {\n root.zoom = 1;\n root.scroll = {\n x: 0,\n y: 0\n };\n }\n root.index.all().forEach(function (element) {\n if (model_1.isSelectable(element) && element.selected)\n element.selected = false;\n if (model_4.isHoverable(element) && element.hoverFeedback)\n element.hoverFeedback = false;\n });\n return root;\n }\n }\n return context.modelFactory.createRoot(smodel_factory_1.EMPTY_ROOT);\n };\n ExportSvgCommand.KIND = 'requestExportSvg';\n return ExportSvgCommand;\n}(command_1.HiddenCommand));\nexports.ExportSvgCommand = ExportSvgCommand;\nvar ExportSvgDecorator = /** @class */ (function () {\n function ExportSvgDecorator(svgExporter) {\n this.svgExporter = svgExporter;\n }\n ExportSvgDecorator.prototype.decorate = function (vnode, element) {\n if (element instanceof smodel_1.SModelRoot)\n this.root = element;\n return vnode;\n };\n ExportSvgDecorator.prototype.postUpdate = function () {\n if (this.root && model_2.isExportable(this.root) && this.root.export)\n this.svgExporter.export(this.root);\n };\n ExportSvgDecorator = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.SvgExporter)),\n __metadata(\"design:paramtypes\", [svg_exporter_1.SvgExporter])\n ], ExportSvgDecorator);\n return ExportSvgDecorator;\n}());\nexports.ExportSvgDecorator = ExportSvgDecorator;\n//# sourceMappingURL=export.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/export/export.js\n// module id = 139\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.openFeature = Symbol('openFeature');\nfunction isOpenable(element) {\n return element.hasFeature(exports.openFeature);\n}\nexports.isOpenable = isOpenable;\n//# sourceMappingURL=model.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/open/model.js\n// module id = 140\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar browser_1 = require(\"../../utils/browser\");\nvar smodel_1 = require(\"../../base/model/smodel\");\nvar smodel_utils_1 = require(\"../../base/model/smodel-utils\");\nvar command_1 = require(\"../../base/commands/command\");\nvar sgraph_1 = require(\"../../graph/sgraph\");\nvar mouse_tool_1 = require(\"../../base/views/mouse-tool\");\nvar key_tool_1 = require(\"../../base/views/key-tool\");\nvar vnode_utils_1 = require(\"../../base/views/vnode-utils\");\nvar model_1 = require(\"./model\");\nvar button_handler_1 = require(\"../button/button-handler\");\nvar inversify_1 = require(\"inversify\");\nvar model_2 = require(\"../button/model\");\n/**\n * Triggered when the user changes the selection, e.g. by clicking on a selectable element. The resulting\n * SelectCommand changes the `selected` state accordingly, so the elements can be rendered differently.\n * This action is also forwarded to the diagram server, if present, so it may react on the selection change.\n * Furthermore, the server can send such an action to the client in order to change the selection programmatically.\n */\nvar SelectAction = /** @class */ (function () {\n function SelectAction(selectedElementsIDs, deselectedElementsIDs) {\n if (selectedElementsIDs === void 0) { selectedElementsIDs = []; }\n if (deselectedElementsIDs === void 0) { deselectedElementsIDs = []; }\n this.selectedElementsIDs = selectedElementsIDs;\n this.deselectedElementsIDs = deselectedElementsIDs;\n this.kind = SelectCommand.KIND;\n }\n return SelectAction;\n}());\nexports.SelectAction = SelectAction;\n/**\n * Programmatic action for selecting or deselecting all elements.\n */\nvar SelectAllAction = /** @class */ (function () {\n /**\n * If `select` is true, all elements are selected, othewise they are deselected.\n */\n function SelectAllAction(select) {\n if (select === void 0) { select = true; }\n this.select = select;\n this.kind = SelectAllCommand.KIND;\n }\n return SelectAllAction;\n}());\nexports.SelectAllAction = SelectAllAction;\nvar SelectCommand = /** @class */ (function (_super) {\n __extends(SelectCommand, _super);\n function SelectCommand(action) {\n var _this = _super.call(this) || this;\n _this.action = action;\n _this.selected = [];\n _this.deselected = [];\n return _this;\n }\n SelectCommand.prototype.execute = function (context) {\n var _this = this;\n var selectedNodeIds = [];\n var model = context.root;\n this.action.selectedElementsIDs.forEach(function (id) {\n var element = model.index.getById(id);\n if (element instanceof smodel_1.SChildElement && model_1.isSelectable(element)) {\n _this.selected.push({\n element: element,\n index: element.parent.children.indexOf(element)\n });\n if (element instanceof sgraph_1.SNode)\n selectedNodeIds.push(id);\n }\n });\n if (selectedNodeIds.length > 0) {\n var connectedEdges_1 = [];\n model.index.all().forEach(function (element) {\n if (element instanceof sgraph_1.SEdge\n && (selectedNodeIds.indexOf(element.sourceId) >= 0\n || selectedNodeIds.indexOf(element.targetId) >= 0)) {\n connectedEdges_1.push({\n element: element,\n index: element.parent.children.indexOf(element)\n });\n }\n });\n this.selected = connectedEdges_1.concat(this.selected);\n }\n this.action.deselectedElementsIDs.forEach(function (id) {\n var element = model.index.getById(id);\n if (element instanceof smodel_1.SChildElement && model_1.isSelectable(element)) {\n _this.deselected.push({\n element: element,\n index: element.parent.children.indexOf(element)\n });\n }\n });\n return this.redo(context);\n };\n SelectCommand.prototype.undo = function (context) {\n for (var i = this.selected.length - 1; i >= 0; --i) {\n var selection = this.selected[i];\n var element = selection.element;\n if (model_1.isSelectable(element))\n element.selected = false;\n element.parent.move(element, selection.index);\n }\n this.deselected.reverse().forEach(function (selection) {\n if (model_1.isSelectable(selection.element))\n selection.element.selected = true;\n });\n return context.root;\n };\n SelectCommand.prototype.redo = function (context) {\n for (var i = 0; i < this.selected.length; ++i) {\n var selection = this.selected[i];\n var element = selection.element;\n var childrenLength = element.parent.children.length;\n element.parent.move(element, childrenLength - 1);\n }\n this.deselected.forEach(function (selection) {\n if (model_1.isSelectable(selection.element))\n selection.element.selected = false;\n });\n this.selected.forEach(function (selection) {\n if (model_1.isSelectable(selection.element))\n selection.element.selected = true;\n });\n return context.root;\n };\n SelectCommand.KIND = 'elementSelected';\n return SelectCommand;\n}(command_1.Command));\nexports.SelectCommand = SelectCommand;\nvar SelectAllCommand = /** @class */ (function (_super) {\n __extends(SelectAllCommand, _super);\n function SelectAllCommand(action) {\n var _this = _super.call(this) || this;\n _this.action = action;\n _this.previousSelection = {};\n return _this;\n }\n SelectAllCommand.prototype.execute = function (context) {\n this.selectAll(context.root, this.action.select);\n return context.root;\n };\n SelectAllCommand.prototype.selectAll = function (element, newState) {\n if (model_1.isSelectable(element)) {\n this.previousSelection[element.id] = element.selected;\n element.selected = newState;\n }\n for (var _i = 0, _a = element.children; _i < _a.length; _i++) {\n var child = _a[_i];\n this.selectAll(child, newState);\n }\n };\n SelectAllCommand.prototype.undo = function (context) {\n var index = context.root.index;\n for (var id in this.previousSelection) {\n var element = index.getById(id);\n if (element !== undefined && model_1.isSelectable(element))\n element.selected = this.previousSelection[id];\n }\n return context.root;\n };\n SelectAllCommand.prototype.redo = function (context) {\n this.selectAll(context.root, this.action.select);\n return context.root;\n };\n SelectAllCommand.KIND = 'allSelected';\n return SelectAllCommand;\n}(command_1.Command));\nexports.SelectAllCommand = SelectAllCommand;\nvar SelectMouseListener = /** @class */ (function (_super) {\n __extends(SelectMouseListener, _super);\n function SelectMouseListener(buttonHandlerRegistry) {\n var _this = _super.call(this) || this;\n _this.buttonHandlerRegistry = buttonHandlerRegistry;\n _this.wasSelected = false;\n _this.hasDragged = false;\n return _this;\n }\n SelectMouseListener.prototype.mouseDown = function (target, event) {\n if (event.button === 0) {\n if (this.buttonHandlerRegistry !== undefined && target instanceof model_2.SButton && target.enabled) {\n var buttonHandler = this.buttonHandlerRegistry.get(target.type);\n if (buttonHandler !== undefined)\n return buttonHandler.buttonPressed(target);\n }\n var selectableTarget = smodel_utils_1.findParentByFeature(target, model_1.isSelectable);\n if (selectableTarget !== undefined || target instanceof smodel_1.SModelRoot) {\n this.hasDragged = false;\n var deselectIds = [];\n // multi-selection?\n if (!browser_1.isCtrlOrCmd(event)) {\n deselectIds = target.root\n .index\n .all()\n .filter(function (element) { return model_1.isSelectable(element) && element.selected; })\n .map(function (element) { return element.id; });\n }\n if (selectableTarget !== undefined) {\n if (!selectableTarget.selected) {\n this.wasSelected = false;\n return [new SelectAction([selectableTarget.id], deselectIds)];\n }\n else {\n if (browser_1.isCtrlOrCmd(event)) {\n this.wasSelected = false;\n return [new SelectAction([], [selectableTarget.id])];\n }\n else {\n this.wasSelected = true;\n }\n }\n }\n else {\n return [new SelectAction([], deselectIds)];\n }\n }\n }\n return [];\n };\n SelectMouseListener.prototype.mouseMove = function (target, event) {\n this.hasDragged = true;\n return [];\n };\n SelectMouseListener.prototype.mouseUp = function (target, event) {\n if (event.button === 0) {\n if (!this.hasDragged) {\n var selectableTarget = smodel_utils_1.findParentByFeature(target, model_1.isSelectable);\n if (selectableTarget !== undefined && this.wasSelected) {\n return [new SelectAction([selectableTarget.id], [])];\n }\n }\n }\n this.hasDragged = false;\n return [];\n };\n SelectMouseListener.prototype.decorate = function (vnode, element) {\n var selectableTarget = smodel_utils_1.findParentByFeature(element, model_1.isSelectable);\n if (selectableTarget !== undefined)\n vnode_utils_1.setClass(vnode, 'selected', selectableTarget.selected);\n return vnode;\n };\n SelectMouseListener = __decorate([\n __param(0, inversify_1.inject(button_handler_1.ButtonHandlerRegistry)), __param(0, inversify_1.optional()),\n __metadata(\"design:paramtypes\", [button_handler_1.ButtonHandlerRegistry])\n ], SelectMouseListener);\n return SelectMouseListener;\n}(mouse_tool_1.MouseListener));\nexports.SelectMouseListener = SelectMouseListener;\nvar SelectKeyboardListener = /** @class */ (function (_super) {\n __extends(SelectKeyboardListener, _super);\n function SelectKeyboardListener() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SelectKeyboardListener.prototype.keyDown = function (element, event) {\n if (browser_1.isCtrlOrCmd(event) && event.keyCode === 65) {\n return [new SelectAction(element.root.index.all().filter(function (e) { return model_1.isSelectable(e); }).map(function (e) { return e.id; }), [])];\n }\n return [];\n };\n return SelectKeyboardListener;\n}(key_tool_1.KeyListener));\nexports.SelectKeyboardListener = SelectKeyboardListener;\n//# sourceMappingURL=select.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/select/select.js\n// module id = 141\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar smodel_1 = require(\"../../base/model/smodel\");\nvar mouse_tool_1 = require(\"../../base/views/mouse-tool\");\nvar smodel_utils_1 = require(\"../../base/model/smodel-utils\");\nvar viewport_1 = require(\"./viewport\");\nvar model_1 = require(\"./model\");\nvar model_2 = require(\"../move/model\");\nfunction isScrollable(element) {\n return 'scroll' in element;\n}\nexports.isScrollable = isScrollable;\nvar ScrollMouseListener = /** @class */ (function (_super) {\n __extends(ScrollMouseListener, _super);\n function ScrollMouseListener() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ScrollMouseListener.prototype.mouseDown = function (target, event) {\n var selectable = smodel_utils_1.findParentByFeature(target, model_2.isMoveable);\n if (selectable === undefined) {\n var viewport = smodel_utils_1.findParentByFeature(target, model_1.isViewport);\n if (viewport)\n this.lastScrollPosition = { x: event.pageX, y: event.pageY };\n else\n this.lastScrollPosition = undefined;\n }\n return [];\n };\n ScrollMouseListener.prototype.mouseMove = function (target, event) {\n if (event.buttons === 0)\n this.mouseUp(target, event);\n else if (this.lastScrollPosition) {\n var viewport = smodel_utils_1.findParentByFeature(target, model_1.isViewport);\n if (viewport) {\n var dx = (event.pageX - this.lastScrollPosition.x) / viewport.zoom;\n var dy = (event.pageY - this.lastScrollPosition.y) / viewport.zoom;\n var newViewport = {\n scroll: {\n x: viewport.scroll.x - dx,\n y: viewport.scroll.y - dy,\n },\n zoom: viewport.zoom\n };\n this.lastScrollPosition = { x: event.pageX, y: event.pageY };\n return [new viewport_1.ViewportAction(viewport.id, newViewport, false)];\n }\n }\n return [];\n };\n ScrollMouseListener.prototype.mouseEnter = function (target, event) {\n if (target instanceof smodel_1.SModelRoot && event.buttons === 0)\n this.mouseUp(target, event);\n return [];\n };\n ScrollMouseListener.prototype.mouseUp = function (target, event) {\n this.lastScrollPosition = undefined;\n return [];\n };\n return ScrollMouseListener;\n}(mouse_tool_1.MouseListener));\nexports.ScrollMouseListener = ScrollMouseListener;\n//# sourceMappingURL=scroll.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/viewport/scroll.js\n// module id = 142\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar mouse_tool_1 = require(\"../../base/views/mouse-tool\");\nvar smodel_utils_1 = require(\"../../base/model/smodel-utils\");\nvar viewport_1 = require(\"./viewport\");\nvar model_1 = require(\"./model\");\nfunction isZoomable(element) {\n return 'zoom' in element;\n}\nexports.isZoomable = isZoomable;\nvar ZoomMouseListener = /** @class */ (function (_super) {\n __extends(ZoomMouseListener, _super);\n function ZoomMouseListener() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ZoomMouseListener.prototype.wheel = function (target, event) {\n var viewport = smodel_utils_1.findParentByFeature(target, model_1.isViewport);\n if (viewport) {\n var newZoom = Math.exp(-event.deltaY * 0.005);\n var factor = 1. / (newZoom * viewport.zoom) - 1. / viewport.zoom;\n var newViewport = {\n scroll: {\n x: -(factor * event.offsetX - viewport.scroll.x),\n y: -(factor * event.offsetY - viewport.scroll.y)\n },\n zoom: viewport.zoom * newZoom\n };\n return [new viewport_1.ViewportAction(viewport.id, newViewport, false)];\n }\n return [];\n };\n return ZoomMouseListener;\n}(mouse_tool_1.MouseListener));\nexports.ZoomMouseListener = ZoomMouseListener;\n//# sourceMappingURL=zoom.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/viewport/zoom.js\n// module id = 143\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar snabbdom = require(\"snabbdom-jsx\");\nvar geometry_1 = require(\"../utils/geometry\");\nvar vnode_utils_1 = require(\"../base/views/vnode-utils\");\nvar smodel_utils_1 = require(\"../base/model/smodel-utils\");\nvar JSX = { createElement: snabbdom.svg };\n/**\n * IView component that turns an SGraph element and its children into a tree of virtual DOM elements.\n */\nvar SGraphView = /** @class */ (function () {\n function SGraphView() {\n }\n SGraphView.prototype.render = function (model, context) {\n var transform = \"scale(\" + model.zoom + \") translate(\" + -model.scroll.x + \",\" + -model.scroll.y + \")\";\n return JSX.createElement(\"svg\", { \"class-sprotty-graph\": true },\n JSX.createElement(\"g\", { transform: transform }, context.renderChildren(model)));\n };\n return SGraphView;\n}());\nexports.SGraphView = SGraphView;\nvar AnchorableView = /** @class */ (function () {\n function AnchorableView() {\n }\n AnchorableView.prototype.getStrokeWidth = function (model) {\n return 0;\n };\n AnchorableView.prototype.getTranslatedAnchor = function (node, refPoint, refContainer, anchorCorrection, edge) {\n if (anchorCorrection === void 0) { anchorCorrection = 0; }\n var viewContainer = node.parent;\n var anchor = this.getAnchor(node, smodel_utils_1.translatePoint(refPoint, refContainer, viewContainer), anchorCorrection);\n var edgeContainer = edge.parent;\n return smodel_utils_1.translatePoint(anchor, viewContainer, edgeContainer);\n };\n return AnchorableView;\n}());\nexports.AnchorableView = AnchorableView;\nvar PolylineEdgeView = /** @class */ (function () {\n function PolylineEdgeView() {\n this.minimalPointDistance = 2;\n }\n PolylineEdgeView.prototype.render = function (edge, context) {\n var source = edge.source;\n if (source === undefined)\n return this.renderDanglingEdge(\"Cannot resolve source\", edge, context);\n var target = edge.target;\n if (target === undefined)\n return this.renderDanglingEdge(\"Cannot resolve target\", edge, context);\n var sourceView = context.viewRegistry.get(source.type, source);\n if (!(sourceView instanceof AnchorableView))\n return this.renderDanglingEdge(\"Expected source view type: AnchorableView\", edge, context);\n var targetView = context.viewRegistry.get(target.type, target);\n if (!(targetView instanceof AnchorableView))\n return this.renderDanglingEdge(\"Expected target view type: AnchorableView\", edge, context);\n var segments = this.computeSegments(edge, source, sourceView, target, targetView);\n return JSX.createElement(\"g\", null,\n this.renderLine(edge, segments, context),\n this.renderAdditionals(edge, segments, context),\n context.renderChildren(edge));\n };\n PolylineEdgeView.prototype.computeSegments = function (edge, source, sourceView, target, targetView) {\n var sourceAnchor;\n if (edge.routingPoints !== undefined && edge.routingPoints.length >= 1) {\n // Use the first routing point as start anchor reference\n var p0 = edge.routingPoints[0];\n sourceAnchor = sourceView.getTranslatedAnchor(source, p0, edge.parent, this.getSourceAnchorCorrection(edge), edge);\n }\n else {\n // Use the target center as start anchor reference\n var reference = geometry_1.center(target.bounds);\n sourceAnchor = sourceView.getTranslatedAnchor(source, reference, target.parent, this.getSourceAnchorCorrection(edge), edge);\n }\n var result = [sourceAnchor];\n var previousPoint = sourceAnchor;\n for (var i = 0; i < edge.routingPoints.length - 1; i++) {\n var p = edge.routingPoints[i];\n var minDistance = this.minimalPointDistance + ((i === 0)\n ? this.getSourceAnchorCorrection(edge) + sourceView.getStrokeWidth(source)\n : 0);\n if (geometry_1.maxDistance(previousPoint, p) >= minDistance) {\n result.push(p);\n previousPoint = p;\n }\n }\n var targetAnchor;\n if (edge.routingPoints && edge.routingPoints.length >= 2) {\n // Use the last routing point as end anchor reference\n var pn = edge.routingPoints[edge.routingPoints.length - 1];\n targetAnchor = targetView.getTranslatedAnchor(target, pn, edge.parent, this.getTargetAnchorCorrection(edge), edge);\n var minDistance = this.minimalPointDistance + this.getTargetAnchorCorrection(edge) + targetView.getStrokeWidth(source);\n if (geometry_1.maxDistance(previousPoint, pn) >= this.minimalPointDistance\n && geometry_1.maxDistance(pn, targetAnchor) >= minDistance) {\n result.push(pn);\n }\n }\n else {\n // Use the source center as end anchor reference\n var reference = geometry_1.center(source.bounds);\n targetAnchor = targetView.getTranslatedAnchor(target, reference, source.parent, this.getTargetAnchorCorrection(edge), edge);\n }\n result.push(targetAnchor);\n return result;\n };\n PolylineEdgeView.prototype.renderLine = function (edge, segments, context) {\n var firstPoint = segments[0];\n var path = \"M \" + firstPoint.x + \",\" + firstPoint.y;\n for (var i = 1; i < segments.length; i++) {\n var p = segments[i];\n path += \" L \" + p.x + \",\" + p.y;\n }\n return JSX.createElement(\"path\", { \"class-sprotty-edge\": true, d: path });\n };\n PolylineEdgeView.prototype.renderAdditionals = function (edge, segments, context) {\n return [];\n };\n PolylineEdgeView.prototype.renderDanglingEdge = function (message, edge, context) {\n return JSX.createElement(\"text\", { \"class-sprotty-edge-dangling\": true, title: message }, \"?\");\n };\n PolylineEdgeView.prototype.getSourceAnchorCorrection = function (edge) {\n return 0;\n };\n PolylineEdgeView.prototype.getTargetAnchorCorrection = function (edge) {\n return 0;\n };\n return PolylineEdgeView;\n}());\nexports.PolylineEdgeView = PolylineEdgeView;\nvar SLabelView = /** @class */ (function () {\n function SLabelView() {\n }\n SLabelView.prototype.render = function (label, context) {\n var vnode = JSX.createElement(\"text\", { \"class-sprotty-label\": true }, label.text);\n var subType = smodel_utils_1.getSubType(label);\n if (subType)\n vnode_utils_1.setAttr(vnode, 'class', subType);\n return vnode;\n };\n return SLabelView;\n}());\nexports.SLabelView = SLabelView;\nvar SCompartmentView = /** @class */ (function () {\n function SCompartmentView() {\n }\n SCompartmentView.prototype.render = function (model, context) {\n var translate = \"translate(\" + model.bounds.x + \", \" + model.bounds.y + \")\";\n var vnode = JSX.createElement(\"g\", { transform: translate, \"class-sprotty-comp\": \"{true}\" }, context.renderChildren(model));\n var subType = smodel_utils_1.getSubType(model);\n if (subType)\n vnode_utils_1.setAttr(vnode, 'class', subType);\n return vnode;\n };\n return SCompartmentView;\n}());\nexports.SCompartmentView = SCompartmentView;\n//# sourceMappingURL=views.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/graph/views.js\n// module id = 144\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../base/types\");\nvar smodel_1 = require(\"../base/model/smodel\");\nvar smodel_storage_1 = require(\"../base/model/smodel-storage\");\nvar action_handler_1 = require(\"../base/actions/action-handler\");\nvar set_model_1 = require(\"../base/features/set-model\");\nvar update_model_1 = require(\"../features/update/update-model\");\nvar bounds_manipulation_1 = require(\"../features/bounds/bounds-manipulation\");\nvar hover_1 = require(\"../features/hover/hover\");\nvar model_source_1 = require(\"./model-source\");\nvar svg_exporter_1 = require(\"../features/export/svg-exporter\");\nvar file_saver_1 = require(\"file-saver\");\nvar expand_1 = require(\"../features/expand/expand\");\nvar open_1 = require(\"../features/open/open\");\nfunction isActionMessage(object) {\n return object !== undefined && object.hasOwnProperty('clientId') && object.hasOwnProperty('action');\n}\nexports.isActionMessage = isActionMessage;\n/**\n * Sent by the external server when to signal a state change.\n */\nvar ServerStatusAction = /** @class */ (function () {\n function ServerStatusAction() {\n this.kind = ServerStatusAction.KIND;\n }\n ServerStatusAction.KIND = 'serverStatus';\n return ServerStatusAction;\n}());\nexports.ServerStatusAction = ServerStatusAction;\nvar receivedFromServerProperty = '__receivedFromServer';\n/**\n * A ModelSource that communicates with an external model provider, e.g.\n * a model editor.\n *\n * This class defines which actions are sent to and received from the\n * external model source.\n */\nvar DiagramServer = /** @class */ (function (_super) {\n __extends(DiagramServer, _super);\n function DiagramServer(actionDispatcher, actionHandlerRegistry, viewerOptions, storage, logger) {\n var _this = _super.call(this, actionDispatcher, actionHandlerRegistry, viewerOptions) || this;\n _this.storage = storage;\n _this.logger = logger;\n _this.currentRoot = {\n type: 'NONE',\n id: 'ROOT'\n };\n _this.clientId = _this.viewerOptions.baseDiv;\n return _this;\n }\n DiagramServer.prototype.initialize = function (registry) {\n _super.prototype.initialize.call(this, registry);\n // Register model manipulation commands\n registry.registerCommand(update_model_1.UpdateModelCommand);\n // Register this model source\n registry.register(bounds_manipulation_1.ComputedBoundsAction.KIND, this);\n registry.register(bounds_manipulation_1.RequestBoundsCommand.KIND, this);\n registry.register(hover_1.RequestPopupModelAction.KIND, this);\n registry.register(expand_1.CollapseExpandAction.KIND, this);\n registry.register(expand_1.CollapseExpandAllAction.KIND, this);\n registry.register(open_1.OpenAction.KIND, this);\n registry.register(ServerStatusAction.KIND, this);\n };\n DiagramServer.prototype.handle = function (action) {\n var forwardToServer = this.handleLocally(action);\n if (forwardToServer) {\n var message = {\n clientId: this.clientId,\n action: action\n };\n this.logger.log(this, 'sending', message);\n this.sendMessage(message);\n }\n };\n DiagramServer.prototype.messageReceived = function (data) {\n var object = typeof (data) === 'string' ? JSON.parse(data) : data;\n if (isActionMessage(object) && object.action) {\n if (!object.clientId || object.clientId === this.clientId) {\n this.logger.log(this, 'receiving', object);\n object.action[receivedFromServerProperty] = true;\n this.actionDispatcher.dispatch(object.action, this.storeNewModel.bind(this));\n }\n }\n else {\n this.logger.error(this, 'received data is not an action message', object);\n }\n };\n /**\n * Check whether the given action should be handled locally. Returns true if the action should\n * still be sent to the server, and false if it's only handled locally.\n */\n DiagramServer.prototype.handleLocally = function (action) {\n this.storeNewModel(action);\n switch (action.kind) {\n case bounds_manipulation_1.ComputedBoundsAction.KIND:\n return this.handleComputedBounds(action);\n case bounds_manipulation_1.RequestBoundsCommand.KIND:\n return false;\n case svg_exporter_1.ExportSvgAction.KIND:\n return this.handleExportSvgAction(action);\n case ServerStatusAction.KIND:\n return this.handleServerStateAction(action);\n }\n return !action[receivedFromServerProperty];\n };\n /**\n * Put the new model contained in the given action into the model storage, if there is any.\n */\n DiagramServer.prototype.storeNewModel = function (action) {\n if (action.kind === set_model_1.SetModelCommand.KIND\n || action.kind === update_model_1.UpdateModelCommand.KIND\n || action.kind === bounds_manipulation_1.RequestBoundsCommand.KIND) {\n var newRoot = action.newRoot;\n if (newRoot) {\n this.currentRoot = newRoot;\n this.storage.store(this.currentRoot);\n }\n }\n };\n /**\n * If the server requires to compute a layout, the computed bounds are forwarded. Otherwise they\n * are applied to the current model locally and a model update is triggered.\n */\n DiagramServer.prototype.handleComputedBounds = function (action) {\n if (this.viewerOptions.needsServerLayout) {\n return true;\n }\n else {\n var index = new smodel_1.SModelIndex();\n index.add(this.currentRoot);\n for (var _i = 0, _a = action.bounds; _i < _a.length; _i++) {\n var b = _a[_i];\n var element = index.getById(b.elementId);\n if (element !== undefined)\n this.applyBounds(element, b.newBounds);\n }\n if (action.alignments !== undefined) {\n for (var _b = 0, _c = action.alignments; _b < _c.length; _b++) {\n var a = _c[_b];\n var element = index.getById(a.elementId);\n if (element !== undefined)\n this.applyAlignment(element, a.newAlignment);\n }\n }\n this.actionDispatcher.dispatch(new update_model_1.UpdateModelAction(this.currentRoot));\n return false;\n }\n };\n DiagramServer.prototype.applyBounds = function (element, newBounds) {\n var e = element;\n e.position = { x: newBounds.x, y: newBounds.y };\n e.size = { width: newBounds.width, height: newBounds.height };\n };\n DiagramServer.prototype.applyAlignment = function (element, newAlignment) {\n var e = element;\n e.alignment = { x: newAlignment.x, y: newAlignment.y };\n };\n DiagramServer.prototype.handleExportSvgAction = function (action) {\n var blob = new Blob([action.svg], { type: \"text/plain;charset=utf-8\" });\n file_saver_1.saveAs(blob, \"diagram.svg\");\n return false;\n };\n DiagramServer.prototype.handleServerStateAction = function (action) {\n return false;\n };\n DiagramServer = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.IActionDispatcher)),\n __param(1, inversify_1.inject(types_1.TYPES.ActionHandlerRegistry)),\n __param(2, inversify_1.inject(types_1.TYPES.ViewerOptions)),\n __param(3, inversify_1.inject(types_1.TYPES.SModelStorage)),\n __param(4, inversify_1.inject(types_1.TYPES.ILogger)),\n __metadata(\"design:paramtypes\", [Object, action_handler_1.ActionHandlerRegistry, Object, smodel_storage_1.SModelStorage, Object])\n ], DiagramServer);\n return DiagramServer;\n}(model_source_1.ModelSource));\nexports.DiagramServer = DiagramServer;\n//# sourceMappingURL=diagram-server.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/model-source/diagram-server.js\n// module id = 145\n// module chunks = 0","\"use strict\";\n/*\n* Copyright (C) 2017 TypeFox and others.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ExpansionState = /** @class */ (function () {\n function ExpansionState(root) {\n this.expandedElementIds = [];\n this.initialize(root);\n }\n ExpansionState.prototype.initialize = function (element) {\n var _this = this;\n if (element.expanded)\n this.expandedElementIds.push(element.id);\n if (element.children !== undefined)\n element.children.forEach(function (child) { return _this.initialize(child); });\n };\n ExpansionState.prototype.apply = function (action) {\n for (var _i = 0, _a = action.collapseIds; _i < _a.length; _i++) {\n var collapsed = _a[_i];\n var index = this.expandedElementIds.indexOf(collapsed);\n if (index !== -1)\n this.expandedElementIds.splice(index, 1);\n }\n for (var _b = 0, _c = action.expandIds; _b < _c.length; _b++) {\n var expanded = _c[_b];\n this.expandedElementIds.push(expanded);\n }\n };\n ExpansionState.prototype.collapseAll = function () {\n this.expandedElementIds = [];\n };\n return ExpansionState;\n}());\nexports.ExpansionState = ExpansionState;\n//# sourceMappingURL=diagram-state.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/model-source/diagram-state.js\n// module id = 146\n// module chunks = 0","import { vnode } from './vnode';\nimport * as is from './is';\nfunction addNS(data, children, sel) {\n data.ns = 'http://www.w3.org/2000/svg';\n if (sel !== 'foreignObject' && children !== undefined) {\n for (var i = 0; i < children.length; ++i) {\n var childData = children[i].data;\n if (childData !== undefined) {\n addNS(childData, children[i].children, children[i].sel);\n }\n }\n }\n}\nexport function h(sel, b, c) {\n var data = {}, children, text, i;\n if (c !== undefined) {\n data = b;\n if (is.array(c)) {\n children = c;\n }\n else if (is.primitive(c)) {\n text = c;\n }\n else if (c && c.sel) {\n children = [c];\n }\n }\n else if (b !== undefined) {\n if (is.array(b)) {\n children = b;\n }\n else if (is.primitive(b)) {\n text = b;\n }\n else if (b && b.sel) {\n children = [b];\n }\n else {\n data = b;\n }\n }\n if (is.array(children)) {\n for (i = 0; i < children.length; ++i) {\n if (is.primitive(children[i]))\n children[i] = vnode(undefined, undefined, undefined, children[i], undefined);\n }\n }\n if (sel[0] === 's' && sel[1] === 'v' && sel[2] === 'g' &&\n (sel.length === 3 || sel[3] === '.' || sel[3] === '#')) {\n addNS(data, children, sel);\n }\n return vnode(sel, data, children, text, undefined);\n}\n;\nexport default h;\n//# sourceMappingURL=h.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/~/snabbdom/es/h.js\n// module id = 147\n// module chunks = 0","export var array = Array.isArray;\nexport function primitive(s) {\n return typeof s === 'string' || typeof s === 'number';\n}\n//# sourceMappingURL=is.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/~/snabbdom/es/is.js\n// module id = 148\n// module chunks = 0","import vnode from './vnode';\nimport * as is from './is';\nimport htmlDomApi from './htmldomapi';\nfunction isUndef(s) { return s === undefined; }\nfunction isDef(s) { return s !== undefined; }\nvar emptyNode = vnode('', {}, [], undefined, undefined);\nfunction sameVnode(vnode1, vnode2) {\n return vnode1.key === vnode2.key && vnode1.sel === vnode2.sel;\n}\nfunction isVnode(vnode) {\n return vnode.sel !== undefined;\n}\nfunction createKeyToOldIdx(children, beginIdx, endIdx) {\n var i, map = {}, key, ch;\n for (i = beginIdx; i <= endIdx; ++i) {\n ch = children[i];\n if (ch != null) {\n key = ch.key;\n if (key !== undefined)\n map[key] = i;\n }\n }\n return map;\n}\nvar hooks = ['create', 'update', 'remove', 'destroy', 'pre', 'post'];\nexport { h } from './h';\nexport { thunk } from './thunk';\nexport function init(modules, domApi) {\n var i, j, cbs = {};\n var api = domApi !== undefined ? domApi : htmlDomApi;\n for (i = 0; i < hooks.length; ++i) {\n cbs[hooks[i]] = [];\n for (j = 0; j < modules.length; ++j) {\n var hook = modules[j][hooks[i]];\n if (hook !== undefined) {\n cbs[hooks[i]].push(hook);\n }\n }\n }\n function emptyNodeAt(elm) {\n var id = elm.id ? '#' + elm.id : '';\n var c = elm.className ? '.' + elm.className.split(' ').join('.') : '';\n return vnode(api.tagName(elm).toLowerCase() + id + c, {}, [], undefined, elm);\n }\n function createRmCb(childElm, listeners) {\n return function rmCb() {\n if (--listeners === 0) {\n var parent_1 = api.parentNode(childElm);\n api.removeChild(parent_1, childElm);\n }\n };\n }\n function createElm(vnode, insertedVnodeQueue) {\n var i, data = vnode.data;\n if (data !== undefined) {\n if (isDef(i = data.hook) && isDef(i = i.init)) {\n i(vnode);\n data = vnode.data;\n }\n }\n var children = vnode.children, sel = vnode.sel;\n if (sel === '!') {\n if (isUndef(vnode.text)) {\n vnode.text = '';\n }\n vnode.elm = api.createComment(vnode.text);\n }\n else if (sel !== undefined) {\n // Parse selector\n var hashIdx = sel.indexOf('#');\n var dotIdx = sel.indexOf('.', hashIdx);\n var hash = hashIdx > 0 ? hashIdx : sel.length;\n var dot = dotIdx > 0 ? dotIdx : sel.length;\n var tag = hashIdx !== -1 || dotIdx !== -1 ? sel.slice(0, Math.min(hash, dot)) : sel;\n var elm = vnode.elm = isDef(data) && isDef(i = data.ns) ? api.createElementNS(i, tag)\n : api.createElement(tag);\n if (hash < dot)\n elm.setAttribute('id', sel.slice(hash + 1, dot));\n if (dotIdx > 0)\n elm.setAttribute('class', sel.slice(dot + 1).replace(/\\./g, ' '));\n for (i = 0; i < cbs.create.length; ++i)\n cbs.create[i](emptyNode, vnode);\n if (is.array(children)) {\n for (i = 0; i < children.length; ++i) {\n var ch = children[i];\n if (ch != null) {\n api.appendChild(elm, createElm(ch, insertedVnodeQueue));\n }\n }\n }\n else if (is.primitive(vnode.text)) {\n api.appendChild(elm, api.createTextNode(vnode.text));\n }\n i = vnode.data.hook; // Reuse variable\n if (isDef(i)) {\n if (i.create)\n i.create(emptyNode, vnode);\n if (i.insert)\n insertedVnodeQueue.push(vnode);\n }\n }\n else {\n vnode.elm = api.createTextNode(vnode.text);\n }\n return vnode.elm;\n }\n function addVnodes(parentElm, before, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n for (; startIdx <= endIdx; ++startIdx) {\n var ch = vnodes[startIdx];\n if (ch != null) {\n api.insertBefore(parentElm, createElm(ch, insertedVnodeQueue), before);\n }\n }\n }\n function invokeDestroyHook(vnode) {\n var i, j, data = vnode.data;\n if (data !== undefined) {\n if (isDef(i = data.hook) && isDef(i = i.destroy))\n i(vnode);\n for (i = 0; i < cbs.destroy.length; ++i)\n cbs.destroy[i](vnode);\n if (vnode.children !== undefined) {\n for (j = 0; j < vnode.children.length; ++j) {\n i = vnode.children[j];\n if (i != null && typeof i !== \"string\") {\n invokeDestroyHook(i);\n }\n }\n }\n }\n }\n function removeVnodes(parentElm, vnodes, startIdx, endIdx) {\n for (; startIdx <= endIdx; ++startIdx) {\n var i_1 = void 0, listeners = void 0, rm = void 0, ch = vnodes[startIdx];\n if (ch != null) {\n if (isDef(ch.sel)) {\n invokeDestroyHook(ch);\n listeners = cbs.remove.length + 1;\n rm = createRmCb(ch.elm, listeners);\n for (i_1 = 0; i_1 < cbs.remove.length; ++i_1)\n cbs.remove[i_1](ch, rm);\n if (isDef(i_1 = ch.data) && isDef(i_1 = i_1.hook) && isDef(i_1 = i_1.remove)) {\n i_1(ch, rm);\n }\n else {\n rm();\n }\n }\n else {\n api.removeChild(parentElm, ch.elm);\n }\n }\n }\n }\n function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue) {\n var oldStartIdx = 0, newStartIdx = 0;\n var oldEndIdx = oldCh.length - 1;\n var oldStartVnode = oldCh[0];\n var oldEndVnode = oldCh[oldEndIdx];\n var newEndIdx = newCh.length - 1;\n var newStartVnode = newCh[0];\n var newEndVnode = newCh[newEndIdx];\n var oldKeyToIdx;\n var idxInOld;\n var elmToMove;\n var before;\n while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n if (oldStartVnode == null) {\n oldStartVnode = oldCh[++oldStartIdx]; // Vnode might have been moved left\n }\n else if (oldEndVnode == null) {\n oldEndVnode = oldCh[--oldEndIdx];\n }\n else if (newStartVnode == null) {\n newStartVnode = newCh[++newStartIdx];\n }\n else if (newEndVnode == null) {\n newEndVnode = newCh[--newEndIdx];\n }\n else if (sameVnode(oldStartVnode, newStartVnode)) {\n patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);\n oldStartVnode = oldCh[++oldStartIdx];\n newStartVnode = newCh[++newStartIdx];\n }\n else if (sameVnode(oldEndVnode, newEndVnode)) {\n patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);\n oldEndVnode = oldCh[--oldEndIdx];\n newEndVnode = newCh[--newEndIdx];\n }\n else if (sameVnode(oldStartVnode, newEndVnode)) {\n patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);\n api.insertBefore(parentElm, oldStartVnode.elm, api.nextSibling(oldEndVnode.elm));\n oldStartVnode = oldCh[++oldStartIdx];\n newEndVnode = newCh[--newEndIdx];\n }\n else if (sameVnode(oldEndVnode, newStartVnode)) {\n patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);\n api.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n oldEndVnode = oldCh[--oldEndIdx];\n newStartVnode = newCh[++newStartIdx];\n }\n else {\n if (oldKeyToIdx === undefined) {\n oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);\n }\n idxInOld = oldKeyToIdx[newStartVnode.key];\n if (isUndef(idxInOld)) {\n api.insertBefore(parentElm, createElm(newStartVnode, insertedVnodeQueue), oldStartVnode.elm);\n newStartVnode = newCh[++newStartIdx];\n }\n else {\n elmToMove = oldCh[idxInOld];\n if (elmToMove.sel !== newStartVnode.sel) {\n api.insertBefore(parentElm, createElm(newStartVnode, insertedVnodeQueue), oldStartVnode.elm);\n }\n else {\n patchVnode(elmToMove, newStartVnode, insertedVnodeQueue);\n oldCh[idxInOld] = undefined;\n api.insertBefore(parentElm, elmToMove.elm, oldStartVnode.elm);\n }\n newStartVnode = newCh[++newStartIdx];\n }\n }\n }\n if (oldStartIdx <= oldEndIdx || newStartIdx <= newEndIdx) {\n if (oldStartIdx > oldEndIdx) {\n before = newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].elm;\n addVnodes(parentElm, before, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n }\n else {\n removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);\n }\n }\n }\n function patchVnode(oldVnode, vnode, insertedVnodeQueue) {\n var i, hook;\n if (isDef(i = vnode.data) && isDef(hook = i.hook) && isDef(i = hook.prepatch)) {\n i(oldVnode, vnode);\n }\n var elm = vnode.elm = oldVnode.elm;\n var oldCh = oldVnode.children;\n var ch = vnode.children;\n if (oldVnode === vnode)\n return;\n if (vnode.data !== undefined) {\n for (i = 0; i < cbs.update.length; ++i)\n cbs.update[i](oldVnode, vnode);\n i = vnode.data.hook;\n if (isDef(i) && isDef(i = i.update))\n i(oldVnode, vnode);\n }\n if (isUndef(vnode.text)) {\n if (isDef(oldCh) && isDef(ch)) {\n if (oldCh !== ch)\n updateChildren(elm, oldCh, ch, insertedVnodeQueue);\n }\n else if (isDef(ch)) {\n if (isDef(oldVnode.text))\n api.setTextContent(elm, '');\n addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n }\n else if (isDef(oldCh)) {\n removeVnodes(elm, oldCh, 0, oldCh.length - 1);\n }\n else if (isDef(oldVnode.text)) {\n api.setTextContent(elm, '');\n }\n }\n else if (oldVnode.text !== vnode.text) {\n api.setTextContent(elm, vnode.text);\n }\n if (isDef(hook) && isDef(i = hook.postpatch)) {\n i(oldVnode, vnode);\n }\n }\n return function patch(oldVnode, vnode) {\n var i, elm, parent;\n var insertedVnodeQueue = [];\n for (i = 0; i < cbs.pre.length; ++i)\n cbs.pre[i]();\n if (!isVnode(oldVnode)) {\n oldVnode = emptyNodeAt(oldVnode);\n }\n if (sameVnode(oldVnode, vnode)) {\n patchVnode(oldVnode, vnode, insertedVnodeQueue);\n }\n else {\n elm = oldVnode.elm;\n parent = api.parentNode(elm);\n createElm(vnode, insertedVnodeQueue);\n if (parent !== null) {\n api.insertBefore(parent, vnode.elm, api.nextSibling(elm));\n removeVnodes(parent, [oldVnode], 0, 0);\n }\n }\n for (i = 0; i < insertedVnodeQueue.length; ++i) {\n insertedVnodeQueue[i].data.hook.insert(insertedVnodeQueue[i]);\n }\n for (i = 0; i < cbs.post.length; ++i)\n cbs.post[i]();\n return vnode;\n };\n}\n//# sourceMappingURL=snabbdom.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/~/snabbdom/es/snabbdom.js\n// module id = 149\n// module chunks = 0","export function vnode(sel, data, children, text, elm) {\n var key = data === undefined ? undefined : data.key;\n return { sel: sel, data: data, children: children,\n text: text, elm: elm, key: key };\n}\nexport default vnode;\n//# sourceMappingURL=vnode.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/~/snabbdom/es/vnode.js\n// module id = 150\n// module chunks = 0","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.map');\nmodule.exports = require('../modules/_core').Map;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/es6/map.js\n// module id = 151\n// module chunks = 0","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.promise');\nmodule.exports = require('../modules/_core').Promise;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/es6/promise.js\n// module id = 152\n// module chunks = 0","require('../modules/es6.string.from-code-point');\nrequire('../modules/es6.string.raw');\nrequire('../modules/es6.string.trim');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/es6.string.code-point-at');\nrequire('../modules/es6.string.ends-with');\nrequire('../modules/es6.string.includes');\nrequire('../modules/es6.string.repeat');\nrequire('../modules/es6.string.starts-with');\nrequire('../modules/es6.string.anchor');\nrequire('../modules/es6.string.big');\nrequire('../modules/es6.string.blink');\nrequire('../modules/es6.string.bold');\nrequire('../modules/es6.string.fixed');\nrequire('../modules/es6.string.fontcolor');\nrequire('../modules/es6.string.fontsize');\nrequire('../modules/es6.string.italics');\nrequire('../modules/es6.string.link');\nrequire('../modules/es6.string.small');\nrequire('../modules/es6.string.strike');\nrequire('../modules/es6.string.sub');\nrequire('../modules/es6.string.sup');\nrequire('../modules/es6.regexp.match');\nrequire('../modules/es6.regexp.replace');\nrequire('../modules/es6.regexp.search');\nrequire('../modules/es6.regexp.split');\nmodule.exports = require('../modules/_core').String;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/es6/string.js\n// module id = 153\n// module chunks = 0","require('../modules/es6.symbol');\nrequire('../modules/es6.object.to-string');\nmodule.exports = require('../modules/_core').Symbol;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/es6/symbol.js\n// module id = 154\n// module chunks = 0","/*******************************************************************************\r\n * Copyright (c) 2018 Obeo.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n * Obeo - initial API and implementation\r\n *******************************************************************************/\r\nimport 'reflect-metadata';\r\nimport { initializeSiriusDiagram } from './src/app/standalone';\r\n\r\ninitializeSiriusDiagram();\n\n\n// WEBPACK FOOTER //\n// ./index.ts","// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = require('./_wks')('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) require('./_hide')(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_add-to-unscopables.js\n// module id = 156\n// module chunks = 0","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_array-includes.js\n// module id = 157\n// module chunks = 0","'use strict';\nvar dP = require('./_object-dp').f;\nvar create = require('./_object-create');\nvar redefineAll = require('./_redefine-all');\nvar ctx = require('./_ctx');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar $iterDefine = require('./_iter-define');\nvar step = require('./_iter-step');\nvar setSpecies = require('./_set-species');\nvar DESCRIPTORS = require('./_descriptors');\nvar fastKey = require('./_meta').fastKey;\nvar validate = require('./_validate-collection');\nvar SIZE = DESCRIPTORS ? '_s' : 'size';\n\nvar getEntry = function (that, key) {\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return that._i[index];\n // frozen object case\n for (entry = that._f; entry; entry = entry.n) {\n if (entry.k == key) return entry;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = create(null); // index\n that._f = undefined; // first entry\n that._l = undefined; // last entry\n that[SIZE] = 0; // size\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear() {\n for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {\n entry.r = true;\n if (entry.p) entry.p = entry.p.n = undefined;\n delete data[entry.i];\n }\n that._f = that._l = undefined;\n that[SIZE] = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function (key) {\n var that = validate(this, NAME);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.n;\n var prev = entry.p;\n delete that._i[entry.i];\n entry.r = true;\n if (prev) prev.n = next;\n if (next) next.p = prev;\n if (that._f == entry) that._f = next;\n if (that._l == entry) that._l = prev;\n that[SIZE]--;\n } return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn /* , that = undefined */) {\n validate(this, NAME);\n var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n while (entry = entry ? entry.n : this._f) {\n f(entry.v, entry.k, this);\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key) {\n return !!getEntry(validate(this, NAME), key);\n }\n });\n if (DESCRIPTORS) dP(C.prototype, 'size', {\n get: function () {\n return validate(this, NAME)[SIZE];\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var entry = getEntry(that, key);\n var prev, index;\n // change existing entry\n if (entry) {\n entry.v = value;\n // create new entry\n } else {\n that._l = entry = {\n i: index = fastKey(key, true), // <- index\n k: key, // <- key\n v: value, // <- value\n p: prev = that._l, // <- previous entry\n n: undefined, // <- next entry\n r: false // <- removed\n };\n if (!that._f) that._f = entry;\n if (prev) prev.n = entry;\n that[SIZE]++;\n // add to index\n if (index !== 'F') that._i[index] = entry;\n } return that;\n },\n getEntry: getEntry,\n setStrong: function (C, NAME, IS_MAP) {\n // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n $iterDefine(C, NAME, function (iterated, kind) {\n this._t = validate(iterated, NAME); // target\n this._k = kind; // kind\n this._l = undefined; // previous\n }, function () {\n var that = this;\n var kind = that._k;\n var entry = that._l;\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n // get next entry\n if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {\n // or finish the iteration\n that._t = undefined;\n return step(1);\n }\n // return step by kind\n if (kind == 'keys') return step(0, entry.k);\n if (kind == 'values') return step(0, entry.v);\n return step(0, [entry.k, entry.v]);\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // add [@@species], 23.1.2.2, 23.2.2.2\n setSpecies(NAME);\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_collection-strong.js\n// module id = 158\n// module chunks = 0","'use strict';\nvar global = require('./_global');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar redefineAll = require('./_redefine-all');\nvar meta = require('./_meta');\nvar forOf = require('./_for-of');\nvar anInstance = require('./_an-instance');\nvar isObject = require('./_is-object');\nvar fails = require('./_fails');\nvar $iterDetect = require('./_iter-detect');\nvar setToStringTag = require('./_set-to-string-tag');\nvar inheritIfRequired = require('./_inherit-if-required');\n\nmodule.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {\n var Base = global[NAME];\n var C = Base;\n var ADDER = IS_MAP ? 'set' : 'add';\n var proto = C && C.prototype;\n var O = {};\n var fixMethod = function (KEY) {\n var fn = proto[KEY];\n redefine(proto, KEY,\n KEY == 'delete' ? function (a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'has' ? function has(a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'get' ? function get(a) {\n return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }\n : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }\n );\n };\n if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {\n new C().entries().next();\n }))) {\n // create collection constructor\n C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);\n redefineAll(C.prototype, methods);\n meta.NEED = true;\n } else {\n var instance = new C();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new C();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n if (!ACCEPT_ITERABLES) {\n C = wrapper(function (target, iterable) {\n anInstance(target, C, NAME);\n var that = inheritIfRequired(new Base(), target, C);\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n return that;\n });\n C.prototype = proto;\n proto.constructor = C;\n }\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n // weak collections should not contains .clear method\n if (IS_WEAK && proto.clear) delete proto.clear;\n }\n\n setToStringTag(C, NAME);\n\n O[NAME] = C;\n $export($export.G + $export.W + $export.F * (C != Base), O);\n\n if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);\n\n return C;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_collection.js\n// module id = 159\n// module chunks = 0","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_enum-keys.js\n// module id = 160\n// module chunks = 0","var isObject = require('./_is-object');\nvar setPrototypeOf = require('./_set-proto').set;\nmodule.exports = function (that, target, C) {\n var S = target.constructor;\n var P;\n if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {\n setPrototypeOf(that, P);\n } return that;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_inherit-if-required.js\n// module id = 161\n// module chunks = 0","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function (fn, args, that) {\n var un = that === undefined;\n switch (args.length) {\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_invoke.js\n// module id = 162\n// module chunks = 0","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_iobject.js\n// module id = 163\n// module chunks = 0","// check on default Array iterator\nvar Iterators = require('./_iterators');\nvar ITERATOR = require('./_wks')('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_is-array-iter.js\n// module id = 164\n// module chunks = 0","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_is-array.js\n// module id = 165\n// module chunks = 0","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_iter-call.js\n// module id = 166\n// module chunks = 0","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_iter-create.js\n// module id = 167\n// module chunks = 0","var global = require('./_global');\nvar macrotask = require('./_task').set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar isNode = require('./_cof')(process) == 'process';\n\nmodule.exports = function () {\n var head, last, notify;\n\n var flush = function () {\n var parent, fn;\n if (isNode && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (e) {\n if (head) notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (isNode) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339\n } else if (Observer && !(global.navigator && global.navigator.standalone)) {\n var toggle = true;\n var node = document.createTextNode('');\n new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n var promise = Promise.resolve();\n notify = function () {\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_microtask.js\n// module id = 168\n// module chunks = 0","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-dps.js\n// module id = 169\n// module chunks = 0","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject');\nvar gOPN = require('./_object-gopn').f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-gopn-ext.js\n// module id = 170\n// module chunks = 0","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_object-gpo.js\n// module id = 171\n// module chunks = 0","module.exports = function (exec) {\n try {\n return { e: false, v: exec() };\n } catch (e) {\n return { e: true, v: e };\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_perform.js\n// module id = 172\n// module chunks = 0","var anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar newPromiseCapability = require('./_new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_promise-resolve.js\n// module id = 173\n// module chunks = 0","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_set-proto.js\n// module id = 174\n// module chunks = 0","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object');\nvar aFunction = require('./_a-function');\nvar SPECIES = require('./_wks')('species');\nmodule.exports = function (O, D) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_species-constructor.js\n// module id = 175\n// module chunks = 0","'use strict';\nvar toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n\nmodule.exports = function repeat(count) {\n var str = String(defined(this));\n var res = '';\n var n = toInteger(count);\n if (n < 0 || n == Infinity) throw RangeError(\"Count can't be negative\");\n for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;\n return res;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_string-repeat.js\n// module id = 176\n// module chunks = 0","var $export = require('./_export');\nvar defined = require('./_defined');\nvar fails = require('./_fails');\nvar spaces = require('./_string-ws');\nvar space = '[' + spaces + ']';\nvar non = '\\u200b\\u0085';\nvar ltrim = RegExp('^' + space + space + '*');\nvar rtrim = RegExp(space + space + '*$');\n\nvar exporter = function (KEY, exec, ALIAS) {\n var exp = {};\n var FORCE = fails(function () {\n return !!spaces[KEY]() || non[KEY]() != non;\n });\n var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];\n if (ALIAS) exp[ALIAS] = fn;\n $export($export.P + $export.F * FORCE, 'String', exp);\n};\n\n// 1 -> String#trimLeft\n// 2 -> String#trimRight\n// 3 -> String#trim\nvar trim = exporter.trim = function (string, TYPE) {\n string = String(defined(string));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n};\n\nmodule.exports = exporter;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_string-trim.js\n// module id = 177\n// module chunks = 0","module.exports = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003' +\n '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_string-ws.js\n// module id = 178\n// module chunks = 0","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_to-object.js\n// module id = 179\n// module chunks = 0","var global = require('./_global');\nvar core = require('./_core');\nvar LIBRARY = require('./_library');\nvar wksExt = require('./_wks-ext');\nvar defineProperty = require('./_object-dp').f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/_wks-define.js\n// module id = 180\n// module chunks = 0","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/core.get-iterator-method.js\n// module id = 181\n// module chunks = 0","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.array.iterator.js\n// module id = 182\n// module chunks = 0","'use strict';\nvar strong = require('./_collection-strong');\nvar validate = require('./_validate-collection');\nvar MAP = 'Map';\n\n// 23.1 Map Objects\nmodule.exports = require('./_collection')(MAP, function (get) {\n return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.1.3.6 Map.prototype.get(key)\n get: function get(key) {\n var entry = strong.getEntry(validate(this, MAP), key);\n return entry && entry.v;\n },\n // 23.1.3.9 Map.prototype.set(key, value)\n set: function set(key, value) {\n return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);\n }\n}, strong, true);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.map.js\n// module id = 183\n// module chunks = 0","'use strict';\nvar LIBRARY = require('./_library');\nvar global = require('./_global');\nvar ctx = require('./_ctx');\nvar classof = require('./_classof');\nvar $export = require('./_export');\nvar isObject = require('./_is-object');\nvar aFunction = require('./_a-function');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar speciesConstructor = require('./_species-constructor');\nvar task = require('./_task').set;\nvar microtask = require('./_microtask')();\nvar newPromiseCapabilityModule = require('./_new-promise-capability');\nvar perform = require('./_perform');\nvar promiseResolve = require('./_promise-resolve');\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1);\n var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) {\n exec(empty, empty);\n };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;\n } catch (e) { /* empty */ }\n}();\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar notify = function (promise, isReject) {\n if (promise._n) return;\n promise._n = true;\n var chain = promise._c;\n microtask(function () {\n var value = promise._v;\n var ok = promise._s == 1;\n var i = 0;\n var run = function (reaction) {\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then;\n try {\n if (handler) {\n if (!ok) {\n if (promise._h == 2) onHandleUnhandled(promise);\n promise._h = 1;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value);\n if (domain) domain.exit();\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (e) {\n reject(e);\n }\n };\n while (chain.length > i) run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if (isReject && !promise._h) onUnhandled(promise);\n });\n};\nvar onUnhandled = function (promise) {\n task.call(global, function () {\n var value = promise._v;\n var unhandled = isUnhandled(promise);\n var result, handler, console;\n if (unhandled) {\n result = perform(function () {\n if (isNode) {\n process.emit('unhandledRejection', value, promise);\n } else if (handler = global.onunhandledrejection) {\n handler({ promise: promise, reason: value });\n } else if ((console = global.console) && console.error) {\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if (unhandled && result.e) throw result.v;\n });\n};\nvar isUnhandled = function (promise) {\n return promise._h !== 1 && (promise._a || promise._c).length === 0;\n};\nvar onHandleUnhandled = function (promise) {\n task.call(global, function () {\n var handler;\n if (isNode) {\n process.emit('rejectionHandled', promise);\n } else if (handler = global.onrejectionhandled) {\n handler({ promise: promise, reason: promise._v });\n }\n });\n};\nvar $reject = function (value) {\n var promise = this;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if (!promise._a) promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function (value) {\n var promise = this;\n var then;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n if (then = isThenable(value)) {\n microtask(function () {\n var wrapper = { _w: promise, _d: false }; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch (e) {\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch (e) {\n $reject.call({ _w: promise, _d: false }, e); // wrap\n }\n};\n\n// constructor polyfill\nif (!USE_NATIVE) {\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor) {\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch (err) {\n $reject.call(this, err);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = require('./_redefine-all')($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected) {\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if (this._a) this._a.push(reaction);\n if (this._s) notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === $Promise || C === Wrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });\nrequire('./_set-to-string-tag')($Promise, PROMISE);\nrequire('./_set-species')(PROMISE);\nWrapper = require('./_core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n var $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x) {\n return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function (iter) {\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var values = [];\n var index = 0;\n var remaining = 1;\n forOf(iterable, false, function (promise) {\n var $index = index++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.e) reject(result.v);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n forOf(iterable, false, function (promise) {\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if (result.e) reject(result.v);\n return capability.promise;\n }\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.promise.js\n// module id = 184\n// module chunks = 0","// @@match logic\nrequire('./_fix-re-wks')('match', 1, function (defined, MATCH, $match) {\n // 21.1.3.11 String.prototype.match(regexp)\n return [function match(regexp) {\n 'use strict';\n var O = defined(this);\n var fn = regexp == undefined ? undefined : regexp[MATCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n }, $match];\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.regexp.match.js\n// module id = 185\n// module chunks = 0","// @@replace logic\nrequire('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace) {\n // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)\n return [function replace(searchValue, replaceValue) {\n 'use strict';\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined\n ? fn.call(searchValue, O, replaceValue)\n : $replace.call(String(O), searchValue, replaceValue);\n }, $replace];\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.regexp.replace.js\n// module id = 186\n// module chunks = 0","// @@search logic\nrequire('./_fix-re-wks')('search', 1, function (defined, SEARCH, $search) {\n // 21.1.3.15 String.prototype.search(regexp)\n return [function search(regexp) {\n 'use strict';\n var O = defined(this);\n var fn = regexp == undefined ? undefined : regexp[SEARCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n }, $search];\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.regexp.search.js\n// module id = 187\n// module chunks = 0","// @@split logic\nrequire('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split) {\n 'use strict';\n var isRegExp = require('./_is-regexp');\n var _split = $split;\n var $push = [].push;\n var $SPLIT = 'split';\n var LENGTH = 'length';\n var LAST_INDEX = 'lastIndex';\n if (\n 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||\n 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||\n 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||\n '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||\n '.'[$SPLIT](/()()/)[LENGTH] > 1 ||\n ''[$SPLIT](/.?/)[LENGTH]\n ) {\n var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group\n // based on es5-shim implementation, need to rework it\n $split = function (separator, limit) {\n var string = String(this);\n if (separator === undefined && limit === 0) return [];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) return _split.call(string, separator, limit);\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var separator2, match, lastIndex, lastLength, i;\n // Doesn't need flags gy, but they don't hurt\n if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\\\s)', flags);\n while (match = separatorCopy.exec(string)) {\n // `separatorCopy.lastIndex` is not reliable cross-browser\n lastIndex = match.index + match[0][LENGTH];\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG\n // eslint-disable-next-line no-loop-func\n if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () {\n for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined;\n });\n if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));\n lastLength = match[0][LENGTH];\n lastLastIndex = lastIndex;\n if (output[LENGTH] >= splitLimit) break;\n }\n if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop\n }\n if (lastLastIndex === string[LENGTH]) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;\n };\n // Chakra, V8\n } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {\n $split = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);\n };\n }\n // 21.1.3.17 String.prototype.split(separator, limit)\n return [function split(separator, limit) {\n var O = defined(this);\n var fn = separator == undefined ? undefined : separator[SPLIT];\n return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);\n }, $split];\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.regexp.split.js\n// module id = 188\n// module chunks = 0","'use strict';\n// B.2.3.2 String.prototype.anchor(name)\nrequire('./_string-html')('anchor', function (createHTML) {\n return function anchor(name) {\n return createHTML(this, 'a', 'name', name);\n };\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.anchor.js\n// module id = 189\n// module chunks = 0","'use strict';\n// B.2.3.3 String.prototype.big()\nrequire('./_string-html')('big', function (createHTML) {\n return function big() {\n return createHTML(this, 'big', '', '');\n };\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.big.js\n// module id = 190\n// module chunks = 0","'use strict';\n// B.2.3.4 String.prototype.blink()\nrequire('./_string-html')('blink', function (createHTML) {\n return function blink() {\n return createHTML(this, 'blink', '', '');\n };\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.blink.js\n// module id = 191\n// module chunks = 0","'use strict';\n// B.2.3.5 String.prototype.bold()\nrequire('./_string-html')('bold', function (createHTML) {\n return function bold() {\n return createHTML(this, 'b', '', '');\n };\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.bold.js\n// module id = 192\n// module chunks = 0","'use strict';\nvar $export = require('./_export');\nvar $at = require('./_string-at')(false);\n$export($export.P, 'String', {\n // 21.1.3.3 String.prototype.codePointAt(pos)\n codePointAt: function codePointAt(pos) {\n return $at(this, pos);\n }\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.code-point-at.js\n// module id = 193\n// module chunks = 0","// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])\n'use strict';\nvar $export = require('./_export');\nvar toLength = require('./_to-length');\nvar context = require('./_string-context');\nvar ENDS_WITH = 'endsWith';\nvar $endsWith = ''[ENDS_WITH];\n\n$export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'String', {\n endsWith: function endsWith(searchString /* , endPosition = @length */) {\n var that = context(this, searchString, ENDS_WITH);\n var endPosition = arguments.length > 1 ? arguments[1] : undefined;\n var len = toLength(that.length);\n var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);\n var search = String(searchString);\n return $endsWith\n ? $endsWith.call(that, search, end)\n : that.slice(end - search.length, end) === search;\n }\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.ends-with.js\n// module id = 194\n// module chunks = 0","'use strict';\n// B.2.3.6 String.prototype.fixed()\nrequire('./_string-html')('fixed', function (createHTML) {\n return function fixed() {\n return createHTML(this, 'tt', '', '');\n };\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.fixed.js\n// module id = 195\n// module chunks = 0","'use strict';\n// B.2.3.7 String.prototype.fontcolor(color)\nrequire('./_string-html')('fontcolor', function (createHTML) {\n return function fontcolor(color) {\n return createHTML(this, 'font', 'color', color);\n };\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.fontcolor.js\n// module id = 196\n// module chunks = 0","'use strict';\n// B.2.3.8 String.prototype.fontsize(size)\nrequire('./_string-html')('fontsize', function (createHTML) {\n return function fontsize(size) {\n return createHTML(this, 'font', 'size', size);\n };\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.fontsize.js\n// module id = 197\n// module chunks = 0","var $export = require('./_export');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nvar fromCharCode = String.fromCharCode;\nvar $fromCodePoint = String.fromCodePoint;\n\n// length should be 1, old FF problem\n$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {\n // 21.1.2.2 String.fromCodePoint(...codePoints)\n fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars\n var res = [];\n var aLen = arguments.length;\n var i = 0;\n var code;\n while (aLen > i) {\n code = +arguments[i++];\n if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point');\n res.push(code < 0x10000\n ? fromCharCode(code)\n : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)\n );\n } return res.join('');\n }\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.from-code-point.js\n// module id = 198\n// module chunks = 0","// 21.1.3.7 String.prototype.includes(searchString, position = 0)\n'use strict';\nvar $export = require('./_export');\nvar context = require('./_string-context');\nvar INCLUDES = 'includes';\n\n$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~context(this, searchString, INCLUDES)\n .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.includes.js\n// module id = 199\n// module chunks = 0","'use strict';\n// B.2.3.9 String.prototype.italics()\nrequire('./_string-html')('italics', function (createHTML) {\n return function italics() {\n return createHTML(this, 'i', '', '');\n };\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.italics.js\n// module id = 200\n// module chunks = 0","'use strict';\n// B.2.3.10 String.prototype.link(url)\nrequire('./_string-html')('link', function (createHTML) {\n return function link(url) {\n return createHTML(this, 'a', 'href', url);\n };\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.link.js\n// module id = 201\n// module chunks = 0","var $export = require('./_export');\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\n\n$export($export.S, 'String', {\n // 21.1.2.4 String.raw(callSite, ...substitutions)\n raw: function raw(callSite) {\n var tpl = toIObject(callSite.raw);\n var len = toLength(tpl.length);\n var aLen = arguments.length;\n var res = [];\n var i = 0;\n while (len > i) {\n res.push(String(tpl[i++]));\n if (i < aLen) res.push(String(arguments[i]));\n } return res.join('');\n }\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.raw.js\n// module id = 202\n// module chunks = 0","var $export = require('./_export');\n\n$export($export.P, 'String', {\n // 21.1.3.13 String.prototype.repeat(count)\n repeat: require('./_string-repeat')\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.repeat.js\n// module id = 203\n// module chunks = 0","'use strict';\n// B.2.3.11 String.prototype.small()\nrequire('./_string-html')('small', function (createHTML) {\n return function small() {\n return createHTML(this, 'small', '', '');\n };\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.small.js\n// module id = 204\n// module chunks = 0","// 21.1.3.18 String.prototype.startsWith(searchString [, position ])\n'use strict';\nvar $export = require('./_export');\nvar toLength = require('./_to-length');\nvar context = require('./_string-context');\nvar STARTS_WITH = 'startsWith';\nvar $startsWith = ''[STARTS_WITH];\n\n$export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'String', {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = context(this, searchString, STARTS_WITH);\n var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = String(searchString);\n return $startsWith\n ? $startsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.starts-with.js\n// module id = 205\n// module chunks = 0","'use strict';\n// B.2.3.12 String.prototype.strike()\nrequire('./_string-html')('strike', function (createHTML) {\n return function strike() {\n return createHTML(this, 'strike', '', '');\n };\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.strike.js\n// module id = 206\n// module chunks = 0","'use strict';\n// B.2.3.13 String.prototype.sub()\nrequire('./_string-html')('sub', function (createHTML) {\n return function sub() {\n return createHTML(this, 'sub', '', '');\n };\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.sub.js\n// module id = 207\n// module chunks = 0","'use strict';\n// B.2.3.14 String.prototype.sup()\nrequire('./_string-html')('sup', function (createHTML) {\n return function sup() {\n return createHTML(this, 'sup', '', '');\n };\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.sup.js\n// module id = 208\n// module chunks = 0","'use strict';\n// 21.1.3.25 String.prototype.trim()\nrequire('./_string-trim')('trim', function ($trim) {\n return function trim() {\n return $trim(this, 3);\n };\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.string.trim.js\n// module id = 209\n// module chunks = 0","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global');\nvar has = require('./_has');\nvar DESCRIPTORS = require('./_descriptors');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar META = require('./_meta').KEY;\nvar $fails = require('./_fails');\nvar shared = require('./_shared');\nvar setToStringTag = require('./_set-to-string-tag');\nvar uid = require('./_uid');\nvar wks = require('./_wks');\nvar wksExt = require('./_wks-ext');\nvar wksDefine = require('./_wks-define');\nvar enumKeys = require('./_enum-keys');\nvar isArray = require('./_is-array');\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar createDesc = require('./_property-desc');\nvar _create = require('./_object-create');\nvar gOPNExt = require('./_object-gopn-ext');\nvar $GOPD = require('./_object-gopd');\nvar $DP = require('./_object-dp');\nvar $keys = require('./_object-keys');\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n require('./_object-pie').f = $propertyIsEnumerable;\n require('./_object-gops').f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !require('./_library')) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/modules/es6.symbol.js\n// module id = 210\n// module chunks = 0","var attrRE = /([\\w-]+)|=|(['\"])([.\\s\\S]*?)\\2/g;\nvar voidElements = require('void-elements');\n\nmodule.exports = function (tag) {\n var i = 0;\n var key;\n var expectingValueAfterEquals = true;\n var res = {\n type: 'tag',\n name: '',\n voidElement: false,\n attrs: {},\n children: []\n };\n\n tag.replace(attrRE, function (match) {\n if (match === '=') {\n expectingValueAfterEquals = true;\n i++;\n return;\n }\n\n if (!expectingValueAfterEquals) {\n if (key) {\n res.attrs[key] = key; // boolean attribute\n }\n key=match;\n } else {\n if (i === 0) {\n if (voidElements[match] || tag.charAt(tag.length - 2) === '/') {\n res.voidElement = true;\n }\n res.name = match;\n } else {\n res.attrs[key] = match.replace(/^['\"]|['\"]$/g, '');\n key=undefined;\n }\n }\n i++;\n expectingValueAfterEquals = false;\n });\n\n return res;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/html-parse-stringify2/lib/parse-tag.js\n// module id = 211\n// module chunks = 0","/*jshint -W030 */\nvar tagRE = /(?:<!--[\\S\\s]*?-->|<(?:\"[^\"]*\"['\"]*|'[^']*'['\"]*|[^'\">])+>)/g;\nvar parseTag = require('./parse-tag');\n// re-used obj for quick lookups of components\nvar empty = Object.create ? Object.create(null) : {};\n// common logic for pushing a child node onto a list\nfunction pushTextNode(list, html, level, start, ignoreWhitespace) {\n // calculate correct end of the content slice in case there's\n // no tag after the text node.\n var end = html.indexOf('<', start);\n var content = html.slice(start, end === -1 ? undefined : end);\n // if a node is nothing but whitespace, collapse it as the spec states:\n // https://www.w3.org/TR/html4/struct/text.html#h-9.1\n if (/^\\s*$/.test(content)) {\n content = ' ';\n }\n // don't add whitespace-only text nodes if they would be trailing text nodes\n // or if they would be leading whitespace-only text nodes:\n // * end > -1 indicates this is not a trailing text node\n // * leading node is when level is -1 and list has length 0\n if ((!ignoreWhitespace && end > -1 && level + list.length >= 0) || content !== ' ') {\n list.push({\n type: 'text',\n content: content\n });\n }\n}\n\nmodule.exports = function parse(html, options) {\n options || (options = {});\n options.components || (options.components = empty);\n var result = [];\n var current;\n var level = -1;\n var arr = [];\n var byTag = {};\n var inComponent = false;\n\n html.replace(tagRE, function (tag, index) {\n if (inComponent) {\n if (tag !== ('</' + current.name + '>')) {\n return;\n } else {\n inComponent = false;\n }\n }\n\n var isOpen = tag.charAt(1) !== '/';\n var isComment = tag.indexOf('<!--') === 0;\n var start = index + tag.length;\n var nextChar = html.charAt(start);\n var parent;\n\n if (isOpen && !isComment) {\n level++;\n\n current = parseTag(tag);\n if (current.type === 'tag' && options.components[current.name]) {\n current.type = 'component';\n inComponent = true;\n }\n\n if (!current.voidElement && !inComponent && nextChar && nextChar !== '<') {\n pushTextNode(current.children, html, level, start, options.ignoreWhitespace);\n }\n\n byTag[current.tagName] = current;\n\n // if we're at root, push new base node\n if (level === 0) {\n result.push(current);\n }\n\n parent = arr[level - 1];\n\n if (parent) {\n parent.children.push(current);\n }\n\n arr[level] = current;\n }\n\n if (isComment || !isOpen || current.voidElement) {\n if (!isComment) {\n level--;\n }\n if (!inComponent && nextChar !== '<' && nextChar) {\n // trailing text node\n // if we're at the root, push a base text node. otherwise add as\n // a child to the current node.\n parent = level === -1 ? result : arr[level].children;\n pushTextNode(parent, html, level, start, options.ignoreWhitespace);\n }\n }\n });\n\n // If the \"html\" passed isn't actually html, add it as a text node.\n if (!result.length && html.length) {\n pushTextNode(result, html, 0, 0, options.ignoreWhitespace);\n }\n\n return result;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/html-parse-stringify2/lib/parse.js\n// module id = 212\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ERRORS_MSGS = require(\"../constants/error_msgs\");\nvar METADATA_KEY = require(\"../constants/metadata_keys\");\nfunction injectable() {\n return function (target) {\n if (Reflect.hasOwnMetadata(METADATA_KEY.PARAM_TYPES, target)) {\n throw new Error(ERRORS_MSGS.DUPLICATED_INJECTABLE_DECORATOR);\n }\n var types = Reflect.getMetadata(METADATA_KEY.DESIGN_PARAM_TYPES, target) || [];\n Reflect.defineMetadata(METADATA_KEY.PARAM_TYPES, types, target);\n return target;\n };\n}\nexports.injectable = injectable;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/annotation/injectable.js\n// module id = 213\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar METADATA_KEY = require(\"../constants/metadata_keys\");\nvar metadata_1 = require(\"../planning/metadata\");\nvar decorator_utils_1 = require(\"./decorator_utils\");\nfunction multiInject(serviceIdentifier) {\n return function (target, targetKey, index) {\n var metadata = new metadata_1.Metadata(METADATA_KEY.MULTI_INJECT_TAG, serviceIdentifier);\n if (typeof index === \"number\") {\n decorator_utils_1.tagParameter(target, targetKey, index, metadata);\n }\n else {\n decorator_utils_1.tagProperty(target, targetKey, metadata);\n }\n };\n}\nexports.multiInject = multiInject;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/annotation/multi_inject.js\n// module id = 214\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar METADATA_KEY = require(\"../constants/metadata_keys\");\nvar metadata_1 = require(\"../planning/metadata\");\nvar decorator_utils_1 = require(\"./decorator_utils\");\nfunction named(name) {\n return function (target, targetKey, index) {\n var metadata = new metadata_1.Metadata(METADATA_KEY.NAMED_TAG, name);\n if (typeof index === \"number\") {\n decorator_utils_1.tagParameter(target, targetKey, index, metadata);\n }\n else {\n decorator_utils_1.tagProperty(target, targetKey, metadata);\n }\n };\n}\nexports.named = named;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/annotation/named.js\n// module id = 215\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar METADATA_KEY = require(\"../constants/metadata_keys\");\nvar metadata_1 = require(\"../planning/metadata\");\nvar decorator_utils_1 = require(\"./decorator_utils\");\nfunction optional() {\n return function (target, targetKey, index) {\n var metadata = new metadata_1.Metadata(METADATA_KEY.OPTIONAL_TAG, true);\n if (typeof index === \"number\") {\n decorator_utils_1.tagParameter(target, targetKey, index, metadata);\n }\n else {\n decorator_utils_1.tagProperty(target, targetKey, metadata);\n }\n };\n}\nexports.optional = optional;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/annotation/optional.js\n// module id = 216\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ERRORS_MSGS = require(\"../constants/error_msgs\");\nvar METADATA_KEY = require(\"../constants/metadata_keys\");\nvar metadata_1 = require(\"../planning/metadata\");\nfunction postConstruct() {\n return function (target, propertyKey, descriptor) {\n var metadata = new metadata_1.Metadata(METADATA_KEY.POST_CONSTRUCT, propertyKey);\n if (Reflect.hasOwnMetadata(METADATA_KEY.POST_CONSTRUCT, target.constructor)) {\n throw new Error(ERRORS_MSGS.MULTIPLE_POST_CONSTRUCT_METHODS);\n }\n Reflect.defineMetadata(METADATA_KEY.POST_CONSTRUCT, metadata, target.constructor);\n };\n}\nexports.postConstruct = postConstruct;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/annotation/post_construct.js\n// module id = 217\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar metadata_1 = require(\"../planning/metadata\");\nvar decorator_utils_1 = require(\"./decorator_utils\");\nfunction tagged(metadataKey, metadataValue) {\n return function (target, targetKey, index) {\n var metadata = new metadata_1.Metadata(metadataKey, metadataValue);\n if (typeof index === \"number\") {\n decorator_utils_1.tagParameter(target, targetKey, index, metadata);\n }\n else {\n decorator_utils_1.tagProperty(target, targetKey, metadata);\n }\n };\n}\nexports.tagged = tagged;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/annotation/tagged.js\n// module id = 218\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar METADATA_KEY = require(\"../constants/metadata_keys\");\nvar metadata_1 = require(\"../planning/metadata\");\nvar decorator_utils_1 = require(\"./decorator_utils\");\nfunction targetName(name) {\n return function (target, targetKey, index) {\n var metadata = new metadata_1.Metadata(METADATA_KEY.NAME_TAG, name);\n decorator_utils_1.tagParameter(target, targetKey, index, metadata);\n };\n}\nexports.targetName = targetName;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/annotation/target_name.js\n// module id = 219\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar METADATA_KEY = require(\"../constants/metadata_keys\");\nvar metadata_1 = require(\"../planning/metadata\");\nvar decorator_utils_1 = require(\"./decorator_utils\");\nfunction unmanaged() {\n return function (target, targetKey, index) {\n var metadata = new metadata_1.Metadata(METADATA_KEY.UNMANAGED_TAG, true);\n decorator_utils_1.tagParameter(target, targetKey, index, metadata);\n };\n}\nexports.unmanaged = unmanaged;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/annotation/unmanaged.js\n// module id = 220\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar literal_types_1 = require(\"../constants/literal_types\");\nvar guid_1 = require(\"../utils/guid\");\nvar Binding = (function () {\n function Binding(serviceIdentifier, scope) {\n this.guid = guid_1.guid();\n this.activated = false;\n this.serviceIdentifier = serviceIdentifier;\n this.scope = scope;\n this.type = literal_types_1.BindingTypeEnum.Invalid;\n this.constraint = function (request) { return true; };\n this.implementationType = null;\n this.cache = null;\n this.factory = null;\n this.provider = null;\n this.onActivation = null;\n this.dynamicValue = null;\n }\n Binding.prototype.clone = function () {\n var clone = new Binding(this.serviceIdentifier, this.scope);\n clone.activated = false;\n clone.implementationType = this.implementationType;\n clone.dynamicValue = this.dynamicValue;\n clone.scope = this.scope;\n clone.type = this.type;\n clone.factory = this.factory;\n clone.provider = this.provider;\n clone.constraint = this.constraint;\n clone.onActivation = this.onActivation;\n clone.cache = this.cache;\n return clone;\n };\n return Binding;\n}());\nexports.Binding = Binding;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/bindings/binding.js\n// module id = 221\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BindingCount = {\n MultipleBindingsAvailable: 2,\n NoBindingsAvailable: 0,\n OnlyOneBindingAvailable: 1\n};\nexports.BindingCount = BindingCount;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/bindings/binding_count.js\n// module id = 222\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar binding_1 = require(\"../bindings/binding\");\nvar ERROR_MSGS = require(\"../constants/error_msgs\");\nvar literal_types_1 = require(\"../constants/literal_types\");\nvar METADATA_KEY = require(\"../constants/metadata_keys\");\nvar metadata_reader_1 = require(\"../planning/metadata_reader\");\nvar planner_1 = require(\"../planning/planner\");\nvar resolver_1 = require(\"../resolution/resolver\");\nvar binding_to_syntax_1 = require(\"../syntax/binding_to_syntax\");\nvar guid_1 = require(\"../utils/guid\");\nvar serialization_1 = require(\"../utils/serialization\");\nvar container_snapshot_1 = require(\"./container_snapshot\");\nvar lookup_1 = require(\"./lookup\");\nvar Container = (function () {\n function Container(containerOptions) {\n if (containerOptions !== undefined) {\n if (typeof containerOptions !== \"object\") {\n throw new Error(\"\" + ERROR_MSGS.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);\n }\n else {\n if (containerOptions.defaultScope !== undefined &&\n containerOptions.defaultScope !== literal_types_1.BindingScopeEnum.Singleton &&\n containerOptions.defaultScope !== literal_types_1.BindingScopeEnum.Transient &&\n containerOptions.defaultScope !== literal_types_1.BindingScopeEnum.Request) {\n throw new Error(\"\" + ERROR_MSGS.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);\n }\n if (containerOptions.autoBindInjectable !== undefined &&\n typeof containerOptions.autoBindInjectable !== \"boolean\") {\n throw new Error(\"\" + ERROR_MSGS.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);\n }\n }\n this.options = {\n autoBindInjectable: containerOptions.autoBindInjectable,\n defaultScope: containerOptions.defaultScope\n };\n }\n else {\n this.options = {\n autoBindInjectable: false,\n defaultScope: literal_types_1.BindingScopeEnum.Transient\n };\n }\n this.guid = guid_1.guid();\n this._bindingDictionary = new lookup_1.Lookup();\n this._snapshots = [];\n this._middleware = null;\n this.parent = null;\n this._metadataReader = new metadata_reader_1.MetadataReader();\n }\n Container.merge = function (container1, container2) {\n var container = new Container();\n var bindingDictionary = planner_1.getBindingDictionary(container);\n var bindingDictionary1 = planner_1.getBindingDictionary(container1);\n var bindingDictionary2 = planner_1.getBindingDictionary(container2);\n function copyDictionary(origin, destination) {\n origin.traverse(function (key, value) {\n value.forEach(function (binding) {\n destination.add(binding.serviceIdentifier, binding.clone());\n });\n });\n }\n copyDictionary(bindingDictionary1, bindingDictionary);\n copyDictionary(bindingDictionary2, bindingDictionary);\n return container;\n };\n Container.prototype.load = function () {\n var _this = this;\n var modules = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n modules[_i] = arguments[_i];\n }\n var setModuleId = function (bindingToSyntax, moduleId) {\n bindingToSyntax._binding.moduleId = moduleId;\n };\n var getBindFunction = function (moduleId) {\n return function (serviceIdentifier) {\n var bindingToSyntax = _this.bind.call(_this, serviceIdentifier);\n setModuleId(bindingToSyntax, moduleId);\n return bindingToSyntax;\n };\n };\n var getUnbindFunction = function (moduleId) {\n return function (serviceIdentifier) {\n var _unbind = _this.unbind.bind(_this);\n _unbind(serviceIdentifier);\n };\n };\n var getIsboundFunction = function (moduleId) {\n return function (serviceIdentifier) {\n var _isBound = _this.isBound.bind(_this);\n return _isBound(serviceIdentifier);\n };\n };\n var getRebindFunction = function (moduleId) {\n return function (serviceIdentifier) {\n var bindingToSyntax = _this.rebind.call(_this, serviceIdentifier);\n setModuleId(bindingToSyntax, moduleId);\n return bindingToSyntax;\n };\n };\n modules.forEach(function (module) {\n var bindFunction = getBindFunction(module.guid);\n var unbindFunction = getUnbindFunction(module.guid);\n var isboundFunction = getIsboundFunction(module.guid);\n var rebindFunction = getRebindFunction(module.guid);\n module.registry(bindFunction, unbindFunction, isboundFunction, rebindFunction);\n });\n };\n Container.prototype.unload = function () {\n var _this = this;\n var modules = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n modules[_i] = arguments[_i];\n }\n var conditionFactory = function (expected) { return function (item) {\n return item.moduleId === expected;\n }; };\n modules.forEach(function (module) {\n var condition = conditionFactory(module.guid);\n _this._bindingDictionary.removeByCondition(condition);\n });\n };\n Container.prototype.bind = function (serviceIdentifier) {\n var scope = this.options.defaultScope || literal_types_1.BindingScopeEnum.Transient;\n var binding = new binding_1.Binding(serviceIdentifier, scope);\n this._bindingDictionary.add(serviceIdentifier, binding);\n return new binding_to_syntax_1.BindingToSyntax(binding);\n };\n Container.prototype.rebind = function (serviceIdentifier) {\n this.unbind(serviceIdentifier);\n return this.bind(serviceIdentifier);\n };\n Container.prototype.unbind = function (serviceIdentifier) {\n try {\n this._bindingDictionary.remove(serviceIdentifier);\n }\n catch (e) {\n throw new Error(ERROR_MSGS.CANNOT_UNBIND + \" \" + serialization_1.getServiceIdentifierAsString(serviceIdentifier));\n }\n };\n Container.prototype.unbindAll = function () {\n this._bindingDictionary = new lookup_1.Lookup();\n };\n Container.prototype.isBound = function (serviceIdentifier) {\n var bound = this._bindingDictionary.hasKey(serviceIdentifier);\n if (!bound && this.parent) {\n bound = this.parent.isBound(serviceIdentifier);\n }\n return bound;\n };\n Container.prototype.isBoundNamed = function (serviceIdentifier, named) {\n return this.isBoundTagged(serviceIdentifier, METADATA_KEY.NAMED_TAG, named);\n };\n Container.prototype.isBoundTagged = function (serviceIdentifier, key, value) {\n var bound = false;\n if (this._bindingDictionary.hasKey(serviceIdentifier)) {\n var bindings = this._bindingDictionary.get(serviceIdentifier);\n var request_1 = planner_1.createMockRequest(this, serviceIdentifier, key, value);\n bound = bindings.some(function (b) { return b.constraint(request_1); });\n }\n if (!bound && this.parent) {\n bound = this.parent.isBoundTagged(serviceIdentifier, key, value);\n }\n return bound;\n };\n Container.prototype.snapshot = function () {\n this._snapshots.push(container_snapshot_1.ContainerSnapshot.of(this._bindingDictionary.clone(), this._middleware));\n };\n Container.prototype.restore = function () {\n var snapshot = this._snapshots.pop();\n if (snapshot === undefined) {\n throw new Error(ERROR_MSGS.NO_MORE_SNAPSHOTS_AVAILABLE);\n }\n this._bindingDictionary = snapshot.bindings;\n this._middleware = snapshot.middleware;\n };\n Container.prototype.createChild = function () {\n var child = new Container();\n child.parent = this;\n return child;\n };\n Container.prototype.applyMiddleware = function () {\n var middlewares = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n middlewares[_i] = arguments[_i];\n }\n var initial = (this._middleware) ? this._middleware : this._planAndResolve();\n this._middleware = middlewares.reduce(function (prev, curr) { return curr(prev); }, initial);\n };\n Container.prototype.applyCustomMetadataReader = function (metadataReader) {\n this._metadataReader = metadataReader;\n };\n Container.prototype.get = function (serviceIdentifier) {\n return this._get(false, false, literal_types_1.TargetTypeEnum.Variable, serviceIdentifier);\n };\n Container.prototype.getTagged = function (serviceIdentifier, key, value) {\n return this._get(false, false, literal_types_1.TargetTypeEnum.Variable, serviceIdentifier, key, value);\n };\n Container.prototype.getNamed = function (serviceIdentifier, named) {\n return this.getTagged(serviceIdentifier, METADATA_KEY.NAMED_TAG, named);\n };\n Container.prototype.getAll = function (serviceIdentifier) {\n return this._get(true, true, literal_types_1.TargetTypeEnum.Variable, serviceIdentifier);\n };\n Container.prototype.getAllTagged = function (serviceIdentifier, key, value) {\n return this._get(false, true, literal_types_1.TargetTypeEnum.Variable, serviceIdentifier, key, value);\n };\n Container.prototype.getAllNamed = function (serviceIdentifier, named) {\n return this.getAllTagged(serviceIdentifier, METADATA_KEY.NAMED_TAG, named);\n };\n Container.prototype.resolve = function (constructorFunction) {\n var tempContainer = new Container();\n tempContainer.bind(constructorFunction).toSelf();\n tempContainer.parent = this;\n return tempContainer.get(constructorFunction);\n };\n Container.prototype._get = function (avoidConstraints, isMultiInject, targetType, serviceIdentifier, key, value) {\n var result = null;\n var defaultArgs = {\n avoidConstraints: avoidConstraints,\n contextInterceptor: function (context) { return context; },\n isMultiInject: isMultiInject,\n key: key,\n serviceIdentifier: serviceIdentifier,\n targetType: targetType,\n value: value\n };\n if (this._middleware) {\n result = this._middleware(defaultArgs);\n if (result === undefined || result === null) {\n throw new Error(ERROR_MSGS.INVALID_MIDDLEWARE_RETURN);\n }\n }\n else {\n result = this._planAndResolve()(defaultArgs);\n }\n return result;\n };\n Container.prototype._planAndResolve = function () {\n var _this = this;\n return function (args) {\n var context = planner_1.plan(_this._metadataReader, _this, args.isMultiInject, args.targetType, args.serviceIdentifier, args.key, args.value, args.avoidConstraints);\n context = args.contextInterceptor(context);\n var result = resolver_1.resolve(context);\n return result;\n };\n };\n return Container;\n}());\nexports.Container = Container;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/container/container.js\n// module id = 223\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar guid_1 = require(\"../utils/guid\");\nvar ContainerModule = (function () {\n function ContainerModule(registry) {\n this.guid = guid_1.guid();\n this.registry = registry;\n }\n return ContainerModule;\n}());\nexports.ContainerModule = ContainerModule;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/container/container_module.js\n// module id = 224\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ContainerSnapshot = (function () {\n function ContainerSnapshot() {\n }\n ContainerSnapshot.of = function (bindings, middleware) {\n var snapshot = new ContainerSnapshot();\n snapshot.bindings = bindings;\n snapshot.middleware = middleware;\n return snapshot;\n };\n return ContainerSnapshot;\n}());\nexports.ContainerSnapshot = ContainerSnapshot;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/container/container_snapshot.js\n// module id = 225\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ERROR_MSGS = require(\"../constants/error_msgs\");\nvar Lookup = (function () {\n function Lookup() {\n this._map = new Map();\n }\n Lookup.prototype.getMap = function () {\n return this._map;\n };\n Lookup.prototype.add = function (serviceIdentifier, value) {\n if (serviceIdentifier === null || serviceIdentifier === undefined) {\n throw new Error(ERROR_MSGS.NULL_ARGUMENT);\n }\n if (value === null || value === undefined) {\n throw new Error(ERROR_MSGS.NULL_ARGUMENT);\n }\n var entry = this._map.get(serviceIdentifier);\n if (entry !== undefined) {\n entry.push(value);\n this._map.set(serviceIdentifier, entry);\n }\n else {\n this._map.set(serviceIdentifier, [value]);\n }\n };\n Lookup.prototype.get = function (serviceIdentifier) {\n if (serviceIdentifier === null || serviceIdentifier === undefined) {\n throw new Error(ERROR_MSGS.NULL_ARGUMENT);\n }\n var entry = this._map.get(serviceIdentifier);\n if (entry !== undefined) {\n return entry;\n }\n else {\n throw new Error(ERROR_MSGS.KEY_NOT_FOUND);\n }\n };\n Lookup.prototype.remove = function (serviceIdentifier) {\n if (serviceIdentifier === null || serviceIdentifier === undefined) {\n throw new Error(ERROR_MSGS.NULL_ARGUMENT);\n }\n if (!this._map.delete(serviceIdentifier)) {\n throw new Error(ERROR_MSGS.KEY_NOT_FOUND);\n }\n };\n Lookup.prototype.removeByCondition = function (condition) {\n var _this = this;\n this._map.forEach(function (entries, key) {\n var updatedEntries = entries.filter(function (entry) { return !condition(entry); });\n if (updatedEntries.length > 0) {\n _this._map.set(key, updatedEntries);\n }\n else {\n _this._map.delete(key);\n }\n });\n };\n Lookup.prototype.hasKey = function (serviceIdentifier) {\n if (serviceIdentifier === null || serviceIdentifier === undefined) {\n throw new Error(ERROR_MSGS.NULL_ARGUMENT);\n }\n return this._map.has(serviceIdentifier);\n };\n Lookup.prototype.clone = function () {\n var copy = new Lookup();\n this._map.forEach(function (value, key) {\n value.forEach(function (b) { return copy.add(key, b.clone()); });\n });\n return copy;\n };\n Lookup.prototype.traverse = function (func) {\n this._map.forEach(function (value, key) {\n func(key, value);\n });\n };\n return Lookup;\n}());\nexports.Lookup = Lookup;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/container/lookup.js\n// module id = 226\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar guid_1 = require(\"../utils/guid\");\nvar Context = (function () {\n function Context(container) {\n this.guid = guid_1.guid();\n this.container = container;\n }\n Context.prototype.addPlan = function (plan) {\n this.plan = plan;\n };\n Context.prototype.setCurrentRequest = function (currentRequest) {\n this.currentRequest = currentRequest;\n };\n return Context;\n}());\nexports.Context = Context;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/planning/context.js\n// module id = 227\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Plan = (function () {\n function Plan(parentContext, rootRequest) {\n this.parentContext = parentContext;\n this.rootRequest = rootRequest;\n }\n return Plan;\n}());\nexports.Plan = Plan;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/planning/plan.js\n// module id = 228\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar binding_count_1 = require(\"../bindings/binding_count\");\nvar ERROR_MSGS = require(\"../constants/error_msgs\");\nvar literal_types_1 = require(\"../constants/literal_types\");\nvar METADATA_KEY = require(\"../constants/metadata_keys\");\nvar exceptions_1 = require(\"../utils/exceptions\");\nvar serialization_1 = require(\"../utils/serialization\");\nvar context_1 = require(\"./context\");\nvar metadata_1 = require(\"./metadata\");\nvar plan_1 = require(\"./plan\");\nvar reflection_utils_1 = require(\"./reflection_utils\");\nvar request_1 = require(\"./request\");\nvar target_1 = require(\"./target\");\nfunction getBindingDictionary(cntnr) {\n return cntnr._bindingDictionary;\n}\nexports.getBindingDictionary = getBindingDictionary;\nfunction _createTarget(isMultiInject, targetType, serviceIdentifier, name, key, value) {\n var metadataKey = isMultiInject ? METADATA_KEY.MULTI_INJECT_TAG : METADATA_KEY.INJECT_TAG;\n var injectMetadata = new metadata_1.Metadata(metadataKey, serviceIdentifier);\n var target = new target_1.Target(targetType, name, serviceIdentifier, injectMetadata);\n if (key !== undefined) {\n var tagMetadata = new metadata_1.Metadata(key, value);\n target.metadata.push(tagMetadata);\n }\n return target;\n}\nfunction _getActiveBindings(metadataReader, avoidConstraints, context, parentRequest, target) {\n var bindings = getBindings(context.container, target.serviceIdentifier);\n var activeBindings = [];\n if (bindings.length === binding_count_1.BindingCount.NoBindingsAvailable &&\n context.container.options.autoBindInjectable &&\n typeof target.serviceIdentifier === \"function\" &&\n metadataReader.getConstructorMetadata(target.serviceIdentifier).compilerGeneratedMetadata) {\n context.container.bind(target.serviceIdentifier).toSelf();\n bindings = getBindings(context.container, target.serviceIdentifier);\n }\n if (!avoidConstraints) {\n activeBindings = bindings.filter(function (binding) {\n var request = new request_1.Request(binding.serviceIdentifier, context, parentRequest, binding, target);\n return binding.constraint(request);\n });\n }\n else {\n activeBindings = bindings;\n }\n _validateActiveBindingCount(target.serviceIdentifier, activeBindings, target, context.container);\n return activeBindings;\n}\nfunction _validateActiveBindingCount(serviceIdentifier, bindings, target, container) {\n switch (bindings.length) {\n case binding_count_1.BindingCount.NoBindingsAvailable:\n if (target.isOptional()) {\n return bindings;\n }\n else {\n var serviceIdentifierString = serialization_1.getServiceIdentifierAsString(serviceIdentifier);\n var msg = ERROR_MSGS.NOT_REGISTERED;\n msg += serialization_1.listMetadataForTarget(serviceIdentifierString, target);\n msg += serialization_1.listRegisteredBindingsForServiceIdentifier(container, serviceIdentifierString, getBindings);\n throw new Error(msg);\n }\n case binding_count_1.BindingCount.OnlyOneBindingAvailable:\n if (!target.isArray()) {\n return bindings;\n }\n case binding_count_1.BindingCount.MultipleBindingsAvailable:\n default:\n if (!target.isArray()) {\n var serviceIdentifierString = serialization_1.getServiceIdentifierAsString(serviceIdentifier);\n var msg = ERROR_MSGS.AMBIGUOUS_MATCH + \" \" + serviceIdentifierString;\n msg += serialization_1.listRegisteredBindingsForServiceIdentifier(container, serviceIdentifierString, getBindings);\n throw new Error(msg);\n }\n else {\n return bindings;\n }\n }\n}\nfunction _createSubRequests(metadataReader, avoidConstraints, serviceIdentifier, context, parentRequest, target) {\n var activeBindings;\n var childRequest;\n if (parentRequest === null) {\n activeBindings = _getActiveBindings(metadataReader, avoidConstraints, context, null, target);\n childRequest = new request_1.Request(serviceIdentifier, context, null, activeBindings, target);\n var thePlan = new plan_1.Plan(context, childRequest);\n context.addPlan(thePlan);\n }\n else {\n activeBindings = _getActiveBindings(metadataReader, avoidConstraints, context, parentRequest, target);\n childRequest = parentRequest.addChildRequest(target.serviceIdentifier, activeBindings, target);\n }\n activeBindings.forEach(function (binding) {\n var subChildRequest = null;\n if (target.isArray()) {\n subChildRequest = childRequest.addChildRequest(binding.serviceIdentifier, binding, target);\n }\n else {\n if (binding.cache) {\n return;\n }\n subChildRequest = childRequest;\n }\n if (binding.type === literal_types_1.BindingTypeEnum.Instance && binding.implementationType !== null) {\n var dependencies = reflection_utils_1.getDependencies(metadataReader, binding.implementationType);\n dependencies.forEach(function (dependency) {\n _createSubRequests(metadataReader, false, dependency.serviceIdentifier, context, subChildRequest, dependency);\n });\n }\n });\n}\nfunction getBindings(container, serviceIdentifier) {\n var bindings = [];\n var bindingDictionary = getBindingDictionary(container);\n if (bindingDictionary.hasKey(serviceIdentifier)) {\n bindings = bindingDictionary.get(serviceIdentifier);\n }\n else if (container.parent !== null) {\n bindings = getBindings(container.parent, serviceIdentifier);\n }\n return bindings;\n}\nfunction plan(metadataReader, container, isMultiInject, targetType, serviceIdentifier, key, value, avoidConstraints) {\n if (avoidConstraints === void 0) { avoidConstraints = false; }\n var context = new context_1.Context(container);\n var target = _createTarget(isMultiInject, targetType, serviceIdentifier, \"\", key, value);\n try {\n _createSubRequests(metadataReader, avoidConstraints, serviceIdentifier, context, null, target);\n return context;\n }\n catch (error) {\n if (exceptions_1.isStackOverflowExeption(error)) {\n if (context.plan) {\n serialization_1.circularDependencyToException(context.plan.rootRequest);\n }\n }\n throw error;\n }\n}\nexports.plan = plan;\nfunction createMockRequest(container, serviceIdentifier, key, value) {\n var target = new target_1.Target(literal_types_1.TargetTypeEnum.Variable, \"\", serviceIdentifier, new metadata_1.Metadata(key, value));\n var context = new context_1.Context(container);\n var request = new request_1.Request(serviceIdentifier, context, null, [], target);\n return request;\n}\nexports.createMockRequest = createMockRequest;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/planning/planner.js\n// module id = 229\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar QueryableString = (function () {\n function QueryableString(str) {\n this.str = str;\n }\n QueryableString.prototype.startsWith = function (searchString) {\n return this.str.indexOf(searchString) === 0;\n };\n QueryableString.prototype.endsWith = function (searchString) {\n var reverseString = \"\";\n var reverseSearchString = searchString.split(\"\").reverse().join(\"\");\n reverseString = this.str.split(\"\").reverse().join(\"\");\n return this.startsWith.call({ str: reverseString }, reverseSearchString);\n };\n QueryableString.prototype.contains = function (searchString) {\n return (this.str.indexOf(searchString) !== -1);\n };\n QueryableString.prototype.equals = function (compareString) {\n return this.str === compareString;\n };\n QueryableString.prototype.value = function () {\n return this.str;\n };\n return QueryableString;\n}());\nexports.QueryableString = QueryableString;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/planning/queryable_string.js\n// module id = 230\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inject_1 = require(\"../annotation/inject\");\nvar ERROR_MSGS = require(\"../constants/error_msgs\");\nvar literal_types_1 = require(\"../constants/literal_types\");\nvar METADATA_KEY = require(\"../constants/metadata_keys\");\nvar serialization_1 = require(\"../utils/serialization\");\nvar target_1 = require(\"./target\");\nfunction getDependencies(metadataReader, func) {\n var constructorName = serialization_1.getFunctionName(func);\n var targets = getTargets(metadataReader, constructorName, func, false);\n return targets;\n}\nexports.getDependencies = getDependencies;\nfunction getTargets(metadataReader, constructorName, func, isBaseClass) {\n var metadata = metadataReader.getConstructorMetadata(func);\n var serviceIdentifiers = metadata.compilerGeneratedMetadata;\n if (serviceIdentifiers === undefined) {\n var msg = ERROR_MSGS.MISSING_INJECTABLE_ANNOTATION + \" \" + constructorName + \".\";\n throw new Error(msg);\n }\n var constructorArgsMetadata = metadata.userGeneratedMetadata;\n var keys = Object.keys(constructorArgsMetadata);\n var hasUserDeclaredUnknownInjections = (func.length === 0 && keys.length > 0);\n var iterations = (hasUserDeclaredUnknownInjections) ? keys.length : func.length;\n var constructorTargets = getConstructorArgsAsTargets(isBaseClass, constructorName, serviceIdentifiers, constructorArgsMetadata, iterations);\n var propertyTargets = getClassPropsAsTargets(metadataReader, func);\n var targets = constructorTargets.concat(propertyTargets);\n var baseClassDependencyCount = getBaseClassDependencyCount(metadataReader, func);\n if (targets.length < baseClassDependencyCount) {\n var error = ERROR_MSGS.ARGUMENTS_LENGTH_MISMATCH_1 +\n constructorName + ERROR_MSGS.ARGUMENTS_LENGTH_MISMATCH_2;\n throw new Error(error);\n }\n return targets;\n}\nfunction getConstructorArgsAsTarget(index, isBaseClass, constructorName, serviceIdentifiers, constructorArgsMetadata) {\n var targetMetadata = constructorArgsMetadata[index.toString()] || [];\n var metadata = formatTargetMetadata(targetMetadata);\n var isManaged = metadata.unmanaged !== true;\n var serviceIdentifier = serviceIdentifiers[index];\n var injectIdentifier = (metadata.inject || metadata.multiInject);\n serviceIdentifier = (injectIdentifier) ? (injectIdentifier) : serviceIdentifier;\n if (serviceIdentifier instanceof inject_1.LazyServiceIdentifer) {\n serviceIdentifier = serviceIdentifier.unwrap();\n }\n if (isManaged) {\n var isObject = serviceIdentifier === Object;\n var isFunction = serviceIdentifier === Function;\n var isUndefined = serviceIdentifier === undefined;\n var isUnknownType = (isObject || isFunction || isUndefined);\n if (!isBaseClass && isUnknownType) {\n var msg = ERROR_MSGS.MISSING_INJECT_ANNOTATION + \" argument \" + index + \" in class \" + constructorName + \".\";\n throw new Error(msg);\n }\n var target = new target_1.Target(literal_types_1.TargetTypeEnum.ConstructorArgument, metadata.targetName, serviceIdentifier);\n target.metadata = targetMetadata;\n return target;\n }\n return null;\n}\nfunction getConstructorArgsAsTargets(isBaseClass, constructorName, serviceIdentifiers, constructorArgsMetadata, iterations) {\n var targets = [];\n for (var i = 0; i < iterations; i++) {\n var index = i;\n var target = getConstructorArgsAsTarget(index, isBaseClass, constructorName, serviceIdentifiers, constructorArgsMetadata);\n if (target !== null) {\n targets.push(target);\n }\n }\n return targets;\n}\nfunction getClassPropsAsTargets(metadataReader, constructorFunc) {\n var classPropsMetadata = metadataReader.getPropertiesMetadata(constructorFunc);\n var targets = [];\n var keys = Object.keys(classPropsMetadata);\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n var targetMetadata = classPropsMetadata[key];\n var metadata = formatTargetMetadata(classPropsMetadata[key]);\n var targetName = metadata.targetName || key;\n var serviceIdentifier = (metadata.inject || metadata.multiInject);\n var target = new target_1.Target(literal_types_1.TargetTypeEnum.ClassProperty, targetName, serviceIdentifier);\n target.metadata = targetMetadata;\n targets.push(target);\n }\n var baseConstructor = Object.getPrototypeOf(constructorFunc.prototype).constructor;\n if (baseConstructor !== Object) {\n var baseTargets = getClassPropsAsTargets(metadataReader, baseConstructor);\n targets = targets.concat(baseTargets);\n }\n return targets;\n}\nfunction getBaseClassDependencyCount(metadataReader, func) {\n var baseConstructor = Object.getPrototypeOf(func.prototype).constructor;\n if (baseConstructor !== Object) {\n var baseConstructorName = serialization_1.getFunctionName(baseConstructor);\n var targets = getTargets(metadataReader, baseConstructorName, baseConstructor, true);\n var metadata = targets.map(function (t) {\n return t.metadata.filter(function (m) {\n return m.key === METADATA_KEY.UNMANAGED_TAG;\n });\n });\n var unmanagedCount = [].concat.apply([], metadata).length;\n var dependencyCount = targets.length - unmanagedCount;\n if (dependencyCount > 0) {\n return dependencyCount;\n }\n else {\n return getBaseClassDependencyCount(metadataReader, baseConstructor);\n }\n }\n else {\n return 0;\n }\n}\nfunction formatTargetMetadata(targetMetadata) {\n var targetMetadataMap = {};\n targetMetadata.forEach(function (m) {\n targetMetadataMap[m.key.toString()] = m.value;\n });\n return {\n inject: targetMetadataMap[METADATA_KEY.INJECT_TAG],\n multiInject: targetMetadataMap[METADATA_KEY.MULTI_INJECT_TAG],\n targetName: targetMetadataMap[METADATA_KEY.NAME_TAG],\n unmanaged: targetMetadataMap[METADATA_KEY.UNMANAGED_TAG]\n };\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/planning/reflection_utils.js\n// module id = 231\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar guid_1 = require(\"../utils/guid\");\nvar Request = (function () {\n function Request(serviceIdentifier, parentContext, parentRequest, bindings, target) {\n this.guid = guid_1.guid();\n this.serviceIdentifier = serviceIdentifier;\n this.parentContext = parentContext;\n this.parentRequest = parentRequest;\n this.target = target;\n this.childRequests = [];\n this.bindings = (Array.isArray(bindings) ? bindings : [bindings]);\n this.requestScope = parentRequest === null\n ? new Map()\n : null;\n }\n Request.prototype.addChildRequest = function (serviceIdentifier, bindings, target) {\n var child = new Request(serviceIdentifier, this.parentContext, this, bindings, target);\n this.childRequests.push(child);\n return child;\n };\n return Request;\n}());\nexports.Request = Request;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/planning/request.js\n// module id = 232\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar error_msgs_1 = require(\"../constants/error_msgs\");\nvar literal_types_1 = require(\"../constants/literal_types\");\nvar METADATA_KEY = require(\"../constants/metadata_keys\");\nfunction _injectProperties(instance, childRequests, resolveRequest) {\n var propertyInjectionsRequests = childRequests.filter(function (childRequest) {\n return (childRequest.target !== null &&\n childRequest.target.type === literal_types_1.TargetTypeEnum.ClassProperty);\n });\n var propertyInjections = propertyInjectionsRequests.map(resolveRequest);\n propertyInjectionsRequests.forEach(function (r, index) {\n var propertyName = \"\";\n propertyName = r.target.name.value();\n var injection = propertyInjections[index];\n instance[propertyName] = injection;\n });\n return instance;\n}\nfunction _createInstance(Func, injections) {\n return new (Func.bind.apply(Func, [void 0].concat(injections)))();\n}\nfunction _postConstruct(constr, result) {\n if (Reflect.hasMetadata(METADATA_KEY.POST_CONSTRUCT, constr)) {\n var data = Reflect.getMetadata(METADATA_KEY.POST_CONSTRUCT, constr);\n try {\n result[data.value]();\n }\n catch (e) {\n throw new Error(error_msgs_1.POST_CONSTRUCT_ERROR(constr.name, e.message));\n }\n }\n}\nfunction resolveInstance(constr, childRequests, resolveRequest) {\n var result = null;\n if (childRequests.length > 0) {\n var constructorInjectionsRequests = childRequests.filter(function (childRequest) {\n return (childRequest.target !== null && childRequest.target.type === literal_types_1.TargetTypeEnum.ConstructorArgument);\n });\n var constructorInjections = constructorInjectionsRequests.map(resolveRequest);\n result = _createInstance(constr, constructorInjections);\n result = _injectProperties(result, childRequests, resolveRequest);\n }\n else {\n result = new constr();\n }\n _postConstruct(constr, result);\n return result;\n}\nexports.resolveInstance = resolveInstance;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/resolution/instantiation.js\n// module id = 233\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ERROR_MSGS = require(\"../constants/error_msgs\");\nvar literal_types_1 = require(\"../constants/literal_types\");\nvar exceptions_1 = require(\"../utils/exceptions\");\nvar serialization_1 = require(\"../utils/serialization\");\nvar instantiation_1 = require(\"./instantiation\");\nvar invokeFactory = function (factoryType, serviceIdentifier, fn) {\n try {\n return fn();\n }\n catch (error) {\n if (exceptions_1.isStackOverflowExeption(error)) {\n throw new Error(ERROR_MSGS.CIRCULAR_DEPENDENCY_IN_FACTORY(factoryType, serviceIdentifier.toString()));\n }\n else {\n throw error;\n }\n }\n};\nvar _resolveRequest = function (requestScope) {\n return function (request) {\n request.parentContext.setCurrentRequest(request);\n var bindings = request.bindings;\n var childRequests = request.childRequests;\n var targetIsAnArray = request.target && request.target.isArray();\n var targetParentIsNotAnArray = !request.parentRequest ||\n !request.parentRequest.target ||\n !request.target ||\n !request.parentRequest.target.matchesArray(request.target.serviceIdentifier);\n if (targetIsAnArray && targetParentIsNotAnArray) {\n return childRequests.map(function (childRequest) {\n var _f = _resolveRequest(requestScope);\n return _f(childRequest);\n });\n }\n else {\n var result = null;\n if (request.target.isOptional() && bindings.length === 0) {\n return undefined;\n }\n var binding_1 = bindings[0];\n var isSingleton = binding_1.scope === literal_types_1.BindingScopeEnum.Singleton;\n var isRequestSingleton = binding_1.scope === literal_types_1.BindingScopeEnum.Request;\n if (isSingleton && binding_1.activated) {\n return binding_1.cache;\n }\n if (isRequestSingleton &&\n requestScope !== null &&\n requestScope.has(binding_1.guid)) {\n return requestScope.get(binding_1.guid);\n }\n if (binding_1.type === literal_types_1.BindingTypeEnum.ConstantValue) {\n result = binding_1.cache;\n }\n else if (binding_1.type === literal_types_1.BindingTypeEnum.Function) {\n result = binding_1.cache;\n }\n else if (binding_1.type === literal_types_1.BindingTypeEnum.Constructor) {\n result = binding_1.implementationType;\n }\n else if (binding_1.type === literal_types_1.BindingTypeEnum.DynamicValue && binding_1.dynamicValue !== null) {\n result = invokeFactory(\"toDynamicValue\", binding_1.serviceIdentifier, function () { return binding_1.dynamicValue(request.parentContext); });\n }\n else if (binding_1.type === literal_types_1.BindingTypeEnum.Factory && binding_1.factory !== null) {\n result = invokeFactory(\"toFactory\", binding_1.serviceIdentifier, function () { return binding_1.factory(request.parentContext); });\n }\n else if (binding_1.type === literal_types_1.BindingTypeEnum.Provider && binding_1.provider !== null) {\n result = invokeFactory(\"toProvider\", binding_1.serviceIdentifier, function () { return binding_1.provider(request.parentContext); });\n }\n else if (binding_1.type === literal_types_1.BindingTypeEnum.Instance && binding_1.implementationType !== null) {\n result = instantiation_1.resolveInstance(binding_1.implementationType, childRequests, _resolveRequest(requestScope));\n }\n else {\n var serviceIdentifier = serialization_1.getServiceIdentifierAsString(request.serviceIdentifier);\n throw new Error(ERROR_MSGS.INVALID_BINDING_TYPE + \" \" + serviceIdentifier);\n }\n if (typeof binding_1.onActivation === \"function\") {\n result = binding_1.onActivation(request.parentContext, result);\n }\n if (isSingleton) {\n binding_1.cache = result;\n binding_1.activated = true;\n }\n if (isRequestSingleton &&\n requestScope !== null &&\n !requestScope.has(binding_1.guid)) {\n requestScope.set(binding_1.guid, result);\n }\n return result;\n }\n };\n};\nfunction resolve(context) {\n var _f = _resolveRequest(context.plan.rootRequest.requestScope);\n return _f(context.plan.rootRequest);\n}\nexports.resolve = resolve;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/resolution/resolver.js\n// module id = 234\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar literal_types_1 = require(\"../constants/literal_types\");\nvar binding_when_on_syntax_1 = require(\"./binding_when_on_syntax\");\nvar BindingInSyntax = (function () {\n function BindingInSyntax(binding) {\n this._binding = binding;\n }\n BindingInSyntax.prototype.inRequestScope = function () {\n this._binding.scope = literal_types_1.BindingScopeEnum.Request;\n return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding);\n };\n BindingInSyntax.prototype.inSingletonScope = function () {\n this._binding.scope = literal_types_1.BindingScopeEnum.Singleton;\n return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding);\n };\n BindingInSyntax.prototype.inTransientScope = function () {\n this._binding.scope = literal_types_1.BindingScopeEnum.Transient;\n return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding);\n };\n return BindingInSyntax;\n}());\nexports.BindingInSyntax = BindingInSyntax;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/syntax/binding_in_syntax.js\n// module id = 235\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar binding_in_syntax_1 = require(\"./binding_in_syntax\");\nvar binding_on_syntax_1 = require(\"./binding_on_syntax\");\nvar binding_when_syntax_1 = require(\"./binding_when_syntax\");\nvar BindingInWhenOnSyntax = (function () {\n function BindingInWhenOnSyntax(binding) {\n this._binding = binding;\n this._bindingWhenSyntax = new binding_when_syntax_1.BindingWhenSyntax(this._binding);\n this._bindingOnSyntax = new binding_on_syntax_1.BindingOnSyntax(this._binding);\n this._bindingInSyntax = new binding_in_syntax_1.BindingInSyntax(binding);\n }\n BindingInWhenOnSyntax.prototype.inRequestScope = function () {\n return this._bindingInSyntax.inRequestScope();\n };\n BindingInWhenOnSyntax.prototype.inSingletonScope = function () {\n return this._bindingInSyntax.inSingletonScope();\n };\n BindingInWhenOnSyntax.prototype.inTransientScope = function () {\n return this._bindingInSyntax.inTransientScope();\n };\n BindingInWhenOnSyntax.prototype.when = function (constraint) {\n return this._bindingWhenSyntax.when(constraint);\n };\n BindingInWhenOnSyntax.prototype.whenTargetNamed = function (name) {\n return this._bindingWhenSyntax.whenTargetNamed(name);\n };\n BindingInWhenOnSyntax.prototype.whenTargetIsDefault = function () {\n return this._bindingWhenSyntax.whenTargetIsDefault();\n };\n BindingInWhenOnSyntax.prototype.whenTargetTagged = function (tag, value) {\n return this._bindingWhenSyntax.whenTargetTagged(tag, value);\n };\n BindingInWhenOnSyntax.prototype.whenInjectedInto = function (parent) {\n return this._bindingWhenSyntax.whenInjectedInto(parent);\n };\n BindingInWhenOnSyntax.prototype.whenParentNamed = function (name) {\n return this._bindingWhenSyntax.whenParentNamed(name);\n };\n BindingInWhenOnSyntax.prototype.whenParentTagged = function (tag, value) {\n return this._bindingWhenSyntax.whenParentTagged(tag, value);\n };\n BindingInWhenOnSyntax.prototype.whenAnyAncestorIs = function (ancestor) {\n return this._bindingWhenSyntax.whenAnyAncestorIs(ancestor);\n };\n BindingInWhenOnSyntax.prototype.whenNoAncestorIs = function (ancestor) {\n return this._bindingWhenSyntax.whenNoAncestorIs(ancestor);\n };\n BindingInWhenOnSyntax.prototype.whenAnyAncestorNamed = function (name) {\n return this._bindingWhenSyntax.whenAnyAncestorNamed(name);\n };\n BindingInWhenOnSyntax.prototype.whenAnyAncestorTagged = function (tag, value) {\n return this._bindingWhenSyntax.whenAnyAncestorTagged(tag, value);\n };\n BindingInWhenOnSyntax.prototype.whenNoAncestorNamed = function (name) {\n return this._bindingWhenSyntax.whenNoAncestorNamed(name);\n };\n BindingInWhenOnSyntax.prototype.whenNoAncestorTagged = function (tag, value) {\n return this._bindingWhenSyntax.whenNoAncestorTagged(tag, value);\n };\n BindingInWhenOnSyntax.prototype.whenAnyAncestorMatches = function (constraint) {\n return this._bindingWhenSyntax.whenAnyAncestorMatches(constraint);\n };\n BindingInWhenOnSyntax.prototype.whenNoAncestorMatches = function (constraint) {\n return this._bindingWhenSyntax.whenNoAncestorMatches(constraint);\n };\n BindingInWhenOnSyntax.prototype.onActivation = function (handler) {\n return this._bindingOnSyntax.onActivation(handler);\n };\n return BindingInWhenOnSyntax;\n}());\nexports.BindingInWhenOnSyntax = BindingInWhenOnSyntax;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/syntax/binding_in_when_on_syntax.js\n// module id = 236\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ERROR_MSGS = require(\"../constants/error_msgs\");\nvar literal_types_1 = require(\"../constants/literal_types\");\nvar binding_in_when_on_syntax_1 = require(\"./binding_in_when_on_syntax\");\nvar binding_when_on_syntax_1 = require(\"./binding_when_on_syntax\");\nvar BindingToSyntax = (function () {\n function BindingToSyntax(binding) {\n this._binding = binding;\n }\n BindingToSyntax.prototype.to = function (constructor) {\n this._binding.type = literal_types_1.BindingTypeEnum.Instance;\n this._binding.implementationType = constructor;\n return new binding_in_when_on_syntax_1.BindingInWhenOnSyntax(this._binding);\n };\n BindingToSyntax.prototype.toSelf = function () {\n if (typeof this._binding.serviceIdentifier !== \"function\") {\n throw new Error(\"\" + ERROR_MSGS.INVALID_TO_SELF_VALUE);\n }\n var self = this._binding.serviceIdentifier;\n return this.to(self);\n };\n BindingToSyntax.prototype.toConstantValue = function (value) {\n this._binding.type = literal_types_1.BindingTypeEnum.ConstantValue;\n this._binding.cache = value;\n this._binding.dynamicValue = null;\n this._binding.implementationType = null;\n return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding);\n };\n BindingToSyntax.prototype.toDynamicValue = function (func) {\n this._binding.type = literal_types_1.BindingTypeEnum.DynamicValue;\n this._binding.cache = null;\n this._binding.dynamicValue = func;\n this._binding.implementationType = null;\n return new binding_in_when_on_syntax_1.BindingInWhenOnSyntax(this._binding);\n };\n BindingToSyntax.prototype.toConstructor = function (constructor) {\n this._binding.type = literal_types_1.BindingTypeEnum.Constructor;\n this._binding.implementationType = constructor;\n return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding);\n };\n BindingToSyntax.prototype.toFactory = function (factory) {\n this._binding.type = literal_types_1.BindingTypeEnum.Factory;\n this._binding.factory = factory;\n return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding);\n };\n BindingToSyntax.prototype.toFunction = function (func) {\n if (typeof func !== \"function\") {\n throw new Error(ERROR_MSGS.INVALID_FUNCTION_BINDING);\n }\n var bindingWhenOnSyntax = this.toConstantValue(func);\n this._binding.type = literal_types_1.BindingTypeEnum.Function;\n return bindingWhenOnSyntax;\n };\n BindingToSyntax.prototype.toAutoFactory = function (serviceIdentifier) {\n this._binding.type = literal_types_1.BindingTypeEnum.Factory;\n this._binding.factory = function (context) {\n var autofactory = function () { return context.container.get(serviceIdentifier); };\n return autofactory;\n };\n return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding);\n };\n BindingToSyntax.prototype.toProvider = function (provider) {\n this._binding.type = literal_types_1.BindingTypeEnum.Provider;\n this._binding.provider = provider;\n return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding);\n };\n BindingToSyntax.prototype.toService = function (service) {\n this.toDynamicValue(function (context) { return context.container.get(service); });\n };\n return BindingToSyntax;\n}());\nexports.BindingToSyntax = BindingToSyntax;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/syntax/binding_to_syntax.js\n// module id = 237\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.multiBindToService = function (container) {\n return function (service) {\n return function () {\n var types = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n types[_i] = arguments[_i];\n }\n return types.forEach(function (t) { return container.bind(t).toService(service); });\n };\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inversify/lib/utils/binding_utils.js\n// module id = 238\n// module chunks = 0","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/process/browser.js\n// module id = 239\n// module chunks = 0","\"use strict\";\n;\n;\n;\nvar isWebSocket = function (constructor) {\n return constructor && constructor.CLOSING === 2;\n};\nvar isGlobalWebSocket = function () {\n return typeof WebSocket !== 'undefined' && isWebSocket(WebSocket);\n};\nvar getDefaultOptions = function () { return ({\n constructor: isGlobalWebSocket() ? WebSocket : null,\n maxReconnectionDelay: 10000,\n minReconnectionDelay: 1500,\n reconnectionDelayGrowFactor: 1.3,\n connectionTimeout: 4000,\n maxRetries: Infinity,\n debug: false,\n}); };\nvar bypassProperty = function (src, dst, name) {\n Object.defineProperty(dst, name, {\n get: function () { return src[name]; },\n set: function (value) { src[name] = value; },\n enumerable: true,\n configurable: true,\n });\n};\nvar initReconnectionDelay = function (config) {\n return (config.minReconnectionDelay + Math.random() * config.minReconnectionDelay);\n};\nvar updateReconnectionDelay = function (config, previousDelay) {\n var newDelay = previousDelay * config.reconnectionDelayGrowFactor;\n return (newDelay > config.maxReconnectionDelay)\n ? config.maxReconnectionDelay\n : newDelay;\n};\nvar LEVEL_0_EVENTS = ['onopen', 'onclose', 'onmessage', 'onerror'];\nvar reassignEventListeners = function (ws, oldWs, listeners) {\n Object.keys(listeners).forEach(function (type) {\n listeners[type].forEach(function (_a) {\n var listener = _a[0], options = _a[1];\n ws.addEventListener(type, listener, options);\n });\n });\n if (oldWs) {\n LEVEL_0_EVENTS.forEach(function (name) {\n ws[name] = oldWs[name];\n });\n }\n};\nvar ReconnectingWebsocket = function (url, protocols, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n var ws;\n var connectingTimeout;\n var reconnectDelay = 0;\n var retriesCount = 0;\n var shouldRetry = true;\n var savedOnClose = null;\n var listeners = {};\n // require new to construct\n if (!(this instanceof ReconnectingWebsocket)) {\n throw new TypeError(\"Failed to construct 'ReconnectingWebSocket': Please use the 'new' operator\");\n }\n // Set config. Not using `Object.assign` because of IE11\n var config = getDefaultOptions();\n Object.keys(config)\n .filter(function (key) { return options.hasOwnProperty(key); })\n .forEach(function (key) { return config[key] = options[key]; });\n if (!isWebSocket(config.constructor)) {\n throw new TypeError('Invalid WebSocket constructor. Set `options.constructor`');\n }\n var log = config.debug ? function () {\n var params = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n params[_i] = arguments[_i];\n }\n return console.log.apply(console, ['RWS:'].concat(params));\n } : function () { };\n /**\n * Not using dispatchEvent, otherwise we must use a DOM Event object\n * Deferred because we want to handle the close event before this\n */\n var emitError = function (code, msg) { return setTimeout(function () {\n var err = new Error(msg);\n err.code = code;\n if (Array.isArray(listeners.error)) {\n listeners.error.forEach(function (_a) {\n var fn = _a[0];\n return fn(err);\n });\n }\n if (ws.onerror) {\n ws.onerror(err);\n }\n }, 0); };\n var handleClose = function () {\n log('handleClose', { shouldRetry: shouldRetry });\n retriesCount++;\n log('retries count:', retriesCount);\n if (retriesCount > config.maxRetries) {\n emitError('EHOSTDOWN', 'Too many failed connection attempts');\n return;\n }\n if (!reconnectDelay) {\n reconnectDelay = initReconnectionDelay(config);\n }\n else {\n reconnectDelay = updateReconnectionDelay(config, reconnectDelay);\n }\n log('handleClose - reconnectDelay:', reconnectDelay);\n if (shouldRetry) {\n setTimeout(connect, reconnectDelay);\n }\n };\n var connect = function () {\n if (!shouldRetry) {\n return;\n }\n log('connect');\n var oldWs = ws;\n var wsUrl = (typeof url === 'function') ? url() : url;\n ws = new config.constructor(wsUrl, protocols);\n connectingTimeout = setTimeout(function () {\n log('timeout');\n ws.close();\n emitError('ETIMEDOUT', 'Connection timeout');\n }, config.connectionTimeout);\n log('bypass properties');\n for (var key in ws) {\n // @todo move to constant\n if (['addEventListener', 'removeEventListener', 'close', 'send'].indexOf(key) < 0) {\n bypassProperty(ws, _this, key);\n }\n }\n ws.addEventListener('open', function () {\n clearTimeout(connectingTimeout);\n log('open');\n reconnectDelay = initReconnectionDelay(config);\n log('reconnectDelay:', reconnectDelay);\n retriesCount = 0;\n });\n ws.addEventListener('close', handleClose);\n reassignEventListeners(ws, oldWs, listeners);\n // because when closing with fastClose=true, it is saved and set to null to avoid double calls\n ws.onclose = ws.onclose || savedOnClose;\n savedOnClose = null;\n };\n log('init');\n connect();\n this.close = function (code, reason, _a) {\n if (code === void 0) { code = 1000; }\n if (reason === void 0) { reason = ''; }\n var _b = _a === void 0 ? {} : _a, _c = _b.keepClosed, keepClosed = _c === void 0 ? false : _c, _d = _b.fastClose, fastClose = _d === void 0 ? true : _d, _e = _b.delay, delay = _e === void 0 ? 0 : _e;\n log('close - params:', { reason: reason, keepClosed: keepClosed, fastClose: fastClose, delay: delay, retriesCount: retriesCount, maxRetries: config.maxRetries });\n shouldRetry = !keepClosed && retriesCount <= config.maxRetries;\n if (delay) {\n reconnectDelay = delay;\n }\n ws.close(code, reason);\n if (fastClose) {\n var fakeCloseEvent_1 = {\n code: code,\n reason: reason,\n wasClean: true,\n };\n // execute close listeners soon with a fake closeEvent\n // and remove them from the WS instance so they\n // don't get fired on the real close.\n handleClose();\n ws.removeEventListener('close', handleClose);\n // run and remove level2\n if (Array.isArray(listeners.close)) {\n listeners.close.forEach(function (_a) {\n var listener = _a[0], options = _a[1];\n listener(fakeCloseEvent_1);\n ws.removeEventListener('close', listener, options);\n });\n }\n // run and remove level0\n if (ws.onclose) {\n savedOnClose = ws.onclose;\n ws.onclose(fakeCloseEvent_1);\n ws.onclose = null;\n }\n }\n };\n this.send = function (data) {\n ws.send(data);\n };\n this.addEventListener = function (type, listener, options) {\n if (Array.isArray(listeners[type])) {\n if (!listeners[type].some(function (_a) {\n var l = _a[0];\n return l === listener;\n })) {\n listeners[type].push([listener, options]);\n }\n }\n else {\n listeners[type] = [[listener, options]];\n }\n ws.addEventListener(type, listener, options);\n };\n this.removeEventListener = function (type, listener, options) {\n if (Array.isArray(listeners[type])) {\n listeners[type] = listeners[type].filter(function (_a) {\n var l = _a[0];\n return l !== listener;\n });\n }\n ws.removeEventListener(type, listener, options);\n };\n};\nmodule.exports = ReconnectingWebsocket;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/reconnecting-websocket/dist/index.js\n// module id = 240\n// module chunks = 0","/*! *****************************************************************************\r\nCopyright (C) Microsoft. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\nvar Reflect;\r\n(function (Reflect) {\r\n // Metadata Proposal\r\n // https://rbuckton.github.io/reflect-metadata/\r\n (function (factory) {\r\n var root = typeof global === \"object\" ? global :\r\n typeof self === \"object\" ? self :\r\n typeof this === \"object\" ? this :\r\n Function(\"return this;\")();\r\n var exporter = makeExporter(Reflect);\r\n if (typeof root.Reflect === \"undefined\") {\r\n root.Reflect = Reflect;\r\n }\r\n else {\r\n exporter = makeExporter(root.Reflect, exporter);\r\n }\r\n factory(exporter);\r\n function makeExporter(target, previous) {\r\n return function (key, value) {\r\n if (typeof target[key] !== \"function\") {\r\n Object.defineProperty(target, key, { configurable: true, writable: true, value: value });\r\n }\r\n if (previous)\r\n previous(key, value);\r\n };\r\n }\r\n })(function (exporter) {\r\n var hasOwn = Object.prototype.hasOwnProperty;\r\n // feature test for Symbol support\r\n var supportsSymbol = typeof Symbol === \"function\";\r\n var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== \"undefined\" ? Symbol.toPrimitive : \"@@toPrimitive\";\r\n var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== \"undefined\" ? Symbol.iterator : \"@@iterator\";\r\n var supportsCreate = typeof Object.create === \"function\"; // feature test for Object.create support\r\n var supportsProto = { __proto__: [] } instanceof Array; // feature test for __proto__ support\r\n var downLevel = !supportsCreate && !supportsProto;\r\n var HashMap = {\r\n // create an object in dictionary mode (a.k.a. \"slow\" mode in v8)\r\n create: supportsCreate\r\n ? function () { return MakeDictionary(Object.create(null)); }\r\n : supportsProto\r\n ? function () { return MakeDictionary({ __proto__: null }); }\r\n : function () { return MakeDictionary({}); },\r\n has: downLevel\r\n ? function (map, key) { return hasOwn.call(map, key); }\r\n : function (map, key) { return key in map; },\r\n get: downLevel\r\n ? function (map, key) { return hasOwn.call(map, key) ? map[key] : undefined; }\r\n : function (map, key) { return map[key]; },\r\n };\r\n // Load global or shim versions of Map, Set, and WeakMap\r\n var functionPrototype = Object.getPrototypeOf(Function);\r\n var usePolyfill = typeof process === \"object\" && process.env && process.env[\"REFLECT_METADATA_USE_MAP_POLYFILL\"] === \"true\";\r\n var _Map = !usePolyfill && typeof Map === \"function\" && typeof Map.prototype.entries === \"function\" ? Map : CreateMapPolyfill();\r\n var _Set = !usePolyfill && typeof Set === \"function\" && typeof Set.prototype.entries === \"function\" ? Set : CreateSetPolyfill();\r\n var _WeakMap = !usePolyfill && typeof WeakMap === \"function\" ? WeakMap : CreateWeakMapPolyfill();\r\n // [[Metadata]] internal slot\r\n // https://rbuckton.github.io/reflect-metadata/#ordinary-object-internal-methods-and-internal-slots\r\n var Metadata = new _WeakMap();\r\n /**\r\n * Applies a set of decorators to a property of a target object.\r\n * @param decorators An array of decorators.\r\n * @param target The target object.\r\n * @param propertyKey (Optional) The property key to decorate.\r\n * @param attributes (Optional) The property descriptor for the target key.\r\n * @remarks Decorators are applied in reverse order.\r\n * @example\r\n *\r\n * class Example {\r\n * // property declarations are not part of ES6, though they are valid in TypeScript:\r\n * // static staticProperty;\r\n * // property;\r\n *\r\n * constructor(p) { }\r\n * static staticMethod(p) { }\r\n * method(p) { }\r\n * }\r\n *\r\n * // constructor\r\n * Example = Reflect.decorate(decoratorsArray, Example);\r\n *\r\n * // property (on constructor)\r\n * Reflect.decorate(decoratorsArray, Example, \"staticProperty\");\r\n *\r\n * // property (on prototype)\r\n * Reflect.decorate(decoratorsArray, Example.prototype, \"property\");\r\n *\r\n * // method (on constructor)\r\n * Object.defineProperty(Example, \"staticMethod\",\r\n * Reflect.decorate(decoratorsArray, Example, \"staticMethod\",\r\n * Object.getOwnPropertyDescriptor(Example, \"staticMethod\")));\r\n *\r\n * // method (on prototype)\r\n * Object.defineProperty(Example.prototype, \"method\",\r\n * Reflect.decorate(decoratorsArray, Example.prototype, \"method\",\r\n * Object.getOwnPropertyDescriptor(Example.prototype, \"method\")));\r\n *\r\n */\r\n function decorate(decorators, target, propertyKey, attributes) {\r\n if (!IsUndefined(propertyKey)) {\r\n if (!IsArray(decorators))\r\n throw new TypeError();\r\n if (!IsObject(target))\r\n throw new TypeError();\r\n if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes))\r\n throw new TypeError();\r\n if (IsNull(attributes))\r\n attributes = undefined;\r\n propertyKey = ToPropertyKey(propertyKey);\r\n return DecorateProperty(decorators, target, propertyKey, attributes);\r\n }\r\n else {\r\n if (!IsArray(decorators))\r\n throw new TypeError();\r\n if (!IsConstructor(target))\r\n throw new TypeError();\r\n return DecorateConstructor(decorators, target);\r\n }\r\n }\r\n exporter(\"decorate\", decorate);\r\n // 4.1.2 Reflect.metadata(metadataKey, metadataValue)\r\n // https://rbuckton.github.io/reflect-metadata/#reflect.metadata\r\n /**\r\n * A default metadata decorator factory that can be used on a class, class member, or parameter.\r\n * @param metadataKey The key for the metadata entry.\r\n * @param metadataValue The value for the metadata entry.\r\n * @returns A decorator function.\r\n * @remarks\r\n * If `metadataKey` is already defined for the target and target key, the\r\n * metadataValue for that key will be overwritten.\r\n * @example\r\n *\r\n * // constructor\r\n * @Reflect.metadata(key, value)\r\n * class Example {\r\n * }\r\n *\r\n * // property (on constructor, TypeScript only)\r\n * class Example {\r\n * @Reflect.metadata(key, value)\r\n * static staticProperty;\r\n * }\r\n *\r\n * // property (on prototype, TypeScript only)\r\n * class Example {\r\n * @Reflect.metadata(key, value)\r\n * property;\r\n * }\r\n *\r\n * // method (on constructor)\r\n * class Example {\r\n * @Reflect.metadata(key, value)\r\n * static staticMethod() { }\r\n * }\r\n *\r\n * // method (on prototype)\r\n * class Example {\r\n * @Reflect.metadata(key, value)\r\n * method() { }\r\n * }\r\n *\r\n */\r\n function metadata(metadataKey, metadataValue) {\r\n function decorator(target, propertyKey) {\r\n if (!IsObject(target))\r\n throw new TypeError();\r\n if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey))\r\n throw new TypeError();\r\n OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);\r\n }\r\n return decorator;\r\n }\r\n exporter(\"metadata\", metadata);\r\n /**\r\n * Define a unique metadata entry on the target.\r\n * @param metadataKey A key used to store and retrieve metadata.\r\n * @param metadataValue A value that contains attached metadata.\r\n * @param target The target object on which to define metadata.\r\n * @param propertyKey (Optional) The property key for the target.\r\n * @example\r\n *\r\n * class Example {\r\n * // property declarations are not part of ES6, though they are valid in TypeScript:\r\n * // static staticProperty;\r\n * // property;\r\n *\r\n * constructor(p) { }\r\n * static staticMethod(p) { }\r\n * method(p) { }\r\n * }\r\n *\r\n * // constructor\r\n * Reflect.defineMetadata(\"custom:annotation\", options, Example);\r\n *\r\n * // property (on constructor)\r\n * Reflect.defineMetadata(\"custom:annotation\", options, Example, \"staticProperty\");\r\n *\r\n * // property (on prototype)\r\n * Reflect.defineMetadata(\"custom:annotation\", options, Example.prototype, \"property\");\r\n *\r\n * // method (on constructor)\r\n * Reflect.defineMetadata(\"custom:annotation\", options, Example, \"staticMethod\");\r\n *\r\n * // method (on prototype)\r\n * Reflect.defineMetadata(\"custom:annotation\", options, Example.prototype, \"method\");\r\n *\r\n * // decorator factory as metadata-producing annotation.\r\n * function MyAnnotation(options): Decorator {\r\n * return (target, key?) => Reflect.defineMetadata(\"custom:annotation\", options, target, key);\r\n * }\r\n *\r\n */\r\n function defineMetadata(metadataKey, metadataValue, target, propertyKey) {\r\n if (!IsObject(target))\r\n throw new TypeError();\r\n if (!IsUndefined(propertyKey))\r\n propertyKey = ToPropertyKey(propertyKey);\r\n return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);\r\n }\r\n exporter(\"defineMetadata\", defineMetadata);\r\n /**\r\n * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.\r\n * @param metadataKey A key used to store and retrieve metadata.\r\n * @param target The target object on which the metadata is defined.\r\n * @param propertyKey (Optional) The property key for the target.\r\n * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.\r\n * @example\r\n *\r\n * class Example {\r\n * // property declarations are not part of ES6, though they are valid in TypeScript:\r\n * // static staticProperty;\r\n * // property;\r\n *\r\n * constructor(p) { }\r\n * static staticMethod(p) { }\r\n * method(p) { }\r\n * }\r\n *\r\n * // constructor\r\n * result = Reflect.hasMetadata(\"custom:annotation\", Example);\r\n *\r\n * // property (on constructor)\r\n * result = Reflect.hasMetadata(\"custom:annotation\", Example, \"staticProperty\");\r\n *\r\n * // property (on prototype)\r\n * result = Reflect.hasMetadata(\"custom:annotation\", Example.prototype, \"property\");\r\n *\r\n * // method (on constructor)\r\n * result = Reflect.hasMetadata(\"custom:annotation\", Example, \"staticMethod\");\r\n *\r\n * // method (on prototype)\r\n * result = Reflect.hasMetadata(\"custom:annotation\", Example.prototype, \"method\");\r\n *\r\n */\r\n function hasMetadata(metadataKey, target, propertyKey) {\r\n if (!IsObject(target))\r\n throw new TypeError();\r\n if (!IsUndefined(propertyKey))\r\n propertyKey = ToPropertyKey(propertyKey);\r\n return OrdinaryHasMetadata(metadataKey, target, propertyKey);\r\n }\r\n exporter(\"hasMetadata\", hasMetadata);\r\n /**\r\n * Gets a value indicating whether the target object has the provided metadata key defined.\r\n * @param metadataKey A key used to store and retrieve metadata.\r\n * @param target The target object on which the metadata is defined.\r\n * @param propertyKey (Optional) The property key for the target.\r\n * @returns `true` if the metadata key was defined on the target object; otherwise, `false`.\r\n * @example\r\n *\r\n * class Example {\r\n * // property declarations are not part of ES6, though they are valid in TypeScript:\r\n * // static staticProperty;\r\n * // property;\r\n *\r\n * constructor(p) { }\r\n * static staticMethod(p) { }\r\n * method(p) { }\r\n * }\r\n *\r\n * // constructor\r\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example);\r\n *\r\n * // property (on constructor)\r\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example, \"staticProperty\");\r\n *\r\n * // property (on prototype)\r\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example.prototype, \"property\");\r\n *\r\n * // method (on constructor)\r\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example, \"staticMethod\");\r\n *\r\n * // method (on prototype)\r\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example.prototype, \"method\");\r\n *\r\n */\r\n function hasOwnMetadata(metadataKey, target, propertyKey) {\r\n if (!IsObject(target))\r\n throw new TypeError();\r\n if (!IsUndefined(propertyKey))\r\n propertyKey = ToPropertyKey(propertyKey);\r\n return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);\r\n }\r\n exporter(\"hasOwnMetadata\", hasOwnMetadata);\r\n /**\r\n * Gets the metadata value for the provided metadata key on the target object or its prototype chain.\r\n * @param metadataKey A key used to store and retrieve metadata.\r\n * @param target The target object on which the metadata is defined.\r\n * @param propertyKey (Optional) The property key for the target.\r\n * @returns The metadata value for the metadata key if found; otherwise, `undefined`.\r\n * @example\r\n *\r\n * class Example {\r\n * // property declarations are not part of ES6, though they are valid in TypeScript:\r\n * // static staticProperty;\r\n * // property;\r\n *\r\n * constructor(p) { }\r\n * static staticMethod(p) { }\r\n * method(p) { }\r\n * }\r\n *\r\n * // constructor\r\n * result = Reflect.getMetadata(\"custom:annotation\", Example);\r\n *\r\n * // property (on constructor)\r\n * result = Reflect.getMetadata(\"custom:annotation\", Example, \"staticProperty\");\r\n *\r\n * // property (on prototype)\r\n * result = Reflect.getMetadata(\"custom:annotation\", Example.prototype, \"property\");\r\n *\r\n * // method (on constructor)\r\n * result = Reflect.getMetadata(\"custom:annotation\", Example, \"staticMethod\");\r\n *\r\n * // method (on prototype)\r\n * result = Reflect.getMetadata(\"custom:annotation\", Example.prototype, \"method\");\r\n *\r\n */\r\n function getMetadata(metadataKey, target, propertyKey) {\r\n if (!IsObject(target))\r\n throw new TypeError();\r\n if (!IsUndefined(propertyKey))\r\n propertyKey = ToPropertyKey(propertyKey);\r\n return OrdinaryGetMetadata(metadataKey, target, propertyKey);\r\n }\r\n exporter(\"getMetadata\", getMetadata);\r\n /**\r\n * Gets the metadata value for the provided metadata key on the target object.\r\n * @param metadataKey A key used to store and retrieve metadata.\r\n * @param target The target object on which the metadata is defined.\r\n * @param propertyKey (Optional) The property key for the target.\r\n * @returns The metadata value for the metadata key if found; otherwise, `undefined`.\r\n * @example\r\n *\r\n * class Example {\r\n * // property declarations are not part of ES6, though they are valid in TypeScript:\r\n * // static staticProperty;\r\n * // property;\r\n *\r\n * constructor(p) { }\r\n * static staticMethod(p) { }\r\n * method(p) { }\r\n * }\r\n *\r\n * // constructor\r\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example);\r\n *\r\n * // property (on constructor)\r\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example, \"staticProperty\");\r\n *\r\n * // property (on prototype)\r\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example.prototype, \"property\");\r\n *\r\n * // method (on constructor)\r\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example, \"staticMethod\");\r\n *\r\n * // method (on prototype)\r\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example.prototype, \"method\");\r\n *\r\n */\r\n function getOwnMetadata(metadataKey, target, propertyKey) {\r\n if (!IsObject(target))\r\n throw new TypeError();\r\n if (!IsUndefined(propertyKey))\r\n propertyKey = ToPropertyKey(propertyKey);\r\n return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);\r\n }\r\n exporter(\"getOwnMetadata\", getOwnMetadata);\r\n /**\r\n * Gets the metadata keys defined on the target object or its prototype chain.\r\n * @param target The target object on which the metadata is defined.\r\n * @param propertyKey (Optional) The property key for the target.\r\n * @returns An array of unique metadata keys.\r\n * @example\r\n *\r\n * class Example {\r\n * // property declarations are not part of ES6, though they are valid in TypeScript:\r\n * // static staticProperty;\r\n * // property;\r\n *\r\n * constructor(p) { }\r\n * static staticMethod(p) { }\r\n * method(p) { }\r\n * }\r\n *\r\n * // constructor\r\n * result = Reflect.getMetadataKeys(Example);\r\n *\r\n * // property (on constructor)\r\n * result = Reflect.getMetadataKeys(Example, \"staticProperty\");\r\n *\r\n * // property (on prototype)\r\n * result = Reflect.getMetadataKeys(Example.prototype, \"property\");\r\n *\r\n * // method (on constructor)\r\n * result = Reflect.getMetadataKeys(Example, \"staticMethod\");\r\n *\r\n * // method (on prototype)\r\n * result = Reflect.getMetadataKeys(Example.prototype, \"method\");\r\n *\r\n */\r\n function getMetadataKeys(target, propertyKey) {\r\n if (!IsObject(target))\r\n throw new TypeError();\r\n if (!IsUndefined(propertyKey))\r\n propertyKey = ToPropertyKey(propertyKey);\r\n return OrdinaryMetadataKeys(target, propertyKey);\r\n }\r\n exporter(\"getMetadataKeys\", getMetadataKeys);\r\n /**\r\n * Gets the unique metadata keys defined on the target object.\r\n * @param target The target object on which the metadata is defined.\r\n * @param propertyKey (Optional) The property key for the target.\r\n * @returns An array of unique metadata keys.\r\n * @example\r\n *\r\n * class Example {\r\n * // property declarations are not part of ES6, though they are valid in TypeScript:\r\n * // static staticProperty;\r\n * // property;\r\n *\r\n * constructor(p) { }\r\n * static staticMethod(p) { }\r\n * method(p) { }\r\n * }\r\n *\r\n * // constructor\r\n * result = Reflect.getOwnMetadataKeys(Example);\r\n *\r\n * // property (on constructor)\r\n * result = Reflect.getOwnMetadataKeys(Example, \"staticProperty\");\r\n *\r\n * // property (on prototype)\r\n * result = Reflect.getOwnMetadataKeys(Example.prototype, \"property\");\r\n *\r\n * // method (on constructor)\r\n * result = Reflect.getOwnMetadataKeys(Example, \"staticMethod\");\r\n *\r\n * // method (on prototype)\r\n * result = Reflect.getOwnMetadataKeys(Example.prototype, \"method\");\r\n *\r\n */\r\n function getOwnMetadataKeys(target, propertyKey) {\r\n if (!IsObject(target))\r\n throw new TypeError();\r\n if (!IsUndefined(propertyKey))\r\n propertyKey = ToPropertyKey(propertyKey);\r\n return OrdinaryOwnMetadataKeys(target, propertyKey);\r\n }\r\n exporter(\"getOwnMetadataKeys\", getOwnMetadataKeys);\r\n /**\r\n * Deletes the metadata entry from the target object with the provided key.\r\n * @param metadataKey A key used to store and retrieve metadata.\r\n * @param target The target object on which the metadata is defined.\r\n * @param propertyKey (Optional) The property key for the target.\r\n * @returns `true` if the metadata entry was found and deleted; otherwise, false.\r\n * @example\r\n *\r\n * class Example {\r\n * // property declarations are not part of ES6, though they are valid in TypeScript:\r\n * // static staticProperty;\r\n * // property;\r\n *\r\n * constructor(p) { }\r\n * static staticMethod(p) { }\r\n * method(p) { }\r\n * }\r\n *\r\n * // constructor\r\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example);\r\n *\r\n * // property (on constructor)\r\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example, \"staticProperty\");\r\n *\r\n * // property (on prototype)\r\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example.prototype, \"property\");\r\n *\r\n * // method (on constructor)\r\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example, \"staticMethod\");\r\n *\r\n * // method (on prototype)\r\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example.prototype, \"method\");\r\n *\r\n */\r\n function deleteMetadata(metadataKey, target, propertyKey) {\r\n if (!IsObject(target))\r\n throw new TypeError();\r\n if (!IsUndefined(propertyKey))\r\n propertyKey = ToPropertyKey(propertyKey);\r\n var metadataMap = GetOrCreateMetadataMap(target, propertyKey, /*Create*/ false);\r\n if (IsUndefined(metadataMap))\r\n return false;\r\n if (!metadataMap.delete(metadataKey))\r\n return false;\r\n if (metadataMap.size > 0)\r\n return true;\r\n var targetMetadata = Metadata.get(target);\r\n targetMetadata.delete(propertyKey);\r\n if (targetMetadata.size > 0)\r\n return true;\r\n Metadata.delete(target);\r\n return true;\r\n }\r\n exporter(\"deleteMetadata\", deleteMetadata);\r\n function DecorateConstructor(decorators, target) {\r\n for (var i = decorators.length - 1; i >= 0; --i) {\r\n var decorator = decorators[i];\r\n var decorated = decorator(target);\r\n if (!IsUndefined(decorated) && !IsNull(decorated)) {\r\n if (!IsConstructor(decorated))\r\n throw new TypeError();\r\n target = decorated;\r\n }\r\n }\r\n return target;\r\n }\r\n function DecorateProperty(decorators, target, propertyKey, descriptor) {\r\n for (var i = decorators.length - 1; i >= 0; --i) {\r\n var decorator = decorators[i];\r\n var decorated = decorator(target, propertyKey, descriptor);\r\n if (!IsUndefined(decorated) && !IsNull(decorated)) {\r\n if (!IsObject(decorated))\r\n throw new TypeError();\r\n descriptor = decorated;\r\n }\r\n }\r\n return descriptor;\r\n }\r\n function GetOrCreateMetadataMap(O, P, Create) {\r\n var targetMetadata = Metadata.get(O);\r\n if (IsUndefined(targetMetadata)) {\r\n if (!Create)\r\n return undefined;\r\n targetMetadata = new _Map();\r\n Metadata.set(O, targetMetadata);\r\n }\r\n var metadataMap = targetMetadata.get(P);\r\n if (IsUndefined(metadataMap)) {\r\n if (!Create)\r\n return undefined;\r\n metadataMap = new _Map();\r\n targetMetadata.set(P, metadataMap);\r\n }\r\n return metadataMap;\r\n }\r\n // 3.1.1.1 OrdinaryHasMetadata(MetadataKey, O, P)\r\n // https://rbuckton.github.io/reflect-metadata/#ordinaryhasmetadata\r\n function OrdinaryHasMetadata(MetadataKey, O, P) {\r\n var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P);\r\n if (hasOwn)\r\n return true;\r\n var parent = OrdinaryGetPrototypeOf(O);\r\n if (!IsNull(parent))\r\n return OrdinaryHasMetadata(MetadataKey, parent, P);\r\n return false;\r\n }\r\n // 3.1.2.1 OrdinaryHasOwnMetadata(MetadataKey, O, P)\r\n // https://rbuckton.github.io/reflect-metadata/#ordinaryhasownmetadata\r\n function OrdinaryHasOwnMetadata(MetadataKey, O, P) {\r\n var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);\r\n if (IsUndefined(metadataMap))\r\n return false;\r\n return ToBoolean(metadataMap.has(MetadataKey));\r\n }\r\n // 3.1.3.1 OrdinaryGetMetadata(MetadataKey, O, P)\r\n // https://rbuckton.github.io/reflect-metadata/#ordinarygetmetadata\r\n function OrdinaryGetMetadata(MetadataKey, O, P) {\r\n var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P);\r\n if (hasOwn)\r\n return OrdinaryGetOwnMetadata(MetadataKey, O, P);\r\n var parent = OrdinaryGetPrototypeOf(O);\r\n if (!IsNull(parent))\r\n return OrdinaryGetMetadata(MetadataKey, parent, P);\r\n return undefined;\r\n }\r\n // 3.1.4.1 OrdinaryGetOwnMetadata(MetadataKey, O, P)\r\n // https://rbuckton.github.io/reflect-metadata/#ordinarygetownmetadata\r\n function OrdinaryGetOwnMetadata(MetadataKey, O, P) {\r\n var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);\r\n if (IsUndefined(metadataMap))\r\n return undefined;\r\n return metadataMap.get(MetadataKey);\r\n }\r\n // 3.1.5.1 OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P)\r\n // https://rbuckton.github.io/reflect-metadata/#ordinarydefineownmetadata\r\n function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {\r\n var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ true);\r\n metadataMap.set(MetadataKey, MetadataValue);\r\n }\r\n // 3.1.6.1 OrdinaryMetadataKeys(O, P)\r\n // https://rbuckton.github.io/reflect-metadata/#ordinarymetadatakeys\r\n function OrdinaryMetadataKeys(O, P) {\r\n var ownKeys = OrdinaryOwnMetadataKeys(O, P);\r\n var parent = OrdinaryGetPrototypeOf(O);\r\n if (parent === null)\r\n return ownKeys;\r\n var parentKeys = OrdinaryMetadataKeys(parent, P);\r\n if (parentKeys.length <= 0)\r\n return ownKeys;\r\n if (ownKeys.length <= 0)\r\n return parentKeys;\r\n var set = new _Set();\r\n var keys = [];\r\n for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) {\r\n var key = ownKeys_1[_i];\r\n var hasKey = set.has(key);\r\n if (!hasKey) {\r\n set.add(key);\r\n keys.push(key);\r\n }\r\n }\r\n for (var _a = 0, parentKeys_1 = parentKeys; _a < parentKeys_1.length; _a++) {\r\n var key = parentKeys_1[_a];\r\n var hasKey = set.has(key);\r\n if (!hasKey) {\r\n set.add(key);\r\n keys.push(key);\r\n }\r\n }\r\n return keys;\r\n }\r\n // 3.1.7.1 OrdinaryOwnMetadataKeys(O, P)\r\n // https://rbuckton.github.io/reflect-metadata/#ordinaryownmetadatakeys\r\n function OrdinaryOwnMetadataKeys(O, P) {\r\n var keys = [];\r\n var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);\r\n if (IsUndefined(metadataMap))\r\n return keys;\r\n var keysObj = metadataMap.keys();\r\n var iterator = GetIterator(keysObj);\r\n var k = 0;\r\n while (true) {\r\n var next = IteratorStep(iterator);\r\n if (!next) {\r\n keys.length = k;\r\n return keys;\r\n }\r\n var nextValue = IteratorValue(next);\r\n try {\r\n keys[k] = nextValue;\r\n }\r\n catch (e) {\r\n try {\r\n IteratorClose(iterator);\r\n }\r\n finally {\r\n throw e;\r\n }\r\n }\r\n k++;\r\n }\r\n }\r\n // 6 ECMAScript Data Typ0es and Values\r\n // https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values\r\n function Type(x) {\r\n if (x === null)\r\n return 1 /* Null */;\r\n switch (typeof x) {\r\n case \"undefined\": return 0 /* Undefined */;\r\n case \"boolean\": return 2 /* Boolean */;\r\n case \"string\": return 3 /* String */;\r\n case \"symbol\": return 4 /* Symbol */;\r\n case \"number\": return 5 /* Number */;\r\n case \"object\": return x === null ? 1 /* Null */ : 6 /* Object */;\r\n default: return 6 /* Object */;\r\n }\r\n }\r\n // 6.1.1 The Undefined Type\r\n // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-undefined-type\r\n function IsUndefined(x) {\r\n return x === undefined;\r\n }\r\n // 6.1.2 The Null Type\r\n // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-null-type\r\n function IsNull(x) {\r\n return x === null;\r\n }\r\n // 6.1.5 The Symbol Type\r\n // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-symbol-type\r\n function IsSymbol(x) {\r\n return typeof x === \"symbol\";\r\n }\r\n // 6.1.7 The Object Type\r\n // https://tc39.github.io/ecma262/#sec-object-type\r\n function IsObject(x) {\r\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\r\n }\r\n // 7.1 Type Conversion\r\n // https://tc39.github.io/ecma262/#sec-type-conversion\r\n // 7.1.1 ToPrimitive(input [, PreferredType])\r\n // https://tc39.github.io/ecma262/#sec-toprimitive\r\n function ToPrimitive(input, PreferredType) {\r\n switch (Type(input)) {\r\n case 0 /* Undefined */: return input;\r\n case 1 /* Null */: return input;\r\n case 2 /* Boolean */: return input;\r\n case 3 /* String */: return input;\r\n case 4 /* Symbol */: return input;\r\n case 5 /* Number */: return input;\r\n }\r\n var hint = PreferredType === 3 /* String */ ? \"string\" : PreferredType === 5 /* Number */ ? \"number\" : \"default\";\r\n var exoticToPrim = GetMethod(input, toPrimitiveSymbol);\r\n if (exoticToPrim !== undefined) {\r\n var result = exoticToPrim.call(input, hint);\r\n if (IsObject(result))\r\n throw new TypeError();\r\n return result;\r\n }\r\n return OrdinaryToPrimitive(input, hint === \"default\" ? \"number\" : hint);\r\n }\r\n // 7.1.1.1 OrdinaryToPrimitive(O, hint)\r\n // https://tc39.github.io/ecma262/#sec-ordinarytoprimitive\r\n function OrdinaryToPrimitive(O, hint) {\r\n if (hint === \"string\") {\r\n var toString_1 = O.toString;\r\n if (IsCallable(toString_1)) {\r\n var result = toString_1.call(O);\r\n if (!IsObject(result))\r\n return result;\r\n }\r\n var valueOf = O.valueOf;\r\n if (IsCallable(valueOf)) {\r\n var result = valueOf.call(O);\r\n if (!IsObject(result))\r\n return result;\r\n }\r\n }\r\n else {\r\n var valueOf = O.valueOf;\r\n if (IsCallable(valueOf)) {\r\n var result = valueOf.call(O);\r\n if (!IsObject(result))\r\n return result;\r\n }\r\n var toString_2 = O.toString;\r\n if (IsCallable(toString_2)) {\r\n var result = toString_2.call(O);\r\n if (!IsObject(result))\r\n return result;\r\n }\r\n }\r\n throw new TypeError();\r\n }\r\n // 7.1.2 ToBoolean(argument)\r\n // https://tc39.github.io/ecma262/2016/#sec-toboolean\r\n function ToBoolean(argument) {\r\n return !!argument;\r\n }\r\n // 7.1.12 ToString(argument)\r\n // https://tc39.github.io/ecma262/#sec-tostring\r\n function ToString(argument) {\r\n return \"\" + argument;\r\n }\r\n // 7.1.14 ToPropertyKey(argument)\r\n // https://tc39.github.io/ecma262/#sec-topropertykey\r\n function ToPropertyKey(argument) {\r\n var key = ToPrimitive(argument, 3 /* String */);\r\n if (IsSymbol(key))\r\n return key;\r\n return ToString(key);\r\n }\r\n // 7.2 Testing and Comparison Operations\r\n // https://tc39.github.io/ecma262/#sec-testing-and-comparison-operations\r\n // 7.2.2 IsArray(argument)\r\n // https://tc39.github.io/ecma262/#sec-isarray\r\n function IsArray(argument) {\r\n return Array.isArray\r\n ? Array.isArray(argument)\r\n : argument instanceof Object\r\n ? argument instanceof Array\r\n : Object.prototype.toString.call(argument) === \"[object Array]\";\r\n }\r\n // 7.2.3 IsCallable(argument)\r\n // https://tc39.github.io/ecma262/#sec-iscallable\r\n function IsCallable(argument) {\r\n // NOTE: This is an approximation as we cannot check for [[Call]] internal method.\r\n return typeof argument === \"function\";\r\n }\r\n // 7.2.4 IsConstructor(argument)\r\n // https://tc39.github.io/ecma262/#sec-isconstructor\r\n function IsConstructor(argument) {\r\n // NOTE: This is an approximation as we cannot check for [[Construct]] internal method.\r\n return typeof argument === \"function\";\r\n }\r\n // 7.2.7 IsPropertyKey(argument)\r\n // https://tc39.github.io/ecma262/#sec-ispropertykey\r\n function IsPropertyKey(argument) {\r\n switch (Type(argument)) {\r\n case 3 /* String */: return true;\r\n case 4 /* Symbol */: return true;\r\n default: return false;\r\n }\r\n }\r\n // 7.3 Operations on Objects\r\n // https://tc39.github.io/ecma262/#sec-operations-on-objects\r\n // 7.3.9 GetMethod(V, P)\r\n // https://tc39.github.io/ecma262/#sec-getmethod\r\n function GetMethod(V, P) {\r\n var func = V[P];\r\n if (func === undefined || func === null)\r\n return undefined;\r\n if (!IsCallable(func))\r\n throw new TypeError();\r\n return func;\r\n }\r\n // 7.4 Operations on Iterator Objects\r\n // https://tc39.github.io/ecma262/#sec-operations-on-iterator-objects\r\n function GetIterator(obj) {\r\n var method = GetMethod(obj, iteratorSymbol);\r\n if (!IsCallable(method))\r\n throw new TypeError(); // from Call\r\n var iterator = method.call(obj);\r\n if (!IsObject(iterator))\r\n throw new TypeError();\r\n return iterator;\r\n }\r\n // 7.4.4 IteratorValue(iterResult)\r\n // https://tc39.github.io/ecma262/2016/#sec-iteratorvalue\r\n function IteratorValue(iterResult) {\r\n return iterResult.value;\r\n }\r\n // 7.4.5 IteratorStep(iterator)\r\n // https://tc39.github.io/ecma262/#sec-iteratorstep\r\n function IteratorStep(iterator) {\r\n var result = iterator.next();\r\n return result.done ? false : result;\r\n }\r\n // 7.4.6 IteratorClose(iterator, completion)\r\n // https://tc39.github.io/ecma262/#sec-iteratorclose\r\n function IteratorClose(iterator) {\r\n var f = iterator[\"return\"];\r\n if (f)\r\n f.call(iterator);\r\n }\r\n // 9.1 Ordinary Object Internal Methods and Internal Slots\r\n // https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots\r\n // 9.1.1.1 OrdinaryGetPrototypeOf(O)\r\n // https://tc39.github.io/ecma262/#sec-ordinarygetprototypeof\r\n function OrdinaryGetPrototypeOf(O) {\r\n var proto = Object.getPrototypeOf(O);\r\n if (typeof O !== \"function\" || O === functionPrototype)\r\n return proto;\r\n // TypeScript doesn't set __proto__ in ES5, as it's non-standard.\r\n // Try to determine the superclass constructor. Compatible implementations\r\n // must either set __proto__ on a subclass constructor to the superclass constructor,\r\n // or ensure each class has a valid `constructor` property on its prototype that\r\n // points back to the constructor.\r\n // If this is not the same as Function.[[Prototype]], then this is definately inherited.\r\n // This is the case when in ES6 or when using __proto__ in a compatible browser.\r\n if (proto !== functionPrototype)\r\n return proto;\r\n // If the super prototype is Object.prototype, null, or undefined, then we cannot determine the heritage.\r\n var prototype = O.prototype;\r\n var prototypeProto = prototype && Object.getPrototypeOf(prototype);\r\n if (prototypeProto == null || prototypeProto === Object.prototype)\r\n return proto;\r\n // If the constructor was not a function, then we cannot determine the heritage.\r\n var constructor = prototypeProto.constructor;\r\n if (typeof constructor !== \"function\")\r\n return proto;\r\n // If we have some kind of self-reference, then we cannot determine the heritage.\r\n if (constructor === O)\r\n return proto;\r\n // we have a pretty good guess at the heritage.\r\n return constructor;\r\n }\r\n // naive Map shim\r\n function CreateMapPolyfill() {\r\n var cacheSentinel = {};\r\n var arraySentinel = [];\r\n var MapIterator = (function () {\r\n function MapIterator(keys, values, selector) {\r\n this._index = 0;\r\n this._keys = keys;\r\n this._values = values;\r\n this._selector = selector;\r\n }\r\n MapIterator.prototype[\"@@iterator\"] = function () { return this; };\r\n MapIterator.prototype[iteratorSymbol] = function () { return this; };\r\n MapIterator.prototype.next = function () {\r\n var index = this._index;\r\n if (index >= 0 && index < this._keys.length) {\r\n var result = this._selector(this._keys[index], this._values[index]);\r\n if (index + 1 >= this._keys.length) {\r\n this._index = -1;\r\n this._keys = arraySentinel;\r\n this._values = arraySentinel;\r\n }\r\n else {\r\n this._index++;\r\n }\r\n return { value: result, done: false };\r\n }\r\n return { value: undefined, done: true };\r\n };\r\n MapIterator.prototype.throw = function (error) {\r\n if (this._index >= 0) {\r\n this._index = -1;\r\n this._keys = arraySentinel;\r\n this._values = arraySentinel;\r\n }\r\n throw error;\r\n };\r\n MapIterator.prototype.return = function (value) {\r\n if (this._index >= 0) {\r\n this._index = -1;\r\n this._keys = arraySentinel;\r\n this._values = arraySentinel;\r\n }\r\n return { value: value, done: true };\r\n };\r\n return MapIterator;\r\n }());\r\n return (function () {\r\n function Map() {\r\n this._keys = [];\r\n this._values = [];\r\n this._cacheKey = cacheSentinel;\r\n this._cacheIndex = -2;\r\n }\r\n Object.defineProperty(Map.prototype, \"size\", {\r\n get: function () { return this._keys.length; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Map.prototype.has = function (key) { return this._find(key, /*insert*/ false) >= 0; };\r\n Map.prototype.get = function (key) {\r\n var index = this._find(key, /*insert*/ false);\r\n return index >= 0 ? this._values[index] : undefined;\r\n };\r\n Map.prototype.set = function (key, value) {\r\n var index = this._find(key, /*insert*/ true);\r\n this._values[index] = value;\r\n return this;\r\n };\r\n Map.prototype.delete = function (key) {\r\n var index = this._find(key, /*insert*/ false);\r\n if (index >= 0) {\r\n var size = this._keys.length;\r\n for (var i = index + 1; i < size; i++) {\r\n this._keys[i - 1] = this._keys[i];\r\n this._values[i - 1] = this._values[i];\r\n }\r\n this._keys.length--;\r\n this._values.length--;\r\n if (key === this._cacheKey) {\r\n this._cacheKey = cacheSentinel;\r\n this._cacheIndex = -2;\r\n }\r\n return true;\r\n }\r\n return false;\r\n };\r\n Map.prototype.clear = function () {\r\n this._keys.length = 0;\r\n this._values.length = 0;\r\n this._cacheKey = cacheSentinel;\r\n this._cacheIndex = -2;\r\n };\r\n Map.prototype.keys = function () { return new MapIterator(this._keys, this._values, getKey); };\r\n Map.prototype.values = function () { return new MapIterator(this._keys, this._values, getValue); };\r\n Map.prototype.entries = function () { return new MapIterator(this._keys, this._values, getEntry); };\r\n Map.prototype[\"@@iterator\"] = function () { return this.entries(); };\r\n Map.prototype[iteratorSymbol] = function () { return this.entries(); };\r\n Map.prototype._find = function (key, insert) {\r\n if (this._cacheKey !== key) {\r\n this._cacheIndex = this._keys.indexOf(this._cacheKey = key);\r\n }\r\n if (this._cacheIndex < 0 && insert) {\r\n this._cacheIndex = this._keys.length;\r\n this._keys.push(key);\r\n this._values.push(undefined);\r\n }\r\n return this._cacheIndex;\r\n };\r\n return Map;\r\n }());\r\n function getKey(key, _) {\r\n return key;\r\n }\r\n function getValue(_, value) {\r\n return value;\r\n }\r\n function getEntry(key, value) {\r\n return [key, value];\r\n }\r\n }\r\n // naive Set shim\r\n function CreateSetPolyfill() {\r\n return (function () {\r\n function Set() {\r\n this._map = new _Map();\r\n }\r\n Object.defineProperty(Set.prototype, \"size\", {\r\n get: function () { return this._map.size; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Set.prototype.has = function (value) { return this._map.has(value); };\r\n Set.prototype.add = function (value) { return this._map.set(value, value), this; };\r\n Set.prototype.delete = function (value) { return this._map.delete(value); };\r\n Set.prototype.clear = function () { this._map.clear(); };\r\n Set.prototype.keys = function () { return this._map.keys(); };\r\n Set.prototype.values = function () { return this._map.values(); };\r\n Set.prototype.entries = function () { return this._map.entries(); };\r\n Set.prototype[\"@@iterator\"] = function () { return this.keys(); };\r\n Set.prototype[iteratorSymbol] = function () { return this.keys(); };\r\n return Set;\r\n }());\r\n }\r\n // naive WeakMap shim\r\n function CreateWeakMapPolyfill() {\r\n var UUID_SIZE = 16;\r\n var keys = HashMap.create();\r\n var rootKey = CreateUniqueKey();\r\n return (function () {\r\n function WeakMap() {\r\n this._key = CreateUniqueKey();\r\n }\r\n WeakMap.prototype.has = function (target) {\r\n var table = GetOrCreateWeakMapTable(target, /*create*/ false);\r\n return table !== undefined ? HashMap.has(table, this._key) : false;\r\n };\r\n WeakMap.prototype.get = function (target) {\r\n var table = GetOrCreateWeakMapTable(target, /*create*/ false);\r\n return table !== undefined ? HashMap.get(table, this._key) : undefined;\r\n };\r\n WeakMap.prototype.set = function (target, value) {\r\n var table = GetOrCreateWeakMapTable(target, /*create*/ true);\r\n table[this._key] = value;\r\n return this;\r\n };\r\n WeakMap.prototype.delete = function (target) {\r\n var table = GetOrCreateWeakMapTable(target, /*create*/ false);\r\n return table !== undefined ? delete table[this._key] : false;\r\n };\r\n WeakMap.prototype.clear = function () {\r\n // NOTE: not a real clear, just makes the previous data unreachable\r\n this._key = CreateUniqueKey();\r\n };\r\n return WeakMap;\r\n }());\r\n function CreateUniqueKey() {\r\n var key;\r\n do\r\n key = \"@@WeakMap@@\" + CreateUUID();\r\n while (HashMap.has(keys, key));\r\n keys[key] = true;\r\n return key;\r\n }\r\n function GetOrCreateWeakMapTable(target, create) {\r\n if (!hasOwn.call(target, rootKey)) {\r\n if (!create)\r\n return undefined;\r\n Object.defineProperty(target, rootKey, { value: HashMap.create() });\r\n }\r\n return target[rootKey];\r\n }\r\n function FillRandomBytes(buffer, size) {\r\n for (var i = 0; i < size; ++i)\r\n buffer[i] = Math.random() * 0xff | 0;\r\n return buffer;\r\n }\r\n function GenRandomBytes(size) {\r\n if (typeof Uint8Array === \"function\") {\r\n if (typeof crypto !== \"undefined\")\r\n return crypto.getRandomValues(new Uint8Array(size));\r\n if (typeof msCrypto !== \"undefined\")\r\n return msCrypto.getRandomValues(new Uint8Array(size));\r\n return FillRandomBytes(new Uint8Array(size), size);\r\n }\r\n return FillRandomBytes(new Array(size), size);\r\n }\r\n function CreateUUID() {\r\n var data = GenRandomBytes(UUID_SIZE);\r\n // mark as random - RFC 4122 § 4.4\r\n data[6] = data[6] & 0x4f | 0x40;\r\n data[8] = data[8] & 0xbf | 0x80;\r\n var result = \"\";\r\n for (var offset = 0; offset < UUID_SIZE; ++offset) {\r\n var byte = data[offset];\r\n if (offset === 4 || offset === 6 || offset === 8)\r\n result += \"-\";\r\n if (byte < 16)\r\n result += \"0\";\r\n result += byte.toString(16).toLowerCase();\r\n }\r\n return result;\r\n }\r\n }\r\n // uses a heuristic used by v8 and chakra to force an object into dictionary mode.\r\n function MakeDictionary(obj) {\r\n obj.__ = undefined;\r\n delete obj.__;\r\n return obj;\r\n }\r\n });\r\n})(Reflect || (Reflect = {}));\r\n//# sourceMappingURL=Reflect.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/reflect-metadata/Reflect.js\n// module id = 241\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function (html) {\n var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n\n var context = options.context || document;\n\n // If there's nothing here, return null;\n if (!html) {\n return null;\n }\n\n // Maintain a list of created vnodes so we can call the create hook.\n var createdVNodes = [];\n\n // Parse the string into the AST and convert to VNodes.\n var vnodes = convertNodes((0, _parse2.default)(html), createdVNodes, context);\n\n var res = void 0;\n if (!vnodes) {\n // If there are no vnodes but there is string content, then the string\n // must be just text or at least invalid HTML that we should treat as\n // text (since the AST parser didn't find any well-formed HTML).\n res = toVNode({ type: 'text', content: html }, createdVNodes, context);\n } else if (vnodes.length === 1) {\n // If there's only one root node, just return it as opposed to an array.\n res = vnodes[0];\n } else {\n // Otherwise we have an array of VNodes, which we should return.\n res = vnodes;\n }\n\n // Call the 'create' hook for each created node.\n options.hooks && options.hooks.create && createdVNodes.forEach(function (node) {\n options.hooks.create(node);\n });\n return res;\n};\n\nvar _parse = require('html-parse-stringify2/lib/parse');\n\nvar _parse2 = _interopRequireDefault(_parse);\n\nvar _h = require('snabbdom/h');\n\nvar _h2 = _interopRequireDefault(_h);\n\nvar _utils = require('./utils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction convertNodes(nodes, createdVNodes, context) {\n if (nodes instanceof Array && nodes.length > 0) {\n return nodes.map(function (node) {\n return toVNode(node, createdVNodes, context);\n });\n } else {\n return undefined;\n }\n}\n\nfunction toVNode(node, createdVNodes, context) {\n var newNode = void 0;\n if (node.type === 'text') {\n newNode = (0, _utils.createTextVNode)(node.content, context);\n } else {\n newNode = (0, _h2.default)(node.name, buildVNodeData(node, context), convertNodes(node.children, createdVNodes, context));\n }\n createdVNodes.push(newNode);\n return newNode;\n}\n\nfunction buildVNodeData(node, context) {\n var data = {};\n if (!node.attrs) {\n return data;\n }\n\n var attrs = Object.keys(node.attrs).reduce(function (memo, name) {\n if (name !== 'style' && name !== 'class') {\n var val = (0, _utils.unescapeEntities)(node.attrs[name], context);\n memo ? memo[name] = val : memo = _defineProperty({}, name, val);\n }\n return memo;\n }, null);\n if (attrs) {\n data.attrs = attrs;\n }\n\n var style = parseStyle(node);\n if (style) {\n data.style = style;\n }\n\n var classes = parseClass(node);\n if (classes) {\n data.class = classes;\n }\n\n return data;\n}\n\nfunction parseStyle(node) {\n try {\n return node.attrs.style.split(';').reduce(function (memo, styleProp) {\n var res = styleProp.split(':');\n var name = (0, _utils.transformName)(res[0].trim());\n if (name) {\n var val = res[1].replace('!important', '').trim();\n memo ? memo[name] = val : memo = _defineProperty({}, name, val);\n }\n return memo;\n }, null);\n } catch (e) {\n return null;\n }\n}\n\nfunction parseClass(node) {\n try {\n return node.attrs.class.split(' ').reduce(function (memo, className) {\n className = className.trim();\n if (className) {\n memo ? memo[className] = true : memo = _defineProperty({}, className, true);\n }\n return memo;\n }, null);\n } catch (e) {\n return null;\n }\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/snabbdom-virtualize/lib/strings.js\n// module id = 242\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createTextVNode = createTextVNode;\nexports.transformName = transformName;\nexports.unescapeEntities = unescapeEntities;\n\nvar _vnode = require('snabbdom/vnode');\n\nvar _vnode2 = _interopRequireDefault(_vnode);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction createTextVNode(text, context) {\n return (0, _vnode2.default)(undefined, undefined, undefined, unescapeEntities(text, context));\n}\n\nfunction transformName(name) {\n // Replace -a with A to help camel case style property names.\n name = name.replace(/-(\\w)/g, function _replace($1, $2) {\n return $2.toUpperCase();\n });\n // Handle properties that start with a -.\n var firstChar = name.charAt(0).toLowerCase();\n return '' + firstChar + name.substring(1);\n}\n\n// Regex for matching HTML entities.\nvar entityRegex = new RegExp('&[a-z0-9#]+;', 'gi');\n// Element for setting innerHTML for transforming entities.\nvar el = null;\n\nfunction unescapeEntities(text, context) {\n // Create the element using the context if it doesn't exist.\n if (!el) {\n el = context.createElement('div');\n }\n return text.replace(entityRegex, function (entity) {\n el.innerHTML = entity;\n return el.textContent;\n });\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/snabbdom-virtualize/lib/utils.js\n// module id = 243\n// module chunks = 0","module.exports = require('./lib/strings');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/snabbdom-virtualize/strings.js\n// module id = 244\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar vnode_1 = require(\"./vnode\");\nvar is = require(\"./is\");\nfunction addNS(data, children, sel) {\n data.ns = 'http://www.w3.org/2000/svg';\n if (sel !== 'foreignObject' && children !== undefined) {\n for (var i = 0; i < children.length; ++i) {\n var childData = children[i].data;\n if (childData !== undefined) {\n addNS(childData, children[i].children, children[i].sel);\n }\n }\n }\n}\nfunction h(sel, b, c) {\n var data = {}, children, text, i;\n if (c !== undefined) {\n data = b;\n if (is.array(c)) {\n children = c;\n }\n else if (is.primitive(c)) {\n text = c;\n }\n else if (c && c.sel) {\n children = [c];\n }\n }\n else if (b !== undefined) {\n if (is.array(b)) {\n children = b;\n }\n else if (is.primitive(b)) {\n text = b;\n }\n else if (b && b.sel) {\n children = [b];\n }\n else {\n data = b;\n }\n }\n if (is.array(children)) {\n for (i = 0; i < children.length; ++i) {\n if (is.primitive(children[i]))\n children[i] = vnode_1.vnode(undefined, undefined, undefined, children[i], undefined);\n }\n }\n if (sel[0] === 's' && sel[1] === 'v' && sel[2] === 'g' &&\n (sel.length === 3 || sel[3] === '.' || sel[3] === '#')) {\n addNS(data, children, sel);\n }\n return vnode_1.vnode(sel, data, children, text, undefined);\n}\nexports.h = h;\n;\nexports.default = h;\n//# sourceMappingURL=h.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/snabbdom/h.js\n// module id = 245\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.array = Array.isArray;\nfunction primitive(s) {\n return typeof s === 'string' || typeof s === 'number';\n}\nexports.primitive = primitive;\n//# sourceMappingURL=is.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/snabbdom/is.js\n// module id = 246\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar types_1 = require(\"../types\");\nfunction overrideCommandStackOptions(container, options) {\n var defaultOptions = container.get(types_1.TYPES.CommandStackOptions);\n for (var p in options) {\n defaultOptions[p] = options[p];\n }\n return defaultOptions;\n}\nexports.overrideCommandStackOptions = overrideCommandStackOptions;\n//# sourceMappingURL=command-stack-options.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/commands/command-stack-options.js\n// module id = 247\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar smodel_storage_1 = require(\"./model/smodel-storage\");\nvar types_1 = require(\"./types\");\nvar initialize_canvas_1 = require(\"./features/initialize-canvas\");\nvar logging_1 = require(\"../utils/logging\");\nvar action_dispatcher_1 = require(\"./actions/action-dispatcher\");\nvar action_handler_1 = require(\"./actions/action-handler\");\nvar command_stack_1 = require(\"./commands/command-stack\");\nvar smodel_factory_1 = require(\"./model/smodel-factory\");\nvar animation_frame_syncer_1 = require(\"./animations/animation-frame-syncer\");\nvar viewer_1 = require(\"./views/viewer\");\nvar mouse_tool_1 = require(\"./views/mouse-tool\");\nvar key_tool_1 = require(\"./views/key-tool\");\nvar vnode_decorators_1 = require(\"./views/vnode-decorators\");\nvar view_1 = require(\"./views/view\");\nvar viewer_cache_1 = require(\"./views/viewer-cache\");\nvar dom_helper_1 = require(\"./views/dom-helper\");\nvar id_decorator_1 = require(\"./views/id-decorator\");\nvar command_1 = require(\"./commands/command\");\nvar defaultContainerModule = new inversify_1.ContainerModule(function (bind) {\n // Logging ---------------------------------------------\n bind(types_1.TYPES.ILogger).to(logging_1.NullLogger).inSingletonScope();\n bind(types_1.TYPES.LogLevel).toConstantValue(logging_1.LogLevel.warn);\n // Registries ---------------------------------------------\n bind(types_1.TYPES.ActionHandlerRegistry).to(action_handler_1.ActionHandlerRegistry).inSingletonScope();\n bind(types_1.TYPES.ViewRegistry).to(view_1.ViewRegistry).inSingletonScope();\n // Model Creation ---------------------------------------------\n bind(types_1.TYPES.IModelFactory).to(smodel_factory_1.SModelFactory).inSingletonScope();\n // Action Dispatcher ---------------------------------------------\n bind(types_1.TYPES.IActionDispatcher).to(action_dispatcher_1.ActionDispatcher).inSingletonScope();\n bind(types_1.TYPES.IActionDispatcherProvider).toProvider(function (context) {\n return function () {\n return new Promise(function (resolve) {\n resolve(context.container.get(types_1.TYPES.IActionDispatcher));\n });\n };\n });\n // Action handler\n bind(types_1.TYPES.IActionHandlerInitializer).to(command_1.CommandActionHandlerInitializer);\n // Command Stack ---------------------------------------------\n bind(types_1.TYPES.ICommandStack).to(command_stack_1.CommandStack).inSingletonScope();\n bind(types_1.TYPES.ICommandStackProvider).toProvider(function (context) {\n return function () {\n return new Promise(function (resolve) {\n resolve(context.container.get(types_1.TYPES.ICommandStack));\n });\n };\n });\n bind(types_1.TYPES.CommandStackOptions).toConstantValue({\n defaultDuration: 250,\n undoHistoryLimit: 50\n });\n // Viewer ---------------------------------------------\n bind(viewer_1.Viewer).toSelf().inSingletonScope();\n bind(types_1.TYPES.IViewer).toDynamicValue(function (context) {\n return context.container.get(viewer_1.Viewer);\n }).inSingletonScope().whenTargetNamed('delegate');\n bind(viewer_cache_1.ViewerCache).toSelf().inSingletonScope();\n bind(types_1.TYPES.IViewer).toDynamicValue(function (context) {\n return context.container.get(viewer_cache_1.ViewerCache);\n }).inSingletonScope().whenTargetIsDefault();\n bind(types_1.TYPES.IViewerProvider).toProvider(function (context) {\n return function () {\n return new Promise(function (resolve) {\n resolve(context.container.get(types_1.TYPES.IViewer));\n });\n };\n });\n bind(types_1.TYPES.ViewerOptions).toConstantValue({\n baseDiv: 'sprotty',\n baseClass: 'sprotty',\n hiddenDiv: 'sprotty-hidden',\n hiddenClass: 'sprotty-hidden',\n popupDiv: 'sprotty-popup',\n popupClass: 'sprotty-popup',\n popupClosedClass: 'sprotty-popup-closed',\n needsClientLayout: true,\n needsServerLayout: false,\n popupOpenDelay: 700,\n popupCloseDelay: 300\n });\n bind(types_1.TYPES.DOMHelper).to(dom_helper_1.DOMHelper).inSingletonScope();\n bind(types_1.TYPES.ModelRendererFactory).toFactory(function (context) {\n return function (decorators) {\n var viewRegistry = context.container.get(types_1.TYPES.ViewRegistry);\n return new viewer_1.ModelRenderer(viewRegistry, decorators);\n };\n });\n // Tools & Decorators --------------------------------------\n bind(id_decorator_1.IdDecorator).toSelf().inSingletonScope();\n bind(types_1.TYPES.IVNodeDecorator).toDynamicValue(function (context) {\n return context.container.get(id_decorator_1.IdDecorator);\n }).inSingletonScope();\n bind(mouse_tool_1.MouseTool).toSelf().inSingletonScope();\n bind(types_1.TYPES.IVNodeDecorator).toDynamicValue(function (context) {\n return context.container.get(mouse_tool_1.MouseTool);\n }).inSingletonScope();\n bind(key_tool_1.KeyTool).toSelf().inSingletonScope();\n bind(types_1.TYPES.IVNodeDecorator).toDynamicValue(function (context) {\n return context.container.get(key_tool_1.KeyTool);\n }).inSingletonScope();\n bind(vnode_decorators_1.FocusFixDecorator).toSelf().inSingletonScope();\n bind(types_1.TYPES.IVNodeDecorator).toDynamicValue(function (context) {\n return context.container.get(vnode_decorators_1.FocusFixDecorator);\n }).inSingletonScope();\n bind(types_1.TYPES.PopupVNodeDecorator).toDynamicValue(function (context) {\n return context.container.get(id_decorator_1.IdDecorator);\n }).inSingletonScope();\n bind(mouse_tool_1.PopupMouseTool).toSelf().inSingletonScope();\n bind(types_1.TYPES.PopupVNodeDecorator).toDynamicValue(function (context) {\n return context.container.get(mouse_tool_1.PopupMouseTool);\n }).inSingletonScope();\n bind(types_1.TYPES.HiddenVNodeDecorator).toDynamicValue(function (context) {\n return context.container.get(id_decorator_1.IdDecorator);\n }).inSingletonScope();\n // Animation Frame Sync ------------------------------------------\n bind(types_1.TYPES.AnimationFrameSyncer).to(animation_frame_syncer_1.AnimationFrameSyncer).inSingletonScope();\n // Canvas Initialization ---------------------------------------------\n bind(types_1.TYPES.ICommand).toConstructor(initialize_canvas_1.InitializeCanvasBoundsCommand);\n bind(initialize_canvas_1.CanvasBoundsInitializer).toSelf().inSingletonScope();\n bind(types_1.TYPES.IVNodeDecorator).toDynamicValue(function (context) {\n return context.container.get(initialize_canvas_1.CanvasBoundsInitializer);\n }).inSingletonScope();\n bind(types_1.TYPES.SModelStorage).to(smodel_storage_1.SModelStorage).inSingletonScope();\n});\nexports.default = defaultContainerModule;\n//# sourceMappingURL=di.config.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/di.config.js\n// module id = 248\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../types\");\nvar dom_helper_1 = require(\"./dom-helper\");\nvar vnode_utils_1 = require(\"./vnode-utils\");\nvar IdDecorator = /** @class */ (function () {\n function IdDecorator(logger, domHelper) {\n this.logger = logger;\n this.domHelper = domHelper;\n }\n IdDecorator.prototype.decorate = function (vnode, element) {\n var attrs = vnode_utils_1.getAttrs(vnode);\n if (attrs.id !== undefined)\n this.logger.warn(vnode, 'Overriding id of vnode (' + attrs.id + '). Make sure not to set it manually in view.');\n attrs.id = this.domHelper.createUniqueDOMElementId(element);\n if (!vnode.key)\n vnode.key = element.id;\n return vnode;\n };\n IdDecorator.prototype.postUpdate = function () {\n };\n IdDecorator = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.ILogger)),\n __param(1, inversify_1.inject(types_1.TYPES.DOMHelper)),\n __metadata(\"design:paramtypes\", [Object, dom_helper_1.DOMHelper])\n ], IdDecorator);\n return IdDecorator;\n}());\nexports.IdDecorator = IdDecorator;\n//# sourceMappingURL=id-decorator.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/views/id-decorator.js\n// module id = 249\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar types_1 = require(\"../types\");\nfunction overrideViewerOptions(container, options) {\n var defaultOptions = container.get(types_1.TYPES.ViewerOptions);\n for (var p in options) {\n defaultOptions[p] = options[p];\n }\n return defaultOptions;\n}\nexports.overrideViewerOptions = overrideViewerOptions;\n//# sourceMappingURL=viewer-options.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/base/views/viewer-options.js\n// module id = 250\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../../base/types\");\nvar bounds_manipulation_1 = require(\"./bounds-manipulation\");\nvar hidden_bounds_updater_1 = require(\"./hidden-bounds-updater\");\nvar layout_1 = require(\"./layout\");\nvar boundsModule = new inversify_1.ContainerModule(function (bind) {\n bind(types_1.TYPES.ICommand).toConstructor(bounds_manipulation_1.SetBoundsCommand);\n bind(types_1.TYPES.ICommand).toConstructor(bounds_manipulation_1.RequestBoundsCommand);\n bind(types_1.TYPES.HiddenVNodeDecorator).to(hidden_bounds_updater_1.HiddenBoundsUpdater).inSingletonScope();\n bind(types_1.TYPES.Layouter).to(layout_1.Layouter).inSingletonScope();\n bind(types_1.TYPES.LayoutRegistry).to(layout_1.LayoutRegistry).inSingletonScope();\n});\nexports.default = boundsModule;\n//# sourceMappingURL=di.config.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/bounds/di.config.js\n// module id = 251\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../../base/types\");\nvar geometry_1 = require(\"../../utils/geometry\");\nvar smodel_1 = require(\"../../base/model/smodel\");\nvar bounds_manipulation_1 = require(\"./bounds-manipulation\");\nvar model_1 = require(\"./model\");\nvar layout_1 = require(\"./layout\");\nvar model_2 = require(\"../export/model\");\nvar BoundsData = /** @class */ (function () {\n function BoundsData() {\n }\n return BoundsData;\n}());\nexports.BoundsData = BoundsData;\n/**\n * Grabs the bounds from hidden SVG DOM elements, applies layouts and fires\n * ComputedBoundsActions.\n *\n * The actual bounds of an element can usually not be determined from the SModel\n * as they depend on the view implementation and CSS stylings. So the best way is\n * to grab them from a live (but hidden) SVG using getBBox().\n *\n * If an element is Alignable, and the top-left corner of its bounding box is not\n * the origin, we also issue a realign with the ComputedBoundsAction.\n */\nvar HiddenBoundsUpdater = /** @class */ (function () {\n function HiddenBoundsUpdater(actionDispatcher, layouter) {\n this.actionDispatcher = actionDispatcher;\n this.layouter = layouter;\n this.element2boundsData = new Map;\n }\n HiddenBoundsUpdater.prototype.decorate = function (vnode, element) {\n if (model_1.isSizeable(element) || model_1.isLayoutContainer(element)) {\n this.element2boundsData.set(element, {\n vnode: vnode,\n bounds: element.bounds,\n boundsChanged: false,\n alignmentChanged: false\n });\n }\n if (element instanceof smodel_1.SModelRoot)\n this.root = element;\n return vnode;\n };\n HiddenBoundsUpdater.prototype.postUpdate = function () {\n if (this.root !== undefined && model_2.isExportable(this.root) && this.root.export)\n return;\n this.getBoundsFromDOM();\n this.layouter.layout(this.element2boundsData);\n var resizes = [];\n var realignments = [];\n this.element2boundsData.forEach(function (boundsData, element) {\n if (boundsData.boundsChanged && boundsData.bounds !== undefined)\n resizes.push({\n elementId: element.id,\n newBounds: boundsData.bounds\n });\n if (boundsData.alignmentChanged && boundsData.alignment !== undefined)\n realignments.push({\n elementId: element.id,\n newAlignment: boundsData.alignment\n });\n });\n var revision = (this.root !== undefined) ? this.root.revision : undefined;\n this.actionDispatcher.dispatch(new bounds_manipulation_1.ComputedBoundsAction(resizes, revision, realignments));\n this.element2boundsData.clear();\n };\n HiddenBoundsUpdater.prototype.getBoundsFromDOM = function () {\n var _this = this;\n this.element2boundsData.forEach(function (boundsData, element) {\n if (boundsData.bounds && model_1.isSizeable(element)) {\n var vnode = boundsData.vnode;\n if (vnode && vnode.elm) {\n var boundingBox = _this.getBounds(vnode.elm, element);\n if (model_1.isAlignable(element) && !(geometry_1.almostEquals(boundingBox.x, 0) && geometry_1.almostEquals(boundingBox.y, 0))) {\n boundsData.alignment = {\n x: -boundingBox.x,\n y: -boundingBox.y\n };\n boundsData.alignmentChanged = true;\n }\n var newBounds = {\n x: element.bounds.x,\n y: element.bounds.y,\n width: boundingBox.width,\n height: boundingBox.height\n };\n if (!(geometry_1.almostEquals(newBounds.x, element.bounds.x)\n && geometry_1.almostEquals(newBounds.y, element.bounds.y)\n && geometry_1.almostEquals(newBounds.width, element.bounds.width)\n && geometry_1.almostEquals(newBounds.height, element.bounds.height))) {\n boundsData.bounds = newBounds;\n boundsData.boundsChanged = true;\n }\n }\n }\n });\n };\n HiddenBoundsUpdater.prototype.getBounds = function (elm, element) {\n var bounds = elm.getBBox();\n return {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height\n };\n };\n HiddenBoundsUpdater = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.IActionDispatcher)),\n __param(1, inversify_1.inject(types_1.TYPES.Layouter)),\n __metadata(\"design:paramtypes\", [Object, layout_1.Layouter])\n ], HiddenBoundsUpdater);\n return HiddenBoundsUpdater;\n}());\nexports.HiddenBoundsUpdater = HiddenBoundsUpdater;\n//# sourceMappingURL=hidden-bounds-updater.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/bounds/hidden-bounds-updater.js\n// module id = 252\n// module chunks = 0","\"use strict\";\n/*\n* Copyright (C) 2017 TypeFox and others.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n*/\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar animation_1 = require(\"../../base/animations/animation\");\nvar ResizeAnimation = /** @class */ (function (_super) {\n __extends(ResizeAnimation, _super);\n function ResizeAnimation(model, elementResizes, context, reverse) {\n if (reverse === void 0) { reverse = false; }\n var _this = _super.call(this, context) || this;\n _this.model = model;\n _this.elementResizes = elementResizes;\n _this.reverse = reverse;\n return _this;\n }\n ResizeAnimation.prototype.tween = function (t) {\n var _this = this;\n this.elementResizes.forEach(function (elementResize) {\n var element = elementResize.element;\n var newDimension = (_this.reverse) ? {\n width: (1 - t) * elementResize.toDimension.width + t * elementResize.fromDimension.width,\n height: (1 - t) * elementResize.toDimension.height + t * elementResize.fromDimension.height\n } : {\n width: (1 - t) * elementResize.fromDimension.width + t * elementResize.toDimension.width,\n height: (1 - t) * elementResize.fromDimension.height + t * elementResize.toDimension.height\n };\n element.bounds = {\n x: element.bounds.x,\n y: element.bounds.y,\n width: newDimension.width,\n height: newDimension.height\n };\n });\n return this.model;\n };\n return ResizeAnimation;\n}(animation_1.Animation));\nexports.ResizeAnimation = ResizeAnimation;\n//# sourceMappingURL=resize.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/bounds/resize.js\n// module id = 253\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar button_handler_1 = require(\"./button-handler\");\nvar buttonModule = new inversify_1.ContainerModule(function (bind) {\n bind(button_handler_1.ButtonHandlerRegistry).toSelf().inSingletonScope();\n});\nexports.default = buttonModule;\n//# sourceMappingURL=di.config.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/button/di.config.js\n// module id = 254\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../../base/types\");\nvar expand_1 = require(\"./expand\");\nvar expandModule = new inversify_1.ContainerModule(function (bind) {\n bind(types_1.TYPES.IButtonHandler).toConstructor(expand_1.ExpandButtonHandler);\n});\nexports.default = expandModule;\n//# sourceMappingURL=di.config.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/expand/di.config.js\n// module id = 255\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar snabbdom = require(\"snabbdom-jsx\");\nvar model_1 = require(\"./model\");\nvar smodel_utils_1 = require(\"../../base/model/smodel-utils\");\nvar JSX = { createElement: snabbdom.svg };\nvar ExpandButtonView = /** @class */ (function () {\n function ExpandButtonView() {\n }\n ExpandButtonView.prototype.render = function (button, context) {\n var expandable = smodel_utils_1.findParentByFeature(button, model_1.isExpandable);\n var path = (expandable !== undefined && expandable.expanded)\n ? 'M 1,5 L 8,12 L 15,5 Z'\n : 'M 1,8 L 8,15 L 8,1 Z';\n return JSX.createElement(\"g\", { \"class-sprotty-button\": \"{true}\", \"class-enabled\": \"{button.enabled}\" },\n JSX.createElement(\"rect\", { x: 0, y: 0, width: 16, height: 16, opacity: 0 }),\n JSX.createElement(\"path\", { d: path }));\n };\n return ExpandButtonView;\n}());\nexports.ExpandButtonView = ExpandButtonView;\n//# sourceMappingURL=views.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/expand/views.js\n// module id = 256\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../../base/types\");\nvar export_1 = require(\"./export\");\nvar svg_exporter_1 = require(\"./svg-exporter\");\nvar exportSvgModule = new inversify_1.ContainerModule(function (bind) {\n bind(types_1.TYPES.KeyListener).to(export_1.ExportSvgKeyListener).inSingletonScope();\n bind(types_1.TYPES.HiddenVNodeDecorator).to(export_1.ExportSvgDecorator).inSingletonScope();\n bind(types_1.TYPES.ICommand).toConstructor(export_1.ExportSvgCommand);\n bind(types_1.TYPES.SvgExporter).to(svg_exporter_1.SvgExporter).inSingletonScope();\n});\nexports.default = exportSvgModule;\n//# sourceMappingURL=di.config.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/export/di.config.js\n// module id = 257\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../../base/types\");\nvar fade_1 = require(\"./fade\");\nvar fadeModule = new inversify_1.ContainerModule(function (bind) {\n bind(types_1.TYPES.IVNodeDecorator).to(fade_1.ElementFader).inSingletonScope();\n});\nexports.default = fadeModule;\n//# sourceMappingURL=di.config.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/fade/di.config.js\n// module id = 258\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../../base/types\");\nvar hover_1 = require(\"./hover\");\nvar popup_position_updater_1 = require(\"./popup-position-updater\");\nvar initializer_1 = require(\"./initializer\");\nvar hoverModule = new inversify_1.ContainerModule(function (bind) {\n bind(types_1.TYPES.PopupVNodeDecorator).to(popup_position_updater_1.PopupPositionUpdater).inSingletonScope();\n bind(types_1.TYPES.IActionHandlerInitializer).to(initializer_1.PopupActionHandlerInitializer);\n bind(types_1.TYPES.ICommand).toConstructor(hover_1.HoverFeedbackCommand);\n bind(types_1.TYPES.ICommand).toConstructor(hover_1.SetPopupModelCommand);\n bind(types_1.TYPES.MouseListener).to(hover_1.HoverMouseListener);\n bind(types_1.TYPES.PopupMouseListener).to(hover_1.PopupHoverMouseListener);\n bind(types_1.TYPES.KeyListener).to(hover_1.HoverKeyListener);\n bind(types_1.TYPES.HoverState).toConstantValue({\n mouseOverTimer: undefined,\n mouseOutTimer: undefined,\n popupOpen: false,\n previousPopupElement: undefined\n });\n});\nexports.default = hoverModule;\n//# sourceMappingURL=di.config.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/hover/di.config.js\n// module id = 259\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar hover_1 = require(\"./hover\");\nvar smodel_factory_1 = require(\"../../base/model/smodel-factory\");\nvar center_fit_1 = require(\"../viewport/center-fit\");\nvar viewport_1 = require(\"../viewport/viewport\");\nvar move_1 = require(\"../move/move\");\nvar ClosePopupActionHandler = /** @class */ (function () {\n function ClosePopupActionHandler() {\n this.popupOpen = false;\n }\n ClosePopupActionHandler.prototype.handle = function (action) {\n if (action.kind === hover_1.SetPopupModelCommand.KIND) {\n this.popupOpen = action.newRoot.type !== smodel_factory_1.EMPTY_ROOT.type;\n }\n else if (this.popupOpen) {\n return new hover_1.SetPopupModelAction({ id: smodel_factory_1.EMPTY_ROOT.id, type: smodel_factory_1.EMPTY_ROOT.type });\n }\n };\n return ClosePopupActionHandler;\n}());\nvar PopupActionHandlerInitializer = /** @class */ (function () {\n function PopupActionHandlerInitializer() {\n }\n PopupActionHandlerInitializer.prototype.initialize = function (registry) {\n var closePopupActionHandler = new ClosePopupActionHandler();\n registry.register(center_fit_1.FitToScreenCommand.KIND, closePopupActionHandler);\n registry.register(center_fit_1.CenterCommand.KIND, closePopupActionHandler);\n registry.register(viewport_1.ViewportCommand.KIND, closePopupActionHandler);\n registry.register(hover_1.SetPopupModelCommand.KIND, closePopupActionHandler);\n registry.register(move_1.MoveCommand.KIND, closePopupActionHandler);\n };\n PopupActionHandlerInitializer = __decorate([\n inversify_1.injectable()\n ], PopupActionHandlerInitializer);\n return PopupActionHandlerInitializer;\n}());\nexports.PopupActionHandlerInitializer = PopupActionHandlerInitializer;\n//# sourceMappingURL=initializer.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/hover/initializer.js\n// module id = 260\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../../base/types\");\nvar PopupPositionUpdater = /** @class */ (function () {\n function PopupPositionUpdater(options) {\n this.options = options;\n }\n PopupPositionUpdater.prototype.decorate = function (vnode, element) {\n return vnode;\n };\n PopupPositionUpdater.prototype.postUpdate = function () {\n var popupDiv = document.getElementById(this.options.popupDiv);\n if (popupDiv !== null && typeof window !== 'undefined') {\n var boundingClientRect = popupDiv.getBoundingClientRect();\n if (window.innerHeight < boundingClientRect.height + boundingClientRect.top) {\n popupDiv.style.top = (window.scrollY + window.innerHeight - boundingClientRect.height - 5) + 'px';\n }\n if (window.innerWidth < boundingClientRect.left + boundingClientRect.width) {\n popupDiv.style.left = (window.scrollX + window.innerWidth - boundingClientRect.width - 5) + 'px';\n }\n if (boundingClientRect.left < 0) {\n popupDiv.style.left = '0px';\n }\n if (boundingClientRect.top < 0) {\n popupDiv.style.top = '0px';\n }\n }\n };\n PopupPositionUpdater = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.ViewerOptions)),\n __metadata(\"design:paramtypes\", [Object])\n ], PopupPositionUpdater);\n return PopupPositionUpdater;\n}());\nexports.PopupPositionUpdater = PopupPositionUpdater;\n//# sourceMappingURL=popup-position-updater.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/hover/popup-position-updater.js\n// module id = 261\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../../base/types\");\nvar move_1 = require(\"./move\");\nvar moveModule = new inversify_1.ContainerModule(function (bind) {\n bind(types_1.TYPES.MouseListener).to(move_1.MoveMouseListener);\n bind(types_1.TYPES.ICommand).toConstructor(move_1.MoveCommand);\n bind(types_1.TYPES.IVNodeDecorator).to(move_1.LocationDecorator);\n bind(types_1.TYPES.HiddenVNodeDecorator).to(move_1.LocationDecorator);\n});\nexports.default = moveModule;\n//# sourceMappingURL=di.config.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/move/di.config.js\n// module id = 262\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../../base/types\");\nvar open_1 = require(\"./open\");\nvar openModule = new inversify_1.ContainerModule(function (bind) {\n bind(types_1.TYPES.MouseListener).to(open_1.OpenMouseListener);\n});\nexports.default = openModule;\n//# sourceMappingURL=di.config.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/open/di.config.js\n// module id = 263\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../../base/types\");\nvar select_1 = require(\"./select\");\nvar selectModule = new inversify_1.ContainerModule(function (bind) {\n bind(types_1.TYPES.ICommand).toConstructor(select_1.SelectCommand);\n bind(types_1.TYPES.ICommand).toConstructor(select_1.SelectAllCommand);\n bind(types_1.TYPES.KeyListener).to(select_1.SelectKeyboardListener);\n bind(types_1.TYPES.MouseListener).to(select_1.SelectMouseListener);\n});\nexports.default = selectModule;\n//# sourceMappingURL=di.config.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/select/di.config.js\n// module id = 264\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../../base/types\");\nvar undo_redo_1 = require(\"./undo-redo\");\nvar undoRedoModule = new inversify_1.ContainerModule(function (bind) {\n bind(types_1.TYPES.KeyListener).to(undo_redo_1.UndoRedoKeyListener);\n});\nexports.default = undoRedoModule;\n//# sourceMappingURL=di.config.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/undo-redo/di.config.js\n// module id = 265\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../../base/types\");\nvar center_fit_1 = require(\"./center-fit\");\nvar viewport_1 = require(\"./viewport\");\nvar scroll_1 = require(\"./scroll\");\nvar zoom_1 = require(\"./zoom\");\nvar viewportModule = new inversify_1.ContainerModule(function (bind) {\n bind(types_1.TYPES.ICommand).toConstructor(center_fit_1.CenterCommand);\n bind(types_1.TYPES.ICommand).toConstructor(center_fit_1.FitToScreenCommand);\n bind(types_1.TYPES.ICommand).toConstructor(viewport_1.ViewportCommand);\n bind(types_1.TYPES.KeyListener).to(center_fit_1.CenterKeyboardListener);\n bind(types_1.TYPES.MouseListener).to(scroll_1.ScrollMouseListener);\n bind(types_1.TYPES.MouseListener).to(zoom_1.ZoomMouseListener);\n});\nexports.default = viewportModule;\n//# sourceMappingURL=di.config.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/features/viewport/di.config.js\n// module id = 266\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar smodel_factory_1 = require(\"../base/model/smodel-factory\");\nvar smodel_utils_1 = require(\"../base/model/smodel-utils\");\nvar sgraph_1 = require(\"./sgraph\");\nvar model_1 = require(\"../features/button/model\");\nvar SGraphFactory = /** @class */ (function (_super) {\n __extends(SGraphFactory, _super);\n function SGraphFactory() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SGraphFactory.prototype.createElement = function (schema, parent) {\n if (this.isNodeSchema(schema))\n return this.initializeChild(new sgraph_1.SNode(), schema, parent);\n else if (this.isPortSchema(schema))\n return this.initializeChild(new sgraph_1.SPort(), schema, parent);\n else if (this.isEdgeSchema(schema))\n return this.initializeChild(new sgraph_1.SEdge(), schema, parent);\n else if (this.isLabelSchema(schema))\n return this.initializeChild(new sgraph_1.SLabel(), schema, parent);\n else if (this.isCompartmentSchema(schema))\n return this.initializeChild(new sgraph_1.SCompartment(), schema, parent);\n if (this.isButtonSchema(schema))\n return this.initializeChild(new model_1.SButton(), schema, parent);\n else\n return _super.prototype.createElement.call(this, schema, parent);\n };\n SGraphFactory.prototype.createRoot = function (schema) {\n if (this.isGraphSchema(schema))\n return this.initializeRoot(new sgraph_1.SGraph(), schema);\n else\n return _super.prototype.createRoot.call(this, schema);\n };\n SGraphFactory.prototype.isGraphSchema = function (schema) {\n return smodel_utils_1.getBasicType(schema) === 'graph';\n };\n SGraphFactory.prototype.isNodeSchema = function (schema) {\n return smodel_utils_1.getBasicType(schema) === 'node';\n };\n SGraphFactory.prototype.isPortSchema = function (schema) {\n return smodel_utils_1.getBasicType(schema) === 'port';\n };\n SGraphFactory.prototype.isEdgeSchema = function (schema) {\n return smodel_utils_1.getBasicType(schema) === 'edge';\n };\n SGraphFactory.prototype.isLabelSchema = function (schema) {\n return smodel_utils_1.getBasicType(schema) === 'label';\n };\n SGraphFactory.prototype.isCompartmentSchema = function (schema) {\n return smodel_utils_1.getBasicType(schema) === 'comp';\n };\n SGraphFactory.prototype.isButtonSchema = function (schema) {\n return smodel_utils_1.getBasicType(schema) === 'button';\n };\n SGraphFactory = __decorate([\n inversify_1.injectable()\n ], SGraphFactory);\n return SGraphFactory;\n}(smodel_factory_1.SModelFactory));\nexports.SGraphFactory = SGraphFactory;\n//# sourceMappingURL=sgraph-factory.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/graph/sgraph-factory.js\n// module id = 267\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar strings_1 = require(\"snabbdom-virtualize/strings\");\nvar PreRenderedView = /** @class */ (function () {\n function PreRenderedView() {\n }\n PreRenderedView.prototype.render = function (model, context) {\n var node = strings_1.default(model.code);\n this.correctNamespace(node);\n return node;\n };\n PreRenderedView.prototype.correctNamespace = function (node) {\n if (node.sel === 'svg' || node.sel === 'g')\n this.setNamespace(node, 'http://www.w3.org/2000/svg');\n };\n PreRenderedView.prototype.setNamespace = function (node, ns) {\n if (node.data === undefined)\n node.data = {};\n node.data.ns = ns;\n var children = node.children;\n if (children !== undefined) {\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (typeof child !== 'string')\n this.setNamespace(child, ns);\n }\n }\n };\n return PreRenderedView;\n}());\nexports.PreRenderedView = PreRenderedView;\n//# sourceMappingURL=generic-views.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/lib/generic-views.js\n// module id = 268\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar snabbdom = require(\"snabbdom-jsx\");\nvar vnode_utils_1 = require(\"../base/views/vnode-utils\");\nvar JSX = { createElement: snabbdom.html };\nvar HtmlRootView = /** @class */ (function () {\n function HtmlRootView() {\n }\n HtmlRootView.prototype.render = function (model, context) {\n var root = JSX.createElement(\"div\", null, context.renderChildren(model));\n for (var _i = 0, _a = model.classes; _i < _a.length; _i++) {\n var c = _a[_i];\n vnode_utils_1.setClass(root, c, true);\n }\n return root;\n };\n return HtmlRootView;\n}());\nexports.HtmlRootView = HtmlRootView;\n//# sourceMappingURL=html-views.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/lib/html-views.js\n// module id = 269\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar smodel_1 = require(\"../base/model/smodel\");\nvar geometry_1 = require(\"../utils/geometry\");\nvar model_1 = require(\"../features/bounds/model\");\nvar model_2 = require(\"../features/move/model\");\nvar model_3 = require(\"../features/select/model\");\n/**\n * Root model element class for HTML content. Usually this is rendered with a `div` DOM element.\n */\nvar HtmlRoot = /** @class */ (function (_super) {\n __extends(HtmlRoot, _super);\n function HtmlRoot() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.classes = [];\n return _this;\n }\n return HtmlRoot;\n}(smodel_1.SModelRoot));\nexports.HtmlRoot = HtmlRoot;\n/**\n * Pre-rendered elements contain HTML or SVG code to be transferred to the DOM. This can be useful to\n * render complex figures or to compute the view on the server instead of the client code.\n */\nvar PreRenderedElement = /** @class */ (function (_super) {\n __extends(PreRenderedElement, _super);\n function PreRenderedElement() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return PreRenderedElement;\n}(smodel_1.SChildElement));\nexports.PreRenderedElement = PreRenderedElement;\n/**\n * Same as PreRenderedElement, but with a position and a size.\n */\nvar ShapedPreRenderedElement = /** @class */ (function (_super) {\n __extends(ShapedPreRenderedElement, _super);\n function ShapedPreRenderedElement() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.position = geometry_1.ORIGIN_POINT;\n _this.size = geometry_1.EMPTY_DIMENSION;\n _this.selected = false;\n _this.alignment = geometry_1.ORIGIN_POINT;\n return _this;\n }\n Object.defineProperty(ShapedPreRenderedElement.prototype, \"bounds\", {\n get: function () {\n return {\n x: this.position.x,\n y: this.position.y,\n width: this.size.width,\n height: this.size.height\n };\n },\n set: function (newBounds) {\n this.position = {\n x: newBounds.x,\n y: newBounds.y\n };\n this.size = {\n width: newBounds.width,\n height: newBounds.height\n };\n },\n enumerable: true,\n configurable: true\n });\n ShapedPreRenderedElement.prototype.hasFeature = function (feature) {\n return feature === model_2.moveFeature || feature === model_1.boundsFeature || feature === model_3.selectFeature || feature === model_1.alignFeature;\n };\n return ShapedPreRenderedElement;\n}(PreRenderedElement));\nexports.ShapedPreRenderedElement = ShapedPreRenderedElement;\n//# sourceMappingURL=model.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/lib/model.js\n// module id = 270\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar snabbdom = require(\"snabbdom-jsx\");\nvar geometry_1 = require(\"../utils/geometry\");\nvar views_1 = require(\"../graph/views\");\nvar JSX = { createElement: snabbdom.svg };\nvar SvgViewportView = /** @class */ (function () {\n function SvgViewportView() {\n }\n SvgViewportView.prototype.render = function (model, context) {\n var transform = \"scale(\" + model.zoom + \") translate(\" + -model.scroll.x + \",\" + -model.scroll.y + \")\";\n return JSX.createElement(\"svg\", null,\n JSX.createElement(\"g\", { transform: transform }, context.renderChildren(model)));\n };\n return SvgViewportView;\n}());\nexports.SvgViewportView = SvgViewportView;\nvar CircularNodeView = /** @class */ (function (_super) {\n __extends(CircularNodeView, _super);\n function CircularNodeView() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CircularNodeView.prototype.render = function (node, context) {\n var radius = this.getRadius(node);\n return JSX.createElement(\"g\", null,\n JSX.createElement(\"circle\", { \"class-sprotty-node\": true, \"class-mouseover\": node.hoverFeedback, \"class-selected\": node.selected, r: radius, cx: radius, cy: radius }));\n };\n CircularNodeView.prototype.getRadius = function (node) {\n var d = Math.min(node.size.width, node.size.height);\n if (d > 0)\n return d / 2;\n else\n return 0;\n };\n CircularNodeView.prototype.getAnchor = function (node, refPoint, anchorCorrection) {\n var radius = this.getRadius(node);\n var cx = node.position.x + radius;\n var cy = node.position.y + radius;\n var dx = cx - refPoint.x;\n var dy = cy - refPoint.y;\n var distance = Math.sqrt(dx * dx + dy * dy);\n var normX = (dx / distance) || 0;\n var normY = (dy / distance) || 0;\n var strokeCorrection = 0.5 * this.getStrokeWidth(node);\n return {\n x: cx - normX * (radius + strokeCorrection + anchorCorrection),\n y: cy - normY * (radius + strokeCorrection + anchorCorrection)\n };\n };\n return CircularNodeView;\n}(views_1.AnchorableView));\nexports.CircularNodeView = CircularNodeView;\nvar RectangularNodeView = /** @class */ (function (_super) {\n __extends(RectangularNodeView, _super);\n function RectangularNodeView() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n RectangularNodeView.prototype.render = function (node, context) {\n return JSX.createElement(\"g\", null,\n JSX.createElement(\"rect\", { \"class-sprotty-node\": true, \"class-mouseover\": node.hoverFeedback, \"class-selected\": node.selected, x: \"0\", y: \"0\", width: node.size.width, height: node.size.height }));\n };\n RectangularNodeView.prototype.getAnchor = function (node, refPoint, anchorCorrection) {\n var bounds = node.bounds;\n var correction = 0.5 * this.getStrokeWidth(node) + anchorCorrection;\n var c = geometry_1.center(bounds);\n var finder = new NearestPointFinder(c, refPoint);\n if (!geometry_1.almostEquals(c.y, refPoint.y)) {\n var xTop = this.getXIntersection(bounds.y, c, refPoint);\n if (xTop >= bounds.x && xTop <= bounds.x + bounds.width)\n finder.addCandidate(xTop, bounds.y - correction);\n var xBottom = this.getXIntersection(bounds.y + bounds.height, c, refPoint);\n if (xBottom >= bounds.x && xBottom <= bounds.x + bounds.width)\n finder.addCandidate(xBottom, bounds.y + bounds.height + correction);\n }\n if (!geometry_1.almostEquals(c.x, refPoint.x)) {\n var yLeft = this.getYIntersection(bounds.x, c, refPoint);\n if (yLeft >= bounds.y && yLeft <= bounds.y + bounds.height)\n finder.addCandidate(bounds.x - correction, yLeft);\n var yRight = this.getYIntersection(bounds.x + bounds.width, c, refPoint);\n if (yRight >= bounds.y && yRight <= bounds.y + bounds.height)\n finder.addCandidate(bounds.x + bounds.width + correction, yRight);\n }\n return finder.best;\n };\n RectangularNodeView.prototype.getXIntersection = function (yIntersection, center, point) {\n var t = (yIntersection - center.y) / (point.y - center.y);\n return (point.x - center.x) * t + center.x;\n };\n RectangularNodeView.prototype.getYIntersection = function (xIntersection, center, point) {\n var t = (xIntersection - center.x) / (point.x - center.x);\n return (point.y - center.y) * t + center.y;\n };\n return RectangularNodeView;\n}(views_1.AnchorableView));\nexports.RectangularNodeView = RectangularNodeView;\nvar NearestPointFinder = /** @class */ (function () {\n function NearestPointFinder(center, refPoint) {\n this.center = center;\n this.refPoint = refPoint;\n this.currentDist = -1;\n }\n NearestPointFinder.prototype.addCandidate = function (x, y) {\n var dx = this.refPoint.x - x;\n var dy = this.refPoint.y - y;\n var dist = dx * dx + dy * dy;\n if (this.currentDist < 0 || dist < this.currentDist) {\n this.currentBest = {\n x: x,\n y: y\n };\n this.currentDist = dist;\n }\n };\n Object.defineProperty(NearestPointFinder.prototype, \"best\", {\n get: function () {\n if (this.currentBest === undefined)\n return this.center;\n else\n return this.currentBest;\n },\n enumerable: true,\n configurable: true\n });\n return NearestPointFinder;\n}());\n//# sourceMappingURL=svg-views.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/lib/svg-views.js\n// module id = 271\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../base/types\");\n/**\n * This container module does NOT provide any binding for TYPES.ModelSource because that needs to be\n * done according to the needs of the application. You can choose between a local (LocalModelSource)\n * and a remote (e.g. WebSocketDiagramServer) implementation.\n */\nvar modelSourceModule = new inversify_1.ContainerModule(function (bind) {\n bind(types_1.TYPES.ModelSourceProvider).toProvider(function (context) {\n return function () {\n return new Promise(function (resolve) {\n resolve(context.container.get(types_1.TYPES.ModelSource));\n });\n };\n });\n});\nexports.default = modelSourceModule;\n//# sourceMappingURL=di.config.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/model-source/di.config.js\n// module id = 272\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar types_1 = require(\"../base/types\");\nvar action_handler_1 = require(\"../base/actions/action-handler\");\nvar smodel_utils_1 = require(\"../base/model/smodel-utils\");\nvar set_model_1 = require(\"../base/features/set-model\");\nvar smodel_1 = require(\"../base/model/smodel\");\nvar bounds_manipulation_1 = require(\"../features/bounds/bounds-manipulation\");\nvar model_matching_1 = require(\"../features/update/model-matching\");\nvar update_model_1 = require(\"../features/update/update-model\");\nvar hover_1 = require(\"../features/hover/hover\");\nvar model_source_1 = require(\"./model-source\");\nvar svg_exporter_1 = require(\"../features/export/svg-exporter\");\nvar file_saver_1 = require(\"file-saver\");\nvar expand_1 = require(\"../features/expand/expand\");\nvar diagram_state_1 = require(\"./diagram-state\");\n/**\n * A model source that handles actions for bounds calculation and model\n * updates.\n */\nvar LocalModelSource = /** @class */ (function (_super) {\n __extends(LocalModelSource, _super);\n function LocalModelSource(actionDispatcher, actionHandlerRegistry, viewerOptions, popupModelFactory, modelProvider) {\n var _this = _super.call(this, actionDispatcher, actionHandlerRegistry, viewerOptions) || this;\n _this.popupModelFactory = popupModelFactory;\n _this.modelProvider = modelProvider;\n _this.currentRoot = {\n type: 'NONE',\n id: 'ROOT'\n };\n _this.diagramState = {\n expansionState: new diagram_state_1.ExpansionState(_this.currentRoot)\n };\n return _this;\n }\n Object.defineProperty(LocalModelSource.prototype, \"model\", {\n get: function () {\n return this.currentRoot;\n },\n set: function (root) {\n this.setModel(root);\n },\n enumerable: true,\n configurable: true\n });\n LocalModelSource.prototype.initialize = function (registry) {\n _super.prototype.initialize.call(this, registry);\n // Register model manipulation commands\n registry.registerCommand(update_model_1.UpdateModelCommand);\n // Register this model source\n registry.register(bounds_manipulation_1.ComputedBoundsAction.KIND, this);\n registry.register(hover_1.RequestPopupModelAction.KIND, this);\n registry.register(expand_1.CollapseExpandAction.KIND, this);\n registry.register(expand_1.CollapseExpandAllAction.KIND, this);\n };\n LocalModelSource.prototype.setModel = function (newRoot) {\n this.currentRoot = newRoot;\n this.diagramState = {\n expansionState: new diagram_state_1.ExpansionState(newRoot)\n };\n this.submitModel(newRoot, false);\n };\n LocalModelSource.prototype.updateModel = function (newRoot) {\n if (newRoot === undefined) {\n this.submitModel(this.currentRoot, true);\n }\n else {\n this.currentRoot = newRoot;\n this.submitModel(newRoot, true);\n }\n };\n LocalModelSource.prototype.submitModel = function (newRoot, update) {\n if (this.viewerOptions.needsClientLayout) {\n this.actionDispatcher.dispatch(new bounds_manipulation_1.RequestBoundsAction(newRoot));\n }\n else {\n if (update) {\n this.actionDispatcher.dispatch(new update_model_1.UpdateModelAction(newRoot));\n }\n else {\n this.actionDispatcher.dispatch(new set_model_1.SetModelAction(newRoot));\n }\n if (this.onModelSubmitted !== undefined) {\n this.onModelSubmitted(newRoot);\n }\n }\n };\n LocalModelSource.prototype.applyMatches = function (matches) {\n var root = this.currentRoot;\n model_matching_1.applyMatches(root, matches);\n if (this.viewerOptions.needsClientLayout) {\n this.actionDispatcher.dispatch(new bounds_manipulation_1.RequestBoundsAction(root));\n }\n else {\n var update = new update_model_1.UpdateModelAction();\n update.matches = matches;\n this.actionDispatcher.dispatch(update);\n if (this.onModelSubmitted !== undefined) {\n this.onModelSubmitted(root);\n }\n }\n };\n LocalModelSource.prototype.addElements = function (elements) {\n var matches = [];\n for (var i in elements) {\n var e = elements[i];\n if (e.element !== undefined && e.parentId !== undefined) {\n matches.push({\n right: e.element,\n rightParentId: e.parentId\n });\n }\n else if (e.id !== undefined) {\n matches.push({\n right: e,\n rightParentId: this.currentRoot.id\n });\n }\n }\n this.applyMatches(matches);\n };\n LocalModelSource.prototype.removeElements = function (elements) {\n var matches = [];\n var index = new smodel_1.SModelIndex();\n index.add(this.currentRoot);\n for (var i in elements) {\n var e = elements[i];\n if (e.elementId !== undefined && e.parentId !== undefined) {\n var element = index.getById(e.elementId);\n if (element !== undefined) {\n matches.push({\n left: element,\n leftParentId: e.parentId\n });\n }\n }\n else {\n var element = index.getById(e);\n if (element !== undefined) {\n matches.push({\n left: element,\n leftParentId: this.currentRoot.id\n });\n }\n }\n }\n this.applyMatches(matches);\n };\n LocalModelSource.prototype.handle = function (action) {\n switch (action.kind) {\n case set_model_1.RequestModelAction.KIND:\n this.handleRequestModel(action);\n break;\n case bounds_manipulation_1.ComputedBoundsAction.KIND:\n this.handleComputedBounds(action);\n break;\n case hover_1.RequestPopupModelAction.KIND:\n this.handleRequestPopupModel(action);\n break;\n case svg_exporter_1.ExportSvgAction.KIND:\n this.handleExportSvgAction(action);\n break;\n case expand_1.CollapseExpandAction.KIND:\n this.handleCollapseExpandAction(action);\n break;\n case expand_1.CollapseExpandAllAction.KIND:\n this.handleCollapseExpandAllAction(action);\n break;\n }\n };\n LocalModelSource.prototype.handleRequestModel = function (action) {\n this.submitModel(this.currentRoot, false);\n };\n LocalModelSource.prototype.handleComputedBounds = function (action) {\n var root = this.currentRoot;\n var index = new smodel_1.SModelIndex();\n index.add(root);\n for (var _i = 0, _a = action.bounds; _i < _a.length; _i++) {\n var b = _a[_i];\n var element = index.getById(b.elementId);\n if (element !== undefined)\n this.applyBounds(element, b.newBounds);\n }\n if (action.alignments !== undefined) {\n for (var _b = 0, _c = action.alignments; _b < _c.length; _b++) {\n var a = _c[_b];\n var element = index.getById(a.elementId);\n if (element !== undefined)\n this.applyAlignment(element, a.newAlignment);\n }\n }\n this.actionDispatcher.dispatch(new update_model_1.UpdateModelAction(root));\n if (this.onModelSubmitted !== undefined) {\n this.onModelSubmitted(root);\n }\n };\n LocalModelSource.prototype.applyBounds = function (element, newBounds) {\n var e = element;\n e.position = { x: newBounds.x, y: newBounds.y };\n e.size = { width: newBounds.width, height: newBounds.height };\n };\n LocalModelSource.prototype.applyAlignment = function (element, newAlignment) {\n var e = element;\n e.alignment = { x: newAlignment.x, y: newAlignment.y };\n };\n LocalModelSource.prototype.handleRequestPopupModel = function (action) {\n if (this.popupModelFactory !== undefined) {\n var element = smodel_utils_1.findElement(this.currentRoot, action.elementId);\n var popupRoot = this.popupModelFactory(action, element);\n if (popupRoot !== undefined) {\n popupRoot.canvasBounds = action.bounds;\n this.actionDispatcher.dispatch(new hover_1.SetPopupModelAction(popupRoot));\n }\n }\n };\n LocalModelSource.prototype.handleExportSvgAction = function (action) {\n var blob = new Blob([action.svg], { type: \"text/plain;charset=utf-8\" });\n file_saver_1.saveAs(blob, \"diagram.svg\");\n };\n LocalModelSource.prototype.handleCollapseExpandAction = function (action) {\n if (this.modelProvider !== undefined) {\n this.diagramState.expansionState.apply(action);\n var expandedModel = this.modelProvider.getModel(this.diagramState, this.currentRoot);\n this.updateModel(expandedModel);\n }\n };\n LocalModelSource.prototype.handleCollapseExpandAllAction = function (action) {\n if (this.modelProvider !== undefined) {\n if (action.expand) {\n // Expanding all elements locally is currently not supported\n }\n else {\n this.diagramState.expansionState.collapseAll();\n }\n var expandedModel = this.modelProvider.getModel(this.diagramState, this.currentRoot);\n this.updateModel(expandedModel);\n }\n };\n LocalModelSource = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.IActionDispatcher)),\n __param(1, inversify_1.inject(types_1.TYPES.ActionHandlerRegistry)),\n __param(2, inversify_1.inject(types_1.TYPES.ViewerOptions)),\n __param(3, inversify_1.inject(types_1.TYPES.PopupModelFactory)), __param(3, inversify_1.optional()),\n __param(4, inversify_1.inject(types_1.TYPES.StateAwareModelProvider)), __param(4, inversify_1.optional()),\n __metadata(\"design:paramtypes\", [Object, action_handler_1.ActionHandlerRegistry, Object, Function, Object])\n ], LocalModelSource);\n return LocalModelSource;\n}(model_source_1.ModelSource));\nexports.LocalModelSource = LocalModelSource;\n//# sourceMappingURL=local-model-source.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/model-source/local-model-source.js\n// module id = 273\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar logging_1 = require(\"../utils/logging\");\nvar types_1 = require(\"../base/types\");\nvar LoggingAction = /** @class */ (function () {\n function LoggingAction(severity, time, caller, message, params) {\n this.severity = severity;\n this.time = time;\n this.caller = caller;\n this.message = message;\n this.params = params;\n this.kind = LoggingAction.KIND;\n }\n LoggingAction.KIND = 'logging';\n return LoggingAction;\n}());\nexports.LoggingAction = LoggingAction;\n/**\n * A logger that forwards messages of type 'error', 'warn', and 'info' to the model source.\n */\nvar ForwardingLogger = /** @class */ (function () {\n function ForwardingLogger(modelSourceProvider, logLevel) {\n this.modelSourceProvider = modelSourceProvider;\n this.logLevel = logLevel;\n }\n ForwardingLogger.prototype.error = function (thisArg, message) {\n var params = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n params[_i - 2] = arguments[_i];\n }\n if (this.logLevel >= logging_1.LogLevel.error)\n this.forward(thisArg, message, logging_1.LogLevel.error, params);\n };\n ForwardingLogger.prototype.warn = function (thisArg, message) {\n var params = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n params[_i - 2] = arguments[_i];\n }\n if (this.logLevel >= logging_1.LogLevel.warn)\n this.forward(thisArg, message, logging_1.LogLevel.warn, params);\n };\n ForwardingLogger.prototype.info = function (thisArg, message) {\n var params = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n params[_i - 2] = arguments[_i];\n }\n if (this.logLevel >= logging_1.LogLevel.info)\n this.forward(thisArg, message, logging_1.LogLevel.info, params);\n };\n ForwardingLogger.prototype.log = function (thisArg, message) {\n var params = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n params[_i - 2] = arguments[_i];\n }\n if (this.logLevel >= logging_1.LogLevel.log) {\n // We cannot forward 'log' level messages since that would lead to endless loops\n try {\n var caller = typeof thisArg === 'object' ? thisArg.constructor.name : String(thisArg);\n console.log.apply(thisArg, [caller + ': ' + message].concat(params));\n }\n catch (error) { }\n }\n };\n ForwardingLogger.prototype.forward = function (thisArg, message, logLevel, params) {\n var date = new Date();\n var action = new LoggingAction(logging_1.LogLevel[logLevel], date.toLocaleTimeString(), typeof thisArg === 'object' ? thisArg.constructor.name : String(thisArg), message, params.map(function (p) { return JSON.stringify(p); }));\n this.modelSourceProvider().then(function (modelSource) {\n try {\n modelSource.handle(action);\n }\n catch (error) {\n try {\n console.log.apply(thisArg, [message, action, error]);\n }\n catch (error) { }\n }\n });\n };\n ForwardingLogger = __decorate([\n inversify_1.injectable(),\n __param(0, inversify_1.inject(types_1.TYPES.ModelSourceProvider)),\n __param(1, inversify_1.inject(types_1.TYPES.LogLevel)),\n __metadata(\"design:paramtypes\", [Function, Number])\n ], ForwardingLogger);\n return ForwardingLogger;\n}());\nexports.ForwardingLogger = ForwardingLogger;\n//# sourceMappingURL=logging.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/model-source/logging.js\n// module id = 274\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar inversify_1 = require(\"inversify\");\nvar diagram_server_1 = require(\"./diagram-server\");\n/**\n * An external ModelSource that connects to the model provider using a\n * websocket.\n */\nvar WebSocketDiagramServer = /** @class */ (function (_super) {\n __extends(WebSocketDiagramServer, _super);\n function WebSocketDiagramServer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n WebSocketDiagramServer.prototype.listen = function (webSocket) {\n var _this = this;\n webSocket.addEventListener('message', function (event) {\n _this.messageReceived(event.data);\n });\n webSocket.addEventListener('error', function (event) {\n _this.logger.error(_this, 'error event received', event);\n });\n this.webSocket = webSocket;\n };\n WebSocketDiagramServer.prototype.disconnect = function () {\n if (this.webSocket) {\n this.webSocket.close();\n this.webSocket = undefined;\n }\n };\n WebSocketDiagramServer.prototype.sendMessage = function (message) {\n if (this.webSocket) {\n this.webSocket.send(JSON.stringify(message));\n }\n else {\n throw new Error('WebSocket is not connected');\n }\n };\n WebSocketDiagramServer = __decorate([\n inversify_1.injectable()\n ], WebSocketDiagramServer);\n return WebSocketDiagramServer;\n}(diagram_server_1.DiagramServer));\nexports.WebSocketDiagramServer = WebSocketDiagramServer;\n//# sourceMappingURL=websocket.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/model-source/websocket.js\n// module id = 275\n// module chunks = 0","\"use strict\";\n/*\n * Copyright (C) 2017 TypeFox and others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction rgb(red, green, blue) {\n return {\n red: red,\n green: green,\n blue: blue\n };\n}\nexports.rgb = rgb;\nfunction toSVG(c) {\n return 'rgb(' + c.red + ',' + c.green + ',' + c.blue + ')';\n}\nexports.toSVG = toSVG;\nvar ColorMap = /** @class */ (function () {\n function ColorMap(stops) {\n this.stops = stops;\n }\n ColorMap.prototype.getColor = function (t) {\n t = Math.max(0, Math.min(0.99999999, t));\n var i = Math.floor(t * this.stops.length);\n return this.stops[i];\n };\n return ColorMap;\n}());\nexports.ColorMap = ColorMap;\n//# sourceMappingURL=color.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/lib/utils/color.js\n// module id = 276\n// module chunks = 0","function createElement(tagName) {\n return document.createElement(tagName);\n}\nfunction createElementNS(namespaceURI, qualifiedName) {\n return document.createElementNS(namespaceURI, qualifiedName);\n}\nfunction createTextNode(text) {\n return document.createTextNode(text);\n}\nfunction createComment(text) {\n return document.createComment(text);\n}\nfunction insertBefore(parentNode, newNode, referenceNode) {\n parentNode.insertBefore(newNode, referenceNode);\n}\nfunction removeChild(node, child) {\n node.removeChild(child);\n}\nfunction appendChild(node, child) {\n node.appendChild(child);\n}\nfunction parentNode(node) {\n return node.parentNode;\n}\nfunction nextSibling(node) {\n return node.nextSibling;\n}\nfunction tagName(elm) {\n return elm.tagName;\n}\nfunction setTextContent(node, text) {\n node.textContent = text;\n}\nfunction getTextContent(node) {\n return node.textContent;\n}\nfunction isElement(node) {\n return node.nodeType === 1;\n}\nfunction isText(node) {\n return node.nodeType === 3;\n}\nfunction isComment(node) {\n return node.nodeType === 8;\n}\nexport var htmlDomApi = {\n createElement: createElement,\n createElementNS: createElementNS,\n createTextNode: createTextNode,\n createComment: createComment,\n insertBefore: insertBefore,\n removeChild: removeChild,\n appendChild: appendChild,\n parentNode: parentNode,\n nextSibling: nextSibling,\n tagName: tagName,\n setTextContent: setTextContent,\n getTextContent: getTextContent,\n isElement: isElement,\n isText: isText,\n isComment: isComment,\n};\nexport default htmlDomApi;\n//# sourceMappingURL=htmldomapi.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/~/snabbdom/es/htmldomapi.js\n// module id = 277\n// module chunks = 0","import { h } from './h';\nfunction copyToThunk(vnode, thunk) {\n thunk.elm = vnode.elm;\n vnode.data.fn = thunk.data.fn;\n vnode.data.args = thunk.data.args;\n thunk.data = vnode.data;\n thunk.children = vnode.children;\n thunk.text = vnode.text;\n thunk.elm = vnode.elm;\n}\nfunction init(thunk) {\n var cur = thunk.data;\n var vnode = cur.fn.apply(undefined, cur.args);\n copyToThunk(vnode, thunk);\n}\nfunction prepatch(oldVnode, thunk) {\n var i, old = oldVnode.data, cur = thunk.data;\n var oldArgs = old.args, args = cur.args;\n if (old.fn !== cur.fn || oldArgs.length !== args.length) {\n copyToThunk(cur.fn.apply(undefined, args), thunk);\n return;\n }\n for (i = 0; i < args.length; ++i) {\n if (oldArgs[i] !== args[i]) {\n copyToThunk(cur.fn.apply(undefined, args), thunk);\n return;\n }\n }\n copyToThunk(oldVnode, thunk);\n}\nexport var thunk = function thunk(sel, key, fn, args) {\n if (args === undefined) {\n args = fn;\n fn = key;\n key = undefined;\n }\n return h(sel, {\n key: key,\n hook: { init: init, prepatch: prepatch },\n fn: fn,\n args: args\n });\n};\nexport default thunk;\n//# sourceMappingURL=thunk.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/~/snabbdom/es/thunk.js\n// module id = 278\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar xlinkNS = 'http://www.w3.org/1999/xlink';\nvar xmlNS = 'http://www.w3.org/XML/1998/namespace';\nvar colonChar = 58;\nvar xChar = 120;\nfunction updateAttrs(oldVnode, vnode) {\n var key, elm = vnode.elm, oldAttrs = oldVnode.data.attrs, attrs = vnode.data.attrs;\n if (!oldAttrs && !attrs)\n return;\n if (oldAttrs === attrs)\n return;\n oldAttrs = oldAttrs || {};\n attrs = attrs || {};\n // update modified attributes, add new attributes\n for (key in attrs) {\n var cur = attrs[key];\n var old = oldAttrs[key];\n if (old !== cur) {\n if (cur === true) {\n elm.setAttribute(key, \"\");\n }\n else if (cur === false) {\n elm.removeAttribute(key);\n }\n else {\n if (key.charCodeAt(0) !== xChar) {\n elm.setAttribute(key, cur);\n }\n else if (key.charCodeAt(3) === colonChar) {\n // Assume xml namespace\n elm.setAttributeNS(xmlNS, key, cur);\n }\n else if (key.charCodeAt(5) === colonChar) {\n // Assume xlink namespace\n elm.setAttributeNS(xlinkNS, key, cur);\n }\n else {\n elm.setAttribute(key, cur);\n }\n }\n }\n }\n // remove removed attributes\n // use `in` operator since the previous `for` iteration uses it (.i.e. add even attributes with undefined value)\n // the other option is to remove all attributes with value == undefined\n for (key in oldAttrs) {\n if (!(key in attrs)) {\n elm.removeAttribute(key);\n }\n }\n}\nexports.attributesModule = { create: updateAttrs, update: updateAttrs };\nexports.default = exports.attributesModule;\n//# sourceMappingURL=attributes.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/~/snabbdom/modules/attributes.js\n// module id = 279\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction updateClass(oldVnode, vnode) {\n var cur, name, elm = vnode.elm, oldClass = oldVnode.data.class, klass = vnode.data.class;\n if (!oldClass && !klass)\n return;\n if (oldClass === klass)\n return;\n oldClass = oldClass || {};\n klass = klass || {};\n for (name in oldClass) {\n if (!klass[name]) {\n elm.classList.remove(name);\n }\n }\n for (name in klass) {\n cur = klass[name];\n if (cur !== oldClass[name]) {\n elm.classList[cur ? 'add' : 'remove'](name);\n }\n }\n}\nexports.classModule = { create: updateClass, update: updateClass };\nexports.default = exports.classModule;\n//# sourceMappingURL=class.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/~/snabbdom/modules/class.js\n// module id = 280\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction invokeHandler(handler, vnode, event) {\n if (typeof handler === \"function\") {\n // call function handler\n handler.call(vnode, event, vnode);\n }\n else if (typeof handler === \"object\") {\n // call handler with arguments\n if (typeof handler[0] === \"function\") {\n // special case for single argument for performance\n if (handler.length === 2) {\n handler[0].call(vnode, handler[1], event, vnode);\n }\n else {\n var args = handler.slice(1);\n args.push(event);\n args.push(vnode);\n handler[0].apply(vnode, args);\n }\n }\n else {\n // call multiple handlers\n for (var i = 0; i < handler.length; i++) {\n invokeHandler(handler[i]);\n }\n }\n }\n}\nfunction handleEvent(event, vnode) {\n var name = event.type, on = vnode.data.on;\n // call event handler(s) if exists\n if (on && on[name]) {\n invokeHandler(on[name], vnode, event);\n }\n}\nfunction createListener() {\n return function handler(event) {\n handleEvent(event, handler.vnode);\n };\n}\nfunction updateEventListeners(oldVnode, vnode) {\n var oldOn = oldVnode.data.on, oldListener = oldVnode.listener, oldElm = oldVnode.elm, on = vnode && vnode.data.on, elm = (vnode && vnode.elm), name;\n // optimization for reused immutable handlers\n if (oldOn === on) {\n return;\n }\n // remove existing listeners which no longer used\n if (oldOn && oldListener) {\n // if element changed or deleted we remove all existing listeners unconditionally\n if (!on) {\n for (name in oldOn) {\n // remove listener if element was changed or existing listeners removed\n oldElm.removeEventListener(name, oldListener, false);\n }\n }\n else {\n for (name in oldOn) {\n // remove listener if existing listener removed\n if (!on[name]) {\n oldElm.removeEventListener(name, oldListener, false);\n }\n }\n }\n }\n // add new listeners which has not already attached\n if (on) {\n // reuse existing listener or create new\n var listener = vnode.listener = oldVnode.listener || createListener();\n // update vnode for listener\n listener.vnode = vnode;\n // if element changed or added we add all needed listeners unconditionally\n if (!oldOn) {\n for (name in on) {\n // add listener if element was changed or new listeners added\n elm.addEventListener(name, listener, false);\n }\n }\n else {\n for (name in on) {\n // add listener if new listener added\n if (!oldOn[name]) {\n elm.addEventListener(name, listener, false);\n }\n }\n }\n }\n}\nexports.eventListenersModule = {\n create: updateEventListeners,\n update: updateEventListeners,\n destroy: updateEventListeners\n};\nexports.default = exports.eventListenersModule;\n//# sourceMappingURL=eventlisteners.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/~/snabbdom/modules/eventlisteners.js\n// module id = 281\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction updateProps(oldVnode, vnode) {\n var key, cur, old, elm = vnode.elm, oldProps = oldVnode.data.props, props = vnode.data.props;\n if (!oldProps && !props)\n return;\n if (oldProps === props)\n return;\n oldProps = oldProps || {};\n props = props || {};\n for (key in oldProps) {\n if (!props[key]) {\n delete elm[key];\n }\n }\n for (key in props) {\n cur = props[key];\n old = oldProps[key];\n if (old !== cur && (key !== 'value' || elm[key] !== cur)) {\n elm[key] = cur;\n }\n }\n}\nexports.propsModule = { create: updateProps, update: updateProps };\nexports.default = exports.propsModule;\n//# sourceMappingURL=props.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/~/snabbdom/modules/props.js\n// module id = 282\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar raf = (typeof window !== 'undefined' && window.requestAnimationFrame) || setTimeout;\nvar nextFrame = function (fn) { raf(function () { raf(fn); }); };\nfunction setNextFrame(obj, prop, val) {\n nextFrame(function () { obj[prop] = val; });\n}\nfunction updateStyle(oldVnode, vnode) {\n var cur, name, elm = vnode.elm, oldStyle = oldVnode.data.style, style = vnode.data.style;\n if (!oldStyle && !style)\n return;\n if (oldStyle === style)\n return;\n oldStyle = oldStyle || {};\n style = style || {};\n var oldHasDel = 'delayed' in oldStyle;\n for (name in oldStyle) {\n if (!style[name]) {\n if (name[0] === '-' && name[1] === '-') {\n elm.style.removeProperty(name);\n }\n else {\n elm.style[name] = '';\n }\n }\n }\n for (name in style) {\n cur = style[name];\n if (name === 'delayed' && style.delayed) {\n for (var name2 in style.delayed) {\n cur = style.delayed[name2];\n if (!oldHasDel || cur !== oldStyle.delayed[name2]) {\n setNextFrame(elm.style, name2, cur);\n }\n }\n }\n else if (name !== 'remove' && cur !== oldStyle[name]) {\n if (name[0] === '-' && name[1] === '-') {\n elm.style.setProperty(name, cur);\n }\n else {\n elm.style[name] = cur;\n }\n }\n }\n}\nfunction applyDestroyStyle(vnode) {\n var style, name, elm = vnode.elm, s = vnode.data.style;\n if (!s || !(style = s.destroy))\n return;\n for (name in style) {\n elm.style[name] = style[name];\n }\n}\nfunction applyRemoveStyle(vnode, rm) {\n var s = vnode.data.style;\n if (!s || !s.remove) {\n rm();\n return;\n }\n var name, elm = vnode.elm, i = 0, compStyle, style = s.remove, amount = 0, applied = [];\n for (name in style) {\n applied.push(name);\n elm.style[name] = style[name];\n }\n compStyle = getComputedStyle(elm);\n var props = compStyle['transition-property'].split(', ');\n for (; i < props.length; ++i) {\n if (applied.indexOf(props[i]) !== -1)\n amount++;\n }\n elm.addEventListener('transitionend', function (ev) {\n if (ev.target === elm)\n --amount;\n if (amount === 0)\n rm();\n });\n}\nexports.styleModule = {\n create: updateStyle,\n update: updateStyle,\n destroy: applyDestroyStyle,\n remove: applyRemoveStyle\n};\nexports.default = exports.styleModule;\n//# sourceMappingURL=style.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprotty/~/snabbdom/modules/style.js\n// module id = 283\n// module chunks = 0","/*******************************************************************************\n * Copyright (c) 2018 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * Obeo - initial API and implementation\n *******************************************************************************/\nimport { Action } from 'sprotty/lib';\n\n/**\n * Action used to execute container creation tools.\n *\n * @sbegaudeau\n */\nexport class ExecuteContainerCreationToolAction implements Action {\n\n /**\n * The kind of the action.\n */\n public static readonly KIND = 'executeContainerCreationTool';\n\n /**\n * The type of the action.\n */\n public static readonly TYPE = 'ContainerCreationDescriptionImpl';\n\n /**\n * The kind of the action.\n */\n public readonly kind = ExecuteContainerCreationToolAction.KIND;\n\n /**\n * The name of the container creation tool to execute.\n */\n public readonly toolName: string;\n\n /**\n * The constructor.\n * @param toolName The name of the tool to execute\n */\n constructor(toolName: string) {\n this.toolName = toolName;\n }\n\n}\n\n\n// WEBPACK FOOTER //\n// ./src/actions/execute-container-creation-tool-action.ts","/*******************************************************************************\r\n * Copyright (c) 2018 Obeo.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n * Obeo - initial API and implementation\r\n *******************************************************************************/\r\nimport { Action } from 'sprotty/lib';\r\n\r\n/**\r\n * Action used to execute node creation tools.\r\n *\r\n * @gcoutable\r\n */\r\nexport class ExecuteNodeCreationToolAction implements Action {\r\n\r\n /**\r\n * The kind of the action.\r\n */\r\n public static readonly KIND = 'executeNodeCreationTool';\r\n\r\n /**\r\n * The type of the action.\r\n */\r\n public static readonly TYPE = 'NodeCreationDescriptionImpl';\r\n\r\n /**\r\n * The kind of the action.\r\n */\r\n public readonly kind = ExecuteNodeCreationToolAction.KIND;\r\n\r\n /**\r\n * The name of the node creation tool to execute.\r\n */\r\n public readonly toolName: string;\r\n\r\n /**\r\n * The constructor.\r\n * @param toolName The name of the tool to execute\r\n */\r\n constructor(toolName: string) {\r\n this.toolName = toolName;\r\n }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/actions/execute-node-creation-tool-action.ts","/*******************************************************************************\n * Copyright (c) 2018 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * Obeo - initial API and implementation\n *******************************************************************************/\nimport { Action } from 'sprotty/lib';\n\n/**\n * Action used to generic tools.\n *\n * @sbegaudeau\n */\nexport class ExecuteToolAction implements Action {\n\n /**\n * The kind of the action.\n */\n public static readonly KIND = 'executeTool';\n\n /**\n * The type of the action.\n */\n public static readonly TYPE = 'ToolDescriptionImpl';\n\n /**\n * The kind of the action.\n */\n public readonly kind = ExecuteToolAction.KIND;\n\n /**\n * The name of the tool to execute.\n */\n public readonly toolName: string;\n\n /**\n * The constructor.\n * @param toolName The name of the tool to execute\n */\n constructor(toolName: string) {\n this.toolName = toolName;\n }\n\n}\n\n\n// WEBPACK FOOTER //\n// ./src/actions/execute-tool-action.ts","/*******************************************************************************\n * Copyright (c) 2018 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * Obeo - initial API and implementation\n *******************************************************************************/\nimport { Action } from 'sprotty/lib';\n\n/**\n * Action used to retrieve the layers of the diagram.\n *\n * @gcoutable\n */\nexport class RequestLayersAction implements Action {\n\n /**\n * The kind of the action.\n */\n public static readonly KIND = 'requestLayers';\n\n /**\n * The kind of the action.\n */\n public readonly kind = RequestLayersAction.KIND;\n}\n\n\n// WEBPACK FOOTER //\n// ./src/actions/request-layers-action.ts","/*******************************************************************************\n * Copyright (c) 2018 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * Obeo - initial API and implementation\n *******************************************************************************/\nimport { Action } from 'sprotty/lib';\n\n/**\n * Action used to retrieve the tools of the diagram.\n *\n * @gcoutable\n */\nexport class RequestToolsAction implements Action {\n\n /**\n * The kind of the action.\n */\n public static readonly KIND = 'requestTools';\n\n /**\n * The kind of the action.\n */\n public readonly kind = RequestToolsAction.KIND;\n}\n\n\n// WEBPACK FOOTER //\n// ./src/actions/request-tools-action.ts","/*******************************************************************************\r\n * Copyright (c) 2018 Obeo.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n * Obeo - initial API and implementation\r\n *******************************************************************************/\r\nimport { Action } from 'sprotty/lib';\r\n\r\nimport { Layer } from '../types/layer';\r\n\r\n/**\r\n * Action used to set the layers of the diagram.\r\n *\r\n * @gcoutable\r\n */\r\nexport class SetLayersAction implements Action {\r\n /**\r\n * The kind of the action.\r\n */\r\n public static readonly KIND = 'setLayers';\r\n\r\n /**\r\n * The kind of the action.\r\n */\r\n public readonly kind = SetLayersAction.KIND;\r\n\r\n /**\r\n * The layers of the diagram.\r\n */\r\n public readonly layers: [ Layer ];\r\n\r\n /**\r\n * The constructor.\r\n * @param layers The layers of the diagram\r\n */\r\n constructor(layers: [ Layer ]) {\r\n this.layers = layers;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/actions/set-layers-action.ts","/*******************************************************************************\r\n * Copyright (c) 2018 Obeo.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n * Obeo - initial API and implementation\r\n *******************************************************************************/\r\nimport { Action } from 'sprotty/lib';\r\n\r\nimport { Tool } from '../types/tool';\r\n\r\n/**\r\n * Action used to set the tools of the diagram.\r\n *\r\n * @gcoutable\r\n */\r\nexport class SetToolsAction implements Action {\r\n /**\r\n * The kind of the action.\r\n */\r\n public static readonly KIND = 'setTools';\r\n\r\n /**\r\n * The kind of the action.\r\n */\r\n public readonly kind = SetToolsAction.KIND;\r\n\r\n /**\r\n * The tools of the diagram.\r\n */\r\n public readonly tools: [ Tool ];\r\n\r\n /**\r\n * The constructor.\r\n * @param tools The tools of the diagram\r\n */\r\n constructor(tools: [ Tool ]) {\r\n this.tools = tools;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/actions/set-tools-action.ts","/*******************************************************************************\r\n * Copyright (c) 2018 Obeo.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n * Obeo - initial API and implementation\r\n *******************************************************************************/\r\nimport { Action } from 'sprotty/lib';\r\n\r\n/**\r\n * Action used to toggle a layer.\r\n *\r\n * @author gcoutable\r\n */\r\nexport class ToggleLayerAction implements Action {\r\n\r\n /**\r\n * The kind of the action.\r\n */\r\n public static readonly KIND: string = 'toggleLayer';\r\n\r\n /**\r\n * The kind of the action.\r\n */\r\n public readonly kind: string = ToggleLayerAction.KIND;\r\n\r\n /**\r\n * The name of the layer.\r\n */\r\n public readonly layerName: string;\r\n\r\n /**\r\n * The new state of the layer.\r\n */\r\n public readonly newState: boolean;\r\n\r\n /**\r\n * The constructor.\r\n * @param layerName The name of the layer\r\n * @param newState The new state of the layer\r\n */\r\n constructor(layerName: string, newState: boolean) {\r\n this.layerName = layerName;\r\n this.newState = newState;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/actions/toogle-layers-action.ts","/*******************************************************************************\n * Copyright (c) 2018 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * Obeo - initial API and implementation\n *******************************************************************************/\nimport { Action, ActionHandlerRegistry, IActionHandler, ICommand, RequestModelAction, TYPES, WebSocketDiagramServer } from 'sprotty/lib';\nimport { RequestLayersAction } from '../actions/request-layers-action';\nimport { RequestToolsAction } from '../actions/request-tools-action';\nimport { SetLayersAction } from '../actions/set-layers-action';\nimport { SetToolsAction } from '../actions/set-tools-action';\nimport { createContainer } from '../di.config';\nimport { SiriusWebSocketDiagramServer } from '../sirius-websocket-diagram-server';\nimport { Tool } from '../types/tool';\nimport { canHandleTool, cleanDOMElement, createDOMElementForLayers, createDOMElementsForTools } from './tools-utils';\n\nrequire('reconnecting-websocket');\n\nexport interface ISiriusAction<T extends Action> extends IActionHandler {\n handle(action: T): ICommand | Action | void;\n}\n\n/* tslint:disable */\nexport class SetLayersActionHandler implements ISiriusAction<SetLayersAction> {\n private readonly diagramServer: WebSocketDiagramServer;\n\n constructor(diagramServer: WebSocketDiagramServer) {\n this.diagramServer = diagramServer;\n }\n\n /**\n * Handles the given action received by the server.\n * @param action The action\n */\n public handle(action: SetLayersAction): void {\n this.handleSetLayersAction(action);\n }\n\n /**\n * Handles the set layers action.\n * @param action The action\n */\n private handleSetLayersAction(action: SetLayersAction) {\n cleanDOMElement(document.getElementById('layers-palette'));\n createDOMElementForLayers(this.diagramServer, action.layers);\n }\n}\n/* tslint:enable */\n\n/* tslint:disable */\nexport class SetToolsActionHandler implements ISiriusAction<SetToolsAction> {\n\n private readonly diagramServer: WebSocketDiagramServer;\n\n constructor(diagramServer: WebSocketDiagramServer) {\n this.diagramServer = diagramServer;\n }\n\n /**\n * Handles the given action received by the server.\n * @param action The action\n */\n handle(action: SetToolsAction): void {\n this.handleSetToolsAction(action);\n }\n\n /**\n * Handles the set tools action.\n * @param action The action\n */\n private handleSetToolsAction(action: SetToolsAction) {\n const tools: Array<Tool> = action.tools.filter((tool: Tool) => {\n return canHandleTool(tool);\n });\n cleanDOMElement(document.getElementById('tools-palette'));\n createDOMElementsForTools(this.diagramServer, tools);\n }\n}\n/* tslint:enable */\n\n/**\n * Creates the Sirius diagram and connect it to the server.\n *\n * @sbegaudeau\n */\nexport function initializeSiriusDiagram() {\n const websocket = new WebSocket('ws://' + window.location.host + '/diagrams/api');\n const container = createContainer('sprotty');\n\n const diagramServer = container.get<SiriusWebSocketDiagramServer>(TYPES.ModelSource);\n diagramServer.listen(websocket);\n\n const actionHandlerRegistry = container.get<ActionHandlerRegistry>(TYPES.ActionHandlerRegistry);\n actionHandlerRegistry.register(SetLayersAction.KIND, new SetLayersActionHandler(diagramServer));\n actionHandlerRegistry.register(SetToolsAction.KIND, new SetToolsActionHandler(diagramServer));\n\n // Connect to the diagram server\n websocket.addEventListener('open', event => {\n const url = new URL(window.location.href);\n const parameters = new URLSearchParams(url.search);\n const project: string = parameters.get('project') || '';\n const aird: string = parameters.get('aird') || '';\n const representationName: string = parameters.get('representationName') || '';\n\n diagramServer.clientId = `__PROJECT__${project}__AIRD__${aird}__REPRESENTATION__${representationName}__CLIENT_ID__${Math.random()}`;\n diagramServer.handle(new RequestToolsAction());\n diagramServer.handle(new RequestLayersAction());\n diagramServer.handle(new RequestModelAction({\n project,\n aird,\n representationName\n }));\n });\n}\n\n\n// WEBPACK FOOTER //\n// ./src/app/standalone.ts","/*******************************************************************************\r\n * Copyright (c) 2018 Obeo.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n * Obeo - initial API and implementation\r\n *******************************************************************************/\r\nimport { Action, WebSocketDiagramServer } from 'sprotty/lib';\r\nimport { ExecuteContainerCreationToolAction } from '../actions/execute-container-creation-tool-action';\r\nimport { ExecuteNodeCreationToolAction } from '../actions/execute-node-creation-tool-action';\r\nimport { ExecuteToolAction } from '../actions/execute-tool-action';\r\nimport { ToggleLayerAction } from '../actions/toogle-layers-action';\r\nimport { Layer } from '../types/layer';\r\nimport { Tool } from '../types/tool';\r\n\r\n\r\n/**\r\n * Indicates if the given tool is supported by the diagram.\r\n * @param tool The tool\r\n * @returns true if the tool is supported, false otherwise\r\n */\r\nexport function canHandleTool(tool: Tool): boolean {\r\n let canHandle = false;\r\n switch (tool.toolType) {\r\n case ExecuteNodeCreationToolAction.TYPE:\r\n canHandle = true;\r\n break;\r\n case ExecuteContainerCreationToolAction.TYPE:\r\n canHandle = true;\r\n break;\r\n case ExecuteToolAction.TYPE:\r\n canHandle = true;\r\n break;\r\n default:\r\n canHandle = false;\r\n break;\r\n }\r\n return canHandle;\r\n}\r\n\r\n/**\r\n * Creates the action for the given tool.\r\n * @param tool The tool\r\n * @returns The action used to run the given tool or null if the tool is not supported\r\n */\r\nfunction createToolAction(tool: Tool): Action | null {\r\n let action: Action | null = null;\r\n switch (tool.toolType) {\r\n case ExecuteNodeCreationToolAction.TYPE:\r\n action = new ExecuteNodeCreationToolAction(tool.id);\r\n break;\r\n case ExecuteContainerCreationToolAction.TYPE:\r\n action = new ExecuteContainerCreationToolAction(tool.id);\r\n break;\r\n case ExecuteToolAction.TYPE:\r\n action = new ExecuteToolAction(tool.id);\r\n default:\r\n break;\r\n }\r\n return action;\r\n}\r\n\r\n/**\r\n * Creates the action for the given layer.\r\n * @param layer The layer\r\n * @returns The action used to toggle the given layer\r\n */\r\nfunction createLayerAction(layer: Layer, newState: boolean): Action {\r\n return new ToggleLayerAction(layer.id, newState);\r\n}\r\n\r\n/**\r\n * Creates the DOM elements used to execute the given tools.\r\n * @param diagramServer The diagram server\r\n * @param tools The tools to display\r\n */\r\nexport function createDOMElementsForTools(diagramServer: WebSocketDiagramServer, tools: Array<Tool>): void {\r\n const toolPaletteElement = document.getElementById('tools-palette');\r\n if (toolPaletteElement !== null) {\r\n tools.forEach(tool => {\r\n const button = document.createElement('button');\r\n button.setAttribute('type', 'button');\r\n button.setAttribute('class', 'tool');\r\n const toolLabel = tool.name || tool.id;\r\n\r\n const image = document.createElement('img');\r\n\r\n // FIXME Change the computation of the tool image source\r\n let imageSource = 'assets/ToolDescription.gif';\r\n if (toolLabel.includes('Woman')) {\r\n imageSource = 'assets/woman.svg';\r\n } else if (toolLabel.includes('Man')) {\r\n imageSource = 'assets/man.svg';\r\n } else if (toolLabel.includes('New customer')) {\r\n imageSource = 'assets/LaneSet.png';\r\n } else if (toolLabel.includes('Start')) {\r\n imageSource = 'assets/start.svg';\r\n } else if (toolLabel.includes('Select')) {\r\n imageSource = 'assets/Task.svg';\r\n } else if (toolLabel.includes('Order')) {\r\n imageSource = 'assets/Task.svg';\r\n } else if (toolLabel.includes('Wait')) {\r\n imageSource = 'assets/event-based-gateway.svg';\r\n } else if (toolLabel.includes('Eat')) {\r\n imageSource = 'assets/end.svg';\r\n }\r\n\r\n image.setAttribute('src', imageSource);\r\n button.appendChild(image);\r\n\r\n const label = document.createElement('label');\r\n label.textContent = toolLabel;\r\n button.appendChild(label);\r\n\r\n button.addEventListener('click', (event) => {\r\n const toolAction = createToolAction(tool);\r\n if (toolAction !== null) {\r\n diagramServer.handle(toolAction);\r\n }\r\n });\r\n toolPaletteElement.appendChild(button);\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Creates the DOM elements used to activate or deactivate layers.\r\n * @param diagramServer The diagram server\r\n * @param layers The layers to display\r\n */\r\nexport function createDOMElementForLayers(diagramServer: WebSocketDiagramServer, layers: Array<Layer>): void {\r\n const layerPaletteElement = document.getElementById('layers-palette');\r\n if (layerPaletteElement != null) {\r\n layers.forEach((layer: Layer) => {\r\n const layerId = `layer-${layer.id}`;\r\n const layerContainerElement = document.createElement('div');\r\n layerContainerElement.setAttribute('class', 'layer');\r\n\r\n const layerLabelElement = document.createElement('label');\r\n layerLabelElement.setAttribute('for', layerId);\r\n layerLabelElement.textContent = `${layer.name || layer.id} `;\r\n layerContainerElement.appendChild(layerLabelElement);\r\n\r\n const layerCheckboxElement = document.createElement('input');\r\n layerCheckboxElement.setAttribute('type', 'checkbox');\r\n if (layer.isActive) {\r\n layerCheckboxElement.setAttribute('checked', 'checked');\r\n }\r\n layerCheckboxElement.setAttribute('id', layerId);\r\n layerCheckboxElement.addEventListener('click', event => {\r\n const eventTarget = event.target as HTMLInputElement;\r\n const layerAction = createLayerAction(layer, eventTarget.checked);\r\n if (layerAction !== null) {\r\n diagramServer.handle(layerAction);\r\n }\r\n });\r\n layerContainerElement.appendChild(layerCheckboxElement);\r\n layerPaletteElement.appendChild(layerContainerElement);\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Cleans the content of the HTMLElement.\r\n * @param element The HTMLElement\r\n */\r\nexport function cleanDOMElement(element: HTMLElement | null): void {\r\n if (element !== null) {\r\n for (const index = 0; index < element.children.length;) {\r\n const item = element.children.item(index);\r\n element.removeChild(item);\r\n }\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/app/tools-utils.ts","/*******************************************************************************\n * Copyright (c) 2018 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * Obeo - initial API and implementation\n *******************************************************************************/\nimport { Container, ContainerModule } from 'inversify';\n\nimport {\n boundsModule,\n defaultModule,\n exportModule,\n hoverModule,\n moveModule,\n selectModule,\n undoRedoModule,\n viewportModule,\n overrideViewerOptions,\n ConsoleLogger,\n LogLevel,\n ViewRegistry,\n TYPES,\n HtmlRootView,\n PreRenderedView,\n SCompartmentView,\n SGraphView,\n SLabelView\n} from 'sprotty/lib';\n\nimport { SiriusEdgeView } from './views/sirius-edge-view';\nimport { SiriusFreeFormFlatContainerNodeView } from './views/sirius-free-form-flat-container-node-view';\nimport { SiriusListFlatContainerNodeView } from './views/sirius-list-flat-container-node-view';\nimport { SiriusSquareBorderNodeView } from './views/sirius-square-border-node-view';\nimport { SiriusSvgBorderNodeView } from './views/sirius-svg-border-node-view';\nimport { SiriusLabelView } from './views/sirius-label-view';\nimport { SiriusSquareNodeView } from './views/sirius-square-node-view';\nimport { SiriusSVGNodeView } from './views/sirius-svg-node-view';\n\nimport { SiriusGraphFactory } from './sirius-graph-factory';\n\nimport { siriusPopupModelFactory } from './popup';\nimport { SiriusWebSocketDiagramServer } from './sirius-websocket-diagram-server';\n\nconst siriusContainerModule = new ContainerModule((bind, unbind, isBound, rebind) => {\n rebind(TYPES.ILogger)\n .to(ConsoleLogger)\n .inSingletonScope();\n rebind(TYPES.LogLevel).toConstantValue(LogLevel.log);\n rebind(TYPES.IModelFactory)\n .to(SiriusGraphFactory)\n .inSingletonScope();\n bind(TYPES.PopupModelFactory).toConstantValue(siriusPopupModelFactory);\n});\n\n/**\n * Create the dependency injection container.\n * @param containerId The identifier of the container\n */\nexport const createContainer = (containerId: string) => {\n const container = new Container();\n container.load(\n defaultModule,\n selectModule,\n moveModule,\n boundsModule,\n undoRedoModule,\n viewportModule,\n hoverModule,\n exportModule,\n siriusContainerModule\n );\n\n container\n .bind(TYPES.ModelSource)\n .to(SiriusWebSocketDiagramServer)\n .inSingletonScope();\n\n overrideViewerOptions(container, {\n needsClientLayout: true,\n needsServerLayout: true,\n baseDiv: containerId,\n hiddenDiv: containerId + '-hidden'\n });\n\n const viewRegistry = container.get<ViewRegistry>(TYPES.ViewRegistry);\n viewRegistry.register('graph', SGraphView);\n\n viewRegistry.register('node:square', SiriusSquareNodeView);\n viewRegistry.register('node:svg', SiriusSVGNodeView);\n viewRegistry.register('port:square', SiriusSquareBorderNodeView);\n viewRegistry.register('port:image', SiriusSvgBorderNodeView);\n viewRegistry.register('node:freeformflatcontainer', SiriusFreeFormFlatContainerNodeView);\n viewRegistry.register('node:listflatcontainer', SiriusListFlatContainerNodeView);\n viewRegistry.register('comp:listflatcontainer_label', SCompartmentView);\n viewRegistry.register('comp:listflatcontainer_body', SCompartmentView);\n\n viewRegistry.register('edge:straight', SiriusEdgeView);\n\n viewRegistry.register('label:inside-left', SiriusLabelView);\n viewRegistry.register('label:inside-center', SiriusLabelView);\n viewRegistry.register('label:inside-right', SiriusLabelView);\n viewRegistry.register('label:outside-left', SiriusLabelView);\n viewRegistry.register('label:outside-center', SiriusLabelView);\n viewRegistry.register('label:outside-right', SiriusLabelView);\n\n viewRegistry.register('label:text', SLabelView);\n viewRegistry.register('comp:main', SCompartmentView);\n viewRegistry.register('html', HtmlRootView);\n viewRegistry.register('pre-rendered', PreRenderedView);\n\n return container;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/di.config.ts","/*******************************************************************************\n * Copyright (c) 2018 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * Obeo - initial API and implementation\n *******************************************************************************/\nimport {\n SModelElementSchema,\n SModelRootSchema,\n RequestPopupModelAction,\n PreRenderedElementSchema\n} from 'sprotty/lib';\n\n/**\n * Creates a popup for the given action.\n * @param request The request popup model action\n * @param element The model element schema\n */\nexport const siriusPopupModelFactory = (request: RequestPopupModelAction, element?: SModelElementSchema): SModelRootSchema | undefined => {\n if (element !== undefined && element.type === 'node:svg') {\n return {\n type: 'html',\n id: 'popup',\n children: [\n <PreRenderedElementSchema> {\n type: 'pre-rendered',\n id: 'popup-title',\n code: `<div class=\"popup-title\">Class ${element.id === 'node0' ? 'Foo' : 'Bar'}</div>`\n },\n <PreRenderedElementSchema> {\n type: 'pre-rendered',\n id: 'popup-body',\n code: '<div class=\"popup-body\">Hello World</div>'\n }\n ]\n };\n }\n return undefined;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/popup.ts","/*******************************************************************************\n * Copyright (c) 2018 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * Obeo - initial API and implementation\n *******************************************************************************/\nimport {\n getBasicType,\n HtmlRoot,\n HtmlRootSchema,\n SChildElement,\n SGraphFactory,\n SModelElementSchema,\n SModelRootSchema,\n SModelRoot,\n SParentElement,\n PreRenderedElement,\n PreRenderedElementSchema\n} from 'sprotty/lib';\n\n/**\n * The Sirius graph factory used to create all the graph elements.\n *\n * @sbegaudeau\n */\nexport class SiriusGraphFactory extends SGraphFactory {\n /**\n * Creates the element with the given schema.\n * @param schema The model element schema\n * @param parent The parent element\n */\n public createElement(schema: SModelElementSchema, parent?: SParentElement): SChildElement {\n /*if (this.isNodeSchema(schema)) {\n return this.initializeChild(new SiriusNode(), schema, parent)\n } else */\n if (this.isPreRenderedSchema(schema)) {\n return this.initializeChild(new PreRenderedElement(), schema, parent);\n } else {\n return super.createElement(schema, parent);\n }\n }\n\n /**\n * Creates the root for the given schema.\n * @param schema The schema\n */\n public createRoot(schema: SModelRootSchema): SModelRoot {\n if (this.isHtmlRootSchema(schema)) {\n return this.initializeRoot(new HtmlRoot(), schema);\n } else {\n return super.createRoot(schema);\n }\n }\n\n /**\n * Indicates if the given schema is an HTML root schema.\n * @param schema The model root schema\n */\n public isHtmlRootSchema(schema: SModelRootSchema): schema is HtmlRootSchema {\n return getBasicType(schema) === 'html';\n }\n\n /**\n * Indicates if the given schema is a pre-rendered schema.\n * @param schema The model element schema\n */\n public isPreRenderedSchema(schema: SModelElementSchema): schema is PreRenderedElementSchema {\n return getBasicType(schema) === 'pre-rendered';\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/sirius-graph-factory.ts","/*******************************************************************************\r\n * Copyright (c) 2018 Obeo.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n * Obeo - initial API and implementation\r\n *******************************************************************************/\r\nimport { Action, ActionHandlerRegistry, WebSocketDiagramServer } from 'sprotty/lib';\r\n\r\n\r\n/**\r\n * The Sirius WebSocket diagram server used to communicate with the remote server.\r\n *\r\n * @gcoutable\r\n */\r\nexport class SiriusWebSocketDiagramServer extends WebSocketDiagramServer {\r\n\r\n /**\r\n * Initializes the given action handler registry.\r\n * @param registry The action handler registry\r\n */\r\n public initialize(registry: ActionHandlerRegistry): void {\r\n super.initialize(registry);\r\n }\r\n\r\n /**\r\n * Handles the given action received by the server.\r\n * @param action The action\r\n */\r\n public handle(action: Action) {\r\n switch (action.kind) {\r\n default:\r\n super.handle(action);\r\n break;\r\n }\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/sirius-websocket-diagram-server.ts","/*******************************************************************************\n * Copyright (c) 2018 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * Obeo - initial API and implementation\n *******************************************************************************/\nimport {\n PolylineEdgeView,\n RenderingContext,\n SEdge,\n Point,\n toDegrees,\n angle\n} from 'sprotty/lib';\n\nimport { VNode } from 'snabbdom/vnode';\nimport * as snabbdom from 'snabbdom-jsx';\n\nconst JSX = {createElement: snabbdom.svg};\n\n/**\n * The view used to display Sirius edges.\n *\n * @sbegaudeau\n */\nexport class SiriusEdgeView extends PolylineEdgeView {\n /**\n * Renders the line of the edge with a specific style configured.\n * @param edge The edge\n * @param segments The segments\n * @param context The context\n */\n protected renderLine(edge: SEdge, segments: Point[], context: RenderingContext): VNode {\n const style: string = (edge as any ).style;\n\n const firstPoint = segments[0];\n let path = `M ${firstPoint.x},${firstPoint.y}`;\n for (let i = 1; i < segments.length; i++) {\n const p = segments[i];\n path += ` L ${p.x},${p.y}`;\n }\n return <path class-sprotty-edge={true} d={path} style={JSON.parse(style)}/>;\n }\n\n /**\n * Renders additionals element for the given Edge. This method is overriden in order to let\n * us add decorators to the beggining or the end of the edge (to create an arrow for example).\n * @param edge The edge\n * @param segments The segments\n * @param context The context\n */\n protected renderAdditionals(edge: SEdge, segments: Point[], context: RenderingContext): VNode[] {\n const style: string = (edge as any).style;\n const styleObject = JSON.parse(style);\n styleObject.fill = styleObject.stroke;\n\n const p1 = segments[segments.length - 2];\n const p2 = segments[segments.length - 1];\n return [\n <path class-edge={true}\n class-arrow={true} d=\"M 0,0 L 6,-3 L 6,3 Z\"\n transform={`rotate(${toDegrees(angle(p2, p1))} ${p2.x} ${p2.y}) translate(${p2.x} ${p2.y})`}\n style={styleObject} />\n ];\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/views/sirius-edge-view.tsx","/*******************************************************************************\n * Copyright (c) 2018 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * Obeo - initial API and implementation\n *******************************************************************************/\nimport {\n RenderingContext,\n SNode,\n RectangularNodeView\n} from 'sprotty/lib';\n\nimport { VNode } from 'snabbdom/vnode';\nimport * as snabbdom from 'snabbdom-jsx';\n\nconst JSX = {createElement: snabbdom.svg};\n\n/**\n * The view used to display free form containers with a flat style.\n *\n * @sbegaudeau\n */\nexport class SiriusFreeFormFlatContainerNodeView extends RectangularNodeView {\n /**\n * Renders the given node in the context.\n * @param node The node\n * @param context The context\n */\n public render(node: SNode, context: RenderingContext): VNode {\n const style: string = (node as any ).style;\n\n return (\n <g>\n <rect class-selected={node.selected}\n class-mouseover={node.hoverFeedback}\n x={0} y={0}\n rx=\"5\" ry=\"5\"\n width={Math.max(0, node.bounds.width)}\n height={Math.max(0, node.bounds.height)}\n style={JSON.parse(style)} />\n {context.renderChildren(node)}\n </g>\n );\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/views/sirius-free-form-flat-container-node-view.tsx","/*******************************************************************************\n * Copyright (c) 2018 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * Obeo - initial API and implementation\n *******************************************************************************/\nimport {\n RenderingContext,\n SLabel,\n SLabelView,\n getSubType,\n setAttr\n} from 'sprotty/lib';\n\nimport { VNode } from 'snabbdom/vnode';\nimport * as snabbdom from 'snabbdom-jsx';\n\nconst JSX = {createElement: snabbdom.svg};\n\n/**\n * The view used to display labels.\n *\n * @sbegaudeau\n */\nexport class SiriusLabelView extends SLabelView {\n /**\n * Renders the given label in the context.\n * @param label The label\n * @param context The context\n */\n public render(label: SLabel, context: RenderingContext): VNode {\n const style: string = (label as any).style;\n const styleObject = JSON.parse(style);\n\n const vnode = <text class-sprotty-label={true} style={styleObject}>{label.text}</text>;\n const subType = getSubType(label);\n if (subType) {\n setAttr(vnode, 'class', subType);\n }\n return vnode;\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/views/sirius-label-view.tsx","/*******************************************************************************\n * Copyright (c) 2018 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * Obeo - initial API and implementation\n *******************************************************************************/\nimport {\n RenderingContext,\n SNode,\n RectangularNodeView\n} from 'sprotty/lib';\n\nimport { VNode } from 'snabbdom/vnode';\nimport * as snabbdom from 'snabbdom-jsx';\n\nconst JSX = {createElement: snabbdom.svg};\n\n/**\n * The view used to display list containers with a flat style.\n *\n * @sbegaudeau\n */\nexport class SiriusListFlatContainerNodeView extends RectangularNodeView {\n /**\n * Renders the given node in the context.\n * @param node The node\n * @param context The context\n */\n public render(node: SNode, context: RenderingContext): VNode {\n const style: string = (node as any ).style;\n\n return (\n <g>\n <rect class-selected={node.selected}\n class-mouseover={node.hoverFeedback}\n x={0} y={0}\n rx=\"5\" ry=\"5\"\n width={Math.max(0, node.bounds.width)}\n height={Math.max(0, node.bounds.height)}\n style={JSON.parse(style)} />\n {context.renderChildren(node)}\n </g>\n );\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/views/sirius-list-flat-container-node-view.tsx","/*******************************************************************************\n * Copyright (c) 2018 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * Obeo - initial API and implementation\n *******************************************************************************/\nimport {\n RenderingContext,\n SPort,\n RectangularNodeView\n} from 'sprotty/lib';\n\nimport { VNode } from 'snabbdom/vnode';\nimport * as snabbdom from 'snabbdom-jsx';\n\nconst JSX = {createElement: snabbdom.svg};\n\n/**\n * The view used to display a border node nodes with a square style.\n *\n * @hmarchadour\n */\nexport class SiriusSquareBorderNodeView extends RectangularNodeView {\n /**\n * Renders the given port in the context.\n * @param port The port\n * @param context The context\n */\n public render(port: SPort, context: RenderingContext): VNode {\n const style: string = (port as any ).style;\n return (\n <g>\n <rect\n class-selected={port.selected}\n class-mouseover={port.hoverFeedback}\n x={0} y ={0}\n width={Math.max(5, port.bounds.width)}\n height={Math.max(5, port.bounds.height)}\n style={JSON.parse(style)} />\n {context.renderChildren(port)}\n </g>\n );\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/views/sirius-square-border-node-view.tsx","/*******************************************************************************\n * Copyright (c) 2018 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * Obeo - initial API and implementation\n *******************************************************************************/\nimport {\n RenderingContext,\n SNode,\n RectangularNodeView\n} from 'sprotty/lib';\n\nimport { VNode } from 'snabbdom/vnode';\nimport * as snabbdom from 'snabbdom-jsx';\n\nconst JSX = {createElement: snabbdom.svg};\n\n/**\n * The view used to display nodes with a square style.\n *\n * @sbegaudeau\n */\nexport class SiriusSquareNodeView extends RectangularNodeView {\n /**\n * Renders the given node in the context.\n * @param node The node\n * @param context The context\n */\n public render(node: SNode, context: RenderingContext): VNode {\n const style: string = (node as any ).style;\n\n return (\n <g>\n <rect class-selected={node.selected}\n class-mouseover={node.hoverFeedback}\n x={0} y={0}\n rx=\"5\" ry=\"5\"\n width={Math.max(0, node.bounds.width)}\n height={Math.max(0, node.bounds.height)}\n style={JSON.parse(style)} />\n {context.renderChildren(node)}\n </g>\n );\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/views/sirius-square-node-view.tsx","/*******************************************************************************\n * Copyright (c) 2018 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * Obeo - initial API and implementation\n *******************************************************************************/\nimport {\n RenderingContext,\n SPort,\n RectangularNodeView\n} from 'sprotty/lib';\n\nimport { VNode } from 'snabbdom/vnode';\nimport * as snabbdom from 'snabbdom-jsx';\n\nconst JSX = {createElement: snabbdom.svg};\n\n/**\n * The view used to display an SVG border node.\n *\n * @hmarchadour\n */\nexport class SiriusSvgBorderNodeView extends RectangularNodeView {\n /**\n * Renders the given port in the context.\n * @param port The port\n * @param context The context\n */\n public render(port: SPort, context: RenderingContext): VNode {\n const url = (port as any).url;\n return (\n <g>\n <image x=\"0\" y=\"0\" height=\"10\" width=\"10\" href={url}/>\n </g>\n );\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/views/sirius-svg-border-node-view.tsx","/*******************************************************************************\n * Copyright (c) 2018 Obeo.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * Obeo - initial API and implementation\n *******************************************************************************/\nimport {\n RenderingContext,\n SNode,\n RectangularNodeView\n} from 'sprotty/lib';\n\nimport { VNode } from 'snabbdom/vnode';\nimport * as snabbdom from 'snabbdom-jsx';\n\nconst JSX = {createElement: snabbdom.svg};\n\n/**\n * The view used to display nodes with an SVG image.\n */\nexport class SiriusSVGNodeView extends RectangularNodeView {\n /**\n * Renders the given node in the context.\n * @param node The node\n * @param context The context\n */\n public render(node: SNode, context: RenderingContext): VNode {\n const svgData = (node as any).svgData;\n return (\n <g>\n <image x=\"0\" y=\"0\" href={`data:image/svg+xml;utf,${svgData}`} width={30} height={30}></image>\n {context.renderChildren(node)}\n </g>\n );\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/views/sirius-svg-node-view.tsx","/**\n * This file automatically generated from `pre-publish.js`.\n * Do not manually edit.\n */\n\nmodule.exports = {\n \"area\": true,\n \"base\": true,\n \"br\": true,\n \"col\": true,\n \"embed\": true,\n \"hr\": true,\n \"img\": true,\n \"input\": true,\n \"keygen\": true,\n \"link\": true,\n \"menuitem\": true,\n \"meta\": true,\n \"param\": true,\n \"source\": true,\n \"track\": true,\n \"wbr\": true\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/void-elements/index.js\n// module id = 306\n// module chunks = 0","module.exports = function() {\r\n\tthrow new Error(\"define cannot be used indirect\");\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/amd-define.js\n// module id = 307\n// module chunks = 0","/* globals __webpack_amd_options__ */\r\nmodule.exports = __webpack_amd_options__;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/amd-options.js\n// module id = 308\n// module chunks = 0","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 309\n// module chunks = 0"],"sourceRoot":""}
\ No newline at end of file diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/css/diagram.css b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/css/diagram.css new file mode 100644 index 0000000000..607cb67654 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/css/diagram.css @@ -0,0 +1,156 @@ +/******************************************************************************* + * Copyright (c) 2018 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ + +.component { + fill: #ECF0F1; + stroke: #3498DB; + stroke-width: 1; + font-weight: bold; + border-radius: 15px; + + /* properties for vbox */ + line-height: 10px; + padding: 10px; + text-align: center; +} +.component.mouseover { + stroke: #2980B9; + stroke-width: 2; +} +.component.selected { + stroke: #2980B9; + stroke-width: 4; +} +.component > .heading { + stroke: #2980B9; + fill: #2980B9; + font-size: 11pt; + stroke-width: 0; + font-weight: bold; + text-align: center; +} + +.service { + fill: #FCFFF5; + stroke: #45BF55; + stroke-width: 1; + font-weight: bold; + + /* properties for vbox */ + line-height: 10px; + padding: 10px; + text-align: center; +} +.service.mouseover { + stroke: #167F39; + stroke-width: 2; +} +.service.selected { + stroke: #167F39; + stroke-width: 4; +} +.service > .heading { + stroke: #167F39; + fill: #167F39; + font-size: 9pt; + stroke-width: 0; + font-weight: normal; + text-align: center; +} + +.inputport { + fill: #D96666; + stroke: #E74C3C; + stroke-width: 1; + font-weight: bold; + + /* properties for vbox */ + line-height: 10px; + padding: 10px; + text-align: center; +} +.inputport.mouseover { + stroke: #AB1A25; + stroke-width: 2; +} +.inputport.selected { + stroke: #AB1A25; + stroke-width: 4; +} + +.outputport { + fill: #81AC8B; + stroke: #67CC8E; + stroke-width: 1; + font-weight: bold; + + /* properties for vbox */ + line-height: 10px; + padding: 10px; + text-align: center; +} +.outputport.mouseover { + stroke: #289976; + stroke-width: 2; +} +.outputport.selected { + stroke: #289976; + stroke-width: 4; +} + +.sprotty-comp { + line-height: 3px; + font-weight: normal; + text-align: left; +} + +.listflatcontainer_label { + font-weight: bold; +} + +.sprotty-graph { + font-size: 14px; +} + +.sprotty-label { + stroke-width: 0; + fill: #000; + font-weight: inherit; + text-align: inherit; + font-size: 14px; +} + +.sprotty-edge { + fill: none; + stroke: #000; + stroke-width: 2; +} +.sprotty-edge.arrow { + fill: #000; + stroke: #000; +} +.missing { + stroke-width: 1; + stroke: #f00; + fill: #f00; + font-size: 14pt; + text-anchor: middle; +} + + +.popup-title { + font-weight: bold; + margin-bottom: 10px; +} + +.popup-body > p { + margin-bottom: 2px; +}
\ No newline at end of file diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/css/page.css b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/css/page.css new file mode 100644 index 0000000000..9a7ea05632 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/css/page.css @@ -0,0 +1,487 @@ +/******************************************************************************* + * Copyright (c) 2018 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +html { + --light-blue: hsl(200, 100%, 75%); + --blue: hsl(200, 100%, 55%); + --dark-blue: hsl(200, 100%, 45%); + + --light-green: hsl(146, 83%, 55%); + --green: hsl(146, 83%, 45%); + --dark-green: hsl(146, 83%, 35%); + + --light-yellow: hsl(44, 100%, 68.6%); + --yellow: hsl(44, 100%, 58.6%); + --dark-yellow: hsl(44, 100%, 48.6%); + + --light-orange: hsl(15.5, 100%, 74.3%); + --orange: hsl(15.5, 100%, 64.3%); + --dark-orange: hsl(15.5, 100%, 54.3%); + + --light-red: hsl(0, 100%, 74.3%); + --red: hsl(0, 100%, 64.3%); + --dark-red: hsl(0, 100%, 54.3%); + + --light-pink: hsl(312, 100%, 74.3%); + --pink: hsl(312, 100%, 64.3%); + --dark-pink: hsl(312, 100%, 54.3%); + + --light-purple: hsl(254, 82.9%, 74.7%); + --purple: hsl(254, 82.2%, 64.7%); + --dark-purple: hsl(254, 81.8%, 54.7%); + + --black: hsl(0, 0%, 0%); + --darkness: hsl(212, 32.6%, 18%); + --steel: hsl(213.1, 27.1%, 21%); + --slate: hsl(214.3, 18.9%, 29%); + --silver: hsl(215.3, 16%, 58.4%); + --dark-smoke: hsl(212.3, 26%, 80.4%); + --smoke: hsl(211.6, 27.5%, 86.5%); + --light-smoke: hsl(212.3, 26.5%, 90.4%); + --dark-snow: hsl(221.5, 33.3%, 92.4%); + --snow: hsl(217.5, 33.3%, 95.3%); + --light-snow: hsl(220, 33.3%, 98.2%); + --white: hsl(0, 0%, 100%); + + --layoutDimension-xs: 4px; + --layoutDimension-s: 8px; + --layoutDimension-m: 16px; + --layoutDimension-l: 32px; + --layoutDimension-xl: 64px; + --layoutDimension-xxl: 128px; + --layoutDimension-xxxl: 600px; + + --fontSize-xs: 12px; + --fontSize-s: 14px; + --fontSize-m: 16px; + --fontSize-l: 20px; + --fontSize-xl: 28px; + --fontSize-xxl: 34px; + --fontSize-xxxl: 64px; + + --fontWeight-light: 300; + --fontWeight-regular: 400; + --fontWeight-semiBold: 600; + --fontWeight-bold: 700; + --fontWeight-extraBold: 800; + + --lineHeight-xs: 18px; + --lineHeight-s: 20px; + --lineHeight-m: 22px; + --lineHeight-l: 30px; + --lineHeight-xl: 38px; + --lineHeight-xxl: 50px; + --lineHeight-xxxl: 70px; + + --boxShadow-emboss: inset 0 -2px 0 0 rgba(31, 45, 61, 0.15); + --boxShadow-deboss: inset 0 2px 0 0 rgba(31, 45, 61, 0.15); + --boxShadow-float: 0 1px 4px 0 rgba(31, 45, 61, 0.15); + --boxShadow-border: 0 0 0 1px var(--light-smoke); + + --borderRadius-small: 2px; + --borderRadius-medium: 4px; + --borderRadius-large: 8px; + --borderRadius-extraLarge: 16px; + --borderRadius-circle: 50%; +} + + +html, +body, +div, +span, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +abbr, +address, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +samp, +small, +strong, +sub, +sup, +var, +b, +i, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section, +summary, +time, +mark, +audio, +video { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-size: 100%; + vertical-align: baseline; + background: transparent; +} + +*, +*:before, +*:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +:focus { + outline: 0; +} + +body { + line-height: 1; + color: black; + background: white; +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block; +} + +nav ul { + list-style: none; +} + +blockquote, +q { + quotes: none; +} + +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ''; + content: none; +} + +a { + margin: 0; + padding: 0; + font-size: 100%; + vertical-align: baseline; + background: transparent; +} + +ins { + background-color: white; + color: black; + text-decoration: none; +} + +mark { + background-color: white; + color: black; + font-style: inherit; + font-weight: inherit; +} + +del { + text-decoration: line-through; +} + +abbr[title], +dfn[title] { + border-bottom: 1px dotted; + cursor: help; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} + +hr { + display: block; + height: 1px; + border: 0; + border-top: 1px solid black; + margin: 1em 0; + padding: 0; +} + +input, +select { + vertical-align: middle; +} + +a, +a:visited, +a:hover { + /*color: inherit;*/ + text-decoration: none; +} + +ol, +ul { + list-style: none; +} + +[role='button'], +input[type='submit'], +input[type='reset'], +input[type='button'], +button { + background: none; + border: 0; + color: inherit; + font: inherit; + line-height: normal; + overflow: visible; + padding: 0; + appearance: button; + -webkit-appearance: button; /* for input */ + -webkit-user-select: none; /* for button */ + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +input::-moz-focus-inner, +button::-moz-focus-inner { + border: 0; + padding: 0; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: normal; +} + +[role="button"], +input[type="submit"], +input[type="reset"], +input[type="button"], +button { + box-sizing: content-box; +} + +input[type="submit"], +input[type="reset"], +input[type="button"], +button { + background: none; + border: 0; + color: inherit; + font: inherit; + line-height: normal; + overflow: visible; + padding: 0; + -webkit-appearance: button; /* for input */ + -webkit-user-select: none; /* for button */ + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +input::-moz-focus-inner, +button::-moz-focus-inner { + border: 0; + padding: 0; +} +:focus { + outline: 0px; +} + +.container { + display: grid; + box-sizing: border-box; + width: 100vw; + height: 100vh; + grid-template-columns: auto minmax(auto, min-content); + grid-template-rows: minmax(auto, min-content) auto; + padding: 0; + grid-column-gap: 0px; + grid-row-gap: 0px; +} + +.diagram-title { + grid-column-start: 1; + grid-column-end: 3; + grid-row-start: 1; + grid-row-end: 2; + + display: grid; + grid-template-columns: auto minmax(auto, min-content); + grid-template-rows: 1fr; + border-right: 1px solid var(--silver); + box-shadow: var(--boxShadow-float); + padding: var(--layoutDimension-s) var(--layoutDimension-m); +} +.diagram-main { + grid-column-start: 1; + grid-column-end: 2; + grid-row-start: 2; + grid-row-end: 3; + + border-right: 1px solid var(--slate); +} +.title { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + color: var(--darkness); + + font-size: var(--fontSize-xxl); + line-height: var(--lineHeight-xxl); + font-weight: var(--fontWeight-bold); +} +.sprotty { + height: 100%; +} +svg { + width: 100%; + height: 100%; +} +#toggle-palette { + min-width: 50px; + font-weight: var(--fontWeight-bold); + font-size: var(--fontSize-xxl); +} + +.palette-main { + grid-column-start: 2; + grid-column-end: 3; + grid-row-start: 2; + grid-row-end: 3; + + min-width: 300px; + display: grid; + grid-template-columns: 1fr; + grid-template-rows: + minmax(auto, min-content) + auto + minmax(auto, min-content) + minmax(150px, min-content) +} +.palette-main>h2 { + font-family: 'Open Sans', Arial, sans-serif; + font-size: var(--fontSize-xl); + line-height: var(--lineHeight-bodyMedium); + font-weight: var(--fontWeight-bold); + color: var(--white); + background-color: var(--silver); + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + padding: var(--layoutDimension-m) 0px var(--layoutDimension-m) var(--layoutDimension-l); + margin: 0; +} + +#tools-palette { + display: grid; + grid-template-columns: 1fr 1fr; + grid-template-rows: repeat(auto-fill, 100px); + border-left: 1px solid var(--silver); + padding: var(--layoutDimension-l) var(--layoutDimension-l) var(--layoutDimension-l) var(--layoutDimension-l); +} +.tool { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + + font-family: 'Open Sans', Arial, sans-serif; + font-size: var(--fontSize-l); + font-weight: var(--fontWeight-semiBold); + color: var(--slate); +} +.tool>img { + width: 50px; +} +.tool:hover { + color: var(--silver); +} +.tool:active { + color: var(--black); +} + +#layers-palette { + border-left: 1px solid var(--silver); + padding: var(--layoutDimension-l) var(--layoutDimension-l) var(--layoutDimension-l) var(--layoutDimension-l); +} +.layer { + display: grid; + grid-template-columns: auto minmax(auto, min-content); + grid-template-rows: 1fr; + align-items: center; + + font-family: 'Open Sans', Arial, sans-serif; + font-size: var(--fontSize-l); + font-weight: var(--fontWeight-semiBold); + color: var(--slate); +} +input[type="checkbox"] { + width: 2.2em; + height: 2.2em; +} + +.closed { display: none; }
\ No newline at end of file diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/css/sprotty.css b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/css/sprotty.css new file mode 100644 index 0000000000..bd54e4fa31 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/css/sprotty.css @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright (c) 2018 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ + + .sprotty { + padding: 0px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +.sprotty-hidden { + display: block; + position: absolute; + width: 0px; + height: 0px; +} + +.sprotty-popup { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + position: absolute; + background: white; + border-radius: 5px; + border: 1px solid; + max-width: 400px; + min-width: 100px; +} + +.sprotty-popup > div { + margin: 10px; +} + +.sprotty-popup-closed { + display: none; +}
\ No newline at end of file diff --git a/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/index.html b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/index.html new file mode 100644 index 0000000000..cde55e9475 --- /dev/null +++ b/plugins/org.eclipse.sirius.server.diagram.sprotty/webapp/index.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Eclipse Sirius</title> + <link rel="stylesheet" href="css/sprotty.css"> + <link rel="stylesheet" href="css/page.css"> + <link rel="stylesheet" href="css/diagram.css"> +</head> +<body> + <div class="container"> + <div class="diagram-title"> + <h1 class="title">Eclipse Sirius</h1> + </div> + + <div class="diagram-main"> + <div id="sprotty" class="sprotty"/></div> + </div> + + <div class="palette-main"> + <h2>Tools</h2> + <div id="tools-palette"></div> + <h2>Layers</h2> + <div id="layers-palette"></div> + </div> + </div> + </div> + <script src="bundle.js"></script> +</body> +</html>
\ No newline at end of file |